From 6c8a46d38bb2d80a123375bac16940e53897f7d1 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Fri, 1 Apr 2022 16:05:16 -0400 Subject: [PATCH] allbuild commit 1bf12d29 --- doc/source/changelog.rst | 15 ++++++ doc/source/conf.py | 2 +- main.bundle.js | 4 +- main.bundle.js.map | 2 +- src/Constants.ts | 106 ++++----------------------------------- 5 files changed, 29 insertions(+), 100 deletions(-) diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst index 0ae9fe955..68d3903d3 100644 --- a/doc/source/changelog.rst +++ b/doc/source/changelog.rst @@ -3,6 +3,21 @@ Changelog ========= +v1.6.3 - 2022-04-01 Few stanek fixes +------------------------------------ + + Stanek Gift + +* Has a minimum size of 2x3 +* Active Fragment property 'avgCharge' renamed to 'highestCharge' +* Formula for fragment effect updated to make 561% more sense. + Now you can charge to your heart content. +* Logs for the 'chargeFragment' function updated. + + Misc. + +* Nerf noodle bar. + v1.6.0 - 2022-03-29 Grafting ---------------------------- diff --git a/doc/source/conf.py b/doc/source/conf.py index 8c629c881..eb814598c 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -66,7 +66,7 @@ documentation_title = '{0} Documentation'.format(project) # The short X.Y version. version = '1.6' # The full version, including alpha/beta/rc tags. -release = '1.6.0' +release = '1.6.3' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/main.bundle.js b/main.bundle.js index ce63835e5..1303ab515 100644 --- a/main.bundle.js +++ b/main.bundle.js @@ -1,4 +1,4 @@ -!function(t){function e(e){for(var a,o,s=e[0],l=e[1],c=e[2],u=0,m=[];u Reset Zoom' command to Steam (@smolgumball)\n * Add hasOwnProperty check to GetServer (@SagePtr)\n * Speed up employee productivity calculation (@pd)\n * Field Work and Security Work benefit from 'share' (@SagePtr)\n * Nerf noodle bar.\n"}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var a=n(205),r=n(336),i=n(394);const o={ActiveScriptsServerPageSize:10,ActiveScriptsScriptPageSize:10,AutosaveInterval:60,CodeInstructionRunTime:50,DisableASCIIArt:!1,DisableHotkeys:!1,DisableTextEffects:!1,DisableOverviewProgressBars:!1,EnableBashHotkeys:!1,TimestampsFormat:"",Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,MaxTerminalCapacity:500,SaveGameOnFileSave:!0,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1,SuppressBladeburnerPopup:!1,SuppressTIXPopup:!1,SuppressSavedGameToast:!1,SuppressAutosaveDisabledWarnings:!1,UseIEC60027_2:!1,ExcludeRunningScriptsFromSave:!1,IsSidebarOpened:!0,theme:r.a,styles:i.a,overview:{x:0,y:0,opened:!0}},s={ActiveScriptsServerPageSize:o.ActiveScriptsServerPageSize,ActiveScriptsScriptPageSize:o.ActiveScriptsScriptPageSize,AutosaveInterval:o.AutosaveInterval,CodeInstructionRunTime:25,DisableASCIIArt:o.DisableASCIIArt,DisableHotkeys:o.DisableHotkeys,DisableTextEffects:o.DisableTextEffects,DisableOverviewProgressBars:o.DisableOverviewProgressBars,EnableBashHotkeys:o.EnableBashHotkeys,TimestampsFormat:o.TimestampsFormat,Locale:"en",MaxLogCapacity:o.MaxLogCapacity,MaxPortCapacity:o.MaxPortCapacity,MaxTerminalCapacity:o.MaxTerminalCapacity,OwnedAugmentationsOrder:a.a.AcquirementTime,PurchaseAugmentationsOrder:a.b.Default,SaveGameOnFileSave:o.SaveGameOnFileSave,SuppressBuyAugmentationConfirmation:o.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:o.SuppressFactionInvites,SuppressMessages:o.SuppressMessages,SuppressTravelConfirmation:o.SuppressTravelConfirmation,SuppressBladeburnerPopup:o.SuppressBladeburnerPopup,SuppressTIXPopup:o.SuppressTIXPopup,SuppressSavedGameToast:o.SuppressSavedGameToast,SuppressAutosaveDisabledWarnings:o.SuppressAutosaveDisabledWarnings,UseIEC60027_2:o.UseIEC60027_2,ExcludeRunningScriptsFromSave:o.ExcludeRunningScriptsFromSave,IsSidebarOpened:o.IsSidebarOpened,MonacoTheme:"monokai",MonacoInsertSpaces:!1,MonacoFontSize:20,MonacoVim:!1,MonacoWordWrap:"off",theme:{...r.a},styles:{...i.a},overview:o.overview,init(){Object.assign(s,o)},load(t){const e=JSON.parse(t);Object.assign(s.theme,e.theme),delete e.theme,Object.assign(s.styles,e.styles),delete e.styles,Object.assign(s.overview,e.overview),delete e.overview,Object.assign(s,e)}}},,function(t,e,n){"use strict";let a;n.d(e,"a",(function(){return a})),function(t){t.AevumAeroCorp="AeroCorp",t.AevumBachmanAndAssociates="Bachman & Associates",t.AevumClarkeIncorporated="Clarke Incorporated",t.AevumCrushFitnessGym="Crush Fitness Gym",t.AevumECorp="ECorp",t.AevumFulcrumTechnologies="Fulcrum Technologies",t.AevumGalacticCybersystems="Galactic Cybersystems",t.AevumNetLinkTechnologies="NetLink Technologies",t.AevumPolice="Aevum Police Headquarters",t.AevumRhoConstruction="Rho Construction",t.AevumSnapFitnessGym="Snap Fitness Gym",t.AevumSummitUniversity="Summit University",t.AevumWatchdogSecurity="Watchdog Security",t.AevumCasino="Iker Molina Casino",t.ChongqingKuaiGongInternational="KuaiGong International",t.ChongqingSolarisSpaceSystems="Solaris Space Systems",t.ChongqingChurchOfTheMachineGod="Church of the Machine God",t.Sector12AlphaEnterprises="Alpha Enterprises",t.Sector12BladeIndustries="Blade Industries",t.Sector12CIA="Central Intelligence Agency",t.Sector12CarmichaelSecurity="Carmichael Security",t.Sector12CityHall="Sector-12 City Hall",t.Sector12DeltaOne="DeltaOne",t.Sector12FoodNStuff="FoodNStuff",t.Sector12FourSigma="Four Sigma",t.Sector12IcarusMicrosystems="Icarus Microsystems",t.Sector12IronGym="Iron Gym",t.Sector12JoesGuns="Joe's Guns",t.Sector12MegaCorp="MegaCorp",t.Sector12NSA="National Security Agency",t.Sector12PowerhouseGym="Powerhouse Gym",t.Sector12RothmanUniversity="Rothman University",t.Sector12UniversalEnergy="Universal Energy",t.NewTokyoDefComm="DefComm",t.NewTokyoGlobalPharmaceuticals="Global Pharmaceuticals",t.NewTokyoNoodleBar="Noodle Bar",t.NewTokyoVitaLife="VitaLife",t.NewTokyoArcade="Arcade",t.IshimaNovaMedical="Nova Medical",t.IshimaOmegaSoftware="Omega Software",t.IshimaStormTechnologies="Storm Technologies",t.IshimaGlitch="0x6C1",t.VolhavenCompuTek="CompuTek",t.VolhavenHeliosLabs="Helios Labs",t.VolhavenLexoCorp="LexoCorp",t.VolhavenMilleniumFitnessGym="Millenium Fitness Gym",t.VolhavenNWO="NWO",t.VolhavenOmniTekIncorporated="OmniTek Incorporated",t.VolhavenOmniaCybersystems="Omnia Cybersystems",t.VolhavenSysCoreSecurities="SysCore Securities",t.VolhavenZBInstituteOfTechnology="ZB Institute of Technology",t.Hospital="Hospital",t.Slums="The Slums",t.TravelAgency="Travel Agency",t.WorldStockExchange="World Stock Exchange",t.Void="The Void"}(a||(a={}))},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o}));const a={ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptCorporationRamCost:1022.4,ScriptHackRamCost:.1,ScriptHackAnalyzeRamCost:1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,ScriptWeakenAnalyzeRamCost:1,ScriptScanRamCost:.2,ScriptPortProgramRamCost:.05,ScriptRunRamCost:1,ScriptExecRamCost:1.3,ScriptSpawnRamCost:2,ScriptScpRamCost:.6,ScriptKillRamCost:.5,ScriptHasRootAccessRamCost:.05,ScriptGetHostnameRamCost:.05,ScriptGetHackingLevelRamCost:.05,ScriptGetMultipliersRamCost:4,ScriptGetServerRamCost:.1,ScriptGetServerMaxRam:.05,ScriptGetServerUsedRam:.05,ScriptFileExistsRamCost:.1,ScriptIsRunningRamCost:.1,ScriptHacknetNodesRamCost:4,ScriptHNUpgLevelRamCost:.4,ScriptHNUpgRamRamCost:.6,ScriptHNUpgCoreRamCost:.8,ScriptGetStockRamCost:2,ScriptBuySellStockRamCost:2.5,ScriptGetPurchaseServerRamCost:.25,ScriptPurchaseServerRamCost:2.25,ScriptGetPurchasedServerLimit:.05,ScriptGetPurchasedServerMaxRam:.05,ScriptRoundRamCost:.05,ScriptReadWriteRamCost:1,ScriptArbScriptRamCost:1,ScriptGetScriptRamCost:.1,ScriptGetRunningScriptRamCost:.3,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSleeveBaseRamCost:4,ScriptGetOwnedSourceFiles:5,ScriptSingularityFn1RamCost:2,ScriptSingularityFn2RamCost:3,ScriptSingularityFn3RamCost:5,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4,ScriptStanekWidth:.4,ScriptStanekHeight:.4,ScriptStanekCharge:.4,ScriptStanekFragmentDefinitions:0,ScriptStanekPlacedFragments:5,ScriptStanekClear:0,ScriptStanekCanPlace:.5,ScriptStanekPlace:5,ScriptStanekFragmentAt:2,ScriptStanekDeleteAt:.15};function r(t){return e=>{if(4===e.bitNodeN)return t;const n=e.sourceFileLvl(4);return n<=1?16*t:2===n?4*t:t}}const i={hacknet:{numNodes:0,purchaseNode:0,getPurchaseNodeCost:0,getNodeStats:0,upgradeLevel:0,upgradeRam:0,upgradeCore:0,upgradeCache:0,getLevelUpgradeCost:0,getRamUpgradeCost:0,getCoreUpgradeCost:0,getCacheUpgradeCost:0,numHashes:0,hashCost:0,spendHashes:0},sprintf:0,vsprintf:0,scan:a.ScriptScanRamCost,hack:a.ScriptHackRamCost,hackAnalyzeThreads:a.ScriptHackAnalyzeRamCost,hackAnalyze:a.ScriptHackAnalyzeRamCost,hackAnalyzeSecurity:a.ScriptHackAnalyzeRamCost,hackAnalyzeChance:a.ScriptHackAnalyzeRamCost,sleep:0,asleep:0,share:2.4,getSharePower:.2,grow:a.ScriptGrowRamCost,growthAnalyze:a.ScriptGrowthAnalyzeRamCost,growthAnalyzeSecurity:a.ScriptGrowthAnalyzeRamCost,weaken:a.ScriptWeakenRamCost,weakenAnalyze:a.ScriptWeakenAnalyzeRamCost,print:0,printf:0,tprint:0,clearLog:0,disableLog:0,enableLog:0,isLogEnabled:0,getScriptLogs:0,nuke:a.ScriptPortProgramRamCost,brutessh:a.ScriptPortProgramRamCost,ftpcrack:a.ScriptPortProgramRamCost,relaysmtp:a.ScriptPortProgramRamCost,httpworm:a.ScriptPortProgramRamCost,sqlinject:a.ScriptPortProgramRamCost,run:a.ScriptRunRamCost,exec:a.ScriptExecRamCost,spawn:a.ScriptSpawnRamCost,kill:a.ScriptKillRamCost,killall:a.ScriptKillRamCost,exit:0,atExit:0,scp:a.ScriptScpRamCost,ls:a.ScriptScanRamCost,ps:a.ScriptScanRamCost,hasRootAccess:a.ScriptHasRootAccessRamCost,getIp:a.ScriptGetHostnameRamCost,getHostname:a.ScriptGetHostnameRamCost,getHackingLevel:a.ScriptGetHackingLevelRamCost,getHackingMultipliers:a.ScriptGetMultipliersRamCost,getHacknetMultipliers:a.ScriptGetMultipliersRamCost,getBitNodeMultipliers:a.ScriptGetMultipliersRamCost,getServer:a.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:a.ScriptGetServerRamCost,getServerSecurityLevel:a.ScriptGetServerRamCost,getServerBaseSecurityLevel:a.ScriptGetServerRamCost,getServerMinSecurityLevel:a.ScriptGetServerRamCost,getServerRequiredHackingLevel:a.ScriptGetServerRamCost,getServerMaxMoney:a.ScriptGetServerRamCost,getServerGrowth:a.ScriptGetServerRamCost,getServerNumPortsRequired:a.ScriptGetServerRamCost,getServerRam:a.ScriptGetServerRamCost,getServerMaxRam:a.ScriptGetServerMaxRam,getServerUsedRam:a.ScriptGetServerUsedRam,serverExists:a.ScriptGetServerRamCost,fileExists:a.ScriptFileExistsRamCost,isRunning:a.ScriptIsRunningRamCost,stock:{getSymbols:a.ScriptGetStockRamCost,getPrice:a.ScriptGetStockRamCost,getAskPrice:a.ScriptGetStockRamCost,getBidPrice:a.ScriptGetStockRamCost,getPosition:a.ScriptGetStockRamCost,getMaxShares:a.ScriptGetStockRamCost,getPurchaseCost:a.ScriptGetStockRamCost,getSaleGain:a.ScriptGetStockRamCost,buy:a.ScriptBuySellStockRamCost,sell:a.ScriptBuySellStockRamCost,short:a.ScriptBuySellStockRamCost,sellShort:a.ScriptBuySellStockRamCost,placeOrder:a.ScriptBuySellStockRamCost,cancelOrder:a.ScriptBuySellStockRamCost,getOrders:a.ScriptBuySellStockRamCost,getVolatility:a.ScriptBuySellStockRamCost,getForecast:a.ScriptBuySellStockRamCost,purchase4SMarketData:a.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:a.ScriptBuySellStockRamCost,purchaseWseAccount:a.ScriptBuySellStockRamCost,purchaseTixApi:a.ScriptBuySellStockRamCost},getPurchasedServerLimit:a.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:a.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:a.ScriptGetPurchaseServerRamCost,purchaseServer:a.ScriptPurchaseServerRamCost,deleteServer:a.ScriptPurchaseServerRamCost,getPurchasedServers:a.ScriptPurchaseServerRamCost,write:0,tryWritePort:0,read:0,peek:0,clear:0,writePort:0,readPort:0,getPortHandle:0,rm:a.ScriptReadWriteRamCost,scriptRunning:a.ScriptArbScriptRamCost,scriptKill:a.ScriptArbScriptRamCost,getScriptName:0,getScriptRam:a.ScriptGetScriptRamCost,getHackTime:a.ScriptGetHackTimeRamCost,getGrowTime:a.ScriptGetHackTimeRamCost,getWeakenTime:a.ScriptGetHackTimeRamCost,getScriptIncome:a.ScriptGetScriptRamCost,getScriptExpGain:a.ScriptGetScriptRamCost,getRunningScript:a.ScriptGetRunningScriptRamCost,nFormat:0,tFormat:0,getTimeSinceLastAug:a.ScriptGetHackTimeRamCost,prompt:0,wget:0,getFavorToDonate:a.ScriptGetFavorToDonate,getPlayer:a.ScriptSingularityFn1RamCost/4,mv:0,getOwnedSourceFiles:a.ScriptGetOwnedSourceFiles,tail:0,toast:0,universityCourse:r(a.ScriptSingularityFn1RamCost),gymWorkout:r(a.ScriptSingularityFn1RamCost),travelToCity:r(a.ScriptSingularityFn1RamCost),goToLocation:r(a.ScriptSingularityFn1RamCost),purchaseTor:r(a.ScriptSingularityFn1RamCost),purchaseProgram:r(a.ScriptSingularityFn1RamCost),getCurrentServer:r(a.ScriptSingularityFn1RamCost),connect:r(a.ScriptSingularityFn1RamCost),manualHack:r(a.ScriptSingularityFn1RamCost),installBackdoor:r(a.ScriptSingularityFn1RamCost),getDarkwebProgramCost:r(a.ScriptSingularityFn1RamCost/4),getDarkwebPrograms:r(a.ScriptSingularityFn1RamCost/4),getStats:r(a.ScriptSingularityFn1RamCost/4),getCharacterInformation:r(a.ScriptSingularityFn1RamCost/4),hospitalize:r(a.ScriptSingularityFn1RamCost/4),isBusy:r(a.ScriptSingularityFn1RamCost/4),stopAction:r(a.ScriptSingularityFn1RamCost/2),upgradeHomeRam:r(a.ScriptSingularityFn2RamCost),upgradeHomeCores:r(a.ScriptSingularityFn2RamCost),getUpgradeHomeRamCost:r(a.ScriptSingularityFn2RamCost/2),getUpgradeHomeCoresCost:r(a.ScriptSingularityFn2RamCost/2),workForCompany:r(a.ScriptSingularityFn2RamCost),applyToCompany:r(a.ScriptSingularityFn2RamCost),getCompanyRep:r(a.ScriptSingularityFn2RamCost/3),getCompanyFavor:r(a.ScriptSingularityFn2RamCost/3),getCompanyFavorGain:r(a.ScriptSingularityFn2RamCost/4),checkFactionInvitations:r(a.ScriptSingularityFn2RamCost),joinFaction:r(a.ScriptSingularityFn2RamCost),workForFaction:r(a.ScriptSingularityFn2RamCost),getFactionRep:r(a.ScriptSingularityFn2RamCost/3),getFactionFavor:r(a.ScriptSingularityFn2RamCost/3),getFactionFavorGain:r(a.ScriptSingularityFn2RamCost/4),donateToFaction:r(a.ScriptSingularityFn3RamCost),createProgram:r(a.ScriptSingularityFn3RamCost),commitCrime:r(a.ScriptSingularityFn3RamCost),getCrimeChance:r(a.ScriptSingularityFn3RamCost),getCrimeStats:r(a.ScriptSingularityFn3RamCost),getOwnedAugmentations:r(a.ScriptSingularityFn3RamCost),getAugmentationsFromFaction:r(a.ScriptSingularityFn3RamCost),getAugmentationCost:r(a.ScriptSingularityFn3RamCost),getAugmentationPrereq:r(a.ScriptSingularityFn3RamCost),getAugmentationPrice:r(a.ScriptSingularityFn3RamCost/2),getAugmentationRepReq:r(a.ScriptSingularityFn3RamCost/2),getAugmentationStats:r(a.ScriptSingularityFn3RamCost),purchaseAugmentation:r(a.ScriptSingularityFn3RamCost),softReset:r(a.ScriptSingularityFn3RamCost),installAugmentations:r(a.ScriptSingularityFn3RamCost),isFocused:r(.1),setFocus:r(.1),gang:{createGang:a.ScriptGangApiBaseRamCost/4,inGang:a.ScriptGangApiBaseRamCost/4,getMemberNames:a.ScriptGangApiBaseRamCost/4,getGangInformation:a.ScriptGangApiBaseRamCost/2,getOtherGangInformation:a.ScriptGangApiBaseRamCost/2,getMemberInformation:a.ScriptGangApiBaseRamCost/2,canRecruitMember:a.ScriptGangApiBaseRamCost/4,recruitMember:a.ScriptGangApiBaseRamCost/2,getTaskNames:a.ScriptGangApiBaseRamCost/4,getTaskStats:a.ScriptGangApiBaseRamCost/4,setMemberTask:a.ScriptGangApiBaseRamCost/2,getEquipmentNames:a.ScriptGangApiBaseRamCost/4,getEquipmentCost:a.ScriptGangApiBaseRamCost/2,getEquipmentType:a.ScriptGangApiBaseRamCost/2,getEquipmentStats:a.ScriptGangApiBaseRamCost/2,purchaseEquipment:a.ScriptGangApiBaseRamCost,ascendMember:a.ScriptGangApiBaseRamCost,getAscensionResult:a.ScriptGangApiBaseRamCost/2,setTerritoryWarfare:a.ScriptGangApiBaseRamCost/2,getChanceToWinClash:a.ScriptGangApiBaseRamCost,getBonusTime:0},bladeburner:{getContractNames:a.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:a.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:a.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:a.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:a.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:a.ScriptBladeburnerApiBaseRamCost/10,startAction:a.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:a.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:a.ScriptBladeburnerApiBaseRamCost/4,getActionTime:a.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:a.ScriptBladeburnerApiBaseRamCost,getActionRepGain:a.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:a.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:a.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:a.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:a.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:a.ScriptBladeburnerApiBaseRamCost,setActionLevel:a.ScriptBladeburnerApiBaseRamCost,getRank:a.ScriptBladeburnerApiBaseRamCost,getSkillPoints:a.ScriptBladeburnerApiBaseRamCost,getSkillLevel:a.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:a.ScriptBladeburnerApiBaseRamCost,upgradeSkill:a.ScriptBladeburnerApiBaseRamCost,getTeamSize:a.ScriptBladeburnerApiBaseRamCost,setTeamSize:a.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:a.ScriptBladeburnerApiBaseRamCost,getCityCommunities:a.ScriptBladeburnerApiBaseRamCost,getCityChaos:a.ScriptBladeburnerApiBaseRamCost,getCity:a.ScriptBladeburnerApiBaseRamCost,switchCity:a.ScriptBladeburnerApiBaseRamCost,getStamina:a.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:a.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:a.ScriptBladeburnerApiBaseRamCost,getBonusTime:0},codingcontract:{attempt:a.ScriptCodingContractBaseRamCost,getContractType:a.ScriptCodingContractBaseRamCost/2,getData:a.ScriptCodingContractBaseRamCost/2,getDescription:a.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:a.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:a.ScriptSleeveBaseRamCost,setToShockRecovery:a.ScriptSleeveBaseRamCost,setToSynchronize:a.ScriptSleeveBaseRamCost,setToCommitCrime:a.ScriptSleeveBaseRamCost,setToUniversityCourse:a.ScriptSleeveBaseRamCost,travel:a.ScriptSleeveBaseRamCost,setToCompanyWork:a.ScriptSleeveBaseRamCost,setToFactionWork:a.ScriptSleeveBaseRamCost,setToGymWorkout:a.ScriptSleeveBaseRamCost,getSleeveStats:a.ScriptSleeveBaseRamCost,getTask:a.ScriptSleeveBaseRamCost,getInformation:a.ScriptSleeveBaseRamCost,getSleeveAugmentations:a.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:a.ScriptSleeveBaseRamCost,purchaseSleeveAug:a.ScriptSleeveBaseRamCost},stanek:{giftWidth:a.ScriptStanekWidth,giftHeight:a.ScriptStanekHeight,chargeFragment:a.ScriptStanekCharge,fragmentDefinitions:a.ScriptStanekFragmentDefinitions,activeFragments:a.ScriptStanekPlacedFragments,clearGift:a.ScriptStanekClear,canPlaceFragment:a.ScriptStanekCanPlace,placeFragment:a.ScriptStanekPlace,getFragment:a.ScriptStanekFragmentAt,removeFragment:a.ScriptStanekDeleteAt},ui:{getTheme:0,setTheme:0,resetTheme:0,getStyles:0,setStyles:0,resetStyles:0,getGameInfo:0},grafting:{getAugmentationGraftPrice:3.75,getAugmentationGraftTime:3.75,graftAugmentation:7.5},heart:{break:0}};function o(t,...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let n=i[e[0]];for(let t=1;tObject(o.a)({unbuyable:{color:t.palette.action.disabled},money:{color:t.colors.money}}));function l(t){const e=s();if(void 0!==t.player){if("number"!=typeof t.money)throw new Error("if player if provided, money should be number, contact dev");if(!t.player.canAfford(t.money))return a.createElement("span",{className:e.unbuyable},r.a.formatMoney(t.money))}return a.createElement("span",{className:e.money},"number"==typeof t.money?r.a.formatMoney(t.money):t.money)}},,,,function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"f",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"e",(function(){return l})),n.d(e,"c",(function(){return c}));var a=n(147);function r(t,e=!1){t=Math.floor(t);const n=Math.floor(t/1e3),a=Math.floor(n/86400),r=n%86400,i=Math.floor(r/3600),o=r%3600,s=Math.floor(o/60),l=o%60,c=(()=>{let e=""+t%1e3;for(;e.length<3;)e="0"+e;return e})();let f="";return a>0&&(f+=a+" days "),i>0&&(f+=i+" hours "),s>0&&(f+=s+" minutes "),f+=(e?`${l}.${c}`:""+l)+" seconds",f}function i(t){if(!o(t))return"";if(0===t.length)return"";const e=t.concat().sort(),n=e[0],a=e[e.length-1],r=n.length;let i=0;for(;i>>16,2246822507)^Math.imul(a^a>>>13,3266489909),a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),(4294967296*(2097151&a)+(n>>>0)).toString(16)}},function(t,e,n){"use strict";n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var a=n(378);function r(t,e){if(null==e)return null;if("object"==typeof e&&"string"==typeof e.ctor&&void 0!==e.data){if("AllServersMap"===e.ctor)return console.warn("Converting AllServersMap for v0.43.1"),e.data;const t=r.constructors[e.ctor];if("function"==typeof t&&"function"==typeof t.fromJSON){const n=t.fromJSON(e);return void 0!==t.validationData&&Object(a.b)(n,t.validationData),n}}return e}function i(t,e,n){n||(n=Object.keys(e));const a={};for(let t=0;t{switch(typeof t){case"number":return t;case"object":return Object(o.a)(t.min,t.max);default:throw Error(`Do not know how to convert the type '${typeof t}' to a number`)}};for(const t of r.a){const r={hostname:t.hostname,ip:g(),numOpenPortsRequired:t.numOpenPortsRequired,organizationName:t.organizationName};void 0!==t.maxRamExponent&&(r.maxRam=Math.pow(2,i(t.maxRamExponent)));for(const e of n)void 0!==t[e]&&(r[e]=i(t[e]));const o=new a.a(r);for(const e of t.literature||[])o.messages.push(e);o.hostname===c.a.WorldDaemon&&(o.requiredHackingSkill*=f.a.WorldDaemonDifficulty),y(o),void 0!==t.networkLayer&&e[i(t.networkLayer)-1].push(o)}const s=(t,e)=>{for(const r of t)n=r,a=e(),n.serversOnNetwork.push(a.hostname),a.serversOnNetwork.push(n.hostname);var n,a};s(e[0],()=>t);for(let t=1;t{return(n=e[t-1])[Math.floor(Math.random()*n.length)];var n})}function E(){for(const t of Object.keys(u))delete u[t];u={}}function v(t){u=JSON.parse(t,s.c)}function k(t=!1){const e=JSON.parse(JSON.stringify(u),s.c);for(const n of Object.keys(e)){const a=e[n];if(t)a.runningScripts=[];else for(let t=0;tObject(a.useContext)(i.Player),Router:()=>Object(a.useContext)(i.Router)}},,function(t,e,n){"use strict";n.d(e,"j",(function(){return a})),n.d(e,"d",(function(){return r})),n.d(e,"i",(function(){return i})),n.d(e,"f",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"h",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"e",(function(){return f})),n.d(e,"k",(function(){return u})),n.d(e,"c",(function(){return m})),n.d(e,"g",(function(){return h}));const a=["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"],r=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],i=["Security Engineer"],o=["Network Engineer","Network Administrator"],s=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],l=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],c=["Field Agent","Secret Agent","Special Operative"],f=["Waiter","Employee"],u=["Software Consultant","Senior Software Consultant"],m=["Business Consultant","Senior Business Consultant"],h=["Part-time Waiter","Part-time Employee"]},,,,function(t,e,n){"use strict";function a(t,e){const n=Math.min(t,e),a=Math.max(t,e);return Math.floor(Math.random()*(a-n+1))+n}n.d(e,"a",(function(){return a}))},,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(17);const r=["START","PURCHASE","PRODUCTION","SALE","EXPORT"],i={INITIALSHARES:1e9,SHARESPERPRICEUPDATE:1e6,IssueNewSharesCooldown:216e3,SellSharesCooldown:18e3,CyclesPerMarketCycle:50,CyclesPerIndustryStateCycle:50/r.length,SecsPerMarketCycle:10,Cities:[a.a.Aevum,a.a.Chongqing,a.a.Sector12,a.a.NewTokyo,a.a.Ishima,a.a.Volhaven],WarehouseInitialCost:5e9,WarehouseInitialSize:100,WarehouseUpgradeBaseCost:1e9,OfficeInitialCost:4e9,OfficeInitialSize:3,OfficeUpgradeBaseCost:1e9,BribeThreshold:1e14,BribeToRepRatio:1e9,ProductProductionCostRatio:5,DividendMaxPercentage:1,EmployeeSalaryMultiplier:3,CyclesPerEmployeeRaise:400,EmployeeRaiseAmount:50,BaseMaxProducts:3,AllCorporationStates:r,AllMaterials:["Water","Energy","Food","Plants","Metal","Hardware","Chemicals","Drugs","Robots","AI Cores","Real Estate"],FundingRoundShares:[.1,.35,.25,.2],FundingRoundMultiplier:[4,3,3,2.5]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return i}));const a={MoneyGainPerLevel:1.5,BaseCost:1e3,LevelBaseCost:1,RamBaseCost:3e4,CoreBaseCost:5e5,PurchaseNextMult:1.85,UpgradeLevelMult:1.04,UpgradeRamMult:1.28,UpgradeCoreMult:1.48,MaxLevel:200,MaxRam:64,MaxCores:16},r={x1:1,x5:5,x10:10,MAX:"MAX"},i={HashesPerLevel:.001,BaseCost:5e4,RamBaseCost:2e5,CoreBaseCost:1e6,CacheBaseCost:1e7,PurchaseMult:3.2,UpgradeLevelMult:1.1,UpgradeRamMult:1.4,UpgradeCoreMult:1.55,UpgradeCacheMult:1.85,MaxServers:20,MaxLevel:300,MaxRam:8192,MaxCores:128,MaxCache:15}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n(6),i=n(29),o=n(4),s=n(20),l=n(25);function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class f{constructor(t={info:"",moneyCost:0,name:"",repCost:0,factions:[]}){c(this,"baseCost",0),c(this,"baseRepRequirement",0),c(this,"isSpecial",!1),c(this,"level",0),c(this,"name",""),c(this,"owned",!1),c(this,"prereqs",[]),c(this,"mults",{}),c(this,"startingCost",0),c(this,"factions",[]),this.name=t.name,this.info=t.info,this.prereqs=t.prereqs?t.prereqs:[],this.baseRepRequirement=t.repCost*r.a.AugmentationRepCost,this.baseCost=t.moneyCost*r.a.AugmentationMoneyCost,this.startingCost=this.baseCost,this.factions=t.factions,t.isSpecial&&(this.isSpecial=!0),this.level=0,t.hacking_mult&&(this.mults.hacking_mult=t.hacking_mult),t.strength_mult&&(this.mults.strength_mult=t.strength_mult),t.defense_mult&&(this.mults.defense_mult=t.defense_mult),t.dexterity_mult&&(this.mults.dexterity_mult=t.dexterity_mult),t.agility_mult&&(this.mults.agility_mult=t.agility_mult),t.charisma_mult&&(this.mults.charisma_mult=t.charisma_mult),t.hacking_exp_mult&&(this.mults.hacking_exp_mult=t.hacking_exp_mult),t.strength_exp_mult&&(this.mults.strength_exp_mult=t.strength_exp_mult),t.defense_exp_mult&&(this.mults.defense_exp_mult=t.defense_exp_mult),t.dexterity_exp_mult&&(this.mults.dexterity_exp_mult=t.dexterity_exp_mult),t.agility_exp_mult&&(this.mults.agility_exp_mult=t.agility_exp_mult),t.charisma_exp_mult&&(this.mults.charisma_exp_mult=t.charisma_exp_mult),t.hacking_chance_mult&&(this.mults.hacking_chance_mult=t.hacking_chance_mult),t.hacking_speed_mult&&(this.mults.hacking_speed_mult=t.hacking_speed_mult),t.hacking_money_mult&&(this.mults.hacking_money_mult=t.hacking_money_mult),t.hacking_grow_mult&&(this.mults.hacking_grow_mult=t.hacking_grow_mult),t.company_rep_mult&&(this.mults.company_rep_mult=t.company_rep_mult),t.faction_rep_mult&&(this.mults.faction_rep_mult=t.faction_rep_mult),t.crime_money_mult&&(this.mults.crime_money_mult=t.crime_money_mult),t.crime_success_mult&&(this.mults.crime_success_mult=t.crime_success_mult),t.work_money_mult&&(this.mults.work_money_mult=t.work_money_mult),t.hacknet_node_money_mult&&(this.mults.hacknet_node_money_mult=t.hacknet_node_money_mult),t.hacknet_node_purchase_cost_mult&&(this.mults.hacknet_node_purchase_cost_mult=t.hacknet_node_purchase_cost_mult),t.hacknet_node_ram_cost_mult&&(this.mults.hacknet_node_ram_cost_mult=t.hacknet_node_ram_cost_mult),t.hacknet_node_core_cost_mult&&(this.mults.hacknet_node_core_cost_mult=t.hacknet_node_core_cost_mult),t.hacknet_node_level_cost_mult&&(this.mults.hacknet_node_level_cost_mult=t.hacknet_node_level_cost_mult),t.bladeburner_max_stamina_mult&&(this.mults.bladeburner_max_stamina_mult=t.bladeburner_max_stamina_mult),t.bladeburner_stamina_gain_mult&&(this.mults.bladeburner_stamina_gain_mult=t.bladeburner_stamina_gain_mult),t.bladeburner_analysis_mult&&(this.mults.bladeburner_analysis_mult=t.bladeburner_analysis_mult),t.bladeburner_success_chance_mult&&(this.mults.bladeburner_success_chance_mult=t.bladeburner_success_chance_mult),void 0===t.stats?this.stats=function(t,e,n){const r=(t,e=0)=>t===1.0777-1?"7.77%":t===1.777-1?"77.7%":o.a.formatPercentage(t,e);let i=a.createElement(a.Fragment,null,"Effects:");return t.hacking_mult&&t.hacking_mult==t.strength_mult&&t.hacking_mult==t.defense_mult&&t.hacking_mult==t.dexterity_mult&&t.hacking_mult==t.agility_mult&&t.hacking_mult==t.charisma_mult?i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_mult-1)," all skills"):(t.hacking_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_mult-1)," hacking skill")),t.strength_mult&&t.strength_mult==t.defense_mult&&t.strength_mult==t.dexterity_mult&&t.strength_mult==t.agility_mult?i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.strength_mult-1)," combat skills"):(t.strength_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.strength_mult-1)," strength skill")),t.defense_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.defense_mult-1)," defense skill")),t.dexterity_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.dexterity_mult-1)," dexterity skill")),t.agility_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.agility_mult-1)," agility skill"))),t.charisma_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.charisma_mult-1)," Charisma skill"))),t.hacking_exp_mult&&t.hacking_exp_mult===t.strength_exp_mult&&t.hacking_exp_mult===t.defense_exp_mult&&t.hacking_exp_mult===t.dexterity_exp_mult&&t.hacking_exp_mult===t.agility_exp_mult&&t.hacking_exp_mult===t.charisma_exp_mult?i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_exp_mult-1)," exp for all skills"):(t.hacking_exp_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_exp_mult-1)," hacking exp")),t.strength_exp_mult&&t.strength_exp_mult===t.defense_exp_mult&&t.strength_exp_mult===t.dexterity_exp_mult&&t.strength_exp_mult===t.agility_exp_mult?i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.strength_exp_mult-1)," combat exp"):(t.strength_exp_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.strength_exp_mult-1)," strength exp")),t.defense_exp_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.defense_exp_mult-1)," defense exp")),t.dexterity_exp_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.dexterity_exp_mult-1)," dexterity exp")),t.agility_exp_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.agility_exp_mult-1)," agility exp"))),t.charisma_exp_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.charisma_exp_mult-1)," charisma exp"))),t.hacking_speed_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_speed_mult-1)," faster hack(), grow(), and weaken()")),t.hacking_chance_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_chance_mult-1)," hack() success chance")),t.hacking_money_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_money_mult-1)," hack() power")),t.hacking_grow_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacking_grow_mult-1)," grow() power")),t.faction_rep_mult&&t.faction_rep_mult===t.company_rep_mult?i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.faction_rep_mult-1)," reputation from factions and companies"):(t.faction_rep_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.faction_rep_mult-1)," reputation from factions")),t.company_rep_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.company_rep_mult-1)," reputation from companies"))),t.crime_money_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.crime_money_mult-1)," crime money")),t.crime_success_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.crime_success_mult-1)," crime success rate")),t.work_money_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.work_money_mult-1)," work money")),t.hacknet_node_money_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.hacknet_node_money_mult-1)," hacknet production")),t.hacknet_node_purchase_cost_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"-",r(-(t.hacknet_node_purchase_cost_mult-1))," hacknet nodes cost")),t.hacknet_node_level_cost_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"-",r(-(t.hacknet_node_level_cost_mult-1))," hacknet nodes upgrade cost")),t.bladeburner_max_stamina_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.bladeburner_max_stamina_mult-1)," Bladeburner Max Stamina")),t.bladeburner_stamina_gain_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.bladeburner_stamina_gain_mult-1)," Bladeburner Stamina gain")),t.bladeburner_analysis_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.bladeburner_analysis_mult-1)," Bladeburner Field Analysis effectiveness")),t.bladeburner_success_chance_mult&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"+",r(t.bladeburner_success_chance_mult-1)," Bladeburner Contracts and Operations success chance")),n&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"Start with ",a.createElement(s.a,{money:n})," after installing Augmentations.")),e&&(i=a.createElement(a.Fragment,null,i,a.createElement("br",null),"Start with ",e.join(" and ")," after installing Augmentations.")),i}(this.mults,t.programs,t.startingMoney):this.stats=t.stats}addToFactions(t){for(let e=0;eObject(o.a)({modal:{display:"flex",alignItems:"center",justifyContent:"center"},paper:{backgroundColor:t.palette.background.default,border:"2px solid "+t.palette.primary.main,boxShadow:`0px 3px 5px -1px ${t.palette.primary.dark},0px 5px 8px 0px ${t.palette.primary.dark},0px 1px 14px 0px ${t.palette.primary.dark}`,padding:2,maxWidth:"80%",maxHeight:"80%",overflow:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}})),u=t=>{const e=f();return r.a.createElement(s.a,{disableRestoreFocus:!0,disableScrollLock:!0,disableEnforceFocus:!0,disableAutoFocus:!0,open:t.open,onClose:t.onClose,closeAfterTransition:!0,className:e.modal},r.a.createElement(l.a,{in:t.open},r.a.createElement("div",{className:e.paper},r.a.createElement(c.a,{sx:{m:2}},t.children))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7,Diplomacy:8,"Hyperbolic Regeneration Chamber":9,"Incite Violence":10}},function(t,e,n){"use strict";n.d(e,"b",(function(){return f})),n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(31),o=n(179),s=n(113);function l(){return(l=Object.assign||function(t){for(var e=1;er.a.createElement(i.a,l({},t,{classes:{root:c().root,...t.classes}})),u=t=>r.a.createElement(o.a,l({},t,{classes:{root:c().small,...t.classes}}))},function(t,e,n){"use strict";n.d(e,"f",(function(){return a})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return l})),n.d(e,"c",(function(){return c})),n.d(e,"a",(function(){return s})),n.d(e,"d",(function(){return f}));var a,r=n(2),i=n(63),o=n(374);!function(t){t[t.Start=0]="Start",t[t.GoToCharacterPage=1]="GoToCharacterPage",t[t.CharacterPage=2]="CharacterPage",t[t.CharacterGoToTerminalPage=3]="CharacterGoToTerminalPage",t[t.TerminalIntro=4]="TerminalIntro",t[t.TerminalHelp=5]="TerminalHelp",t[t.TerminalLs=6]="TerminalLs",t[t.TerminalScan=7]="TerminalScan",t[t.TerminalScanAnalyze1=8]="TerminalScanAnalyze1",t[t.TerminalScanAnalyze2=9]="TerminalScanAnalyze2",t[t.TerminalConnect=10]="TerminalConnect",t[t.TerminalAnalyze=11]="TerminalAnalyze",t[t.TerminalNuke=12]="TerminalNuke",t[t.TerminalManualHack=13]="TerminalManualHack",t[t.TerminalHackingMechanics=14]="TerminalHackingMechanics",t[t.TerminalGoHome=15]="TerminalGoHome",t[t.TerminalCreateScript=16]="TerminalCreateScript",t[t.TerminalTypeScript=17]="TerminalTypeScript",t[t.TerminalFree=18]="TerminalFree",t[t.TerminalRunScript=19]="TerminalRunScript",t[t.TerminalGoToActiveScriptsPage=20]="TerminalGoToActiveScriptsPage",t[t.ActiveScriptsPage=21]="ActiveScriptsPage",t[t.ActiveScriptsToTerminal=22]="ActiveScriptsToTerminal",t[t.TerminalTailScript=23]="TerminalTailScript",t[t.GoToHacknetNodesPage=24]="GoToHacknetNodesPage",t[t.HacknetNodesIntroduction=25]="HacknetNodesIntroduction",t[t.HacknetNodesGoToWorldPage=26]="HacknetNodesGoToWorldPage",t[t.WorldDescription=27]="WorldDescription",t[t.TutorialPageInfo=28]="TutorialPageInfo",t[t.End=29]="End"}(a||(a={}));const s={currStep:a.Start,isRunning:!1,stepIsDone:{[a.Start]:!1,[a.GoToCharacterPage]:!1,[a.CharacterPage]:!1,[a.CharacterGoToTerminalPage]:!1,[a.TerminalIntro]:!1,[a.TerminalHelp]:!1,[a.TerminalLs]:!1,[a.TerminalScan]:!1,[a.TerminalScanAnalyze1]:!1,[a.TerminalScanAnalyze2]:!1,[a.TerminalConnect]:!1,[a.TerminalAnalyze]:!1,[a.TerminalNuke]:!1,[a.TerminalManualHack]:!1,[a.TerminalHackingMechanics]:!1,[a.TerminalGoHome]:!1,[a.TerminalCreateScript]:!1,[a.TerminalTypeScript]:!1,[a.TerminalFree]:!1,[a.TerminalRunScript]:!1,[a.TerminalGoToActiveScriptsPage]:!1,[a.ActiveScriptsPage]:!1,[a.ActiveScriptsToTerminal]:!1,[a.TerminalTailScript]:!1,[a.GoToHacknetNodesPage]:!1,[a.HacknetNodesIntroduction]:!1,[a.HacknetNodesGoToWorldPage]:!1,[a.WorldDescription]:!1,[a.TutorialPageInfo]:!1,[a.End]:!1}};function l(){s.isRunning=!0,s.currStep=a.Start}function c(){s.stepIsDone[s.currStep]=!0,s.currStepa.Start&&(s.currStep-=1),o.a.emit()}function u(){s.isRunning=!1,s.currStep=a.Start,r.a.getHomeComputer().messages.push(i.a.HackersStartingHandbook),o.a.emit()}},,function(t,e,n){"use strict";n.d(e,"gb",(function(){return tt})),n.d(e,"jb",(function(){return et})),n.d(e,"kb",(function(){return nt})),n.d(e,"sb",(function(){return at})),n.d(e,"o",(function(){return rt})),n.d(e,"p",(function(){return it})),n.d(e,"Rb",(function(){return ot})),n.d(e,"vb",(function(){return st})),n.d(e,"eb",(function(){return lt})),n.d(e,"yb",(function(){return ct})),n.d(e,"M",(function(){return ft})),n.d(e,"ib",(function(){return ut})),n.d(e,"s",(function(){return mt})),n.d(e,"tb",(function(){return ht})),n.d(e,"K",(function(){return dt})),n.d(e,"N",(function(){return pt})),n.d(e,"I",(function(){return gt})),n.d(e,"J",(function(){return yt})),n.d(e,"F",(function(){return bt})),n.d(e,"G",(function(){return Et})),n.d(e,"L",(function(){return vt})),n.d(e,"nb",(function(){return kt})),n.d(e,"wb",(function(){return _t})),n.d(e,"mb",(function(){return wt})),n.d(e,"Lb",(function(){return St})),n.d(e,"lb",(function(){return Ct})),n.d(e,"t",(function(){return xt})),n.d(e,"Sb",(function(){return Lt})),n.d(e,"D",(function(){return Ot})),n.d(e,"Mb",(function(){return Mt})),n.d(e,"Ub",(function(){return Tt})),n.d(e,"E",(function(){return At})),n.d(e,"Jb",(function(){return Rt})),n.d(e,"Nb",(function(){return Nt})),n.d(e,"Ib",(function(){return Pt})),n.d(e,"Gb",(function(){return It})),n.d(e,"Fb",(function(){return Ft})),n.d(e,"Hb",(function(){return Dt})),n.d(e,"Tb",(function(){return jt})),n.d(e,"B",(function(){return Bt})),n.d(e,"X",(function(){return Gt})),n.d(e,"W",(function(){return Wt})),n.d(e,"Z",(function(){return Ht})),n.d(e,"U",(function(){return Ut})),n.d(e,"V",(function(){return qt})),n.d(e,"S",(function(){return $t})),n.d(e,"T",(function(){return Kt})),n.d(e,"Y",(function(){return zt})),n.d(e,"Db",(function(){return Vt})),n.d(e,"x",(function(){return Yt})),n.d(e,"z",(function(){return Jt})),n.d(e,"Kb",(function(){return Xt})),n.d(e,"w",(function(){return Qt})),n.d(e,"C",(function(){return Zt})),n.d(e,"Cb",(function(){return te})),n.d(e,"Ob",(function(){return ee})),n.d(e,"y",(function(){return ne})),n.d(e,"Eb",(function(){return ae})),n.d(e,"v",(function(){return re})),n.d(e,"A",(function(){return ie})),n.d(e,"Ab",(function(){return oe})),n.d(e,"Pb",(function(){return se})),n.d(e,"ub",(function(){return le})),n.d(e,"fb",(function(){return ce})),n.d(e,"f",(function(){return fe})),n.d(e,"R",(function(){return ue})),n.d(e,"pb",(function(){return me})),n.d(e,"db",(function(){return he})),n.d(e,"m",(function(){return de})),n.d(e,"l",(function(){return pe})),n.d(e,"e",(function(){return ge})),n.d(e,"j",(function(){return ye})),n.d(e,"g",(function(){return be})),n.d(e,"c",(function(){return Ee})),n.d(e,"b",(function(){return ve})),n.d(e,"k",(function(){return ke})),n.d(e,"a",(function(){return _e})),n.d(e,"d",(function(){return we})),n.d(e,"h",(function(){return Se})),n.d(e,"n",(function(){return Ce})),n.d(e,"i",(function(){return xe})),n.d(e,"hb",(function(){return Le})),n.d(e,"qb",(function(){return Oe})),n.d(e,"rb",(function(){return Me})),n.d(e,"u",(function(){return Te})),n.d(e,"xb",(function(){return Ae})),n.d(e,"ob",(function(){return Re})),n.d(e,"H",(function(){return Ne})),n.d(e,"Qb",(function(){return Pe})),n.d(e,"cb",(function(){return Ie})),n.d(e,"r",(function(){return Fe})),n.d(e,"bb",(function(){return De})),n.d(e,"ab",(function(){return je})),n.d(e,"P",(function(){return Be})),n.d(e,"O",(function(){return Ge})),n.d(e,"Q",(function(){return We})),n.d(e,"zb",(function(){return He})),n.d(e,"q",(function(){return Ue})),n.d(e,"Bb",(function(){return qe}));var a=n(57),r=n(141),i=n(361),o=n(15),s=n(6),l=n(111),c=n(237),f=n(66),u=n(667),m=n(518),h=n(94),d=n(32),p=n(8),g=n(64),y=n(375),b=n(85),E=n(204),v=n(29),k=n(80),_=n(149),w=n(218),S=n(17),C=n(11),x=n(322),L=n(176),O=n(280),M=n(244),T=n(26),A=n(47),R=n(132),N=n(102),P=n(1394),I=n(1395),F=n(363),D=n(82),j=n(514),B=n(399),G=n(91),W=n(4),H=n(379),U=n(16),q=n(24),$=n(116),K=n(20),z=n(0),V=n.n(z),Y=n(360),J=n(140),X=n(778),Q=n(295),Z=n(5);function tt(){const t=Object(R.f)({adminRights:!0,hostname:"home",ip:Object(T.e)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.currentServer=N.a.Home,Object(T.a)(t),this.getHomeComputer().programs.push(g.a.NukeProgram.name)}function et(){this.currentServer=N.a.Home,this.numPeopleKilled=0,this.hacking=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=1e3,this.city=S.a.Sector12,this.location=C.a.TravelAgency,this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[];const t=Math.min(3,D.a[10]+(10===this.bitNodeN?1:0))+this.sleevesFromCovenant;this.sleeves.length>t&&(this.sleeves.length=t);for(let e=this.sleeves.length;e=100?this.sleeves[t].synchronize(this):this.sleeves[t].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.hashManager.prestige(),this.reapplyAllAugmentations(!0),this.hp=this.max_hp}function nt(){this.entropy=0,this.prestigeAugmentation(),this.karma=0;for(let t=0;t0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;const t=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*t)}function st(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1}function lt(t){const e=this.getHomeComputer();if(null==e)return!1;for(let n=0;n=t}function ht(t,e){this.moneySourceA instanceof H.a||(console.warn("Player.moneySourceA was not properly initialized. Resetting"),this.moneySourceA=new H.a),this.moneySourceB instanceof H.a||(console.warn("Player.moneySourceB was not properly initialized. Resetting"),this.moneySourceB=new H.a),this.moneySourceA.record(t,e),this.moneySourceB.record(t,e)}function dt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainHackingExp()"):(this.hacking_exp+=t,this.hacking_exp<0&&(this.hacking_exp=0),this.hacking=Object(L.b)(this.hacking_exp,this.hacking_mult*s.a.HackingLevelMultiplier))}function pt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainStrengthExp()"):(this.strength_exp+=t,this.strength_exp<0&&(this.strength_exp=0),this.strength=Object(L.b)(this.strength_exp,this.strength_mult*s.a.StrengthLevelMultiplier))}function gt(t){if(isNaN(t))return void console.error("ERR: NaN passed into player.gainDefenseExp()");this.defense_exp+=t,this.defense_exp<0&&(this.defense_exp=0),this.defense=Object(L.b)(this.defense_exp,this.defense_mult*s.a.DefenseLevelMultiplier);const e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function yt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainDexterityExp()"):(this.dexterity_exp+=t,this.dexterity_exp<0&&(this.dexterity_exp=0),this.dexterity=Object(L.b)(this.dexterity_exp,this.dexterity_mult*s.a.DexterityLevelMultiplier))}function bt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainAgilityExp()"):(this.agility_exp+=t,this.agility_exp<0&&(this.agility_exp=0),this.agility=Object(L.b)(this.agility_exp,this.agility_mult*s.a.AgilityLevelMultiplier))}function Et(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainCharismaExp()"):(this.charisma_exp+=t,this.charisma_exp<0&&(this.charisma_exp=0),this.charisma=Object(L.b)(this.charisma_exp,this.charisma_mult*s.a.CharismaLevelMultiplier))}function vt(t){isNaN(t)?console.error("ERROR: NaN passed into Player.gainIntelligenceExp()"):(D.a[5]>0||this.intelligence>0)&&(this.intelligence_exp+=t,this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)))}function kt(t){const e=t.toLowerCase();return e.includes("hack")?this.hacking:e.includes("str")?this.strength:e.includes("def")?this.defense:e.includes("dex")?this.dexterity:e.includes("agi")?this.agility:e.includes("cha")?this.charisma:e.includes("int")?this.intelligence:0}function _t(t,e,n){this.workType!==p.a.WorkTypeFaction&&t===this.workType&&e===this.companyName||t===this.workType&&e===this.currentWorkFactionName&&n===this.factionWorkType||(this.isWorking&&this.singularityStopWork(),this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeWorkedGraftAugmentation=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.graftAugmentationName="",this.className="",this.workType="")}function wt(t=1){let e=1;this.hasAugmentation(o.a.NeuroreceptorManager)||(e=this.focus?1:p.a.BaseFocusBonus);const n=e*this.workHackExpGainRate*t,a=e*this.workStrExpGainRate*t,r=e*this.workDefExpGainRate*t,i=e*this.workDexExpGainRate*t,s=e*this.workAgiExpGainRate*t,l=e*this.workChaExpGainRate*t,c=(this.workMoneyGainRate-this.workMoneyLossRate)*t;this.gainHackingExp(n),this.gainStrengthExp(a),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(s),this.gainCharismaExp(l),this.gainMoney(c,this.className?"class":"work"),this.workHackExpGained+=n,this.workStrExpGained+=a,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=s,this.workChaExpGained+=l,this.workRepGained+=e*this.workRepGainRate*t,this.workMoneyGained+=e*this.workMoneyGainRate*t,this.workMoneyGained-=e*this.workMoneyLossRate*t}function St(t){this.resetWorkStatus(p.a.WorkTypeCompany,t),this.isWorking=!0,this.companyName=t,this.workType=p.a.WorkTypeCompany,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=p.a.MillisecondsPer8Hours}function Ct(t,e=1){this.isWorking&&(this.workType==p.a.WorkTypeFaction?this.workForFaction(e)&&t.toFaction(v.a[this.currentWorkFactionName]):this.workType==p.a.WorkTypeCreateProgram?this.createProgramWork(e)&&t.toTerminal():this.workType==p.a.WorkTypeStudyClass?this.takeClass(e)&&t.toCity():this.workType==p.a.WorkTypeCrime?this.commitCrime(e)&&t.toLocation(w.a[C.a.Slums]):this.workType==p.a.WorkTypeCompanyPartTime?this.workPartTime(e)&&t.toCity():this.workType===p.a.WorkTypeGraftAugmentation?this.graftAugmentationWork(e)&&t.toGrafting():this.work(e)&&t.toCity())}function xt(){const t=Y.a.find(t=>t.specialName===this.companyName);if(!t)return.5;const e=Object(T.d)(t.hostname);return e instanceof A.a&&e&&e.backdoorInstalled?.75:.5}function Lt(t){let e=!1;this.timeWorked+p.a._idleSpeed*t>=p.a.MillisecondsPer8Hours&&(e=!0,t=Math.round((p.a.MillisecondsPer8Hours-this.timeWorked)/p.a._idleSpeed)),this.timeWorked+=p.a._idleSpeed*t,this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.processWorkEarnings(t);const n=f.a[this.companyName];return Object(j.a)(n,this.workRepGainRate,t),!!(e||this.timeWorked>=p.a.MillisecondsPer8Hours)&&(this.finishWork(!1),!0)}function Ot(t,e=!1){t&&(this.workRepGained*=this.cancelationPenalty());const n=.5===this.cancelationPenalty()?"half":"three-quarters";f.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let a=V.a.createElement(V.a.Fragment,null,"You earned a total of: ",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),V.a.createElement($.a,{reputation:this.workRepGained})," reputation for the company ",V.a.createElement("br",null),this.workHackExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null)),this.workStrExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null)),this.workDefExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null)),this.workDexExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null)),this.workAgiExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null)),this.workChaExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workChaExpGained)," charisma exp ",V.a.createElement("br",null)),V.a.createElement("br",null));if(a=t?V.a.createElement(V.a.Fragment,null,"You worked a short shift of ",Object(q.b)(this.timeWorked)," ",V.a.createElement("br",null),V.a.createElement("br",null),"Since you cancelled your work early, you only gained ",n," of the reputation you earned. ",V.a.createElement("br",null),V.a.createElement("br",null),a):V.a.createElement(V.a.Fragment,null,"You worked a full shift of 8 hours! ",V.a.createElement("br",null),V.a.createElement("br",null),a),e||Object(U.a)(a),this.isWorking=!1,this.focus=!1,this.resetWorkStatus(),e){return"You worked a short shift of "+Object(q.b)(this.timeWorked)+" and earned $"+W.a.formatMoney(this.workMoneyGained)+", "+W.a.formatReputation(this.workRepGained)+" reputation, "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" strength exp, "+W.a.formatExp(this.workDefExpGained)+" defense exp, "+W.a.formatExp(this.workDexExpGained)+" dexterity exp, "+W.a.formatExp(this.workAgiExpGained)+" agility exp, and "+W.a.formatExp(this.workChaExpGained)+" charisma exp."}return""}function Mt(t){this.resetWorkStatus(p.a.WorkTypeCompanyPartTime,t),this.isWorking=!0,this.companyName=t,this.workType=p.a.WorkTypeCompanyPartTime,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=p.a.MillisecondsPer8Hours}function Tt(t){let e=!1;return this.timeWorked+p.a._idleSpeed*t>=p.a.MillisecondsPer8Hours&&(e=!0,t=Math.round((p.a.MillisecondsPer8Hours-this.timeWorked)/p.a._idleSpeed)),this.timeWorked+=p.a._idleSpeed*t,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(t),!!(e||this.timeWorked>=p.a.MillisecondsPer8Hours)&&(this.finishWorkPartTime(),!0)}function At(t=!1){f.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const e=V.a.createElement(V.a.Fragment,null,"You worked for ",Object(q.b)(this.timeWorked),V.a.createElement("br",null),V.a.createElement("br",null),"You earned a total of: ",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),V.a.createElement($.a,{reputation:this.workRepGained})," reputation for the company ",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma exp",V.a.createElement("br",null));if(t||Object(U.a)(e),this.isWorking=!1,this.resetWorkStatus(),t){return"You worked for "+Object(q.b)(this.timeWorked)+" and earned a total of $"+W.a.formatMoney(this.workMoneyGained)+", "+W.a.formatReputation(this.workRepGained)+" reputation, "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" strength exp, "+W.a.formatExp(this.workDefExpGained)+" defense exp, "+W.a.formatExp(this.workDexExpGained)+" dexterity exp, "+W.a.formatExp(this.workAgiExpGained)+" agility exp, and "+W.a.formatExp(this.workChaExpGained)+" charisma exp"}return""}function Rt(){this.focus=!0}function Nt(){this.focus=!1}function Pt(t){let e=1+t.favor/100;isNaN(e)&&(e=1),this.workRepGainRate*=e,this.workRepGainRate*=s.a.FactionWorkRepGain,this.isWorking=!0,this.workType=p.a.WorkTypeFaction,this.currentWorkFactionName=t.name,this.timeNeededToCompleteWork=p.a.MillisecondsPer20Hours}function It(t){this.resetWorkStatus(p.a.WorkTypeFaction,t.name,p.a.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(M.c)(this,t),this.factionWorkType=p.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(t)}function Ft(t){this.resetWorkStatus(p.a.WorkTypeFaction,t.name,p.a.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(M.a)(this,t),this.factionWorkType=p.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(t)}function Dt(t){this.resetWorkStatus(p.a.WorkTypeFaction,t.name,p.a.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(M.b)(this,t),this.factionWorkType=p.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(t)}function jt(t){const e=v.a[this.currentWorkFactionName];if(!e)return!1;switch(this.factionWorkType){case p.a.FactionWorkHacking:this.workRepGainRate=Object(M.c)(this,e);break;case p.a.FactionWorkField:this.workRepGainRate=Object(M.a)(this,e);break;case p.a.FactionWorkSecurity:this.workRepGainRate=Object(M.b)(this,e)}this.workRepGainRate*=s.a.FactionWorkRepGain;let n=!1;return this.timeWorked+p.a._idleSpeed*t>=p.a.MillisecondsPer20Hours&&(n=!0,t=Math.round((p.a.MillisecondsPer20Hours-this.timeWorked)/p.a._idleSpeed)),this.timeWorked+=p.a._idleSpeed*t,this.processWorkEarnings(t),!!(n||this.timeWorked>=p.a.MillisecondsPer20Hours)&&(this.finishFactionWork(!1),!0)}function Bt(t,e=!1){const n=v.a[this.currentWorkFactionName];if(n.playerReputation+=this.workRepGained,this.updateSkillLevels(),e||Object(U.a)(V.a.createElement(V.a.Fragment,null,"You worked for your faction ",n.name," for a total of ",Object(q.b)(this.timeWorked)," ",V.a.createElement("br",null),V.a.createElement("br",null),"You earned a total of: ",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),V.a.createElement($.a,{reputation:this.workRepGained})," reputation for the faction ",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma exp",V.a.createElement("br",null))),this.isWorking=!1,this.resetWorkStatus(),e){return"You worked for your faction "+n.name+" for a total of "+Object(q.b)(this.timeWorked)+". You earned "+W.a.formatReputation(this.workRepGained)+" rep, "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" str exp, "+W.a.formatExp(this.workDefExpGained)+" def exp, "+W.a.formatExp(this.workDexExpGained)+" dex exp, "+W.a.formatExp(this.workAgiExpGained)+" agi exp, and "+W.a.formatExp(this.workChaExpGained)+" cha exp."}return""}function Gt(){let t=1;const e=f.a[this.companyName];D.a[11]>0&&(t=1+e.favor/100);const n=this.jobs[this.companyName],a=h.a[n];return null==a?(console.error(`Could not find CompanyPosition object for ${n}. Work salary will be 0`),0):a.baseSalary*e.salaryMultiplier*this.work_money_mult*s.a.CompanyWorkMoney*t}function Wt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],n=h.a[e];return null==t||null==n?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work hack exp gain will be 0"].join(" ")),0):n.hackingExpGain*t.expMultiplier*this.hacking_exp_mult*s.a.CompanyWorkExpGain}function Ht(){const t=f.a[this.companyName],e=this.jobs[this.companyName],n=h.a[e];return null==t||null==n?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work str exp gain will be 0"].join(" ")),0):n.strengthExpGain*t.expMultiplier*this.strength_exp_mult*s.a.CompanyWorkExpGain}function Ut(){const t=f.a[this.companyName],e=this.jobs[this.companyName],n=h.a[e];return null==t||null==n?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work def exp gain will be 0"].join(" ")),0):n.defenseExpGain*t.expMultiplier*this.defense_exp_mult*s.a.CompanyWorkExpGain}function qt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],n=h.a[e];return null==t||null==n?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work dex exp gain will be 0"].join(" ")),0):n.dexterityExpGain*t.expMultiplier*this.dexterity_exp_mult*s.a.CompanyWorkExpGain}function $t(){const t=f.a[this.companyName],e=this.jobs[this.companyName],n=h.a[e];return null==t||null==n?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work agi exp gain will be 0"].join(" ")),0):n.agilityExpGain*t.expMultiplier*this.agility_exp_mult*s.a.CompanyWorkExpGain}function Kt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],n=h.a[e];return null==t||null==n?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work cha exp gain will be 0"].join(" ")),0):n.charismaExpGain*t.expMultiplier*this.charisma_exp_mult*s.a.CompanyWorkExpGain}function zt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],n=h.a[e];if(null==t||null==n)return console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work rep gain will be 0"].join(" ")),0;let a=n.calculateJobPerformance(this.hacking,this.strength,this.defense,this.dexterity,this.agility,this.charisma);a+=this.intelligence/p.a.MaxSkillLevel;let r=1+t.favor/100;return isNaN(r)&&(r=1),a*this.company_rep_mult*r}function Vt(t,e,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=p.a.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=e;for(let e=0;e=100)break;this.timeWorkedCreateProgram=a/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(e,1)}}this.createProgramName=t}function Yt(t){let e=1;this.hasAugmentation(o.a.NeuroreceptorManager)||(e=this.focus?1:p.a.BaseFocusBonus);const n=this.createProgramReqLvl;let a=this.hacking/n*this.getIntelligenceBonus(3);return a=1+(a-1)/5,a*=e,this.timeWorked+=p.a._idleSpeed*t,this.timeWorkedCreateProgram+=p.a._idleSpeed*t*a,this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&(this.finishCreateProgramWork(!1),!0)}function Jt(t){const e=this.createProgramName;if(!1===t)Object(U.a)(`You've finished creating ${e}!
The new program can be found on your home computer.`),this.getHomeComputer().programs.push(e);else{const t=e+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(t)}return t||this.gainIntelligenceExp(p.a.IntelligenceProgramBaseExpGain*this.timeWorked/1e3),this.isWorking=!1,this.resetWorkStatus(),"You've finished creating "+e+"! The new program can be found on your home computer."}function Xt(t,e){this.resetWorkStatus(),this.isWorking=!0,this.workType=p.a.WorkTypeGraftAugmentation,this.timeNeededToCompleteWork=e,this.graftAugmentationName=t}function Qt(t){let e=1;this.hasAugmentation(o.a.NeuroreceptorManager)||(e=this.focus?1:p.a.BaseFocusBonus);let n=1+(this.getIntelligenceBonus(3)-1)/3;return n*=e,this.timeWorked+=p.a._idleSpeed*t,this.timeWorkedGraftAugmentation+=p.a._idleSpeed*t*n,this.timeWorkedGraftAugmentation>=this.timeNeededToCompleteWork&&(this.finishGraftAugmentationWork(!1),!0)}function Zt(t){const e=this.graftAugmentationName;return!1===t?(Object(U.a)(`You've finished crafting ${e}.
The augmentation has been grafted to your body, but you feel a bit off.`),Object(r.a)(a.a[e]),this.entropy+=1,this.applyEntropy(this.entropy)):Object(U.a)(`You cancelled the crafting of ${e}.
Your money was not returned to you.`),t||this.gainIntelligenceExp(p.a.IntelligenceGraftBaseExpGain*this.timeWorked/1e4),this.isWorking=!1,this.resetWorkStatus(),`Grafting of ${e} has ended.`}function te(t,e,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=p.a.WorkTypeStudyClass,this.workCostMult=t,this.workExpMult=e,this.className=n;const a=Object(X.a)(this);this.workMoneyLossRate=a.workMoneyLossRate,this.workHackExpGainRate=a.workHackExpGainRate,this.workStrExpGainRate=a.workStrExpGainRate,this.workDefExpGainRate=a.workDefExpGainRate,this.workDexExpGainRate=a.workDexExpGainRate,this.workAgiExpGainRate=a.workAgiExpGainRate,this.workChaExpGainRate=a.workChaExpGainRate}function ee(t){this.timeWorked+=p.a._idleSpeed*t;const e=Object(X.a)(this);return this.workMoneyLossRate=e.workMoneyLossRate,this.workHackExpGainRate=e.workHackExpGainRate,this.workStrExpGainRate=e.workStrExpGainRate,this.workDefExpGainRate=e.workDefExpGainRate,this.workDexExpGainRate=e.workDexExpGainRate,this.workAgiExpGainRate=e.workAgiExpGainRate,this.workChaExpGainRate=e.workChaExpGainRate,this.processWorkEarnings(t),!1}function ne(t=!1){if(this.gainIntelligenceExp(p.a.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");if(this.updateSkillLevels(),t||Object(U.a)(V.a.createElement(V.a.Fragment,null,"After ",this.className," for ",Object(q.b)(this.timeWorked),", ",V.a.createElement("br",null),"you spent a total of ",V.a.createElement(K.a,{money:-this.workMoneyGained}),". ",V.a.createElement("br",null),V.a.createElement("br",null),"You earned a total of: ",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma exp",V.a.createElement("br",null))),this.isWorking=!1,t){const t="After "+this.className+" for "+Object(q.b)(this.timeWorked)+", you spent a total of "+W.a.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" strength exp, "+W.a.formatExp(this.workDefExpGained)+" defense exp, "+W.a.formatExp(this.workDexExpGained)+" dexterity exp, "+W.a.formatExp(this.workAgiExpGained)+" agility exp, and "+W.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}return this.resetWorkStatus(),""}function ae(t,e,n,a,r,i,o,l,c,f,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=p.a.WorkTypeCrime,null!==u&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u),this.workHackExpGained=n*this.hacking_exp_mult*s.a.CrimeExpGain,this.workStrExpGained=a*this.strength_exp_mult*s.a.CrimeExpGain,this.workDefExpGained=r*this.defense_exp_mult*s.a.CrimeExpGain,this.workDexExpGained=i*this.dexterity_exp_mult*s.a.CrimeExpGain,this.workAgiExpGained=o*this.agility_exp_mult*s.a.CrimeExpGain,this.workChaExpGained=l*this.charisma_exp_mult*s.a.CrimeExpGain,this.workMoneyGained=c*this.crime_money_mult*s.a.CrimeMoney,this.timeNeededToCompleteWork=f,t.toWork()}function re(t){return this.timeWorked+=p.a._idleSpeed*t,this.timeWorked>=this.timeNeededToCompleteWork&&(this.finishCrime(!1),!0)}function ie(t){if(!t){if(Object(y.a)(this,this.crimeType)){let t=null;for(const e of Object.keys(b.a))if(b.a[e].type==this.crimeType){t=b.a[e];break}if(null==t)return Object(U.a)(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`),"";this.gainMoney(this.workMoneyGained,"crime"),this.karma-=t.karma,this.numPeopleKilled+=t.kills,t.intelligence_exp>0&&this.gainIntelligenceExp(t.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2;const e=this.singFnCrimeWorkerScript;this.committingCrimeThruSingFn&&null!==e?null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log("SUCCESS: Crime successful! Gained "+W.a.formatMoney(this.workMoneyGained)+", "+W.a.formatExp(this.workHackExpGained)+" hack exp, "+W.a.formatExp(this.workStrExpGained)+" str exp, "+W.a.formatExp(this.workDefExpGained)+" def exp, "+W.a.formatExp(this.workDexExpGained)+" dex exp, "+W.a.formatExp(this.workAgiExpGained)+" agi exp, "+W.a.formatExp(this.workChaExpGained)+" cha exp."):Object(U.a)(V.a.createElement(V.a.Fragment,null,"Crime successful!",V.a.createElement("br",null),V.a.createElement("br",null),"You gained:",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking experience ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength experience",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense experience",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity experience",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility experience",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma experience"))}else{this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2;const t=this.singFnCrimeWorkerScript;this.committingCrimeThruSingFn&&null!==t?null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log("FAIL: Crime failed! Gained "+W.a.formatExp(this.workHackExpGained)+" hack exp, "+W.a.formatExp(this.workStrExpGained)+" str exp, "+W.a.formatExp(this.workDefExpGained)+" def exp, "+W.a.formatExp(this.workDexExpGained)+" dex exp, "+W.a.formatExp(this.workAgiExpGained)+" agi exp, "+W.a.formatExp(this.workChaExpGained)+" cha exp."):Object(U.a)(V.a.createElement(V.a.Fragment,null,"Crime failed!",V.a.createElement("br",null),V.a.createElement("br",null),"You gained:",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking experience ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength experience",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense experience",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity experience",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility experience",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma experience"))}this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}return this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.isWorking=!1,this.crimeType="",this.resetWorkStatus(),""}function oe(){if(!this.isWorking)return"";let t="";switch(this.workType){case p.a.WorkTypeStudyClass:t=this.finishClass(!0);break;case p.a.WorkTypeCompany:t=this.finishWork(!0,!0);break;case p.a.WorkTypeCompanyPartTime:t=this.finishWorkPartTime(!0);break;case p.a.WorkTypeFaction:t=this.finishFactionWork(!0,!0);break;case p.a.WorkTypeCreateProgram:t=this.finishCreateProgramWork(!0);break;case p.a.WorkTypeCrime:t=this.finishCrime(!0);break;default:return console.error(`Unrecognized work type (${this.workType})`),""}return t}function se(t){return"number"!=typeof t?(console.warn("Player.takeDamage() called without a numeric argument: "+t),!1):(this.hp-=t,this.hp<=0&&(this.hospitalize(),!0))}function le(t){"number"==typeof t?(this.hp+=t,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn("Player.regenerateHp() called without a numeric argument: "+t)}function ce(){const t=Object(B.b)(this);return J.b.emit("You've been Hospitalized for "+W.a.formatMoney(t),"warning",2e3),this.loseMoney(t,"hospitalization"),this.hp=this.max_hp,t}function fe(t,e=!1){let n=null;""!==this.companyName&&(n=f.a[this.companyName]);const a=this.jobs[this.companyName],r=f.a[this.location];if(!(r instanceof c.a))return console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`),!1;let i=t;if(!this.isQualified(r,i)){const t=Object(m.a)(r,i);return e||Object(U.a)("Unfortunately, you do not qualify for this position
"+t),!1}if(!r.hasPosition(i))return!1;for(;;){const t=Object(u.a)(i);if(null==t)break;if(!r.hasPosition(t))break;if(!this.isQualified(r,t))break;i=t}if(null!=n&&n.name==r.name&&i.name==a){const t=Object(u.a)(i);if(null==t)return e||Object(U.a)("You are already at the highest position for your field! No promotion available"),!1;if(r.hasPosition(t)){if(!e){const e=Object(m.a)(r,t);Object(U.a)("Unfortunately, you do not qualify for a promotion
"+e)}return!1}return e||Object(U.a)("You are already at the highest position for your field! No promotion available"),!1}return this.jobs[r.name]=i.name,!this.focus&&this.isWorking&&this.companyName!==this.location&&this.resetWorkStatus(),this.companyName=this.location,e||Object(U.a)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!"),!0}function ue(t,e){let n=null;if(""!==this.companyName&&(n=f.a[this.companyName]),null==n||n.name!=t.name)return e;const a=this.jobs[this.companyName];if(!a)return e;const r=h.a[a];return r.isSoftwareJob()&&e.isSoftwareJob()||r.isITJob()&&e.isITJob()||r.isBusinessJob()&&e.isBusinessJob()||r.isSecurityEngineerJob()&&e.isSecurityEngineerJob()||r.isNetworkEngineerJob()&&e.isNetworkEngineerJob()||r.isSecurityJob()&&e.isSecurityJob()||r.isAgentJob()&&e.isAgentJob()||r.isSoftwareConsultantJob()&&e.isSoftwareConsultantJob()||r.isBusinessConsultantJob()&&e.isBusinessConsultantJob()||r.isPartTimeJob()&&e.isPartTimeJob()?Object(u.a)(r):e}function me(t){1==this.isWorking&&this.workType.includes("Working for Company")&&this.companyName==t&&(this.isWorking=!1,this.companyName=""),this.companyName===t&&(this.companyName=""),delete this.jobs[t]}function he(){return Boolean(Object.keys(this.jobs).length)}function de(t=!1){return this.applyForJob(h.a[d.j[0]],t)}function pe(t=!1){return this.applyForJob(h.a[d.k[0]],t)}function ge(t=!1){return this.applyForJob(h.a[d.d[0]],t)}function ye(t=!1){const e=f.a[this.location];return this.isQualified(e,h.a[d.i[0]])?this.applyForJob(h.a[d.i[0]],t):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1)}function be(t=!1){const e=f.a[this.location];if(this.isQualified(e,h.a[d.f[0]])){const e=h.a[d.f[0]];return this.applyForJob(e,t)}return t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1}function Ee(t=!1){return this.applyForJob(h.a[d.b[0]],t)}function ve(t=!1){return this.applyForJob(h.a[d.c[0]],t)}function ke(t=!1){return this.applyForJob(h.a[d.h[2]],t)}function _e(t=!1){const e=f.a[this.location];if(this.isQualified(e,h.a[d.a[0]])){const e=h.a[d.a[0]];return this.applyForJob(e,t)}return t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1}function we(t=!1){const e=f.a[this.location],n=d.e[1];return!!e.hasPosition(n)&&(this.isQualified(e,h.a[n])?(this.jobs[e.name]=n,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function Se(t=!1){const e=f.a[this.location],n=d.g[1];return!!e.hasPosition(n)&&(this.isQualified(e,h.a[n])?(this.jobs[e.name]=n,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed part-time at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function Ce(t=!1){const e=f.a[this.location],n=d.e[0];return!!e.hasPosition(n)&&(this.isQualified(e,h.a[n])?(this.jobs[e.name]=n,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed as a waiter at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function xe(t=!1){const e=f.a[this.location],n=d.g[0];return!!e.hasPosition(n)&&(this.isQualified(e,h.a[n])?(this.jobs[e.name]=n,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed as a part-time waiter at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function Le(t,e){const n=t.jobStatReqOffset,a=e.requiredHacking>0?e.requiredHacking+n:0,r=e.requiredStrength>0?e.requiredStrength+n:0,i=e.requiredDefense>0?e.requiredDefense+n:0,o=e.requiredDexterity>0?e.requiredDexterity+n:0,s=e.requiredDexterity>0?e.requiredDexterity+n:0,l=e.requiredCharisma>0?e.requiredCharisma+n:0;return this.hacking>=a&&this.strength>=r&&this.defense>=i&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&t.playerReputation>=e.requiredReputation}function Oe(t=!0){t&&this.resetMultipliers();for(let t=0;te}const i=v.a[Z.a.Illuminati];!i.isBanned&&!i.isMember&&!i.alreadyInvited&&e>=30&&this.money>=15e10&&this.hacking>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&t.push(i);const o=v.a[Z.a.Daedalus];!o.isBanned&&!o.isMember&&!o.alreadyInvited&&e>=Math.round(30*s.a.DaedalusAugsRequirement)&&this.money>=1e11&&(this.hacking>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&t.push(o);const l=v.a[Z.a.TheCovenant];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&e>=20&&this.money>=75e9&&this.hacking>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&t.push(l);const c=v.a[Z.a.ECorp];c.isBanned||c.isMember||c.alreadyInvited||!r(C.a.AevumECorp)||t.push(c);const u=v.a[Z.a.MegaCorp];u.isBanned||u.isMember||u.alreadyInvited||!r(C.a.Sector12MegaCorp)||t.push(u);const m=v.a[Z.a.BachmanAssociates];m.isBanned||m.isMember||m.alreadyInvited||!r(C.a.AevumBachmanAndAssociates)||t.push(m);const h=v.a[Z.a.BladeIndustries];h.isBanned||h.isMember||h.alreadyInvited||!r(C.a.Sector12BladeIndustries)||t.push(h);const d=v.a[Z.a.NWO];d.isBanned||d.isMember||d.alreadyInvited||!r(C.a.VolhavenNWO)||t.push(d);const g=v.a[Z.a.ClarkeIncorporated];g.isBanned||g.isMember||g.alreadyInvited||!r(C.a.AevumClarkeIncorporated)||t.push(g);const y=v.a[Z.a.OmniTekIncorporated];y.isBanned||y.isMember||y.alreadyInvited||!r(C.a.VolhavenOmniTekIncorporated)||t.push(y);const b=v.a[Z.a.FourSigma];b.isBanned||b.isMember||b.alreadyInvited||!r(C.a.Sector12FourSigma)||t.push(b);const E=v.a[Z.a.KuaiGongInternational];E.isBanned||E.isMember||E.alreadyInvited||!r(C.a.ChongqingKuaiGongInternational)||t.push(E);const k=v.a[Z.a.FulcrumSecretTechnologies],_=Object(T.d)(N.a.FulcrumSecretTechnologies);if(!(_ instanceof A.a))throw new Error(Z.a.FulcrumSecretTechnologies+" should be normal server");null==_?console.error(`Could not find ${Z.a.FulcrumSecretTechnologies} Server`):k.isBanned||k.isMember||k.alreadyInvited||!_.backdoorInstalled||!r(C.a.AevumFulcrumTechnologies,25e4)||t.push(k);const w=v.a[Z.a.BitRunners],x=Object(T.d)(N.a.BitRunnersServer);if(!(x instanceof A.a))throw new Error(Z.a.BitRunners+" should be normal server");null==x?console.error(`Could not find ${Z.a.BitRunners} Server`):w.isBanned||w.isMember||!x.backdoorInstalled||w.alreadyInvited||t.push(w);const L=v.a[Z.a.TheBlackHand],O=Object(T.d)(N.a.TheBlackHandServer);if(!(O instanceof A.a))throw new Error(Z.a.TheBlackHand+" should be normal server");null==O?console.error(`Could not find ${Z.a.TheBlackHand} Server`):L.isBanned||L.isMember||!O.backdoorInstalled||L.alreadyInvited||t.push(L);const M=v.a[Z.a.NiteSec],R=Object(T.d)(N.a.NiteSecServer);if(!(R instanceof A.a))throw new Error(Z.a.NiteSec+" should be normal server");null==R?console.error(`Could not find ${Z.a.NiteSec} Server`):M.isBanned||M.isMember||!R.backdoorInstalled||M.alreadyInvited||t.push(M);const P=v.a[Z.a.Chongqing];!P.isBanned&&!P.isMember&&!P.alreadyInvited&&this.money>=2e7&&this.city==S.a.Chongqing&&t.push(P);const I=v.a[Z.a.Sector12];!I.isBanned&&!I.isMember&&!I.alreadyInvited&&this.money>=15e6&&this.city==S.a.Sector12&&t.push(I);const F=v.a[Z.a.NewTokyo];!F.isBanned&&!F.isMember&&!F.alreadyInvited&&this.money>=2e7&&this.city==S.a.NewTokyo&&t.push(F);const D=v.a[Z.a.Aevum];!D.isBanned&&!D.isMember&&!D.alreadyInvited&&this.money>=4e7&&this.city==S.a.Aevum&&t.push(D);const j=v.a[Z.a.Ishima];!j.isBanned&&!j.isMember&&!j.alreadyInvited&&this.money>=3e7&&this.city==S.a.Ishima&&t.push(j);const B=v.a[Z.a.Volhaven];!B.isBanned&&!B.isMember&&!B.alreadyInvited&&this.money>=5e7&&this.city==S.a.Volhaven&&t.push(B);const W=v.a[Z.a.SpeakersForTheDead];!W.isBanned&&!W.isMember&&!W.alreadyInvited&&this.hacking>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!n.includes(C.a.Sector12CIA)&&!n.includes(C.a.Sector12NSA)&&t.push(W);const H=v.a[Z.a.TheDarkArmy];!H.isBanned&&!H.isMember&&!H.alreadyInvited&&this.hacking>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==S.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!n.includes(C.a.Sector12CIA)&&!n.includes(C.a.Sector12NSA)&&t.push(H);const U=v.a[Z.a.TheSyndicate];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==S.a.Aevum||this.city==S.a.Sector12)&&this.money>=1e7&&this.karma<=-90&&!n.includes(C.a.Sector12CIA)&&!n.includes(C.a.Sector12NSA)&&t.push(U);const q=v.a[Z.a.Silhouette];!q.isBanned&&!q.isMember&&!q.alreadyInvited&&(a.includes("Chief Technology Officer")||a.includes("Chief Financial Officer")||a.includes("Chief Executive Officer"))&&this.money>=15e6&&this.karma<=-22&&t.push(q);const $=v.a[Z.a.Tetrads];!$.isBanned&&!$.isMember&&!$.alreadyInvited&&(this.city==S.a.Chongqing||this.city==S.a.NewTokyo||this.city==S.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&t.push($);const K=v.a[Z.a.SlumSnakes];!K.isBanned&&!K.isMember&&!K.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money>=1e6&&t.push(K);const z=v.a[Z.a.Netburners];let V=0,Y=0,J=0;for(let t=0;t=80&&V>=8&&Y>=4&&J>=100&&t.push(z);const X=v.a[Z.a.TianDiHui];!X.isBanned&&!X.isMember&&!X.alreadyInvited&&this.money>=1e6&&this.hacking>=50&&(this.city==S.a.Chongqing||this.city==S.a.NewTokyo||this.city==S.a.Ishima)&&t.push(X);const Q=v.a[Z.a.CyberSec],tt=Object(T.d)(N.a.CyberSecServer);if(!(tt instanceof A.a))throw new Error(Z.a.CyberSec+" should be normal server");return null==tt?console.error(`Could not find ${Z.a.CyberSec} Server`):Q.isBanned||Q.isMember||!tt.backdoorInstalled||Q.alreadyInvited||t.push(Q),t}function Ae(t){this.bitNodeN=t}function Re(t){for(const e of this.queuedAugmentations)if(e.name==t)return void console.warn(`tried to queue ${t} twice, this may be a bug`);for(const e of this.augmentations)if(e.name==t)return void console.warn(`tried to queue ${t} twice, this may be a bug`);this.queuedAugmentations.push(new i.a(t))}function Ne(t,e=1){if(null==t||null==t.type)return"No reward for this contract";switch(t.type){case l.c.FactionReputation:if(null==t.name||!(v.a[t.name]instanceof E.a))return t.type=l.c.FactionReputationAll,this.gainCodingContractReward(t);const n=p.a.CodingContractBaseFactionRepGain*e;return v.a[t.name].playerReputation+=n,`Gained ${n} faction reputation for ${t.name}`;case l.c.FactionReputationAll:const a=p.a.CodingContractBaseFactionRepGain*e,r=[Z.a.Bladeburners],i=this.factions.slice().filter(t=>!r.includes(t));if(0==i.length)return t.type=l.c.Money,this.gainCodingContractReward(t,e);const o=Math.floor(a/i.length);for(const t of i)v.a[t]instanceof E.a&&(v.a[t].playerReputation+=o);return`Gained ${o} reputation for each of the following factions: ${i.toString()}`;case l.c.CompanyReputation:{if(null==t.name||!(f.a[t.name]instanceof c.a))return t.type=l.c.FactionReputationAll,this.gainCodingContractReward(t);const n=p.a.CodingContractBaseCompanyRepGain*e;return f.a[t.name].playerReputation+=n,`Gained ${n} company reputation for ${t.name}`}case l.c.Money:default:{const t=p.a.CodingContractBaseMoneyGain*e*s.a.CodingContractMoney;return this.gainMoney(t,"codingcontract"),"Gained "+W.a.formatMoney(t)}}}function Pe(t){return null==_.a[t]?(console.warn("Player.travel() called with invalid city: "+t),!1):(this.city=t,!0)}function Ie(t){return null==w.a[t]?(console.warn("Player.gotoLocation() called with invalid location: "+t),!1):(this.location=t,!0)}function Fe(){return 10===this.bitNodeN||D.a[10]>0}function De(t){this.exploits.includes(t)||(this.exploits.push(t),J.b.emit("SF -1 acquired!","success",2e3))}function je(t){const e=Q.a[t];e&&(this.achievements.map(t=>t.ID).includes(t)||(this.achievements.push({ID:t,unlockedOn:(new Date).getTime()}),J.b.emit(`Unlocked Achievement: "${e.Name}"`,"success",2e3)))}function Be(t){return Object(O.a)(this.intelligence,t)}function Ge(){return this.moneySourceA.casino}function We(t){return this.hasOwnProperty(t)?this[t]:1}function He(t,e){this.hasOwnProperty(t)&&(this[t]=e)}function Ue(){return 13===this.bitNodeN||D.a[13]>0}function qe(t){const e=this.sourceFiles.find(e=>e.n===t);return e?e.lvl:0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(560),r=n(6),i=n(997),o=n(339),s=n(25);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class c extends a.a{constructor(t={hostname:"",ip:Object(o.a)()}){super(t),l(this,"backdoorInstalled",!1),l(this,"baseDifficulty",1),l(this,"hackDifficulty",1),l(this,"minDifficulty",1),l(this,"moneyAvailable",0),l(this,"moneyMax",0),l(this,"numOpenPortsRequired",5),l(this,"openPortCount",0),l(this,"requiredHackingSkill",1),l(this,"serverGrowth",1),this.hostname.startsWith("hacknet-node-")&&(this.hostname=Object(i.a)(10)),this.purchasedByPlayer=null!=t.purchasedByPlayer&&t.purchasedByPlayer,this.maxRam=null!=t.maxRam?t.maxRam:0,this.requiredHackingSkill=null!=t.requiredHackingSkill?t.requiredHackingSkill:1,this.moneyAvailable=null!=t.moneyAvailable?t.moneyAvailable*r.a.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*r.a.ServerMaxMoney,this.hackDifficulty=null!=t.hackDifficulty?t.hackDifficulty*r.a.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=t.serverGrowth?t.serverGrowth:1,this.numOpenPortsRequired=null!=t.numOpenPortsRequired?t.numOpenPortsRequired:5}capDifficulty(){this.hackDifficulty100&&(this.hackDifficulty=100)}changeMinimumSecurity(t,e=!1){e?this.minDifficulty*=t:this.minDifficulty+=t,this.minDifficulty=Math.max(1,this.minDifficulty)}changeMaximumMoney(t){if(this.moneyMax>1e13){const e=this.moneyMax-1e13;t=1+(t-1)/Math.log(e)/Math.log(8)}this.moneyMax*=t}fortify(t){this.hackDifficulty+=t,this.capDifficulty()}weaken(t){this.hackDifficulty-=t*r.a.ServerWeakenRate,this.capDifficulty()}toJSON(){return Object(s.b)("Server",this)}static fromJSON(t){return Object(s.a)(c,t.data)}}s.c.constructors.Server=c},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s}));var a=n(0),r=n.n(a);const i={Corporation:r.a.createContext({}),Division:r.a.createContext({})},o=()=>Object(a.useContext)(i.Corporation),s=()=>Object(a.useContext)(i.Division)},,function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"d",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return f})),n.d(e,"e",(function(){return u}));var a=n(0),r=n.n(a),i=n(129),o=n(143);const s={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},l={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},c={Energy:t=>r.a.createElement(r.a.Fragment,null,"Engage in the production and distribution of energy.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Energy,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Utilities:t=>r.a.createElement(r.a.Fragment,null,"Distribute water and provide wastewater services.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Utilities,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Agriculture:t=>r.a.createElement(r.a.Fragment,null,"Cultivate crops and breed livestock to produce food.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Agriculture,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Fishing:t=>r.a.createElement(r.a.Fragment,null,"Produce food through the breeding and processing of fish and fish products.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Fishing,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Mining:t=>r.a.createElement(r.a.Fragment,null,"Extract and process metals from the earth.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Mining,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Food:t=>r.a.createElement(r.a.Fragment,null,"Create your own restaurants all around the world.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Food,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Tobacco:t=>r.a.createElement(r.a.Fragment,null,"Create and distribute tobacco and tobacco-related products.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Tobacco,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Chemical:t=>r.a.createElement(r.a.Fragment,null,"Produce industrial chemicals.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Chemical,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Pharmaceutical:t=>r.a.createElement(r.a.Fragment,null,"Discover, develop, and create new pharmaceutical drugs.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Pharmaceutical,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Computer:t=>r.a.createElement(r.a.Fragment,null,"Develop and manufacture new computer hardware and networking infrastructures.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Computer,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Robotics:t=>r.a.createElement(r.a.Fragment,null,"Develop and create robots.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Robotics,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Software:t=>r.a.createElement(r.a.Fragment,null,"Develop computer software and create AI Cores.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Software,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Healthcare:t=>r.a.createElement(r.a.Fragment,null,"Create and manage hospitals.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Healthcare,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),RealEstate:t=>r.a.createElement(r.a.Fragment,null,"Develop and manage real estate properties.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.RealEstate,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO")},f={Energy:Object(i.a)(),Utilities:Object(i.a)(),Agriculture:Object(i.a)(),Fishing:Object(i.a)(),Mining:Object(i.a)(),Food:Object(i.b)(),Tobacco:Object(i.b)(),Chemical:Object(i.a)(),Pharmaceutical:Object(i.b)(),Computer:Object(i.b)(),Robotics:Object(i.b)(),Software:Object(i.b)(),Healthcare:Object(i.b)(),RealEstate:Object(i.b)()};function u(){f.Energy=Object(i.a)(),f.Utilities=Object(i.a)(),f.Agriculture=Object(i.a)(),f.Fishing=Object(i.a)(),f.Mining=Object(i.a)(),f.Food=Object(i.b)(),f.Tobacco=Object(i.b)(),f.Chemical=Object(i.a)(),f.Pharmaceutical=Object(i.b)(),f.Computer=Object(i.b)(),f.Robotics=Object(i.b)(),f.Software=Object(i.b)(),f.Healthcare=Object(i.b)(),f.RealEstate=Object(i.b)()}},function(t,e,n){"use strict";let a;n.d(e,"a",(function(){return a})),function(t){t[t.Company=0]="Company",t[t.Gym=1]="Gym",t[t.Hospital=2]="Hospital",t[t.Slums=3]="Slums",t[t.Special=4]="Special",t[t.StockMarket=5]="StockMarket",t[t.TechVendor=6]="TechVendor",t[t.TravelAgency=7]="TravelAgency",t[t.University=8]="University",t[t.Casino=9]="Casino"}(a||(a={}))},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},,function(t,e,n){"use strict";n.d(e,"g",(function(){return p})),n.d(e,"l",(function(){return g})),n.d(e,"h",(function(){return y})),n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return E})),n.d(e,"e",(function(){return v})),n.d(e,"f",(function(){return k})),n.d(e,"d",(function(){return _})),n.d(e,"c",(function(){return w})),n.d(e,"n",(function(){return S})),n.d(e,"o",(function(){return C})),n.d(e,"k",(function(){return x})),n.d(e,"j",(function(){return L})),n.d(e,"i",(function(){return O})),n.d(e,"p",(function(){return T})),n.d(e,"m",(function(){return A}));var a=n(221),r=n(206),i=n(184),o=n(39),s=n(91),l=n(372),c=n(242),f=n(373),u=n(44),m=n(26),h=n(47),d=n(82);function p(t){return 9===t.bitNodeN||d.a[9]>0}function g(t){if(u.a.isRunning){if(u.a.currStep!==u.f.HacknetNodesIntroduction)return-1;Object(u.c)()}const e=t.hacknetNodes.length;if(p(t)){const n=E(t);if(isNaN(n))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return!t.canAfford(n)||e>=o.b.MaxServers?-1:(t.loseMoney(n,"hacknet_expenses"),t.createHacknetServer(),T(t),e)}{const n=b(t);if(isNaN(n))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!t.canAfford(n))return-1;const r="hacknet-node-"+e,i=new a.a(r,t.hacknet_node_money_mult);return t.loseMoney(n,"hacknet_expenses"),t.hacknetNodes.push(i),e}}function y(t){return p(t)&&t.hacknetNodes.length>=o.b.MaxServers}function b(t){return Object(r.d)(t.hacknetNodes.length+1,t.hacknet_node_purchase_cost_mult)}function E(t){return Object(i.f)(t.hacknetNodes.length+1,t.hacknet_node_purchase_cost_mult)}function v(t,e,n){if(null==n)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(t.moneye.calculateLevelUpgradeCost(i,t.hacknet_node_level_cost_mult))return i;for(;a<=r;){const o=(a+r)/2|0;if(o!==n&&t.money>e.calculateLevelUpgradeCost(o,t.hacknet_node_level_cost_mult)&&t.moneye.calculateLevelUpgradeCost(o,t.hacknet_node_level_cost_mult)))return Math.min(i,o);a=o+1}}return 0}function k(t,e,n){if(null==n)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(t.moneye.calculateRamUpgradeCost(a,t.hacknet_node_ram_cost_mult))return a;for(let n=a-1;n>=0;--n)if(t.money>e.calculateRamUpgradeCost(n,t.hacknet_node_ram_cost_mult))return n;return 0}function _(t,e,n){if(null==n)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(t.moneye.calculateCoreUpgradeCost(i,t.hacknet_node_core_cost_mult))return i;for(;a<=r;){const o=(a+r)/2|0;if(o!=n&&t.money>e.calculateCoreUpgradeCost(o,t.hacknet_node_core_cost_mult)&&t.moneye.calculateCoreUpgradeCost(o,t.hacknet_node_core_cost_mult)))return Math.min(i,o);a=o+1}}return 0}function w(t,e,n){if(null==n)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!t.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let a=1,r=n-1;const i=n-e.cache;if(t.canAfford(e.calculateCacheUpgradeCost(i)))return i;for(;a<=r;){const o=(a+r)/2|0;if(o!=n&&t.canAfford(e.calculateCacheUpgradeCost(o))&&!t.canAfford(e.calculateCacheUpgradeCost(o+1)))return Math.min(i,o);if(t.canAfford(e.calculateCacheUpgradeCost(o))){if(!t.canAfford(e.calculateCacheUpgradeCost(o)))return Math.min(i,o);a=o+1}else r=o-1}return 0}function S(t,e,n=1){const a=Math.round(n),r=e.calculateLevelUpgradeCost(a,t.hacknet_node_level_cost_mult);if(isNaN(r)||r<=0||a<0)return!1;const i=e instanceof s.a;if(e.level>=(i?o.b.MaxLevel:o.a.MaxLevel))return!1;if(e.level+a>(i?o.b.MaxLevel:o.a.MaxLevel)){return S(t,e,Math.max(0,(i?o.b.MaxLevel:o.a.MaxLevel)-e.level))}return!!t.canAfford(r)&&(t.loseMoney(r,"hacknet_expenses"),e.upgradeLevel(a,t.hacknet_node_money_mult),!0)}function C(t,e,n=1){const r=Math.round(n),i=e.calculateRamUpgradeCost(r,t.hacknet_node_ram_cost_mult);if(isNaN(i)||i<=0||r<0)return!1;if(e instanceof s.a&&e.maxRam>=o.b.MaxRam)return!1;if(e instanceof a.a&&e.ram>=o.a.MaxRam)return!1;if(e instanceof s.a){if(e.maxRam*Math.pow(2,r)>o.b.MaxRam){return C(t,e,Math.max(0,Math.log2(Math.round(o.b.MaxRam/e.maxRam))))}}else if(e instanceof a.a&&e.ram*Math.pow(2,r)>o.a.MaxRam){return C(t,e,Math.max(0,Math.log2(Math.round(o.a.MaxRam/e.ram))))}return!!t.canAfford(i)&&(t.loseMoney(i,"hacknet_expenses"),e.upgradeRam(r,t.hacknet_node_money_mult),!0)}function x(t,e,n=1){const a=Math.round(n),r=e.calculateCoreUpgradeCost(a,t.hacknet_node_core_cost_mult);if(isNaN(r)||r<=0||a<0)return!1;const i=e instanceof s.a;if(e.cores>=(i?o.b.MaxCores:o.a.MaxCores))return!1;if(e.cores+a>(i?o.b.MaxCores:o.a.MaxCores)){return x(t,e,Math.max(0,(i?o.b.MaxCores:o.a.MaxCores)-e.cores))}return!!t.canAfford(r)&&(t.loseMoney(r,"hacknet_expenses"),e.upgradeCore(a,t.hacknet_node_money_mult),!0)}function L(t,e,n=1){const a=Math.round(n),r=e.calculateCacheUpgradeCost(a);if(isNaN(r)||r<=0||a<0)return!1;if(!(e instanceof s.a))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+a>o.b.MaxCache){return L(t,e,Math.max(0,o.b.MaxCache-e.cache))}return!!t.canAfford(r)&&(t.loseMoney(r,"hacknet_expenses"),e.upgradeCache(a),!0)}function O(t,e){return 0===t.hacknetNodes.length?0:p(t)?function(t,e){if(!(t.hashManager instanceof l.a))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let n=0;for(let r=0;r0){const e=c.a["Sell for Money"];if(null===e)throw new Error("Could not get the hash upgrade");if(!e.cost)throw new Error("Upgrade is not properly configured");const n=Math.floor(r/e.cost);n>0&&t.gainMoney(e.value*n,"hacknet")}return n}(t,e):t.hacknetNodes[0]instanceof a.a?function(t,e){let n=0;for(let a=0;a{var e;null!=o[(e=t).name]&&console.warn("Duplicate Company Position being defined: "+e.name),o[e.name]=new r.a(e)});for(const e of Object.keys(o)){const n=o[e];t[e]instanceof r.a?(n.favor=t[e].favor,isNaN(n.favor)&&(n.favor=0)):n.favor=0}}function l(t){o=JSON.parse(t,i.c)}},,,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"n",(function(){return NewIndustry})),__webpack_require__.d(__webpack_exports__,"m",(function(){return NewCity})),__webpack_require__.d(__webpack_exports__,"A",(function(){return UnlockUpgrade})),__webpack_require__.d(__webpack_exports__,"j",(function(){return LevelUpgrade})),__webpack_require__.d(__webpack_exports__,"i",(function(){return IssueDividends})),__webpack_require__.d(__webpack_exports__,"q",(function(){return SellMaterial})),__webpack_require__.d(__webpack_exports__,"r",(function(){return SellProduct})),__webpack_require__.d(__webpack_exports__,"x",(function(){return SetSmartSupply})),__webpack_require__.d(__webpack_exports__,"y",(function(){return SetSmartSupplyUseLeftovers})),__webpack_require__.d(__webpack_exports__,"e",(function(){return BuyMaterial})),__webpack_require__.d(__webpack_exports__,"b",(function(){return BulkPurchase})),__webpack_require__.d(__webpack_exports__,"s",(function(){return SellShares})),__webpack_require__.d(__webpack_exports__,"c",(function(){return BuyBackShares})),__webpack_require__.d(__webpack_exports__,"a",(function(){return AssignJob})),__webpack_require__.d(__webpack_exports__,"B",(function(){return UpgradeOfficeSize})),__webpack_require__.d(__webpack_exports__,"z",(function(){return ThrowParty})),__webpack_require__.d(__webpack_exports__,"o",(function(){return PurchaseWarehouse})),__webpack_require__.d(__webpack_exports__,"C",(function(){return UpgradeWarehouse})),__webpack_require__.d(__webpack_exports__,"d",(function(){return BuyCoffee})),__webpack_require__.d(__webpack_exports__,"h",(function(){return HireAdVert})),__webpack_require__.d(__webpack_exports__,"l",(function(){return MakeProduct})),__webpack_require__.d(__webpack_exports__,"p",(function(){return Research})),__webpack_require__.d(__webpack_exports__,"g",(function(){return ExportMaterial})),__webpack_require__.d(__webpack_exports__,"f",(function(){return CancelExportMaterial})),__webpack_require__.d(__webpack_exports__,"k",(function(){return LimitProductProduction})),__webpack_require__.d(__webpack_exports__,"t",(function(){return SetMaterialMarketTA1})),__webpack_require__.d(__webpack_exports__,"u",(function(){return SetMaterialMarketTA2})),__webpack_require__.d(__webpack_exports__,"v",(function(){return SetProductMarketTA1})),__webpack_require__.d(__webpack_exports__,"w",(function(){return SetProductMarketTA2}));var _MaterialSizes__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(175),_IndustryData__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(50),_Industry__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1031),_data_Constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(38),_OfficeSpace__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(376),_Product__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(401),_Warehouse__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(240),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(149),_EmployeePositions__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(53),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(318),_ResearchMap__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(281),_ui_Helpers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(402);function NewIndustry(t,e,n){if(t.divisions.find(({type:t})=>e==t))throw new Error(`You have already expanded into the ${e} industry!`);for(let e=0;e_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.DividendMaxPercentage)throw new Error("Invalid value. Must be an integer between 0 and "+_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.DividendMaxPercentage);t.dividendPercentage=100*e}function SellMaterial(mat,amt,price){""===price&&(price="0"),""===amt&&(amt="0");let cost=price.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MPe]/g,"");let temp=cost.replace(/MP/g,mat.bCost+"");try{temp=eval(temp)}catch(t){throw new Error("Invalid value or expression for sell price field: "+t)}if(null==temp||isNaN(parseFloat(temp))||parseFloat(temp)<0)throw new Error("Invalid value or expression for sell price field");if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,amt=amt.toUpperCase(),amt.includes("MAX")||amt.includes("PROD")){let q=amt.replace(/\s+/g,"");q=q.replace(/[^-()\d/*+.MAXPROD]/g,"");let tempQty=q.replace(/MAX/g,mat.maxsll.toString());tempQty=tempQty.replace(/PROD/g,mat.prd.toString());try{tempQty=eval(tempQty)}catch(t){throw new Error("Invalid value or expression for sell quantity field: "+t)}if(null==tempQty||isNaN(parseFloat(tempQty))||parseFloat(tempQty)<0)throw new Error("Invalid value or expression for sell quantity field");mat.sllman[0]=!0,mat.sllman[1]=q}else{if(isNaN(parseFloat(amt))||parseFloat(amt)<0)throw new Error("Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'");{let t=parseFloat(amt);isNaN(t)&&(t=0),0===t?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=t)}}}function SellProduct(product,city,amt,price,all){if(price.includes("MP")){price=price.replace(/\s+/g,""),price=price.replace(/[^-()\d/*+.MP]/g,"");let temp=price.replace(/MP/g,"1");try{temp=eval(temp)}catch(t){throw new Error("Invalid value or expression for sell price field: "+t)}if(null==temp||isNaN(parseFloat(temp))||parseFloat(temp)<0)throw new Error("Invalid value or expression for sell price field.");product.sCost=price}else{const t=parseFloat(price);if(isNaN(t))throw new Error("Invalid value for sell price field");product.sCost=t}const cities=Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__.a);if(amt=amt.toUpperCase(),amt.includes("MAX")||amt.includes("PROD")){let qty=amt.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");let temp=qty.replace(/MAX/g,product.maxsll.toString());temp=temp.replace(/PROD/g,product.data[city][1].toString());try{temp=eval(temp)}catch(t){throw new Error("Invalid value or expression for sell quantity field: "+t)}if(null==temp||isNaN(parseFloat(temp))||parseFloat(temp)<0)throw new Error("Invalid value or expression for sell quantity field");if(all)for(let t=0;t=o))throw new Error("You cannot afford this purchase.");t.funds=t.funds-o,n.qty+=a}function SellShares(t,e,n){if(isNaN(n))throw new Error("Invalid value for number of shares");if(n<0)throw new Error("Invalid value for number of shares");if(n>t.numShares)throw new Error("You don't have that many shares to sell!");if(!t.public)throw new Error("You haven't gone public!");if(t.shareSaleCooldown)throw new Error("Share sale on cooldown!");const a=t.calculateShareSale(n),r=a[0],i=a[1],o=a[2];return t.numShares-=n,t.issuedShares+=n,t.sharePrice=i,t.shareSalesUntilPriceUpdate=o,t.shareSaleCooldown=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SellSharesCooldown,e.gainMoney(r,"corporation"),r}function BuyBackShares(t,e,n){if(isNaN(n))throw new Error("Invalid value for number of shares");if(n<0)throw new Error("Invalid value for number of shares");if(n>t.issuedShares)throw new Error("You don't have that many shares to buy!");if(!t.public)throw new Error("You haven't gone public!");const a=1.1*t.sharePrice;if(e.money=o)throw new Error(`You are already at the max products (${o}) for division: ${e.name}!`);const l=new _Product__WEBPACK_IMPORTED_MODULE_5__.a({name:a.replace(/[<>]/g,""),createCity:n,designCost:r,advCost:i});if(s[l.name]instanceof _Product__WEBPACK_IMPORTED_MODULE_5__.a)throw new Error("You already have a product with this name!");t.funds=t.funds-(r+i),s[l.name]=l}function Research(t,e){const n=_IndustryData__WEBPACK_IMPORTED_MODULE_1__.c[t.type];if(void 0===n)throw new Error(`No research tree for industry '${t.type}'`);if(!n.getAllNodes().includes(e))throw new Error(`No research named '${e}'`);const a=_ResearchMap__WEBPACK_IMPORTED_MODULE_10__.a[e];if(t.sciResearch.qty{var e;null!=i[(e=t).name]&&console.warn("Duplicate Company Position being defined: "+e.name),i[e.name]=new r.a(e)})},,function(t,e,n){"use strict";n.d(e,"b",(function(){return xt})),n.d(e,"a",(function(){return Lt}));var a=n(0),r=n.n(a),i=n(141),o=n(108),s=n(345),l=n(11),c=n(218),f=n(44),u=n(1049),m=n(374),h=n(340),d=n(16),p=n(26),g=n(29),y=n(245),b=n(101),E=n(113),v=n(137),k=n(21),_=n(1),w=n(27),S=n(1052),C=n(1056),x=n(1079),L=n(1087),O=n(1111),M=n(1142),T=n(1161),A=n(1196),R=n(587),N=n(1209),P=n(1210),I=n(1254),F=n(1262),D=n(1271),j=n(1296),B=n(404),G=n(622),W=n(1322),H=n(1323),U=n(1329),q=n(1330),$=n(405),K=n(1341),z=n(1351),V=n(621),Y=n(1353),J=n(1362),X=n(1365),Q=n(119),Z=n(296),tt=n(1370),et=n(182),nt=n(1371),at=n(140),rt=n(181),it=n(338),ot=n(400),st=n(577),lt=n(295),ct=n(299),ft=n(30),ut=n(408),mt=n(1373),ht=n(1376),dt=n(9),pt=n(1377),gt=n(1382),yt=n(1387),bt=n(1388),Et=n.n(bt),vt=n(1389),kt=n.n(vt),_t=n(1390);const wt=location,St=Object(E.a)(t=>Object(v.a)({root:{"-ms-overflow-style":"none","scrollbar-width":"none",margin:t.spacing(0),flexGrow:1,display:"block",padding:"8px",minHeight:"100vh",boxSizing:"border-box"}})),Ct=()=>{throw new Error("Router called before initialization")};let xt={isInitialized:!1,page:Ct,allowRouting:Ct,toActiveScripts:Ct,toAugmentations:Ct,toBitVerse:Ct,toBladeburner:Ct,toStats:Ct,toCity:Ct,toCorporation:Ct,toCreateProgram:Ct,toDevMenu:Ct,toFaction:Ct,toFactions:Ct,toGameOptions:Ct,toGang:Ct,toHacknetNodes:Ct,toInfiltration:Ct,toJob:Ct,toMilestones:Ct,toGrafting:Ct,toScriptEditor:Ct,toSleeves:Ct,toStockMarket:Ct,toTerminal:Ct,toTravel:Ct,toTutorial:Ct,toWork:Ct,toBladeburnerCinematic:Ct,toLocation:Ct,toStaneksGift:Ct,toAchievements:Ct,toThemeBrowser:Ct,toImportSave:Ct};function Lt({player:t,engine:e,terminal:n}){const E=St(),[{files:v,vim:bt},vt]=Object(a.useState)({files:{},vim:!1}),[Ct,Lt]=Object(a.useState)(function(t){return ut.b?w.a.Recovery:t.isWorking?w.a.Work:w.a.Terminal}(t)),Ot=Object(a.useState)(0)[1],[Mt,Tt]=Object(a.useState)(!1),[At,Rt]=Object(a.useState)(t.currentWorkFactionName?g.a[t.currentWorkFactionName]:void 0);if(void 0===At&&Ct===w.a.Faction)throw new Error("Trying to go to a page without the proper setup");const[Nt,Pt]=Object(a.useState)(!1),[It,Ft]=Object(a.useState)(!1),[Dt,jt]=Object(a.useState)(void 0);if(void 0===Dt&&(Ct===w.a.Infiltration||Ct===w.a.Location||Ct===w.a.Job))throw new Error("Trying to go to a page without the proper setup");const[Bt,Gt]=Object(a.useState)(""),[Wt,Ht]=Object(a.useState)(0),[Ut,qt]=Object(a.useState)(dt.a.IsSidebarOpened),[$t,Kt]=Object(a.useState)(void 0),[zt,Vt]=Object(a.useState)(!1);if(void 0===$t&&Ct===w.a.ImportSave)throw new Error("Trying to go to a page without the proper setup");const[Yt,Jt]=Object(a.useState)(!0);function Xt(){Ot(t=>t+1)}function Qt(){for(const t of Object(p.c)())t.runningScripts=[];o.c.saveGame(),setTimeout(()=>wt.reload(),2e3)}function Zt(){Object(d.a)("Soft Reset!"),Object(h.a)(),Ht(Wt+1),xt.toTerminal()}Object(a.useEffect)(()=>m.a.subscribe(Xt),[]),xt={isInitialized:!0,page:()=>Ct,allowRouting:t=>Jt(t),toActiveScripts:()=>Lt(w.a.ActiveScripts),toAugmentations:()=>Lt(w.a.Augmentations),toBladeburner:()=>Lt(w.a.Bladeburner),toStats:()=>Lt(w.a.Stats),toCorporation:()=>Lt(w.a.Corporation),toCreateProgram:()=>Lt(w.a.CreateProgram),toDevMenu:()=>Lt(w.a.DevMenu),toFaction:(t,e=!1)=>{Tt(e),Lt(w.a.Faction),t&&Rt(t)},toFactions:()=>Lt(w.a.Factions),toGameOptions:()=>Lt(w.a.Options),toGang:()=>Lt(w.a.Gang),toHacknetNodes:()=>Lt(w.a.Hacknet),toMilestones:()=>Lt(w.a.Milestones),toGrafting:()=>Lt(w.a.Grafting),toScriptEditor:(t,e)=>{vt({files:t,vim:!(null==e||!e.vim)}),Lt(w.a.ScriptEditor)},toSleeves:()=>Lt(w.a.Sleeves),toStockMarket:()=>Lt(w.a.StockMarket),toTerminal:()=>Lt(w.a.Terminal),toTutorial:()=>Lt(w.a.Tutorial),toJob:()=>{jt(c.a[t.companyName]),Lt(w.a.Job)},toCity:()=>{Lt(w.a.City)},toTravel:()=>{t.gotoLocation(l.a.TravelAgency),Lt(w.a.Travel)},toBitVerse:(t,e)=>{Pt(t),Ft(e),Object(lt.b)(),Lt(w.a.BitVerse)},toInfiltration:t=>{jt(t),Lt(w.a.Infiltration)},toWork:()=>Lt(w.a.Work),toBladeburnerCinematic:()=>{Lt(w.a.BladeburnerCinematic),Gt(Bt)},toLocation:t=>{jt(t),Lt(w.a.Location)},toStaneksGift:()=>{Lt(w.a.StaneksGift)},toAchievements:()=>{Lt(w.a.Achievements)},toThemeBrowser:()=>{Lt(w.a.ThemeBrowser)},toImportSave:(t,e=!1)=>{Kt(t),Vt(e),Lt(w.a.ImportSave)}},Object(a.useEffect)(()=>{kt()(xt).filter(t=>t.startsWith("to")).forEach(t=>{xt[t]=Et()(xt[t],(e,...n)=>{if(Yt)return e(...n);console.log(`Routing is currently disabled - Attempted router.${t}()`)})})}),Object(a.useEffect)(()=>{Ct!==w.a.Terminal&&window.scrollTo(0,0)});let te=r.a.createElement(_.a,null,"Cannot load"),ee=!0,ne=!0,ae=!1;switch(Ct){case w.a.Recovery:te=r.a.createElement(ut.c,{router:xt,softReset:Zt}),ee=!1,ne=!1,ae=!0;break;case w.a.BitVerse:te=r.a.createElement(J.a,{flume:Nt,enter:ct.a,quick:It}),ee=!1,ne=!1;break;case w.a.Infiltration:te=r.a.createElement(A.a,{location:Dt}),ee=!1,ne=!1;break;case w.a.BladeburnerCinematic:te=r.a.createElement(tt.a,null),ee=!1,ne=!1;break;case w.a.Work:te=r.a.createElement(N.a,null),ee=!1;break;case w.a.Terminal:te=r.a.createElement(H.a,{terminal:n,router:xt,player:t});break;case w.a.Sleeves:te=r.a.createElement(I.a,null);break;case w.a.StaneksGift:te=r.a.createElement(X.a,{staneksGift:Q.b});break;case w.a.Stats:te=r.a.createElement(z.a,null);break;case w.a.ScriptEditor:te=r.a.createElement(G.a,{files:v,hostname:t.getCurrentServer().hostname,player:t,router:xt,vim:bt});break;case w.a.ActiveScripts:te=r.a.createElement(q.a,{workerScripts:et.a});break;case w.a.Hacknet:te=r.a.createElement(F.a,{player:t});break;case w.a.CreateProgram:te=r.a.createElement(B.a,null);break;case w.a.Factions:te=r.a.createElement($.a,{player:t,router:xt});break;case w.a.Faction:te=r.a.createElement(K.a,{faction:At,augPage:Mt});break;case w.a.Milestones:te=r.a.createElement(W.a,{player:t});break;case w.a.Tutorial:te=r.a.createElement(U.a,{reactivateTutorial:()=>{Object(h.a)(),xt.toTerminal(),Object(f.e)()}});break;case w.a.DevMenu:te=r.a.createElement(L.a,{player:t,engine:e,router:xt});break;case w.a.Gang:te=r.a.createElement(M.a,null);break;case w.a.Corporation:te=r.a.createElement(T.a,null);break;case w.a.Bladeburner:te=r.a.createElement(O.a,null);break;case w.a.Grafting:te=r.a.createElement(R.a,null);break;case w.a.Travel:te=r.a.createElement(V.a,{p:t,router:xt});break;case w.a.StockMarket:te=r.a.createElement(Y.a,{buyStockLong:y.a,buyStockShort:y.d,cancelOrder:b.c,eventEmitterForReset:b.e,initStockMarket:b.g,p:t,placeOrder:b.j,sellStockLong:y.c,sellStockShort:y.b,stockMarket:b.a});break;case w.a.City:te=r.a.createElement(j.a,null);break;case w.a.Job:case w.a.Location:te=r.a.createElement(D.a,{loc:Dt});break;case w.a.Options:te=r.a.createElement(P.a,{player:t,router:xt,save:()=>o.c.saveGame(),export:()=>{Object(s.c)(t),o.c.exportGame()},forceKill:Qt,softReset:Zt});break;case w.a.Augmentations:te=r.a.createElement(x.a,{exportGameFn:()=>{Object(s.c)(t),o.c.exportGame()},installAugmentationsFn:()=>{Object(i.e)(),xt.toTerminal()}});break;case w.a.Achievements:te=r.a.createElement(mt.a,null);break;case w.a.ThemeBrowser:te=r.a.createElement(pt.a,{router:xt});break;case w.a.ImportSave:te=r.a.createElement(gt.a,{importString:$t,automatic:zt,router:xt}),ee=!1,ne=!1,ae=!0}return r.a.createElement(ft.a.Player.Provider,{value:t},r.a.createElement(ft.a.Router.Provider,{value:xt},r.a.createElement(ht.a,{key:Wt,router:xt,softReset:Zt},r.a.createElement(yt.a,{content:ae?te:null},r.a.createElement(at.c,null,r.a.createElement(S.a,{mode:f.a.isRunning?"tutorial":"overview"},f.a.isRunning?r.a.createElement(u.a,null):r.a.createElement(Z.a,{save:()=>o.c.saveGame(),killScripts:Qt})),ee?r.a.createElement(k.a,{display:"flex",flexDirection:"row",width:"100%"},r.a.createElement(C.a,{player:t,router:xt,page:Ct,opened:Ut,onToggled:t=>{qt(t),dt.a.IsSidebarOpened=t}}),r.a.createElement(k.a,{className:E.root},te)):r.a.createElement(k.a,{className:E.root},te),r.a.createElement(nt.a,null),ne&&r.a.createElement(r.a.Fragment,null,r.a.createElement(rt.c,null),r.a.createElement(it.b,null),r.a.createElement(ot.b,null),r.a.createElement(st.b,null),r.a.createElement(at.a,null)),r.a.createElement(_t.a,null))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(11);const r={};r[a.a.AevumECorp]="ECP",r[a.a.Sector12MegaCorp]="MGCP",r[a.a.Sector12BladeIndustries]="BLD",r[a.a.AevumClarkeIncorporated]="CLRK",r[a.a.VolhavenOmniTekIncorporated]="OMTK",r[a.a.Sector12FourSigma]="FSIG",r[a.a.ChongqingKuaiGongInternational]="KGI",r[a.a.AevumFulcrumTechnologies]="FLCM",r[a.a.IshimaStormTechnologies]="STM",r[a.a.NewTokyoDefComm]="DCOMM",r[a.a.VolhavenHeliosLabs]="HLS",r[a.a.NewTokyoVitaLife]="VITA",r[a.a.Sector12IcarusMicrosystems]="ICRS",r[a.a.Sector12UniversalEnergy]="UNV",r[a.a.AevumAeroCorp]="AERO",r[a.a.VolhavenOmniaCybersystems]="OMN",r[a.a.ChongqingSolarisSpaceSystems]="SLRS",r[a.a.NewTokyoGlobalPharmaceuticals]="GPH",r[a.a.IshimaNovaMedical]="NVMD",r[a.a.AevumWatchdogSecurity]="WDS",r[a.a.VolhavenLexoCorp]="LXO",r[a.a.AevumRhoConstruction]="RHOC",r[a.a.Sector12AlphaEnterprises]="APHE",r[a.a.VolhavenSysCoreSecurities]="SYSC",r[a.a.VolhavenCompuTek]="CTK",r[a.a.AevumNetLinkTechnologies]="NTLK",r[a.a.IshimaOmegaSoftware]="OMGA",r[a.a.Sector12FoodNStuff]="FNS",r[a.a.Sector12JoesGuns]="JGN",r["Sigma Cosmetics"]="SGC",r["Catalyst Ventures"]="CTYS",r["Microdyne Technologies"]="MDYN",r["Titan Laboratories"]="TITN"},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return r}));const a=[".js",".script",".ns"];function r(t){return a.some(e=>t.endsWith(e))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"e",(function(){return s})),n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"f",(function(){return f}));var a=n(6),r=n(280);function i(t,e){const n=(100-t.hackDifficulty)/100,a=1.75*e.hacking,i=(a-t.requiredHackingSkill)/a*n*e.hacking_chance_mult*Object(r.a)(e.intelligence,1);return i>1?1:i<0?0:i}function o(t,e){null==t.baseDifficulty&&(t.baseDifficulty=t.hackDifficulty);let n=3;return n+=.3*t.baseDifficulty,n*e.hacking_exp_mult*a.a.HackExpGain}function s(t,e){const n=(100-t.hackDifficulty)/100*((e.hacking-(t.requiredHackingSkill-1))/e.hacking)*e.hacking_money_mult*a.a.ScriptHackMoney/240;return n<0?0:n>1?1:n}function l(t,e){let n=2.5*(t.requiredHackingSkill*t.hackDifficulty)+500;n/=e.hacking+50;return 5*n/(e.hacking_speed_mult*Object(r.a)(e.intelligence,1))}function c(t,e){return 3.2*l(t,e)}function f(t,e){return 4*l(t,e)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return y})),n.d(e,"j",(function(){return b})),n.d(e,"c",(function(){return E})),n.d(e,"i",(function(){return v})),n.d(e,"d",(function(){return k})),n.d(e,"f",(function(){return _})),n.d(e,"h",(function(){return w})),n.d(e,"k",(function(){return C})),n.d(e,"g",(function(){return x})),n.d(e,"e",(function(){return L}));var a=n(749),r=n(328),i=n(148),o=n(647),s=n(1017),l=n(112),c=n(76),f=n(97),u=n(8),m=n(131),h=n(4),d=n(16),p=n(25);let g={lastUpdate:0,Orders:{},storedCycles:0,ticksUntilCycle:0};const y={};function b(t,e,n,o,s,l=null){if(!(t instanceof i.a))return l?l.log("stock.placeOrder",()=>`Invalid stock: '${t}'`):Object(d.a)("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof e||"number"!=typeof n)return l?l.log("stock.placeOrder",()=>`Invalid arguments: shares='${e}' price='${n}'`):Object(d.a)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const c=new a.a(t.symbol,e,n,o,s);if(null==g.Orders){const t={};for(const e of Object.keys(g)){const n=g[e];n instanceof i.a&&(t[n.symbol]=[])}g.Orders=t}g.Orders[t.symbol].push(c);const f={stockMarket:g,symbolToStockMap:y};return Object(r.a)(t,c.type,c.pos,f),!0}function E(t,e=null){if(null==g.Orders)return!1;if(t.order&&t.order instanceof a.a){const e=t.order,n=g.Orders[e.stockSymbol];for(let t=0;t=e.cap&&(o=.1,e.b=!1),isNaN(o)&&(o=.5);const s=Math.random(),f={stockMarket:g,symbolToStockMap:y};st);f.a.factions.sort((t,n)=>e.indexOf(t)-e.indexOf(n));const n=t.getInfo();for(const t of n.enemies)c.a[t]instanceof l.a&&(c.a[t].isBanned=!0);for(let e=0;e0)for(let n=0;n=t.baseCost*l.augmentationPriceMult){const e=new r.a(t.name);if(t.name==i.a.NeuroFluxGovernor&&(e.level=_()),f.a.queuedAugmentations.push(e),f.a.loseMoney(t.baseCost*l.augmentationPriceMult,"augmentations"),t.name==i.a.NeuroFluxGovernor){let e=_();--e;const n=Math.pow(s.a.NeuroFluxGovernorLevelMult,e);t.baseRepRequirement=500*n*o.a.AugmentationRepCost,t.baseCost=75e4*n*o.a.AugmentationMoneyCost;for(let e=0;e{if(t.hasGangWith(e.name)){let n=Object.values(a.a);n=n.filter(t=>!t.isSpecial);const r=[i.a.NeuroFluxGovernor];2!==t.bitNodeN&&r.push(i.a.TheRedPill);const s=Object(y.b)(`BN${t.bitNodeN}.${t.sourceFileLvl(t.bitNodeN)}`),l=t=>t.factions.length>1||(!!e.augmentations.includes(t.name)||s()>=1-o.a.GangUniqueAugs);return n=n.filter(l),n=n.filter(t=>!r.includes(t.name)),n.map(t=>t.name)}return e.augmentations.slice()}},function(t,e,n){"use strict";let a;n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),function(t){t.Bypass="Bypass",t.PrototypeTampering="PrototypeTampering",t.Unclickable="Unclickable",t.UndocumentedFunctionCall="UndocumentedFunctionCall",t.TimeCompression="TimeCompression",t.RealityAlteration="RealityAlteration",t.N00dles="N00dles",t.YoureNotMeantToAccessThis="YoureNotMeantToAccessThis",t.TrueRecursion="TrueRecursion",t.INeedARainbow="INeedARainbow",t.EditSaveFile="EditSaveFile"}(a||(a={}));const r={Bypass:"by circumventing the ram cost of document.",EditSaveFile:"by editing your save file.",PrototypeTampering:"by tampering with Numbers prototype.",TimeCompression:"by compressing time.",Unclickable:"by clicking the unclickable.",UndocumentedFunctionCall:"by looking beyond the documentation.",RealityAlteration:"by altering reality to suit your whims.",N00dles:"by harnessing the power of the n00dles.",YoureNotMeantToAccessThis:"by accessing the dev menu.",TrueRecursion:"by truly recursing.",INeedARainbow:"by using the power of the rainbow."};function i(t){return r[t]}function o(t){return t=t.filter(t=>Object.keys(a).includes(t)),[...new Set(t)]}},,function(t,e,n){"use strict";n.d(e,"c",(function(){return R})),n.d(e,"b",(function(){return O})),n.d(e,"a",(function(){return A}));var a=n(152),r=n(66),i=n(8),o=n(29),s=n(80),l=n(267),c=n(2),f=n(26),u=n(9),m=n(82),h=n(101),d=n(119),p=n(140),g=n(345),y=n(16),b=n(25),E=n(341),v=n(1046),k=n(15),_=n(361),w=n(11),S=n(576),C=n(293);function x(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class L{constructor(){x(this,"PlayerSave",""),x(this,"AllServersSave",""),x(this,"CompaniesSave",""),x(this,"FactionsSave",""),x(this,"AliasesSave",""),x(this,"GlobalAliasesSave",""),x(this,"MessagesSave",""),x(this,"StockMarketSave",""),x(this,"SettingsSave",""),x(this,"VersionSave",""),x(this,"AllGangsSave",""),x(this,"LastExportBonus",""),x(this,"StaneksGiftSave","")}getSaveString(t=!1){this.PlayerSave=JSON.stringify(c.a),this.AllServersSave=Object(f.j)(t),this.CompaniesSave=JSON.stringify(r.a),this.FactionsSave=JSON.stringify(o.a),this.AliasesSave=JSON.stringify(a.a),this.GlobalAliasesSave=JSON.stringify(a.b),this.MessagesSave=JSON.stringify(l.a),this.StockMarketSave=JSON.stringify(h.a),this.SettingsSave=JSON.stringify(u.a),this.VersionSave=JSON.stringify(i.a.VersionNumber),this.LastExportBonus=JSON.stringify(g.a),this.StaneksGiftSave=JSON.stringify(d.b),c.a.inGang()&&(this.AllGangsSave=JSON.stringify(s.a));return btoa(unescape(encodeURIComponent(JSON.stringify(this))))}saveGame(t=!0){const e=(new Date).getTime();c.a.lastSave=e;const n=this.getSaveString(u.a.ExcludeRunningScriptsFromSave);return new Promise((a,r)=>{Object(E.c)(n).then(()=>{const r={playerIdentifier:c.a.identifier,fileName:this.getSaveFileName(),save:n,savedOn:e};return Object(C.d)(r),t&&p.b.emit("Game Saved!","info",2e3),a()}).catch(t=>(console.error(t),r()))})}getSaveFileName(t=!1){const e=Math.round(Date.now()/1e3),n=c.a.bitNodeN;let a=`bitburnerSave_${e}_BN${n}x${m.a[n]}.json`;return t&&(a="RECOVERY"+a),a}exportGame(){const t=this.getSaveString(u.a.ExcludeRunningScriptsFromSave);A(this.getSaveFileName(),t)}importGame(t,e=!0){if(!t||""===t)throw new Error("Invalid import string");return Object(E.c)(t).then(()=>(e&&setTimeout(()=>location.reload(),1e3),Promise.resolve()))}getImportStringFromFile(t){if(null===t)return Promise.reject(new Error("No file selected"));const e=t[0];if(!e)return Promise.reject(new Error("Invalid file selected"));const n=new FileReader,a=new Promise((t,e)=>{n.onload=function(n){const a=n.target;if(null===a)return e(new Error("Error importing file"));const r=a.result;if("string"!=typeof r)return e(new Error("FileReader event was not type string"));t(r)}});return n.readAsText(e),a}async getImportDataFromString(t){var e,n,a,r,i,o,s,l;if(!t||""===t)throw new Error("Invalid import string");let f,u;try{f=window.atob(t),f=f.trim()}catch(t){console.error(t)}if(!f||""===f)return Promise.reject(new Error("Save game had not content or was not base64 encoded"));try{u=JSON.parse(f)}catch(t){console.log(t)}if(!u||"BitburnerSaveObject"!==u.ctor||!u.data)return Promise.reject(new Error("Save game did not seem valid"));const m={base64:t,parsed:u},h=S.a.fromJSON(JSON.parse(u.data.PlayerSave)),d={identifier:h.identifier,lastSave:h.lastSave,totalPlaytime:h.totalPlaytime,money:h.money,hacking:h.hacking,augmentations:null!==(e=null===(n=h.augmentations)||void 0===n?void 0:n.reduce((t,e)=>t+e.level,0))&&void 0!==e?e:0,factions:null!==(a=null===(r=h.factions)||void 0===r?void 0:r.length)&&void 0!==a?a:0,achievements:null!==(i=null===(o=h.achievements)||void 0===o?void 0:o.length)&&void 0!==i?i:0,bitNode:h.bitNodeN,bitNodeLevel:h.sourceFileLvl(c.a.bitNodeN)+1,sourceFiles:null!==(s=null===(l=h.sourceFiles)||void 0===l?void 0:l.reduce((t,e)=>t+e.lvl,0))&&void 0!==s?s:0};return m.playerData=d,Promise.resolve(m)}toJSON(){return Object(b.b)("BitburnerSaveObject",this)}static fromJSON(t){return Object(b.a)(L,t.data)}}function O(t){if(-1!==navigator.userAgent.indexOf("wv")&&-1!==navigator.userAgent.indexOf("Chrome/")&&setInterval(()=>{Object(y.a)("SCAM ALERT. This app is not official and you should uninstall it.")},1e3),!t)return!1;t=decodeURIComponent(escape(atob(t)));const e=JSON.parse(t,b.c);if(Object(c.b)(e.PlayerSave),Object(f.h)(e.AllServersSave),Object(r.c)(e.CompaniesSave),Object(o.d)(e.FactionsSave),e.hasOwnProperty("StaneksGiftSave")?Object(d.a)(e.StaneksGiftSave):(console.warn("Could not load Staneks Gift from save"),Object(d.a)("")),e.hasOwnProperty("AliasesSave"))try{Object(a.c)(e.AliasesSave)}catch(t){console.warn("Could not load Aliases from save"),Object(a.c)("")}else console.warn("Save file did not contain an Aliases property"),Object(a.c)("");if(e.hasOwnProperty("GlobalAliasesSave"))try{Object(a.d)(e.GlobalAliasesSave)}catch(t){console.warn("Could not load GlobalAliases from save"),Object(a.d)("")}else console.warn("Save file did not contain a GlobalAliases property"),Object(a.d)("");if(e.hasOwnProperty("MessagesSave"))try{Object(l.d)(e.MessagesSave)}catch(t){console.warn("Could not load Messages from save"),Object(l.c)()}else console.warn("Save file did not contain a Messages property"),Object(l.c)();if(e.hasOwnProperty("StockMarketSave"))try{Object(h.i)(e.StockMarketSave)}catch(t){Object(h.i)("")}else Object(h.i)("");if(e.hasOwnProperty("SettingsSave"))try{u.a.load(e.SettingsSave)}catch(t){console.error("ERROR: Failed to parse Settings. Re-initing default values"),u.a.init()}else u.a.init();if(e.hasOwnProperty("LastExportBonus"))try{g.d(JSON.parse(e.LastExportBonus))}catch(t){g.d((new Date).getTime()),console.error("ERROR: Failed to parse last export bonus Settings "+t)}if(c.a.inGang()&&e.hasOwnProperty("AllGangsSave"))try{Object(s.b)(e.AllGangsSave)}catch(t){console.error("ERROR: Failed to parse AllGangsSave: "+t)}if(e.hasOwnProperty("VersionSave"))try{const t=JSON.parse(e.VersionSave,b.c);!function(t){const e=c.a;if("string"==typeof t){if(t<="0.41.2"){null!=e.companyPosition&&"string"!=typeof e.companyPosition&&(e.companyPosition=e.companyPosition.data.positionName,null==e.companyPosition&&(e.companyPosition=""));for(const t of Object.keys(r.a)){const e=r.a[t];if(0==e.name&&null!=e.companyName&&(e.name=e.companyName),e.companyPositions instanceof Array){const t={};for(let n=0;nt.name===k.a.NeuroFluxGovernor);if(t)t.level+=10;else{const t=new _.a(k.a.NeuroFluxGovernor);t.level=10,c.a.augmentations.push(t)}c.a.reapplyAllAugmentations(!0),c.a.reapplyAllSourceFiles()}if(t<3&&(e.money=parseFloat(e.money),e.corporation)){e.corporation.funds=parseFloat(e.corporation.funds),e.corporation.revenue=parseFloat(e.corporation.revenue),e.corporation.expenses=parseFloat(e.corporation.expenses);for(let t=0;t0)for(const t of e.sleeves)if(t.augmentations&&0!==t.augmentations.length)for(const e of t.augmentations)"Graphene BranchiBlades Upgrade"===e.name&&(e.name="Graphene BrachiBlades Upgrade");t<12&&void 0!==e.resleeves&&delete e.resleeves}}(t),window.location.href.toLowerCase().includes("bitburner-beta")?Object(y.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).

"+i.a.LatestUpdate,M):t!==i.a.VersionNumber&&T()}catch(t){T()}else T();return!0}const M={"& h1, & h2, & h3, & h4, & p, & a, & ul":{margin:0,color:u.a.theme.primary,whiteSpace:"initial"},"& ul":{paddingLeft:"1.5em",lineHeight:1.5}};function T(){setTimeout(()=>Object(y.a)("New update!
Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).

"+i.a.LatestUpdate,M),1e3)}function A(t,e){const n=new Blob([e],{type:"text/plain"}),a=window.navigator;if(a.msSaveOrOpenBlob)a.msSaveOrOpenBlob(n,t);else{const e=document.createElement("a"),a=URL.createObjectURL(n);e.href=a,e.download=t,document.body.appendChild(e),e.click(),setTimeout((function(){document.body.removeChild(e),window.URL.revokeObjectURL(a)}),0)}}b.c.constructors.BitburnerSaveObject=L;const R=new L},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"a",(function(){return l}));var a=n(147),r=n(26);function i(t,e){return e.delayReject&&e.delayReject(),new Promise((function(n,a){e.delay=window.setTimeout(()=>{e.delay=null,e.delayReject=void 0,e.env.stopFlag?a(e):n()},t),e.delayReject=a}))}function o(t,e){const n=Object(r.d)(t.hostname);if(null==n)throw new Error("WorkerScript constructed with invalid server ip: "+t.hostname);for(const n of t.scriptRef.dependencies){var a,i;e=null!==(a=null===(i=e)||void 0===i?void 0:i.replace(new RegExp(n.url,"g"),n.filename))&&void 0!==a?a:e}return"|DELIMITER|"+n.hostname+"|DELIMITER|"+t.name+"|DELIMITER|"+e}function s(t,e,n){const a=t.scriptRef.threads;if(!n)return isNaN(a)||a<1?1:a;const r=0|n;if(isNaN(n)||r<1)throw o(t,`Invalid thread count passed to ${e}: ${n}. Threads must be a positive number.`);if(r>a)throw o(t,`Too many threads requested by ${e}. Requested: ${n}. Has: ${a}.`);return r}function l(t){if(!Object(a.a)(t))return!1;return 4==t.split("|DELIMITER|").length}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(4),o=n(20);function s({money:t}){return r.a.createElement(o.a,{money:i.a.formatMoney(t)+" / sec"})}},function(t,e,n){"use strict";n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return f}));var a=n(949),r=n(25),i=n(561);class o{constructor(t,e,n,a,r,i){this.name=t,this.desc=e,this.generate=n,this.solver=a,this.difficulty=r,this.numTries=i}}const s={};for(const t of a.a)s[t.name]=new o(t.name,t.desc,t.gen,t.solver,t.difficulty,t.numTries);let l,c;!function(t){t[t.FactionReputation=0]="FactionReputation",t[t.FactionReputationAll=1]="FactionReputationAll",t[t.CompanyReputation=2]="CompanyReputation",t[t.Money=3]="Money"}(l||(l={})),function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure",t[t.Cancelled=2]="Cancelled"}(c||(c={}));class f{constructor(t="",e="Find Largest Prime Factor",n=null){var a,r,i;if(i=0,(r="tries")in(a=this)?Object.defineProperty(a,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[r]=i,this.fn=t,this.fn.endsWith(".cct")||(this.fn+=".cct"),null==s[e])throw new Error(`Error: invalid contract type: ${e} please contact developer`);this.type=e,this.data=s[e].generate(),this.reward=n}getData(){return this.data}getDescription(){return s[this.type].desc(this.data)}getDifficulty(){return s[this.type].difficulty}getMaxNumTries(){return s[this.type].numTries}getType(){return s[this.type].name}isSolution(t){return s[this.type].solver(this.data,t)}async prompt(){return new Promise(t=>{const e={c:this,onClose:()=>{t(c.Cancelled)},onAttempt:e=>{this.isSolution(e)?t(c.Success):t(c.Failure)}};i.a.emit(e)})}toJSON(){return Object(r.b)("CodingContract",this)}static fromJSON(t){return Object(r.a)(f,t.data)}}r.c.constructors.CodingContract=f},function(t,e,n){"use strict";let a;n.d(e,"a",(function(){return a})),function(t){t.LimitBuy="Limit Buy Order",t.LimitSell="Limit Sell Order",t.StopBuy="Stop Buy Order",t.StopSell="Stop Sell Order"}(a||(a={}))},,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n(4),i=n(113),o=n(137);const s=Object(i.a)(t=>Object(o.a)({reputation:{color:t.colors.rep}}));function l({reputation:t}){const e=s();return a.createElement("span",{className:e.reputation},"number"==typeof t?r.a.formatReputation(t):t)}},,,function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var a=n(25),r=n(750);let i=new r.a;function o(t){i=t?JSON.parse(t,a.c):new r.a}},,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(597),o=n.n(i),s=n(1091),l=n.n(s),c=n(114),f=n(598),u=n.n(f),m=n(593),h=n.n(m),d=n(81),p=n(23);function g(t){const[e,n]=Object(a.useState)("");const{label:i,placeholder:s,add:f,subtract:m,reset:g,tons:y}=t;return r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{label:i,value:e,onChange:function(t){""===t.target.value?n(""):n(parseFloat(t.target.value))},placeholder:s,type:"number",InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{title:"Add a lot"},r.a.createElement(c.a,{onClick:y,size:"large"},r.a.createElement(h.a,{style:{transform:"rotate(-90deg)"}}))),r.a.createElement(p.a,{title:"Add"},r.a.createElement(c.a,{onClick:()=>f("string"!=typeof e?e:0),size:"large"},r.a.createElement(o.a,null)))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{title:"Remove"},r.a.createElement(c.a,{onClick:()=>m("string"!=typeof e?e:0),size:"large"},r.a.createElement(l.a,null))),r.a.createElement(p.a,{title:"Reset"},r.a.createElement(c.a,{onClick:g,size:"large"},r.a.createElement(u.a,null))))}}))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return l}));var a=n(281),r=n(644);function i(t){const e=a.a[t];if(null==e)throw new Error("Invalid research name: "+t);return new r.a({text:e.name,cost:e.cost})}function o(){const t=i("Hi-Tech R&D Laboratory"),e=i("AutoBrew"),n=i("AutoPartyManager"),a=i("Automatic Drug Administration"),r=i("Bulk Purchasing"),o=i("CPH4 Injections"),s=i("Drones"),l=i("Drones - Assembly"),c=i("Drones - Transport"),f=i("Go-Juice"),u=i("HRBuddy-Recruitment"),m=i("HRBuddy-Training"),h=i("JoyWire"),d=i("Market-TA.I"),p=i("Market-TA.II"),g=i("Overclock"),y=i("Self-Correcting Assemblers"),b=i("Sti.mu");return a.addChild(f),a.addChild(o),s.addChild(l),s.addChild(c),u.addChild(m),d.addChild(p),g.addChild(b),t.addChild(e),t.addChild(n),t.addChild(a),t.addChild(r),t.addChild(s),t.addChild(u),t.addChild(h),t.addChild(d),t.addChild(g),t.addChild(y),t}function s(){const t=new r.b;return t.setRoot(o()),t}function l(){const t=new r.b,e=o(),n=i("uPgrade: Fulcrum"),a=i("uPgrade: Capacity.I"),s=i("uPgrade: Capacity.II"),l=i("uPgrade: Dashboard");return a.addChild(s),n.addChild(a),n.addChild(l),e.addChild(n),t.setRoot(e),t}},,function(t,e,n){"use strict";function a(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}n.d(e,"a",(function(){return r}));class r{constructor(){var t,e,n;n={},(e="subscribers")in(t=this)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}subscribe(t){let e=a();for(;void 0!==this.subscribers[e];)e=a();return this.subscribers[e]=t,()=>{delete this.subscribers[e]}}emit(...t){for(const e in this.subscribers){const n=this.subscribers[e];void 0!==n&&n(...t)}}}},function(t,e,n){"use strict";n.d(e,"f",(function(){return u})),n.d(e,"c",(function(){return m})),n.d(e,"e",(function(){return d})),n.d(e,"d",(function(){return p})),n.d(e,"a",(function(){return g})),n.d(e,"b",(function(){return y}));var a=n(26),r=n(47),i=n(583),o=n(6),s=n(8),l=n(64),c=n(63),f=n(748);function u(t){let e=t.hostname.replace(/ /g,"-");if(null!=t.ip&&Object(a.g)(t.ip)&&(t.ip=Object(a.e)()),null!=Object(a.d)(e)){e+="-0";for(let t=0;t<200&&(e=e.replace(/-[0-9]+$/,"-"+t),null!=Object(a.d)(e));++t);}return t.hostname=e,new r.a(t)}function m(t,e,n,a=1){let r=1+(s.a.ServerBaseGrowthRate-1)/t.hackDifficulty;r>s.a.ServerMaxGrowthRate&&(r=s.a.ServerMaxGrowthRate);const i=t.serverGrowth/100,l=1+(a-1)/16;return Math.log(e)/(Math.log(r)*n.hacking_grow_mult*i*o.a.ServerGrowthRate*l)}function h(t,e,n,a,r=1){if(n<0&&(n=0),e>t.moneyMax&&(e=t.moneyMax),e<=n)return 0;const i=1+(s.a.ServerBaseGrowthRate-1)/t.hackDifficulty,l=Math.min(i,s.a.ServerMaxGrowthRate),c=1+(r-1)/16,f=t.serverGrowth/100*a.hacking_grow_mult*c*o.a.ServerGrowthRate,u=f*Math.log(l),m=n*u+Math.log(e*u);let h;if(m0&&(h-=Math.log(m));let d=h/u-n;const p=l**f;let g=1/0;do{const t=p**d,a=n+d;g=(a*t-e)/(a*u+1)/t,d-=g}while(Math.abs(g)>=1);const y=Math.floor(d);if(e<=(n+y)*Math.pow(l,y*f))return y;const b=Math.ceil(d);return e<=(n+b)*Math.pow(l,b*f)?b:b+1}function d(t,e,n,a=1){let r=Object(i.a)(t,e,n,a);r<1&&(console.warn("serverGrowth calculated to be less than 1"),r=1);const o=t.moneyAvailable;if(t.moneyAvailable+=1*e,t.moneyAvailable*=r,Object(f.a)(t.moneyMax)&&isNaN(t.moneyAvailable)&&(t.moneyAvailable=t.moneyMax),Object(f.a)(t.moneyMax)&&t.moneyAvailable>t.moneyMax&&(t.moneyAvailable=t.moneyMax),o!==t.moneyAvailable){let r=h(t,t.moneyAvailable,o,n,a);r=Math.min(Math.max(0,Math.ceil(r)),e),t.fortify(2*s.a.ServerFortifyAmount*r)}return t.moneyAvailable/o}function p(t,e){const n=e.programs.includes(l.a.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.a.NukeProgram.name),n&&e.programs.push(l.a.BitFlume.name),e.scripts.forEach((function(n){n.updateRamUsage(t,e.scripts)})),e.messages.length=0,e.messages.push(c.a.HackersStartingHandbook)}function g(t,e){return e>t.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):Object(a.d)(t.serversOnNetwork[e])}function y(t){return t instanceof r.a&&t.backdoorInstalled}},function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"f",(function(){return i})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"e",(function(){return l})),n.d(e,"b",(function(){return c}));var a=n(28);function r(t,e){return Math.random()*(e-t)+t}const i="↑",o="↓",s="←",l="→";function c(t){switch(t.key){case a.a.UP_ARROW:case a.a.W:return i;case a.a.LEFT_ARROW:case a.a.A:return s;case a.a.DOWN_ARROW:case a.a.S:return o;case a.a.RIGHT_ARROW:case a.a.D:return l}return""}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={BladesIntuition:"Blade's Intuition",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Tracer:"Tracer",Overclock:"Overclock",Reaper:"Reaper",EvasiveSystem:"Evasive System",Datamancer:"Datamancer",CybersEdge:"Cyber's Edge",HandsOfMidas:"Hands of Midas",Hyperdrive:"Hyperdrive"}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(347),r=n(25);class i extends a.a{constructor(t=null){super(t),this.count=1}getActionTimePenalty(){return 1.5}getChaosCompetencePenalty(){return 1}getChaosDifficultyBonus(){return 1}toJSON(){return Object(r.b)("BlackOperation",this)}static fromJSON(t){return Object(r.a)(i,t.data)}}r.c.constructors.BlackOperation=i},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i}));var a=n(0);const r={Gang:n.n(a).a.createContext({})},i=()=>Object(a.useContext)(r.Gang)},function(t,e,n){"use strict";n.d(e,"c",(function(){return m})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(753),o=n(113),s=n(131),l=n(1746),c=n(65),f=n(181);const u=Object(o.a)(()=>({snackbar:{zIndex:f.d+1e3+" !important","& .MuiAlert-icon":{alignSelf:"center"}}}));function m(t){const e=u();return r.a.createElement(i.a,{dense:!0,maxSnack:9,anchorOrigin:{horizontal:"right",vertical:"bottom"},autoHideDuration:2e3,classes:{containerRoot:e.snackbar}},t.children)}const h=new s.a;function d(){const{enqueueSnackbar:t,closeSnackbar:e}=Object(i.b)();return Object(a.useEffect)(()=>h.subscribe((n,a,i)=>{const o=t(r.a.createElement(l.a,{severity:a},n),{content:(t,e)=>r.a.createElement(c.a,{key:t},e),variant:a,autoHideDuration:i,onClick:()=>e(o)})})),r.a.createElement(r.a.Fragment,null)}},function(t,e,n){"use strict";n.d(e,"c",(function(){return E})),n.d(e,"f",(function(){return C})),n.d(e,"e",(function(){return w})),n.d(e,"d",(function(){return y})),n.d(e,"a",(function(){return _})),n.d(e,"b",(function(){return S}));var a=n(40),r=n(57),i=n(361),o=n(15),s=n(6),l=n(8),c=n(29),f=n(2),u=n(340),m=n(82),h=n(16),d=n(1393),p=n(5),g=n(485);function y(){!function(){for(const t of Object.keys(c.a))c.a.hasOwnProperty(t)&&(c.a[t].augmentations=[])}(),Object(d.a)(r.a),[Object(g.d)(),Object(g.e)(),...g.c,...Object(c.b)(p.a.Bladeburners)?g.a:[],...Object(c.b)(p.a.ChurchOfTheMachineGod)?g.b:[]].map(k),function(){for(const t of Object.keys(r.a))if(r.a.hasOwnProperty(t)){const e=r.a[t];e.name===o.a.NeuroFluxGovernor?v(e):e.baseCost=e.startingCost*E()*s.a.AugmentationMoneyCost}}(),f.a.reapplyAllAugmentations()}function b(){return l.a.MultipleAugMultiplier*[1,.96,.94,.93][m.a[11]]}function E(){return Math.pow(b(),f.a.queuedAugmentations.length)}function v(t){let e=function(){let t=0;for(let e=0;e=0;t--)if(f.a.queuedAugmentations[t].name===o.a.NeuroFluxGovernor){e=t;break}for(let n=0;n"}return f.a.queuedAugmentations=[],Object(h.a)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:
"+t+"
You wake up in your home...you feel different..."),Object(u.a)(),!0}function S(t){return r.a.hasOwnProperty(t)}function C(t){return(t instanceof a.a?t.name:t)===o.a.NeuroFluxGovernor}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(268),r=n(182),i=n(292),o=n(364),s=n(26),l=n(317),c=n(16),f=n(581),u=n(2);function m(t,e,n){if(null!=n&&"boolean"==typeof n||(n=!0),t instanceof a.a)return d(t),!0;if(t instanceof o.a&&"string"==typeof e){const a=h(t.pid,n);if(a)return a;for(const a of r.a.values())if(a.name==t.filename&&a.hostname==e&&Object(l.a)(a.args,t.args))return d(a,n),!0;return!1}return"number"==typeof t?h(t,n):(console.error("killWorkerScript() called with invalid argument:"),console.error(t),!1)}function h(t,e=!0){const n=r.a.get(t);return n instanceof a.a&&(d(n,e),!0)}function d(t,e=!0){if("function"==typeof t.atExit){try{t.atExit()}catch(e){Object(c.a)(`Error trying to call atExit for script ${t.name} on ${t.hostname} ${t.scriptRef.args} ${e}`)}t.atExit=void 0}t.env.stopFlag=!0,function(t){t instanceof a.a&&t.delay&&(clearTimeout(t.delay),t.delayReject&&t.delayReject(t))}(t),function(t,e=!0){const n=t.hostname,a=t.name,o=Object(s.d)(n);if(null==o)return void console.error("Could not find server on which this script is running: "+n);for(let e=0;eObject(o.a)({unbuyable:{color:t.palette.action.disabled},money:{color:t.colors.money}}));function l(t){const e=s();return t.corp.funds>t.money?a.createElement("span",{className:e.money},r.a.formatMoney(t.money)):a.createElement("span",{className:e.unbuyable},r.a.formatMoney(t.money))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(45),o=n(31),s=n(1),l=n(4),c=n(24),f=n(296);const u=({name:t,color:e,classes:n=Object(f.b)(),data:a})=>{let u;return void 0!==a.content?u=a.content:void 0!==a.level&&void 0!==a.exp?u=`${Object(c.d)(a.level,0)} (${l.a.formatExp(a.exp)} exp)`:void 0!==a.level&&void 0===a.exp&&(u=""+Object(c.d)(a.level,0)),r.a.createElement(i.a,null,r.a.createElement(o.a,{classes:{root:n.cellNone}},r.a.createElement(s.a,{style:{color:e}},t)),r.a.createElement(o.a,{align:"right",classes:{root:n.cellNone}},r.a.createElement(s.a,{style:{color:e}},u)))}},,,function(t,e,n){"use strict";function a(t){return"string"==typeof t||t instanceof String}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(25),r=n(36);const i={b:!0,initPrice:1e4,marketCap:1e12,mv:1,name:"",otlkMag:0,spreadPerc:0,shareTxForMovement:1e6,symbol:""};function o(t){let e;switch(typeof t){case"number":return t;case"object":{const n=t;e=Object(r.a)(n.min,n.max);break}default:throw Error(`Do not know how to convert the type '${typeof t}' to a number`)}return"object"==typeof t&&"number"==typeof t.divisor?e/t.divisor:e}class s{constructor(t=i){this.name=t.name,this.symbol=t.symbol,this.price=o(t.initPrice),this.lastPrice=this.price,this.playerShares=0,this.playerAvgPx=0,this.playerShortShares=0,this.playerAvgShortPx=0,this.mv=o(t.mv),this.b=t.b,this.otlkMag=t.otlkMag,this.otlkMagForecast=this.getAbsoluteForecast(),this.cap=Object(r.a)(1e3*this.price,25e3*this.price),this.spreadPerc=o(t.spreadPerc),this.shareTxForMovement=o(t.shareTxForMovement),this.shareTxUntilMovement=this.shareTxForMovement;const e=t.marketCap/this.price;this.totalShares=1e5*Math.round(e/1e5);this.maxShares=1e5*Math.round(.2*this.totalShares/1e5)}changeForecastForecast(t){this.otlkMagForecast=t,this.otlkMagForecast>100?this.otlkMagForecast=100:this.otlkMagForecast<0&&(this.otlkMagForecast=0)}changePrice(t){this.lastPrice=this.price,this.price=t}cycleForecast(t=.1){const e=this.getForecastIncreaseChance();Math.random()5&&(this.otlkMag=Math.max(5,this.otlkMag-t))}influenceForecastForecast(t){this.otlkMagForecast>50?(this.otlkMagForecast-=t,this.otlkMagForecast=Math.max(50,this.otlkMagForecast)):this.otlkMagForecast<50&&(this.otlkMagForecast+=t,this.otlkMagForecast=Math.min(50,this.otlkMagForecast))}toJSON(){return Object(a.b)("Stock",this)}static fromJSON(t){return Object(a.a)(s,t.data)}}a.c.constructors.Stock=s},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"f",(function(){return l})),n.d(e,"e",(function(){return c})),n.d(e,"g",(function(){return m})),n.d(e,"h",(function(){return h}));var a=n(87);let r={},i={};function o(t){r=""===t?{}:JSON.parse(t)}function s(t){i=""===t?{}:JSON.parse(t)}function l(){for(const t of Object.keys(r))r.hasOwnProperty(t)&&a.a.print("alias "+t+"="+r[t]);for(const t of Object.keys(i))i.hasOwnProperty(t)&&a.a.print("global alias "+t+"="+i[t])}function c(t,e=!1){const n=t.match(/^([\w|!%,@-]+)=(("(.+)")|('(.+)'))$/);return null!=n&&7==n.length&&(e?function(t,e){t in r&&delete r[t];i[t]=e.trim()}(n[1],n[4]||n[6]):function(t,e){t in i&&delete i[t];r[t]=e.trim()}(n[1],n[4]||n[6]),!0)}function f(t){return r.hasOwnProperty(t)?r[t]:null}function u(t){return i.hasOwnProperty(t)?i[t]:null}function m(t){return r.hasOwnProperty(t)?(delete r[t],!0):!!i.hasOwnProperty(t)&&(delete i[t],!0)}function h(t){const e=t.split(" ");if(e.length>0){if("unalias"===e[0]||"alias"===e[0])return e.join(" ");let t=!0,r=0;for(;t&&r<10;){var n;r++,t=!1;const i=null===(n=f(e[0]))||void 0===n?void 0:n.split(" ");null!=i&&(t=!0,e.splice(0,1,...i));for(let n=0;nr.a.createElement(o.a,{injectFirst:!0},r.a.createElement(s.a,{theme:u},t))},,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(1),o=n(23);function s(t){const[e,n]=Object(a.useState)(!1);return r.a.createElement(o.a,{open:e,title:r.a.createElement(i.a,null,"Copied!")},r.a.createElement(i.a,{variant:t.variant,color:t.color,onClick:function(){const e=document.createElement("textarea");e.value=t.value,document.body.appendChild(e),e.select(),e.setSelectionRange(0,1e10),document.execCommand("copy"),document.body.removeChild(e),n(!0),setTimeout(()=>n(!1),1e3)}},t.value))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:.005,"Real Estate":.005,"AI Cores":.1}},function(t,e,n){"use strict";function a(t,e=1){return Math.max(Math.floor(e*(32*Math.log(t+534.5)-200)),1)}function r(t,e=1){return Math.exp((t/e+200)/32)-534.6}function i(t,e=1){const n=a(t,e),i=n+1;let o=r(n,e);o<0&&(o=0);let s=r(i,e);s<0&&(s=0);let l=s-o!=0?100*(t-o)/(s-o):99.99;l<0&&(l=0),l>100&&(l=100);let c=t-o,f=s-t;return c<0&&(c=0),f<0&&(f=0),{currentSkill:n,nextSkill:i,baseExperience:o,experience:t,nextExperience:s,currentExperience:c,remainingExperience:f,progress:l}}n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return i}))},,function(t,e,n){"use strict";let a;n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return r})),function(t){t.Weapon="w",t.Armor="a",t.Vehicle="v",t.Rootkit="r",t.Augmentation="g"}(a||(a={}));const r=[{cost:1e6,mults:{str:1.04,def:1.04},name:"Baseball Bat",upgType:a.Weapon},{cost:12e6,mults:{str:1.08,def:1.08,dex:1.08},name:"Katana",upgType:a.Weapon},{cost:25e6,mults:{str:1.1,def:1.1,dex:1.1,agi:1.1},name:"Glock 18C",upgType:a.Weapon},{cost:5e7,mults:{str:1.12,def:1.1,agi:1.1},name:"P90C",upgType:a.Weapon},{cost:6e7,mults:{str:1.2,def:1.15},name:"Steyr AUG",upgType:a.Weapon},{cost:1e8,mults:{str:1.25,def:1.2},name:"AK-47",upgType:a.Weapon},{cost:15e7,mults:{str:1.3,def:1.25},name:"M15A10 Assault Rifle",upgType:a.Weapon},{cost:225e6,mults:{str:1.3,dex:1.25,agi:1.3},name:"AWM Sniper Rifle",upgType:a.Weapon},{cost:2e6,mults:{def:1.04},name:"Bulletproof Vest",upgType:a.Armor},{cost:5e6,mults:{def:1.08},name:"Full Body Armor",upgType:a.Armor},{cost:25e6,mults:{def:1.15,agi:1.15},name:"Liquid Body Armor",upgType:a.Armor},{cost:4e7,mults:{def:1.2},name:"Graphene Plating Armor",upgType:a.Armor},{cost:3e6,mults:{agi:1.04,cha:1.04},name:"Ford Flex V20",upgType:a.Vehicle},{cost:9e6,mults:{agi:1.08,cha:1.08},name:"ATX1070 Superbike",upgType:a.Vehicle},{cost:18e6,mults:{agi:1.12,cha:1.12},name:"Mercedes-Benz S9001",upgType:a.Vehicle},{cost:3e7,mults:{agi:1.16,cha:1.16},name:"White Ferrari",upgType:a.Vehicle},{cost:5e6,mults:{hack:1.05},name:"NUKE Rootkit",upgType:a.Rootkit},{cost:25e6,mults:{hack:1.1},name:"Soulstealer Rootkit",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Demon Rootkit",upgType:a.Rootkit},{cost:4e7,mults:{hack:1.12},name:"Hmap Node",upgType:a.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Jack the Ripper",upgType:a.Rootkit},{cost:1e10,mults:{str:1.3,dex:1.3},name:"Bionic Arms",upgType:a.Augmentation},{cost:1e10,mults:{agi:1.6},name:"Bionic Legs",upgType:a.Augmentation},{cost:15e9,mults:{str:1.15,def:1.15,dex:1.15,agi:1.15},name:"Bionic Spine",upgType:a.Augmentation},{cost:2e10,mults:{str:1.4,def:1.4},name:"BrachiBlades",upgType:a.Augmentation},{cost:12e9,mults:{str:1.2,def:1.2},name:"Nanofiber Weave",upgType:a.Augmentation},{cost:25e9,mults:{str:1.5,agi:1.5},name:"Synthetic Heart",upgType:a.Augmentation},{cost:15e9,mults:{str:1.3,def:1.3},name:"Synfibril Muscle",upgType:a.Augmentation},{cost:5e9,mults:{hack:1.05},name:"BitWire",upgType:a.Augmentation},{cost:1e10,mults:{hack:1.15},name:"Neuralstimulator",upgType:a.Augmentation},{cost:75e8,mults:{hack:1.1},name:"DataJack",upgType:a.Augmentation},{cost:5e10,mults:{str:1.7,def:1.7},name:"Graphene Bone Lacings",upgType:a.Augmentation}]},,,function(t,e,n){"use strict";n.d(e,"b",(function(){return C})),n.d(e,"a",(function(){return x})),n.d(e,"c",(function(){return O})),n.d(e,"d",(function(){return T}));var a=n(0),r=n.n(a),i=n(131),o=n(142),s=n(1),l=n(21),c=n(10),f=n(65),u=n(442),m=n.n(u),h=n(1018),d=n(113),p=n(137),g=n(584),y=n.n(g),b=n(182),E=n(197),v=n(26),k=n(233),_=n(2),w=n(173);let S=0;const C=new i.a,x=new i.a;let L=[];function O(){const t=Object(a.useState)(!0)[1];function e(){t(t=>!t)}return Object(a.useEffect)(()=>C.subscribe(t=>{const n=t.server+"-"+t.filename+t.args.map(t=>""+t).join("-");L.find(t=>t.id===n)||(L.push({id:n,script:t}),e())}),[]),Object(a.useEffect)(()=>x.subscribe(()=>{L=[],e()})),r.a.createElement(r.a.Fragment,null,L.map(t=>r.a.createElement(A,{key:t.id,script:t.script,id:t.id,onClose:()=>{return n=t.id,L=L.filter(t=>t.id!==n),void e();var n}})))}const M=Object(d.a)(t=>Object(p.a)({title:{"&.is-minimized + *":{border:"none",margin:0,"max-height":0,padding:0,"pointer-events":"none",visibility:"hidden"}},logs:{overflowY:"scroll",overflowX:"hidden",scrollbarWidth:"auto",display:"flex",flexDirection:"column-reverse"},success:{color:t.colors.success},error:{color:t.palette.error.main},primary:{color:t.palette.primary.main},info:{color:t.palette.info.main},warning:{color:t.palette.warning.main}})),T=1500;function A(t){const e=Object(a.useRef)(null),n=Object(a.useRef)(null),[i,u]=Object(a.useState)(t.script),d=M(),p=Object(a.useRef)(null),g=Object(a.useState)(!1)[1],[C,x]=Object(a.useState)(!1);function L(){g(t=>!t)}function O(){const t=p.current;null!==t&&(t.style.zIndex=T+S+"",S++,L())}function A(t=!1){const e=`${i.filename} ${i.args.map(t=>""+t).join(" ")}`;return t||e.length<=30?e:e.slice(0,27)+"..."}Object(a.useEffect)(()=>{O();const t=setInterval(L,1e3);return()=>clearInterval(t)},[]),Object(a.useEffect)(()=>(window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[]);const R=Object(w.debounce)(()=>{const t=null==e?void 0:e.current;t&&(N(t)||P())},100),N=t=>{const e=t.getBoundingClientRect();return!(e.right<0||e.bottom<0||e.left>innerWidth||e.top>outerWidth)},P=()=>{const t=null==n?void 0:n.current;if(!t)return;const e=t.state;e.x=0,e.y=0,t.setState(e)};return r.a.createElement(m.a,{handle:".drag",onDrag:t=>{if(t.clientX<0||t.clientY<0||t.clientX>innerWidth||t.clientY>innerHeight)return!1},ref:n},r.a.createElement(f.a,{style:{display:"flex",flexFlow:"column",position:"fixed",left:"40%",top:"30%",zIndex:1400},ref:p},r.a.createElement("div",{onMouseDown:O},r.a.createElement(f.a,{className:d.title+" "+(C?"is-minimized":""),style:{cursor:"grab"}},r.a.createElement(l.a,{className:"drag",display:"flex",alignItems:"center",ref:e},r.a.createElement(s.a,{color:"primary",variant:"h6",title:A(!0)},A()),r.a.createElement(l.a,{position:"absolute",right:0},!b.a.has(i.pid)&&r.a.createElement(c.a,{onClick:function(){const t=Object(v.d)(i.server);if(null===t)return;const e=Object(k.a)(i.filename,i.args,t);null===e?Object(E.e)(_.a,i,t):u(e)}},"Run"),b.a.has(i.pid)&&r.a.createElement(c.a,{onClick:function(){Object(o.a)(i,i.server,!0)}},"Kill"),r.a.createElement(c.a,{onClick:function(){x(!C)}},C?"🗖":"🗕"),r.a.createElement(c.a,{onClick:t.onClose},"Close")))),r.a.createElement(f.a,{sx:{overflow:"scroll",overflowWrap:"break-word",whiteSpace:"pre-wrap"}},r.a.createElement(h.ResizableBox,{className:d.logs,height:500,width:500,handle:r.a.createElement("span",{style:{position:"absolute",right:"-10px",bottom:"-13px",cursor:"nw-resize"}},r.a.createElement(y.a,{color:"primary",style:{transform:"rotate(45deg)"}}))},r.a.createElement(l.a,null,i.logs.map((t,e)=>{return r.a.createElement(s.a,{key:e,className:(n=t,n.match(/(^\[[^\]]+\] )?ERROR/)||n.match(/(^\[[^\]]+\] )?FAIL/)?d.error:n.match(/(^\[[^\]]+\] )?SUCCESS/)?d.success:n.match(/(^\[[^\]]+\] )?WARN/)?d.warning:n.match(/(^\[[^\]]+\] )?INFO/)?d.info:d.primary)},t,r.a.createElement("br",null));var n})))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a=new Map},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(43),o=n(145),s=n(179),l=n(45),c=n(1);function f({rows:t,title:e,wide:n}){const a=n?s.a:i.a;return r.a.createElement(r.a.Fragment,null,e&&r.a.createElement(c.a,null,e),r.a.createElement(a,{size:"small",padding:"none"},r.a.createElement(o.a,null,t.map((t,e)=>r.a.createElement(l.a,{key:e},t.map((t,e)=>r.a.createElement(i.b,{key:e,align:0!==e?"right":"left"},r.a.createElement(c.a,{noWrap:!0},t))))))))}},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"f",(function(){return f}));var a=n(6),r=n(39);function i(t,e,n,i,o){return r.b.HashesPerLevel*t*Math.pow(1.07,Math.log2(n))*(1+(i-1)/5)*(1-e/n)*o*a.a.HacknetNodeMoney}function o(t,e=1,n=1){const a=Math.round(e);if(isNaN(a)||a<1)return 0;if(t>=r.b.MaxLevel)return 1/0;const i=r.b.UpgradeLevelMult;let o=0,s=t;for(let t=0;t=r.b.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(t)),s=t;for(let t=0;t=r.b.MaxCores)return 1/0;const i=r.b.UpgradeCoreMult;let o=0,s=t;for(let t=0;t=r.b.MaxCache)return 1/0;const a=r.b.UpgradeCacheMult;let i=0,o=t;for(let t=0;t=r.b.MaxServers?1/0:r.b.BaseCost*Math.pow(r.b.PurchaseMult,t-1)*e}},function(t,e,n){"use strict";let a;n.d(e,"a",(function(){return a})),function(t){t[t.Field=0]="Field",t[t.Hacking=1]="Hacking",t[t.None=2]="None",t[t.Security=3]="Security"}(a||(a={}))},,function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(331),r=n(274),i=n(23),o=n(1),s=n(0),l=n.n(s);function c({checked:t,onChange:e,text:n,tooltip:c}){const[f,u]=Object(s.useState)(t);return Object(s.useEffect)(()=>e(f),[f]),l.a.createElement(a.a,{control:l.a.createElement(r.a,{checked:f,onChange:function(t){u(t.target.checked)}}),label:l.a.createElement(i.a,{title:l.a.createElement(o.a,null,c)},l.a.createElement(o.a,null,n))})}},,,,,function(t,e,n){"use strict";function a(t){const e=Object.assign({},{progress:0,totalTicks:20},t);e.progress=Math.max(Math.min(e.progress,1),0);const n=Math.max(Math.floor(e.progress/(1/e.totalTicks)),1),a=Math.max(e.totalTicks-n,0);return`[${"|".repeat(n)}${"-".repeat(a)}]`}n.d(e,"a",(function(){return a}))},,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return T})),n.d(e,"c",(function(){return A})),n.d(e,"e",(function(){return N})),n.d(e,"f",(function(){return I})),n.d(e,"b",(function(){return F})),n.d(e,"d",(function(){return D}));var a=n(142),r=n(268),i=n(182),o=n(292),s=n(512),l=n(8),c=n(582),f=n(109),u=n(513),m=n(627),h=n(1392),d=n(364),p=n(633),g=n(233),y=n(26),b=n(9),E=n(666),v=n(16),k=n(255),_=n(510),w=n(147),S=n(413),C=n(254),x=n(300),L=n(83),O=n(2),M=n(87);const T=[];for(let t=0;t{i=!0;let e=t.source.value;e.startsWith("./")&&(e=e.slice(2));const n=function(t){for(let e=0;e{n.push(t.id.name),a.push(t)}}),r+=`var ${e};\n(function (namespace) {\n`,a.forEach(t=>{r+=Object(E.generate)(t),r+="\n"}),n.forEach(t=>{r+="namespace."+t+" = "+t,r+="\n"}),r+=`})(${e} || (" + namespace + " = {}));\n`}else{const e=[];t.specifiers.forEach(t=>{e.push(t.local.name)});const n=[];Object(x.b)(o,{FunctionDeclaration:t=>{e.includes(t.id.name)&&n.push(t)}}),n.forEach(t=>{r+=Object(E.generate)(t),r+="\n"})}}}),!i)return{code:t,lineOffset:0};let o=0;if("Program"!==n.type||null==n.body)throw new Error("Code could not be properly parsed");for(let t=n.body.length-1;t>=0;--t)"ImportDeclaration"===n.body[t].type&&(n.body.splice(t,1),++o);const s=(r.match(/\n/g)||[]).length-o;t=Object(E.generate)(n);return{code:t=r+t,lineOffset:s}}(e,t);n=a.code,i=a.lineOffset}catch(e){return Object(v.a)("Error processing Imports in "+t.name+":
"+e),t.env.stopFlag=!0,t.running=!1,Object(a.a)(t),Promise.resolve(t)}const o=function(e,n){const i=Object(u.a)(t);for(const o of Object.keys(i)){const s=i[o];if("function"==typeof s)if(["hack","grow","weaken","sleep","prompt","manualHack","scp","write","share","wget"].includes(o)){const i=function(...n){const i=[];for(let t=0;t`;return s+="
",s+=o,Object(v.a)(s),t.env.stopFlag=!0,t.running=!1,Object(a.a)(t),Promise.resolve(t)}}))};e.setProperty(n,o,e.createAsyncFunction(i))}else if("sprintf"===o||"vsprintf"===o||"scp"===o||"write"==o||"tryWrite"===o||"run"===o||"exec"===o){const t=function(...t){const n=[];for(let a=0;a"+e),t.env.stopFlag=!0,t.running=!1,Object(a.a)(t),Promise.resolve(t)}return new Promise((function(e,n){try{!function a(){try{if(t.env.stopFlag)return n(t);let r=!0,i=0;for(;i<3&&r;)r=r&&s.step(),i++;r?setTimeout(a,b.a.CodeInstructionRunTime):e(t)}catch(e){return e=e.toString(),Object(f.a)(e)||(e=Object(f.b)(t,e)),t.errorMessage=e,n(t)}}()}catch(e){return Object(w.a)(e)?(t.errorMessage=e,n(t)):e instanceof r.a?n(e):n(t)}}))}function N(t,e,n,a){return P(t,e,n,a)?(n.runScript(e),e.pid):0}function P(t,e,n,l){let c=1;e.threads&&!isNaN(e.threads)?c=e.threads:e.threads=1;const h=Object(p.a)(e),d=Object(_.a)(h*c);if(d>n.maxRam-n.ramUsed)return Object(v.a)(`Not enough RAM to run script ${e.filename} with args `+Object(k.a)(e.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.)"),!1;n.updateRamUsed(Object(_.a)(n.ramUsed+d),O.a);const g=Object(s.a)();if(-1===g)throw new Error("Failed to start script because could not find available PID. This is most because you have too many scripts running.");const y=new r.a(e,g,u.a);y.ramUsage=h,i.a.set(g,y),o.a.emit();let b=null;if(y.name.endsWith(".js")||y.name.endsWith(".ns"))b=function(t,e){e.running=!0;let n=null;function a(t,a){return function(...r){if(e.env.stopFlag)throw e;if("asleep"===t)return a(...r);if(n)throw e.errorMessage=Object(f.b)(e,Object(S.sprintf)("Concurrent calls to Netscript functions are not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",n,t)),e;let i;n=t;try{i=a(...r)}catch(t){throw n=null,t}return i&&void 0!==i.finally?i.finally((function(){n=null})):(n=null,i)}}for(const t of Object.keys(e.env.vars))"function"==typeof e.env.vars[t]&&(e.env.vars[t]=a(t,e.env.vars[t]));return e.env.vars.stanek.charge=a("stanek.charge",e.env.vars.stanek.charge),new Promise((n,a)=>{Object(m.b)(t,e.getServer().scripts,e).then(()=>{n(e)}).catch(t=>a(t))}).catch(t=>{if(t instanceof Error)throw t instanceof SyntaxError?e.errorMessage=Object(f.b)(e,t.message+" (sorry we can't be more helpful)"):e.errorMessage=Object(f.b)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(f.a)(t))throw e.errorMessage=t,e;if(t instanceof r.a)throw t;throw e.errorMessage=Object(f.b)(e,t),e})}(t,y);else if(b=R(y),!(b instanceof Promise))return!1;return b.then((function(t){t.running=!1,t.env.stopFlag=!0,void 0!==l&&l.running&&(l.scriptRef.onlineExpGained+=e.onlineExpGained,l.scriptRef.onlineMoneyMade+=e.onlineMoneyMade),Object(a.a)(y),t.log("",()=>"Script finished running")})).catch((function(t){if(t instanceof Error)return Object(v.a)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+t.toString());if(t instanceof r.a){if(!Object(f.a)(t.errorMessage))return void t.log("",()=>"Script killed");{const e=t.errorMessage.split("|DELIMITER|");if(4!=e.length)return console.error("ERROR: Something wrong with Error text in evaluator..."),void console.error("Error text: "+t.errorMessage);const n=e[1],a=e[2],r=e[3];let i=`RUNTIME ERROR
${a}@${n}
`;t.args.length>0&&(i+=`Args: ${Object(k.a)(t.args)}
`),i+="
",i+=r,Object(v.a)(i),t.log("",()=>"Script crashed with runtime error")}}else{if(Object(f.a)(t))return Object(v.a)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+t.toString());Object(v.a)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.error(t)}Object(a.a)(y)})),!0}function I(t=1){const e=t*l.a._idleSpeed/1e3;for(const t of i.a.values())t.scriptRef.onlineRunningTime+=e}function F(t){const e=-1!==window.location.href.toLowerCase().indexOf("?noscripts");e&&(M.a.warn("Skipped loading player scripts during startup"),console.info("Skipping the load of any scripts during startup"));for(const n of Object(y.c)()){n.ramUsed=0;for(let t=0;t`Invalid arguments: scriptname='${a} args='${i}'`),console.error("runScriptFromScript() failed due to invalid arguments"),0;i.forEach((t,e)=>{if("string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)throw new Error(`Only strings, numbers, and booleans can be passed as arguments to other scripts.\n${a} argument index ${e} is of type ${typeof t} and value ${JSON.stringify(t)}`)});if(null!=n.getRunningScript(a,i))return o.log(e,()=>`'${a}' is already running on '${n.hostname}'`),0;for(let t=0;t"Cannot execute a script with null/undefined as an argument"),0;for(let r=0;r`You do not have root access on '${n.hostname}'`),0;if(c>f)return o.log(e,()=>`Cannot run script '${a}' (t=${s}) on '${n.hostname}' because there is not enough available RAM!`),0;o.log(e,()=>`'${a}' on '${n.hostname}' with ${s} threads and args: ${Object(k.a)(i)}.`);const u=new d.a(l,i);return u.threads=s,u.server=n.hostname,N(t,u,n,o)}return o.log(e,()=>`Could not find script '${a}' on '${n.hostname}'`),0}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(25);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class i{constructor(t={}){r(this,"name","InitName"),r(this,"qty",0),r(this,"qlt",0),r(this,"dmd",0),r(this,"dmdR",[0,0]),r(this,"cmp",0),r(this,"cmpR",[0,0]),r(this,"mv",0),r(this,"mku",0),r(this,"buy",0),r(this,"sll",0),r(this,"prd",0),r(this,"imp",0),r(this,"exp",[]),r(this,"totalExp",0),r(this,"bCost",0),r(this,"sCost",0),r(this,"prdman",[!1,0]),r(this,"sllman",[!1,0]),r(this,"marketTa1",!1),r(this,"marketTa2",!1),r(this,"marketTa2Price",0),r(this,"maxsll",0),t.name&&(this.name=t.name),this.init()}getMarkupLimit(){return this.qlt/this.mku}init(){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1500,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,99],this.cmp=80,this.cmpR=[65,95],this.bCost=2e3,this.mv=.2,this.mku=6;break;case"Food":this.dmd=80,this.dmdR=[70,90],this.cmp=60,this.cmpR=[35,85],this.bCost=5e3,this.mv=1,this.mku=3;break;case"Plants":this.dmd=70,this.dmdR=[20,90],this.cmp=50,this.cmpR=[30,70],this.bCost=3e3,this.mv=.6,this.mku=3.75;break;case"Metal":this.dmd=80,this.dmdR=[75,85],this.cmp=70,this.cmpR=[60,80],this.bCost=2650,this.mv=1,this.mku=6;break;case"Hardware":this.dmd=85,this.dmdR=[80,90],this.cmp=80,this.cmpR=[65,95],this.bCost=8e3,this.mv=.5,this.mku=1;break;case"Chemicals":this.dmd=55,this.dmdR=[40,70],this.cmp=60,this.cmpR=[40,80],this.bCost=9e3,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,99],this.cmp=50,this.cmpR=[25,75],this.bCost=8e4,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,99],this.bCost=4e4,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,9],this.cmp=90,this.cmpR=[80,9],this.bCost=75e3,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,99],this.cmp=90,this.cmpR=[80,9],this.bCost=15e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":case"InitName":break;default:console.error("Invalid material type in init(): "+this.name)}}processMarket(){const t=1+Math.random()*this.mv/300,e=1+Math.random()*this.mv/100;Math.random()<.5?(this.cmp*=e,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1/t):(this.cmp*=1/e,this.cmpthis.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=t):(this.dmd*=1/n,this.dmd=r.a.MaxLevel)return 1/0;const i=r.a.UpgradeLevelMult;let o=0,s=t;for(let t=0;t=r.a.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(t)),s=t;for(let t=0;t=r.a.MaxCores)return 1/0;const i=r.a.CoreBaseCost,o=r.a.UpgradeCoreMult;let s=0,l=t;for(let t=0;t1e10;return e&&Object(r.a)(a.createElement(a.Fragment,null,"Alright cheater get out of here. You're not allowed here anymore.")),e}class s extends a.Component{win(t,e){t.gainMoney(e,"casino")}reachedLimit(t){const e=t.getCasinoWinnings()>1e10;return e&&Object(r.a)(a.createElement(a.Fragment,null,"Alright cheater get out of here. You're not allowed here anymore.")),e}}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const a=!1,r=!0,i={O:[[r,r],[r,r]],I:[[r,r,r,r]],L:[[a,a,r],[r,r,r]],J:[[r,a,a],[r,r,r]],S:[[a,r,r],[r,r,a]],Z:[[r,r,a],[a,r,r]],T:[[r,r,r],[a,r,a]]}},,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(0),r=n.n(a);function i(t){return Object(a.useEffect)(()=>{function e(e){if(!e.isTrusted)return;t.onKeyDown.bind(this)(e)}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),r.a.createElement(r.a.Fragment,null)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(1456),r=n(0),i=n.n(r),o=n(1757),s=n(60);const l=Object(o.a)(t=>({root:{backgroundColor:t.palette.background.paper},bar:{transition:"none",backgroundColor:t.palette.primary.main}}))(a.a);function c(t){const[e,n]=Object(r.useState)(100);return Object(r.useEffect)(()=>{const e=setInterval(()=>{n(e=>(e<=0&&t.onExpire(),e-200/t.millis*100))},200);return()=>{clearInterval(e)}},[]),i.a.createElement(s.a,{item:!0,xs:12},i.a.createElement(l,{variant:"determinate",value:e,color:"primary"}))}},function(t,e,n){"use strict";function a(t,e,n){function a(t,e,a){function r(t,e,n){return(1-n)*t+n*e}for(const i of Object.keys(t))n[i]=r(t[i],e[i],a);return t}return e<0?a(t.Trivial,t.Trivial,0):e>=0&&e<1?a(t.Trivial,t.Normal,e):e>=1&&e<2?a(t.Normal,t.Hard,e-1):e>=2&&e<3?a(t.Hard,t.Impossible,e-2):a(t.Impossible,t.Impossible,0)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(426),r=n(149),i=n(752),o=n(17),s=n(1038);const l={};function c(t){if(!t.name)throw new Error("Invalid constructor parameters for Location. No 'name' property");return l[t.name]instanceof i.a&&console.warn(`Property with name ${t.name} already exists and is being overwritten`),l[t.name]=new i.a(t),l[t.name]}r.a[o.a.Aevum]=new a.a(o.a.Aevum),r.a[o.a.Chongqing]=new a.a(o.a.Chongqing),r.a[o.a.Ishima]=new a.a(o.a.Ishima),r.a[o.a.NewTokyo]=new a.a(o.a.NewTokyo),r.a[o.a.Sector12]=new a.a(o.a.Sector12),r.a[o.a.Volhaven]=new a.a(o.a.Volhaven),r.a[o.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 ",r.a[o.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------G-- \n / 39 | 41 [church] \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 ",r.a[o.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 [glitch] \n \\ / [nova medical] / 4/30 \\ \n 49 x A \\ H \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 ",r.a[o.a.NewTokyo].asciiArt="\n \n \n o \n \\ \n [arcade] E [defcomm] \n \\ \n o--x---A--x--o [travel agency] \n 7 8 10 H \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--F--x-----x-----x---+---x----x--I--x-o \n | \n | \n o 17 \n \n \n \n G [the slums] \n ",r.a[o.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] ",r.a[o.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 ";for(const t of s.a){const e=c(t),n=e.city;if(null===n)for(const t of Object.keys(r.a))r.a[t].addLocation(e.name);else r.a[n].addLocation(e.name)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"b",(function(){return f}));var a=n(0),r=n.n(a),i=n(6),o=n(5),s=n(17);class l{constructor(t,e,n,a="",i=r.a.createElement(r.a.Fragment,null)){this.number=t,this.difficulty=e,this.name=n,this.desc=a,this.info=i}}const c={};function f(t){null==t.bitNodeN&&(t.bitNodeN=1);for(const t of Object.keys(i.a))i.a.hasOwnProperty(t)&&(i.a[t]=1);switch(i.a.StaneksGiftExtraSize=0,t.bitNodeN){case 1:break;case 2:i.a.HackingLevelMultiplier=.8,i.a.ServerGrowthRate=.8,i.a.ServerMaxMoney=.2,i.a.ServerStartingMoney=.4,i.a.CrimeMoney=3,i.a.InfiltrationMoney=3,i.a.FactionWorkRepGain=.5,i.a.FactionPassiveRepGain=0,i.a.StaneksGiftPowerMultiplier=2,i.a.StaneksGiftExtraSize=-6,i.a.PurchasedServerSoftcap=1.3,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=5;break;case 3:i.a.HackingLevelMultiplier=.8,i.a.RepToDonateToFaction=.5,i.a.AugmentationRepCost=3,i.a.AugmentationMoneyCost=3,i.a.ServerMaxMoney=.2,i.a.ServerStartingMoney=.2,i.a.ServerGrowthRate=.2,i.a.ScriptHackMoney=.2,i.a.CompanyWorkMoney=.25,i.a.CrimeMoney=.25,i.a.HacknetNodeMoney=.25,i.a.HomeComputerRamCost=1.5,i.a.PurchasedServerCost=2,i.a.StaneksGiftPowerMultiplier=.75,i.a.StaneksGiftExtraSize=-2,i.a.PurchasedServerSoftcap=1.3,i.a.GangSoftcap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.5;break;case 4:i.a.ServerMaxMoney=.15,i.a.ServerStartingMoney=.75,i.a.ScriptHackMoney=.2,i.a.CompanyWorkMoney=.1,i.a.CrimeMoney=.2,i.a.HacknetNodeMoney=.05,i.a.CompanyWorkExpGain=.5,i.a.ClassGymExpGain=.5,i.a.FactionWorkExpGain=.5,i.a.HackExpGain=.4,i.a.CrimeExpGain=.5,i.a.FactionWorkRepGain=.75,i.a.StaneksGiftPowerMultiplier=1.5,i.a.StaneksGiftExtraSize=0,i.a.PurchasedServerSoftcap=1.2,i.a.WorldDaemonDifficulty=3,i.a.GangUniqueAugs=.5;break;case 5:i.a.ServerMaxMoney=2,i.a.ServerStartingSecurity=2,i.a.ServerStartingMoney=.5,i.a.ScriptHackMoney=.15,i.a.HacknetNodeMoney=.2,i.a.CrimeMoney=.5,i.a.InfiltrationRep=1.5,i.a.InfiltrationMoney=1.5,i.a.AugmentationMoneyCost=2,i.a.HackExpGain=.5,i.a.CorporationValuation=.5,i.a.StaneksGiftPowerMultiplier=1.3,i.a.StaneksGiftExtraSize=0,i.a.PurchasedServerSoftcap=1.2,i.a.WorldDaemonDifficulty=1.5,i.a.GangUniqueAugs=.5;break;case 6:i.a.HackingLevelMultiplier=.35,i.a.ServerMaxMoney=.4,i.a.ServerStartingMoney=.5,i.a.ServerStartingSecurity=1.5,i.a.ScriptHackMoney=.75,i.a.CompanyWorkMoney=.5,i.a.CrimeMoney=.75,i.a.InfiltrationMoney=.75,i.a.CorporationValuation=.2,i.a.HacknetNodeMoney=.2,i.a.HackExpGain=.25,i.a.DaedalusAugsRequirement=1.166,i.a.PurchasedServerSoftcap=2,i.a.StaneksGiftPowerMultiplier=.5,i.a.StaneksGiftExtraSize=2,i.a.GangSoftcap=.7,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.2;break;case 7:i.a.BladeburnerRank=.6,i.a.BladeburnerSkillCost=2,i.a.AugmentationMoneyCost=3,i.a.HackingLevelMultiplier=.35,i.a.ServerMaxMoney=.4,i.a.ServerStartingMoney=.5,i.a.ServerStartingSecurity=1.5,i.a.ScriptHackMoney=.5,i.a.CompanyWorkMoney=.5,i.a.CrimeMoney=.75,i.a.InfiltrationMoney=.75,i.a.CorporationValuation=.2,i.a.HacknetNodeMoney=.2,i.a.HackExpGain=.25,i.a.FourSigmaMarketDataCost=2,i.a.FourSigmaMarketDataApiCost=2,i.a.DaedalusAugsRequirement=1.166,i.a.PurchasedServerSoftcap=2,i.a.StaneksGiftPowerMultiplier=.9,i.a.StaneksGiftExtraSize=-1,i.a.GangSoftcap=.7,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.2;break;case 8:i.a.ScriptHackMoney=.3,i.a.ScriptHackMoneyGain=0,i.a.ManualHackMoney=0,i.a.CompanyWorkMoney=0,i.a.CrimeMoney=0,i.a.HacknetNodeMoney=0,i.a.InfiltrationMoney=0,i.a.RepToDonateToFaction=0,i.a.CorporationValuation=0,i.a.CodingContractMoney=0,i.a.StaneksGiftExtraSize=-7,i.a.PurchasedServerSoftcap=4,i.a.GangSoftcap=0,i.a.CorporationSoftCap=0,i.a.GangUniqueAugs=0;break;case 9:i.a.HackingLevelMultiplier=.5,i.a.StrengthLevelMultiplier=.45,i.a.DefenseLevelMultiplier=.45,i.a.DexterityLevelMultiplier=.45,i.a.AgilityLevelMultiplier=.45,i.a.CharismaLevelMultiplier=.45,i.a.PurchasedServerLimit=0,i.a.HomeComputerRamCost=5,i.a.CrimeMoney=.5,i.a.ScriptHackMoney=.1,i.a.HackExpGain=.05,i.a.ServerStartingMoney=.1,i.a.ServerMaxMoney=.1,i.a.ServerStartingSecurity=2.5,i.a.CorporationValuation=.5,i.a.FourSigmaMarketDataCost=5,i.a.FourSigmaMarketDataApiCost=4,i.a.BladeburnerRank=.9,i.a.BladeburnerSkillCost=1.2,i.a.StaneksGiftPowerMultiplier=.5,i.a.StaneksGiftExtraSize=2,i.a.GangSoftcap=.8,i.a.CorporationSoftCap=.7,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.25;break;case 10:i.a.HackingLevelMultiplier=.35,i.a.StrengthLevelMultiplier=.4,i.a.DefenseLevelMultiplier=.4,i.a.DexterityLevelMultiplier=.4,i.a.AgilityLevelMultiplier=.4,i.a.CharismaLevelMultiplier=.4,i.a.CompanyWorkMoney=.5,i.a.CrimeMoney=.5,i.a.HacknetNodeMoney=.5,i.a.ManualHackMoney=.5,i.a.ScriptHackMoney=.5,i.a.CodingContractMoney=.5,i.a.InfiltrationMoney=.5,i.a.CorporationValuation=.5,i.a.AugmentationMoneyCost=5,i.a.AugmentationRepCost=2,i.a.HomeComputerRamCost=1.5,i.a.PurchasedServerCost=5,i.a.PurchasedServerLimit=.6,i.a.PurchasedServerMaxRam=.5,i.a.BladeburnerRank=.8,i.a.StaneksGiftPowerMultiplier=.75,i.a.StaneksGiftExtraSize=-3,i.a.PurchasedServerSoftcap=1.1,i.a.GangSoftcap=.9,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.25;break;case 11:i.a.HackingLevelMultiplier=.6,i.a.HackExpGain=.5,i.a.ServerMaxMoney=.1,i.a.ServerStartingMoney=.1,i.a.ServerGrowthRate=.2,i.a.ServerWeakenRate=2,i.a.CrimeMoney=3,i.a.CompanyWorkMoney=.5,i.a.HacknetNodeMoney=.1,i.a.AugmentationMoneyCost=2,i.a.InfiltrationMoney=2.5,i.a.InfiltrationRep=2.5,i.a.CorporationValuation=.1,i.a.CodingContractMoney=.25,i.a.FourSigmaMarketDataCost=4,i.a.FourSigmaMarketDataApiCost=4,i.a.PurchasedServerSoftcap=2,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=1.5,i.a.GangUniqueAugs=.75;break;case 12:{let e=0;for(let n=0;nu())return 1/0;const n=Math.max(0,Math.log(e)/Math.log(2)-6);return e*o.a.BaseCostFor1GBOfRamServer*i.a.PurchasedServerCost*Math.pow(i.a.PurchasedServerSoftcap,n)}function f(){return Math.round(o.a.PurchasedServerLimit*i.a.PurchasedServerLimit)}function u(){const t=Math.round(o.a.PurchasedServerMaxRam*i.a.PurchasedServerMaxRam);return 1<<31-Math.clz32(t)}function m(t,e,n,i){if(!i.canAfford(n))return void Object(s.a)("You don't have enough money to purchase this server!");if(i.purchasedServers.length>=f())return void Object(s.a)("You have reached the maximum limit of "+f()+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");if(""==t)return void Object(s.a)("You must enter a hostname for your new server!");const o=Object(r.f)({adminRights:!0,hostname:t,ip:Object(a.e)(),isConnectedTo:!1,maxRam:e,organizationName:"",purchasedByPlayer:!0});Object(a.a)(o),i.purchasedServers.push(o.hostname);const l=i.getHomeComputer();l.serversOnNetwork.push(o.hostname),o.serversOnNetwork.push(l.hostname),i.loseMoney(n,"servers"),Object(s.a)("Server successfully purchased with hostname "+o.hostname)}function h(t){const e=t.getUpgradeHomeRamCost();if(!t.canAfford(e))return void Object(s.a)("You do not have enough money to purchase additional RAM for your home computer");const n=t.getHomeComputer();n.maxRam>=o.a.HomeComputerMaxRam?Object(s.a)("You cannot upgrade your home computer RAM because it is at its maximum possible value"):(n.maxRam*=2,t.loseMoney(e,"servers"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return l}));var a=n(16),r=n(25),i=n(83);class o{get filename(){return this.fn}set filename(t){this.fn=t}constructor(t="",e=""){this.fn=(t.endsWith(".txt")?t:t+".txt").replace(/\s+/g,""),this.text=e}append(t){this.text+=t}download(){const t=this.fn,e=new Blob([this.text],{type:"text/plain"}),n=window.navigator;if(n.msSaveOrOpenBlob)n.msSaveOrOpenBlob(e,t);else{const t=document.createElement("a"),n=URL.createObjectURL(e);t.href=n,t.download=this.fn,document.body.appendChild(t),t.click(),setTimeout(()=>{document.body.removeChild(t),window.URL.revokeObjectURL(n)},0)}}read(){return this.text}show(){Object(a.a)(`${this.fn}

${this.text}`)}toJSON(){return Object(r.b)("TextFile",this)}write(t){this.text=t}static fromJSON(t){return Object(r.a)(o,t.data)}}function s(t,e){let n=t.endsWith(".txt")?t:t+".txt";Object(i.h)(n)&&(n=Object(i.k)(n));for(const t of e.textFiles)if(t.fn===n)return t;return null}function l(t,e,n){if(null!==s(t,n))return void console.error(`A file named "${t}" already exists on server ${n.hostname}.`);const a=new o(t,e);return n.textFiles.push(a),a}r.c.constructors.TextFile=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(247),r=n(134);const i={};i[r.a.BladesIntuition]=new a.a({name:r.a.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),i[r.a.Cloak]=new a.a({name:r.a.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),i[r.a.ShortCircuit]=new a.a({name:r.a.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),i[r.a.DigitalObserver]=new a.a({name:r.a.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),i[r.a.Tracer]=new a.a({name:r.a.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),i[r.a.Overclock]=new a.a({name:r.a.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),i[r.a.Reaper]=new a.a({name:r.a.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),i[r.a.EvasiveSystem]=new a.a({name:r.a.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),i[r.a.Datamancer]=new a.a({name:r.a.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),i[r.a.CybersEdge]=new a.a({name:r.a.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),i[r.a.HandsOfMidas]=new a.a({name:r.a.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),i[r.a.Hyperdrive]=new a.a({name:r.a.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10})},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(178),r=n(1008);const i={};a.b.forEach(t=>{i[t.name]=new r.a(t.name,t.cost,t.upgType,t.mults)})},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return c}));var a=n(148),r=n(76),i=n(8);function o(t,e,n){if(isNaN(e)||e<=0||!(t instanceof a.a))return null;e=Math.min(e,t.maxShares);return n===r.a.Long?e*t.getAskPrice()+i.a.StockMarketCommission:e*t.getBidPrice()+i.a.StockMarketCommission}function s(t,e,n){if(isNaN(e)||e<=0||!(t instanceof a.a))return null;e=Math.min(e,t.maxShares);if(n===r.a.Long)return e*t.getBidPrice()-i.a.StockMarketCommission;return e*t.playerAvgShortPx+((t.playerAvgShortPx-t.getAskPrice())*e-i.a.StockMarketCommission)}function l(t,e){if(isNaN(e)||e<=0||!(t instanceof a.a))return;e=Math.min(e,t.maxShares);const n=t.shareTxUntilMovement;if(e<=n)return t.shareTxUntilMovement-=e,void(t.shareTxUntilMovement<=0&&(t.shareTxUntilMovement=t.shareTxForMovement,t.influenceForecast(.006),t.influenceForecastForecast(t.mv/100*.006)));const r=e-n;let i=1+Math.ceil(r/t.shareTxForMovement);t.shareTxUntilMovement=t.shareTxForMovement-(e-t.shareTxUntilMovement)%t.shareTxForMovement,(t.shareTxUntilMovement===t.shareTxForMovement||t.shareTxUntilMovement<=0)&&(++i,t.shareTxUntilMovement=t.shareTxForMovement);const o=.006*(i-1),s=o*(t.mv/100);t.influenceForecast(o),t.influenceForecastForecast(s)}function c(t,e,n){if(!(t instanceof a.a))return 0;const o=e===r.a.Long,s=n-i.a.StockMarketCommission,l=o?t.getAskPrice():t.getBidPrice();return Math.floor(s/l)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return l}));var a=n(6),r=n(8);function i(){return r.a.MarketData4SCost*a.a.FourSigmaMarketDataCost}function o(){return r.a.MarketDataTixApi4SCost*a.a.FourSigmaMarketDataApiCost}function s(){return r.a.WSEAccountCost}function l(){return r.a.TIXAPICost}},,,,,,function(t,e,n){"use strict";n.d(e,"c",(function(){return f})),n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return m}));var a=n(8),r=n(2),i=n(47),o=n(132),s=n(26),l=n(4),c=n(317);function f(t){const e=((new Date).getTime()-r.a.lastUpdate)/1e3;let n=t.onlineRunningTime/14400;n>=1&&(n=1);for(const n of Object.keys(t.dataMap))if(t.dataMap.hasOwnProperty(n)){if(0==t.dataMap[n][2]||null==t.dataMap[n][2])continue;const a=Object(s.d)(n);if(null==a)continue;const c=Math.round(.5*t.dataMap[n][2]/t.onlineRunningTime*e);t.log(`Called on ${a.hostname} ${c} times while offline`);const f=Object(s.d)(t.server);if(null===f)throw new Error("getServer of null key?");if(!(a instanceof i.a))throw new Error("trying to grow a non-normal server");const u=Object(o.e)(a,c,r.a,f.cpuCores);t.log(`'${a.hostname}' grown by ${l.a.format(100*u-100,"0.000000%")} while offline`)}const c=n*(t.onlineExpGained/t.onlineRunningTime)*e;r.a.gainHackingExp(c),t.offlineRunningTime+=e,t.offlineExpGained+=c;for(const n of Object.keys(t.dataMap))if(t.dataMap.hasOwnProperty(n)){if(0==t.dataMap[n][3]||null==t.dataMap[n][3])continue;const r=Object(s.d)(n);if(null==r)continue;if(!(r instanceof i.a))throw new Error("trying to weaken a non-normal server");const o=Object(s.d)(t.server);if(null===o)throw new Error("getServer of null key?");const l=Math.round(.5*t.dataMap[n][3]/t.onlineRunningTime*e);t.log(`Called weaken() on ${r.hostname} ${l} times while offline`);const c=1+(o.cpuCores-1)/16;r.weaken(a.a.ServerWeakenAmount*l*c)}}function u(t,e,n){for(let a=0;aObject(o.a)({money:{color:t.colors.money}}));function l({hashes:t}){const e=s();return a.createElement("span",{className:e.money},"number"==typeof t?r.a.formatHashes(t):t)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return D}));var a=n(25),r=n(259),i=n(42),o=n(527),s=n(269),l=n(136),c=n(347),f=n(641),u=n(257),m=n(24),h=n(224),d=n(247),p=n(423),g=n(27),y=n(642),b=n(266),E=n(36),v=n(61),k=n(4),_=n(6),w=n(301),S=n(204),C=n(29),x=n(399),L=n(16),O=n(9),M=n(57),T=n(15),A=n(1002),R=n(105),N=n(5),P=n(59),I=n(28);function F(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class D{constructor(t){F(this,"numHosp",0),F(this,"moneyLost",0),F(this,"rank",0),F(this,"maxRank",0),F(this,"skillPoints",0),F(this,"totalSkillPoints",0),F(this,"teamSize",0),F(this,"teamLost",0),F(this,"hpLost",0),F(this,"storedCycles",0),F(this,"randomEventCounter",Object(E.a)(240,600)),F(this,"actionTimeToComplete",0),F(this,"actionTimeCurrent",0),F(this,"actionTimeOverflow",0),F(this,"action",new r.a({type:i.a.Idle})),F(this,"cities",{}),F(this,"city",v.a.CityNames[2]),F(this,"skills",{}),F(this,"skillMultipliers",{}),F(this,"staminaBonus",0),F(this,"maxStamina",0),F(this,"stamina",0),F(this,"contracts",{}),F(this,"operations",{}),F(this,"blackops",{}),F(this,"logging",{general:!0,contracts:!0,ops:!0,blackops:!0,events:!0}),F(this,"automateEnabled",!1),F(this,"automateActionHigh",new r.a({type:i.a.Idle})),F(this,"automateThreshHigh",0),F(this,"automateActionLow",new r.a({type:i.a.Idle})),F(this,"automateThreshLow",0),F(this,"consoleHistory",[]),F(this,"consoleLogs",["Bladeburner Console","Type 'help' to see console commands"]);for(let t=0;tthis.rank)return{error:"Tried to start a Black Operation without the rank requirement"};const n=[];for(const t of Object.keys(s.a))s.a.hasOwnProperty(t)&&n.push(t);n.sort((function(t,e){return s.a[t].reqdRank-s.a[e].reqdRank}));const a=n.indexOf(t.name);return-1===a?{error:`Invalid Black Op: '${name}'`}:a>0&&null==this.blackops[n[a-1]]?{error:`Preceding Black Op must be completed before starting '${t.name}'.`}:{isAvailable:!0,action:e}}startAction(t,e){if(null!=e)switch(this.action=e,this.actionTimeCurrent=0,e.type){case i.a.Idle:this.actionTimeToComplete=0;break;case i.a.Contract:try{const t=this.getActionObject(e);if(null==t)throw new Error("Failed to get Contract Object for: "+e.name);if(t.count<1)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(t){Object(b.a)(t)}break;case i.a.Operation:try{const t=this.getActionObject(e);if(null==t)throw new Error("Failed to get Operation Object for: "+e.name);if(t.count<1)return this.resetAction();if("Raid"===e.name&&0===this.getCurrentCity().comms)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(t){Object(b.a)(t)}break;case i.a.BlackOp:case i.a.BlackOperation:try{const t=this.canAttemptBlackOp(e);if(!t.isAvailable){this.resetAction(),this.log("Error: "+t.error);break}if(void 0===t.action)throw new Error("action should not be null");this.actionTimeToComplete=t.action.getActionTime(this)}catch(t){Object(b.a)(t)}break;case i.a.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime(t);break;case i.a.Training:case i.a.FieldAnalysis:case i.a["Field Analysis"]:this.actionTimeToComplete=30;break;case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:this.actionTimeToComplete=60;break;default:throw new Error("Invalid Action Type in startAction(Bladeburner,player, ): "+e.type)}}upgradeSkill(t){const e=t.name;if(this.skills[e]?++this.skills[e]:this.skills[e]=1,isNaN(this.skills[e])||this.skills[e]<0)throw new Error("Level of Skill "+e+" is invalid: "+this.skills[e]);this.updateSkillMultipliers()}executeConsoleCommands(t,e){try{this.consoleHistory[this.consoleHistory.length-1]!=e&&(this.consoleHistory.push(e),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1));const n=e.split(";");for(let e=0;e100&&this.consoleLogs.shift())}log(t){this.postToConsole(`[${Object(A.a)()}] ${t}`)}resetAction(){this.action=new r.a({type:i.a.Idle})}clearConsole(){this.consoleLogs.length=0}prestige(){this.resetAction();const t=C.a[N.a.Bladeburners];this.rank>=v.a.RankNeededForFaction&&Object(R.e)(t)}storeCycles(t=0){this.storedCycles+=t}getActionIdFromTypeAndName(t="",e=""){if(""===t||""===e)return null;const n=new r.a,a=t.toLowerCase().trim(),o=e.toLowerCase().trim();switch(a){case"contract":case"contracts":case"contr":return n.type=i.a.Contract,this.contracts.hasOwnProperty(e)?(n.name=e,n):null;case"operation":case"operations":case"op":case"ops":return n.type=i.a.Operation,this.operations.hasOwnProperty(e)?(n.name=e,n):null;case"blackoperation":case"black operation":case"black operations":case"black op":case"black ops":case"blackop":case"blackops":return n.type=i.a.BlackOp,s.a.hasOwnProperty(e)?(n.name=e,n):null;case"general":case"general action":case"gen":break;default:return null}if(a.startsWith("gen")){switch(o){case"training":n.type=i.a.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=i.a.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=i.a["Field Analysis"],n.name="Field Analysis";break;case"diplomacy":n.type=i.a.Diplomacy,n.name="Diplomacy";break;case"hyperbolic regeneration chamber":n.type=i.a["Hyperbolic Regeneration Chamber"],n.name="Hyperbolic Regeneration Chamber";break;case"incite violence":n.type=i.a["Incite Violence"],n.name="Incite Violence";break;default:return null}return n}return null}executeStartConsoleCommand(t,e){if(3!==e.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");const n=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=u.a[n]?(this.action.type=i.a[n],this.action.name=n,this.startAction(t,this.action)):this.postToConsole("Invalid action name specified: "+e[2]);break;case"contract":case"contracts":null!=this.contracts[n]?(this.action.type=i.a.Contract,this.action.name=n,this.startAction(t,this.action)):this.postToConsole("Invalid contract name specified: "+e[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[n]?(this.action.type=i.a.Operation,this.action.name=n,this.startAction(t,this.action)):this.postToConsole("Invalid Operation name specified: "+e[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=s.a[n]?(this.action.type=i.a.BlackOperation,this.action.name=n,this.startAction(t,this.action)):this.postToConsole("Invalid BlackOp name specified: "+e[2]);break;default:this.postToConsole("Invalid action/event type specified: "+e[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}}executeSkillConsoleCommand(t){switch(t.length){case 1:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 2:if("list"===t[1].toLowerCase()){this.postToConsole("Skills: ");const t=Object.keys(h.a);for(let e=0;e=n.maxLvl?this.postToConsole(`This skill ${n.name} is already at max level (${t}/${n.maxLvl}).`):this.skillPoints>=a?(this.skillPoints-=a,this.upgradeSkill(n),this.log(n.name+" upgraded to Level "+this.skills[e])):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(m.d)(a,0))}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break}default:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info")}}executeLogConsoleCommand(t){if(t.length<3)return this.postToConsole("Invalid usage of log command: log [enable/disable] [action/event]"),void this.postToConsole("Use 'help log' for more details and examples");let e=!0;switch(t[1].toLowerCase().includes("d")&&(e=!1),t[2].toLowerCase()){case"general":case"gen":this.logging.general=e,this.log("Logging "+(e?"enabled":"disabled")+" for general actions");break;case"contract":case"contracts":this.logging.contracts=e,this.log("Logging "+(e?"enabled":"disabled")+" for Contracts");break;case"ops":case"op":case"operations":case"operation":this.logging.ops=e,this.log("Logging "+(e?"enabled":"disabled")+" for Operations");break;case"blackops":case"blackop":case"black operations":case"black operation":this.logging.blackops=e,this.log("Logging "+(e?"enabled":"disabled")+" for BlackOps");break;case"event":case"events":this.logging.events=e,this.log("Logging "+(e?"enabled":"disabled")+" for events");break;case"all":this.logging.general=e,this.logging.contracts=e,this.logging.ops=e,this.logging.blackops=e,this.logging.events=e,this.log("Logging "+(e?"enabled":"disabled")+" for everything");break;default:this.postToConsole("Invalid action/event type specified: "+t[2]),this.postToConsole("Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]")}}executeHelpConsoleCommand(t){if(1===t.length)for(const t of y.a.helpList)this.postToConsole(t);else for(let e=1;e0&&(i*=Object(E.a)(2,4),--a.comms,++n.comms);const o=Math.round(a.pop*i);a.pop-=o,n.pop+=o}triggerPotentialMigration(t,e){(null==e||isNaN(e))&&console.error("Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),e>1&&(e/=100),Math.random()=1){let a;a=t?Math.ceil(n/2):Math.floor(n);const r=Object(E.a)(0,a);this.teamSize-=r,this.teamLost+=r,this.logging.ops&&r>0&&this.log("Lost "+Object(m.d)(r,0)+" team members during this "+e.name)}const a=this.getCurrentCity();switch(e.name){case"Investigation":t?a.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":t?a.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":t&&a.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),a.changeChaosByCount(.1);break;case"Raid":if(t)a.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--a.comms;else{const t=Object(E.a)(-10,-5)/10;a.changePopulationByPercentage(t,{nonZero:!0,changeEstEqually:!1})}a.changeChaosByPercentage(Object(E.a)(1,5));break;case"Stealth Retirement Operation":t&&a.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),a.changeChaosByPercentage(Object(E.a)(-3,-1));break;case"Assassination":t&&a.changePopulationByCount(-1,{estChange:-1,estOffset:0}),a.changeChaosByPercentage(Object(E.a)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}}getActionObject(t){switch(t.type){case i.a.Contract:return this.contracts[t.name];case i.a.Operation:return this.operations[t.name];case i.a.BlackOp:case i.a.BlackOperation:return s.a[t.name];case i.a.Training:return u.a.Training;case i.a["Field Analysis"]:return u.a["Field Analysis"];case i.a.Recruitment:return u.a.Recruitment;case i.a.Diplomacy:return u.a.Diplomacy;case i.a["Hyperbolic Regeneration Chamber"]:return u.a["Hyperbolic Regeneration Chamber"];case i.a["Incite Violence"]:return u.a["Incite Violence"];default:return null}}completeContract(t){if(this.action.type!==i.a.Contract)throw new Error("completeContract() called even though current action is not a Contract");const e=this.getCurrentCity();if(t)switch(this.action.name){case"Tracking":e.improvePopulationEstimateByCount(Object(E.a)(100,1e3));break;case"Bounty Hunter":e.changePopulationByCount(-1,{estChange:-1,estOffset:0}),e.changeChaosByCount(.02);break;case"Retirement":e.changePopulationByCount(-1,{estChange:-1,estOffset:0}),e.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}}completeAction(t,e){switch(this.action.type){case i.a.Contract:case i.a.Operation:try{const t=this.action.type===i.a.Operation,n=this.getActionObject(this.action);if(null==n)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);const a=n.getDifficulty(),r=Math.pow(a,v.a.DiffMultExponentialFactor)+a/v.a.DiffMultLinearFactor,o=Math.pow(n.rewardFac,n.level-1);if(this.stamina-=v.a.BaseStaminaLoss*r,this.stamina<0&&(this.stamina=0),n.attempt(this)){this.gainActionStats(e,n,!0),++n.successes,--n.count;let a=0;if(t||(a=v.a.ContractBaseMoneyGain*o*this.skillMultipliers.money,e.gainMoney(a,"bladeburner")),t?n.setMaxLevel(v.a.OperationSuccessesPerLevel):n.setMaxLevel(v.a.ContractSuccessesPerLevel),n.rankGain){const r=Object(w.a)(n.rankGain*o*_.a.BladeburnerRank,10);this.changeRank(e,r),t&&this.logging.ops?this.log(n.name+" successfully completed! Gained "+Object(m.d)(r,3)+" rank"):!t&&this.logging.contracts&&this.log(n.name+" contract successfully completed! Gained "+Object(m.d)(r,3)+" rank and "+k.a.formatMoney(a))}t?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(e,n,!1),++n.failures;let a=0,i=0;if(n.rankLoss&&(a=Object(w.a)(n.rankLoss*o,10),this.changeRank(e,-1*a)),n.hpLoss){i=n.hpLoss*r,i=Math.ceil(Object(w.a)(i,10)),this.hpLost+=i;const t=Object(x.a)(e,i);e.takeDamage(i)&&(++this.numHosp,this.moneyLost+=t)}let s="";a>0&&(s+="Lost "+Object(m.d)(a,3)+" rank. "),i>0&&(s+="Took "+Object(m.d)(i,0)+" damage."),t&&this.logging.ops?this.log(n.name+" failed! "+s):!t&&this.logging.contracts&&this.log(n.name+" contract failed! "+s),t?this.completeOperation(!1):this.completeContract(!1)}n.autoLevel&&(n.level=n.maxLevel),this.startAction(e,this.action)}catch(t){Object(b.a)(t)}break;case i.a.BlackOp:case i.a.BlackOperation:try{const n=this.getActionObject(this.action);if(null==n||!(n instanceof l.a))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);const a=n.getDifficulty(),r=Math.pow(a,v.a.DiffMultExponentialFactor)+a/v.a.DiffMultLinearFactor;this.stamina-=v.a.BaseStaminaLoss*r,this.stamina<0&&(this.stamina=0);const i=n.teamCount;let o;if(n.attempt(this)){this.gainActionStats(e,n,!0),n.count=0,this.blackops[n.name]=!0;let a=0;if(n.rankGain&&(a=Object(w.a)(n.rankGain*_.a.BladeburnerRank,10),this.changeRank(e,a)),o=Math.ceil(i/2),n.name===P.a.OperationDaedalus)return this.resetAction(),t.toBitVerse(!1,!1);this.logging.blackops&&this.log(n.name+" successful! Gained "+Object(m.d)(a,1)+" rank")}else{this.gainActionStats(e,n,!1);let t=0,a=0;if(n.rankLoss&&(t=Object(w.a)(n.rankLoss,10),this.changeRank(e,-1*t)),n.hpLoss){a=n.hpLoss*r,a=Math.ceil(Object(w.a)(a,10));const t=Object(x.a)(e,a);e.takeDamage(a)&&(++this.numHosp,this.moneyLost+=t)}o=Math.floor(i),this.logging.blackops&&this.log(n.name+" failed! Lost "+Object(m.d)(t,1)+" rank and took "+Object(m.d)(a,0)+" damage")}if(this.resetAction(),i>=1){const t=Object(E.a)(1,o);this.teamSize-=t,this.teamLost+=t,this.logging.blackops&&this.log("You lost "+Object(m.d)(t,0)+" team members during "+n.name)}}catch(t){Object(b.a)(t)}break;case i.a.Training:{this.stamina-=.5*v.a.BaseStaminaLoss;const t=30*e.strength_exp_mult,n=30*e.defense_exp_mult,a=30*e.dexterity_exp_mult,r=30*e.agility_exp_mult,i=.04*this.skillMultipliers.stamina;e.gainStrengthExp(t),e.gainDefenseExp(n),e.gainDexterityExp(a),e.gainAgilityExp(r),this.staminaBonus+=i,this.logging.general&&this.log("Training completed. Gained: "+Object(m.d)(t,1)+" str exp, "+Object(m.d)(n,1)+" def exp, "+Object(m.d)(a,1)+" dex exp, "+Object(m.d)(r,1)+" agi exp, "+Object(m.d)(i,3)+" max stamina"),this.startAction(e,this.action);break}case i.a.FieldAnalysis:case i.a["Field Analysis"]:{let t=.04*Math.pow(e.hacking,.3)+.04*Math.pow(e.intelligence,.9)+.02*Math.pow(e.charisma,.3);if(t*=e.bladeburner_analysis_mult,isNaN(t)||t<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");const n=20*e.hacking_exp_mult,a=20*e.charisma_exp_mult,r=.1*_.a.BladeburnerRank;e.gainHackingExp(n),e.gainIntelligenceExp(v.a.BaseIntGain),e.gainCharismaExp(a),this.changeRank(e,r),this.getCurrentCity().improvePopulationEstimateByPercentage(t*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log(`Field analysis completed. Gained ${Object(m.d)(r,2)} rank, `+Object(m.d)(n,1)+" hacking exp, and "+Object(m.d)(a,1)+" charisma exp"),this.startAction(e,this.action);break}case i.a.Recruitment:{const t=this.getRecruitmentSuccessChance(e);if(Math.random()=a){const t=Math.floor((this.maxRank-a)/v.a.RanksPerSkillPoint+1);this.skillPoints+=t,this.totalSkillPoints+=t}}processAction(t,e,n){if(this.action.type!==i.a.Idle){if(this.actionTimeToComplete<=0)throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);if(!(this.action instanceof r.a))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=n+this.actionTimeOverflow,this.actionTimeOverflow=0,this.actionTimeCurrent>=this.actionTimeToComplete?(this.actionTimeOverflow=this.actionTimeCurrent-this.actionTimeToComplete,this.completeAction(t,e)):void 0}}calculateStaminaGainPerSecond(t){const e=t.agility*this.skillMultipliers.effAgi,n=this.maxStamina/v.a.MaxStaminaToGainFactor;return(v.a.StaminaGainPerSecond+n)*Math.pow(e,.17)*(this.skillMultipliers.stamina*t.bladeburner_stamina_gain_mult)}calculateMaxStamina(t){const e=t.agility*this.skillMultipliers.effAgi,n=(Math.pow(e,.8)+this.staminaBonus)*this.skillMultipliers.stamina*t.bladeburner_max_stamina_mult;if(this.maxStamina!==n){const t=this.maxStamina;this.maxStamina=n,this.stamina=this.maxStamina*this.stamina/t}if(isNaN(n))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()")}create(){this.contracts.Tracking=new f.a({name:"Tracking",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(E.a)(25,150),weights:{hack:0,str:.05,def:.05,dex:.35,agi:.35,cha:.1,int:.05},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.9,int:1},isStealth:!0}),this.contracts["Bounty Hunter"]=new f.a({name:"Bounty Hunter",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(E.a)(5,150),weights:{hack:0,str:.15,def:.15,dex:.25,agi:.25,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.contracts.Retirement=new f.a({name:"Retirement",baseDifficulty:200,difficultyFac:1.03,rewardFac:1.065,rankGain:.6,hpLoss:1,count:Object(E.a)(5,150),weights:{hack:0,str:.2,def:.2,dex:.2,agi:.2,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.operations.Investigation=new c.a({name:"Investigation",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(E.a)(1,100),weights:{hack:.25,str:.05,def:.05,dex:.2,agi:.1,cha:.25,int:.1},decays:{hack:.85,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Undercover Operation"]=new c.a({name:"Undercover Operation",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(E.a)(1,100),weights:{hack:.2,str:.05,def:.05,dex:.2,agi:.2,cha:.2,int:.1},decays:{hack:.8,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Sting Operation"]=new c.a({name:"Sting Operation",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5.5,rankLoss:.5,hpLoss:2.5,count:Object(E.a)(1,150),weights:{hack:.25,str:.05,def:.05,dex:.25,agi:.1,cha:.2,int:.1},decays:{hack:.8,str:.85,def:.85,dex:.85,agi:.85,cha:.7,int:.9},isStealth:!0}),this.operations.Raid=new c.a({name:"Raid",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:55,rankLoss:2.5,hpLoss:50,count:Object(E.a)(1,150),weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isKill:!0}),this.operations["Stealth Retirement Operation"]=new c.a({name:"Stealth Retirement Operation",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:22,rankLoss:2,hpLoss:10,count:Object(E.a)(1,150),weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isStealth:!0,isKill:!0}),this.operations.Assassination=new c.a({name:"Assassination",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:44,rankLoss:4,hpLoss:5,count:Object(E.a)(1,150),weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.8},isStealth:!0,isKill:!0})}process(t,e){if(t.isInitialized){if(t.page()!==g.a.BitVerse&&this.blackops.hasOwnProperty(P.a.OperationDaedalus))return t.toBitVerse(!1,!1);if(!1===M.a[T.a.BladesSimulacrum].owned&&e.isWorking){if(this.action.type!==i.a.Idle){let t="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(t+="

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),O.a.SuppressBladeburnerPopup||Object(L.a)(t)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=v.a.CyclesPerSecond){let n=Math.floor(this.storedCycles/v.a.CyclesPerSecond);n=Math.min(n,5),this.storedCycles-=n*v.a.CyclesPerSecond,this.calculateMaxStamina(e),this.stamina+=this.calculateStaminaGainPerSecond(e)*n,this.stamina=Math.min(this.maxStamina,this.stamina);for(const t of Object.values(this.contracts)){const e=o.a[t.name];if(void 0===e)throw new Error(`growth formula for action '${t.name}' is undefined`);t.count+=n*e()/v.a.ActionCountGrowthPeriod}for(const t of Object.values(this.operations)){const e=o.a[t.name];if(void 0===e)throw new Error(`growth formula for action '${t.name}' is undefined`);void 0!==e&&(t.count+=n*e()/v.a.ActionCountGrowthPeriod)}for(const t of v.a.CityNames){const e=this.cities[t];if(!(e instanceof p.a))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");e.chaos-=1e-4*n,e.chaos=Math.max(0,e.chaos)}this.randomEventCounter-=n,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter+=Object(E.a)(240,600)),this.processAction(t,e,n),this.automateEnabled&&(this.stamina<=this.automateThreshLow?this.action.name===this.automateActionLow.name&&this.action.type===this.automateActionLow.type||(this.action=new r.a({type:this.automateActionLow.type,name:this.automateActionLow.name}),this.startAction(e,this.action)):this.stamina>=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new r.a({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(e,this.action))))}}}getTypeAndNameFromActionId(t){const e={type:"",name:""},n=Object.keys(i.a);for(let a=0;ar),!1;if(o.type===i.a.BlackOp){const t=this.canAttemptBlackOp(o);if(!t.isAvailable)return a.log("bladeburner.startAction",()=>t.error+""),!1}try{return this.startAction(t,o),a.log("bladeburner.startAction",()=>`Starting bladeburner action with type '${e}' and name '${n}'`),!0}catch(t){return this.resetAction(),a.log("bladeburner.startAction",()=>r),!1}}getActionTimeNetscriptFn(t,e,n,a){const r=`Invalid action: type='${e}' name='${n}'`,o=this.getActionIdFromTypeAndName(e,n);if(null==o)return a.log("bladeburner.getActionTime",()=>r),-1;const s=this.getActionObject(o);if(null==s)return a.log("bladeburner.getActionTime",()=>r),-1;switch(o.type){case i.a.Contract:case i.a.Operation:case i.a.BlackOp:case i.a.BlackOperation:return 1e3*s.getActionTime(this);case i.a.Training:case i.a["Field Analysis"]:case i.a.FieldAnalysis:return 3e4;case i.a.Recruitment:return 1e3*this.getRecruitmentTime(t);case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:return 6e4;default:return a.log("bladeburner.getActionTime",()=>r),-1}}getActionEstimatedSuccessChanceNetscriptFn(t,e,n,a){const r=`Invalid action: type='${e}' name='${n}'`,o=this.getActionIdFromTypeAndName(e,n);if(null==o)return a.log("bladeburner.getActionEstimatedSuccessChance",()=>r),[-1,-1];const s=this.getActionObject(o);if(null==s)return a.log("bladeburner.getActionEstimatedSuccessChance",()=>r),[-1,-1];switch(o.type){case i.a.Contract:case i.a.Operation:case i.a.BlackOp:case i.a.BlackOperation:return s.getEstSuccessChance(this);case i.a.Training:case i.a["Field Analysis"]:case i.a.FieldAnalysis:case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:return[1,1];case i.a.Recruitment:{const e=this.getRecruitmentSuccessChance(t);return[e,e]}default:return a.log("bladeburner.getActionEstimatedSuccessChance",()=>r),[-1,-1]}}getActionCountRemainingNetscriptFn(t,e,n){const a=`Invalid action: type='${t}' name='${e}'`,r=this.getActionIdFromTypeAndName(t,e);if(null==r)return n.log("bladeburner.getActionCountRemaining",()=>a),-1;const o=this.getActionObject(r);if(null==o)return n.log("bladeburner.getActionCountRemaining",()=>a),-1;switch(r.type){case i.a.Contract:case i.a.Operation:return Math.floor(o.count);case i.a.BlackOp:case i.a.BlackOperation:return null!=this.blackops[e]?0:1;case i.a.Training:case i.a.Recruitment:case i.a["Field Analysis"]:case i.a.FieldAnalysis:case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:return 1/0;default:return n.log("bladeburner.getActionCountRemaining",()=>a),-1}}getSkillLevelNetscriptFn(t,e){return""!==t&&h.a.hasOwnProperty(t)?null==this.skills[t]?0:this.skills[t]:(e.log("bladeburner.getSkillLevel",()=>`Invalid skill: '${t}'`),-1)}getSkillUpgradeCostNetscriptFn(t,e){if(""===t||!h.a.hasOwnProperty(t))return e.log("bladeburner.getSkillUpgradeCost",()=>`Invalid skill: '${t}'`),-1;const n=h.a[t];return null==this.skills[t]?n.calculateCost(0):n.calculateCost(this.skills[t])}upgradeSkillNetscriptFn(t,e){const n=`Invalid skill: '${t}'`;if(!h.a.hasOwnProperty(t))return e.log("bladeburner.upgradeSkill",()=>n),!1;const a=h.a[t];let r=0;this.skills[t]&&!isNaN(this.skills[t])&&(r=this.skills[t]);const i=a.calculateCost(r);return a.maxLvl&&r>=a.maxLvl?(e.log("bladeburner.upgradeSkill",()=>`Skill '${t}' is already maxed.`),!1):this.skillPoints`You do not have enough skill points to upgrade ${t} (You have ${this.skillPoints}, you need ${i})`),!1):(this.skillPoints-=i,this.upgradeSkill(a),e.log("bladeburner.upgradeSkill",()=>`'${t}' upgraded to level ${this.skills[t]}`),!0)}getTeamSizeNetscriptFn(t,e,n){if(""===t&&""===e)return this.teamSize;const a=`Invalid action: type='${t}' name='${e}'`,r=this.getActionIdFromTypeAndName(t,e);if(null==r)return n.log("bladeburner.getTeamSize",()=>a),-1;const o=this.getActionObject(r);return null==o?(n.log("bladeburner.getTeamSize",()=>a),-1):r.type===i.a.Operation||r.type===i.a.BlackOp||r.type===i.a.BlackOperation?o.teamCount:0}setTeamSizeNetscriptFn(t,e,n,a){const r=`Invalid action: type='${t}' name='${e}'`,o=this.getActionIdFromTypeAndName(t,e);if(null==o)return a.log("bladeburner.setTeamSize",()=>r),-1;if(o.type!==i.a.Operation&&o.type!==i.a.BlackOp&&o.type!==i.a.BlackOperation)return a.log("bladeburner.setTeamSize",()=>"Only valid for 'Operations' and 'BlackOps'"),-1;const s=this.getActionObject(o);if(null==s)return a.log("bladeburner.setTeamSize",()=>r),-1;let l=Math.round(n);return isNaN(l)||l<0?(a.log("bladeburner.setTeamSize",()=>"Invalid size: "+n),-1):(this.teamSize`Team size for '${e}' set to ${l}.`),l)}joinBladeburnerFactionNetscriptFn(t){const e=C.a[N.a.Bladeburners];return!!e.isMember||(this.rank>=v.a.RankNeededForFaction?(Object(R.e)(e),t.log("bladeburner.joinBladeburnerFaction",()=>`Joined ${N.a.Bladeburners} faction.`),!0):(t.log("bladeburner.joinBladeburnerFaction",()=>`You do not have the required rank (${this.rank}/${v.a.RankNeededForFaction}).`),!1))}toJSON(){return Object(a.b)("Bladeburner",this)}static fromJSON(t){return Object(a.a)(D,t.data)}}a.c.constructors.Bladeburner=D},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(362),r=n(32),i=n(344),o=n(25);const s={name:"",info:"",companyPositions:{},expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0};class l{constructor(t=s){this.name=t.name,this.info=t.info,this.companyPositions=t.companyPositions,this.expMultiplier=t.expMultiplier,this.salaryMultiplier=t.salaryMultiplier,this.jobStatReqOffset=t.jobStatReqOffset,this.isPlayerEmployed=!1,this.playerReputation=1,this.favor=0,this.isMegacorp=!1,t.isMegacorp&&(this.isMegacorp=!0)}hasPosition(t){return t instanceof a.a?null!=this.companyPositions[t.name]:null!=this.companyPositions[t]}hasAgentPositions(){return null!=this.companyPositions[r.a[0]]}hasBusinessConsultantPositions(){return null!=this.companyPositions[r.c[0]]}hasBusinessPositions(){return null!=this.companyPositions[r.b[0]]}hasEmployeePositions(){return null!=this.companyPositions[r.e[1]]}hasITPositions(){return null!=this.companyPositions[r.d[0]]}hasSecurityPositions(){return null!=this.companyPositions[r.h[2]]}hasSoftwareConsultantPositions(){return null!=this.companyPositions[r.k[0]]}hasSoftwarePositions(){return null!=this.companyPositions[r.j[0]]}hasWaiterPositions(){return null!=this.companyPositions[r.e[0]]}gainFavor(){null==this.favor&&(this.favor=0),this.favor+=this.getFavorGain()}getFavorGain(){null==this.favor&&(this.favor=0);const t=Math.max(0,Object(i.a)(this.favor))+this.playerReputation;return Object(i.b)(t)-this.favor}toJSON(){return Object(o.b)("Company",this)}static fromJSON(t){return Object(o.a)(l,t.data)}}o.c.constructors.Company=l},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(198),r=n(175),i=n(25),o=n(266);function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class l{constructor(t={}){var e;s(this,"level",1),s(this,"sizeUsed",0),s(this,"smartSupplyEnabled",!1),s(this,"smartSupplyUseLeftovers",{}),s(this,"smartSupplyStore",0),this.loc=t.loc?t.loc:"",this.size=t.size?t.size:0,this.materials={Water:new a.a({name:"Water"}),Energy:new a.a({name:"Energy"}),Food:new a.a({name:"Food"}),Plants:new a.a({name:"Plants"}),Metal:new a.a({name:"Metal"}),Hardware:new a.a({name:"Hardware"}),Chemicals:new a.a({name:"Chemicals"}),Drugs:new a.a({name:"Drugs"}),Robots:new a.a({name:"Robots"}),AICores:new a.a({name:"AI Cores"}),RealEstate:new a.a({name:"Real Estate"})},this.smartSupplyUseLeftovers={Water:!0,Energy:!0,Food:!0,Plants:!0,Metal:!0,Hardware:!0,Chemicals:!0,Drugs:!0,Robots:!0,AICores:!0,RealEstate:!0},t.corp&&t.industry&&this.updateSize(t.corp,t.industry),null!==(e=t.corp)&&void 0!==e&&e.unlockUpgrades[1]&&(this.smartSupplyEnabled=!0)}updateMaterialSizeUsed(){this.sizeUsed=0;for(const t of Object.keys(this.materials)){const e=this.materials[t];r.a.hasOwnProperty(t)&&(this.sizeUsed+=e.qty*r.a[t])}this.sizeUsed>this.size&&console.warn("Warehouse size used greater than capacity, something went wrong")}updateSize(t,e){try{this.size=100*this.level*t.getStorageMultiplier()*e.getStorageMultiplier()}catch(t){Object(o.a)(t)}}toJSON(){return Object(i.b)("Warehouse",this)}static fromJSON(t){return Object(i.a)(l,t.data)}}i.c.constructors.Warehouse=l},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(1006),r=n(579);const i={};a.a.forEach(t=>{i[t.name]=new r.a(t.name,t.desc,t.isHacking,t.isCombat,t.params)})},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(1013),r=n(1014);const i={};for(const t of r.a)i[(o=t).name]=new a.a(o);var o},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return l})),n.d(e,"a",(function(){return c}));var a=n(78),r=n(209);const i=[];class o{constructor(t,e,n,a,r){this.id=t,this.shape=e,this.type=n,this.power=a,this.limit=r}fullAt(t,e,n){if(e<0)return!1;if(e>=this.height(n))return!1;if(t<0)return!1;if(t>=this.width(n))return!1;let[a,r,i,o]=[0,0,1,1];1===n?[a,r,i,o]=[this.width(n)-1,0,-1,1]:2===n?[a,r,i,o]=[this.width(n)-1,this.height(n)-1,-1,-1]:3===n&&([a,r,i,o]=[0,this.height(n)-1,1,-1]);let[s,l]=[a+i*t,r+o*e];return n%2==1&&([s,l]=[l,s]),this.shape[l][s]}width(t){return t%2==0?this.shape[0].length:this.shape.length}height(t){return t%2==0?this.shape.length:this.shape[0].length}neighboors(t){const e=[],n=(n,a)=>{this.fullAt(n,a,t)||e.some(t=>t[0]===n&&t[1]===a)||e.push([n,a])};for(let e=0;ee[0]===t[0]&&e[1]===t[1])||a.push(t);return a}copy(){return new o(this.id,this.shape.map(t=>t.slice()),this.type,this.power,this.limit)}}function s(t){for(const e of i)if(e.id===t)return e;return null}!function(){const t=!1,e=!0;i.push(new o(0,r.a.S,a.b.Hacking,1,1)),i.push(new o(1,r.a.Z,a.b.Hacking,1,1)),i.push(new o(5,r.a.T,a.b.HackingSpeed,1.3,1)),i.push(new o(6,r.a.I,a.b.HackingMoney,2,1)),i.push(new o(7,r.a.J,a.b.HackingGrow,.5,1)),i.push(new o(10,r.a.T,a.b.Strength,2,1)),i.push(new o(12,r.a.L,a.b.Defense,2,1)),i.push(new o(14,r.a.L,a.b.Dexterity,2,1)),i.push(new o(16,r.a.S,a.b.Agility,2,1)),i.push(new o(18,r.a.S,a.b.Charisma,3,1)),i.push(new o(20,r.a.I,a.b.HacknetMoney,1,1)),i.push(new o(21,r.a.O,a.b.HacknetCost,2,1)),i.push(new o(25,r.a.J,a.b.Rep,.5,1)),i.push(new o(27,r.a.J,a.b.WorkMoney,10,1)),i.push(new o(28,r.a.L,a.b.Crime,2,1)),i.push(new o(30,r.a.S,a.b.Bladeburner,.4,1)),i.push(new o(100,[[t,e,e],[e,e,t],[t,e,t]],a.b.Booster,1.1,99)),i.push(new o(101,[[e,e,e,e],[e,t,t,t]],a.b.Booster,1.1,99)),i.push(new o(102,[[t,e,e,e],[e,e,t,t]],a.b.Booster,1.1,99)),i.push(new o(103,[[e,e,e,t],[t,t,e,e]],a.b.Booster,1.1,99)),i.push(new o(104,[[t,e,e],[t,e,t],[e,e,t]],a.b.Booster,1.1,99)),i.push(new o(105,[[t,t,e],[t,e,e],[e,e,t]],a.b.Booster,1.1,99)),i.push(new o(106,[[e,t,t],[e,e,e],[e,t,t]],a.b.Booster,1.1,99)),i.push(new o(107,[[t,e,t],[e,e,e],[t,e,t]],a.b.Booster,1.1,99))}();const l=new o(-2,[],a.b.None,0,1/0),c=new o(-2,[],a.b.Delete,0,1/0)},function(t,e,n){"use strict";n.d(e,"c",(function(){return s})),n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c}));var a=n(8),r=n(6),i=n(411);function o(t){let e=1+t.favor/100;return isNaN(e)&&(e=1),e*r.a.FactionWorkRepGain}function s(t,e){return(t.hacking+t.intelligence/3)/a.a.MaxSkillLevel*t.faction_rep_mult*t.getIntelligenceBonus(1)*o(e)*Object(i.a)()}function l(t,e){return.9*(t.strength+t.defense+t.dexterity+t.agility+(t.hacking+t.intelligence)*Object(i.a)())/a.a.MaxSkillLevel/4.5*t.faction_rep_mult*o(e)*t.getIntelligenceBonus(1)}function c(t,e){return.9*(t.strength+t.defense+t.dexterity+t.agility+t.charisma+(t.hacking+t.intelligence)*Object(i.a)())/a.a.MaxSkillLevel/5.5*t.faction_rep_mult*o(e)*t.getIntelligenceBonus(1)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"c",(function(){return m})),n.d(e,"d",(function(){return h})),n.d(e,"b",(function(){return d}));var a=n(226),r=n(76),i=n(8),o=n(2),s=n(4),l=n(20),c=n(16),f=n(0);function u(t,e,n=null,u={}){if((e=Math.round(e))<=0)return!1;if(null==t||isNaN(e))return n?n.log("stock.buy",()=>`Invalid arguments: stock='${t}' shares='${e}'`):!0!==u.suppressDialog&&Object(c.a)("Failed to buy stock. This may be a bug, contact developer"),!1;const m=Object(a.b)(t,e,r.a.Long);if(null==m)return!1;if(o.a.money`You do not have enough money to purchase this position. You need ${s.a.formatMoney(m)}.`):!0!==u.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"You do not have enough money to purchase this. You need ",f.createElement(l.a,{money:m}))),!1;if(e+t.playerShares+t.playerShortShares>t.maxShares)return n?n.log("stock.buy",()=>`Purchasing '${e+t.playerShares+t.playerShortShares}' shares would exceed ${t.symbol}'s maximum (${t.maxShares}) number of shares`):!0!==u.suppressDialog&&Object(c.a)(`You cannot purchase this many shares. ${t.symbol} has a maximum of ${s.a.formatShares(t.maxShares)} shares.`),!1;const h=t.playerShares*t.playerAvgPx;o.a.loseMoney(m,"stock");const d=h+m-i.a.StockMarketCommission;if(t.playerShares=Math.round(t.playerShares+e),t.playerAvgPx=d/t.playerShares,Object(a.d)(t,e),null!=u.rerenderFn&&"function"==typeof u.rerenderFn&&u.rerenderFn(),n){const a=`Bought ${s.a.formatShares(e)} shares of ${t.symbol} for ${s.a.formatMoney(m)}. Paid ${s.a.formatMoney(i.a.StockMarketCommission)} in commission fees.`;n.log("stock.buy",()=>a)}else!0!==u.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"Bought ",s.a.formatShares(e)," shares of ",t.symbol," for ",f.createElement(l.a,{money:m}),". Paid"," ",f.createElement(l.a,{money:i.a.StockMarketCommission})," in commission fees."));return!0}function m(t,e,n=null,i={}){if(null==t||e<0||isNaN(e))return n?n.log("stock.sell",()=>`Invalid arguments: stock='${t}' shares='${e}'`):!0!==i.suppressDialog&&Object(c.a)("Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer"),!1;if((e=Math.round(e))>t.playerShares&&(e=t.playerShares),0===e)return!1;const u=Object(a.c)(t,e,r.a.Long);if(null==u)return!1;let m=u-t.playerAvgPx*e;if(isNaN(m)&&(m=0),o.a.gainMoney(u,"stock"),n&&(n.scriptRef.onlineMoneyMade+=m,o.a.scriptProdSinceLastAug+=m),t.playerShares=Math.round(t.playerShares-e),0===t.playerShares&&(t.playerAvgPx=0),Object(a.d)(t,e),null!=i.rerenderFn&&"function"==typeof i.rerenderFn&&i.rerenderFn(),n){const a=`Sold ${s.a.formatShares(e)} shares of ${t.symbol}. After commissions, you gained a total of ${s.a.formatMoney(u)}.`;n.log("stock.sell",()=>a)}else!0!==i.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"Sold ",s.a.formatShares(e)," shares of ",t.symbol,". After commissions, you gained a total of"," ",f.createElement(l.a,{money:u}),"."));return!0}function h(t,e,n=null,u={}){if((e=Math.round(e))<=0)return!1;if(null==t||isNaN(e))return n?n.log("stock.short",()=>`Invalid arguments: stock='${t}' shares='${e}'`):!0!==u.suppressDialog&&Object(c.a)("Failed to initiate a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;const m=Object(a.b)(t,e,r.a.Short);if(null==m)return!1;if(o.a.money"You do not have enough money to purchase this short position. You need "+s.a.formatMoney(m)):!0!==u.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"You do not have enough money to purchase this short position. You need ",f.createElement(l.a,{money:m}))),!1;if(e+t.playerShares+t.playerShortShares>t.maxShares)return n?n.log("stock.short",()=>`This '${e+t.playerShares+t.playerShortShares}' short shares would exceed ${t.symbol}'s maximum (${t.maxShares}) number of shares.`):!0!==u.suppressDialog&&Object(c.a)(`You cannot purchase this many shares. ${t.symbol} has a maximum of ${t.maxShares} shares.`),!1;const h=t.playerShortShares*t.playerAvgShortPx;o.a.loseMoney(m,"stock");const d=h+m-i.a.StockMarketCommission;if(t.playerShortShares=Math.round(t.playerShortShares+e),t.playerAvgShortPx=d/t.playerShortShares,Object(a.d)(t,e),null!=u.rerenderFn&&"function"==typeof u.rerenderFn&&u.rerenderFn(),n){const a=`Bought a short position of ${s.a.formatShares(e)} shares of ${t.symbol} for ${s.a.formatMoney(m)}. Paid ${s.a.formatMoney(i.a.StockMarketCommission)} in commission fees.`;n.log("stock.short",()=>a)}else u.suppressDialog||Object(c.a)(f.createElement(f.Fragment,null,"Bought a short position of ",s.a.formatShares(e)," shares of ",t.symbol," for"," ",f.createElement(l.a,{money:m}),". Paid ",f.createElement(l.a,{money:i.a.StockMarketCommission})," in commission fees."));return!0}function d(t,e,n=null,i={}){if(null==t||isNaN(e)||e<0)return n?n.log("stock.sellShort",()=>`Invalid arguments: stock='${t}' shares='${e}'`):i.suppressDialog||Object(c.a)("Failed to sell a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;if((e=Math.round(e))>t.playerShortShares&&(e=t.playerShortShares),0===e)return!1;const u=e*t.playerAvgShortPx,m=Object(a.c)(t,e,r.a.Short);if(null==m||isNaN(m)||null==u)return n?n.log("stock.sellShort",()=>"Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"):i.suppressDialog||Object(c.a)("Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"),!1;let h=m-u;if(isNaN(h)&&(h=0),o.a.gainMoney(m,"stock"),n&&(n.scriptRef.onlineMoneyMade+=h,o.a.scriptProdSinceLastAug+=h),t.playerShortShares=Math.round(t.playerShortShares-e),0===t.playerShortShares&&(t.playerAvgShortPx=0),Object(a.d)(t,e),null!=i.rerenderFn&&"function"==typeof i.rerenderFn&&i.rerenderFn(),n){const a=`Sold your short position of ${s.a.formatShares(e)} shares of ${t.symbol}. After commissions, you gained a total of `+s.a.formatMoney(m);n.log("stock.sellShort",()=>a)}else i.suppressDialog||Object(c.a)(f.createElement(f.Fragment,null,"Sold your short position of ",s.a.formatShares(e)," shares of ",t.symbol,". After commissions, you gained a total of ",f.createElement(l.a,{money:m})));return!0}},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"a",(function(){return c})),n.d(e,"d",(function(){return f}));var a=n(0),r=n.n(a),i=n(9),o=n(369);class s{constructor(t,e){i.a.TimestampsFormat&&(t="["+Object(o.a)(i.a.TimestampsFormat)+"] "+t),this.text=t,this.color=e}}class l{constructor(t){i.a.TimestampsFormat&&(t=r.a.createElement(r.a.Fragment,null,"[",Object(o.a)(i.a.TimestampsFormat),"] ",t)),this.raw=t}}class c{constructor(t,e){i.a.TimestampsFormat&&(t="["+Object(o.a)(i.a.TimestampsFormat)+"] "+t),this.hostname=e,this.dashes=t}}class f{constructor(t,e,n){this.time=t,this.timeLeft=t,this.action=e,this.server=n}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(6);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class i{constructor(t={name:"foo",desc:"foo"}){if(r(this,"baseCost",1),r(this,"costInc",1),r(this,"maxLvl",0),r(this,"successChanceAll",0),r(this,"successChanceStealth",0),r(this,"successChanceKill",0),r(this,"successChanceContract",0),r(this,"successChanceOperation",0),r(this,"successChanceEstimate",0),r(this,"actionTime",0),r(this,"effHack",0),r(this,"effStr",0),r(this,"effDef",0),r(this,"effDex",0),r(this,"effAgi",0),r(this,"effCha",0),r(this,"stamina",0),r(this,"money",0),r(this,"expGain",0),!t.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(!t.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.name=t.name,this.desc=t.desc,this.baseCost=t.baseCost?t.baseCost:1,this.costInc=t.costInc?t.costInc:1,t.maxLvl&&(this.maxLvl=t.maxLvl),t.successChanceAll&&(this.successChanceAll=t.successChanceAll),t.successChanceStealth&&(this.successChanceStealth=t.successChanceStealth),t.successChanceKill&&(this.successChanceKill=t.successChanceKill),t.successChanceContract&&(this.successChanceContract=t.successChanceContract),t.successChanceOperation&&(this.successChanceOperation=t.successChanceOperation),t.successChanceEstimate&&(this.successChanceEstimate=t.successChanceEstimate),t.actionTime&&(this.actionTime=t.actionTime),t.effHack&&(this.effHack=t.effHack),t.effStr&&(this.effStr=t.effStr),t.effDef&&(this.effDef=t.effDef),t.effDex&&(this.effDex=t.effDex),t.effAgi&&(this.effAgi=t.effAgi),t.effCha&&(this.effCha=t.effCha),t.stamina&&(this.stamina=t.stamina),t.money&&(this.money=t.money),t.expGain&&(this.expGain=t.expGain)}calculateCost(t){return Math.floor((this.baseCost+t*this.costInc)*a.a.BladeburnerSkillCost)}getMultiplier(t){return"successChanceAll"===t?this.successChanceAll:"successChanceStealth"===t?this.successChanceStealth:"successChanceKill"===t?this.successChanceKill:"successChanceContract"===t?this.successChanceContract:"successChanceOperation"===t?this.successChanceOperation:"successChanceEstimate"===t?this.successChanceEstimate:"actionTime"===t?this.actionTime:"effHack"===t?this.effHack:"effStr"===t?this.effStr:"effDef"===t?this.effDef:"effDex"===t?this.effDex:"effAgi"===t?this.effAgi:"effCha"===t?this.effCha:"stamina"===t?this.stamina:"money"===t?this.money:"expGain"===t?this.expGain:0}}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(41),o=n(10),s=n(1);function l(t){return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,null,t.confirmationText),r.a.createElement(o.a,{onClick:()=>{t.onConfirm()}},"Confirm"),t.additionalButton&&r.a.createElement(r.a.Fragment,null,t.additionalButton)))}},function(t,e,n){"use strict";function a(){try{return"d9499077"}catch(t){}return"DEV"}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(5);const r={GangRespectToReputationRatio:75,MaximumGangMembers:12,CyclesPerTerritoryAndPowerUpdate:100,AscensionMultiplierRatio:.15,Names:[a.a.SlumSnakes,a.a.Tetrads,a.a.TheSyndicate,a.a.TheDarkArmy,a.a.SpeakersForTheDead,a.a.NiteSec,a.a.TheBlackHand]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(509),r=n(25),i=n(510);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}let s=0;class l{constructor(t=null,e="",n="",a="",r=[]){o(this,"code",""),o(this,"filename",""),o(this,"url",""),o(this,"module",""),o(this,"dependencies",[]),o(this,"dependents",[]),o(this,"ramUsage",0),o(this,"server",""),this.filename=e,this.code=n,this.ramUsage=0,this.server=a,this.module="",this.moduleSequenceNumber=++s,""!==this.code&&null!==t&&this.updateRamUsage(t,r)}download(){const t=this.filename,e=new Blob([this.code],{type:"text/plain"}),n=window.navigator;if(n.msSaveOrOpenBlob)n.msSaveOrOpenBlob(e,t);else{const n=document.createElement("a"),a=URL.createObjectURL(e);n.href=a,n.download=t,document.body.appendChild(n),n.click(),setTimeout((function(){document.body.removeChild(n),window.URL.revokeObjectURL(a)}),0)}}markUpdated(){this.module="",this.moduleSequenceNumber=++s}saveScript(t,e,n,a,r){this.code=l.formatCode(n),this.filename=e,this.server=a,this.updateRamUsage(t,r),this.markUpdated();for(const t of this.dependents){const[e]=r.filter(e=>e.filename===t.filename&&e.server==t.server);null!==e&&e.markUpdated()}}async updateRamUsage(t,e){const n=await Object(a.a)(t,this.code,e);n.cost>0&&(this.ramUsage=Object(i.a)(n.cost),this.ramUsageEntries=n.entries),this.markUpdated()}imports(){return[]}toJSON(){return Object(r.b)("Script",this)}static fromJSON(t){const e=Object(r.a)(l,t.data);return e.url="",e.dependents=[],e}static formatCode(t){return t.replace(/^\s+|\s+$/g,"")}}r.c.constructors.Script=l},,function(t,e,n){"use strict";function a(t){const e=[];for(let n=0;n13)throw new Error("Card instantiated with improper value: "+t)}formatValue(){switch(this.value){case 1:return"A";case 11:return"J";case 12:return"Q";case 13:return"K";default:return""+this.value}}isRedSuit(){return this.suit===a.Hearts||this.suit===a.Diamonds}getStringRepresentation(){return`${this.formatValue()} of ${this.suit}`}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(25);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class i{constructor(t={}){r(this,"name",""),r(this,"type",-1),t.name&&(this.name=t.name),t.type&&(this.type=t.type)}toJSON(){return Object(a.b)("ActionIdentifier",this)}static fromJSON(t){return Object(a.a)(i,t.data)}}a.c.constructors.ActionIdentifier=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(219);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class i{constructor(t,e){r(this,"lvl",1),r(this,"owned",!1);const n="BitNode"+t,i=a.a[n];if(null==i)throw new Error("Invalid Bit Node for this Source File");this.n=t,this.name=`Source-File ${t}: ${i.name}`,this.info=e}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return c})),n.d(e,"a",(function(){return f}));var a=n(6),r=n(17),i=n(8),o=n(176),s=n(280);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function c(){return{hack:0,str:0,def:0,dex:0,agi:0,cha:0,money:0}}class f{constructor(){l(this,"hacking",1),l(this,"strength",1),l(this,"defense",1),l(this,"dexterity",1),l(this,"agility",1),l(this,"charisma",1),l(this,"intelligence",1),l(this,"hp",10),l(this,"max_hp",10),l(this,"hacking_exp",0),l(this,"strength_exp",0),l(this,"defense_exp",0),l(this,"dexterity_exp",0),l(this,"agility_exp",0),l(this,"charisma_exp",0),l(this,"intelligence_exp",0),l(this,"hacking_mult",1),l(this,"strength_mult",1),l(this,"defense_mult",1),l(this,"dexterity_mult",1),l(this,"agility_mult",1),l(this,"charisma_mult",1),l(this,"hacking_exp_mult",1),l(this,"strength_exp_mult",1),l(this,"defense_exp_mult",1),l(this,"dexterity_exp_mult",1),l(this,"agility_exp_mult",1),l(this,"charisma_exp_mult",1),l(this,"hacking_chance_mult",1),l(this,"hacking_speed_mult",1),l(this,"hacking_money_mult",1),l(this,"hacking_grow_mult",1),l(this,"company_rep_mult",1),l(this,"faction_rep_mult",1),l(this,"crime_money_mult",1),l(this,"crime_success_mult",1),l(this,"work_money_mult",1),l(this,"hacknet_node_money_mult",1),l(this,"hacknet_node_purchase_cost_mult",1),l(this,"hacknet_node_ram_cost_mult",1),l(this,"hacknet_node_core_cost_mult",1),l(this,"hacknet_node_level_cost_mult",1),l(this,"bladeburner_max_stamina_mult",1),l(this,"bladeburner_stamina_gain_mult",1),l(this,"bladeburner_analysis_mult",1),l(this,"bladeburner_success_chance_mult",1),l(this,"augmentations",[]),l(this,"queuedAugmentations",[]),l(this,"city",r.a.Sector12)}applyAugmentation(t){for(const e of Object.keys(t.mults))null==this[e]?console.warn("Augmentation has unrecognized multiplier property: "+e):this[e]*=t.mults[e]}calculateStat(t,e=1){return Object(o.b)(t,e)}getFactionFieldWorkRepGain(){return.9*(this.hacking/i.a.MaxSkillLevel+this.strength/i.a.MaxSkillLevel+this.defense/i.a.MaxSkillLevel+this.dexterity/i.a.MaxSkillLevel+this.agility/i.a.MaxSkillLevel+this.charisma/i.a.MaxSkillLevel)/5.5*this.faction_rep_mult}getFactionHackingWorkRepGain(){return this.hacking/i.a.MaxSkillLevel*this.faction_rep_mult}getFactionSecurityWorkRepGain(){return.9*(this.hacking/i.a.MaxSkillLevel+this.strength/i.a.MaxSkillLevel+this.defense/i.a.MaxSkillLevel+this.dexterity/i.a.MaxSkillLevel+this.agility/i.a.MaxSkillLevel)/4.5*this.faction_rep_mult}resetMultipliers(){this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.work_money_mult=1}updateStatLevels(){this.hacking=Math.max(1,Math.floor(this.calculateStat(this.hacking_exp,this.hacking_mult*a.a.HackingLevelMultiplier))),this.strength=Math.max(1,Math.floor(this.calculateStat(this.strength_exp,this.strength_mult*a.a.StrengthLevelMultiplier))),this.defense=Math.max(1,Math.floor(this.calculateStat(this.defense_exp,this.defense_mult*a.a.DefenseLevelMultiplier))),this.dexterity=Math.max(1,Math.floor(this.calculateStat(this.dexterity_exp,this.dexterity_mult*a.a.DexterityLevelMultiplier))),this.agility=Math.max(1,Math.floor(this.calculateStat(this.agility_exp,this.agility_mult*a.a.AgilityLevelMultiplier))),this.charisma=Math.max(1,Math.floor(this.calculateStat(this.charisma_exp,this.charisma_mult*a.a.CharismaLevelMultiplier)));const t=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*t)}getIntelligenceBonus(t){return Object(s.a)(this.intelligence,t)}}},,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(757);function o({children:t}){return r.a.createElement(i.MathJaxContext,{version:3,src:"dist/ext/MathJax-3.2.0/es5/tex-chtml.js"},r.a.createElement(i.MathJax,null,t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(16);function r(t){console.error(t),Object(a.a)("Caught an exception: "+t+"

Filename: "+(t.fileName||"UNKNOWN FILE NAME")+"

Line Number: "+(t.lineNumber||"UNKNOWN LINE NUMBER")+"

This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.

If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b})),n.d(e,"b",(function(){return g})),n.d(e,"e",(function(){return p})),n.d(e,"d",(function(){return E})),n.d(e,"c",(function(){return k}));var a=n(327),r=n(57),i=n(15),o=n(64),s=n(2),l=n(299),c=n(26),f=n(9),u=n(16),m=n(25),h=n(5);function d(t,e=!1){t.recvd=!0,!e&&f.a.SuppressMessages||p(t.filename),function(t,e){const n=Object(c.d)(e);if(null==n)return void console.warn("Could not find server "+e);for(let e=0;e

This message was saved as "+e.filename+" onto your home computer.";Object(u.a)(n)}function g(){if(l.b)return;const t=b[v.Jumper0],e=b[v.Jumper1],n=b[v.Jumper2],a=b[v.Jumper3],c=b[v.Jumper4],f=b[v.CyberSecTest],u=b[v.NiteSecTest],m=b[v.BitRunnersTest],h=b[v.RedPill];let p=!1;if(r.a[i.a.TheRedPill].owned&&(p=!0),h&&p&&0===s.a.sourceFiles.length&&!l.b)d(h,!0);else if(h&&p)l.b||d(h);else if(t&&!t.recvd&&s.a.hacking>=25){d(t);const e=o.a.Flight.name,n=s.a.getHomeComputer();n.programs.includes(e)||n.programs.push(e)}else e&&!e.recvd&&s.a.hacking>=40?d(e):f&&!f.recvd&&s.a.hacking>=50?d(f):n&&!n.recvd&&s.a.hacking>=175?d(n):u&&!u.recvd&&s.a.hacking>=200?d(u):a&&!a.recvd&&s.a.hacking>=350?d(a):c&&!c.recvd&&s.a.hacking>=490?d(c):m&&!m.recvd&&s.a.hacking>=500&&d(m)}function y(t){b[t.filename]=t}let b={};function E(t){b=JSON.parse(t,m.c)}const v={Jumper0:"j0.msg",Jumper1:"j1.msg",Jumper2:"j2.msg",Jumper3:"j3.msg",Jumper4:"j4.msg",CyberSecTest:"csec-test.msg",NiteSecTest:"nitesec-test.msg",BitRunnersTest:"19dfj3l1nd.msg",RedPill:"icarus.msg"};function k(){b={},y(new a.a(v.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")),y(new a.a(v.Jumper1,`Soon you will be contacted by a hacking group known as ${h.a.NiteSec}. 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`)),y(new a.a(v.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 ${h.a.NiteSec}.

-jump3R`)),y(new a.a(v.Jumper3,`You must learn to walk before you can run. And you must run before you can fly. Look for ${h.a.TheBlackHand}.

I.I.I.I

-jump3R`)),y(new a.a(v.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")),y(new a.a(v.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.

-"+h.a.CyberSec)),y(new a.a(v.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.

-"+h.a.NiteSec)),y(new a.a(v.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")),y(new a.a(v.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$)"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(1015),r=n(13),i=n(26);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class s{constructor(t,e,n){o(this,"code",""),o(this,"delay",null),o(this,"disableLogs",{}),o(this,"dynamicLoadedFns",{}),o(this,"dynamicRamUsage",r.a.ScriptBaseRamCost),o(this,"errorMessage",""),o(this,"loadedFns",{}),o(this,"output",""),o(this,"ramUsage",0),o(this,"running",!1),this.name=t.filename,this.hostname=t.server;const s=Math.round(e);if("number"!=typeof s||isNaN(s))throw new Error("Invalid PID when constructing WorkerScript: "+e);this.pid=s,t.pid=s;const l=Object(i.d)(this.hostname);if(null==l)throw new Error("WorkerScript constructed with invalid server ip: "+this.hostname);let c=!1;for(let t=0;t-1&&(document.achievements=[],function(){function e(t){return t=t.replace(/\/\/+/g,"/"),(t=Object(i.k)(t)).includes("/")&&(t="/"+Object(i.k)(t)),t}document.getFiles=function(){const t=Object(l.d)("home");return null===t?{res:!1,msg:"Home server does not exist."}:{res:!0,data:{files:t.scripts.map(t=>({filename:t.filename,code:t.code,ramUsage:t.ramUsage}))}}},document.deleteFile=function(t){t=e(t);const n=Object(l.d)("home");return null===n?{res:!1,msg:"Home server does not exist."}:n.removeFile(t)},document.saveFile=function(n,r){var i;n=e(n),r=t.from(r,"base64").toString();const o=Object(l.d)("home");if(null===o)return{res:!1,msg:"Home server does not exist."};const{success:s,overwritten:c}=o.writeToScriptFile(a.a,n,r);let f;return s&&(f=o.getScript(n)),{res:s,data:{overwritten:c,ramUsage:null===(i=f)||void 0===i?void 0:i.ramUsage}}}}(),function(){const t={terminal:(t,e)=>{const n={info:o.a.info,warn:o.a.warn,error:o.a.error,success:o.a.success};let a;e&&(a=n[e]),a||(a=o.a.print),a.bind(o.a)(t)},toast:(t,e,n=2e3)=>s.b.emit(t,e,n)};window.appNotifier=t}(),function(){const t={triggerSave:()=>c.c.saveGame(!0),triggerGameExport:()=>{try{c.c.exportGame()}catch(t){console.log(t),s.b.emit("Could not export game.","error",2e3)}},triggerScriptsExport:()=>Object(u.b)("*",a.a.getHomeComputer()),getSaveData:()=>({save:c.c.getSaveString(f.a.ExcludeRunningScriptsFromSave),fileName:c.c.getSaveFileName()}),getSaveInfo:async t=>{try{return(await c.c.getImportDataFromString(t)).playerData}catch(t){return void console.error(t)}},pushSaveData:(t,e=!1)=>r.b.toImportSave(t,e)};window.appSaveFns=t}(),function(){const t=window.electronBridge;if(!t)return;t.receive("get-save-data-request",()=>{const e=window.appSaveFns.getSaveData();t.send("get-save-data-response",e)}),t.receive("get-save-info-request",async e=>{const n=await window.appSaveFns.getSaveInfo(e);t.send("get-save-info-response",n)}),t.receive("push-save-request",({save:t,automatic:e=!1})=>{window.appSaveFns.pushSaveData(t,e)}),t.receive("trigger-save",()=>window.appSaveFns.triggerSave().then(()=>{t.send("save-completed")}).catch(t=>{console.log(t),s.b.emit("Could not save game.","error",2e3)})),t.receive("trigger-game-export",()=>{try{window.appSaveFns.triggerGameExport()}catch(t){console.log(t),s.b.emit("Could not export game.","error",2e3)}}),t.receive("trigger-scripts-export",()=>{try{window.appSaveFns.triggerScriptsExport()}catch(t){console.log(t),s.b.emit("Could not export scripts.","error",2e3)}})}())}function p(t){const e=window.electronBridge;e&&e.send("push-game-saved",t)}function g(){const t=window.electronBridge;t&&t.send("push-game-ready",{player:{identifier:a.a.identifier,playtime:a.a.totalPlaytime,lastSave:a.a.lastSave},game:{version:m.a.VersionString,hash:Object(h.a)()}})}function y(t){const e=window.electronBridge;e&&(e.send("push-import-result",{wasImported:t}),b())}function b(){const t=window.electronBridge;t&&t.send("push-disable-restore",{duration:6e4})}}).call(this,n(162).Buffer)},,function(t,e,n){"use strict";n.d(e,"a",(function(){return A})),n.d(e,"b",(function(){return R}));var a=n(15),r=n(134),i=n(224),o=n(8),s=n(50),l=n(106),c=n(29),f=n(80),u=n(252),m=n(39),h=n(55),d=n(221),p=n(91),g=n(17),y=n(2),b=n(64),E=n(26),v=n(102),k=n(47),_=n(96),w=n(27),S=n(1107),C=n(5),x=n(59);const L=S.a;function O(){const t=Object(E.d)(v.a.WorldDaemon);return t instanceof k.a&&(!!t.backdoorInstalled||null!==y.a.bladeburner&&y.a.bladeburner.blackops.hasOwnProperty(x.a.OperationDaedalus))}function M(t,e){return t.bitNodeN===e||t.sourceFiles.some(t=>t.n===e)}function T(t){return t.sourceFiles.some(t=>1===t.n)}const A={[C.a.CyberSec.toUpperCase()]:{...L[C.a.CyberSec.toUpperCase()],Icon:"CSEC",Condition:()=>y.a.factions.includes(C.a.CyberSec)},[C.a.NiteSec.toUpperCase()]:{...L[C.a.NiteSec.toUpperCase()],Icon:C.a.NiteSec,Condition:()=>y.a.factions.includes(C.a.NiteSec)},THE_BLACK_HAND:{...L.THE_BLACK_HAND,Icon:"TBH",Condition:()=>y.a.factions.includes(C.a.TheBlackHand)},[C.a.BitRunners.toUpperCase()]:{...L[C.a.BitRunners.toUpperCase()],Icon:C.a.BitRunners.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.BitRunners)},[C.a.Daedalus.toUpperCase()]:{...L[C.a.Daedalus.toUpperCase()],Icon:C.a.Daedalus.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.Daedalus)},THE_COVENANT:{...L.THE_COVENANT,Icon:C.a.TheCovenant.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.TheCovenant)},[C.a.Illuminati.toUpperCase()]:{...L[C.a.Illuminati.toUpperCase()],Icon:C.a.Illuminati.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.Illuminati)},"BRUTESSH.EXE":{...L["BRUTESSH.EXE"],Icon:"p0",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.BruteSSHProgram.name)},"FTPCRACK.EXE":{...L["FTPCRACK.EXE"],Icon:"p1",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.FTPCrackProgram.name)},"RELAYSMTP.EXE":{...L["RELAYSMTP.EXE"],Icon:"p2",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.RelaySMTPProgram.name)},"HTTPWORM.EXE":{...L["HTTPWORM.EXE"],Icon:"p3",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.HTTPWormProgram.name)},"SQLINJECT.EXE":{...L["SQLINJECT.EXE"],Icon:"p4",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.SQLInjectProgram.name)},"FORMULAS.EXE":{...L["FORMULAS.EXE"],Icon:"formulas",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.Formulas.name)},"SF1.1":{...L["SF1.1"],Icon:"SF1.1",Visible:()=>M(y.a,1),Condition:()=>y.a.sourceFileLvl(1)>=1},"SF2.1":{...L["SF2.1"],Icon:"SF2.1",Visible:()=>M(y.a,2),Condition:()=>y.a.sourceFileLvl(2)>=1},"SF3.1":{...L["SF3.1"],Icon:"SF3.1",Visible:()=>M(y.a,3),Condition:()=>y.a.sourceFileLvl(3)>=1},"SF4.1":{...L["SF4.1"],Icon:"SF4.1",Visible:()=>M(y.a,4),Condition:()=>y.a.sourceFileLvl(4)>=1},"SF5.1":{...L["SF5.1"],Icon:"SF5.1",Visible:()=>M(y.a,5),Condition:()=>y.a.sourceFileLvl(5)>=1},"SF6.1":{...L["SF6.1"],Icon:"SF6.1",Visible:()=>M(y.a,6),Condition:()=>y.a.sourceFileLvl(6)>=1},"SF7.1":{...L["SF7.1"],Icon:"SF7.1",Visible:()=>M(y.a,7),Condition:()=>y.a.sourceFileLvl(7)>=1},"SF8.1":{...L["SF8.1"],Icon:"SF8.1",Visible:()=>M(y.a,8),Condition:()=>y.a.sourceFileLvl(8)>=1},"SF9.1":{...L["SF9.1"],Icon:"SF9.1",Visible:()=>M(y.a,9),Condition:()=>y.a.sourceFileLvl(9)>=1},"SF10.1":{...L["SF10.1"],Icon:"SF10.1",Visible:()=>M(y.a,10),Condition:()=>y.a.sourceFileLvl(10)>=1},"SF11.1":{...L["SF11.1"],Icon:"SF11.1",Visible:()=>M(y.a,11),Condition:()=>y.a.sourceFileLvl(11)>=1},"SF12.1":{...L["SF12.1"],Icon:"SF12.1",Visible:()=>M(y.a,12),Condition:()=>y.a.sourceFileLvl(12)>=1},MONEY_1Q:{...L.MONEY_1Q,Icon:"$1Q",Condition:()=>y.a.money>=1e18},MONEY_M1B:{...L.MONEY_M1B,Icon:"-1b",Secret:!0,Condition:()=>y.a.money<=-1e9},INSTALL_1:{...L.INSTALL_1,Icon:"install",Condition:()=>y.a.augmentations.length>=1},INSTALL_100:{...L.INSTALL_100,Icon:"install_100",Condition:()=>y.a.augmentations.length>=100},QUEUE_40:{...L.QUEUE_40,Icon:"queue40",Condition:()=>y.a.queuedAugmentations.length>=40},HACKING_100000:{...L.HACKING_100000,Icon:"hack100000",Condition:()=>y.a.hacking>=1e5},COMBAT_3000:{...L.COMBAT_3000,Icon:"combat3000",Condition:()=>y.a.strength>=3e3&&y.a.defense>=3e3&&y.a.dexterity>=3e3&&y.a.agility>=3e3},NEUROFLUX_255:{...L.NEUROFLUX_255,Icon:"nf255",Condition:()=>y.a.augmentations.some(t=>t.name===a.a.NeuroFluxGovernor&&t.level>=255)},NS2:{...L.NS2,Icon:"ns2",Condition:()=>y.a.getHomeComputer().scripts.some(t=>t.filename.endsWith(".js")||t.filename.endsWith(".ns"))},FROZE:{...L.FROZE,Icon:"forze",Condition:()=>location.href.includes("noScripts")},RUNNING_SCRIPTS_1000:{...L.RUNNING_SCRIPTS_1000,Icon:"run1000",Condition:()=>{let t=0;for(const e of Object(E.c)())t+=e.runningScripts.length;return t>=1e3}},DRAIN_SERVER:{...L.DRAIN_SERVER,Icon:"drain",Condition:()=>{for(const t of Object(E.c)())if(t instanceof k.a&&t.moneyMax>0&&0===t.moneyAvailable)return!0;return!1}},MAX_RAM:{...L.MAX_RAM,Icon:"maxram",Condition:()=>y.a.getHomeComputer().maxRam===o.a.HomeComputerMaxRam},MAX_CORES:{...L.MAX_CORES,Icon:"maxcores",Condition:()=>8===y.a.getHomeComputer().cpuCores},SCRIPTS_30:{...L.SCRIPTS_30,Icon:"folders",Condition:()=>y.a.getHomeComputer().scripts.length>=30},KARMA_1000000:{...L.KARMA_1000000,Icon:"karma",Secret:!0,Condition:()=>y.a.karma<=-1e6},STOCK_1q:{...L.STOCK_1q,Icon:"$1Q",Condition:()=>y.a.moneySourceB.stock>=1e15},DISCOUNT:{...L.DISCOUNT,Icon:"discount",Condition:()=>{const t=Object(E.d)("powerhouse-fitness");return t instanceof k.a&&t.backdoorInstalled}},SCRIPT_32GB:{...L.SCRIPT_32GB,Icon:"bigcost",Condition:()=>y.a.getHomeComputer().scripts.some(t=>t.ramUsage>=32)},FIRST_HACKNET_NODE:{...L.FIRST_HACKNET_NODE,Icon:"node",Condition:()=>!Object(h.g)(y.a)&&y.a.hacknetNodes.length>0},"30_HACKNET_NODE":{...L["30_HACKNET_NODE"],Icon:"hacknet-all",Condition:()=>!Object(h.g)(y.a)&&y.a.hacknetNodes.length>=30},MAX_HACKNET_NODE:{...L.MAX_HACKNET_NODE,Icon:"hacknet-max",Condition:()=>{if(Object(h.g)(y.a))return!1;for(const t of y.a.hacknetNodes){if(!(t instanceof d.a))return!1;if(t.ram===m.a.MaxRam&&t.cores===m.a.MaxCores&&t.level===m.a.MaxLevel)return!0}return!1}},HACKNET_NODE_10M:{...L.HACKNET_NODE_10M,Icon:"hacknet-10m",Condition:()=>!Object(h.g)(y.a)&&y.a.moneySourceB.hacknet>=1e7},REPUTATION_10M:{...L.REPUTATION_10M,Icon:"reputation",Condition:()=>Object.values(c.a).some(t=>t.playerReputation>=1e7)},DONATION:{...L.DONATION,Icon:"donation",Condition:()=>Object.values(c.a).some(t=>t.favor>=150)},TRAVEL:{...L.TRAVEL,Icon:"TRAVEL",Condition:()=>y.a.city!==g.a.Sector12},WORKOUT:{...L.WORKOUT,Icon:"WORKOUT",Condition:()=>[o.a.ClassGymStrength,o.a.ClassGymDefense,o.a.ClassGymDexterity,o.a.ClassGymAgility].includes(y.a.className)},TOR:{...L.TOR,Icon:"TOR",Condition:()=>y.a.hasTorRouter()},HOSPITALIZED:{...L.HOSPITALIZED,Icon:"OUCH",Condition:()=>0!==y.a.moneySourceB.hospitalization},GANG:{...L.GANG,Icon:"GANG",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang},FULL_GANG:{...L.FULL_GANG,Icon:"GANGMAX",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang&&y.a.gang.members.length===u.a.MaximumGangMembers},GANG_TERRITORY:{...L.GANG_TERRITORY,Icon:"GANG100%",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang&&f.a[y.a.gang.facName].territory>=.999},GANG_MEMBER_POWER:{...L.GANG_MEMBER_POWER,Icon:"GANG10000",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang&&y.a.gang.members.some(t=>t.hack>=1e4||t.str>=1e4||t.def>=1e4||t.dex>=1e4||t.agi>=1e4||t.cha>=1e4)},CORPORATION:{...L.CORPORATION,Icon:"CORP",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation},CORPORATION_BRIBE:{...L.CORPORATION_BRIBE,Icon:"CORPLOBBY",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation&&1===y.a.corporation.unlockUpgrades[6]},CORPORATION_PROD_1000:{...L.CORPORATION_PROD_1000,Icon:"CORP1000",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(t=>t.prodMult>=1e3)},CORPORATION_EMPLOYEE_3000:{...L.CORPORATION_EMPLOYEE_3000,Icon:"CORPCITY",Visible:()=>M(y.a,3),Condition:()=>{if(null===y.a.corporation)return!1;for(const t of y.a.corporation.divisions)for(const e of Object.values(t.offices))if(0!==e&&e.employees.length>=3e3)return!0;return!1}},CORPORATION_REAL_ESTATE:{...L.CORPORATION_REAL_ESTATE,Icon:"CORPRE",Name:"Own the land",Description:"Expand to the Real Estate division.",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(t=>t.type===s.a.RealEstate)},INTELLIGENCE_255:{...L.INTELLIGENCE_255,Icon:"INT255",Visible:()=>M(y.a,5),Condition:()=>y.a.intelligence>=255},BLADEBURNER_DIVISION:{...L.BLADEBURNER_DIVISION,Icon:"BLADE",Visible:()=>M(y.a,6),Condition:()=>null!==y.a.bladeburner},BLADEBURNER_OVERCLOCK:{...L.BLADEBURNER_OVERCLOCK,Icon:"BLADEOVERCLOCK",Visible:()=>M(y.a,6),Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skills[r.a.Overclock]===i.a[r.a.Overclock].maxLvl},BLADEBURNER_UNSPENT_100000:{...L.BLADEBURNER_UNSPENT_100000,Icon:"BLADE100K",Visible:()=>M(y.a,6),Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skillPoints>=1e5},"4S":{...L["4S"],Icon:"4S",Condition:()=>y.a.has4SData},FIRST_HACKNET_SERVER:{...L.FIRST_HACKNET_SERVER,Icon:"HASHNET",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.hacknetNodes.length>0,AdditionalUnlock:[L.FIRST_HACKNET_NODE.ID]},ALL_HACKNET_SERVER:{...L.ALL_HACKNET_SERVER,Icon:"HASHNETALL",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.hacknetNodes.length===m.b.MaxServers,AdditionalUnlock:[L["30_HACKNET_NODE"].ID]},MAX_HACKNET_SERVER:{...L.MAX_HACKNET_SERVER,Icon:"HASHNETALL",Visible:()=>M(y.a,9),Condition:()=>{if(!Object(h.g)(y.a))return!1;for(const t of y.a.hacknetNodes){if("string"!=typeof t)return!1;const e=Object(E.d)(t);if(!(e instanceof p.a))return!1;if(e.maxRam===m.b.MaxRam&&e.cores===m.b.MaxCores&&e.level===m.b.MaxLevel&&e.cache===m.b.MaxCache)return!0}return!1},AdditionalUnlock:[L.MAX_HACKNET_NODE.ID]},HACKNET_SERVER_1B:{...L.HACKNET_SERVER_1B,Icon:"HASHNETMONEY",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.moneySourceB.hacknet>=1e9,AdditionalUnlock:[L.HACKNET_NODE_10M.ID]},MAX_CACHE:{...L.MAX_CACHE,Icon:"HASHNETCAP",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.hashManager.hashes===y.a.hashManager.capacity&&y.a.hashManager.capacity>0},SLEEVE_8:{...L.SLEEVE_8,Icon:"SLEEVE8",Visible:()=>M(y.a,10),Condition:()=>8===y.a.sleeves.length&&3===y.a.sourceFileLvl(10)},INDECISIVE:{...L.INDECISIVE,Icon:"1H",Visible:()=>T(y.a),Condition:function(){let t=0;return setInterval(()=>{_.b.page()===w.a.BitVerse?t++:t=0},6e4),()=>t>60}()},FAST_BN:{...L.FAST_BN,Icon:"2DAYS",Visible:()=>T(y.a),Condition:()=>O()&&y.a.playtimeSinceLastBitnode<1728e5},CHALLENGE_BN1:{...L.CHALLENGE_BN1,Icon:"BN1+",Visible:()=>T(y.a),Condition:()=>1===y.a.bitNodeN&&O()&&y.a.getHomeComputer().maxRam<=128&&1===y.a.getHomeComputer().cpuCores},CHALLENGE_BN2:{...L.CHALLENGE_BN2,Icon:"BN2+",Visible:()=>M(y.a,2),Condition:()=>2===y.a.bitNodeN&&O()&&null===y.a.gang},CHALLENGE_BN3:{...L.CHALLENGE_BN3,Icon:"BN3+",Visible:()=>M(y.a,3),Condition:()=>3===y.a.bitNodeN&&O()&&null===y.a.corporation},CHALLENGE_BN6:{...L.CHALLENGE_BN6,Icon:"BN6+",Visible:()=>M(y.a,6),Condition:()=>6===y.a.bitNodeN&&O()&&null===y.a.bladeburner},CHALLENGE_BN7:{...L.CHALLENGE_BN7,Icon:"BN7+",Visible:()=>M(y.a,7),Condition:()=>7===y.a.bitNodeN&&O()&&null===y.a.bladeburner},CHALLENGE_BN8:{...L.CHALLENGE_BN8,Icon:"BN8+",Visible:()=>M(y.a,8),Condition:()=>8===y.a.bitNodeN&&O()&&!y.a.has4SData&&!y.a.has4SDataTixApi},CHALLENGE_BN9:{...L.CHALLENGE_BN9,Icon:"BN9+",Visible:()=>M(y.a,9),Condition:()=>9===y.a.bitNodeN&&O()&&0===y.a.moneySourceB.hacknet&&0===y.a.moneySourceB.hacknet_expenses},CHALLENGE_BN10:{...L.CHALLENGE_BN10,Icon:"BN10+",Visible:()=>M(y.a,10),Condition:()=>10===y.a.bitNodeN&&O()&&!y.a.sleeves.some(t=>t.augmentations.length>0||t.hacking_exp>0||t.strength_exp>0||t.defense_exp>0||t.agility_exp>0||t.dexterity_exp>0||t.charisma_exp>0)},CHALLENGE_BN12:{...L.CHALLENGE_BN12,Icon:"BN12+",Visible:()=>M(y.a,12),Condition:()=>y.a.sourceFileLvl(12)>=50},BYPASS:{...L.BYPASS,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.Bypass)},PROTOTYPETAMPERING:{...L.PROTOTYPETAMPERING,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.PrototypeTampering)},UNCLICKABLE:{...L.UNCLICKABLE,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.Unclickable)},UNDOCUMENTEDFUNCTIONCALL:{...L.UNDOCUMENTEDFUNCTIONCALL,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.UndocumentedFunctionCall)},TIMECOMPRESSION:{...L.TIMECOMPRESSION,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.TimeCompression)},REALITYALTERATION:{...L.REALITYALTERATION,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.RealityAlteration)},N00DLES:{...L.N00DLES,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.N00dles)},EDITSAVEFILE:{...L.EDITSAVEFILE,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.EditSaveFile)},UNACHIEVABLE:{...L.UNACHIEVABLE,Icon:"SF-1",Secret:!0,Condition:()=>!1},CHALLENGE_BN13:{...L.CHALLENGE_BN13,Icon:"BN13+",Visible:()=>M(y.a,13),Condition:()=>13===y.a.bitNodeN&&O()&&!y.a.augmentations.some(t=>t.name===a.a.StaneksGift1)},DEVMENU:{...L.DEVMENU,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.YoureNotMeantToAccessThis)},RAINBOW:{...L.RAINBOW,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.INeedARainbow)},TRUE_RECURSION:{...L.TRUE_RECURSION,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.TrueRecursion)}};function R(){const t=y.a.achievements.map(t=>t.ID),e=Object.values(A).filter(e=>!t.includes(e.ID)&&e.Condition()).flatMap(t=>[t.ID,...t.AdditionalUnlock||[]]);for(const t of e)y.a.giveAchievement(t);document.achievements=[...y.a.achievements.map(t=>t.ID)]}},function(t,e,n){"use strict";n.d(e,"b",(function(){return P})),n.d(e,"a",(function(){return I}));var a=n(0),r=n.n(a),i=n(125),o=n(113),s=n(137),l=n(4),c=n(116),f=n(1150),u=n(24),m=n(179),h=n(145),d=n(31),p=n(45),g=n(1),y=n(10),b=n(114),E=n(452),v=n.n(E),k=n(1152),_=n.n(k),w=n(9),S=n(30),C=n(386),x=n(6),L=n(23),O=n(21),M=n(8);function T(){const t=Object(i.a)(),e=S.b.Player(),n=P();if(0===e.intelligence)return r.a.createElement(r.a.Fragment,null);const a=e.calculateSkillProgress(e.intelligence_exp);return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:n.cell}},r.a.createElement(g.a,{classes:{root:n.int}},"Int ")),r.a.createElement(d.a,{align:"right",classes:{root:n.cell}},r.a.createElement(g.a,{classes:{root:n.int}},l.a.formatSkill(e.intelligence))),r.a.createElement(d.a,{align:"right",classes:{root:n.cell}},r.a.createElement(g.a,{id:"overview-int-hook",classes:{root:n.int}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:a,color:t.colors.int})))}function A(){const t=S.b.Player(),e=P(),n=t.bladeburner;if(null===n)return r.a.createElement(r.a.Fragment,null);const a=n.getTypeAndNameFromActionId(n.action);return"Idle"===a.type?r.a.createElement(r.a.Fragment,null):r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:e.cellNone}},r.a.createElement(g.a,null,"Bladeburner:"))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:e.cellNone}},r.a.createElement(g.a,null,a.type,": ",a.name))))}function R({tooltip:t,children:e,onClickFocus:n,header:a}){const i=P();return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:i.workCell}},r.a.createElement(L.a,{title:r.a.createElement(r.a.Fragment,null,t)},r.a.createElement(g.a,{className:i.workHeader,sx:{pt:1,pb:.5}},a)))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:i.workCell}},r.a.createElement(g.a,{className:i.workSubtitles},e))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",align:"center",colSpan:2,classes:{root:i.cellNone}},r.a.createElement(y.a,{sx:{mt:1},onClick:n},"Focus"))))}function N(){const t=S.b.Player(),e=S.b.Router();if(!t.isWorking||t.focus)return r.a.createElement(r.a.Fragment,null);let n=r.a.createElement(r.a.Fragment,null),a=r.a.createElement(r.a.Fragment,null),i=r.a.createElement(r.a.Fragment,null);switch(t.workType){case M.a.WorkTypeCompanyPartTime:case M.a.WorkTypeCompany:n=r.a.createElement(r.a.Fragment,null,t.jobs[t.companyName]," at ",r.a.createElement("strong",null,t.companyName)),a=r.a.createElement(r.a.Fragment,null,"Working at ",r.a.createElement("strong",null,t.companyName)),i=r.a.createElement(r.a.Fragment,null,"+",r.a.createElement(c.a,{reputation:t.workRepGained})," rep");break;case M.a.WorkTypeFaction:n=r.a.createElement(r.a.Fragment,null,t.factionWorkType," for ",r.a.createElement("strong",null,t.currentWorkFactionName)),a=r.a.createElement(r.a.Fragment,null,"Working for ",r.a.createElement("strong",null,t.currentWorkFactionName)),i=r.a.createElement(r.a.Fragment,null,"+",r.a.createElement(c.a,{reputation:t.workRepGained})," rep");break;case M.a.WorkTypeStudyClass:n=r.a.createElement(r.a.Fragment,null,t.workType),a=r.a.createElement(r.a.Fragment,null,"You are ",t.className),i=r.a.createElement(r.a.Fragment,null,Object(u.b)(t.timeWorked));break;case M.a.WorkTypeCreateProgram:n=r.a.createElement(r.a.Fragment,null,"Coding ",t.createProgramName),a=r.a.createElement(r.a.Fragment,null,"Creating a program"),i=r.a.createElement(r.a.Fragment,null,t.createProgramName," ",(t.timeWorkedCreateProgram/t.timeNeededToCompleteWork*100).toFixed(2),"%");break;case M.a.WorkTypeGraftAugmentation:n=r.a.createElement(r.a.Fragment,null,"Grafting ",t.graftAugmentationName),a=r.a.createElement(r.a.Fragment,null,"Grafting an Augmentation"),i=r.a.createElement(r.a.Fragment,null,r.a.createElement("strong",null,(t.timeWorkedGraftAugmentation/t.timeNeededToCompleteWork*100).toFixed(2),"%")," ","done")}return r.a.createElement(R,{tooltip:n,header:a,onClickFocus:()=>{t.startFocusing(),e.toWork()}},i)}const P=Object(o.a)(t=>Object(s.a)({workCell:{textAlign:"center",maxWidth:"200px",borderBottom:"none",padding:0,margin:0},workHeader:{fontSize:"0.9rem"},workSubtitles:{fontSize:"0.8rem"},cellNone:{borderBottom:"none",padding:0,margin:0},cell:{padding:0,margin:0},hp:{color:t.colors.hp},money:{color:t.colors.money},hack:{color:t.colors.hack},combat:{color:t.colors.combat},cha:{color:t.colors.cha},int:{color:t.colors.int}}));function I({save:t,killScripts:e}){const[n,o]=Object(a.useState)(!1),s=S.b.Player(),c=Object(a.useState)(!1)[1];Object(a.useEffect)(()=>{const t=setInterval(()=>c(t=>!t),600);return()=>clearInterval(t)},[]);const u=P(),y=Object(i.a)(),E=s.calculateSkillProgress(s.hacking_exp,s.hacking_mult*x.a.HackingLevelMultiplier),k=s.calculateSkillProgress(s.strength_exp,s.strength_mult*x.a.StrengthLevelMultiplier),M=s.calculateSkillProgress(s.defense_exp,s.defense_mult*x.a.DefenseLevelMultiplier),R=s.calculateSkillProgress(s.dexterity_exp,s.dexterity_mult*x.a.DexterityLevelMultiplier),I=s.calculateSkillProgress(s.agility_exp,s.agility_mult*x.a.AgilityLevelMultiplier),F=s.calculateSkillProgress(s.charisma_exp,s.charisma_mult*x.a.CharismaLevelMultiplier);return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{sx:{display:"block",m:1}},r.a.createElement(h.a,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hp}},"HP ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hp}},l.a.formatHp(s.hp)," / ",l.a.formatHp(s.max_hp))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-hp-hook",classes:{root:u.hp}}))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.money}},"Money ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.money}},l.a.formatMoney(s.money))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-money-hook",classes:{root:u.money}}))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hack}},"Hack ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hack}},l.a.formatSkill(s.hacking)))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:E,color:y.colors.hack})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cell}},r.a.createElement(g.a,{classes:{root:u.hack}})),r.a.createElement(d.a,{align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-hack-hook",classes:{root:u.hack}}))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},"Str ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.strength))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-str-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:k,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},"Def ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.defense))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-def-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:M,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},"Dex ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.dexterity))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-dex-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:R,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cell}},r.a.createElement(g.a,{classes:{root:u.combat}},"Agi ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.agility))),r.a.createElement(d.a,{align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-agi-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:I,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.cha}},"Cha ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.cha}},l.a.formatSkill(s.charisma))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-cha-hook",classes:{root:u.cha}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:F,color:y.colors.cha})),r.a.createElement(T,null),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-extra-hook-0",classes:{root:u.hack}})),r.a.createElement(d.a,{component:"th",scope:"row",align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-extra-hook-1",classes:{root:u.hack}})),r.a.createElement(d.a,{component:"th",scope:"row",align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-extra-hook-2",classes:{root:u.hack}}))),r.a.createElement(N,null),r.a.createElement(A,null))),r.a.createElement(O.a,{sx:{display:"flex",borderTop:"1px solid "+w.a.theme.welllight}},r.a.createElement(O.a,{sx:{display:"flex",flex:1,justifyContent:"flex-start",alignItems:"center"}},r.a.createElement(b.a,{"aria-label":"save game",onClick:t},r.a.createElement(L.a,{title:0!==w.a.AutosaveInterval?"Save game":"Save game (auto-saves are disabled!)"},r.a.createElement(v.a,{color:0!==w.a.AutosaveInterval?"primary":"error"})))),r.a.createElement(O.a,{sx:{display:"flex",flex:1,justifyContent:"flex-end",alignItems:"center"}},r.a.createElement(b.a,{"aria-label":"kill all scripts",onClick:()=>o(!0)},r.a.createElement(L.a,{title:"Kill all running scripts"},r.a.createElement(_.a,{color:"error"}))))),r.a.createElement(f.a,{open:n,onClose:()=>o(!1),killScripts:e}))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={0:[0,2e10,"Export","Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities."],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."],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."],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."],4:[4,1e10,"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."],5:[5,5e14,"Shady Accounting","Utilize unscrupulous accounting practices and pay off government officials to save money on taxes. This reduces the dividend tax rate by 5%."],6:[6,2e15,"Government Partnership","Help national governments further their agendas in exchange for lowered taxes. This reduces the dividend tax rate by 10%"],7:[7,5e10,"Warehouse API","Enables the warehouse API."],8:[8,5e10,"Office API","Enables the office API."]}},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"c",(function(){return m})),n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(2),o=n(340),s=n(580),l=n(82),c=n(363),f=n(16);let u=!1;function m(t){u=t}function h(t,e,n,a){e?0===l.a[5]&&5!==a&&(i.a.intelligence=0,i.a.intelligence_exp=0):function(t){const e="SourceFile"+t.toString(),n=c.a[e];if(null==n)return void console.error("Could not find source file for Bit node: "+t);let a=!1,o=null;for(let e=0;e=3&&12!==o.n?Object(f.a)(`The Source-File for the BitNode you just destroyed, ${n.name}, is already at max level!`):(++o.lvl,Object(f.a)(n.name+" was upgraded to level "+o.lvl+" for destroying its corresponding BitNode!"));else{const e=new s.a(t,1);i.a.sourceFiles.push(e),5===t&&0===i.a.intelligence&&(i.a.intelligence=1),Object(f.a)(r.a.createElement(r.a.Fragment,null,"You received a Source-File for destroying a BitNode!",r.a.createElement("br",null),r.a.createElement("br",null),n.name,r.a.createElement("br",null),r.a.createElement("br",null),n.info))}}(n),5===a&&0===i.a.intelligence&&(i.a.intelligence=1),u=!1,i.a.bitNodeN=a,6===a?t.toBladeburnerCinematic():t.toTerminal(),Object(o.b)(e)}},,function(t,e,n){"use strict";function a(t,e){if(e<0||e>100)return t;const n=t*(e/100);return t+(Math.random()*(2*n)-n)}n.d(e,"a",(function(){return a}))},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));class a{constructor(t,e,n){this.program=t,this.price=e,this.description=n}}},,,,,,,function(t,e,n){"use strict";function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o}));const r=new class{constructor(){a(this,"m",1024),a(this,"a",341),a(this,"c",1),this.x=0,this.reset()}step(){this.x=(this.a*this.x+this.c)%this.m}random(){return this.step(),this.x/this.m}reset(){this.x=(new Date).getTime()%this.m}};class i{constructor(t){a(this,"s1",0),a(this,"s2",0),a(this,"s3",0);const e=t/1e3%3e4;this.s1=e,this.s2=e,this.s3=e}step(){this.s1=171*this.s1%30269,this.s2=172*this.s2%30307,this.s3=170*this.s3%30323}random(){return this.step(),(this.s1/30269+this.s2/30307+this.s3/30323)%1}}function o(t){let e=1779033703^t.length;for(let n=0;n>>19;const n=()=>(e=Math.imul(e^e>>>16,2246822507),e=Math.imul(e^e>>>13,3266489909),(e^=e>>>16)>>>0);let a=n(),r=n(),i=n(),o=n();return()=>{a>>>=0,r>>>=0,i>>>=0,o>>>=0;let t=a+r|0;return a=r^r>>>9,r=i+(i<<3)|0,i=i<<21|i>>>11,o=o+1|0,t=t+o|0,i=i+t|0,(t>>>0)/4294967296}}},,,,,,,function(t,e,n){"use strict";function a(t,e){if(t.length!==e.length)return!1;for(let n=0;nObject(o.a)({favor:{color:t.colors.rep}}));function l({favor:t}){const e=s();return a.createElement("span",{className:e.favor},"number"==typeof t?r.a.formatFavor(t):t)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var a=n(77),r=n(261),i=n(6),o=n(85),s=n(66),l=n(237),c=n(94),f=n(8),u=n(204),m=n(29),h=n(185),d=n(17),p=n(11),g=n(25);function y(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class b extends r.a{constructor(t=null){super(),y(this,"className",""),y(this,"crimeType",""),y(this,"currentTask",a.a.Idle),y(this,"currentTaskLocation",""),y(this,"currentTaskMaxTime",0),y(this,"currentTaskTime",0),y(this,"earningsForSleeves",Object(r.b)()),y(this,"earningsForPlayer",Object(r.b)()),y(this,"earningsForTask",Object(r.b)()),y(this,"factionWorkType",h.a.None),y(this,"gainRatesForTask",Object(r.b)()),y(this,"gymStatType",""),y(this,"logs",[]),y(this,"memory",1),y(this,"shock",1),y(this,"storedCycles",0),y(this,"sync",1),null!=t&&this.shockRecovery(t)}commitCrime(t,e){const n=o.a[e]||Object.values(o.a).find(t=>t.name===e);return!!n&&(this.currentTask!==a.a.Idle?this.finishTask(t):this.resetTaskStatus(),this.gainRatesForTask.hack=n.hacking_exp*this.hacking_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.str=n.strength_exp*this.strength_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.def=n.defense_exp*this.defense_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.dex=n.dexterity_exp*this.dexterity_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.agi=n.agility_exp*this.agility_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.cha=n.charisma_exp*this.charisma_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.money=n.money*this.crime_money_mult*i.a.CrimeMoney,this.currentTaskLocation=String(this.gainRatesForTask.money),this.crimeType=n.name,this.currentTaskMaxTime=n.time,this.currentTask=a.a.Crime,!0)}finishTask(t){let e=Object(r.b)();if(this.currentTask===a.a.Crime&&this.currentTaskTime>=this.currentTaskMaxTime){const n=Object.values(o.a).find(t=>t.name===this.crimeType);if(!n)return console.error("Invalid data stored in sleeve.crimeType: "+this.crimeType),this.resetTaskStatus(),e;if(Math.random()0&&(this.hacking_exp+=e.hack),e.str>0&&(this.strength_exp+=e.str),e.def>0&&(this.defense_exp+=e.def),e.dex>0&&(this.dexterity_exp+=e.dex),e.agi>0&&(this.agility_exp+=e.agi),e.cha>0&&(this.charisma_exp+=e.cha),Object(r.b)();const i=this.shock/100*(this.sync/100)*n,o=e.hack*i,s=e.str*i,l=e.def*i,c=e.dex*i,f=e.agi*i,u=e.cha*i;return o>0&&(this.hacking_exp+=o,t.gainHackingExp(o),this.earningsForPlayer.hack+=o,this.earningsForTask.hack+=o),s>0&&(this.strength_exp+=s,t.gainStrengthExp(s),this.earningsForPlayer.str+=s,this.earningsForTask.str+=s),l>0&&(this.defense_exp+=l,t.gainDefenseExp(l),this.earningsForPlayer.def+=l,this.earningsForTask.def+=l),c>0&&(this.dexterity_exp+=c,t.gainDexterityExp(c),this.earningsForPlayer.dex+=c,this.earningsForTask.dex+=c),f>0&&(this.agility_exp+=f,t.gainAgilityExp(f),this.earningsForPlayer.agi+=f,this.earningsForTask.agi+=f),u>0&&(this.charisma_exp+=u,t.gainCharismaExp(u),this.earningsForPlayer.cha+=u,this.earningsForTask.cha+=u),this.earningsForSleeves.hack+=o*(this.sync/100),this.earningsForSleeves.str+=s*(this.sync/100),this.earningsForSleeves.def+=l*(this.sync/100),this.earningsForSleeves.dex+=c*(this.sync/100),this.earningsForSleeves.agi+=f*(this.sync/100),this.earningsForSleeves.cha+=u*(this.sync/100),{hack:o*(this.sync/100),str:s*(this.sync/100),def:l*(this.sync/100),dex:c*(this.sync/100),agi:f*(this.sync/100),cha:u*(this.sync/100),money:0}}gainMoney(t,e,n=1){const a=e.money*n;this.earningsForTask.money+=a,this.earningsForPlayer.money+=a,t.gainMoney(a,"sleeves")}getMemoryUpgradeCost(t){const e=Math.round(t);if(e<0)return 0;if(this.memory+e>100)return this.getMemoryUpgradeCost(100-this.memory);let n=0,a=this.memory-1;for(let e=0;e50&&this.logs.shift()}prestige(t){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.resetTaskStatus(),this.earningsForSleeves=Object(r.b)(),this.earningsForPlayer=Object(r.b)(),this.shockRecovery(t),this.augmentations=[],this.resetMultipliers(),this.city=d.a.Sector12,this.shock=1,this.storedCycles=0,this.sync=Math.max(this.memory,1),this.logs=[]}process(t,e=1){const n=1e3/f.a.MilliPerCycle;if(this.storedCycles+=e,this.storedCyclesthis.currentTaskMaxTime&&(o=this.currentTaskMaxTime-this.currentTaskTime,i=Math.floor(o/f.a.MilliPerCycle),(o<0||i<0)&&(console.warn("Sleeve.process() calculated negative cycle usage"),o=0,i=0)),this.currentTaskTime+=o,this.shock=Math.min(100,this.shock+1e-4*i);let c=Object(r.b)();switch(this.currentTask){case a.a.Idle:break;case a.a.Class:case a.a.Gym:this.updateTaskGainRates(t),c=this.gainExperience(t,this.gainRatesForTask,i),this.gainMoney(t,this.gainRatesForTask,i);break;case a.a.Faction:{c=this.gainExperience(t,this.gainRatesForTask,i),this.gainMoney(t,this.gainRatesForTask,i);const e=m.a[this.currentTaskLocation];if(!(e instanceof u.a)){console.error("Invalid faction for Sleeve task: "+this.currentTaskLocation);break}e.playerReputation+=this.getRepGain(t)*i;break}case a.a.Company:{c=this.gainExperience(t,this.gainRatesForTask,i),this.gainMoney(t,this.gainRatesForTask,i);const e=s.a[this.currentTaskLocation];if(!(e instanceof l.a)){console.error("Invalid company for Sleeve task: "+this.currentTaskLocation);break}e.playerReputation+=this.getRepGain(t)*i;break}case a.a.Recovery:this.shock=Math.min(100,this.shock+2e-4*i),this.shock>=100&&this.resetTaskStatus();break;case a.a.Synchro:this.sync=Math.min(100,this.sync+2e-4*t.getIntelligenceBonus(.5)*i),this.sync>=100&&this.resetTaskStatus()}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===a.a.Crime?c=this.finishTask(t):this.finishTask(t)),this.updateStatLevels(),this.storedCycles-=i,c}resetTaskStatus(){this.earningsForTask=Object(r.b)(),this.gainRatesForTask=Object(r.b)(),this.currentTask=a.a.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=h.a.None,this.crimeType="",this.currentTaskLocation="",this.gymStatType="",this.className=""}shockRecovery(t){return this.currentTask!==a.a.Idle?this.finishTask(t):this.resetTaskStatus(),this.currentTask=a.a.Recovery,!0}synchronize(t){return this.currentTask!==a.a.Idle?this.finishTask(t):this.resetTaskStatus(),this.currentTask=a.a.Synchro,!0}takeUniversityCourse(t,e,n){this.currentTask!==a.a.Idle?this.finishTask(t):this.resetTaskStatus();let r=1;switch(e.toLowerCase()){case p.a.AevumSummitUniversity.toLowerCase():if(this.city!==d.a.Aevum)return!1;this.currentTaskLocation=p.a.AevumSummitUniversity,r=4;break;case p.a.Sector12RothmanUniversity.toLowerCase():if(this.city!==d.a.Sector12)return!1;this.currentTaskLocation=p.a.Sector12RothmanUniversity,r=3;break;case p.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(this.city!==d.a.Volhaven)return!1;this.currentTaskLocation=p.a.VolhavenZBInstituteOfTechnology,r=5;break;default:return!1}switch(n.toLowerCase()){case"study computer science":break;case"data structures":this.gainRatesForTask.money=f.a.ClassDataStructuresBaseCost*r*-1;break;case"networks":this.gainRatesForTask.money=f.a.ClassNetworksBaseCost*r*-1;break;case"algorithms":this.gainRatesForTask.money=f.a.ClassAlgorithmsBaseCost*r*-1;break;case"management":this.gainRatesForTask.money=f.a.ClassManagementBaseCost*r*-1;break;case"leadership":this.gainRatesForTask.money=f.a.ClassLeadershipBaseCost*r*-1;break;default:return!1}return this.className=n,this.currentTask=a.a.Class,!0}travel(t,e){return t.loseMoney(f.a.TravelCost,"sleeves"),this.city=e,!0}tryBuyAugmentation(t,e){return!!t.canAfford(e.startingCost)&&(!this.augmentations.some(t=>t.name===e.name)&&(t.loseMoney(e.startingCost,"sleeves"),this.installAugmentation(e),!0))}updateTaskGainRates(t){if(this.currentTask!==a.a.Class)if(this.currentTask!==a.a.Gym)console.warn("Sleeve.updateTaskGainRates() called for unexpected task type "+this.currentTask);else{let e=1;switch(this.currentTaskLocation.toLowerCase()){case p.a.AevumCrushFitnessGym.toLowerCase():e=2;break;case p.a.AevumSnapFitnessGym.toLowerCase():e=5;break;case p.a.Sector12IronGym.toLowerCase():e=1;break;case p.a.Sector12PowerhouseGym.toLowerCase():e=10;break;case p.a.VolhavenMilleniumFitnessGym.toLowerCase():e=4;break;default:return}const n=1,a=t.hashManager.getTrainingMult()*e,r=this.gymStatType.toLowerCase();r.includes("str")?this.gainRatesForTask.str=n*a*this.strength_exp_mult:r.includes("def")?this.gainRatesForTask.def=n*a*this.defense_exp_mult:r.includes("dex")?this.gainRatesForTask.dex=n*a*this.dexterity_exp_mult:r.includes("agi")&&(this.gainRatesForTask.agi=n*a*this.agility_exp_mult)}else{let e=1;switch(this.currentTaskLocation.toLowerCase()){case p.a.AevumSummitUniversity.toLowerCase():e=3;break;case p.a.Sector12RothmanUniversity.toLowerCase():e=2;break;case p.a.VolhavenZBInstituteOfTechnology.toLowerCase():e=4;break;default:return}const n=e*t.hashManager.getStudyMult();switch(this.className.toLowerCase()){case"study computer science":this.gainRatesForTask.hack=f.a.ClassStudyComputerScienceBaseExp*n*this.hacking_exp_mult;break;case"data structures":this.gainRatesForTask.hack=f.a.ClassDataStructuresBaseExp*n*this.hacking_exp_mult;break;case"networks":this.gainRatesForTask.hack=f.a.ClassNetworksBaseExp*n*this.hacking_exp_mult;break;case"algorithms":this.gainRatesForTask.hack=f.a.ClassAlgorithmsBaseExp*n*this.hacking_exp_mult;break;case"management":this.gainRatesForTask.cha=f.a.ClassManagementBaseExp*n*this.charisma_exp_mult;break;case"leadership":this.gainRatesForTask.cha=f.a.ClassLeadershipBaseExp*n*this.charisma_exp_mult}}}upgradeMemory(t){t<0?console.warn("Sleeve.upgradeMemory() called with negative value: "+t):this.memory=Math.min(100,Math.round(this.memory+t))}workForCompany(t,e){if(!(s.a[e]instanceof l.a)||null==t.jobs[e])return!1;this.currentTask!==a.a.Idle?this.finishTask(t):this.resetTaskStatus();const n=s.a[e],r=c.a[t.jobs[e]];return null!=n&&(null!=r&&(this.gainRatesForTask.money=r.baseSalary*n.salaryMultiplier*this.work_money_mult*i.a.CompanyWorkMoney,this.gainRatesForTask.hack=r.hackingExpGain*n.expMultiplier*this.hacking_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.str=r.strengthExpGain*n.expMultiplier*this.strength_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.def=r.defenseExpGain*n.expMultiplier*this.defense_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.dex=r.dexterityExpGain*n.expMultiplier*this.dexterity_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.agi=r.agilityExpGain*n.expMultiplier*this.agility_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.cha=r.charismaExpGain*n.expMultiplier*this.charisma_exp_mult*i.a.CompanyWorkExpGain,this.currentTaskLocation=e,this.currentTask=a.a.Company,!0))}workForFaction(t,e,n){const r=m.a[e];if(!(""!==e&&r&&r instanceof u.a&&t.factions.includes(e)))return!1;this.currentTask!==a.a.Idle?this.finishTask(t):this.resetTaskStatus();const o=r.getInfo(),s=n.toLowerCase();if(s.includes("hack")){if(!o.offerHackingWork)return!1;this.factionWorkType=h.a.Hacking,this.gainRatesForTask.hack=.15*this.hacking_exp_mult*i.a.FactionWorkExpGain}else if(s.includes("field")){if(!o.offerFieldWork)return!1;this.factionWorkType=h.a.Field,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.str=.1*this.strength_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.def=.1*this.defense_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.dex=.1*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.agi=.1*this.agility_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.cha=.1*this.charisma_exp_mult*i.a.FactionWorkExpGain}else{if(!s.includes("security"))return!1;if(!o.offerSecurityWork)return!1;this.factionWorkType=h.a.Security,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.str=.15*this.strength_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.def=.15*this.defense_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.dex=.15*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.agi=.15*this.agility_exp_mult*i.a.FactionWorkExpGain}return this.currentTaskLocation=e,this.currentTask=a.a.Faction,!0}workoutAtGym(t,e,n){this.currentTask!==a.a.Idle?this.finishTask(t):this.resetTaskStatus();let r=1;switch(e.toLowerCase()){case p.a.AevumCrushFitnessGym.toLowerCase():if(this.city!=d.a.Aevum)return!1;this.currentTaskLocation=p.a.AevumCrushFitnessGym,r=3;break;case p.a.AevumSnapFitnessGym.toLowerCase():if(this.city!=d.a.Aevum)return!1;this.currentTaskLocation=p.a.AevumSnapFitnessGym,r=10;break;case p.a.Sector12IronGym.toLowerCase():if(this.city!=d.a.Sector12)return!1;this.currentTaskLocation=p.a.Sector12IronGym,r=1;break;case p.a.Sector12PowerhouseGym.toLowerCase():if(this.city!=d.a.Sector12)return!1;this.currentTaskLocation=p.a.Sector12PowerhouseGym,r=20;break;case p.a.VolhavenMilleniumFitnessGym.toLowerCase():if(this.city!=d.a.Volhaven)return!1;this.currentTaskLocation=p.a.VolhavenMilleniumFitnessGym,r=7;break;default:return!1}const i=n.toLowerCase();return this.gainRatesForTask.money=f.a.ClassGymBaseCost*r*-1,!!(i.includes("str")||i.includes("def")||i.includes("dex")||i.includes("agi"))&&(this.gymStatType=n,this.currentTask=a.a.Gym,!0)}toJSON(){return Object(g.b)("Sleeve",this)}static fromJSON(t){return Object(g.a)(b,t.data)}}g.c.constructors.Sleeve=b},function(t,e,n){"use strict";let a;n.d(e,"a",(function(){return a})),function(t){t[t.SyntaxError=-1]="SyntaxError",t[t.ImportError=-2]="ImportError",t[t.URLImportError=-3]="URLImportError"}(a||(a={}))},function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var a=n(131);const r=new a.a,i=new a.a},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(25);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class i{constructor(t="",e=""){r(this,"filename",""),r(this,"msg",""),r(this,"recvd",!1),this.filename=t,this.msg=e,this.recvd=!1}toJSON(){return Object(a.b)("Message",this)}static fromJSON(t){return Object(a.a)(i,t.data)}}a.c.constructors.Message=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(245),r=n(148),i=n(112),o=n(76),s=n(4),l=n(20),c=n(16),f=n(9),u=n(0);function m(t,e,n,a){const s=a.stockMarket.Orders;if(null==s){const t={};for(const e of Object.keys(a.stockMarket)){const n=a.stockMarket[e];n instanceof r.a&&(t[n.symbol]=[])}return void(a.stockMarket.Orders=t)}let l=s[t.symbol];if(null==l||l.constructor!==Array)return console.error(`Invalid Order book for ${t.symbol} in processOrders(): ${l}`),void(l=[]);for(const r of l)if(r.type===e&&r.pos===n)switch(r.type){case i.a.LimitBuy:(r.pos===o.a.Long&&t.price<=r.price||r.pos===o.a.Short&&t.price>=r.price)&&h(r,a);break;case i.a.LimitSell:case i.a.StopBuy:(r.pos===o.a.Long&&t.price>=r.price||r.pos===o.a.Short&&t.price<=r.price)&&h(r,a);break;case i.a.StopSell:(r.pos===o.a.Long&&t.price<=r.price||r.pos===o.a.Short&&t.price>=r.price)&&h(r,a);break;default:return void console.warn("Invalid order type: "+r.type)}}function h(t,e){const n=e.symbolToStockMap[t.stockSymbol];if(!(n instanceof r.a))return void console.error("Could not find stock for this order: "+t.stockSymbol);const m=e.stockMarket.Orders[n.symbol],h={suppressDialog:!0};let d=!0,p=!1;switch(t.type){case i.a.LimitBuy:case i.a.StopBuy:p=!0,t.pos===o.a.Long?d=Object(a.a)(n,t.shares,null,h)&&d:t.pos===o.a.Short&&(d=Object(a.d)(n,t.shares,null,h)&&d);break;case i.a.LimitSell:case i.a.StopSell:t.pos===o.a.Long?d=Object(a.c)(n,t.shares,null,h)&&d:t.pos===o.a.Short&&(d=Object(a.b)(n,t.shares,null,h)&&d);break;default:return void console.warn("Invalid order type: "+t.type)}const g=t.pos===o.a.Long?"Long":"Short";if(d){for(let e=0;e({...a})},,function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return m}));var a=n(0),r=n.n(a),i=n(131),o=n(41),s=n(1),l=n(21),c=n(746);const f=new i.a;let u=0;function m(){const[t,e]=Object(a.useState)([]);return Object(a.useEffect)(()=>f.subscribe(t=>{const n=u+"";u++,e(e=>{const a=function(t){return"string"==typeof t?Object(c.sha256)(t):Object(c.sha256)(JSON.stringify(t.props))}(t);return e.some(t=>t.hash===a)?(console.log("Duplicate message"),e):[...e,{id:n,text:t,hash:a}]})}),[]),Object(a.useEffect)(()=>{function t(t){"Escape"===t.code&&e([])}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[]),r.a.createElement(r.a.Fragment,null,t.length>0&&r.a.createElement(o.a,{open:!0,onClose:function(){e(t=>t.slice(1,1e99))}},r.a.createElement(l.a,{overflow:"scroll",sx:{overflowWrap:"break-word",whiteSpace:"pre-line"}},r.a.createElement(s.a,{component:"span"},t[0].text))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(526);function r(){return Object(a.a)(99)+"."+Object(a.a)(9)+"."+Object(a.a)(9)+"."+Object(a.a)(9)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return I})),n.d(e,"b",(function(){return F}));var a=n(5),r=n(17),i=n(57),o=n(141),s=n(15),l=n(219),c=n(236),f=n(66),u=n(50),m=n(64),h=n(204),d=n(29),p=n(105),g=n(55),y=n(267),b=n(197),E=n(2),v=n(96),k=n(512),_=n(63),w=n(26),S=n(132),C=n(82),x=n(102),L=n(101),O=n(87),M=n(16),T=n(119),A=n(404),R=n(405),N=n(8),P=n(181);function I(){Object(l.b)(E.a);const t=E.a.factions.concat(E.a.factionInvitations).filter((function(t){return d.a[t].getInfo().keep}));E.a.prestigeAugmentation(),Object(b.c)();const e=E.a.getHomeComputer();Object(w.i)(),Object(w.a)(e),Object(S.d)(E.a,e),Object(o.b)(s.a.Neurolink)&&i.a[s.a.Neurolink].owned&&(e.programs.push(m.a.FTPCrackProgram.name),e.programs.push(m.a.RelaySMTPProgram.name)),Object(o.b)(s.a.CashRoot)&&i.a[s.a.CashRoot].owned&&(E.a.setMoney(1e6),e.programs.push(m.a.BruteSSHProgram.name)),Object(o.b)(s.a.PCMatrix)&&i.a[s.a.PCMatrix].owned&&(e.programs.push(m.a.DeepscanV1.name),e.programs.push(m.a.AutoLink.name)),(E.a.sourceFileLvl(5)>0||5===E.a.bitNodeN)&&e.programs.push(m.a.Formulas.name),Object(w.f)(E.a.getHomeComputer());for(const t of Object.keys(f.a))f.a.hasOwnProperty(t)&&f.a[t].gainFavor();for(const t of Object.keys(d.a))d.a.hasOwnProperty(t)&&d.a[t].gainFavor();null!==O.a.action&&O.a.finishAction(v.b,E.a,!0),O.a.clear(),P.a.emit(),Object(d.c)(),E.a.factionInvitations=E.a.factionInvitations.concat(t),Object(o.d)(),E.a.reapplyAllSourceFiles(),Object(f.b)(),Object(y.c)(),E.a.applyEntropy(E.a.entropy);const n=E.a.gang;if(E.a.inGang()&&null!==n){const t=d.a[n.facName];t instanceof h.a&&Object(p.e)(t);const e=.95;for(const t of n.members)t.hack_asc_points*=e,t.str_asc_points*=e,t.def_asc_points*=e,t.dex_asc_points*=e,t.agi_asc_points*=e,t.cha_asc_points*=e}if(3===E.a.bitNodeN&&e.messages.push(_.a.CorporationManagementHandbook),E.a.bladeburner instanceof c.a&&E.a.bladeburner.prestige(),8===E.a.bitNodeN&&(E.a.money=25e7),(8===E.a.bitNodeN||C.a[8]>0)&&(E.a.hasWseAccount=!0,E.a.hasTixApiAccess=!0),E.a.hasWseAccount&&(Object(L.f)(),Object(L.h)()),Object(o.b)(s.a.TheRedPill)&&i.a[s.a.TheRedPill].owned){const t=Object(w.d)(x.a.WorldDaemon),e=Object(w.d)(x.a.DaedalusServer);t&&e&&(t.serversOnNetwork.push(e.hostname),e.serversOnNetwork.push(t.hostname))}Object(o.b)(s.a.StaneksGift1)&&i.a[s.a.StaneksGift1].owned&&Object(p.e)(d.a[a.a.ChurchOfTheMachineGod]),T.b.prestigeAugmentation(),Object(k.b)(),A.b.splice(0,A.b.length),R.b.splice(0,R.b.length)}function F(t){Object(l.b)(E.a),Object(C.b)(E.a),E.a.prestigeSourceFile(),Object(b.c)();const e=E.a.getHomeComputer();null!==O.a.action&&O.a.finishAction(v.b,E.a,!0),O.a.clear(),P.a.emit(),Object(w.i)(),Object(w.a)(e),Object(S.d)(E.a,e),Object(w.f)(E.a.getHomeComputer()),C.a[9]>=2?e.setMaxRam(128):C.a[1]>0?e.setMaxRam(32):e.setMaxRam(8),e.cpuCores=1;for(const t of Object.keys(f.a))f.a.hasOwnProperty(t)&&(f.a[t].favor=0);for(const t of Object.keys(d.a))d.a.hasOwnProperty(t)&&(d.a[t].favor=0);null!==O.a.action&&O.a.finishAction(v.b,E.a,!0);for(const t of Object.keys(i.a))i.a.hasOwnProperty(t)&&delete i.a[t];if(C.a[12]>0&&E.a.augmentations.push({name:s.a.NeuroFluxGovernor,level:C.a[12]}),Object(d.c)(),Object(o.d)(),E.a.reapplyAllSourceFiles(),Object(f.b)(),Object(y.c)(),(E.a.sourceFileLvl(5)>0||5===E.a.bitNodeN)&&e.programs.push(m.a.Formulas.name),3===E.a.bitNodeN&&(e.messages.push(_.a.CorporationManagementHandbook),Object(M.a)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),8===E.a.bitNodeN&&(E.a.money=25e7),(8===E.a.bitNodeN||C.a[8]>0)&&(E.a.hasWseAccount=!0,E.a.hasTixApiAccess=!0),10===E.a.bitNodeN&&Object(M.a)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),13===E.a.bitNodeN&&Object(M.a)("Trouble is brewing in "+r.a.Chongqing),E.a.hasWseAccount?(Object(L.f)(),Object(L.h)()):Object(L.d)(),E.a.gang=null,E.a.corporation=null,Object(u.e)(),E.a.bladeburner=null,C.a[9]>=3){const t=E.a.createHacknetServer();t.level=100,t.cores=10,t.cache=5,t.updateHashRate(E.a.hacknet_node_money_mult),t.updateHashCapacity(),Object(g.p)(E.a)}13===E.a.bitNodeN&&(E.a.money=N.a.TravelCost),T.b.prestigeSourceFile(),0===C.a[5]||t||E.a.gainIntelligenceExp(300),Object(k.b)()}},function(t,e,n){"use strict";function a(){return new Promise((t,e)=>{window.indexedDB||e("Indexed DB does not exists");const n=window.indexedDB.open("bitburnerSave",1);n.onupgradeneeded=function(){this.result.createObjectStore("savestring")},n.onerror=function(t){e("Failed to get IDB "+t)},n.onsuccess=function(){const n=this.result;n?t(n.transaction(["savestring"],"readwrite").objectStore("savestring")):e("database loading result was undefined")}})}function r(){return new Promise((t,e)=>{a().then(e=>new Promise((t,n)=>{const a=e.get("save");a.onerror=function(t){n("Error in Database request to get savestring: "+t)},a.onsuccess=function(){t(this.result)}}).then(e=>t(e))).catch(t=>e(t))})}function i(t){return a().then(e=>new Promise((n,a)=>{const r=e.put(t,"save");r.onerror=function(t){a("Error saving game to IndexedDB: "+t)},r.onsuccess=()=>n()}))}function o(){return a().then(t=>{t.delete("save")})}n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return o}))},,,function(t,e,n){"use strict";function a(t){const e=25e3*(Math.pow(1.02,t)-1);return Math.round(1e4*e)/1e4}function r(t){const e=Math.log(t/25e3+1)/Math.log(1.02);return Math.round(1e4*e)/1e4}n.d(e,"a",(function(){return a})),n.d(e,"b",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"d",(function(){return s}));var a=n(29);let r=0;function i(){return(new Date).getTime()-r>864e5}function o(t){if(i()){for(const e of t.factions)a.a[e].favor++;r=(new Date).getTime()}}function s(t){r=t}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(61),r=n(449),i=n(25);function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class s extends r.a{constructor(t=null){super(t),o(this,"reqdRank",100),o(this,"teamCount",0),t&&t.reqdRank&&(this.reqdRank=t.reqdRank),t&&t.teamCount&&(this.teamCount=t.teamCount)}getTeamSuccessBonus(t){if(this.teamCount&&this.teamCount>0){this.teamCount=Math.min(this.teamCount,t.teamSize);return Math.pow(this.teamCount,.05)}return 1}getActionTypeSkillSuccessBonus(t){return t.skillMultipliers.successChanceOperation}getChaosDifficultyBonus(t){const e=t.getCurrentCity();if(e.chaos>a.a.ChaosThreshold){const t=e.chaos-a.a.ChaosThreshold+1;return Math.pow(t,.5)}return 1}toJSON(){return Object(i.b)("Operation",this)}static fromJSON(t){return Object(i.a)(s,t.data)}}i.c.constructors.Operation=s},,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(5),r=n(11),i=n(63),o=n(102);const s=[{hackDifficulty:99,hostname:r.a.AevumECorp.toLowerCase(),moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:r.a.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:r.a.AevumECorp},{hackDifficulty:99,hostname:r.a.Sector12MegaCorp.toLowerCase(),moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:r.a.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:r.a.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:r.a.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[i.a.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:r.a.Sector12BladeIndustries},{hackDifficulty:99,hostname:r.a.VolhavenNWO.toLowerCase(),literature:[i.a.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:r.a.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[i.a.BeyondMan,i.a.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:r.a.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[i.a.CodedIntelligence,i.a.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:r.a.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:r.a.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:r.a.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:r.a.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:r.a.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:r.a.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[i.a.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:r.a.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:r.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:o.a.FulcrumSecretTechnologies},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:r.a.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:r.a.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:r.a.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[i.a.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:r.a.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:r.a.NewTokyoVitaLife.toLowerCase(),literature:[i.a.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:r.a.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:r.a.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:r.a.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:r.a.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:r.a.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[i.a.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[i.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[i.a.AGreenTomorrow,i.a.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:r.a.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:r.a.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:r.a.AevumAeroCorp.toLowerCase(),literature:[i.a.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:r.a.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:r.a.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[i.a.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:r.a.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:r.a.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[i.a.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[i.a.AGreenTomorrow,i.a.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:r.a.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:r.a.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:r.a.Sector12DeltaOne.toLowerCase(),moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:r.a.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:r.a.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[i.a.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:r.a.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:r.a.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:r.a.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:r.a.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:r.a.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:r.a.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:r.a.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:r.a.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[i.a.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:r.a.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:r.a.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:r.a.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:r.a.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[i.a.SecretSocieties,i.a.TheFailedFrontier,i.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:r.a.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:r.a.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:r.a.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:r.a.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[i.a.SecretSocieties,i.a.TheFailedFrontier,i.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:r.a.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:r.a.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:r.a.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:r.a.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[i.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:r.a.VolhavenCompuTek.toLowerCase(),literature:[i.a.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:r.a.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:r.a.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[i.a.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:r.a.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:r.a.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:r.a.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:r.a.NewTokyoNoodleBar},{hackDifficulty:10,hostname:r.a.Sector12FoodNStuff.toLowerCase(),literature:[i.a.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:r.a.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:r.a.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:r.a.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:r.a.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[i.a.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[i.a.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[i.a.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[i.a.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:r.a.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:r.a.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:r.a.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:r.a.Sector12IronGym+" Network",requiredHackingSkill:100,serverGrowth:20,specialName:r.a.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:r.a.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:r.a.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:r.a.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[i.a.SimulatedReality,i.a.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:o.a.BitRunnersServer},{hackDifficulty:0,hostname:"I.I.I.I",literature:[i.a.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:o.a.TheBlackHandServer},{hackDifficulty:0,hostname:"avmnite-02h",literature:[i.a.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:a.a.NiteSec,requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:o.a.NiteSecServer},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:o.a.TheDarkArmyServer},{hackDifficulty:0,hostname:"CSEC",literature:[i.a.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:a.a.CyberSec,requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:o.a.CyberSecServer},{hackDifficulty:0,hostname:"The-Cave",literature:[i.a.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:o.a.DaedalusServer},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:o.a.WorldDaemon}]},function(t,e,n){"use strict";function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}));class r{constructor(t=""){a(this,"level",1),a(this,"name",""),this.name=t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(8),r=n(32);class i{constructor(t){this.name=t.name,this.nextPosition=t.nextPosition,this.baseSalary=t.baseSalary,this.repMultiplier=t.repMultiplier,this.requiredHacking=null!=t.reqdHacking?t.reqdHacking:0,this.requiredStrength=null!=t.reqdStrength?t.reqdStrength:0,this.requiredDefense=null!=t.reqdDefense?t.reqdDefense:0,this.requiredDexterity=null!=t.reqdDexterity?t.reqdDexterity:0,this.requiredAgility=null!=t.reqdAgility?t.reqdAgility:0,this.requiredCharisma=null!=t.reqdCharisma?t.reqdCharisma:0,this.requiredReputation=null!=t.reqdReputation?t.reqdReputation:0,this.hackingEffectiveness=null!=t.hackingEffectiveness?t.hackingEffectiveness:0,this.strengthEffectiveness=null!=t.strengthEffectiveness?t.strengthEffectiveness:0,this.defenseEffectiveness=null!=t.defenseEffectiveness?t.defenseEffectiveness:0,this.dexterityEffectiveness=null!=t.dexterityEffectiveness?t.dexterityEffectiveness:0,this.agilityEffectiveness=null!=t.agilityEffectiveness?t.agilityEffectiveness:0,this.charismaEffectiveness=null!=t.charismaEffectiveness?t.charismaEffectiveness:0,100!==Math.round(this.hackingEffectiveness+this.strengthEffectiveness+this.defenseEffectiveness+this.dexterityEffectiveness+this.agilityEffectiveness+this.charismaEffectiveness)&&console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),this.hackingExpGain=null!=t.hackingExpGain?t.hackingExpGain:0,this.strengthExpGain=null!=t.strengthExpGain?t.strengthExpGain:0,this.defenseExpGain=null!=t.defenseExpGain?t.defenseExpGain:0,this.dexterityExpGain=null!=t.dexterityExpGain?t.dexterityExpGain:0,this.agilityExpGain=null!=t.agilityExpGain?t.agilityExpGain:0,this.charismaExpGain=null!=t.charismaExpGain?t.charismaExpGain:0}calculateJobPerformance(t,e,n,r,i,o){const s=this.hackingEffectiveness*t/a.a.MaxSkillLevel,l=this.strengthEffectiveness*e/a.a.MaxSkillLevel,c=this.defenseEffectiveness*n/a.a.MaxSkillLevel,f=this.dexterityEffectiveness*r/a.a.MaxSkillLevel,u=this.agilityEffectiveness*i/a.a.MaxSkillLevel,m=this.charismaEffectiveness*o/a.a.MaxSkillLevel;let h=this.repMultiplier*(s+l+c+f+u+m)/100;return isNaN(h)&&(console.error("Company reputation gain calculated to be NaN"),h=0),h}isSoftwareJob(){return r.j.includes(this.name)}isITJob(){return r.d.includes(this.name)}isSecurityEngineerJob(){return r.i.includes(this.name)}isNetworkEngineerJob(){return r.f.includes(this.name)}isBusinessJob(){return r.b.includes(this.name)}isSecurityJob(){return r.h.includes(this.name)}isAgentJob(){return r.a.includes(this.name)}isSoftwareConsultantJob(){return r.k.includes(this.name)}isBusinessConsultantJob(){return r.c.includes(this.name)}isPartTimeJob(){return r.g.includes(this.name)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(260);const o={};o.SourceFile1=new i.a(1,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 16%",r.a.createElement("br",null),"Level 2: 24%",r.a.createElement("br",null),"Level 3: 28%")),o.SourceFile2=new i.a(2,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 24%",r.a.createElement("br",null),"Level 2: 36%",r.a.createElement("br",null),"Level 3: 42%")),o.SourceFile3=new i.a(3,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile4=new i.a(4,r.a.createElement(r.a.Fragment,null,"This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this Source-File reduces the RAM cost of Singularity functions.")),o.SourceFile5=new i.a(5,r.a.createElement(r.a.Fragment,null,"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. Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with Formulas.exe, and will raise all of your hacking-related multipliers by:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile6=new i.a(6,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile7=new i.a(7,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile8=new i.a(8,r.a.createElement(r.a.Fragment,null,"This Source-File grants the following benefits:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: Permanent access to WSE and TIX API",r.a.createElement("br",null),"Level 2: Ability to short stocks in other BitNodes",r.a.createElement("br",null),"Level 3: Ability to use limit/stop orders in other BitNodes",r.a.createElement("br",null),r.a.createElement("br",null),"This Source-File also increases your hacking growth multipliers by:",r.a.createElement("br",null),"Level 1: 12%",r.a.createElement("br",null),"Level 2: 18%",r.a.createElement("br",null),"Level 3: 21%")),o.SourceFile9=new i.a(9,r.a.createElement(r.a.Fragment,null,"This Source-File grants the following benefits:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: Permanently unlocks the Hacknet Server in other BitNodes",r.a.createElement("br",null),"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode",r.a.createElement("br",null),"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode",r.a.createElement("br",null),r.a.createElement("br",null),"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)",r.a.createElement("br",null),r.a.createElement("br",null),"This Source-File also increases your hacknet multipliers by:",r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile10=new i.a(10,r.a.createElement(r.a.Fragment,null,"This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve")),o.SourceFile11=new i.a(11,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 32%",r.a.createElement("br",null),"Level 2: 48%",r.a.createElement("br",null),"Level 3: 56%",r.a.createElement("br",null),r.a.createElement("br",null),"It also reduces the price increase for every aug bought by:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 4%",r.a.createElement("br",null),"Level 2: 6%",r.a.createElement("br",null),"Level 3: 7%")),o.SourceFile12=new i.a(12,r.a.createElement(r.a.Fragment,null,"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.")),o.SourceFile13=new i.a(13,r.a.createElement(r.a.Fragment,null,"Each level of this Source-File increases the size of Stanek's Gift."))},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(9),r=n(87),i=n(25),o=n(369);function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class l{constructor(t=null,e=[]){s(this,"args",[]),s(this,"dataMap",{}),s(this,"filename",""),s(this,"logs",[]),s(this,"logUpd",!1),s(this,"offlineExpGained",0),s(this,"offlineMoneyMade",0),s(this,"offlineRunningTime",.01),s(this,"onlineExpGained",0),s(this,"onlineMoneyMade",0),s(this,"onlineRunningTime",.01),s(this,"pid",-1),s(this,"ramUsage",0),s(this,"server",""),s(this,"threads",1),s(this,"dependencies",[]),null!=t&&(this.filename=t.filename,this.args=e,this.server=t.server,this.ramUsage=t.ramUsage,this.dependencies=t.dependencies)}log(t){this.logs.length>a.a.MaxLogCapacity&&this.logs.shift();let e=t;a.a.TimestampsFormat&&(e="["+Object(o.a)(a.a.TimestampsFormat)+"] "+e),this.logs.push(e),this.logUpd=!0}displayLog(){for(let t=0;tH4CK||3T 8URN3R5**>?>\\~~"),[],!0,!0,!1,!1,!1,!1),[i.a.TianDiHui]:new o(r.a.createElement(r.a.Fragment,null,"Obey Heaven and work righteously."),[],!0,!0,!1,!0,!1,!1),[i.a.CyberSec]:new o(r.a.createElement(r.a.Fragment,null,"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."),[],!0,!0,!1,!1,!1,!1),[i.a.Bladeburners]:new o(r.a.createElement(r.a.Fragment,null,"It's too bad they won't live. But then again, who does?",r.a.createElement("br",null),r.a.createElement("br",null),"Note that for this faction, reputation can only be gained through ",i.a.Bladeburners," actions. Completing ",i.a.Bladeburners,"contracts/operations will increase your reputation."),[],!1,!1,!1,!1,!0,!1),[i.a.ChurchOfTheMachineGod]:new o(r.a.createElement(r.a.Fragment,null," `` ",r.a.createElement("br",null)," -odmmNmds: ",r.a.createElement("br",null)," `hNmo:..-omNh. ",r.a.createElement("br",null)," yMd` `hNh ",r.a.createElement("br",null)," mMd oNm ",r.a.createElement("br",null)," oMNo .mM/ ",r.a.createElement("br",null)," `dMN+ -mM+ ",r.a.createElement("br",null)," -mMNo -mN+ ",r.a.createElement("br",null)," .+- :mMNo/mN/ ",r.a.createElement("br",null),":yNMd. :NMNNN/ ",r.a.createElement("br",null),"-mMMMh. /NMMh` ",r.a.createElement("br",null)," .dMMMd. /NMMMy` ",r.a.createElement("br",null)," `yMMMd. /NNyNMMh` ",r.a.createElement("br",null)," `sMMMd. +Nm: +NMMh. ",r.a.createElement("br",null)," oMMMm- oNm: /NMMd. ",r.a.createElement("br",null)," +NMMmsMm- :mMMd. ",r.a.createElement("br",null)," /NMMMm- -mMMd. ",r.a.createElement("br",null)," /MMMm- -mMMd. ",r.a.createElement("br",null)," `sMNMMm- .mMmo ",r.a.createElement("br",null)," `sMd:hMMm. ./. ",r.a.createElement("br",null)," `yMy` `yNMd` ",r.a.createElement("br",null)," `hMs` oMMy ",r.a.createElement("br",null)," `hMh sMN- ",r.a.createElement("br",null)," /MM- .NMo ",r.a.createElement("br",null)," +MM: :MM+ ",r.a.createElement("br",null)," sNNo-.`.-omNy` ",r.a.createElement("br",null)," -smNNNNmdo- ",r.a.createElement("br",null)," `..` ",r.a.createElement("br",null),r.a.createElement("br",null),"Many cultures predict an end to humanity in the near future, a final Armageddon that will end the world; but we disagree.",r.a.createElement("br",null),r.a.createElement("br",null),"Note that for this faction, reputation can only be gained by charging Stanek's gift."),[],!1,!1,!1,!1,!0,!0)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={0:[0,2e9,1.06,.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)."],1:[1,2e9,1.06,.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)."],2:[2,4e9,1.1,.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."],3:[3,4e9,1.5,.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)."],4:[4,1e9,1.06,.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)."],5:[5,1e9,1.06,.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)."],6:[6,1e9,1.06,.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)."],7:[7,1e9,1.06,.1,"FocusWires","Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive)."],8:[8,1e9,1.07,.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)."],9:[9,5e9,1.07,.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)."]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(242),r=n(25);function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class o{constructor(){i(this,"capacity",0),i(this,"hashes",0),i(this,"upgrades",{});for(const t of Object.keys(a.a))this.upgrades[t]=0}getMult(t){const e=a.a[t],n=this.upgrades[t];return null==e||null==n?(console.error("Could not find Hash Study upgrade"),1):1+e.value*n/100}getStudyMult(){return this.getMult("Improve Studying")}getTrainingMult(){return this.getMult("Improve Gym Training")}getUpgrade(t){const e=a.a[t];return e||(console.error("Invalid Upgrade Name given to HashManager.getUpgrade(): "+t),null)}getUpgradeCost(t){const e=this.getUpgrade(t),n=this.upgrades[t];return null==e||null==n?(console.error("Invalid Upgrade Name given to HashManager.getUpgradeCost(): "+t),1/0):e.getCost(n)}prestige(){for(const t of Object.keys(a.a))this.upgrades[t]=0;this.hashes=0,this.updateCapacity(0)}refundUpgrade(t){const e=a.a[t];--this.upgrades[t];const n=this.upgrades[t];if(null==e||null==n||n<0)return void console.error("Invalid Upgrade Name given to HashManager.upgrade(): "+t);const r=e.getCost(n);this.hashes+=r}storeHashes(t){this.hashes+=t;let e=this.hashes;return this.hashes=Math.min(this.hashes,this.capacity),e-=this.hashes,e}updateCapacity(t){t<0&&(this.capacity=0),this.capacity=Math.max(t,0)}upgrade(t){if(null==a.a[t])return console.error("Invalid Upgrade Name given to HashManager.upgrade(): "+t),!1;const e=this.getUpgradeCost(t);return!(this.hashes{try{return r.a[t].getInfo().offerHackingWork}catch(t){return console.error("Error when trying to filter Hacking Factions for Coding Contract Generation: "+t),!1}});return e===a.c.FactionReputation&&0===n.length&&(e=a.c.CompanyReputation),e===a.c.FactionReputationAll&&0===n.length&&(e=a.c.CompanyReputation),e===a.c.CompanyReputation&&0===Object.keys(i.a.jobs).length&&(e=a.c.Money),e}(t.type);const e=i.a.factions.filter(t=>r.a[t].getInfo().offerHackingWork);switch(t.type){case a.c.FactionReputation:{const n=e.length,a=e[Object(c.a)(0,n-1)];t.name=a;break}case a.c.CompanyReputation:{const e=Object.keys(i.a.jobs);e.length>0?t.name=e[Object(c.a)(0,e.length-1)]:t.type=a.c.Money;break}}return t}function p(){const t=Object(o.c)();let e=Object(c.a)(0,t.length-1),n=t[e];for(let a=0;a<200&&(!(n instanceof l.a)||n.purchasedByPlayer||n.hostname===s.a.WorldDaemon);++a)e=Object(c.a)(0,t.length-1),n=t[e];return n}function g(t,e){let n="contract-"+Object(c.a)(0,1e6);for(let e=0;e<1e3&&!(t.contracts.filter(t=>t.fn===n).length<=0);++e)n="contract-"+Object(c.a)(0,1e6);return e.name&&(n+="-"+e.name.replace(/\s/g,"")),n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a=new(n(131).a)},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var a=n(85),r=n(16);function i(t,e){let n=0,i=!1;for(const r of Object.keys(a.a)){const o=a.a[r];if(o.type==e){n=o.successRate(t),i=!0;break}}return i?Math.random()<=n:(Object(r.a)(`ERR: Unrecognized crime type: ${e} This is probably a bug please contact the developer`),!1)}function o(t){return(t=t.toLowerCase()).includes("shoplift")?a.a.Shoplift:t.includes("rob")&&t.includes("store")?a.a.RobStore:t.includes("mug")?a.a.Mug:t.includes("larceny")?a.a.Larceny:t.includes("drugs")?a.a.DealDrugs:t.includes("bond")&&t.includes("forge")?a.a.BondForgery:(t.includes("traffic")||t.includes("illegal"))&&t.includes("arms")?a.a.TraffickArms:t.includes("homicide")?a.a.Homicide:t.includes("grand")&&t.includes("auto")?a.a.GrandTheftAuto:t.includes("kidnap")?a.a.Kidnap:t.includes("assassin")?a.a.Assassination:t.includes("heist")?a.a.Heist:null}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(53),r=n(38),i=n(36),o=n(24),s=n(25),l=n(1033);function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class f{constructor(t={}){c(this,"minEne",0),c(this,"maxEne",100),c(this,"minHap",0),c(this,"maxHap",100),c(this,"maxMor",100),c(this,"employees",[]),c(this,"employeeProd",{[a.a.Operations]:0,[a.a.Engineer]:0,[a.a.Business]:0,[a.a.Management]:0,[a.a.RandD]:0,total:0}),this.loc=t.loc?t.loc:"",this.size=t.size?t.size:1}atCapacity(){return this.employees.length>=this.size}process(t=1,e,n){if(n.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const t=this.hireRandomEmployee();n.hasResearch("HRBuddy-Training")&&void 0!==t&&(t.pos=a.a.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,n.hasResearch("Go-Juice")&&(this.maxEne+=10),n.hasResearch("JoyWire")&&(this.maxHap+=10),n.hasResearch("Sti.mu")&&(this.maxMor+=10);let r=1;e.funds<0&&n.lastCycleRevenue<0?r=Math.pow(.99,t):e.funds>0&&n.lastCycleRevenue>0&&(r=Math.pow(1.01,t));const i=n.hasResearch("AutoBrew"),o=n.hasResearch("AutoPartyManager");let s=0;for(let e=0;en.pos===t?e+1:e,0);for(const r of this.employees){if(n==e)return!0;r.pos===a.a.Unassigned&&n<=e?(r.pos=t,n++):r.pos===t&&n>=e&&(r.pos=a.a.Unassigned,n--)}return n===e}toJSON(){return Object(s.b)("OfficeSpace",this)}static fromJSON(t){return Object(s.a)(f,t.data)}}s.c.constructors.OfficeSpace=f},,function(t,e,n){"use strict";function a(t,e){for(const n of Object.keys(e)){const a=e[n];void 0!==a&&("function"==typeof a?a(t,n):void 0!==a.func?a.func(t,e,n):(typeof t[n]!=typeof a.default&&(t[n]=a.default),"number"==typeof t[n]&&void 0!==a.min&&t[n]a.max&&(t[n]=a.max)))}}function r(t,e,n){return(a,r)=>{"number"==typeof a[r]?(a[r]n&&(a[r]=n)):a[r]=t}}n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return r}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(25);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class i{constructor(){r(this,"bladeburner",0),r(this,"casino",0),r(this,"class",0),r(this,"codingcontract",0),r(this,"corporation",0),r(this,"crime",0),r(this,"gang",0),r(this,"hacking",0),r(this,"hacknet",0),r(this,"hacknet_expenses",0),r(this,"hospitalization",0),r(this,"infiltration",0),r(this,"sleeves",0),r(this,"stock",0),r(this,"total",0),r(this,"work",0),r(this,"servers",0),r(this,"other",0),r(this,"augmentations",0)}record(t,e){const n=e.toLowerCase();"number"==typeof this[n]?(this[n]+=t,this.total+=t):console.warn("MoneySourceTracker.record() called with invalid source: "+e)}reset(){for(const t in this)"number"==typeof this[t]&&(this[t]=0)}toJSON(){return Object(a.b)("MoneySourceTracker",this)}static fromJSON(t){return Object(a.a)(i,t.data)}}a.c.constructors.MoneySourceTracker=i},,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n(1456),i=n(1),o=n(23),s=n(31),l=n(296),c=n(4);function f({min:t,max:e,current:n,remaining:s,progress:l,color:f}){const u=a.createElement(i.a,{sx:{textAlign:"right"}},a.createElement("strong",null,"Progress:")," ",c.a.formatExp(n)," / ",c.a.formatExp(e-t),a.createElement("br",null),a.createElement("strong",null,"Remaining:")," ",c.a.formatExp(s)," (",l.toFixed(2),"%)");return a.createElement(o.a,{title:u},a.createElement(r.a,{variant:"determinate",value:l,sx:{backgroundColor:"#111111","& .MuiLinearProgress-bar1Determinate":{backgroundColor:f}}}))}function u({progress:t,color:e}){const n=Object(l.b)();return a.createElement(s.a,{component:"th",scope:"row",colSpan:2,classes:{root:n.cellNone},style:{paddingBottom:"2px",position:"relative",top:"-3px"}},a.createElement(f,{min:t.baseExperience,max:t.nextExperience,current:t.currentExperience,remaining:t.remainingExperience,progress:t.progress,color:e}))}},,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={lineHeight:1.5,fontFamily:"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman"}},,,,,function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var a=n(8);function r(t){return t.money<0?0:Math.min(.1*t.money,(t.max_hp-t.hp)*a.a.HospitalCostPerHp)}function i(t,e){const n=t.hp;t.hp-=e;const a=r(t);return t.hp=n,a}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return d}));var a=n(0),r=n.n(a),i=n(131),o=n(41),s=n(1),l=n(10),c=n(128),f=n(81),u=n(79),m=n(28);const h=new i.a;function d(){var t,e,n;const[i,l]=Object(a.useState)(null);if(Object(a.useEffect)(()=>h.subscribe(t=>{l(t)}),[]),null===i)return r.a.createElement(r.a.Fragment,null);const c={text:g,select:y};let f=p;null!=i&&null!==(t=i.options)&&void 0!==t&&t.type&&["text","select"].includes(null==i||null===(e=i.options)||void 0===e?void 0:e.type)&&(f=c[null==i||null===(n=i.options)||void 0===n?void 0:n.type]);return r.a.createElement(o.a,{open:!0,onClose:function(){var t,e;null!==i&&(["text","select"].includes(null!==(t=null==i||null===(e=i.options)||void 0===e?void 0:e.type)&&void 0!==t?t:"")?i.resolve(""):i.resolve(!1),l(null))}},r.a.createElement("pre",null,r.a.createElement(s.a,null,i.txt)),r.a.createElement(f,{prompt:i,resolve:t=>{i.resolve(t),l(null)}}))}function p({resolve:t}){return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingTop:"10px"}},r.a.createElement(l.a,{style:{marginRight:"auto"},onClick:()=>t(!0)},"Yes"),r.a.createElement(l.a,{onClick:()=>t(!1)},"No")))}function g({resolve:t}){const[e,n]=Object(a.useState)(""),i=()=>t(e);return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:"flex",alignItems:"center",paddingTop:"10px"}},r.a.createElement(f.a,{autoFocus:!0,value:e,onInput:t=>{n(t.target.value)},onKeyDown:t=>{t.stopPropagation(),t.key===m.a.ENTER&&(t.preventDefault(),i())},style:{flex:"1 0 auto"},InputProps:{endAdornment:r.a.createElement(l.a,{onClick:i},"Confirm")}})))}function y({prompt:t,resolve:e}){var n;const[i,o]=Object(a.useState)("");return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:"flex",alignItems:"center",paddingTop:"10px"}},r.a.createElement(c.a,{onChange:t=>{o(t.target.value)},value:i,style:{flex:"1 0 auto"}},(t=>{const e=[];for(const n of t)e.push(r.a.createElement(u.a,{key:n,value:n},n));return e})((null==t||null===(n=t.options)||void 0===n?void 0:n.choices)||[])),r.a.createElement(l.a,{onClick:()=>e(i),disabled:""===i},"Confirm")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(53),r=n(175),i=n(1034),o=n(528),s=n(25),l=n(36);function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class f{constructor(t={}){c(this,"name",""),c(this,"dmd",0),c(this,"cmp",0),c(this,"mku",0),c(this,"pCost",0),c(this,"sCost",0),c(this,"fin",!1),c(this,"prog",0),c(this,"createCity",""),c(this,"designCost",0),c(this,"advCost",0),c(this,"rat",0),c(this,"qlt",0),c(this,"per",0),c(this,"dur",0),c(this,"rel",0),c(this,"aes",0),c(this,"fea",0),c(this,"data",Object(o.a)([0,0,0])),c(this,"loc",""),c(this,"siz",0),c(this,"reqMats",{}),c(this,"prdman",Object(o.a)([!1,0])),c(this,"sllman",Object(o.a)([!1,0])),c(this,"marketTa1",!1),c(this,"marketTa2",!1),c(this,"marketTa2Price",Object(o.a)(0)),c(this,"maxsll",0),this.name=t.name?t.name:"",this.dmd=t.demand?t.demand:0,this.cmp=t.competition?t.competition:0,this.mku=t.markup?t.markup:0,this.createCity=t.createCity?t.createCity:"",this.designCost=t.designCost?t.designCost:0,this.advCost=t.advCost?t.advCost:0,this.qlt=t.quality?t.quality:0,this.per=t.performance?t.performance:0,this.dur=t.durability?t.durability:0,this.rel=t.reliability?t.reliability:0,this.aes=t.aesthetics?t.aesthetics:0,this.fea=t.features?t.features:0,this.loc=t.loc?t.loc:"",this.siz=t.size?t.size:0,this.reqMats=t.req?t.req:{}}createProduct(t=1,e=1){this.fin||(this.prog+=.01*t*e)}finishProduct(t,e){this.fin=!0;const n=this.prog/100,i=t[a.a.Engineer]/t.total,o=t[a.a.Management]/t.total,s=t[a.a.RandD]/t.total,c=t[a.a.Operations]/t.total,f=t[a.a.Business]/t.total,u=n*(1.2*i+.9*o+1.3*s+1.5*c+f)*(1+Math.pow(this.designCost,.1)/100)*(1+Math.pow(e.sciResearch.qty,e.sciFac)/800);this.qlt=u*(.1*t[a.a.Engineer]+.05*t[a.a.Management]+.05*t[a.a.RandD]+.02*t[a.a.Operations]+.02*t[a.a.Business]),this.per=u*(.15*t[a.a.Engineer]+.02*t[a.a.Management]+.02*t[a.a.RandD]+.02*t[a.a.Operations]+.02*t[a.a.Business]),this.dur=u*(.05*t[a.a.Engineer]+.02*t[a.a.Management]+.08*t[a.a.RandD]+.05*t[a.a.Operations]+.05*t[a.a.Business]),this.rel=u*(.02*t[a.a.Engineer]+.08*t[a.a.Management]+.02*t[a.a.RandD]+.05*t[a.a.Operations]+.08*t[a.a.Business]),this.aes=u*(0*t[a.a.Engineer]+.08*t[a.a.Management]+.05*t[a.a.RandD]+.02*t[a.a.Operations]+.1*t[a.a.Business]),this.fea=u*(.08*t[a.a.Engineer]+.05*t[a.a.Management]+.02*t[a.a.RandD]+.05*t[a.a.Operations]+.05*t[a.a.Business]),this.calculateRating(e);const m=1+Math.pow(this.advCost,.1)/100,h=Math.max(f+o,1/t.total);this.mku=100/(m*Math.pow(this.qlt+.001,.65)*h),0!==this.mku&&isFinite(this.mku)||(this.mku=1),this.dmd=0===e.awareness?20:Math.min(100,m*(e.popularity/e.awareness*100)),this.cmp=Object(l.a)(0,70);for(const t of Object.keys(e.reqMats))if(e.reqMats.hasOwnProperty(t)){const n=e.reqMats[t];if(void 0===n)continue;this.reqMats[t]=n}this.siz=0;for(const t of Object.keys(e.reqMats)){const n=e.reqMats[t];void 0!==n&&(this.siz+=r.a[t]*n)}}calculateRating(t){const e=i.a[t.type];null!=e?(this.rat=0,this.rat+=e.Quality?this.qlt*e.Quality:0,this.rat+=e.Performance?this.per*e.Performance:0,this.rat+=e.Durability?this.dur*e.Durability:0,this.rat+=e.Reliability?this.rel*e.Reliability:0,this.rat+=e.Aesthetics?this.aes*e.Aesthetics:0,this.rat+=e.Features?this.fea*e.Features:0):console.error("Could not find product rating weights for: "+t)}toJSON(){return Object(s.b)("Product",this)}static fromJSON(t){return Object(s.a)(f,t.data)}}s.c.constructors.Product=f},function(t,e,n){"use strict";function a(t,e){return!!Object.keys(e.reqMats).includes(t)||(!!e.prodMats.includes(t)||!!["Hardware","Robots","AICores","RealEstate","AI Cores","Real Estate"].includes(t))}n.d(e,"a",(function(){return a}))},,function(t,e,n){"use strict";n.d(e,"b",(function(){return y})),n.d(e,"a",(function(){return b}));var a=n(0),r=n.n(a),i=n(173),o=n(535),s=n(1),l=n(21),c=n(65),f=n(10),u=n(1748),m=n(1749),h=n(1750),d=n(30),p=n(9),g=n(64);const y=[];function b(){const t=d.b.Player(),e=d.b.Router(),n=Object(a.useState)(!1)[1];function b(){n(t=>!t)}const E=[...Object.values(g.a)].filter(e=>{const n=e.create;return null!==n&&("b1t_flum3.exe"!==e.name||n.req(t))}).sort((e,n)=>{var a,r,i,o;return t.hasProgram(e.name)?1:t.hasProgram(n.name)?-1:(null!==(a=null===(r=e.create)||void 0===r?void 0:r.level)&&void 0!==a?a:0)-(null!==(i=null===(o=n.create)||void 0===o?void 0:o.level)&&void 0!==i?i:0)});Object(a.useEffect)(()=>{E.forEach(t=>{y.includes(t.name)||y.push(t.name)})},[]),Object(a.useEffect)(()=>{const t=setInterval(b,200);return()=>clearInterval(t)},[]);const v=e=>Math.ceil(Math.max(e-(t.hacking+t.intelligence/2),0));return r.a.createElement(o.a,{disableGutters:!0,maxWidth:"lg",sx:{mx:0,mb:10}},r.a.createElement(s.a,{variant:"h4"},"Create program"),r.a.createElement(s.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."),r.a.createElement(l.a,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",my:1}},E.map(n=>{const a=n.create;if(null===a)return r.a.createElement(r.a.Fragment,null);const o=(e=>{const n=Object(i.find)(t.getHomeComputer().programs,t=>t.startsWith(e)&&t.endsWith("%-INC"));if(!n)return-1;const a=n.split("-");if(3!=a.length)return-1;const r=Number(a[1].slice(0,-1));return isNaN(r)||r<0||r>=100?-1:r})(n.name);return r.a.createElement(l.a,{component:c.a,sx:{p:1,opacity:t.hasProgram(n.name)?.75:1},key:n.name},r.a.createElement(s.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},t.hasProgram(n.name)&&r.a.createElement(u.a,{sx:{mr:1}})||a.req(t)&&r.a.createElement(m.a,{sx:{mr:1}})||r.a.createElement(h.a,{sx:{mr:1}}),n.name),!t.hasProgram(n.name)&&a.req(t)&&r.a.createElement(f.a,{sx:{my:1,width:"100%"},onClick:r=>{r.isTrusted&&(t.startCreateProgramWork(n.name,a.time,a.level),t.startFocusing(),e.toWork())}},"Create program"),t.hasProgram(n.name)||0===v(a.level)||r.a.createElement(s.a,{color:p.a.theme.hack},r.a.createElement("b",null,"Unlocks in:")," ",v(a.level)," hacking levels"),-1!==o&&r.a.createElement(s.a,{color:p.a.theme.infolight},r.a.createElement("b",null,"Current completion:")," ",o,"%"),r.a.createElement(s.a,null,a.tooltip))})))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return g})),n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(535),o=n(1),s=n(65),l=n(145),c=n(45),f=n(21),u=n(10),m=n(43),h=n(105),d=n(29),p=n(5);const g=[];function y(t){const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(n,200);return()=>clearInterval(t)},[]),Object(a.useEffect)(()=>{t.player.factionInvitations.forEach(t=>{g.includes(t)||g.push(t)})},[]);const y=Object.values(p.a).map(t=>t),b=t.player.factions.slice(0);return b.sort((t,e)=>y.indexOf(t)-y.indexOf(e)),r.a.createElement(i.a,{disableGutters:!0,maxWidth:"md",sx:{mx:0,mb:10}},r.a.createElement(o.a,{variant:"h4"},"Factions"),r.a.createElement(o.a,{mb:4},"Throughout the game you may receive invitations from factions. There are many different factions, and each faction has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial to progressing in the game and unlocking endgame content."),r.a.createElement(o.a,{variant:"h5",color:"primary",mt:2,mb:1},"Factions you have joined:"),b.length>0&&r.a.createElement(s.a,{sx:{my:1,p:1,pb:0,display:"inline-block"}},r.a.createElement(m.a,{padding:"none",style:{width:"fit-content"}},r.a.createElement(l.a,null,b.map(e=>r.a.createElement(c.a,{key:e},r.a.createElement(m.b,null,r.a.createElement(o.a,{noWrap:!0,mb:1},e)),r.a.createElement(m.b,{align:"right"},r.a.createElement(f.a,{ml:1,mb:1},r.a.createElement(u.a,{onClick:()=>function(e){t.router.toFaction(e)}(d.a[e])},"Details"))),r.a.createElement(m.b,{align:"right"},r.a.createElement(f.a,{ml:1,mb:1},r.a.createElement(u.a,{sx:{width:"100%"},onClick:()=>function(e){t.router.toFaction(e,!0)}(d.a[e])},"Augmentations Left: ",((t,e)=>Object(h.a)(e,t).filter(t=>!e.hasAugmentation(t)).length)(d.a[e],t.player)))))))))||r.a.createElement(o.a,null,"You haven't joined any factions."),r.a.createElement(o.a,{variant:"h5",color:"primary",mt:4,mb:1},"Outstanding Faction Invitations"),r.a.createElement(o.a,{mb:1},"Factions you have been invited to. You can accept these faction invitations at any time:"),t.player.factionInvitations.length>0&&r.a.createElement(s.a,{sx:{my:1,mb:4,p:1,pb:0,display:"inline-block"}},r.a.createElement(m.a,{padding:"none"},r.a.createElement(l.a,null,t.player.factionInvitations.map(t=>r.a.createElement(c.a,{key:t},r.a.createElement(m.b,null,r.a.createElement(o.a,{noWrap:!0,mb:1},t)),r.a.createElement(m.b,{align:"right"},r.a.createElement(f.a,{ml:1,mb:1},r.a.createElement(u.a,{onClick:n=>function(t,n){t.isTrusted&&(Object(h.e)(d.a[n]),e(t=>!t))}(n,t)},"Join!"))))))))||r.a.createElement(o.a,null,"You have no outstanding faction invites."))}},,,function(t,e,n){"use strict";n.d(e,"b",(function(){return w})),n.d(e,"a",(function(){return S})),n.d(e,"c",(function(){return C}));var a=n(0),r=n.n(a),i=n(21),o=n(1),s=n(120),l=n(350),c=n(23),f=n(10),u=n(65),m=n(81),h=n(9),d=n(341),p=n(108),g=n(521),y=n(607),b=n(609),E=n(632),v=n.n(E),k=n(1372),_=n.n(k);let w=!1;function S(){w=!0}function C({router:t,softReset:e,errorData:n,resetError:E}){var k,S;return h.a.AutosaveInterval=0,Object(a.useEffect)(()=>{Object(d.b)().then(t=>{const e=`RECOVERY_BITBURNER_${Math.round(Date.now()/1e3)}.json`;Object(p.a)(e,t)})},[]),r.a.createElement(i.a,{sx:{padding:"8px 16px",minHeight:"100vh",maxWidth:"1200px",boxSizing:"border-box"}},r.a.createElement(o.a,{variant:"h3"},"RECOVERY MODE ACTIVATED"),r.a.createElement(o.a,null,"There was an error with your save file and the game went into recovery mode. In this mode saving is disabled and the game will automatically export your save file (to prevent corruption)."),r.a.createElement(o.a,null,"At this point it is recommended to alert a developer."),r.a.createElement(o.a,null,r.a.createElement(s.a,{href:null!==(k=null==n?void 0:n.issueUrl)&&void 0!==k?k:g.b,target:"_blank"},"File an issue on github")),r.a.createElement(o.a,null,r.a.createElement(s.a,{href:"https://www.reddit.com/r/Bitburner/",target:"_blank"},"Make a reddit post")),r.a.createElement(o.a,null,r.a.createElement(s.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},"Post in the #bug-report channel on Discord.")),r.a.createElement(o.a,null,"Please include your save file."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"You can disable recovery mode now. But chances are the game will not work correctly."),r.a.createElement(l.a,{sx:{my:2}},r.a.createElement(c.a,{title:"Disables the recovery mode & attempt to head back to the terminal page. This may or may not work. Ensure you have saved the recovery file."},r.a.createElement(f.a,{onClick:function(){E&&E(),w=!1,t.toTerminal()},startIcon:r.a.createElement(v.a,null)},"Disable Recovery Mode")),r.a.createElement(b.a,{color:"warning",onTriggered:e}),r.a.createElement(y.a,{color:"error"})),n&&r.a.createElement(u.a,{sx:{px:2,pt:1,pb:2,mt:2}},r.a.createElement(o.a,{variant:"h5"},n.title),r.a.createElement(i.a,{sx:{my:2}},r.a.createElement(m.a,{label:"Bug Report Text",value:n.body,variant:"outlined",color:"secondary",multiline:!0,fullWidth:!0,rows:12,sx:{"& .MuiOutlinedInput-root":{color:h.a.theme.secondary}}})),r.a.createElement(c.a,{title:"Submitting an issue to GitHub really help us improve the game!"},r.a.createElement(f.a,{component:s.a,startIcon:r.a.createElement(_.a,null),color:"info",sx:{px:2},href:null!==(S=n.issueUrl)&&void 0!==S?S:g.b,target:"_blank"},"Submit Issue to GitHub"))))}},,,function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var a=n(1003);let r=1;function i(t){return r+=t,()=>r-=t}function o(){return Object(a.a)(r)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(1004),r=n(298),i=n(371),o=n(240),s=n(38),l=n(6),c=n(578),f=n(63),u=n(16),m=n(25),h=n(147);function d(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class p{constructor(t={}){d(this,"name","The Corporation"),d(this,"divisions",[]),d(this,"funds",15e10),d(this,"revenue",0),d(this,"expenses",0),d(this,"fundingRound",0),d(this,"public",!1),d(this,"totalShares",s.a.INITIALSHARES),d(this,"numShares",s.a.INITIALSHARES),d(this,"shareSalesUntilPriceUpdate",s.a.SHARESPERPRICEUPDATE),d(this,"shareSaleCooldown",0),d(this,"issueNewSharesCooldown",0),d(this,"dividendPercentage",0),d(this,"dividendTaxPercentage",50),d(this,"issuedShares",0),d(this,"sharePrice",0),d(this,"storedCycles",0),d(this,"state",new a.a),this.name=t.name?t.name:"The Corporation";const e=Object.keys(r.a).length,n=Object.keys(i.a).length;this.unlockUpgrades=Array(e).fill(0),this.upgrades=Array(n).fill(0),this.upgradeMultipliers=Array(n).fill(1)}addFunds(t){isFinite(t)?this.funds=this.funds+t:console.error("Trying to add invalid amount of funds. Report to a developper.")}getState(){return this.state.getState()}storeCycles(t=1){this.storedCycles+=t}process(t){if(this.storedCycles>=s.a.CyclesPerIndustryStateCycle){const e=this.getState(),n=1,a=n*s.a.CyclesPerIndustryStateCycle;if(this.storedCycles-=a,this.divisions.forEach(t=>{t.process(n,e,this)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=a),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=a),"START"===e){this.revenue=0,this.expenses=0,this.divisions.forEach(t=>{t.lastCycleRevenue!==-1/0&&t.lastCycleRevenue!==1/0&&t.lastCycleExpenses!==-1/0&&t.lastCycleExpenses!==1/0&&(this.revenue=this.revenue+t.lastCycleRevenue,this.expenses=this.expenses+t.lastCycleExpenses)});const e=(this.revenue-this.expenses)*(n*s.a.SecsPerMarketCycle);if((isNaN(this.funds)||this.funds===1/0||this.funds===-1/0)&&(Object(u.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)"),this.funds=15e10),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>100*s.a.DividendMaxPercentage)console.error("Invalid Corporation dividend percentage: "+this.dividendPercentage);else{const n=e-this.dividendPercentage/100*e;t.gainMoney(this.getDividends(),"corporation"),this.addFunds(n)}else this.addFunds(e);this.updateSharePrice()}this.state.nextState()}}getDividends(){const t=(this.revenue-this.expenses)*s.a.SecsPerMarketCycle,e=this.dividendPercentage/100*t/this.totalShares,n=this.numShares*e;let a=-.15;return 1===this.unlockUpgrades[5]&&(a+=.05),1===this.unlockUpgrades[6]&&(a+=.1),Math.pow(n,l.a.CorporationSoftCap+a)}determineValuation(){let t,e=this.revenue-this.expenses;return this.public?(this.dividendPercentage>0&&(e*=(100-this.dividendPercentage)/100),t=this.funds+85e3*e,t*=Math.pow(1.1,this.divisions.length),t=Math.max(t,0)):(t=1e10+Math.max(this.funds,0)/3,e>0?(t+=315e3*e,t*=Math.pow(1.1,this.divisions.length)):t=1e10*Math.pow(1.1,this.divisions.length),t-=t%1e6),t*l.a.CorporationValuation}getTargetSharePrice(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)}updateSharePrice(){const t=this.getTargetSharePrice();this.sharePrice<=t?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)}immediatelyUpdateSharePrice(){this.sharePrice=this.getTargetSharePrice()}calculateShareSale(t){let e=t,n=this.shareSalesUntilPriceUpdate,a=this.sharePrice,r=0,i=0;const o=Math.ceil(t/s.a.SHARESPERPRICEUPDATE);if(isNaN(o)||o>1e7)return console.error("Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be "+o),[0,0,0];for(let t=0;t3600?Math.floor(e/3600)+" hour(s)":e>60?Math.floor(e/60)+" minute(s)":Math.floor(e)+" second(s)"}unlock(t){const e=t[0],n=t[1];for(;this.unlockUpgrades.length<=e;)this.unlockUpgrades.push(0);this.fundsthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=t,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-t/100,this.popEst0?1:-1),this.pop+=n,e.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}changeChaosByCount(t){if(isNaN(t))throw new Error("NaN passed into City.changeChaosByCount()");0!==t&&(this.chaos+=t,this.chaos<0&&(this.chaos=0))}toJSON(){return Object(i.b)("City",this)}static fromJSON(t){return Object(i.a)(l,t.data)}}i.c.constructors.City=l},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return c})),n.d(e,"e",(function(){return f})),n.d(e,"f",(function(){return u}));var a=n(29),r=n(511),i=n(82);function o(){return 2===this.bitNodeN||!(i.a[2]<=0)&&this.karma<=-54e3}function s(){const t=this.gang;if(null===t)throw new Error("Cannot get gang faction because player is not in a gang.");const e=a.a[t.facName];if(null==e)throw new Error("Gang has invalid faction name: "+t.facName);return e}function l(){if(!this.inGang())return"";const t=this.gang;if(null===t)throw new Error("Cannot get gang faction because player is not in a gang.");return t.facName}function c(t){if(!this.inGang())return!1;const e=this.gang;if(null===e)throw new Error("Cannot get gang faction because player is not in a gang.");return e.facName===t}function f(){return null!=this.gang&&null!=this.gang&&this.gang instanceof r.a}function u(t,e){this.gang=new r.a(t,e);const n=a.a[t];if(null==n)throw new Error("Invalid faction name when creating gang: "+t);n.playerReputation=0}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));class a{constructor(t,e=[],n=""){this.name=t,this.locations=e,this.asciiArt=n}addLocation(t){this.locations.push(t)}}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n(1),i=n(10),o=n(65),s=n(21);function l(t){return a.createElement(s.a,null,a.createElement(o.a,{sx:{my:1,p:1}},a.createElement(i.a,{onClick:t.onClick},t.buttonText),a.createElement(r.a,null,t.infoText)))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return f}));var a=n(0),r=n(1),i=n(23),o=n(10),s=n(81);let l;function c(t){let e="",n="";return t.tickerDisplayMode===l.Portfolio?(e="Switch to 'All Stocks' Mode",n="Displays all stocks on the WSE"):(e="Switch to 'Portfolio' Mode",n="Displays only the stocks for which you have shares or orders"),a.createElement(i.a,{title:a.createElement(r.a,null,n)},a.createElement(o.a,{onClick:t.changeDisplayMode},e))}function f(t){return a.createElement(a.Fragment,null,a.createElement(c,t),a.createElement("br",null),a.createElement(s.a,{sx:{width:"100%"},onChange:t.changeWatchlistFilter,placeholder:"Filter Stocks by symbol (comma-separated list)",type:"text"}))}!function(t){t[t.AllStocks=0]="AllStocks",t[t.Portfolio=1]="Portfolio"}(l||(l={}))},function(t,e,n){"use strict";n.d(e,"f",(function(){return c})),n.d(e,"b",(function(){return f})),n.d(e,"c",(function(){return u})),n.d(e,"e",(function(){return m})),n.d(e,"d",(function(){return h})),n.d(e,"a",(function(){return d}));var a=n(8),r=n(6),i=n(47),o=n(91),s=n(26),l=n(102);function c(){return!!Object(s.d)(l.a.DarkWeb)}function f(){const t=Object(s.d)(this.currentServer);if(null===t)throw new Error("somehow connected to a server that does not exist. "+this.currentServer);return t}function u(){const t=Object(s.d)("home");if(t instanceof i.a)return t;throw new Error("home computer was not a normal server")}function m(){const t=this.getHomeComputer().maxRam,e=Math.log2(t),n=Math.pow(1.58,e);return t*a.a.BaseCostFor1GBOfRamHome*n*r.a.HomeComputerRamCost}function h(){return 1e9*Math.pow(7.5,this.getHomeComputer().cpuCores)}function d(){const t="hacknet-node-"+this.hacknetNodes.length,e=new o.a({adminRights:!0,hostname:t,ip:Object(s.e)()});this.hacknetNodes.push(e.hostname),Object(s.a)(e);return this.getHomeComputer().serversOnNetwork.push(e.hostname),e.serversOnNetwork.push(l.a.Home),e}},,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(2),r=n(36),i=n(301),o=n(25),s=n(61);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class c{constructor(t=null){l(this,"name",""),l(this,"level",1),l(this,"maxLevel",1),l(this,"autoLevel",!0),l(this,"baseDifficulty",100),l(this,"difficultyFac",1.01),l(this,"rewardFac",1.02),l(this,"successes",0),l(this,"failures",0),l(this,"rankGain",0),l(this,"rankLoss",0),l(this,"hpLoss",0),l(this,"hpLost",0),l(this,"isStealth",!1),l(this,"isKill",!1),l(this,"count",Object(r.a)(1e3,25e3)),l(this,"weights",{hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7}),l(this,"decays",{hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9}),l(this,"teamCount",0),t&&t.name&&(this.name=t.name),t&&t.baseDifficulty&&(this.baseDifficulty=Object(i.a)(t.baseDifficulty,10)),t&&t.difficultyFac&&(this.difficultyFac=t.difficultyFac),t&&t.rewardFac&&(this.rewardFac=t.rewardFac),t&&t.rankGain&&(this.rankGain=t.rankGain),t&&t.rankLoss&&(this.rankLoss=t.rankLoss),t&&t.hpLoss&&(this.hpLoss=t.hpLoss),t&&t.isStealth&&(this.isStealth=t.isStealth),t&&t.isKill&&(this.isKill=t.isKill),t&&t.count&&(this.count=t.count),t&&t.weights&&(this.weights=t.weights),t&&t.decays&&(this.decays=t.decays);let e=0;for(const t of Object.keys(this.weights))this.weights.hasOwnProperty(t)&&(e+=this.weights[t]);if(e-1>=10*Number.EPSILON)throw new Error("Invalid weights when constructing Action "+this.name+". The weights should sum up to 1. They sum up to :1");for(const t of Object.keys(this.decays))if(this.decays.hasOwnProperty(t)&&this.decays[t]>1)throw new Error(`Invalid decays when constructing Action ${this.name}. Decay value cannot be greater than 1`)}getDifficulty(){const t=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(t))throw new Error("Calculated NaN in Action.getDifficulty()");return t}attempt(t){return Math.random()s.a.ChaosThreshold){const t=e.chaos-s.a.ChaosThreshold+1;return Math.pow(t,.5)}return 1}getEstSuccessChance(t){function e(t){return Math.max(0,Math.min(t,1))}const n=this.getSuccessChance(t,{est:!0}),a=this.getSuccessChance(t),r=Math.abs(a-n);let i=a-r,o=a+r;const s=t.getCurrentCity(),l=s.pop/s.popEst;return l<1?i*=l:o*=l,[e(i),e(o)]}getSuccessChance(t,e={est:!1}){if(null==t)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");let n=this.getDifficulty(),r=0;for(const e of Object.keys(this.weights))if(this.weights.hasOwnProperty(e)){const n=a.a.queryStatFromString(e),i="eff"+e.charAt(0).toUpperCase()+e.slice(1);let o=t.skillMultipliers[i];null==o&&(console.error("Failed to find Bladeburner Skill multiplier for: "+e),o=1),r+=this.weights[e]*Math.pow(o*n,this.decays[e])}if(r*=a.a.getIntelligenceBonus(.75),r*=t.calculateStaminaPenalty(),r*=this.getTeamSuccessBonus(t),r*=this.getChaosCompetencePenalty(t,e),n*=this.getChaosDifficultyBonus(t),"Raid"==this.name&&t.getCurrentCity().comms<=0)return 0;if(r*=t.skillMultipliers.successChanceAll,r*=this.getActionTypeSkillSuccessBonus(t),this.isStealth&&(r*=t.skillMultipliers.successChanceStealth),this.isKill&&(r*=t.skillMultipliers.successChanceKill),r*=a.a.bladeburner_success_chance_mult,isNaN(r))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,r/n)}getSuccessesNeededForNextLevel(t){return Math.ceil(.5*this.maxLevel*(2*t+(this.maxLevel-1)))}setMaxLevel(t){this.successes>=this.getSuccessesNeededForNextLevel(t)&&++this.maxLevel}toJSON(){return Object(o.b)("Action",this)}static fromJSON(t){return Object(o.a)(c,t.data)}}o.c.constructors.Action=c},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(17),o=n(1),s=n(23),l=n(113),c=n(137);const f=Object(l.a)(t=>Object(c.a)({travel:{color:t.colors.white,lineHeight:"1em",whiteSpace:"pre",cursor:"pointer"}}));function u(t){const e=f();return t.city!==t.currentCity?r.a.createElement(s.a,{title:r.a.createElement(o.a,null,t.city)},r.a.createElement("span",{onClick:()=>t.onTravel(t.city),className:e.travel},t.city[0])):r.a.createElement("span",null,t.city[0])}function m(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ,_ . ._. _. ."),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / ,/'-/~ '\\ ,' _ , '",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Volhaven}),",'|~ ._/-, /~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},".-~ '| '',\\~|\\ _\\~ ,_ , ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Chongqing})," /,"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," '\\ ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Sector12})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | / ._-~'\\_ _~| \\ ) ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.NewTokyo})),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ __-\\ '/ ~ |\\ \\_ / ~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ~-_' _; '\\ '-, \\,' /\\/ |"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," '\\_,~'\\_ \\_ _, /' ' |, /|'"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / \\_ ~ | / \\ ~'; -,_."),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ~\\ | | , '-_, ,; ~ ~\\"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\, ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Aevum})," / \\ / /| ,-, , -,"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ,/ | |' |/ ,- ~ \\ '."),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ,| ,/ \\ ,/ \\ ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Ishima})," |"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / | ~ -~~-, / _"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ,-' ~ /"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / ,' ~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ',| ~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ~'"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(24),o=n(1124),s=n(1125);function l(t){const e=t.action.getEstSuccessChance(t.bladeburner);let n=r.a.createElement(r.a.Fragment,null);return n=e[0]===e[1]?r.a.createElement(r.a.Fragment,null,Object(i.d)(100*e[0],1),"%"):r.a.createElement(r.a.Fragment,null,Object(i.d)(100*e[0],1),"% ~ ",Object(i.d)(100*e[1],1),"%"),r.a.createElement(r.a.Fragment,null,"Estimated success chance: ",n," ",t.action.isStealth?r.a.createElement(o.a,null):r.a.createElement(r.a.Fragment,null),t.action.isKill?r.a.createElement(s.a,null):r.a.createElement(r.a.Fragment,null))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(41);function o(t){return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},t.children)}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a);function i(t,e,n){return t.substring(0,e)+n+t.substring(e+1)}function o(t){const[e,n]=Object(a.useState)(t.content);return Object(a.useEffect)(()=>{let t=5;const a=[],r=setInterval(()=>{if(t--,t>0)return;t=5*Math.random();const r=Math.random()*e.length,o=e.charAt(r);n(t=>i(t,r,function(t){const e=t=>t[Math.floor(Math.random()*t.length)],n=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const a of n)if(a.includes(t))return e(a);return e("!@#$%^&*()_+|\\';\"/.,?`~")}(o))),a.push(window.setTimeout(()=>{n(t=>i(t,r,o))},500))},20);return()=>{clearInterval(r),a.forEach(t=>clearTimeout(t))}},[]),r.a.createElement("span",null,e)}},,,,,,,,,function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"d",(function(){return m})),n.d(e,"b",(function(){return h})),n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(256),o=n(2),s=n(87),l=n(102),c=n(4),f=n(20);function u(){const t=o.a.getCurrentServer();null!==t&&l.a.DarkWeb==t.hostname&&s.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. Use 'buy -a' to purchase all unowned items.")}function m(){for(const t of Object.keys(i.a)){const e=i.a[t],n=o.a.getHomeComputer().programs.includes(e.program)?r.a.createElement("span",{style:{color:"green"}},"[OWNED]"):r.a.createElement(f.a,{money:e.price});s.a.printRaw(r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,e.program)," - ",r.a.createElement("span",null,n)," - ",r.a.createElement("span",null,e.description)))}}function h(t){t=t.toLowerCase();let e=null;for(const n of Object.keys(i.a)){const a=i.a[n];a.program.toLowerCase()==t&&(e=a)}if(null===e)return void s.a.error("Unrecognized item: "+t);if(o.a.hasProgram(e.program))return void s.a.print("You already have the "+e.program+" program");if(o.a.money{var n,a;return(null===(n=e)||void 0===n?void 0:n.program)&&t.startsWith(null===(a=e)||void 0===a?void 0:a.program)});a>-1&&n.splice(a,1),o.a.getHomeComputer().programs.push(e.program),s.a.print("You have purchased the "+e.program+" program. The new program can be found on your home computer.")}function d(){const t=[];let e=0;for(const n of Object.keys(i.a)){const a=i.a[n];o.a.hasProgram(a.program)||(t.push(a),e+=a.price)}if(0!==t.length)if(e>o.a.money)s.a.error("Not enough money to purchase remaining programs, "+c.a.formatMoney(e)+" required");else for(const e of t)h(e.program);else s.a.print("All available programs have been purchased already.")}},function(t,e,n){"use strict";function a(t,e){const n=t.hostname;return"requiredHackingSkill"in t?!1===t.hasAdminRights?{res:!1,msg:`Cannot ${e} ${n} server because you do not have root access`}:{res:!0}:{res:!1,msg:`Cannot ${e} ${n} server because it is a Hacknet Node`}}function r(t,e){const n=a(t,"hack");if(!n.res)return n;return t.requiredHackingSkill>e.hacking?{res:!1,msg:`Cannot hack ${t.hostname} server because your hacking skill is not high enough`}:{res:!0}}function i(t){return a(t,"grow")}function o(t){return a(t,"weaken")}n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return o}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(173),r=n(8);class i{constructor(t){this.augmentation=t}get cost(){return this.augmentation.startingCost*r.a.AugmentationGraftingCostMult}get time(){const t=Math.max(Object(a.sum)(Object.values(this.augmentation.mults)),1),e=Math.log2(t);return(r.a.AugmentationGraftingTimeBase*e+r.a.MillisecondsPerHalfHour)/2}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(4),o=n(116);function s({reputation:t}){return r.a.createElement(o.a,{reputation:i.a.formatReputation(t)+" / sec"})}},function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var a=n(28),r=n(152);function i(t){return"string"==typeof t&&(!isNaN(t)&&!isNaN(parseFloat(t)))}function o(t){const e=(t=(t=t.trim()).replace(/\s\s+/g," ")).match(/(?:'[^']*'|"[^"]*"|[^;"])*/g);if(!e)return[];const n=e.map(r.h).map(t=>t.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat(),a=[];for(const t of n)null!==t&&(t.match(/^\s*$/)||a.push(t.trim()));return a}function s(t){let e="";const n=[];let r=0,o=0,s="";for(;o=1&&(s=t.charAt(o-1),"\\"===s&&(l=!0));const c=t.charAt(o);if(c===a.a.DOUBLE_QUOTE)if(l||s!==a.a.SPACE)""===e?e=a.a.DOUBLE_QUOTE:e===a.a.DOUBLE_QUOTE&&(e="");else{const e=t.indexOf(a.a.DOUBLE_QUOTE,o+1);if(-1!==e&&(e===t.length-1||t.charAt(e+1)===a.a.SPACE)){n.push(t.substr(o+1,e-o-1)),r=o=e===t.length-1?e+1:e+2;continue}}else if(c===a.a.QUOTE)if(l||s!==a.a.SPACE)""===e?e=a.a.QUOTE:e===a.a.QUOTE&&(e="");else{const e=t.indexOf(a.a.QUOTE,o+1);if(-1!==e&&(e===t.length-1||t.charAt(e+1)===a.a.SPACE)){n.push(t.substr(o+1,e-o-1)),r=o=e===t.length-1?e+1:e+2;continue}}else if(c===a.a.SPACE&&""===e){const e=t.substr(r,o-r);i(e)?n.push(parseFloat(e)):"true"===e?n.push(!0):"false"===e?n.push(!1):n.push(e),r=o+1}++o}if(r!==o){const e=t.substr(r,o-r);i(e)?n.push(parseFloat(e)):"true"===e?n.push(!0):"false"===e?n.push(!1):n.push(e)}return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(1364),o=n(1),s=n(10);function l(t){const[e,n]=Object(a.useState)(0),[l,c]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,t.lines.slice(0,e).map((t,e)=>r.a.createElement(o.a,{key:e},t)),t.lines.length>e&&r.a.createElement(i.a,{key:e,text:t.lines[e],onDone:function(){const a=e+1;n(a),a>=t.lines.length&&(t.onDone&&t.auto&&t.onDone(),c(!0))}}),!t.auto&&t.onDone&&l&&r.a.createElement(s.a,{onClick:t.onDone},"Continue ..."))}},,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return r}));const a=5,r=1e13},function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return m})),n.d(e,"b",(function(){return h})),n.d(e,"d",(function(){return d})),n.d(e,"e",(function(){return p}));var a=n(40),r=n(15),i=n(2),o=n(64),s=n(310),l=n(0),c=n.n(l),f=n(5);const u=[new a.a({name:r.a.HemoRecirculator,moneyCost:45e6,repCost:1e4,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood.",strength_mult:1.08,defense_mult:1.08,agility_mult:1.08,dexterity_mult:1.08,factions:[f.a.Tetrads,f.a.TheDarkArmy,f.a.TheSyndicate]}),new a.a({name:r.a.Targeting1,moneyCost:15e6,repCost:5e3,info:"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates and enhances balance and hand-eye coordination.",dexterity_mult:1.1,factions:[f.a.SlumSnakes,f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Sector12,f.a.Ishima,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new a.a({name:r.a.Targeting2,moneyCost:425e5,repCost:8750,info:"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting reality by digitally displaying weaknesses and vital signs of threats.",prereqs:[r.a.Targeting1],dexterity_mult:1.2,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Sector12,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new a.a({name:r.a.Targeting3,moneyCost:115e6,repCost:27500,info:"The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.",prereqs:[r.a.Targeting2],dexterity_mult:1.3,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries,f.a.TheCovenant]}),new a.a({name:r.a.SyntheticHeart,moneyCost:2875e6,repCost:75e4,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood more efficiently than an organic heart.",agility_mult:1.5,strength_mult:1.5,factions:[f.a.KuaiGongInternational,f.a.FulcrumSecretTechnologies,f.a.SpeakersForTheDead,f.a.NWO,f.a.TheCovenant,f.a.Daedalus,f.a.Illuminati]}),new a.a({name:r.a.SynfibrilMuscle,repCost:437500,moneyCost:1125e6,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'.",strength_mult:1.3,defense_mult:1.3,factions:[f.a.KuaiGongInternational,f.a.FulcrumSecretTechnologies,f.a.SpeakersForTheDead,f.a.NWO,f.a.TheCovenant,f.a.Daedalus,f.a.Illuminati,f.a.BladeIndustries]}),new a.a({name:r.a.CombatRib1,repCost:7500,moneyCost:2375e4,info:"The rib cage is augmented to continuously release boosters into the bloodstream which increase the oxygen-carrying capacity of blood.",strength_mult:1.1,defense_mult:1.1,factions:[f.a.SlumSnakes,f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Volhaven,f.a.Ishima,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new a.a({name:r.a.CombatRib2,repCost:18750,moneyCost:65e6,info:"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which improve focus and endurance while decreasing reaction time and fatigue.",prereqs:[r.a.CombatRib1],strength_mult:1.14,defense_mult:1.14,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Volhaven,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new a.a({name:r.a.CombatRib3,repCost:35e3,moneyCost:12e7,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.",prereqs:[r.a.CombatRib2],strength_mult:1.18,defense_mult:1.18,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries,f.a.TheCovenant]}),new a.a({name:r.a.NanofiberWeave,repCost:37500,moneyCost:125e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, which improves its regenerative and extracellular homeostasis abilities.",strength_mult:1.2,defense_mult:1.2,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.OmniTekIncorporated,f.a.BladeIndustries,f.a.TianDiHui,f.a.SpeakersForTheDead,f.a.FulcrumSecretTechnologies]}),new a.a({name:r.a.SubdermalArmor,repCost:875e3,moneyCost:325e7,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.",defense_mult:2.2,factions:[f.a.TheSyndicate,f.a.FulcrumSecretTechnologies,f.a.Illuminati,f.a.Daedalus,f.a.TheCovenant]}),new a.a({name:r.a.WiredReflexes,repCost:1250,moneyCost:25e5,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.",agility_mult:1.05,dexterity_mult:1.05,factions:[f.a.TianDiHui,f.a.SlumSnakes,f.a.Sector12,f.a.Volhaven,f.a.Aevum,f.a.Ishima,f.a.TheSyndicate,f.a.TheDarkArmy,f.a.SpeakersForTheDead]}),new a.a({name:r.a.GrapheneBoneLacings,repCost:1125e3,moneyCost:425e7,info:"Graphene is grafted and fused into the skeletal structure, enhancing bone density and tensile strength.",strength_mult:1.7,defense_mult:1.7,factions:[f.a.FulcrumSecretTechnologies,f.a.TheCovenant]}),new a.a({name:r.a.BionicSpine,repCost:45e3,moneyCost:125e6,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.",strength_mult:1.15,defense_mult:1.15,agility_mult:1.15,dexterity_mult:1.15,factions:[f.a.SpeakersForTheDead,f.a.TheSyndicate,f.a.KuaiGongInternational,f.a.OmniTekIncorporated,f.a.BladeIndustries]}),new a.a({name:r.a.GrapheneBionicSpine,repCost:1625e3,moneyCost:6e9,info:"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene which enhances durability and supercharges all body functions.",prereqs:[r.a.BionicSpine],strength_mult:1.6,defense_mult:1.6,agility_mult:1.6,dexterity_mult:1.6,factions:[f.a.FulcrumSecretTechnologies,f.a.ECorp]}),new a.a({name:r.a.BionicLegs,repCost:15e4,moneyCost:375e6,info:"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.",agility_mult:1.6,factions:[f.a.SpeakersForTheDead,f.a.TheSyndicate,f.a.KuaiGongInternational,f.a.OmniTekIncorporated,f.a.BladeIndustries]}),new a.a({name:r.a.GrapheneBionicLegs,repCost:75e4,moneyCost:45e8,info:"An upgrade to the 'Bionic Legs' augmentation. The legs are fused with graphene, greatly enhancing jumping ability.",prereqs:[r.a.BionicLegs],agility_mult:2.5,factions:[f.a.MegaCorp,f.a.ECorp,f.a.FulcrumSecretTechnologies]}),new a.a({name:r.a.SpeechProcessor,repCost:7500,moneyCost:5e7,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.",charisma_mult:1.2,factions:[f.a.TianDiHui,f.a.Chongqing,f.a.Sector12,f.a.NewTokyo,f.a.Aevum,f.a.Ishima,f.a.Volhaven,f.a.Silhouette]}),new a.a({name:r.a.TITN41Injection,repCost:25e3,moneyCost:19e7,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.",charisma_mult:1.15,charisma_exp_mult:1.15,factions:[f.a.Silhouette]}),new a.a({name:r.a.EnhancedSocialInteractionImplant,repCost:375e3,moneyCost:1375e6,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 socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.",charisma_mult:1.6,charisma_exp_mult:1.6,factions:[f.a.BachmanAssociates,f.a.NWO,f.a.ClarkeIncorporated,f.a.OmniTekIncorporated,f.a.FourSigma]}),new a.a({name:r.a.BitWire,repCost:3750,moneyCost:1e7,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.",hacking_mult:1.05,factions:[f.a.CyberSec,f.a.NiteSec]}),new a.a({name:r.a.ArtificialBioNeuralNetwork,repCost:275e3,moneyCost:3e9,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.",hacking_speed_mult:1.03,hacking_money_mult:1.15,hacking_mult:1.12,factions:[f.a.BitRunners,f.a.FulcrumSecretTechnologies]}),new a.a({name:r.a.ArtificialSynapticPotentiation,repCost:6250,moneyCost:8e7,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.",hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_exp_mult:1.05,factions:[f.a.TheBlackHand,f.a.NiteSec]}),new a.a({name:r.a.EnhancedMyelinSheathing,repCost:1e5,moneyCost:1375e6,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.",hacking_speed_mult:1.03,hacking_exp_mult:1.1,hacking_mult:1.08,factions:[f.a.FulcrumSecretTechnologies,f.a.BitRunners,f.a.TheBlackHand]}),new a.a({name:r.a.SynapticEnhancement,repCost:2e3,moneyCost:75e5,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.",hacking_speed_mult:1.03,factions:[f.a.CyberSec,f.a.Aevum]}),new a.a({name:r.a.NeuralRetentionEnhancement,repCost:2e4,moneyCost:25e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening the ability to retain information.",hacking_exp_mult:1.25,factions:[f.a.NiteSec]}),new a.a({name:r.a.DataJack,repCost:112500,moneyCost:45e7,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.",hacking_money_mult:1.25,factions:[f.a.BitRunners,f.a.TheBlackHand,f.a.NiteSec,f.a.Chongqing,f.a.NewTokyo]}),new a.a({name:r.a.ENM,repCost:15e3,moneyCost:25e7,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.",hacking_mult:1.08,factions:[f.a.BitRunners,f.a.TheBlackHand,f.a.NiteSec,f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.BladeIndustries]}),new a.a({name:r.a.ENMCore,repCost:175e3,moneyCost:25e8,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.",prereqs:[r.a.ENM],hacking_speed_mult:1.03,hacking_money_mult:1.1,hacking_chance_mult:1.03,hacking_exp_mult:1.07,hacking_mult:1.07,factions:[f.a.BitRunners,f.a.TheBlackHand,f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.BladeIndustries]}),new a.a({name:r.a.ENMCoreV2,repCost:1e6,moneyCost:45e8,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.",prereqs:[r.a.ENMCore],hacking_speed_mult:1.05,hacking_money_mult:1.3,hacking_chance_mult:1.05,hacking_exp_mult:1.15,hacking_mult:1.08,factions:[f.a.BitRunners,f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.BladeIndustries,f.a.OmniTekIncorporated,f.a.KuaiGongInternational]}),new a.a({name:r.a.ENMCoreV3,repCost:175e4,moneyCost:75e8,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.",prereqs:[r.a.ENMCoreV2],hacking_speed_mult:1.05,hacking_money_mult:1.4,hacking_chance_mult:1.1,hacking_exp_mult:1.25,hacking_mult:1.1,factions:[f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.Daedalus,f.a.TheCovenant,f.a.Illuminati]}),new a.a({name:r.a.ENMAnalyzeEngine,repCost:625e3,moneyCost:6e9,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.",prereqs:[r.a.ENM],hacking_speed_mult:1.1,factions:[f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.Daedalus,f.a.TheCovenant,f.a.Illuminati]}),new a.a({name:r.a.ENMDMA,repCost:1e6,moneyCost:7e9,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.",prereqs:[r.a.ENM],hacking_money_mult:1.4,hacking_chance_mult:1.2,factions:[f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.Daedalus,f.a.TheCovenant,f.a.Illuminati]}),new a.a({name:r.a.Neuralstimulator,repCost:5e4,moneyCost:3e9,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.",hacking_speed_mult:1.02,hacking_chance_mult:1.1,hacking_exp_mult:1.12,factions:[f.a.TheBlackHand,f.a.Chongqing,f.a.Sector12,f.a.NewTokyo,f.a.Aevum,f.a.Ishima,f.a.Volhaven,f.a.BachmanAssociates,f.a.ClarkeIncorporated,f.a.FourSigma]}),new a.a({name:r.a.NeuralAccelerator,repCost:2e5,moneyCost:175e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.",hacking_mult:1.1,hacking_exp_mult:1.15,hacking_money_mult:1.2,factions:[f.a.BitRunners]}),new a.a({name:r.a.CranialSignalProcessorsG1,repCost:1e4,moneyCost:7e7,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.",hacking_speed_mult:1.01,hacking_mult:1.05,factions:[f.a.CyberSec,f.a.NiteSec]}),new a.a({name:r.a.CranialSignalProcessorsG2,repCost:18750,moneyCost:125e6,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.",prereqs:[r.a.CranialSignalProcessorsG1],hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_mult:1.07,factions:[f.a.CyberSec,f.a.NiteSec]}),new a.a({name:r.a.CranialSignalProcessorsG3,repCost:5e4,moneyCost:55e7,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.",prereqs:[r.a.CranialSignalProcessorsG2],hacking_speed_mult:1.02,hacking_money_mult:1.15,hacking_mult:1.09,factions:[f.a.NiteSec,f.a.TheBlackHand,f.a.BitRunners]}),new a.a({name:r.a.CranialSignalProcessorsG4,repCost:125e3,moneyCost:11e8,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.",prereqs:[r.a.CranialSignalProcessorsG3],hacking_speed_mult:1.02,hacking_money_mult:1.2,hacking_grow_mult:1.25,factions:[f.a.TheBlackHand,f.a.BitRunners]}),new a.a({name:r.a.CranialSignalProcessorsG5,repCost:25e4,moneyCost:225e7,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.",prereqs:[r.a.CranialSignalProcessorsG4],hacking_mult:1.3,hacking_money_mult:1.25,hacking_grow_mult:1.75,factions:[f.a.BitRunners]}),new a.a({name:r.a.NeuronalDensification,repCost:187500,moneyCost:1375e6,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.",hacking_mult:1.15,hacking_exp_mult:1.1,hacking_speed_mult:1.03,factions:[f.a.ClarkeIncorporated]}),new a.a({name:r.a.NuoptimalInjectorImplant,repCost:5e3,moneyCost:2e7,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.",company_rep_mult:1.2,factions:[f.a.TianDiHui,f.a.Volhaven,f.a.NewTokyo,f.a.Chongqing,f.a.ClarkeIncorporated,f.a.FourSigma,f.a.BachmanAssociates]}),new a.a({name:r.a.SpeechEnhancement,repCost:2500,moneyCost:125e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.",company_rep_mult:1.1,charisma_mult:1.1,factions:[f.a.TianDiHui,f.a.SpeakersForTheDead,f.a.FourSigma,f.a.KuaiGongInternational,f.a.ClarkeIncorporated,f.a.BachmanAssociates]}),new a.a({name:r.a.FocusWire,repCost:75e3,moneyCost:9e8,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.",hacking_exp_mult:1.05,strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,charisma_exp_mult:1.05,company_rep_mult:1.1,work_money_mult:1.2,factions:[f.a.BachmanAssociates,f.a.ClarkeIncorporated,f.a.FourSigma,f.a.KuaiGongInternational]}),new a.a({name:r.a.PCDNI,repCost:375e3,moneyCost:375e7,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.",company_rep_mult:1.3,hacking_mult:1.08,factions:[f.a.FourSigma,f.a.OmniTekIncorporated,f.a.ECorp,f.a.BladeIndustries]}),new a.a({name:r.a.PCDNIOptimizer,repCost:5e5,moneyCost:45e8,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.",prereqs:[r.a.PCDNI],company_rep_mult:1.75,hacking_mult:1.1,factions:[f.a.FulcrumSecretTechnologies,f.a.ECorp,f.a.BladeIndustries]}),new a.a({name:r.a.PCDNINeuralNetwork,repCost:15e5,moneyCost:75e8,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.",prereqs:[r.a.PCDNI],company_rep_mult:2,hacking_mult:1.1,hacking_speed_mult:1.05,factions:[f.a.FulcrumSecretTechnologies]}),new a.a({name:r.a.ADRPheromone1,repCost:3750,moneyCost:175e5,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.",company_rep_mult:1.1,faction_rep_mult:1.1,factions:[f.a.TianDiHui,f.a.TheSyndicate,f.a.NWO,f.a.MegaCorp,f.a.FourSigma]}),new a.a({name:r.a.ADRPheromone2,repCost:62500,moneyCost:55e7,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.",company_rep_mult:1.2,faction_rep_mult:1.2,factions:[f.a.Silhouette,f.a.FourSigma,f.a.BachmanAssociates,f.a.ClarkeIncorporated]}),new a.a({name:r.a.ShadowsSimulacrum,repCost:37500,moneyCost:4e8,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.",company_rep_mult:1.15,faction_rep_mult:1.15,factions:[f.a.TheSyndicate,f.a.TheDarkArmy,f.a.SpeakersForTheDead]}),new a.a({name:r.a.HacknetNodeCPUUpload,repCost:3750,moneyCost:11e6,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.",hacknet_node_money_mult:1.15,hacknet_node_purchase_cost_mult:.85,factions:[f.a.Netburners]}),new a.a({name:r.a.HacknetNodeCacheUpload,repCost:2500,moneyCost:55e5,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.",hacknet_node_money_mult:1.1,hacknet_node_level_cost_mult:.85,factions:[f.a.Netburners]}),new a.a({name:r.a.HacknetNodeNICUpload,repCost:1875,moneyCost:45e5,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.",hacknet_node_money_mult:1.1,hacknet_node_purchase_cost_mult:.9,factions:[f.a.Netburners]}),new a.a({name:r.a.HacknetNodeKernelDNI,repCost:7500,moneyCost:4e7,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.",hacknet_node_money_mult:1.25,factions:[f.a.Netburners]}),new a.a({name:r.a.HacknetNodeCoreDNI,repCost:12500,moneyCost:6e7,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.",hacknet_node_money_mult:1.45,factions:[f.a.Netburners]}),new a.a({name:r.a.Neurotrainer1,repCost:1e3,moneyCost:4e6,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.",hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1,factions:[f.a.CyberSec,f.a.Aevum]}),new a.a({name:r.a.Neurotrainer2,repCost:1e4,moneyCost:45e6,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.",hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15,factions:[f.a.BitRunners,f.a.NiteSec]}),new a.a({name:r.a.Neurotrainer3,repCost:25e3,moneyCost:13e7,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.",hacking_exp_mult:1.2,strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,charisma_exp_mult:1.2,factions:[f.a.NWO,f.a.FourSigma]}),new a.a({name:r.a.Hypersight,repCost:15e4,moneyCost:275e7,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.",dexterity_mult:1.4,hacking_speed_mult:1.03,hacking_money_mult:1.1,factions:[f.a.BladeIndustries,f.a.KuaiGongInternational]}),new a.a({name:r.a.LuminCloaking1,repCost:1500,moneyCost:5e6,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.",agility_mult:1.05,crime_money_mult:1.1,factions:[f.a.SlumSnakes,f.a.Tetrads]}),new a.a({name:r.a.LuminCloaking2,repCost:5e3,moneyCost:3e7,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.",prereqs:[r.a.LuminCloaking1],agility_mult:1.1,defense_mult:1.1,crime_money_mult:1.25,factions:[f.a.SlumSnakes,f.a.Tetrads]}),new a.a({name:r.a.SmartSonar,repCost:22500,moneyCost:75e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.",dexterity_mult:1.1,dexterity_exp_mult:1.15,crime_money_mult:1.25,factions:[f.a.SlumSnakes]}),new a.a({name:r.a.PowerRecirculator,repCost:25e3,moneyCost:18e7,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.",hacking_mult:1.05,strength_mult:1.05,defense_mult:1.05,dexterity_mult:1.05,agility_mult:1.05,charisma_mult:1.05,hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1,factions:[f.a.Tetrads,f.a.TheDarkArmy,f.a.TheSyndicate,f.a.NWO]}),new a.a({name:r.a.QLink,repCost:1875e3,moneyCost:25e12,info:`A brain implant that wirelessly connects you to the ${f.a.Illuminati}'s quantum supercomputer, allowing you to access and use its incredible computing power.`,hacking_mult:1.75,hacking_speed_mult:2,hacking_chance_mult:2.5,hacking_money_mult:4,factions:[f.a.Illuminati]}),new a.a({name:r.a.SPTN97,repCost:125e4,moneyCost:4875e6,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.",strength_mult:1.75,defense_mult:1.75,dexterity_mult:1.75,agility_mult:1.75,hacking_mult:1.15,factions:[f.a.TheCovenant]}),new a.a({name:r.a.HiveMind,repCost:15e5,moneyCost:55e8,info:`A brain implant developed by ${f.a.ECorp}. They do not reveal what exactly the implant does, but they promise that it will greatly enhance your abilities.`,hacking_grow_mult:3,stats:null,factions:[f.a.ECorp]}),new a.a({name:r.a.TheRedPill,repCost:25e5,moneyCost:0,info:"It's time to leave the cave.",stats:null,factions:[f.a.Daedalus]}),new a.a({name:r.a.CordiARCReactor,repCost:1125e3,moneyCost:5e9,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.",strength_mult:1.35,defense_mult:1.35,dexterity_mult:1.35,agility_mult:1.35,strength_exp_mult:1.35,defense_exp_mult:1.35,dexterity_exp_mult:1.35,agility_exp_mult:1.35,factions:[f.a.MegaCorp]}),new a.a({name:r.a.SmartJaw,repCost:375e3,moneyCost:275e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.",charisma_mult:1.5,charisma_exp_mult:1.5,company_rep_mult:1.25,faction_rep_mult:1.25,factions:[f.a.BachmanAssociates]}),new a.a({name:r.a.Neotra,repCost:562500,moneyCost:2875e6,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.",strength_mult:1.55,defense_mult:1.55,factions:[f.a.BladeIndustries]}),new a.a({name:r.a.Xanipher,repCost:875e3,moneyCost:425e7,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.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15,factions:[f.a.NWO]}),new a.a({name:r.a.HydroflameLeftArm,repCost:125e4,moneyCost:25e11,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 user's strength to unbelievable levels. The augmentation gets more powerful over time for seemingly no reason.",strength_mult:2.7,factions:[f.a.NWO]}),new a.a({name:r.a.nextSENS,repCost:437500,moneyCost:1925e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,factions:[f.a.ClarkeIncorporated]}),new a.a({name:r.a.OmniTekInfoLoad,repCost:625e3,moneyCost:2875e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.",hacking_mult:1.2,hacking_exp_mult:1.25,factions:[f.a.OmniTekIncorporated]}),new a.a({name:r.a.PhotosyntheticCells,repCost:562500,moneyCost:275e7,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.",strength_mult:1.4,defense_mult:1.4,agility_mult:1.4,factions:[f.a.KuaiGongInternational]}),new a.a({name:r.a.Neurolink,repCost:875e3,moneyCost:4375e6,info:`A brain implant that provides a high-bandwidth, direct neural link between your mind and the ${f.a.BitRunners}' data servers, which reportedly contain the largest database of hacking tools and information in the world.`,hacking_mult:1.15,hacking_exp_mult:1.2,hacking_chance_mult:1.1,hacking_speed_mult:1.05,programs:[o.a.FTPCrackProgram.name,o.a.RelaySMTPProgram.name],factions:[f.a.BitRunners]}),new a.a({name:r.a.TheBlackHand,repCost:1e5,moneyCost:55e7,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.",strength_mult:1.15,dexterity_mult:1.15,hacking_mult:1.1,hacking_speed_mult:1.02,hacking_money_mult:1.1,factions:[f.a.TheBlackHand]}),new a.a({name:r.a.CRTX42AA,repCost:45e3,moneyCost:225e6,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.",hacking_mult:1.08,hacking_exp_mult:1.15,factions:[f.a.NiteSec]}),new a.a({name:r.a.Neuregen,repCost:37500,moneyCost:375e6,info:"A drug that genetically modifies the neurons in the brain resulting in neurons that never die, continuously regenerate, and strengthen themselves.",hacking_exp_mult:1.4,factions:[f.a.Chongqing]}),new a.a({name:r.a.CashRoot,repCost:12500,moneyCost:125e6,info:c.a.createElement(c.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."),startingMoney:1e6,programs:[o.a.BruteSSHProgram.name],factions:[f.a.Sector12]}),new a.a({name:r.a.NutriGen,repCost:6250,moneyCost:25e5,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.",strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,factions:[f.a.NewTokyo]}),new a.a({name:r.a.PCMatrix,repCost:1e5,moneyCost:2e9,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.",charisma_mult:1.0777,charisma_exp_mult:1.0777,work_money_mult:1.777,faction_rep_mult:1.0777,company_rep_mult:1.0777,crime_success_mult:1.0777,crime_money_mult:1.0777,programs:[o.a.DeepscanV1.name,o.a.AutoLink.name],factions:[f.a.Aevum]}),new a.a({name:r.a.INFRARet,repCost:7500,moneyCost:3e7,info:"A tiny chip that sits behind the retinae. This implant lets the user visually detect infrared radiation.",crime_success_mult:1.25,crime_money_mult:1.1,dexterity_mult:1.1,factions:[f.a.Ishima]}),new a.a({name:r.a.DermaForce,repCost:15e3,moneyCost:5e7,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.",defense_mult:1.4,factions:[f.a.Volhaven]}),new a.a({name:r.a.GrapheneBrachiBlades,repCost:225e3,moneyCost:25e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material making them stronger and lighter.",prereqs:[r.a.BrachiBlades],strength_mult:1.4,defense_mult:1.4,crime_success_mult:1.1,crime_money_mult:1.3,factions:[f.a.SpeakersForTheDead]}),new a.a({name:r.a.GrapheneBionicArms,repCost:5e5,moneyCost:375e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them stronger and lighter.",prereqs:[r.a.BionicArms],strength_mult:1.85,dexterity_mult:1.85,factions:[f.a.TheDarkArmy]}),new a.a({name:r.a.BrachiBlades,repCost:12500,moneyCost:9e7,info:"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.",strength_mult:1.15,defense_mult:1.15,crime_success_mult:1.1,crime_money_mult:1.15,factions:[f.a.TheSyndicate]}),new a.a({name:r.a.BionicArms,repCost:62500,moneyCost:275e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.",strength_mult:1.3,dexterity_mult:1.3,factions:[f.a.Tetrads]}),new a.a({name:r.a.SNA,repCost:6250,moneyCost:3e7,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.",work_money_mult:1.1,company_rep_mult:1.15,faction_rep_mult:1.15,factions:[f.a.TianDiHui]}),new a.a({name:r.a.NeuroreceptorManager,repCost:75e3,moneyCost:55e7,info:"A brain implant carefully assembled around the synapses, which micromanages the activity and levels of various neuroreceptor chemicals and modulates electrical activity to optimize concentration, allowing the user to multitask much more effectively.",stats:c.a.createElement(c.a.Fragment,null,"This augmentation removes the penalty for not focusing on actions such as working in a job or working for a faction."),factions:[f.a.TianDiHui]})],m=[new a.a({name:r.a.EsperEyewear,repCost:1250,moneyCost:165e6,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.",bladeburner_success_chance_mult:1.03,dexterity_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.EMS4Recombination,repCost:2500,moneyCost:275e6,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.",bladeburner_success_chance_mult:1.03,bladeburner_analysis_mult:1.05,bladeburner_stamina_gain_mult:1.02,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.OrionShoulder,repCost:6250,moneyCost:55e7,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.",defense_mult:1.05,strength_mult:1.05,dexterity_mult:1.05,bladeburner_success_chance_mult:1.04,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.HyperionV1,repCost:12500,moneyCost:275e7,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.",bladeburner_success_chance_mult:1.06,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.HyperionV2,repCost:25e3,moneyCost:55e8,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.",prereqs:[r.a.HyperionV1],bladeburner_success_chance_mult:1.08,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.GolemSerum,repCost:31250,moneyCost:11e9,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.",strength_mult:1.07,defense_mult:1.07,dexterity_mult:1.07,agility_mult:1.07,bladeburner_stamina_gain_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.VangelisVirus,repCost:18750,moneyCost:275e7,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.",dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.1,bladeburner_success_chance_mult:1.04,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.VangelisVirus3,repCost:37500,moneyCost:11e9,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.",prereqs:[r.a.VangelisVirus],defense_exp_mult:1.1,dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.INTERLINKED,repCost:25e3,moneyCost:55e8,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.",strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,bladeburner_max_stamina_mult:1.1,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladeRunner,repCost:2e4,moneyCost:825e7,info:`A cybernetic foot augmentation that was specifically created for ${f.a.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.`,agility_mult:1.05,bladeburner_max_stamina_mult:1.05,bladeburner_stamina_gain_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladeArmor,repCost:12500,moneyCost:1375e6,info:`A powered exoskeleton suit designed as armor for ${f.a.Bladeburners} 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.`,strength_mult:1.04,defense_mult:1.04,dexterity_mult:1.04,agility_mult:1.04,bladeburner_stamina_gain_mult:1.02,bladeburner_success_chance_mult:1.03,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladeArmorPowerCells,repCost:18750,moneyCost:275e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.",prereqs:[r.a.BladeArmor],bladeburner_success_chance_mult:1.05,bladeburner_stamina_gain_mult:1.02,bladeburner_max_stamina_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladeArmorEnergyShielding,repCost:21250,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.",prereqs:[r.a.BladeArmor],defense_mult:1.05,bladeburner_success_chance_mult:1.06,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladeArmorUnibeam,repCost:31250,moneyCost:165e8,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.",prereqs:[r.a.BladeArmor],bladeburner_success_chance_mult:1.08,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladeArmorOmnibeam,repCost:62500,moneyCost:275e8,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.",prereqs:[r.a.BladeArmorUnibeam],bladeburner_success_chance_mult:1.1,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladeArmorIPU,repCost:15e3,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.",prereqs:[r.a.BladeArmor],bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.02,isSpecial:!0,factions:[f.a.Bladeburners]}),new a.a({name:r.a.BladesSimulacrum,repCost:1250,moneyCost:15e10,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.",stats:c.a.createElement(c.a.Fragment,null,"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."),isSpecial:!0,factions:[f.a.Bladeburners]})],h=[new a.a({name:r.a.StaneksGift1,repCost:0,moneyCost:0,info:'Allison "Mother" Stanek imparts you with her gift. An experimental Augmentation implanted at the base of the neck. It allows you to overclock your entire system by carefully changing the configuration.',isSpecial:!0,hacking_chance_mult:.9,hacking_speed_mult:.9,hacking_money_mult:.9,hacking_grow_mult:.9,hacking_mult:.9,strength_mult:.9,defense_mult:.9,dexterity_mult:.9,agility_mult:.9,charisma_mult:.9,hacking_exp_mult:.9,strength_exp_mult:.9,defense_exp_mult:.9,dexterity_exp_mult:.9,agility_exp_mult:.9,charisma_exp_mult:.9,company_rep_mult:.9,faction_rep_mult:.9,crime_money_mult:.9,crime_success_mult:.9,hacknet_node_money_mult:.9,hacknet_node_purchase_cost_mult:1.1,hacknet_node_ram_cost_mult:1.1,hacknet_node_core_cost_mult:1.1,hacknet_node_level_cost_mult:1.1,work_money_mult:.9,stats:c.a.createElement(c.a.Fragment,null,"Its unstable nature decreases all your stats by 10%"),factions:[f.a.ChurchOfTheMachineGod]}),new a.a({name:r.a.StaneksGift2,repCost:1e6,moneyCost:0,info:"The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon your frame granting lesser penalty of 5% to all stats.",prereqs:[r.a.StaneksGift1],isSpecial:!0,hacking_chance_mult:.95/.9,hacking_speed_mult:.95/.9,hacking_money_mult:.95/.9,hacking_grow_mult:.95/.9,hacking_mult:.95/.9,strength_mult:.95/.9,defense_mult:.95/.9,dexterity_mult:.95/.9,agility_mult:.95/.9,charisma_mult:.95/.9,hacking_exp_mult:.95/.9,strength_exp_mult:.95/.9,defense_exp_mult:.95/.9,dexterity_exp_mult:.95/.9,agility_exp_mult:.95/.9,charisma_exp_mult:.95/.9,company_rep_mult:.95/.9,faction_rep_mult:.95/.9,crime_money_mult:.95/.9,crime_success_mult:.95/.9,hacknet_node_money_mult:.95/.9,hacknet_node_purchase_cost_mult:1.05/1.1,hacknet_node_ram_cost_mult:1.05/1.1,hacknet_node_core_cost_mult:1.05/1.1,hacknet_node_level_cost_mult:1.05/1.1,work_money_mult:.95/.9,stats:c.a.createElement(c.a.Fragment,null,"The penalty for the gift is reduced to 5%"),factions:[f.a.ChurchOfTheMachineGod]}),new a.a({name:r.a.StaneksGift3,repCost:1e8,moneyCost:0,info:"The synthesis of human and machine is nothing to fear. It is our destiny. You will become greater than the sum of our parts. As One. Embrace your gift fully and wholly free of it's accursed toll. Serenity brings tranquility the form of no longer suffering a stat penalty. ",prereqs:[r.a.StaneksGift2],isSpecial:!0,hacking_chance_mult:1/.95,hacking_speed_mult:1/.95,hacking_money_mult:1/.95,hacking_grow_mult:1/.95,hacking_mult:1/.95,strength_mult:1/.95,defense_mult:1/.95,dexterity_mult:1/.95,agility_mult:1/.95,charisma_mult:1/.95,hacking_exp_mult:1/.95,strength_exp_mult:1/.95,defense_exp_mult:1/.95,dexterity_exp_mult:1/.95,agility_exp_mult:1/.95,charisma_exp_mult:1/.95,company_rep_mult:1/.95,faction_rep_mult:1/.95,crime_money_mult:1/.95,crime_success_mult:1/.95,hacknet_node_money_mult:1/.95,hacknet_node_purchase_cost_mult:1/1.05,hacknet_node_ram_cost_mult:1/1.05,hacknet_node_core_cost_mult:1/1.05,hacknet_node_level_cost_mult:1/1.05,work_money_mult:1/.95,stats:c.a.createElement(c.a.Fragment,null,"Stanek's Gift has no penalty."),factions:[f.a.ChurchOfTheMachineGod]})];function d(){return new a.a({name:r.a.NeuroFluxGovernor,repCost:500,moneyCost:75e4,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.",stats:c.a.createElement(c.a.Fragment,null,"This special augmentation can be leveled up infinitely. Each level of this augmentation increases MOST multipliers by 1%, stacking multiplicatively."),hacking_chance_mult:1.01,hacking_speed_mult:1.01,hacking_money_mult:1.01,hacking_grow_mult:1.01,hacking_mult:1.01,strength_mult:1.01,defense_mult:1.01,dexterity_mult:1.01,agility_mult:1.01,charisma_mult:1.01,hacking_exp_mult:1.01,strength_exp_mult:1.01,defense_exp_mult:1.01,dexterity_exp_mult:1.01,agility_exp_mult:1.01,charisma_exp_mult:1.01,company_rep_mult:1.01,faction_rep_mult:1.01,crime_money_mult:1.01,crime_success_mult:1.01,hacknet_node_money_mult:1.01,hacknet_node_purchase_cost_mult:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.99,work_money_mult:1.01,factions:Object.values(f.a)})}function p(){const t=function(){const t=[{bonuses:{hacking_chance_mult:1.25,hacking_speed_mult:1.1,hacking_money_mult:1.25,hacking_grow_mult:1.1},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%."},{bonuses:{hacking_mult:1.15,hacking_exp_mult:2},description:"Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 100%."},{bonuses:{strength_mult:1.25,strength_exp_mult:2,defense_mult:1.25,defense_exp_mult:2,dexterity_mult:1.25,dexterity_exp_mult:2,agility_mult:1.25,agility_exp_mult:2},description:"Increases all of the player's combat stats by 25%.
Increases all of the player's combat stat experience gain rate by 100%."},{bonuses:{charisma_mult:1.5,charisma_exp_mult:2},description:"This augmentation increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 100%."},{bonuses:{hacknet_node_money_mult:1.2,hacknet_node_purchase_cost_mult:.85,hacknet_node_ram_cost_mult:.85,hacknet_node_core_cost_mult:.85,hacknet_node_level_cost_mult:.85},description:"Increases the amount of money produced by Hacknet Nodes by 20%.
Decreases all costs related to Hacknet Node by 15%."},{bonuses:{company_rep_mult:1.25,faction_rep_mult:1.15,work_money_mult:1.7},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%."},{bonuses:{crime_success_mult:2,crime_money_mult:2},description:"Increases the player's crime success rate by 100%.
Increases the amount of money the player gains from crimes by 100%."}],e=new s.c(Math.floor(i.a.lastUpdate/36e5));for(let t=0;t<5;t++)e.step();return t[Math.floor(t.length*e.random())]}(),e={name:r.a.UnstableCircadianModulator,moneyCost:5e9,repCost:362500,info:"An experimental nanobot injection. Its unstable nature leads to unpredictable results based on your circadian rhythm.",factions:[f.a.SpeakersForTheDead]};return Object.keys(t.bonuses).forEach(n=>e[n]=t.bonuses[n]),new a.a(e)}},,,,,,,,,,,,,,,,,,,,,,,,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return checkInfiniteLoop})),__webpack_require__.d(__webpack_exports__,"a",(function(){return calculateRamUsage}));var acorn_walk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(300),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(254),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(323),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(83);const specialReferenceIF="__SPECIAL_referenceIf",specialReferenceFOR="__SPECIAL_referenceFor",specialReferenceWHILE="__SPECIAL_referenceWhile",memCheckGlobalKey=".__GLOBAL__";async function parseOnlyRamCalculate(player,otherScripts,code,workerScript){try{let dependencyMap={};const completedParses=new Set,parseQueue=[];function parseCode(t,e){const n=parseOnlyCalculateDeps(t,e);completedParses.add(e);for(let t=0;t0;){const nextModule=parseQueue.shift();if(void 0===nextModule)throw new Error("nextModule should not be undefined");let code;if(nextModule.startsWith("https://")||nextModule.startsWith("http://"))try{const module=await eval("import(nextModule)");code="";for(const t in module)"function"==typeof module[t]&&(code+=module[t].toString()+";\n")}catch(t){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${t}`),{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.URLImportError}}else{if(!Array.isArray(otherScripts))return console.warn("parseOnlyRamCalculate() not called with array of scripts"),{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.ImportError};let t=null;const e=nextModule.startsWith("./")?nextModule.slice(2):nextModule;for(const n of otherScripts)if(Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__.b)(n.filename,e)){t=n;break}if(null==t)return{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.ImportError};code=t.code}parseCode(code,nextModule)}let ram=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptBaseRamCost;const detailedCosts=[{type:"misc",name:"baseCost",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptBaseRamCost}],unresolvedRefs=Object.keys(dependencyMap).filter(t=>t.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const t=unresolvedRefs.shift();if(void 0===t)throw new Error("ref should not be undefined");if("hacknet"!==t||resolvedRefs.has("hacknet")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptHacknetNodesRamCost,detailedCosts.push({type:"ns",name:"hacknet",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptHacknetNodesRamCost})),"document"!==t||resolvedRefs.has("document")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost,detailedCosts.push({type:"dom",name:"document",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost})),"window"!==t||resolvedRefs.has("window")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost,detailedCosts.push({type:"dom",name:"window",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost})),"corporation"!==t||resolvedRefs.has("corporation")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptCorporationRamCost,detailedCosts.push({type:"ns",name:"corporation",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptCorporationRamCost})),resolvedRefs.add(t),t.endsWith(".*")){const e=t.slice(0,t.length-2);for(const t of Object.keys(dependencyMap).filter(t=>t.startsWith(e)))for(const e of dependencyMap[t]||[])resolvedRefs.has(e)||unresolvedRefs.push(e)}else for(const e of dependencyMap[t]||[])resolvedRefs.has(e)||unresolvedRefs.push(e);try{function applyFuncRam(t){return"number"==typeof t?t:"function"==typeof t?t(player):0}if(workerScript.loadedFns[t])continue;let e;workerScript.loadedFns[t]=!0;let n="n/a";t in workerScript.env.vars.bladeburner?(e=workerScript.env.vars.bladeburner[t],n="bladeburner."+t):t in workerScript.env.vars.codingcontract?(e=workerScript.env.vars.codingcontract[t],n="codingcontract."+t):t in workerScript.env.vars.stanek?(e=workerScript.env.vars.stanek[t],n="stanek."+t):t in workerScript.env.vars.gang?(e=workerScript.env.vars.gang[t],n="gang."+t):t in workerScript.env.vars.sleeve?(e=workerScript.env.vars.sleeve[t],n="sleeve."+t):t in workerScript.env.vars.stock?(e=workerScript.env.vars.stock[t],n="stock."+t):t in workerScript.env.vars.ui?(e=workerScript.env.vars.ui[t],n="ui."+t):t in workerScript.env.vars.grafting?(e=workerScript.env.vars.grafting[t],n="grafting."+t):(e=workerScript.env.vars[t],n=""+t);const a=applyFuncRam(e);ram+=a,detailedCosts.push({type:"fn",name:n,cost:a})}catch(t){continue}}return{cost:ram,entries:detailedCosts.filter(t=>t.cost>0)}}catch(t){return{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.SyntaxError}}}function checkInfiniteLoop(t){const e=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.a)(t,{sourceType:"module",ecmaVersion:"latest"});let n=-1;return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(e,{},{WhileStatement:(e,a,r)=>{!function(t){return"Literal"===t.type&&"true"===t.raw}(e.test)||function(t){let e=!1;return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(t,{},{AwaitExpression:()=>{e=!0}}),e}(e)?e.body&&r(e.body,a):n=(t.slice(0,e.start).match(/\n/g)||[]).length+1}}),n}function parseOnlyCalculateDeps(t,e){const n=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.a)(t,{sourceType:"module",ecmaVersion:"latest"}),a=e+memCheckGlobalKey,r={};r[a]=new Set;const i={},o=[];function s(t,n){const a=r[t]||(r[t]=new Set),o=i[n];void 0!==o&&a.add(o),a.add(e+"."+n),a.add(n)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(t,e)=>{l.includes(t.name)||s(e.key,t.name)},WhileStatement:(t,e,n)=>{s(e.key,specialReferenceWHILE),t.test&&n(t.test,e),t.body&&n(t.body,e)},DoWhileStatement:(t,e,n)=>{s(e.key,specialReferenceWHILE),t.test&&n(t.test,e),t.body&&n(t.body,e)},ForStatement:(t,e,n)=>{s(e.key,specialReferenceFOR),t.init&&n(t.init,e),t.test&&n(t.test,e),t.update&&n(t.update,e),t.body&&n(t.body,e)},IfStatement:(t,e,n)=>{s(e.key,specialReferenceIF),t.test&&n(t.test,e),t.consequent&&n(t.consequent,e),t.alternate&&n(t.alternate,e)},MemberExpression:(t,e,n)=>{t.object&&n(t.object,e),t.property&&n(t.property,e)}}}return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(n,{key:a},Object.assign({ImportDeclaration:(t,e)=>{const n=t.source.value;o.push(n);const a=r[e.key];if(void 0===a)throw new Error("set should not be undefined");a.add(n+memCheckGlobalKey);for(let a=0;a{const n=e+"."+(null===t.id?"__SPECIAL_DEFAULT_EXPORT__":t.id.name);acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(t,{key:n},c())}},c())),{dependencyMap:r,additionalModules:o}}async function calculateRamUsage(t,e,n){const a={loadedFns:{},env:{vars:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.b}};try{return await parseOnlyRamCalculate(t,n,e,a)}catch(t){return console.error("Failed to parse script for RAM calculations:"),console.error(t),{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.SyntaxError}}}},function(t,e,n){"use strict";function a(t){return+(Math.round(parseFloat(t+"e+2"))+"e-2")}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(204),r=n(29),i=n(16),o=n(25),s=n(266),l=n(36),c=n(252),f=n(8),u=n(241),m=n(80),h=n(1007),d=n(1009);class p{constructor(t="",e=!1){this.facName=t,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=e,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}getPower(){return m.a[this.facName].power}getTerritory(){return m.a[this.facName].territory}process(t=1,e){const n=1e3/f.a._idleSpeed;if(isNaN(t)&&console.error("NaN passed into Gang.process(): "+t),this.storedCycles+=t,this.storedCycles<2*n)return;const a=Math.min(this.storedCycles,5*n);try{this.processGains(a,e),this.processExperienceGains(a),this.processTerritoryAndPowerGains(a),this.storedCycles-=a}catch(t){console.error("Exception caught when processing Gang: "+t)}}processGains(t=1,e){let n=0,o=0,s=0,l=0;for(let t=0;te&&(n=1),this.wanted=n,this.wanted<1&&(this.wanted=1)}e.gainMoney(n*t,"gang")}processTerritoryAndPowerGains(t=1){if(this.storedTerritoryAndPowerCycles+=t,this.storedTerritoryAndPowerCycles0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));const n=c.a.Names.filter(t=>m.a[t].territory>0||t===e);if(n.length>1)for(let t=0;te!==n[t]),i=Object(l.a)(0,r.length-1),o=n[t],s=r[i];if(!(o!==e&&s!==e||Math.random().999&&(m.a[o].territory=1),m.a[s].territory-=t,o===e?(this.clash(!0),m.a[s].power*=1/1.01):s===e?this.clash(!1):m.a[s].power*=1/1.01}else{if(m.a[o].territory<=0)return;const t=a(s,o);m.a[o].territory-=t,m.a[s].territory<.001&&(m.a[s].territory=0),m.a[s].territory+=t,m.a[s].territory>.999&&(m.a[s].territory=1),o===e?this.clash(!1):s===e?(this.clash(!0),m.a[o].power*=1/1.01):m.a[o].power*=1/1.01}}}processExperienceGains(t=1){for(let e=0;e=0;--t){const n=this.members[t];if("Territory Warfare"!==n.task)continue;const a=e/Math.pow(n.def,.6);Math.random()=c.a.MaximumGangMembers)&&this.respect>=this.getRespectNeededToRecruitMember()}getRespectNeededToRecruitMember(){if(this.members.length<3)return 0;const t=this.members.length-2;return Math.pow(5,t)}recruitMember(t){if(""===(t=String(t))||!this.canRecruitMember())return!1;if(this.members.filter(e=>e.name===t).length>=1)return!1;const e=new h.a(t);return this.members.push(e),!0}getWantedPenalty(){return this.respect/(this.respect+this.wanted)}calculatePower(){let t=0;for(let e=0;e"Ascended Gang member "+t.name),n}catch(t){throw null==e&&Object(s.a)(t),t}}getDiscount(){const t=this.getPower(),e=this.respect,n=Math.pow(e,.01)+e/5e6+Math.pow(t,.01)+t/1e6-1;return Math.max(1,n)}getAllTaskNames(){return Object.keys(u.a).filter(t=>{const e=u.a[t];return null!=e&&("Unassigned"!==e.name&&(this.isHackingGang===e.isHacking||!this.isHackingGang===e.isCombat))})}getUpgradeCost(t){return null==t?1/0:t.cost/this.getDiscount()}toJSON(){return Object(o.b)("Gang",this)}static fromJSON(t){return Object(o.a)(p,t.data)}}o.c.constructors.Gang=p},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o}));var a=n(182);let r=1;function i(){let t=r,e=!1;for(let n=0;n<1e6;){if(!a.a.has(t+n)){e=!0,t+=n;break}n===Number.MAX_SAFE_INTEGER-1?n=1:++n}return e?(r=t+1,r>=Number.MAX_SAFE_INTEGER&&(r=1),t):-1}function o(){r=1}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return et}));var a=n(413),r=n(13),i=n(292),o=n(6),s=n(8),l=n(99),c=n(466),f=n(91),u=n(87),m=n(2),h=n(64),d=n(253),p=n(233),g=n(98),y=n(400),b=n(26),E=n(132),v=n(222),k=n(47),_=n(82),w=n(514),S=n(83),C=n(223),x=n(197),L=n(142),O=n(182),M=n(109),T=n(4),A=n(24),R=n(181),N=n(255),P=n(147),I=n(1019),F=n(1020),D=n(1021),j=n(1023),B=n(1024),G=n(1026),W=n(1027),H=n(1028),U=n(1030),q=n(1035),$=n(1036),K=n(1037),z=n(1391),V=n(629),Y=n(16),J=n(140),X=n(628),Q=n(280),Z=n(411),tt=n(17);function et(e){const n=function(t,n){if(e.dynamicLoadedFns[t])return;e.dynamicLoadedFns[t]=!0;let a=e.scriptRef.threads;if("number"!=typeof a&&(console.warn(`WorkerScript detected NaN for threadcount for ${e.name} on ${e.hostname}`),a=1),e.dynamicRamUsage+=n,e.dynamicRamUsage>1.01*e.ramUsage)throw Object(M.b)(e,`Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${t}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Threads: ${a}\n Dynamic RAM Usage: ${T.a.formatRAM(e.dynamicRamUsage)}\n Static RAM Usage: ${T.a.formatRAM(e.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const myScan = eval('ns.scan');\n\n * Using map access to do the same\n   const myScan = ns['scan'];\n\n Sorry :(`)},nt=function(t,e){const n=Object(b.d)(t);if(null==n)throw st(e,"Invalid hostname: "+t);return n},at=function(t,n,a,r){if("string"==typeof a&&""!==a||(a="getRunningScript"),!Array.isArray(r))throw Object(M.b)(e,`Invalid scriptArgs argument passed into getRunningScript() from ${a}(). This is probably a bug. Please report to game developer`);if(null!=t&&"string"==typeof t){null==n&&(n=e.hostname);const i=nt(n,a);return Object(p.a)(t,r,i)}return e.scriptRef},rt=function(t,e){"string"==typeof e&&""!==e||(e="getRunningScriptgetRunningScriptByPid");for(const e of Object(b.c)()){const n=Object(p.b)(t,e);if(n)return n}return null},it=function(t,e,n){return Array.isArray(n)||(n=[]),`Cannot find running script ${t} on server ${e} with args: ${Object(N.a)(n)}`},ot=function(t,n=""){return t instanceof f.a&&(e.log(n,()=>"Does not work on Hacknet Servers"),!0)},st=function(t,n){const a=(new Error).stack;if(void 0===a)throw new Error("how did we not throw an error?");const r=a.split("\n").slice(1),i=e.getServer().scripts,o=[];for(const t of r){let e;for(const n of i){n.url&&t.includes(n.url)&&(e=n.filename);for(const a of n.dependencies)t.includes(a.url)&&(e=a.filename)}if(!e)continue;function s(t){const e=t.match(/.*:(\d+):\d+.*/),n=t.match(/.*at (.+) \(.*/);return e&&n?{line:e[1],func:n[1]}:null}let n={line:"-1",func:"unknown"};const a=s(t);function l(t){const e=t.match(/.*:(\d+):\d+$/),n=t.lastIndexOf("@");return e&&-1!==n?{line:e[1],func:t.slice(0,n)}:null}a&&(n=a);const r=l(t);r&&(n=r),o.push(`${e}:L${n.line}@${n.func}`)}e.log(t,()=>n);let c=`${t}: ${n}`;return 0!==o.length&&(c+="

Stack:
"+o.join("
")),Object(M.b)(e,c)},lt=function(t,n,{threads:a,stock:r}={}){if(void 0===t)throw st("hack","Takes 1 argument.");const i=Object(M.d)(e,"hack",a),f=nt(t,"hack");if(!(f instanceof k.a))throw st("hack","Cannot be executed on this server.");const u=Object(l.d)(f,m.a),h=Object(c.b)(f,m.a);if(!h.res)throw st("hack",h.msg||"");return e.log("hack",()=>`Executing on '${f.hostname}' in ${Object(A.b)(1e3*u,!0)} (t=${T.a.formatThreads(i)})`),Object(M.c)(1e3*u,e).then((function(){const t=Object(l.b)(f,m.a),a=Math.random();let c=Object(l.c)(f,m.a)*i;const u=c/4;if(af.moneyAvailable&&(h=f.moneyAvailable),f.moneyAvailable-=h,f.moneyAvailable<0&&(f.moneyAvailable=0);const d=h*o.a.ScriptHackMoneyGain;return m.a.gainMoney(d,"hacking"),e.scriptRef.onlineMoneyMade+=d,m.a.scriptProdSinceLastAug+=d,e.scriptRef.recordHack(f.hostname,d,i),m.a.gainHackingExp(c),n&&m.a.gainIntelligenceExp(.005),e.scriptRef.onlineExpGained+=c,e.log("hack",()=>`Successfully hacked '${f.hostname}' for ${T.a.formatMoney(d)} and ${T.a.formatExp(c)} exp (t=${T.a.formatThreads(i)})`),f.fortify(s.a.ServerFortifyAmount*Math.min(i,a)),r&&Object(w.c)(f,h),n&&(f.backdoorInstalled=!0),Promise.resolve(d)}return m.a.gainHackingExp(u),e.scriptRef.onlineExpGained+=u,e.log("hack",()=>`Failed to hack '${f.hostname}'. Gained ${T.a.formatExp(u)} exp (t=${T.a.formatThreads(i)})`),Promise.resolve(0)}))},ct=function(t){let e="";for(let n of t)n=Object(V.a)(n),e+="object"==typeof n?JSON.stringify(n):""+n;return e},ft={updateDynamicRam:n,makeRuntimeErrorMsg:st,string:(t,e,n)=>{if("string"==typeof n)return n;if("number"==typeof n)return n+"";throw st(t,e+" should be a string.")},number:(t,e,n)=>{if("string"==typeof n){const t=parseFloat(n);if(!isNaN(t))return t}else if("number"==typeof n){if(isNaN(n))throw st(t,e+" is NaN.");return n}throw st(t,e+" should be a number.")},boolean:t=>!!t,city:(t,e,n)=>{if("string"!=typeof n)throw st(t,e+" should be a city name.");const a=n;if(!Object.values(tt.a).includes(a))throw st(t,e+" should be a city name.");return a},getServer:nt,checkSingularityAccess:function(t){if(4!==m.a.bitNodeN&&0===m.a.sourceFileLvl(4))throw st(t,"This singularity function requires Source-File 4 to run. A power up you obtain later in the game. It will be very obvious when and how you can obtain it.")},hack:lt,getValidPort:(t,e)=>{if(isNaN(e))throw st(t,`Invalid argument. Must be a port number between 1 and ${s.a.NumNetscriptPorts}, is ${e}`);if((e=Math.round(e))<1||e>s.a.NumNetscriptPorts)throw st(t,`Trying to use an invalid port: ${e}. Only ports 1-${s.a.NumNetscriptPorts} are valid.`);const n=x.a[e-1];if(null==n||!(n instanceof Object))throw st(t,`Could not find port: ${e}. This is a bug. Report to dev.`);return n}},ut=Object(I.a)(m.a,e,ft),mt=Object(F.a)(m.a,e,ft),ht=Object(D.a)(m.a,e,ft),dt=Object(j.a)(m.a,e,ft),pt=Object(B.a)(m.a,e,ft),gt=Object(W.a)(m.a,e,ft),yt=Object(H.a)(m.a,e,ft),bt=Object(U.a)(m.a,e,ft),Et=Object(q.a)(m.a,e,ft),vt=Object(z.a)(m.a,e,ft),kt=Object($.a)(m.a,e,ft),_t=Object(G.a)(m.a,e,ft),wt=Object(K.a)(m.a,e,ft),St={...{...vt,singularity:vt,gang:ut,bladeburner:gt,codingcontract:yt,sleeve:mt,corporation:bt,stanek:pt,ui:_t,formulas:Et,stock:kt,grafting:wt,args:e.args,hacknet:dt,sprintf:a.sprintf,vsprintf:a.vsprintf,scan:function(t=e.hostname){const a=ft.string("scan","hostname",t);n("scan",Object(r.c)(m.a,"scan"));const i=nt(a,"scan"),o=[];for(let t=0;t`returned ${i.serversOnNetwork.length} connections for ${i.hostname}`),o},hack:function(t,{threads:e,stock:a}={}){const i=ft.string("hack","hostname",t);return n("hack",Object(r.c)(m.a,"hack")),lt(i,!1,{threads:e,stock:a})},hackAnalyzeThreads:function(t,a){const i=ft.string("hackAnalyzeThreads","hostname",t),o=ft.number("hackAnalyzeThreads","hackAmount",a);n("hackAnalyzeThreads",Object(r.c)(m.a,"hackAnalyzeThreads"));const s=nt(i,"hackAnalyzeThreads");if(!(s instanceof k.a))return e.log("hackAnalyzeThreads",()=>"Cannot be executed on this server."),-1;if(isNaN(o))throw st("hackAnalyzeThreads",`Invalid hackAmount argument passed into hackAnalyzeThreads: ${o}. Must be numeric.`);if(o<0||o>s.moneyAvailable)return-1;if(0===o)return 0;const c=Object(l.e)(s,m.a);return 0===c||0===s.moneyAvailable?0:o/Math.floor(s.moneyAvailable*c)},hackAnalyze:function(t){const a=ft.string("hackAnalyze","hostname",t);n("hackAnalyze",Object(r.c)(m.a,"hackAnalyze"));const i=nt(a,"hackAnalyze");return i instanceof k.a?Object(l.e)(i,m.a):(e.log("hackAnalyze",()=>"Cannot be executed on this server."),0)},hackAnalyzeSecurity:function(t){const e=ft.number("hackAnalyzeSecurity","threads",t);return n("hackAnalyzeSecurity",Object(r.c)(m.a,"hackAnalyzeSecurity")),s.a.ServerFortifyAmount*e},hackAnalyzeChance:function(t){const a=ft.string("hackAnalyzeChance","hostname",t);n("hackAnalyzeChance",Object(r.c)(m.a,"hackAnalyzeChance"));const i=nt(a,"hackAnalyzeChance");return i instanceof k.a?Object(l.b)(i,m.a):(e.log("hackAnalyzeChance",()=>"Cannot be executed on this server."),0)},sleep:async function(t=0){const a=ft.number("sleep","time",t);if(n("sleep",Object(r.c)(m.a,"sleep")),void 0===a)throw st("sleep","Takes 1 argument.");return e.log("sleep",()=>`Sleeping for ${a} milliseconds`),Object(M.c)(a,e).then((function(){return Promise.resolve()}))},asleep:function(t=0){const a=ft.number("asleep","time",t);if(n("asleep",Object(r.c)(m.a,"asleep")),void 0===a)throw st("asleep","Takes 1 argument.");return e.log("asleep",()=>`Sleeping for ${a} milliseconds`),new Promise(t=>setTimeout(t,a))},grow:async function(t,{threads:a,stock:i}={}){const o=ft.string("grow","hostname",t);n("grow",Object(r.c)(m.a,"grow"));const s=Object(M.d)(e,"grow",null!=a?a:e.scriptRef.threads);if(void 0===o)throw st("grow","Takes 1 argument.");const f=nt(o,"grow");if(!(f instanceof k.a))return e.log("grow",()=>"Cannot be executed on this server."),Promise.resolve(0);const u=Object(b.d)(e.hostname);if(null===u)throw new Error("Workerscript host is null");const h=Object(c.a)(f);if(!h.res)throw st("grow",h.msg||"");const d=Object(l.a)(f,m.a);return e.log("grow",()=>`Executing on '${f.hostname}' in ${Object(A.b)(1e3*d,!0)} (t=${T.a.formatThreads(s)}).`),Object(M.c)(1e3*d,e).then((function(){const t=f.moneyAvailable<=0?1:f.moneyAvailable;Object(E.e)(f,s,m.a,u.cpuCores);const n=f.moneyAvailable;e.scriptRef.recordGrow(f.hostname,s);const a=Object(l.c)(f,m.a)*s,r=n/t-1;return e.log("grow",()=>`Available money on '${f.hostname}' grown by ${T.a.formatPercentage(r,6)}. Gained ${T.a.formatExp(a)} hacking exp (t=${T.a.formatThreads(s)}).`),e.scriptRef.onlineExpGained+=a,m.a.gainHackingExp(a),i&&Object(w.b)(f,n-t),Promise.resolve(n/t)}))},growthAnalyze:function(t,a,i=1){const o=ft.string("growthAnalyze","hostname",t),s=ft.number("growthAnalyze","growth",a),l=ft.number("growthAnalyze","cores",i);n("growthAnalyze",Object(r.c)(m.a,"growthAnalyze"));const c=nt(o,"growthAnalyze");if(!(c instanceof k.a))return e.log("growthAnalyze",()=>"Cannot be executed on this server."),0;if("number"!=typeof s||isNaN(s)||s<1||!isFinite(s))throw st("growthAnalyze",`Invalid argument: growth must be numeric and >= 1, is ${s}.`);return Object(E.c)(c,Number(s),m.a,l)},growthAnalyzeSecurity:function(t){const e=ft.number("growthAnalyzeSecurity","threads",t);return n("growthAnalyzeSecurity",Object(r.c)(m.a,"growthAnalyzeSecurity")),2*s.a.ServerFortifyAmount*e},weaken:async function(t,{threads:a}={}){const i=ft.string("weaken","hostname",t);n("weaken",Object(r.c)(m.a,"weaken"));const o=Object(M.d)(e,"weaken",null!=a?a:e.scriptRef.threads);if(void 0===i)throw st("weaken","Takes 1 argument.");const f=nt(i,"weaken");if(!(f instanceof k.a))return e.log("weaken",()=>"Cannot be executed on this server."),Promise.resolve(0);const u=Object(c.c)(f);if(!u.res)throw st("weaken",u.msg||"");const h=Object(l.f)(f,m.a);return e.log("weaken",()=>`Executing on '${f.hostname}' in ${Object(A.b)(1e3*h,!0)} (t=${T.a.formatThreads(o)})`),Object(M.c)(1e3*h,e).then((function(){const t=Object(b.d)(e.hostname);if(null===t)return e.log("weaken",()=>"Server is null, did it die?"),Promise.resolve(0);const n=1+(t.cpuCores-1)/16;f.weaken(s.a.ServerWeakenAmount*o*n),e.scriptRef.recordWeaken(f.hostname,o);const a=Object(l.c)(f,m.a)*o;return e.log("weaken",()=>`'${f.hostname}' security level weakened to ${f.hackDifficulty}. Gained ${T.a.formatExp(a)} hacking exp (t=${T.a.formatThreads(o)})`),e.scriptRef.onlineExpGained+=a,m.a.gainHackingExp(a),Promise.resolve(s.a.ServerWeakenAmount*o*n)}))},weakenAnalyze:function(t,e=1){const a=ft.number("weakenAnalyze","threads",t),i=ft.number("weakenAnalyze","cores",e);n("weakenAnalyze",Object(r.c)(m.a,"weakenAnalyze"));const l=1+(i-1)/16;return s.a.ServerWeakenAmount*a*l*o.a.ServerWeakenRate},share:async function(){n("share",Object(r.c)(m.a,"share")),e.log("share",()=>"Sharing this computer.");const t=Object(Z.b)(e.scriptRef.threads*Object(Q.a)(m.a.intelligence,2));return Object(M.c)(1e4,e).finally((function(){e.log("share",()=>"Finished sharing this computer."),t()}))},getSharePower:function(){return n("getSharePower",Object(r.c)(m.a,"getSharePower")),Object(Z.a)()},print:function(...t){if(n("print",Object(r.c)(m.a,"print")),0===t.length)throw st("print","Takes at least 1 argument.");e.print(ct(t))},printf:function(t,...i){const o=ft.string("printf","format",t);if(n("printf",Object(r.c)(m.a,"printf")),"string"!=typeof o)throw st("printf","First argument must be string for the format.");e.print(Object(a.vsprintf)(o,i))},tprint:function(...t){if(n("tprint",Object(r.c)(m.a,"tprint")),0===t.length)throw st("tprint","Takes at least 1 argument.");const a=ct(t);a.startsWith("ERROR")||a.startsWith("FAIL")?u.a.error(`${e.scriptRef.filename}: ${a}`):a.startsWith("SUCCESS")?u.a.success(`${e.scriptRef.filename}: ${a}`):a.startsWith("WARN")?u.a.warn(`${e.scriptRef.filename}: ${a}`):a.startsWith("INFO")?u.a.info(`${e.scriptRef.filename}: ${a}`):u.a.print(`${e.scriptRef.filename}: ${a}`)},tprintf:function(t,...e){const i=ft.string("printf","format",t);if(n("tprintf",Object(r.c)(m.a,"tprintf")),"string"!=typeof i)throw st("tprintf","First argument must be string for the format.");const o=Object(a.vsprintf)(i,e);o.startsWith("ERROR")||o.startsWith("FAIL")?u.a.error(""+o):o.startsWith("SUCCESS")?u.a.success(""+o):o.startsWith("WARN")?u.a.warn(""+o):o.startsWith("INFO")?u.a.info(""+o):u.a.print(""+o)},clearLog:function(){n("clearLog",Object(r.c)(m.a,"clearLog")),e.scriptRef.clearLog()},disableLog:function(t){const a=ft.string("disableLog","fn",t);if(n("disableLog",Object(r.c)(m.a,"disableLog")),"ALL"===a){for(const t of Object.keys(Ct))e.disableLogs[t]=!0;e.log("disableLog",()=>"Disabled logging for all functions")}else{if(void 0===Ct[a])throw st("disableLog",`Invalid argument: ${a}.`);e.disableLogs[a]=!0,e.log("disableLog",()=>"Disabled logging for "+a)}},enableLog:function(t){const a=ft.string("enableLog","fn",t);if(n("enableLog",Object(r.c)(m.a,"enableLog")),"ALL"===a){for(const t of Object.keys(Ct))delete e.disableLogs[t];e.log("enableLog",()=>"Enabled logging for all functions")}else if(void 0===Ct[a])throw st("enableLog",`Invalid argument: ${a}.`);delete e.disableLogs[a],e.log("enableLog",()=>"Enabled logging for "+a)},isLogEnabled:function(t){const a=ft.string("isLogEnabled","fn",t);if(n("isLogEnabled",Object(r.c)(m.a,"isLogEnabled")),void 0===Ct[a])throw st("isLogEnabled",`Invalid argument: ${a}.`);return!e.disableLogs[a]},getScriptLogs:function(t,a,...i){n("getScriptLogs",Object(r.c)(m.a,"getScriptLogs"));const o=at(t,a,"getScriptLogs",i);return null==o?(e.log("getScriptLogs",()=>it(t,a,i)),[]):o.logs.slice()},tail:function(t,a=e.hostname,...i){let o;n("tail",Object(r.c)(m.a,"tail")),o=0===arguments.length?e.scriptRef:"number"==typeof t?rt(t,"tail"):at(t,a,"tail",i),null!=o?R.b.emit(o):e.log("tail",()=>it(t,a,i))},nuke:function(t){const a=ft.string("tail","hostname",t);if(n("nuke",Object(r.c)(m.a,"nuke")),void 0===a)throw st("nuke","Takes 1 argument.");const i=nt(a,"nuke");if(!(i instanceof k.a))return e.log("nuke",()=>"Cannot be executed on this server."),!1;if(i.hasAdminRights)return e.log("nuke",()=>`Already have root access to '${i.hostname}'.`),!0;if(!m.a.hasProgram(h.a.NukeProgram.name))throw st("nuke","You do not have the NUKE.exe virus!");if(i.openPortCount`Executed NUKE.exe virus on '${i.hostname}' to gain root access.`),!0},brutessh:function(t){const a=ft.string("brutessh","hostname",t);if(n("brutessh",Object(r.c)(m.a,"brutessh")),void 0===a)throw st("brutessh","Takes 1 argument.");const i=nt(a,"brutessh");if(!(i instanceof k.a))return e.log("brutessh",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.BruteSSHProgram.name))throw st("brutessh","You do not have the BruteSSH.exe program!");return i.sshPortOpen?e.log("brutessh",()=>`SSH Port (22) already opened on '${i.hostname}'.`):(e.log("brutessh",()=>`Executed BruteSSH.exe on '${i.hostname}' to open SSH port (22).`),i.sshPortOpen=!0,++i.openPortCount),!0},ftpcrack:function(t){const a=ft.string("ftpcrack","hostname",t);if(n("ftpcrack",Object(r.c)(m.a,"ftpcrack")),void 0===a)throw st("ftpcrack","Takes 1 argument.");const i=nt(a,"ftpcrack");if(!(i instanceof k.a))return e.log("ftpcrack",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.FTPCrackProgram.name))throw st("ftpcrack","You do not have the FTPCrack.exe program!");return i.ftpPortOpen?e.log("ftpcrack",()=>`FTP Port (21) already opened on '${i.hostname}'.`):(e.log("ftpcrack",()=>`Executed FTPCrack.exe on '${i.hostname}' to open FTP port (21).`),i.ftpPortOpen=!0,++i.openPortCount),!0},relaysmtp:function(t){const a=ft.string("relaysmtp","hostname",t);if(n("relaysmtp",Object(r.c)(m.a,"relaysmtp")),void 0===a)throw st("relaysmtp","Takes 1 argument.");const i=nt(a,"relaysmtp");if(!(i instanceof k.a))return e.log("relaysmtp",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.RelaySMTPProgram.name))throw st("relaysmtp","You do not have the relaySMTP.exe program!");return i.smtpPortOpen?e.log("relaysmtp",()=>`SMTP Port (25) already opened on '${i.hostname}'.`):(e.log("relaysmtp",()=>`Executed relaySMTP.exe on '${i.hostname}' to open SMTP port (25).`),i.smtpPortOpen=!0,++i.openPortCount),!0},httpworm:function(t){const a=ft.string("httpworm","hostname",t);if(n("httpworm",Object(r.c)(m.a,"httpworm")),void 0===a)throw st("httpworm","Takes 1 argument");const i=nt(a,"httpworm");if(!(i instanceof k.a))return e.log("httpworm",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.HTTPWormProgram.name))throw st("httpworm","You do not have the HTTPWorm.exe program!");return i.httpPortOpen?e.log("httpworm",()=>`HTTP Port (80) already opened on '${i.hostname}'.`):(e.log("httpworm",()=>`Executed HTTPWorm.exe on '${i.hostname}' to open HTTP port (80).`),i.httpPortOpen=!0,++i.openPortCount),!0},sqlinject:function(t){const a=ft.string("sqlinject","hostname",t);if(n("sqlinject",Object(r.c)(m.a,"sqlinject")),void 0===a)throw st("sqlinject","Takes 1 argument.");const i=nt(a,"sqlinject");if(!(i instanceof k.a))return e.log("sqlinject",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.SQLInjectProgram.name))throw st("sqlinject","You do not have the SQLInject.exe program!");return i.sqlPortOpen?e.log("sqlinject",()=>`SQL Port (1433) already opened on '${i.hostname}'.`):(e.log("sqlinject",()=>`Executed SQLInject.exe on '${i.hostname}' to open SQL port (1433).`),i.sqlPortOpen=!0,++i.openPortCount),!0},run:function(t,a=1,...i){const o=ft.string("run","scriptname",t),s=ft.number("run","threads",a);if(n("run",Object(r.c)(m.a,"run")),void 0===o)throw st("run","Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(s)||s<=0)throw st("run","Invalid thread count. Must be numeric and > 0, is "+s);const l=Object(b.d)(e.hostname);if(null==l)throw st("run","Could not find server. This is a bug. Report to dev.");return Object(x.d)(m.a,"run",l,o,i,e,s)},exec:function(t,a,i=1,...o){const s=ft.string("exec","scriptname",t),l=ft.string("exec","hostname",a),c=ft.number("exec","threads",i);if(n("exec",Object(r.c)(m.a,"exec")),void 0===s||void 0===l)throw st("exec","Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(c)||c<=0)throw st("exec","Invalid thread count. Must be numeric and > 0, is "+c);const f=nt(l,"exec");return Object(x.d)(m.a,"exec",f,s,o,e,c)},spawn:function(t,a=1,...i){const o=ft.string("spawn","scriptname",t),s=ft.number("spawn","threads",a);if(n("spawn",Object(r.c)(m.a,"spawn")),!o||!s)throw st("spawn","Usage: spawn(scriptname, threads)");setTimeout(()=>{if(isNaN(s)||s<=0)throw st("spawn","Invalid thread count. Must be numeric and > 0, is "+s);const t=Object(b.d)(e.hostname);if(null==t)throw st("spawn","Could not find server. This is a bug. Report to dev");return Object(x.d)(m.a,"spawn",t,o,i,e,s)},1e4),e.log("spawn",()=>`Will execute '${o}' in 10 seconds`),e.running=!1,Object(L.a)(e)&&e.log("spawn",()=>"Exiting...")},kill:function(t,a,...i){let o;n("kill",Object(r.c)(m.a,"kill"));const s="number"==typeof t;if(s)o=Object(L.a)(t);else{if(void 0===t||void 0===a)throw st("kill","Usage: kill(scriptname, server, [arg1], [arg2]...)");const n=nt(a,"kill"),r=at(t,a,"kill",i);if(null==r)return e.log("kill",()=>it(t,a,i)),!1;o=Object(L.a)(r,n.hostname)}return o?(s?e.log("kill",()=>"Killing script with PID "+t):e.log("kill",()=>`Killing '${t}' on '${a}' with args: ${Object(N.a)(i)}.`),!0):(s?e.log("kill",()=>"No script with PID "+t):e.log("kill",()=>`No such script '${t}' on '${a}' with args: ${Object(N.a)(i)}`),!1)},killall:function(t=e.hostname){const a=ft.string("killall","hostname",t);if(n("killall",Object(r.c)(m.a,"killall")),void 0===a)throw st("killall","Takes 1 argument");const o=nt(a,"killall"),s=o.runningScripts.length>0;for(let t=o.runningScripts.length-1;t>=0;--t)Object(L.a)(o.runningScripts[t],o.hostname,!1);return i.a.emit(),e.log("killall",()=>`Killing all scripts on '${o.hostname}'. May take a few minutes for the scripts to die.`),s},exit:function(){n("exit",Object(r.c)(m.a,"exit")),e.running=!1,Object(L.a)(e)?e.log("exit",()=>"Exiting..."):e.log("exit",()=>"Failed. This is a bug. Report to dev.")},scp:async function(t,a,i){const o=ft.string("scp","hostname1",a);if(n("scp",Object(r.c)(m.a,"scp")),2!==arguments.length&&3!==arguments.length)throw st("scp","Takes 2 or 3 arguments");if(t&&t.constructor===Array){const n=t;if(0===n.length)throw st("scp","No scripts to copy");let a=!0;return await Promise.all(n.map((async function(t){await et(e).scp(t,o,i)||(a=!1)}))),Promise.resolve(a)}if(!Object(S.j)(t))throw st("scp",`Invalid filename: '${t}'`);if(!t.endsWith(".lit")&&!Object(g.a)(t)&&!t.endsWith("txt"))throw st("scp","Only works for scripts, .lit and .txt files");let s,l;if(null!=i){if(void 0===t||void 0===o||void 0===i)throw st("scp","Takes 2 or 3 arguments");s=nt(i,"scp"),l=nt(o,"scp")}else{if(null==o)throw st("scp","Takes 2 or 3 arguments");if(void 0===t||void 0===o)throw st("scp","Takes 2 or 3 arguments");if(s=nt(o,"scp"),l=Object(b.d)(e.hostname),null==l)throw st("scp","Could not find server hostname for this script. This is a bug. Report to dev.")}if(t.endsWith(".lit")){let n=!1;for(let e=0;e`File '${t}' does not exist.`),Promise.resolve(!1);for(let n=0;n{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0);return s.messages.push(t),e.log("scp",()=>{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0)}if(t.endsWith(".txt")){let n;for(let e=0;e`File '${t}' does not exist.`),Promise.resolve(!1);for(let a=0;a{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0);const a=new C.a(n.fn,n.text);return s.textFiles.push(a),e.log("scp",()=>{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0)}let c=null;for(let e=0;e`File '${t}' does not exist.`),Promise.resolve(!1);for(let n=0;n{var e;return`WARNING: File '${t}' overwritten on '${null===(e=s)||void 0===e?void 0:e.hostname}'`});const a=s.scripts[n];return a.code===c.code||(a.code=c.code,a.ramUsage=c.ramUsage,a.markUpdated()),Promise.resolve(!0)}const f=new d.a(m.a,t);return f.code=c.code,f.ramUsage=c.ramUsage,f.server=s.hostname,s.scripts.push(f),e.log("scp",()=>{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),new Promise(t=>{null!==s?f.updateRamUsage(m.a,s.scripts).then(()=>t(!0)):t(!1)})},ls:function(t,e=""){const a=ft.string("ls","hostname",t),i=ft.string("ls","grep",e);if(n("ls",Object(r.c)(m.a,"ls")),void 0===a)throw st("ls","Usage: ls(hostname/ip, [grep filter])");const o=nt(a,"ls");let s="";arguments.length>=2&&(s=i.toString());const l=[];for(let t=0;t"returned "+m.a.hacking),m.a.hacking},getHackingMultipliers:function(){return n("getHackingMultipliers",Object(r.c)(m.a,"getHackingMultipliers")),{chance:m.a.hacking_chance_mult,speed:m.a.hacking_speed_mult,money:m.a.hacking_money_mult,growth:m.a.hacking_grow_mult}},getHacknetMultipliers:function(){return n("getHacknetMultipliers",Object(r.c)(m.a,"getHacknetMultipliers")),{production:m.a.hacknet_node_money_mult,purchaseCost:m.a.hacknet_node_purchase_cost_mult,ramCost:m.a.hacknet_node_ram_cost_mult,coreCost:m.a.hacknet_node_core_cost_mult,levelCost:m.a.hacknet_node_level_cost_mult}},getBitNodeMultipliers:function(){if(n("getBitNodeMultipliers",Object(r.c)(m.a,"getBitNodeMultipliers")),_.a[5]<=0&&5!==m.a.bitNodeN)throw st("getBitNodeMultipliers","Requires Source-File 5 to run.");return Object.assign({},o.a)},getServer:function(t=e.hostname){const a=ft.string("getServer","hostname",t);n("getServer",Object(r.c)(m.a,"getServer"));const i=nt(a,"getServer"),o=Object.assign({},i);return o.contracts=void 0,o.messages=void 0,o.runningScripts=void 0,o.scripts=void 0,o.textFiles=void 0,o.programs=void 0,o.serversOnNetwork=void 0,o.baseDifficulty||(o.baseDifficulty=0),o.hackDifficulty||(o.hackDifficulty=0),o.minDifficulty||(o.minDifficulty=0),o.moneyAvailable||(o.moneyAvailable=0),o.moneyMax||(o.moneyMax=0),o.numOpenPortsRequired||(o.numOpenPortsRequired=0),o.openPortCount||(o.openPortCount=0),o.requiredHackingSkill||(o.requiredHackingSkill=0),o.serverGrowth||(o.serverGrowth=0),o},getServerMoneyAvailable:function(t){const a=ft.string("getServerMoneyAvailable","hostname",t);n("getServerMoneyAvailable",Object(r.c)(m.a,"getServerMoneyAvailable"));const i=nt(a,"getServerMoneyAvailable");return i instanceof k.a?ot(i,"getServerMoneyAvailable")?0:"home"==i.hostname?(e.log("getServerMoneyAvailable",()=>"returned player's money: "+T.a.formatMoney(m.a.money)),m.a.money):(e.log("getServerMoneyAvailable",()=>`returned ${T.a.formatMoney(i.moneyAvailable)} for '${i.hostname}'`),i.moneyAvailable):(e.log("getServerMoneyAvailable",()=>"Cannot be executed on this server."),0)},getServerSecurityLevel:function(t){const a=ft.string("getServerSecurityLevel","hostname",t);n("getServerSecurityLevel",Object(r.c)(m.a,"getServerSecurityLevel"));const i=nt(a,"getServerSecurityLevel");return i instanceof k.a?ot(i,"getServerSecurityLevel")?1:(e.log("getServerSecurityLevel",()=>`returned ${T.a.formatServerSecurity(i.hackDifficulty)} for '${i.hostname}'`),i.hackDifficulty):(e.log("getServerSecurityLevel",()=>"Cannot be executed on this server."),1)},getServerBaseSecurityLevel:function(t){const a=ft.string("getServerBaseSecurityLevel","hostname",t);n("getServerBaseSecurityLevel",Object(r.c)(m.a,"getServerBaseSecurityLevel")),e.log("getServerBaseSecurityLevel",()=>"getServerBaseSecurityLevel is deprecated because it's not useful.");const i=nt(a,"getServerBaseSecurityLevel");return i instanceof k.a?ot(i,"getServerBaseSecurityLevel")?1:(e.log("getServerBaseSecurityLevel",()=>`returned ${T.a.formatServerSecurity(i.baseDifficulty)} for '${i.hostname}'`),i.baseDifficulty):(e.log("getServerBaseSecurityLevel",()=>"Cannot be executed on this server."),1)},getServerMinSecurityLevel:function(t){const a=ft.string("getServerMinSecurityLevel","hostname",t);n("getServerMinSecurityLevel",Object(r.c)(m.a,"getServerMinSecurityLevel"));const i=nt(a,"getServerMinSecurityLevel");return i instanceof k.a?ot(i,"getServerMinSecurityLevel")?1:(e.log("getServerMinSecurityLevel",()=>`returned ${T.a.formatServerSecurity(i.minDifficulty)} for ${i.hostname}`),i.minDifficulty):(e.log("getServerMinSecurityLevel",()=>"Cannot be executed on this server."),1)},getServerRequiredHackingLevel:function(t){const a=ft.string("getServerRequiredHackingLevel","hostname",t);n("getServerRequiredHackingLevel",Object(r.c)(m.a,"getServerRequiredHackingLevel"));const i=nt(a,"getServerRequiredHackingLevel");return i instanceof k.a?ot(i,"getServerRequiredHackingLevel")?1:(e.log("getServerRequiredHackingLevel",()=>`returned ${T.a.formatSkill(i.requiredHackingSkill)} for '${i.hostname}'`),i.requiredHackingSkill):(e.log("getServerRequiredHackingLevel",()=>"Cannot be executed on this server."),1)},getServerMaxMoney:function(t){const a=ft.string("getServerMaxMoney","hostname",t);n("getServerMaxMoney",Object(r.c)(m.a,"getServerMaxMoney"));const i=nt(a,"getServerMaxMoney");return i instanceof k.a?ot(i,"getServerMaxMoney")?0:(e.log("getServerMaxMoney",()=>`returned ${T.a.formatMoney(i.moneyMax)} for '${i.hostname}'`),i.moneyMax):(e.log("getServerMaxMoney",()=>"Cannot be executed on this server."),0)},getServerGrowth:function(t){const a=ft.string("getServerGrowth","hostname",t);n("getServerGrowth",Object(r.c)(m.a,"getServerGrowth"));const i=nt(a,"getServerGrowth");return i instanceof k.a?ot(i,"getServerGrowth")?1:(e.log("getServerGrowth",()=>`returned ${i.serverGrowth} for '${i.hostname}'`),i.serverGrowth):(e.log("getServerGrowth",()=>"Cannot be executed on this server."),1)},getServerNumPortsRequired:function(t){const a=ft.string("getServerNumPortsRequired","hostname",t);n("getServerNumPortsRequired",Object(r.c)(m.a,"getServerNumPortsRequired"));const i=nt(a,"getServerNumPortsRequired");return i instanceof k.a?ot(i,"getServerNumPortsRequired")?5:(e.log("getServerNumPortsRequired",()=>`returned ${i.numOpenPortsRequired} for '${i.hostname}'`),i.numOpenPortsRequired):(e.log("getServerNumPortsRequired",()=>"Cannot be executed on this server."),5)},getServerRam:function(t){const a=ft.string("getServerRam","hostname",t);n("getServerRam",Object(r.c)(m.a,"getServerRam")),e.log("getServerRam",()=>"getServerRam is deprecated in favor of getServerMaxRam / getServerUsedRam");const i=nt(a,"getServerRam");return e.log("getServerRam",()=>`returned [${T.a.formatRAM(i.maxRam)}, ${T.a.formatRAM(i.ramUsed)}]`),[i.maxRam,i.ramUsed]},getServerMaxRam:function(t){const a=ft.string("getServerMaxRam","hostname",t);n("getServerMaxRam",Object(r.c)(m.a,"getServerMaxRam"));const i=nt(a,"getServerMaxRam");return e.log("getServerMaxRam",()=>"returned "+T.a.formatRAM(i.maxRam)),i.maxRam},getServerUsedRam:function(t){const a=ft.string("getServerUsedRam","hostname",t);n("getServerUsedRam",Object(r.c)(m.a,"getServerUsedRam"));const i=nt(a,"getServerUsedRam");return e.log("getServerUsedRam",()=>"returned "+T.a.formatRAM(i.ramUsed)),i.ramUsed},serverExists:function(t){const e=ft.string("serverExists","hostname",t);return n("serverExists",Object(r.c)(m.a,"serverExists")),null!==Object(b.d)(e)},fileExists:function(t,a=e.hostname){const i=ft.string("fileExists","filename",t),o=ft.string("fileExists","hostname",a);if(n("fileExists",Object(r.c)(m.a,"fileExists")),void 0===i)throw st("fileExists","Usage: fileExists(scriptname, [server])");const s=nt(o,"fileExists");for(let t=0;t`Invalid argument: ram='${a}'`),1/0):i},purchaseServer:function(t,a){const i=ft.string("purchaseServer","name",t),o=ft.number("purchaseServer","ram",a);if(2!==arguments.length)throw st("purchaseServer","Takes 2 arguments");n("purchaseServer",Object(r.c)(m.a,"purchaseServer"));let s=String(i);if(s=s.replace(/\s+/g,""),""==s)return e.log("purchaseServer",()=>`Invalid argument: hostname='${s}'`),"";if(m.a.purchasedServers.length>=Object(v.b)())return e.log("purchaseServer",()=>`You have reached the maximum limit of ${Object(v.b)()} servers. You cannot purchase any more.`),"";const l=Object(v.a)(o);if(l===1/0)return o>Object(v.c)()?e.log("purchaseServer",()=>`Invalid argument: ram='${o}' must not be greater than getPurchaseServerMaxRam`):e.log("purchaseServer",()=>`Invalid argument: ram='${o}' must be a positive power of 2`),"";if(m.a.money"Not enough money to purchase server. Need "+T.a.formatMoney(l)),"";const c=Object(E.f)({ip:Object(b.e)(),hostname:s,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:o});Object(b.a)(c),m.a.purchasedServers.push(c.hostname);const f=m.a.getHomeComputer();return f.serversOnNetwork.push(c.hostname),c.serversOnNetwork.push(f.hostname),m.a.loseMoney(l,"servers"),e.log("purchaseServer",()=>`Purchased new server with hostname '${c.hostname}' for ${T.a.formatMoney(l)}`),c.hostname},deleteServer:function(t){const a=ft.string("purchaseServer","name",t);n("deleteServer",Object(r.c)(m.a,"deleteServer"));let i=String(a);i=i.replace(/\s\s+/g,"");const o=Object(b.d)(i);if(!(o instanceof k.a))return e.log("deleteServer",()=>`Invalid argument: hostname='${i}'`),!1;if(!o.purchasedByPlayer||"home"===o.hostname)return e.log("deleteServer",()=>"Cannot delete non-purchased server."),!1;const s=o.hostname;if(o.isConnectedTo)return e.log("deleteServer",()=>"You are currently connected to the server you are trying to delete."),!1;if(s===e.hostname)return e.log("deleteServer",()=>"Cannot delete the server this script is running on."),!1;if(o.runningScripts.length>0)return e.log("deleteServer",()=>`Cannot delete server '${s}' because it still has scripts running.`),!1;let l=!1;for(let t=0;t`Could not identify server ${s} as a purchased server. This is a bug. Report to dev.`),!1;Object(b.b)(s),l=!1;const c=m.a.getHomeComputer();for(let t=0;t"Deleted server '"+i),!0;return e.log("deleteServer",()=>`Could not find server ${s} as a purchased server. This is a bug. Report to dev.`),!1},getPurchasedServers:function(){n("getPurchasedServers",Object(r.c)(m.a,"getPurchasedServers"));const t=[];return m.a.purchasedServers.forEach((function(e){t.push(e)})),t},writePort:function(t,e=""){const a=ft.number("writePort","port",t);if(n("writePort",Object(r.c)(m.a,"writePort")),"string"!=typeof e&&"number"!=typeof e)throw st("writePort","Trying to write invalid data to a port: only strings and numbers are valid.");const i=ft.getValidPort("writePort",a);return Promise.resolve(i.write(e))},write:function(t,a="",i="a"){const o=ft.string("write","port",t),s=ft.string("write","mode",i);if(n("write",Object(r.c)(m.a,"write")),Object(P.a)(o)){let t=o;if(!Object(S.j)(t))throw st("write","Invalid filepath: "+t);0===t.lastIndexOf("/")&&(t=Object(S.k)(t));try{a=String(a)}catch(t){throw st("write",`Invalid data (${t}). Data being written must be convertible to a string`)}const n=e.getServer();if(null==n)throw st("write","Error getting Server. This is a bug. Report to dev.");if(Object(g.a)(t)){let r=e.getScriptOnServer(t,n);return null==r?(r=new d.a(m.a,t,a,n.hostname,n.scripts),n.scripts.push(r),r.updateRamUsage(m.a,n.scripts)):("w"===s?r.code=a:r.code+=a,r.updateRamUsage(m.a,n.scripts))}{const e=Object(C.c)(t,n);if(null==e)return Object(C.b)(t,a,n),Promise.resolve();"w"===s?e.write(a):e.append(a)}return Promise.resolve()}throw st("write","Invalid argument: "+o)},tryWritePort:function(t,e=""){let a=ft.number("tryWritePort","port",t);if(n("tryWritePort",Object(r.c)(m.a,"tryWritePort")),"string"!=typeof e&&"number"!=typeof e)throw st("tryWritePort","Trying to write invalid data to a port: only strings and numbers are valid.");if(isNaN(a))throw st("tryWritePort","Invalid argument: "+a);{if(a=Math.round(a),a<1||a>s.a.NumNetscriptPorts)throw st("tryWritePort",`Invalid port: ${a}. Only ports 1-${s.a.NumNetscriptPorts} are valid.`);const t=x.a[a-1];if(null==t||!(t instanceof Object))throw st("tryWritePort",`Could not find port: ${a}. This is a bug. Report to dev.`);return Promise.resolve(t.tryWrite(e))}},readPort:function(t){const e=ft.number("readPort","port",t);n("readPort",Object(r.c)(m.a,"readPort"));return ft.getValidPort("readPort",e).read()},read:function(t){const a=ft.string("read","port",t);if(n("read",Object(r.c)(m.a,"read")),Object(P.a)(a)){const t=a,n=Object(b.d)(e.hostname);if(null==n)throw st("read","Error getting Server. This is a bug. Report to dev.");if(Object(g.a)(t)){const a=e.getScriptOnServer(t,n);return null==a?"":a.code}{const e=Object(C.c)(t,n);return null!==e?e.text:""}}throw st("read","Invalid argument: "+a)},peek:function(t){const e=ft.number("peek","port",t);n("peek",Object(r.c)(m.a,"peek"));return ft.getValidPort("peek",e).peek()},clear:function(t){const a=ft.string("peek","file",t);if(n("clear",Object(r.c)(m.a,"clear")),!Object(P.a)(a))throw st("clear","Invalid argument: "+a);{const t=a,n=Object(b.d)(e.hostname);if(null==n)throw st("clear","Error getting Server. This is a bug. Report to dev.");const r=Object(C.c)(t,n);null!=r&&r.write("")}},clearPort:function(t){const e=ft.number("clearPort","port",t);n("clearPort",Object(r.c)(m.a,"clearPort"));ft.getValidPort("clearPort",e).clear()},getPortHandle:function(t){const e=ft.number("getPortHandle","port",t);n("getPortHandle",Object(r.c)(m.a,"getPortHandle"));return ft.getValidPort("getPortHandle",e)},rm:function(t,a){const i=ft.string("rm","fn",t);n("rm",Object(r.c)(m.a,"rm")),null!=a&&""!==a||(a=e.hostname);const o=nt(a,"rm").removeFile(i);return o.res||e.log("rm",()=>o.msg+""),o.res},scriptRunning:function(t,e){const a=ft.string("scriptRunning","scriptname",t),i=ft.string("scriptRunning","hostname",e);n("scriptRunning",Object(r.c)(m.a,"scriptRunning"));const o=nt(i,"scriptRunning");for(let t=0;t"invalid for this kind of server"),1/0)},getGrowTime:function(t=e.hostname){const a=ft.string("getGrowTime","hostname",t);n("getGrowTime",Object(r.c)(m.a,"getGrowTime"));const i=nt(a,"getGrowTime");return i instanceof k.a?ot(i,"getGrowTime")?1/0:1e3*Object(l.a)(i,m.a):(e.log("getGrowTime",()=>"invalid for this kind of server"),1/0)},getWeakenTime:function(t=e.hostname){const a=ft.string("getWeakenTime","hostname",t);n("getWeakenTime",Object(r.c)(m.a,"getWeakenTime"));const i=nt(a,"getWeakenTime");return i instanceof k.a?ot(i,"getWeakenTime")?1/0:1e3*Object(l.f)(i,m.a):(e.log("getWeakenTime",()=>"invalid for this kind of server"),1/0)},getScriptIncome:function(t,a,...i){if(n("getScriptIncome",Object(r.c)(m.a,"getScriptIncome")),0===arguments.length){const t=[];let e=0;for(const t of O.a.values())e+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return t.push(e),t.push(m.a.scriptProdSinceLastAug/(m.a.playtimeSinceLastAug/1e3)),t}{const n=nt(a,"getScriptIncome"),r=Object(p.a)(t,i,n);return null==r?(e.log("getScriptIncome",()=>`No such script '${t}' on '${n.hostname}' with args: ${Object(N.a)(i)}`),-1):r.onlineMoneyMade/r.onlineRunningTime}},getScriptExpGain:function(t,a,...i){if(n("getScriptExpGain",Object(r.c)(m.a,"getScriptExpGain")),0===arguments.length){let t=0;for(const e of O.a.values())t+=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime;return t}{const n=nt(a,"getScriptExpGain"),r=Object(p.a)(t,i,n);return null==r?(e.log("getScriptExpGain",()=>`No such script '${t}' on '${n.hostname}' with args: ${Object(N.a)(i)}`),-1):r.onlineExpGained/r.onlineRunningTime}},nFormat:function(t,e){const a=ft.number("nFormat","n",t),i=ft.string("nFormat","format",e);return n("nFormat",Object(r.c)(m.a,"nFormat")),isNaN(a)?"":T.a.format(a,i)},tFormat:function(t,e=!1){const a=ft.number("tFormat","milliseconds",t),i=ft.boolean(e);return n("tFormat",Object(r.c)(m.a,"tFormat")),Object(A.b)(a,i)},getTimeSinceLastAug:function(){return n("getTimeSinceLastAug",Object(r.c)(m.a,"getTimeSinceLastAug")),m.a.playtimeSinceLastAug},alert:function(t){const e=ft.string("alert","message",t);n("alert",Object(r.c)(m.a,"alert")),Object(Y.a)(e)},toast:function(t,e="success",a=2e3){const i=ft.string("toast","message",t),o=ft.string("toast","variant",e);if(n("toast",Object(r.c)(m.a,"toast")),!["success","info","warning","error"].includes(o))throw new Error('variant must be one of "success", "info", "warning", or "error"');J.b.emit(i,o,a)},prompt:function(t,e){const a=ft.string("toast","txt",t);return n("prompt",Object(r.c)(m.a,"prompt")),new Promise((function(t){y.a.emit({txt:a,options:e,resolve:t})}))},wget:async function(a,i,o=e.hostname){const s=ft.string("wget","url",a),l=ft.string("wget","target",i),c=ft.string("wget","hostname",o);if(n("wget",Object(r.c)(m.a,"wget")),!Object(g.a)(l)&&!l.endsWith(".txt"))return e.log("wget",()=>`Invalid target file: '${l}'. Must be a script or text file.`),Promise.resolve(!1);const f=nt(c,"wget");return new Promise((function(n){t.get(s,(function(t){let a;return a=Object(g.a)(l)?f.writeToScriptFile(m.a,l,t):f.writeToTextFile(l,t),a.success?a.overwritten?(e.log("wget",()=>`Successfully retrieved content and overwrote '${l}' on '${c}'`),n(!0)):(e.log("wget",()=>`Successfully retrieved content to new file '${l}' on '${c}'`),n(!0)):(e.log("wget",()=>"Failed."),n(!1))}),"text").fail((function(t){return e.log("wget",()=>JSON.stringify(t)),n(!1)}))}))},getFavorToDonate:function(){return n("getFavorToDonate",Object(r.c)(m.a,"getFavorToDonate")),Math.floor(s.a.BaseFavorToDonate*o.a.RepToDonateToFaction)},getOwnedSourceFiles:function(){n("getOwnedSourceFiles",Object(r.c)(m.a,"getOwnedSourceFiles"));const t=[];for(let e=0;e{t()}},mv:function(t,e,a){const i=ft.string("mv","host",t),o=ft.string("mv","source",e),s=ft.string("mv","destination",a);if(n("mv",Object(r.c)(m.a,"mv")),!Object(S.j)(o))throw st("mv",`Invalid filename: '${o}'`);if(!Object(S.j)(s))throw st("mv",`Invalid filename: '${s}'`);const l=o.endsWith(".txt"),c=s.endsWith(".txt");if(!Object(g.a)(o)&&!l)throw st("mv","'mv' can only be used on scripts and text files (.txt)");if(l!=c)throw st("mv","Source and destination files must have the same type");if(o===s)return;const f=nt(i,"mv");if(!l&&f.isRunning(o))throw st("mv","Cannot use 'mv' on a script that is running");const u=l?f.textFiles:f.scripts;let h=null,p=null;for(let t=0;t[t,!0]));return St}}).call(this,n(811))},function(t,e,n){"use strict";n.d(e,"c",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return s}));var a=n(148),r=n(101);function i(t,e){const n=t.organizationName;let i=null;if("string"==typeof n&&""!==n&&(i=r.a[n]),!(i instanceof a.a))return;const o=e/t.moneyMax;Math.random()0?e.requiredHacking+r:0,o=e.requiredStrength>0?e.requiredStrength+r:0,s=e.requiredDefense>0?e.requiredDefense+r:0,l=e.requiredDexterity>0?e.requiredDexterity+r:0,c=e.requiredDexterity>0?e.requiredDexterity+r:0,f=e.requiredCharisma>0?e.requiredCharisma+r:0,u=e.requiredReputation;return n?(a="Requires:
",a+=i.toString()+" hacking
",a+=o.toString()+" strength
",a+=s.toString()+" defense
",a+=l.toString()+" dexterity
",a+=c.toString()+" agility
",a+=f.toString()+" charisma
",a+=u.toString()+" reputation"):(a="(Requires ",i>0&&(a+=i+" hacking, "),o>0&&(a+=o+" strength, "),s>0&&(a+=s+" defense, "),l>0&&(a+=l+" dexterity, "),c>0&&(a+=c+" agility, "),f>0&&(a+=f+" charisma, "),u>1&&(a+=u+" reputation, "),a=a.substring(0,a.length-2),a+=")"),a}n.d(e,"a",(function(){return a}))},,function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return i}));const a=["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/-a/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 [hostname] Connects to a remote server"," cp [src] [dst] Copy a file"," 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"," grow Spoof money in a servers bank account, increasing the amount available."," hack Hack the current machine"," help [command] Display this help text, or the help text for a command"," history [-c] Display the terminal history"," home Connect to home computer"," hostname Displays the hostname 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 one or more scripts or text files"," ps Display all scripts that are currently running"," rm [file] Delete a file from the server"," run [name] [-t n] [--tail] [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"," top Displays all running scripts and their RAM usage"," unalias [alias name] Deletes the specified alias"," vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode"," weaken Reduce the security of the current machine"," wget [url] [target file] Retrieves code/text from a web server"," "],r=t=>[`Usage: ${t} [file ...] | [glob]`," ","Opens up the specified file(s) in the Script Editor. Only scripts (.js, .ns, .script) or text files (.txt) ","can be edited using the Script Editor. If a file does not exist a new one will be created"," ",`If provided a glob as the only argument, ${t} can spider directories and open all matching `,`files at once. ${t} cannot create files using globs, so your scripts must already exist.`," ","Examples:"," ",` ${t} test.js`,` ${t} test.js test2.js`," ",` ${t} test.*`,` ${t} /my-dir/*.js`," "],i={alias:['Usage: 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."," "],analyze:["Usage: analyze"," ","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."," "],backdoor:["Usage: backdoor"," ","Install a backdoor on the current machine, grants a secret bonus depending on the machine."," ","Requires root access to run."," "],buy:["Usage: buy [-l / -a / 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."," ","If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs."," ","Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive."," "],cat:["Usage: cat [file]"," ","Display message (.msg), literature (.lit), or text (.txt) files. Examples:"," "," cat j1.msg"," "," cat foo.lit"," "," cat servers.txt"," "],cd:["Usage: 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 ../"," "],check:["Usage: 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"," "],clear:["Usage: 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"," "],cls:["Usage: 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"," "],connect:["Usage: connect [hostname]"," ","Connect to a remote server. The hostname 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."," "],cp:["Usage: cp [src] [dst]"," ","Copy a file on this server. To copy a file to another server use scp."," "],download:["Usage: 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"," "],expr:["Usage: 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."," "],free:["Usage: free"," ","Displays 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."," "],grow:["Usage: grow"," ","Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.","See the wiki page for hacking mechanics."," "],hack:["Usage: hack"," ","Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics"," "],help:["Usage: 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"," "],history:["Usage: history [-c]"," ","Without arguments, displays the terminal command history. To clear the history, pass in the '-c' argument."," "],home:["Usage: home"," ","Connect to your home computer. This will work no matter what server you are currently connected to."," "],hostname:["Usage: hostname"," ","Prints the hostname of the current server"," "],kill:["Usage: kill [script name] [args...] or 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"," "],killall:["Usage: 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."," "],ls:["Usage: ls [dir] [-l] [--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 '-l' optional parameter allows you to force each item onto a single line."," ","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 -l --grep .script"," ","List all files with the '.js' extension in the root directory:"," "," ls / -l --grep .js"," ","List all files with the word 'purchase' in the filename, in the 'scripts' directory:"," "," ls scripts -l --grep purchase"," "],lscpu:["Usage: lscpu"," ","Prints the number of CPU Cores the current server has"," "],mem:["Usage: 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."," "],mv:["Usage: 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"," "],nano:r("nano"),ps:["Usage: ps"," ","Prints all scripts that are running on the current server"," "],rm:["Usage: 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"," "],run:["Usage: run [file name] [-t] [num threads] [args...]"," ","Execute a program, script or coding contract."," ","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. "," "],scan:["Usage: 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."," "],"scan-analyze":["Usage: 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."," "],scp:["Usage: scp [filename ...] [target server]"," ","Copies the specified file(s) from the current server to the target server. ","This command only works for script files (.script or .js 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. Examples:"," "," scp foo.script n00dles"," "," scp foo.script bar.script n00dles"," "],sudov:["Usage: sudov"," ","Prints whether or not you have root access to the current machine"," "],tail:["Usage: 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"," "],top:["Usage: 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."," "],unalias:["Usage: 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'"," "],vim:r("vim"),weaken:["Usage: weaken"," ","Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.","Requires root access. See the wiki page for hacking mechanics."," "],wget:["Usage: 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"," "]}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c}));var a,r,i=n(27),o=n(251),s=n(8);!function(t){t[t.Production=0]="Production",t[t.Development=1]="Development"}(a||(a={})),function(t){t[t.Browser=0]="Browser",t[t.Steam=1]="Steam"}(r||(r={}));const l="https://github.com/danielyxie/bitburner/issues/new";function c(t,e,n){var c,f,u;const m=function(t,e,n){const i=navigator.userAgent.toLowerCase().indexOf(" electron/")>-1,l=a.Production,c={version:s.a.VersionString,hash:Object(o.a)(),toDisplay:()=>`v${s.a.VersionString} (${Object(o.a)()})`},f={userAgent:navigator.userAgent,language:navigator.language,cookiesEnabled:navigator.cookieEnabled,doNotTrack:navigator.doNotTrack,indexedDb:!!window.indexedDB};return{platform:i?r.Steam:r.Browser,environment:l,version:c,features:f,error:t,errorInfo:e,page:n}}(t,e,n),h=m.error.fileName,d=`lang=${m.features.language} cookiesEnabled=${m.features.cookiesEnabled.toString()} doNotTrack=${m.features.doNotTrack} indexedDb=${m.features.indexedDb.toString()}`,p=`${m.error.name}: ${m.error.message}${m.page&&` (at "${i.a[m.page]}")`}`,g=`\n## ${p}\n\n### How did this happen?\n\nPlease fill this information with details if relevant.\n\n- [ ] Save file\n- [ ] Minimal scripts to reproduce the issue\n- [ ] Steps to reproduce\n\n### Environment\n\n* Error: ${null!==(c=null===(f=m.error)||void 0===f?void 0:f.toString())&&void 0!==c?c:"n/a"}\n* Page: ${m.page?i.a[m.page]:"n/a"}\n* Version: ${m.version.toDisplay()}\n* Environment: ${a[m.environment]}\n* Platform: ${r[m.platform]}\n* UserAgent: ${navigator.userAgent}\n* Features: ${d}\n* Source: ${null!=h?h:"n/a"}\n\n${m.environment===a.Development?`\n### Stack Trace\n\`\`\`\n${null===(u=m.errorInfo)||void 0===u?void 0:u.componentStack.toString().trim()}\n\`\`\`\n`:""}\n### Save\n\`\`\`\nCopy your save here if possible\n\`\`\`\n`.trim();return{metadata:m,fileName:h,features:d,title:p,body:g,issueUrl:`${l}?title=${encodeURIComponent(p)}&body=${encodeURIComponent(g)}`}}},,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(36);function r(t){const e=Math.max(Math.min(t,255),0);return Object(a.a)(0,e)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(36);const r={Tracking:()=>Object(a.a)(5,75)/10,"Bounty Hunter":()=>Object(a.a)(5,75)/10,Retirement:()=>Object(a.a)(5,75)/10,Investigation:()=>Object(a.a)(10,40)/10,"Undercover Operation":()=>Object(a.a)(10,40)/10,"Sting Operation":()=>Object(a.a)(3,40)/10,Raid:()=>Object(a.a)(2,40)/10,"Stealth Retirement Operation":()=>Object(a.a)(1,20)/10,Assassination:()=>Object(a.a)(1,20)/10}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(149);function r(t){const e={},n=Object.keys(a.a);for(let a=0;a=this.cards.length)throw new Error("Tried to remove invalid card from Hand by index: "+t);return new a([...this.cards.slice().splice(t,1)])}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n(1),i=n(23),o=n(10);function s(t){return a.createElement(i.a,{title:null!=t.tooltip?a.createElement(r.a,null,t.tooltip):""},a.createElement(o.a,{onClick:t.onClick},t.text))}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(111),r=n(253),i=n(83),o=n(223),s=n(98),l=n(339),c=n(317);function f(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class u{constructor(t={hostname:"",ip:Object(l.a)()}){f(this,"contracts",[]),f(this,"cpuCores",1),f(this,"ftpPortOpen",!1),f(this,"hasAdminRights",!1),f(this,"hostname",""),f(this,"httpPortOpen",!1),f(this,"ip",""),f(this,"isConnectedTo",!1),f(this,"maxRam",0),f(this,"messages",[]),f(this,"organizationName",""),f(this,"programs",[]),f(this,"ramUsed",0),f(this,"runningScripts",[]),f(this,"scripts",[]),f(this,"serversOnNetwork",[]),f(this,"smtpPortOpen",!1),f(this,"sqlPortOpen",!1),f(this,"sshPortOpen",!1),f(this,"textFiles",[]),f(this,"purchasedByPlayer",!1),this.ip=t.ip?t.ip:Object(l.a)(),this.hostname=t.hostname,this.organizationName=null!=t.organizationName?t.organizationName:"",this.isConnectedTo=null!=t.isConnectedTo&&t.isConnectedTo,this.hasAdminRights=null!=t.adminRights&&t.adminRights}addContract(t){this.contracts.push(t)}getContract(t){for(const e of this.contracts)if(e.fn===t)return e;return null}getRunningScript(t,e){for(const n of this.runningScripts)if(n.filename===t&&Object(c.a)(n.args,e))return n;return null}getScript(t){for(let e=0;ee.fn!==t.fn):this.contracts=this.contracts.filter(e=>e.fn!==t)}removeFile(t){if(t.endsWith(".exe")||null!=t.match(/^.+\.exe-\d+(?:\.\d*)?%-INC$/)){for(let e=0;e{h.subscribe(t=>e(t))}),null===t)return r.a.createElement(r.a.Fragment,null);function d(){null!==t&&(t.onClose(),e(null))}const p=o.d[t.c.type],g=[];for(const[e,n]of p.desc(t.c.data).split("\n").entries())g.push(r.a.createElement("span",{key:e,dangerouslySetInnerHTML:{__html:n+"
"}}));return r.a.createElement(l.a,{open:null!==t,onClose:d},r.a.createElement(s.a,{variant:"h4",value:t.c.type}),r.a.createElement(f.a,null,"You are attempting to solve a Coding Contract. You have ",t.c.getMaxNumTries()-t.c.tries," tries remaining, after which the contract will self-destruct."),r.a.createElement("br",null),r.a.createElement(f.a,null,g),r.a.createElement("br",null),r.a.createElement(u.a,{autoFocus:!0,placeholder:"Enter Solution here",value:n,onChange:function(t){c(t.target.value)},onKeyDown:function(e){if(null===t)return;const a=e.target.value;e.key===i.a.ENTER&&""!==a&&(e.preventDefault(),t.onAttempt(n),c(""),d())},InputProps:{endAdornment:r.a.createElement(m.a,{onClick:()=>{t.onAttempt(n),c(""),d()}},"Solve")}}))}},,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return f})),n.d(e,"b",(function(){return u}));var a=n(0),r=n.n(a),i=n(41),o=n(30),s=n(131),l=n(1),c=n(10);const f=new s.a;function u(){const t=o.b.Router(),[e,n]=Object(a.useState)(!1);return Object(a.useEffect)(()=>f.subscribe(()=>n(!0)),[]),r.a.createElement(i.a,{open:e,onClose:()=>n(!1)},r.a.createElement(l.a,null,"WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.",r.a.createElement("br",null),r.a.createElement("br",null),"Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{onClick:function(){t.toBitVerse(!0,!1),n(!1)}},"Travel to the BitVerse"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(747),r=n(640),i=n(643),o=n(424),s=n(46),l=n(431),c=n(11),f=n(372),u=n(17),m=n(379),h=n(25),d=n(24),p=n(36);class g{constructor(){this.hacking=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=1e3,this.city=u.a.Sector12,this.location=c.a.TravelAgency,this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new f.a,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.workCostMult=1,this.workExpMult=1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.graftAugmentationName="",this.timeWorkedGraftAugmentation=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=null,this.corporation=null,this.bladeburner=null,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.entropy=0,this.lastUpdate=0,this.lastSave=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.a,this.moneySourceB=new m.a,this.scriptProdSinceLastAug=0,this.exploits=[],this.achievements=[],this.terminalCommandHistory=[],this.identifier=Object(d.c)("I-"+(new Date).getTime()+navigator.userAgent+window.innerWidth+window.innerHeight+Object(p.a)(100,999)),this.init=s.gb,this.prestigeAugmentation=s.jb,this.prestigeSourceFile=s.kb,this.receiveInvite=s.sb,this.calculateSkill=s.o,this.calculateSkillProgress=s.p,this.updateSkillLevels=s.Rb,this.resetMultipliers=s.vb,this.hasProgram=s.eb,this.setMoney=s.yb,this.gainMoney=s.M,this.loseMoney=s.ib,this.canAfford=s.s,this.recordMoneySource=s.tb,this.gainHackingExp=s.K,this.gainStrengthExp=s.N,this.gainDefenseExp=s.I,this.gainDexterityExp=s.J,this.gainAgilityExp=s.F,this.gainCharismaExp=s.G,this.gainIntelligenceExp=s.L,this.queryStatFromString=s.nb,this.resetWorkStatus=s.wb,this.processWorkEarnings=s.mb,this.startWork=s.Lb,this.cancelationPenalty=s.t,this.work=s.Sb,this.finishWork=s.D,this.startWorkPartTime=s.Mb,this.workPartTime=s.Ub,this.finishWorkPartTime=s.E,this.startFocusing=s.Jb,this.stopFocusing=s.Nb,this.startFactionWork=s.Ib,this.startFactionHackWork=s.Gb,this.startFactionFieldWork=s.Fb,this.startFactionSecurityWork=s.Hb,this.workForFaction=s.Tb,this.finishFactionWork=s.B,this.getWorkMoneyGain=s.X,this.getWorkHackExpGain=s.W,this.getWorkStrExpGain=s.Z,this.getWorkDefExpGain=s.U,this.getWorkDexExpGain=s.V,this.getWorkAgiExpGain=s.S,this.getWorkChaExpGain=s.T,this.getWorkRepGain=s.Y,this.process=s.lb,this.startCreateProgramWork=s.Db,this.createProgramWork=s.x,this.finishCreateProgramWork=s.z,this.startGraftAugmentationWork=s.Kb,this.graftAugmentationWork=s.w,this.finishGraftAugmentationWork=s.C,this.startClass=s.Cb,this.takeClass=s.Ob,this.finishClass=s.y,this.startCrime=s.Eb,this.commitCrime=s.v,this.finishCrime=s.A,this.singularityStopWork=s.Ab,this.takeDamage=s.Pb,this.regenerateHp=s.ub,this.hospitalize=s.fb,this.applyForJob=s.f,this.getNextCompanyPosition=s.R,this.quitJob=s.pb,this.hasJob=s.db,this.applyForSoftwareJob=s.m,this.applyForSoftwareConsultantJob=s.l,this.applyForItJob=s.e,this.applyForSecurityEngineerJob=s.j,this.applyForNetworkEngineerJob=s.g,this.applyForBusinessJob=s.c,this.applyForBusinessConsultantJob=s.b,this.applyForSecurityJob=s.k,this.applyForAgentJob=s.a,this.applyForEmployeeJob=s.d,this.applyForPartTimeEmployeeJob=s.h,this.applyForWaiterJob=s.n,this.applyForPartTimeWaiterJob=s.i,this.isQualified=s.hb,this.reapplyAllAugmentations=s.qb,this.reapplyAllSourceFiles=s.rb,this.checkForFactionInvitations=s.u,this.setBitNodeNumber=s.xb,this.queueAugmentation=s.ob,this.gainCodingContractReward=s.H,this.travel=s.Qb,this.gotoLocation=s.cb,this.canAccessGrafting=s.r,this.giveExploit=s.bb,this.giveAchievement=s.ab,this.getIntelligenceBonus=s.P,this.getCasinoWinnings=s.O,this.hasAugmentation=a.b,this.canAccessBladeburner=r.a,this.inBladeburner=r.b,this.startBladeburner=r.c,this.canAccessCorporation=i.a,this.hasCorporation=i.b,this.startCorporation=i.c,this.canAccessGang=o.a,this.getGangFaction=o.b,this.getGangName=o.c,this.hasGangWith=o.d,this.inGang=o.e,this.startGang=o.f,this.hasTorRouter=l.f,this.getCurrentServer=l.b,this.getHomeComputer=l.c,this.getUpgradeHomeRamCost=l.e,this.getUpgradeHomeCoresCost=l.d,this.createHacknetServer=l.a,this.factionWorkType="",this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.getMult=s.Q,this.setMult=s.zb,this.canAccessCotMG=s.q,this.sourceFileLvl=s.Bb,this.applyEntropy=a.a}toJSON(){return Object(h.b)("PlayerObject",this)}static fromJSON(t){return Object(h.a)(g,t.data)}}h.c.constructors.PlayerObject=g},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return m}));var a=n(0),r=n.n(a),i=n(105),o=n(41),s=n(30),l=n(131),c=n(1),f=n(10);const u=new l.a;function m(){const[t,e]=Object(a.useState)(null),n=s.b.Player();return Object(a.useEffect)(()=>u.subscribe(t=>e(t)),[]),r.a.createElement(o.a,{open:null!==t,onClose:()=>e(null)},r.a.createElement(c.a,{variant:"h4"},"You have received a faction invitation."),r.a.createElement(c.a,null,"Would you like to join ",(t||{name:""}).name,"? ",r.a.createElement("br",null),r.a.createElement("br",null),"Warning: Joining this faction may prevent you from joining other factions during this run!"),r.a.createElement(f.a,{onClick:function(){if(null===t)return;-1===n.factionInvitations.findIndex(e=>e===t.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(i.e)(t),e(null)}},"Join!"),r.a.createElement(f.a,{onClick:()=>e(null)},"Decide later"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(1005),r=n(16);function i(t){const e=a.a[t];if(null==e)return;const n=`${e.title}

${e.txt}`;Object(r.a)(n)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));class a{constructor(t,e,n,a,r){this.name=t,this.desc=e,this.isHacking=n,this.isCombat=a,this.baseRespect=r.baseRespect?r.baseRespect:0,this.baseWanted=r.baseWanted?r.baseWanted:0,this.baseMoney=r.baseMoney?r.baseMoney:0,this.hackWeight=r.hackWeight?r.hackWeight:0,this.strWeight=r.strWeight?r.strWeight:0,this.defWeight=r.defWeight?r.defWeight:0,this.dexWeight=r.dexWeight?r.dexWeight:0,this.agiWeight=r.agiWeight?r.agiWeight:0,this.chaWeight=r.chaWeight?r.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=r.difficulty?r.difficulty:1,this.territory=r.territory?r.territory:{money:1,respect:1,wanted:1}}}},function(t,e,n){"use strict";function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}));class r{constructor(t,e){a(this,"lvl",1),a(this,"n",1),this.n=t,this.lvl=e}}},function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return r}));const a=[];function r(t){if(!a.find(e=>e.pid===t.pid))for(a.unshift({filename:t.name,args:t.args,pid:t.pid,timestamp:new Date,runningScript:t.scriptRef});a.length>50;)a.pop()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(254),r=function(t,e,n=0){this.sourceCode=t,this.sourceCodeLineOffset=n,"string"==typeof t&&(t=a.a(t,r.PARSE_OPTIONS)),this.ast=t,this.initFunc_=e,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var i,o,s=/^step([A-Z]\w*)$/;for(var l in this)"function"==typeof this[l]&&(i=l.match(s))&&(this.stepFunctions_[i[1]]=this[l].bind(this));this.global=this.createScope(this.ast,null),this.ast=a.a(this.polyfills_.join("\n"),r.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new r.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=t,(o=new r.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack}; +!function(t){function e(e){for(var n,o,s=e[0],l=e[1],c=e[2],u=0,m=[];u{if(4===e.bitNodeN)return t;const a=e.sourceFileLvl(4);return a<=1?16*t:2===a?4*t:t}}const i={hacknet:{numNodes:0,purchaseNode:0,getPurchaseNodeCost:0,getNodeStats:0,upgradeLevel:0,upgradeRam:0,upgradeCore:0,upgradeCache:0,getLevelUpgradeCost:0,getRamUpgradeCost:0,getCoreUpgradeCost:0,getCacheUpgradeCost:0,numHashes:0,hashCost:0,spendHashes:0},sprintf:0,vsprintf:0,scan:n.ScriptScanRamCost,hack:n.ScriptHackRamCost,hackAnalyzeThreads:n.ScriptHackAnalyzeRamCost,hackAnalyze:n.ScriptHackAnalyzeRamCost,hackAnalyzeSecurity:n.ScriptHackAnalyzeRamCost,hackAnalyzeChance:n.ScriptHackAnalyzeRamCost,sleep:0,asleep:0,share:2.4,getSharePower:.2,grow:n.ScriptGrowRamCost,growthAnalyze:n.ScriptGrowthAnalyzeRamCost,growthAnalyzeSecurity:n.ScriptGrowthAnalyzeRamCost,weaken:n.ScriptWeakenRamCost,weakenAnalyze:n.ScriptWeakenAnalyzeRamCost,print:0,printf:0,tprint:0,clearLog:0,disableLog:0,enableLog:0,isLogEnabled:0,getScriptLogs:0,nuke:n.ScriptPortProgramRamCost,brutessh:n.ScriptPortProgramRamCost,ftpcrack:n.ScriptPortProgramRamCost,relaysmtp:n.ScriptPortProgramRamCost,httpworm:n.ScriptPortProgramRamCost,sqlinject:n.ScriptPortProgramRamCost,run:n.ScriptRunRamCost,exec:n.ScriptExecRamCost,spawn:n.ScriptSpawnRamCost,kill:n.ScriptKillRamCost,killall:n.ScriptKillRamCost,exit:0,atExit:0,scp:n.ScriptScpRamCost,ls:n.ScriptScanRamCost,ps:n.ScriptScanRamCost,hasRootAccess:n.ScriptHasRootAccessRamCost,getIp:n.ScriptGetHostnameRamCost,getHostname:n.ScriptGetHostnameRamCost,getHackingLevel:n.ScriptGetHackingLevelRamCost,getHackingMultipliers:n.ScriptGetMultipliersRamCost,getHacknetMultipliers:n.ScriptGetMultipliersRamCost,getBitNodeMultipliers:n.ScriptGetMultipliersRamCost,getServer:n.ScriptGetMultipliersRamCost/2,getServerMoneyAvailable:n.ScriptGetServerRamCost,getServerSecurityLevel:n.ScriptGetServerRamCost,getServerBaseSecurityLevel:n.ScriptGetServerRamCost,getServerMinSecurityLevel:n.ScriptGetServerRamCost,getServerRequiredHackingLevel:n.ScriptGetServerRamCost,getServerMaxMoney:n.ScriptGetServerRamCost,getServerGrowth:n.ScriptGetServerRamCost,getServerNumPortsRequired:n.ScriptGetServerRamCost,getServerRam:n.ScriptGetServerRamCost,getServerMaxRam:n.ScriptGetServerMaxRam,getServerUsedRam:n.ScriptGetServerUsedRam,serverExists:n.ScriptGetServerRamCost,fileExists:n.ScriptFileExistsRamCost,isRunning:n.ScriptIsRunningRamCost,stock:{getSymbols:n.ScriptGetStockRamCost,getPrice:n.ScriptGetStockRamCost,getAskPrice:n.ScriptGetStockRamCost,getBidPrice:n.ScriptGetStockRamCost,getPosition:n.ScriptGetStockRamCost,getMaxShares:n.ScriptGetStockRamCost,getPurchaseCost:n.ScriptGetStockRamCost,getSaleGain:n.ScriptGetStockRamCost,buy:n.ScriptBuySellStockRamCost,sell:n.ScriptBuySellStockRamCost,short:n.ScriptBuySellStockRamCost,sellShort:n.ScriptBuySellStockRamCost,placeOrder:n.ScriptBuySellStockRamCost,cancelOrder:n.ScriptBuySellStockRamCost,getOrders:n.ScriptBuySellStockRamCost,getVolatility:n.ScriptBuySellStockRamCost,getForecast:n.ScriptBuySellStockRamCost,purchase4SMarketData:n.ScriptBuySellStockRamCost,purchase4SMarketDataTixApi:n.ScriptBuySellStockRamCost,purchaseWseAccount:n.ScriptBuySellStockRamCost,purchaseTixApi:n.ScriptBuySellStockRamCost},getPurchasedServerLimit:n.ScriptGetPurchasedServerLimit,getPurchasedServerMaxRam:n.ScriptGetPurchasedServerMaxRam,getPurchasedServerCost:n.ScriptGetPurchaseServerRamCost,purchaseServer:n.ScriptPurchaseServerRamCost,deleteServer:n.ScriptPurchaseServerRamCost,getPurchasedServers:n.ScriptPurchaseServerRamCost,write:0,tryWritePort:0,read:0,peek:0,clear:0,writePort:0,readPort:0,getPortHandle:0,rm:n.ScriptReadWriteRamCost,scriptRunning:n.ScriptArbScriptRamCost,scriptKill:n.ScriptArbScriptRamCost,getScriptName:0,getScriptRam:n.ScriptGetScriptRamCost,getHackTime:n.ScriptGetHackTimeRamCost,getGrowTime:n.ScriptGetHackTimeRamCost,getWeakenTime:n.ScriptGetHackTimeRamCost,getScriptIncome:n.ScriptGetScriptRamCost,getScriptExpGain:n.ScriptGetScriptRamCost,getRunningScript:n.ScriptGetRunningScriptRamCost,nFormat:0,tFormat:0,getTimeSinceLastAug:n.ScriptGetHackTimeRamCost,prompt:0,wget:0,getFavorToDonate:n.ScriptGetFavorToDonate,getPlayer:n.ScriptSingularityFn1RamCost/4,mv:0,getOwnedSourceFiles:n.ScriptGetOwnedSourceFiles,tail:0,toast:0,universityCourse:r(n.ScriptSingularityFn1RamCost),gymWorkout:r(n.ScriptSingularityFn1RamCost),travelToCity:r(n.ScriptSingularityFn1RamCost),goToLocation:r(n.ScriptSingularityFn1RamCost),purchaseTor:r(n.ScriptSingularityFn1RamCost),purchaseProgram:r(n.ScriptSingularityFn1RamCost),getCurrentServer:r(n.ScriptSingularityFn1RamCost),connect:r(n.ScriptSingularityFn1RamCost),manualHack:r(n.ScriptSingularityFn1RamCost),installBackdoor:r(n.ScriptSingularityFn1RamCost),getDarkwebProgramCost:r(n.ScriptSingularityFn1RamCost/4),getDarkwebPrograms:r(n.ScriptSingularityFn1RamCost/4),getStats:r(n.ScriptSingularityFn1RamCost/4),getCharacterInformation:r(n.ScriptSingularityFn1RamCost/4),hospitalize:r(n.ScriptSingularityFn1RamCost/4),isBusy:r(n.ScriptSingularityFn1RamCost/4),stopAction:r(n.ScriptSingularityFn1RamCost/2),upgradeHomeRam:r(n.ScriptSingularityFn2RamCost),upgradeHomeCores:r(n.ScriptSingularityFn2RamCost),getUpgradeHomeRamCost:r(n.ScriptSingularityFn2RamCost/2),getUpgradeHomeCoresCost:r(n.ScriptSingularityFn2RamCost/2),workForCompany:r(n.ScriptSingularityFn2RamCost),applyToCompany:r(n.ScriptSingularityFn2RamCost),getCompanyRep:r(n.ScriptSingularityFn2RamCost/3),getCompanyFavor:r(n.ScriptSingularityFn2RamCost/3),getCompanyFavorGain:r(n.ScriptSingularityFn2RamCost/4),checkFactionInvitations:r(n.ScriptSingularityFn2RamCost),joinFaction:r(n.ScriptSingularityFn2RamCost),workForFaction:r(n.ScriptSingularityFn2RamCost),getFactionRep:r(n.ScriptSingularityFn2RamCost/3),getFactionFavor:r(n.ScriptSingularityFn2RamCost/3),getFactionFavorGain:r(n.ScriptSingularityFn2RamCost/4),donateToFaction:r(n.ScriptSingularityFn3RamCost),createProgram:r(n.ScriptSingularityFn3RamCost),commitCrime:r(n.ScriptSingularityFn3RamCost),getCrimeChance:r(n.ScriptSingularityFn3RamCost),getCrimeStats:r(n.ScriptSingularityFn3RamCost),getOwnedAugmentations:r(n.ScriptSingularityFn3RamCost),getAugmentationsFromFaction:r(n.ScriptSingularityFn3RamCost),getAugmentationCost:r(n.ScriptSingularityFn3RamCost),getAugmentationPrereq:r(n.ScriptSingularityFn3RamCost),getAugmentationPrice:r(n.ScriptSingularityFn3RamCost/2),getAugmentationRepReq:r(n.ScriptSingularityFn3RamCost/2),getAugmentationStats:r(n.ScriptSingularityFn3RamCost),purchaseAugmentation:r(n.ScriptSingularityFn3RamCost),softReset:r(n.ScriptSingularityFn3RamCost),installAugmentations:r(n.ScriptSingularityFn3RamCost),isFocused:r(.1),setFocus:r(.1),gang:{createGang:n.ScriptGangApiBaseRamCost/4,inGang:n.ScriptGangApiBaseRamCost/4,getMemberNames:n.ScriptGangApiBaseRamCost/4,getGangInformation:n.ScriptGangApiBaseRamCost/2,getOtherGangInformation:n.ScriptGangApiBaseRamCost/2,getMemberInformation:n.ScriptGangApiBaseRamCost/2,canRecruitMember:n.ScriptGangApiBaseRamCost/4,recruitMember:n.ScriptGangApiBaseRamCost/2,getTaskNames:n.ScriptGangApiBaseRamCost/4,getTaskStats:n.ScriptGangApiBaseRamCost/4,setMemberTask:n.ScriptGangApiBaseRamCost/2,getEquipmentNames:n.ScriptGangApiBaseRamCost/4,getEquipmentCost:n.ScriptGangApiBaseRamCost/2,getEquipmentType:n.ScriptGangApiBaseRamCost/2,getEquipmentStats:n.ScriptGangApiBaseRamCost/2,purchaseEquipment:n.ScriptGangApiBaseRamCost,ascendMember:n.ScriptGangApiBaseRamCost,getAscensionResult:n.ScriptGangApiBaseRamCost/2,setTerritoryWarfare:n.ScriptGangApiBaseRamCost/2,getChanceToWinClash:n.ScriptGangApiBaseRamCost,getBonusTime:0},bladeburner:{getContractNames:n.ScriptBladeburnerApiBaseRamCost/10,getOperationNames:n.ScriptBladeburnerApiBaseRamCost/10,getBlackOpNames:n.ScriptBladeburnerApiBaseRamCost/10,getBlackOpRank:n.ScriptBladeburnerApiBaseRamCost/2,getGeneralActionNames:n.ScriptBladeburnerApiBaseRamCost/10,getSkillNames:n.ScriptBladeburnerApiBaseRamCost/10,startAction:n.ScriptBladeburnerApiBaseRamCost,stopBladeburnerAction:n.ScriptBladeburnerApiBaseRamCost/2,getCurrentAction:n.ScriptBladeburnerApiBaseRamCost/4,getActionTime:n.ScriptBladeburnerApiBaseRamCost,getActionEstimatedSuccessChance:n.ScriptBladeburnerApiBaseRamCost,getActionRepGain:n.ScriptBladeburnerApiBaseRamCost,getActionCountRemaining:n.ScriptBladeburnerApiBaseRamCost,getActionMaxLevel:n.ScriptBladeburnerApiBaseRamCost,getActionCurrentLevel:n.ScriptBladeburnerApiBaseRamCost,getActionAutolevel:n.ScriptBladeburnerApiBaseRamCost,setActionAutolevel:n.ScriptBladeburnerApiBaseRamCost,setActionLevel:n.ScriptBladeburnerApiBaseRamCost,getRank:n.ScriptBladeburnerApiBaseRamCost,getSkillPoints:n.ScriptBladeburnerApiBaseRamCost,getSkillLevel:n.ScriptBladeburnerApiBaseRamCost,getSkillUpgradeCost:n.ScriptBladeburnerApiBaseRamCost,upgradeSkill:n.ScriptBladeburnerApiBaseRamCost,getTeamSize:n.ScriptBladeburnerApiBaseRamCost,setTeamSize:n.ScriptBladeburnerApiBaseRamCost,getCityEstimatedPopulation:n.ScriptBladeburnerApiBaseRamCost,getCityCommunities:n.ScriptBladeburnerApiBaseRamCost,getCityChaos:n.ScriptBladeburnerApiBaseRamCost,getCity:n.ScriptBladeburnerApiBaseRamCost,switchCity:n.ScriptBladeburnerApiBaseRamCost,getStamina:n.ScriptBladeburnerApiBaseRamCost,joinBladeburnerFaction:n.ScriptBladeburnerApiBaseRamCost,joinBladeburnerDivision:n.ScriptBladeburnerApiBaseRamCost,getBonusTime:0},codingcontract:{attempt:n.ScriptCodingContractBaseRamCost,getContractType:n.ScriptCodingContractBaseRamCost/2,getData:n.ScriptCodingContractBaseRamCost/2,getDescription:n.ScriptCodingContractBaseRamCost/2,getNumTriesRemaining:n.ScriptCodingContractBaseRamCost/5},sleeve:{getNumSleeves:n.ScriptSleeveBaseRamCost,setToShockRecovery:n.ScriptSleeveBaseRamCost,setToSynchronize:n.ScriptSleeveBaseRamCost,setToCommitCrime:n.ScriptSleeveBaseRamCost,setToUniversityCourse:n.ScriptSleeveBaseRamCost,travel:n.ScriptSleeveBaseRamCost,setToCompanyWork:n.ScriptSleeveBaseRamCost,setToFactionWork:n.ScriptSleeveBaseRamCost,setToGymWorkout:n.ScriptSleeveBaseRamCost,getSleeveStats:n.ScriptSleeveBaseRamCost,getTask:n.ScriptSleeveBaseRamCost,getInformation:n.ScriptSleeveBaseRamCost,getSleeveAugmentations:n.ScriptSleeveBaseRamCost,getSleevePurchasableAugs:n.ScriptSleeveBaseRamCost,purchaseSleeveAug:n.ScriptSleeveBaseRamCost},stanek:{giftWidth:n.ScriptStanekWidth,giftHeight:n.ScriptStanekHeight,chargeFragment:n.ScriptStanekCharge,fragmentDefinitions:n.ScriptStanekFragmentDefinitions,activeFragments:n.ScriptStanekPlacedFragments,clearGift:n.ScriptStanekClear,canPlaceFragment:n.ScriptStanekCanPlace,placeFragment:n.ScriptStanekPlace,getFragment:n.ScriptStanekFragmentAt,removeFragment:n.ScriptStanekDeleteAt},ui:{getTheme:0,setTheme:0,resetTheme:0,getStyles:0,setStyles:0,resetStyles:0,getGameInfo:0},grafting:{getAugmentationGraftPrice:3.75,getAugmentationGraftTime:3.75,graftAugmentation:7.5},heart:{break:0}};function o(t,...e){if(0===e.length)return console.warn("No arguments passed to getRamCost()"),0;let a=i[e[0]];for(let t=1;tObject(o.a)({unbuyable:{color:t.palette.action.disabled},money:{color:t.colors.money}}));function l(t){const e=s();if(void 0!==t.player){if("number"!=typeof t.money)throw new Error("if player if provided, money should be number, contact dev");if(!t.player.canAfford(t.money))return n.createElement("span",{className:e.unbuyable},r.a.formatMoney(t.money))}return n.createElement("span",{className:e.money},"number"==typeof t.money?r.a.formatMoney(t.money):t.money)}},,,,function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"f",(function(){return i})),a.d(e,"a",(function(){return o})),a.d(e,"d",(function(){return s})),a.d(e,"e",(function(){return l})),a.d(e,"c",(function(){return c}));var n=a(147);function r(t,e=!1){t=Math.floor(t);const a=Math.floor(t/1e3),n=Math.floor(a/86400),r=a%86400,i=Math.floor(r/3600),o=r%3600,s=Math.floor(o/60),l=o%60,c=(()=>{let e=""+t%1e3;for(;e.length<3;)e="0"+e;return e})();let f="";return n>0&&(f+=n+" days "),i>0&&(f+=i+" hours "),s>0&&(f+=s+" minutes "),f+=(e?`${l}.${c}`:""+l)+" seconds",f}function i(t){if(!o(t))return"";if(0===t.length)return"";const e=t.concat().sort(),a=e[0],n=e[e.length-1],r=a.length;let i=0;for(;i>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),(4294967296*(2097151&n)+(a>>>0)).toString(16)}},function(t,e,a){"use strict";a.d(e,"c",(function(){return r})),a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return o}));var n=a(378);function r(t,e){if(null==e)return null;if("object"==typeof e&&"string"==typeof e.ctor&&void 0!==e.data){if("AllServersMap"===e.ctor)return console.warn("Converting AllServersMap for v0.43.1"),e.data;const t=r.constructors[e.ctor];if("function"==typeof t&&"function"==typeof t.fromJSON){const a=t.fromJSON(e);return void 0!==t.validationData&&Object(n.b)(a,t.validationData),a}}return e}function i(t,e,a){a||(a=Object.keys(e));const n={};for(let t=0;t{switch(typeof t){case"number":return t;case"object":return Object(o.a)(t.min,t.max);default:throw Error(`Do not know how to convert the type '${typeof t}' to a number`)}};for(const t of r.a){const r={hostname:t.hostname,ip:g(),numOpenPortsRequired:t.numOpenPortsRequired,organizationName:t.organizationName};void 0!==t.maxRamExponent&&(r.maxRam=Math.pow(2,i(t.maxRamExponent)));for(const e of a)void 0!==t[e]&&(r[e]=i(t[e]));const o=new n.a(r);for(const e of t.literature||[])o.messages.push(e);o.hostname===c.a.WorldDaemon&&(o.requiredHackingSkill*=f.a.WorldDaemonDifficulty),y(o),void 0!==t.networkLayer&&e[i(t.networkLayer)-1].push(o)}const s=(t,e)=>{for(const r of t)a=r,n=e(),a.serversOnNetwork.push(n.hostname),n.serversOnNetwork.push(a.hostname);var a,n};s(e[0],()=>t);for(let t=1;t{return(a=e[t-1])[Math.floor(Math.random()*a.length)];var a})}function E(){for(const t of Object.keys(u))delete u[t];u={}}function v(t){u=JSON.parse(t,s.c)}function k(t=!1){const e=JSON.parse(JSON.stringify(u),s.c);for(const a of Object.keys(e)){const n=e[a];if(t)n.runningScripts=[];else for(let t=0;tObject(n.useContext)(i.Player),Router:()=>Object(n.useContext)(i.Router)}},,function(t,e,a){"use strict";a.d(e,"j",(function(){return n})),a.d(e,"d",(function(){return r})),a.d(e,"i",(function(){return i})),a.d(e,"f",(function(){return o})),a.d(e,"b",(function(){return s})),a.d(e,"h",(function(){return l})),a.d(e,"a",(function(){return c})),a.d(e,"e",(function(){return f})),a.d(e,"k",(function(){return u})),a.d(e,"c",(function(){return m})),a.d(e,"g",(function(){return h}));const n=["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"],r=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],i=["Security Engineer"],o=["Network Engineer","Network Administrator"],s=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],l=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],c=["Field Agent","Secret Agent","Special Operative"],f=["Waiter","Employee"],u=["Software Consultant","Senior Software Consultant"],m=["Business Consultant","Senior Business Consultant"],h=["Part-time Waiter","Part-time Employee"]},,,,function(t,e,a){"use strict";function n(t,e){const a=Math.min(t,e),n=Math.max(t,e);return Math.floor(Math.random()*(n-a+1))+a}a.d(e,"a",(function(){return n}))},,function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(17);const r=["START","PURCHASE","PRODUCTION","SALE","EXPORT"],i={INITIALSHARES:1e9,SHARESPERPRICEUPDATE:1e6,IssueNewSharesCooldown:216e3,SellSharesCooldown:18e3,CyclesPerMarketCycle:50,CyclesPerIndustryStateCycle:50/r.length,SecsPerMarketCycle:10,Cities:[n.a.Aevum,n.a.Chongqing,n.a.Sector12,n.a.NewTokyo,n.a.Ishima,n.a.Volhaven],WarehouseInitialCost:5e9,WarehouseInitialSize:100,WarehouseUpgradeBaseCost:1e9,OfficeInitialCost:4e9,OfficeInitialSize:3,OfficeUpgradeBaseCost:1e9,BribeThreshold:1e14,BribeToRepRatio:1e9,ProductProductionCostRatio:5,DividendMaxPercentage:1,EmployeeSalaryMultiplier:3,CyclesPerEmployeeRaise:400,EmployeeRaiseAmount:50,BaseMaxProducts:3,AllCorporationStates:r,AllMaterials:["Water","Energy","Food","Plants","Metal","Hardware","Chemicals","Drugs","Robots","AI Cores","Real Estate"],FundingRoundShares:[.1,.35,.25,.2],FundingRoundMultiplier:[4,3,3,2.5]}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n})),a.d(e,"c",(function(){return r})),a.d(e,"b",(function(){return i}));const n={MoneyGainPerLevel:1.5,BaseCost:1e3,LevelBaseCost:1,RamBaseCost:3e4,CoreBaseCost:5e5,PurchaseNextMult:1.85,UpgradeLevelMult:1.04,UpgradeRamMult:1.28,UpgradeCoreMult:1.48,MaxLevel:200,MaxRam:64,MaxCores:16},r={x1:1,x5:5,x10:10,MAX:"MAX"},i={HashesPerLevel:.001,BaseCost:5e4,RamBaseCost:2e5,CoreBaseCost:1e6,CacheBaseCost:1e7,PurchaseMult:3.2,UpgradeLevelMult:1.1,UpgradeRamMult:1.4,UpgradeCoreMult:1.55,UpgradeCacheMult:1.85,MaxServers:20,MaxLevel:300,MaxRam:8192,MaxCores:128,MaxCache:15}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a(6),i=a(29),o=a(4),s=a(20),l=a(25);function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class f{constructor(t={info:"",moneyCost:0,name:"",repCost:0,factions:[]}){c(this,"baseCost",0),c(this,"baseRepRequirement",0),c(this,"isSpecial",!1),c(this,"level",0),c(this,"name",""),c(this,"owned",!1),c(this,"prereqs",[]),c(this,"mults",{}),c(this,"startingCost",0),c(this,"factions",[]),this.name=t.name,this.info=t.info,this.prereqs=t.prereqs?t.prereqs:[],this.baseRepRequirement=t.repCost*r.a.AugmentationRepCost,this.baseCost=t.moneyCost*r.a.AugmentationMoneyCost,this.startingCost=this.baseCost,this.factions=t.factions,t.isSpecial&&(this.isSpecial=!0),this.level=0,t.hacking_mult&&(this.mults.hacking_mult=t.hacking_mult),t.strength_mult&&(this.mults.strength_mult=t.strength_mult),t.defense_mult&&(this.mults.defense_mult=t.defense_mult),t.dexterity_mult&&(this.mults.dexterity_mult=t.dexterity_mult),t.agility_mult&&(this.mults.agility_mult=t.agility_mult),t.charisma_mult&&(this.mults.charisma_mult=t.charisma_mult),t.hacking_exp_mult&&(this.mults.hacking_exp_mult=t.hacking_exp_mult),t.strength_exp_mult&&(this.mults.strength_exp_mult=t.strength_exp_mult),t.defense_exp_mult&&(this.mults.defense_exp_mult=t.defense_exp_mult),t.dexterity_exp_mult&&(this.mults.dexterity_exp_mult=t.dexterity_exp_mult),t.agility_exp_mult&&(this.mults.agility_exp_mult=t.agility_exp_mult),t.charisma_exp_mult&&(this.mults.charisma_exp_mult=t.charisma_exp_mult),t.hacking_chance_mult&&(this.mults.hacking_chance_mult=t.hacking_chance_mult),t.hacking_speed_mult&&(this.mults.hacking_speed_mult=t.hacking_speed_mult),t.hacking_money_mult&&(this.mults.hacking_money_mult=t.hacking_money_mult),t.hacking_grow_mult&&(this.mults.hacking_grow_mult=t.hacking_grow_mult),t.company_rep_mult&&(this.mults.company_rep_mult=t.company_rep_mult),t.faction_rep_mult&&(this.mults.faction_rep_mult=t.faction_rep_mult),t.crime_money_mult&&(this.mults.crime_money_mult=t.crime_money_mult),t.crime_success_mult&&(this.mults.crime_success_mult=t.crime_success_mult),t.work_money_mult&&(this.mults.work_money_mult=t.work_money_mult),t.hacknet_node_money_mult&&(this.mults.hacknet_node_money_mult=t.hacknet_node_money_mult),t.hacknet_node_purchase_cost_mult&&(this.mults.hacknet_node_purchase_cost_mult=t.hacknet_node_purchase_cost_mult),t.hacknet_node_ram_cost_mult&&(this.mults.hacknet_node_ram_cost_mult=t.hacknet_node_ram_cost_mult),t.hacknet_node_core_cost_mult&&(this.mults.hacknet_node_core_cost_mult=t.hacknet_node_core_cost_mult),t.hacknet_node_level_cost_mult&&(this.mults.hacknet_node_level_cost_mult=t.hacknet_node_level_cost_mult),t.bladeburner_max_stamina_mult&&(this.mults.bladeburner_max_stamina_mult=t.bladeburner_max_stamina_mult),t.bladeburner_stamina_gain_mult&&(this.mults.bladeburner_stamina_gain_mult=t.bladeburner_stamina_gain_mult),t.bladeburner_analysis_mult&&(this.mults.bladeburner_analysis_mult=t.bladeburner_analysis_mult),t.bladeburner_success_chance_mult&&(this.mults.bladeburner_success_chance_mult=t.bladeburner_success_chance_mult),void 0===t.stats?this.stats=function(t,e,a){const r=(t,e=0)=>t===1.0777-1?"7.77%":t===1.777-1?"77.7%":o.a.formatPercentage(t,e);let i=n.createElement(n.Fragment,null,"Effects:");return t.hacking_mult&&t.hacking_mult==t.strength_mult&&t.hacking_mult==t.defense_mult&&t.hacking_mult==t.dexterity_mult&&t.hacking_mult==t.agility_mult&&t.hacking_mult==t.charisma_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_mult-1)," all skills"):(t.hacking_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_mult-1)," hacking skill")),t.strength_mult&&t.strength_mult==t.defense_mult&&t.strength_mult==t.dexterity_mult&&t.strength_mult==t.agility_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.strength_mult-1)," combat skills"):(t.strength_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.strength_mult-1)," strength skill")),t.defense_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.defense_mult-1)," defense skill")),t.dexterity_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.dexterity_mult-1)," dexterity skill")),t.agility_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.agility_mult-1)," agility skill"))),t.charisma_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.charisma_mult-1)," Charisma skill"))),t.hacking_exp_mult&&t.hacking_exp_mult===t.strength_exp_mult&&t.hacking_exp_mult===t.defense_exp_mult&&t.hacking_exp_mult===t.dexterity_exp_mult&&t.hacking_exp_mult===t.agility_exp_mult&&t.hacking_exp_mult===t.charisma_exp_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_exp_mult-1)," exp for all skills"):(t.hacking_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_exp_mult-1)," hacking exp")),t.strength_exp_mult&&t.strength_exp_mult===t.defense_exp_mult&&t.strength_exp_mult===t.dexterity_exp_mult&&t.strength_exp_mult===t.agility_exp_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.strength_exp_mult-1)," combat exp"):(t.strength_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.strength_exp_mult-1)," strength exp")),t.defense_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.defense_exp_mult-1)," defense exp")),t.dexterity_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.dexterity_exp_mult-1)," dexterity exp")),t.agility_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.agility_exp_mult-1)," agility exp"))),t.charisma_exp_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.charisma_exp_mult-1)," charisma exp"))),t.hacking_speed_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_speed_mult-1)," faster hack(), grow(), and weaken()")),t.hacking_chance_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_chance_mult-1)," hack() success chance")),t.hacking_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_money_mult-1)," hack() power")),t.hacking_grow_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacking_grow_mult-1)," grow() power")),t.faction_rep_mult&&t.faction_rep_mult===t.company_rep_mult?i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.faction_rep_mult-1)," reputation from factions and companies"):(t.faction_rep_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.faction_rep_mult-1)," reputation from factions")),t.company_rep_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.company_rep_mult-1)," reputation from companies"))),t.crime_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.crime_money_mult-1)," crime money")),t.crime_success_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.crime_success_mult-1)," crime success rate")),t.work_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.work_money_mult-1)," work money")),t.hacknet_node_money_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.hacknet_node_money_mult-1)," hacknet production")),t.hacknet_node_purchase_cost_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"-",r(-(t.hacknet_node_purchase_cost_mult-1))," hacknet nodes cost")),t.hacknet_node_level_cost_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"-",r(-(t.hacknet_node_level_cost_mult-1))," hacknet nodes upgrade cost")),t.bladeburner_max_stamina_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.bladeburner_max_stamina_mult-1)," Bladeburner Max Stamina")),t.bladeburner_stamina_gain_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.bladeburner_stamina_gain_mult-1)," Bladeburner Stamina gain")),t.bladeburner_analysis_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.bladeburner_analysis_mult-1)," Bladeburner Field Analysis effectiveness")),t.bladeburner_success_chance_mult&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"+",r(t.bladeburner_success_chance_mult-1)," Bladeburner Contracts and Operations success chance")),a&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"Start with ",n.createElement(s.a,{money:a})," after installing Augmentations.")),e&&(i=n.createElement(n.Fragment,null,i,n.createElement("br",null),"Start with ",e.join(" and ")," after installing Augmentations.")),i}(this.mults,t.programs,t.startingMoney):this.stats=t.stats}addToFactions(t){for(let e=0;eObject(o.a)({modal:{display:"flex",alignItems:"center",justifyContent:"center"},paper:{backgroundColor:t.palette.background.default,border:"2px solid "+t.palette.primary.main,boxShadow:`0px 3px 5px -1px ${t.palette.primary.dark},0px 5px 8px 0px ${t.palette.primary.dark},0px 1px 14px 0px ${t.palette.primary.dark}`,padding:2,maxWidth:"80%",maxHeight:"80%",overflow:"auto","&::-webkit-scrollbar":{display:"none"},scrollbarWidth:"none"}})),u=t=>{const e=f();return r.a.createElement(s.a,{disableRestoreFocus:!0,disableScrollLock:!0,disableEnforceFocus:!0,disableAutoFocus:!0,open:t.open,onClose:t.onClose,closeAfterTransition:!0,className:e.modal},r.a.createElement(l.a,{in:t.open},r.a.createElement("div",{className:e.paper},r.a.createElement(c.a,{sx:{m:2}},t.children))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7,Diplomacy:8,"Hyperbolic Regeneration Chamber":9,"Incite Violence":10}},function(t,e,a){"use strict";a.d(e,"b",(function(){return f})),a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(31),o=a(179),s=a(113);function l(){return(l=Object.assign||function(t){for(var e=1;er.a.createElement(i.a,l({},t,{classes:{root:c().root,...t.classes}})),u=t=>r.a.createElement(o.a,l({},t,{classes:{root:c().small,...t.classes}}))},function(t,e,a){"use strict";a.d(e,"f",(function(){return n})),a.d(e,"b",(function(){return u})),a.d(e,"e",(function(){return l})),a.d(e,"c",(function(){return c})),a.d(e,"a",(function(){return s})),a.d(e,"d",(function(){return f}));var n,r=a(2),i=a(63),o=a(374);!function(t){t[t.Start=0]="Start",t[t.GoToCharacterPage=1]="GoToCharacterPage",t[t.CharacterPage=2]="CharacterPage",t[t.CharacterGoToTerminalPage=3]="CharacterGoToTerminalPage",t[t.TerminalIntro=4]="TerminalIntro",t[t.TerminalHelp=5]="TerminalHelp",t[t.TerminalLs=6]="TerminalLs",t[t.TerminalScan=7]="TerminalScan",t[t.TerminalScanAnalyze1=8]="TerminalScanAnalyze1",t[t.TerminalScanAnalyze2=9]="TerminalScanAnalyze2",t[t.TerminalConnect=10]="TerminalConnect",t[t.TerminalAnalyze=11]="TerminalAnalyze",t[t.TerminalNuke=12]="TerminalNuke",t[t.TerminalManualHack=13]="TerminalManualHack",t[t.TerminalHackingMechanics=14]="TerminalHackingMechanics",t[t.TerminalGoHome=15]="TerminalGoHome",t[t.TerminalCreateScript=16]="TerminalCreateScript",t[t.TerminalTypeScript=17]="TerminalTypeScript",t[t.TerminalFree=18]="TerminalFree",t[t.TerminalRunScript=19]="TerminalRunScript",t[t.TerminalGoToActiveScriptsPage=20]="TerminalGoToActiveScriptsPage",t[t.ActiveScriptsPage=21]="ActiveScriptsPage",t[t.ActiveScriptsToTerminal=22]="ActiveScriptsToTerminal",t[t.TerminalTailScript=23]="TerminalTailScript",t[t.GoToHacknetNodesPage=24]="GoToHacknetNodesPage",t[t.HacknetNodesIntroduction=25]="HacknetNodesIntroduction",t[t.HacknetNodesGoToWorldPage=26]="HacknetNodesGoToWorldPage",t[t.WorldDescription=27]="WorldDescription",t[t.TutorialPageInfo=28]="TutorialPageInfo",t[t.End=29]="End"}(n||(n={}));const s={currStep:n.Start,isRunning:!1,stepIsDone:{[n.Start]:!1,[n.GoToCharacterPage]:!1,[n.CharacterPage]:!1,[n.CharacterGoToTerminalPage]:!1,[n.TerminalIntro]:!1,[n.TerminalHelp]:!1,[n.TerminalLs]:!1,[n.TerminalScan]:!1,[n.TerminalScanAnalyze1]:!1,[n.TerminalScanAnalyze2]:!1,[n.TerminalConnect]:!1,[n.TerminalAnalyze]:!1,[n.TerminalNuke]:!1,[n.TerminalManualHack]:!1,[n.TerminalHackingMechanics]:!1,[n.TerminalGoHome]:!1,[n.TerminalCreateScript]:!1,[n.TerminalTypeScript]:!1,[n.TerminalFree]:!1,[n.TerminalRunScript]:!1,[n.TerminalGoToActiveScriptsPage]:!1,[n.ActiveScriptsPage]:!1,[n.ActiveScriptsToTerminal]:!1,[n.TerminalTailScript]:!1,[n.GoToHacknetNodesPage]:!1,[n.HacknetNodesIntroduction]:!1,[n.HacknetNodesGoToWorldPage]:!1,[n.WorldDescription]:!1,[n.TutorialPageInfo]:!1,[n.End]:!1}};function l(){s.isRunning=!0,s.currStep=n.Start}function c(){s.stepIsDone[s.currStep]=!0,s.currStepn.Start&&(s.currStep-=1),o.a.emit()}function u(){s.isRunning=!1,s.currStep=n.Start,r.a.getHomeComputer().messages.push(i.a.HackersStartingHandbook),o.a.emit()}},,function(t,e,a){"use strict";a.d(e,"gb",(function(){return tt})),a.d(e,"jb",(function(){return et})),a.d(e,"kb",(function(){return at})),a.d(e,"sb",(function(){return nt})),a.d(e,"o",(function(){return rt})),a.d(e,"p",(function(){return it})),a.d(e,"Rb",(function(){return ot})),a.d(e,"vb",(function(){return st})),a.d(e,"eb",(function(){return lt})),a.d(e,"yb",(function(){return ct})),a.d(e,"M",(function(){return ft})),a.d(e,"ib",(function(){return ut})),a.d(e,"s",(function(){return mt})),a.d(e,"tb",(function(){return ht})),a.d(e,"K",(function(){return dt})),a.d(e,"N",(function(){return pt})),a.d(e,"I",(function(){return gt})),a.d(e,"J",(function(){return yt})),a.d(e,"F",(function(){return bt})),a.d(e,"G",(function(){return Et})),a.d(e,"L",(function(){return vt})),a.d(e,"nb",(function(){return kt})),a.d(e,"wb",(function(){return _t})),a.d(e,"mb",(function(){return wt})),a.d(e,"Lb",(function(){return St})),a.d(e,"lb",(function(){return Ct})),a.d(e,"t",(function(){return xt})),a.d(e,"Sb",(function(){return Lt})),a.d(e,"D",(function(){return Ot})),a.d(e,"Mb",(function(){return Mt})),a.d(e,"Ub",(function(){return Tt})),a.d(e,"E",(function(){return At})),a.d(e,"Jb",(function(){return Rt})),a.d(e,"Nb",(function(){return Nt})),a.d(e,"Ib",(function(){return Pt})),a.d(e,"Gb",(function(){return It})),a.d(e,"Fb",(function(){return Ft})),a.d(e,"Hb",(function(){return Dt})),a.d(e,"Tb",(function(){return jt})),a.d(e,"B",(function(){return Bt})),a.d(e,"X",(function(){return Gt})),a.d(e,"W",(function(){return Wt})),a.d(e,"Z",(function(){return Ht})),a.d(e,"U",(function(){return Ut})),a.d(e,"V",(function(){return qt})),a.d(e,"S",(function(){return $t})),a.d(e,"T",(function(){return Kt})),a.d(e,"Y",(function(){return zt})),a.d(e,"Db",(function(){return Vt})),a.d(e,"x",(function(){return Yt})),a.d(e,"z",(function(){return Jt})),a.d(e,"Kb",(function(){return Xt})),a.d(e,"w",(function(){return Qt})),a.d(e,"C",(function(){return Zt})),a.d(e,"Cb",(function(){return te})),a.d(e,"Ob",(function(){return ee})),a.d(e,"y",(function(){return ae})),a.d(e,"Eb",(function(){return ne})),a.d(e,"v",(function(){return re})),a.d(e,"A",(function(){return ie})),a.d(e,"Ab",(function(){return oe})),a.d(e,"Pb",(function(){return se})),a.d(e,"ub",(function(){return le})),a.d(e,"fb",(function(){return ce})),a.d(e,"f",(function(){return fe})),a.d(e,"R",(function(){return ue})),a.d(e,"pb",(function(){return me})),a.d(e,"db",(function(){return he})),a.d(e,"m",(function(){return de})),a.d(e,"l",(function(){return pe})),a.d(e,"e",(function(){return ge})),a.d(e,"j",(function(){return ye})),a.d(e,"g",(function(){return be})),a.d(e,"c",(function(){return Ee})),a.d(e,"b",(function(){return ve})),a.d(e,"k",(function(){return ke})),a.d(e,"a",(function(){return _e})),a.d(e,"d",(function(){return we})),a.d(e,"h",(function(){return Se})),a.d(e,"n",(function(){return Ce})),a.d(e,"i",(function(){return xe})),a.d(e,"hb",(function(){return Le})),a.d(e,"qb",(function(){return Oe})),a.d(e,"rb",(function(){return Me})),a.d(e,"u",(function(){return Te})),a.d(e,"xb",(function(){return Ae})),a.d(e,"ob",(function(){return Re})),a.d(e,"H",(function(){return Ne})),a.d(e,"Qb",(function(){return Pe})),a.d(e,"cb",(function(){return Ie})),a.d(e,"r",(function(){return Fe})),a.d(e,"bb",(function(){return De})),a.d(e,"ab",(function(){return je})),a.d(e,"P",(function(){return Be})),a.d(e,"O",(function(){return Ge})),a.d(e,"Q",(function(){return We})),a.d(e,"zb",(function(){return He})),a.d(e,"q",(function(){return Ue})),a.d(e,"Bb",(function(){return qe}));var n=a(57),r=a(141),i=a(361),o=a(15),s=a(6),l=a(111),c=a(237),f=a(66),u=a(667),m=a(518),h=a(94),d=a(32),p=a(8),g=a(64),y=a(375),b=a(85),E=a(204),v=a(29),k=a(80),_=a(149),w=a(218),S=a(17),C=a(11),x=a(322),L=a(176),O=a(280),M=a(244),T=a(26),A=a(47),R=a(132),N=a(102),P=a(1394),I=a(1395),F=a(363),D=a(82),j=a(514),B=a(399),G=a(91),W=a(4),H=a(379),U=a(16),q=a(24),$=a(116),K=a(20),z=a(0),V=a.n(z),Y=a(360),J=a(140),X=a(778),Q=a(295),Z=a(5);function tt(){const t=Object(R.f)({adminRights:!0,hostname:"home",ip:Object(T.e)(),isConnectedTo:!0,maxRam:8,organizationName:"Home PC",purchasedByPlayer:!0});this.currentServer=N.a.Home,Object(T.a)(t),this.getHomeComputer().programs.push(g.a.NukeProgram.name)}function et(){this.currentServer=N.a.Home,this.numPeopleKilled=0,this.hacking=1,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.money=1e3,this.city=S.a.Sector12,this.location=C.a.TravelAgency,this.companyName="",this.jobs={},this.purchasedServers=[],this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[];const t=Math.min(3,D.a[10]+(10===this.bitNodeN?1:0))+this.sleevesFromCovenant;this.sleeves.length>t&&(this.sleeves.length=t);for(let e=this.sleeves.length;e=100?this.sleeves[t].synchronize(this):this.sleeves[t].shockRecovery(this));this.isWorking=!1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",this.crimeType="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.lastUpdate=(new Date).getTime(),this.playtimeSinceLastAug=0,this.scriptProdSinceLastAug=0,this.moneySourceA.reset(),this.hacknetNodes.length=0,this.hashManager.prestige(),this.reapplyAllAugmentations(!0),this.hp=this.max_hp}function at(){this.entropy=0,this.prestigeAugmentation(),this.karma=0;for(let t=0;t0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;const t=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*t)}function st(){this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.work_money_mult=1,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1}function lt(t){const e=this.getHomeComputer();if(null==e)return!1;for(let a=0;a=t}function ht(t,e){this.moneySourceA instanceof H.a||(console.warn("Player.moneySourceA was not properly initialized. Resetting"),this.moneySourceA=new H.a),this.moneySourceB instanceof H.a||(console.warn("Player.moneySourceB was not properly initialized. Resetting"),this.moneySourceB=new H.a),this.moneySourceA.record(t,e),this.moneySourceB.record(t,e)}function dt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainHackingExp()"):(this.hacking_exp+=t,this.hacking_exp<0&&(this.hacking_exp=0),this.hacking=Object(L.b)(this.hacking_exp,this.hacking_mult*s.a.HackingLevelMultiplier))}function pt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainStrengthExp()"):(this.strength_exp+=t,this.strength_exp<0&&(this.strength_exp=0),this.strength=Object(L.b)(this.strength_exp,this.strength_mult*s.a.StrengthLevelMultiplier))}function gt(t){if(isNaN(t))return void console.error("ERR: NaN passed into player.gainDefenseExp()");this.defense_exp+=t,this.defense_exp<0&&(this.defense_exp=0),this.defense=Object(L.b)(this.defense_exp,this.defense_mult*s.a.DefenseLevelMultiplier);const e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*e)}function yt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainDexterityExp()"):(this.dexterity_exp+=t,this.dexterity_exp<0&&(this.dexterity_exp=0),this.dexterity=Object(L.b)(this.dexterity_exp,this.dexterity_mult*s.a.DexterityLevelMultiplier))}function bt(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainAgilityExp()"):(this.agility_exp+=t,this.agility_exp<0&&(this.agility_exp=0),this.agility=Object(L.b)(this.agility_exp,this.agility_mult*s.a.AgilityLevelMultiplier))}function Et(t){isNaN(t)?console.error("ERR: NaN passed into Player.gainCharismaExp()"):(this.charisma_exp+=t,this.charisma_exp<0&&(this.charisma_exp=0),this.charisma=Object(L.b)(this.charisma_exp,this.charisma_mult*s.a.CharismaLevelMultiplier))}function vt(t){isNaN(t)?console.error("ERROR: NaN passed into Player.gainIntelligenceExp()"):(D.a[5]>0||this.intelligence>0)&&(this.intelligence_exp+=t,this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)))}function kt(t){const e=t.toLowerCase();return e.includes("hack")?this.hacking:e.includes("str")?this.strength:e.includes("def")?this.defense:e.includes("dex")?this.dexterity:e.includes("agi")?this.agility:e.includes("cha")?this.charisma:e.includes("int")?this.intelligence:0}function _t(t,e,a){this.workType!==p.a.WorkTypeFaction&&t===this.workType&&e===this.companyName||t===this.workType&&e===this.currentWorkFactionName&&a===this.factionWorkType||(this.isWorking&&this.singularityStopWork(),this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeWorkedGraftAugmentation=0,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.graftAugmentationName="",this.className="",this.workType="")}function wt(t=1){let e=1;this.hasAugmentation(o.a.NeuroreceptorManager)||(e=this.focus?1:p.a.BaseFocusBonus);const a=e*this.workHackExpGainRate*t,n=e*this.workStrExpGainRate*t,r=e*this.workDefExpGainRate*t,i=e*this.workDexExpGainRate*t,s=e*this.workAgiExpGainRate*t,l=e*this.workChaExpGainRate*t,c=(this.workMoneyGainRate-this.workMoneyLossRate)*t;this.gainHackingExp(a),this.gainStrengthExp(n),this.gainDefenseExp(r),this.gainDexterityExp(i),this.gainAgilityExp(s),this.gainCharismaExp(l),this.gainMoney(c,this.className?"class":"work"),this.workHackExpGained+=a,this.workStrExpGained+=n,this.workDefExpGained+=r,this.workDexExpGained+=i,this.workAgiExpGained+=s,this.workChaExpGained+=l,this.workRepGained+=e*this.workRepGainRate*t,this.workMoneyGained+=e*this.workMoneyGainRate*t,this.workMoneyGained-=e*this.workMoneyLossRate*t}function St(t){this.resetWorkStatus(p.a.WorkTypeCompany,t),this.isWorking=!0,this.companyName=t,this.workType=p.a.WorkTypeCompany,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=p.a.MillisecondsPer8Hours}function Ct(t,e=1){this.isWorking&&(this.workType==p.a.WorkTypeFaction?this.workForFaction(e)&&t.toFaction(v.a[this.currentWorkFactionName]):this.workType==p.a.WorkTypeCreateProgram?this.createProgramWork(e)&&t.toTerminal():this.workType==p.a.WorkTypeStudyClass?this.takeClass(e)&&t.toCity():this.workType==p.a.WorkTypeCrime?this.commitCrime(e)&&t.toLocation(w.a[C.a.Slums]):this.workType==p.a.WorkTypeCompanyPartTime?this.workPartTime(e)&&t.toCity():this.workType===p.a.WorkTypeGraftAugmentation?this.graftAugmentationWork(e)&&t.toGrafting():this.work(e)&&t.toCity())}function xt(){const t=Y.a.find(t=>t.specialName===this.companyName);if(!t)return.5;const e=Object(T.d)(t.hostname);return e instanceof A.a&&e&&e.backdoorInstalled?.75:.5}function Lt(t){let e=!1;this.timeWorked+p.a._idleSpeed*t>=p.a.MillisecondsPer8Hours&&(e=!0,t=Math.round((p.a.MillisecondsPer8Hours-this.timeWorked)/p.a._idleSpeed)),this.timeWorked+=p.a._idleSpeed*t,this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.processWorkEarnings(t);const a=f.a[this.companyName];return Object(j.a)(a,this.workRepGainRate,t),!!(e||this.timeWorked>=p.a.MillisecondsPer8Hours)&&(this.finishWork(!1),!0)}function Ot(t,e=!1){t&&(this.workRepGained*=this.cancelationPenalty());const a=.5===this.cancelationPenalty()?"half":"three-quarters";f.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();let n=V.a.createElement(V.a.Fragment,null,"You earned a total of: ",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),V.a.createElement($.a,{reputation:this.workRepGained})," reputation for the company ",V.a.createElement("br",null),this.workHackExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null)),this.workStrExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null)),this.workDefExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null)),this.workDexExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null)),this.workAgiExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null)),this.workChaExpGained>0&&V.a.createElement(V.a.Fragment,null,W.a.formatExp(this.workChaExpGained)," charisma exp ",V.a.createElement("br",null)),V.a.createElement("br",null));if(n=t?V.a.createElement(V.a.Fragment,null,"You worked a short shift of ",Object(q.b)(this.timeWorked)," ",V.a.createElement("br",null),V.a.createElement("br",null),"Since you cancelled your work early, you only gained ",a," of the reputation you earned. ",V.a.createElement("br",null),V.a.createElement("br",null),n):V.a.createElement(V.a.Fragment,null,"You worked a full shift of 8 hours! ",V.a.createElement("br",null),V.a.createElement("br",null),n),e||Object(U.a)(n),this.isWorking=!1,this.focus=!1,this.resetWorkStatus(),e){return"You worked a short shift of "+Object(q.b)(this.timeWorked)+" and earned $"+W.a.formatMoney(this.workMoneyGained)+", "+W.a.formatReputation(this.workRepGained)+" reputation, "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" strength exp, "+W.a.formatExp(this.workDefExpGained)+" defense exp, "+W.a.formatExp(this.workDexExpGained)+" dexterity exp, "+W.a.formatExp(this.workAgiExpGained)+" agility exp, and "+W.a.formatExp(this.workChaExpGained)+" charisma exp."}return""}function Mt(t){this.resetWorkStatus(p.a.WorkTypeCompanyPartTime,t),this.isWorking=!0,this.companyName=t,this.workType=p.a.WorkTypeCompanyPartTime,this.workHackExpGainRate=this.getWorkHackExpGain(),this.workStrExpGainRate=this.getWorkStrExpGain(),this.workDefExpGainRate=this.getWorkDefExpGain(),this.workDexExpGainRate=this.getWorkDexExpGain(),this.workAgiExpGainRate=this.getWorkAgiExpGain(),this.workChaExpGainRate=this.getWorkChaExpGain(),this.workRepGainRate=this.getWorkRepGain(),this.workMoneyGainRate=this.getWorkMoneyGain(),this.timeNeededToCompleteWork=p.a.MillisecondsPer8Hours}function Tt(t){let e=!1;return this.timeWorked+p.a._idleSpeed*t>=p.a.MillisecondsPer8Hours&&(e=!0,t=Math.round((p.a.MillisecondsPer8Hours-this.timeWorked)/p.a._idleSpeed)),this.timeWorked+=p.a._idleSpeed*t,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(t),!!(e||this.timeWorked>=p.a.MillisecondsPer8Hours)&&(this.finishWorkPartTime(),!0)}function At(t=!1){f.a[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();const e=V.a.createElement(V.a.Fragment,null,"You worked for ",Object(q.b)(this.timeWorked),V.a.createElement("br",null),V.a.createElement("br",null),"You earned a total of: ",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),V.a.createElement($.a,{reputation:this.workRepGained})," reputation for the company ",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma exp",V.a.createElement("br",null));if(t||Object(U.a)(e),this.isWorking=!1,this.resetWorkStatus(),t){return"You worked for "+Object(q.b)(this.timeWorked)+" and earned a total of $"+W.a.formatMoney(this.workMoneyGained)+", "+W.a.formatReputation(this.workRepGained)+" reputation, "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" strength exp, "+W.a.formatExp(this.workDefExpGained)+" defense exp, "+W.a.formatExp(this.workDexExpGained)+" dexterity exp, "+W.a.formatExp(this.workAgiExpGained)+" agility exp, and "+W.a.formatExp(this.workChaExpGained)+" charisma exp"}return""}function Rt(){this.focus=!0}function Nt(){this.focus=!1}function Pt(t){let e=1+t.favor/100;isNaN(e)&&(e=1),this.workRepGainRate*=e,this.workRepGainRate*=s.a.FactionWorkRepGain,this.isWorking=!0,this.workType=p.a.WorkTypeFaction,this.currentWorkFactionName=t.name,this.timeNeededToCompleteWork=p.a.MillisecondsPer20Hours}function It(t){this.resetWorkStatus(p.a.WorkTypeFaction,t.name,p.a.FactionWorkHacking),this.workHackExpGainRate=.15*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(M.c)(this,t),this.factionWorkType=p.a.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(t)}function Ft(t){this.resetWorkStatus(p.a.WorkTypeFaction,t.name,p.a.FactionWorkField),this.workHackExpGainRate=.1*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(M.a)(this,t),this.factionWorkType=p.a.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(t)}function Dt(t){this.resetWorkStatus(p.a.WorkTypeFaction,t.name,p.a.FactionWorkSecurity),this.workHackExpGainRate=.05*this.hacking_exp_mult*s.a.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*s.a.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*s.a.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*s.a.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*s.a.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*s.a.FactionWorkExpGain,this.workRepGainRate=Object(M.b)(this,t),this.factionWorkType=p.a.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(t)}function jt(t){const e=v.a[this.currentWorkFactionName];if(!e)return!1;switch(this.factionWorkType){case p.a.FactionWorkHacking:this.workRepGainRate=Object(M.c)(this,e);break;case p.a.FactionWorkField:this.workRepGainRate=Object(M.a)(this,e);break;case p.a.FactionWorkSecurity:this.workRepGainRate=Object(M.b)(this,e)}this.workRepGainRate*=s.a.FactionWorkRepGain;let a=!1;return this.timeWorked+p.a._idleSpeed*t>=p.a.MillisecondsPer20Hours&&(a=!0,t=Math.round((p.a.MillisecondsPer20Hours-this.timeWorked)/p.a._idleSpeed)),this.timeWorked+=p.a._idleSpeed*t,this.processWorkEarnings(t),!!(a||this.timeWorked>=p.a.MillisecondsPer20Hours)&&(this.finishFactionWork(!1),!0)}function Bt(t,e=!1){const a=v.a[this.currentWorkFactionName];if(a.playerReputation+=this.workRepGained,this.updateSkillLevels(),e||Object(U.a)(V.a.createElement(V.a.Fragment,null,"You worked for your faction ",a.name," for a total of ",Object(q.b)(this.timeWorked)," ",V.a.createElement("br",null),V.a.createElement("br",null),"You earned a total of: ",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),V.a.createElement($.a,{reputation:this.workRepGained})," reputation for the faction ",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma exp",V.a.createElement("br",null))),this.isWorking=!1,this.resetWorkStatus(),e){return"You worked for your faction "+a.name+" for a total of "+Object(q.b)(this.timeWorked)+". You earned "+W.a.formatReputation(this.workRepGained)+" rep, "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" str exp, "+W.a.formatExp(this.workDefExpGained)+" def exp, "+W.a.formatExp(this.workDexExpGained)+" dex exp, "+W.a.formatExp(this.workAgiExpGained)+" agi exp, and "+W.a.formatExp(this.workChaExpGained)+" cha exp."}return""}function Gt(){let t=1;const e=f.a[this.companyName];D.a[11]>0&&(t=1+e.favor/100);const a=this.jobs[this.companyName],n=h.a[a];return null==n?(console.error(`Could not find CompanyPosition object for ${a}. Work salary will be 0`),0):n.baseSalary*e.salaryMultiplier*this.work_money_mult*s.a.CompanyWorkMoney*t}function Wt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],a=h.a[e];return null==t||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work hack exp gain will be 0"].join(" ")),0):a.hackingExpGain*t.expMultiplier*this.hacking_exp_mult*s.a.CompanyWorkExpGain}function Ht(){const t=f.a[this.companyName],e=this.jobs[this.companyName],a=h.a[e];return null==t||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work str exp gain will be 0"].join(" ")),0):a.strengthExpGain*t.expMultiplier*this.strength_exp_mult*s.a.CompanyWorkExpGain}function Ut(){const t=f.a[this.companyName],e=this.jobs[this.companyName],a=h.a[e];return null==t||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work def exp gain will be 0"].join(" ")),0):a.defenseExpGain*t.expMultiplier*this.defense_exp_mult*s.a.CompanyWorkExpGain}function qt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],a=h.a[e];return null==t||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work dex exp gain will be 0"].join(" ")),0):a.dexterityExpGain*t.expMultiplier*this.dexterity_exp_mult*s.a.CompanyWorkExpGain}function $t(){const t=f.a[this.companyName],e=this.jobs[this.companyName],a=h.a[e];return null==t||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work agi exp gain will be 0"].join(" ")),0):a.agilityExpGain*t.expMultiplier*this.agility_exp_mult*s.a.CompanyWorkExpGain}function Kt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],a=h.a[e];return null==t||null==a?(console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work cha exp gain will be 0"].join(" ")),0):a.charismaExpGain*t.expMultiplier*this.charisma_exp_mult*s.a.CompanyWorkExpGain}function zt(){const t=f.a[this.companyName],e=this.jobs[this.companyName],a=h.a[e];if(null==t||null==a)return console.error(["Could not find Company object for "+this.companyName,`or CompanyPosition object for ${e}.`,"Work rep gain will be 0"].join(" ")),0;let n=a.calculateJobPerformance(this.hacking,this.strength,this.defense,this.dexterity,this.agility,this.charisma);n+=this.intelligence/p.a.MaxSkillLevel;let r=1+t.favor/100;return isNaN(r)&&(r=1),n*this.company_rep_mult*r}function Vt(t,e,a){this.resetWorkStatus(),this.isWorking=!0,this.workType=p.a.WorkTypeCreateProgram,this.createProgramReqLvl=a,this.timeNeededToCompleteWork=e;for(let e=0;e=100)break;this.timeWorkedCreateProgram=n/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(e,1)}}this.createProgramName=t}function Yt(t){let e=1;this.hasAugmentation(o.a.NeuroreceptorManager)||(e=this.focus?1:p.a.BaseFocusBonus);const a=this.createProgramReqLvl;let n=this.hacking/a*this.getIntelligenceBonus(3);return n=1+(n-1)/5,n*=e,this.timeWorked+=p.a._idleSpeed*t,this.timeWorkedCreateProgram+=p.a._idleSpeed*t*n,this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&(this.finishCreateProgramWork(!1),!0)}function Jt(t){const e=this.createProgramName;if(!1===t)Object(U.a)(`You've finished creating ${e}!
The new program can be found on your home computer.`),this.getHomeComputer().programs.push(e);else{const t=e+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(t)}return t||this.gainIntelligenceExp(p.a.IntelligenceProgramBaseExpGain*this.timeWorked/1e3),this.isWorking=!1,this.resetWorkStatus(),"You've finished creating "+e+"! The new program can be found on your home computer."}function Xt(t,e){this.resetWorkStatus(),this.isWorking=!0,this.workType=p.a.WorkTypeGraftAugmentation,this.timeNeededToCompleteWork=e,this.graftAugmentationName=t}function Qt(t){let e=1;this.hasAugmentation(o.a.NeuroreceptorManager)||(e=this.focus?1:p.a.BaseFocusBonus);let a=1+(this.getIntelligenceBonus(3)-1)/3;return a*=e,this.timeWorked+=p.a._idleSpeed*t,this.timeWorkedGraftAugmentation+=p.a._idleSpeed*t*a,this.timeWorkedGraftAugmentation>=this.timeNeededToCompleteWork&&(this.finishGraftAugmentationWork(!1),!0)}function Zt(t){const e=this.graftAugmentationName;return!1===t?(Object(U.a)(`You've finished crafting ${e}.
The augmentation has been grafted to your body, but you feel a bit off.`),Object(r.a)(n.a[e]),this.entropy+=1,this.applyEntropy(this.entropy)):Object(U.a)(`You cancelled the crafting of ${e}.
Your money was not returned to you.`),t||this.gainIntelligenceExp(p.a.IntelligenceGraftBaseExpGain*this.timeWorked/1e4),this.isWorking=!1,this.resetWorkStatus(),`Grafting of ${e} has ended.`}function te(t,e,a){this.resetWorkStatus(),this.isWorking=!0,this.workType=p.a.WorkTypeStudyClass,this.workCostMult=t,this.workExpMult=e,this.className=a;const n=Object(X.a)(this);this.workMoneyLossRate=n.workMoneyLossRate,this.workHackExpGainRate=n.workHackExpGainRate,this.workStrExpGainRate=n.workStrExpGainRate,this.workDefExpGainRate=n.workDefExpGainRate,this.workDexExpGainRate=n.workDexExpGainRate,this.workAgiExpGainRate=n.workAgiExpGainRate,this.workChaExpGainRate=n.workChaExpGainRate}function ee(t){this.timeWorked+=p.a._idleSpeed*t;const e=Object(X.a)(this);return this.workMoneyLossRate=e.workMoneyLossRate,this.workHackExpGainRate=e.workHackExpGainRate,this.workStrExpGainRate=e.workStrExpGainRate,this.workDefExpGainRate=e.workDefExpGainRate,this.workDexExpGainRate=e.workDexExpGainRate,this.workAgiExpGainRate=e.workAgiExpGainRate,this.workChaExpGainRate=e.workChaExpGainRate,this.processWorkEarnings(t),!1}function ae(t=!1){if(this.gainIntelligenceExp(p.a.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");if(this.updateSkillLevels(),t||Object(U.a)(V.a.createElement(V.a.Fragment,null,"After ",this.className," for ",Object(q.b)(this.timeWorked),", ",V.a.createElement("br",null),"you spent a total of ",V.a.createElement(K.a,{money:-this.workMoneyGained}),". ",V.a.createElement("br",null),V.a.createElement("br",null),"You earned a total of: ",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking exp ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength exp ",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense exp ",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity exp ",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility exp ",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma exp",V.a.createElement("br",null))),this.isWorking=!1,t){const t="After "+this.className+" for "+Object(q.b)(this.timeWorked)+", you spent a total of "+W.a.formatMoney(-1*this.workMoneyGained)+". You earned a total of: "+W.a.formatExp(this.workHackExpGained)+" hacking exp, "+W.a.formatExp(this.workStrExpGained)+" strength exp, "+W.a.formatExp(this.workDefExpGained)+" defense exp, "+W.a.formatExp(this.workDexExpGained)+" dexterity exp, "+W.a.formatExp(this.workAgiExpGained)+" agility exp, and "+W.a.formatExp(this.workChaExpGained)+" charisma exp";return this.resetWorkStatus(),t}return this.resetWorkStatus(),""}function ne(t,e,a,n,r,i,o,l,c,f,u=null){this.crimeType=e,this.resetWorkStatus(),this.isWorking=!0,this.focus=!0,this.workType=p.a.WorkTypeCrime,null!==u&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=u),this.workHackExpGained=a*this.hacking_exp_mult*s.a.CrimeExpGain,this.workStrExpGained=n*this.strength_exp_mult*s.a.CrimeExpGain,this.workDefExpGained=r*this.defense_exp_mult*s.a.CrimeExpGain,this.workDexExpGained=i*this.dexterity_exp_mult*s.a.CrimeExpGain,this.workAgiExpGained=o*this.agility_exp_mult*s.a.CrimeExpGain,this.workChaExpGained=l*this.charisma_exp_mult*s.a.CrimeExpGain,this.workMoneyGained=c*this.crime_money_mult*s.a.CrimeMoney,this.timeNeededToCompleteWork=f,t.toWork()}function re(t){return this.timeWorked+=p.a._idleSpeed*t,this.timeWorked>=this.timeNeededToCompleteWork&&(this.finishCrime(!1),!0)}function ie(t){if(!t){if(Object(y.a)(this,this.crimeType)){let t=null;for(const e of Object.keys(b.a))if(b.a[e].type==this.crimeType){t=b.a[e];break}if(null==t)return Object(U.a)(`ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`),"";this.gainMoney(this.workMoneyGained,"crime"),this.karma-=t.karma,this.numPeopleKilled+=t.kills,t.intelligence_exp>0&&this.gainIntelligenceExp(t.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2;const e=this.singFnCrimeWorkerScript;this.committingCrimeThruSingFn&&null!==e?null==e.disableLogs.ALL&&null==e.disableLogs.commitCrime&&e.scriptRef.log("SUCCESS: Crime successful! Gained "+W.a.formatMoney(this.workMoneyGained)+", "+W.a.formatExp(this.workHackExpGained)+" hack exp, "+W.a.formatExp(this.workStrExpGained)+" str exp, "+W.a.formatExp(this.workDefExpGained)+" def exp, "+W.a.formatExp(this.workDexExpGained)+" dex exp, "+W.a.formatExp(this.workAgiExpGained)+" agi exp, "+W.a.formatExp(this.workChaExpGained)+" cha exp."):Object(U.a)(V.a.createElement(V.a.Fragment,null,"Crime successful!",V.a.createElement("br",null),V.a.createElement("br",null),"You gained:",V.a.createElement("br",null),V.a.createElement(K.a,{money:this.workMoneyGained}),V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking experience ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength experience",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense experience",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity experience",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility experience",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma experience"))}else{this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2;const t=this.singFnCrimeWorkerScript;this.committingCrimeThruSingFn&&null!==t?null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log("FAIL: Crime failed! Gained "+W.a.formatExp(this.workHackExpGained)+" hack exp, "+W.a.formatExp(this.workStrExpGained)+" str exp, "+W.a.formatExp(this.workDefExpGained)+" def exp, "+W.a.formatExp(this.workDexExpGained)+" dex exp, "+W.a.formatExp(this.workAgiExpGained)+" agi exp, "+W.a.formatExp(this.workChaExpGained)+" cha exp."):Object(U.a)(V.a.createElement(V.a.Fragment,null,"Crime failed!",V.a.createElement("br",null),V.a.createElement("br",null),"You gained:",V.a.createElement("br",null),W.a.formatExp(this.workHackExpGained)," hacking experience ",V.a.createElement("br",null),W.a.formatExp(this.workStrExpGained)," strength experience",V.a.createElement("br",null),W.a.formatExp(this.workDefExpGained)," defense experience",V.a.createElement("br",null),W.a.formatExp(this.workDexExpGained)," dexterity experience",V.a.createElement("br",null),W.a.formatExp(this.workAgiExpGained)," agility experience",V.a.createElement("br",null),W.a.formatExp(this.workChaExpGained)," charisma experience"))}this.gainHackingExp(this.workHackExpGained),this.gainStrengthExp(this.workStrExpGained),this.gainDefenseExp(this.workDefExpGained),this.gainDexterityExp(this.workDexExpGained),this.gainAgilityExp(this.workAgiExpGained),this.gainCharismaExp(this.workChaExpGained)}return this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.isWorking=!1,this.crimeType="",this.resetWorkStatus(),""}function oe(){if(!this.isWorking)return"";let t="";switch(this.workType){case p.a.WorkTypeStudyClass:t=this.finishClass(!0);break;case p.a.WorkTypeCompany:t=this.finishWork(!0,!0);break;case p.a.WorkTypeCompanyPartTime:t=this.finishWorkPartTime(!0);break;case p.a.WorkTypeFaction:t=this.finishFactionWork(!0,!0);break;case p.a.WorkTypeCreateProgram:t=this.finishCreateProgramWork(!0);break;case p.a.WorkTypeCrime:t=this.finishCrime(!0);break;default:return console.error(`Unrecognized work type (${this.workType})`),""}return t}function se(t){return"number"!=typeof t?(console.warn("Player.takeDamage() called without a numeric argument: "+t),!1):(this.hp-=t,this.hp<=0&&(this.hospitalize(),!0))}function le(t){"number"==typeof t?(this.hp+=t,this.hp>this.max_hp&&(this.hp=this.max_hp)):console.warn("Player.regenerateHp() called without a numeric argument: "+t)}function ce(){const t=Object(B.b)(this);return J.b.emit("You've been Hospitalized for "+W.a.formatMoney(t),"warning",2e3),this.loseMoney(t,"hospitalization"),this.hp=this.max_hp,t}function fe(t,e=!1){let a=null;""!==this.companyName&&(a=f.a[this.companyName]);const n=this.jobs[this.companyName],r=f.a[this.location];if(!(r instanceof c.a))return console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`),!1;let i=t;if(!this.isQualified(r,i)){const t=Object(m.a)(r,i);return e||Object(U.a)("Unfortunately, you do not qualify for this position
"+t),!1}if(!r.hasPosition(i))return!1;for(;;){const t=Object(u.a)(i);if(null==t)break;if(!r.hasPosition(t))break;if(!this.isQualified(r,t))break;i=t}if(null!=a&&a.name==r.name&&i.name==n){const t=Object(u.a)(i);if(null==t)return e||Object(U.a)("You are already at the highest position for your field! No promotion available"),!1;if(r.hasPosition(t)){if(!e){const e=Object(m.a)(r,t);Object(U.a)("Unfortunately, you do not qualify for a promotion
"+e)}return!1}return e||Object(U.a)("You are already at the highest position for your field! No promotion available"),!1}return this.jobs[r.name]=i.name,!this.focus&&this.isWorking&&this.companyName!==this.location&&this.resetWorkStatus(),this.companyName=this.location,e||Object(U.a)("Congratulations! You were offered a new job at "+this.companyName+" as a "+i.name+"!"),!0}function ue(t,e){let a=null;if(""!==this.companyName&&(a=f.a[this.companyName]),null==a||a.name!=t.name)return e;const n=this.jobs[this.companyName];if(!n)return e;const r=h.a[n];return r.isSoftwareJob()&&e.isSoftwareJob()||r.isITJob()&&e.isITJob()||r.isBusinessJob()&&e.isBusinessJob()||r.isSecurityEngineerJob()&&e.isSecurityEngineerJob()||r.isNetworkEngineerJob()&&e.isNetworkEngineerJob()||r.isSecurityJob()&&e.isSecurityJob()||r.isAgentJob()&&e.isAgentJob()||r.isSoftwareConsultantJob()&&e.isSoftwareConsultantJob()||r.isBusinessConsultantJob()&&e.isBusinessConsultantJob()||r.isPartTimeJob()&&e.isPartTimeJob()?Object(u.a)(r):e}function me(t){1==this.isWorking&&this.workType.includes("Working for Company")&&this.companyName==t&&(this.isWorking=!1,this.companyName=""),this.companyName===t&&(this.companyName=""),delete this.jobs[t]}function he(){return Boolean(Object.keys(this.jobs).length)}function de(t=!1){return this.applyForJob(h.a[d.j[0]],t)}function pe(t=!1){return this.applyForJob(h.a[d.k[0]],t)}function ge(t=!1){return this.applyForJob(h.a[d.d[0]],t)}function ye(t=!1){const e=f.a[this.location];return this.isQualified(e,h.a[d.i[0]])?this.applyForJob(h.a[d.i[0]],t):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1)}function be(t=!1){const e=f.a[this.location];if(this.isQualified(e,h.a[d.f[0]])){const e=h.a[d.f[0]];return this.applyForJob(e,t)}return t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1}function Ee(t=!1){return this.applyForJob(h.a[d.b[0]],t)}function ve(t=!1){return this.applyForJob(h.a[d.c[0]],t)}function ke(t=!1){return this.applyForJob(h.a[d.h[2]],t)}function _e(t=!1){const e=f.a[this.location];if(this.isQualified(e,h.a[d.a[0]])){const e=h.a[d.a[0]];return this.applyForJob(e,t)}return t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1}function we(t=!1){const e=f.a[this.location],a=d.e[1];return!!e.hasPosition(a)&&(this.isQualified(e,h.a[a])?(this.jobs[e.name]=a,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function Se(t=!1){const e=f.a[this.location],a=d.g[1];return!!e.hasPosition(a)&&(this.isQualified(e,h.a[a])?(this.jobs[e.name]=a,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed part-time at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function Ce(t=!1){const e=f.a[this.location],a=d.e[0];return!!e.hasPosition(a)&&(this.isQualified(e,h.a[a])?(this.jobs[e.name]=a,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed as a waiter at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function xe(t=!1){const e=f.a[this.location],a=d.g[0];return!!e.hasPosition(a)&&(this.isQualified(e,h.a[a])?(this.jobs[e.name]=a,!this.focus&&this.isWorking&&this.companyName!==e.name&&this.resetWorkStatus(),this.companyName=e.name,t||Object(U.a)("Congratulations, you are now employed as a part-time waiter at "+this.location),!0):(t||Object(U.a)("Unfortunately, you do not qualify for this position"),!1))}function Le(t,e){const a=t.jobStatReqOffset,n=e.requiredHacking>0?e.requiredHacking+a:0,r=e.requiredStrength>0?e.requiredStrength+a:0,i=e.requiredDefense>0?e.requiredDefense+a:0,o=e.requiredDexterity>0?e.requiredDexterity+a:0,s=e.requiredDexterity>0?e.requiredDexterity+a:0,l=e.requiredCharisma>0?e.requiredCharisma+a:0;return this.hacking>=n&&this.strength>=r&&this.defense>=i&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&t.playerReputation>=e.requiredReputation}function Oe(t=!0){t&&this.resetMultipliers();for(let t=0;te}const i=v.a[Z.a.Illuminati];!i.isBanned&&!i.isMember&&!i.alreadyInvited&&e>=30&&this.money>=15e10&&this.hacking>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&t.push(i);const o=v.a[Z.a.Daedalus];!o.isBanned&&!o.isMember&&!o.alreadyInvited&&e>=Math.round(30*s.a.DaedalusAugsRequirement)&&this.money>=1e11&&(this.hacking>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&t.push(o);const l=v.a[Z.a.TheCovenant];!l.isBanned&&!l.isMember&&!l.alreadyInvited&&e>=20&&this.money>=75e9&&this.hacking>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&t.push(l);const c=v.a[Z.a.ECorp];c.isBanned||c.isMember||c.alreadyInvited||!r(C.a.AevumECorp)||t.push(c);const u=v.a[Z.a.MegaCorp];u.isBanned||u.isMember||u.alreadyInvited||!r(C.a.Sector12MegaCorp)||t.push(u);const m=v.a[Z.a.BachmanAssociates];m.isBanned||m.isMember||m.alreadyInvited||!r(C.a.AevumBachmanAndAssociates)||t.push(m);const h=v.a[Z.a.BladeIndustries];h.isBanned||h.isMember||h.alreadyInvited||!r(C.a.Sector12BladeIndustries)||t.push(h);const d=v.a[Z.a.NWO];d.isBanned||d.isMember||d.alreadyInvited||!r(C.a.VolhavenNWO)||t.push(d);const g=v.a[Z.a.ClarkeIncorporated];g.isBanned||g.isMember||g.alreadyInvited||!r(C.a.AevumClarkeIncorporated)||t.push(g);const y=v.a[Z.a.OmniTekIncorporated];y.isBanned||y.isMember||y.alreadyInvited||!r(C.a.VolhavenOmniTekIncorporated)||t.push(y);const b=v.a[Z.a.FourSigma];b.isBanned||b.isMember||b.alreadyInvited||!r(C.a.Sector12FourSigma)||t.push(b);const E=v.a[Z.a.KuaiGongInternational];E.isBanned||E.isMember||E.alreadyInvited||!r(C.a.ChongqingKuaiGongInternational)||t.push(E);const k=v.a[Z.a.FulcrumSecretTechnologies],_=Object(T.d)(N.a.FulcrumSecretTechnologies);if(!(_ instanceof A.a))throw new Error(Z.a.FulcrumSecretTechnologies+" should be normal server");null==_?console.error(`Could not find ${Z.a.FulcrumSecretTechnologies} Server`):k.isBanned||k.isMember||k.alreadyInvited||!_.backdoorInstalled||!r(C.a.AevumFulcrumTechnologies,25e4)||t.push(k);const w=v.a[Z.a.BitRunners],x=Object(T.d)(N.a.BitRunnersServer);if(!(x instanceof A.a))throw new Error(Z.a.BitRunners+" should be normal server");null==x?console.error(`Could not find ${Z.a.BitRunners} Server`):w.isBanned||w.isMember||!x.backdoorInstalled||w.alreadyInvited||t.push(w);const L=v.a[Z.a.TheBlackHand],O=Object(T.d)(N.a.TheBlackHandServer);if(!(O instanceof A.a))throw new Error(Z.a.TheBlackHand+" should be normal server");null==O?console.error(`Could not find ${Z.a.TheBlackHand} Server`):L.isBanned||L.isMember||!O.backdoorInstalled||L.alreadyInvited||t.push(L);const M=v.a[Z.a.NiteSec],R=Object(T.d)(N.a.NiteSecServer);if(!(R instanceof A.a))throw new Error(Z.a.NiteSec+" should be normal server");null==R?console.error(`Could not find ${Z.a.NiteSec} Server`):M.isBanned||M.isMember||!R.backdoorInstalled||M.alreadyInvited||t.push(M);const P=v.a[Z.a.Chongqing];!P.isBanned&&!P.isMember&&!P.alreadyInvited&&this.money>=2e7&&this.city==S.a.Chongqing&&t.push(P);const I=v.a[Z.a.Sector12];!I.isBanned&&!I.isMember&&!I.alreadyInvited&&this.money>=15e6&&this.city==S.a.Sector12&&t.push(I);const F=v.a[Z.a.NewTokyo];!F.isBanned&&!F.isMember&&!F.alreadyInvited&&this.money>=2e7&&this.city==S.a.NewTokyo&&t.push(F);const D=v.a[Z.a.Aevum];!D.isBanned&&!D.isMember&&!D.alreadyInvited&&this.money>=4e7&&this.city==S.a.Aevum&&t.push(D);const j=v.a[Z.a.Ishima];!j.isBanned&&!j.isMember&&!j.alreadyInvited&&this.money>=3e7&&this.city==S.a.Ishima&&t.push(j);const B=v.a[Z.a.Volhaven];!B.isBanned&&!B.isMember&&!B.alreadyInvited&&this.money>=5e7&&this.city==S.a.Volhaven&&t.push(B);const W=v.a[Z.a.SpeakersForTheDead];!W.isBanned&&!W.isMember&&!W.alreadyInvited&&this.hacking>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&!a.includes(C.a.Sector12CIA)&&!a.includes(C.a.Sector12NSA)&&t.push(W);const H=v.a[Z.a.TheDarkArmy];!H.isBanned&&!H.isMember&&!H.alreadyInvited&&this.hacking>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==S.a.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&!a.includes(C.a.Sector12CIA)&&!a.includes(C.a.Sector12NSA)&&t.push(H);const U=v.a[Z.a.TheSyndicate];!U.isBanned&&!U.isMember&&!U.alreadyInvited&&this.hacking>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==S.a.Aevum||this.city==S.a.Sector12)&&this.money>=1e7&&this.karma<=-90&&!a.includes(C.a.Sector12CIA)&&!a.includes(C.a.Sector12NSA)&&t.push(U);const q=v.a[Z.a.Silhouette];!q.isBanned&&!q.isMember&&!q.alreadyInvited&&(n.includes("Chief Technology Officer")||n.includes("Chief Financial Officer")||n.includes("Chief Executive Officer"))&&this.money>=15e6&&this.karma<=-22&&t.push(q);const $=v.a[Z.a.Tetrads];!$.isBanned&&!$.isMember&&!$.alreadyInvited&&(this.city==S.a.Chongqing||this.city==S.a.NewTokyo||this.city==S.a.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&t.push($);const K=v.a[Z.a.SlumSnakes];!K.isBanned&&!K.isMember&&!K.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money>=1e6&&t.push(K);const z=v.a[Z.a.Netburners];let V=0,Y=0,J=0;for(let t=0;t=80&&V>=8&&Y>=4&&J>=100&&t.push(z);const X=v.a[Z.a.TianDiHui];!X.isBanned&&!X.isMember&&!X.alreadyInvited&&this.money>=1e6&&this.hacking>=50&&(this.city==S.a.Chongqing||this.city==S.a.NewTokyo||this.city==S.a.Ishima)&&t.push(X);const Q=v.a[Z.a.CyberSec],tt=Object(T.d)(N.a.CyberSecServer);if(!(tt instanceof A.a))throw new Error(Z.a.CyberSec+" should be normal server");return null==tt?console.error(`Could not find ${Z.a.CyberSec} Server`):Q.isBanned||Q.isMember||!tt.backdoorInstalled||Q.alreadyInvited||t.push(Q),t}function Ae(t){this.bitNodeN=t}function Re(t){for(const e of this.queuedAugmentations)if(e.name==t)return void console.warn(`tried to queue ${t} twice, this may be a bug`);for(const e of this.augmentations)if(e.name==t)return void console.warn(`tried to queue ${t} twice, this may be a bug`);this.queuedAugmentations.push(new i.a(t))}function Ne(t,e=1){if(null==t||null==t.type)return"No reward for this contract";switch(t.type){case l.c.FactionReputation:if(null==t.name||!(v.a[t.name]instanceof E.a))return t.type=l.c.FactionReputationAll,this.gainCodingContractReward(t);const a=p.a.CodingContractBaseFactionRepGain*e;return v.a[t.name].playerReputation+=a,`Gained ${a} faction reputation for ${t.name}`;case l.c.FactionReputationAll:const n=p.a.CodingContractBaseFactionRepGain*e,r=[Z.a.Bladeburners],i=this.factions.slice().filter(t=>!r.includes(t));if(0==i.length)return t.type=l.c.Money,this.gainCodingContractReward(t,e);const o=Math.floor(n/i.length);for(const t of i)v.a[t]instanceof E.a&&(v.a[t].playerReputation+=o);return`Gained ${o} reputation for each of the following factions: ${i.toString()}`;case l.c.CompanyReputation:{if(null==t.name||!(f.a[t.name]instanceof c.a))return t.type=l.c.FactionReputationAll,this.gainCodingContractReward(t);const a=p.a.CodingContractBaseCompanyRepGain*e;return f.a[t.name].playerReputation+=a,`Gained ${a} company reputation for ${t.name}`}case l.c.Money:default:{const t=p.a.CodingContractBaseMoneyGain*e*s.a.CodingContractMoney;return this.gainMoney(t,"codingcontract"),"Gained "+W.a.formatMoney(t)}}}function Pe(t){return null==_.a[t]?(console.warn("Player.travel() called with invalid city: "+t),!1):(this.city=t,!0)}function Ie(t){return null==w.a[t]?(console.warn("Player.gotoLocation() called with invalid location: "+t),!1):(this.location=t,!0)}function Fe(){return 10===this.bitNodeN||D.a[10]>0}function De(t){this.exploits.includes(t)||(this.exploits.push(t),J.b.emit("SF -1 acquired!","success",2e3))}function je(t){const e=Q.a[t];e&&(this.achievements.map(t=>t.ID).includes(t)||(this.achievements.push({ID:t,unlockedOn:(new Date).getTime()}),J.b.emit(`Unlocked Achievement: "${e.Name}"`,"success",2e3)))}function Be(t){return Object(O.a)(this.intelligence,t)}function Ge(){return this.moneySourceA.casino}function We(t){return this.hasOwnProperty(t)?this[t]:1}function He(t,e){this.hasOwnProperty(t)&&(this[t]=e)}function Ue(){return 13===this.bitNodeN||D.a[13]>0}function qe(t){const e=this.sourceFiles.find(e=>e.n===t);return e?e.lvl:0}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(560),r=a(6),i=a(997),o=a(339),s=a(25);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class c extends n.a{constructor(t={hostname:"",ip:Object(o.a)()}){super(t),l(this,"backdoorInstalled",!1),l(this,"baseDifficulty",1),l(this,"hackDifficulty",1),l(this,"minDifficulty",1),l(this,"moneyAvailable",0),l(this,"moneyMax",0),l(this,"numOpenPortsRequired",5),l(this,"openPortCount",0),l(this,"requiredHackingSkill",1),l(this,"serverGrowth",1),this.hostname.startsWith("hacknet-node-")&&(this.hostname=Object(i.a)(10)),this.purchasedByPlayer=null!=t.purchasedByPlayer&&t.purchasedByPlayer,this.maxRam=null!=t.maxRam?t.maxRam:0,this.requiredHackingSkill=null!=t.requiredHackingSkill?t.requiredHackingSkill:1,this.moneyAvailable=null!=t.moneyAvailable?t.moneyAvailable*r.a.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*r.a.ServerMaxMoney,this.hackDifficulty=null!=t.hackDifficulty?t.hackDifficulty*r.a.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=t.serverGrowth?t.serverGrowth:1,this.numOpenPortsRequired=null!=t.numOpenPortsRequired?t.numOpenPortsRequired:5}capDifficulty(){this.hackDifficulty100&&(this.hackDifficulty=100)}changeMinimumSecurity(t,e=!1){e?this.minDifficulty*=t:this.minDifficulty+=t,this.minDifficulty=Math.max(1,this.minDifficulty)}changeMaximumMoney(t){if(this.moneyMax>1e13){const e=this.moneyMax-1e13;t=1+(t-1)/Math.log(e)/Math.log(8)}this.moneyMax*=t}fortify(t){this.hackDifficulty+=t,this.capDifficulty()}weaken(t){this.hackDifficulty-=t*r.a.ServerWeakenRate,this.capDifficulty()}toJSON(){return Object(s.b)("Server",this)}static fromJSON(t){return Object(s.a)(c,t.data)}}s.c.constructors.Server=c},function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return s}));var n=a(0),r=a.n(n);const i={Corporation:r.a.createContext({}),Division:r.a.createContext({})},o=()=>Object(n.useContext)(i.Corporation),s=()=>Object(n.useContext)(i.Division)},,function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"d",(function(){return l})),a.d(e,"b",(function(){return c})),a.d(e,"c",(function(){return f})),a.d(e,"e",(function(){return u}));var n=a(0),r=a.n(n),i=a(129),o=a(143);const s={Energy:"Energy",Utilities:"Water Utilities",Agriculture:"Agriculture",Fishing:"Fishing",Mining:"Mining",Food:"Food",Tobacco:"Tobacco",Chemical:"Chemical",Pharmaceutical:"Pharmaceutical",Computer:"Computer Hardware",Robotics:"Robotics",Software:"Software",Healthcare:"Healthcare",RealEstate:"RealEstate"},l={Energy:225e9,Utilities:15e10,Agriculture:4e10,Fishing:8e10,Mining:3e11,Food:1e10,Tobacco:2e10,Chemical:7e10,Pharmaceutical:2e11,Computer:5e11,Robotics:1e12,Software:25e9,Healthcare:75e10,RealEstate:6e11},c={Energy:t=>r.a.createElement(r.a.Fragment,null,"Engage in the production and distribution of energy.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Energy,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Utilities:t=>r.a.createElement(r.a.Fragment,null,"Distribute water and provide wastewater services.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Utilities,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Agriculture:t=>r.a.createElement(r.a.Fragment,null,"Cultivate crops and breed livestock to produce food.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Agriculture,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Fishing:t=>r.a.createElement(r.a.Fragment,null,"Produce food through the breeding and processing of fish and fish products.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Fishing,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Mining:t=>r.a.createElement(r.a.Fragment,null,"Extract and process metals from the earth.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Mining,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Food:t=>r.a.createElement(r.a.Fragment,null,"Create your own restaurants all around the world.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Food,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Tobacco:t=>r.a.createElement(r.a.Fragment,null,"Create and distribute tobacco and tobacco-related products.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Tobacco,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Chemical:t=>r.a.createElement(r.a.Fragment,null,"Produce industrial chemicals.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Chemical,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Pharmaceutical:t=>r.a.createElement(r.a.Fragment,null,"Discover, develop, and create new pharmaceutical drugs.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Pharmaceutical,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Computer:t=>r.a.createElement(r.a.Fragment,null,"Develop and manufacture new computer hardware and networking infrastructures.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Computer,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Robotics:t=>r.a.createElement(r.a.Fragment,null,"Develop and create robots.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Robotics,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),Software:t=>r.a.createElement(r.a.Fragment,null,"Develop computer software and create AI Cores.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Software,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: YES"),Healthcare:t=>r.a.createElement(r.a.Fragment,null,"Create and manage hospitals.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.Healthcare,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO"),RealEstate:t=>r.a.createElement(r.a.Fragment,null,"Develop and manage real estate properties.",r.a.createElement("br",null),r.a.createElement("br",null),"Starting cost: ",r.a.createElement(o.a,{money:l.RealEstate,corp:t}),r.a.createElement("br",null),"Recommended starting Industry: NO")},f={Energy:Object(i.a)(),Utilities:Object(i.a)(),Agriculture:Object(i.a)(),Fishing:Object(i.a)(),Mining:Object(i.a)(),Food:Object(i.b)(),Tobacco:Object(i.b)(),Chemical:Object(i.a)(),Pharmaceutical:Object(i.b)(),Computer:Object(i.b)(),Robotics:Object(i.b)(),Software:Object(i.b)(),Healthcare:Object(i.b)(),RealEstate:Object(i.b)()};function u(){f.Energy=Object(i.a)(),f.Utilities=Object(i.a)(),f.Agriculture=Object(i.a)(),f.Fishing=Object(i.a)(),f.Mining=Object(i.a)(),f.Food=Object(i.b)(),f.Tobacco=Object(i.b)(),f.Chemical=Object(i.a)(),f.Pharmaceutical=Object(i.b)(),f.Computer=Object(i.b)(),f.Robotics=Object(i.b)(),f.Software=Object(i.b)(),f.Healthcare=Object(i.b)(),f.RealEstate=Object(i.b)()}},function(t,e,a){"use strict";let n;a.d(e,"a",(function(){return n})),function(t){t[t.Company=0]="Company",t[t.Gym=1]="Gym",t[t.Hospital=2]="Hospital",t[t.Slums=3]="Slums",t[t.Special=4]="Special",t[t.StockMarket=5]="StockMarket",t[t.TechVendor=6]="TechVendor",t[t.TravelAgency=7]="TravelAgency",t[t.University=8]="University",t[t.Casino=9]="Casino"}(n||(n={}))},,function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={Operations:"Operations",Engineer:"Engineer",Business:"Business",Management:"Management",RandD:"Research & Development",Training:"Training",Unassigned:"Unassigned"}},,function(t,e,a){"use strict";a.d(e,"g",(function(){return p})),a.d(e,"l",(function(){return g})),a.d(e,"h",(function(){return y})),a.d(e,"a",(function(){return b})),a.d(e,"b",(function(){return E})),a.d(e,"e",(function(){return v})),a.d(e,"f",(function(){return k})),a.d(e,"d",(function(){return _})),a.d(e,"c",(function(){return w})),a.d(e,"n",(function(){return S})),a.d(e,"o",(function(){return C})),a.d(e,"k",(function(){return x})),a.d(e,"j",(function(){return L})),a.d(e,"i",(function(){return O})),a.d(e,"p",(function(){return T})),a.d(e,"m",(function(){return A}));var n=a(221),r=a(206),i=a(184),o=a(39),s=a(91),l=a(372),c=a(242),f=a(373),u=a(44),m=a(26),h=a(47),d=a(82);function p(t){return 9===t.bitNodeN||d.a[9]>0}function g(t){if(u.a.isRunning){if(u.a.currStep!==u.f.HacknetNodesIntroduction)return-1;Object(u.c)()}const e=t.hacknetNodes.length;if(p(t)){const a=E(t);if(isNaN(a))throw new Error("Calculated cost of purchasing HacknetServer is NaN");return!t.canAfford(a)||e>=o.b.MaxServers?-1:(t.loseMoney(a,"hacknet_expenses"),t.createHacknetServer(),T(t),e)}{const a=b(t);if(isNaN(a))throw new Error("Calculated cost of purchasing HacknetNode is NaN");if(!t.canAfford(a))return-1;const r="hacknet-node-"+e,i=new n.a(r,t.hacknet_node_money_mult);return t.loseMoney(a,"hacknet_expenses"),t.hacknetNodes.push(i),e}}function y(t){return p(t)&&t.hacknetNodes.length>=o.b.MaxServers}function b(t){return Object(r.d)(t.hacknetNodes.length+1,t.hacknet_node_purchase_cost_mult)}function E(t){return Object(i.f)(t.hacknetNodes.length+1,t.hacknet_node_purchase_cost_mult)}function v(t,e,a){if(null==a)throw new Error("getMaxNumberLevelUpgrades() called without maxLevel arg");if(t.moneye.calculateLevelUpgradeCost(i,t.hacknet_node_level_cost_mult))return i;for(;n<=r;){const o=(n+r)/2|0;if(o!==a&&t.money>e.calculateLevelUpgradeCost(o,t.hacknet_node_level_cost_mult)&&t.moneye.calculateLevelUpgradeCost(o,t.hacknet_node_level_cost_mult)))return Math.min(i,o);n=o+1}}return 0}function k(t,e,a){if(null==a)throw new Error("getMaxNumberRamUpgrades() called without maxLevel arg");if(t.moneye.calculateRamUpgradeCost(n,t.hacknet_node_ram_cost_mult))return n;for(let a=n-1;a>=0;--a)if(t.money>e.calculateRamUpgradeCost(a,t.hacknet_node_ram_cost_mult))return a;return 0}function _(t,e,a){if(null==a)throw new Error("getMaxNumberCoreUpgrades() called without maxLevel arg");if(t.moneye.calculateCoreUpgradeCost(i,t.hacknet_node_core_cost_mult))return i;for(;n<=r;){const o=(n+r)/2|0;if(o!=a&&t.money>e.calculateCoreUpgradeCost(o,t.hacknet_node_core_cost_mult)&&t.moneye.calculateCoreUpgradeCost(o,t.hacknet_node_core_cost_mult)))return Math.min(i,o);n=o+1}}return 0}function w(t,e,a){if(null==a)throw new Error("getMaxNumberCacheUpgrades() called without maxLevel arg");if(!t.canAfford(e.calculateCacheUpgradeCost(1)))return 0;let n=1,r=a-1;const i=a-e.cache;if(t.canAfford(e.calculateCacheUpgradeCost(i)))return i;for(;n<=r;){const o=(n+r)/2|0;if(o!=a&&t.canAfford(e.calculateCacheUpgradeCost(o))&&!t.canAfford(e.calculateCacheUpgradeCost(o+1)))return Math.min(i,o);if(t.canAfford(e.calculateCacheUpgradeCost(o))){if(!t.canAfford(e.calculateCacheUpgradeCost(o)))return Math.min(i,o);n=o+1}else r=o-1}return 0}function S(t,e,a=1){const n=Math.round(a),r=e.calculateLevelUpgradeCost(n,t.hacknet_node_level_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const i=e instanceof s.a;if(e.level>=(i?o.b.MaxLevel:o.a.MaxLevel))return!1;if(e.level+n>(i?o.b.MaxLevel:o.a.MaxLevel)){return S(t,e,Math.max(0,(i?o.b.MaxLevel:o.a.MaxLevel)-e.level))}return!!t.canAfford(r)&&(t.loseMoney(r,"hacknet_expenses"),e.upgradeLevel(n,t.hacknet_node_money_mult),!0)}function C(t,e,a=1){const r=Math.round(a),i=e.calculateRamUpgradeCost(r,t.hacknet_node_ram_cost_mult);if(isNaN(i)||i<=0||r<0)return!1;if(e instanceof s.a&&e.maxRam>=o.b.MaxRam)return!1;if(e instanceof n.a&&e.ram>=o.a.MaxRam)return!1;if(e instanceof s.a){if(e.maxRam*Math.pow(2,r)>o.b.MaxRam){return C(t,e,Math.max(0,Math.log2(Math.round(o.b.MaxRam/e.maxRam))))}}else if(e instanceof n.a&&e.ram*Math.pow(2,r)>o.a.MaxRam){return C(t,e,Math.max(0,Math.log2(Math.round(o.a.MaxRam/e.ram))))}return!!t.canAfford(i)&&(t.loseMoney(i,"hacknet_expenses"),e.upgradeRam(r,t.hacknet_node_money_mult),!0)}function x(t,e,a=1){const n=Math.round(a),r=e.calculateCoreUpgradeCost(n,t.hacknet_node_core_cost_mult);if(isNaN(r)||r<=0||n<0)return!1;const i=e instanceof s.a;if(e.cores>=(i?o.b.MaxCores:o.a.MaxCores))return!1;if(e.cores+n>(i?o.b.MaxCores:o.a.MaxCores)){return x(t,e,Math.max(0,(i?o.b.MaxCores:o.a.MaxCores)-e.cores))}return!!t.canAfford(r)&&(t.loseMoney(r,"hacknet_expenses"),e.upgradeCore(n,t.hacknet_node_money_mult),!0)}function L(t,e,a=1){const n=Math.round(a),r=e.calculateCacheUpgradeCost(n);if(isNaN(r)||r<=0||n<0)return!1;if(!(e instanceof s.a))return console.warn("purchaseCacheUpgrade() called for a non-HacknetNode"),!1;if(e.cache+n>o.b.MaxCache){return L(t,e,Math.max(0,o.b.MaxCache-e.cache))}return!!t.canAfford(r)&&(t.loseMoney(r,"hacknet_expenses"),e.upgradeCache(n),!0)}function O(t,e){return 0===t.hacknetNodes.length?0:p(t)?function(t,e){if(!(t.hashManager instanceof l.a))throw new Error("Player does not have a HashManager (should be in 'hashManager' prop)");let a=0;for(let r=0;r0){const e=c.a["Sell for Money"];if(null===e)throw new Error("Could not get the hash upgrade");if(!e.cost)throw new Error("Upgrade is not properly configured");const a=Math.floor(r/e.cost);a>0&&t.gainMoney(e.value*a,"hacknet")}return a}(t,e):t.hacknetNodes[0]instanceof n.a?function(t,e){let a=0;for(let n=0;n{var e;null!=o[(e=t).name]&&console.warn("Duplicate Company Position being defined: "+e.name),o[e.name]=new r.a(e)});for(const e of Object.keys(o)){const a=o[e];t[e]instanceof r.a?(a.favor=t[e].favor,isNaN(a.favor)&&(a.favor=0)):a.favor=0}}function l(t){o=JSON.parse(t,i.c)}},,,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"n",(function(){return NewIndustry})),__webpack_require__.d(__webpack_exports__,"m",(function(){return NewCity})),__webpack_require__.d(__webpack_exports__,"A",(function(){return UnlockUpgrade})),__webpack_require__.d(__webpack_exports__,"j",(function(){return LevelUpgrade})),__webpack_require__.d(__webpack_exports__,"i",(function(){return IssueDividends})),__webpack_require__.d(__webpack_exports__,"q",(function(){return SellMaterial})),__webpack_require__.d(__webpack_exports__,"r",(function(){return SellProduct})),__webpack_require__.d(__webpack_exports__,"x",(function(){return SetSmartSupply})),__webpack_require__.d(__webpack_exports__,"y",(function(){return SetSmartSupplyUseLeftovers})),__webpack_require__.d(__webpack_exports__,"e",(function(){return BuyMaterial})),__webpack_require__.d(__webpack_exports__,"b",(function(){return BulkPurchase})),__webpack_require__.d(__webpack_exports__,"s",(function(){return SellShares})),__webpack_require__.d(__webpack_exports__,"c",(function(){return BuyBackShares})),__webpack_require__.d(__webpack_exports__,"a",(function(){return AssignJob})),__webpack_require__.d(__webpack_exports__,"B",(function(){return UpgradeOfficeSize})),__webpack_require__.d(__webpack_exports__,"z",(function(){return ThrowParty})),__webpack_require__.d(__webpack_exports__,"o",(function(){return PurchaseWarehouse})),__webpack_require__.d(__webpack_exports__,"C",(function(){return UpgradeWarehouse})),__webpack_require__.d(__webpack_exports__,"d",(function(){return BuyCoffee})),__webpack_require__.d(__webpack_exports__,"h",(function(){return HireAdVert})),__webpack_require__.d(__webpack_exports__,"l",(function(){return MakeProduct})),__webpack_require__.d(__webpack_exports__,"p",(function(){return Research})),__webpack_require__.d(__webpack_exports__,"g",(function(){return ExportMaterial})),__webpack_require__.d(__webpack_exports__,"f",(function(){return CancelExportMaterial})),__webpack_require__.d(__webpack_exports__,"k",(function(){return LimitProductProduction})),__webpack_require__.d(__webpack_exports__,"t",(function(){return SetMaterialMarketTA1})),__webpack_require__.d(__webpack_exports__,"u",(function(){return SetMaterialMarketTA2})),__webpack_require__.d(__webpack_exports__,"v",(function(){return SetProductMarketTA1})),__webpack_require__.d(__webpack_exports__,"w",(function(){return SetProductMarketTA2}));var _MaterialSizes__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(175),_IndustryData__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(50),_Industry__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1031),_data_Constants__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(38),_OfficeSpace__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(376),_Product__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(401),_Warehouse__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(240),_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(149),_EmployeePositions__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(53),_IndustryUpgrades__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(318),_ResearchMap__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(281),_ui_Helpers__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(402);function NewIndustry(t,e,a){if(t.divisions.find(({type:t})=>e==t))throw new Error(`You have already expanded into the ${e} industry!`);for(let e=0;e_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.DividendMaxPercentage)throw new Error("Invalid value. Must be an integer between 0 and "+_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.DividendMaxPercentage);t.dividendPercentage=100*e}function SellMaterial(mat,amt,price){""===price&&(price="0"),""===amt&&(amt="0");let cost=price.replace(/\s+/g,"");cost=cost.replace(/[^-()\d/*+.MPe]/g,"");let temp=cost.replace(/MP/g,mat.bCost+"");try{temp=eval(temp)}catch(t){throw new Error("Invalid value or expression for sell price field: "+t)}if(null==temp||isNaN(parseFloat(temp))||parseFloat(temp)<0)throw new Error("Invalid value or expression for sell price field");if(cost.includes("MP")?mat.sCost=cost:mat.sCost=temp,amt=amt.toUpperCase(),amt.includes("MAX")||amt.includes("PROD")){let q=amt.replace(/\s+/g,"");q=q.replace(/[^-()\d/*+.MAXPROD]/g,"");let tempQty=q.replace(/MAX/g,mat.maxsll.toString());tempQty=tempQty.replace(/PROD/g,mat.prd.toString());try{tempQty=eval(tempQty)}catch(t){throw new Error("Invalid value or expression for sell quantity field: "+t)}if(null==tempQty||isNaN(parseFloat(tempQty))||parseFloat(tempQty)<0)throw new Error("Invalid value or expression for sell quantity field");mat.sllman[0]=!0,mat.sllman[1]=q}else{if(isNaN(parseFloat(amt))||parseFloat(amt)<0)throw new Error("Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'");{let t=parseFloat(amt);isNaN(t)&&(t=0),0===t?(mat.sllman[0]=!1,mat.sllman[1]=0):(mat.sllman[0]=!0,mat.sllman[1]=t)}}}function SellProduct(product,city,amt,price,all){if(price.includes("MP")){price=price.replace(/\s+/g,""),price=price.replace(/[^-()\d/*+.MP]/g,"");let temp=price.replace(/MP/g,"1");try{temp=eval(temp)}catch(t){throw new Error("Invalid value or expression for sell price field: "+t)}if(null==temp||isNaN(parseFloat(temp))||parseFloat(temp)<0)throw new Error("Invalid value or expression for sell price field.");product.sCost=price}else{const t=parseFloat(price);if(isNaN(t))throw new Error("Invalid value for sell price field");product.sCost=t}const cities=Object.keys(_Locations_Cities__WEBPACK_IMPORTED_MODULE_7__.a);if(amt=amt.toUpperCase(),amt.includes("MAX")||amt.includes("PROD")){let qty=amt.replace(/\s+/g,"");qty=qty.replace(/[^-()\d/*+.MAXPROD]/g,"");let temp=qty.replace(/MAX/g,product.maxsll.toString());temp=temp.replace(/PROD/g,product.data[city][1].toString());try{temp=eval(temp)}catch(t){throw new Error("Invalid value or expression for sell quantity field: "+t)}if(null==temp||isNaN(parseFloat(temp))||parseFloat(temp)<0)throw new Error("Invalid value or expression for sell quantity field");if(all)for(let t=0;t=o))throw new Error("You cannot afford this purchase.");t.funds=t.funds-o,a.qty+=n}function SellShares(t,e,a){if(isNaN(a))throw new Error("Invalid value for number of shares");if(a<0)throw new Error("Invalid value for number of shares");if(a>t.numShares)throw new Error("You don't have that many shares to sell!");if(!t.public)throw new Error("You haven't gone public!");if(t.shareSaleCooldown)throw new Error("Share sale on cooldown!");const n=t.calculateShareSale(a),r=n[0],i=n[1],o=n[2];return t.numShares-=a,t.issuedShares+=a,t.sharePrice=i,t.shareSalesUntilPriceUpdate=o,t.shareSaleCooldown=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SellSharesCooldown,e.gainMoney(r,"corporation"),r}function BuyBackShares(t,e,a){if(isNaN(a))throw new Error("Invalid value for number of shares");if(a<0)throw new Error("Invalid value for number of shares");if(a>t.issuedShares)throw new Error("You don't have that many shares to buy!");if(!t.public)throw new Error("You haven't gone public!");const n=1.1*t.sharePrice;if(e.money=o)throw new Error(`You are already at the max products (${o}) for division: ${e.name}!`);const l=new _Product__WEBPACK_IMPORTED_MODULE_5__.a({name:n.replace(/[<>]/g,""),createCity:a,designCost:r,advCost:i});if(s[l.name]instanceof _Product__WEBPACK_IMPORTED_MODULE_5__.a)throw new Error("You already have a product with this name!");t.funds=t.funds-(r+i),s[l.name]=l}function Research(t,e){const a=_IndustryData__WEBPACK_IMPORTED_MODULE_1__.c[t.type];if(void 0===a)throw new Error(`No research tree for industry '${t.type}'`);if(!a.getAllNodes().includes(e))throw new Error(`No research named '${e}'`);const n=_ResearchMap__WEBPACK_IMPORTED_MODULE_10__.a[e];if(t.sciResearch.qty{var e;null!=i[(e=t).name]&&console.warn("Duplicate Company Position being defined: "+e.name),i[e.name]=new r.a(e)})},,function(t,e,a){"use strict";a.d(e,"b",(function(){return xt})),a.d(e,"a",(function(){return Lt}));var n=a(0),r=a.n(n),i=a(141),o=a(108),s=a(345),l=a(11),c=a(218),f=a(44),u=a(1049),m=a(374),h=a(340),d=a(16),p=a(26),g=a(29),y=a(245),b=a(101),E=a(113),v=a(137),k=a(21),_=a(1),w=a(27),S=a(1052),C=a(1056),x=a(1079),L=a(1087),O=a(1111),M=a(1142),T=a(1161),A=a(1196),R=a(587),N=a(1209),P=a(1210),I=a(1254),F=a(1262),D=a(1271),j=a(1296),B=a(404),G=a(622),W=a(1322),H=a(1323),U=a(1329),q=a(1330),$=a(405),K=a(1341),z=a(1351),V=a(621),Y=a(1353),J=a(1362),X=a(1365),Q=a(119),Z=a(296),tt=a(1370),et=a(182),at=a(1371),nt=a(140),rt=a(181),it=a(338),ot=a(400),st=a(577),lt=a(295),ct=a(299),ft=a(30),ut=a(408),mt=a(1373),ht=a(1376),dt=a(9),pt=a(1377),gt=a(1382),yt=a(1387),bt=a(1388),Et=a.n(bt),vt=a(1389),kt=a.n(vt),_t=a(1390);const wt=location,St=Object(E.a)(t=>Object(v.a)({root:{"-ms-overflow-style":"none","scrollbar-width":"none",margin:t.spacing(0),flexGrow:1,display:"block",padding:"8px",minHeight:"100vh",boxSizing:"border-box"}})),Ct=()=>{throw new Error("Router called before initialization")};let xt={isInitialized:!1,page:Ct,allowRouting:Ct,toActiveScripts:Ct,toAugmentations:Ct,toBitVerse:Ct,toBladeburner:Ct,toStats:Ct,toCity:Ct,toCorporation:Ct,toCreateProgram:Ct,toDevMenu:Ct,toFaction:Ct,toFactions:Ct,toGameOptions:Ct,toGang:Ct,toHacknetNodes:Ct,toInfiltration:Ct,toJob:Ct,toMilestones:Ct,toGrafting:Ct,toScriptEditor:Ct,toSleeves:Ct,toStockMarket:Ct,toTerminal:Ct,toTravel:Ct,toTutorial:Ct,toWork:Ct,toBladeburnerCinematic:Ct,toLocation:Ct,toStaneksGift:Ct,toAchievements:Ct,toThemeBrowser:Ct,toImportSave:Ct};function Lt({player:t,engine:e,terminal:a}){const E=St(),[{files:v,vim:bt},vt]=Object(n.useState)({files:{},vim:!1}),[Ct,Lt]=Object(n.useState)(function(t){return ut.b?w.a.Recovery:t.isWorking?w.a.Work:w.a.Terminal}(t)),Ot=Object(n.useState)(0)[1],[Mt,Tt]=Object(n.useState)(!1),[At,Rt]=Object(n.useState)(t.currentWorkFactionName?g.a[t.currentWorkFactionName]:void 0);if(void 0===At&&Ct===w.a.Faction)throw new Error("Trying to go to a page without the proper setup");const[Nt,Pt]=Object(n.useState)(!1),[It,Ft]=Object(n.useState)(!1),[Dt,jt]=Object(n.useState)(void 0);if(void 0===Dt&&(Ct===w.a.Infiltration||Ct===w.a.Location||Ct===w.a.Job))throw new Error("Trying to go to a page without the proper setup");const[Bt,Gt]=Object(n.useState)(""),[Wt,Ht]=Object(n.useState)(0),[Ut,qt]=Object(n.useState)(dt.a.IsSidebarOpened),[$t,Kt]=Object(n.useState)(void 0),[zt,Vt]=Object(n.useState)(!1);if(void 0===$t&&Ct===w.a.ImportSave)throw new Error("Trying to go to a page without the proper setup");const[Yt,Jt]=Object(n.useState)(!0);function Xt(){Ot(t=>t+1)}function Qt(){for(const t of Object(p.c)())t.runningScripts=[];o.c.saveGame(),setTimeout(()=>wt.reload(),2e3)}function Zt(){Object(d.a)("Soft Reset!"),Object(h.a)(),Ht(Wt+1),xt.toTerminal()}Object(n.useEffect)(()=>m.a.subscribe(Xt),[]),xt={isInitialized:!0,page:()=>Ct,allowRouting:t=>Jt(t),toActiveScripts:()=>Lt(w.a.ActiveScripts),toAugmentations:()=>Lt(w.a.Augmentations),toBladeburner:()=>Lt(w.a.Bladeburner),toStats:()=>Lt(w.a.Stats),toCorporation:()=>Lt(w.a.Corporation),toCreateProgram:()=>Lt(w.a.CreateProgram),toDevMenu:()=>Lt(w.a.DevMenu),toFaction:(t,e=!1)=>{Tt(e),Lt(w.a.Faction),t&&Rt(t)},toFactions:()=>Lt(w.a.Factions),toGameOptions:()=>Lt(w.a.Options),toGang:()=>Lt(w.a.Gang),toHacknetNodes:()=>Lt(w.a.Hacknet),toMilestones:()=>Lt(w.a.Milestones),toGrafting:()=>Lt(w.a.Grafting),toScriptEditor:(t,e)=>{vt({files:t,vim:!(null==e||!e.vim)}),Lt(w.a.ScriptEditor)},toSleeves:()=>Lt(w.a.Sleeves),toStockMarket:()=>Lt(w.a.StockMarket),toTerminal:()=>Lt(w.a.Terminal),toTutorial:()=>Lt(w.a.Tutorial),toJob:()=>{jt(c.a[t.companyName]),Lt(w.a.Job)},toCity:()=>{Lt(w.a.City)},toTravel:()=>{t.gotoLocation(l.a.TravelAgency),Lt(w.a.Travel)},toBitVerse:(t,e)=>{Pt(t),Ft(e),Object(lt.b)(),Lt(w.a.BitVerse)},toInfiltration:t=>{jt(t),Lt(w.a.Infiltration)},toWork:()=>Lt(w.a.Work),toBladeburnerCinematic:()=>{Lt(w.a.BladeburnerCinematic),Gt(Bt)},toLocation:t=>{jt(t),Lt(w.a.Location)},toStaneksGift:()=>{Lt(w.a.StaneksGift)},toAchievements:()=>{Lt(w.a.Achievements)},toThemeBrowser:()=>{Lt(w.a.ThemeBrowser)},toImportSave:(t,e=!1)=>{Kt(t),Vt(e),Lt(w.a.ImportSave)}},Object(n.useEffect)(()=>{kt()(xt).filter(t=>t.startsWith("to")).forEach(t=>{xt[t]=Et()(xt[t],(e,...a)=>{if(Yt)return e(...a);console.log(`Routing is currently disabled - Attempted router.${t}()`)})})}),Object(n.useEffect)(()=>{Ct!==w.a.Terminal&&window.scrollTo(0,0)});let te=r.a.createElement(_.a,null,"Cannot load"),ee=!0,ae=!0,ne=!1;switch(Ct){case w.a.Recovery:te=r.a.createElement(ut.c,{router:xt,softReset:Zt}),ee=!1,ae=!1,ne=!0;break;case w.a.BitVerse:te=r.a.createElement(J.a,{flume:Nt,enter:ct.a,quick:It}),ee=!1,ae=!1;break;case w.a.Infiltration:te=r.a.createElement(A.a,{location:Dt}),ee=!1,ae=!1;break;case w.a.BladeburnerCinematic:te=r.a.createElement(tt.a,null),ee=!1,ae=!1;break;case w.a.Work:te=r.a.createElement(N.a,null),ee=!1;break;case w.a.Terminal:te=r.a.createElement(H.a,{terminal:a,router:xt,player:t});break;case w.a.Sleeves:te=r.a.createElement(I.a,null);break;case w.a.StaneksGift:te=r.a.createElement(X.a,{staneksGift:Q.b});break;case w.a.Stats:te=r.a.createElement(z.a,null);break;case w.a.ScriptEditor:te=r.a.createElement(G.a,{files:v,hostname:t.getCurrentServer().hostname,player:t,router:xt,vim:bt});break;case w.a.ActiveScripts:te=r.a.createElement(q.a,{workerScripts:et.a});break;case w.a.Hacknet:te=r.a.createElement(F.a,{player:t});break;case w.a.CreateProgram:te=r.a.createElement(B.a,null);break;case w.a.Factions:te=r.a.createElement($.a,{player:t,router:xt});break;case w.a.Faction:te=r.a.createElement(K.a,{faction:At,augPage:Mt});break;case w.a.Milestones:te=r.a.createElement(W.a,{player:t});break;case w.a.Tutorial:te=r.a.createElement(U.a,{reactivateTutorial:()=>{Object(h.a)(),xt.toTerminal(),Object(f.e)()}});break;case w.a.DevMenu:te=r.a.createElement(L.a,{player:t,engine:e,router:xt});break;case w.a.Gang:te=r.a.createElement(M.a,null);break;case w.a.Corporation:te=r.a.createElement(T.a,null);break;case w.a.Bladeburner:te=r.a.createElement(O.a,null);break;case w.a.Grafting:te=r.a.createElement(R.a,null);break;case w.a.Travel:te=r.a.createElement(V.a,{p:t,router:xt});break;case w.a.StockMarket:te=r.a.createElement(Y.a,{buyStockLong:y.a,buyStockShort:y.d,cancelOrder:b.c,eventEmitterForReset:b.e,initStockMarket:b.g,p:t,placeOrder:b.j,sellStockLong:y.c,sellStockShort:y.b,stockMarket:b.a});break;case w.a.City:te=r.a.createElement(j.a,null);break;case w.a.Job:case w.a.Location:te=r.a.createElement(D.a,{loc:Dt});break;case w.a.Options:te=r.a.createElement(P.a,{player:t,router:xt,save:()=>o.c.saveGame(),export:()=>{Object(s.c)(t),o.c.exportGame()},forceKill:Qt,softReset:Zt});break;case w.a.Augmentations:te=r.a.createElement(x.a,{exportGameFn:()=>{Object(s.c)(t),o.c.exportGame()},installAugmentationsFn:()=>{Object(i.e)(),xt.toTerminal()}});break;case w.a.Achievements:te=r.a.createElement(mt.a,null);break;case w.a.ThemeBrowser:te=r.a.createElement(pt.a,{router:xt});break;case w.a.ImportSave:te=r.a.createElement(gt.a,{importString:$t,automatic:zt,router:xt}),ee=!1,ae=!1,ne=!0}return r.a.createElement(ft.a.Player.Provider,{value:t},r.a.createElement(ft.a.Router.Provider,{value:xt},r.a.createElement(ht.a,{key:Wt,router:xt,softReset:Zt},r.a.createElement(yt.a,{content:ne?te:null},r.a.createElement(nt.c,null,r.a.createElement(S.a,{mode:f.a.isRunning?"tutorial":"overview"},f.a.isRunning?r.a.createElement(u.a,null):r.a.createElement(Z.a,{save:()=>o.c.saveGame(),killScripts:Qt})),ee?r.a.createElement(k.a,{display:"flex",flexDirection:"row",width:"100%"},r.a.createElement(C.a,{player:t,router:xt,page:Ct,opened:Ut,onToggled:t=>{qt(t),dt.a.IsSidebarOpened=t}}),r.a.createElement(k.a,{className:E.root},te)):r.a.createElement(k.a,{className:E.root},te),r.a.createElement(at.a,null),ae&&r.a.createElement(r.a.Fragment,null,r.a.createElement(rt.c,null),r.a.createElement(it.b,null),r.a.createElement(ot.b,null),r.a.createElement(st.b,null),r.a.createElement(nt.a,null)),r.a.createElement(_t.a,null))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(11);const r={};r[n.a.AevumECorp]="ECP",r[n.a.Sector12MegaCorp]="MGCP",r[n.a.Sector12BladeIndustries]="BLD",r[n.a.AevumClarkeIncorporated]="CLRK",r[n.a.VolhavenOmniTekIncorporated]="OMTK",r[n.a.Sector12FourSigma]="FSIG",r[n.a.ChongqingKuaiGongInternational]="KGI",r[n.a.AevumFulcrumTechnologies]="FLCM",r[n.a.IshimaStormTechnologies]="STM",r[n.a.NewTokyoDefComm]="DCOMM",r[n.a.VolhavenHeliosLabs]="HLS",r[n.a.NewTokyoVitaLife]="VITA",r[n.a.Sector12IcarusMicrosystems]="ICRS",r[n.a.Sector12UniversalEnergy]="UNV",r[n.a.AevumAeroCorp]="AERO",r[n.a.VolhavenOmniaCybersystems]="OMN",r[n.a.ChongqingSolarisSpaceSystems]="SLRS",r[n.a.NewTokyoGlobalPharmaceuticals]="GPH",r[n.a.IshimaNovaMedical]="NVMD",r[n.a.AevumWatchdogSecurity]="WDS",r[n.a.VolhavenLexoCorp]="LXO",r[n.a.AevumRhoConstruction]="RHOC",r[n.a.Sector12AlphaEnterprises]="APHE",r[n.a.VolhavenSysCoreSecurities]="SYSC",r[n.a.VolhavenCompuTek]="CTK",r[n.a.AevumNetLinkTechnologies]="NTLK",r[n.a.IshimaOmegaSoftware]="OMGA",r[n.a.Sector12FoodNStuff]="FNS",r[n.a.Sector12JoesGuns]="JGN",r["Sigma Cosmetics"]="SGC",r["Catalyst Ventures"]="CTYS",r["Microdyne Technologies"]="MDYN",r["Titan Laboratories"]="TITN"},function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return r}));const n=[".js",".script",".ns"];function r(t){return n.some(e=>t.endsWith(e))}},function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"e",(function(){return s})),a.d(e,"d",(function(){return l})),a.d(e,"a",(function(){return c})),a.d(e,"f",(function(){return f}));var n=a(6),r=a(280);function i(t,e){const a=(100-t.hackDifficulty)/100,n=1.75*e.hacking,i=(n-t.requiredHackingSkill)/n*a*e.hacking_chance_mult*Object(r.a)(e.intelligence,1);return i>1?1:i<0?0:i}function o(t,e){null==t.baseDifficulty&&(t.baseDifficulty=t.hackDifficulty);let a=3;return a+=.3*t.baseDifficulty,a*e.hacking_exp_mult*n.a.HackExpGain}function s(t,e){const a=(100-t.hackDifficulty)/100*((e.hacking-(t.requiredHackingSkill-1))/e.hacking)*e.hacking_money_mult*n.a.ScriptHackMoney/240;return a<0?0:a>1?1:a}function l(t,e){let a=2.5*(t.requiredHackingSkill*t.hackDifficulty)+500;a/=e.hacking+50;return 5*a/(e.hacking_speed_mult*Object(r.a)(e.intelligence,1))}function c(t,e){return 3.2*l(t,e)}function f(t,e){return 4*l(t,e)}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return g})),a.d(e,"b",(function(){return y})),a.d(e,"j",(function(){return b})),a.d(e,"c",(function(){return E})),a.d(e,"i",(function(){return v})),a.d(e,"d",(function(){return k})),a.d(e,"f",(function(){return _})),a.d(e,"h",(function(){return w})),a.d(e,"k",(function(){return C})),a.d(e,"g",(function(){return x})),a.d(e,"e",(function(){return L}));var n=a(749),r=a(328),i=a(148),o=a(647),s=a(1017),l=a(112),c=a(76),f=a(97),u=a(8),m=a(131),h=a(4),d=a(16),p=a(25);let g={lastUpdate:0,Orders:{},storedCycles:0,ticksUntilCycle:0};const y={};function b(t,e,a,o,s,l=null){if(!(t instanceof i.a))return l?l.log("stock.placeOrder",()=>`Invalid stock: '${t}'`):Object(d.a)("ERROR: Invalid stock passed to placeOrder() function"),!1;if("number"!=typeof e||"number"!=typeof a)return l?l.log("stock.placeOrder",()=>`Invalid arguments: shares='${e}' price='${a}'`):Object(d.a)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;const c=new n.a(t.symbol,e,a,o,s);if(null==g.Orders){const t={};for(const e of Object.keys(g)){const a=g[e];a instanceof i.a&&(t[a.symbol]=[])}g.Orders=t}g.Orders[t.symbol].push(c);const f={stockMarket:g,symbolToStockMap:y};return Object(r.a)(t,c.type,c.pos,f),!0}function E(t,e=null){if(null==g.Orders)return!1;if(t.order&&t.order instanceof n.a){const e=t.order,a=g.Orders[e.stockSymbol];for(let t=0;t=e.cap&&(o=.1,e.b=!1),isNaN(o)&&(o=.5);const s=Math.random(),f={stockMarket:g,symbolToStockMap:y};st);f.a.factions.sort((t,a)=>e.indexOf(t)-e.indexOf(a));const a=t.getInfo();for(const t of a.enemies)c.a[t]instanceof l.a&&(c.a[t].isBanned=!0);for(let e=0;e0)for(let a=0;a=t.baseCost*l.augmentationPriceMult){const e=new r.a(t.name);if(t.name==i.a.NeuroFluxGovernor&&(e.level=_()),f.a.queuedAugmentations.push(e),f.a.loseMoney(t.baseCost*l.augmentationPriceMult,"augmentations"),t.name==i.a.NeuroFluxGovernor){let e=_();--e;const a=Math.pow(s.a.NeuroFluxGovernorLevelMult,e);t.baseRepRequirement=500*a*o.a.AugmentationRepCost,t.baseCost=75e4*a*o.a.AugmentationMoneyCost;for(let e=0;e{if(t.hasGangWith(e.name)){let a=Object.values(n.a);a=a.filter(t=>!t.isSpecial);const r=[i.a.NeuroFluxGovernor];2!==t.bitNodeN&&r.push(i.a.TheRedPill);const s=Object(y.b)(`BN${t.bitNodeN}.${t.sourceFileLvl(t.bitNodeN)}`),l=t=>t.factions.length>1||(!!e.augmentations.includes(t.name)||s()>=1-o.a.GangUniqueAugs);return a=a.filter(l),a=a.filter(t=>!r.includes(t.name)),a.map(t=>t.name)}return e.augmentations.slice()}},function(t,e,a){"use strict";let n;a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),function(t){t.Bypass="Bypass",t.PrototypeTampering="PrototypeTampering",t.Unclickable="Unclickable",t.UndocumentedFunctionCall="UndocumentedFunctionCall",t.TimeCompression="TimeCompression",t.RealityAlteration="RealityAlteration",t.N00dles="N00dles",t.YoureNotMeantToAccessThis="YoureNotMeantToAccessThis",t.TrueRecursion="TrueRecursion",t.INeedARainbow="INeedARainbow",t.EditSaveFile="EditSaveFile"}(n||(n={}));const r={Bypass:"by circumventing the ram cost of document.",EditSaveFile:"by editing your save file.",PrototypeTampering:"by tampering with Numbers prototype.",TimeCompression:"by compressing time.",Unclickable:"by clicking the unclickable.",UndocumentedFunctionCall:"by looking beyond the documentation.",RealityAlteration:"by altering reality to suit your whims.",N00dles:"by harnessing the power of the n00dles.",YoureNotMeantToAccessThis:"by accessing the dev menu.",TrueRecursion:"by truly recursing.",INeedARainbow:"by using the power of the rainbow."};function i(t){return r[t]}function o(t){return t=t.filter(t=>Object.keys(n).includes(t)),[...new Set(t)]}},,function(t,e,a){"use strict";a.d(e,"c",(function(){return R})),a.d(e,"b",(function(){return O})),a.d(e,"a",(function(){return A}));var n=a(152),r=a(66),i=a(8),o=a(29),s=a(80),l=a(267),c=a(2),f=a(26),u=a(9),m=a(82),h=a(101),d=a(119),p=a(140),g=a(345),y=a(16),b=a(25),E=a(341),v=a(1046),k=a(15),_=a(361),w=a(11),S=a(576),C=a(293);function x(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class L{constructor(){x(this,"PlayerSave",""),x(this,"AllServersSave",""),x(this,"CompaniesSave",""),x(this,"FactionsSave",""),x(this,"AliasesSave",""),x(this,"GlobalAliasesSave",""),x(this,"MessagesSave",""),x(this,"StockMarketSave",""),x(this,"SettingsSave",""),x(this,"VersionSave",""),x(this,"AllGangsSave",""),x(this,"LastExportBonus",""),x(this,"StaneksGiftSave","")}getSaveString(t=!1){this.PlayerSave=JSON.stringify(c.a),this.AllServersSave=Object(f.j)(t),this.CompaniesSave=JSON.stringify(r.a),this.FactionsSave=JSON.stringify(o.a),this.AliasesSave=JSON.stringify(n.a),this.GlobalAliasesSave=JSON.stringify(n.b),this.MessagesSave=JSON.stringify(l.a),this.StockMarketSave=JSON.stringify(h.a),this.SettingsSave=JSON.stringify(u.a),this.VersionSave=JSON.stringify(i.a.VersionNumber),this.LastExportBonus=JSON.stringify(g.a),this.StaneksGiftSave=JSON.stringify(d.b),c.a.inGang()&&(this.AllGangsSave=JSON.stringify(s.a));return btoa(unescape(encodeURIComponent(JSON.stringify(this))))}saveGame(t=!0){const e=(new Date).getTime();c.a.lastSave=e;const a=this.getSaveString(u.a.ExcludeRunningScriptsFromSave);return new Promise((n,r)=>{Object(E.c)(a).then(()=>{const r={playerIdentifier:c.a.identifier,fileName:this.getSaveFileName(),save:a,savedOn:e};return Object(C.d)(r),t&&p.b.emit("Game Saved!","info",2e3),n()}).catch(t=>(console.error(t),r()))})}getSaveFileName(t=!1){const e=Math.round(Date.now()/1e3),a=c.a.bitNodeN;let n=`bitburnerSave_${e}_BN${a}x${m.a[a]}.json`;return t&&(n="RECOVERY"+n),n}exportGame(){const t=this.getSaveString(u.a.ExcludeRunningScriptsFromSave);A(this.getSaveFileName(),t)}importGame(t,e=!0){if(!t||""===t)throw new Error("Invalid import string");return Object(E.c)(t).then(()=>(e&&setTimeout(()=>location.reload(),1e3),Promise.resolve()))}getImportStringFromFile(t){if(null===t)return Promise.reject(new Error("No file selected"));const e=t[0];if(!e)return Promise.reject(new Error("Invalid file selected"));const a=new FileReader,n=new Promise((t,e)=>{a.onload=function(a){const n=a.target;if(null===n)return e(new Error("Error importing file"));const r=n.result;if("string"!=typeof r)return e(new Error("FileReader event was not type string"));t(r)}});return a.readAsText(e),n}async getImportDataFromString(t){var e,a,n,r,i,o,s,l;if(!t||""===t)throw new Error("Invalid import string");let f,u;try{f=window.atob(t),f=f.trim()}catch(t){console.error(t)}if(!f||""===f)return Promise.reject(new Error("Save game had not content or was not base64 encoded"));try{u=JSON.parse(f)}catch(t){console.log(t)}if(!u||"BitburnerSaveObject"!==u.ctor||!u.data)return Promise.reject(new Error("Save game did not seem valid"));const m={base64:t,parsed:u},h=S.a.fromJSON(JSON.parse(u.data.PlayerSave)),d={identifier:h.identifier,lastSave:h.lastSave,totalPlaytime:h.totalPlaytime,money:h.money,hacking:h.hacking,augmentations:null!==(e=null===(a=h.augmentations)||void 0===a?void 0:a.reduce((t,e)=>t+e.level,0))&&void 0!==e?e:0,factions:null!==(n=null===(r=h.factions)||void 0===r?void 0:r.length)&&void 0!==n?n:0,achievements:null!==(i=null===(o=h.achievements)||void 0===o?void 0:o.length)&&void 0!==i?i:0,bitNode:h.bitNodeN,bitNodeLevel:h.sourceFileLvl(c.a.bitNodeN)+1,sourceFiles:null!==(s=null===(l=h.sourceFiles)||void 0===l?void 0:l.reduce((t,e)=>t+e.lvl,0))&&void 0!==s?s:0};return m.playerData=d,Promise.resolve(m)}toJSON(){return Object(b.b)("BitburnerSaveObject",this)}static fromJSON(t){return Object(b.a)(L,t.data)}}function O(t){if(-1!==navigator.userAgent.indexOf("wv")&&-1!==navigator.userAgent.indexOf("Chrome/")&&setInterval(()=>{Object(y.a)("SCAM ALERT. This app is not official and you should uninstall it.")},1e3),!t)return!1;t=decodeURIComponent(escape(atob(t)));const e=JSON.parse(t,b.c);if(Object(c.b)(e.PlayerSave),Object(f.h)(e.AllServersSave),Object(r.c)(e.CompaniesSave),Object(o.d)(e.FactionsSave),e.hasOwnProperty("StaneksGiftSave")?Object(d.a)(e.StaneksGiftSave):(console.warn("Could not load Staneks Gift from save"),Object(d.a)("")),e.hasOwnProperty("AliasesSave"))try{Object(n.c)(e.AliasesSave)}catch(t){console.warn("Could not load Aliases from save"),Object(n.c)("")}else console.warn("Save file did not contain an Aliases property"),Object(n.c)("");if(e.hasOwnProperty("GlobalAliasesSave"))try{Object(n.d)(e.GlobalAliasesSave)}catch(t){console.warn("Could not load GlobalAliases from save"),Object(n.d)("")}else console.warn("Save file did not contain a GlobalAliases property"),Object(n.d)("");if(e.hasOwnProperty("MessagesSave"))try{Object(l.d)(e.MessagesSave)}catch(t){console.warn("Could not load Messages from save"),Object(l.c)()}else console.warn("Save file did not contain a Messages property"),Object(l.c)();if(e.hasOwnProperty("StockMarketSave"))try{Object(h.i)(e.StockMarketSave)}catch(t){Object(h.i)("")}else Object(h.i)("");if(e.hasOwnProperty("SettingsSave"))try{u.a.load(e.SettingsSave)}catch(t){console.error("ERROR: Failed to parse Settings. Re-initing default values"),u.a.init()}else u.a.init();if(e.hasOwnProperty("LastExportBonus"))try{g.d(JSON.parse(e.LastExportBonus))}catch(t){g.d((new Date).getTime()),console.error("ERROR: Failed to parse last export bonus Settings "+t)}if(c.a.inGang()&&e.hasOwnProperty("AllGangsSave"))try{Object(s.b)(e.AllGangsSave)}catch(t){console.error("ERROR: Failed to parse AllGangsSave: "+t)}if(e.hasOwnProperty("VersionSave"))try{const t=JSON.parse(e.VersionSave,b.c);!function(t){const e=c.a;if("string"==typeof t){if(t<="0.41.2"){null!=e.companyPosition&&"string"!=typeof e.companyPosition&&(e.companyPosition=e.companyPosition.data.positionName,null==e.companyPosition&&(e.companyPosition=""));for(const t of Object.keys(r.a)){const e=r.a[t];if(0==e.name&&null!=e.companyName&&(e.name=e.companyName),e.companyPositions instanceof Array){const t={};for(let a=0;at.name===k.a.NeuroFluxGovernor);if(t)t.level+=10;else{const t=new _.a(k.a.NeuroFluxGovernor);t.level=10,c.a.augmentations.push(t)}c.a.reapplyAllAugmentations(!0),c.a.reapplyAllSourceFiles()}if(t<3&&(e.money=parseFloat(e.money),e.corporation)){e.corporation.funds=parseFloat(e.corporation.funds),e.corporation.revenue=parseFloat(e.corporation.revenue),e.corporation.expenses=parseFloat(e.corporation.expenses);for(let t=0;t0)for(const t of e.sleeves)if(t.augmentations&&0!==t.augmentations.length)for(const e of t.augmentations)"Graphene BranchiBlades Upgrade"===e.name&&(e.name="Graphene BrachiBlades Upgrade");t<12&&void 0!==e.resleeves&&delete e.resleeves}}(t),window.location.href.toLowerCase().includes("bitburner-beta")?Object(y.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).

"+i.a.LatestUpdate,M):t!==i.a.VersionNumber&&T()}catch(t){T()}else T();return!0}const M={"& h1, & h2, & h3, & h4, & p, & a, & ul":{margin:0,color:u.a.theme.primary,whiteSpace:"initial"},"& ul":{paddingLeft:"1.5em",lineHeight:1.5}};function T(){setTimeout(()=>Object(y.a)("New update!
Please report any bugs/issues through the github repository or the Bitburner subreddit (reddit.com/r/bitburner).

"+i.a.LatestUpdate,M),1e3)}function A(t,e){const a=new Blob([e],{type:"text/plain"}),n=window.navigator;if(n.msSaveOrOpenBlob)n.msSaveOrOpenBlob(a,t);else{const e=document.createElement("a"),n=URL.createObjectURL(a);e.href=n,e.download=t,document.body.appendChild(e),e.click(),setTimeout((function(){document.body.removeChild(e),window.URL.revokeObjectURL(n)}),0)}}b.c.constructors.BitburnerSaveObject=L;const R=new L},function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return o})),a.d(e,"d",(function(){return s})),a.d(e,"a",(function(){return l}));var n=a(147),r=a(26);function i(t,e){return e.delayReject&&e.delayReject(),new Promise((function(a,n){e.delay=window.setTimeout(()=>{e.delay=null,e.delayReject=void 0,e.env.stopFlag?n(e):a()},t),e.delayReject=n}))}function o(t,e){const a=Object(r.d)(t.hostname);if(null==a)throw new Error("WorkerScript constructed with invalid server ip: "+t.hostname);for(const a of t.scriptRef.dependencies){var n,i;e=null!==(n=null===(i=e)||void 0===i?void 0:i.replace(new RegExp(a.url,"g"),a.filename))&&void 0!==n?n:e}return"|DELIMITER|"+a.hostname+"|DELIMITER|"+t.name+"|DELIMITER|"+e}function s(t,e,a){const n=t.scriptRef.threads;if(!a)return isNaN(n)||n<1?1:n;const r=0|a;if(isNaN(a)||r<1)throw o(t,`Invalid thread count passed to ${e}: ${a}. Threads must be a positive number.`);if(r>n)throw o(t,`Too many threads requested by ${e}. Requested: ${a}. Has: ${n}.`);return r}function l(t){if(!Object(n.a)(t))return!1;return 4==t.split("|DELIMITER|").length}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(4),o=a(20);function s({money:t}){return r.a.createElement(o.a,{money:i.a.formatMoney(t)+" / sec"})}},function(t,e,a){"use strict";a.d(e,"d",(function(){return s})),a.d(e,"c",(function(){return l})),a.d(e,"b",(function(){return c})),a.d(e,"a",(function(){return f}));var n=a(949),r=a(25),i=a(561);class o{constructor(t,e,a,n,r,i){this.name=t,this.desc=e,this.generate=a,this.solver=n,this.difficulty=r,this.numTries=i}}const s={};for(const t of n.a)s[t.name]=new o(t.name,t.desc,t.gen,t.solver,t.difficulty,t.numTries);let l,c;!function(t){t[t.FactionReputation=0]="FactionReputation",t[t.FactionReputationAll=1]="FactionReputationAll",t[t.CompanyReputation=2]="CompanyReputation",t[t.Money=3]="Money"}(l||(l={})),function(t){t[t.Success=0]="Success",t[t.Failure=1]="Failure",t[t.Cancelled=2]="Cancelled"}(c||(c={}));class f{constructor(t="",e="Find Largest Prime Factor",a=null){var n,r,i;if(i=0,(r="tries")in(n=this)?Object.defineProperty(n,r,{value:i,enumerable:!0,configurable:!0,writable:!0}):n[r]=i,this.fn=t,this.fn.endsWith(".cct")||(this.fn+=".cct"),null==s[e])throw new Error(`Error: invalid contract type: ${e} please contact developer`);this.type=e,this.data=s[e].generate(),this.reward=a}getData(){return this.data}getDescription(){return s[this.type].desc(this.data)}getDifficulty(){return s[this.type].difficulty}getMaxNumTries(){return s[this.type].numTries}getType(){return s[this.type].name}isSolution(t){return s[this.type].solver(this.data,t)}async prompt(){return new Promise(t=>{const e={c:this,onClose:()=>{t(c.Cancelled)},onAttempt:e=>{this.isSolution(e)?t(c.Success):t(c.Failure)}};i.a.emit(e)})}toJSON(){return Object(r.b)("CodingContract",this)}static fromJSON(t){return Object(r.a)(f,t.data)}}r.c.constructors.CodingContract=f},function(t,e,a){"use strict";let n;a.d(e,"a",(function(){return n})),function(t){t.LimitBuy="Limit Buy Order",t.LimitSell="Limit Sell Order",t.StopBuy="Stop Buy Order",t.StopSell="Stop Sell Order"}(n||(n={}))},,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a(4),i=a(113),o=a(137);const s=Object(i.a)(t=>Object(o.a)({reputation:{color:t.colors.rep}}));function l({reputation:t}){const e=s();return n.createElement("span",{className:e.reputation},"number"==typeof t?r.a.formatReputation(t):t)}},,,function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return o}));var n=a(25),r=a(750);let i=new r.a;function o(t){i=t?JSON.parse(t,n.c):new r.a}},,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(597),o=a.n(i),s=a(1091),l=a.n(s),c=a(114),f=a(598),u=a.n(f),m=a(593),h=a.n(m),d=a(81),p=a(23);function g(t){const[e,a]=Object(n.useState)("");const{label:i,placeholder:s,add:f,subtract:m,reset:g,tons:y}=t;return r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{label:i,value:e,onChange:function(t){""===t.target.value?a(""):a(parseFloat(t.target.value))},placeholder:s,type:"number",InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{title:"Add a lot"},r.a.createElement(c.a,{onClick:y,size:"large"},r.a.createElement(h.a,{style:{transform:"rotate(-90deg)"}}))),r.a.createElement(p.a,{title:"Add"},r.a.createElement(c.a,{onClick:()=>f("string"!=typeof e?e:0),size:"large"},r.a.createElement(o.a,null)))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{title:"Remove"},r.a.createElement(c.a,{onClick:()=>m("string"!=typeof e?e:0),size:"large"},r.a.createElement(l.a,null))),r.a.createElement(p.a,{title:"Reset"},r.a.createElement(c.a,{onClick:g,size:"large"},r.a.createElement(u.a,null))))}}))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return l}));var n=a(281),r=a(644);function i(t){const e=n.a[t];if(null==e)throw new Error("Invalid research name: "+t);return new r.a({text:e.name,cost:e.cost})}function o(){const t=i("Hi-Tech R&D Laboratory"),e=i("AutoBrew"),a=i("AutoPartyManager"),n=i("Automatic Drug Administration"),r=i("Bulk Purchasing"),o=i("CPH4 Injections"),s=i("Drones"),l=i("Drones - Assembly"),c=i("Drones - Transport"),f=i("Go-Juice"),u=i("HRBuddy-Recruitment"),m=i("HRBuddy-Training"),h=i("JoyWire"),d=i("Market-TA.I"),p=i("Market-TA.II"),g=i("Overclock"),y=i("Self-Correcting Assemblers"),b=i("Sti.mu");return n.addChild(f),n.addChild(o),s.addChild(l),s.addChild(c),u.addChild(m),d.addChild(p),g.addChild(b),t.addChild(e),t.addChild(a),t.addChild(n),t.addChild(r),t.addChild(s),t.addChild(u),t.addChild(h),t.addChild(d),t.addChild(g),t.addChild(y),t}function s(){const t=new r.b;return t.setRoot(o()),t}function l(){const t=new r.b,e=o(),a=i("uPgrade: Fulcrum"),n=i("uPgrade: Capacity.I"),s=i("uPgrade: Capacity.II"),l=i("uPgrade: Dashboard");return n.addChild(s),a.addChild(n),a.addChild(l),e.addChild(a),t.setRoot(e),t}},,function(t,e,a){"use strict";function n(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){const e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}a.d(e,"a",(function(){return r}));class r{constructor(){var t,e,a;a={},(e="subscribers")in(t=this)?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a}subscribe(t){let e=n();for(;void 0!==this.subscribers[e];)e=n();return this.subscribers[e]=t,()=>{delete this.subscribers[e]}}emit(...t){for(const e in this.subscribers){const a=this.subscribers[e];void 0!==a&&a(...t)}}}},function(t,e,a){"use strict";a.d(e,"f",(function(){return u})),a.d(e,"c",(function(){return m})),a.d(e,"e",(function(){return d})),a.d(e,"d",(function(){return p})),a.d(e,"a",(function(){return g})),a.d(e,"b",(function(){return y}));var n=a(26),r=a(47),i=a(583),o=a(6),s=a(8),l=a(64),c=a(63),f=a(748);function u(t){let e=t.hostname.replace(/ /g,"-");if(null!=t.ip&&Object(n.g)(t.ip)&&(t.ip=Object(n.e)()),null!=Object(n.d)(e)){e+="-0";for(let t=0;t<200&&(e=e.replace(/-[0-9]+$/,"-"+t),null!=Object(n.d)(e));++t);}return t.hostname=e,new r.a(t)}function m(t,e,a,n=1){let r=1+(s.a.ServerBaseGrowthRate-1)/t.hackDifficulty;r>s.a.ServerMaxGrowthRate&&(r=s.a.ServerMaxGrowthRate);const i=t.serverGrowth/100,l=1+(n-1)/16;return Math.log(e)/(Math.log(r)*a.hacking_grow_mult*i*o.a.ServerGrowthRate*l)}function h(t,e,a,n,r=1){if(a<0&&(a=0),e>t.moneyMax&&(e=t.moneyMax),e<=a)return 0;const i=1+(s.a.ServerBaseGrowthRate-1)/t.hackDifficulty,l=Math.min(i,s.a.ServerMaxGrowthRate),c=1+(r-1)/16,f=t.serverGrowth/100*n.hacking_grow_mult*c*o.a.ServerGrowthRate,u=f*Math.log(l),m=a*u+Math.log(e*u);let h;if(m0&&(h-=Math.log(m));let d=h/u-a;const p=l**f;let g=1/0;do{const t=p**d,n=a+d;g=(n*t-e)/(n*u+1)/t,d-=g}while(Math.abs(g)>=1);const y=Math.floor(d);if(e<=(a+y)*Math.pow(l,y*f))return y;const b=Math.ceil(d);return e<=(a+b)*Math.pow(l,b*f)?b:b+1}function d(t,e,a,n=1){let r=Object(i.a)(t,e,a,n);r<1&&(console.warn("serverGrowth calculated to be less than 1"),r=1);const o=t.moneyAvailable;if(t.moneyAvailable+=1*e,t.moneyAvailable*=r,Object(f.a)(t.moneyMax)&&isNaN(t.moneyAvailable)&&(t.moneyAvailable=t.moneyMax),Object(f.a)(t.moneyMax)&&t.moneyAvailable>t.moneyMax&&(t.moneyAvailable=t.moneyMax),o!==t.moneyAvailable){let r=h(t,t.moneyAvailable,o,a,n);r=Math.min(Math.max(0,Math.ceil(r)),e),t.fortify(2*s.a.ServerFortifyAmount*r)}return t.moneyAvailable/o}function p(t,e){const a=e.programs.includes(l.a.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(l.a.NukeProgram.name),a&&e.programs.push(l.a.BitFlume.name),e.scripts.forEach((function(a){a.updateRamUsage(t,e.scripts)})),e.messages.length=0,e.messages.push(c.a.HackersStartingHandbook)}function g(t,e){return e>t.serversOnNetwork.length?(console.error("Tried to get server on network that was out of range"),null):Object(n.d)(t.serversOnNetwork[e])}function y(t){return t instanceof r.a&&t.backdoorInstalled}},function(t,e,a){"use strict";a.d(e,"d",(function(){return r})),a.d(e,"f",(function(){return i})),a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return s})),a.d(e,"e",(function(){return l})),a.d(e,"b",(function(){return c}));var n=a(28);function r(t,e){return Math.random()*(e-t)+t}const i="↑",o="↓",s="←",l="→";function c(t){switch(t.key){case n.a.UP_ARROW:case n.a.W:return i;case n.a.LEFT_ARROW:case n.a.A:return s;case n.a.DOWN_ARROW:case n.a.S:return o;case n.a.RIGHT_ARROW:case n.a.D:return l}return""}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={BladesIntuition:"Blade's Intuition",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Tracer:"Tracer",Overclock:"Overclock",Reaper:"Reaper",EvasiveSystem:"Evasive System",Datamancer:"Datamancer",CybersEdge:"Cyber's Edge",HandsOfMidas:"Hands of Midas",Hyperdrive:"Hyperdrive"}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(347),r=a(25);class i extends n.a{constructor(t=null){super(t),this.count=1}getActionTimePenalty(){return 1.5}getChaosCompetencePenalty(){return 1}getChaosDifficultyBonus(){return 1}toJSON(){return Object(r.b)("BlackOperation",this)}static fromJSON(t){return Object(r.a)(i,t.data)}}r.c.constructors.BlackOperation=i},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return i}));var n=a(0);const r={Gang:a.n(n).a.createContext({})},i=()=>Object(n.useContext)(r.Gang)},function(t,e,a){"use strict";a.d(e,"c",(function(){return m})),a.d(e,"b",(function(){return h})),a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(753),o=a(113),s=a(131),l=a(1746),c=a(65),f=a(181);const u=Object(o.a)(()=>({snackbar:{zIndex:f.d+1e3+" !important","& .MuiAlert-icon":{alignSelf:"center"}}}));function m(t){const e=u();return r.a.createElement(i.a,{dense:!0,maxSnack:9,anchorOrigin:{horizontal:"right",vertical:"bottom"},autoHideDuration:2e3,classes:{containerRoot:e.snackbar}},t.children)}const h=new s.a;function d(){const{enqueueSnackbar:t,closeSnackbar:e}=Object(i.b)();return Object(n.useEffect)(()=>h.subscribe((a,n,i)=>{const o=t(r.a.createElement(l.a,{severity:n},a),{content:(t,e)=>r.a.createElement(c.a,{key:t},e),variant:n,autoHideDuration:i,onClick:()=>e(o)})})),r.a.createElement(r.a.Fragment,null)}},function(t,e,a){"use strict";a.d(e,"c",(function(){return E})),a.d(e,"f",(function(){return C})),a.d(e,"e",(function(){return w})),a.d(e,"d",(function(){return y})),a.d(e,"a",(function(){return _})),a.d(e,"b",(function(){return S}));var n=a(40),r=a(57),i=a(361),o=a(15),s=a(6),l=a(8),c=a(29),f=a(2),u=a(340),m=a(82),h=a(16),d=a(1393),p=a(5),g=a(485);function y(){!function(){for(const t of Object.keys(c.a))c.a.hasOwnProperty(t)&&(c.a[t].augmentations=[])}(),Object(d.a)(r.a),[Object(g.d)(),Object(g.e)(),...g.c,...Object(c.b)(p.a.Bladeburners)?g.a:[],...Object(c.b)(p.a.ChurchOfTheMachineGod)?g.b:[]].map(k),function(){for(const t of Object.keys(r.a))if(r.a.hasOwnProperty(t)){const e=r.a[t];e.name===o.a.NeuroFluxGovernor?v(e):e.baseCost=e.startingCost*E()*s.a.AugmentationMoneyCost}}(),f.a.reapplyAllAugmentations()}function b(){return l.a.MultipleAugMultiplier*[1,.96,.94,.93][m.a[11]]}function E(){return Math.pow(b(),f.a.queuedAugmentations.length)}function v(t){let e=function(){let t=0;for(let e=0;e=0;t--)if(f.a.queuedAugmentations[t].name===o.a.NeuroFluxGovernor){e=t;break}for(let a=0;a"}return f.a.queuedAugmentations=[],Object(h.a)("You slowly drift to sleep as scientists put you under in order to install the following Augmentations:
"+t+"
You wake up in your home...you feel different..."),Object(u.a)(),!0}function S(t){return r.a.hasOwnProperty(t)}function C(t){return(t instanceof n.a?t.name:t)===o.a.NeuroFluxGovernor}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(268),r=a(182),i=a(292),o=a(364),s=a(26),l=a(317),c=a(16),f=a(581),u=a(2);function m(t,e,a){if(null!=a&&"boolean"==typeof a||(a=!0),t instanceof n.a)return d(t),!0;if(t instanceof o.a&&"string"==typeof e){const n=h(t.pid,a);if(n)return n;for(const n of r.a.values())if(n.name==t.filename&&n.hostname==e&&Object(l.a)(n.args,t.args))return d(n,a),!0;return!1}return"number"==typeof t?h(t,a):(console.error("killWorkerScript() called with invalid argument:"),console.error(t),!1)}function h(t,e=!0){const a=r.a.get(t);return a instanceof n.a&&(d(a,e),!0)}function d(t,e=!0){if("function"==typeof t.atExit){try{t.atExit()}catch(e){Object(c.a)(`Error trying to call atExit for script ${t.name} on ${t.hostname} ${t.scriptRef.args} ${e}`)}t.atExit=void 0}t.env.stopFlag=!0,function(t){t instanceof n.a&&t.delay&&(clearTimeout(t.delay),t.delayReject&&t.delayReject(t))}(t),function(t,e=!0){const a=t.hostname,n=t.name,o=Object(s.d)(a);if(null==o)return void console.error("Could not find server on which this script is running: "+a);for(let e=0;eObject(o.a)({unbuyable:{color:t.palette.action.disabled},money:{color:t.colors.money}}));function l(t){const e=s();return t.corp.funds>t.money?n.createElement("span",{className:e.money},r.a.formatMoney(t.money)):n.createElement("span",{className:e.unbuyable},r.a.formatMoney(t.money))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(45),o=a(31),s=a(1),l=a(4),c=a(24),f=a(296);const u=({name:t,color:e,classes:a=Object(f.b)(),data:n})=>{let u;return void 0!==n.content?u=n.content:void 0!==n.level&&void 0!==n.exp?u=`${Object(c.d)(n.level,0)} (${l.a.formatExp(n.exp)} exp)`:void 0!==n.level&&void 0===n.exp&&(u=""+Object(c.d)(n.level,0)),r.a.createElement(i.a,null,r.a.createElement(o.a,{classes:{root:a.cellNone}},r.a.createElement(s.a,{style:{color:e}},t)),r.a.createElement(o.a,{align:"right",classes:{root:a.cellNone}},r.a.createElement(s.a,{style:{color:e}},u)))}},,,function(t,e,a){"use strict";function n(t){return"string"==typeof t||t instanceof String}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(25),r=a(36);const i={b:!0,initPrice:1e4,marketCap:1e12,mv:1,name:"",otlkMag:0,spreadPerc:0,shareTxForMovement:1e6,symbol:""};function o(t){let e;switch(typeof t){case"number":return t;case"object":{const a=t;e=Object(r.a)(a.min,a.max);break}default:throw Error(`Do not know how to convert the type '${typeof t}' to a number`)}return"object"==typeof t&&"number"==typeof t.divisor?e/t.divisor:e}class s{constructor(t=i){this.name=t.name,this.symbol=t.symbol,this.price=o(t.initPrice),this.lastPrice=this.price,this.playerShares=0,this.playerAvgPx=0,this.playerShortShares=0,this.playerAvgShortPx=0,this.mv=o(t.mv),this.b=t.b,this.otlkMag=t.otlkMag,this.otlkMagForecast=this.getAbsoluteForecast(),this.cap=Object(r.a)(1e3*this.price,25e3*this.price),this.spreadPerc=o(t.spreadPerc),this.shareTxForMovement=o(t.shareTxForMovement),this.shareTxUntilMovement=this.shareTxForMovement;const e=t.marketCap/this.price;this.totalShares=1e5*Math.round(e/1e5);this.maxShares=1e5*Math.round(.2*this.totalShares/1e5)}changeForecastForecast(t){this.otlkMagForecast=t,this.otlkMagForecast>100?this.otlkMagForecast=100:this.otlkMagForecast<0&&(this.otlkMagForecast=0)}changePrice(t){this.lastPrice=this.price,this.price=t}cycleForecast(t=.1){const e=this.getForecastIncreaseChance();Math.random()5&&(this.otlkMag=Math.max(5,this.otlkMag-t))}influenceForecastForecast(t){this.otlkMagForecast>50?(this.otlkMagForecast-=t,this.otlkMagForecast=Math.max(50,this.otlkMagForecast)):this.otlkMagForecast<50&&(this.otlkMagForecast+=t,this.otlkMagForecast=Math.min(50,this.otlkMagForecast))}toJSON(){return Object(n.b)("Stock",this)}static fromJSON(t){return Object(n.a)(s,t.data)}}n.c.constructors.Stock=s},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"d",(function(){return s})),a.d(e,"f",(function(){return l})),a.d(e,"e",(function(){return c})),a.d(e,"g",(function(){return m})),a.d(e,"h",(function(){return h}));var n=a(87);let r={},i={};function o(t){r=""===t?{}:JSON.parse(t)}function s(t){i=""===t?{}:JSON.parse(t)}function l(){for(const t of Object.keys(r))r.hasOwnProperty(t)&&n.a.print("alias "+t+"="+r[t]);for(const t of Object.keys(i))i.hasOwnProperty(t)&&n.a.print("global alias "+t+"="+i[t])}function c(t,e=!1){const a=t.match(/^([\w|!%,@-]+)=(("(.+)")|('(.+)'))$/);return null!=a&&7==a.length&&(e?function(t,e){t in r&&delete r[t];i[t]=e.trim()}(a[1],a[4]||a[6]):function(t,e){t in i&&delete i[t];r[t]=e.trim()}(a[1],a[4]||a[6]),!0)}function f(t){return r.hasOwnProperty(t)?r[t]:null}function u(t){return i.hasOwnProperty(t)?i[t]:null}function m(t){return r.hasOwnProperty(t)?(delete r[t],!0):!!i.hasOwnProperty(t)&&(delete i[t],!0)}function h(t){const e=t.split(" ");if(e.length>0){if("unalias"===e[0]||"alias"===e[0])return e.join(" ");let t=!0,r=0;for(;t&&r<10;){var a;r++,t=!1;const i=null===(a=f(e[0]))||void 0===a?void 0:a.split(" ");null!=i&&(t=!0,e.splice(0,1,...i));for(let a=0;ar.a.createElement(o.a,{injectFirst:!0},r.a.createElement(s.a,{theme:u},t))},,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1),o=a(23);function s(t){const[e,a]=Object(n.useState)(!1);return r.a.createElement(o.a,{open:e,title:r.a.createElement(i.a,null,"Copied!")},r.a.createElement(i.a,{variant:t.variant,color:t.color,onClick:function(){const e=document.createElement("textarea");e.value=t.value,document.body.appendChild(e),e.select(),e.setSelectionRange(0,1e10),document.execCommand("copy"),document.body.removeChild(e),a(!0),setTimeout(()=>a(!1),1e3)}},t.value))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={Water:.05,Energy:.01,Food:.03,Plants:.05,Metal:.1,Hardware:.06,Chemicals:.05,Drugs:.02,Robots:.5,AICores:.1,RealEstate:.005,"Real Estate":.005,"AI Cores":.1}},function(t,e,a){"use strict";function n(t,e=1){return Math.max(Math.floor(e*(32*Math.log(t+534.5)-200)),1)}function r(t,e=1){return Math.exp((t/e+200)/32)-534.6}function i(t,e=1){const a=n(t,e),i=a+1;let o=r(a,e);o<0&&(o=0);let s=r(i,e);s<0&&(s=0);let l=s-o!=0?100*(t-o)/(s-o):99.99;l<0&&(l=0),l>100&&(l=100);let c=t-o,f=s-t;return c<0&&(c=0),f<0&&(f=0),{currentSkill:a,nextSkill:i,baseExperience:o,experience:t,nextExperience:s,currentExperience:c,remainingExperience:f,progress:l}}a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return r})),a.d(e,"c",(function(){return i}))},,function(t,e,a){"use strict";let n;a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return r})),function(t){t.Weapon="w",t.Armor="a",t.Vehicle="v",t.Rootkit="r",t.Augmentation="g"}(n||(n={}));const r=[{cost:1e6,mults:{str:1.04,def:1.04},name:"Baseball Bat",upgType:n.Weapon},{cost:12e6,mults:{str:1.08,def:1.08,dex:1.08},name:"Katana",upgType:n.Weapon},{cost:25e6,mults:{str:1.1,def:1.1,dex:1.1,agi:1.1},name:"Glock 18C",upgType:n.Weapon},{cost:5e7,mults:{str:1.12,def:1.1,agi:1.1},name:"P90C",upgType:n.Weapon},{cost:6e7,mults:{str:1.2,def:1.15},name:"Steyr AUG",upgType:n.Weapon},{cost:1e8,mults:{str:1.25,def:1.2},name:"AK-47",upgType:n.Weapon},{cost:15e7,mults:{str:1.3,def:1.25},name:"M15A10 Assault Rifle",upgType:n.Weapon},{cost:225e6,mults:{str:1.3,dex:1.25,agi:1.3},name:"AWM Sniper Rifle",upgType:n.Weapon},{cost:2e6,mults:{def:1.04},name:"Bulletproof Vest",upgType:n.Armor},{cost:5e6,mults:{def:1.08},name:"Full Body Armor",upgType:n.Armor},{cost:25e6,mults:{def:1.15,agi:1.15},name:"Liquid Body Armor",upgType:n.Armor},{cost:4e7,mults:{def:1.2},name:"Graphene Plating Armor",upgType:n.Armor},{cost:3e6,mults:{agi:1.04,cha:1.04},name:"Ford Flex V20",upgType:n.Vehicle},{cost:9e6,mults:{agi:1.08,cha:1.08},name:"ATX1070 Superbike",upgType:n.Vehicle},{cost:18e6,mults:{agi:1.12,cha:1.12},name:"Mercedes-Benz S9001",upgType:n.Vehicle},{cost:3e7,mults:{agi:1.16,cha:1.16},name:"White Ferrari",upgType:n.Vehicle},{cost:5e6,mults:{hack:1.05},name:"NUKE Rootkit",upgType:n.Rootkit},{cost:25e6,mults:{hack:1.1},name:"Soulstealer Rootkit",upgType:n.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Demon Rootkit",upgType:n.Rootkit},{cost:4e7,mults:{hack:1.12},name:"Hmap Node",upgType:n.Rootkit},{cost:75e6,mults:{hack:1.15},name:"Jack the Ripper",upgType:n.Rootkit},{cost:1e10,mults:{str:1.3,dex:1.3},name:"Bionic Arms",upgType:n.Augmentation},{cost:1e10,mults:{agi:1.6},name:"Bionic Legs",upgType:n.Augmentation},{cost:15e9,mults:{str:1.15,def:1.15,dex:1.15,agi:1.15},name:"Bionic Spine",upgType:n.Augmentation},{cost:2e10,mults:{str:1.4,def:1.4},name:"BrachiBlades",upgType:n.Augmentation},{cost:12e9,mults:{str:1.2,def:1.2},name:"Nanofiber Weave",upgType:n.Augmentation},{cost:25e9,mults:{str:1.5,agi:1.5},name:"Synthetic Heart",upgType:n.Augmentation},{cost:15e9,mults:{str:1.3,def:1.3},name:"Synfibril Muscle",upgType:n.Augmentation},{cost:5e9,mults:{hack:1.05},name:"BitWire",upgType:n.Augmentation},{cost:1e10,mults:{hack:1.15},name:"Neuralstimulator",upgType:n.Augmentation},{cost:75e8,mults:{hack:1.1},name:"DataJack",upgType:n.Augmentation},{cost:5e10,mults:{str:1.7,def:1.7},name:"Graphene Bone Lacings",upgType:n.Augmentation}]},,,function(t,e,a){"use strict";a.d(e,"b",(function(){return C})),a.d(e,"a",(function(){return x})),a.d(e,"c",(function(){return O})),a.d(e,"d",(function(){return T}));var n=a(0),r=a.n(n),i=a(131),o=a(142),s=a(1),l=a(21),c=a(10),f=a(65),u=a(442),m=a.n(u),h=a(1018),d=a(113),p=a(137),g=a(584),y=a.n(g),b=a(182),E=a(197),v=a(26),k=a(233),_=a(2),w=a(173);let S=0;const C=new i.a,x=new i.a;let L=[];function O(){const t=Object(n.useState)(!0)[1];function e(){t(t=>!t)}return Object(n.useEffect)(()=>C.subscribe(t=>{const a=t.server+"-"+t.filename+t.args.map(t=>""+t).join("-");L.find(t=>t.id===a)||(L.push({id:a,script:t}),e())}),[]),Object(n.useEffect)(()=>x.subscribe(()=>{L=[],e()})),r.a.createElement(r.a.Fragment,null,L.map(t=>r.a.createElement(A,{key:t.id,script:t.script,id:t.id,onClose:()=>{return a=t.id,L=L.filter(t=>t.id!==a),void e();var a}})))}const M=Object(d.a)(t=>Object(p.a)({title:{"&.is-minimized + *":{border:"none",margin:0,"max-height":0,padding:0,"pointer-events":"none",visibility:"hidden"}},logs:{overflowY:"scroll",overflowX:"hidden",scrollbarWidth:"auto",display:"flex",flexDirection:"column-reverse"},success:{color:t.colors.success},error:{color:t.palette.error.main},primary:{color:t.palette.primary.main},info:{color:t.palette.info.main},warning:{color:t.palette.warning.main}})),T=1500;function A(t){const e=Object(n.useRef)(null),a=Object(n.useRef)(null),[i,u]=Object(n.useState)(t.script),d=M(),p=Object(n.useRef)(null),g=Object(n.useState)(!1)[1],[C,x]=Object(n.useState)(!1);function L(){g(t=>!t)}function O(){const t=p.current;null!==t&&(t.style.zIndex=T+S+"",S++,L())}function A(t=!1){const e=`${i.filename} ${i.args.map(t=>""+t).join(" ")}`;return t||e.length<=30?e:e.slice(0,27)+"..."}Object(n.useEffect)(()=>{O();const t=setInterval(L,1e3);return()=>clearInterval(t)},[]),Object(n.useEffect)(()=>(window.addEventListener("resize",R),()=>{window.removeEventListener("resize",R)}),[]);const R=Object(w.debounce)(()=>{const t=null==e?void 0:e.current;t&&(N(t)||P())},100),N=t=>{const e=t.getBoundingClientRect();return!(e.right<0||e.bottom<0||e.left>innerWidth||e.top>outerWidth)},P=()=>{const t=null==a?void 0:a.current;if(!t)return;const e=t.state;e.x=0,e.y=0,t.setState(e)};return r.a.createElement(m.a,{handle:".drag",onDrag:t=>{if(t.clientX<0||t.clientY<0||t.clientX>innerWidth||t.clientY>innerHeight)return!1},ref:a},r.a.createElement(f.a,{style:{display:"flex",flexFlow:"column",position:"fixed",left:"40%",top:"30%",zIndex:1400},ref:p},r.a.createElement("div",{onMouseDown:O},r.a.createElement(f.a,{className:d.title+" "+(C?"is-minimized":""),style:{cursor:"grab"}},r.a.createElement(l.a,{className:"drag",display:"flex",alignItems:"center",ref:e},r.a.createElement(s.a,{color:"primary",variant:"h6",title:A(!0)},A()),r.a.createElement(l.a,{position:"absolute",right:0},!b.a.has(i.pid)&&r.a.createElement(c.a,{onClick:function(){const t=Object(v.d)(i.server);if(null===t)return;const e=Object(k.a)(i.filename,i.args,t);null===e?Object(E.e)(_.a,i,t):u(e)}},"Run"),b.a.has(i.pid)&&r.a.createElement(c.a,{onClick:function(){Object(o.a)(i,i.server,!0)}},"Kill"),r.a.createElement(c.a,{onClick:function(){x(!C)}},C?"🗖":"🗕"),r.a.createElement(c.a,{onClick:t.onClose},"Close")))),r.a.createElement(f.a,{sx:{overflow:"scroll",overflowWrap:"break-word",whiteSpace:"pre-wrap"}},r.a.createElement(h.ResizableBox,{className:d.logs,height:500,width:500,handle:r.a.createElement("span",{style:{position:"absolute",right:"-10px",bottom:"-13px",cursor:"nw-resize"}},r.a.createElement(y.a,{color:"primary",style:{transform:"rotate(45deg)"}}))},r.a.createElement(l.a,null,i.logs.map((t,e)=>{return r.a.createElement(s.a,{key:e,className:(a=t,a.match(/(^\[[^\]]+\] )?ERROR/)||a.match(/(^\[[^\]]+\] )?FAIL/)?d.error:a.match(/(^\[[^\]]+\] )?SUCCESS/)?d.success:a.match(/(^\[[^\]]+\] )?WARN/)?d.warning:a.match(/(^\[[^\]]+\] )?INFO/)?d.info:d.primary)},t,r.a.createElement("br",null));var a})))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n=new Map},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(43),o=a(145),s=a(179),l=a(45),c=a(1);function f({rows:t,title:e,wide:a}){const n=a?s.a:i.a;return r.a.createElement(r.a.Fragment,null,e&&r.a.createElement(c.a,null,e),r.a.createElement(n,{size:"small",padding:"none"},r.a.createElement(o.a,null,t.map((t,e)=>r.a.createElement(l.a,{key:e},t.map((t,e)=>r.a.createElement(i.b,{key:e,align:0!==e?"right":"left"},r.a.createElement(c.a,{noWrap:!0},t))))))))}},function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"d",(function(){return o})),a.d(e,"e",(function(){return s})),a.d(e,"b",(function(){return l})),a.d(e,"a",(function(){return c})),a.d(e,"f",(function(){return f}));var n=a(6),r=a(39);function i(t,e,a,i,o){return r.b.HashesPerLevel*t*Math.pow(1.07,Math.log2(a))*(1+(i-1)/5)*(1-e/a)*o*n.a.HacknetNodeMoney}function o(t,e=1,a=1){const n=Math.round(e);if(isNaN(n)||n<1)return 0;if(t>=r.b.MaxLevel)return 1/0;const i=r.b.UpgradeLevelMult;let o=0,s=t;for(let t=0;t=r.b.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(t)),s=t;for(let t=0;t=r.b.MaxCores)return 1/0;const i=r.b.UpgradeCoreMult;let o=0,s=t;for(let t=0;t=r.b.MaxCache)return 1/0;const n=r.b.UpgradeCacheMult;let i=0,o=t;for(let t=0;t=r.b.MaxServers?1/0:r.b.BaseCost*Math.pow(r.b.PurchaseMult,t-1)*e}},function(t,e,a){"use strict";let n;a.d(e,"a",(function(){return n})),function(t){t[t.Field=0]="Field",t[t.Hacking=1]="Hacking",t[t.None=2]="None",t[t.Security=3]="Security"}(n||(n={}))},,function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(331),r=a(274),i=a(23),o=a(1),s=a(0),l=a.n(s);function c({checked:t,onChange:e,text:a,tooltip:c}){const[f,u]=Object(s.useState)(t);return Object(s.useEffect)(()=>e(f),[f]),l.a.createElement(n.a,{control:l.a.createElement(r.a,{checked:f,onChange:function(t){u(t.target.checked)}}),label:l.a.createElement(i.a,{title:l.a.createElement(o.a,null,c)},l.a.createElement(o.a,null,a))})}},,,,,function(t,e,a){"use strict";function n(t){const e=Object.assign({},{progress:0,totalTicks:20},t);e.progress=Math.max(Math.min(e.progress,1),0);const a=Math.max(Math.floor(e.progress/(1/e.totalTicks)),1),n=Math.max(e.totalTicks-a,0);return`[${"|".repeat(a)}${"-".repeat(n)}]`}a.d(e,"a",(function(){return n}))},,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return T})),a.d(e,"c",(function(){return A})),a.d(e,"e",(function(){return N})),a.d(e,"f",(function(){return I})),a.d(e,"b",(function(){return F})),a.d(e,"d",(function(){return D}));var n=a(142),r=a(268),i=a(182),o=a(292),s=a(512),l=a(8),c=a(582),f=a(109),u=a(513),m=a(627),h=a(1392),d=a(364),p=a(633),g=a(233),y=a(26),b=a(9),E=a(666),v=a(16),k=a(255),_=a(510),w=a(147),S=a(413),C=a(254),x=a(300),L=a(83),O=a(2),M=a(87);const T=[];for(let t=0;t{i=!0;let e=t.source.value;e.startsWith("./")&&(e=e.slice(2));const a=function(t){for(let e=0;e{a.push(t.id.name),n.push(t)}}),r+=`var ${e};\n(function (namespace) {\n`,n.forEach(t=>{r+=Object(E.generate)(t),r+="\n"}),a.forEach(t=>{r+="namespace."+t+" = "+t,r+="\n"}),r+=`})(${e} || (" + namespace + " = {}));\n`}else{const e=[];t.specifiers.forEach(t=>{e.push(t.local.name)});const a=[];Object(x.b)(o,{FunctionDeclaration:t=>{e.includes(t.id.name)&&a.push(t)}}),a.forEach(t=>{r+=Object(E.generate)(t),r+="\n"})}}}),!i)return{code:t,lineOffset:0};let o=0;if("Program"!==a.type||null==a.body)throw new Error("Code could not be properly parsed");for(let t=a.body.length-1;t>=0;--t)"ImportDeclaration"===a.body[t].type&&(a.body.splice(t,1),++o);const s=(r.match(/\n/g)||[]).length-o;t=Object(E.generate)(a);return{code:t=r+t,lineOffset:s}}(e,t);a=n.code,i=n.lineOffset}catch(e){return Object(v.a)("Error processing Imports in "+t.name+":
"+e),t.env.stopFlag=!0,t.running=!1,Object(n.a)(t),Promise.resolve(t)}const o=function(e,a){const i=Object(u.a)(t);for(const o of Object.keys(i)){const s=i[o];if("function"==typeof s)if(["hack","grow","weaken","sleep","prompt","manualHack","scp","write","share","wget"].includes(o)){const i=function(...a){const i=[];for(let t=0;t`;return s+="
",s+=o,Object(v.a)(s),t.env.stopFlag=!0,t.running=!1,Object(n.a)(t),Promise.resolve(t)}}))};e.setProperty(a,o,e.createAsyncFunction(i))}else if("sprintf"===o||"vsprintf"===o||"scp"===o||"write"==o||"tryWrite"===o||"run"===o||"exec"===o){const t=function(...t){const a=[];for(let n=0;n"+e),t.env.stopFlag=!0,t.running=!1,Object(n.a)(t),Promise.resolve(t)}return new Promise((function(e,a){try{!function n(){try{if(t.env.stopFlag)return a(t);let r=!0,i=0;for(;i<3&&r;)r=r&&s.step(),i++;r?setTimeout(n,b.a.CodeInstructionRunTime):e(t)}catch(e){return e=e.toString(),Object(f.a)(e)||(e=Object(f.b)(t,e)),t.errorMessage=e,a(t)}}()}catch(e){return Object(w.a)(e)?(t.errorMessage=e,a(t)):e instanceof r.a?a(e):a(t)}}))}function N(t,e,a,n){return P(t,e,a,n)?(a.runScript(e),e.pid):0}function P(t,e,a,l){let c=1;e.threads&&!isNaN(e.threads)?c=e.threads:e.threads=1;const h=Object(p.a)(e),d=Object(_.a)(h*c);if(d>a.maxRam-a.ramUsed)return Object(v.a)(`Not enough RAM to run script ${e.filename} with args `+Object(k.a)(e.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.)"),!1;a.updateRamUsed(Object(_.a)(a.ramUsed+d),O.a);const g=Object(s.a)();if(-1===g)throw new Error("Failed to start script because could not find available PID. This is most because you have too many scripts running.");const y=new r.a(e,g,u.a);y.ramUsage=h,i.a.set(g,y),o.a.emit();let b=null;if(y.name.endsWith(".js")||y.name.endsWith(".ns"))b=function(t,e){e.running=!0;let a=null;function n(t,n){return function(...r){if(e.env.stopFlag)throw e;if("asleep"===t)return n(...r);if(a)throw e.errorMessage=Object(f.b)(e,Object(S.sprintf)("Concurrent calls to Netscript functions are not allowed! Did you forget to await hack(), grow(), or some other promise-returning function? (Currently running: %s tried to run: %s)",a,t)),e;let i;a=t;try{i=n(...r)}catch(t){throw a=null,t}return i&&void 0!==i.finally?i.finally((function(){a=null})):(a=null,i)}}for(const t of Object.keys(e.env.vars))"function"==typeof e.env.vars[t]&&(e.env.vars[t]=n(t,e.env.vars[t]));return e.env.vars.stanek.charge=n("stanek.charge",e.env.vars.stanek.charge),new Promise((a,n)=>{Object(m.b)(t,e.getServer().scripts,e).then(()=>{a(e)}).catch(t=>n(t))}).catch(t=>{if(t instanceof Error)throw t instanceof SyntaxError?e.errorMessage=Object(f.b)(e,t.message+" (sorry we can't be more helpful)"):e.errorMessage=Object(f.b)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(f.a)(t))throw e.errorMessage=t,e;if(t instanceof r.a)throw t;throw e.errorMessage=Object(f.b)(e,t),e})}(t,y);else if(b=R(y),!(b instanceof Promise))return!1;return b.then((function(t){t.running=!1,t.env.stopFlag=!0,void 0!==l&&l.running&&(l.scriptRef.onlineExpGained+=e.onlineExpGained,l.scriptRef.onlineMoneyMade+=e.onlineMoneyMade),Object(n.a)(y),t.log("",()=>"Script finished running")})).catch((function(t){if(t instanceof Error)return Object(v.a)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("Evaluating workerscript returns an Error. THIS SHOULDN'T HAPPEN: "+t.toString());if(t instanceof r.a){if(!Object(f.a)(t.errorMessage))return void t.log("",()=>"Script killed");{const e=t.errorMessage.split("|DELIMITER|");if(4!=e.length)return console.error("ERROR: Something wrong with Error text in evaluator..."),void console.error("Error text: "+t.errorMessage);const a=e[1],n=e[2],r=e[3];let i=`RUNTIME ERROR
${n}@${a}
`;t.args.length>0&&(i+=`Args: ${Object(k.a)(t.args)}
`),i+="
",i+=r,Object(v.a)(i),t.log("",()=>"Script crashed with runtime error")}}else{if(Object(f.a)(t))return Object(v.a)("Script runtime unknown error. This is a bug please contact game developer"),void console.error("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+t.toString());Object(v.a)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.error(t)}Object(n.a)(y)})),!0}function I(t=1){const e=t*l.a._idleSpeed/1e3;for(const t of i.a.values())t.scriptRef.onlineRunningTime+=e}function F(t){const e=-1!==window.location.href.toLowerCase().indexOf("?noscripts");e&&(M.a.warn("Skipped loading player scripts during startup"),console.info("Skipping the load of any scripts during startup"));for(const a of Object(y.c)()){a.ramUsed=0;for(let t=0;t`Invalid arguments: scriptname='${n} args='${i}'`),console.error("runScriptFromScript() failed due to invalid arguments"),0;i.forEach((t,e)=>{if("string"!=typeof t&&"number"!=typeof t&&"boolean"!=typeof t)throw new Error(`Only strings, numbers, and booleans can be passed as arguments to other scripts.\n${n} argument index ${e} is of type ${typeof t} and value ${JSON.stringify(t)}`)});if(null!=a.getRunningScript(n,i))return o.log(e,()=>`'${n}' is already running on '${a.hostname}'`),0;for(let t=0;t"Cannot execute a script with null/undefined as an argument"),0;for(let r=0;r`You do not have root access on '${a.hostname}'`),0;if(c>f)return o.log(e,()=>`Cannot run script '${n}' (t=${s}) on '${a.hostname}' because there is not enough available RAM!`),0;o.log(e,()=>`'${n}' on '${a.hostname}' with ${s} threads and args: ${Object(k.a)(i)}.`);const u=new d.a(l,i);return u.threads=s,u.server=a.hostname,N(t,u,a,o)}return o.log(e,()=>`Could not find script '${n}' on '${a.hostname}'`),0}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(25);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class i{constructor(t={}){r(this,"name","InitName"),r(this,"qty",0),r(this,"qlt",0),r(this,"dmd",0),r(this,"dmdR",[0,0]),r(this,"cmp",0),r(this,"cmpR",[0,0]),r(this,"mv",0),r(this,"mku",0),r(this,"buy",0),r(this,"sll",0),r(this,"prd",0),r(this,"imp",0),r(this,"exp",[]),r(this,"totalExp",0),r(this,"bCost",0),r(this,"sCost",0),r(this,"prdman",[!1,0]),r(this,"sllman",[!1,0]),r(this,"marketTa1",!1),r(this,"marketTa2",!1),r(this,"marketTa2Price",0),r(this,"maxsll",0),t.name&&(this.name=t.name),this.init()}getMarkupLimit(){return this.qlt/this.mku}init(){switch(this.name){case"Water":this.dmd=75,this.dmdR=[65,85],this.cmp=50,this.cmpR=[40,60],this.bCost=1500,this.mv=.2,this.mku=6;break;case"Energy":this.dmd=90,this.dmdR=[80,99],this.cmp=80,this.cmpR=[65,95],this.bCost=2e3,this.mv=.2,this.mku=6;break;case"Food":this.dmd=80,this.dmdR=[70,90],this.cmp=60,this.cmpR=[35,85],this.bCost=5e3,this.mv=1,this.mku=3;break;case"Plants":this.dmd=70,this.dmdR=[20,90],this.cmp=50,this.cmpR=[30,70],this.bCost=3e3,this.mv=.6,this.mku=3.75;break;case"Metal":this.dmd=80,this.dmdR=[75,85],this.cmp=70,this.cmpR=[60,80],this.bCost=2650,this.mv=1,this.mku=6;break;case"Hardware":this.dmd=85,this.dmdR=[80,90],this.cmp=80,this.cmpR=[65,95],this.bCost=8e3,this.mv=.5,this.mku=1;break;case"Chemicals":this.dmd=55,this.dmdR=[40,70],this.cmp=60,this.cmpR=[40,80],this.bCost=9e3,this.mv=1.2,this.mku=2;break;case"Real Estate":this.dmd=50,this.dmdR=[5,99],this.cmp=50,this.cmpR=[25,75],this.bCost=8e4,this.mv=1.5,this.mku=1.5;break;case"Drugs":this.dmd=60,this.dmdR=[45,75],this.cmp=70,this.cmpR=[40,99],this.bCost=4e4,this.mv=1.6,this.mku=1;break;case"Robots":this.dmd=90,this.dmdR=[80,9],this.cmp=90,this.cmpR=[80,9],this.bCost=75e3,this.mv=.5,this.mku=1;break;case"AI Cores":this.dmd=90,this.dmdR=[80,99],this.cmp=90,this.cmpR=[80,9],this.bCost=15e3,this.mv=.8,this.mku=.5;break;case"Scientific Research":case"InitName":break;default:console.error("Invalid material type in init(): "+this.name)}}processMarket(){const t=1+Math.random()*this.mv/300,e=1+Math.random()*this.mv/100;Math.random()<.5?(this.cmp*=e,this.cmp>this.cmpR[1]&&(this.cmp=this.cmpR[1]),this.bCost*=1/t):(this.cmp*=1/e,this.cmpthis.dmdR[1]&&(this.dmd=this.dmdR[1]),this.bCost*=t):(this.dmd*=1/a,this.dmd=r.a.MaxLevel)return 1/0;const i=r.a.UpgradeLevelMult;let o=0,s=t;for(let t=0;t=r.a.MaxRam)return 1/0;let i=0,o=Math.round(Math.log2(t)),s=t;for(let t=0;t=r.a.MaxCores)return 1/0;const i=r.a.CoreBaseCost,o=r.a.UpgradeCoreMult;let s=0,l=t;for(let t=0;t1e10;return e&&Object(r.a)(n.createElement(n.Fragment,null,"Alright cheater get out of here. You're not allowed here anymore.")),e}class s extends n.Component{win(t,e){t.gainMoney(e,"casino")}reachedLimit(t){const e=t.getCasinoWinnings()>1e10;return e&&Object(r.a)(n.createElement(n.Fragment,null,"Alright cheater get out of here. You're not allowed here anymore.")),e}}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));const n=!1,r=!0,i={O:[[r,r],[r,r]],I:[[r,r,r,r]],L:[[n,n,r],[r,r,r]],J:[[r,n,n],[r,r,r]],S:[[n,r,r],[r,r,n]],Z:[[r,r,n],[n,r,r]],T:[[r,r,r],[n,r,n]]}},,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(t){return Object(n.useEffect)(()=>{function e(e){if(!e.isTrusted)return;t.onKeyDown.bind(this)(e)}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),r.a.createElement(r.a.Fragment,null)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(1456),r=a(0),i=a.n(r),o=a(1757),s=a(60);const l=Object(o.a)(t=>({root:{backgroundColor:t.palette.background.paper},bar:{transition:"none",backgroundColor:t.palette.primary.main}}))(n.a);function c(t){const[e,a]=Object(r.useState)(100);return Object(r.useEffect)(()=>{const e=setInterval(()=>{a(e=>(e<=0&&t.onExpire(),e-200/t.millis*100))},200);return()=>{clearInterval(e)}},[]),i.a.createElement(s.a,{item:!0,xs:12},i.a.createElement(l,{variant:"determinate",value:e,color:"primary"}))}},function(t,e,a){"use strict";function n(t,e,a){function n(t,e,n){function r(t,e,a){return(1-a)*t+a*e}for(const i of Object.keys(t))a[i]=r(t[i],e[i],n);return t}return e<0?n(t.Trivial,t.Trivial,0):e>=0&&e<1?n(t.Trivial,t.Normal,e):e>=1&&e<2?n(t.Normal,t.Hard,e-1):e>=2&&e<3?n(t.Hard,t.Impossible,e-2):n(t.Impossible,t.Impossible,0)}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(426),r=a(149),i=a(752),o=a(17),s=a(1038);const l={};function c(t){if(!t.name)throw new Error("Invalid constructor parameters for Location. No 'name' property");return l[t.name]instanceof i.a&&console.warn(`Property with name ${t.name} already exists and is being overwritten`),l[t.name]=new i.a(t),l[t.name]}r.a[o.a.Aevum]=new n.a(o.a.Aevum),r.a[o.a.Chongqing]=new n.a(o.a.Chongqing),r.a[o.a.Ishima]=new n.a(o.a.Ishima),r.a[o.a.NewTokyo]=new n.a(o.a.NewTokyo),r.a[o.a.Sector12]=new n.a(o.a.Sector12),r.a[o.a.Volhaven]=new n.a(o.a.Volhaven),r.a[o.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 ",r.a[o.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------G-- \n / 39 | 41 [church] \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 ",r.a[o.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 [glitch] \n \\ / [nova medical] / 4/30 \\ \n 49 x A \\ H \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 ",r.a[o.a.NewTokyo].asciiArt="\n \n \n o \n \\ \n [arcade] E [defcomm] \n \\ \n o--x---A--x--o [travel agency] \n 7 8 10 H \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--F--x-----x-----x---+---x----x--I--x-o \n | \n | \n o 17 \n \n \n \n G [the slums] \n ",r.a[o.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] ",r.a[o.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 ";for(const t of s.a){const e=c(t),a=e.city;if(null===a)for(const t of Object.keys(r.a))r.a[t].addLocation(e.name);else r.a[a].addLocation(e.name)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c})),a.d(e,"b",(function(){return f}));var n=a(0),r=a.n(n),i=a(6),o=a(5),s=a(17);class l{constructor(t,e,a,n="",i=r.a.createElement(r.a.Fragment,null)){this.number=t,this.difficulty=e,this.name=a,this.desc=n,this.info=i}}const c={};function f(t){null==t.bitNodeN&&(t.bitNodeN=1);for(const t of Object.keys(i.a))i.a.hasOwnProperty(t)&&(i.a[t]=1);switch(i.a.StaneksGiftExtraSize=0,t.bitNodeN){case 1:break;case 2:i.a.HackingLevelMultiplier=.8,i.a.ServerGrowthRate=.8,i.a.ServerMaxMoney=.2,i.a.ServerStartingMoney=.4,i.a.CrimeMoney=3,i.a.InfiltrationMoney=3,i.a.FactionWorkRepGain=.5,i.a.FactionPassiveRepGain=0,i.a.StaneksGiftPowerMultiplier=2,i.a.StaneksGiftExtraSize=-6,i.a.PurchasedServerSoftcap=1.3,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=5;break;case 3:i.a.HackingLevelMultiplier=.8,i.a.RepToDonateToFaction=.5,i.a.AugmentationRepCost=3,i.a.AugmentationMoneyCost=3,i.a.ServerMaxMoney=.2,i.a.ServerStartingMoney=.2,i.a.ServerGrowthRate=.2,i.a.ScriptHackMoney=.2,i.a.CompanyWorkMoney=.25,i.a.CrimeMoney=.25,i.a.HacknetNodeMoney=.25,i.a.HomeComputerRamCost=1.5,i.a.PurchasedServerCost=2,i.a.StaneksGiftPowerMultiplier=.75,i.a.StaneksGiftExtraSize=-2,i.a.PurchasedServerSoftcap=1.3,i.a.GangSoftcap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.5;break;case 4:i.a.ServerMaxMoney=.15,i.a.ServerStartingMoney=.75,i.a.ScriptHackMoney=.2,i.a.CompanyWorkMoney=.1,i.a.CrimeMoney=.2,i.a.HacknetNodeMoney=.05,i.a.CompanyWorkExpGain=.5,i.a.ClassGymExpGain=.5,i.a.FactionWorkExpGain=.5,i.a.HackExpGain=.4,i.a.CrimeExpGain=.5,i.a.FactionWorkRepGain=.75,i.a.StaneksGiftPowerMultiplier=1.5,i.a.StaneksGiftExtraSize=0,i.a.PurchasedServerSoftcap=1.2,i.a.WorldDaemonDifficulty=3,i.a.GangUniqueAugs=.5;break;case 5:i.a.ServerMaxMoney=2,i.a.ServerStartingSecurity=2,i.a.ServerStartingMoney=.5,i.a.ScriptHackMoney=.15,i.a.HacknetNodeMoney=.2,i.a.CrimeMoney=.5,i.a.InfiltrationRep=1.5,i.a.InfiltrationMoney=1.5,i.a.AugmentationMoneyCost=2,i.a.HackExpGain=.5,i.a.CorporationValuation=.5,i.a.StaneksGiftPowerMultiplier=1.3,i.a.StaneksGiftExtraSize=0,i.a.PurchasedServerSoftcap=1.2,i.a.WorldDaemonDifficulty=1.5,i.a.GangUniqueAugs=.5;break;case 6:i.a.HackingLevelMultiplier=.35,i.a.ServerMaxMoney=.4,i.a.ServerStartingMoney=.5,i.a.ServerStartingSecurity=1.5,i.a.ScriptHackMoney=.75,i.a.CompanyWorkMoney=.5,i.a.CrimeMoney=.75,i.a.InfiltrationMoney=.75,i.a.CorporationValuation=.2,i.a.HacknetNodeMoney=.2,i.a.HackExpGain=.25,i.a.DaedalusAugsRequirement=1.166,i.a.PurchasedServerSoftcap=2,i.a.StaneksGiftPowerMultiplier=.5,i.a.StaneksGiftExtraSize=2,i.a.GangSoftcap=.7,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.2;break;case 7:i.a.BladeburnerRank=.6,i.a.BladeburnerSkillCost=2,i.a.AugmentationMoneyCost=3,i.a.HackingLevelMultiplier=.35,i.a.ServerMaxMoney=.4,i.a.ServerStartingMoney=.5,i.a.ServerStartingSecurity=1.5,i.a.ScriptHackMoney=.5,i.a.CompanyWorkMoney=.5,i.a.CrimeMoney=.75,i.a.InfiltrationMoney=.75,i.a.CorporationValuation=.2,i.a.HacknetNodeMoney=.2,i.a.HackExpGain=.25,i.a.FourSigmaMarketDataCost=2,i.a.FourSigmaMarketDataApiCost=2,i.a.DaedalusAugsRequirement=1.166,i.a.PurchasedServerSoftcap=2,i.a.StaneksGiftPowerMultiplier=.9,i.a.StaneksGiftExtraSize=-1,i.a.GangSoftcap=.7,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.2;break;case 8:i.a.ScriptHackMoney=.3,i.a.ScriptHackMoneyGain=0,i.a.ManualHackMoney=0,i.a.CompanyWorkMoney=0,i.a.CrimeMoney=0,i.a.HacknetNodeMoney=0,i.a.InfiltrationMoney=0,i.a.RepToDonateToFaction=0,i.a.CorporationValuation=0,i.a.CodingContractMoney=0,i.a.StaneksGiftExtraSize=-7,i.a.PurchasedServerSoftcap=4,i.a.GangSoftcap=0,i.a.CorporationSoftCap=0,i.a.GangUniqueAugs=0;break;case 9:i.a.HackingLevelMultiplier=.5,i.a.StrengthLevelMultiplier=.45,i.a.DefenseLevelMultiplier=.45,i.a.DexterityLevelMultiplier=.45,i.a.AgilityLevelMultiplier=.45,i.a.CharismaLevelMultiplier=.45,i.a.PurchasedServerLimit=0,i.a.HomeComputerRamCost=5,i.a.CrimeMoney=.5,i.a.ScriptHackMoney=.1,i.a.HackExpGain=.05,i.a.ServerStartingMoney=.1,i.a.ServerMaxMoney=.1,i.a.ServerStartingSecurity=2.5,i.a.CorporationValuation=.5,i.a.FourSigmaMarketDataCost=5,i.a.FourSigmaMarketDataApiCost=4,i.a.BladeburnerRank=.9,i.a.BladeburnerSkillCost=1.2,i.a.StaneksGiftPowerMultiplier=.5,i.a.StaneksGiftExtraSize=2,i.a.GangSoftcap=.8,i.a.CorporationSoftCap=.7,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.25;break;case 10:i.a.HackingLevelMultiplier=.35,i.a.StrengthLevelMultiplier=.4,i.a.DefenseLevelMultiplier=.4,i.a.DexterityLevelMultiplier=.4,i.a.AgilityLevelMultiplier=.4,i.a.CharismaLevelMultiplier=.4,i.a.CompanyWorkMoney=.5,i.a.CrimeMoney=.5,i.a.HacknetNodeMoney=.5,i.a.ManualHackMoney=.5,i.a.ScriptHackMoney=.5,i.a.CodingContractMoney=.5,i.a.InfiltrationMoney=.5,i.a.CorporationValuation=.5,i.a.AugmentationMoneyCost=5,i.a.AugmentationRepCost=2,i.a.HomeComputerRamCost=1.5,i.a.PurchasedServerCost=5,i.a.PurchasedServerLimit=.6,i.a.PurchasedServerMaxRam=.5,i.a.BladeburnerRank=.8,i.a.StaneksGiftPowerMultiplier=.75,i.a.StaneksGiftExtraSize=-3,i.a.PurchasedServerSoftcap=1.1,i.a.GangSoftcap=.9,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=2,i.a.GangUniqueAugs=.25;break;case 11:i.a.HackingLevelMultiplier=.6,i.a.HackExpGain=.5,i.a.ServerMaxMoney=.1,i.a.ServerStartingMoney=.1,i.a.ServerGrowthRate=.2,i.a.ServerWeakenRate=2,i.a.CrimeMoney=3,i.a.CompanyWorkMoney=.5,i.a.HacknetNodeMoney=.1,i.a.AugmentationMoneyCost=2,i.a.InfiltrationMoney=2.5,i.a.InfiltrationRep=2.5,i.a.CorporationValuation=.1,i.a.CodingContractMoney=.25,i.a.FourSigmaMarketDataCost=4,i.a.FourSigmaMarketDataApiCost=4,i.a.PurchasedServerSoftcap=2,i.a.CorporationSoftCap=.9,i.a.WorldDaemonDifficulty=1.5,i.a.GangUniqueAugs=.75;break;case 12:{let e=0;for(let a=0;au())return 1/0;const a=Math.max(0,Math.log(e)/Math.log(2)-6);return e*o.a.BaseCostFor1GBOfRamServer*i.a.PurchasedServerCost*Math.pow(i.a.PurchasedServerSoftcap,a)}function f(){return Math.round(o.a.PurchasedServerLimit*i.a.PurchasedServerLimit)}function u(){const t=Math.round(o.a.PurchasedServerMaxRam*i.a.PurchasedServerMaxRam);return 1<<31-Math.clz32(t)}function m(t,e,a,i){if(!i.canAfford(a))return void Object(s.a)("You don't have enough money to purchase this server!");if(i.purchasedServers.length>=f())return void Object(s.a)("You have reached the maximum limit of "+f()+" servers. You cannot purchase any more. You can delete some of your purchased servers using the deleteServer() Netscript function in a script");if(""==t)return void Object(s.a)("You must enter a hostname for your new server!");const o=Object(r.f)({adminRights:!0,hostname:t,ip:Object(n.e)(),isConnectedTo:!1,maxRam:e,organizationName:"",purchasedByPlayer:!0});Object(n.a)(o),i.purchasedServers.push(o.hostname);const l=i.getHomeComputer();l.serversOnNetwork.push(o.hostname),o.serversOnNetwork.push(l.hostname),i.loseMoney(a,"servers"),Object(s.a)("Server successfully purchased with hostname "+o.hostname)}function h(t){const e=t.getUpgradeHomeRamCost();if(!t.canAfford(e))return void Object(s.a)("You do not have enough money to purchase additional RAM for your home computer");const a=t.getHomeComputer();a.maxRam>=o.a.HomeComputerMaxRam?Object(s.a)("You cannot upgrade your home computer RAM because it is at its maximum possible value"):(a.maxRam*=2,t.loseMoney(e,"servers"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return l}));var n=a(16),r=a(25),i=a(83);class o{get filename(){return this.fn}set filename(t){this.fn=t}constructor(t="",e=""){this.fn=(t.endsWith(".txt")?t:t+".txt").replace(/\s+/g,""),this.text=e}append(t){this.text+=t}download(){const t=this.fn,e=new Blob([this.text],{type:"text/plain"}),a=window.navigator;if(a.msSaveOrOpenBlob)a.msSaveOrOpenBlob(e,t);else{const t=document.createElement("a"),a=URL.createObjectURL(e);t.href=a,t.download=this.fn,document.body.appendChild(t),t.click(),setTimeout(()=>{document.body.removeChild(t),window.URL.revokeObjectURL(a)},0)}}read(){return this.text}show(){Object(n.a)(`${this.fn}

${this.text}`)}toJSON(){return Object(r.b)("TextFile",this)}write(t){this.text=t}static fromJSON(t){return Object(r.a)(o,t.data)}}function s(t,e){let a=t.endsWith(".txt")?t:t+".txt";Object(i.h)(a)&&(a=Object(i.k)(a));for(const t of e.textFiles)if(t.fn===a)return t;return null}function l(t,e,a){if(null!==s(t,a))return void console.error(`A file named "${t}" already exists on server ${a.hostname}.`);const n=new o(t,e);return a.textFiles.push(n),n}r.c.constructors.TextFile=o},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(247),r=a(134);const i={};i[r.a.BladesIntuition]=new n.a({name:r.a.BladesIntuition,desc:"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%",baseCost:3,costInc:2.1,successChanceAll:3}),i[r.a.Cloak]=new n.a({name:r.a.Cloak,desc:"Each level of this skill increases your success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%",baseCost:2,costInc:1.1,successChanceStealth:5.5}),i[r.a.ShortCircuit]=new n.a({name:r.a.ShortCircuit,desc:"Each level of this skill increases your success chance in Contracts, Operations, and BlackOps that involve retirement by 5.5%",baseCost:2,costInc:2.1,successChanceKill:5.5}),i[r.a.DigitalObserver]=new n.a({name:r.a.DigitalObserver,desc:"Each level of this skill increases your success chance in all Operations and BlackOps by 4%",baseCost:2,costInc:2.1,successChanceOperation:4}),i[r.a.Tracer]=new n.a({name:r.a.Tracer,desc:"Each level of this skill increases your success chance in all Contracts by 4%",baseCost:2,costInc:2.1,successChanceContract:4}),i[r.a.Overclock]=new n.a({name:r.a.Overclock,desc:"Each level of this skill decreases the time it takes to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)",baseCost:3,costInc:1.4,maxLvl:90,actionTime:1}),i[r.a.Reaper]=new n.a({name:r.a.Reaper,desc:"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%",baseCost:2,costInc:2.1,effStr:2,effDef:2,effDex:2,effAgi:2}),i[r.a.EvasiveSystem]=new n.a({name:r.a.EvasiveSystem,desc:"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%",baseCost:2,costInc:2.1,effDex:4,effAgi:4}),i[r.a.Datamancer]=new n.a({name:r.a.Datamancer,desc:"Each level of this skill increases your effectiveness in synthoid population analysis and investigation by 5%. This affects all actions that can potentially increase the accuracy of your synthoid population/community estimates.",baseCost:3,costInc:1,successChanceEstimate:5}),i[r.a.CybersEdge]=new n.a({name:r.a.CybersEdge,desc:"Each level of this skill increases your max stamina by 2%",baseCost:1,costInc:3,stamina:2}),i[r.a.HandsOfMidas]=new n.a({name:r.a.HandsOfMidas,desc:"Each level of this skill increases the amount of money you receive from Contracts by 10%",baseCost:2,costInc:2.5,money:10}),i[r.a.Hyperdrive]=new n.a({name:r.a.Hyperdrive,desc:"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%",baseCost:1,costInc:2.5,expGain:10})},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(178),r=a(1008);const i={};n.b.forEach(t=>{i[t.name]=new r.a(t.name,t.cost,t.upgType,t.mults)})},function(t,e,a){"use strict";a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return s})),a.d(e,"d",(function(){return l})),a.d(e,"a",(function(){return c}));var n=a(148),r=a(76),i=a(8);function o(t,e,a){if(isNaN(e)||e<=0||!(t instanceof n.a))return null;e=Math.min(e,t.maxShares);return a===r.a.Long?e*t.getAskPrice()+i.a.StockMarketCommission:e*t.getBidPrice()+i.a.StockMarketCommission}function s(t,e,a){if(isNaN(e)||e<=0||!(t instanceof n.a))return null;e=Math.min(e,t.maxShares);if(a===r.a.Long)return e*t.getBidPrice()-i.a.StockMarketCommission;return e*t.playerAvgShortPx+((t.playerAvgShortPx-t.getAskPrice())*e-i.a.StockMarketCommission)}function l(t,e){if(isNaN(e)||e<=0||!(t instanceof n.a))return;e=Math.min(e,t.maxShares);const a=t.shareTxUntilMovement;if(e<=a)return t.shareTxUntilMovement-=e,void(t.shareTxUntilMovement<=0&&(t.shareTxUntilMovement=t.shareTxForMovement,t.influenceForecast(.006),t.influenceForecastForecast(t.mv/100*.006)));const r=e-a;let i=1+Math.ceil(r/t.shareTxForMovement);t.shareTxUntilMovement=t.shareTxForMovement-(e-t.shareTxUntilMovement)%t.shareTxForMovement,(t.shareTxUntilMovement===t.shareTxForMovement||t.shareTxUntilMovement<=0)&&(++i,t.shareTxUntilMovement=t.shareTxForMovement);const o=.006*(i-1),s=o*(t.mv/100);t.influenceForecast(o),t.influenceForecastForecast(s)}function c(t,e,a){if(!(t instanceof n.a))return 0;const o=e===r.a.Long,s=a-i.a.StockMarketCommission,l=o?t.getAskPrice():t.getBidPrice();return Math.floor(s/l)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return o})),a.d(e,"d",(function(){return s})),a.d(e,"c",(function(){return l}));var n=a(6),r=a(8);function i(){return r.a.MarketData4SCost*n.a.FourSigmaMarketDataCost}function o(){return r.a.MarketDataTixApi4SCost*n.a.FourSigmaMarketDataApiCost}function s(){return r.a.WSEAccountCost}function l(){return r.a.TIXAPICost}},,,,,,function(t,e,a){"use strict";a.d(e,"c",(function(){return f})),a.d(e,"a",(function(){return u})),a.d(e,"b",(function(){return m}));var n=a(8),r=a(2),i=a(47),o=a(132),s=a(26),l=a(4),c=a(317);function f(t){const e=((new Date).getTime()-r.a.lastUpdate)/1e3;let a=t.onlineRunningTime/14400;a>=1&&(a=1);for(const a of Object.keys(t.dataMap))if(t.dataMap.hasOwnProperty(a)){if(0==t.dataMap[a][2]||null==t.dataMap[a][2])continue;const n=Object(s.d)(a);if(null==n)continue;const c=Math.round(.5*t.dataMap[a][2]/t.onlineRunningTime*e);t.log(`Called on ${n.hostname} ${c} times while offline`);const f=Object(s.d)(t.server);if(null===f)throw new Error("getServer of null key?");if(!(n instanceof i.a))throw new Error("trying to grow a non-normal server");const u=Object(o.e)(n,c,r.a,f.cpuCores);t.log(`'${n.hostname}' grown by ${l.a.format(100*u-100,"0.000000%")} while offline`)}const c=a*(t.onlineExpGained/t.onlineRunningTime)*e;r.a.gainHackingExp(c),t.offlineRunningTime+=e,t.offlineExpGained+=c;for(const a of Object.keys(t.dataMap))if(t.dataMap.hasOwnProperty(a)){if(0==t.dataMap[a][3]||null==t.dataMap[a][3])continue;const r=Object(s.d)(a);if(null==r)continue;if(!(r instanceof i.a))throw new Error("trying to weaken a non-normal server");const o=Object(s.d)(t.server);if(null===o)throw new Error("getServer of null key?");const l=Math.round(.5*t.dataMap[a][3]/t.onlineRunningTime*e);t.log(`Called weaken() on ${r.hostname} ${l} times while offline`);const c=1+(o.cpuCores-1)/16;r.weaken(n.a.ServerWeakenAmount*l*c)}}function u(t,e,a){for(let n=0;nObject(o.a)({money:{color:t.colors.money}}));function l({hashes:t}){const e=s();return n.createElement("span",{className:e.money},"number"==typeof t?r.a.formatHashes(t):t)}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return D}));var n=a(25),r=a(259),i=a(42),o=a(527),s=a(269),l=a(136),c=a(347),f=a(641),u=a(257),m=a(24),h=a(224),d=a(247),p=a(423),g=a(27),y=a(642),b=a(266),E=a(36),v=a(61),k=a(4),_=a(6),w=a(301),S=a(204),C=a(29),x=a(399),L=a(16),O=a(9),M=a(57),T=a(15),A=a(1002),R=a(105),N=a(5),P=a(59),I=a(28);function F(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class D{constructor(t){F(this,"numHosp",0),F(this,"moneyLost",0),F(this,"rank",0),F(this,"maxRank",0),F(this,"skillPoints",0),F(this,"totalSkillPoints",0),F(this,"teamSize",0),F(this,"teamLost",0),F(this,"hpLost",0),F(this,"storedCycles",0),F(this,"randomEventCounter",Object(E.a)(240,600)),F(this,"actionTimeToComplete",0),F(this,"actionTimeCurrent",0),F(this,"actionTimeOverflow",0),F(this,"action",new r.a({type:i.a.Idle})),F(this,"cities",{}),F(this,"city",v.a.CityNames[2]),F(this,"skills",{}),F(this,"skillMultipliers",{}),F(this,"staminaBonus",0),F(this,"maxStamina",0),F(this,"stamina",0),F(this,"contracts",{}),F(this,"operations",{}),F(this,"blackops",{}),F(this,"logging",{general:!0,contracts:!0,ops:!0,blackops:!0,events:!0}),F(this,"automateEnabled",!1),F(this,"automateActionHigh",new r.a({type:i.a.Idle})),F(this,"automateThreshHigh",0),F(this,"automateActionLow",new r.a({type:i.a.Idle})),F(this,"automateThreshLow",0),F(this,"consoleHistory",[]),F(this,"consoleLogs",["Bladeburner Console","Type 'help' to see console commands"]);for(let t=0;tthis.rank)return{error:"Tried to start a Black Operation without the rank requirement"};const a=[];for(const t of Object.keys(s.a))s.a.hasOwnProperty(t)&&a.push(t);a.sort((function(t,e){return s.a[t].reqdRank-s.a[e].reqdRank}));const n=a.indexOf(t.name);return-1===n?{error:`Invalid Black Op: '${name}'`}:n>0&&null==this.blackops[a[n-1]]?{error:`Preceding Black Op must be completed before starting '${t.name}'.`}:{isAvailable:!0,action:e}}startAction(t,e){if(null!=e)switch(this.action=e,this.actionTimeCurrent=0,e.type){case i.a.Idle:this.actionTimeToComplete=0;break;case i.a.Contract:try{const t=this.getActionObject(e);if(null==t)throw new Error("Failed to get Contract Object for: "+e.name);if(t.count<1)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(t){Object(b.a)(t)}break;case i.a.Operation:try{const t=this.getActionObject(e);if(null==t)throw new Error("Failed to get Operation Object for: "+e.name);if(t.count<1)return this.resetAction();if("Raid"===e.name&&0===this.getCurrentCity().comms)return this.resetAction();this.actionTimeToComplete=t.getActionTime(this)}catch(t){Object(b.a)(t)}break;case i.a.BlackOp:case i.a.BlackOperation:try{const t=this.canAttemptBlackOp(e);if(!t.isAvailable){this.resetAction(),this.log("Error: "+t.error);break}if(void 0===t.action)throw new Error("action should not be null");this.actionTimeToComplete=t.action.getActionTime(this)}catch(t){Object(b.a)(t)}break;case i.a.Recruitment:this.actionTimeToComplete=this.getRecruitmentTime(t);break;case i.a.Training:case i.a.FieldAnalysis:case i.a["Field Analysis"]:this.actionTimeToComplete=30;break;case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:this.actionTimeToComplete=60;break;default:throw new Error("Invalid Action Type in startAction(Bladeburner,player, ): "+e.type)}}upgradeSkill(t){const e=t.name;if(this.skills[e]?++this.skills[e]:this.skills[e]=1,isNaN(this.skills[e])||this.skills[e]<0)throw new Error("Level of Skill "+e+" is invalid: "+this.skills[e]);this.updateSkillMultipliers()}executeConsoleCommands(t,e){try{this.consoleHistory[this.consoleHistory.length-1]!=e&&(this.consoleHistory.push(e),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1));const a=e.split(";");for(let e=0;e100&&this.consoleLogs.shift())}log(t){this.postToConsole(`[${Object(A.a)()}] ${t}`)}resetAction(){this.action=new r.a({type:i.a.Idle})}clearConsole(){this.consoleLogs.length=0}prestige(){this.resetAction();const t=C.a[N.a.Bladeburners];this.rank>=v.a.RankNeededForFaction&&Object(R.e)(t)}storeCycles(t=0){this.storedCycles+=t}getActionIdFromTypeAndName(t="",e=""){if(""===t||""===e)return null;const a=new r.a,n=t.toLowerCase().trim(),o=e.toLowerCase().trim();switch(n){case"contract":case"contracts":case"contr":return a.type=i.a.Contract,this.contracts.hasOwnProperty(e)?(a.name=e,a):null;case"operation":case"operations":case"op":case"ops":return a.type=i.a.Operation,this.operations.hasOwnProperty(e)?(a.name=e,a):null;case"blackoperation":case"black operation":case"black operations":case"black op":case"black ops":case"blackop":case"blackops":return a.type=i.a.BlackOp,s.a.hasOwnProperty(e)?(a.name=e,a):null;case"general":case"general action":case"gen":break;default:return null}if(n.startsWith("gen")){switch(o){case"training":a.type=i.a.Training,a.name="Training";break;case"recruitment":case"recruit":a.type=i.a.Recruitment,a.name="Recruitment";break;case"field analysis":case"fieldanalysis":a.type=i.a["Field Analysis"],a.name="Field Analysis";break;case"diplomacy":a.type=i.a.Diplomacy,a.name="Diplomacy";break;case"hyperbolic regeneration chamber":a.type=i.a["Hyperbolic Regeneration Chamber"],a.name="Hyperbolic Regeneration Chamber";break;case"incite violence":a.type=i.a["Incite Violence"],a.name="Incite Violence";break;default:return null}return a}return null}executeStartConsoleCommand(t,e){if(3!==e.length)return this.postToConsole("Invalid usage of 'start' console command: start [type] [name]"),void this.postToConsole("Use 'help start' for more info");const a=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=u.a[a]?(this.action.type=i.a[a],this.action.name=a,this.startAction(t,this.action)):this.postToConsole("Invalid action name specified: "+e[2]);break;case"contract":case"contracts":null!=this.contracts[a]?(this.action.type=i.a.Contract,this.action.name=a,this.startAction(t,this.action)):this.postToConsole("Invalid contract name specified: "+e[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[a]?(this.action.type=i.a.Operation,this.action.name=a,this.startAction(t,this.action)):this.postToConsole("Invalid Operation name specified: "+e[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=s.a[a]?(this.action.type=i.a.BlackOperation,this.action.name=a,this.startAction(t,this.action)):this.postToConsole("Invalid BlackOp name specified: "+e[2]);break;default:this.postToConsole("Invalid action/event type specified: "+e[1]),this.postToConsole("Examples of valid action/event identifiers are: [general, contract, op, blackop]")}}executeSkillConsoleCommand(t){switch(t.length){case 1:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break;case 2:if("list"===t[1].toLowerCase()){this.postToConsole("Skills: ");const t=Object.keys(h.a);for(let e=0;e=a.maxLvl?this.postToConsole(`This skill ${a.name} is already at max level (${t}/${a.maxLvl}).`):this.skillPoints>=n?(this.skillPoints-=n,this.upgradeSkill(a),this.log(a.name+" upgraded to Level "+this.skills[e])):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(m.d)(n,0))}else this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info");break}default:this.postToConsole("Invalid usage of 'skill' console command: skill [action] [name]"),this.postToConsole("Use 'help skill' for more info")}}executeLogConsoleCommand(t){if(t.length<3)return this.postToConsole("Invalid usage of log command: log [enable/disable] [action/event]"),void this.postToConsole("Use 'help log' for more details and examples");let e=!0;switch(t[1].toLowerCase().includes("d")&&(e=!1),t[2].toLowerCase()){case"general":case"gen":this.logging.general=e,this.log("Logging "+(e?"enabled":"disabled")+" for general actions");break;case"contract":case"contracts":this.logging.contracts=e,this.log("Logging "+(e?"enabled":"disabled")+" for Contracts");break;case"ops":case"op":case"operations":case"operation":this.logging.ops=e,this.log("Logging "+(e?"enabled":"disabled")+" for Operations");break;case"blackops":case"blackop":case"black operations":case"black operation":this.logging.blackops=e,this.log("Logging "+(e?"enabled":"disabled")+" for BlackOps");break;case"event":case"events":this.logging.events=e,this.log("Logging "+(e?"enabled":"disabled")+" for events");break;case"all":this.logging.general=e,this.logging.contracts=e,this.logging.ops=e,this.logging.blackops=e,this.logging.events=e,this.log("Logging "+(e?"enabled":"disabled")+" for everything");break;default:this.postToConsole("Invalid action/event type specified: "+t[2]),this.postToConsole("Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]")}}executeHelpConsoleCommand(t){if(1===t.length)for(const t of y.a.helpList)this.postToConsole(t);else for(let e=1;e0&&(i*=Object(E.a)(2,4),--n.comms,++a.comms);const o=Math.round(n.pop*i);n.pop-=o,a.pop+=o}triggerPotentialMigration(t,e){(null==e||isNaN(e))&&console.error("Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),e>1&&(e/=100),Math.random()=1){let n;n=t?Math.ceil(a/2):Math.floor(a);const r=Object(E.a)(0,n);this.teamSize-=r,this.teamLost+=r,this.logging.ops&&r>0&&this.log("Lost "+Object(m.d)(r,0)+" team members during this "+e.name)}const n=this.getCurrentCity();switch(e.name){case"Investigation":t?n.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":t?n.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":t&&n.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),n.changeChaosByCount(.1);break;case"Raid":if(t)n.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--n.comms;else{const t=Object(E.a)(-10,-5)/10;n.changePopulationByPercentage(t,{nonZero:!0,changeEstEqually:!1})}n.changeChaosByPercentage(Object(E.a)(1,5));break;case"Stealth Retirement Operation":t&&n.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),n.changeChaosByPercentage(Object(E.a)(-3,-1));break;case"Assassination":t&&n.changePopulationByCount(-1,{estChange:-1,estOffset:0}),n.changeChaosByPercentage(Object(E.a)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}}getActionObject(t){switch(t.type){case i.a.Contract:return this.contracts[t.name];case i.a.Operation:return this.operations[t.name];case i.a.BlackOp:case i.a.BlackOperation:return s.a[t.name];case i.a.Training:return u.a.Training;case i.a["Field Analysis"]:return u.a["Field Analysis"];case i.a.Recruitment:return u.a.Recruitment;case i.a.Diplomacy:return u.a.Diplomacy;case i.a["Hyperbolic Regeneration Chamber"]:return u.a["Hyperbolic Regeneration Chamber"];case i.a["Incite Violence"]:return u.a["Incite Violence"];default:return null}}completeContract(t){if(this.action.type!==i.a.Contract)throw new Error("completeContract() called even though current action is not a Contract");const e=this.getCurrentCity();if(t)switch(this.action.name){case"Tracking":e.improvePopulationEstimateByCount(Object(E.a)(100,1e3));break;case"Bounty Hunter":e.changePopulationByCount(-1,{estChange:-1,estOffset:0}),e.changeChaosByCount(.02);break;case"Retirement":e.changePopulationByCount(-1,{estChange:-1,estOffset:0}),e.changeChaosByCount(.04);break;default:throw new Error("Invalid Action name in completeContract: "+this.action.name)}}completeAction(t,e){switch(this.action.type){case i.a.Contract:case i.a.Operation:try{const t=this.action.type===i.a.Operation,a=this.getActionObject(this.action);if(null==a)throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);const n=a.getDifficulty(),r=Math.pow(n,v.a.DiffMultExponentialFactor)+n/v.a.DiffMultLinearFactor,o=Math.pow(a.rewardFac,a.level-1);if(this.stamina-=v.a.BaseStaminaLoss*r,this.stamina<0&&(this.stamina=0),a.attempt(this)){this.gainActionStats(e,a,!0),++a.successes,--a.count;let n=0;if(t||(n=v.a.ContractBaseMoneyGain*o*this.skillMultipliers.money,e.gainMoney(n,"bladeburner")),t?a.setMaxLevel(v.a.OperationSuccessesPerLevel):a.setMaxLevel(v.a.ContractSuccessesPerLevel),a.rankGain){const r=Object(w.a)(a.rankGain*o*_.a.BladeburnerRank,10);this.changeRank(e,r),t&&this.logging.ops?this.log(a.name+" successfully completed! Gained "+Object(m.d)(r,3)+" rank"):!t&&this.logging.contracts&&this.log(a.name+" contract successfully completed! Gained "+Object(m.d)(r,3)+" rank and "+k.a.formatMoney(n))}t?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(e,a,!1),++a.failures;let n=0,i=0;if(a.rankLoss&&(n=Object(w.a)(a.rankLoss*o,10),this.changeRank(e,-1*n)),a.hpLoss){i=a.hpLoss*r,i=Math.ceil(Object(w.a)(i,10)),this.hpLost+=i;const t=Object(x.a)(e,i);e.takeDamage(i)&&(++this.numHosp,this.moneyLost+=t)}let s="";n>0&&(s+="Lost "+Object(m.d)(n,3)+" rank. "),i>0&&(s+="Took "+Object(m.d)(i,0)+" damage."),t&&this.logging.ops?this.log(a.name+" failed! "+s):!t&&this.logging.contracts&&this.log(a.name+" contract failed! "+s),t?this.completeOperation(!1):this.completeContract(!1)}a.autoLevel&&(a.level=a.maxLevel),this.startAction(e,this.action)}catch(t){Object(b.a)(t)}break;case i.a.BlackOp:case i.a.BlackOperation:try{const a=this.getActionObject(this.action);if(null==a||!(a instanceof l.a))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);const n=a.getDifficulty(),r=Math.pow(n,v.a.DiffMultExponentialFactor)+n/v.a.DiffMultLinearFactor;this.stamina-=v.a.BaseStaminaLoss*r,this.stamina<0&&(this.stamina=0);const i=a.teamCount;let o;if(a.attempt(this)){this.gainActionStats(e,a,!0),a.count=0,this.blackops[a.name]=!0;let n=0;if(a.rankGain&&(n=Object(w.a)(a.rankGain*_.a.BladeburnerRank,10),this.changeRank(e,n)),o=Math.ceil(i/2),a.name===P.a.OperationDaedalus)return this.resetAction(),t.toBitVerse(!1,!1);this.logging.blackops&&this.log(a.name+" successful! Gained "+Object(m.d)(n,1)+" rank")}else{this.gainActionStats(e,a,!1);let t=0,n=0;if(a.rankLoss&&(t=Object(w.a)(a.rankLoss,10),this.changeRank(e,-1*t)),a.hpLoss){n=a.hpLoss*r,n=Math.ceil(Object(w.a)(n,10));const t=Object(x.a)(e,n);e.takeDamage(n)&&(++this.numHosp,this.moneyLost+=t)}o=Math.floor(i),this.logging.blackops&&this.log(a.name+" failed! Lost "+Object(m.d)(t,1)+" rank and took "+Object(m.d)(n,0)+" damage")}if(this.resetAction(),i>=1){const t=Object(E.a)(1,o);this.teamSize-=t,this.teamLost+=t,this.logging.blackops&&this.log("You lost "+Object(m.d)(t,0)+" team members during "+a.name)}}catch(t){Object(b.a)(t)}break;case i.a.Training:{this.stamina-=.5*v.a.BaseStaminaLoss;const t=30*e.strength_exp_mult,a=30*e.defense_exp_mult,n=30*e.dexterity_exp_mult,r=30*e.agility_exp_mult,i=.04*this.skillMultipliers.stamina;e.gainStrengthExp(t),e.gainDefenseExp(a),e.gainDexterityExp(n),e.gainAgilityExp(r),this.staminaBonus+=i,this.logging.general&&this.log("Training completed. Gained: "+Object(m.d)(t,1)+" str exp, "+Object(m.d)(a,1)+" def exp, "+Object(m.d)(n,1)+" dex exp, "+Object(m.d)(r,1)+" agi exp, "+Object(m.d)(i,3)+" max stamina"),this.startAction(e,this.action);break}case i.a.FieldAnalysis:case i.a["Field Analysis"]:{let t=.04*Math.pow(e.hacking,.3)+.04*Math.pow(e.intelligence,.9)+.02*Math.pow(e.charisma,.3);if(t*=e.bladeburner_analysis_mult,isNaN(t)||t<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");const a=20*e.hacking_exp_mult,n=20*e.charisma_exp_mult,r=.1*_.a.BladeburnerRank;e.gainHackingExp(a),e.gainIntelligenceExp(v.a.BaseIntGain),e.gainCharismaExp(n),this.changeRank(e,r),this.getCurrentCity().improvePopulationEstimateByPercentage(t*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log(`Field analysis completed. Gained ${Object(m.d)(r,2)} rank, `+Object(m.d)(a,1)+" hacking exp, and "+Object(m.d)(n,1)+" charisma exp"),this.startAction(e,this.action);break}case i.a.Recruitment:{const t=this.getRecruitmentSuccessChance(e);if(Math.random()=n){const t=Math.floor((this.maxRank-n)/v.a.RanksPerSkillPoint+1);this.skillPoints+=t,this.totalSkillPoints+=t}}processAction(t,e,a){if(this.action.type!==i.a.Idle){if(this.actionTimeToComplete<=0)throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);if(!(this.action instanceof r.a))throw new Error("Bladeburner.action is not an ActionIdentifier Object");return this.actionTimeCurrent+=a+this.actionTimeOverflow,this.actionTimeOverflow=0,this.actionTimeCurrent>=this.actionTimeToComplete?(this.actionTimeOverflow=this.actionTimeCurrent-this.actionTimeToComplete,this.completeAction(t,e)):void 0}}calculateStaminaGainPerSecond(t){const e=t.agility*this.skillMultipliers.effAgi,a=this.maxStamina/v.a.MaxStaminaToGainFactor;return(v.a.StaminaGainPerSecond+a)*Math.pow(e,.17)*(this.skillMultipliers.stamina*t.bladeburner_stamina_gain_mult)}calculateMaxStamina(t){const e=t.agility*this.skillMultipliers.effAgi,a=(Math.pow(e,.8)+this.staminaBonus)*this.skillMultipliers.stamina*t.bladeburner_max_stamina_mult;if(this.maxStamina!==a){const t=this.maxStamina;this.maxStamina=a,this.stamina=this.maxStamina*this.stamina/t}if(isNaN(a))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()")}create(){this.contracts.Tracking=new f.a({name:"Tracking",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(E.a)(25,150),weights:{hack:0,str:.05,def:.05,dex:.35,agi:.35,cha:.1,int:.05},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.9,int:1},isStealth:!0}),this.contracts["Bounty Hunter"]=new f.a({name:"Bounty Hunter",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(E.a)(5,150),weights:{hack:0,str:.15,def:.15,dex:.25,agi:.25,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.contracts.Retirement=new f.a({name:"Retirement",baseDifficulty:200,difficultyFac:1.03,rewardFac:1.065,rankGain:.6,hpLoss:1,count:Object(E.a)(5,150),weights:{hack:0,str:.2,def:.2,dex:.2,agi:.2,cha:.1,int:.1},decays:{hack:0,str:.91,def:.91,dex:.91,agi:.91,cha:.8,int:.9},isKill:!0}),this.operations.Investigation=new c.a({name:"Investigation",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(E.a)(1,100),weights:{hack:.25,str:.05,def:.05,dex:.2,agi:.1,cha:.25,int:.1},decays:{hack:.85,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Undercover Operation"]=new c.a({name:"Undercover Operation",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(E.a)(1,100),weights:{hack:.2,str:.05,def:.05,dex:.2,agi:.2,cha:.2,int:.1},decays:{hack:.8,str:.9,def:.9,dex:.9,agi:.9,cha:.7,int:.9},isStealth:!0}),this.operations["Sting Operation"]=new c.a({name:"Sting Operation",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5.5,rankLoss:.5,hpLoss:2.5,count:Object(E.a)(1,150),weights:{hack:.25,str:.05,def:.05,dex:.25,agi:.1,cha:.2,int:.1},decays:{hack:.8,str:.85,def:.85,dex:.85,agi:.85,cha:.7,int:.9},isStealth:!0}),this.operations.Raid=new c.a({name:"Raid",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:55,rankLoss:2.5,hpLoss:50,count:Object(E.a)(1,150),weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isKill:!0}),this.operations["Stealth Retirement Operation"]=new c.a({name:"Stealth Retirement Operation",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:22,rankLoss:2,hpLoss:10,count:Object(E.a)(1,150),weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.7,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.9},isStealth:!0,isKill:!0}),this.operations.Assassination=new c.a({name:"Assassination",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:44,rankLoss:4,hpLoss:5,count:Object(E.a)(1,150),weights:{hack:.1,str:.1,def:.1,dex:.3,agi:.3,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.8},isStealth:!0,isKill:!0})}process(t,e){if(t.isInitialized){if(t.page()!==g.a.BitVerse&&this.blackops.hasOwnProperty(P.a.OperationDaedalus))return t.toBitVerse(!1,!1);if(!1===M.a[T.a.BladesSimulacrum].owned&&e.isWorking){if(this.action.type!==i.a.Idle){let t="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(t+="

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),O.a.SuppressBladeburnerPopup||Object(L.a)(t)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=v.a.CyclesPerSecond){let a=Math.floor(this.storedCycles/v.a.CyclesPerSecond);a=Math.min(a,5),this.storedCycles-=a*v.a.CyclesPerSecond,this.calculateMaxStamina(e),this.stamina+=this.calculateStaminaGainPerSecond(e)*a,this.stamina=Math.min(this.maxStamina,this.stamina);for(const t of Object.values(this.contracts)){const e=o.a[t.name];if(void 0===e)throw new Error(`growth formula for action '${t.name}' is undefined`);t.count+=a*e()/v.a.ActionCountGrowthPeriod}for(const t of Object.values(this.operations)){const e=o.a[t.name];if(void 0===e)throw new Error(`growth formula for action '${t.name}' is undefined`);void 0!==e&&(t.count+=a*e()/v.a.ActionCountGrowthPeriod)}for(const t of v.a.CityNames){const e=this.cities[t];if(!(e instanceof p.a))throw new Error("Invalid City object when processing passive chaos reduction in Bladeburner.process");e.chaos-=1e-4*a,e.chaos=Math.max(0,e.chaos)}this.randomEventCounter-=a,this.randomEventCounter<=0&&(this.randomEvent(),this.randomEventCounter+=Object(E.a)(240,600)),this.processAction(t,e,a),this.automateEnabled&&(this.stamina<=this.automateThreshLow?this.action.name===this.automateActionLow.name&&this.action.type===this.automateActionLow.type||(this.action=new r.a({type:this.automateActionLow.type,name:this.automateActionLow.name}),this.startAction(e,this.action)):this.stamina>=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new r.a({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(e,this.action))))}}}getTypeAndNameFromActionId(t){const e={type:"",name:""},a=Object.keys(i.a);for(let n=0;nr),!1;if(o.type===i.a.BlackOp){const t=this.canAttemptBlackOp(o);if(!t.isAvailable)return n.log("bladeburner.startAction",()=>t.error+""),!1}try{return this.startAction(t,o),n.log("bladeburner.startAction",()=>`Starting bladeburner action with type '${e}' and name '${a}'`),!0}catch(t){return this.resetAction(),n.log("bladeburner.startAction",()=>r),!1}}getActionTimeNetscriptFn(t,e,a,n){const r=`Invalid action: type='${e}' name='${a}'`,o=this.getActionIdFromTypeAndName(e,a);if(null==o)return n.log("bladeburner.getActionTime",()=>r),-1;const s=this.getActionObject(o);if(null==s)return n.log("bladeburner.getActionTime",()=>r),-1;switch(o.type){case i.a.Contract:case i.a.Operation:case i.a.BlackOp:case i.a.BlackOperation:return 1e3*s.getActionTime(this);case i.a.Training:case i.a["Field Analysis"]:case i.a.FieldAnalysis:return 3e4;case i.a.Recruitment:return 1e3*this.getRecruitmentTime(t);case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:return 6e4;default:return n.log("bladeburner.getActionTime",()=>r),-1}}getActionEstimatedSuccessChanceNetscriptFn(t,e,a,n){const r=`Invalid action: type='${e}' name='${a}'`,o=this.getActionIdFromTypeAndName(e,a);if(null==o)return n.log("bladeburner.getActionEstimatedSuccessChance",()=>r),[-1,-1];const s=this.getActionObject(o);if(null==s)return n.log("bladeburner.getActionEstimatedSuccessChance",()=>r),[-1,-1];switch(o.type){case i.a.Contract:case i.a.Operation:case i.a.BlackOp:case i.a.BlackOperation:return s.getEstSuccessChance(this);case i.a.Training:case i.a["Field Analysis"]:case i.a.FieldAnalysis:case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:return[1,1];case i.a.Recruitment:{const e=this.getRecruitmentSuccessChance(t);return[e,e]}default:return n.log("bladeburner.getActionEstimatedSuccessChance",()=>r),[-1,-1]}}getActionCountRemainingNetscriptFn(t,e,a){const n=`Invalid action: type='${t}' name='${e}'`,r=this.getActionIdFromTypeAndName(t,e);if(null==r)return a.log("bladeburner.getActionCountRemaining",()=>n),-1;const o=this.getActionObject(r);if(null==o)return a.log("bladeburner.getActionCountRemaining",()=>n),-1;switch(r.type){case i.a.Contract:case i.a.Operation:return Math.floor(o.count);case i.a.BlackOp:case i.a.BlackOperation:return null!=this.blackops[e]?0:1;case i.a.Training:case i.a.Recruitment:case i.a["Field Analysis"]:case i.a.FieldAnalysis:case i.a.Diplomacy:case i.a["Hyperbolic Regeneration Chamber"]:case i.a["Incite Violence"]:return 1/0;default:return a.log("bladeburner.getActionCountRemaining",()=>n),-1}}getSkillLevelNetscriptFn(t,e){return""!==t&&h.a.hasOwnProperty(t)?null==this.skills[t]?0:this.skills[t]:(e.log("bladeburner.getSkillLevel",()=>`Invalid skill: '${t}'`),-1)}getSkillUpgradeCostNetscriptFn(t,e){if(""===t||!h.a.hasOwnProperty(t))return e.log("bladeburner.getSkillUpgradeCost",()=>`Invalid skill: '${t}'`),-1;const a=h.a[t];return null==this.skills[t]?a.calculateCost(0):a.calculateCost(this.skills[t])}upgradeSkillNetscriptFn(t,e){const a=`Invalid skill: '${t}'`;if(!h.a.hasOwnProperty(t))return e.log("bladeburner.upgradeSkill",()=>a),!1;const n=h.a[t];let r=0;this.skills[t]&&!isNaN(this.skills[t])&&(r=this.skills[t]);const i=n.calculateCost(r);return n.maxLvl&&r>=n.maxLvl?(e.log("bladeburner.upgradeSkill",()=>`Skill '${t}' is already maxed.`),!1):this.skillPoints`You do not have enough skill points to upgrade ${t} (You have ${this.skillPoints}, you need ${i})`),!1):(this.skillPoints-=i,this.upgradeSkill(n),e.log("bladeburner.upgradeSkill",()=>`'${t}' upgraded to level ${this.skills[t]}`),!0)}getTeamSizeNetscriptFn(t,e,a){if(""===t&&""===e)return this.teamSize;const n=`Invalid action: type='${t}' name='${e}'`,r=this.getActionIdFromTypeAndName(t,e);if(null==r)return a.log("bladeburner.getTeamSize",()=>n),-1;const o=this.getActionObject(r);return null==o?(a.log("bladeburner.getTeamSize",()=>n),-1):r.type===i.a.Operation||r.type===i.a.BlackOp||r.type===i.a.BlackOperation?o.teamCount:0}setTeamSizeNetscriptFn(t,e,a,n){const r=`Invalid action: type='${t}' name='${e}'`,o=this.getActionIdFromTypeAndName(t,e);if(null==o)return n.log("bladeburner.setTeamSize",()=>r),-1;if(o.type!==i.a.Operation&&o.type!==i.a.BlackOp&&o.type!==i.a.BlackOperation)return n.log("bladeburner.setTeamSize",()=>"Only valid for 'Operations' and 'BlackOps'"),-1;const s=this.getActionObject(o);if(null==s)return n.log("bladeburner.setTeamSize",()=>r),-1;let l=Math.round(a);return isNaN(l)||l<0?(n.log("bladeburner.setTeamSize",()=>"Invalid size: "+a),-1):(this.teamSize`Team size for '${e}' set to ${l}.`),l)}joinBladeburnerFactionNetscriptFn(t){const e=C.a[N.a.Bladeburners];return!!e.isMember||(this.rank>=v.a.RankNeededForFaction?(Object(R.e)(e),t.log("bladeburner.joinBladeburnerFaction",()=>`Joined ${N.a.Bladeburners} faction.`),!0):(t.log("bladeburner.joinBladeburnerFaction",()=>`You do not have the required rank (${this.rank}/${v.a.RankNeededForFaction}).`),!1))}toJSON(){return Object(n.b)("Bladeburner",this)}static fromJSON(t){return Object(n.a)(D,t.data)}}n.c.constructors.Bladeburner=D},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(362),r=a(32),i=a(344),o=a(25);const s={name:"",info:"",companyPositions:{},expMultiplier:1,salaryMultiplier:1,jobStatReqOffset:0};class l{constructor(t=s){this.name=t.name,this.info=t.info,this.companyPositions=t.companyPositions,this.expMultiplier=t.expMultiplier,this.salaryMultiplier=t.salaryMultiplier,this.jobStatReqOffset=t.jobStatReqOffset,this.isPlayerEmployed=!1,this.playerReputation=1,this.favor=0,this.isMegacorp=!1,t.isMegacorp&&(this.isMegacorp=!0)}hasPosition(t){return t instanceof n.a?null!=this.companyPositions[t.name]:null!=this.companyPositions[t]}hasAgentPositions(){return null!=this.companyPositions[r.a[0]]}hasBusinessConsultantPositions(){return null!=this.companyPositions[r.c[0]]}hasBusinessPositions(){return null!=this.companyPositions[r.b[0]]}hasEmployeePositions(){return null!=this.companyPositions[r.e[1]]}hasITPositions(){return null!=this.companyPositions[r.d[0]]}hasSecurityPositions(){return null!=this.companyPositions[r.h[2]]}hasSoftwareConsultantPositions(){return null!=this.companyPositions[r.k[0]]}hasSoftwarePositions(){return null!=this.companyPositions[r.j[0]]}hasWaiterPositions(){return null!=this.companyPositions[r.e[0]]}gainFavor(){null==this.favor&&(this.favor=0),this.favor+=this.getFavorGain()}getFavorGain(){null==this.favor&&(this.favor=0);const t=Math.max(0,Object(i.a)(this.favor))+this.playerReputation;return Object(i.b)(t)-this.favor}toJSON(){return Object(o.b)("Company",this)}static fromJSON(t){return Object(o.a)(l,t.data)}}o.c.constructors.Company=l},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(198),r=a(175),i=a(25),o=a(266);function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class l{constructor(t={}){var e;s(this,"level",1),s(this,"sizeUsed",0),s(this,"smartSupplyEnabled",!1),s(this,"smartSupplyUseLeftovers",{}),s(this,"smartSupplyStore",0),this.loc=t.loc?t.loc:"",this.size=t.size?t.size:0,this.materials={Water:new n.a({name:"Water"}),Energy:new n.a({name:"Energy"}),Food:new n.a({name:"Food"}),Plants:new n.a({name:"Plants"}),Metal:new n.a({name:"Metal"}),Hardware:new n.a({name:"Hardware"}),Chemicals:new n.a({name:"Chemicals"}),Drugs:new n.a({name:"Drugs"}),Robots:new n.a({name:"Robots"}),AICores:new n.a({name:"AI Cores"}),RealEstate:new n.a({name:"Real Estate"})},this.smartSupplyUseLeftovers={Water:!0,Energy:!0,Food:!0,Plants:!0,Metal:!0,Hardware:!0,Chemicals:!0,Drugs:!0,Robots:!0,AICores:!0,RealEstate:!0},t.corp&&t.industry&&this.updateSize(t.corp,t.industry),null!==(e=t.corp)&&void 0!==e&&e.unlockUpgrades[1]&&(this.smartSupplyEnabled=!0)}updateMaterialSizeUsed(){this.sizeUsed=0;for(const t of Object.keys(this.materials)){const e=this.materials[t];r.a.hasOwnProperty(t)&&(this.sizeUsed+=e.qty*r.a[t])}this.sizeUsed>this.size&&console.warn("Warehouse size used greater than capacity, something went wrong")}updateSize(t,e){try{this.size=100*this.level*t.getStorageMultiplier()*e.getStorageMultiplier()}catch(t){Object(o.a)(t)}}toJSON(){return Object(i.b)("Warehouse",this)}static fromJSON(t){return Object(i.a)(l,t.data)}}i.c.constructors.Warehouse=l},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(1006),r=a(579);const i={};n.a.forEach(t=>{i[t.name]=new r.a(t.name,t.desc,t.isHacking,t.isCombat,t.params)})},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(1013),r=a(1014);const i={};for(const t of r.a)i[(o=t).name]=new n.a(o);var o},function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return s})),a.d(e,"d",(function(){return l})),a.d(e,"a",(function(){return c}));var n=a(78),r=a(209);const i=[];class o{constructor(t,e,a,n,r){this.id=t,this.shape=e,this.type=a,this.power=n,this.limit=r}fullAt(t,e,a){if(e<0)return!1;if(e>=this.height(a))return!1;if(t<0)return!1;if(t>=this.width(a))return!1;let[n,r,i,o]=[0,0,1,1];1===a?[n,r,i,o]=[this.width(a)-1,0,-1,1]:2===a?[n,r,i,o]=[this.width(a)-1,this.height(a)-1,-1,-1]:3===a&&([n,r,i,o]=[0,this.height(a)-1,1,-1]);let[s,l]=[n+i*t,r+o*e];return a%2==1&&([s,l]=[l,s]),this.shape[l][s]}width(t){return t%2==0?this.shape[0].length:this.shape.length}height(t){return t%2==0?this.shape.length:this.shape[0].length}neighboors(t){const e=[],a=(a,n)=>{this.fullAt(a,n,t)||e.some(t=>t[0]===a&&t[1]===n)||e.push([a,n])};for(let e=0;ee[0]===t[0]&&e[1]===t[1])||n.push(t);return n}copy(){return new o(this.id,this.shape.map(t=>t.slice()),this.type,this.power,this.limit)}}function s(t){for(const e of i)if(e.id===t)return e;return null}!function(){const t=!1,e=!0;i.push(new o(0,r.a.S,n.b.Hacking,1,1)),i.push(new o(1,r.a.Z,n.b.Hacking,1,1)),i.push(new o(5,r.a.T,n.b.HackingSpeed,1.3,1)),i.push(new o(6,r.a.I,n.b.HackingMoney,2,1)),i.push(new o(7,r.a.J,n.b.HackingGrow,.5,1)),i.push(new o(10,r.a.T,n.b.Strength,2,1)),i.push(new o(12,r.a.L,n.b.Defense,2,1)),i.push(new o(14,r.a.L,n.b.Dexterity,2,1)),i.push(new o(16,r.a.S,n.b.Agility,2,1)),i.push(new o(18,r.a.S,n.b.Charisma,3,1)),i.push(new o(20,r.a.I,n.b.HacknetMoney,1,1)),i.push(new o(21,r.a.O,n.b.HacknetCost,2,1)),i.push(new o(25,r.a.J,n.b.Rep,.5,1)),i.push(new o(27,r.a.J,n.b.WorkMoney,10,1)),i.push(new o(28,r.a.L,n.b.Crime,2,1)),i.push(new o(30,r.a.S,n.b.Bladeburner,.4,1)),i.push(new o(100,[[t,e,e],[e,e,t],[t,e,t]],n.b.Booster,1.1,99)),i.push(new o(101,[[e,e,e,e],[e,t,t,t]],n.b.Booster,1.1,99)),i.push(new o(102,[[t,e,e,e],[e,e,t,t]],n.b.Booster,1.1,99)),i.push(new o(103,[[e,e,e,t],[t,t,e,e]],n.b.Booster,1.1,99)),i.push(new o(104,[[t,e,e],[t,e,t],[e,e,t]],n.b.Booster,1.1,99)),i.push(new o(105,[[t,t,e],[t,e,e],[e,e,t]],n.b.Booster,1.1,99)),i.push(new o(106,[[e,t,t],[e,e,e],[e,t,t]],n.b.Booster,1.1,99)),i.push(new o(107,[[t,e,t],[e,e,e],[t,e,t]],n.b.Booster,1.1,99))}();const l=new o(-2,[],n.b.None,0,1/0),c=new o(-2,[],n.b.Delete,0,1/0)},function(t,e,a){"use strict";a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return l})),a.d(e,"a",(function(){return c}));var n=a(8),r=a(6),i=a(411);function o(t){let e=1+t.favor/100;return isNaN(e)&&(e=1),e*r.a.FactionWorkRepGain}function s(t,e){return(t.hacking+t.intelligence/3)/n.a.MaxSkillLevel*t.faction_rep_mult*t.getIntelligenceBonus(1)*o(e)*Object(i.a)()}function l(t,e){return.9*(t.strength+t.defense+t.dexterity+t.agility+(t.hacking+t.intelligence)*Object(i.a)())/n.a.MaxSkillLevel/4.5*t.faction_rep_mult*o(e)*t.getIntelligenceBonus(1)}function c(t,e){return.9*(t.strength+t.defense+t.dexterity+t.agility+t.charisma+(t.hacking+t.intelligence)*Object(i.a)())/n.a.MaxSkillLevel/5.5*t.faction_rep_mult*o(e)*t.getIntelligenceBonus(1)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u})),a.d(e,"c",(function(){return m})),a.d(e,"d",(function(){return h})),a.d(e,"b",(function(){return d}));var n=a(226),r=a(76),i=a(8),o=a(2),s=a(4),l=a(20),c=a(16),f=a(0);function u(t,e,a=null,u={}){if((e=Math.round(e))<=0)return!1;if(null==t||isNaN(e))return a?a.log("stock.buy",()=>`Invalid arguments: stock='${t}' shares='${e}'`):!0!==u.suppressDialog&&Object(c.a)("Failed to buy stock. This may be a bug, contact developer"),!1;const m=Object(n.b)(t,e,r.a.Long);if(null==m)return!1;if(o.a.money`You do not have enough money to purchase this position. You need ${s.a.formatMoney(m)}.`):!0!==u.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"You do not have enough money to purchase this. You need ",f.createElement(l.a,{money:m}))),!1;if(e+t.playerShares+t.playerShortShares>t.maxShares)return a?a.log("stock.buy",()=>`Purchasing '${e+t.playerShares+t.playerShortShares}' shares would exceed ${t.symbol}'s maximum (${t.maxShares}) number of shares`):!0!==u.suppressDialog&&Object(c.a)(`You cannot purchase this many shares. ${t.symbol} has a maximum of ${s.a.formatShares(t.maxShares)} shares.`),!1;const h=t.playerShares*t.playerAvgPx;o.a.loseMoney(m,"stock");const d=h+m-i.a.StockMarketCommission;if(t.playerShares=Math.round(t.playerShares+e),t.playerAvgPx=d/t.playerShares,Object(n.d)(t,e),null!=u.rerenderFn&&"function"==typeof u.rerenderFn&&u.rerenderFn(),a){const n=`Bought ${s.a.formatShares(e)} shares of ${t.symbol} for ${s.a.formatMoney(m)}. Paid ${s.a.formatMoney(i.a.StockMarketCommission)} in commission fees.`;a.log("stock.buy",()=>n)}else!0!==u.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"Bought ",s.a.formatShares(e)," shares of ",t.symbol," for ",f.createElement(l.a,{money:m}),". Paid"," ",f.createElement(l.a,{money:i.a.StockMarketCommission})," in commission fees."));return!0}function m(t,e,a=null,i={}){if(null==t||e<0||isNaN(e))return a?a.log("stock.sell",()=>`Invalid arguments: stock='${t}' shares='${e}'`):!0!==i.suppressDialog&&Object(c.a)("Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer"),!1;if((e=Math.round(e))>t.playerShares&&(e=t.playerShares),0===e)return!1;const u=Object(n.c)(t,e,r.a.Long);if(null==u)return!1;let m=u-t.playerAvgPx*e;if(isNaN(m)&&(m=0),o.a.gainMoney(u,"stock"),a&&(a.scriptRef.onlineMoneyMade+=m,o.a.scriptProdSinceLastAug+=m),t.playerShares=Math.round(t.playerShares-e),0===t.playerShares&&(t.playerAvgPx=0),Object(n.d)(t,e),null!=i.rerenderFn&&"function"==typeof i.rerenderFn&&i.rerenderFn(),a){const n=`Sold ${s.a.formatShares(e)} shares of ${t.symbol}. After commissions, you gained a total of ${s.a.formatMoney(u)}.`;a.log("stock.sell",()=>n)}else!0!==i.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"Sold ",s.a.formatShares(e)," shares of ",t.symbol,". After commissions, you gained a total of"," ",f.createElement(l.a,{money:u}),"."));return!0}function h(t,e,a=null,u={}){if((e=Math.round(e))<=0)return!1;if(null==t||isNaN(e))return a?a.log("stock.short",()=>`Invalid arguments: stock='${t}' shares='${e}'`):!0!==u.suppressDialog&&Object(c.a)("Failed to initiate a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;const m=Object(n.b)(t,e,r.a.Short);if(null==m)return!1;if(o.a.money"You do not have enough money to purchase this short position. You need "+s.a.formatMoney(m)):!0!==u.suppressDialog&&Object(c.a)(f.createElement(f.Fragment,null,"You do not have enough money to purchase this short position. You need ",f.createElement(l.a,{money:m}))),!1;if(e+t.playerShares+t.playerShortShares>t.maxShares)return a?a.log("stock.short",()=>`This '${e+t.playerShares+t.playerShortShares}' short shares would exceed ${t.symbol}'s maximum (${t.maxShares}) number of shares.`):!0!==u.suppressDialog&&Object(c.a)(`You cannot purchase this many shares. ${t.symbol} has a maximum of ${t.maxShares} shares.`),!1;const h=t.playerShortShares*t.playerAvgShortPx;o.a.loseMoney(m,"stock");const d=h+m-i.a.StockMarketCommission;if(t.playerShortShares=Math.round(t.playerShortShares+e),t.playerAvgShortPx=d/t.playerShortShares,Object(n.d)(t,e),null!=u.rerenderFn&&"function"==typeof u.rerenderFn&&u.rerenderFn(),a){const n=`Bought a short position of ${s.a.formatShares(e)} shares of ${t.symbol} for ${s.a.formatMoney(m)}. Paid ${s.a.formatMoney(i.a.StockMarketCommission)} in commission fees.`;a.log("stock.short",()=>n)}else u.suppressDialog||Object(c.a)(f.createElement(f.Fragment,null,"Bought a short position of ",s.a.formatShares(e)," shares of ",t.symbol," for"," ",f.createElement(l.a,{money:m}),". Paid ",f.createElement(l.a,{money:i.a.StockMarketCommission})," in commission fees."));return!0}function d(t,e,a=null,i={}){if(null==t||isNaN(e)||e<0)return a?a.log("stock.sellShort",()=>`Invalid arguments: stock='${t}' shares='${e}'`):i.suppressDialog||Object(c.a)("Failed to sell a short position in a stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, so contact developer"),!1;if((e=Math.round(e))>t.playerShortShares&&(e=t.playerShortShares),0===e)return!1;const u=e*t.playerAvgShortPx,m=Object(n.c)(t,e,r.a.Short);if(null==m||isNaN(m)||null==u)return a?a.log("stock.sellShort",()=>"Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"):i.suppressDialog||Object(c.a)("Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug"),!1;let h=m-u;if(isNaN(h)&&(h=0),o.a.gainMoney(m,"stock"),a&&(a.scriptRef.onlineMoneyMade+=h,o.a.scriptProdSinceLastAug+=h),t.playerShortShares=Math.round(t.playerShortShares-e),0===t.playerShortShares&&(t.playerAvgShortPx=0),Object(n.d)(t,e),null!=i.rerenderFn&&"function"==typeof i.rerenderFn&&i.rerenderFn(),a){const n=`Sold your short position of ${s.a.formatShares(e)} shares of ${t.symbol}. After commissions, you gained a total of `+s.a.formatMoney(m);a.log("stock.sellShort",()=>n)}else i.suppressDialog||Object(c.a)(f.createElement(f.Fragment,null,"Sold your short position of ",s.a.formatShares(e)," shares of ",t.symbol,". After commissions, you gained a total of ",f.createElement(l.a,{money:m})));return!0}},function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return l})),a.d(e,"a",(function(){return c})),a.d(e,"d",(function(){return f}));var n=a(0),r=a.n(n),i=a(9),o=a(369);class s{constructor(t,e){i.a.TimestampsFormat&&(t="["+Object(o.a)(i.a.TimestampsFormat)+"] "+t),this.text=t,this.color=e}}class l{constructor(t){i.a.TimestampsFormat&&(t=r.a.createElement(r.a.Fragment,null,"[",Object(o.a)(i.a.TimestampsFormat),"] ",t)),this.raw=t}}class c{constructor(t,e){i.a.TimestampsFormat&&(t="["+Object(o.a)(i.a.TimestampsFormat)+"] "+t),this.hostname=e,this.dashes=t}}class f{constructor(t,e,a){this.time=t,this.timeLeft=t,this.action=e,this.server=a}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(6);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class i{constructor(t={name:"foo",desc:"foo"}){if(r(this,"baseCost",1),r(this,"costInc",1),r(this,"maxLvl",0),r(this,"successChanceAll",0),r(this,"successChanceStealth",0),r(this,"successChanceKill",0),r(this,"successChanceContract",0),r(this,"successChanceOperation",0),r(this,"successChanceEstimate",0),r(this,"actionTime",0),r(this,"effHack",0),r(this,"effStr",0),r(this,"effDef",0),r(this,"effDex",0),r(this,"effAgi",0),r(this,"effCha",0),r(this,"stamina",0),r(this,"money",0),r(this,"expGain",0),!t.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(!t.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.name=t.name,this.desc=t.desc,this.baseCost=t.baseCost?t.baseCost:1,this.costInc=t.costInc?t.costInc:1,t.maxLvl&&(this.maxLvl=t.maxLvl),t.successChanceAll&&(this.successChanceAll=t.successChanceAll),t.successChanceStealth&&(this.successChanceStealth=t.successChanceStealth),t.successChanceKill&&(this.successChanceKill=t.successChanceKill),t.successChanceContract&&(this.successChanceContract=t.successChanceContract),t.successChanceOperation&&(this.successChanceOperation=t.successChanceOperation),t.successChanceEstimate&&(this.successChanceEstimate=t.successChanceEstimate),t.actionTime&&(this.actionTime=t.actionTime),t.effHack&&(this.effHack=t.effHack),t.effStr&&(this.effStr=t.effStr),t.effDef&&(this.effDef=t.effDef),t.effDex&&(this.effDex=t.effDex),t.effAgi&&(this.effAgi=t.effAgi),t.effCha&&(this.effCha=t.effCha),t.stamina&&(this.stamina=t.stamina),t.money&&(this.money=t.money),t.expGain&&(this.expGain=t.expGain)}calculateCost(t){return Math.floor((this.baseCost+t*this.costInc)*n.a.BladeburnerSkillCost)}getMultiplier(t){return"successChanceAll"===t?this.successChanceAll:"successChanceStealth"===t?this.successChanceStealth:"successChanceKill"===t?this.successChanceKill:"successChanceContract"===t?this.successChanceContract:"successChanceOperation"===t?this.successChanceOperation:"successChanceEstimate"===t?this.successChanceEstimate:"actionTime"===t?this.actionTime:"effHack"===t?this.effHack:"effStr"===t?this.effStr:"effDef"===t?this.effDef:"effDex"===t?this.effDex:"effAgi"===t?this.effAgi:"effCha"===t?this.effCha:"stamina"===t?this.stamina:"money"===t?this.money:"expGain"===t?this.expGain:0}}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(1);function l(t){return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,null,t.confirmationText),r.a.createElement(o.a,{onClick:()=>{t.onConfirm()}},"Confirm"),t.additionalButton&&r.a.createElement(r.a.Fragment,null,t.additionalButton)))}},function(t,e,a){"use strict";function n(){try{return"1bf12d29"}catch(t){}return"DEV"}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(5);const r={GangRespectToReputationRatio:75,MaximumGangMembers:12,CyclesPerTerritoryAndPowerUpdate:100,AscensionMultiplierRatio:.15,Names:[n.a.SlumSnakes,n.a.Tetrads,n.a.TheSyndicate,n.a.TheDarkArmy,n.a.SpeakersForTheDead,n.a.NiteSec,n.a.TheBlackHand]}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(509),r=a(25),i=a(510);function o(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}let s=0;class l{constructor(t=null,e="",a="",n="",r=[]){o(this,"code",""),o(this,"filename",""),o(this,"url",""),o(this,"module",""),o(this,"dependencies",[]),o(this,"dependents",[]),o(this,"ramUsage",0),o(this,"server",""),this.filename=e,this.code=a,this.ramUsage=0,this.server=n,this.module="",this.moduleSequenceNumber=++s,""!==this.code&&null!==t&&this.updateRamUsage(t,r)}download(){const t=this.filename,e=new Blob([this.code],{type:"text/plain"}),a=window.navigator;if(a.msSaveOrOpenBlob)a.msSaveOrOpenBlob(e,t);else{const a=document.createElement("a"),n=URL.createObjectURL(e);a.href=n,a.download=t,document.body.appendChild(a),a.click(),setTimeout((function(){document.body.removeChild(a),window.URL.revokeObjectURL(n)}),0)}}markUpdated(){this.module="",this.moduleSequenceNumber=++s}saveScript(t,e,a,n,r){this.code=l.formatCode(a),this.filename=e,this.server=n,this.updateRamUsage(t,r),this.markUpdated();for(const t of this.dependents){const[e]=r.filter(e=>e.filename===t.filename&&e.server==t.server);null!==e&&e.markUpdated()}}async updateRamUsage(t,e){const a=await Object(n.a)(t,this.code,e);a.cost>0&&(this.ramUsage=Object(i.a)(a.cost),this.ramUsageEntries=a.entries),this.markUpdated()}imports(){return[]}toJSON(){return Object(r.b)("Script",this)}static fromJSON(t){const e=Object(r.a)(l,t.data);return e.url="",e.dependents=[],e}static formatCode(t){return t.replace(/^\s+|\s+$/g,"")}}r.c.constructors.Script=l},,function(t,e,a){"use strict";function n(t){const e=[];for(let a=0;a13)throw new Error("Card instantiated with improper value: "+t)}formatValue(){switch(this.value){case 1:return"A";case 11:return"J";case 12:return"Q";case 13:return"K";default:return""+this.value}}isRedSuit(){return this.suit===n.Hearts||this.suit===n.Diamonds}getStringRepresentation(){return`${this.formatValue()} of ${this.suit}`}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(25);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class i{constructor(t={}){r(this,"name",""),r(this,"type",-1),t.name&&(this.name=t.name),t.type&&(this.type=t.type)}toJSON(){return Object(n.b)("ActionIdentifier",this)}static fromJSON(t){return Object(n.a)(i,t.data)}}n.c.constructors.ActionIdentifier=i},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(219);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class i{constructor(t,e){r(this,"lvl",1),r(this,"owned",!1);const a="BitNode"+t,i=n.a[a];if(null==i)throw new Error("Invalid Bit Node for this Source File");this.n=t,this.name=`Source-File ${t}: ${i.name}`,this.info=e}}},function(t,e,a){"use strict";a.d(e,"b",(function(){return c})),a.d(e,"a",(function(){return f}));var n=a(6),r=a(17),i=a(8),o=a(176),s=a(280);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function c(){return{hack:0,str:0,def:0,dex:0,agi:0,cha:0,money:0}}class f{constructor(){l(this,"hacking",1),l(this,"strength",1),l(this,"defense",1),l(this,"dexterity",1),l(this,"agility",1),l(this,"charisma",1),l(this,"intelligence",1),l(this,"hp",10),l(this,"max_hp",10),l(this,"hacking_exp",0),l(this,"strength_exp",0),l(this,"defense_exp",0),l(this,"dexterity_exp",0),l(this,"agility_exp",0),l(this,"charisma_exp",0),l(this,"intelligence_exp",0),l(this,"hacking_mult",1),l(this,"strength_mult",1),l(this,"defense_mult",1),l(this,"dexterity_mult",1),l(this,"agility_mult",1),l(this,"charisma_mult",1),l(this,"hacking_exp_mult",1),l(this,"strength_exp_mult",1),l(this,"defense_exp_mult",1),l(this,"dexterity_exp_mult",1),l(this,"agility_exp_mult",1),l(this,"charisma_exp_mult",1),l(this,"hacking_chance_mult",1),l(this,"hacking_speed_mult",1),l(this,"hacking_money_mult",1),l(this,"hacking_grow_mult",1),l(this,"company_rep_mult",1),l(this,"faction_rep_mult",1),l(this,"crime_money_mult",1),l(this,"crime_success_mult",1),l(this,"work_money_mult",1),l(this,"hacknet_node_money_mult",1),l(this,"hacknet_node_purchase_cost_mult",1),l(this,"hacknet_node_ram_cost_mult",1),l(this,"hacknet_node_core_cost_mult",1),l(this,"hacknet_node_level_cost_mult",1),l(this,"bladeburner_max_stamina_mult",1),l(this,"bladeburner_stamina_gain_mult",1),l(this,"bladeburner_analysis_mult",1),l(this,"bladeburner_success_chance_mult",1),l(this,"augmentations",[]),l(this,"queuedAugmentations",[]),l(this,"city",r.a.Sector12)}applyAugmentation(t){for(const e of Object.keys(t.mults))null==this[e]?console.warn("Augmentation has unrecognized multiplier property: "+e):this[e]*=t.mults[e]}calculateStat(t,e=1){return Object(o.b)(t,e)}getFactionFieldWorkRepGain(){return.9*(this.hacking/i.a.MaxSkillLevel+this.strength/i.a.MaxSkillLevel+this.defense/i.a.MaxSkillLevel+this.dexterity/i.a.MaxSkillLevel+this.agility/i.a.MaxSkillLevel+this.charisma/i.a.MaxSkillLevel)/5.5*this.faction_rep_mult}getFactionHackingWorkRepGain(){return this.hacking/i.a.MaxSkillLevel*this.faction_rep_mult}getFactionSecurityWorkRepGain(){return.9*(this.hacking/i.a.MaxSkillLevel+this.strength/i.a.MaxSkillLevel+this.defense/i.a.MaxSkillLevel+this.dexterity/i.a.MaxSkillLevel+this.agility/i.a.MaxSkillLevel)/4.5*this.faction_rep_mult}resetMultipliers(){this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.crime_money_mult=1,this.crime_success_mult=1,this.work_money_mult=1}updateStatLevels(){this.hacking=Math.max(1,Math.floor(this.calculateStat(this.hacking_exp,this.hacking_mult*n.a.HackingLevelMultiplier))),this.strength=Math.max(1,Math.floor(this.calculateStat(this.strength_exp,this.strength_mult*n.a.StrengthLevelMultiplier))),this.defense=Math.max(1,Math.floor(this.calculateStat(this.defense_exp,this.defense_mult*n.a.DefenseLevelMultiplier))),this.dexterity=Math.max(1,Math.floor(this.calculateStat(this.dexterity_exp,this.dexterity_mult*n.a.DexterityLevelMultiplier))),this.agility=Math.max(1,Math.floor(this.calculateStat(this.agility_exp,this.agility_mult*n.a.AgilityLevelMultiplier))),this.charisma=Math.max(1,Math.floor(this.calculateStat(this.charisma_exp,this.charisma_mult*n.a.CharismaLevelMultiplier)));const t=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),this.hp=Math.round(this.max_hp*t)}getIntelligenceBonus(t){return Object(s.a)(this.intelligence,t)}}},,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(757);function o({children:t}){return r.a.createElement(i.MathJaxContext,{version:3,src:"dist/ext/MathJax-3.2.0/es5/tex-chtml.js"},r.a.createElement(i.MathJax,null,t))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(16);function r(t){console.error(t),Object(n.a)("Caught an exception: "+t+"

Filename: "+(t.fileName||"UNKNOWN FILE NAME")+"

Line Number: "+(t.lineNumber||"UNKNOWN LINE NUMBER")+"

This is a bug, please report to game developer with this message as well as details about how to reproduce the bug.

If you want to be safe, I suggest refreshing the game WITHOUT saving so that your safe doesn't get corrupted")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return b})),a.d(e,"b",(function(){return g})),a.d(e,"e",(function(){return p})),a.d(e,"d",(function(){return E})),a.d(e,"c",(function(){return k}));var n=a(327),r=a(57),i=a(15),o=a(64),s=a(2),l=a(299),c=a(26),f=a(9),u=a(16),m=a(25),h=a(5);function d(t,e=!1){t.recvd=!0,!e&&f.a.SuppressMessages||p(t.filename),function(t,e){const a=Object(c.d)(e);if(null==a)return void console.warn("Could not find server "+e);for(let e=0;e

This message was saved as "+e.filename+" onto your home computer.";Object(u.a)(a)}function g(){if(l.b)return;const t=b[v.Jumper0],e=b[v.Jumper1],a=b[v.Jumper2],n=b[v.Jumper3],c=b[v.Jumper4],f=b[v.CyberSecTest],u=b[v.NiteSecTest],m=b[v.BitRunnersTest],h=b[v.RedPill];let p=!1;if(r.a[i.a.TheRedPill].owned&&(p=!0),h&&p&&0===s.a.sourceFiles.length&&!l.b)d(h,!0);else if(h&&p)l.b||d(h);else if(t&&!t.recvd&&s.a.hacking>=25){d(t);const e=o.a.Flight.name,a=s.a.getHomeComputer();a.programs.includes(e)||a.programs.push(e)}else e&&!e.recvd&&s.a.hacking>=40?d(e):f&&!f.recvd&&s.a.hacking>=50?d(f):a&&!a.recvd&&s.a.hacking>=175?d(a):u&&!u.recvd&&s.a.hacking>=200?d(u):n&&!n.recvd&&s.a.hacking>=350?d(n):c&&!c.recvd&&s.a.hacking>=490?d(c):m&&!m.recvd&&s.a.hacking>=500&&d(m)}function y(t){b[t.filename]=t}let b={};function E(t){b=JSON.parse(t,m.c)}const v={Jumper0:"j0.msg",Jumper1:"j1.msg",Jumper2:"j2.msg",Jumper3:"j3.msg",Jumper4:"j4.msg",CyberSecTest:"csec-test.msg",NiteSecTest:"nitesec-test.msg",BitRunnersTest:"19dfj3l1nd.msg",RedPill:"icarus.msg"};function k(){b={},y(new n.a(v.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")),y(new n.a(v.Jumper1,`Soon you will be contacted by a hacking group known as ${h.a.NiteSec}. 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`)),y(new n.a(v.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 ${h.a.NiteSec}.

-jump3R`)),y(new n.a(v.Jumper3,`You must learn to walk before you can run. And you must run before you can fly. Look for ${h.a.TheBlackHand}.

I.I.I.I

-jump3R`)),y(new n.a(v.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")),y(new n.a(v.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.

-"+h.a.CyberSec)),y(new n.a(v.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.

-"+h.a.NiteSec)),y(new n.a(v.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")),y(new n.a(v.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$)"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(1015),r=a(13),i=a(26);function o(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class s{constructor(t,e,a){o(this,"code",""),o(this,"delay",null),o(this,"disableLogs",{}),o(this,"dynamicLoadedFns",{}),o(this,"dynamicRamUsage",r.a.ScriptBaseRamCost),o(this,"errorMessage",""),o(this,"loadedFns",{}),o(this,"output",""),o(this,"ramUsage",0),o(this,"running",!1),this.name=t.filename,this.hostname=t.server;const s=Math.round(e);if("number"!=typeof s||isNaN(s))throw new Error("Invalid PID when constructing WorkerScript: "+e);this.pid=s,t.pid=s;const l=Object(i.d)(this.hostname);if(null==l)throw new Error("WorkerScript constructed with invalid server ip: "+this.hostname);let c=!1;for(let t=0;t-1&&(document.achievements=[],function(){function e(t){return t=t.replace(/\/\/+/g,"/"),(t=Object(i.k)(t)).includes("/")&&(t="/"+Object(i.k)(t)),t}document.getFiles=function(){const t=Object(l.d)("home");return null===t?{res:!1,msg:"Home server does not exist."}:{res:!0,data:{files:t.scripts.map(t=>({filename:t.filename,code:t.code,ramUsage:t.ramUsage}))}}},document.deleteFile=function(t){t=e(t);const a=Object(l.d)("home");return null===a?{res:!1,msg:"Home server does not exist."}:a.removeFile(t)},document.saveFile=function(a,r){var i;a=e(a),r=t.from(r,"base64").toString();const o=Object(l.d)("home");if(null===o)return{res:!1,msg:"Home server does not exist."};const{success:s,overwritten:c}=o.writeToScriptFile(n.a,a,r);let f;return s&&(f=o.getScript(a)),{res:s,data:{overwritten:c,ramUsage:null===(i=f)||void 0===i?void 0:i.ramUsage}}}}(),function(){const t={terminal:(t,e)=>{const a={info:o.a.info,warn:o.a.warn,error:o.a.error,success:o.a.success};let n;e&&(n=a[e]),n||(n=o.a.print),n.bind(o.a)(t)},toast:(t,e,a=2e3)=>s.b.emit(t,e,a)};window.appNotifier=t}(),function(){const t={triggerSave:()=>c.c.saveGame(!0),triggerGameExport:()=>{try{c.c.exportGame()}catch(t){console.log(t),s.b.emit("Could not export game.","error",2e3)}},triggerScriptsExport:()=>Object(u.b)("*",n.a.getHomeComputer()),getSaveData:()=>({save:c.c.getSaveString(f.a.ExcludeRunningScriptsFromSave),fileName:c.c.getSaveFileName()}),getSaveInfo:async t=>{try{return(await c.c.getImportDataFromString(t)).playerData}catch(t){return void console.error(t)}},pushSaveData:(t,e=!1)=>r.b.toImportSave(t,e)};window.appSaveFns=t}(),function(){const t=window.electronBridge;if(!t)return;t.receive("get-save-data-request",()=>{const e=window.appSaveFns.getSaveData();t.send("get-save-data-response",e)}),t.receive("get-save-info-request",async e=>{const a=await window.appSaveFns.getSaveInfo(e);t.send("get-save-info-response",a)}),t.receive("push-save-request",({save:t,automatic:e=!1})=>{window.appSaveFns.pushSaveData(t,e)}),t.receive("trigger-save",()=>window.appSaveFns.triggerSave().then(()=>{t.send("save-completed")}).catch(t=>{console.log(t),s.b.emit("Could not save game.","error",2e3)})),t.receive("trigger-game-export",()=>{try{window.appSaveFns.triggerGameExport()}catch(t){console.log(t),s.b.emit("Could not export game.","error",2e3)}}),t.receive("trigger-scripts-export",()=>{try{window.appSaveFns.triggerScriptsExport()}catch(t){console.log(t),s.b.emit("Could not export scripts.","error",2e3)}})}())}function p(t){const e=window.electronBridge;e&&e.send("push-game-saved",t)}function g(){const t=window.electronBridge;t&&t.send("push-game-ready",{player:{identifier:n.a.identifier,playtime:n.a.totalPlaytime,lastSave:n.a.lastSave},game:{version:m.a.VersionString,hash:Object(h.a)()}})}function y(t){const e=window.electronBridge;e&&(e.send("push-import-result",{wasImported:t}),b())}function b(){const t=window.electronBridge;t&&t.send("push-disable-restore",{duration:6e4})}}).call(this,a(162).Buffer)},,function(t,e,a){"use strict";a.d(e,"a",(function(){return A})),a.d(e,"b",(function(){return R}));var n=a(15),r=a(134),i=a(224),o=a(8),s=a(50),l=a(106),c=a(29),f=a(80),u=a(252),m=a(39),h=a(55),d=a(221),p=a(91),g=a(17),y=a(2),b=a(64),E=a(26),v=a(102),k=a(47),_=a(96),w=a(27),S=a(1107),C=a(5),x=a(59);const L=S.a;function O(){const t=Object(E.d)(v.a.WorldDaemon);return t instanceof k.a&&(!!t.backdoorInstalled||null!==y.a.bladeburner&&y.a.bladeburner.blackops.hasOwnProperty(x.a.OperationDaedalus))}function M(t,e){return t.bitNodeN===e||t.sourceFiles.some(t=>t.n===e)}function T(t){return t.sourceFiles.some(t=>1===t.n)}const A={[C.a.CyberSec.toUpperCase()]:{...L[C.a.CyberSec.toUpperCase()],Icon:"CSEC",Condition:()=>y.a.factions.includes(C.a.CyberSec)},[C.a.NiteSec.toUpperCase()]:{...L[C.a.NiteSec.toUpperCase()],Icon:C.a.NiteSec,Condition:()=>y.a.factions.includes(C.a.NiteSec)},THE_BLACK_HAND:{...L.THE_BLACK_HAND,Icon:"TBH",Condition:()=>y.a.factions.includes(C.a.TheBlackHand)},[C.a.BitRunners.toUpperCase()]:{...L[C.a.BitRunners.toUpperCase()],Icon:C.a.BitRunners.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.BitRunners)},[C.a.Daedalus.toUpperCase()]:{...L[C.a.Daedalus.toUpperCase()],Icon:C.a.Daedalus.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.Daedalus)},THE_COVENANT:{...L.THE_COVENANT,Icon:C.a.TheCovenant.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.TheCovenant)},[C.a.Illuminati.toUpperCase()]:{...L[C.a.Illuminati.toUpperCase()],Icon:C.a.Illuminati.toLowerCase(),Condition:()=>y.a.factions.includes(C.a.Illuminati)},"BRUTESSH.EXE":{...L["BRUTESSH.EXE"],Icon:"p0",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.BruteSSHProgram.name)},"FTPCRACK.EXE":{...L["FTPCRACK.EXE"],Icon:"p1",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.FTPCrackProgram.name)},"RELAYSMTP.EXE":{...L["RELAYSMTP.EXE"],Icon:"p2",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.RelaySMTPProgram.name)},"HTTPWORM.EXE":{...L["HTTPWORM.EXE"],Icon:"p3",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.HTTPWormProgram.name)},"SQLINJECT.EXE":{...L["SQLINJECT.EXE"],Icon:"p4",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.SQLInjectProgram.name)},"FORMULAS.EXE":{...L["FORMULAS.EXE"],Icon:"formulas",Condition:()=>y.a.getHomeComputer().programs.includes(b.a.Formulas.name)},"SF1.1":{...L["SF1.1"],Icon:"SF1.1",Visible:()=>M(y.a,1),Condition:()=>y.a.sourceFileLvl(1)>=1},"SF2.1":{...L["SF2.1"],Icon:"SF2.1",Visible:()=>M(y.a,2),Condition:()=>y.a.sourceFileLvl(2)>=1},"SF3.1":{...L["SF3.1"],Icon:"SF3.1",Visible:()=>M(y.a,3),Condition:()=>y.a.sourceFileLvl(3)>=1},"SF4.1":{...L["SF4.1"],Icon:"SF4.1",Visible:()=>M(y.a,4),Condition:()=>y.a.sourceFileLvl(4)>=1},"SF5.1":{...L["SF5.1"],Icon:"SF5.1",Visible:()=>M(y.a,5),Condition:()=>y.a.sourceFileLvl(5)>=1},"SF6.1":{...L["SF6.1"],Icon:"SF6.1",Visible:()=>M(y.a,6),Condition:()=>y.a.sourceFileLvl(6)>=1},"SF7.1":{...L["SF7.1"],Icon:"SF7.1",Visible:()=>M(y.a,7),Condition:()=>y.a.sourceFileLvl(7)>=1},"SF8.1":{...L["SF8.1"],Icon:"SF8.1",Visible:()=>M(y.a,8),Condition:()=>y.a.sourceFileLvl(8)>=1},"SF9.1":{...L["SF9.1"],Icon:"SF9.1",Visible:()=>M(y.a,9),Condition:()=>y.a.sourceFileLvl(9)>=1},"SF10.1":{...L["SF10.1"],Icon:"SF10.1",Visible:()=>M(y.a,10),Condition:()=>y.a.sourceFileLvl(10)>=1},"SF11.1":{...L["SF11.1"],Icon:"SF11.1",Visible:()=>M(y.a,11),Condition:()=>y.a.sourceFileLvl(11)>=1},"SF12.1":{...L["SF12.1"],Icon:"SF12.1",Visible:()=>M(y.a,12),Condition:()=>y.a.sourceFileLvl(12)>=1},MONEY_1Q:{...L.MONEY_1Q,Icon:"$1Q",Condition:()=>y.a.money>=1e18},MONEY_M1B:{...L.MONEY_M1B,Icon:"-1b",Secret:!0,Condition:()=>y.a.money<=-1e9},INSTALL_1:{...L.INSTALL_1,Icon:"install",Condition:()=>y.a.augmentations.length>=1},INSTALL_100:{...L.INSTALL_100,Icon:"install_100",Condition:()=>y.a.augmentations.length>=100},QUEUE_40:{...L.QUEUE_40,Icon:"queue40",Condition:()=>y.a.queuedAugmentations.length>=40},HACKING_100000:{...L.HACKING_100000,Icon:"hack100000",Condition:()=>y.a.hacking>=1e5},COMBAT_3000:{...L.COMBAT_3000,Icon:"combat3000",Condition:()=>y.a.strength>=3e3&&y.a.defense>=3e3&&y.a.dexterity>=3e3&&y.a.agility>=3e3},NEUROFLUX_255:{...L.NEUROFLUX_255,Icon:"nf255",Condition:()=>y.a.augmentations.some(t=>t.name===n.a.NeuroFluxGovernor&&t.level>=255)},NS2:{...L.NS2,Icon:"ns2",Condition:()=>y.a.getHomeComputer().scripts.some(t=>t.filename.endsWith(".js")||t.filename.endsWith(".ns"))},FROZE:{...L.FROZE,Icon:"forze",Condition:()=>location.href.includes("noScripts")},RUNNING_SCRIPTS_1000:{...L.RUNNING_SCRIPTS_1000,Icon:"run1000",Condition:()=>{let t=0;for(const e of Object(E.c)())t+=e.runningScripts.length;return t>=1e3}},DRAIN_SERVER:{...L.DRAIN_SERVER,Icon:"drain",Condition:()=>{for(const t of Object(E.c)())if(t instanceof k.a&&t.moneyMax>0&&0===t.moneyAvailable)return!0;return!1}},MAX_RAM:{...L.MAX_RAM,Icon:"maxram",Condition:()=>y.a.getHomeComputer().maxRam===o.a.HomeComputerMaxRam},MAX_CORES:{...L.MAX_CORES,Icon:"maxcores",Condition:()=>8===y.a.getHomeComputer().cpuCores},SCRIPTS_30:{...L.SCRIPTS_30,Icon:"folders",Condition:()=>y.a.getHomeComputer().scripts.length>=30},KARMA_1000000:{...L.KARMA_1000000,Icon:"karma",Secret:!0,Condition:()=>y.a.karma<=-1e6},STOCK_1q:{...L.STOCK_1q,Icon:"$1Q",Condition:()=>y.a.moneySourceB.stock>=1e15},DISCOUNT:{...L.DISCOUNT,Icon:"discount",Condition:()=>{const t=Object(E.d)("powerhouse-fitness");return t instanceof k.a&&t.backdoorInstalled}},SCRIPT_32GB:{...L.SCRIPT_32GB,Icon:"bigcost",Condition:()=>y.a.getHomeComputer().scripts.some(t=>t.ramUsage>=32)},FIRST_HACKNET_NODE:{...L.FIRST_HACKNET_NODE,Icon:"node",Condition:()=>!Object(h.g)(y.a)&&y.a.hacknetNodes.length>0},"30_HACKNET_NODE":{...L["30_HACKNET_NODE"],Icon:"hacknet-all",Condition:()=>!Object(h.g)(y.a)&&y.a.hacknetNodes.length>=30},MAX_HACKNET_NODE:{...L.MAX_HACKNET_NODE,Icon:"hacknet-max",Condition:()=>{if(Object(h.g)(y.a))return!1;for(const t of y.a.hacknetNodes){if(!(t instanceof d.a))return!1;if(t.ram===m.a.MaxRam&&t.cores===m.a.MaxCores&&t.level===m.a.MaxLevel)return!0}return!1}},HACKNET_NODE_10M:{...L.HACKNET_NODE_10M,Icon:"hacknet-10m",Condition:()=>!Object(h.g)(y.a)&&y.a.moneySourceB.hacknet>=1e7},REPUTATION_10M:{...L.REPUTATION_10M,Icon:"reputation",Condition:()=>Object.values(c.a).some(t=>t.playerReputation>=1e7)},DONATION:{...L.DONATION,Icon:"donation",Condition:()=>Object.values(c.a).some(t=>t.favor>=150)},TRAVEL:{...L.TRAVEL,Icon:"TRAVEL",Condition:()=>y.a.city!==g.a.Sector12},WORKOUT:{...L.WORKOUT,Icon:"WORKOUT",Condition:()=>[o.a.ClassGymStrength,o.a.ClassGymDefense,o.a.ClassGymDexterity,o.a.ClassGymAgility].includes(y.a.className)},TOR:{...L.TOR,Icon:"TOR",Condition:()=>y.a.hasTorRouter()},HOSPITALIZED:{...L.HOSPITALIZED,Icon:"OUCH",Condition:()=>0!==y.a.moneySourceB.hospitalization},GANG:{...L.GANG,Icon:"GANG",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang},FULL_GANG:{...L.FULL_GANG,Icon:"GANGMAX",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang&&y.a.gang.members.length===u.a.MaximumGangMembers},GANG_TERRITORY:{...L.GANG_TERRITORY,Icon:"GANG100%",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang&&f.a[y.a.gang.facName].territory>=.999},GANG_MEMBER_POWER:{...L.GANG_MEMBER_POWER,Icon:"GANG10000",Visible:()=>M(y.a,2),Condition:()=>null!==y.a.gang&&y.a.gang.members.some(t=>t.hack>=1e4||t.str>=1e4||t.def>=1e4||t.dex>=1e4||t.agi>=1e4||t.cha>=1e4)},CORPORATION:{...L.CORPORATION,Icon:"CORP",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation},CORPORATION_BRIBE:{...L.CORPORATION_BRIBE,Icon:"CORPLOBBY",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation&&1===y.a.corporation.unlockUpgrades[6]},CORPORATION_PROD_1000:{...L.CORPORATION_PROD_1000,Icon:"CORP1000",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(t=>t.prodMult>=1e3)},CORPORATION_EMPLOYEE_3000:{...L.CORPORATION_EMPLOYEE_3000,Icon:"CORPCITY",Visible:()=>M(y.a,3),Condition:()=>{if(null===y.a.corporation)return!1;for(const t of y.a.corporation.divisions)for(const e of Object.values(t.offices))if(0!==e&&e.employees.length>=3e3)return!0;return!1}},CORPORATION_REAL_ESTATE:{...L.CORPORATION_REAL_ESTATE,Icon:"CORPRE",Name:"Own the land",Description:"Expand to the Real Estate division.",Visible:()=>M(y.a,3),Condition:()=>null!==y.a.corporation&&y.a.corporation.divisions.some(t=>t.type===s.a.RealEstate)},INTELLIGENCE_255:{...L.INTELLIGENCE_255,Icon:"INT255",Visible:()=>M(y.a,5),Condition:()=>y.a.intelligence>=255},BLADEBURNER_DIVISION:{...L.BLADEBURNER_DIVISION,Icon:"BLADE",Visible:()=>M(y.a,6),Condition:()=>null!==y.a.bladeburner},BLADEBURNER_OVERCLOCK:{...L.BLADEBURNER_OVERCLOCK,Icon:"BLADEOVERCLOCK",Visible:()=>M(y.a,6),Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skills[r.a.Overclock]===i.a[r.a.Overclock].maxLvl},BLADEBURNER_UNSPENT_100000:{...L.BLADEBURNER_UNSPENT_100000,Icon:"BLADE100K",Visible:()=>M(y.a,6),Condition:()=>null!==y.a.bladeburner&&y.a.bladeburner.skillPoints>=1e5},"4S":{...L["4S"],Icon:"4S",Condition:()=>y.a.has4SData},FIRST_HACKNET_SERVER:{...L.FIRST_HACKNET_SERVER,Icon:"HASHNET",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.hacknetNodes.length>0,AdditionalUnlock:[L.FIRST_HACKNET_NODE.ID]},ALL_HACKNET_SERVER:{...L.ALL_HACKNET_SERVER,Icon:"HASHNETALL",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.hacknetNodes.length===m.b.MaxServers,AdditionalUnlock:[L["30_HACKNET_NODE"].ID]},MAX_HACKNET_SERVER:{...L.MAX_HACKNET_SERVER,Icon:"HASHNETALL",Visible:()=>M(y.a,9),Condition:()=>{if(!Object(h.g)(y.a))return!1;for(const t of y.a.hacknetNodes){if("string"!=typeof t)return!1;const e=Object(E.d)(t);if(!(e instanceof p.a))return!1;if(e.maxRam===m.b.MaxRam&&e.cores===m.b.MaxCores&&e.level===m.b.MaxLevel&&e.cache===m.b.MaxCache)return!0}return!1},AdditionalUnlock:[L.MAX_HACKNET_NODE.ID]},HACKNET_SERVER_1B:{...L.HACKNET_SERVER_1B,Icon:"HASHNETMONEY",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.moneySourceB.hacknet>=1e9,AdditionalUnlock:[L.HACKNET_NODE_10M.ID]},MAX_CACHE:{...L.MAX_CACHE,Icon:"HASHNETCAP",Visible:()=>M(y.a,9),Condition:()=>Object(h.g)(y.a)&&y.a.hashManager.hashes===y.a.hashManager.capacity&&y.a.hashManager.capacity>0},SLEEVE_8:{...L.SLEEVE_8,Icon:"SLEEVE8",Visible:()=>M(y.a,10),Condition:()=>8===y.a.sleeves.length&&3===y.a.sourceFileLvl(10)},INDECISIVE:{...L.INDECISIVE,Icon:"1H",Visible:()=>T(y.a),Condition:function(){let t=0;return setInterval(()=>{_.b.page()===w.a.BitVerse?t++:t=0},6e4),()=>t>60}()},FAST_BN:{...L.FAST_BN,Icon:"2DAYS",Visible:()=>T(y.a),Condition:()=>O()&&y.a.playtimeSinceLastBitnode<1728e5},CHALLENGE_BN1:{...L.CHALLENGE_BN1,Icon:"BN1+",Visible:()=>T(y.a),Condition:()=>1===y.a.bitNodeN&&O()&&y.a.getHomeComputer().maxRam<=128&&1===y.a.getHomeComputer().cpuCores},CHALLENGE_BN2:{...L.CHALLENGE_BN2,Icon:"BN2+",Visible:()=>M(y.a,2),Condition:()=>2===y.a.bitNodeN&&O()&&null===y.a.gang},CHALLENGE_BN3:{...L.CHALLENGE_BN3,Icon:"BN3+",Visible:()=>M(y.a,3),Condition:()=>3===y.a.bitNodeN&&O()&&null===y.a.corporation},CHALLENGE_BN6:{...L.CHALLENGE_BN6,Icon:"BN6+",Visible:()=>M(y.a,6),Condition:()=>6===y.a.bitNodeN&&O()&&null===y.a.bladeburner},CHALLENGE_BN7:{...L.CHALLENGE_BN7,Icon:"BN7+",Visible:()=>M(y.a,7),Condition:()=>7===y.a.bitNodeN&&O()&&null===y.a.bladeburner},CHALLENGE_BN8:{...L.CHALLENGE_BN8,Icon:"BN8+",Visible:()=>M(y.a,8),Condition:()=>8===y.a.bitNodeN&&O()&&!y.a.has4SData&&!y.a.has4SDataTixApi},CHALLENGE_BN9:{...L.CHALLENGE_BN9,Icon:"BN9+",Visible:()=>M(y.a,9),Condition:()=>9===y.a.bitNodeN&&O()&&0===y.a.moneySourceB.hacknet&&0===y.a.moneySourceB.hacknet_expenses},CHALLENGE_BN10:{...L.CHALLENGE_BN10,Icon:"BN10+",Visible:()=>M(y.a,10),Condition:()=>10===y.a.bitNodeN&&O()&&!y.a.sleeves.some(t=>t.augmentations.length>0||t.hacking_exp>0||t.strength_exp>0||t.defense_exp>0||t.agility_exp>0||t.dexterity_exp>0||t.charisma_exp>0)},CHALLENGE_BN12:{...L.CHALLENGE_BN12,Icon:"BN12+",Visible:()=>M(y.a,12),Condition:()=>y.a.sourceFileLvl(12)>=50},BYPASS:{...L.BYPASS,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.Bypass)},PROTOTYPETAMPERING:{...L.PROTOTYPETAMPERING,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.PrototypeTampering)},UNCLICKABLE:{...L.UNCLICKABLE,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.Unclickable)},UNDOCUMENTEDFUNCTIONCALL:{...L.UNDOCUMENTEDFUNCTIONCALL,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.UndocumentedFunctionCall)},TIMECOMPRESSION:{...L.TIMECOMPRESSION,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.TimeCompression)},REALITYALTERATION:{...L.REALITYALTERATION,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.RealityAlteration)},N00DLES:{...L.N00DLES,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.N00dles)},EDITSAVEFILE:{...L.EDITSAVEFILE,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.EditSaveFile)},UNACHIEVABLE:{...L.UNACHIEVABLE,Icon:"SF-1",Secret:!0,Condition:()=>!1},CHALLENGE_BN13:{...L.CHALLENGE_BN13,Icon:"BN13+",Visible:()=>M(y.a,13),Condition:()=>13===y.a.bitNodeN&&O()&&!y.a.augmentations.some(t=>t.name===n.a.StaneksGift1)},DEVMENU:{...L.DEVMENU,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.YoureNotMeantToAccessThis)},RAINBOW:{...L.RAINBOW,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.INeedARainbow)},TRUE_RECURSION:{...L.TRUE_RECURSION,Icon:"SF-1",Secret:!0,Condition:()=>y.a.exploits.includes(l.a.TrueRecursion)}};function R(){const t=y.a.achievements.map(t=>t.ID),e=Object.values(A).filter(e=>!t.includes(e.ID)&&e.Condition()).flatMap(t=>[t.ID,...t.AdditionalUnlock||[]]);for(const t of e)y.a.giveAchievement(t);document.achievements=[...y.a.achievements.map(t=>t.ID)]}},function(t,e,a){"use strict";a.d(e,"b",(function(){return P})),a.d(e,"a",(function(){return I}));var n=a(0),r=a.n(n),i=a(125),o=a(113),s=a(137),l=a(4),c=a(116),f=a(1150),u=a(24),m=a(179),h=a(145),d=a(31),p=a(45),g=a(1),y=a(10),b=a(114),E=a(452),v=a.n(E),k=a(1152),_=a.n(k),w=a(9),S=a(30),C=a(386),x=a(6),L=a(23),O=a(21),M=a(8);function T(){const t=Object(i.a)(),e=S.b.Player(),a=P();if(0===e.intelligence)return r.a.createElement(r.a.Fragment,null);const n=e.calculateSkillProgress(e.intelligence_exp);return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:a.cell}},r.a.createElement(g.a,{classes:{root:a.int}},"Int ")),r.a.createElement(d.a,{align:"right",classes:{root:a.cell}},r.a.createElement(g.a,{classes:{root:a.int}},l.a.formatSkill(e.intelligence))),r.a.createElement(d.a,{align:"right",classes:{root:a.cell}},r.a.createElement(g.a,{id:"overview-int-hook",classes:{root:a.int}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:n,color:t.colors.int})))}function A(){const t=S.b.Player(),e=P(),a=t.bladeburner;if(null===a)return r.a.createElement(r.a.Fragment,null);const n=a.getTypeAndNameFromActionId(a.action);return"Idle"===n.type?r.a.createElement(r.a.Fragment,null):r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:e.cellNone}},r.a.createElement(g.a,null,"Bladeburner:"))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:e.cellNone}},r.a.createElement(g.a,null,n.type,": ",n.name))))}function R({tooltip:t,children:e,onClickFocus:a,header:n}){const i=P();return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:i.workCell}},r.a.createElement(L.a,{title:r.a.createElement(r.a.Fragment,null,t)},r.a.createElement(g.a,{className:i.workHeader,sx:{pt:1,pb:.5}},n)))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",colSpan:2,classes:{root:i.workCell}},r.a.createElement(g.a,{className:i.workSubtitles},e))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",align:"center",colSpan:2,classes:{root:i.cellNone}},r.a.createElement(y.a,{sx:{mt:1},onClick:a},"Focus"))))}function N(){const t=S.b.Player(),e=S.b.Router();if(!t.isWorking||t.focus)return r.a.createElement(r.a.Fragment,null);let a=r.a.createElement(r.a.Fragment,null),n=r.a.createElement(r.a.Fragment,null),i=r.a.createElement(r.a.Fragment,null);switch(t.workType){case M.a.WorkTypeCompanyPartTime:case M.a.WorkTypeCompany:a=r.a.createElement(r.a.Fragment,null,t.jobs[t.companyName]," at ",r.a.createElement("strong",null,t.companyName)),n=r.a.createElement(r.a.Fragment,null,"Working at ",r.a.createElement("strong",null,t.companyName)),i=r.a.createElement(r.a.Fragment,null,"+",r.a.createElement(c.a,{reputation:t.workRepGained})," rep");break;case M.a.WorkTypeFaction:a=r.a.createElement(r.a.Fragment,null,t.factionWorkType," for ",r.a.createElement("strong",null,t.currentWorkFactionName)),n=r.a.createElement(r.a.Fragment,null,"Working for ",r.a.createElement("strong",null,t.currentWorkFactionName)),i=r.a.createElement(r.a.Fragment,null,"+",r.a.createElement(c.a,{reputation:t.workRepGained})," rep");break;case M.a.WorkTypeStudyClass:a=r.a.createElement(r.a.Fragment,null,t.workType),n=r.a.createElement(r.a.Fragment,null,"You are ",t.className),i=r.a.createElement(r.a.Fragment,null,Object(u.b)(t.timeWorked));break;case M.a.WorkTypeCreateProgram:a=r.a.createElement(r.a.Fragment,null,"Coding ",t.createProgramName),n=r.a.createElement(r.a.Fragment,null,"Creating a program"),i=r.a.createElement(r.a.Fragment,null,t.createProgramName," ",(t.timeWorkedCreateProgram/t.timeNeededToCompleteWork*100).toFixed(2),"%");break;case M.a.WorkTypeGraftAugmentation:a=r.a.createElement(r.a.Fragment,null,"Grafting ",t.graftAugmentationName),n=r.a.createElement(r.a.Fragment,null,"Grafting an Augmentation"),i=r.a.createElement(r.a.Fragment,null,r.a.createElement("strong",null,(t.timeWorkedGraftAugmentation/t.timeNeededToCompleteWork*100).toFixed(2),"%")," ","done")}return r.a.createElement(R,{tooltip:a,header:n,onClickFocus:()=>{t.startFocusing(),e.toWork()}},i)}const P=Object(o.a)(t=>Object(s.a)({workCell:{textAlign:"center",maxWidth:"200px",borderBottom:"none",padding:0,margin:0},workHeader:{fontSize:"0.9rem"},workSubtitles:{fontSize:"0.8rem"},cellNone:{borderBottom:"none",padding:0,margin:0},cell:{padding:0,margin:0},hp:{color:t.colors.hp},money:{color:t.colors.money},hack:{color:t.colors.hack},combat:{color:t.colors.combat},cha:{color:t.colors.cha},int:{color:t.colors.int}}));function I({save:t,killScripts:e}){const[a,o]=Object(n.useState)(!1),s=S.b.Player(),c=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const t=setInterval(()=>c(t=>!t),600);return()=>clearInterval(t)},[]);const u=P(),y=Object(i.a)(),E=s.calculateSkillProgress(s.hacking_exp,s.hacking_mult*x.a.HackingLevelMultiplier),k=s.calculateSkillProgress(s.strength_exp,s.strength_mult*x.a.StrengthLevelMultiplier),M=s.calculateSkillProgress(s.defense_exp,s.defense_mult*x.a.DefenseLevelMultiplier),R=s.calculateSkillProgress(s.dexterity_exp,s.dexterity_mult*x.a.DexterityLevelMultiplier),I=s.calculateSkillProgress(s.agility_exp,s.agility_mult*x.a.AgilityLevelMultiplier),F=s.calculateSkillProgress(s.charisma_exp,s.charisma_mult*x.a.CharismaLevelMultiplier);return r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{sx:{display:"block",m:1}},r.a.createElement(h.a,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hp}},"HP ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hp}},l.a.formatHp(s.hp)," / ",l.a.formatHp(s.max_hp))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-hp-hook",classes:{root:u.hp}}))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.money}},"Money ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.money}},l.a.formatMoney(s.money))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-money-hook",classes:{root:u.money}}))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hack}},"Hack ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.hack}},l.a.formatSkill(s.hacking)))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:E,color:y.colors.hack})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cell}},r.a.createElement(g.a,{classes:{root:u.hack}})),r.a.createElement(d.a,{align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-hack-hook",classes:{root:u.hack}}))),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},"Str ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.strength))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-str-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:k,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},"Def ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.defense))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-def-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:M,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},"Dex ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.dexterity))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-dex-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:R,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cell}},r.a.createElement(g.a,{classes:{root:u.combat}},"Agi ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{classes:{root:u.combat}},l.a.formatSkill(s.agility))),r.a.createElement(d.a,{align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-agi-hook",classes:{root:u.combat}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:I,color:y.colors.combat})),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.cha}},"Cha ")),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{classes:{root:u.cha}},l.a.formatSkill(s.charisma))),r.a.createElement(d.a,{align:"right",classes:{root:u.cellNone}},r.a.createElement(g.a,{id:"overview-cha-hook",classes:{root:u.cha}}))),r.a.createElement(p.a,null,!w.a.DisableOverviewProgressBars&&r.a.createElement(C.a,{progress:F,color:y.colors.cha})),r.a.createElement(T,null),r.a.createElement(p.a,null,r.a.createElement(d.a,{component:"th",scope:"row",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-extra-hook-0",classes:{root:u.hack}})),r.a.createElement(d.a,{component:"th",scope:"row",align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-extra-hook-1",classes:{root:u.hack}})),r.a.createElement(d.a,{component:"th",scope:"row",align:"right",classes:{root:u.cell}},r.a.createElement(g.a,{id:"overview-extra-hook-2",classes:{root:u.hack}}))),r.a.createElement(N,null),r.a.createElement(A,null))),r.a.createElement(O.a,{sx:{display:"flex",borderTop:"1px solid "+w.a.theme.welllight}},r.a.createElement(O.a,{sx:{display:"flex",flex:1,justifyContent:"flex-start",alignItems:"center"}},r.a.createElement(b.a,{"aria-label":"save game",onClick:t},r.a.createElement(L.a,{title:0!==w.a.AutosaveInterval?"Save game":"Save game (auto-saves are disabled!)"},r.a.createElement(v.a,{color:0!==w.a.AutosaveInterval?"primary":"error"})))),r.a.createElement(O.a,{sx:{display:"flex",flex:1,justifyContent:"flex-end",alignItems:"center"}},r.a.createElement(b.a,{"aria-label":"kill all scripts",onClick:()=>o(!0)},r.a.createElement(L.a,{title:"Kill all running scripts"},r.a.createElement(_.a,{color:"error"}))))),r.a.createElement(f.a,{open:a,onClose:()=>o(!1),killScripts:e}))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={0:[0,2e10,"Export","Develop infrastructure to export your materials to your other facilities. This allows you to move materials around between different divisions and cities."],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."],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."],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."],4:[4,1e10,"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."],5:[5,5e14,"Shady Accounting","Utilize unscrupulous accounting practices and pay off government officials to save money on taxes. This reduces the dividend tax rate by 5%."],6:[6,2e15,"Government Partnership","Help national governments further their agendas in exchange for lowered taxes. This reduces the dividend tax rate by 10%"],7:[7,5e10,"Warehouse API","Enables the warehouse API."],8:[8,5e10,"Office API","Enables the office API."]}},function(t,e,a){"use strict";a.d(e,"b",(function(){return u})),a.d(e,"c",(function(){return m})),a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(2),o=a(340),s=a(580),l=a(82),c=a(363),f=a(16);let u=!1;function m(t){u=t}function h(t,e,a,n){e?0===l.a[5]&&5!==n&&(i.a.intelligence=0,i.a.intelligence_exp=0):function(t){const e="SourceFile"+t.toString(),a=c.a[e];if(null==a)return void console.error("Could not find source file for Bit node: "+t);let n=!1,o=null;for(let e=0;e=3&&12!==o.n?Object(f.a)(`The Source-File for the BitNode you just destroyed, ${a.name}, is already at max level!`):(++o.lvl,Object(f.a)(a.name+" was upgraded to level "+o.lvl+" for destroying its corresponding BitNode!"));else{const e=new s.a(t,1);i.a.sourceFiles.push(e),5===t&&0===i.a.intelligence&&(i.a.intelligence=1),Object(f.a)(r.a.createElement(r.a.Fragment,null,"You received a Source-File for destroying a BitNode!",r.a.createElement("br",null),r.a.createElement("br",null),a.name,r.a.createElement("br",null),r.a.createElement("br",null),a.info))}}(a),5===n&&0===i.a.intelligence&&(i.a.intelligence=1),u=!1,i.a.bitNodeN=n,6===n?t.toBladeburnerCinematic():t.toTerminal(),Object(o.b)(e)}},,function(t,e,a){"use strict";function n(t,e){if(e<0||e>100)return t;const a=t*(e/100);return t+(Math.random()*(2*a)-a)}a.d(e,"a",(function(){return n}))},,function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));class n{constructor(t,e,a){this.program=t,this.price=e,this.description=a}}},,,,,,,function(t,e,a){"use strict";function n(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}a.d(e,"a",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return o}));const r=new class{constructor(){n(this,"m",1024),n(this,"a",341),n(this,"c",1),this.x=0,this.reset()}step(){this.x=(this.a*this.x+this.c)%this.m}random(){return this.step(),this.x/this.m}reset(){this.x=(new Date).getTime()%this.m}};class i{constructor(t){n(this,"s1",0),n(this,"s2",0),n(this,"s3",0);const e=t/1e3%3e4;this.s1=e,this.s2=e,this.s3=e}step(){this.s1=171*this.s1%30269,this.s2=172*this.s2%30307,this.s3=170*this.s3%30323}random(){return this.step(),(this.s1/30269+this.s2/30307+this.s3/30323)%1}}function o(t){let e=1779033703^t.length;for(let a=0;a>>19;const a=()=>(e=Math.imul(e^e>>>16,2246822507),e=Math.imul(e^e>>>13,3266489909),(e^=e>>>16)>>>0);let n=a(),r=a(),i=a(),o=a();return()=>{n>>>=0,r>>>=0,i>>>=0,o>>>=0;let t=n+r|0;return n=r^r>>>9,r=i+(i<<3)|0,i=i<<21|i>>>11,o=o+1|0,t=t+o|0,i=i+t|0,(t>>>0)/4294967296}}},,,,,,,function(t,e,a){"use strict";function n(t,e){if(t.length!==e.length)return!1;for(let a=0;aObject(o.a)({favor:{color:t.colors.rep}}));function l({favor:t}){const e=s();return n.createElement("span",{className:e.favor},"number"==typeof t?r.a.formatFavor(t):t)}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return b}));var n=a(77),r=a(261),i=a(6),o=a(85),s=a(66),l=a(237),c=a(94),f=a(8),u=a(204),m=a(29),h=a(185),d=a(17),p=a(11),g=a(25);function y(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class b extends r.a{constructor(t=null){super(),y(this,"className",""),y(this,"crimeType",""),y(this,"currentTask",n.a.Idle),y(this,"currentTaskLocation",""),y(this,"currentTaskMaxTime",0),y(this,"currentTaskTime",0),y(this,"earningsForSleeves",Object(r.b)()),y(this,"earningsForPlayer",Object(r.b)()),y(this,"earningsForTask",Object(r.b)()),y(this,"factionWorkType",h.a.None),y(this,"gainRatesForTask",Object(r.b)()),y(this,"gymStatType",""),y(this,"logs",[]),y(this,"memory",1),y(this,"shock",1),y(this,"storedCycles",0),y(this,"sync",1),null!=t&&this.shockRecovery(t)}commitCrime(t,e){const a=o.a[e]||Object.values(o.a).find(t=>t.name===e);return!!a&&(this.currentTask!==n.a.Idle?this.finishTask(t):this.resetTaskStatus(),this.gainRatesForTask.hack=a.hacking_exp*this.hacking_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.str=a.strength_exp*this.strength_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.def=a.defense_exp*this.defense_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.dex=a.dexterity_exp*this.dexterity_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.agi=a.agility_exp*this.agility_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.cha=a.charisma_exp*this.charisma_exp_mult*i.a.CrimeExpGain,this.gainRatesForTask.money=a.money*this.crime_money_mult*i.a.CrimeMoney,this.currentTaskLocation=String(this.gainRatesForTask.money),this.crimeType=a.name,this.currentTaskMaxTime=a.time,this.currentTask=n.a.Crime,!0)}finishTask(t){let e=Object(r.b)();if(this.currentTask===n.a.Crime&&this.currentTaskTime>=this.currentTaskMaxTime){const a=Object.values(o.a).find(t=>t.name===this.crimeType);if(!a)return console.error("Invalid data stored in sleeve.crimeType: "+this.crimeType),this.resetTaskStatus(),e;if(Math.random()0&&(this.hacking_exp+=e.hack),e.str>0&&(this.strength_exp+=e.str),e.def>0&&(this.defense_exp+=e.def),e.dex>0&&(this.dexterity_exp+=e.dex),e.agi>0&&(this.agility_exp+=e.agi),e.cha>0&&(this.charisma_exp+=e.cha),Object(r.b)();const i=this.shock/100*(this.sync/100)*a,o=e.hack*i,s=e.str*i,l=e.def*i,c=e.dex*i,f=e.agi*i,u=e.cha*i;return o>0&&(this.hacking_exp+=o,t.gainHackingExp(o),this.earningsForPlayer.hack+=o,this.earningsForTask.hack+=o),s>0&&(this.strength_exp+=s,t.gainStrengthExp(s),this.earningsForPlayer.str+=s,this.earningsForTask.str+=s),l>0&&(this.defense_exp+=l,t.gainDefenseExp(l),this.earningsForPlayer.def+=l,this.earningsForTask.def+=l),c>0&&(this.dexterity_exp+=c,t.gainDexterityExp(c),this.earningsForPlayer.dex+=c,this.earningsForTask.dex+=c),f>0&&(this.agility_exp+=f,t.gainAgilityExp(f),this.earningsForPlayer.agi+=f,this.earningsForTask.agi+=f),u>0&&(this.charisma_exp+=u,t.gainCharismaExp(u),this.earningsForPlayer.cha+=u,this.earningsForTask.cha+=u),this.earningsForSleeves.hack+=o*(this.sync/100),this.earningsForSleeves.str+=s*(this.sync/100),this.earningsForSleeves.def+=l*(this.sync/100),this.earningsForSleeves.dex+=c*(this.sync/100),this.earningsForSleeves.agi+=f*(this.sync/100),this.earningsForSleeves.cha+=u*(this.sync/100),{hack:o*(this.sync/100),str:s*(this.sync/100),def:l*(this.sync/100),dex:c*(this.sync/100),agi:f*(this.sync/100),cha:u*(this.sync/100),money:0}}gainMoney(t,e,a=1){const n=e.money*a;this.earningsForTask.money+=n,this.earningsForPlayer.money+=n,t.gainMoney(n,"sleeves")}getMemoryUpgradeCost(t){const e=Math.round(t);if(e<0)return 0;if(this.memory+e>100)return this.getMemoryUpgradeCost(100-this.memory);let a=0,n=this.memory-1;for(let e=0;e50&&this.logs.shift()}prestige(t){this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.resetTaskStatus(),this.earningsForSleeves=Object(r.b)(),this.earningsForPlayer=Object(r.b)(),this.shockRecovery(t),this.augmentations=[],this.resetMultipliers(),this.city=d.a.Sector12,this.shock=1,this.storedCycles=0,this.sync=Math.max(this.memory,1),this.logs=[]}process(t,e=1){const a=1e3/f.a.MilliPerCycle;if(this.storedCycles+=e,this.storedCyclesthis.currentTaskMaxTime&&(o=this.currentTaskMaxTime-this.currentTaskTime,i=Math.floor(o/f.a.MilliPerCycle),(o<0||i<0)&&(console.warn("Sleeve.process() calculated negative cycle usage"),o=0,i=0)),this.currentTaskTime+=o,this.shock=Math.min(100,this.shock+1e-4*i);let c=Object(r.b)();switch(this.currentTask){case n.a.Idle:break;case n.a.Class:case n.a.Gym:this.updateTaskGainRates(t),c=this.gainExperience(t,this.gainRatesForTask,i),this.gainMoney(t,this.gainRatesForTask,i);break;case n.a.Faction:{c=this.gainExperience(t,this.gainRatesForTask,i),this.gainMoney(t,this.gainRatesForTask,i);const e=m.a[this.currentTaskLocation];if(!(e instanceof u.a)){console.error("Invalid faction for Sleeve task: "+this.currentTaskLocation);break}e.playerReputation+=this.getRepGain(t)*i;break}case n.a.Company:{c=this.gainExperience(t,this.gainRatesForTask,i),this.gainMoney(t,this.gainRatesForTask,i);const e=s.a[this.currentTaskLocation];if(!(e instanceof l.a)){console.error("Invalid company for Sleeve task: "+this.currentTaskLocation);break}e.playerReputation+=this.getRepGain(t)*i;break}case n.a.Recovery:this.shock=Math.min(100,this.shock+2e-4*i),this.shock>=100&&this.resetTaskStatus();break;case n.a.Synchro:this.sync=Math.min(100,this.sync+2e-4*t.getIntelligenceBonus(.5)*i),this.sync>=100&&this.resetTaskStatus()}return 0!==this.currentTaskMaxTime&&this.currentTaskTime>=this.currentTaskMaxTime&&(this.currentTask===n.a.Crime?c=this.finishTask(t):this.finishTask(t)),this.updateStatLevels(),this.storedCycles-=i,c}resetTaskStatus(){this.earningsForTask=Object(r.b)(),this.gainRatesForTask=Object(r.b)(),this.currentTask=n.a.Idle,this.currentTaskTime=0,this.currentTaskMaxTime=0,this.factionWorkType=h.a.None,this.crimeType="",this.currentTaskLocation="",this.gymStatType="",this.className=""}shockRecovery(t){return this.currentTask!==n.a.Idle?this.finishTask(t):this.resetTaskStatus(),this.currentTask=n.a.Recovery,!0}synchronize(t){return this.currentTask!==n.a.Idle?this.finishTask(t):this.resetTaskStatus(),this.currentTask=n.a.Synchro,!0}takeUniversityCourse(t,e,a){this.currentTask!==n.a.Idle?this.finishTask(t):this.resetTaskStatus();let r=1;switch(e.toLowerCase()){case p.a.AevumSummitUniversity.toLowerCase():if(this.city!==d.a.Aevum)return!1;this.currentTaskLocation=p.a.AevumSummitUniversity,r=4;break;case p.a.Sector12RothmanUniversity.toLowerCase():if(this.city!==d.a.Sector12)return!1;this.currentTaskLocation=p.a.Sector12RothmanUniversity,r=3;break;case p.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(this.city!==d.a.Volhaven)return!1;this.currentTaskLocation=p.a.VolhavenZBInstituteOfTechnology,r=5;break;default:return!1}switch(a.toLowerCase()){case"study computer science":break;case"data structures":this.gainRatesForTask.money=f.a.ClassDataStructuresBaseCost*r*-1;break;case"networks":this.gainRatesForTask.money=f.a.ClassNetworksBaseCost*r*-1;break;case"algorithms":this.gainRatesForTask.money=f.a.ClassAlgorithmsBaseCost*r*-1;break;case"management":this.gainRatesForTask.money=f.a.ClassManagementBaseCost*r*-1;break;case"leadership":this.gainRatesForTask.money=f.a.ClassLeadershipBaseCost*r*-1;break;default:return!1}return this.className=a,this.currentTask=n.a.Class,!0}travel(t,e){return t.loseMoney(f.a.TravelCost,"sleeves"),this.city=e,!0}tryBuyAugmentation(t,e){return!!t.canAfford(e.startingCost)&&(!this.augmentations.some(t=>t.name===e.name)&&(t.loseMoney(e.startingCost,"sleeves"),this.installAugmentation(e),!0))}updateTaskGainRates(t){if(this.currentTask!==n.a.Class)if(this.currentTask!==n.a.Gym)console.warn("Sleeve.updateTaskGainRates() called for unexpected task type "+this.currentTask);else{let e=1;switch(this.currentTaskLocation.toLowerCase()){case p.a.AevumCrushFitnessGym.toLowerCase():e=2;break;case p.a.AevumSnapFitnessGym.toLowerCase():e=5;break;case p.a.Sector12IronGym.toLowerCase():e=1;break;case p.a.Sector12PowerhouseGym.toLowerCase():e=10;break;case p.a.VolhavenMilleniumFitnessGym.toLowerCase():e=4;break;default:return}const a=1,n=t.hashManager.getTrainingMult()*e,r=this.gymStatType.toLowerCase();r.includes("str")?this.gainRatesForTask.str=a*n*this.strength_exp_mult:r.includes("def")?this.gainRatesForTask.def=a*n*this.defense_exp_mult:r.includes("dex")?this.gainRatesForTask.dex=a*n*this.dexterity_exp_mult:r.includes("agi")&&(this.gainRatesForTask.agi=a*n*this.agility_exp_mult)}else{let e=1;switch(this.currentTaskLocation.toLowerCase()){case p.a.AevumSummitUniversity.toLowerCase():e=3;break;case p.a.Sector12RothmanUniversity.toLowerCase():e=2;break;case p.a.VolhavenZBInstituteOfTechnology.toLowerCase():e=4;break;default:return}const a=e*t.hashManager.getStudyMult();switch(this.className.toLowerCase()){case"study computer science":this.gainRatesForTask.hack=f.a.ClassStudyComputerScienceBaseExp*a*this.hacking_exp_mult;break;case"data structures":this.gainRatesForTask.hack=f.a.ClassDataStructuresBaseExp*a*this.hacking_exp_mult;break;case"networks":this.gainRatesForTask.hack=f.a.ClassNetworksBaseExp*a*this.hacking_exp_mult;break;case"algorithms":this.gainRatesForTask.hack=f.a.ClassAlgorithmsBaseExp*a*this.hacking_exp_mult;break;case"management":this.gainRatesForTask.cha=f.a.ClassManagementBaseExp*a*this.charisma_exp_mult;break;case"leadership":this.gainRatesForTask.cha=f.a.ClassLeadershipBaseExp*a*this.charisma_exp_mult}}}upgradeMemory(t){t<0?console.warn("Sleeve.upgradeMemory() called with negative value: "+t):this.memory=Math.min(100,Math.round(this.memory+t))}workForCompany(t,e){if(!(s.a[e]instanceof l.a)||null==t.jobs[e])return!1;this.currentTask!==n.a.Idle?this.finishTask(t):this.resetTaskStatus();const a=s.a[e],r=c.a[t.jobs[e]];return null!=a&&(null!=r&&(this.gainRatesForTask.money=r.baseSalary*a.salaryMultiplier*this.work_money_mult*i.a.CompanyWorkMoney,this.gainRatesForTask.hack=r.hackingExpGain*a.expMultiplier*this.hacking_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.str=r.strengthExpGain*a.expMultiplier*this.strength_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.def=r.defenseExpGain*a.expMultiplier*this.defense_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.dex=r.dexterityExpGain*a.expMultiplier*this.dexterity_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.agi=r.agilityExpGain*a.expMultiplier*this.agility_exp_mult*i.a.CompanyWorkExpGain,this.gainRatesForTask.cha=r.charismaExpGain*a.expMultiplier*this.charisma_exp_mult*i.a.CompanyWorkExpGain,this.currentTaskLocation=e,this.currentTask=n.a.Company,!0))}workForFaction(t,e,a){const r=m.a[e];if(!(""!==e&&r&&r instanceof u.a&&t.factions.includes(e)))return!1;this.currentTask!==n.a.Idle?this.finishTask(t):this.resetTaskStatus();const o=r.getInfo(),s=a.toLowerCase();if(s.includes("hack")){if(!o.offerHackingWork)return!1;this.factionWorkType=h.a.Hacking,this.gainRatesForTask.hack=.15*this.hacking_exp_mult*i.a.FactionWorkExpGain}else if(s.includes("field")){if(!o.offerFieldWork)return!1;this.factionWorkType=h.a.Field,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.str=.1*this.strength_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.def=.1*this.defense_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.dex=.1*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.agi=.1*this.agility_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.cha=.1*this.charisma_exp_mult*i.a.FactionWorkExpGain}else{if(!s.includes("security"))return!1;if(!o.offerSecurityWork)return!1;this.factionWorkType=h.a.Security,this.gainRatesForTask.hack=.1*this.hacking_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.str=.15*this.strength_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.def=.15*this.defense_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.dex=.15*this.dexterity_exp_mult*i.a.FactionWorkExpGain,this.gainRatesForTask.agi=.15*this.agility_exp_mult*i.a.FactionWorkExpGain}return this.currentTaskLocation=e,this.currentTask=n.a.Faction,!0}workoutAtGym(t,e,a){this.currentTask!==n.a.Idle?this.finishTask(t):this.resetTaskStatus();let r=1;switch(e.toLowerCase()){case p.a.AevumCrushFitnessGym.toLowerCase():if(this.city!=d.a.Aevum)return!1;this.currentTaskLocation=p.a.AevumCrushFitnessGym,r=3;break;case p.a.AevumSnapFitnessGym.toLowerCase():if(this.city!=d.a.Aevum)return!1;this.currentTaskLocation=p.a.AevumSnapFitnessGym,r=10;break;case p.a.Sector12IronGym.toLowerCase():if(this.city!=d.a.Sector12)return!1;this.currentTaskLocation=p.a.Sector12IronGym,r=1;break;case p.a.Sector12PowerhouseGym.toLowerCase():if(this.city!=d.a.Sector12)return!1;this.currentTaskLocation=p.a.Sector12PowerhouseGym,r=20;break;case p.a.VolhavenMilleniumFitnessGym.toLowerCase():if(this.city!=d.a.Volhaven)return!1;this.currentTaskLocation=p.a.VolhavenMilleniumFitnessGym,r=7;break;default:return!1}const i=a.toLowerCase();return this.gainRatesForTask.money=f.a.ClassGymBaseCost*r*-1,!!(i.includes("str")||i.includes("def")||i.includes("dex")||i.includes("agi"))&&(this.gymStatType=a,this.currentTask=n.a.Gym,!0)}toJSON(){return Object(g.b)("Sleeve",this)}static fromJSON(t){return Object(g.a)(b,t.data)}}g.c.constructors.Sleeve=b},function(t,e,a){"use strict";let n;a.d(e,"a",(function(){return n})),function(t){t[t.SyntaxError=-1]="SyntaxError",t[t.ImportError=-2]="ImportError",t[t.URLImportError=-3]="URLImportError"}(n||(n={}))},function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"a",(function(){return i}));var n=a(131);const r=new n.a,i=new n.a},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(25);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class i{constructor(t="",e=""){r(this,"filename",""),r(this,"msg",""),r(this,"recvd",!1),this.filename=t,this.msg=e,this.recvd=!1}toJSON(){return Object(n.b)("Message",this)}static fromJSON(t){return Object(n.a)(i,t.data)}}n.c.constructors.Message=i},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(245),r=a(148),i=a(112),o=a(76),s=a(4),l=a(20),c=a(16),f=a(9),u=a(0);function m(t,e,a,n){const s=n.stockMarket.Orders;if(null==s){const t={};for(const e of Object.keys(n.stockMarket)){const a=n.stockMarket[e];a instanceof r.a&&(t[a.symbol]=[])}return void(n.stockMarket.Orders=t)}let l=s[t.symbol];if(null==l||l.constructor!==Array)return console.error(`Invalid Order book for ${t.symbol} in processOrders(): ${l}`),void(l=[]);for(const r of l)if(r.type===e&&r.pos===a)switch(r.type){case i.a.LimitBuy:(r.pos===o.a.Long&&t.price<=r.price||r.pos===o.a.Short&&t.price>=r.price)&&h(r,n);break;case i.a.LimitSell:case i.a.StopBuy:(r.pos===o.a.Long&&t.price>=r.price||r.pos===o.a.Short&&t.price<=r.price)&&h(r,n);break;case i.a.StopSell:(r.pos===o.a.Long&&t.price<=r.price||r.pos===o.a.Short&&t.price>=r.price)&&h(r,n);break;default:return void console.warn("Invalid order type: "+r.type)}}function h(t,e){const a=e.symbolToStockMap[t.stockSymbol];if(!(a instanceof r.a))return void console.error("Could not find stock for this order: "+t.stockSymbol);const m=e.stockMarket.Orders[a.symbol],h={suppressDialog:!0};let d=!0,p=!1;switch(t.type){case i.a.LimitBuy:case i.a.StopBuy:p=!0,t.pos===o.a.Long?d=Object(n.a)(a,t.shares,null,h)&&d:t.pos===o.a.Short&&(d=Object(n.d)(a,t.shares,null,h)&&d);break;case i.a.LimitSell:case i.a.StopSell:t.pos===o.a.Long?d=Object(n.c)(a,t.shares,null,h)&&d:t.pos===o.a.Short&&(d=Object(n.b)(a,t.shares,null,h)&&d);break;default:return void console.warn("Invalid order type: "+t.type)}const g=t.pos===o.a.Long?"Long":"Short";if(d){for(let e=0;e({...n})},,function(t,e,a){"use strict";a.d(e,"a",(function(){return f})),a.d(e,"b",(function(){return m}));var n=a(0),r=a.n(n),i=a(131),o=a(41),s=a(1),l=a(21),c=a(746);const f=new i.a;let u=0;function m(){const[t,e]=Object(n.useState)([]);return Object(n.useEffect)(()=>f.subscribe(t=>{const a=u+"";u++,e(e=>{const n=function(t){return"string"==typeof t?Object(c.sha256)(t):Object(c.sha256)(JSON.stringify(t.props))}(t);return e.some(t=>t.hash===n)?(console.log("Duplicate message"),e):[...e,{id:a,text:t,hash:n}]})}),[]),Object(n.useEffect)(()=>{function t(t){"Escape"===t.code&&e([])}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[]),r.a.createElement(r.a.Fragment,null,t.length>0&&r.a.createElement(o.a,{open:!0,onClose:function(){e(t=>t.slice(1,1e99))}},r.a.createElement(l.a,{overflow:"scroll",sx:{overflowWrap:"break-word",whiteSpace:"pre-line"}},r.a.createElement(s.a,{component:"span"},t[0].text))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(526);function r(){return Object(n.a)(99)+"."+Object(n.a)(9)+"."+Object(n.a)(9)+"."+Object(n.a)(9)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return I})),a.d(e,"b",(function(){return F}));var n=a(5),r=a(17),i=a(57),o=a(141),s=a(15),l=a(219),c=a(236),f=a(66),u=a(50),m=a(64),h=a(204),d=a(29),p=a(105),g=a(55),y=a(267),b=a(197),E=a(2),v=a(96),k=a(512),_=a(63),w=a(26),S=a(132),C=a(82),x=a(102),L=a(101),O=a(87),M=a(16),T=a(119),A=a(404),R=a(405),N=a(8),P=a(181);function I(){Object(l.b)(E.a);const t=E.a.factions.concat(E.a.factionInvitations).filter((function(t){return d.a[t].getInfo().keep}));E.a.prestigeAugmentation(),Object(b.c)();const e=E.a.getHomeComputer();Object(w.i)(),Object(w.a)(e),Object(S.d)(E.a,e),Object(o.b)(s.a.Neurolink)&&i.a[s.a.Neurolink].owned&&(e.programs.push(m.a.FTPCrackProgram.name),e.programs.push(m.a.RelaySMTPProgram.name)),Object(o.b)(s.a.CashRoot)&&i.a[s.a.CashRoot].owned&&(E.a.setMoney(1e6),e.programs.push(m.a.BruteSSHProgram.name)),Object(o.b)(s.a.PCMatrix)&&i.a[s.a.PCMatrix].owned&&(e.programs.push(m.a.DeepscanV1.name),e.programs.push(m.a.AutoLink.name)),(E.a.sourceFileLvl(5)>0||5===E.a.bitNodeN)&&e.programs.push(m.a.Formulas.name),Object(w.f)(E.a.getHomeComputer());for(const t of Object.keys(f.a))f.a.hasOwnProperty(t)&&f.a[t].gainFavor();for(const t of Object.keys(d.a))d.a.hasOwnProperty(t)&&d.a[t].gainFavor();null!==O.a.action&&O.a.finishAction(v.b,E.a,!0),O.a.clear(),P.a.emit(),Object(d.c)(),E.a.factionInvitations=E.a.factionInvitations.concat(t),Object(o.d)(),E.a.reapplyAllSourceFiles(),Object(f.b)(),Object(y.c)(),E.a.applyEntropy(E.a.entropy);const a=E.a.gang;if(E.a.inGang()&&null!==a){const t=d.a[a.facName];t instanceof h.a&&Object(p.e)(t);const e=.95;for(const t of a.members)t.hack_asc_points*=e,t.str_asc_points*=e,t.def_asc_points*=e,t.dex_asc_points*=e,t.agi_asc_points*=e,t.cha_asc_points*=e}if(3===E.a.bitNodeN&&e.messages.push(_.a.CorporationManagementHandbook),E.a.bladeburner instanceof c.a&&E.a.bladeburner.prestige(),8===E.a.bitNodeN&&(E.a.money=25e7),(8===E.a.bitNodeN||C.a[8]>0)&&(E.a.hasWseAccount=!0,E.a.hasTixApiAccess=!0),E.a.hasWseAccount&&(Object(L.f)(),Object(L.h)()),Object(o.b)(s.a.TheRedPill)&&i.a[s.a.TheRedPill].owned){const t=Object(w.d)(x.a.WorldDaemon),e=Object(w.d)(x.a.DaedalusServer);t&&e&&(t.serversOnNetwork.push(e.hostname),e.serversOnNetwork.push(t.hostname))}Object(o.b)(s.a.StaneksGift1)&&i.a[s.a.StaneksGift1].owned&&Object(p.e)(d.a[n.a.ChurchOfTheMachineGod]),T.b.prestigeAugmentation(),Object(k.b)(),A.b.splice(0,A.b.length),R.b.splice(0,R.b.length)}function F(t){Object(l.b)(E.a),Object(C.b)(E.a),E.a.prestigeSourceFile(),Object(b.c)();const e=E.a.getHomeComputer();null!==O.a.action&&O.a.finishAction(v.b,E.a,!0),O.a.clear(),P.a.emit(),Object(w.i)(),Object(w.a)(e),Object(S.d)(E.a,e),Object(w.f)(E.a.getHomeComputer()),C.a[9]>=2?e.setMaxRam(128):C.a[1]>0?e.setMaxRam(32):e.setMaxRam(8),e.cpuCores=1;for(const t of Object.keys(f.a))f.a.hasOwnProperty(t)&&(f.a[t].favor=0);for(const t of Object.keys(d.a))d.a.hasOwnProperty(t)&&(d.a[t].favor=0);null!==O.a.action&&O.a.finishAction(v.b,E.a,!0);for(const t of Object.keys(i.a))i.a.hasOwnProperty(t)&&delete i.a[t];if(C.a[12]>0&&E.a.augmentations.push({name:s.a.NeuroFluxGovernor,level:C.a[12]}),Object(d.c)(),Object(o.d)(),E.a.reapplyAllSourceFiles(),Object(f.b)(),Object(y.c)(),(E.a.sourceFileLvl(5)>0||5===E.a.bitNodeN)&&e.programs.push(m.a.Formulas.name),3===E.a.bitNodeN&&(e.messages.push(_.a.CorporationManagementHandbook),Object(M.a)("You received a copy of the Corporation Management Handbook on your home computer. Read it if you need help getting started with Corporations!")),8===E.a.bitNodeN&&(E.a.money=25e7),(8===E.a.bitNodeN||C.a[8]>0)&&(E.a.hasWseAccount=!0,E.a.hasTixApiAccess=!0),10===E.a.bitNodeN&&Object(M.a)("Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!"),13===E.a.bitNodeN&&Object(M.a)("Trouble is brewing in "+r.a.Chongqing),E.a.hasWseAccount?(Object(L.f)(),Object(L.h)()):Object(L.d)(),E.a.gang=null,E.a.corporation=null,Object(u.e)(),E.a.bladeburner=null,C.a[9]>=3){const t=E.a.createHacknetServer();t.level=100,t.cores=10,t.cache=5,t.updateHashRate(E.a.hacknet_node_money_mult),t.updateHashCapacity(),Object(g.p)(E.a)}13===E.a.bitNodeN&&(E.a.money=N.a.TravelCost),T.b.prestigeSourceFile(),0===C.a[5]||t||E.a.gainIntelligenceExp(300),Object(k.b)()}},function(t,e,a){"use strict";function n(){return new Promise((t,e)=>{window.indexedDB||e("Indexed DB does not exists");const a=window.indexedDB.open("bitburnerSave",1);a.onupgradeneeded=function(){this.result.createObjectStore("savestring")},a.onerror=function(t){e("Failed to get IDB "+t)},a.onsuccess=function(){const a=this.result;a?t(a.transaction(["savestring"],"readwrite").objectStore("savestring")):e("database loading result was undefined")}})}function r(){return new Promise((t,e)=>{n().then(e=>new Promise((t,a)=>{const n=e.get("save");n.onerror=function(t){a("Error in Database request to get savestring: "+t)},n.onsuccess=function(){t(this.result)}}).then(e=>t(e))).catch(t=>e(t))})}function i(t){return n().then(e=>new Promise((a,n)=>{const r=e.put(t,"save");r.onerror=function(t){n("Error saving game to IndexedDB: "+t)},r.onsuccess=()=>a()}))}function o(){return n().then(t=>{t.delete("save")})}a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return o}))},,,function(t,e,a){"use strict";function n(t){const e=25e3*(Math.pow(1.02,t)-1);return Math.round(1e4*e)/1e4}function r(t){const e=Math.log(t/25e3+1)/Math.log(1.02);return Math.round(1e4*e)/1e4}a.d(e,"a",(function(){return n})),a.d(e,"b",(function(){return r}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return r})),a.d(e,"b",(function(){return i})),a.d(e,"c",(function(){return o})),a.d(e,"d",(function(){return s}));var n=a(29);let r=0;function i(){return(new Date).getTime()-r>864e5}function o(t){if(i()){for(const e of t.factions)n.a[e].favor++;r=(new Date).getTime()}}function s(t){r=t}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(61),r=a(449),i=a(25);function o(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class s extends r.a{constructor(t=null){super(t),o(this,"reqdRank",100),o(this,"teamCount",0),t&&t.reqdRank&&(this.reqdRank=t.reqdRank),t&&t.teamCount&&(this.teamCount=t.teamCount)}getTeamSuccessBonus(t){if(this.teamCount&&this.teamCount>0){this.teamCount=Math.min(this.teamCount,t.teamSize);return Math.pow(this.teamCount,.05)}return 1}getActionTypeSkillSuccessBonus(t){return t.skillMultipliers.successChanceOperation}getChaosDifficultyBonus(t){const e=t.getCurrentCity();if(e.chaos>n.a.ChaosThreshold){const t=e.chaos-n.a.ChaosThreshold+1;return Math.pow(t,.5)}return 1}toJSON(){return Object(i.b)("Operation",this)}static fromJSON(t){return Object(i.a)(s,t.data)}}i.c.constructors.Operation=s},,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(5),r=a(11),i=a(63),o=a(102);const s=[{hackDifficulty:99,hostname:r.a.AevumECorp.toLowerCase(),moneyAvailable:{max:7e10,min:3e10},networkLayer:15,numOpenPortsRequired:5,organizationName:r.a.AevumECorp,requiredHackingSkill:{max:1400,min:1050},serverGrowth:99,specialName:r.a.AevumECorp},{hackDifficulty:99,hostname:r.a.Sector12MegaCorp.toLowerCase(),moneyAvailable:{max:6e10,min:4e10},networkLayer:15,numOpenPortsRequired:5,organizationName:r.a.Sector12MegaCorp,requiredHackingSkill:{max:1350,min:1100},serverGrowth:99,specialName:r.a.Sector12MegaCorp},{hackDifficulty:{max:88,min:72},hostname:"b-and-a",moneyAvailable:{max:3e10,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.AevumBachmanAndAssociates,requiredHackingSkill:{max:1150,min:900},serverGrowth:{max:80,min:60},specialName:r.a.AevumBachmanAndAssociates},{hackDifficulty:{max:97,min:88},hostname:"blade",literature:[i.a.BeyondMan],maxRamExponent:{max:9,min:5},moneyAvailable:{max:4e10,min:1e10},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.Sector12BladeIndustries,requiredHackingSkill:{max:1200,min:900},serverGrowth:{max:85,min:55},specialName:r.a.Sector12BladeIndustries},{hackDifficulty:99,hostname:r.a.VolhavenNWO.toLowerCase(),literature:[i.a.TheHiddenWorld],moneyAvailable:{max:4e10,min:2e10},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.VolhavenNWO,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:95,min:65},specialName:r.a.VolhavenNWO},{hackDifficulty:{max:65,min:45},hostname:"clarkinc",literature:[i.a.BeyondMan,i.a.CostOfImmortality],moneyAvailable:{max:25e9,min:15e9},networkLayer:14,numOpenPortsRequired:5,organizationName:r.a.AevumClarkeIncorporated,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:75,min:45},specialName:r.a.AevumClarkeIncorporated},{hackDifficulty:{max:99,min:90},hostname:"omnitek",literature:[i.a.CodedIntelligence,i.a.HistoryOfSynthoids],maxRamExponent:{max:9,min:7},moneyAvailable:{max:22e9,min:13e9},networkLayer:13,numOpenPortsRequired:5,organizationName:r.a.VolhavenOmniTekIncorporated,requiredHackingSkill:{max:1100,min:900},serverGrowth:{max:99,min:95},specialName:r.a.VolhavenOmniTekIncorporated},{hackDifficulty:{max:75,min:55},hostname:"4sigma",moneyAvailable:{max:25e9,min:15e9},networkLayer:13,numOpenPortsRequired:5,organizationName:r.a.Sector12FourSigma,requiredHackingSkill:{max:1250,min:900},serverGrowth:{max:99,min:75},specialName:r.a.Sector12FourSigma},{hackDifficulty:{max:99,min:95},hostname:"kuai-gong",moneyAvailable:{max:3e10,min:2e10},networkLayer:13,numOpenPortsRequired:5,organizationName:r.a.ChongqingKuaiGongInternational,requiredHackingSkill:{max:1300,min:950},serverGrowth:{max:99,min:90},specialName:r.a.ChongqingKuaiGongInternational},{hackDifficulty:{max:97,min:83},hostname:"fulcrumtech",literature:[i.a.SimulatedReality],maxRamExponent:{max:11,min:7},moneyAvailable:{max:18e8,min:14e8},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1250,min:950},serverGrowth:{max:99,min:80},specialName:r.a.AevumFulcrumTechnologies},{hackDifficulty:99,hostname:"fulcrumassets",moneyAvailable:1e6,networkLayer:15,numOpenPortsRequired:5,organizationName:r.a.AevumFulcrumTechnologies,requiredHackingSkill:{max:1600,min:1100},serverGrowth:1,specialName:o.a.FulcrumSecretTechnologies},{hackDifficulty:{max:92,min:78},hostname:"stormtech",moneyAvailable:{max:12e8,min:1e9},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.IshimaStormTechnologies,requiredHackingSkill:{max:1075,min:875},serverGrowth:{max:92,min:68},specialName:r.a.IshimaStormTechnologies},{hackDifficulty:{max:96,min:84},hostname:"defcomm",moneyAvailable:{max:95e7,min:8e8},networkLayer:9,numOpenPortsRequired:5,organizationName:r.a.NewTokyoDefComm,requiredHackingSkill:{max:1050,min:850},serverGrowth:{max:73,min:47},specialName:r.a.NewTokyoDefComm},{hackDifficulty:{max:90,min:70},hostname:"infocomm",moneyAvailable:{max:9e8,min:6e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"InfoComm",requiredHackingSkill:{max:950,min:875},serverGrowth:{max:75,min:35}},{hackDifficulty:{max:95,min:85},hostname:"helios",literature:[i.a.BeyondMan],maxRamExponent:{max:8,min:5},moneyAvailable:{max:75e7,min:55e7},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.VolhavenHeliosLabs,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:80,min:70},specialName:r.a.VolhavenHeliosLabs},{hackDifficulty:{max:90,min:80},hostname:r.a.NewTokyoVitaLife.toLowerCase(),literature:[i.a.AGreenTomorrow],maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:12,numOpenPortsRequired:5,organizationName:r.a.NewTokyoVitaLife,requiredHackingSkill:{max:900,min:775},serverGrowth:{max:80,min:60},specialName:r.a.NewTokyoVitaLife},{hackDifficulty:{max:95,min:85},hostname:"icarus",moneyAvailable:{max:1e9,min:9e8},networkLayer:9,numOpenPortsRequired:5,organizationName:r.a.Sector12IcarusMicrosystems,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:95,min:85},specialName:r.a.Sector12IcarusMicrosystems},{hackDifficulty:{max:90,min:80},hostname:"univ-energy",maxRamExponent:{max:7,min:4},moneyAvailable:{max:12e8,min:11e8},networkLayer:9,numOpenPortsRequired:4,organizationName:r.a.Sector12UniversalEnergy,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:90,min:80},specialName:r.a.Sector12UniversalEnergy},{hackDifficulty:{max:80,min:70},hostname:"titan-labs",literature:[i.a.CodedIntelligence],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:75e7},networkLayer:11,numOpenPortsRequired:5,organizationName:"Titan Laboratories",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:80,min:60}},{hackDifficulty:{max:75,min:65},hostname:"microdyne",literature:[i.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:11,numOpenPortsRequired:5,organizationName:"Microdyne Technologies",requiredHackingSkill:{max:875,min:800},serverGrowth:{max:90,min:70}},{hackDifficulty:{max:80,min:70},hostname:"taiyang-digital",literature:[i.a.AGreenTomorrow,i.a.BrighterThanTheSun],moneyAvailable:{max:9e8,min:8e8},networkLayer:10,numOpenPortsRequired:5,organizationName:"Taiyang Digital",requiredHackingSkill:{max:950,min:850},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:65,min:55},hostname:"galactic-cyber",moneyAvailable:{max:85e7,min:75e7},networkLayer:7,numOpenPortsRequired:5,organizationName:r.a.AevumGalacticCybersystems,requiredHackingSkill:{max:875,min:825},serverGrowth:{max:90,min:70},specialName:r.a.AevumGalacticCybersystems},{hackDifficulty:{max:90,min:80},hostname:r.a.AevumAeroCorp.toLowerCase(),literature:[i.a.ManAndMachine],moneyAvailable:{max:12e8,min:1e9},networkLayer:7,numOpenPortsRequired:5,organizationName:r.a.AevumAeroCorp,requiredHackingSkill:{max:925,min:850},serverGrowth:{max:65,min:55},specialName:r.a.AevumAeroCorp},{hackDifficulty:{max:95,min:85},hostname:"omnia",literature:[i.a.HistoryOfSynthoids],maxRamExponent:{max:6,min:4},moneyAvailable:{max:1e9,min:9e8},networkLayer:8,numOpenPortsRequired:5,organizationName:r.a.VolhavenOmniaCybersystems,requiredHackingSkill:{max:950,min:850},serverGrowth:{max:70,min:60},specialName:r.a.VolhavenOmniaCybersystems},{hackDifficulty:{max:65,min:55},hostname:"zb-def",literature:[i.a.SyntheticMuscles],moneyAvailable:{max:11e8,min:9e8},networkLayer:10,numOpenPortsRequired:4,organizationName:"ZB Defense Industries",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:75,min:65}},{hackDifficulty:{max:80,min:60},hostname:"applied-energetics",moneyAvailable:{max:1e9,min:7e8},networkLayer:11,numOpenPortsRequired:4,organizationName:"Applied Energetics",requiredHackingSkill:{max:850,min:775},serverGrowth:{max:75,min:70}},{hackDifficulty:{max:80,min:70},hostname:"solaris",literature:[i.a.AGreenTomorrow,i.a.TheFailedFrontier],maxRamExponent:{max:7,min:4},moneyAvailable:{max:9e8,min:7e8},networkLayer:9,numOpenPortsRequired:5,organizationName:r.a.ChongqingSolarisSpaceSystems,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:80,min:70},specialName:r.a.ChongqingSolarisSpaceSystems},{hackDifficulty:{max:85,min:75},hostname:r.a.Sector12DeltaOne.toLowerCase(),moneyAvailable:{max:17e8,min:13e8},networkLayer:8,numOpenPortsRequired:5,organizationName:r.a.Sector12DeltaOne,requiredHackingSkill:{max:900,min:800},serverGrowth:{max:70,min:50},specialName:r.a.Sector12DeltaOne},{hackDifficulty:{max:85,min:75},hostname:"global-pharm",literature:[i.a.AGreenTomorrow],maxRamExponent:{max:6,min:3},moneyAvailable:{max:175e7,min:15e8},networkLayer:7,numOpenPortsRequired:4,organizationName:r.a.NewTokyoGlobalPharmaceuticals,requiredHackingSkill:{max:850,min:750},serverGrowth:{max:90,min:80},specialName:r.a.NewTokyoGlobalPharmaceuticals},{hackDifficulty:{max:80,min:60},hostname:"nova-med",moneyAvailable:{max:125e7,min:11e8},networkLayer:10,numOpenPortsRequired:4,organizationName:r.a.IshimaNovaMedical,requiredHackingSkill:{max:850,min:775},serverGrowth:{max:85,min:65},specialName:r.a.IshimaNovaMedical},{hackDifficulty:{max:90,min:70},hostname:"zeus-med",moneyAvailable:{max:15e8,min:13e8},networkLayer:9,numOpenPortsRequired:5,organizationName:"Zeus Medical",requiredHackingSkill:{max:850,min:800},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:70},hostname:"unitalife",maxRamExponent:{max:6,min:4},moneyAvailable:{max:11e8,min:1e9},networkLayer:8,numOpenPortsRequired:4,organizationName:"UnitaLife Group",requiredHackingSkill:{max:825,min:775},serverGrowth:{max:80,min:70}},{hackDifficulty:{max:80,min:60},hostname:"lexo-corp",maxRamExponent:{max:7,min:4},moneyAvailable:{max:8e8,min:7e8},networkLayer:6,numOpenPortsRequired:4,organizationName:r.a.VolhavenLexoCorp,requiredHackingSkill:{max:750,min:650},serverGrowth:{max:65,min:55},specialName:r.a.VolhavenLexoCorp},{hackDifficulty:{max:60,min:40},hostname:"rho-construction",maxRamExponent:{max:6,min:4},moneyAvailable:{max:7e8,min:5e8},networkLayer:6,numOpenPortsRequired:3,organizationName:r.a.AevumRhoConstruction,requiredHackingSkill:{max:525,min:475},serverGrowth:{max:60,min:40},specialName:r.a.AevumRhoConstruction},{hackDifficulty:{max:70,min:50},hostname:"alpha-ent",literature:[i.a.Sector12Crime],maxRamExponent:{max:7,min:4},moneyAvailable:{max:75e7,min:6e8},networkLayer:6,numOpenPortsRequired:4,organizationName:r.a.Sector12AlphaEnterprises,requiredHackingSkill:{max:600,min:500},serverGrowth:{max:60,min:50},specialName:r.a.Sector12AlphaEnterprises},{hackDifficulty:{max:80,min:70},hostname:"aevum-police",maxRamExponent:{max:6,min:4},moneyAvailable:{max:4e8,min:2e8},networkLayer:6,numOpenPortsRequired:4,organizationName:r.a.AevumPolice,requiredHackingSkill:{max:450,min:400},serverGrowth:{max:50,min:30},specialName:r.a.AevumPolice},{hackDifficulty:{max:55,min:45},hostname:"rothman-uni",literature:[i.a.SecretSocieties,i.a.TheFailedFrontier,i.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:25e7,min:175e6},networkLayer:5,numOpenPortsRequired:3,organizationName:r.a.Sector12RothmanUniversity,requiredHackingSkill:{max:430,min:370},serverGrowth:{max:45,min:35},specialName:r.a.Sector12RothmanUniversity},{hackDifficulty:{max:85,min:65},hostname:"zb-institute",maxRamExponent:{max:7,min:4},moneyAvailable:{max:11e8,min:8e8},networkLayer:5,numOpenPortsRequired:5,organizationName:r.a.VolhavenZBInstituteOfTechnology,requiredHackingSkill:{max:775,min:725},serverGrowth:{max:85,min:75},specialName:r.a.VolhavenZBInstituteOfTechnology},{hackDifficulty:{max:65,min:45},hostname:"summit-uni",literature:[i.a.SecretSocieties,i.a.TheFailedFrontier,i.a.SyntheticMuscles],maxRamExponent:{max:6,min:4},moneyAvailable:{max:35e7,min:2e8},networkLayer:5,numOpenPortsRequired:3,organizationName:r.a.AevumSummitUniversity,requiredHackingSkill:{max:475,min:425},serverGrowth:{max:60,min:40},specialName:r.a.AevumSummitUniversity},{hackDifficulty:{max:80,min:60},hostname:"syscore",moneyAvailable:{max:6e8,min:4e8},networkLayer:5,numOpenPortsRequired:4,organizationName:r.a.VolhavenSysCoreSecurities,requiredHackingSkill:{max:650,min:550},serverGrowth:{max:70,min:60},specialName:r.a.VolhavenSysCoreSecurities},{hackDifficulty:{max:70,min:60},hostname:"catalyst",literature:[i.a.TensionsInTechRace],maxRamExponent:{max:7,min:4},moneyAvailable:{max:55e7,min:3e8},networkLayer:5,numOpenPortsRequired:3,organizationName:"Catalyst Ventures",requiredHackingSkill:{max:450,min:400},serverGrowth:{max:55,min:25}},{hackDifficulty:{max:45,min:35},hostname:"the-hub",maxRamExponent:{max:6,min:3},moneyAvailable:{max:2e8,min:15e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"The Hub",requiredHackingSkill:{max:325,min:275},serverGrowth:{max:55,min:45}},{hackDifficulty:{max:65,min:55},hostname:r.a.VolhavenCompuTek.toLowerCase(),literature:[i.a.ManAndMachine],moneyAvailable:{max:25e7,min:22e7},networkLayer:4,numOpenPortsRequired:3,organizationName:r.a.VolhavenCompuTek,requiredHackingSkill:{max:400,min:300},serverGrowth:{max:65,min:45},specialName:r.a.VolhavenCompuTek},{hackDifficulty:{max:80,min:60},hostname:"netlink",literature:[i.a.SimulatedReality],maxRamExponent:{max:7,min:4},moneyAvailable:275e6,networkLayer:4,numOpenPortsRequired:3,organizationName:r.a.AevumNetLinkTechnologies,requiredHackingSkill:{max:425,min:375},serverGrowth:{max:75,min:45},specialName:r.a.AevumNetLinkTechnologies},{hackDifficulty:{max:65,min:35},hostname:"johnson-ortho",moneyAvailable:{max:85e6,min:7e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Johnson Orthopedics",requiredHackingSkill:{max:300,min:250},serverGrowth:{max:65,min:35}},{hackDifficulty:1,hostname:"n00dles",literature:[],maxRamExponent:2,moneyAvailable:7e4,networkLayer:1,numOpenPortsRequired:0,organizationName:r.a.NewTokyoNoodleBar,requiredHackingSkill:1,serverGrowth:3e3,specialName:r.a.NewTokyoNoodleBar},{hackDifficulty:10,hostname:r.a.Sector12FoodNStuff.toLowerCase(),literature:[i.a.Sector12Crime],maxRamExponent:4,moneyAvailable:2e6,networkLayer:1,numOpenPortsRequired:0,organizationName:r.a.Sector12FoodNStuff,requiredHackingSkill:1,serverGrowth:5,specialName:r.a.Sector12FoodNStuff},{hackDifficulty:10,hostname:"sigma-cosmetics",maxRamExponent:4,moneyAvailable:23e5,networkLayer:1,numOpenPortsRequired:0,organizationName:"Sigma Cosmetics",requiredHackingSkill:5,serverGrowth:10},{hackDifficulty:15,hostname:"joesguns",maxRamExponent:4,moneyAvailable:25e5,networkLayer:1,numOpenPortsRequired:0,organizationName:r.a.Sector12JoesGuns,requiredHackingSkill:10,serverGrowth:20,specialName:r.a.Sector12JoesGuns},{hackDifficulty:25,hostname:"zer0",maxRamExponent:5,moneyAvailable:75e5,networkLayer:2,numOpenPortsRequired:1,organizationName:"ZER0 Nightclub",requiredHackingSkill:75,serverGrowth:40},{hackDifficulty:20,hostname:"nectar-net",maxRamExponent:4,moneyAvailable:275e4,networkLayer:2,numOpenPortsRequired:0,organizationName:"Nectar Nightclub Network",requiredHackingSkill:20,serverGrowth:25},{hackDifficulty:25,hostname:"neo-net",literature:[i.a.TheHiddenWorld],maxRamExponent:5,moneyAvailable:5e6,networkLayer:3,numOpenPortsRequired:1,organizationName:"Neo Nightclub Network",requiredHackingSkill:50,serverGrowth:25},{hackDifficulty:30,hostname:"silver-helix",literature:[i.a.NewTriads],maxRamExponent:6,moneyAvailable:45e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Silver Helix",requiredHackingSkill:150,serverGrowth:30},{hackDifficulty:15,hostname:"hong-fang-tea",literature:[i.a.BrighterThanTheSun],maxRamExponent:4,moneyAvailable:3e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HongFang Teahouse",requiredHackingSkill:30,serverGrowth:20},{hackDifficulty:15,hostname:"harakiri-sushi",maxRamExponent:4,moneyAvailable:4e6,networkLayer:1,numOpenPortsRequired:0,organizationName:"HaraKiri Sushi Bar Network",requiredHackingSkill:40,serverGrowth:40},{hackDifficulty:20,hostname:"phantasy",maxRamExponent:5,moneyAvailable:24e6,networkLayer:3,numOpenPortsRequired:2,organizationName:"Phantasy Club",requiredHackingSkill:100,serverGrowth:35},{hackDifficulty:15,hostname:"max-hardware",maxRamExponent:5,moneyAvailable:1e7,networkLayer:2,numOpenPortsRequired:1,organizationName:"Max Hardware Store",requiredHackingSkill:80,serverGrowth:30},{hackDifficulty:{max:35,min:25},hostname:"omega-net",literature:[i.a.TheNewGod],maxRamExponent:5,moneyAvailable:{max:7e7,min:6e7},networkLayer:3,numOpenPortsRequired:2,organizationName:r.a.IshimaOmegaSoftware,requiredHackingSkill:{max:220,min:180},serverGrowth:{max:40,min:30},specialName:r.a.IshimaOmegaSoftware},{hackDifficulty:{max:45,min:35},hostname:"crush-fitness",moneyAvailable:{max:6e7,min:4e7},networkLayer:4,numOpenPortsRequired:2,organizationName:"Crush Fitness",requiredHackingSkill:{max:275,min:225},serverGrowth:{max:33,min:27},specialName:r.a.AevumCrushFitnessGym},{hackDifficulty:30,hostname:"iron-gym",maxRamExponent:5,moneyAvailable:2e7,networkLayer:1,numOpenPortsRequired:1,organizationName:r.a.Sector12IronGym+" Network",requiredHackingSkill:100,serverGrowth:20,specialName:r.a.Sector12IronGym},{hackDifficulty:{max:55,min:45},hostname:"millenium-fitness",maxRamExponent:{max:8,min:4},moneyAvailable:25e7,networkLayer:6,numOpenPortsRequired:3,organizationName:"Millenium Fitness Network",requiredHackingSkill:{max:525,min:475},serverGrowth:{max:45,min:25},specialName:r.a.VolhavenMilleniumFitnessGym},{hackDifficulty:{max:65,min:55},hostname:"powerhouse-fitness",maxRamExponent:{max:6,min:4},moneyAvailable:9e8,networkLayer:14,numOpenPortsRequired:5,organizationName:"Powerhouse Fitness",requiredHackingSkill:{max:1100,min:950},serverGrowth:{max:60,min:50},specialName:r.a.Sector12PowerhouseGym},{hackDifficulty:{max:60,min:40},hostname:"snap-fitness",moneyAvailable:45e7,networkLayer:7,numOpenPortsRequired:4,organizationName:"Snap Fitness",requiredHackingSkill:{max:800,min:675},serverGrowth:{max:60,min:40},specialName:r.a.AevumSnapFitnessGym},{hackDifficulty:0,hostname:"run4theh111z",literature:[i.a.SimulatedReality,i.a.TheNewGod],maxRamExponent:{max:9,min:5},moneyAvailable:0,networkLayer:11,numOpenPortsRequired:4,organizationName:"The Runners",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:o.a.BitRunnersServer},{hackDifficulty:0,hostname:"I.I.I.I",literature:[i.a.DemocracyIsDead],maxRamExponent:{max:8,min:4},moneyAvailable:0,networkLayer:5,numOpenPortsRequired:3,organizationName:"I.I.I.I",requiredHackingSkill:{max:365,min:340},serverGrowth:0,specialName:o.a.TheBlackHandServer},{hackDifficulty:0,hostname:"avmnite-02h",literature:[i.a.DemocracyIsDead],maxRamExponent:{max:7,min:4},moneyAvailable:0,networkLayer:4,numOpenPortsRequired:2,organizationName:n.a.NiteSec,requiredHackingSkill:{max:220,min:202},serverGrowth:0,specialName:o.a.NiteSecServer},{hackDifficulty:0,hostname:".",maxRamExponent:4,moneyAvailable:0,networkLayer:13,numOpenPortsRequired:4,organizationName:".",requiredHackingSkill:{max:550,min:505},serverGrowth:0,specialName:o.a.TheDarkArmyServer},{hackDifficulty:0,hostname:"CSEC",literature:[i.a.DemocracyIsDead],maxRamExponent:3,moneyAvailable:0,networkLayer:2,numOpenPortsRequired:1,organizationName:n.a.CyberSec,requiredHackingSkill:{max:60,min:51},serverGrowth:0,specialName:o.a.CyberSecServer},{hackDifficulty:0,hostname:"The-Cave",literature:[i.a.AlphaOmega],moneyAvailable:0,networkLayer:15,numOpenPortsRequired:5,organizationName:"Helios",requiredHackingSkill:925,serverGrowth:0,specialName:o.a.DaedalusServer},{hackDifficulty:0,hostname:"w0r1d_d43m0n",moneyAvailable:0,numOpenPortsRequired:5,organizationName:"w0r1d_d43m0n",requiredHackingSkill:3e3,serverGrowth:0,specialName:o.a.WorldDaemon}]},function(t,e,a){"use strict";function n(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}a.d(e,"a",(function(){return r}));class r{constructor(t=""){n(this,"level",1),n(this,"name",""),this.name=t}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(8),r=a(32);class i{constructor(t){this.name=t.name,this.nextPosition=t.nextPosition,this.baseSalary=t.baseSalary,this.repMultiplier=t.repMultiplier,this.requiredHacking=null!=t.reqdHacking?t.reqdHacking:0,this.requiredStrength=null!=t.reqdStrength?t.reqdStrength:0,this.requiredDefense=null!=t.reqdDefense?t.reqdDefense:0,this.requiredDexterity=null!=t.reqdDexterity?t.reqdDexterity:0,this.requiredAgility=null!=t.reqdAgility?t.reqdAgility:0,this.requiredCharisma=null!=t.reqdCharisma?t.reqdCharisma:0,this.requiredReputation=null!=t.reqdReputation?t.reqdReputation:0,this.hackingEffectiveness=null!=t.hackingEffectiveness?t.hackingEffectiveness:0,this.strengthEffectiveness=null!=t.strengthEffectiveness?t.strengthEffectiveness:0,this.defenseEffectiveness=null!=t.defenseEffectiveness?t.defenseEffectiveness:0,this.dexterityEffectiveness=null!=t.dexterityEffectiveness?t.dexterityEffectiveness:0,this.agilityEffectiveness=null!=t.agilityEffectiveness?t.agilityEffectiveness:0,this.charismaEffectiveness=null!=t.charismaEffectiveness?t.charismaEffectiveness:0,100!==Math.round(this.hackingEffectiveness+this.strengthEffectiveness+this.defenseEffectiveness+this.dexterityEffectiveness+this.agilityEffectiveness+this.charismaEffectiveness)&&console.error(`CompanyPosition ${this.name} parameters do not sum to 100`),this.hackingExpGain=null!=t.hackingExpGain?t.hackingExpGain:0,this.strengthExpGain=null!=t.strengthExpGain?t.strengthExpGain:0,this.defenseExpGain=null!=t.defenseExpGain?t.defenseExpGain:0,this.dexterityExpGain=null!=t.dexterityExpGain?t.dexterityExpGain:0,this.agilityExpGain=null!=t.agilityExpGain?t.agilityExpGain:0,this.charismaExpGain=null!=t.charismaExpGain?t.charismaExpGain:0}calculateJobPerformance(t,e,a,r,i,o){const s=this.hackingEffectiveness*t/n.a.MaxSkillLevel,l=this.strengthEffectiveness*e/n.a.MaxSkillLevel,c=this.defenseEffectiveness*a/n.a.MaxSkillLevel,f=this.dexterityEffectiveness*r/n.a.MaxSkillLevel,u=this.agilityEffectiveness*i/n.a.MaxSkillLevel,m=this.charismaEffectiveness*o/n.a.MaxSkillLevel;let h=this.repMultiplier*(s+l+c+f+u+m)/100;return isNaN(h)&&(console.error("Company reputation gain calculated to be NaN"),h=0),h}isSoftwareJob(){return r.j.includes(this.name)}isITJob(){return r.d.includes(this.name)}isSecurityEngineerJob(){return r.i.includes(this.name)}isNetworkEngineerJob(){return r.f.includes(this.name)}isBusinessJob(){return r.b.includes(this.name)}isSecurityJob(){return r.h.includes(this.name)}isAgentJob(){return r.a.includes(this.name)}isSoftwareConsultantJob(){return r.k.includes(this.name)}isBusinessConsultantJob(){return r.c.includes(this.name)}isPartTimeJob(){return r.g.includes(this.name)}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(260);const o={};o.SourceFile1=new i.a(1,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 16%",r.a.createElement("br",null),"Level 2: 24%",r.a.createElement("br",null),"Level 3: 28%")),o.SourceFile2=new i.a(2,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 24%",r.a.createElement("br",null),"Level 2: 36%",r.a.createElement("br",null),"Level 3: 42%")),o.SourceFile3=new i.a(3,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile4=new i.a(4,r.a.createElement(r.a.Fragment,null,"This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this Source-File reduces the RAM cost of Singularity functions.")),o.SourceFile5=new i.a(5,r.a.createElement(r.a.Fragment,null,"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. Higher Intelligence levels will boost your production for many actions in the game. In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with Formulas.exe, and will raise all of your hacking-related multipliers by:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile6=new i.a(6,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile7=new i.a(7,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile8=new i.a(8,r.a.createElement(r.a.Fragment,null,"This Source-File grants the following benefits:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: Permanent access to WSE and TIX API",r.a.createElement("br",null),"Level 2: Ability to short stocks in other BitNodes",r.a.createElement("br",null),"Level 3: Ability to use limit/stop orders in other BitNodes",r.a.createElement("br",null),r.a.createElement("br",null),"This Source-File also increases your hacking growth multipliers by:",r.a.createElement("br",null),"Level 1: 12%",r.a.createElement("br",null),"Level 2: 18%",r.a.createElement("br",null),"Level 3: 21%")),o.SourceFile9=new i.a(9,r.a.createElement(r.a.Fragment,null,"This Source-File grants the following benefits:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: Permanently unlocks the Hacknet Server in other BitNodes",r.a.createElement("br",null),"Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode",r.a.createElement("br",null),"Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode",r.a.createElement("br",null),r.a.createElement("br",null),"(Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing Augmentations)",r.a.createElement("br",null),r.a.createElement("br",null),"This Source-File also increases your hacknet multipliers by:",r.a.createElement("br",null),"Level 1: 8%",r.a.createElement("br",null),"Level 2: 12%",r.a.createElement("br",null),"Level 3: 14%")),o.SourceFile10=new i.a(10,r.a.createElement(r.a.Fragment,null,"This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes. Each level of this Source-File also grants you a Duplicate Sleeve")),o.SourceFile11=new i.a(11,r.a.createElement(r.a.Fragment,null,"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:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 32%",r.a.createElement("br",null),"Level 2: 48%",r.a.createElement("br",null),"Level 3: 56%",r.a.createElement("br",null),r.a.createElement("br",null),"It also reduces the price increase for every aug bought by:",r.a.createElement("br",null),r.a.createElement("br",null),"Level 1: 4%",r.a.createElement("br",null),"Level 2: 6%",r.a.createElement("br",null),"Level 3: 7%")),o.SourceFile12=new i.a(12,r.a.createElement(r.a.Fragment,null,"This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.")),o.SourceFile13=new i.a(13,r.a.createElement(r.a.Fragment,null,"Each level of this Source-File increases the size of Stanek's Gift."))},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(9),r=a(87),i=a(25),o=a(369);function s(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class l{constructor(t=null,e=[]){s(this,"args",[]),s(this,"dataMap",{}),s(this,"filename",""),s(this,"logs",[]),s(this,"logUpd",!1),s(this,"offlineExpGained",0),s(this,"offlineMoneyMade",0),s(this,"offlineRunningTime",.01),s(this,"onlineExpGained",0),s(this,"onlineMoneyMade",0),s(this,"onlineRunningTime",.01),s(this,"pid",-1),s(this,"ramUsage",0),s(this,"server",""),s(this,"threads",1),s(this,"dependencies",[]),null!=t&&(this.filename=t.filename,this.args=e,this.server=t.server,this.ramUsage=t.ramUsage,this.dependencies=t.dependencies)}log(t){this.logs.length>n.a.MaxLogCapacity&&this.logs.shift();let e=t;n.a.TimestampsFormat&&(e="["+Object(o.a)(n.a.TimestampsFormat)+"] "+e),this.logs.push(e),this.logUpd=!0}displayLog(){for(let t=0;tH4CK||3T 8URN3R5**>?>\\~~"),[],!0,!0,!1,!1,!1,!1),[i.a.TianDiHui]:new o(r.a.createElement(r.a.Fragment,null,"Obey Heaven and work righteously."),[],!0,!0,!1,!0,!1,!1),[i.a.CyberSec]:new o(r.a.createElement(r.a.Fragment,null,"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."),[],!0,!0,!1,!1,!1,!1),[i.a.Bladeburners]:new o(r.a.createElement(r.a.Fragment,null,"It's too bad they won't live. But then again, who does?",r.a.createElement("br",null),r.a.createElement("br",null),"Note that for this faction, reputation can only be gained through ",i.a.Bladeburners," actions. Completing ",i.a.Bladeburners,"contracts/operations will increase your reputation."),[],!1,!1,!1,!1,!0,!1),[i.a.ChurchOfTheMachineGod]:new o(r.a.createElement(r.a.Fragment,null," `` ",r.a.createElement("br",null)," -odmmNmds: ",r.a.createElement("br",null)," `hNmo:..-omNh. ",r.a.createElement("br",null)," yMd` `hNh ",r.a.createElement("br",null)," mMd oNm ",r.a.createElement("br",null)," oMNo .mM/ ",r.a.createElement("br",null)," `dMN+ -mM+ ",r.a.createElement("br",null)," -mMNo -mN+ ",r.a.createElement("br",null)," .+- :mMNo/mN/ ",r.a.createElement("br",null),":yNMd. :NMNNN/ ",r.a.createElement("br",null),"-mMMMh. /NMMh` ",r.a.createElement("br",null)," .dMMMd. /NMMMy` ",r.a.createElement("br",null)," `yMMMd. /NNyNMMh` ",r.a.createElement("br",null)," `sMMMd. +Nm: +NMMh. ",r.a.createElement("br",null)," oMMMm- oNm: /NMMd. ",r.a.createElement("br",null)," +NMMmsMm- :mMMd. ",r.a.createElement("br",null)," /NMMMm- -mMMd. ",r.a.createElement("br",null)," /MMMm- -mMMd. ",r.a.createElement("br",null)," `sMNMMm- .mMmo ",r.a.createElement("br",null)," `sMd:hMMm. ./. ",r.a.createElement("br",null)," `yMy` `yNMd` ",r.a.createElement("br",null)," `hMs` oMMy ",r.a.createElement("br",null)," `hMh sMN- ",r.a.createElement("br",null)," /MM- .NMo ",r.a.createElement("br",null)," +MM: :MM+ ",r.a.createElement("br",null)," sNNo-.`.-omNy` ",r.a.createElement("br",null)," -smNNNNmdo- ",r.a.createElement("br",null)," `..` ",r.a.createElement("br",null),r.a.createElement("br",null),"Many cultures predict an end to humanity in the near future, a final Armageddon that will end the world; but we disagree.",r.a.createElement("br",null),r.a.createElement("br",null),"Note that for this faction, reputation can only be gained by charging Stanek's gift."),[],!1,!1,!1,!1,!0,!0)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={0:[0,2e9,1.06,.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)."],1:[1,2e9,1.06,.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)."],2:[2,4e9,1.1,.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."],3:[3,4e9,1.5,.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)."],4:[4,1e9,1.06,.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)."],5:[5,1e9,1.06,.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)."],6:[6,1e9,1.06,.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)."],7:[7,1e9,1.06,.1,"FocusWires","Purchase the FocusWire augmentation for your employees. Each level of this upgrade globally increases the efficiency of your employees by 10% (additive)."],8:[8,1e9,1.07,.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)."],9:[9,5e9,1.07,.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)."]}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(242),r=a(25);function i(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class o{constructor(){i(this,"capacity",0),i(this,"hashes",0),i(this,"upgrades",{});for(const t of Object.keys(n.a))this.upgrades[t]=0}getMult(t){const e=n.a[t],a=this.upgrades[t];return null==e||null==a?(console.error("Could not find Hash Study upgrade"),1):1+e.value*a/100}getStudyMult(){return this.getMult("Improve Studying")}getTrainingMult(){return this.getMult("Improve Gym Training")}getUpgrade(t){const e=n.a[t];return e||(console.error("Invalid Upgrade Name given to HashManager.getUpgrade(): "+t),null)}getUpgradeCost(t){const e=this.getUpgrade(t),a=this.upgrades[t];return null==e||null==a?(console.error("Invalid Upgrade Name given to HashManager.getUpgradeCost(): "+t),1/0):e.getCost(a)}prestige(){for(const t of Object.keys(n.a))this.upgrades[t]=0;this.hashes=0,this.updateCapacity(0)}refundUpgrade(t){const e=n.a[t];--this.upgrades[t];const a=this.upgrades[t];if(null==e||null==a||a<0)return void console.error("Invalid Upgrade Name given to HashManager.upgrade(): "+t);const r=e.getCost(a);this.hashes+=r}storeHashes(t){this.hashes+=t;let e=this.hashes;return this.hashes=Math.min(this.hashes,this.capacity),e-=this.hashes,e}updateCapacity(t){t<0&&(this.capacity=0),this.capacity=Math.max(t,0)}upgrade(t){if(null==n.a[t])return console.error("Invalid Upgrade Name given to HashManager.upgrade(): "+t),!1;const e=this.getUpgradeCost(t);return!(this.hashes{try{return r.a[t].getInfo().offerHackingWork}catch(t){return console.error("Error when trying to filter Hacking Factions for Coding Contract Generation: "+t),!1}});return e===n.c.FactionReputation&&0===a.length&&(e=n.c.CompanyReputation),e===n.c.FactionReputationAll&&0===a.length&&(e=n.c.CompanyReputation),e===n.c.CompanyReputation&&0===Object.keys(i.a.jobs).length&&(e=n.c.Money),e}(t.type);const e=i.a.factions.filter(t=>r.a[t].getInfo().offerHackingWork);switch(t.type){case n.c.FactionReputation:{const a=e.length,n=e[Object(c.a)(0,a-1)];t.name=n;break}case n.c.CompanyReputation:{const e=Object.keys(i.a.jobs);e.length>0?t.name=e[Object(c.a)(0,e.length-1)]:t.type=n.c.Money;break}}return t}function p(){const t=Object(o.c)();let e=Object(c.a)(0,t.length-1),a=t[e];for(let n=0;n<200&&(!(a instanceof l.a)||a.purchasedByPlayer||a.hostname===s.a.WorldDaemon);++n)e=Object(c.a)(0,t.length-1),a=t[e];return a}function g(t,e){let a="contract-"+Object(c.a)(0,1e6);for(let e=0;e<1e3&&!(t.contracts.filter(t=>t.fn===a).length<=0);++e)a="contract-"+Object(c.a)(0,1e6);return e.name&&(a+="-"+e.name.replace(/\s/g,"")),a}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n=new(a(131).a)},function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return o}));var n=a(85),r=a(16);function i(t,e){let a=0,i=!1;for(const r of Object.keys(n.a)){const o=n.a[r];if(o.type==e){a=o.successRate(t),i=!0;break}}return i?Math.random()<=a:(Object(r.a)(`ERR: Unrecognized crime type: ${e} This is probably a bug please contact the developer`),!1)}function o(t){return(t=t.toLowerCase()).includes("shoplift")?n.a.Shoplift:t.includes("rob")&&t.includes("store")?n.a.RobStore:t.includes("mug")?n.a.Mug:t.includes("larceny")?n.a.Larceny:t.includes("drugs")?n.a.DealDrugs:t.includes("bond")&&t.includes("forge")?n.a.BondForgery:(t.includes("traffic")||t.includes("illegal"))&&t.includes("arms")?n.a.TraffickArms:t.includes("homicide")?n.a.Homicide:t.includes("grand")&&t.includes("auto")?n.a.GrandTheftAuto:t.includes("kidnap")?n.a.Kidnap:t.includes("assassin")?n.a.Assassination:t.includes("heist")?n.a.Heist:null}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(53),r=a(38),i=a(36),o=a(24),s=a(25),l=a(1033);function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class f{constructor(t={}){c(this,"minEne",0),c(this,"maxEne",100),c(this,"minHap",0),c(this,"maxHap",100),c(this,"maxMor",100),c(this,"employees",[]),c(this,"employeeProd",{[n.a.Operations]:0,[n.a.Engineer]:0,[n.a.Business]:0,[n.a.Management]:0,[n.a.RandD]:0,total:0}),this.loc=t.loc?t.loc:"",this.size=t.size?t.size:1}atCapacity(){return this.employees.length>=this.size}process(t=1,e,a){if(a.hasResearch("HRBuddy-Recruitment")&&!this.atCapacity()){const t=this.hireRandomEmployee();a.hasResearch("HRBuddy-Training")&&void 0!==t&&(t.pos=n.a.Training)}this.maxEne=100,this.maxHap=100,this.maxMor=100,a.hasResearch("Go-Juice")&&(this.maxEne+=10),a.hasResearch("JoyWire")&&(this.maxHap+=10),a.hasResearch("Sti.mu")&&(this.maxMor+=10);let r=1;e.funds<0&&a.lastCycleRevenue<0?r=Math.pow(.99,t):e.funds>0&&a.lastCycleRevenue>0&&(r=Math.pow(1.01,t));const i=a.hasResearch("AutoBrew"),o=a.hasResearch("AutoPartyManager");let s=0;for(let e=0;ea.pos===t?e+1:e,0);for(const r of this.employees){if(a==e)return!0;r.pos===n.a.Unassigned&&a<=e?(r.pos=t,a++):r.pos===t&&a>=e&&(r.pos=n.a.Unassigned,a--)}return a===e}toJSON(){return Object(s.b)("OfficeSpace",this)}static fromJSON(t){return Object(s.a)(f,t.data)}}s.c.constructors.OfficeSpace=f},,function(t,e,a){"use strict";function n(t,e){for(const a of Object.keys(e)){const n=e[a];void 0!==n&&("function"==typeof n?n(t,a):void 0!==n.func?n.func(t,e,a):(typeof t[a]!=typeof n.default&&(t[a]=n.default),"number"==typeof t[a]&&void 0!==n.min&&t[a]n.max&&(t[a]=n.max)))}}function r(t,e,a){return(n,r)=>{"number"==typeof n[r]?(n[r]a&&(n[r]=a)):n[r]=t}}a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return r}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(25);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class i{constructor(){r(this,"bladeburner",0),r(this,"casino",0),r(this,"class",0),r(this,"codingcontract",0),r(this,"corporation",0),r(this,"crime",0),r(this,"gang",0),r(this,"hacking",0),r(this,"hacknet",0),r(this,"hacknet_expenses",0),r(this,"hospitalization",0),r(this,"infiltration",0),r(this,"sleeves",0),r(this,"stock",0),r(this,"total",0),r(this,"work",0),r(this,"servers",0),r(this,"other",0),r(this,"augmentations",0)}record(t,e){const a=e.toLowerCase();"number"==typeof this[a]?(this[a]+=t,this.total+=t):console.warn("MoneySourceTracker.record() called with invalid source: "+e)}reset(){for(const t in this)"number"==typeof this[t]&&(this[t]=0)}toJSON(){return Object(n.b)("MoneySourceTracker",this)}static fromJSON(t){return Object(n.a)(i,t.data)}}n.c.constructors.MoneySourceTracker=i},,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a(1456),i=a(1),o=a(23),s=a(31),l=a(296),c=a(4);function f({min:t,max:e,current:a,remaining:s,progress:l,color:f}){const u=n.createElement(i.a,{sx:{textAlign:"right"}},n.createElement("strong",null,"Progress:")," ",c.a.formatExp(a)," / ",c.a.formatExp(e-t),n.createElement("br",null),n.createElement("strong",null,"Remaining:")," ",c.a.formatExp(s)," (",l.toFixed(2),"%)");return n.createElement(o.a,{title:u},n.createElement(r.a,{variant:"determinate",value:l,sx:{backgroundColor:"#111111","& .MuiLinearProgress-bar1Determinate":{backgroundColor:f}}}))}function u({progress:t,color:e}){const a=Object(l.b)();return n.createElement(s.a,{component:"th",scope:"row",colSpan:2,classes:{root:a.cellNone},style:{paddingBottom:"2px",position:"relative",top:"-3px"}},n.createElement(f,{min:t.baseExperience,max:t.nextExperience,current:t.currentExperience,remaining:t.remainingExperience,progress:t.progress,color:e}))}},,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={lineHeight:1.5,fontFamily:"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman"}},,,,,function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"a",(function(){return i}));var n=a(8);function r(t){return t.money<0?0:Math.min(.1*t.money,(t.max_hp-t.hp)*n.a.HospitalCostPerHp)}function i(t,e){const a=t.hp;t.hp-=e;const n=r(t);return t.hp=a,n}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h})),a.d(e,"b",(function(){return d}));var n=a(0),r=a.n(n),i=a(131),o=a(41),s=a(1),l=a(10),c=a(128),f=a(81),u=a(79),m=a(28);const h=new i.a;function d(){var t,e,a;const[i,l]=Object(n.useState)(null);if(Object(n.useEffect)(()=>h.subscribe(t=>{l(t)}),[]),null===i)return r.a.createElement(r.a.Fragment,null);const c={text:g,select:y};let f=p;null!=i&&null!==(t=i.options)&&void 0!==t&&t.type&&["text","select"].includes(null==i||null===(e=i.options)||void 0===e?void 0:e.type)&&(f=c[null==i||null===(a=i.options)||void 0===a?void 0:a.type]);return r.a.createElement(o.a,{open:!0,onClose:function(){var t,e;null!==i&&(["text","select"].includes(null!==(t=null==i||null===(e=i.options)||void 0===e?void 0:e.type)&&void 0!==t?t:"")?i.resolve(""):i.resolve(!1),l(null))}},r.a.createElement("pre",null,r.a.createElement(s.a,null,i.txt)),r.a.createElement(f,{prompt:i,resolve:t=>{i.resolve(t),l(null)}}))}function p({resolve:t}){return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",paddingTop:"10px"}},r.a.createElement(l.a,{style:{marginRight:"auto"},onClick:()=>t(!0)},"Yes"),r.a.createElement(l.a,{onClick:()=>t(!1)},"No")))}function g({resolve:t}){const[e,a]=Object(n.useState)(""),i=()=>t(e);return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:"flex",alignItems:"center",paddingTop:"10px"}},r.a.createElement(f.a,{autoFocus:!0,value:e,onInput:t=>{a(t.target.value)},onKeyDown:t=>{t.stopPropagation(),t.key===m.a.ENTER&&(t.preventDefault(),i())},style:{flex:"1 0 auto"},InputProps:{endAdornment:r.a.createElement(l.a,{onClick:i},"Confirm")}})))}function y({prompt:t,resolve:e}){var a;const[i,o]=Object(n.useState)("");return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:"flex",alignItems:"center",paddingTop:"10px"}},r.a.createElement(c.a,{onChange:t=>{o(t.target.value)},value:i,style:{flex:"1 0 auto"}},(t=>{const e=[];for(const a of t)e.push(r.a.createElement(u.a,{key:a,value:a},a));return e})((null==t||null===(a=t.options)||void 0===a?void 0:a.choices)||[])),r.a.createElement(l.a,{onClick:()=>e(i),disabled:""===i},"Confirm")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(53),r=a(175),i=a(1034),o=a(528),s=a(25),l=a(36);function c(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class f{constructor(t={}){c(this,"name",""),c(this,"dmd",0),c(this,"cmp",0),c(this,"mku",0),c(this,"pCost",0),c(this,"sCost",0),c(this,"fin",!1),c(this,"prog",0),c(this,"createCity",""),c(this,"designCost",0),c(this,"advCost",0),c(this,"rat",0),c(this,"qlt",0),c(this,"per",0),c(this,"dur",0),c(this,"rel",0),c(this,"aes",0),c(this,"fea",0),c(this,"data",Object(o.a)([0,0,0])),c(this,"loc",""),c(this,"siz",0),c(this,"reqMats",{}),c(this,"prdman",Object(o.a)([!1,0])),c(this,"sllman",Object(o.a)([!1,0])),c(this,"marketTa1",!1),c(this,"marketTa2",!1),c(this,"marketTa2Price",Object(o.a)(0)),c(this,"maxsll",0),this.name=t.name?t.name:"",this.dmd=t.demand?t.demand:0,this.cmp=t.competition?t.competition:0,this.mku=t.markup?t.markup:0,this.createCity=t.createCity?t.createCity:"",this.designCost=t.designCost?t.designCost:0,this.advCost=t.advCost?t.advCost:0,this.qlt=t.quality?t.quality:0,this.per=t.performance?t.performance:0,this.dur=t.durability?t.durability:0,this.rel=t.reliability?t.reliability:0,this.aes=t.aesthetics?t.aesthetics:0,this.fea=t.features?t.features:0,this.loc=t.loc?t.loc:"",this.siz=t.size?t.size:0,this.reqMats=t.req?t.req:{}}createProduct(t=1,e=1){this.fin||(this.prog+=.01*t*e)}finishProduct(t,e){this.fin=!0;const a=this.prog/100,i=t[n.a.Engineer]/t.total,o=t[n.a.Management]/t.total,s=t[n.a.RandD]/t.total,c=t[n.a.Operations]/t.total,f=t[n.a.Business]/t.total,u=a*(1.2*i+.9*o+1.3*s+1.5*c+f)*(1+Math.pow(this.designCost,.1)/100)*(1+Math.pow(e.sciResearch.qty,e.sciFac)/800);this.qlt=u*(.1*t[n.a.Engineer]+.05*t[n.a.Management]+.05*t[n.a.RandD]+.02*t[n.a.Operations]+.02*t[n.a.Business]),this.per=u*(.15*t[n.a.Engineer]+.02*t[n.a.Management]+.02*t[n.a.RandD]+.02*t[n.a.Operations]+.02*t[n.a.Business]),this.dur=u*(.05*t[n.a.Engineer]+.02*t[n.a.Management]+.08*t[n.a.RandD]+.05*t[n.a.Operations]+.05*t[n.a.Business]),this.rel=u*(.02*t[n.a.Engineer]+.08*t[n.a.Management]+.02*t[n.a.RandD]+.05*t[n.a.Operations]+.08*t[n.a.Business]),this.aes=u*(0*t[n.a.Engineer]+.08*t[n.a.Management]+.05*t[n.a.RandD]+.02*t[n.a.Operations]+.1*t[n.a.Business]),this.fea=u*(.08*t[n.a.Engineer]+.05*t[n.a.Management]+.02*t[n.a.RandD]+.05*t[n.a.Operations]+.05*t[n.a.Business]),this.calculateRating(e);const m=1+Math.pow(this.advCost,.1)/100,h=Math.max(f+o,1/t.total);this.mku=100/(m*Math.pow(this.qlt+.001,.65)*h),0!==this.mku&&isFinite(this.mku)||(this.mku=1),this.dmd=0===e.awareness?20:Math.min(100,m*(e.popularity/e.awareness*100)),this.cmp=Object(l.a)(0,70);for(const t of Object.keys(e.reqMats))if(e.reqMats.hasOwnProperty(t)){const a=e.reqMats[t];if(void 0===a)continue;this.reqMats[t]=a}this.siz=0;for(const t of Object.keys(e.reqMats)){const a=e.reqMats[t];void 0!==a&&(this.siz+=r.a[t]*a)}}calculateRating(t){const e=i.a[t.type];null!=e?(this.rat=0,this.rat+=e.Quality?this.qlt*e.Quality:0,this.rat+=e.Performance?this.per*e.Performance:0,this.rat+=e.Durability?this.dur*e.Durability:0,this.rat+=e.Reliability?this.rel*e.Reliability:0,this.rat+=e.Aesthetics?this.aes*e.Aesthetics:0,this.rat+=e.Features?this.fea*e.Features:0):console.error("Could not find product rating weights for: "+t)}toJSON(){return Object(s.b)("Product",this)}static fromJSON(t){return Object(s.a)(f,t.data)}}s.c.constructors.Product=f},function(t,e,a){"use strict";function n(t,e){return!!Object.keys(e.reqMats).includes(t)||(!!e.prodMats.includes(t)||!!["Hardware","Robots","AICores","RealEstate","AI Cores","Real Estate"].includes(t))}a.d(e,"a",(function(){return n}))},,function(t,e,a){"use strict";a.d(e,"b",(function(){return y})),a.d(e,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(173),o=a(535),s=a(1),l=a(21),c=a(65),f=a(10),u=a(1748),m=a(1749),h=a(1750),d=a(30),p=a(9),g=a(64);const y=[];function b(){const t=d.b.Player(),e=d.b.Router(),a=Object(n.useState)(!1)[1];function b(){a(t=>!t)}const E=[...Object.values(g.a)].filter(e=>{const a=e.create;return null!==a&&("b1t_flum3.exe"!==e.name||a.req(t))}).sort((e,a)=>{var n,r,i,o;return t.hasProgram(e.name)?1:t.hasProgram(a.name)?-1:(null!==(n=null===(r=e.create)||void 0===r?void 0:r.level)&&void 0!==n?n:0)-(null!==(i=null===(o=a.create)||void 0===o?void 0:o.level)&&void 0!==i?i:0)});Object(n.useEffect)(()=>{E.forEach(t=>{y.includes(t.name)||y.push(t.name)})},[]),Object(n.useEffect)(()=>{const t=setInterval(b,200);return()=>clearInterval(t)},[]);const v=e=>Math.ceil(Math.max(e-(t.hacking+t.intelligence/2),0));return r.a.createElement(o.a,{disableGutters:!0,maxWidth:"lg",sx:{mx:0,mb:10}},r.a.createElement(s.a,{variant:"h4"},"Create program"),r.a.createElement(s.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."),r.a.createElement(l.a,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",my:1}},E.map(a=>{const n=a.create;if(null===n)return r.a.createElement(r.a.Fragment,null);const o=(e=>{const a=Object(i.find)(t.getHomeComputer().programs,t=>t.startsWith(e)&&t.endsWith("%-INC"));if(!a)return-1;const n=a.split("-");if(3!=n.length)return-1;const r=Number(n[1].slice(0,-1));return isNaN(r)||r<0||r>=100?-1:r})(a.name);return r.a.createElement(l.a,{component:c.a,sx:{p:1,opacity:t.hasProgram(a.name)?.75:1},key:a.name},r.a.createElement(s.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},t.hasProgram(a.name)&&r.a.createElement(u.a,{sx:{mr:1}})||n.req(t)&&r.a.createElement(m.a,{sx:{mr:1}})||r.a.createElement(h.a,{sx:{mr:1}}),a.name),!t.hasProgram(a.name)&&n.req(t)&&r.a.createElement(f.a,{sx:{my:1,width:"100%"},onClick:r=>{r.isTrusted&&(t.startCreateProgramWork(a.name,n.time,n.level),t.startFocusing(),e.toWork())}},"Create program"),t.hasProgram(a.name)||0===v(n.level)||r.a.createElement(s.a,{color:p.a.theme.hack},r.a.createElement("b",null,"Unlocks in:")," ",v(n.level)," hacking levels"),-1!==o&&r.a.createElement(s.a,{color:p.a.theme.infolight},r.a.createElement("b",null,"Current completion:")," ",o,"%"),r.a.createElement(s.a,null,n.tooltip))})))}},function(t,e,a){"use strict";a.d(e,"b",(function(){return g})),a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(535),o=a(1),s=a(65),l=a(145),c=a(45),f=a(21),u=a(10),m=a(43),h=a(105),d=a(29),p=a(5);const g=[];function y(t){const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(a,200);return()=>clearInterval(t)},[]),Object(n.useEffect)(()=>{t.player.factionInvitations.forEach(t=>{g.includes(t)||g.push(t)})},[]);const y=Object.values(p.a).map(t=>t),b=t.player.factions.slice(0);return b.sort((t,e)=>y.indexOf(t)-y.indexOf(e)),r.a.createElement(i.a,{disableGutters:!0,maxWidth:"md",sx:{mx:0,mb:10}},r.a.createElement(o.a,{variant:"h4"},"Factions"),r.a.createElement(o.a,{mb:4},"Throughout the game you may receive invitations from factions. There are many different factions, and each faction has different criteria for determining its potential members. Joining a faction and furthering its cause is crucial to progressing in the game and unlocking endgame content."),r.a.createElement(o.a,{variant:"h5",color:"primary",mt:2,mb:1},"Factions you have joined:"),b.length>0&&r.a.createElement(s.a,{sx:{my:1,p:1,pb:0,display:"inline-block"}},r.a.createElement(m.a,{padding:"none",style:{width:"fit-content"}},r.a.createElement(l.a,null,b.map(e=>r.a.createElement(c.a,{key:e},r.a.createElement(m.b,null,r.a.createElement(o.a,{noWrap:!0,mb:1},e)),r.a.createElement(m.b,{align:"right"},r.a.createElement(f.a,{ml:1,mb:1},r.a.createElement(u.a,{onClick:()=>function(e){t.router.toFaction(e)}(d.a[e])},"Details"))),r.a.createElement(m.b,{align:"right"},r.a.createElement(f.a,{ml:1,mb:1},r.a.createElement(u.a,{sx:{width:"100%"},onClick:()=>function(e){t.router.toFaction(e,!0)}(d.a[e])},"Augmentations Left: ",((t,e)=>Object(h.a)(e,t).filter(t=>!e.hasAugmentation(t)).length)(d.a[e],t.player)))))))))||r.a.createElement(o.a,null,"You haven't joined any factions."),r.a.createElement(o.a,{variant:"h5",color:"primary",mt:4,mb:1},"Outstanding Faction Invitations"),r.a.createElement(o.a,{mb:1},"Factions you have been invited to. You can accept these faction invitations at any time:"),t.player.factionInvitations.length>0&&r.a.createElement(s.a,{sx:{my:1,mb:4,p:1,pb:0,display:"inline-block"}},r.a.createElement(m.a,{padding:"none"},r.a.createElement(l.a,null,t.player.factionInvitations.map(t=>r.a.createElement(c.a,{key:t},r.a.createElement(m.b,null,r.a.createElement(o.a,{noWrap:!0,mb:1},t)),r.a.createElement(m.b,{align:"right"},r.a.createElement(f.a,{ml:1,mb:1},r.a.createElement(u.a,{onClick:a=>function(t,a){t.isTrusted&&(Object(h.e)(d.a[a]),e(t=>!t))}(a,t)},"Join!"))))))))||r.a.createElement(o.a,null,"You have no outstanding faction invites."))}},,,function(t,e,a){"use strict";a.d(e,"b",(function(){return w})),a.d(e,"a",(function(){return S})),a.d(e,"c",(function(){return C}));var n=a(0),r=a.n(n),i=a(21),o=a(1),s=a(120),l=a(350),c=a(23),f=a(10),u=a(65),m=a(81),h=a(9),d=a(341),p=a(108),g=a(521),y=a(607),b=a(609),E=a(632),v=a.n(E),k=a(1372),_=a.n(k);let w=!1;function S(){w=!0}function C({router:t,softReset:e,errorData:a,resetError:E}){var k,S;return h.a.AutosaveInterval=0,Object(n.useEffect)(()=>{Object(d.b)().then(t=>{const e=`RECOVERY_BITBURNER_${Math.round(Date.now()/1e3)}.json`;Object(p.a)(e,t)})},[]),r.a.createElement(i.a,{sx:{padding:"8px 16px",minHeight:"100vh",maxWidth:"1200px",boxSizing:"border-box"}},r.a.createElement(o.a,{variant:"h3"},"RECOVERY MODE ACTIVATED"),r.a.createElement(o.a,null,"There was an error with your save file and the game went into recovery mode. In this mode saving is disabled and the game will automatically export your save file (to prevent corruption)."),r.a.createElement(o.a,null,"At this point it is recommended to alert a developer."),r.a.createElement(o.a,null,r.a.createElement(s.a,{href:null!==(k=null==a?void 0:a.issueUrl)&&void 0!==k?k:g.b,target:"_blank"},"File an issue on github")),r.a.createElement(o.a,null,r.a.createElement(s.a,{href:"https://www.reddit.com/r/Bitburner/",target:"_blank"},"Make a reddit post")),r.a.createElement(o.a,null,r.a.createElement(s.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},"Post in the #bug-report channel on Discord.")),r.a.createElement(o.a,null,"Please include your save file."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"You can disable recovery mode now. But chances are the game will not work correctly."),r.a.createElement(l.a,{sx:{my:2}},r.a.createElement(c.a,{title:"Disables the recovery mode & attempt to head back to the terminal page. This may or may not work. Ensure you have saved the recovery file."},r.a.createElement(f.a,{onClick:function(){E&&E(),w=!1,t.toTerminal()},startIcon:r.a.createElement(v.a,null)},"Disable Recovery Mode")),r.a.createElement(b.a,{color:"warning",onTriggered:e}),r.a.createElement(y.a,{color:"error"})),a&&r.a.createElement(u.a,{sx:{px:2,pt:1,pb:2,mt:2}},r.a.createElement(o.a,{variant:"h5"},a.title),r.a.createElement(i.a,{sx:{my:2}},r.a.createElement(m.a,{label:"Bug Report Text",value:a.body,variant:"outlined",color:"secondary",multiline:!0,fullWidth:!0,rows:12,sx:{"& .MuiOutlinedInput-root":{color:h.a.theme.secondary}}})),r.a.createElement(c.a,{title:"Submitting an issue to GitHub really help us improve the game!"},r.a.createElement(f.a,{component:s.a,startIcon:r.a.createElement(_.a,null),color:"info",sx:{px:2},href:null!==(S=a.issueUrl)&&void 0!==S?S:g.b,target:"_blank"},"Submit Issue to GitHub"))))}},,,function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return o}));var n=a(1003);let r=1;function i(t){return r+=t,()=>r-=t}function o(){return Object(n.a)(r)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(1004),r=a(298),i=a(371),o=a(240),s=a(38),l=a(6),c=a(578),f=a(63),u=a(16),m=a(25),h=a(147);function d(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class p{constructor(t={}){d(this,"name","The Corporation"),d(this,"divisions",[]),d(this,"funds",15e10),d(this,"revenue",0),d(this,"expenses",0),d(this,"fundingRound",0),d(this,"public",!1),d(this,"totalShares",s.a.INITIALSHARES),d(this,"numShares",s.a.INITIALSHARES),d(this,"shareSalesUntilPriceUpdate",s.a.SHARESPERPRICEUPDATE),d(this,"shareSaleCooldown",0),d(this,"issueNewSharesCooldown",0),d(this,"dividendPercentage",0),d(this,"dividendTaxPercentage",50),d(this,"issuedShares",0),d(this,"sharePrice",0),d(this,"storedCycles",0),d(this,"state",new n.a),this.name=t.name?t.name:"The Corporation";const e=Object.keys(r.a).length,a=Object.keys(i.a).length;this.unlockUpgrades=Array(e).fill(0),this.upgrades=Array(a).fill(0),this.upgradeMultipliers=Array(a).fill(1)}addFunds(t){isFinite(t)?this.funds=this.funds+t:console.error("Trying to add invalid amount of funds. Report to a developper.")}getState(){return this.state.getState()}storeCycles(t=1){this.storedCycles+=t}process(t){if(this.storedCycles>=s.a.CyclesPerIndustryStateCycle){const e=this.getState(),a=1,n=a*s.a.CyclesPerIndustryStateCycle;if(this.storedCycles-=n,this.divisions.forEach(t=>{t.process(a,e,this)}),this.shareSaleCooldown>0&&(this.shareSaleCooldown-=n),this.issueNewSharesCooldown>0&&(this.issueNewSharesCooldown-=n),"START"===e){this.revenue=0,this.expenses=0,this.divisions.forEach(t=>{t.lastCycleRevenue!==-1/0&&t.lastCycleRevenue!==1/0&&t.lastCycleExpenses!==-1/0&&t.lastCycleExpenses!==1/0&&(this.revenue=this.revenue+t.lastCycleRevenue,this.expenses=this.expenses+t.lastCycleExpenses)});const e=(this.revenue-this.expenses)*(a*s.a.SecsPerMarketCycle);if((isNaN(this.funds)||this.funds===1/0||this.funds===-1/0)&&(Object(u.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)"),this.funds=15e10),this.dividendPercentage>0&&e>0)if(isNaN(this.dividendPercentage)||this.dividendPercentage<0||this.dividendPercentage>100*s.a.DividendMaxPercentage)console.error("Invalid Corporation dividend percentage: "+this.dividendPercentage);else{const a=e-this.dividendPercentage/100*e;t.gainMoney(this.getDividends(),"corporation"),this.addFunds(a)}else this.addFunds(e);this.updateSharePrice()}this.state.nextState()}}getDividends(){const t=(this.revenue-this.expenses)*s.a.SecsPerMarketCycle,e=this.dividendPercentage/100*t/this.totalShares,a=this.numShares*e;let n=-.15;return 1===this.unlockUpgrades[5]&&(n+=.05),1===this.unlockUpgrades[6]&&(n+=.1),Math.pow(a,l.a.CorporationSoftCap+n)}determineValuation(){let t,e=this.revenue-this.expenses;return this.public?(this.dividendPercentage>0&&(e*=(100-this.dividendPercentage)/100),t=this.funds+85e3*e,t*=Math.pow(1.1,this.divisions.length),t=Math.max(t,0)):(t=1e10+Math.max(this.funds,0)/3,e>0?(t+=315e3*e,t*=Math.pow(1.1,this.divisions.length)):t=1e10*Math.pow(1.1,this.divisions.length),t-=t%1e6),t*l.a.CorporationValuation}getTargetSharePrice(){return this.determineValuation()/(2*(this.totalShares-this.numShares)+1)}updateSharePrice(){const t=this.getTargetSharePrice();this.sharePrice<=t?this.sharePrice*=1+.01*Math.random():this.sharePrice*=1-.01*Math.random(),this.sharePrice<=.01&&(this.sharePrice=.01)}immediatelyUpdateSharePrice(){this.sharePrice=this.getTargetSharePrice()}calculateShareSale(t){let e=t,a=this.shareSalesUntilPriceUpdate,n=this.sharePrice,r=0,i=0;const o=Math.ceil(t/s.a.SHARESPERPRICEUPDATE);if(isNaN(o)||o>1e7)return console.error("Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be "+o),[0,0,0];for(let t=0;t3600?Math.floor(e/3600)+" hour(s)":e>60?Math.floor(e/60)+" minute(s)":Math.floor(e)+" second(s)"}unlock(t){const e=t[0],a=t[1];for(;this.unlockUpgrades.length<=e;)this.unlockUpgrades.push(0);this.fundsthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=t,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-t/100,this.popEst0?1:-1),this.pop+=a,e.changeEstEqually&&(this.popEst+=a,this.popEst<0&&(this.popEst=0)),a}changeChaosByCount(t){if(isNaN(t))throw new Error("NaN passed into City.changeChaosByCount()");0!==t&&(this.chaos+=t,this.chaos<0&&(this.chaos=0))}toJSON(){return Object(i.b)("City",this)}static fromJSON(t){return Object(i.a)(l,t.data)}}i.c.constructors.City=l},function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return l})),a.d(e,"d",(function(){return c})),a.d(e,"e",(function(){return f})),a.d(e,"f",(function(){return u}));var n=a(29),r=a(511),i=a(82);function o(){return 2===this.bitNodeN||!(i.a[2]<=0)&&this.karma<=-54e3}function s(){const t=this.gang;if(null===t)throw new Error("Cannot get gang faction because player is not in a gang.");const e=n.a[t.facName];if(null==e)throw new Error("Gang has invalid faction name: "+t.facName);return e}function l(){if(!this.inGang())return"";const t=this.gang;if(null===t)throw new Error("Cannot get gang faction because player is not in a gang.");return t.facName}function c(t){if(!this.inGang())return!1;const e=this.gang;if(null===e)throw new Error("Cannot get gang faction because player is not in a gang.");return e.facName===t}function f(){return null!=this.gang&&null!=this.gang&&this.gang instanceof r.a}function u(t,e){this.gang=new r.a(t,e);const a=n.a[t];if(null==a)throw new Error("Invalid faction name when creating gang: "+t);a.playerReputation=0}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));class n{constructor(t,e=[],a=""){this.name=t,this.locations=e,this.asciiArt=a}addLocation(t){this.locations.push(t)}}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a(1),i=a(10),o=a(65),s=a(21);function l(t){return n.createElement(s.a,null,n.createElement(o.a,{sx:{my:1,p:1}},n.createElement(i.a,{onClick:t.onClick},t.buttonText),n.createElement(r.a,null,t.infoText)))}},function(t,e,a){"use strict";a.d(e,"b",(function(){return l})),a.d(e,"a",(function(){return f}));var n=a(0),r=a(1),i=a(23),o=a(10),s=a(81);let l;function c(t){let e="",a="";return t.tickerDisplayMode===l.Portfolio?(e="Switch to 'All Stocks' Mode",a="Displays all stocks on the WSE"):(e="Switch to 'Portfolio' Mode",a="Displays only the stocks for which you have shares or orders"),n.createElement(i.a,{title:n.createElement(r.a,null,a)},n.createElement(o.a,{onClick:t.changeDisplayMode},e))}function f(t){return n.createElement(n.Fragment,null,n.createElement(c,t),n.createElement("br",null),n.createElement(s.a,{sx:{width:"100%"},onChange:t.changeWatchlistFilter,placeholder:"Filter Stocks by symbol (comma-separated list)",type:"text"}))}!function(t){t[t.AllStocks=0]="AllStocks",t[t.Portfolio=1]="Portfolio"}(l||(l={}))},function(t,e,a){"use strict";a.d(e,"f",(function(){return c})),a.d(e,"b",(function(){return f})),a.d(e,"c",(function(){return u})),a.d(e,"e",(function(){return m})),a.d(e,"d",(function(){return h})),a.d(e,"a",(function(){return d}));var n=a(8),r=a(6),i=a(47),o=a(91),s=a(26),l=a(102);function c(){return!!Object(s.d)(l.a.DarkWeb)}function f(){const t=Object(s.d)(this.currentServer);if(null===t)throw new Error("somehow connected to a server that does not exist. "+this.currentServer);return t}function u(){const t=Object(s.d)("home");if(t instanceof i.a)return t;throw new Error("home computer was not a normal server")}function m(){const t=this.getHomeComputer().maxRam,e=Math.log2(t),a=Math.pow(1.58,e);return t*n.a.BaseCostFor1GBOfRamHome*a*r.a.HomeComputerRamCost}function h(){return 1e9*Math.pow(7.5,this.getHomeComputer().cpuCores)}function d(){const t="hacknet-node-"+this.hacknetNodes.length,e=new o.a({adminRights:!0,hostname:t,ip:Object(s.e)()});this.hacknetNodes.push(e.hostname),Object(s.a)(e);return this.getHomeComputer().serversOnNetwork.push(e.hostname),e.serversOnNetwork.push(l.a.Home),e}},,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(2),r=a(36),i=a(301),o=a(25),s=a(61);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class c{constructor(t=null){l(this,"name",""),l(this,"level",1),l(this,"maxLevel",1),l(this,"autoLevel",!0),l(this,"baseDifficulty",100),l(this,"difficultyFac",1.01),l(this,"rewardFac",1.02),l(this,"successes",0),l(this,"failures",0),l(this,"rankGain",0),l(this,"rankLoss",0),l(this,"hpLoss",0),l(this,"hpLost",0),l(this,"isStealth",!1),l(this,"isKill",!1),l(this,"count",Object(r.a)(1e3,25e3)),l(this,"weights",{hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7}),l(this,"decays",{hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9}),l(this,"teamCount",0),t&&t.name&&(this.name=t.name),t&&t.baseDifficulty&&(this.baseDifficulty=Object(i.a)(t.baseDifficulty,10)),t&&t.difficultyFac&&(this.difficultyFac=t.difficultyFac),t&&t.rewardFac&&(this.rewardFac=t.rewardFac),t&&t.rankGain&&(this.rankGain=t.rankGain),t&&t.rankLoss&&(this.rankLoss=t.rankLoss),t&&t.hpLoss&&(this.hpLoss=t.hpLoss),t&&t.isStealth&&(this.isStealth=t.isStealth),t&&t.isKill&&(this.isKill=t.isKill),t&&t.count&&(this.count=t.count),t&&t.weights&&(this.weights=t.weights),t&&t.decays&&(this.decays=t.decays);let e=0;for(const t of Object.keys(this.weights))this.weights.hasOwnProperty(t)&&(e+=this.weights[t]);if(e-1>=10*Number.EPSILON)throw new Error("Invalid weights when constructing Action "+this.name+". The weights should sum up to 1. They sum up to :1");for(const t of Object.keys(this.decays))if(this.decays.hasOwnProperty(t)&&this.decays[t]>1)throw new Error(`Invalid decays when constructing Action ${this.name}. Decay value cannot be greater than 1`)}getDifficulty(){const t=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(t))throw new Error("Calculated NaN in Action.getDifficulty()");return t}attempt(t){return Math.random()s.a.ChaosThreshold){const t=e.chaos-s.a.ChaosThreshold+1;return Math.pow(t,.5)}return 1}getEstSuccessChance(t){function e(t){return Math.max(0,Math.min(t,1))}const a=this.getSuccessChance(t,{est:!0}),n=this.getSuccessChance(t),r=Math.abs(n-a);let i=n-r,o=n+r;const s=t.getCurrentCity(),l=s.pop/s.popEst;return l<1?i*=l:o*=l,[e(i),e(o)]}getSuccessChance(t,e={est:!1}){if(null==t)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");let a=this.getDifficulty(),r=0;for(const e of Object.keys(this.weights))if(this.weights.hasOwnProperty(e)){const a=n.a.queryStatFromString(e),i="eff"+e.charAt(0).toUpperCase()+e.slice(1);let o=t.skillMultipliers[i];null==o&&(console.error("Failed to find Bladeburner Skill multiplier for: "+e),o=1),r+=this.weights[e]*Math.pow(o*a,this.decays[e])}if(r*=n.a.getIntelligenceBonus(.75),r*=t.calculateStaminaPenalty(),r*=this.getTeamSuccessBonus(t),r*=this.getChaosCompetencePenalty(t,e),a*=this.getChaosDifficultyBonus(t),"Raid"==this.name&&t.getCurrentCity().comms<=0)return 0;if(r*=t.skillMultipliers.successChanceAll,r*=this.getActionTypeSkillSuccessBonus(t),this.isStealth&&(r*=t.skillMultipliers.successChanceStealth),this.isKill&&(r*=t.skillMultipliers.successChanceKill),r*=n.a.bladeburner_success_chance_mult,isNaN(r))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,r/a)}getSuccessesNeededForNextLevel(t){return Math.ceil(.5*this.maxLevel*(2*t+(this.maxLevel-1)))}setMaxLevel(t){this.successes>=this.getSuccessesNeededForNextLevel(t)&&++this.maxLevel}toJSON(){return Object(o.b)("Action",this)}static fromJSON(t){return Object(o.a)(c,t.data)}}o.c.constructors.Action=c},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(17),o=a(1),s=a(23),l=a(113),c=a(137);const f=Object(l.a)(t=>Object(c.a)({travel:{color:t.colors.white,lineHeight:"1em",whiteSpace:"pre",cursor:"pointer"}}));function u(t){const e=f();return t.city!==t.currentCity?r.a.createElement(s.a,{title:r.a.createElement(o.a,null,t.city)},r.a.createElement("span",{onClick:()=>t.onTravel(t.city),className:e.travel},t.city[0])):r.a.createElement("span",null,t.city[0])}function m(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ,_ . ._. _. ."),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / ,/'-/~ '\\ ,' _ , '",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Volhaven}),",'|~ ._/-, /~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},".-~ '| '',\\~|\\ _\\~ ,_ , ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Chongqing})," /,"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," '\\ ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Sector12})," /'~ |_/~\\\\,-,~ \\ \" ,_,/ |"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | / ._-~'\\_ _~| \\ ) ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.NewTokyo})),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ __-\\ '/ ~ |\\ \\_ / ~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ~-_' _; '\\ '-, \\,' /\\/ |"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," '\\_,~'\\_ \\_ _, /' ' |, /|'"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / \\_ ~ | / \\ ~'; -,_."),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ~\\ | | , '-_, ,; ~ ~\\"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\, ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Aevum})," / \\ / /| ,-, , -,"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ,/ | |' |/ ,- ~ \\ '."),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ,| ,/ \\ ,/ \\ ",r.a.createElement(u,{onTravel:t.onTravel,currentCity:t.currentCity,city:i.a.Ishima})," |"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / | ~ -~~-, / _"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ,-' ~ /"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / ,' ~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ',| ~"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ~'"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(24),o=a(1124),s=a(1125);function l(t){const e=t.action.getEstSuccessChance(t.bladeburner);let a=r.a.createElement(r.a.Fragment,null);return a=e[0]===e[1]?r.a.createElement(r.a.Fragment,null,Object(i.d)(100*e[0],1),"%"):r.a.createElement(r.a.Fragment,null,Object(i.d)(100*e[0],1),"% ~ ",Object(i.d)(100*e[1],1),"%"),r.a.createElement(r.a.Fragment,null,"Estimated success chance: ",a," ",t.action.isStealth?r.a.createElement(o.a,null):r.a.createElement(r.a.Fragment,null),t.action.isKill?r.a.createElement(s.a,null):r.a.createElement(r.a.Fragment,null))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(41);function o(t){return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},t.children)}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n);function i(t,e,a){return t.substring(0,e)+a+t.substring(e+1)}function o(t){const[e,a]=Object(n.useState)(t.content);return Object(n.useEffect)(()=>{let t=5;const n=[],r=setInterval(()=>{if(t--,t>0)return;t=5*Math.random();const r=Math.random()*e.length,o=e.charAt(r);a(t=>i(t,r,function(t){const e=t=>t[Math.floor(Math.random()*t.length)],a=["abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ","1234567890"," _","()[]{}<>"];for(const n of a)if(n.includes(t))return e(n);return e("!@#$%^&*()_+|\\';\"/.,?`~")}(o))),n.push(window.setTimeout(()=>{a(t=>i(t,r,o))},500))},20);return()=>{clearInterval(r),n.forEach(t=>clearTimeout(t))}},[]),r.a.createElement("span",null,e)}},,,,,,,,,function(t,e,a){"use strict";a.d(e,"c",(function(){return u})),a.d(e,"d",(function(){return m})),a.d(e,"b",(function(){return h})),a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(256),o=a(2),s=a(87),l=a(102),c=a(4),f=a(20);function u(){const t=o.a.getCurrentServer();null!==t&&l.a.DarkWeb==t.hostname&&s.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. Use 'buy -a' to purchase all unowned items.")}function m(){for(const t of Object.keys(i.a)){const e=i.a[t],a=o.a.getHomeComputer().programs.includes(e.program)?r.a.createElement("span",{style:{color:"green"}},"[OWNED]"):r.a.createElement(f.a,{money:e.price});s.a.printRaw(r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,e.program)," - ",r.a.createElement("span",null,a)," - ",r.a.createElement("span",null,e.description)))}}function h(t){t=t.toLowerCase();let e=null;for(const a of Object.keys(i.a)){const n=i.a[a];n.program.toLowerCase()==t&&(e=n)}if(null===e)return void s.a.error("Unrecognized item: "+t);if(o.a.hasProgram(e.program))return void s.a.print("You already have the "+e.program+" program");if(o.a.money{var a,n;return(null===(a=e)||void 0===a?void 0:a.program)&&t.startsWith(null===(n=e)||void 0===n?void 0:n.program)});n>-1&&a.splice(n,1),o.a.getHomeComputer().programs.push(e.program),s.a.print("You have purchased the "+e.program+" program. The new program can be found on your home computer.")}function d(){const t=[];let e=0;for(const a of Object.keys(i.a)){const n=i.a[a];o.a.hasProgram(n.program)||(t.push(n),e+=n.price)}if(0!==t.length)if(e>o.a.money)s.a.error("Not enough money to purchase remaining programs, "+c.a.formatMoney(e)+" required");else for(const e of t)h(e.program);else s.a.print("All available programs have been purchased already.")}},function(t,e,a){"use strict";function n(t,e){const a=t.hostname;return"requiredHackingSkill"in t?!1===t.hasAdminRights?{res:!1,msg:`Cannot ${e} ${a} server because you do not have root access`}:{res:!0}:{res:!1,msg:`Cannot ${e} ${a} server because it is a Hacknet Node`}}function r(t,e){const a=n(t,"hack");if(!a.res)return a;return t.requiredHackingSkill>e.hacking?{res:!1,msg:`Cannot hack ${t.hostname} server because your hacking skill is not high enough`}:{res:!0}}function i(t){return n(t,"grow")}function o(t){return n(t,"weaken")}a.d(e,"b",(function(){return r})),a.d(e,"a",(function(){return i})),a.d(e,"c",(function(){return o}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(173),r=a(8);class i{constructor(t){this.augmentation=t}get cost(){return this.augmentation.startingCost*r.a.AugmentationGraftingCostMult}get time(){const t=Math.max(Object(n.sum)(Object.values(this.augmentation.mults)),1),e=Math.log2(t);return(r.a.AugmentationGraftingTimeBase*e+r.a.MillisecondsPerHalfHour)/2}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(4),o=a(116);function s({reputation:t}){return r.a.createElement(o.a,{reputation:i.a.formatReputation(t)+" / sec"})}},function(t,e,a){"use strict";a.d(e,"b",(function(){return o})),a.d(e,"a",(function(){return s}));var n=a(28),r=a(152);function i(t){return"string"==typeof t&&(!isNaN(t)&&!isNaN(parseFloat(t)))}function o(t){const e=(t=(t=t.trim()).replace(/\s\s+/g," ")).match(/(?:'[^']*'|"[^"]*"|[^;"])*/g);if(!e)return[];const a=e.map(r.h).map(t=>t.match(/(?:'[^']*'|"[^"]*"|[^;"])*/g)).flat(),n=[];for(const t of a)null!==t&&(t.match(/^\s*$/)||n.push(t.trim()));return n}function s(t){let e="";const a=[];let r=0,o=0,s="";for(;o=1&&(s=t.charAt(o-1),"\\"===s&&(l=!0));const c=t.charAt(o);if(c===n.a.DOUBLE_QUOTE)if(l||s!==n.a.SPACE)""===e?e=n.a.DOUBLE_QUOTE:e===n.a.DOUBLE_QUOTE&&(e="");else{const e=t.indexOf(n.a.DOUBLE_QUOTE,o+1);if(-1!==e&&(e===t.length-1||t.charAt(e+1)===n.a.SPACE)){a.push(t.substr(o+1,e-o-1)),r=o=e===t.length-1?e+1:e+2;continue}}else if(c===n.a.QUOTE)if(l||s!==n.a.SPACE)""===e?e=n.a.QUOTE:e===n.a.QUOTE&&(e="");else{const e=t.indexOf(n.a.QUOTE,o+1);if(-1!==e&&(e===t.length-1||t.charAt(e+1)===n.a.SPACE)){a.push(t.substr(o+1,e-o-1)),r=o=e===t.length-1?e+1:e+2;continue}}else if(c===n.a.SPACE&&""===e){const e=t.substr(r,o-r);i(e)?a.push(parseFloat(e)):"true"===e?a.push(!0):"false"===e?a.push(!1):a.push(e),r=o+1}++o}if(r!==o){const e=t.substr(r,o-r);i(e)?a.push(parseFloat(e)):"true"===e?a.push(!0):"false"===e?a.push(!1):a.push(e)}return a}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1364),o=a(1),s=a(10);function l(t){const[e,a]=Object(n.useState)(0),[l,c]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,t.lines.slice(0,e).map((t,e)=>r.a.createElement(o.a,{key:e},t)),t.lines.length>e&&r.a.createElement(i.a,{key:e,text:t.lines[e],onDone:function(){const n=e+1;a(n),n>=t.lines.length&&(t.onDone&&t.auto&&t.onDone(),c(!0))}}),!t.auto&&t.onDone&&l&&r.a.createElement(s.a,{onClick:t.onDone},"Continue ..."))}},,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return r}));const n=5,r=1e13},function(t,e,a){"use strict";a.d(e,"c",(function(){return u})),a.d(e,"a",(function(){return m})),a.d(e,"b",(function(){return h})),a.d(e,"d",(function(){return d})),a.d(e,"e",(function(){return p}));var n=a(40),r=a(15),i=a(2),o=a(64),s=a(310),l=a(0),c=a.n(l),f=a(5);const u=[new n.a({name:r.a.HemoRecirculator,moneyCost:45e6,repCost:1e4,info:"A heart implant that greatly increases the body's ability to effectively use and pump blood.",strength_mult:1.08,defense_mult:1.08,agility_mult:1.08,dexterity_mult:1.08,factions:[f.a.Tetrads,f.a.TheDarkArmy,f.a.TheSyndicate]}),new n.a({name:r.a.Targeting1,moneyCost:15e6,repCost:5e3,info:"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates and enhances balance and hand-eye coordination.",dexterity_mult:1.1,factions:[f.a.SlumSnakes,f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Sector12,f.a.Ishima,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new n.a({name:r.a.Targeting2,moneyCost:425e5,repCost:8750,info:"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting reality by digitally displaying weaknesses and vital signs of threats.",prereqs:[r.a.Targeting1],dexterity_mult:1.2,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Sector12,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new n.a({name:r.a.Targeting3,moneyCost:115e6,repCost:27500,info:"The latest version of the 'Augmented Targeting' implant adds the ability to lock-on and track threats.",prereqs:[r.a.Targeting2],dexterity_mult:1.3,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries,f.a.TheCovenant]}),new n.a({name:r.a.SyntheticHeart,moneyCost:2875e6,repCost:75e4,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood more efficiently than an organic heart.",agility_mult:1.5,strength_mult:1.5,factions:[f.a.KuaiGongInternational,f.a.FulcrumSecretTechnologies,f.a.SpeakersForTheDead,f.a.NWO,f.a.TheCovenant,f.a.Daedalus,f.a.Illuminati]}),new n.a({name:r.a.SynfibrilMuscle,repCost:437500,moneyCost:1125e6,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'.",strength_mult:1.3,defense_mult:1.3,factions:[f.a.KuaiGongInternational,f.a.FulcrumSecretTechnologies,f.a.SpeakersForTheDead,f.a.NWO,f.a.TheCovenant,f.a.Daedalus,f.a.Illuminati,f.a.BladeIndustries]}),new n.a({name:r.a.CombatRib1,repCost:7500,moneyCost:2375e4,info:"The rib cage is augmented to continuously release boosters into the bloodstream which increase the oxygen-carrying capacity of blood.",strength_mult:1.1,defense_mult:1.1,factions:[f.a.SlumSnakes,f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Volhaven,f.a.Ishima,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new n.a({name:r.a.CombatRib2,repCost:18750,moneyCost:65e6,info:"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which improve focus and endurance while decreasing reaction time and fatigue.",prereqs:[r.a.CombatRib1],strength_mult:1.14,defense_mult:1.14,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.Volhaven,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries]}),new n.a({name:r.a.CombatRib3,repCost:35e3,moneyCost:12e7,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.",prereqs:[r.a.CombatRib2],strength_mult:1.18,defense_mult:1.18,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.OmniTekIncorporated,f.a.KuaiGongInternational,f.a.BladeIndustries,f.a.TheCovenant]}),new n.a({name:r.a.NanofiberWeave,repCost:37500,moneyCost:125e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, which improves its regenerative and extracellular homeostasis abilities.",strength_mult:1.2,defense_mult:1.2,factions:[f.a.TheDarkArmy,f.a.TheSyndicate,f.a.OmniTekIncorporated,f.a.BladeIndustries,f.a.TianDiHui,f.a.SpeakersForTheDead,f.a.FulcrumSecretTechnologies]}),new n.a({name:r.a.SubdermalArmor,repCost:875e3,moneyCost:325e7,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.",defense_mult:2.2,factions:[f.a.TheSyndicate,f.a.FulcrumSecretTechnologies,f.a.Illuminati,f.a.Daedalus,f.a.TheCovenant]}),new n.a({name:r.a.WiredReflexes,repCost:1250,moneyCost:25e5,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.",agility_mult:1.05,dexterity_mult:1.05,factions:[f.a.TianDiHui,f.a.SlumSnakes,f.a.Sector12,f.a.Volhaven,f.a.Aevum,f.a.Ishima,f.a.TheSyndicate,f.a.TheDarkArmy,f.a.SpeakersForTheDead]}),new n.a({name:r.a.GrapheneBoneLacings,repCost:1125e3,moneyCost:425e7,info:"Graphene is grafted and fused into the skeletal structure, enhancing bone density and tensile strength.",strength_mult:1.7,defense_mult:1.7,factions:[f.a.FulcrumSecretTechnologies,f.a.TheCovenant]}),new n.a({name:r.a.BionicSpine,repCost:45e3,moneyCost:125e6,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.",strength_mult:1.15,defense_mult:1.15,agility_mult:1.15,dexterity_mult:1.15,factions:[f.a.SpeakersForTheDead,f.a.TheSyndicate,f.a.KuaiGongInternational,f.a.OmniTekIncorporated,f.a.BladeIndustries]}),new n.a({name:r.a.GrapheneBionicSpine,repCost:1625e3,moneyCost:6e9,info:"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene which enhances durability and supercharges all body functions.",prereqs:[r.a.BionicSpine],strength_mult:1.6,defense_mult:1.6,agility_mult:1.6,dexterity_mult:1.6,factions:[f.a.FulcrumSecretTechnologies,f.a.ECorp]}),new n.a({name:r.a.BionicLegs,repCost:15e4,moneyCost:375e6,info:"Cybernetic legs, created from plasteel and carbon fibers, enhance running speed.",agility_mult:1.6,factions:[f.a.SpeakersForTheDead,f.a.TheSyndicate,f.a.KuaiGongInternational,f.a.OmniTekIncorporated,f.a.BladeIndustries]}),new n.a({name:r.a.GrapheneBionicLegs,repCost:75e4,moneyCost:45e8,info:"An upgrade to the 'Bionic Legs' augmentation. The legs are fused with graphene, greatly enhancing jumping ability.",prereqs:[r.a.BionicLegs],agility_mult:2.5,factions:[f.a.MegaCorp,f.a.ECorp,f.a.FulcrumSecretTechnologies]}),new n.a({name:r.a.SpeechProcessor,repCost:7500,moneyCost:5e7,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.",charisma_mult:1.2,factions:[f.a.TianDiHui,f.a.Chongqing,f.a.Sector12,f.a.NewTokyo,f.a.Aevum,f.a.Ishima,f.a.Volhaven,f.a.Silhouette]}),new n.a({name:r.a.TITN41Injection,repCost:25e3,moneyCost:19e7,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.",charisma_mult:1.15,charisma_exp_mult:1.15,factions:[f.a.Silhouette]}),new n.a({name:r.a.EnhancedSocialInteractionImplant,repCost:375e3,moneyCost:1375e6,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 socialsituations. The implant also uses deep learning software to continuously learn new behaviorpatterns and how to best respond.",charisma_mult:1.6,charisma_exp_mult:1.6,factions:[f.a.BachmanAssociates,f.a.NWO,f.a.ClarkeIncorporated,f.a.OmniTekIncorporated,f.a.FourSigma]}),new n.a({name:r.a.BitWire,repCost:3750,moneyCost:1e7,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.",hacking_mult:1.05,factions:[f.a.CyberSec,f.a.NiteSec]}),new n.a({name:r.a.ArtificialBioNeuralNetwork,repCost:275e3,moneyCost:3e9,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.",hacking_speed_mult:1.03,hacking_money_mult:1.15,hacking_mult:1.12,factions:[f.a.BitRunners,f.a.FulcrumSecretTechnologies]}),new n.a({name:r.a.ArtificialSynapticPotentiation,repCost:6250,moneyCost:8e7,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.",hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_exp_mult:1.05,factions:[f.a.TheBlackHand,f.a.NiteSec]}),new n.a({name:r.a.EnhancedMyelinSheathing,repCost:1e5,moneyCost:1375e6,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.",hacking_speed_mult:1.03,hacking_exp_mult:1.1,hacking_mult:1.08,factions:[f.a.FulcrumSecretTechnologies,f.a.BitRunners,f.a.TheBlackHand]}),new n.a({name:r.a.SynapticEnhancement,repCost:2e3,moneyCost:75e5,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.",hacking_speed_mult:1.03,factions:[f.a.CyberSec,f.a.Aevum]}),new n.a({name:r.a.NeuralRetentionEnhancement,repCost:2e4,moneyCost:25e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening the ability to retain information.",hacking_exp_mult:1.25,factions:[f.a.NiteSec]}),new n.a({name:r.a.DataJack,repCost:112500,moneyCost:45e7,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.",hacking_money_mult:1.25,factions:[f.a.BitRunners,f.a.TheBlackHand,f.a.NiteSec,f.a.Chongqing,f.a.NewTokyo]}),new n.a({name:r.a.ENM,repCost:15e3,moneyCost:25e7,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.",hacking_mult:1.08,factions:[f.a.BitRunners,f.a.TheBlackHand,f.a.NiteSec,f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.BladeIndustries]}),new n.a({name:r.a.ENMCore,repCost:175e3,moneyCost:25e8,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.",prereqs:[r.a.ENM],hacking_speed_mult:1.03,hacking_money_mult:1.1,hacking_chance_mult:1.03,hacking_exp_mult:1.07,hacking_mult:1.07,factions:[f.a.BitRunners,f.a.TheBlackHand,f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.BladeIndustries]}),new n.a({name:r.a.ENMCoreV2,repCost:1e6,moneyCost:45e8,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.",prereqs:[r.a.ENMCore],hacking_speed_mult:1.05,hacking_money_mult:1.3,hacking_chance_mult:1.05,hacking_exp_mult:1.15,hacking_mult:1.08,factions:[f.a.BitRunners,f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.BladeIndustries,f.a.OmniTekIncorporated,f.a.KuaiGongInternational]}),new n.a({name:r.a.ENMCoreV3,repCost:175e4,moneyCost:75e8,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.",prereqs:[r.a.ENMCoreV2],hacking_speed_mult:1.05,hacking_money_mult:1.4,hacking_chance_mult:1.1,hacking_exp_mult:1.25,hacking_mult:1.1,factions:[f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.Daedalus,f.a.TheCovenant,f.a.Illuminati]}),new n.a({name:r.a.ENMAnalyzeEngine,repCost:625e3,moneyCost:6e9,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.",prereqs:[r.a.ENM],hacking_speed_mult:1.1,factions:[f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.Daedalus,f.a.TheCovenant,f.a.Illuminati]}),new n.a({name:r.a.ENMDMA,repCost:1e6,moneyCost:7e9,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.",prereqs:[r.a.ENM],hacking_money_mult:1.4,hacking_chance_mult:1.2,factions:[f.a.ECorp,f.a.MegaCorp,f.a.FulcrumSecretTechnologies,f.a.NWO,f.a.Daedalus,f.a.TheCovenant,f.a.Illuminati]}),new n.a({name:r.a.Neuralstimulator,repCost:5e4,moneyCost:3e9,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.",hacking_speed_mult:1.02,hacking_chance_mult:1.1,hacking_exp_mult:1.12,factions:[f.a.TheBlackHand,f.a.Chongqing,f.a.Sector12,f.a.NewTokyo,f.a.Aevum,f.a.Ishima,f.a.Volhaven,f.a.BachmanAssociates,f.a.ClarkeIncorporated,f.a.FourSigma]}),new n.a({name:r.a.NeuralAccelerator,repCost:2e5,moneyCost:175e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.",hacking_mult:1.1,hacking_exp_mult:1.15,hacking_money_mult:1.2,factions:[f.a.BitRunners]}),new n.a({name:r.a.CranialSignalProcessorsG1,repCost:1e4,moneyCost:7e7,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.",hacking_speed_mult:1.01,hacking_mult:1.05,factions:[f.a.CyberSec,f.a.NiteSec]}),new n.a({name:r.a.CranialSignalProcessorsG2,repCost:18750,moneyCost:125e6,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.",prereqs:[r.a.CranialSignalProcessorsG1],hacking_speed_mult:1.02,hacking_chance_mult:1.05,hacking_mult:1.07,factions:[f.a.CyberSec,f.a.NiteSec]}),new n.a({name:r.a.CranialSignalProcessorsG3,repCost:5e4,moneyCost:55e7,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.",prereqs:[r.a.CranialSignalProcessorsG2],hacking_speed_mult:1.02,hacking_money_mult:1.15,hacking_mult:1.09,factions:[f.a.NiteSec,f.a.TheBlackHand,f.a.BitRunners]}),new n.a({name:r.a.CranialSignalProcessorsG4,repCost:125e3,moneyCost:11e8,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.",prereqs:[r.a.CranialSignalProcessorsG3],hacking_speed_mult:1.02,hacking_money_mult:1.2,hacking_grow_mult:1.25,factions:[f.a.TheBlackHand,f.a.BitRunners]}),new n.a({name:r.a.CranialSignalProcessorsG5,repCost:25e4,moneyCost:225e7,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.",prereqs:[r.a.CranialSignalProcessorsG4],hacking_mult:1.3,hacking_money_mult:1.25,hacking_grow_mult:1.75,factions:[f.a.BitRunners]}),new n.a({name:r.a.NeuronalDensification,repCost:187500,moneyCost:1375e6,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.",hacking_mult:1.15,hacking_exp_mult:1.1,hacking_speed_mult:1.03,factions:[f.a.ClarkeIncorporated]}),new n.a({name:r.a.NuoptimalInjectorImplant,repCost:5e3,moneyCost:2e7,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.",company_rep_mult:1.2,factions:[f.a.TianDiHui,f.a.Volhaven,f.a.NewTokyo,f.a.Chongqing,f.a.ClarkeIncorporated,f.a.FourSigma,f.a.BachmanAssociates]}),new n.a({name:r.a.SpeechEnhancement,repCost:2500,moneyCost:125e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.",company_rep_mult:1.1,charisma_mult:1.1,factions:[f.a.TianDiHui,f.a.SpeakersForTheDead,f.a.FourSigma,f.a.KuaiGongInternational,f.a.ClarkeIncorporated,f.a.BachmanAssociates]}),new n.a({name:r.a.FocusWire,repCost:75e3,moneyCost:9e8,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.",hacking_exp_mult:1.05,strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,charisma_exp_mult:1.05,company_rep_mult:1.1,work_money_mult:1.2,factions:[f.a.BachmanAssociates,f.a.ClarkeIncorporated,f.a.FourSigma,f.a.KuaiGongInternational]}),new n.a({name:r.a.PCDNI,repCost:375e3,moneyCost:375e7,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.",company_rep_mult:1.3,hacking_mult:1.08,factions:[f.a.FourSigma,f.a.OmniTekIncorporated,f.a.ECorp,f.a.BladeIndustries]}),new n.a({name:r.a.PCDNIOptimizer,repCost:5e5,moneyCost:45e8,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.",prereqs:[r.a.PCDNI],company_rep_mult:1.75,hacking_mult:1.1,factions:[f.a.FulcrumSecretTechnologies,f.a.ECorp,f.a.BladeIndustries]}),new n.a({name:r.a.PCDNINeuralNetwork,repCost:15e5,moneyCost:75e8,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.",prereqs:[r.a.PCDNI],company_rep_mult:2,hacking_mult:1.1,hacking_speed_mult:1.05,factions:[f.a.FulcrumSecretTechnologies]}),new n.a({name:r.a.ADRPheromone1,repCost:3750,moneyCost:175e5,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.",company_rep_mult:1.1,faction_rep_mult:1.1,factions:[f.a.TianDiHui,f.a.TheSyndicate,f.a.NWO,f.a.MegaCorp,f.a.FourSigma]}),new n.a({name:r.a.ADRPheromone2,repCost:62500,moneyCost:55e7,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.",company_rep_mult:1.2,faction_rep_mult:1.2,factions:[f.a.Silhouette,f.a.FourSigma,f.a.BachmanAssociates,f.a.ClarkeIncorporated]}),new n.a({name:r.a.ShadowsSimulacrum,repCost:37500,moneyCost:4e8,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.",company_rep_mult:1.15,faction_rep_mult:1.15,factions:[f.a.TheSyndicate,f.a.TheDarkArmy,f.a.SpeakersForTheDead]}),new n.a({name:r.a.HacknetNodeCPUUpload,repCost:3750,moneyCost:11e6,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.",hacknet_node_money_mult:1.15,hacknet_node_purchase_cost_mult:.85,factions:[f.a.Netburners]}),new n.a({name:r.a.HacknetNodeCacheUpload,repCost:2500,moneyCost:55e5,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.",hacknet_node_money_mult:1.1,hacknet_node_level_cost_mult:.85,factions:[f.a.Netburners]}),new n.a({name:r.a.HacknetNodeNICUpload,repCost:1875,moneyCost:45e5,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.",hacknet_node_money_mult:1.1,hacknet_node_purchase_cost_mult:.9,factions:[f.a.Netburners]}),new n.a({name:r.a.HacknetNodeKernelDNI,repCost:7500,moneyCost:4e7,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.",hacknet_node_money_mult:1.25,factions:[f.a.Netburners]}),new n.a({name:r.a.HacknetNodeCoreDNI,repCost:12500,moneyCost:6e7,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.",hacknet_node_money_mult:1.45,factions:[f.a.Netburners]}),new n.a({name:r.a.Neurotrainer1,repCost:1e3,moneyCost:4e6,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.",hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1,factions:[f.a.CyberSec,f.a.Aevum]}),new n.a({name:r.a.Neurotrainer2,repCost:1e4,moneyCost:45e6,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.",hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15,factions:[f.a.BitRunners,f.a.NiteSec]}),new n.a({name:r.a.Neurotrainer3,repCost:25e3,moneyCost:13e7,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.",hacking_exp_mult:1.2,strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,charisma_exp_mult:1.2,factions:[f.a.NWO,f.a.FourSigma]}),new n.a({name:r.a.Hypersight,repCost:15e4,moneyCost:275e7,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.",dexterity_mult:1.4,hacking_speed_mult:1.03,hacking_money_mult:1.1,factions:[f.a.BladeIndustries,f.a.KuaiGongInternational]}),new n.a({name:r.a.LuminCloaking1,repCost:1500,moneyCost:5e6,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.",agility_mult:1.05,crime_money_mult:1.1,factions:[f.a.SlumSnakes,f.a.Tetrads]}),new n.a({name:r.a.LuminCloaking2,repCost:5e3,moneyCost:3e7,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.",prereqs:[r.a.LuminCloaking1],agility_mult:1.1,defense_mult:1.1,crime_money_mult:1.25,factions:[f.a.SlumSnakes,f.a.Tetrads]}),new n.a({name:r.a.SmartSonar,repCost:22500,moneyCost:75e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.",dexterity_mult:1.1,dexterity_exp_mult:1.15,crime_money_mult:1.25,factions:[f.a.SlumSnakes]}),new n.a({name:r.a.PowerRecirculator,repCost:25e3,moneyCost:18e7,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.",hacking_mult:1.05,strength_mult:1.05,defense_mult:1.05,dexterity_mult:1.05,agility_mult:1.05,charisma_mult:1.05,hacking_exp_mult:1.1,strength_exp_mult:1.1,defense_exp_mult:1.1,dexterity_exp_mult:1.1,agility_exp_mult:1.1,charisma_exp_mult:1.1,factions:[f.a.Tetrads,f.a.TheDarkArmy,f.a.TheSyndicate,f.a.NWO]}),new n.a({name:r.a.QLink,repCost:1875e3,moneyCost:25e12,info:`A brain implant that wirelessly connects you to the ${f.a.Illuminati}'s quantum supercomputer, allowing you to access and use its incredible computing power.`,hacking_mult:1.75,hacking_speed_mult:2,hacking_chance_mult:2.5,hacking_money_mult:4,factions:[f.a.Illuminati]}),new n.a({name:r.a.SPTN97,repCost:125e4,moneyCost:4875e6,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.",strength_mult:1.75,defense_mult:1.75,dexterity_mult:1.75,agility_mult:1.75,hacking_mult:1.15,factions:[f.a.TheCovenant]}),new n.a({name:r.a.HiveMind,repCost:15e5,moneyCost:55e8,info:`A brain implant developed by ${f.a.ECorp}. They do not reveal what exactly the implant does, but they promise that it will greatly enhance your abilities.`,hacking_grow_mult:3,stats:null,factions:[f.a.ECorp]}),new n.a({name:r.a.TheRedPill,repCost:25e5,moneyCost:0,info:"It's time to leave the cave.",stats:null,factions:[f.a.Daedalus]}),new n.a({name:r.a.CordiARCReactor,repCost:1125e3,moneyCost:5e9,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.",strength_mult:1.35,defense_mult:1.35,dexterity_mult:1.35,agility_mult:1.35,strength_exp_mult:1.35,defense_exp_mult:1.35,dexterity_exp_mult:1.35,agility_exp_mult:1.35,factions:[f.a.MegaCorp]}),new n.a({name:r.a.SmartJaw,repCost:375e3,moneyCost:275e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.",charisma_mult:1.5,charisma_exp_mult:1.5,company_rep_mult:1.25,faction_rep_mult:1.25,factions:[f.a.BachmanAssociates]}),new n.a({name:r.a.Neotra,repCost:562500,moneyCost:2875e6,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.",strength_mult:1.55,defense_mult:1.55,factions:[f.a.BladeIndustries]}),new n.a({name:r.a.Xanipher,repCost:875e3,moneyCost:425e7,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.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,hacking_exp_mult:1.15,strength_exp_mult:1.15,defense_exp_mult:1.15,dexterity_exp_mult:1.15,agility_exp_mult:1.15,charisma_exp_mult:1.15,factions:[f.a.NWO]}),new n.a({name:r.a.HydroflameLeftArm,repCost:125e4,moneyCost:25e11,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 user's strength to unbelievable levels. The augmentation gets more powerful over time for seemingly no reason.",strength_mult:2.7,factions:[f.a.NWO]}),new n.a({name:r.a.nextSENS,repCost:437500,moneyCost:1925e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.",hacking_mult:1.2,strength_mult:1.2,defense_mult:1.2,dexterity_mult:1.2,agility_mult:1.2,charisma_mult:1.2,factions:[f.a.ClarkeIncorporated]}),new n.a({name:r.a.OmniTekInfoLoad,repCost:625e3,moneyCost:2875e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.",hacking_mult:1.2,hacking_exp_mult:1.25,factions:[f.a.OmniTekIncorporated]}),new n.a({name:r.a.PhotosyntheticCells,repCost:562500,moneyCost:275e7,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.",strength_mult:1.4,defense_mult:1.4,agility_mult:1.4,factions:[f.a.KuaiGongInternational]}),new n.a({name:r.a.Neurolink,repCost:875e3,moneyCost:4375e6,info:`A brain implant that provides a high-bandwidth, direct neural link between your mind and the ${f.a.BitRunners}' data servers, which reportedly contain the largest database of hacking tools and information in the world.`,hacking_mult:1.15,hacking_exp_mult:1.2,hacking_chance_mult:1.1,hacking_speed_mult:1.05,programs:[o.a.FTPCrackProgram.name,o.a.RelaySMTPProgram.name],factions:[f.a.BitRunners]}),new n.a({name:r.a.TheBlackHand,repCost:1e5,moneyCost:55e7,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.",strength_mult:1.15,dexterity_mult:1.15,hacking_mult:1.1,hacking_speed_mult:1.02,hacking_money_mult:1.1,factions:[f.a.TheBlackHand]}),new n.a({name:r.a.CRTX42AA,repCost:45e3,moneyCost:225e6,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.",hacking_mult:1.08,hacking_exp_mult:1.15,factions:[f.a.NiteSec]}),new n.a({name:r.a.Neuregen,repCost:37500,moneyCost:375e6,info:"A drug that genetically modifies the neurons in the brain resulting in neurons that never die, continuously regenerate, and strengthen themselves.",hacking_exp_mult:1.4,factions:[f.a.Chongqing]}),new n.a({name:r.a.CashRoot,repCost:12500,moneyCost:125e6,info:c.a.createElement(c.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."),startingMoney:1e6,programs:[o.a.BruteSSHProgram.name],factions:[f.a.Sector12]}),new n.a({name:r.a.NutriGen,repCost:6250,moneyCost:25e5,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.",strength_exp_mult:1.2,defense_exp_mult:1.2,dexterity_exp_mult:1.2,agility_exp_mult:1.2,factions:[f.a.NewTokyo]}),new n.a({name:r.a.PCMatrix,repCost:1e5,moneyCost:2e9,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.",charisma_mult:1.0777,charisma_exp_mult:1.0777,work_money_mult:1.777,faction_rep_mult:1.0777,company_rep_mult:1.0777,crime_success_mult:1.0777,crime_money_mult:1.0777,programs:[o.a.DeepscanV1.name,o.a.AutoLink.name],factions:[f.a.Aevum]}),new n.a({name:r.a.INFRARet,repCost:7500,moneyCost:3e7,info:"A tiny chip that sits behind the retinae. This implant lets the user visually detect infrared radiation.",crime_success_mult:1.25,crime_money_mult:1.1,dexterity_mult:1.1,factions:[f.a.Ishima]}),new n.a({name:r.a.DermaForce,repCost:15e3,moneyCost:5e7,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.",defense_mult:1.4,factions:[f.a.Volhaven]}),new n.a({name:r.a.GrapheneBrachiBlades,repCost:225e3,moneyCost:25e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material making them stronger and lighter.",prereqs:[r.a.BrachiBlades],strength_mult:1.4,defense_mult:1.4,crime_success_mult:1.1,crime_money_mult:1.3,factions:[f.a.SpeakersForTheDead]}),new n.a({name:r.a.GrapheneBionicArms,repCost:5e5,moneyCost:375e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them stronger and lighter.",prereqs:[r.a.BionicArms],strength_mult:1.85,dexterity_mult:1.85,factions:[f.a.TheDarkArmy]}),new n.a({name:r.a.BrachiBlades,repCost:12500,moneyCost:9e7,info:"A set of retractable plasteel blades that are implanted in the arm, underneath the skin.",strength_mult:1.15,defense_mult:1.15,crime_success_mult:1.1,crime_money_mult:1.15,factions:[f.a.TheSyndicate]}),new n.a({name:r.a.BionicArms,repCost:62500,moneyCost:275e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.",strength_mult:1.3,dexterity_mult:1.3,factions:[f.a.Tetrads]}),new n.a({name:r.a.SNA,repCost:6250,moneyCost:3e7,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.",work_money_mult:1.1,company_rep_mult:1.15,faction_rep_mult:1.15,factions:[f.a.TianDiHui]}),new n.a({name:r.a.NeuroreceptorManager,repCost:75e3,moneyCost:55e7,info:"A brain implant carefully assembled around the synapses, which micromanages the activity and levels of various neuroreceptor chemicals and modulates electrical activity to optimize concentration, allowing the user to multitask much more effectively.",stats:c.a.createElement(c.a.Fragment,null,"This augmentation removes the penalty for not focusing on actions such as working in a job or working for a faction."),factions:[f.a.TianDiHui]})],m=[new n.a({name:r.a.EsperEyewear,repCost:1250,moneyCost:165e6,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.",bladeburner_success_chance_mult:1.03,dexterity_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.EMS4Recombination,repCost:2500,moneyCost:275e6,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.",bladeburner_success_chance_mult:1.03,bladeburner_analysis_mult:1.05,bladeburner_stamina_gain_mult:1.02,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.OrionShoulder,repCost:6250,moneyCost:55e7,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.",defense_mult:1.05,strength_mult:1.05,dexterity_mult:1.05,bladeburner_success_chance_mult:1.04,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.HyperionV1,repCost:12500,moneyCost:275e7,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.",bladeburner_success_chance_mult:1.06,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.HyperionV2,repCost:25e3,moneyCost:55e8,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.",prereqs:[r.a.HyperionV1],bladeburner_success_chance_mult:1.08,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.GolemSerum,repCost:31250,moneyCost:11e9,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.",strength_mult:1.07,defense_mult:1.07,dexterity_mult:1.07,agility_mult:1.07,bladeburner_stamina_gain_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.VangelisVirus,repCost:18750,moneyCost:275e7,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.",dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.1,bladeburner_success_chance_mult:1.04,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.VangelisVirus3,repCost:37500,moneyCost:11e9,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.",prereqs:[r.a.VangelisVirus],defense_exp_mult:1.1,dexterity_exp_mult:1.1,bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.INTERLINKED,repCost:25e3,moneyCost:55e8,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.",strength_exp_mult:1.05,defense_exp_mult:1.05,dexterity_exp_mult:1.05,agility_exp_mult:1.05,bladeburner_max_stamina_mult:1.1,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladeRunner,repCost:2e4,moneyCost:825e7,info:`A cybernetic foot augmentation that was specifically created for ${f.a.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.`,agility_mult:1.05,bladeburner_max_stamina_mult:1.05,bladeburner_stamina_gain_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladeArmor,repCost:12500,moneyCost:1375e6,info:`A powered exoskeleton suit designed as armor for ${f.a.Bladeburners} 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.`,strength_mult:1.04,defense_mult:1.04,dexterity_mult:1.04,agility_mult:1.04,bladeburner_stamina_gain_mult:1.02,bladeburner_success_chance_mult:1.03,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladeArmorPowerCells,repCost:18750,moneyCost:275e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.",prereqs:[r.a.BladeArmor],bladeburner_success_chance_mult:1.05,bladeburner_stamina_gain_mult:1.02,bladeburner_max_stamina_mult:1.05,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladeArmorEnergyShielding,repCost:21250,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.",prereqs:[r.a.BladeArmor],defense_mult:1.05,bladeburner_success_chance_mult:1.06,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladeArmorUnibeam,repCost:31250,moneyCost:165e8,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.",prereqs:[r.a.BladeArmor],bladeburner_success_chance_mult:1.08,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladeArmorOmnibeam,repCost:62500,moneyCost:275e8,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.",prereqs:[r.a.BladeArmorUnibeam],bladeburner_success_chance_mult:1.1,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladeArmorIPU,repCost:15e3,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.",prereqs:[r.a.BladeArmor],bladeburner_analysis_mult:1.15,bladeburner_success_chance_mult:1.02,isSpecial:!0,factions:[f.a.Bladeburners]}),new n.a({name:r.a.BladesSimulacrum,repCost:1250,moneyCost:15e10,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.",stats:c.a.createElement(c.a.Fragment,null,"This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."),isSpecial:!0,factions:[f.a.Bladeburners]})],h=[new n.a({name:r.a.StaneksGift1,repCost:0,moneyCost:0,info:'Allison "Mother" Stanek imparts you with her gift. An experimental Augmentation implanted at the base of the neck. It allows you to overclock your entire system by carefully changing the configuration.',isSpecial:!0,hacking_chance_mult:.9,hacking_speed_mult:.9,hacking_money_mult:.9,hacking_grow_mult:.9,hacking_mult:.9,strength_mult:.9,defense_mult:.9,dexterity_mult:.9,agility_mult:.9,charisma_mult:.9,hacking_exp_mult:.9,strength_exp_mult:.9,defense_exp_mult:.9,dexterity_exp_mult:.9,agility_exp_mult:.9,charisma_exp_mult:.9,company_rep_mult:.9,faction_rep_mult:.9,crime_money_mult:.9,crime_success_mult:.9,hacknet_node_money_mult:.9,hacknet_node_purchase_cost_mult:1.1,hacknet_node_ram_cost_mult:1.1,hacknet_node_core_cost_mult:1.1,hacknet_node_level_cost_mult:1.1,work_money_mult:.9,stats:c.a.createElement(c.a.Fragment,null,"Its unstable nature decreases all your stats by 10%"),factions:[f.a.ChurchOfTheMachineGod]}),new n.a({name:r.a.StaneksGift2,repCost:1e6,moneyCost:0,info:"The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon your frame granting lesser penalty of 5% to all stats.",prereqs:[r.a.StaneksGift1],isSpecial:!0,hacking_chance_mult:.95/.9,hacking_speed_mult:.95/.9,hacking_money_mult:.95/.9,hacking_grow_mult:.95/.9,hacking_mult:.95/.9,strength_mult:.95/.9,defense_mult:.95/.9,dexterity_mult:.95/.9,agility_mult:.95/.9,charisma_mult:.95/.9,hacking_exp_mult:.95/.9,strength_exp_mult:.95/.9,defense_exp_mult:.95/.9,dexterity_exp_mult:.95/.9,agility_exp_mult:.95/.9,charisma_exp_mult:.95/.9,company_rep_mult:.95/.9,faction_rep_mult:.95/.9,crime_money_mult:.95/.9,crime_success_mult:.95/.9,hacknet_node_money_mult:.95/.9,hacknet_node_purchase_cost_mult:1.05/1.1,hacknet_node_ram_cost_mult:1.05/1.1,hacknet_node_core_cost_mult:1.05/1.1,hacknet_node_level_cost_mult:1.05/1.1,work_money_mult:.95/.9,stats:c.a.createElement(c.a.Fragment,null,"The penalty for the gift is reduced to 5%"),factions:[f.a.ChurchOfTheMachineGod]}),new n.a({name:r.a.StaneksGift3,repCost:1e8,moneyCost:0,info:"The synthesis of human and machine is nothing to fear. It is our destiny. You will become greater than the sum of our parts. As One. Embrace your gift fully and wholly free of it's accursed toll. Serenity brings tranquility the form of no longer suffering a stat penalty. ",prereqs:[r.a.StaneksGift2],isSpecial:!0,hacking_chance_mult:1/.95,hacking_speed_mult:1/.95,hacking_money_mult:1/.95,hacking_grow_mult:1/.95,hacking_mult:1/.95,strength_mult:1/.95,defense_mult:1/.95,dexterity_mult:1/.95,agility_mult:1/.95,charisma_mult:1/.95,hacking_exp_mult:1/.95,strength_exp_mult:1/.95,defense_exp_mult:1/.95,dexterity_exp_mult:1/.95,agility_exp_mult:1/.95,charisma_exp_mult:1/.95,company_rep_mult:1/.95,faction_rep_mult:1/.95,crime_money_mult:1/.95,crime_success_mult:1/.95,hacknet_node_money_mult:1/.95,hacknet_node_purchase_cost_mult:1/1.05,hacknet_node_ram_cost_mult:1/1.05,hacknet_node_core_cost_mult:1/1.05,hacknet_node_level_cost_mult:1/1.05,work_money_mult:1/.95,stats:c.a.createElement(c.a.Fragment,null,"Stanek's Gift has no penalty."),factions:[f.a.ChurchOfTheMachineGod]})];function d(){return new n.a({name:r.a.NeuroFluxGovernor,repCost:500,moneyCost:75e4,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.",stats:c.a.createElement(c.a.Fragment,null,"This special augmentation can be leveled up infinitely. Each level of this augmentation increases MOST multipliers by 1%, stacking multiplicatively."),hacking_chance_mult:1.01,hacking_speed_mult:1.01,hacking_money_mult:1.01,hacking_grow_mult:1.01,hacking_mult:1.01,strength_mult:1.01,defense_mult:1.01,dexterity_mult:1.01,agility_mult:1.01,charisma_mult:1.01,hacking_exp_mult:1.01,strength_exp_mult:1.01,defense_exp_mult:1.01,dexterity_exp_mult:1.01,agility_exp_mult:1.01,charisma_exp_mult:1.01,company_rep_mult:1.01,faction_rep_mult:1.01,crime_money_mult:1.01,crime_success_mult:1.01,hacknet_node_money_mult:1.01,hacknet_node_purchase_cost_mult:.99,hacknet_node_ram_cost_mult:.99,hacknet_node_core_cost_mult:.99,hacknet_node_level_cost_mult:.99,work_money_mult:1.01,factions:Object.values(f.a)})}function p(){const t=function(){const t=[{bonuses:{hacking_chance_mult:1.25,hacking_speed_mult:1.1,hacking_money_mult:1.25,hacking_grow_mult:1.1},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%."},{bonuses:{hacking_mult:1.15,hacking_exp_mult:2},description:"Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 100%."},{bonuses:{strength_mult:1.25,strength_exp_mult:2,defense_mult:1.25,defense_exp_mult:2,dexterity_mult:1.25,dexterity_exp_mult:2,agility_mult:1.25,agility_exp_mult:2},description:"Increases all of the player's combat stats by 25%.
Increases all of the player's combat stat experience gain rate by 100%."},{bonuses:{charisma_mult:1.5,charisma_exp_mult:2},description:"This augmentation increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 100%."},{bonuses:{hacknet_node_money_mult:1.2,hacknet_node_purchase_cost_mult:.85,hacknet_node_ram_cost_mult:.85,hacknet_node_core_cost_mult:.85,hacknet_node_level_cost_mult:.85},description:"Increases the amount of money produced by Hacknet Nodes by 20%.
Decreases all costs related to Hacknet Node by 15%."},{bonuses:{company_rep_mult:1.25,faction_rep_mult:1.15,work_money_mult:1.7},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%."},{bonuses:{crime_success_mult:2,crime_money_mult:2},description:"Increases the player's crime success rate by 100%.
Increases the amount of money the player gains from crimes by 100%."}],e=new s.c(Math.floor(i.a.lastUpdate/36e5));for(let t=0;t<5;t++)e.step();return t[Math.floor(t.length*e.random())]}(),e={name:r.a.UnstableCircadianModulator,moneyCost:5e9,repCost:362500,info:"An experimental nanobot injection. Its unstable nature leads to unpredictable results based on your circadian rhythm.",factions:[f.a.SpeakersForTheDead]};return Object.keys(t.bonuses).forEach(a=>e[a]=t.bonuses[a]),new n.a(e)}},,,,,,,,,,,,,,,,,,,,,,,,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"b",(function(){return checkInfiniteLoop})),__webpack_require__.d(__webpack_exports__,"a",(function(){return calculateRamUsage}));var acorn_walk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(300),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(254),_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(323),_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(13),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(83);const specialReferenceIF="__SPECIAL_referenceIf",specialReferenceFOR="__SPECIAL_referenceFor",specialReferenceWHILE="__SPECIAL_referenceWhile",memCheckGlobalKey=".__GLOBAL__";async function parseOnlyRamCalculate(player,otherScripts,code,workerScript){try{let dependencyMap={};const completedParses=new Set,parseQueue=[];function parseCode(t,e){const a=parseOnlyCalculateDeps(t,e);completedParses.add(e);for(let t=0;t0;){const nextModule=parseQueue.shift();if(void 0===nextModule)throw new Error("nextModule should not be undefined");let code;if(nextModule.startsWith("https://")||nextModule.startsWith("http://"))try{const module=await eval("import(nextModule)");code="";for(const t in module)"function"==typeof module[t]&&(code+=module[t].toString()+";\n")}catch(t){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${t}`),{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.URLImportError}}else{if(!Array.isArray(otherScripts))return console.warn("parseOnlyRamCalculate() not called with array of scripts"),{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.ImportError};let t=null;const e=nextModule.startsWith("./")?nextModule.slice(2):nextModule;for(const a of otherScripts)if(Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__.b)(a.filename,e)){t=a;break}if(null==t)return{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.ImportError};code=t.code}parseCode(code,nextModule)}let ram=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptBaseRamCost;const detailedCosts=[{type:"misc",name:"baseCost",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptBaseRamCost}],unresolvedRefs=Object.keys(dependencyMap).filter(t=>t.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const t=unresolvedRefs.shift();if(void 0===t)throw new Error("ref should not be undefined");if("hacknet"!==t||resolvedRefs.has("hacknet")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptHacknetNodesRamCost,detailedCosts.push({type:"ns",name:"hacknet",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptHacknetNodesRamCost})),"document"!==t||resolvedRefs.has("document")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost,detailedCosts.push({type:"dom",name:"document",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost})),"window"!==t||resolvedRefs.has("window")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost,detailedCosts.push({type:"dom",name:"window",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptDomRamCost})),"corporation"!==t||resolvedRefs.has("corporation")||(ram+=_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptCorporationRamCost,detailedCosts.push({type:"ns",name:"corporation",cost:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.a.ScriptCorporationRamCost})),resolvedRefs.add(t),t.endsWith(".*")){const e=t.slice(0,t.length-2);for(const t of Object.keys(dependencyMap).filter(t=>t.startsWith(e)))for(const e of dependencyMap[t]||[])resolvedRefs.has(e)||unresolvedRefs.push(e)}else for(const e of dependencyMap[t]||[])resolvedRefs.has(e)||unresolvedRefs.push(e);try{function applyFuncRam(t){return"number"==typeof t?t:"function"==typeof t?t(player):0}if(workerScript.loadedFns[t])continue;let e;workerScript.loadedFns[t]=!0;let a="n/a";t in workerScript.env.vars.bladeburner?(e=workerScript.env.vars.bladeburner[t],a="bladeburner."+t):t in workerScript.env.vars.codingcontract?(e=workerScript.env.vars.codingcontract[t],a="codingcontract."+t):t in workerScript.env.vars.stanek?(e=workerScript.env.vars.stanek[t],a="stanek."+t):t in workerScript.env.vars.gang?(e=workerScript.env.vars.gang[t],a="gang."+t):t in workerScript.env.vars.sleeve?(e=workerScript.env.vars.sleeve[t],a="sleeve."+t):t in workerScript.env.vars.stock?(e=workerScript.env.vars.stock[t],a="stock."+t):t in workerScript.env.vars.ui?(e=workerScript.env.vars.ui[t],a="ui."+t):t in workerScript.env.vars.grafting?(e=workerScript.env.vars.grafting[t],a="grafting."+t):(e=workerScript.env.vars[t],a=""+t);const n=applyFuncRam(e);ram+=n,detailedCosts.push({type:"fn",name:a,cost:n})}catch(t){continue}}return{cost:ram,entries:detailedCosts.filter(t=>t.cost>0)}}catch(t){return{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.SyntaxError}}}function checkInfiniteLoop(t){const e=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.a)(t,{sourceType:"module",ecmaVersion:"latest"});let a=-1;return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(e,{},{WhileStatement:(e,n,r)=>{!function(t){return"Literal"===t.type&&"true"===t.raw}(e.test)||function(t){let e=!1;return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(t,{},{AwaitExpression:()=>{e=!0}}),e}(e)?e.body&&r(e.body,n):a=(t.slice(0,e.start).match(/\n/g)||[]).length+1}}),a}function parseOnlyCalculateDeps(t,e){const a=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.a)(t,{sourceType:"module",ecmaVersion:"latest"}),n=e+memCheckGlobalKey,r={};r[n]=new Set;const i={},o=[];function s(t,a){const n=r[t]||(r[t]=new Set),o=i[a];void 0!==o&&n.add(o),n.add(e+"."+a),n.add(a)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(t,e)=>{l.includes(t.name)||s(e.key,t.name)},WhileStatement:(t,e,a)=>{s(e.key,specialReferenceWHILE),t.test&&a(t.test,e),t.body&&a(t.body,e)},DoWhileStatement:(t,e,a)=>{s(e.key,specialReferenceWHILE),t.test&&a(t.test,e),t.body&&a(t.body,e)},ForStatement:(t,e,a)=>{s(e.key,specialReferenceFOR),t.init&&a(t.init,e),t.test&&a(t.test,e),t.update&&a(t.update,e),t.body&&a(t.body,e)},IfStatement:(t,e,a)=>{s(e.key,specialReferenceIF),t.test&&a(t.test,e),t.consequent&&a(t.consequent,e),t.alternate&&a(t.alternate,e)},MemberExpression:(t,e,a)=>{t.object&&a(t.object,e),t.property&&a(t.property,e)}}}return acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(a,{key:n},Object.assign({ImportDeclaration:(t,e)=>{const a=t.source.value;o.push(a);const n=r[e.key];if(void 0===n)throw new Error("set should not be undefined");n.add(a+memCheckGlobalKey);for(let n=0;n{const a=e+"."+(null===t.id?"__SPECIAL_DEFAULT_EXPORT__":t.id.name);acorn_walk__WEBPACK_IMPORTED_MODULE_0__.a(t,{key:a},c())}},c())),{dependencyMap:r,additionalModules:o}}async function calculateRamUsage(t,e,a){const n={loadedFns:{},env:{vars:_Netscript_RamCostGenerator__WEBPACK_IMPORTED_MODULE_3__.b}};try{return await parseOnlyRamCalculate(t,a,e,n)}catch(t){return console.error("Failed to parse script for RAM calculations:"),console.error(t),{cost:_RamCalculationErrorCodes__WEBPACK_IMPORTED_MODULE_2__.a.SyntaxError}}}},function(t,e,a){"use strict";function n(t){return+(Math.round(parseFloat(t+"e+2"))+"e-2")}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(204),r=a(29),i=a(16),o=a(25),s=a(266),l=a(36),c=a(252),f=a(8),u=a(241),m=a(80),h=a(1007),d=a(1009);class p{constructor(t="",e=!1){this.facName=t,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=e,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}getPower(){return m.a[this.facName].power}getTerritory(){return m.a[this.facName].territory}process(t=1,e){const a=1e3/f.a._idleSpeed;if(isNaN(t)&&console.error("NaN passed into Gang.process(): "+t),this.storedCycles+=t,this.storedCycles<2*a)return;const n=Math.min(this.storedCycles,5*a);try{this.processGains(n,e),this.processExperienceGains(n),this.processTerritoryAndPowerGains(n),this.storedCycles-=n}catch(t){console.error("Exception caught when processing Gang: "+t)}}processGains(t=1,e){let a=0,o=0,s=0,l=0;for(let t=0;te&&(a=1),this.wanted=a,this.wanted<1&&(this.wanted=1)}e.gainMoney(a*t,"gang")}processTerritoryAndPowerGains(t=1){if(this.storedTerritoryAndPowerCycles+=t,this.storedTerritoryAndPowerCycles0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));const a=c.a.Names.filter(t=>m.a[t].territory>0||t===e);if(a.length>1)for(let t=0;te!==a[t]),i=Object(l.a)(0,r.length-1),o=a[t],s=r[i];if(!(o!==e&&s!==e||Math.random().999&&(m.a[o].territory=1),m.a[s].territory-=t,o===e?(this.clash(!0),m.a[s].power*=1/1.01):s===e?this.clash(!1):m.a[s].power*=1/1.01}else{if(m.a[o].territory<=0)return;const t=n(s,o);m.a[o].territory-=t,m.a[s].territory<.001&&(m.a[s].territory=0),m.a[s].territory+=t,m.a[s].territory>.999&&(m.a[s].territory=1),o===e?this.clash(!1):s===e?(this.clash(!0),m.a[o].power*=1/1.01):m.a[o].power*=1/1.01}}}processExperienceGains(t=1){for(let e=0;e=0;--t){const a=this.members[t];if("Territory Warfare"!==a.task)continue;const n=e/Math.pow(a.def,.6);Math.random()=c.a.MaximumGangMembers)&&this.respect>=this.getRespectNeededToRecruitMember()}getRespectNeededToRecruitMember(){if(this.members.length<3)return 0;const t=this.members.length-2;return Math.pow(5,t)}recruitMember(t){if(""===(t=String(t))||!this.canRecruitMember())return!1;if(this.members.filter(e=>e.name===t).length>=1)return!1;const e=new h.a(t);return this.members.push(e),!0}getWantedPenalty(){return this.respect/(this.respect+this.wanted)}calculatePower(){let t=0;for(let e=0;e"Ascended Gang member "+t.name),a}catch(t){throw null==e&&Object(s.a)(t),t}}getDiscount(){const t=this.getPower(),e=this.respect,a=Math.pow(e,.01)+e/5e6+Math.pow(t,.01)+t/1e6-1;return Math.max(1,a)}getAllTaskNames(){return Object.keys(u.a).filter(t=>{const e=u.a[t];return null!=e&&("Unassigned"!==e.name&&(this.isHackingGang===e.isHacking||!this.isHackingGang===e.isCombat))})}getUpgradeCost(t){return null==t?1/0:t.cost/this.getDiscount()}toJSON(){return Object(o.b)("Gang",this)}static fromJSON(t){return Object(o.a)(p,t.data)}}o.c.constructors.Gang=p},function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return o}));var n=a(182);let r=1;function i(){let t=r,e=!1;for(let a=0;a<1e6;){if(!n.a.has(t+a)){e=!0,t+=a;break}a===Number.MAX_SAFE_INTEGER-1?a=1:++a}return e?(r=t+1,r>=Number.MAX_SAFE_INTEGER&&(r=1),t):-1}function o(){r=1}},function(t,e,a){"use strict";(function(t){a.d(e,"a",(function(){return et}));var n=a(413),r=a(13),i=a(292),o=a(6),s=a(8),l=a(99),c=a(466),f=a(91),u=a(87),m=a(2),h=a(64),d=a(253),p=a(233),g=a(98),y=a(400),b=a(26),E=a(132),v=a(222),k=a(47),_=a(82),w=a(514),S=a(83),C=a(223),x=a(197),L=a(142),O=a(182),M=a(109),T=a(4),A=a(24),R=a(181),N=a(255),P=a(147),I=a(1019),F=a(1020),D=a(1021),j=a(1023),B=a(1024),G=a(1026),W=a(1027),H=a(1028),U=a(1030),q=a(1035),$=a(1036),K=a(1037),z=a(1391),V=a(629),Y=a(16),J=a(140),X=a(628),Q=a(280),Z=a(411),tt=a(17);function et(e){const a=function(t,a){if(e.dynamicLoadedFns[t])return;e.dynamicLoadedFns[t]=!0;let n=e.scriptRef.threads;if("number"!=typeof n&&(console.warn(`WorkerScript detected NaN for threadcount for ${e.name} on ${e.hostname}`),n=1),e.dynamicRamUsage+=a,e.dynamicRamUsage>1.01*e.ramUsage)throw Object(M.b)(e,`Dynamic RAM usage calculated to be greater than initial RAM usage on fn: ${t}.\n This is probably because you somehow circumvented the static RAM calculation.\n\n Threads: ${n}\n Dynamic RAM Usage: ${T.a.formatRAM(e.dynamicRamUsage)}\n Static RAM Usage: ${T.a.formatRAM(e.ramUsage)}\n\n One of these could be the reason:\n * Using eval() to get a reference to a ns function\n   const myScan = eval('ns.scan');\n\n * Using map access to do the same\n   const myScan = ns['scan'];\n\n Sorry :(`)},at=function(t,e){const a=Object(b.d)(t);if(null==a)throw st(e,"Invalid hostname: "+t);return a},nt=function(t,a,n,r){if("string"==typeof n&&""!==n||(n="getRunningScript"),!Array.isArray(r))throw Object(M.b)(e,`Invalid scriptArgs argument passed into getRunningScript() from ${n}(). This is probably a bug. Please report to game developer`);if(null!=t&&"string"==typeof t){null==a&&(a=e.hostname);const i=at(a,n);return Object(p.a)(t,r,i)}return e.scriptRef},rt=function(t,e){"string"==typeof e&&""!==e||(e="getRunningScriptgetRunningScriptByPid");for(const e of Object(b.c)()){const a=Object(p.b)(t,e);if(a)return a}return null},it=function(t,e,a){return Array.isArray(a)||(a=[]),`Cannot find running script ${t} on server ${e} with args: ${Object(N.a)(a)}`},ot=function(t,a=""){return t instanceof f.a&&(e.log(a,()=>"Does not work on Hacknet Servers"),!0)},st=function(t,a){const n=(new Error).stack;if(void 0===n)throw new Error("how did we not throw an error?");const r=n.split("\n").slice(1),i=e.getServer().scripts,o=[];for(const t of r){let e;for(const a of i){a.url&&t.includes(a.url)&&(e=a.filename);for(const n of a.dependencies)t.includes(n.url)&&(e=n.filename)}if(!e)continue;function s(t){const e=t.match(/.*:(\d+):\d+.*/),a=t.match(/.*at (.+) \(.*/);return e&&a?{line:e[1],func:a[1]}:null}let a={line:"-1",func:"unknown"};const n=s(t);function l(t){const e=t.match(/.*:(\d+):\d+$/),a=t.lastIndexOf("@");return e&&-1!==a?{line:e[1],func:t.slice(0,a)}:null}n&&(a=n);const r=l(t);r&&(a=r),o.push(`${e}:L${a.line}@${a.func}`)}e.log(t,()=>a);let c=`${t}: ${a}`;return 0!==o.length&&(c+="

Stack:
"+o.join("
")),Object(M.b)(e,c)},lt=function(t,a,{threads:n,stock:r}={}){if(void 0===t)throw st("hack","Takes 1 argument.");const i=Object(M.d)(e,"hack",n),f=at(t,"hack");if(!(f instanceof k.a))throw st("hack","Cannot be executed on this server.");const u=Object(l.d)(f,m.a),h=Object(c.b)(f,m.a);if(!h.res)throw st("hack",h.msg||"");return e.log("hack",()=>`Executing on '${f.hostname}' in ${Object(A.b)(1e3*u,!0)} (t=${T.a.formatThreads(i)})`),Object(M.c)(1e3*u,e).then((function(){const t=Object(l.b)(f,m.a),n=Math.random();let c=Object(l.c)(f,m.a)*i;const u=c/4;if(nf.moneyAvailable&&(h=f.moneyAvailable),f.moneyAvailable-=h,f.moneyAvailable<0&&(f.moneyAvailable=0);const d=h*o.a.ScriptHackMoneyGain;return m.a.gainMoney(d,"hacking"),e.scriptRef.onlineMoneyMade+=d,m.a.scriptProdSinceLastAug+=d,e.scriptRef.recordHack(f.hostname,d,i),m.a.gainHackingExp(c),a&&m.a.gainIntelligenceExp(.005),e.scriptRef.onlineExpGained+=c,e.log("hack",()=>`Successfully hacked '${f.hostname}' for ${T.a.formatMoney(d)} and ${T.a.formatExp(c)} exp (t=${T.a.formatThreads(i)})`),f.fortify(s.a.ServerFortifyAmount*Math.min(i,n)),r&&Object(w.c)(f,h),a&&(f.backdoorInstalled=!0),Promise.resolve(d)}return m.a.gainHackingExp(u),e.scriptRef.onlineExpGained+=u,e.log("hack",()=>`Failed to hack '${f.hostname}'. Gained ${T.a.formatExp(u)} exp (t=${T.a.formatThreads(i)})`),Promise.resolve(0)}))},ct=function(t){let e="";for(let a of t)a=Object(V.a)(a),e+="object"==typeof a?JSON.stringify(a):""+a;return e},ft={updateDynamicRam:a,makeRuntimeErrorMsg:st,string:(t,e,a)=>{if("string"==typeof a)return a;if("number"==typeof a)return a+"";throw st(t,e+" should be a string.")},number:(t,e,a)=>{if("string"==typeof a){const t=parseFloat(a);if(!isNaN(t))return t}else if("number"==typeof a){if(isNaN(a))throw st(t,e+" is NaN.");return a}throw st(t,e+" should be a number.")},boolean:t=>!!t,city:(t,e,a)=>{if("string"!=typeof a)throw st(t,e+" should be a city name.");const n=a;if(!Object.values(tt.a).includes(n))throw st(t,e+" should be a city name.");return n},getServer:at,checkSingularityAccess:function(t){if(4!==m.a.bitNodeN&&0===m.a.sourceFileLvl(4))throw st(t,"This singularity function requires Source-File 4 to run. A power up you obtain later in the game. It will be very obvious when and how you can obtain it.")},hack:lt,getValidPort:(t,e)=>{if(isNaN(e))throw st(t,`Invalid argument. Must be a port number between 1 and ${s.a.NumNetscriptPorts}, is ${e}`);if((e=Math.round(e))<1||e>s.a.NumNetscriptPorts)throw st(t,`Trying to use an invalid port: ${e}. Only ports 1-${s.a.NumNetscriptPorts} are valid.`);const a=x.a[e-1];if(null==a||!(a instanceof Object))throw st(t,`Could not find port: ${e}. This is a bug. Report to dev.`);return a}},ut=Object(I.a)(m.a,e,ft),mt=Object(F.a)(m.a,e,ft),ht=Object(D.a)(m.a,e,ft),dt=Object(j.a)(m.a,e,ft),pt=Object(B.a)(m.a,e,ft),gt=Object(W.a)(m.a,e,ft),yt=Object(H.a)(m.a,e,ft),bt=Object(U.a)(m.a,e,ft),Et=Object(q.a)(m.a,e,ft),vt=Object(z.a)(m.a,e,ft),kt=Object($.a)(m.a,e,ft),_t=Object(G.a)(m.a,e,ft),wt=Object(K.a)(m.a,e,ft),St={...{...vt,singularity:vt,gang:ut,bladeburner:gt,codingcontract:yt,sleeve:mt,corporation:bt,stanek:pt,ui:_t,formulas:Et,stock:kt,grafting:wt,args:e.args,hacknet:dt,sprintf:n.sprintf,vsprintf:n.vsprintf,scan:function(t=e.hostname){const n=ft.string("scan","hostname",t);a("scan",Object(r.c)(m.a,"scan"));const i=at(n,"scan"),o=[];for(let t=0;t`returned ${i.serversOnNetwork.length} connections for ${i.hostname}`),o},hack:function(t,{threads:e,stock:n}={}){const i=ft.string("hack","hostname",t);return a("hack",Object(r.c)(m.a,"hack")),lt(i,!1,{threads:e,stock:n})},hackAnalyzeThreads:function(t,n){const i=ft.string("hackAnalyzeThreads","hostname",t),o=ft.number("hackAnalyzeThreads","hackAmount",n);a("hackAnalyzeThreads",Object(r.c)(m.a,"hackAnalyzeThreads"));const s=at(i,"hackAnalyzeThreads");if(!(s instanceof k.a))return e.log("hackAnalyzeThreads",()=>"Cannot be executed on this server."),-1;if(isNaN(o))throw st("hackAnalyzeThreads",`Invalid hackAmount argument passed into hackAnalyzeThreads: ${o}. Must be numeric.`);if(o<0||o>s.moneyAvailable)return-1;if(0===o)return 0;const c=Object(l.e)(s,m.a);return 0===c||0===s.moneyAvailable?0:o/Math.floor(s.moneyAvailable*c)},hackAnalyze:function(t){const n=ft.string("hackAnalyze","hostname",t);a("hackAnalyze",Object(r.c)(m.a,"hackAnalyze"));const i=at(n,"hackAnalyze");return i instanceof k.a?Object(l.e)(i,m.a):(e.log("hackAnalyze",()=>"Cannot be executed on this server."),0)},hackAnalyzeSecurity:function(t){const e=ft.number("hackAnalyzeSecurity","threads",t);return a("hackAnalyzeSecurity",Object(r.c)(m.a,"hackAnalyzeSecurity")),s.a.ServerFortifyAmount*e},hackAnalyzeChance:function(t){const n=ft.string("hackAnalyzeChance","hostname",t);a("hackAnalyzeChance",Object(r.c)(m.a,"hackAnalyzeChance"));const i=at(n,"hackAnalyzeChance");return i instanceof k.a?Object(l.b)(i,m.a):(e.log("hackAnalyzeChance",()=>"Cannot be executed on this server."),0)},sleep:async function(t=0){const n=ft.number("sleep","time",t);if(a("sleep",Object(r.c)(m.a,"sleep")),void 0===n)throw st("sleep","Takes 1 argument.");return e.log("sleep",()=>`Sleeping for ${n} milliseconds`),Object(M.c)(n,e).then((function(){return Promise.resolve()}))},asleep:function(t=0){const n=ft.number("asleep","time",t);if(a("asleep",Object(r.c)(m.a,"asleep")),void 0===n)throw st("asleep","Takes 1 argument.");return e.log("asleep",()=>`Sleeping for ${n} milliseconds`),new Promise(t=>setTimeout(t,n))},grow:async function(t,{threads:n,stock:i}={}){const o=ft.string("grow","hostname",t);a("grow",Object(r.c)(m.a,"grow"));const s=Object(M.d)(e,"grow",null!=n?n:e.scriptRef.threads);if(void 0===o)throw st("grow","Takes 1 argument.");const f=at(o,"grow");if(!(f instanceof k.a))return e.log("grow",()=>"Cannot be executed on this server."),Promise.resolve(0);const u=Object(b.d)(e.hostname);if(null===u)throw new Error("Workerscript host is null");const h=Object(c.a)(f);if(!h.res)throw st("grow",h.msg||"");const d=Object(l.a)(f,m.a);return e.log("grow",()=>`Executing on '${f.hostname}' in ${Object(A.b)(1e3*d,!0)} (t=${T.a.formatThreads(s)}).`),Object(M.c)(1e3*d,e).then((function(){const t=f.moneyAvailable<=0?1:f.moneyAvailable;Object(E.e)(f,s,m.a,u.cpuCores);const a=f.moneyAvailable;e.scriptRef.recordGrow(f.hostname,s);const n=Object(l.c)(f,m.a)*s,r=a/t-1;return e.log("grow",()=>`Available money on '${f.hostname}' grown by ${T.a.formatPercentage(r,6)}. Gained ${T.a.formatExp(n)} hacking exp (t=${T.a.formatThreads(s)}).`),e.scriptRef.onlineExpGained+=n,m.a.gainHackingExp(n),i&&Object(w.b)(f,a-t),Promise.resolve(a/t)}))},growthAnalyze:function(t,n,i=1){const o=ft.string("growthAnalyze","hostname",t),s=ft.number("growthAnalyze","growth",n),l=ft.number("growthAnalyze","cores",i);a("growthAnalyze",Object(r.c)(m.a,"growthAnalyze"));const c=at(o,"growthAnalyze");if(!(c instanceof k.a))return e.log("growthAnalyze",()=>"Cannot be executed on this server."),0;if("number"!=typeof s||isNaN(s)||s<1||!isFinite(s))throw st("growthAnalyze",`Invalid argument: growth must be numeric and >= 1, is ${s}.`);return Object(E.c)(c,Number(s),m.a,l)},growthAnalyzeSecurity:function(t){const e=ft.number("growthAnalyzeSecurity","threads",t);return a("growthAnalyzeSecurity",Object(r.c)(m.a,"growthAnalyzeSecurity")),2*s.a.ServerFortifyAmount*e},weaken:async function(t,{threads:n}={}){const i=ft.string("weaken","hostname",t);a("weaken",Object(r.c)(m.a,"weaken"));const o=Object(M.d)(e,"weaken",null!=n?n:e.scriptRef.threads);if(void 0===i)throw st("weaken","Takes 1 argument.");const f=at(i,"weaken");if(!(f instanceof k.a))return e.log("weaken",()=>"Cannot be executed on this server."),Promise.resolve(0);const u=Object(c.c)(f);if(!u.res)throw st("weaken",u.msg||"");const h=Object(l.f)(f,m.a);return e.log("weaken",()=>`Executing on '${f.hostname}' in ${Object(A.b)(1e3*h,!0)} (t=${T.a.formatThreads(o)})`),Object(M.c)(1e3*h,e).then((function(){const t=Object(b.d)(e.hostname);if(null===t)return e.log("weaken",()=>"Server is null, did it die?"),Promise.resolve(0);const a=1+(t.cpuCores-1)/16;f.weaken(s.a.ServerWeakenAmount*o*a),e.scriptRef.recordWeaken(f.hostname,o);const n=Object(l.c)(f,m.a)*o;return e.log("weaken",()=>`'${f.hostname}' security level weakened to ${f.hackDifficulty}. Gained ${T.a.formatExp(n)} hacking exp (t=${T.a.formatThreads(o)})`),e.scriptRef.onlineExpGained+=n,m.a.gainHackingExp(n),Promise.resolve(s.a.ServerWeakenAmount*o*a)}))},weakenAnalyze:function(t,e=1){const n=ft.number("weakenAnalyze","threads",t),i=ft.number("weakenAnalyze","cores",e);a("weakenAnalyze",Object(r.c)(m.a,"weakenAnalyze"));const l=1+(i-1)/16;return s.a.ServerWeakenAmount*n*l*o.a.ServerWeakenRate},share:async function(){a("share",Object(r.c)(m.a,"share")),e.log("share",()=>"Sharing this computer.");const t=Object(Z.b)(e.scriptRef.threads*Object(Q.a)(m.a.intelligence,2));return Object(M.c)(1e4,e).finally((function(){e.log("share",()=>"Finished sharing this computer."),t()}))},getSharePower:function(){return a("getSharePower",Object(r.c)(m.a,"getSharePower")),Object(Z.a)()},print:function(...t){if(a("print",Object(r.c)(m.a,"print")),0===t.length)throw st("print","Takes at least 1 argument.");e.print(ct(t))},printf:function(t,...i){const o=ft.string("printf","format",t);if(a("printf",Object(r.c)(m.a,"printf")),"string"!=typeof o)throw st("printf","First argument must be string for the format.");e.print(Object(n.vsprintf)(o,i))},tprint:function(...t){if(a("tprint",Object(r.c)(m.a,"tprint")),0===t.length)throw st("tprint","Takes at least 1 argument.");const n=ct(t);n.startsWith("ERROR")||n.startsWith("FAIL")?u.a.error(`${e.scriptRef.filename}: ${n}`):n.startsWith("SUCCESS")?u.a.success(`${e.scriptRef.filename}: ${n}`):n.startsWith("WARN")?u.a.warn(`${e.scriptRef.filename}: ${n}`):n.startsWith("INFO")?u.a.info(`${e.scriptRef.filename}: ${n}`):u.a.print(`${e.scriptRef.filename}: ${n}`)},tprintf:function(t,...e){const i=ft.string("printf","format",t);if(a("tprintf",Object(r.c)(m.a,"tprintf")),"string"!=typeof i)throw st("tprintf","First argument must be string for the format.");const o=Object(n.vsprintf)(i,e);o.startsWith("ERROR")||o.startsWith("FAIL")?u.a.error(""+o):o.startsWith("SUCCESS")?u.a.success(""+o):o.startsWith("WARN")?u.a.warn(""+o):o.startsWith("INFO")?u.a.info(""+o):u.a.print(""+o)},clearLog:function(){a("clearLog",Object(r.c)(m.a,"clearLog")),e.scriptRef.clearLog()},disableLog:function(t){const n=ft.string("disableLog","fn",t);if(a("disableLog",Object(r.c)(m.a,"disableLog")),"ALL"===n){for(const t of Object.keys(Ct))e.disableLogs[t]=!0;e.log("disableLog",()=>"Disabled logging for all functions")}else{if(void 0===Ct[n])throw st("disableLog",`Invalid argument: ${n}.`);e.disableLogs[n]=!0,e.log("disableLog",()=>"Disabled logging for "+n)}},enableLog:function(t){const n=ft.string("enableLog","fn",t);if(a("enableLog",Object(r.c)(m.a,"enableLog")),"ALL"===n){for(const t of Object.keys(Ct))delete e.disableLogs[t];e.log("enableLog",()=>"Enabled logging for all functions")}else if(void 0===Ct[n])throw st("enableLog",`Invalid argument: ${n}.`);delete e.disableLogs[n],e.log("enableLog",()=>"Enabled logging for "+n)},isLogEnabled:function(t){const n=ft.string("isLogEnabled","fn",t);if(a("isLogEnabled",Object(r.c)(m.a,"isLogEnabled")),void 0===Ct[n])throw st("isLogEnabled",`Invalid argument: ${n}.`);return!e.disableLogs[n]},getScriptLogs:function(t,n,...i){a("getScriptLogs",Object(r.c)(m.a,"getScriptLogs"));const o=nt(t,n,"getScriptLogs",i);return null==o?(e.log("getScriptLogs",()=>it(t,n,i)),[]):o.logs.slice()},tail:function(t,n=e.hostname,...i){let o;a("tail",Object(r.c)(m.a,"tail")),o=0===arguments.length?e.scriptRef:"number"==typeof t?rt(t,"tail"):nt(t,n,"tail",i),null!=o?R.b.emit(o):e.log("tail",()=>it(t,n,i))},nuke:function(t){const n=ft.string("tail","hostname",t);if(a("nuke",Object(r.c)(m.a,"nuke")),void 0===n)throw st("nuke","Takes 1 argument.");const i=at(n,"nuke");if(!(i instanceof k.a))return e.log("nuke",()=>"Cannot be executed on this server."),!1;if(i.hasAdminRights)return e.log("nuke",()=>`Already have root access to '${i.hostname}'.`),!0;if(!m.a.hasProgram(h.a.NukeProgram.name))throw st("nuke","You do not have the NUKE.exe virus!");if(i.openPortCount`Executed NUKE.exe virus on '${i.hostname}' to gain root access.`),!0},brutessh:function(t){const n=ft.string("brutessh","hostname",t);if(a("brutessh",Object(r.c)(m.a,"brutessh")),void 0===n)throw st("brutessh","Takes 1 argument.");const i=at(n,"brutessh");if(!(i instanceof k.a))return e.log("brutessh",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.BruteSSHProgram.name))throw st("brutessh","You do not have the BruteSSH.exe program!");return i.sshPortOpen?e.log("brutessh",()=>`SSH Port (22) already opened on '${i.hostname}'.`):(e.log("brutessh",()=>`Executed BruteSSH.exe on '${i.hostname}' to open SSH port (22).`),i.sshPortOpen=!0,++i.openPortCount),!0},ftpcrack:function(t){const n=ft.string("ftpcrack","hostname",t);if(a("ftpcrack",Object(r.c)(m.a,"ftpcrack")),void 0===n)throw st("ftpcrack","Takes 1 argument.");const i=at(n,"ftpcrack");if(!(i instanceof k.a))return e.log("ftpcrack",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.FTPCrackProgram.name))throw st("ftpcrack","You do not have the FTPCrack.exe program!");return i.ftpPortOpen?e.log("ftpcrack",()=>`FTP Port (21) already opened on '${i.hostname}'.`):(e.log("ftpcrack",()=>`Executed FTPCrack.exe on '${i.hostname}' to open FTP port (21).`),i.ftpPortOpen=!0,++i.openPortCount),!0},relaysmtp:function(t){const n=ft.string("relaysmtp","hostname",t);if(a("relaysmtp",Object(r.c)(m.a,"relaysmtp")),void 0===n)throw st("relaysmtp","Takes 1 argument.");const i=at(n,"relaysmtp");if(!(i instanceof k.a))return e.log("relaysmtp",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.RelaySMTPProgram.name))throw st("relaysmtp","You do not have the relaySMTP.exe program!");return i.smtpPortOpen?e.log("relaysmtp",()=>`SMTP Port (25) already opened on '${i.hostname}'.`):(e.log("relaysmtp",()=>`Executed relaySMTP.exe on '${i.hostname}' to open SMTP port (25).`),i.smtpPortOpen=!0,++i.openPortCount),!0},httpworm:function(t){const n=ft.string("httpworm","hostname",t);if(a("httpworm",Object(r.c)(m.a,"httpworm")),void 0===n)throw st("httpworm","Takes 1 argument");const i=at(n,"httpworm");if(!(i instanceof k.a))return e.log("httpworm",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.HTTPWormProgram.name))throw st("httpworm","You do not have the HTTPWorm.exe program!");return i.httpPortOpen?e.log("httpworm",()=>`HTTP Port (80) already opened on '${i.hostname}'.`):(e.log("httpworm",()=>`Executed HTTPWorm.exe on '${i.hostname}' to open HTTP port (80).`),i.httpPortOpen=!0,++i.openPortCount),!0},sqlinject:function(t){const n=ft.string("sqlinject","hostname",t);if(a("sqlinject",Object(r.c)(m.a,"sqlinject")),void 0===n)throw st("sqlinject","Takes 1 argument.");const i=at(n,"sqlinject");if(!(i instanceof k.a))return e.log("sqlinject",()=>"Cannot be executed on this server."),!1;if(!m.a.hasProgram(h.a.SQLInjectProgram.name))throw st("sqlinject","You do not have the SQLInject.exe program!");return i.sqlPortOpen?e.log("sqlinject",()=>`SQL Port (1433) already opened on '${i.hostname}'.`):(e.log("sqlinject",()=>`Executed SQLInject.exe on '${i.hostname}' to open SQL port (1433).`),i.sqlPortOpen=!0,++i.openPortCount),!0},run:function(t,n=1,...i){const o=ft.string("run","scriptname",t),s=ft.number("run","threads",n);if(a("run",Object(r.c)(m.a,"run")),void 0===o)throw st("run","Usage: run(scriptname, [numThreads], [arg1], [arg2]...)");if(isNaN(s)||s<=0)throw st("run","Invalid thread count. Must be numeric and > 0, is "+s);const l=Object(b.d)(e.hostname);if(null==l)throw st("run","Could not find server. This is a bug. Report to dev.");return Object(x.d)(m.a,"run",l,o,i,e,s)},exec:function(t,n,i=1,...o){const s=ft.string("exec","scriptname",t),l=ft.string("exec","hostname",n),c=ft.number("exec","threads",i);if(a("exec",Object(r.c)(m.a,"exec")),void 0===s||void 0===l)throw st("exec","Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)");if(isNaN(c)||c<=0)throw st("exec","Invalid thread count. Must be numeric and > 0, is "+c);const f=at(l,"exec");return Object(x.d)(m.a,"exec",f,s,o,e,c)},spawn:function(t,n=1,...i){const o=ft.string("spawn","scriptname",t),s=ft.number("spawn","threads",n);if(a("spawn",Object(r.c)(m.a,"spawn")),!o||!s)throw st("spawn","Usage: spawn(scriptname, threads)");setTimeout(()=>{if(isNaN(s)||s<=0)throw st("spawn","Invalid thread count. Must be numeric and > 0, is "+s);const t=Object(b.d)(e.hostname);if(null==t)throw st("spawn","Could not find server. This is a bug. Report to dev");return Object(x.d)(m.a,"spawn",t,o,i,e,s)},1e4),e.log("spawn",()=>`Will execute '${o}' in 10 seconds`),e.running=!1,Object(L.a)(e)&&e.log("spawn",()=>"Exiting...")},kill:function(t,n,...i){let o;a("kill",Object(r.c)(m.a,"kill"));const s="number"==typeof t;if(s)o=Object(L.a)(t);else{if(void 0===t||void 0===n)throw st("kill","Usage: kill(scriptname, server, [arg1], [arg2]...)");const a=at(n,"kill"),r=nt(t,n,"kill",i);if(null==r)return e.log("kill",()=>it(t,n,i)),!1;o=Object(L.a)(r,a.hostname)}return o?(s?e.log("kill",()=>"Killing script with PID "+t):e.log("kill",()=>`Killing '${t}' on '${n}' with args: ${Object(N.a)(i)}.`),!0):(s?e.log("kill",()=>"No script with PID "+t):e.log("kill",()=>`No such script '${t}' on '${n}' with args: ${Object(N.a)(i)}`),!1)},killall:function(t=e.hostname){const n=ft.string("killall","hostname",t);if(a("killall",Object(r.c)(m.a,"killall")),void 0===n)throw st("killall","Takes 1 argument");const o=at(n,"killall"),s=o.runningScripts.length>0;for(let t=o.runningScripts.length-1;t>=0;--t)Object(L.a)(o.runningScripts[t],o.hostname,!1);return i.a.emit(),e.log("killall",()=>`Killing all scripts on '${o.hostname}'. May take a few minutes for the scripts to die.`),s},exit:function(){a("exit",Object(r.c)(m.a,"exit")),e.running=!1,Object(L.a)(e)?e.log("exit",()=>"Exiting..."):e.log("exit",()=>"Failed. This is a bug. Report to dev.")},scp:async function(t,n,i){const o=ft.string("scp","hostname1",n);if(a("scp",Object(r.c)(m.a,"scp")),2!==arguments.length&&3!==arguments.length)throw st("scp","Takes 2 or 3 arguments");if(t&&t.constructor===Array){const a=t;if(0===a.length)throw st("scp","No scripts to copy");let n=!0;return await Promise.all(a.map((async function(t){await et(e).scp(t,o,i)||(n=!1)}))),Promise.resolve(n)}if(!Object(S.j)(t))throw st("scp",`Invalid filename: '${t}'`);if(!t.endsWith(".lit")&&!Object(g.a)(t)&&!t.endsWith("txt"))throw st("scp","Only works for scripts, .lit and .txt files");let s,l;if(null!=i){if(void 0===t||void 0===o||void 0===i)throw st("scp","Takes 2 or 3 arguments");s=at(i,"scp"),l=at(o,"scp")}else{if(null==o)throw st("scp","Takes 2 or 3 arguments");if(void 0===t||void 0===o)throw st("scp","Takes 2 or 3 arguments");if(s=at(o,"scp"),l=Object(b.d)(e.hostname),null==l)throw st("scp","Could not find server hostname for this script. This is a bug. Report to dev.")}if(t.endsWith(".lit")){let a=!1;for(let e=0;e`File '${t}' does not exist.`),Promise.resolve(!1);for(let a=0;a{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0);return s.messages.push(t),e.log("scp",()=>{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0)}if(t.endsWith(".txt")){let a;for(let e=0;e`File '${t}' does not exist.`),Promise.resolve(!1);for(let n=0;n{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0);const n=new C.a(a.fn,a.text);return s.textFiles.push(n),e.log("scp",()=>{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),Promise.resolve(!0)}let c=null;for(let e=0;e`File '${t}' does not exist.`),Promise.resolve(!1);for(let a=0;a{var e;return`WARNING: File '${t}' overwritten on '${null===(e=s)||void 0===e?void 0:e.hostname}'`});const n=s.scripts[a];return n.code===c.code||(n.code=c.code,n.ramUsage=c.ramUsage,n.markUpdated()),Promise.resolve(!0)}const f=new d.a(m.a,t);return f.code=c.code,f.ramUsage=c.ramUsage,f.server=s.hostname,s.scripts.push(f),e.log("scp",()=>{var e;return`File '${t}' copied over to '${null===(e=s)||void 0===e?void 0:e.hostname}'.`}),new Promise(t=>{null!==s?f.updateRamUsage(m.a,s.scripts).then(()=>t(!0)):t(!1)})},ls:function(t,e=""){const n=ft.string("ls","hostname",t),i=ft.string("ls","grep",e);if(a("ls",Object(r.c)(m.a,"ls")),void 0===n)throw st("ls","Usage: ls(hostname/ip, [grep filter])");const o=at(n,"ls");let s="";arguments.length>=2&&(s=i.toString());const l=[];for(let t=0;t"returned "+m.a.hacking),m.a.hacking},getHackingMultipliers:function(){return a("getHackingMultipliers",Object(r.c)(m.a,"getHackingMultipliers")),{chance:m.a.hacking_chance_mult,speed:m.a.hacking_speed_mult,money:m.a.hacking_money_mult,growth:m.a.hacking_grow_mult}},getHacknetMultipliers:function(){return a("getHacknetMultipliers",Object(r.c)(m.a,"getHacknetMultipliers")),{production:m.a.hacknet_node_money_mult,purchaseCost:m.a.hacknet_node_purchase_cost_mult,ramCost:m.a.hacknet_node_ram_cost_mult,coreCost:m.a.hacknet_node_core_cost_mult,levelCost:m.a.hacknet_node_level_cost_mult}},getBitNodeMultipliers:function(){if(a("getBitNodeMultipliers",Object(r.c)(m.a,"getBitNodeMultipliers")),_.a[5]<=0&&5!==m.a.bitNodeN)throw st("getBitNodeMultipliers","Requires Source-File 5 to run.");return Object.assign({},o.a)},getServer:function(t=e.hostname){const n=ft.string("getServer","hostname",t);a("getServer",Object(r.c)(m.a,"getServer"));const i=at(n,"getServer"),o=Object.assign({},i);return o.contracts=void 0,o.messages=void 0,o.runningScripts=void 0,o.scripts=void 0,o.textFiles=void 0,o.programs=void 0,o.serversOnNetwork=void 0,o.baseDifficulty||(o.baseDifficulty=0),o.hackDifficulty||(o.hackDifficulty=0),o.minDifficulty||(o.minDifficulty=0),o.moneyAvailable||(o.moneyAvailable=0),o.moneyMax||(o.moneyMax=0),o.numOpenPortsRequired||(o.numOpenPortsRequired=0),o.openPortCount||(o.openPortCount=0),o.requiredHackingSkill||(o.requiredHackingSkill=0),o.serverGrowth||(o.serverGrowth=0),o},getServerMoneyAvailable:function(t){const n=ft.string("getServerMoneyAvailable","hostname",t);a("getServerMoneyAvailable",Object(r.c)(m.a,"getServerMoneyAvailable"));const i=at(n,"getServerMoneyAvailable");return i instanceof k.a?ot(i,"getServerMoneyAvailable")?0:"home"==i.hostname?(e.log("getServerMoneyAvailable",()=>"returned player's money: "+T.a.formatMoney(m.a.money)),m.a.money):(e.log("getServerMoneyAvailable",()=>`returned ${T.a.formatMoney(i.moneyAvailable)} for '${i.hostname}'`),i.moneyAvailable):(e.log("getServerMoneyAvailable",()=>"Cannot be executed on this server."),0)},getServerSecurityLevel:function(t){const n=ft.string("getServerSecurityLevel","hostname",t);a("getServerSecurityLevel",Object(r.c)(m.a,"getServerSecurityLevel"));const i=at(n,"getServerSecurityLevel");return i instanceof k.a?ot(i,"getServerSecurityLevel")?1:(e.log("getServerSecurityLevel",()=>`returned ${T.a.formatServerSecurity(i.hackDifficulty)} for '${i.hostname}'`),i.hackDifficulty):(e.log("getServerSecurityLevel",()=>"Cannot be executed on this server."),1)},getServerBaseSecurityLevel:function(t){const n=ft.string("getServerBaseSecurityLevel","hostname",t);a("getServerBaseSecurityLevel",Object(r.c)(m.a,"getServerBaseSecurityLevel")),e.log("getServerBaseSecurityLevel",()=>"getServerBaseSecurityLevel is deprecated because it's not useful.");const i=at(n,"getServerBaseSecurityLevel");return i instanceof k.a?ot(i,"getServerBaseSecurityLevel")?1:(e.log("getServerBaseSecurityLevel",()=>`returned ${T.a.formatServerSecurity(i.baseDifficulty)} for '${i.hostname}'`),i.baseDifficulty):(e.log("getServerBaseSecurityLevel",()=>"Cannot be executed on this server."),1)},getServerMinSecurityLevel:function(t){const n=ft.string("getServerMinSecurityLevel","hostname",t);a("getServerMinSecurityLevel",Object(r.c)(m.a,"getServerMinSecurityLevel"));const i=at(n,"getServerMinSecurityLevel");return i instanceof k.a?ot(i,"getServerMinSecurityLevel")?1:(e.log("getServerMinSecurityLevel",()=>`returned ${T.a.formatServerSecurity(i.minDifficulty)} for ${i.hostname}`),i.minDifficulty):(e.log("getServerMinSecurityLevel",()=>"Cannot be executed on this server."),1)},getServerRequiredHackingLevel:function(t){const n=ft.string("getServerRequiredHackingLevel","hostname",t);a("getServerRequiredHackingLevel",Object(r.c)(m.a,"getServerRequiredHackingLevel"));const i=at(n,"getServerRequiredHackingLevel");return i instanceof k.a?ot(i,"getServerRequiredHackingLevel")?1:(e.log("getServerRequiredHackingLevel",()=>`returned ${T.a.formatSkill(i.requiredHackingSkill)} for '${i.hostname}'`),i.requiredHackingSkill):(e.log("getServerRequiredHackingLevel",()=>"Cannot be executed on this server."),1)},getServerMaxMoney:function(t){const n=ft.string("getServerMaxMoney","hostname",t);a("getServerMaxMoney",Object(r.c)(m.a,"getServerMaxMoney"));const i=at(n,"getServerMaxMoney");return i instanceof k.a?ot(i,"getServerMaxMoney")?0:(e.log("getServerMaxMoney",()=>`returned ${T.a.formatMoney(i.moneyMax)} for '${i.hostname}'`),i.moneyMax):(e.log("getServerMaxMoney",()=>"Cannot be executed on this server."),0)},getServerGrowth:function(t){const n=ft.string("getServerGrowth","hostname",t);a("getServerGrowth",Object(r.c)(m.a,"getServerGrowth"));const i=at(n,"getServerGrowth");return i instanceof k.a?ot(i,"getServerGrowth")?1:(e.log("getServerGrowth",()=>`returned ${i.serverGrowth} for '${i.hostname}'`),i.serverGrowth):(e.log("getServerGrowth",()=>"Cannot be executed on this server."),1)},getServerNumPortsRequired:function(t){const n=ft.string("getServerNumPortsRequired","hostname",t);a("getServerNumPortsRequired",Object(r.c)(m.a,"getServerNumPortsRequired"));const i=at(n,"getServerNumPortsRequired");return i instanceof k.a?ot(i,"getServerNumPortsRequired")?5:(e.log("getServerNumPortsRequired",()=>`returned ${i.numOpenPortsRequired} for '${i.hostname}'`),i.numOpenPortsRequired):(e.log("getServerNumPortsRequired",()=>"Cannot be executed on this server."),5)},getServerRam:function(t){const n=ft.string("getServerRam","hostname",t);a("getServerRam",Object(r.c)(m.a,"getServerRam")),e.log("getServerRam",()=>"getServerRam is deprecated in favor of getServerMaxRam / getServerUsedRam");const i=at(n,"getServerRam");return e.log("getServerRam",()=>`returned [${T.a.formatRAM(i.maxRam)}, ${T.a.formatRAM(i.ramUsed)}]`),[i.maxRam,i.ramUsed]},getServerMaxRam:function(t){const n=ft.string("getServerMaxRam","hostname",t);a("getServerMaxRam",Object(r.c)(m.a,"getServerMaxRam"));const i=at(n,"getServerMaxRam");return e.log("getServerMaxRam",()=>"returned "+T.a.formatRAM(i.maxRam)),i.maxRam},getServerUsedRam:function(t){const n=ft.string("getServerUsedRam","hostname",t);a("getServerUsedRam",Object(r.c)(m.a,"getServerUsedRam"));const i=at(n,"getServerUsedRam");return e.log("getServerUsedRam",()=>"returned "+T.a.formatRAM(i.ramUsed)),i.ramUsed},serverExists:function(t){const e=ft.string("serverExists","hostname",t);return a("serverExists",Object(r.c)(m.a,"serverExists")),null!==Object(b.d)(e)},fileExists:function(t,n=e.hostname){const i=ft.string("fileExists","filename",t),o=ft.string("fileExists","hostname",n);if(a("fileExists",Object(r.c)(m.a,"fileExists")),void 0===i)throw st("fileExists","Usage: fileExists(scriptname, [server])");const s=at(o,"fileExists");for(let t=0;t`Invalid argument: ram='${n}'`),1/0):i},purchaseServer:function(t,n){const i=ft.string("purchaseServer","name",t),o=ft.number("purchaseServer","ram",n);if(2!==arguments.length)throw st("purchaseServer","Takes 2 arguments");a("purchaseServer",Object(r.c)(m.a,"purchaseServer"));let s=String(i);if(s=s.replace(/\s+/g,""),""==s)return e.log("purchaseServer",()=>`Invalid argument: hostname='${s}'`),"";if(m.a.purchasedServers.length>=Object(v.b)())return e.log("purchaseServer",()=>`You have reached the maximum limit of ${Object(v.b)()} servers. You cannot purchase any more.`),"";const l=Object(v.a)(o);if(l===1/0)return o>Object(v.c)()?e.log("purchaseServer",()=>`Invalid argument: ram='${o}' must not be greater than getPurchaseServerMaxRam`):e.log("purchaseServer",()=>`Invalid argument: ram='${o}' must be a positive power of 2`),"";if(m.a.money"Not enough money to purchase server. Need "+T.a.formatMoney(l)),"";const c=Object(E.f)({ip:Object(b.e)(),hostname:s,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:o});Object(b.a)(c),m.a.purchasedServers.push(c.hostname);const f=m.a.getHomeComputer();return f.serversOnNetwork.push(c.hostname),c.serversOnNetwork.push(f.hostname),m.a.loseMoney(l,"servers"),e.log("purchaseServer",()=>`Purchased new server with hostname '${c.hostname}' for ${T.a.formatMoney(l)}`),c.hostname},deleteServer:function(t){const n=ft.string("purchaseServer","name",t);a("deleteServer",Object(r.c)(m.a,"deleteServer"));let i=String(n);i=i.replace(/\s\s+/g,"");const o=Object(b.d)(i);if(!(o instanceof k.a))return e.log("deleteServer",()=>`Invalid argument: hostname='${i}'`),!1;if(!o.purchasedByPlayer||"home"===o.hostname)return e.log("deleteServer",()=>"Cannot delete non-purchased server."),!1;const s=o.hostname;if(o.isConnectedTo)return e.log("deleteServer",()=>"You are currently connected to the server you are trying to delete."),!1;if(s===e.hostname)return e.log("deleteServer",()=>"Cannot delete the server this script is running on."),!1;if(o.runningScripts.length>0)return e.log("deleteServer",()=>`Cannot delete server '${s}' because it still has scripts running.`),!1;let l=!1;for(let t=0;t`Could not identify server ${s} as a purchased server. This is a bug. Report to dev.`),!1;Object(b.b)(s),l=!1;const c=m.a.getHomeComputer();for(let t=0;t"Deleted server '"+i),!0;return e.log("deleteServer",()=>`Could not find server ${s} as a purchased server. This is a bug. Report to dev.`),!1},getPurchasedServers:function(){a("getPurchasedServers",Object(r.c)(m.a,"getPurchasedServers"));const t=[];return m.a.purchasedServers.forEach((function(e){t.push(e)})),t},writePort:function(t,e=""){const n=ft.number("writePort","port",t);if(a("writePort",Object(r.c)(m.a,"writePort")),"string"!=typeof e&&"number"!=typeof e)throw st("writePort","Trying to write invalid data to a port: only strings and numbers are valid.");const i=ft.getValidPort("writePort",n);return Promise.resolve(i.write(e))},write:function(t,n="",i="a"){const o=ft.string("write","port",t),s=ft.string("write","mode",i);if(a("write",Object(r.c)(m.a,"write")),Object(P.a)(o)){let t=o;if(!Object(S.j)(t))throw st("write","Invalid filepath: "+t);0===t.lastIndexOf("/")&&(t=Object(S.k)(t));try{n=String(n)}catch(t){throw st("write",`Invalid data (${t}). Data being written must be convertible to a string`)}const a=e.getServer();if(null==a)throw st("write","Error getting Server. This is a bug. Report to dev.");if(Object(g.a)(t)){let r=e.getScriptOnServer(t,a);return null==r?(r=new d.a(m.a,t,n,a.hostname,a.scripts),a.scripts.push(r),r.updateRamUsage(m.a,a.scripts)):("w"===s?r.code=n:r.code+=n,r.updateRamUsage(m.a,a.scripts))}{const e=Object(C.c)(t,a);if(null==e)return Object(C.b)(t,n,a),Promise.resolve();"w"===s?e.write(n):e.append(n)}return Promise.resolve()}throw st("write","Invalid argument: "+o)},tryWritePort:function(t,e=""){let n=ft.number("tryWritePort","port",t);if(a("tryWritePort",Object(r.c)(m.a,"tryWritePort")),"string"!=typeof e&&"number"!=typeof e)throw st("tryWritePort","Trying to write invalid data to a port: only strings and numbers are valid.");if(isNaN(n))throw st("tryWritePort","Invalid argument: "+n);{if(n=Math.round(n),n<1||n>s.a.NumNetscriptPorts)throw st("tryWritePort",`Invalid port: ${n}. Only ports 1-${s.a.NumNetscriptPorts} are valid.`);const t=x.a[n-1];if(null==t||!(t instanceof Object))throw st("tryWritePort",`Could not find port: ${n}. This is a bug. Report to dev.`);return Promise.resolve(t.tryWrite(e))}},readPort:function(t){const e=ft.number("readPort","port",t);a("readPort",Object(r.c)(m.a,"readPort"));return ft.getValidPort("readPort",e).read()},read:function(t){const n=ft.string("read","port",t);if(a("read",Object(r.c)(m.a,"read")),Object(P.a)(n)){const t=n,a=Object(b.d)(e.hostname);if(null==a)throw st("read","Error getting Server. This is a bug. Report to dev.");if(Object(g.a)(t)){const n=e.getScriptOnServer(t,a);return null==n?"":n.code}{const e=Object(C.c)(t,a);return null!==e?e.text:""}}throw st("read","Invalid argument: "+n)},peek:function(t){const e=ft.number("peek","port",t);a("peek",Object(r.c)(m.a,"peek"));return ft.getValidPort("peek",e).peek()},clear:function(t){const n=ft.string("peek","file",t);if(a("clear",Object(r.c)(m.a,"clear")),!Object(P.a)(n))throw st("clear","Invalid argument: "+n);{const t=n,a=Object(b.d)(e.hostname);if(null==a)throw st("clear","Error getting Server. This is a bug. Report to dev.");const r=Object(C.c)(t,a);null!=r&&r.write("")}},clearPort:function(t){const e=ft.number("clearPort","port",t);a("clearPort",Object(r.c)(m.a,"clearPort"));ft.getValidPort("clearPort",e).clear()},getPortHandle:function(t){const e=ft.number("getPortHandle","port",t);a("getPortHandle",Object(r.c)(m.a,"getPortHandle"));return ft.getValidPort("getPortHandle",e)},rm:function(t,n){const i=ft.string("rm","fn",t);a("rm",Object(r.c)(m.a,"rm")),null!=n&&""!==n||(n=e.hostname);const o=at(n,"rm").removeFile(i);return o.res||e.log("rm",()=>o.msg+""),o.res},scriptRunning:function(t,e){const n=ft.string("scriptRunning","scriptname",t),i=ft.string("scriptRunning","hostname",e);a("scriptRunning",Object(r.c)(m.a,"scriptRunning"));const o=at(i,"scriptRunning");for(let t=0;t"invalid for this kind of server"),1/0)},getGrowTime:function(t=e.hostname){const n=ft.string("getGrowTime","hostname",t);a("getGrowTime",Object(r.c)(m.a,"getGrowTime"));const i=at(n,"getGrowTime");return i instanceof k.a?ot(i,"getGrowTime")?1/0:1e3*Object(l.a)(i,m.a):(e.log("getGrowTime",()=>"invalid for this kind of server"),1/0)},getWeakenTime:function(t=e.hostname){const n=ft.string("getWeakenTime","hostname",t);a("getWeakenTime",Object(r.c)(m.a,"getWeakenTime"));const i=at(n,"getWeakenTime");return i instanceof k.a?ot(i,"getWeakenTime")?1/0:1e3*Object(l.f)(i,m.a):(e.log("getWeakenTime",()=>"invalid for this kind of server"),1/0)},getScriptIncome:function(t,n,...i){if(a("getScriptIncome",Object(r.c)(m.a,"getScriptIncome")),0===arguments.length){const t=[];let e=0;for(const t of O.a.values())e+=t.scriptRef.onlineMoneyMade/t.scriptRef.onlineRunningTime;return t.push(e),t.push(m.a.scriptProdSinceLastAug/(m.a.playtimeSinceLastAug/1e3)),t}{const a=at(n,"getScriptIncome"),r=Object(p.a)(t,i,a);return null==r?(e.log("getScriptIncome",()=>`No such script '${t}' on '${a.hostname}' with args: ${Object(N.a)(i)}`),-1):r.onlineMoneyMade/r.onlineRunningTime}},getScriptExpGain:function(t,n,...i){if(a("getScriptExpGain",Object(r.c)(m.a,"getScriptExpGain")),0===arguments.length){let t=0;for(const e of O.a.values())t+=e.scriptRef.onlineExpGained/e.scriptRef.onlineRunningTime;return t}{const a=at(n,"getScriptExpGain"),r=Object(p.a)(t,i,a);return null==r?(e.log("getScriptExpGain",()=>`No such script '${t}' on '${a.hostname}' with args: ${Object(N.a)(i)}`),-1):r.onlineExpGained/r.onlineRunningTime}},nFormat:function(t,e){const n=ft.number("nFormat","n",t),i=ft.string("nFormat","format",e);return a("nFormat",Object(r.c)(m.a,"nFormat")),isNaN(n)?"":T.a.format(n,i)},tFormat:function(t,e=!1){const n=ft.number("tFormat","milliseconds",t),i=ft.boolean(e);return a("tFormat",Object(r.c)(m.a,"tFormat")),Object(A.b)(n,i)},getTimeSinceLastAug:function(){return a("getTimeSinceLastAug",Object(r.c)(m.a,"getTimeSinceLastAug")),m.a.playtimeSinceLastAug},alert:function(t){const e=ft.string("alert","message",t);a("alert",Object(r.c)(m.a,"alert")),Object(Y.a)(e)},toast:function(t,e="success",n=2e3){const i=ft.string("toast","message",t),o=ft.string("toast","variant",e);if(a("toast",Object(r.c)(m.a,"toast")),!["success","info","warning","error"].includes(o))throw new Error('variant must be one of "success", "info", "warning", or "error"');J.b.emit(i,o,n)},prompt:function(t,e){const n=ft.string("toast","txt",t);return a("prompt",Object(r.c)(m.a,"prompt")),new Promise((function(t){y.a.emit({txt:n,options:e,resolve:t})}))},wget:async function(n,i,o=e.hostname){const s=ft.string("wget","url",n),l=ft.string("wget","target",i),c=ft.string("wget","hostname",o);if(a("wget",Object(r.c)(m.a,"wget")),!Object(g.a)(l)&&!l.endsWith(".txt"))return e.log("wget",()=>`Invalid target file: '${l}'. Must be a script or text file.`),Promise.resolve(!1);const f=at(c,"wget");return new Promise((function(a){t.get(s,(function(t){let n;return n=Object(g.a)(l)?f.writeToScriptFile(m.a,l,t):f.writeToTextFile(l,t),n.success?n.overwritten?(e.log("wget",()=>`Successfully retrieved content and overwrote '${l}' on '${c}'`),a(!0)):(e.log("wget",()=>`Successfully retrieved content to new file '${l}' on '${c}'`),a(!0)):(e.log("wget",()=>"Failed."),a(!1))}),"text").fail((function(t){return e.log("wget",()=>JSON.stringify(t)),a(!1)}))}))},getFavorToDonate:function(){return a("getFavorToDonate",Object(r.c)(m.a,"getFavorToDonate")),Math.floor(s.a.BaseFavorToDonate*o.a.RepToDonateToFaction)},getOwnedSourceFiles:function(){a("getOwnedSourceFiles",Object(r.c)(m.a,"getOwnedSourceFiles"));const t=[];for(let e=0;e{t()}},mv:function(t,e,n){const i=ft.string("mv","host",t),o=ft.string("mv","source",e),s=ft.string("mv","destination",n);if(a("mv",Object(r.c)(m.a,"mv")),!Object(S.j)(o))throw st("mv",`Invalid filename: '${o}'`);if(!Object(S.j)(s))throw st("mv",`Invalid filename: '${s}'`);const l=o.endsWith(".txt"),c=s.endsWith(".txt");if(!Object(g.a)(o)&&!l)throw st("mv","'mv' can only be used on scripts and text files (.txt)");if(l!=c)throw st("mv","Source and destination files must have the same type");if(o===s)return;const f=at(i,"mv");if(!l&&f.isRunning(o))throw st("mv","Cannot use 'mv' on a script that is running");const u=l?f.textFiles:f.scripts;let h=null,p=null;for(let t=0;t[t,!0]));return St}}).call(this,a(811))},function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return o})),a.d(e,"a",(function(){return s}));var n=a(148),r=a(101);function i(t,e){const a=t.organizationName;let i=null;if("string"==typeof a&&""!==a&&(i=r.a[a]),!(i instanceof n.a))return;const o=e/t.moneyMax;Math.random()0?e.requiredHacking+r:0,o=e.requiredStrength>0?e.requiredStrength+r:0,s=e.requiredDefense>0?e.requiredDefense+r:0,l=e.requiredDexterity>0?e.requiredDexterity+r:0,c=e.requiredDexterity>0?e.requiredDexterity+r:0,f=e.requiredCharisma>0?e.requiredCharisma+r:0,u=e.requiredReputation;return a?(n="Requires:
",n+=i.toString()+" hacking
",n+=o.toString()+" strength
",n+=s.toString()+" defense
",n+=l.toString()+" dexterity
",n+=c.toString()+" agility
",n+=f.toString()+" charisma
",n+=u.toString()+" reputation"):(n="(Requires ",i>0&&(n+=i+" hacking, "),o>0&&(n+=o+" strength, "),s>0&&(n+=s+" defense, "),l>0&&(n+=l+" dexterity, "),c>0&&(n+=c+" agility, "),f>0&&(n+=f+" charisma, "),u>1&&(n+=u+" reputation, "),n=n.substring(0,n.length-2),n+=")"),n}a.d(e,"a",(function(){return n}))},,function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return i}));const n=["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/-a/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 [hostname] Connects to a remote server"," cp [src] [dst] Copy a file"," 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"," grow Spoof money in a servers bank account, increasing the amount available."," hack Hack the current machine"," help [command] Display this help text, or the help text for a command"," history [-c] Display the terminal history"," home Connect to home computer"," hostname Displays the hostname 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 one or more scripts or text files"," ps Display all scripts that are currently running"," rm [file] Delete a file from the server"," run [name] [-t n] [--tail] [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"," top Displays all running scripts and their RAM usage"," unalias [alias name] Deletes the specified alias"," vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode"," weaken Reduce the security of the current machine"," wget [url] [target file] Retrieves code/text from a web server"," "],r=t=>[`Usage: ${t} [file ...] | [glob]`," ","Opens up the specified file(s) in the Script Editor. Only scripts (.js, .ns, .script) or text files (.txt) ","can be edited using the Script Editor. If a file does not exist a new one will be created"," ",`If provided a glob as the only argument, ${t} can spider directories and open all matching `,`files at once. ${t} cannot create files using globs, so your scripts must already exist.`," ","Examples:"," ",` ${t} test.js`,` ${t} test.js test2.js`," ",` ${t} test.*`,` ${t} /my-dir/*.js`," "],i={alias:['Usage: 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."," "],analyze:["Usage: analyze"," ","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."," "],backdoor:["Usage: backdoor"," ","Install a backdoor on the current machine, grants a secret bonus depending on the machine."," ","Requires root access to run."," "],buy:["Usage: buy [-l / -a / 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."," ","If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs."," ","Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive."," "],cat:["Usage: cat [file]"," ","Display message (.msg), literature (.lit), or text (.txt) files. Examples:"," "," cat j1.msg"," "," cat foo.lit"," "," cat servers.txt"," "],cd:["Usage: 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 ../"," "],check:["Usage: 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"," "],clear:["Usage: 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"," "],cls:["Usage: 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"," "],connect:["Usage: connect [hostname]"," ","Connect to a remote server. The hostname 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."," "],cp:["Usage: cp [src] [dst]"," ","Copy a file on this server. To copy a file to another server use scp."," "],download:["Usage: 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"," "],expr:["Usage: 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."," "],free:["Usage: free"," ","Displays 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."," "],grow:["Usage: grow"," ","Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.","See the wiki page for hacking mechanics."," "],hack:["Usage: hack"," ","Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics"," "],help:["Usage: 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"," "],history:["Usage: history [-c]"," ","Without arguments, displays the terminal command history. To clear the history, pass in the '-c' argument."," "],home:["Usage: home"," ","Connect to your home computer. This will work no matter what server you are currently connected to."," "],hostname:["Usage: hostname"," ","Prints the hostname of the current server"," "],kill:["Usage: kill [script name] [args...] or 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"," "],killall:["Usage: 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."," "],ls:["Usage: ls [dir] [-l] [--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 '-l' optional parameter allows you to force each item onto a single line."," ","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 -l --grep .script"," ","List all files with the '.js' extension in the root directory:"," "," ls / -l --grep .js"," ","List all files with the word 'purchase' in the filename, in the 'scripts' directory:"," "," ls scripts -l --grep purchase"," "],lscpu:["Usage: lscpu"," ","Prints the number of CPU Cores the current server has"," "],mem:["Usage: 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."," "],mv:["Usage: 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"," "],nano:r("nano"),ps:["Usage: ps"," ","Prints all scripts that are running on the current server"," "],rm:["Usage: 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"," "],run:["Usage: run [file name] [-t] [num threads] [args...]"," ","Execute a program, script or coding contract."," ","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. "," "],scan:["Usage: 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."," "],"scan-analyze":["Usage: 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."," "],scp:["Usage: scp [filename ...] [target server]"," ","Copies the specified file(s) from the current server to the target server. ","This command only works for script files (.script or .js 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. Examples:"," "," scp foo.script n00dles"," "," scp foo.script bar.script n00dles"," "],sudov:["Usage: sudov"," ","Prints whether or not you have root access to the current machine"," "],tail:["Usage: 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"," "],top:["Usage: 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."," "],unalias:["Usage: 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'"," "],vim:r("vim"),weaken:["Usage: weaken"," ","Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.","Requires root access. See the wiki page for hacking mechanics."," "],wget:["Usage: 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"," "]}},function(t,e,a){"use strict";a.d(e,"b",(function(){return l})),a.d(e,"a",(function(){return c}));var n,r,i=a(27),o=a(251),s=a(8);!function(t){t[t.Production=0]="Production",t[t.Development=1]="Development"}(n||(n={})),function(t){t[t.Browser=0]="Browser",t[t.Steam=1]="Steam"}(r||(r={}));const l="https://github.com/danielyxie/bitburner/issues/new";function c(t,e,a){var c,f,u;const m=function(t,e,a){const i=navigator.userAgent.toLowerCase().indexOf(" electron/")>-1,l=n.Production,c={version:s.a.VersionString,hash:Object(o.a)(),toDisplay:()=>`v${s.a.VersionString} (${Object(o.a)()})`},f={userAgent:navigator.userAgent,language:navigator.language,cookiesEnabled:navigator.cookieEnabled,doNotTrack:navigator.doNotTrack,indexedDb:!!window.indexedDB};return{platform:i?r.Steam:r.Browser,environment:l,version:c,features:f,error:t,errorInfo:e,page:a}}(t,e,a),h=m.error.fileName,d=`lang=${m.features.language} cookiesEnabled=${m.features.cookiesEnabled.toString()} doNotTrack=${m.features.doNotTrack} indexedDb=${m.features.indexedDb.toString()}`,p=`${m.error.name}: ${m.error.message}${m.page&&` (at "${i.a[m.page]}")`}`,g=`\n## ${p}\n\n### How did this happen?\n\nPlease fill this information with details if relevant.\n\n- [ ] Save file\n- [ ] Minimal scripts to reproduce the issue\n- [ ] Steps to reproduce\n\n### Environment\n\n* Error: ${null!==(c=null===(f=m.error)||void 0===f?void 0:f.toString())&&void 0!==c?c:"n/a"}\n* Page: ${m.page?i.a[m.page]:"n/a"}\n* Version: ${m.version.toDisplay()}\n* Environment: ${n[m.environment]}\n* Platform: ${r[m.platform]}\n* UserAgent: ${navigator.userAgent}\n* Features: ${d}\n* Source: ${null!=h?h:"n/a"}\n\n${m.environment===n.Development?`\n### Stack Trace\n\`\`\`\n${null===(u=m.errorInfo)||void 0===u?void 0:u.componentStack.toString().trim()}\n\`\`\`\n`:""}\n### Save\n\`\`\`\nCopy your save here if possible\n\`\`\`\n`.trim();return{metadata:m,fileName:h,features:d,title:p,body:g,issueUrl:`${l}?title=${encodeURIComponent(p)}&body=${encodeURIComponent(g)}`}}},,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(36);function r(t){const e=Math.max(Math.min(t,255),0);return Object(n.a)(0,e)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(36);const r={Tracking:()=>Object(n.a)(5,75)/10,"Bounty Hunter":()=>Object(n.a)(5,75)/10,Retirement:()=>Object(n.a)(5,75)/10,Investigation:()=>Object(n.a)(10,40)/10,"Undercover Operation":()=>Object(n.a)(10,40)/10,"Sting Operation":()=>Object(n.a)(3,40)/10,Raid:()=>Object(n.a)(2,40)/10,"Stealth Retirement Operation":()=>Object(n.a)(1,20)/10,Assassination:()=>Object(n.a)(1,20)/10}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(149);function r(t){const e={},a=Object.keys(n.a);for(let n=0;n=this.cards.length)throw new Error("Tried to remove invalid card from Hand by index: "+t);return new n([...this.cards.slice().splice(t,1)])}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a(1),i=a(23),o=a(10);function s(t){return n.createElement(i.a,{title:null!=t.tooltip?n.createElement(r.a,null,t.tooltip):""},n.createElement(o.a,{onClick:t.onClick},t.text))}},,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(111),r=a(253),i=a(83),o=a(223),s=a(98),l=a(339),c=a(317);function f(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class u{constructor(t={hostname:"",ip:Object(l.a)()}){f(this,"contracts",[]),f(this,"cpuCores",1),f(this,"ftpPortOpen",!1),f(this,"hasAdminRights",!1),f(this,"hostname",""),f(this,"httpPortOpen",!1),f(this,"ip",""),f(this,"isConnectedTo",!1),f(this,"maxRam",0),f(this,"messages",[]),f(this,"organizationName",""),f(this,"programs",[]),f(this,"ramUsed",0),f(this,"runningScripts",[]),f(this,"scripts",[]),f(this,"serversOnNetwork",[]),f(this,"smtpPortOpen",!1),f(this,"sqlPortOpen",!1),f(this,"sshPortOpen",!1),f(this,"textFiles",[]),f(this,"purchasedByPlayer",!1),this.ip=t.ip?t.ip:Object(l.a)(),this.hostname=t.hostname,this.organizationName=null!=t.organizationName?t.organizationName:"",this.isConnectedTo=null!=t.isConnectedTo&&t.isConnectedTo,this.hasAdminRights=null!=t.adminRights&&t.adminRights}addContract(t){this.contracts.push(t)}getContract(t){for(const e of this.contracts)if(e.fn===t)return e;return null}getRunningScript(t,e){for(const a of this.runningScripts)if(a.filename===t&&Object(c.a)(a.args,e))return a;return null}getScript(t){for(let e=0;ee.fn!==t.fn):this.contracts=this.contracts.filter(e=>e.fn!==t)}removeFile(t){if(t.endsWith(".exe")||null!=t.match(/^.+\.exe-\d+(?:\.\d*)?%-INC$/)){for(let e=0;e{h.subscribe(t=>e(t))}),null===t)return r.a.createElement(r.a.Fragment,null);function d(){null!==t&&(t.onClose(),e(null))}const p=o.d[t.c.type],g=[];for(const[e,a]of p.desc(t.c.data).split("\n").entries())g.push(r.a.createElement("span",{key:e,dangerouslySetInnerHTML:{__html:a+"
"}}));return r.a.createElement(l.a,{open:null!==t,onClose:d},r.a.createElement(s.a,{variant:"h4",value:t.c.type}),r.a.createElement(f.a,null,"You are attempting to solve a Coding Contract. You have ",t.c.getMaxNumTries()-t.c.tries," tries remaining, after which the contract will self-destruct."),r.a.createElement("br",null),r.a.createElement(f.a,null,g),r.a.createElement("br",null),r.a.createElement(u.a,{autoFocus:!0,placeholder:"Enter Solution here",value:a,onChange:function(t){c(t.target.value)},onKeyDown:function(e){if(null===t)return;const n=e.target.value;e.key===i.a.ENTER&&""!==n&&(e.preventDefault(),t.onAttempt(a),c(""),d())},InputProps:{endAdornment:r.a.createElement(m.a,{onClick:()=>{t.onAttempt(a),c(""),d()}},"Solve")}}))}},,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return f})),a.d(e,"b",(function(){return u}));var n=a(0),r=a.n(n),i=a(41),o=a(30),s=a(131),l=a(1),c=a(10);const f=new s.a;function u(){const t=o.b.Router(),[e,a]=Object(n.useState)(!1);return Object(n.useEffect)(()=>f.subscribe(()=>a(!0)),[]),r.a.createElement(i.a,{open:e,onClose:()=>a(!1)},r.a.createElement(l.a,null,"WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.",r.a.createElement("br",null),r.a.createElement("br",null),"Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{onClick:function(){t.toBitVerse(!0,!1),a(!1)}},"Travel to the BitVerse"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(747),r=a(640),i=a(643),o=a(424),s=a(46),l=a(431),c=a(11),f=a(372),u=a(17),m=a(379),h=a(25),d=a(24),p=a(36);class g{constructor(){this.hacking=1,this.hp=10,this.max_hp=10,this.strength=1,this.defense=1,this.dexterity=1,this.agility=1,this.charisma=1,this.intelligence=0,this.hacking_chance_mult=1,this.hacking_speed_mult=1,this.hacking_money_mult=1,this.hacking_grow_mult=1,this.hacking_exp=0,this.strength_exp=0,this.defense_exp=0,this.dexterity_exp=0,this.agility_exp=0,this.charisma_exp=0,this.intelligence_exp=0,this.hacking_mult=1,this.strength_mult=1,this.defense_mult=1,this.dexterity_mult=1,this.agility_mult=1,this.charisma_mult=1,this.hacking_exp_mult=1,this.strength_exp_mult=1,this.defense_exp_mult=1,this.dexterity_exp_mult=1,this.agility_exp_mult=1,this.charisma_exp_mult=1,this.company_rep_mult=1,this.faction_rep_mult=1,this.money=1e3,this.city=u.a.Sector12,this.location=c.a.TravelAgency,this.jobs={},this.companyName="",this.currentServer="",this.purchasedServers=[],this.hacknetNodes=[],this.hashManager=new f.a,this.factions=[],this.factionInvitations=[],this.queuedAugmentations=[],this.augmentations=[],this.sourceFiles=[],this.numPeopleKilled=0,this.karma=0,this.crime_money_mult=1,this.crime_success_mult=1,this.isWorking=!1,this.focus=!1,this.workType="",this.workCostMult=1,this.workExpMult=1,this.currentWorkFactionName="",this.currentWorkFactionDescription="",this.workHackExpGainRate=0,this.workStrExpGainRate=0,this.workDefExpGainRate=0,this.workDexExpGainRate=0,this.workAgiExpGainRate=0,this.workChaExpGainRate=0,this.workRepGainRate=0,this.workMoneyGainRate=0,this.workMoneyLossRate=0,this.workHackExpGained=0,this.workStrExpGained=0,this.workDefExpGained=0,this.workDexExpGained=0,this.workAgiExpGained=0,this.workChaExpGained=0,this.workRepGained=0,this.workMoneyGained=0,this.createProgramName="",this.createProgramReqLvl=0,this.graftAugmentationName="",this.timeWorkedGraftAugmentation=0,this.className="",this.crimeType="",this.timeWorked=0,this.timeWorkedCreateProgram=0,this.timeNeededToCompleteWork=0,this.work_money_mult=1,this.hacknet_node_money_mult=1,this.hacknet_node_purchase_cost_mult=1,this.hacknet_node_ram_cost_mult=1,this.hacknet_node_core_cost_mult=1,this.hacknet_node_level_cost_mult=1,this.hasWseAccount=!1,this.hasTixApiAccess=!1,this.has4SData=!1,this.has4SDataTixApi=!1,this.gang=null,this.corporation=null,this.bladeburner=null,this.bladeburner_max_stamina_mult=1,this.bladeburner_stamina_gain_mult=1,this.bladeburner_analysis_mult=1,this.bladeburner_success_chance_mult=1,this.sleeves=[],this.sleevesFromCovenant=0,this.bitNodeN=1,this.entropy=0,this.lastUpdate=0,this.lastSave=0,this.totalPlaytime=0,this.playtimeSinceLastAug=0,this.playtimeSinceLastBitnode=0,this.moneySourceA=new m.a,this.moneySourceB=new m.a,this.scriptProdSinceLastAug=0,this.exploits=[],this.achievements=[],this.terminalCommandHistory=[],this.identifier=Object(d.c)("I-"+(new Date).getTime()+navigator.userAgent+window.innerWidth+window.innerHeight+Object(p.a)(100,999)),this.init=s.gb,this.prestigeAugmentation=s.jb,this.prestigeSourceFile=s.kb,this.receiveInvite=s.sb,this.calculateSkill=s.o,this.calculateSkillProgress=s.p,this.updateSkillLevels=s.Rb,this.resetMultipliers=s.vb,this.hasProgram=s.eb,this.setMoney=s.yb,this.gainMoney=s.M,this.loseMoney=s.ib,this.canAfford=s.s,this.recordMoneySource=s.tb,this.gainHackingExp=s.K,this.gainStrengthExp=s.N,this.gainDefenseExp=s.I,this.gainDexterityExp=s.J,this.gainAgilityExp=s.F,this.gainCharismaExp=s.G,this.gainIntelligenceExp=s.L,this.queryStatFromString=s.nb,this.resetWorkStatus=s.wb,this.processWorkEarnings=s.mb,this.startWork=s.Lb,this.cancelationPenalty=s.t,this.work=s.Sb,this.finishWork=s.D,this.startWorkPartTime=s.Mb,this.workPartTime=s.Ub,this.finishWorkPartTime=s.E,this.startFocusing=s.Jb,this.stopFocusing=s.Nb,this.startFactionWork=s.Ib,this.startFactionHackWork=s.Gb,this.startFactionFieldWork=s.Fb,this.startFactionSecurityWork=s.Hb,this.workForFaction=s.Tb,this.finishFactionWork=s.B,this.getWorkMoneyGain=s.X,this.getWorkHackExpGain=s.W,this.getWorkStrExpGain=s.Z,this.getWorkDefExpGain=s.U,this.getWorkDexExpGain=s.V,this.getWorkAgiExpGain=s.S,this.getWorkChaExpGain=s.T,this.getWorkRepGain=s.Y,this.process=s.lb,this.startCreateProgramWork=s.Db,this.createProgramWork=s.x,this.finishCreateProgramWork=s.z,this.startGraftAugmentationWork=s.Kb,this.graftAugmentationWork=s.w,this.finishGraftAugmentationWork=s.C,this.startClass=s.Cb,this.takeClass=s.Ob,this.finishClass=s.y,this.startCrime=s.Eb,this.commitCrime=s.v,this.finishCrime=s.A,this.singularityStopWork=s.Ab,this.takeDamage=s.Pb,this.regenerateHp=s.ub,this.hospitalize=s.fb,this.applyForJob=s.f,this.getNextCompanyPosition=s.R,this.quitJob=s.pb,this.hasJob=s.db,this.applyForSoftwareJob=s.m,this.applyForSoftwareConsultantJob=s.l,this.applyForItJob=s.e,this.applyForSecurityEngineerJob=s.j,this.applyForNetworkEngineerJob=s.g,this.applyForBusinessJob=s.c,this.applyForBusinessConsultantJob=s.b,this.applyForSecurityJob=s.k,this.applyForAgentJob=s.a,this.applyForEmployeeJob=s.d,this.applyForPartTimeEmployeeJob=s.h,this.applyForWaiterJob=s.n,this.applyForPartTimeWaiterJob=s.i,this.isQualified=s.hb,this.reapplyAllAugmentations=s.qb,this.reapplyAllSourceFiles=s.rb,this.checkForFactionInvitations=s.u,this.setBitNodeNumber=s.xb,this.queueAugmentation=s.ob,this.gainCodingContractReward=s.H,this.travel=s.Qb,this.gotoLocation=s.cb,this.canAccessGrafting=s.r,this.giveExploit=s.bb,this.giveAchievement=s.ab,this.getIntelligenceBonus=s.P,this.getCasinoWinnings=s.O,this.hasAugmentation=n.b,this.canAccessBladeburner=r.a,this.inBladeburner=r.b,this.startBladeburner=r.c,this.canAccessCorporation=i.a,this.hasCorporation=i.b,this.startCorporation=i.c,this.canAccessGang=o.a,this.getGangFaction=o.b,this.getGangName=o.c,this.hasGangWith=o.d,this.inGang=o.e,this.startGang=o.f,this.hasTorRouter=l.f,this.getCurrentServer=l.b,this.getHomeComputer=l.c,this.getUpgradeHomeRamCost=l.e,this.getUpgradeHomeCoresCost=l.d,this.createHacknetServer=l.a,this.factionWorkType="",this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,this.getMult=s.Q,this.setMult=s.zb,this.canAccessCotMG=s.q,this.sourceFileLvl=s.Bb,this.applyEntropy=n.a}toJSON(){return Object(h.b)("PlayerObject",this)}static fromJSON(t){return Object(h.a)(g,t.data)}}h.c.constructors.PlayerObject=g},function(t,e,a){"use strict";a.d(e,"a",(function(){return u})),a.d(e,"b",(function(){return m}));var n=a(0),r=a.n(n),i=a(105),o=a(41),s=a(30),l=a(131),c=a(1),f=a(10);const u=new l.a;function m(){const[t,e]=Object(n.useState)(null),a=s.b.Player();return Object(n.useEffect)(()=>u.subscribe(t=>e(t)),[]),r.a.createElement(o.a,{open:null!==t,onClose:()=>e(null)},r.a.createElement(c.a,{variant:"h4"},"You have received a faction invitation."),r.a.createElement(c.a,null,"Would you like to join ",(t||{name:""}).name,"? ",r.a.createElement("br",null),r.a.createElement("br",null),"Warning: Joining this faction may prevent you from joining other factions during this run!"),r.a.createElement(f.a,{onClick:function(){if(null===t)return;-1===a.factionInvitations.findIndex(e=>e===t.name)&&console.error("Could not find faction in Player.factionInvitations"),Object(i.e)(t),e(null)}},"Join!"),r.a.createElement(f.a,{onClick:()=>e(null)},"Decide later"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(1005),r=a(16);function i(t){const e=n.a[t];if(null==e)return;const a=`${e.title}

${e.txt}`;Object(r.a)(a)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));class n{constructor(t,e,a,n,r){this.name=t,this.desc=e,this.isHacking=a,this.isCombat=n,this.baseRespect=r.baseRespect?r.baseRespect:0,this.baseWanted=r.baseWanted?r.baseWanted:0,this.baseMoney=r.baseMoney?r.baseMoney:0,this.hackWeight=r.hackWeight?r.hackWeight:0,this.strWeight=r.strWeight?r.strWeight:0,this.defWeight=r.defWeight?r.defWeight:0,this.dexWeight=r.dexWeight?r.dexWeight:0,this.agiWeight=r.agiWeight?r.agiWeight:0,this.chaWeight=r.chaWeight?r.chaWeight:0,100!=Math.round(this.hackWeight+this.strWeight+this.defWeight+this.dexWeight+this.agiWeight+this.chaWeight)&&console.error(`GangMemberTask ${this.name} weights do not add up to 100`),this.difficulty=r.difficulty?r.difficulty:1,this.territory=r.territory?r.territory:{money:1,respect:1,wanted:1}}}},function(t,e,a){"use strict";function n(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}a.d(e,"a",(function(){return r}));class r{constructor(t,e){n(this,"lvl",1),n(this,"n",1),this.n=t,this.lvl=e}}},function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"a",(function(){return r}));const n=[];function r(t){if(!n.find(e=>e.pid===t.pid))for(n.unshift({filename:t.name,args:t.args,pid:t.pid,timestamp:new Date,runningScript:t.scriptRef});n.length>50;)n.pop()}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(254),r=function(t,e,a=0){this.sourceCode=t,this.sourceCodeLineOffset=a,"string"==typeof t&&(t=n.a(t,r.PARSE_OPTIONS)),this.ast=t,this.initFunc_=e,this.paused_=!1,this.polyfills_=[],this.functionCounter_=0,this.stepFunctions_=Object.create(null);var i,o,s=/^step([A-Z]\w*)$/;for(var l in this)"function"==typeof this[l]&&(i=l.match(s))&&(this.stepFunctions_[i[1]]=this[l].bind(this));this.global=this.createScope(this.ast,null),this.ast=n.a(this.polyfills_.join("\n"),r.PARSE_OPTIONS),this.polyfills_=void 0,this.stripLocations_(this.ast,void 0,void 0),(o=new r.State(this.ast,this.global)).done=!1,this.stateStack=[o],this.run(),this.value=void 0,this.ast=t,(o=new r.State(this.ast,this.global)).done=!1,this.stateStack.length=0,this.stateStack[0]=o,this.nodeConstructor=o.node.constructor,this.stateStack=this.stateStack}; /** * @license * JavaScript Interpreter @@ -16,5 +16,5 @@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(t){var e=this.sourceCode;if(null==t||null==t.start)return NaN;try{return((e=e.substring(0,t.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(t){return NaN}},r.prototype.getErrorLineNumberMessage=function(t){return isNaN(t)?" (Unknown line number)":t<=0?" (Error occurred in an imported function)":" (Line Number "+t+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(t){var e=this.stateStack[0];if(!e||"Program"!==e.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof t&&(t=a.a(t,r.PARSE_OPTIONS)),!t||"Program"!==t.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(t,e.scope);for(var n,i=0;n=t.body[i];i++)e.node.body.push(n);e.done=!1},r.prototype.step=function(){var t=this.stateStack,e=t[t.length-1];if(!e)return!1;var n=e.node,a=n.type;if("Program"===a&&e.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[a](t,e,n)}catch(t){if(t!==r.STEP_ERROR)throw t}return i&&t.push(i),!!n.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(t){this.setProperty(t,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(t,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(t,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(t,"window",t,r.READONLY_DESCRIPTOR),this.setProperty(t,"this",t,r.READONLY_DESCRIPTOR),this.setProperty(t,"self",t),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(t),this.initObject(t),t.proto=this.OBJECT_PROTO,this.setProperty(t,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(t),this.initString(t),this.initBoolean(t),this.initNumber(t),this.initDate(t),this.initRegExp(t),this.initError(t),this.initMath(t),this.initJSON(t);var e=this,n=this.createNativeFunction((function(t){throw EvalError("Can't happen")}),!1);n.eval=!0,this.setProperty(t,"eval",n),this.setProperty(t,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(t,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(t,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(t,"isFinite",this.createNativeFunction(isFinite,!1));for(var a=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 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;","}","});","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;","}","});","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","});","}","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","});","}","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++;","}","}","});","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;","}","});","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;","}","});","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;","}","});","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;","}","});","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) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","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(',');","}","});","")},r.prototype.initString=function(t){var e,n=this;e=function(t){return t=String(t),n.calledWithNew()?(this.data=t,this):t},this.STRING=this.createNativeFunction(e,!0),this.setProperty(t,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),r.NONENUMERABLE_DESCRIPTOR);for(var a=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],i=0;i= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","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;","};","})();","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;","};","}","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;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},r.prototype.initBoolean=function(t){var e,n=this;e=function(t){return t=Boolean(t),n.calledWithNew()?(this.data=t,this):t},this.BOOLEAN=this.createNativeFunction(e,!0),this.setProperty(t,"Boolean",this.BOOLEAN)},r.prototype.initNumber=function(t){var e,n=this;e=function(t){return t=Number(t),n.calledWithNew()?(this.data=t,this):t},this.NUMBER=this.createNativeFunction(e,!0),this.setProperty(t,"Number",this.NUMBER);for(var a=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i>>0;return e===Number(t)?e:NaN},r.legalArrayIndex=function(t){var e=t>>>0;return String(e)===String(t)&&4294967295!==e?e:NaN},r.Value,r.Object=function(t){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=t},r.Object.prototype.proto=null,r.Object.prototype.isObject=!0,r.Object.prototype.class="Object",r.Object.prototype.data=null,r.Object.prototype.toString=function(){if("Array"===this.class){(a=r.toStringCycles_).push(this);try{for(var t=[],e=0;e0;i.pop()){var o=i[i.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:t,value:e,label:n});case"CallExpression":case"NewExpression":if(t===r.Completion.RETURN)return void(o.value=e);if(t!==r.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(t===r.Completion.BREAK){if(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop||o.isSwitch)return void i.pop()}else if(t===r.Completion.CONTINUE&&(n?o.labels&&-1!==o.labels.indexOf(n):o.isLoop))return}var s;if(this.isa(e,this.ERROR)){var l={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},c=this.getProperty(e,"name").toString(),f=this.getProperty(e,"message").valueOf();s=(t=l[c]||Error)(f+a)}else s=String(e)+a;throw s},r.prototype.createGetter_=function(t,e){var n=Array.isArray(e)?e[0]:e,a=new this.nodeConstructor;a.type="CallExpression";var i=new r.State(a,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=n,i.func_=t,i.doneArgs_=!0,i.arguments_=[],i},r.prototype.createSetter_=function(t,e,n){var a=Array.isArray(e)?e[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var o=new r.State(i,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=a,o.func_=t,o.doneArgs_=!0,o.arguments_=[n],o},r.State=function(t,e){this.node=t,this.scope=e},r.prototype.stepArrayExpression=function(t,e,n){var a=n.elements,i=e.n_||0;for(e.array_?(this.setProperty(e.array_,i,e.value),i++):(e.array_=this.createObjectProto(this.ARRAY_PROTO),e.array_.properties.length=a.length);i>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+n.operator)}var c=this.setValue(e.leftReference_,s);if(c)return e.doneSetter_=!0,e.setterValue_=s,this.createSetter_(c,e.leftReference_,s);t.pop(),t[t.length-1].value=s},r.prototype.stepBinaryExpression=function(t,e,n){if(!e.doneLeft_)return e.doneLeft_=!0,new r.State(n.left,e.scope);if(!e.doneRight_)return e.doneRight_=!0,e.leftValue_=e.value,new r.State(n.right,e.scope);t.pop();var a,i=e.leftValue_,o=e.value;switch(n.operator){case"==":a=i==o;break;case"!=":a=i!=o;break;case"===":a=i===o;break;case"!==":a=i!==o;break;case">":a=i>o;break;case">=":a=i>=o;break;case"<":a=i>":a=i>>o;break;case">>>":a=i>>>o;break;case"in":if(!o||!o.isObject){let t=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'",t)}a=this.hasProperty(o,i);break;case"instanceof":if(!this.isa(o,this.FUNCTION)){let t=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object",t)}a=!!i.isObject&&this.isa(i,o);break;default:throw SyntaxError("Unknown binary operator: "+n.operator)}t[t.length-1].value=a},r.prototype.stepBlockStatement=function(t,e,n){var a=e.n_||0,i=n.body[a];if(i)return e.n_=a+1,new r.State(i,e.scope);t.pop()},r.prototype.stepBreakStatement=function(t,e,n){var a=n.label&&n.label.name;this.unwind(r.Completion.BREAK,void 0,a)},r.prototype.stepCallExpression=function(t,e,n){if(!e.doneCallee_){e.doneCallee_=1;var i=new r.State(n.callee,e.scope);return i.components=!0,i}if(1===e.doneCallee_){e.doneCallee_=2;var o=e.value;if(Array.isArray(o)){if(e.func_=this.getValue(o,n),o[0]===r.SCOPE_REFERENCE?e.directEval_="eval"===o[1]:e.funcThis_=o[0],(o=e.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,e.doneCallee_=1,this.createGetter_(o,e.value)}else e.func_=o;e.arguments_=[],e.n_=0}o=e.func_;if(!e.doneArgs_){if(0!==e.n_&&e.arguments_.push(e.value),n.arguments[e.n_])return new r.State(n.arguments[e.n_++],e.scope);if("NewExpression"===n.type){if(o.illegalConstructor){let t=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a constructor",t)}var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),e.funcThis_=this.createObjectProto(s),e.isConstructor=!0}else void 0===e.funcThis_&&(e.funcThis_=e.scope.strict?void 0:this.global);e.doneArgs_=!0}if(e.doneExec_)t.pop(),e.isConstructor&&"object"!=typeof e.value?t[t.length-1].value=e.funcThis_:t[t.length-1].value=e.value;else{if(e.doneExec_=!0,!o||!o.isObject){let t=this.getErrorLineNumber(n);this.throwException(this.TYPE_ERROR,o+" is not a function",t)}var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),f=0;ff?e.arguments_[f]:void 0;this.setProperty(c,u,m)}var h=this.createObjectProto(this.ARRAY_PROTO);for(f=0;fa.a.ServerMaxGrowthRate&&(s=a.a.ServerMaxGrowthRate);const l=o*(t.serverGrowth/100)*r.a.ServerGrowthRate,c=1+(i-1)/16;return Math.pow(s,l*n.hacking_grow_mult*c)}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(5),r=n(57),i=n(15),o=n(29);function s(t,e){const n=t.augmentations.map(t=>t.name),s=[];function l(t){if(t.name===i.a.NeuroFluxGovernor)return!1;if(n.includes(t.name))return!1;if(s.includes(t))return!1;if(t.isSpecial)return!1;const e=["hacking_mult","strength_mult","defense_mult","dexterity_mult","agility_mult","charisma_mult","hacking_exp_mult","strength_exp_mult","defense_exp_mult","dexterity_exp_mult","agility_exp_mult","charisma_exp_mult","company_rep_mult","faction_rep_mult","crime_money_mult","crime_success_mult","work_money_mult"];for(const n of Object.keys(t.mults))if(e.includes(n))return!0;return!1}if(e.inGang()){const t=e.getGangFaction();for(const e of Object.keys(r.a)){const n=r.a[e];l(n)&&(t.playerReputation>n.baseRepRequirement&&s.push(n))}}for(const t of e.factions){if(t===a.a.Bladeburners)continue;if(t===a.a.Netburners)continue;const e=o.a[t];if(null!=e)for(const t of e.augmentations){const n=r.a[t];l(n)&&(e.playerReputation>n.baseRepRequirement&&s.push(n))}}return s}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a=new(n(131).a)},function(t,e,n){"use strict";n.d(e,"b",(function(){return O})),n.d(e,"a",(function(){return A}));var a=n(1742),r=n(1743),i=n(1744),o=n(1),s=n(535),l=n(10),c=n(21),f=n(65),u=n(286),m=n(330),h=n(0),d=n.n(h),p=n(57),g=n(15),y=n(8),b=n(105),E=n(11),v=n(218),k=n(9),_=n(30),w=n(250),S=n(20),C=n(24),x=n(467);const L={},O=t=>{const e=[];for(const[t,n]of Object.entries(p.a))t===g.a.NeuroFluxGovernor||t===g.a.TheRedPill||n.isSpecial||e.push(t);return e.filter(e=>!t.hasAugmentation(e))},M=(t,e)=>!(t.money{const e=t.aug,n=t.player;return d.a.createElement(o.a,{color:k.a.theme.money},d.a.createElement("b",null,"Pre-Requisites:"),d.a.createElement("br",null),e.prereqs.map(t=>d.a.createElement("span",{style:{display:"flex",alignItems:"center"}},n.hasAugmentation(t)?d.a.createElement(a.a,{sx:{mr:1}}):d.a.createElement(r.a,{sx:{mr:1}}),t)))},A=()=>{const t=_.b.Player(),e=_.b.Router();for(const t of Object.values(p.a)){const e=t.name,n=new x.a(t);L[e]=n}const[n,a]=Object(h.useState)(O(t)[0]),[r,g]=Object(h.useState)(!1);return d.a.createElement(s.a,{disableGutters:!0,maxWidth:"lg",sx:{mx:0}},d.a.createElement(l.a,{onClick:()=>e.toLocation(v.a[E.a.NewTokyoVitaLife])},"Back"),d.a.createElement(o.a,{variant:"h4"},"Grafting Laboratory"),d.a.createElement(o.a,null,"You find yourself in a secret laboratory, owned by a mysterious researcher.",d.a.createElement("br",null),"The scientist explains that they've been studying Augmentation grafting, the process of applying Augmentations without requiring a body reset.",d.a.createElement("br",null),d.a.createElement("br",null),"Through legally questionable connections, the scientist has access to a vast array of Augmentation blueprints, even private designs. They offer to build and graft the Augmentations to you, in exchange for both a hefty sum of money, and being a lab rat."),d.a.createElement(c.a,{sx:{my:3}},d.a.createElement(o.a,{variant:"h5"},"Graft Augmentations"),O(t).length>0?d.a.createElement(f.a,{sx:{my:1,width:"fit-content",display:"grid",gridTemplateColumns:"1fr 3fr"}},d.a.createElement(u.a,{sx:{maxHeight:400,overflowY:"scroll",borderRight:"1px solid "+k.a.theme.welllight}},O(t).map((t,e)=>d.a.createElement(m.a,{key:e+1,onClick:()=>a(t),selected:n===t},d.a.createElement(o.a,null,t)))),d.a.createElement(c.a,{sx:{m:1}},d.a.createElement(o.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},d.a.createElement(i.a,{sx:{mr:1}})," ",n),d.a.createElement(l.a,{onClick:()=>g(!0),sx:{width:"100%"},disabled:!M(t,L[n])},"Graft Augmentation (",d.a.createElement(o.a,null,d.a.createElement(S.a,{money:L[n].cost,player:t})),")"),d.a.createElement(w.a,{open:r,onClose:()=>g(!1),onConfirm:()=>{const a=L[n];t.loseMoney(a.cost,"augmentations"),t.startGraftAugmentationWork(n,a.time),t.startFocusing(),e.toWork()},confirmationText:d.a.createElement(d.a.Fragment,null,"Cancelling grafting will ",d.a.createElement("b",null,"not")," save grafting progress, and the money you spend will ",d.a.createElement("b",null,"not")," ","be returned.",d.a.createElement("br",null),d.a.createElement("br",null),"Additionally, grafting an Augmentation will increase the potency of the Entropy virus.")}),d.a.createElement(o.a,{color:k.a.theme.info},d.a.createElement("b",null,"Time to Graft:")," ",Object(C.b)(L[n].time/(1+(t.getIntelligenceBonus(3)-1)/3))),p.a[n].prereqs.length>0&&d.a.createElement(T,{player:t,aug:p.a[n]}),d.a.createElement("br",null),d.a.createElement(o.a,{sx:{maxHeight:305,overflowY:"scroll"}},(()=>{const t=p.a[n],e="string"==typeof t.info?d.a.createElement("span",null,t.info):t.info;return d.a.createElement(d.a.Fragment,null,e,d.a.createElement("br",null),d.a.createElement("br",null),t.stats)})()))):d.a.createElement(o.a,null,"All Augmentations owned")),d.a.createElement(c.a,{sx:{my:3}},d.a.createElement(o.a,{variant:"h5"},"Entropy Virus"),d.a.createElement(f.a,{sx:{my:1,p:1,width:"fit-content"}},d.a.createElement(o.a,null,d.a.createElement("b",null,"Entropy strength:")," ",t.entropy,d.a.createElement("br",null),d.a.createElement("b",null,"All multipliers decreased by:")," ",Object(C.d)(100*(1-y.a.EntropyEffect**t.entropy),3),"% (multiplicative)")),d.a.createElement(o.a,null,"When installed on an unconscious individual, Augmentations are scanned by the body on awakening, eliminating hidden malware. However, grafted Augmentations do not provide this security measure.",d.a.createElement("br",null),d.a.createElement("br",null),'Individuals who tested Augmentation grafting have reported symptoms of an unknown virus, which they\'ve dubbed "Entropy". This virus seems to grow more potent with each grafted Augmentation...')))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return l})),n.d(e,"a",(function(){return c}));var a=n(98),r=n(1047),i=n.n(r),o=n(1048),s=n.n(o);function l(t,e){const n=1==t.length||"*.*"===t?null:t.slice(1),r=new s.a,o=(t,e)=>{for(let a=0;at.filename),e.scripts.map(t=>t.code)),n&&!n.endsWith(".txt")||o(e.textFiles.map(t=>t.fn),e.textFiles.map(t=>t.text)),0==Object.keys(r.files).length)throw new Error("No files match the pattern "+t);const l=`bitburner${Object(a.a)(t)?"Scripts":"*.txt"===t?"Texts":"Files"}.zip`;r.generateAsync({type:"blob"}).then(t=>i.a.saveAs(t,l))}function c(t,e,n,r,i){try{if(1!==i.length)return void t.error("Incorrect usage of download command. Usage: download [script/text file]");const e=i[0]+"";if(e.startsWith("*"))try{return void l(e,r)}catch(e){return t.error(e.message)}else if(Object(a.a)(e)){const a=t.getScript(n,e);if(null!=a)return a.download()}else{if(!e.endsWith(".txt"))return void t.error("Cannot download this filetype");{const a=t.getTextFile(n,e);if(null!=a)return a.download()}}return void t.error(e+" does not exist")}catch(e){return void t.error(e+"")}}},,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(15),o=n(330),s=n(107),l=n(21),c=n(1),f=n(65),u=n(211),m=n(75),h=n.n(m),d=n(156),p=n.n(d);function g(t){const[e,n]=Object(a.useState)(!1);let m=t.aug.name;return null!=t.level&&t.aug.name===i.a.NeuroFluxGovernor&&(m+=" - Level "+t.level),"string"==typeof t.aug.info?r.a.createElement(l.a,{component:f.a},r.a.createElement(o.a,{onClick:()=>n(t=>!t)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},m)}),e?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"})),r.a.createElement(u.a,{in:e,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,{dangerouslySetInnerHTML:{__html:t.aug.info}}),t.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,t.aug.stats))))):r.a.createElement(l.a,{component:f.a},r.a.createElement(o.a,{onClick:()=>n(t=>!t)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},m)}),e?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"})),r.a.createElement(u.a,{in:e,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,null,t.aug.info,t.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),t.aug.stats)))))}},,,,,function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return i}));var a=n(0);const r=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 166 132",style:{fill:"#adff2f"}},a.createElement("g",null,a.createElement("path",{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"}),a.createElement("path",{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"}))),i=a.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"-22 0 511 511.99561",style:{fill:"#adff2f"}},a.createElement("path",{d:"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"}),a.createElement("path",{d:"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"}),a.createElement("path",{d:"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"}),a.createElement("path",{d:"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(61),o=n(30),s=n(1),l=n(23),c=n(21),f=n(114),u=n(602),m=n.n(u),h=n(603),d=n.n(h);function p({action:t,isActive:e,bladeburner:n,rerender:a}){const u=o.b.Player(),h=t.level1;return r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{display:"flex"},r.a.createElement(l.a,{title:r.a.createElement(s.a,null,t.getSuccessesNeededForNextLevel(i.a.ContractSuccessesPerLevel)," successes needed for next level")},r.a.createElement(s.a,null,"Level: ",t.level," / ",t.maxLevel))),r.a.createElement(l.a,{title:e?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!h,onClick:function(){h&&(++t.level,e&&n.startAction(u,n.action),a())}},r.a.createElement(m.a,null)))),r.a.createElement(l.a,{title:e?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!p,onClick:function(){p&&(--t.level,e&&n.startAction(u,n.action),a())}},r.a.createElement(d.a,null)))))}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(1),o=n(23),s=n(21),l=n(274);function c(t){return r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(o.a,{title:r.a.createElement(i.a,null,"Automatically increase operation level when possible")},r.a.createElement(i.a,null," Autolevel:")),r.a.createElement(l.a,{checked:t.action.autoLevel,onChange:function(e){t.action.autoLevel=e.target.checked,t.rerender()}}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(1131),o=n(24),s=n(10);function l(t){const[e,n]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{disabled:0===t.bladeburner.teamSize,onClick:()=>n(!0)},"Set Team Size (Curr Size: ",Object(o.d)(t.action.teamCount,0),")"),r.a.createElement(i.a,{open:e,onClose:()=>n(!1),action:t.action,bladeburner:t.bladeburner}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(0),r=n.n(a);function i(){const[t,e]=Object(a.useState)(!0);return Object(a.useEffect)(()=>{const t=setInterval(()=>e(t=>!t),1e3);return()=>clearInterval(t)}),r.a.createElement(r.a.Fragment,null,t?"|":"")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(341),o=n(250),s=n(10),l=n(23),c=n(608),f=n.n(c),u=n(293);function m({color:t="primary"}){const[e,n]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:"This will permanently delete your local save game. Did you export it before?"},r.a.createElement(s.a,{startIcon:r.a.createElement(f.a,null),color:t,onClick:()=>n(!0)},"Delete Save")),r.a.createElement(o.a,{onConfirm:()=>{n(!1),Object(i.a)().then(()=>{Object(u.b)(),setTimeout(()=>location.reload(),1e3)}).catch(t=>console.error("Could not delete game: "+t))},open:e,onClose:()=>n(!1),confirmationText:"Really delete your game? (It's permanent!)"}))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(250),o=n(10),s=n(23),l=n(1214),c=n.n(l);function f({color:t="primary",noConfirmation:e=!1,onTriggered:n}){const[l,f]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{title:"Perform a soft reset. Resets everything as if you had just purchased an Augmentation."},r.a.createElement(o.a,{startIcon:r.a.createElement(c.a,null),color:t,onClick:function(){e?n():f(!0)}},"Soft Reset")),r.a.createElement(i.a,{onConfirm:n,open:l,onClose:()=>f(!1),confirmationText:"This will perform the same action as installing Augmentations, are you sure?"}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(10),o=n(23),s=n(1215),l=n(1248),c=n.n(l);function f({router:t}){const[e,n]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{title:"The theme editor allows you to modify the colors the game uses."},r.a.createElement(i.a,{id:"bb-theme-editor-button",startIcon:r.a.createElement(c.a,null),onClick:()=>n(!0)},"Theme Editor")),r.a.createElement(s.a,{open:e,onClose:()=>n(!1),router:t}))}},,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(1),o=n(120);function s(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{sx:{my:1}},"If you've created a theme that you believe should be added in game's theme browser, feel free to"," ",r.a.createElement(o.a,{href:"https://github.com/danielyxie/bitburner/tree/dev/src/Themes/README.md",target:"_blank"},"create a pull request"),"."),r.a.createElement(i.a,{sx:{my:1}},"Head over to the"," ",r.a.createElement(o.a,{href:"https://discord.com/channels/415207508303544321/921991895230611466",target:"_blank"},"theme-sharing")," ","discord channel for more."))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(10),o=n(23),s=n(1250),l=n.n(s),c=n(1249);function f(){const[t,e]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{title:"The style editor allows you to modify certain CSS rules used by the game."},r.a.createElement(i.a,{startIcon:r.a.createElement(l.a,null),onClick:()=>e(!0)},"Style Editor")),r.a.createElement(c.a,{open:t,onClose:()=>e(!1)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(17),o=n(1289),s=n(8),l=n(9),c=n(30),f=n(20),u=n(450),m=n(16),h=n(1),d=n(21),p=n(10);function g(t,e,n){const a=s.a.TravelCost;t.canAfford(a)&&(t.loseMoney(a,"other"),t.travel(n),Object(m.a)(r.a.createElement(r.a.Fragment,null,"You are now in ",n,"!")),e.toCity())}function y(t){const e=c.b.Player(),n=c.b.Router(),m=Object(a.useState)(!1)[1],[y,b]=Object(a.useState)(!1),[E,v]=Object(a.useState)(i.a.Sector12);function k(){m(t=>!t)}function _(t){const a=s.a.TravelCost;e.canAfford(a)&&(l.a.SuppressTravelConfirmation?g(e,n,t):(b(!0),v(t)))}return Object(a.useEffect)(()=>{const t=setInterval(k,1e3);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{variant:"h4"},"Travel Agency"),r.a.createElement(d.a,{mx:2},r.a.createElement(h.a,null,"From here, you can travel to any other city! A ticket costs"," ",r.a.createElement(f.a,{money:s.a.TravelCost,player:t.p}),"."),l.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(i.a).filter(e=>e!=t.p.city).map(t=>{if(void 0===Object.entries(i.a).find(e=>e[1]===t))throw new Error(`could not find key for city '${t}'`);return r.a.createElement(r.a.Fragment,{key:t},r.a.createElement(p.a,{onClick:()=>_(t),sx:{m:2}},r.a.createElement(h.a,null,"Travel to ",t)),r.a.createElement("br",null))})):r.a.createElement(u.a,{currentCity:t.p.city,onTravel:t=>_(t)})),r.a.createElement(o.a,{city:E,travel:()=>g(e,n,E),open:y,onClose:()=>b(!1)}))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return z})),n.d(e,"a",(function(){return X}));var a=n(0),r=n.n(a),i=n(1297),o=n(1311),s=n(83),l=n(16),c=n(98),f=n(253),u=n(223),m=n(509),h=n(323),d=n(4),p=n(663),g=n(342),y=n.n(g),b=n(513),E=n(9),v=n(44),k=n(173),_=n(108),w=n(1312),S=n(26),C=n(10),x=n(1),L=n(120),O=n(21),M=n(594),T=n.n(M),A=n(1321),R=n.n(A),N=n(515),P=n.n(N),I=n(179),F=n(31),D=n(45),j=n(145),B=n(400),G=n(41),W=n(1313),H=n(23),U=n(81);function q(){return(q=Object.assign||function(t){for(var e=1;e!e.includes(t)).sort()}class V{constructor(t,e,n,a,r){this.fileName=t,this.code=e,this.hostname=n,this.lastPosition=a,this.model=r}}let Y=[],J=null;function X(t){const e=Object(a.useState)(!1)[1];const n=Object(a.useRef)(null),g=Object(a.useRef)(null),b=Object(a.useRef)(null),[M,A]=Object(a.useState)(null),[N,z]=Object(a.useState)(null),[X,Q]=Object(a.useState)(""),[Z,tt]=Object(a.useState)(!1),[et,nt]=Object(a.useState)("RAM: ???"),[at,rt]=Object(a.useState)([["???",""]]),[it,ot]=Object(a.useState)(!1),[st,lt]=Object(a.useState)([]),[ct,ft]=Object(a.useState)(!1),[ut,mt]=Object(a.useState)({theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize,wordWrap:E.a.MonacoWordWrap,vim:t.vim||E.a.MonacoVim}),[ht,dt]=Object(a.useState)(!1);Y=Y.filter(t=>null!==Object(S.d)(t.hostname)),J&&null===Object(S.d)(J.hostname)&&(J=Y[0],void 0===J&&(J=null));const[pt,gt]=Object(a.useState)({height:window.innerHeight,width:window.innerWidth});function yt(t){null!==g.current&&(t.model=g.current.editor.createModel(t.code,t.fileName.endsWith(".txt")?"plaintext":"javascript"))}Object(a.useEffect)(()=>{const t=Object(k.debounce)((function(){gt({height:window.innerHeight,width:window.innerWidth})}),250);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),Object(a.useEffect)(()=>{null!==J&&Et(J.code)},[]),Object(a.useEffect)(()=>{function e(e){E.a.DisableHotkeys||("KeyB"==e.code&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t.router.toTerminal()),"KeyS"==e.code&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),e.stopPropagation(),kt()))}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),Object(a.useEffect)(()=>{if(ut.vim&&N&&!M)try{window.require(["monaco-vim"],(function(e){A(e.initVimMode(N,b.current)),e.VimMode.Vim.defineEx("write","w",(function(){kt()})),e.VimMode.Vim.defineEx("quit","q",(function(){t.router.toTerminal()})),e.VimMode.Vim.defineEx("wqriteandquit","wq",(function(){kt(),t.router.toTerminal()})),e.VimMode.Vim.defineAction("nextTabs",(function(t,e){var n;const a=null!==(n=e.repeat)&&void 0!==n?n:1,r=_t();if(void 0!==r){wt((r+a)%Y.length)}})),e.VimMode.Vim.defineAction("prevTabs",(function(t,e){var n;const a=null!==(n=e.repeat)&&void 0!==n?n:1,r=_t();if(void 0!==r){let t=r-a;for(;t<0;)t+=Y.length;wt(t)}})),e.VimMode.Vim.mapCommand("gt","action","nextTabs",{},{context:"normal"}),e.VimMode.Vim.mapCommand("gT","action","prevTabs",{},{context:"normal"}),N.focus()}))}catch{}else ut.vim||(null==M||M.dispose(),A(null));return()=>{null==M||M.dispose()}},[ut,n,N,M]);const bt=Object(a.useMemo)(()=>Object(k.debounce)((t,e)=>{nt(t),rt(e),ot(!1)},300),[]);async function Et(e){if(null!=J&&J.fileName.endsWith(".txt"))return void bt("N/A",[["N/A",""]]);ot(!0);const n=e+"",a=await Object(m.a)(t.player,n,t.player.getCurrentServer().scripts);if(!(a.cost>0)){switch(a.cost){case h.a.ImportError:bt("RAM: Import Error",[["Import Error",""]]);break;case h.a.URLImportError:bt("RAM: HTTP Import Error",[["HTTP Import Error",""]]);break;case h.a.SyntaxError:default:bt("RAM: Syntax Error",[["Syntax Error",""]])}return new Promise(()=>{})}{var r,i;const t=null!==(r=null===(i=a.entries)||void 0===i?void 0:i.sort((t,e)=>e.cost-t.cost))&&void 0!==r?r:[],e=[];for(const n of t)e.push([`${n.name} (${n.type})`,d.a.formatRAM(n.cost)]);bt("RAM: "+d.a.formatRAM(a.cost),e)}}function vt(e){const n=Object(S.d)(e.hostname);if(null===n)throw new Error("Server should not be null but it is.");if(Object(c.a)(e.fileName)){for(let a=0;anull!==J&&t.fileName===J.fileName&&t.hostname===J.hostname)}function wt(t){if(null!==J){const t=_t();void 0!==t&&(Y[t]=J)}J={...Y[t]},null!==n.current&&null!==Y[t]&&((void 0===Y[t].model||Y[t].model.isDisposed())&&yt(Y[t]),n.current.setModel(Y[t].model),n.current.setPosition(Y[t].lastPosition),n.current.revealLineInCenter(Y[t].lastPosition.lineNumber),Et(Y[t].code),n.current.focus())}function St(a){const r=Y[a],i=Y.findIndex(t=>t.fileName===r.fileName&&t.hostname===r.hostname);let o="";-1!==i&&(o=Y[i].code);const s=Object(S.d)(r.hostname);if(null===s)throw new Error(`Server '${r.hostname}' should not be null, but it is.`);const l=s.scripts.findIndex(t=>t.filename===r.fileName);if(-1!==l&&o===s.scripts[l].code||B.a.emit({txt:"Do you want to save changes to "+r.fileName+"?",resolve:t=>{t&&(r.code=o,vt(r))}}),Y.length>1){Y=Y.filter((t,e)=>e!==a);let t=-1;void 0===Y[a+t]&&(t=1,void 0===Y[a+t]&&(t=0)),J=Y[a+t],null!==n.current&&((void 0===Y[a+t].model||null===Y[a+t].model||Y[a+t].model.isDisposed())&&yt(Y[a+t]),n.current.setModel(Y[a+t].model),n.current.setPosition(Y[a+t].lastPosition),n.current.revealLineInCenter(Y[a+t].lastPosition.lineNumber),n.current.focus()),e(t=>!t)}else Y=[],J=null,t.router.toTerminal()}function Ct(t){var e;const n=Y[t],a=Object(S.d)(n.hostname);if(null===a)throw new Error(`Server '${n.hostname}' should not be null, but it is.`);const r=a.scripts.find(t=>t.filename===n.fileName);return null!==(e=null==r?void 0:r.code)&&void 0!==e?e:null}function xt(t){Q(t.target.value)}function Lt(){Q(""),tt(!Z)}const Ot=Object.values(Y).filter(t=>t.hostname.includes(X)||t.fileName.includes(X)),Mt=pt.height-(130+(ut.vim?34:0)),Tt=Ot.length?1640/Ot.length-5:0,At=Tt-50;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:null!==J?"block":"none",height:"100%",width:"100%"}},r.a.createElement(p.a,{onDragEnd:function(t){if(!t.destination)return;const e=function(t,e,n){const a=Array.from(t),[r]=a.splice(e,1);return a.splice(n,0,r),a}(Y,t.source.index,t.destination.index);Y=e}},r.a.createElement(p.c,{droppableId:"tabs",direction:"horizontal"},(t,e)=>r.a.createElement(O.a,q({maxWidth:"1640px",display:"flex",flexDirection:"row",alignItems:"center",whiteSpace:"nowrap",ref:t.innerRef},t.droppableProps,{style:{backgroundColor:e.isDraggingOver?E.a.theme.backgroundsecondary:E.a.theme.backgroundprimary,overflowX:"scroll"}}),r.a.createElement(H.a,{title:"Search Open Scripts"},Z?r.a.createElement(U.a,{value:X,onChange:xt,autoFocus:!0,InputProps:{startAdornment:r.a.createElement(y.a,null),spellCheck:!1,endAdornment:r.a.createElement(P.a,{onClick:Lt})}}):r.a.createElement(C.a,{onClick:Lt},r.a.createElement(y.a,null))),Ot.map(({fileName:t,hostname:e},a)=>{var i;const o={maxWidth:"25px",minWidth:"25px",minHeight:"38.5px",maxHeight:"38.5px",...(null===(i=J)||void 0===i?void 0:i.fileName)===Ot[a].fileName?{background:E.a.theme.button,borderColor:E.a.theme.button,color:E.a.theme.primary}:{background:E.a.theme.backgroundsecondary,borderColor:E.a.theme.backgroundsecondary,color:E.a.theme.secondary}},s=`${e}:~/${t} ${function(t){const e=Y[t],n=Ct(t);return null===n||n!==f.a.formatCode(e.code)?" *":""}(a)}`;return r.a.createElement(p.b,{key:t+e,draggableId:t+e,index:a,disableInteractiveElementBlocking:!0},t=>{var e;return r.a.createElement("div",q({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:{...t.draggableProps.style,maxWidth:Tt+"px",marginRight:"5px",flexShrink:0,border:"1px solid "+E.a.theme.well}}),r.a.createElement(H.a,{title:s},r.a.createElement(C.a,{onClick:()=>wt(a),onMouseDown:t=>{t.preventDefault(),1===t.button&&St(a)},style:{maxWidth:At+"px",minHeight:"38.5px",overflow:"hidden",...(null===(e=J)||void 0===e?void 0:e.fileName)===Ot[a].fileName?{background:E.a.theme.button,borderColor:E.a.theme.button,color:E.a.theme.primary}:{background:E.a.theme.backgroundsecondary,borderColor:E.a.theme.backgroundsecondary,color:E.a.theme.secondary}}},r.a.createElement("span",{style:{overflow:"hidden",direction:"rtl",textOverflow:"ellipsis"}},s))),r.a.createElement(H.a,{title:"Overwrite editor content with saved file content"},r.a.createElement(C.a,{onClick:()=>function(t){const e=Y[t],a=Ct(t);null!==a&&e.code!==a&&B.a.emit({txt:"Do you want to overwrite the current editor content with the contents of "+e.fileName+" on the server? This cannot be undone.",resolve:r=>{r&&(e.code=a,wt(t),null!==n.current&&null!==e&&((void 0===e.model||e.model.isDisposed())&&yt(e),n.current.setModel(e.model),n.current.setValue(e.code),Et(e.code),n.current.focus()))}})}(a),style:o},r.a.createElement(R.a,{fontSize:"small"}))),r.a.createElement(C.a,{onClick:()=>St(a),style:o},r.a.createElement(P.a,{fontSize:"small"})))})}),t.placeholder))),r.a.createElement("div",{style:{paddingBottom:"5px"}}),r.a.createElement(i.a,{beforeMount:function(t){if($)return;$=!0,t.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const e=[];for(const n of K)e.push({label:n,kind:t.languages.CompletionItemKind.Function,insertText:n,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:e}}}),async function(){const e=await t.languages.getLanguages().find(t=>"javascript"===t.id).loader();e.language.tokenizer.root.unshift([new RegExp("\\bns\\b"),{token:"ns"}]);for(const t of K)e.language.tokenizer.root.unshift([new RegExp(`\\b${t}\\b`),{token:"netscriptfunction"}]);["let","const","var","function"].forEach(t=>e.language.tokenizer.root.unshift([new RegExp(`\\b${t}\\b`),{token:"otherkeywords"}])),["true","false","null","undefined"].forEach(t=>e.language.tokenizer.root.unshift([new RegExp(`\\b${t}\\b`),{token:"otherkeyvars"}])),e.language.tokenizer.root.unshift([new RegExp("\\bthis\\b"),{token:"this"}])}();const e=(W.a+"").replace(/export /g,"");t.languages.typescript.javascriptDefaults.addExtraLib(e,"netscript.d.ts"),t.languages.typescript.typescriptDefaults.addExtraLib(e,"netscript.d.ts"),Object(w.a)(t)},onMount:function(e,a){if(z(e),n.current=e,g.current=a,null!==n.current&&null!==g.current){if(!t.files&&null!==J)return yt(J),n.current.setModel(J.model),n.current.setPosition(J.lastPosition),n.current.revealLineInCenter(J.lastPosition.lineNumber),Et(J.code),void n.current.focus();if(t.files){const e=Object.entries(t.files);if(!e.length)return void n.current.focus();for(const[a,r]of e){const e=Y.find(e=>e.fileName===a&&e.hostname===t.hostname);if(e)(void 0===e.model||null===e.model||e.model.isDisposed())&&yt(e),J=e,n.current.setModel(e.model),n.current.setPosition(e.lastPosition),n.current.revealLineInCenter(e.lastPosition.lineNumber),Et(e.code);else{const e=new V(a,r,t.hostname,new g.current.Position(0,0),g.current.editor.createModel(r,a.endsWith(".txt")?"plaintext":"javascript"));Y.push(e),J={...e},n.current.setModel(e.model),Et(e.code)}}}n.current.focus()}},loading:r.a.createElement(x.a,null,"Loading script editor!"),height:Mt+"px",defaultLanguage:"javascript",defaultValue:"",onChange:function(t){if(void 0===t)return;if(Et(t),null===n.current)return;const e=n.current.getPosition();if(null!==e){if(null!==J){J={...J,code:t,lastPosition:e};const n=Y.findIndex(t=>null!==J&&t.fileName===J.fileName&&t.hostname===J.hostname),a=[...Y],r=J;r.code=t,a[n]=r,Y=[...a]}try{!function(t){if(null===n.current||null===J)return;if(!J.fileName.endsWith(".ns")&&!J.fileName.endsWith(".js"))return;const e=Object(m.b)(t);if(-1!==e){const t=n.current.deltaDecorations(st,[{range:{startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:10},options:{isWholeLine:!0,glyphMarginClassName:"myGlyphMarginClass",glyphMarginHoverMessage:{value:"Possible infinite loop, await something."}}}]);lt(t)}else{const t=n.current.deltaDecorations(st,[]);lt(t)}}(t)}catch(t){}}},theme:ut.theme,options:{...ut,glyphMargin:!0}}),r.a.createElement(O.a,{ref:b,className:"monaco-editor",display:"flex",flexDirection:"row",sx:{p:1},alignItems:"center"}),r.a.createElement(O.a,{display:"flex",flexDirection:"row",sx:{m:1},alignItems:"center"},r.a.createElement(C.a,{startIcon:r.a.createElement(T.a,null),onClick:()=>ft(!0),sx:{mr:1}},"Options"),r.a.createElement(C.a,{onClick:function(){null!==n.current&&n.current.getAction("editor.action.formatDocument").run()}},"Beautify"),r.a.createElement(C.a,{color:it?"secondary":"primary",sx:{mx:1},onClick:()=>{dt(!0)}},et),r.a.createElement(C.a,{onClick:kt},"Save (Ctrl/Cmd + s)"),r.a.createElement(C.a,{sx:{mx:1},onClick:t.router.toTerminal},"Terminal (Ctrl/Cmd + b)"),r.a.createElement(x.a,null," ","Documentation:"," ",r.a.createElement(L.a,{target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Basic")," ","|",r.a.createElement(L.a,{target:"_blank",href:"https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md"},"Full"))),r.a.createElement(o.a,{open:ct,onClose:()=>ft(!1),options:{theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize,wordWrap:E.a.MonacoWordWrap,vim:E.a.MonacoVim},save:t=>{mt(t),E.a.MonacoTheme=t.theme,E.a.MonacoInsertSpaces=t.insertSpaces,E.a.MonacoFontSize=t.fontSize,E.a.MonacoWordWrap=t.wordWrap,E.a.MonacoVim=t.vim}}),r.a.createElement(G.a,{open:ht,onClose:()=>dt(!1)},r.a.createElement(I.a,null,r.a.createElement(j.a,null,at.map(([t,e])=>r.a.createElement(r.a.Fragment,{key:t+e},r.a.createElement(D.a,null,r.a.createElement(F.a,{sx:{color:E.a.theme.primary}},t),r.a.createElement(F.a,{align:"right",sx:{color:E.a.theme.primary}},e)))))))),r.a.createElement("div",{style:{display:null!==J?"none":"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},r.a.createElement("span",{style:{color:E.a.theme.primary,fontSize:"20px",textAlign:"center"}},r.a.createElement(x.a,{variant:"h4"},"No open files"),r.a.createElement(x.a,{variant:"h5"},"Use ",r.a.createElement("code",null,"nano FILENAME")," in",r.a.createElement("br",null),"the terminal to open files"))))}},,,,,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return compile})),__webpack_require__.d(__webpack_exports__,"b",(function(){return executeJSScript}));var acorn_walk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(300),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(254),_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(109),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1327),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(83);function makeScriptBlob(t){return new Blob([t],{type:"text/javascript"})}async function compile(player,script,scripts){if(!shouldCompile(script,scripts))return;await script.updateRamUsage(player,scripts);const uurls=_getScriptUrls(script,scripts,[]),url=uurls[uurls.length-1].url;script.url&&script.url!==url&&URL.revokeObjectURL(script.url),script.dependencies.length>0&&script.dependencies.forEach(t=>URL.revokeObjectURL(t.url)),script.url=uurls[uurls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(uurls[uurls.length - 1].url)"))),script.dependencies=uurls}async function executeJSScript(t,e=[],n){const a=n.getScript();if(null===a)throw new Error("script is null");await compile(t,a,e),n.ramUsage=a.ramUsage;const r=await a.module,i=n.env.vars;if(!r.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__.b)(n,a.filename+" cannot be run because it does not have a main function.");return r.main(i)}function isDependencyOutOfDate(t,e,n){const a=e.find(e=>e.filename==t);if(!a)return!0;return a.moduleSequenceNumber>n}function shouldCompile(t,e){return""===t.module||t.dependencies.some(n=>isDependencyOutOfDate(n.filename,e,t.moduleSequenceNumber))}function _getScriptUrls(t,e,n){const a=[];for(const e of n)t.dependents.some(t=>t.server===e.server&&t.filename==e.filename)||t.dependents.push({server:e.server,filename:e.filename});n.push(t);try{const r=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.a)(t.code,{sourceType:"module",ecmaVersion:"latest",ranges:!0}),i=[];acorn_walk__WEBPACK_IMPORTED_MODULE_0__.b(r,{ImportDeclaration(t){i.push({filename:t.source.value,start:t.source.range[0]+1,end:t.source.range[1]-1})},ExportNamedDeclaration(t){t.source&&i.push({filename:t.source.value,start:t.source.range[0]+1,end:t.source.range[1]-1})},ExportAllDeclaration(t){t.source&&i.push({filename:t.source.value,start:t.source.range[0]+1,end:t.source.range[1]-1})}}),i.sort((t,e)=>e.start-t.start);let o=t.code;for(const t of i){const r=t.filename.startsWith("./")?t.filename.substring(2):t.filename,i=e.filter(t=>Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__.b)(t.filename,r));if(0===i.length)continue;const[s]=i,l=_getScriptUrls(s,e,n);a.push(...l);const c=l[l.length-1].url;o=o.substring(0,t.start)+c+o.substring(t.end)}o+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}';const s=URL.createObjectURL(makeScriptBlob(o));return a.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_3__.a(t.filename,s,t.moduleSequenceNumber)),a}catch(t){for(const t of a)URL.revokeObjectURL(t.url);throw t}finally{n.pop()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(629),r=n(314);function i(t){return function(e){e=Object(a.a)(e);const n={};for(const t of e){let e=String;"number"==typeof t[1]?e=Number:"boolean"==typeof t[1]?e=Boolean:Array.isArray(t[1])&&(e=[String]);const a=t[0].length>1?2:1;n["-".repeat(a)+t[0]]=e}const i=r(n,{argv:t});for(const t of e)i.hasOwnProperty("--"+t[0])&&i.hasOwnProperty("-"+t[0])||(i[t[0]]=t[1]);for(const t of Object.keys(i)){if(!t.startsWith("-"))continue;const e=i[t];delete i[t];const n=2===t.length?1:2;i[t.slice(n)]=e}return i}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const a=new(n(582).a)("",()=>{});function r(t){if(null==t)return null;if(!(t.hasOwnProperty("properties")&&t.hasOwnProperty("getter")&&t.hasOwnProperty("setter")&&t.hasOwnProperty("proto")))return t;let e;if(t.hasOwnProperty("class")&&"Array"===t.class){e=[];const n=a.getProperty(t,"length");for(let i=0;i{u(t,0)},disabled:0===s},"rtl"===e.direction?a.createElement(d.a,null):a.createElement(l.a,null)),a.createElement(o.a,{onClick:t=>{u(t,s-1)},disabled:0===s},"rtl"===e.direction?a.createElement(m.a,null):a.createElement(f.a,null)),a.createElement(o.a,{onClick:t=>{u(t,s+1)},disabled:s>=Math.ceil(n/c)-1},"rtl"===e.direction?a.createElement(f.a,null):a.createElement(m.a,null)),a.createElement(o.a,{onClick:t=>{u(t,Math.max(0,Math.ceil(n/c)-1))},disabled:s>=Math.ceil(n/c)-1},"rtl"===e.direction?a.createElement(l.a,null):a.createElement(d.a,null)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n(113),i=n(31);function o(){return(o=Object.assign||function(t){for(var e=1;ea.createElement(i.a,o({},t,{classes:{root:s().root,...t.classes}}));function c(t){return a.createElement(l,{style:{backgroundColor:t.color},onMouseEnter:t.onMouseEnter,onClick:t.onClick})}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(26);function r(t){if(null!=t.ramUsage&&t.ramUsage>0)return t.ramUsage;const e=Object(a.d)(t.server);if(null==e)return 0;for(let n=0;n"*"==t).length)return r.globError="Only a single glob is supported per command.\nexample: `nano my-dir/*.js`",r;[r.preGlob,r.postGlob]=t.split("*"),r.preGlob=Object(a.k)(r.preGlob);const i=Object(a.l)(n.cwd());return r.preGlob=`${i}/${r.preGlob}`,e.forEach(t=>{const e=t.filename.startsWith("/")?t.filename:"/"+t.filename;e.startsWith(r.preGlob)&&e.endsWith(r.postGlob)&&r.globMatches.push(e)}),r.glob=`${r.preGlob}*${r.postGlob}`,r}(""+t[0],e.getCurrentServer().scripts,n)}return null}function c(t,{terminal:e,router:n,player:a,args:c},f){if(c.length<1)return void e.error(`Incorrect usage of ${t} command. Usage: ${t} [scriptname]`);let u=c;try{const m=l(c,a,e);if(m){if(!1===Object(o.isEmpty)(m.globError))throw new Error(m.globError);u=m.globMatches}const h=u.map(n=>{const o=""+n;if(Object(r.a)(o)){const t=e.getFilepath(o),n=e.getScript(a,o),r=function(t){return t.endsWith(".ns")||t.endsWith(".js")}(o),l=null!==n?n.code:r?s:"";return l===s&&i.a.saveCursor(o,{row:3,column:5}),[t,l]}if(o.endsWith(".txt")){const t=e.getFilepath(o),n=e.getTextFile(a,o);return[t,null===n?"":n.text]}throw new Error("Invalid file. Only scripts (.script, .ns, .js), or text files (.txt) can be edited with "+t)});if(m&&0===h.length)throw new Error(`Could not find any valid files to open with ${t} using glob: \`${m.glob}\``);n.toScriptEditor(Object.fromEntries(h),f)}catch(t){e.error(""+t)}}},,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return s}));var a=n(236),r=n(82);function i(){return 8!==this.bitNodeN&&(6===this.bitNodeN||7===this.bitNodeN||r.a[6]>0||r.a[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof a.a}function s(){this.bladeburner=new a.a(this)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(449),r=n(25);class i extends a.a{constructor(t=null){super(t)}getActionTypeSkillSuccessBonus(t){return t.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(t){return Object(r.a)(i,t.data)}}r.c.constructors.Contract=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={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"," "],automate:["Usage: 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."," "],clear:["Usage: clear"," ","Clears the console"," "],cls:["Usage: cls"," ","Clears the console"," "],help:["Usage: 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"," "],log:["Usage: 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"," "],skill:["Usage: 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]"," "],start:["Usage: 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'"," "],stop:["Usage: stop"," ","Stop your current action and go idle."," "]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return l}));var a=n(412),r=n(298),i=n(82);function o(){return 3===this.bitNodeN||i.a[3]>0}function s(){return null!=this.corporation&&this.corporation instanceof a.a}function l(t,e=0){if(this.corporation=new a.a({name:t}),3===i.a[3]){const t=r.a[7][0],e=r.a[8][0];this.corporation.unlockUpgrades[t]=1,this.corporation.unlockUpgrades[e]=1}this.corporation.totalShares+=e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return s}));var a=n(281),r=n(4);function i(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class o{constructor(t={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==a.a[t.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+t.text);this.text=t.text,this.cost=t.cost,t.children&&t.children.length>0&&(this.children=t.children),null!=t.parent&&(this.parent=t.parent)}addChild(t){this.children.push(t),t.parent=this}createTreantMarkup(){const t=[];for(let e=0;e${this.text}
${r.a.format(this.cost,"0,0")} Scientific Research`+n.desc+"",text:{name:this.text}}}findNode(t){if(this.text===t)return this;let e=null;for(let n=0;n{L.a.AutosaveInterval=60}},"Enable"));$.b.emit(t,"warning",5e3)}(),K.Counters.autoSaveCounter=300):(K.Counters.autoSaveCounter=5*L.a.AutosaveInterval,C.c.saveGame(!L.a.SuppressSavedGameToast))),K.Counters.checkFactionInvitations<=0){const t=S.a.checkForFactionInvitations();if(t.length>0){const e=t[Math.floor(Math.random()*t.length)];Object(p.d)(e)}K.Counters.checkFactionInvitations=100}if(K.Counters.passiveFactionGrowth<=0){const t=Math.floor(5-K.Counters.passiveFactionGrowth);Object(p.f)(t),K.Counters.passiveFactionGrowth=5}if(K.Counters.messages<=0&&(Object(_.b)(),r.a[o.a.TheRedPill].owned?K.Counters.messages=4500:K.Counters.messages=150),S.a.corporation instanceof u.a&&S.a.corporation.process(S.a),K.Counters.mechanicProcess<=0){if(S.a.bladeburner instanceof l.a)try{S.a.bladeburner.process(g.b,S.a)}catch(t){Object(D.a)("Exception caught in Bladeburner.process(): "+t)}K.Counters.mechanicProcess=5}K.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(c.b)(),K.Counters.contractGeneration=3e3),K.Counters.achievementsCounter<=0&&(Object(B.b)(),K.Counters.achievementsCounter=300)},load:function(t){if(Object(j.a)(),Object(H.a)(),Object(C.b)(t)){O.b.emit(),Object(s.b)(S.a),Object(M.b)(S.a),Object(i.d)(),S.a.reapplyAllSourceFiles(),S.a.hasWseAccount&&Object(T.h)(),S.a.applyEntropy(S.a.entropy),K._lastUpdate=(new Date).getTime();const t=S.a.lastUpdate,e=K._lastUpdate-t,n=Math.floor(e/m.a._idleSpeed);let r=0;const o=S.a.moneySourceA.hacking/S.a.playtimeSinceLastAug*e*.75;if(S.a.gainMoney(o,"hacking"),Object(w.b)(S.a),S.a.isWorking)S.a.focus=!0,S.a.workType==m.a.WorkTypeFaction?S.a.workForFaction(n):S.a.workType==m.a.WorkTypeCreateProgram?S.a.createProgramWork(n):S.a.workType==m.a.WorkTypeStudyClass?S.a.takeClass(n):S.a.workType==m.a.WorkTypeCrime?S.a.commitCrime(n):S.a.workType==m.a.WorkTypeCompanyPartTime?S.a.workPartTime(n):S.a.workType===m.a.WorkTypeGraftAugmentation?S.a.graftAugmentationWork(n):S.a.work(n);else for(let t=0;tF.a.emit(W.a.createElement(W.a.Fragment,null,W.a.createElement(U.a,null,"Offline for ",b,". While you were offline:"),W.a.createElement("ul",null,W.a.createElement("li",null,W.a.createElement(U.a,null,"Your scripts generated ",W.a.createElement(N.a,{money:o}))),W.a.createElement("li",null,W.a.createElement(U.a,null,"Your Hacknet Nodes generated ",f)),W.a.createElement("li",null,W.a.createElement(U.a,null,"You gained ",W.a.createElement(I.a,{reputation:r})," reputation divided amongst your factions"))))),250)}else Object(s.b)(S.a),K.start(),S.a.init(),Object(x.f)(S.a.getHomeComputer()),Object(f.b)(),Object(h.c)(),Object(i.d)(),Object(_.c)(),Object(M.b)(S.a),Object(k.e)();Object(b.b)()},start:function(){const t=(new Date).getTime();let e=t-K._lastUpdate;const n=e%m.a._idleSpeed;e=Math.floor(e/m.a._idleSpeed),e>0&&(K._lastUpdate=t-n,S.a.lastUpdate=t-n,K.updateGame(e)),window.requestAnimationFrame(K.start)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);var a=n(795);n.d(e,"Default",(function(){return a.a}));var r=n(796);n.d(e,"DefaultLite",(function(){return r.a}));var i=n(797);n.d(e,"Monokai",(function(){return i.a}));var o=n(798);n.d(e,"Warmer",(function(){return o.a}));var s=n(799);n.d(e,"DarkPlus",(function(){return s.a}));var l=n(800);n.d(e,"MayukaiDark",(function(){return l.a}));var c=n(801);n.d(e,"Purple",(function(){return c.a}));var f=n(802);n.d(e,"SmoothGreen",(function(){return f.a}));var u=n(803);n.d(e,"Dracula",(function(){return u.a}));var m=n(804);n.d(e,"DarkBlue",(function(){return m.a}));var h=n(805);n.d(e,"DiscordLike",(function(){return h.a}));var d=n(806);n.d(e,"OneDark",(function(){return d.a}));var p=n(807);n.d(e,"MutedGoldBlue",(function(){return p.a}));var g=n(808);n.d(e,"Light",(function(){return g.a}))},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var a=n(0),r=n.n(a),i=n(1795),o=n(1),s=n(60),l=n(21),c=n(113),f=n(137),u=n(87),m=n(341),h=n(2),d=n(668),p=n(96),g=n(8),y=n(408),b=n(251),E=n(293);const v=Object(c.a)(t=>Object(f.a)({root:{backgroundColor:t.colors.backgroundprimary}}));function k(){const t=v(),[e,n]=Object(a.useState)(!1),[c,f]=Object(a.useState)(!1),k=`v${g.a.VersionString} (${Object(b.a)()})`;return document.title="Bitburner "+k,Object(a.useEffect)(()=>{const t=setTimeout(()=>{c||n(!0)},2e3);return()=>clearTimeout(t)}),Object(a.useEffect)(()=>{!async function(){await Object(m.b)().then(t=>{try{d.a.load(t)}catch(t){throw Object(y.a)(),f(!0),t}Object(E.c)(),f(!0)}).catch(t=>{console.error(t),d.a.load(""),f(!0)})}()},[]),r.a.createElement(l.a,{className:t.root},c?r.a.createElement(p.a,{terminal:u.a,engine:d.a,player:h.a}):r.a.createElement(s.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(s.a,{item:!0},r.a.createElement(i.a,{size:150,color:"primary"})),r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,{variant:"h3"},"Loading Bitburner ",k)),e&&r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,null,"If the game fails to load, consider ",r.a.createElement("a",{href:"?noScripts"},"killing all scripts")))))}},,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"a",(function(){return o}));var a=n(40),r=n(1001);function i(t,e=!1){const n=t instanceof a.a?t.name:t;for(const t of this.augmentations)if(t.name===n)return!0;if(!e)for(const t of this.queuedAugmentations)if(t.name===n)return!0;return!1}function o(t=1){this.reapplyAllAugmentations(),this.reapplyAllSourceFiles();const e=Object(r.a)(this,t);for(const[t,n]of Object.entries(e))this.setMult(t,n)}},function(t,e,n){"use strict";function a(t){return"number"==typeof t&&!isNaN(t)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(112),r=n(76),i=n(25);class o{constructor(t="",e=0,n=0,i=a.a.LimitBuy,o=r.a.Long){let s=!1;if("number"==typeof e&&"number"==typeof n||(s=!0),(isNaN(e)||isNaN(n))&&(s=!0),"string"!=typeof t&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=t,this.shares=e,this.price=n,this.type=i,this.pos=o}toJSON(){return Object(i.b)("Order",this)}static fromJSON(t){return Object(i.a)(o,t.data)}}i.c.constructors.Order=o},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(5),r=n(751),i=n(78),o=n(29),s=n(1025),l=n(586),c=n(25),f=n(8),u=n(648),m=n(6),h=n(2),d=n(15);function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class g{constructor(){p(this,"storedCycles",0),p(this,"fragments",[])}baseSize(){return u.a.BaseSize+m.a.StaneksGiftExtraSize+h.a.sourceFileLvl(13)}width(){return Math.min(Math.floor(this.baseSize()/2+1),u.a.MaxSize)}height(){return Math.min(Math.floor(this.baseSize()/2+.6),u.a.MaxSize)}charge(t,e,n){e.avgCharge=(e.numCharge*e.avgCharge+n)/(e.numCharge+1),e.numCharge++;const r=o.a[a.a.ChurchOfTheMachineGod];r.playerReputation+=t.faction_rep_mult*(Math.pow(n,.95)*(r.favor+100))/1e3}inBonus(){return this.storedCycles*f.a._idleSpeed/1e3>1}process(t,e=1){t.hasAugmentation(d.a.StaneksGift1)&&(this.storedCycles+=e,this.storedCycles-=10,this.storedCycles=Math.max(0,this.storedCycles),this.updateMults(t),l.a.emit())}effect(t){let e=t.neighboors().map(t=>this.fragmentAt(t[0],t[1])).filter(t=>!!t);e=e.filter(t=>t.fragment().type===i.b.Booster);let n=1;e=e.filter((t,e,n)=>n.indexOf(t)===e);for(const t of e)n*=t.fragment().power;return Object(s.a)(t.avgCharge,t.numCharge,t.fragment().power,n)}canPlace(t,e,n,a){if(t<0||e<0)return!1;if(t+a.width(n)>this.width())return!1;if(e+a.height(n)>this.height())return!1;if(this.count(a)>=a.limit)return!1;const i=new r.a({x:t,y:e,rotation:n,fragment:a});for(const t of this.fragments)if(t.collide(i))return!1;return!0}place(t,e,n,a){return!!this.canPlace(t,e,n,a)&&(this.fragments.push(new r.a({x:t,y:e,rotation:n,fragment:a})),!0)}findFragment(t,e){return this.fragments.find(n=>n.x===t&&n.y===e)}fragmentAt(t,e){for(const n of this.fragments)if(n.fullAt(t,e))return n}count(t){let e=0;for(const n of this.fragments)n.fragment().id===t.id&&e++;return e}delete(t,e){for(let n=0;n{t.avgCharge=0,t.numCharge=0})}updateMults(t){t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles();for(const e of this.fragments){const n=e.fragment(),a=this.effect(e);switch(n.type){case i.b.HackingChance:t.hacking_chance_mult*=a;break;case i.b.HackingSpeed:t.hacking_speed_mult*=a;break;case i.b.HackingMoney:t.hacking_money_mult*=a;break;case i.b.HackingGrow:t.hacking_grow_mult*=a;break;case i.b.Hacking:t.hacking_mult*=a,t.hacking_exp_mult*=a;break;case i.b.Strength:t.strength_mult*=a,t.strength_exp_mult*=a;break;case i.b.Defense:t.defense_mult*=a,t.defense_exp_mult*=a;break;case i.b.Dexterity:t.dexterity_mult*=a,t.dexterity_exp_mult*=a;break;case i.b.Agility:t.agility_mult*=a,t.agility_exp_mult*=a;break;case i.b.Charisma:t.charisma_mult*=a,t.charisma_exp_mult*=a;break;case i.b.HacknetMoney:t.hacknet_node_money_mult*=a;break;case i.b.HacknetCost:t.hacknet_node_purchase_cost_mult/=a,t.hacknet_node_ram_cost_mult/=a,t.hacknet_node_core_cost_mult/=a,t.hacknet_node_level_cost_mult/=a;break;case i.b.Rep:t.company_rep_mult*=a,t.faction_rep_mult*=a;break;case i.b.WorkMoney:t.work_money_mult*=a;break;case i.b.Crime:t.crime_success_mult*=a,t.crime_money_mult*=a;break;case i.b.Bladeburner:t.bladeburner_max_stamina_mult*=a,t.bladeburner_stamina_gain_mult*=a,t.bladeburner_analysis_mult*=a,t.bladeburner_success_chance_mult*=a}}t.updateSkillLevels()}prestigeAugmentation(){this.clearCharge()}prestigeSourceFile(){this.clear(),this.storedCycles=0}toJSON(){return Object(c.b)("StaneksGift",this)}static fromJSON(t){return Object(c.a)(g,t.data)}}c.c.constructors.StaneksGift=g},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(243),r=n(25);class i{constructor(t){t?(this.id=t.fragment.id,this.x=t.x,this.y=t.y,this.avgCharge=0,this.numCharge=0,this.rotation=t.rotation):(this.id=-1,this.x=-1,this.y=-1,this.avgCharge=-1,this.numCharge=-1,this.rotation=-1)}collide(t){const e=this.fragment(),n=t.fragment(),a=t.x-this.x,r=t.y-this.y;for(let i=0;i[this.x+t[0],this.y+t[1]])}copy(){const t=Object(a.b)(this.id);if(null===t)throw new Error("ActiveFragment id refers to unknown Fragment.");const e=new i({x:this.x,y:this.y,rotation:this.rotation,fragment:t});return e.avgCharge=this.avgCharge,e.numCharge=this.numCharge,e}toJSON(){return Object(r.b)("ActiveFragment",this)}static fromJSON(t){return Object(r.a)(i,t.data)}}r.c.constructors.ActiveFragment=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(11);function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class i{constructor(t){r(this,"city",null),r(this,"costMult",0),r(this,"expMult",0),r(this,"name",a.a.Void),r(this,"types",[]),r(this,"techVendorMaxRam",0),r(this,"techVendorMinRam",0),t.city&&(this.city=t.city),t.costMult&&(this.costMult=t.costMult),t.expMult&&(this.expMult=t.expMult),t.infiltrationData&&(this.infiltrationData=t.infiltrationData),t.name&&(this.name=t.name),t.types&&(this.types=t.types),t.techVendorMaxRam&&(this.techVendorMaxRam=t.techVendorMaxRam),t.techVendorMinRam&&(this.techVendorMinRam=t.techVendorMinRam)}}},,,,,,,,,,function(t,e,n){"use strict";n.d(e,"b",(function(){return E})),n.d(e,"a",(function(){return v}));var a=n(0),r=n.n(a),i=n(179),o=n(145),s=n(45),l=n(31),c=n(1),f=n(4),u=n(9),m=n(144),h=n(296),d=n(20),p=n(110),g=n(468),y=n(30),b=n(77);function E(t){const e=Object(h.b)();return r.a.createElement(i.a,{sx:{display:"table",mb:1,width:"100%"}},r.a.createElement(o.a,null,r.a.createElement(m.a,{name:"City",color:u.a.theme.primary,data:{content:t.sleeve.city}}),r.a.createElement(m.a,{name:"HP",color:u.a.theme.hp,data:{content:`${f.a.formatHp(t.sleeve.hp)} / ${f.a.formatHp(t.sleeve.max_hp)}`}}),r.a.createElement(m.a,{name:"Hacking",color:u.a.theme.hack,data:{level:t.sleeve.hacking,exp:t.sleeve.hacking_exp}}),r.a.createElement(m.a,{name:"Strength",color:u.a.theme.combat,data:{level:t.sleeve.strength,exp:t.sleeve.strength_exp}}),r.a.createElement(m.a,{name:"Defense",color:u.a.theme.combat,data:{level:t.sleeve.defense,exp:t.sleeve.defense_exp}}),r.a.createElement(m.a,{name:"Dexterity",color:u.a.theme.combat,data:{level:t.sleeve.dexterity,exp:t.sleeve.dexterity_exp}}),r.a.createElement(m.a,{name:"Agility",color:u.a.theme.combat,data:{level:t.sleeve.agility,exp:t.sleeve.agility_exp}}),r.a.createElement(m.a,{name:"Charisma",color:u.a.theme.cha,data:{level:t.sleeve.charisma,exp:t.sleeve.charisma_exp}}),r.a.createElement(s.a,null,r.a.createElement(l.a,{classes:{root:e.cellNone}},r.a.createElement("br",null))),r.a.createElement(m.a,{name:"Shock",color:u.a.theme.primary,data:{content:f.a.formatSleeveShock(100-t.sleeve.shock)}}),r.a.createElement(m.a,{name:"Sync",color:u.a.theme.primary,data:{content:f.a.formatSleeveSynchro(t.sleeve.sync)}}),r.a.createElement(m.a,{name:"Memory",color:u.a.theme.primary,data:{content:f.a.formatSleeveMemory(t.sleeve.memory)}})))}function v(t){const e=Object(h.b)(),n=y.b.Player();let a=[];if(t.sleeve.currentTask===b.a.Crime)a=[["Money",r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{money:parseFloat(t.sleeve.currentTaskLocation)})," (on success)")],["Hacking Exp",f.a.formatExp(t.sleeve.gainRatesForTask.hack)+" (2x on success)"],["Strength Exp",f.a.formatExp(t.sleeve.gainRatesForTask.str)+" (2x on success)"],["Defense Exp",f.a.formatExp(t.sleeve.gainRatesForTask.def)+" (2x on success)"],["Dexterity Exp",f.a.formatExp(t.sleeve.gainRatesForTask.dex)+" (2x on success)"],["Agility Exp",f.a.formatExp(t.sleeve.gainRatesForTask.agi)+" (2x on success)"],["Charisma Exp",f.a.formatExp(t.sleeve.gainRatesForTask.cha)+" (2x on success)"]];else if(a=[["Money:",r.a.createElement(p.a,{money:5*t.sleeve.gainRatesForTask.money})],["Hacking Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.hack)+" / sec"],["Strength Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.str)+" / sec"],["Defense Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.def)+" / sec"],["Dexterity Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.dex)+" / sec"],["Agility Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.agi)+" / sec"],["Charisma Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.cha)+" / sec"]],t.sleeve.currentTask===b.a.Company||t.sleeve.currentTask===b.a.Faction){const e=t.sleeve.getRepGain(n);a.push(["Reputation:",r.a.createElement(g.a,{reputation:5*e})])}return r.a.createElement(i.a,{sx:{display:"table",mb:1,width:"100%",lineHeight:0}},r.a.createElement(o.a,null,r.a.createElement(s.a,null,r.a.createElement(l.a,{classes:{root:e.cellNone}},r.a.createElement(c.a,{variant:"h6"},"Earnings"))),a.map(([t,n])=>r.a.createElement(s.a,{key:t.toString()+n.toString()},r.a.createElement(l.a,{classes:{root:e.cellNone}},r.a.createElement(c.a,null,t)),r.a.createElement(l.a,{align:"right",classes:{root:e.cellNone}},r.a.createElement(c.a,null,n))))))}},function(t,e,n){"use strict";n.d(e,"b",(function(){return u})),n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(26),o=n(47),s=n(91),l=n(128),c=n(79),f=n(10);const u={All:0,Foreign:1,Owned:2,Purchased:3};function m(t){function e(e){const n=e instanceof o.a&&e.purchasedByPlayer,a=t.serverType;switch(a){case u.All:return!0;case u.Foreign:return"home"!==e.hostname&&!n;case u.Owned:return n||e instanceof s.a||"home"===e.hostname;case u.Purchased:return n||e instanceof s.a;default:return console.warn("Invalid ServerType specified for ServerDropdown component: "+a),!1}}const n=[];for(const t of Object(i.c)().sort((t,e)=>t.hostname.localeCompare(e.hostname)))e(t)&&n.push(r.a.createElement(c.a,{key:t.hostname,value:t.hostname},t.hostname));return r.a.createElement(l.a,{startAdornment:r.a.createElement(f.a,{onClick:t.purchase,disabled:!t.canPurchase},"Buy"),sx:{mx:1},value:t.value,onChange:t.onChange},n)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return g})),n.d(e,"a",(function(){return b}));var a=n(0),r=n(20),i=n(207),o=n(1292),s=n(532),l=n(1789),c=n(765),f=n(10),u=n(65),m=n(21),h=n(1),d=n(81);function p(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const g=5;var y;!function(t){t.Pending="",t.PlayerWon="You won!",t.PlayerWonByBlackjack="You Won! Blackjack!",t.DealerWon="You lost!",t.Tie="Push! (Tie)"}(y||(y={}));class b extends i.a{constructor(t){super(t),p(this,"canStartGame",()=>{const{p:t}=this.props,{bet:e}=this.state;return t.canAfford(e)}),p(this,"startGame",()=>{if(!this.canStartGame()||Object(i.b)(this.props.p))return;this.props.p.loseMoney(this.state.bet,"casino");const t=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),e=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:t,dealerHand:e,gameInProgress:!0,result:y.Pending}),21===this.getTrueHandValue(t)?21===this.getTrueHandValue(e)?this.finishGame(y.Tie):this.finishGame(y.PlayerWonByBlackjack):21===this.getTrueHandValue(e)&&this.finishGame(y.DealerWon)}),p(this,"getHandValue",t=>{let e=[0];for(let n=0;n=10?e.map(t=>t+10):1===a?e.flatMap(t=>[t+1,t+11]):e.map(t=>t+a)}return e}),p(this,"getTrueHandValue",t=>{const e=this.getHandValue(t),n=e.filter(t=>t<=21);return n.length>0?(n.sort((t,e)=>t-e),n[n.length-1]):e[0]}),p(this,"getHandDisplayValues",t=>{const e=this.getHandValue(t);return this.isHandBusted(t)?[...new Set([e[0]])]:[...new Set(e.filter(t=>t<=21))]}),p(this,"isHandBusted",t=>this.getTrueHandValue(t)>21),p(this,"playerHit",t=>{if(!t.isTrusted)return;const e=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:e}),this.isHandBusted(e)&&this.finishGame(y.DealerWon)}),p(this,"playerStay",t=>{if(!t.isTrusted)return;let e=this.state.dealerHand;for(;;){if(!(this.getTrueHandValue(e)<=16))break;e=e.addCards(this.deck.safeDrawCard())}if(this.setState({dealerHand:e}),this.isHandBusted(e))this.finishGame(y.PlayerWon);else{const t=this.getTrueHandValue(e),n=this.getTrueHandValue(this.state.playerHand);if(t>21||n>21)throw new Error("Someone busted when not expected to");n>t?this.finishGame(y.PlayerWon):n{const e=t===y.DealerWon?0:t===y.Tie?this.state.bet:t===y.PlayerWon?2*this.state.bet:t===y.PlayerWonByBlackjack?2.5*this.state.bet:(()=>{throw new Error("Unexpected result: "+t)})();this.win(this.props.p,e),this.setState({gameInProgress:!1,result:t,gains:this.state.gains+e-this.state.bet})}),p(this,"wagerOnChange",t=>{const{p:e}=this.props,n=t.target.value,a=Math.round(parseFloat(n));isNaN(a)?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):a<=0?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):a>1e8?this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):e.canAfford(a)?this.setState({bet:a,betInput:n,wagerInvalid:!1,wagerInvalidHelperText:"",result:y.Pending}):this.setState({bet:0,betInput:n,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),p(this,"startOnClick",t=>{t.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new o.a(g);this.state={playerHand:new s.a([]),dealerHand:new s.a([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:y.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:t,playerHand:e,dealerHand:n,gameInProgress:i,result:o,wagerInvalid:s,wagerInvalidHelperText:p,gains:g}=this.state,b=this.getHandDisplayValues(e),E=this.getHandDisplayValues(n);return a.createElement(a.Fragment,null,a.createElement(m.a,null,a.createElement(d.a,{value:t,label:a.createElement(a.Fragment,null,"Wager (Max: ",a.createElement(r.a,{money:1e8}),")"),disabled:i,onChange:this.wagerOnChange,error:s,helperText:s?p:"",type:"number",style:{width:"200px"},InputProps:{startAdornment:a.createElement(l.a,{position:"start"},a.createElement(h.a,null,"$"))}}),a.createElement(h.a,null,"Total earnings this session: ",a.createElement(r.a,{money:g}))),i?a.createElement(a.Fragment,null,a.createElement(f.a,{onClick:this.playerHit},"Hit"),a.createElement(f.a,{color:"secondary",onClick:this.playerStay},"Stay")):a.createElement(f.a,{onClick:this.startOnClick,disabled:s||!this.canStartGame()},"Start"),(i||o!==y.Pending)&&a.createElement(a.Fragment,null,a.createElement(m.a,{display:"flex"},a.createElement(u.a,{elevation:2},a.createElement(h.a,null,"Player"),e.cards.map((t,e)=>a.createElement(c.a,{card:t,key:e})),a.createElement(h.a,null,"Count:"," ",b.map((t,e)=>a.createElement("span",{key:e},t)).reduce((t,e)=>[t," or ",e])))),a.createElement("br",null),a.createElement(m.a,{display:"flex"},a.createElement(u.a,{elevation:2},a.createElement(h.a,null,"Dealer"),n.cards.map((t,e)=>a.createElement(c.a,{card:t,hidden:i&&0!==e,key:e})),!i&&a.createElement(a.Fragment,null,a.createElement(h.a,null,"Count:"," ",E.map((t,e)=>a.createElement("span",{key:e},t)).reduce((t,e)=>[t," or ",e])))))),o!==y.Pending&&a.createElement(h.a,null,o," ",o===y.PlayerWon&&a.createElement(r.a,{money:this.state.bet}),o===y.PlayerWonByBlackjack&&a.createElement(r.a,{money:1.5*this.state.bet}),o===y.DealerWon&&a.createElement(r.a,{money:-this.state.bet})))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(258),o=n(113),s=n(137),l=n(65);const c=Object(o.a)(()=>Object(s.a)({card:{padding:"10px",border:"solid 1px #808080",backgroundColor:"white",display:"inline-block",borderRadius:"10px",fontSize:"18.5px",textAlign:"center",margin:"3px",fontWeight:"bold"},red:{color:"red"},black:{color:"black"},value:{fontSize:"20px",fontFamily:"sans-serif"}})),f=({card:t,hidden:e})=>{const n=c();let a;switch(t.suit){case i.b.Clubs:a=r.a.createElement("span",null,"♣");break;case i.b.Diamonds:a=r.a.createElement("span",null,"♦");break;case i.b.Hearts:a=r.a.createElement("span",null,"♥");break;case i.b.Spades:a=r.a.createElement("span",null,"♠");break;default:throw new Error("MissingCaseException: "+t.suit)}return r.a.createElement(l.a,{className:`${n.card} ${t.isRedSuit()?n.red:n.black}`},r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:n.value},e?" - ":t.formatValue()),r.a.createElement("span",null,e?" - ":a)))}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(29),r=n(26),i=n(5);function o(t,e){const n=e.augmentations.slice().filter(t=>"NeuroFlux Governor"!==t);for(const e of n)if(!t.augmentations.some(t=>t.name==e))return!1;return!0}const s=[{title:"Gain root access on CSEC",fulfilled:()=>{const t=Object(r.d)("CSEC");return!(!t||!t.hasOwnProperty("hasAdminRights"))&&t.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const t=Object(r.d)("CSEC");return!(!t||!t.hasOwnProperty("backdoorInstalled"))&&t.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:t=>t.factions.includes(i.a.CyberSec)},{title:"Install all the Augmentations from "+i.a.CyberSec,fulfilled:t=>o(t,a.a[i.a.CyberSec])},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:t=>t.factions.includes(i.a.NiteSec)},{title:"Install all the Augmentations from "+i.a.NiteSec,fulfilled:t=>o(t,a.a[i.a.NiteSec])},{title:"Join the faction hinted at in j3.msg",fulfilled:t=>t.factions.includes(i.a.TheBlackHand)},{title:"Install all the Augmentations from "+i.a.TheBlackHand,fulfilled:t=>o(t,a.a[i.a.TheBlackHand])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:t=>t.factions.includes(i.a.BitRunners)},{title:"Install all the Augmentations from "+i.a.BitRunners,fulfilled:t=>o(t,a.a[i.a.BitRunners])},{title:"Complete fl1ght.exe",fulfilled:t=>t.factions.includes(i.a.Daedalus)},{title:"Install the special Augmentation from "+i.a.Daedalus,fulfilled:t=>t.augmentations.some(t=>"The Red Pill"==t.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(8);function r(t,e){return t/a.a.DonateMoneyToRepDivisor*e.faction_rep_mult}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(97);const r={longestName:0,longestSymbol:0};for(const t of Object.keys(a.a))r.longestName=Math.max(t.length,r.longestName),r.longestSymbol=Math.max(a.a[t].length,r.longestSymbol)},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(21),o=n(1),s=n(9),l=n(1375);function c({achievement:t,unlockedOn:e,cssFiltersUnlocked:n,cssFiltersLocked:a}){if(!t)return r.a.createElement(r.a.Fragment,null);const c=!!e,f=c?s.a.theme.primary:s.a.theme.secondarylight;let u="";return e&&(u=new Date(e).toLocaleString()),r.a.createElement(i.a,{sx:{border:"1px solid "+s.a.theme.well,mb:2}},r.a.createElement(i.a,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},r.a.createElement(l.a,{achievement:t,unlocked:c,size:"72px",colorFilters:c?n:a}),r.a.createElement(i.a,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",px:1}},r.a.createElement(o.a,{variant:"h6",sx:{color:f}},t.Name),r.a.createElement(o.a,{variant:"body2",sx:{maxWidth:"500px",color:f}},t.Description),c&&r.a.createElement(o.a,{variant:"caption",sx:{fontSize:"12px",color:s.a.theme.primarydark}},"Acquired on ",u))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));class a{constructor(t,e,n){this.set(t,e,n)}toString(){return`rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)})`}set(t,e,n){this.r=this.clamp(t),this.g=this.clamp(e),this.b=this.clamp(n)}hueRotate(t=0){t=t/180*Math.PI;const e=Math.sin(t),n=Math.cos(t);this.multiply([.213+.787*n-.213*e,.715-.715*n-.715*e,.072-.072*n+.928*e,.213-.213*n+.143*e,.715+.285*n+.14*e,.072-.072*n-.283*e,.213-.213*n-.787*e,.715-.715*n+.715*e,.072+.928*n+.072*e])}grayscale(t=1){this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])}sepia(t=1){this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])}saturate(t=1){this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])}multiply(t){const e=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),n=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),a=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=e,this.g=n,this.b=a}brightness(t=1){this.linear(t)}contrast(t=1){this.linear(t,-.5*t+.5)}linear(t=1,e=0){this.r=this.clamp(this.r*t+255*e),this.g=this.clamp(this.g*t+255*e),this.b=this.clamp(this.b*t+255*e)}invert(t=1){this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))}hsl(){const t=this.r/255,e=this.g/255,n=this.b/255,a=Math.max(t,e,n),r=Math.min(t,e,n);let i,o,s=(a+r)/2;if(a===r)i=o=0;else{const l=a-r;switch(o=s>.5?l/(2-a-r):l/(a+r),a){case t:i=(e-n)/l+(e255?t=255:t<0&&(t=0),t}}class r{constructor(t){this.target=t,this.targetHSL=t.hsl(),this.reusedColor=new a(0,0,0)}solve(){const t=this.solveNarrow(this.solveWide());return{values:t.values,loss:t.loss,filter:this.css(t.values)}}solveWide(){const t=[60,180,18e3,600,1.2,1.2];let e={loss:1/0};for(let n=0;e.loss>25&&n<3;n++){const n=[50,20,3750,50,100,100],a=this.spsa(5,t,15,n,1e3);a.loss.5?1:-1,l[t]=a[t]+r*s[t],c[t]=a[t]-r*s[t];const m=this.loss(l)-this.loss(c);for(let n=0;n<6;n++){const i=m/(2*r)*s[n],o=e[n]/Math.pow(t+u+1,1);a[n]=f(a[n]-o*i,n)}const h=this.loss(a);hn?t%=n:t<0&&(t=n+t%n):t<0?t=0:t>n&&(t=n),t}}loss(t){const e=this.reusedColor;e.set(0,0,0),e.invert(t[0]/100),e.sepia(t[1]/100),e.saturate(t[2]/100),e.hueRotate(3.6*t[3]),e.brightness(t[4]/100),e.contrast(t[5]/100);const n=e.hsl();return Math.abs(e.r-this.target.r)+Math.abs(e.g-this.target.g)+Math.abs(e.b-this.target.b)+Math.abs(n.h-this.targetHSL.h)+Math.abs(n.s-this.targetHSL.s)+Math.abs(n.l-this.targetHSL.l)}css(t){function e(e,n=1){return Math.round(t[e]*n)}return`invert(${e(0)}%) sepia(${e(1)}%) saturate(${e(2)}%) hue-rotate(${e(3,3.6)}deg) brightness(${e(4)}%) contrast(${e(5)}%)`}}function i(t){const e=function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,n,a)=>e+e+n+n+a+a);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null}(t);if(!e)return"";const[n,i,o]=e,s=new a(n,i,o);return new r(s).solve().filter}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(8),r=n(6);function i(t){const e=1e3/a.a._idleSpeed;let n=0,i=0,o=0,s=0,l=0,c=0,f=0;const u=t.hashManager;switch(t.className){case a.a.ClassStudyComputerScience:i=a.a.ClassStudyComputerScienceBaseExp*t.workExpMult/e*u.getStudyMult();break;case a.a.ClassDataStructures:n=a.a.ClassDataStructuresBaseCost*t.workCostMult/e,i=a.a.ClassDataStructuresBaseExp*t.workExpMult/e*u.getStudyMult();break;case a.a.ClassNetworks:n=a.a.ClassNetworksBaseCost*t.workCostMult/e,i=a.a.ClassNetworksBaseExp*t.workExpMult/e*u.getStudyMult();break;case a.a.ClassAlgorithms:n=a.a.ClassAlgorithmsBaseCost*t.workCostMult/e,i=a.a.ClassAlgorithmsBaseExp*t.workExpMult/e*u.getStudyMult();break;case a.a.ClassManagement:n=a.a.ClassManagementBaseCost*t.workCostMult/e,f=a.a.ClassManagementBaseExp*t.workExpMult/e*u.getStudyMult();break;case a.a.ClassLeadership:n=a.a.ClassLeadershipBaseCost*t.workCostMult/e,f=a.a.ClassLeadershipBaseExp*t.workExpMult/e*u.getStudyMult();break;case a.a.ClassGymStrength:n=a.a.ClassGymBaseCost*t.workCostMult/e,o=t.workExpMult/e*u.getTrainingMult();break;case a.a.ClassGymDefense:n=a.a.ClassGymBaseCost*t.workCostMult/e,s=t.workExpMult/e*u.getTrainingMult();break;case a.a.ClassGymDexterity:n=a.a.ClassGymBaseCost*t.workCostMult/e,l=t.workExpMult/e*u.getTrainingMult();break;case a.a.ClassGymAgility:n=a.a.ClassGymBaseCost*t.workCostMult/e,c=t.workExpMult/e*u.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}return{workMoneyLossRate:n,workHackExpGainRate:i*t.hacking_exp_mult*r.a.ClassGymExpGain,workStrExpGainRate:o*t.strength_exp_mult*r.a.ClassGymExpGain,workDefExpGainRate:s*t.defense_exp_mult*r.a.ClassGymExpGain,workDexExpGainRate:l*t.dexterity_exp_mult*r.a.ClassGymExpGain,workAgiExpGainRate:c*t.agility_exp_mult*r.a.ClassGymExpGain,workChaExpGainRate:f*t.charisma_exp_mult*r.a.ClassGymExpGain}}},,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Default",description:"Default game theme, most supported",credit:"hydroflame",screenshot:n(902).a,colors:{primarylight:"#0f0",primary:"#0c0",primarydark:"#090",successlight:"#0f0",success:"#0c0",successdark:"#090",errorlight:"#f00",error:"#c00",errordark:"#900",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#000",backgroundsecondary:"#000",button:"#333"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Default-lite",description:"Less eye-straining default theme",credit:"NmuGmu",reference:"https://discord.com/channels/415207508303544321/921991895230611466/925263801564151888",screenshot:n(903).a,colors:{primarylight:"#28CF28",primary:"#21A821",primarydark:"#177317",successlight:"#1CFF1C",success:"#16CA16",successdark:"#0D910D",errorlight:"#FF3B3B",error:"#C32D2D",errordark:"#8E2121",secondarylight:"#B3B3B3",secondary:"#838383",secondarydark:"#676767",warninglight:"#FFFF3A",warning:"#C3C32A",warningdark:"#8C8C1E",infolight:"#64CBFF",info:"#3399CC",infodark:"#246D91",welllight:"#404040",well:"#1C1C1C",white:"#C3C3C3",black:"#0A0B0B",hp:"#C62E2E",money:"#D6BB27",hack:"#ADFF2F",combat:"#E8EDCD",cha:"#8B5FAF",int:"#537CC8",rep:"#E8EDCD",disabled:"#5AB5A5",backgroundprimary:"#0C0D0E",backgroundsecondary:"#121415",button:"#252829"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Monokai'ish",description:"Monokai'ish",credit:"eltea",screenshot:n(904).a,colors:{primarylight:"#FFF",primary:"#F8F8F2",primarydark:"#FAFAEB",successlight:"#ADE146",success:"#A6E22E",successdark:"#98E104",errorlight:"#FF69A0",error:"#F92672",errordark:"#D10F56",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#E1D992",warning:"#E6DB74",warningdark:"#EDDD54",infolight:"#92E1F1",info:"#66D9EF",infodark:"#31CDED",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#F92672",money:"#E6DB74",hack:"#A6E22E",combat:"#75715E",cha:"#AE81FF",int:"#66D9EF",rep:"#E69F66",disabled:"#66cfbc",backgroundprimary:"#272822",backgroundsecondary:"#1B1C18",button:"#333"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Warmer",credit:"hexnaught",description:"Warmer, softer theme",reference:"https://discord.com/channels/415207508303544321/921991895230611466/921999581020028938",screenshot:n(905).a,colors:{primarylight:"#EA9062",primary:"#DD7B4A",primarydark:"#D3591C",successlight:"#6ACF6A",success:"#43BF43",successdark:"#3E913E",errorlight:"#C15757",error:"#B34141",errordark:"#752525",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#E6E69D",warning:"#DADA56",warningdark:"#A1A106",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#AD84CF",int:"#6495ed",rep:"#faffdf",disabled:"#76C6B7",backgroundprimary:"#000",backgroundsecondary:"#000",button:"#333"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Dark+",credit:"LoganMD",description:"VSCode Dark+",reference:"https://discord.com/channels/415207508303544321/921991895230611466/921999975867617310",screenshot:n(906).a,colors:{primarylight:"#E0E0BC",primary:"#CCCCAE",primarydark:"#B8B89C",successlight:"#00F000",success:"#00D200",successdark:"#00B400",errorlight:"#F00000",error:"#C80000",errordark:"#A00000",secondarylight:"#B4AEAE",secondary:"#969090",secondarydark:"#787272",warninglight:"#F0F000",warning:"#C8C800",warningdark:"#A0A000",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#1E1E1E",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#1E1E1E",backgroundsecondary:"#252525",button:"#333"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Mayukai Dark",description:"Mayukai Dark-esque",credit:"Festive Noire",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922037502334889994",screenshot:n(907).a,colors:{primarylight:"#DDDFC5",primary:"#CDCFB6",primarydark:"#9D9F8C",successlight:"#00EF00",success:"#00A500",successdark:"#007A00",errorlight:"#F92672",error:"#CA1C5C",errordark:"#90274A",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#D3D300",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#00010A",white:"#fff",black:"#020509",hp:"#dd3434",money:"#ffd700",hack:"#8CCF27",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#080C11",backgroundsecondary:"#03080F",button:"#00010A"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Purple",credit:"zer0ney",description:"Essentially all defaults except for purple replacing the main colors",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922091815849570395",screenshot:n(908).a,colors:{primarylight:"#BA55D3",primary:"#9370DB",primarydark:"#8A2BE2",successlight:"#BA55D3",success:"#9370DB",successdark:"#8A2BE2",errorlight:"#f00",error:"#c00",errordark:"#900",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#000",backgroundsecondary:"#000",button:"#333"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Smooth Green",description:"A nice green theme that doesn't hurt your eyes.",credit:"Swidt",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922243957986033725",screenshot:n(909).a,colors:{primarylight:"#E0E0BC",primary:"#B0D9A3",primarydark:"#B8B89C",successlight:"#00F000",success:"#6BC16B",successdark:"#00B400",errorlight:"#F00000",error:"#3D713D",errordark:"#A00000",secondarylight:"#B4AEAE",secondary:"#8FAF85",secondarydark:"#787272",warninglight:"#F0F000",warning:"#38F100",warningdark:"#A0A000",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#2F3C2B",white:"#fff",black:"#1E1E1E",hp:"#dd3434",money:"#4AA52E",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#35A135",disabled:"#66cfbc",backgroundprimary:"#1E1E1E",backgroundsecondary:"#252525",button:"#2F3C2B"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Dracula",description:"Dracula Look-alike",credit:"H3draut3r",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922296307836678144",screenshot:n(910).a,colors:{primarylight:"#7082B8",primary:"#F8F8F2",primarydark:"#FF79C6",successlight:"#0f0",success:"#0c0",successdark:"#090",errorlight:"#FD4545",error:"#FF2D2D",errordark:"#C62424",secondarylight:"#AAA",secondary:"#8BE9FD",secondarydark:"#666",warninglight:"#FFC281",warning:"#FFB86C",warningdark:"#E6A055",infolight:"#A0A0FF",info:"#7070FF",infodark:"#4040FF",welllight:"#44475A",well:"#363948",white:"#fff",black:"#282A36",hp:"#D34448",money:"#50FA7B",hack:"#F1FA8C",combat:"#BD93F9",cha:"#FF79C6",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#282A36",backgroundsecondary:"#21222C",button:"#21222C"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Dark Blue",description:"Very dark with a blue/purplelly primary",credit:"Saynt_Garmo",reference:"https://discord.com/channels/415207508303544321/921991895230611466/923084732718264340",screenshot:n(911).a,colors:{primarylight:"#023DDE",primary:"#4A41C8",primarydark:"#005299",successlight:"#00FF00",success:"#D1DAD1",successdark:"#BFCABF",errorlight:"#f00",error:"#c00",errordark:"#900",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#040505",white:"#fff",black:"#000000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#091419",backgroundsecondary:"#000000",button:"#000000"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Discord-like",description:"Discord inspired theme",credit:"Thermite",reference:"https://discord.com/channels/415207508303544321/921991895230611466/924305252017143818",screenshot:n(912).a,colors:{primarylight:"#7389DC",primary:"#7389DC",primarydark:"#5964F1",successlight:"#00CC00",success:"#20DF20",successdark:"#0CB80C",errorlight:"#EA5558",error:"#EC4145",errordark:"#E82528",secondarylight:"#C3C3C3",secondary:"#9C9C9C",secondarydark:"#4E4E4E",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#1C4FB3",welllight:"#999999",well:"#35383C",white:"#FFFFFF",black:"#202225",hp:"#FF5656",money:"#43FF43",hack:"#FFAB3D",combat:"#8A90FD",cha:"#FF51D9",int:"#6495ed",rep:"#FFFF30",disabled:"#474B51",backgroundprimary:"#2F3136",backgroundsecondary:"#35393E",button:"#333"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"One Dark",description:"Dark with a greenish tint",credit:"Dexalt142",reference:"https://discord.com/channels/415207508303544321/921991895230611466/924650660694208512",screenshot:n(913).a,colors:{primarylight:"#98C379",primary:"#98C379",primarydark:"#98C379",successlight:"#98C379",success:"#98C379",successdark:"#98C379",errorlight:"#E06C75",error:"#BE5046",errordark:"#BE5046",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#E5C07B",warning:"#E5C07B",warningdark:"#D19A66",infolight:"#61AFEF",info:"#61AFEF",infodark:"#61AFEF",welllight:"#4B5263",well:"#282C34",white:"#ABB2BF",black:"#282C34",hp:"#E06C75",money:"#E5C07B",hack:"#98C379",combat:"#ABB2BF",cha:"#C678DD",int:"#61AFEF",rep:"#ABB2BF",disabled:"#56B6C2",backgroundprimary:"#282C34",backgroundsecondary:"#21252B",button:"#4B5263"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Muted Gold & Blue",description:"Muted gold with blue accents.",credit:"Sloth",reference:"https://discord.com/channels/415207508303544321/921991895230611466/924672660758208563",screenshot:n(914).a,colors:{primarylight:"#E3B54A",primary:"#CAA243",primarydark:"#7E6937",successlight:"#82FF82",success:"#6FDA6F",successdark:"#64C364",errorlight:"#FD5555",error:"#D84A4A",errordark:"#AC3939",secondarylight:"#D8D0B8",secondary:"#B1AA95",secondarydark:"#736E5E",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#111111",white:"#fff",black:"#070300",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#0A0A0E",backgroundsecondary:"#0E0E10",button:"#222222"}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a={name:"Light",description:"Cobbled Together Light Theme",credit:"matt",reference:"https://discord.com/channels/415207508303544321/921991895230611466/926114005456658432",screenshot:n(915).a,colors:{primarylight:"#535353",primary:"#1A1A1A",primarydark:"#0d0d0d",successlight:"#63c439",success:"#428226",successdark:"#2E5A1B",errorlight:"#df7051",error:"#C94824",errordark:"#91341B",secondarylight:"#b3b3b3",secondary:"#9B9B9B",secondarydark:"#7A7979",warninglight:"#e8d464",warning:"#C6AD20",warningdark:"#9F8A16",infolight:"#6299cf",info:"#3778B7",infodark:"#30689C",welllight:"#f9f9f9",well:"#eaeaea",white:"#F7F7F7",black:"#F7F7F7",hp:"#BF5C41",money:"#E1B121",hack:"#47BC38",combat:"#656262",cha:"#A568AC",int:"#889BCF",rep:"#656262",disabled:"#70B4BF",backgroundprimary:"#F7F7F7",backgroundsecondary:"#f9f9f9",button:"#eaeaea"}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";e.a=n.p+"dist/images/83b2443ab7e7d346766c8f6bc5afc7a7.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/6caf35202b10b52e1fc2743f674c33e8.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/cb88977ea837bccb9cceb727adc78302.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/4e0e750f2f09de58219773edd46cbbf5.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/e97de4daa946331c7e99dee9c05d629c.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/9f96a5084f4e5f1a6c0041b41b34d62d.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/85a7b2896acb62be76f3ea7100fe9012.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/5aa87b7de67a77c914088783b055e1cf.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/c7164b072d62c91c27c6d607b5207e7b.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/66f4b86d86164fc117bd6d648e4eaa6f.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/a1110d6c8d16a14c4570411750248399.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/447bc31e61f55e7eff875be3e9a81f1a.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/297df8c0e47764ea113951318b2acf55.png"},function(t,e,n){"use strict";e.a=n.p+"dist/images/e66b0c327f97d08e4253f52234d659eb.png"},,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return ct}));var a=n(246),r=n(91),i=n(47),o=n(64),s=n(111),l=n(324),c=n(98),f=n(8),u=n(26),m=n(83),h=n(465),d=n(44),p=n(132),g=n(469),y=n(102),b=n(9),E=n(192),v=n(99),k=n(4),_=n(24),w=n(1396),S=n(1397),C=n(1398),x=n(1399),L=n(1400),O=n(1401),M=n(1402),T=n(1403),A=n(1404),R=n(588),N=n(1405),P=n(1406),I=n(1407),F=n(1408),D=n(1409),j=n(1410),B=n(1411),G=n(1412),W=n(1413),H=n(1414),U=n(1415),q=n(1416),$=n(1417),K=n(1418),z=n(1419),V=n(1421),Y=n(1422),J=n(1423),X=n(1426),Q=n(1427),Z=n(1428),tt=n(1429),et=n(1430),nt=n(1431),at=n(1432),rt=n(1433),it=n(1434),ot=n(1435),st=n(251);function lt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ct{constructor(){lt(this,"action",null),lt(this,"commandHistory",[]),lt(this,"commandHistoryIndex",0),lt(this,"outputHistory",[new a.b(`Bitburner v${f.a.VersionString} (${Object(st.a)()})`,"primary")]),lt(this,"contractOpen",!1),lt(this,"currDir","/")}process(t,e,n){null!==this.action&&(this.action.timeLeft-=f.a._idleSpeed*n/1e3,this.action.timeLeft<.01&&this.finishAction(t,e,!1),l.b.emit())}append(t){this.outputHistory.push(t),this.outputHistory.length>b.a.MaxTerminalCapacity&&this.outputHistory.splice(0,this.outputHistory.length-b.a.MaxTerminalCapacity),l.b.emit()}print(t){this.append(new a.b(t,"primary"))}printRaw(t){this.append(new a.c(t))}error(t){this.append(new a.b(t,"error"))}success(t){this.append(new a.b(t,"success"))}info(t){this.append(new a.b(t,"info"))}warn(t){this.append(new a.b(t,"warn"))}startHack(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.d)(e,t)/4,"h",e)}}startGrow(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot grow this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.a)(e,t)/16,"g",e)}}startWeaken(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot weaken this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.f)(e,t)/16,"w",e)}}startBackdoor(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot backdoor this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.d)(e,t)/4,"b",e)}}startAnalyze(t){this.print("Analyzing system...");const e=t.getCurrentServer();this.startAction(1,"a",e)}startAction(t,e,n){this.action=new a.d(t,e,n)}finishHack(t,e,n,a=!1){if(a)return;if(n instanceof r.a)return void this.error("Cannot hack this kind of server");if(!(n instanceof i.a))throw new Error("server should be normal server");const o=Object(v.b)(n,e),s=Math.random(),l=Object(v.c)(n,e),c=l/4;if(s0;if(this.print("Can run scripts on this host: "+(s?"YES":"NO")),this.print("RAM: "+k.a.formatRAM(e.maxRam)),e instanceof i.a){this.print("Backdoor: "+(e.backdoorInstalled?"YES":"NO"));const a=e.requiredHackingSkill;this.print("Required hacking skill for hack() and backdoor: "+(n?"N/A":a));const r=e.hackDifficulty;this.print("Server security level: "+(n?"N/A":k.a.formatServerSecurity(r)));const i=Object(v.b)(e,t);this.print("Chance to hack: "+(n?"N/A":k.a.formatPercentage(i)));const o=1e3*Object(v.d)(e,t);this.print("Time to hack: "+(n?"N/A":Object(_.b)(o,!0)))}if(this.print("Total money available on server: "+(e instanceof i.a?k.a.formatMoney(e.moneyAvailable):"N/A")),e instanceof i.a){const t=e.numOpenPortsRequired;this.print("Required number of open ports for NUKE: "+(n?"N/A":t)),this.print("SSH port: "+(e.sshPortOpen?"Open":"Closed")),this.print("FTP port: "+(e.ftpPortOpen?"Open":"Closed")),this.print("SMTP port: "+(e.smtpPortOpen?"Open":"Closed")),this.print("HTTP port: "+(e.httpPortOpen?"Open":"Closed")),this.print("SQL port: "+(e.sqlPortOpen?"Open":"Closed"))}}}finishAction(t,e,n=!1){if(null!==this.action){if(!this.action.server)throw new Error("Missing action target server");this.print(this.getProgressText()),"h"===this.action.action?this.finishHack(t,e,this.action.server,n):"g"===this.action.action?this.finishGrow(e,this.action.server,n):"w"===this.action.action?this.finishWeaken(e,this.action.server,n):"b"===this.action.action?this.finishBackdoor(t,e,this.action.server,n):"a"===this.action.action&&this.finishAnalyze(e,this.action.server,n),n&&this.print("Cancelled"),this.action=null,l.b.emit()}else if(!n)throw new Error("Finish action called when there was no action")}getFile(t,e){return Object(c.a)(e)?this.getScript(t,e):e.endsWith(".lit")?this.getLitFile(t,e):e.endsWith(".txt")?this.getTextFile(t,e):null}getFilepath(t){const e=Object(m.d)(t,this.cwd());if(null==e)throw new Error("Invalid file path specified: "+t);return Object(m.h)(e)?Object(m.k)(e):e}getScript(t,e){const n=t.getCurrentServer(),a=this.getFilepath(e);for(const t of n.scripts)if(a===t.filename)return t;return null}getTextFile(t,e){const n=t.getCurrentServer(),a=this.getFilepath(e);for(const t of n.textFiles)if(a===t.fn)return t;return null}getLitFile(t,e){const n=t.getCurrentServer(),a=this.getFilepath(e);for(const t of n.messages)if("string"==typeof t&&a===t)return t;return null}cwd(){return this.currDir}setcwd(t){this.currDir=t,l.b.emit()}async runContract(t,e){if(this.contractOpen)return this.error("There's already a Coding Contract in Progress");const n=t.getCurrentServer(),a=n.getContract(e);if(null==a)return this.error("No such contract");this.contractOpen=!0;switch(await a.prompt()){case s.b.Success:if(null!==a.reward){const e=t.gainCodingContractReward(a.reward,a.getDifficulty());this.print("Contract SUCCESS - "+e)}n.removeContract(a);break;case s.b.Failure:++a.tries,a.tries>=a.getMaxNumTries()?(this.error("Contract FAILED - Contract is now self-destructing"),n.removeContract(a)):this.error(`Contract FAILED - ${a.getMaxNumTries()-a.tries} tries remaining`);break;case s.b.Cancelled:default:this.print("Contract cancelled")}this.contractOpen=!1}executeScanAnalyzeCommand(t,e=1,n=!1){this.print("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),this.print(" ");const i={};for(const t of Object(u.c)())i[t.hostname]=0;const s=[],l=[0],c=t.getCurrentServer();for(s.push(c);0!=s.length;){const c=s.pop();if(!c)continue;const f=l.pop();if(void 0===f)continue;const u=c instanceof r.a;if(!n&&c.purchasedByPlayer&&"home"!=c.hostname)continue;if(i[c.hostname]||f>e)continue;if(!n&&u)continue;i[c.hostname]=1;for(let t=c.serversOnNetwork.length-1;t>=0;--t){const e=Object(p.a)(c,t);null!==e&&(s.push(e),l.push(f+1))}if(0==f)continue;const m=Array(4*(f-1)+1).join("-");t.hasProgram(o.a.AutoLink.name)?this.append(new a.a(m,c.hostname)):this.print(m+c.hostname);const h=m+"--";let d="NO";c.hasAdminRights&&(d="YES"),this.print(`${h}Root Access: ${d}${u?"":", Required hacking skill: "+c.requiredHackingSkill}`),c.hasOwnProperty("numOpenPortsRequired")&&this.print(h+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),this.print(h+"RAM: "+k.a.formatRAM(c.maxRam)),this.print(" ")}}connectToServer(t,e){const n=Object(u.d)(e);null!=n?(t.getCurrentServer().isConnectedTo=!1,t.currentServer=n.hostname,t.getCurrentServer().isConnectedTo=!0,this.print("Connected to "+n.hostname),this.setcwd("/"),"darkweb"==t.getCurrentServer().hostname&&Object(h.c)()):this.error("Invalid server. Connection failed.")}executeCommands(t,e,n){n=(n=n.trim()).replace(/\s\s+/g," "),this.commandHistory[this.commandHistory.length-1]!=n&&(this.commandHistory.push(n),this.commandHistory.length>50&&this.commandHistory.splice(0,1),e.terminalCommandHistory=this.commandHistory),this.commandHistoryIndex=this.commandHistory.length;const a=Object(g.b)(n);for(let n=0;nthis.clear(),cls:()=>this.clear(),connect:T.a,cp:A.a,download:R.a,expr:N.a,free:P.a,grow:I.a,hack:F.a,help:D.a,history:j.a,home:B.a,hostname:G.a,kill:W.a,killall:H.a,ls:U.a,lscpu:q.a,mem:$.a,mv:K.a,nano:z.a,ps:V.a,rm:Y.a,run:J.a,scan:X.a,scp:Z.a,sudov:tt.a,tail:et.a,top:nt.a,unalias:at.a,vim:rt.a,weaken:it.a,wget:ot.a}[i.toLowerCase()];o?o(this,t,e,r,a.slice(1)):this.error(`Command ${a[0]} not found`)}getProgressText(){if(null===this.action)throw new Error("trying to get the progress text when there's no action");return Object(E.a)({progress:(this.action.time-this.action.timeLeft)/this.action.time,totalTicks:50})}}},,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(36);function r(t){let e=t;return e.startsWith("[")&&(e=e.slice(1)),e.endsWith("]")&&(e=e.slice(0,-1)),e}function i(t){let e=t;return(e.startsWith('"')||e.startsWith("'"))&&(e=e.slice(1)),(e.endsWith('"')||e.endsWith("'"))&&(e=e.slice(0,-1)),e}function o(t){const e=[];return t.forEach(t=>{let n=t.toString();n=["[",n,"]"].join(""),e.push(n)}),e.join(",").replace(/\s/g,"")}const s=[{desc:t=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${t}?`].join(" "),difficulty:1,gen:()=>Object(a.a)(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(t,e)=>{let n=2,a=t;for(;a>(n-1)*(n-1);){for(;a%n==0;)a=Math.round(a/n);++n}return(1===a?n-1:a)===parseInt(e,10)}},{desc:t=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",""+t.toString()].join(" "),difficulty:1,gen:()=>{const t=Object(a.a)(5,40),e=[];e.length=t;for(let n=0;n{const n=t.slice();for(let t=1;t["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    1 + 1 + 1 + 1\n\n",`How many different ways can the number ${t} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>Object(a.a)(8,100),name:"Total Ways to Sum",numTries:10,solver:(t,e)=>{const n=[1];n.length=t+1,n.fill(0,1);for(let e=1;e{let e=["Given the following array of arrays of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");return e+="    [\n",e+=t.map(t=>"        ["+t.map(t=>(""+t).padStart(2," ")).join(",")+"]").join("\n"),e+="\n    ]\n",e+=["\nHere is an example of what spiral order should be:\n\n","    [\n","        [1, 2, 3]\n","        [4, 5, 6]\n","        [7, 8, 9]\n","    ]\n\n","Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n\n","    [\n","        [1,  2,  3,  4]\n","        [5,  6,  7,  8]\n","        [9, 10, 11, 12]\n","    ]\n\n","Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]"].join(" "),e},difficulty:2,gen:()=>{const t=Object(a.a)(1,15),e=Object(a.a)(1,15),n=[];n.length=t;for(let a=0;a{const n=[];let a=0,i=t.length-1,o=0,s=t[0].length-1,l=0;for(;;){for(let e=o;e<=s;e++)n[l]=t[a][e],++l;if(++a>i)break;for(let e=a;e<=i;e++)n[l]=t[e][s],++l;if(--s=o;e--)n[l]=t[i][e],++l;if(--i=a;e--)n[l]=t[e][o],++l;if(++o>s)break}const c=r(e).replace(/\s/g,"").split(",");for(let t=0;t["You are given the following array of integers:\n\n",t+"\n\n","Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const t=Object(a.a)(3,25),e=[];e.length=t;for(let t=0;t{const n=t.length;let a=0;for(let e=0;a["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(t)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const t=[],e=Object(a.a)(3,20);for(let n=0;n{const n=t.slice();n.sort((t,e)=>t[0]-e[0]);const a=[];let i=n[0][0],s=n[0][1];for(const t of n)t[0]<=s?s=Math.max(s,t[1]):(a.push([i,s]),i=t[0],s=t[1]);a.push([i,s]);const l=o(a),c=e.replace(/\s/g,"");return l===c||l===r(c)}},{desc:t=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",t+"\n\n","Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let t="";for(let e=0;e<4;++e){t+=Object(a.a)(0,255).toString()}return t},name:"Generate IP Addresses",numTries:10,solver:(t,e)=>{const n=[];for(let e=1;e<=3;++e)for(let a=1;a<=3;++a)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(e+a+r+i===t.length){const o=parseInt(t.substring(0,e),10),s=parseInt(t.substring(e,e+a),10),l=parseInt(t.substring(e+a,e+a+r),10),c=parseInt(t.substring(e+a+r,e+a+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const e=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");e.length===t.length+3&&n.push(e)}}const a=r(e).replace(/\s/g,"").split(",");if(a.length!==n.length)return!1;for(const t of a)if(!n.includes(t))return!1;return!0}},{desc:t=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",t+"\n\n","Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const t=Object(a.a)(3,50),e=[];e.length=t;for(let n=0;n{let n=0,a=0;for(let e=1;e["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",t+"\n\n","Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const t=Object(a.a)(3,50),e=[];e.length=t;for(let n=0;n{let n=0;for(let e=1;e["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",t+"\n\n","Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const t=Object(a.a)(3,50),e=[];e.length=t;for(let n=0;n{let n=Number.MIN_SAFE_INTEGER,a=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const e of t)i=Math.max(i,a+e),a=Math.max(a,r-e),r=Math.max(r,n+e),n=Math.max(n,-1*e);return i.toString()===e}},{desc:t=>["You are given the following array with two elements:\n\n",`[${t[0]}, [${t[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" "),difficulty:8,gen:()=>{const t=Object(a.a)(2,10),e=Object(a.a)(3,50),n=[];n.length=e;for(let t=0;t{const n=t[0],a=t[1],r=a.length;if(r<2)return 0===parseInt(e);if(n>r/2){let t=0;for(let e=1;e0;--t)o[t]=Math.max(o[t],i[t]+s),i[t]=Math.max(i[t],o[t-1]-s)}return parseInt(e)===o[n]}},{desc:t=>{function e(t,n=0){const a=t.length;if(n>=a)return"";let r=[" ".repeat(a-n+1),"[",t[n].toString(),"]"].join("");return n 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const t=[],e=Object(a.a)(3,12);t.length=e;for(let n=0;n{const n=t.length,a=t[n-1].slice();for(let e=n-2;e>-1;--e)for(let n=0;n{const e=t[0],n=t[1];return["You are in a grid with",`${e} rows and ${n} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${e}, ${n}]`].join(" ")},difficulty:3,gen:()=>[Object(a.a)(2,14),Object(a.a)(2,14)],name:"Unique Paths in a Grid I",numTries:10,solver:(t,e)=>{const n=t[0],a=t[1],r=[];r.length=n;for(let t=0;t{let e="";for(const n of t)e+=n.toString()+",\n";return["You are located in the top-left corner of the following grid:\n\n",e+"\n","You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const t=Object(a.a)(2,12),e=Object(a.a)(2,12),n=[];n.length=t;for(let a=0;a{const n=[];n.length=t.length;for(let e=0;e0?n[t-1][e]:0)+(e>0?n[t][e-1]:0);return n[n.length-1][n[0].length-1]===parseInt(e)}},{desc:t=>["Given the following string:\n\n",t+"\n\n","remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")(" -> [""]'].join(" "),difficulty:10,gen:()=>{const t=Object(a.a)(6,20),e=[];e.length=t,Math.random()<.8?e[0]="(":e[0]=")";for(let n=1;n{let n=0,a=0;const i=[];for(let e=0;e0?--n:++a);!function t(e,n,a,r,i,o,s){if(i.length!==n)"("===i[n]?(a>0&&t(e,n+1,a-1,r,i,o,s),t(e+1,n+1,a,r,i,o+i[n],s)):")"===i[n]?(r>0&&t(e,n+1,a,r-1,i,o,s),e>0&&t(e-1,n+1,a,r,i,o+i[n],s)):t(e,n+1,a,r,i,o+i[n],s);else if(0===a&&0===r&&0===e){for(let t=0;t{const e=t[0],n=t[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",e+"\n\n",`You are also given a target number of ${n}. Return all possible ways`,"you can add the +(add), -(subtract), and *(multiply) operators to the string such","that it evaluates to the target number. (Normal order of operations applies.)\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${e}", ${n}]\n\n`,"NOTE: The order of evaluation expects script operator precedence","NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const t=Object(a.a)(4,12),e=[];e.length=t;for(let t=0;t{const n=t[0],a=t[1];const o=r(e).split(",");for(let t=0;t=t}}const h=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:m(1),time:a.a.MillisecondsPerFiveMinutes},run:(t,e,n,a)=>{if(a instanceof r.a)return a.hasAdminRights?(e.print("You already have root access to this computer. There is no reason to run NUKE.exe"),void e.print("You can now run scripts on this server.")):a.openPortCount>=a.numOpenPortsRequired?(a.hasAdminRights=!0,e.print("NUKE successful! Gained root access to "+a.hostname),void e.print("You can now run scripts on this server.")):void e.print("NUKE unsuccessful. Not enough ports have been opened");e.error("Cannot nuke this kind of server.")}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:m(50),time:2*a.a.MillisecondsPerFiveMinutes},run:(t,e,n,a)=>{a instanceof r.a?a.sshPortOpen?e.print("SSH Port (22) is already open!"):(a.sshPortOpen=!0,e.print("Opened SSH Port(22)!"),a.openPortCount++):e.error("Cannot run BruteSSH.exe on this kind of server.")}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:m(100),time:a.a.MillisecondsPerHalfHour},run:(t,e,n,a)=>{a instanceof r.a?a.ftpPortOpen?e.print("FTP Port (21) is already open!"):(a.ftpPortOpen=!0,e.print("Opened FTP Port (21)!"),a.openPortCount++):e.error("Cannot run FTPCrack.exe on this kind of server.")}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:m(250),time:a.a.MillisecondsPer2Hours},run:(t,e,n,a)=>{a instanceof r.a?a.smtpPortOpen?e.print("SMTP Port (25) is already open!"):(a.smtpPortOpen=!0,e.print("Opened SMTP Port (25)!"),a.openPortCount++):e.error("Cannot run relaySMTP.exe on this kind of server.")}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:m(500),time:a.a.MillisecondsPer4Hours},run:(t,e,n,a)=>{a instanceof r.a?a.httpPortOpen?e.print("HTTP Port (80) is already open!"):(a.httpPortOpen=!0,e.print("Opened HTTP Port (80)!"),a.openPortCount++):e.error("Cannot run HTTPWorm.exe on this kind of server.")}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:m(750),time:a.a.MillisecondsPer8Hours},run:(t,e,n,a)=>{a instanceof r.a?a.sqlPortOpen?e.print("SQL Port (1433) is already open!"):(a.sqlPortOpen=!0,e.print("Opened SQL Port (1433)!"),a.openPortCount++):e.error("Cannot run SQLInject.exe on this kind of server.")}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:m(75),time:a.a.MillisecondsPerQuarterHour},run:(t,e)=>{e.print("This executable cannot be run."),e.print("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:m(400),time:a.a.MillisecondsPer2Hours},run:(t,e)=>{e.print("This executable cannot be run."),e.print("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:m(75),time:a.a.MillisecondsPerHalfHour},run:(t,e,n,a,s)=>{if(1!==s.length)return void e.error("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const l=Object(o.d)(s[0]);null!=l?l instanceof r.a?(e.print(l.hostname+":"),e.print("Server base security level: "+l.baseDifficulty),e.print("Server current security level: "+l.hackDifficulty),e.print("Server growth rate: "+l.serverGrowth),e.print("Netscript hack() execution time: "+Object(i.b)(1e3*Object(f.d)(l,n),!0)),e.print("Netscript grow() execution time: "+Object(i.b)(1e3*Object(f.a)(l,n),!0)),e.print("Netscript weaken() execution time: "+Object(i.b)(1e3*Object(f.f)(l,n),!0))):e.error("ServerProfiler.exe can only be run on normal servers."):e.error("Invalid server IP/hostname")}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:m(25),time:a.a.MillisecondsPerQuarterHour},run:(t,e)=>{e.print("This executable cannot be run."),e.print("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),e.print("When using scan-analyze, click on a server's hostname to connect to it.")}},{key:"Formulas",name:"Formulas.exe",create:{level:1e3,tooltip:"This program allows you to use the formulas API",req:m(1e3),time:a.a.MillisecondsPer4Hours},run:(t,e)=>{e.print("This executable cannot be run."),e.print("Formulas.exe lets you use the formulas API.")}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(t){return t.sourceFiles.length>0&&t.hacking>=1},time:a.a.MillisecondsPerFiveMinutes/20},run:()=>{c.a.emit()}},{key:"Flight",name:"fl1ght.exe",create:null,run:(t,e,n)=>{const a=Math.round(30*l.a.DaedalusAugsRequirement);if(!(n.augmentations.length>=a&&n.money>1e11&&n.hacking>=2500))return e.print(`Augmentations: ${n.augmentations.length} / ${a}`),e.print(`Money: ${s.a.formatMoney(n.money)} / $100b`),void e.print(`Hacking skill: ${n.hacking} / 2500`);e.print("We will contact you."),e.print(`-- ${u.a.Daedalus} --`)}}]},function(t,e,n){"use strict";function a(t){const e="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";return new RegExp(`^${e}.${e}.${e}.${e}$`).test(t)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(8);const r=(t,e=1)=>{const n={hacking_chance_mult:t.hacking_chance_mult,hacking_speed_mult:t.hacking_speed_mult,hacking_money_mult:t.hacking_money_mult,hacking_grow_mult:t.hacking_grow_mult,hacking_mult:t.hacking_mult,strength_mult:t.strength_mult,defense_mult:t.defense_mult,dexterity_mult:t.dexterity_mult,agility_mult:t.agility_mult,charisma_mult:t.charisma_mult,hacking_exp_mult:t.hacking_exp_mult,strength_exp_mult:t.strength_exp_mult,defense_exp_mult:t.defense_exp_mult,dexterity_exp_mult:t.dexterity_exp_mult,agility_exp_mult:t.agility_exp_mult,charisma_exp_mult:t.charisma_exp_mult,company_rep_mult:t.company_rep_mult,faction_rep_mult:t.faction_rep_mult,crime_money_mult:t.crime_money_mult,crime_success_mult:t.crime_success_mult,hacknet_node_money_mult:t.hacknet_node_money_mult,hacknet_node_purchase_cost_mult:t.hacknet_node_purchase_cost_mult,hacknet_node_ram_cost_mult:t.hacknet_node_ram_cost_mult,hacknet_node_core_cost_mult:t.hacknet_node_core_cost_mult,hacknet_node_level_cost_mult:t.hacknet_node_level_cost_mult,work_money_mult:t.work_money_mult,bladeburner_max_stamina_mult:t.bladeburner_max_stamina_mult,bladeburner_stamina_gain_mult:t.bladeburner_stamina_gain_mult,bladeburner_analysis_mult:t.bladeburner_analysis_mult,bladeburner_success_chance_mult:t.bladeburner_success_chance_mult};for(const[t,r]of Object.entries(n))n[t]=r*a.a.EntropyEffect**e;return n}},function(t,e,n){"use strict";function a(){const t=new Date,e=("0"+t.getHours()).slice(-2),n=("0"+t.getMinutes()).slice(-2),a=("0"+t.getSeconds()).slice(-2);return`${t.getMonth()+1}/${t.getDate()} ${e}:${n}:${a}`}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";function a(t){const e=1+Math.log(t)/25;return isNaN(e)||!isFinite(e)?1:e}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(25);const r=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class i{constructor(){var t,e,n;n=0,(e="state")in(t=this)?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}getState(){return r[this.state]}nextState(){(this.state<0||this.state>=r.length)&&(this.state=0),++this.state,this.state>=r.length&&(this.state=0)}toJSON(){return Object(a.b)("CorporationState",this)}static fromJSON(t){return Object(a.a)(i,t.data)}}a.c.constructors.CorporationState=i},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(17),r=n(158),i=n(63),o=n(5);const s={};!function(){let t,e,n;t="The Beginner's Guide to Hacking",e=i.a.HackersStartingHandbook,n="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two important Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",s[e]=new r.a(t,e,n),t="The Complete Handbook for Creating a Successful Corporation",e=i.a.CorporationManagementHandbook,n="Getting Started with Corporations
To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.

The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.

Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.

Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.

Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.

These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales

-Remember, you need to spend money to make money!

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",s[e]=new r.a(t,e,n),t="A Brief History of Synthoids",e=i.a.HistoryOfSynthoids,n=`Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.

Synthoids were first designed and manufactured by ${o.a.OmniTekIncorporated} sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued ${o.a.OmniTekIncorporated} had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.

All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into ${o.a.OmniTekIncorporated} and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months ${o.a.OmniTekIncorporated} unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.

It wasn't until the sacrifice of an elite international military taskforce, called the ${o.a.Bladeburners}, that humanity was finally able to defeat the Synthoids. The ${o.a.Bladeburners}' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.

In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned ${o.a.OmniTekIncorporated} from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

Unfortunately, many believe 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. In response, many nations have created `+o.a.Bladeburners+" divisions, special military branches that are tasked with investigating and dealing with any Synthoid threats.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

Nobody knows what happened to the terrorist group Ascendis Totalis.",s[e]=new r.a(t,e,n),t="A Green Tomorrow",e=i.a.AGreenTomorrow,n="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.

The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",s[e]=new r.a(t,e,n),t="Alpha and Omega",e=i.a.AlphaOmega,n="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'

And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",s[e]=new r.a(t,e,n),t="Are We Living in a Computer Simulation?",e=i.a.SimulatedReality,n="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.

Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened.

Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",s[e]=new r.a(t,e,n),t="Beyond Man",e=i.a.BeyondMan,n="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?

Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",s[e]=new r.a(t,e,n),t="Brighter than the Sun",e=i.a.BrighterThanTheSun,n=`When people think about the corporations that dominate the East, they typically think of ${o.a.KuaiGongInternational}, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or ${o.a.OmniTekIncorporated}, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.

The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ${o.a.ECorp}, ${o.a.MegaCorp}, and ${o.a.KuaiGongInternational} have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.`,s[e]=new r.a(t,e,n),t="Democracy is Dead: The Fall of an Empire",e=i.a.DemocracyIsDead,n="They rose from the shadows in the street.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
And now democracy is dead, in the USA.",s[e]=new r.a(t,e,n),t="Figures Show Rising Crime Rates in "+a.a.Sector12,e=i.a.Sector12Crime,n=`A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in ${a.a.Sector12}. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.

CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as ${o.a.TheSyndicate} or the ${o.a.SlumSnakes}.`,s[e]=new r.a(t,e,n),t="Man and the Machine",e=i.a.ManAndMachine,n="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",s[e]=new r.a(t,e,n),t="Secret Societies",e=i.a.SecretSocieties,n=`The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.

However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and ${o.a.Illuminati}, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.

Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as ${o.a.TheBlackHand}, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as ${o.a.NiteSec}, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious ${o.a.BitRunners}, whose purpose still remains unknown.`,s[e]=new r.a(t,e,n),t="Space: The Failed Frontier",e=i.a.TheFailedFrontier,n="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.

But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.

And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",s[e]=new r.a(t,e,n),t="Coded Intelligence: Myth or Reality?",e=i.a.CodedIntelligence,n=`Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transportation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.

We've certainly come close to artificial intelligence that is similar to humans. For example ${o.a.OmniTekIncorporated}'s CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'`,s[e]=new r.a(t,e,n),t="Synthetic Muscles",e=i.a.SyntheticMuscles,n="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.

As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",s[e]=new r.a(t,e,n),t="Tensions rise in global tech race",e=i.a.TensionsInTechRace,n=`Have we entered a new Cold War? Is WWIII just beyond the horizon?

After rumors came out that ${o.a.OmniTekIncorporated} had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, ${o.a.MegaCorp} and ${o.a.ECorp} have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.`,s[e]=new r.a(t,e,n),t="The Cost of Immortality",e=i.a.CostOfImmortality,n="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.

Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.

Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",s[e]=new r.a(t,e,n),t="The Hidden World",e=i.a.TheHiddenWorld,n=`WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ${o.a.Illuminati.toUpperCase()} ARE THE SECRET RULERS OF THE WORLD!

Yes, the ${o.a.Illuminati} of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.

OPEN YOUR EYES

It was the ${o.a.Illuminati} that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.`,s[e]=new r.a(t,e,n),t="The New God",e=i.a.TheNewGod,n="Everyone has a moment in their life when they wonder about the bigger questions.

What's the point of all this? What is my purpose?

Some people dare to think even bigger.

What will the fate of the human race be?

We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into something greater. This is our future.

Embrace it, and you will obey a new god. The God in the Machine.",s[e]=new r.a(t,e,n),t="The New Triads",e=i.a.NewTriads,n=`The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the ${o.a.Tetrads}.

It is widely believed that the ${o.a.Tetrads} are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the ${o.a.Tetrads}, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The ${o.a.Tetrads} started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.

Not much else is known about the ${o.a.Tetrads}, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the ${o.a.Tetrads} have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.`,s[e]=new r.a(t,e,n),t="The Secret War",e=i.a.TheSecretWar,n="",s[e]=new r.a(t,e,n)}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a=[{desc:"This gang member is currently idle",isCombat:!0,isHacking:!0,name:"Unassigned",params:{hackWeight:100}},{desc:"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:3,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:7.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:18,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"DDoS Attacks",params:{baseRespect:4e-4,baseWanted:.2,hackWeight:100,difficulty:8}},{desc:"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Plant Virus",params:{baseRespect:6e-4,baseWanted:.4,hackWeight:100,difficulty:12}},{desc:"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:45,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:360,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level",isCombat:!1,isHacking:!0,name:"Cyberterrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:80,chaWeight:20,difficulty:36}},{desc:"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:3,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Mug People",params:{baseRespect:5e-5,baseWanted:5e-5,baseMoney:3.6,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory",isCombat:!0,isHacking:!1,name:"Deal Drugs",params:{baseRespect:6e-5,baseWanted:.002,baseMoney:15,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:7.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:45,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:114,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:174,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:72,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:360,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Terrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:36,territory:{money:1,respect:2,wanted:2}}},{desc:"Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{desc:"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(579),r=n(241),i=n(225),o=n(25),s=n(199);function l(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class c{constructor(t=""){l(this,"task","Unassigned"),l(this,"earnedRespect",0),l(this,"hack",1),l(this,"str",1),l(this,"def",1),l(this,"dex",1),l(this,"agi",1),l(this,"cha",1),l(this,"hack_exp",0),l(this,"str_exp",0),l(this,"def_exp",0),l(this,"dex_exp",0),l(this,"agi_exp",0),l(this,"cha_exp",0),l(this,"hack_mult",1),l(this,"str_mult",1),l(this,"def_mult",1),l(this,"dex_mult",1),l(this,"agi_mult",1),l(this,"cha_mult",1),l(this,"hack_asc_points",0),l(this,"str_asc_points",0),l(this,"def_asc_points",0),l(this,"dex_asc_points",0),l(this,"agi_asc_points",0),l(this,"cha_asc_points",0),l(this,"upgrades",[]),l(this,"augmentations",[]),this.name=t}calculateSkill(t,e=1){return Math.max(Math.floor(e*(32*Math.log(t+534.5)-200)),1)}calculateAscensionMult(t){return Object(s.a)(t)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(t){return r.a.hasOwnProperty(t)?(this.task=t,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof a.a&&(this.task=this.task.name),r.a.hasOwnProperty(this.task)?r.a[this.task]:r.a.Unassigned}calculateRespectGain(t){const e=this.getTask(),n={respect:t.respect,wantedLevel:t.wanted,territory:t.getTerritory()};return Object(s.d)(n,this,e)}calculateWantedLevelGain(t){const e=this.getTask(),n={respect:t.respect,wantedLevel:t.wanted,territory:t.getTerritory()};return Object(s.e)(n,this,e)}calculateMoneyGain(t){const e=this.getTask(),n={respect:t.respect,wantedLevel:t.wanted,territory:t.getTerritory()};return Object(s.c)(n,this,e)}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(t=1){const e=this.getTask();if(e===r.a.Unassigned)return;const n=Math.pow(e.difficulty,.9)*t,a=this.expMult();this.hack_exp+=e.hackWeight/1500*n*a.hack*this.calculateAscensionMult(this.hack_asc_points),this.str_exp+=e.strWeight/1500*n*a.str*this.calculateAscensionMult(this.str_asc_points),this.def_exp+=e.defWeight/1500*n*a.def*this.calculateAscensionMult(this.def_asc_points),this.dex_exp+=e.dexWeight/1500*n*a.dex*this.calculateAscensionMult(this.dex_asc_points),this.agi_exp+=e.agiWeight/1500*n*a.agi*this.calculateAscensionMult(this.agi_asc_points),this.cha_exp+=e.chaWeight/1500*n*a.cha*this.calculateAscensionMult(this.cha_asc_points)}recordEarnedRespect(t=1,e){this.earnedRespect+=this.calculateRespectGain(e)*t}getGainedAscensionPoints(){return{hack:Object(s.b)(this.hack_exp),str:Object(s.b)(this.str_exp),def:Object(s.b)(this.def_exp),dex:Object(s.b)(this.dex_exp),agi:Object(s.b)(this.agi_exp),cha:Object(s.b)(this.cha_exp)}}canAscend(){const t=this.getGainedAscensionPoints();return t.hack>0||t.str>0||t.def>0||t.dex>0||t.agi>0||t.cha>0}getCurrentAscensionMults(){return{hack:this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points)}}getAscensionMultsAfterAscend(){const t=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+t.hack),str:this.calculateAscensionMult(this.str_asc_points+t.str),def:this.calculateAscensionMult(this.def_asc_points+t.def),dex:this.calculateAscensionMult(this.dex_asc_points+t.dex),agi:this.calculateAscensionMult(this.agi_asc_points+t.agi),cha:this.calculateAscensionMult(this.cha_asc_points+t.cha)}}getAscensionResults(){const t=this.getAscensionMultsAfterAscend(),e=this.getCurrentAscensionMults();return{hack:t.hack/e.hack,str:t.str/e.str,def:t.def/e.def,dex:t.dex/e.dex,agi:t.agi/e.agi,cha:t.cha/e.cha}}ascend(){const t=this.getAscensionResults(),e=this.getGainedAscensionPoints();this.hack_asc_points+=e.hack,this.str_asc_points+=e.str,this.def_asc_points+=e.def,this.dex_asc_points+=e.dex,this.agi_asc_points+=e.agi,this.cha_asc_points+=e.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let t=0;t")}getType(){switch(this.type){case a.a.Weapon:return"Weapon";case a.a.Armor:return"Armor";case a.a.Vehicle:return"Vehicle";case a.a.Rootkit:return"Rootkit";case a.a.Augmentation:return"Augmentation";default:return""}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(5);const r={[a.a.SlumSnakes]:1,[a.a.Tetrads]:2,[a.a.TheSyndicate]:2,[a.a.TheDarkArmy]:2,[a.a.SpeakersForTheDead]:5,[a.a.NiteSec]:2,[a.a.TheBlackHand]:5}},function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var a=n(32),r=n(11);const i={},o={},s={},l={},c={},f={},u={},m={},h={},d={},p={},g={},y={},b={},E={},v={},k={},_={},w={};a.j.forEach(t=>{i[t]=!0,c[t]=!0}),a.d.forEach(t=>{o[t]=!0,c[t]=!0}),a.f.forEach(t=>{s[t]=!0,c[t]=!0}),c[a.i[0]]=!0,l[a.i[0]]=!0,a.b.forEach(t=>{f[t]=!0}),a.h.forEach(t=>{m[t]=!0}),a.a.forEach(t=>{u[t]=!0}),a.k.forEach(t=>{h[t]=!0}),a.c.forEach(t=>{d[t]=!0});for(let t=0;tnull),null!=t.cost&&(this.cost=t.cost),null!=t.effectText&&(this.effectText=t.effectText),this.costPerLevel=t.costPerLevel,this.desc=t.desc,this.hasTargetServer=!!t.hasTargetServer&&t.hasTargetServer,this.name=t.name,this.value=t.value}getCost(t){return"number"==typeof this.cost?this.cost:Math.round((t+1)*this.costPerLevel)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(4),o=n(20);const s=[{cost:4,costPerLevel:4,desc:"Sell hashes for $1m",name:"Sell for Money",effectText:t=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e6*t})),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:t=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e9*t})," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",effectText:t=>r.a.createElement(r.a.Fragment,null,"Improves studying by ",20*t,"%"),value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:t=>r.a.createElement(r.a.Fragment,null,"Improves training by ",20*t,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:t=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",t,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:t=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(100*t,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:t=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(10*t,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:t=>r.a.createElement(r.a.Fragment,null,"Generated ",t," contracts."),value:1}]},function(t,e,n){"use strict";function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}));class r{constructor(t){a(this,"parent",null),a(this,"stopFlag",!1),a(this,"vars",{}),t instanceof r&&(this.vars=Object.assign({},t.vars)),this.parent=t}lookup(t){let e=this;for(;e;){if(Object.prototype.hasOwnProperty.call(e.vars,t))return e;e=e.parent}return null}get(t){if(t in this.vars)return this.vars[t];throw new Error("Undefined variable "+t)}set(t,e){const n=this.lookup(t);return null!==n?n.vars[t]=e:this.vars[t]=e}def(t,e){return this.vars[t]=e}}},function(t,e,n){"use strict";function a(t){return!isNaN(t)&&(0!==t&&0==(t&t-1))}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(97),r=n(11);const i=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.a.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.a.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.a.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.a.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.a.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.a.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.a.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.a[r.a.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.a.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.a[r.a.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.a.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.a[r.a.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.a.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.a[r.a.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.a.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:a.a[r.a.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.a.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:a.a[r.a.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.a.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:a.a[r.a.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.a.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.a[r.a.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.a.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.a[r.a.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.a.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.a[r.a.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.a.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:a.a[r.a.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.a.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:a.a[r.a.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.a.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:a.a[r.a.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.a.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:a.a[r.a.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.a.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.a.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:a.a[r.a.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.a.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:a.a[r.a.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.a.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:a.a[r.a.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.a.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:a.a[r.a.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.a.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:a.a[r.a.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:a.a["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:r.a.Sector12JoesGuns,otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:a.a[r.a.Sector12JoesGuns]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:a.a["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:a.a["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:a.a["Titan Laboratories"]}]},,function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(5),r=n(252),i=n(13),o=n(511),s=n(80),l=n(241),c=n(225);function f(t,e,n){const f=function(e){const a=t.gang;if(null===a)throw new Error("Must have joined gang");if(!(a instanceof o.a))throw n.makeRuntimeErrorMsg("gang."+e,"You do not currently have a Gang")},u=function(e,a){const r=t.gang;if(null===r)throw new Error("Must have joined gang");for(const t of r.members)if(t.name===a)return t;throw n.makeRuntimeErrorMsg("gang."+e,`Invalid gang member: '${a}'`)};return{createGang:function(e){const o=n.string("createGang","faction",e);if(n.updateDynamicRam("createGang",Object(i.c)(t,"gang","createGang")),!t.canAccessGang()||!r.a.Names.includes(o))return!1;if(t.inGang())return!1;if(!t.factions.includes(o))return!1;const s=o===a.a.NiteSec||o===a.a.TheBlackHand;return t.startGang(o,s),!0},inGang:function(){return n.updateDynamicRam("inGang",Object(i.c)(t,"gang","inGang")),t.inGang()},getMemberNames:function(){n.updateDynamicRam("getMemberNames",Object(i.c)(t,"gang","getMemberNames")),f("getMemberNames");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return e.members.map(t=>t.name)},getGangInformation:function(){n.updateDynamicRam("getGangInformation",Object(i.c)(t,"gang","getGangInformation")),f("getGangInformation");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return{faction:e.facName,isHacking:e.isHackingGang,moneyGainRate:e.moneyGainRate,power:e.getPower(),respect:e.respect,respectGainRate:e.respectGainRate,territory:e.getTerritory(),territoryClashChance:e.territoryClashChance,territoryWarfareEngaged:e.territoryWarfareEngaged,wantedLevel:e.wanted,wantedLevelGainRate:e.wantedGainRate,wantedPenalty:e.getWantedPenalty()}},getOtherGangInformation:function(){n.updateDynamicRam("getOtherGangInformation",Object(i.c)(t,"gang","getOtherGangInformation")),f("getOtherGangInformation");const e={};for(const t of Object.keys(s.a))e[t]=Object.assign({},s.a[t]);return e},getMemberInformation:function(e){const a=n.string("getMemberInformation","memberName",e);n.updateDynamicRam("getMemberInformation",Object(i.c)(t,"gang","getMemberInformation")),f("getMemberInformation");const r=t.gang;if(null===r)throw new Error("Should not be called without Gang");const o=u("getMemberInformation",a);return{name:o.name,task:o.task,earnedRespect:o.earnedRespect,hack:o.hack,str:o.str,def:o.def,dex:o.dex,agi:o.agi,cha:o.cha,hack_exp:o.hack_exp,str_exp:o.str_exp,def_exp:o.def_exp,dex_exp:o.dex_exp,agi_exp:o.agi_exp,cha_exp:o.cha_exp,hack_mult:o.hack_mult,str_mult:o.str_mult,def_mult:o.def_mult,dex_mult:o.dex_mult,agi_mult:o.agi_mult,cha_mult:o.cha_mult,hack_asc_mult:o.calculateAscensionMult(o.hack_asc_points),str_asc_mult:o.calculateAscensionMult(o.str_asc_points),def_asc_mult:o.calculateAscensionMult(o.def_asc_points),dex_asc_mult:o.calculateAscensionMult(o.dex_asc_points),agi_asc_mult:o.calculateAscensionMult(o.agi_asc_points),cha_asc_mult:o.calculateAscensionMult(o.cha_asc_points),hack_asc_points:o.hack_asc_points,str_asc_points:o.str_asc_points,def_asc_points:o.def_asc_points,dex_asc_points:o.dex_asc_points,agi_asc_points:o.agi_asc_points,cha_asc_points:o.cha_asc_points,upgrades:o.upgrades.slice(),augmentations:o.augmentations.slice(),respectGain:o.calculateRespectGain(r),wantedLevelGain:o.calculateWantedLevelGain(r),moneyGain:o.calculateMoneyGain(r)}},canRecruitMember:function(){n.updateDynamicRam("canRecruitMember",Object(i.c)(t,"gang","canRecruitMember")),f("canRecruitMember");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return e.canRecruitMember()},recruitMember:function(a){const r=n.string("recruitMember","memberName",a);n.updateDynamicRam("recruitMember",Object(i.c)(t,"gang","recruitMember")),f("recruitMember");const o=t.gang;if(null===o)throw new Error("Should not be called without Gang");const s=o.recruitMember(r);return s?e.log("gang.recruitMember",()=>`Successfully recruited Gang Member '${r}'`):e.log("gang.recruitMember",()=>`Failed to recruit Gang Member '${r}'`),s},getTaskNames:function(){n.updateDynamicRam("getTaskNames",Object(i.c)(t,"gang","getTaskNames")),f("getTaskNames");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");const a=e.getAllTaskNames();return a.unshift("Unassigned"),a},setMemberTask:function(a,r){const o=n.string("setMemberTask","memberName",a),s=n.string("setMemberTask","taskName",r);n.updateDynamicRam("setMemberTask",Object(i.c)(t,"gang","setMemberTask")),f("setMemberTask");const l=u("setMemberTask",o),c=t.gang;if(null===c)throw new Error("Should not be called without Gang");if(!c.getAllTaskNames().includes(s))return e.log("gang.setMemberTask",()=>`Failed to assign Gang Member '${o}' to Invalid task '${s}'. '${o}' is now Unassigned`),l.assignToTask("Unassigned");const m=l.assignToTask(s);return m?e.log("gang.setMemberTask",()=>`Successfully assigned Gang Member '${o}' to '${s}' task`):e.log("gang.setMemberTask",()=>`Failed to assign Gang Member '${o}' to '${s}' task. '${o}' is now Unassigned`),m},getTaskStats:function(e){const a=n.string("getTaskStats","taskName",e);n.updateDynamicRam("getTaskStats",Object(i.c)(t,"gang","getTaskStats")),f("getTaskStats");const r=function(t,e){const a=l.a[e];if(!a)throw n.makeRuntimeErrorMsg("gang."+t,`Invalid task: '${e}'`);return a}("getTaskStats",a),o=Object.assign({},r);return o.territory=Object.assign({},r.territory),o},getEquipmentNames:function(){return n.updateDynamicRam("getEquipmentNames",Object(i.c)(t,"gang","getEquipmentNames")),f("getEquipmentNames"),Object.keys(c.a)},getEquipmentCost:function(e){const a=n.string("getEquipmentCost","equipName",e);n.updateDynamicRam("getEquipmentCost",Object(i.c)(t,"gang","getEquipmentCost")),f("getEquipmentCost");const r=t.gang;if(null===r)throw new Error("Should not be called without Gang");const o=c.a[a];return null===o?1/0:r.getUpgradeCost(o)},getEquipmentType:function(e){const a=n.string("getEquipmentType","equipName",e);n.updateDynamicRam("getEquipmentType",Object(i.c)(t,"gang","getEquipmentType")),f("getEquipmentType");const r=c.a[a];return null==r?"":r.getType()},getEquipmentStats:function(e){const a=n.string("getEquipmentStats","equipName",e);n.updateDynamicRam("getEquipmentStats",Object(i.c)(t,"gang","getEquipmentStats")),f("getEquipmentStats");const r=c.a[a];if(!r)throw n.makeRuntimeErrorMsg("getEquipmentStats","Invalid equipment: "+a);const o=r.mults;return Object.assign({},o)},purchaseEquipment:function(a,r){const o=n.string("purchaseEquipment","memberName",a),s=n.string("purchaseEquipment","equipName",r);n.updateDynamicRam("purchaseEquipment",Object(i.c)(t,"gang","purchaseEquipment")),f("purchaseEquipment");const l=t.gang;if(null===l)throw new Error("Should not be called without Gang");const m=u("purchaseEquipment",o),h=c.a[s];if(!h)return!1;const d=m.buyUpgrade(h,t,l);return d?e.log("gang.purchaseEquipment",()=>`Purchased '${s}' for Gang member '${o}'`):e.log("gang.purchaseEquipment",()=>`Failed to purchase '${s}' for Gang member '${o}'`),d},ascendMember:function(a){const r=n.string("ascendMember","memberName",a);n.updateDynamicRam("ascendMember",Object(i.c)(t,"gang","ascendMember")),f("ascendMember");const o=t.gang;if(null===o)throw new Error("Should not be called without Gang");const s=u("ascendMember",r);if(s.canAscend())return o.ascendMember(s,e)},getAscensionResult:function(e){const a=n.string("getAscensionResult","memberName",e);n.updateDynamicRam("getAscensionResult",Object(i.c)(t,"gang","getAscensionResult")),f("getAscensionResult");if(null===t.gang)throw new Error("Should not be called without Gang");const r=u("getAscensionResult",a);if(r.canAscend())return{respect:r.earnedRespect,...r.getAscensionResults()}},setTerritoryWarfare:function(a){const r=n.boolean(a);n.updateDynamicRam("setTerritoryWarfare",Object(i.c)(t,"gang","setTerritoryWarfare")),f("setTerritoryWarfare");const o=t.gang;if(null===o)throw new Error("Should not be called without Gang");r?(o.territoryWarfareEngaged=!0,e.log("gang.setTerritoryWarfare",()=>"Engaging in Gang Territory Warfare")):(o.territoryWarfareEngaged=!1,e.log("gang.setTerritoryWarfare",()=>"Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(e){const a=n.string("getChanceToWinClash","otherGang",e);n.updateDynamicRam("getChanceToWinClash",Object(i.c)(t,"gang","getChanceToWinClash")),f("getChanceToWinClash");const r=t.gang;if(null===r)throw new Error("Should not be called without Gang");if(null==s.a[a])throw n.makeRuntimeErrorMsg("gang.getChanceToWinClash","Invalid gang: "+a);const o=s.a[r.facName].power;return o/(s.a[a].power+o)},getBonusTime:function(){n.updateDynamicRam("getBonusTime",Object(i.c)(t,"gang","getBonusTime")),f("getBonusTime");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return Math.round(e.storedCycles/5)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(13),r=n(185),i=n(82),o=n(77),s=n(585),l=n(57),c=n(375);function f(t,e,n){const f=function(e){if(10!==t.bitNodeN&&!i.a[10])throw n.makeRuntimeErrorMsg("sleeve."+e,"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")},u=function(a,r){if(r>=t.sleeves.length||r<0){const t="Invalid sleeve number: "+r;throw e.log(a,()=>t),n.makeRuntimeErrorMsg("sleeve."+a,t)}},m=function(e){const n=t.sleeves[e];return{shock:100-n.shock,sync:n.sync,hacking:n.hacking,strength:n.strength,defense:n.defense,dexterity:n.dexterity,agility:n.agility,charisma:n.charisma}};return{getNumSleeves:function(){return n.updateDynamicRam("getNumSleeves",Object(a.c)(t,"sleeve","getNumSleeves")),f("getNumSleeves"),t.sleeves.length},setToShockRecovery:function(e){const r=n.number("setToShockRecovery","sleeveNumber",e);return n.updateDynamicRam("setToShockRecovery",Object(a.c)(t,"sleeve","setToShockRecovery")),f("setToShockRecovery"),u("setToShockRecovery",r),t.sleeves[r].shockRecovery(t)},setToSynchronize:function(e){const r=n.number("setToSynchronize","sleeveNumber",e);return n.updateDynamicRam("setToSynchronize",Object(a.c)(t,"sleeve","setToSynchronize")),f("setToSynchronize"),u("setToSynchronize",r),t.sleeves[r].synchronize(t)},setToCommitCrime:function(e,r){const i=n.number("setToCommitCrime","sleeveNumber",e),o=n.string("setToCommitCrime","crimeName",r);n.updateDynamicRam("setToCommitCrime",Object(a.c)(t,"sleeve","setToCommitCrime")),f("setToCommitCrime"),u("setToCommitCrime",i);const s=Object(c.b)(o);return null!==s&&t.sleeves[i].commitCrime(t,s.name)},setToUniversityCourse:function(e,r,i){const o=n.number("setToUniversityCourse","sleeveNumber",e),s=n.string("setToUniversityCourse","universityName",r),l=n.string("setToUniversityCourse","className",i);return n.updateDynamicRam("setToUniversityCourse",Object(a.c)(t,"sleeve","setToUniversityCourse")),f("setToUniversityCourse"),u("setToUniversityCourse",o),t.sleeves[o].takeUniversityCourse(t,s,l)},travel:function(e,r){const i=n.number("travel","sleeveNumber",e),o=n.string("setToUniversityCourse","cityName",r);return n.updateDynamicRam("travel",Object(a.c)(t,"sleeve","travel")),f("travel"),u("travel",i),t.sleeves[i].travel(t,o)},setToCompanyWork:function(e,r){const i=n.number("setToCompanyWork","sleeveNumber",e),s=n.string("setToUniversityCourse","companyName",r);n.updateDynamicRam("setToCompanyWork",Object(a.c)(t,"sleeve","setToCompanyWork")),f("setToCompanyWork"),u("setToCompanyWork",i);for(let e=0;e0)throw n.makeRuntimeErrorMsg("sleeve.purchaseSleeveAug","Sleeve shock too high: Sleeve "+i);const s=l.a[o];if(!s)throw n.makeRuntimeErrorMsg("sleeve.purchaseSleeveAug","Invalid aug: "+o);return t.sleeves[i].tryBuyAugmentation(t,s)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(106),r=n(1022);function i(t,e,n){return{heart:{break:function(){return t.karma}},exploit:function(){t.giveExploit(a.a.UndocumentedFunctionCall)},bypass:function(n){const r=n;r.completely_unused_field=void 0;const i=document;i.completely_unused_field=void 0,i.completely_unused_field=!0,r.completely_unused_field&&1.6===e.ramUsage&&t.giveExploit(a.a.Bypass),r.completely_unused_field=void 0,i.completely_unused_field=void 0},alterReality:function(){let e=!1;const n=function(t){0!==t&&(e=!e,n(t-1))};n(2),console.warn("I am sure that this variable is false."),!1!==e&&(console.warn("Reality has been altered!"),t.giveExploit(a.a.RealityAlteration))},rainbow:function(e){!async function(){await r.compare(n.string("rainbow","guess",e),"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO")&&t.giveExploit(a.a.INeedARainbow)}()}}}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(39),r=n(55),i=n(91),o=n(221),s=n(242),l=n(26);function c(t,e,n){const c=function(e,a=""){if(e<0||e>=t.hacknetNodes.length)throw n.makeRuntimeErrorMsg(a,"Index specified for Hacknet Node is out-of-bounds: "+e);if(Object(r.g)(t)){const r=t.hacknetNodes[e];if("string"!=typeof r)throw new Error("hacknet node was not a string");const o=Object(l.d)(r);if(!(o instanceof i.a))throw new Error("hacknet server was not actually hacknet server");if(null==o)throw n.makeRuntimeErrorMsg(a,`Could not get Hacknet Server for index ${e}. This is probably a bug, please report to game dev`);return o}{const n=t.hacknetNodes[e];if(!(n instanceof o.a))throw new Error("hacknet node was not node.");return n}};return{numNodes:function(){return t.hacknetNodes.length},maxNumNodes:function(){return Object(r.g)(t)?a.b.MaxServers:1/0},purchaseNode:function(){return Object(r.l)(t)},getPurchaseNodeCost:function(){return Object(r.g)(t)?Object(r.b)(t):Object(r.a)(t)},getNodeStats:function(e){const a=n.number("getNodeStats","i",e),o=c(a,"getNodeStats"),s=Object(r.g)(t),l={name:o instanceof i.a?o.hostname:o.name,level:o.level,ram:o instanceof i.a?o.maxRam:o.ram,ramUsed:o instanceof i.a?o.ramUsed:void 0,cores:o.cores,production:o instanceof i.a?o.hashRate:o.moneyGainRatePerSecond,timeOnline:o.onlineTimeSeconds,totalProduction:o instanceof i.a?o.totalHashesGenerated:o.totalMoneyGenerated};return s&&o instanceof i.a&&(l.cache=o.cache,l.hashCapacity=o.hashCapacity),l},upgradeLevel:function(e,a=1){const i=n.number("upgradeLevel","i",e),o=n.number("upgradeLevel","n",a),s=c(i,"upgradeLevel");return Object(r.n)(t,s,o)},upgradeRam:function(e,a=1){const i=n.number("upgradeRam","i",e),o=n.number("upgradeRam","n",a),s=c(i,"upgradeRam");return Object(r.o)(t,s,o)},upgradeCore:function(e,a=1){const i=n.number("upgradeCore","i",e),o=n.number("upgradeCore","n",a),s=c(i,"upgradeCore");return Object(r.k)(t,s,o)},upgradeCache:function(a,o=1){const s=n.number("upgradeCache","i",a),l=n.number("upgradeCache","n",o);if(!Object(r.g)(t))return!1;const f=c(s,"upgradeCache");if(!(f instanceof i.a))return e.log("hacknet.upgradeCache",()=>"Can only be called on hacknet servers"),!1;const u=Object(r.j)(t,f,l);return u&&Object(r.p)(t),u},getLevelUpgradeCost:function(e,a=1){const r=n.number("getLevelUpgradeCost","i",e),i=n.number("getLevelUpgradeCost","n",a);return c(r,"upgradeLevel").calculateLevelUpgradeCost(i,t.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(e,a=1){const r=n.number("getRamUpgradeCost","i",e),i=n.number("getRamUpgradeCost","n",a);return c(r,"upgradeRam").calculateRamUpgradeCost(i,t.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(e,a=1){const r=n.number("getCoreUpgradeCost","i",e),i=n.number("getCoreUpgradeCost","n",a);return c(r,"upgradeCore").calculateCoreUpgradeCost(i,t.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(a,o=1){const s=n.number("getCacheUpgradeCost","i",a),l=n.number("getCacheUpgradeCost","n",o);if(!Object(r.g)(t))return 1/0;const f=c(s,"upgradeCache");return f instanceof i.a?f.calculateCacheUpgradeCost(l):(e.log("hacknet.getCacheUpgradeCost",()=>"Can only be called on hacknet servers"),-1)},numHashes:function(){return Object(r.g)(t)?t.hashManager.hashes:0},hashCapacity:function(){return Object(r.g)(t)?t.hashManager.capacity:0},hashCost:function(e){const a=n.string("hashCost","upgName",e);return Object(r.g)(t)?t.hashManager.getUpgradeCost(a):1/0},spendHashes:function(e,a=""){const i=n.string("spendHashes","upgName",e),o=n.string("spendHashes","upgTarget",a);return!!Object(r.g)(t)&&Object(r.m)(t,i,o)},getHashUpgrades:function(){return Object(r.g)(t)?Object.values(s.a).map(t=>t.name):[]},getHashUpgradeLevel:function(e){const a=n.string("getHashUpgradeLevel","upgName",e),r=t.hashManager.upgrades[a];if(void 0===r)throw n.makeRuntimeErrorMsg("hacknet.hashUpgradeLevel","Invalid Hash Upgrade: "+a);return r},getStudyMult:function(){return Object(r.g)(t)?t.hashManager.getStudyMult():1},getTrainingMult:function(){return Object(r.g)(t)?t.hashManager.getTrainingMult():1}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(109),r=n(13),i=n(119),o=n(243),s=n(15);function l(t,e,n){function l(e){t.hasAugmentation(s.a.StaneksGift1,!0)||n.makeRuntimeErrorMsg(e,"Requires Stanek's Gift installed.")}return{giftWidth:function(){return n.updateDynamicRam("giftWidth",Object(r.c)(t,"stanek","giftWidth")),l("giftWidth"),i.b.width()},giftHeight:function(){return n.updateDynamicRam("giftHeight",Object(r.c)(t,"stanek","giftHeight")),l("giftHeight"),i.b.height()},chargeFragment:function(o,s){const c=n.number("stanek.chargeFragment","rootX",o),f=n.number("stanek.chargeFragment","rootY",s);n.updateDynamicRam("chargeFragment",Object(r.c)(t,"stanek","chargeFragment")),l("chargeFragment");const u=i.b.findFragment(c,f);if(!u)throw n.makeRuntimeErrorMsg("stanek.chargeFragment",`No fragment with root (${c}, ${f}).`);const m=i.b.inBonus()?200:1e3;return Object(a.c)(m,e).then((function(){const n=i.b.charge(t,u,e.scriptRef.threads);return e.log("stanek.chargeFragment",()=>`Charged fragment for ${n} charge.`),Promise.resolve()}))},fragmentDefinitions:function(){return n.updateDynamicRam("fragmentDefinitions",Object(r.c)(t,"stanek","fragmentDefinitions")),l("fragmentDefinitions"),e.log("stanek.fragmentDefinitions",()=>`Returned ${o.c.length} fragments`),o.c.map(t=>t.copy())},activeFragments:function(){return n.updateDynamicRam("activeFragments",Object(r.c)(t,"stanek","activeFragments")),l("activeFragments"),e.log("stanek.activeFragments",()=>`Returned ${i.b.fragments.length} fragments`),i.b.fragments.map(t=>({...t.copy(),...t.fragment().copy()}))},clearGift:function(){n.updateDynamicRam("clearGift",Object(r.c)(t,"stanek","clearGift")),l("clearGift"),e.log("stanek.clearGift",()=>"Cleared Stanek's Gift."),i.b.clear()},canPlaceFragment:function(e,a,s,c){const f=n.number("stanek.canPlaceFragment","rootX",e),u=n.number("stanek.canPlaceFragment","rootY",a),m=n.number("stanek.canPlaceFragment","rotation",s),h=n.number("stanek.canPlaceFragment","fragmentId",c);n.updateDynamicRam("canPlaceFragment",Object(r.c)(t,"stanek","canPlaceFragment")),l("canPlaceFragment");const d=Object(o.b)(h);if(!d)throw n.makeRuntimeErrorMsg("stanek.canPlaceFragment","Invalid fragment id: "+h);return i.b.canPlace(f,u,m,d)},placeFragment:function(e,a,s,c){const f=n.number("stanek.placeFragment","rootX",e),u=n.number("stanek.placeFragment","rootY",a),m=n.number("stanek.placeFragment","rotation",s),h=n.number("stanek.placeFragment","fragmentId",c);n.updateDynamicRam("placeFragment",Object(r.c)(t,"stanek","placeFragment")),l("placeFragment");const d=Object(o.b)(h);if(!d)throw n.makeRuntimeErrorMsg("stanek.placeFragment","Invalid fragment id: "+h);return i.b.place(f,u,m,d)},getFragment:function(e,a){const o=n.number("stanek.getFragment","rootX",e),s=n.number("stanek.getFragment","rootY",a);n.updateDynamicRam("getFragment",Object(r.c)(t,"stanek","getFragment")),l("getFragment");const c=i.b.findFragment(o,s);if(void 0!==c)return c.copy()},removeFragment:function(e,a){const o=n.number("stanek.removeFragment","rootX",e),s=n.number("stanek.removeFragment","rootY",a);return n.updateDynamicRam("removeFragment",Object(r.c)(t,"stanek","removeFragment")),l("removeFragment"),i.b.delete(o,s)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(6);function r(t,e,n,r){return 1+Math.log(t+1)/(100*Math.log(1.8))*Math.pow((e+1)/5,.07)*n*r*a.a.StaneksGiftPowerMultiplier}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(13),r=n(9),i=n(167),o=n(336),s=n(394),l=n(8),c=n(251);function f(t,e,n){return{getTheme:function(){return n.updateDynamicRam("getTheme",Object(a.c)(t,"ui","getTheme")),{...r.a.theme}},getStyles:function(){return n.updateDynamicRam("getStyles",Object(a.c)(t,"ui","getStyles")),{...r.a.styles}},setTheme:function(o){n.updateDynamicRam("setTheme",Object(a.c)(t,"ui","setTheme"));const s=/^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/,l={...r.a.theme},c=[];for(const t of Object.keys(o)){var f;l[t]?s.test(null!==(f=o[t])&&void 0!==f?f:"")?l[t]=o[t]:c.push(`Invalid color "${t}": ${o[t]}`):c.push(`Invalid key "${t}"`)}0===c.length?(Object.assign(r.a.theme,l),i.b.emit(),e.log("ui.setTheme",()=>"Successfully set theme")):e.log("ui.setTheme",()=>"Failed to set theme. Errors: "+c.join(", "))},setStyles:function(o){n.updateDynamicRam("setStyles",Object(a.c)(t,"ui","setStyles"));const s={...r.a.styles},l=[];for(const t of Object.keys(o))s[t]?s[t]=o[t]:l.push(`Invalid key "${t}"`);0===l.length?(Object.assign(r.a.styles,s),i.b.emit(),e.log("ui.setStyles",()=>"Successfully set styles")):e.log("ui.setStyles",()=>"Failed to set styles. Errors: "+l.join(", "))},resetTheme:function(){n.updateDynamicRam("resetTheme",Object(a.c)(t,"ui","resetTheme")),r.a.theme={...o.a},i.b.emit(),e.log("ui.resetTheme",()=>"Reinitialized theme to default")},resetStyles:function(){n.updateDynamicRam("resetStyles",Object(a.c)(t,"ui","resetStyles")),r.a.styles={...s.a},i.b.emit(),e.log("ui.resetStyles",()=>"Reinitialized styles to default")},getGameInfo:function(){n.updateDynamicRam("getGameInfo",Object(a.c)(t,"ui","getGameInfo"));return{version:l.a.VersionString,commit:Object(c.a)(),platform:navigator.userAgent.toLowerCase().indexOf(" electron/")>-1?"Steam":"Browser"}}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(236),r=n(13),i=n(6);function o(t,e,n){const o=function(e,r=!1){const i=t.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");if(!(7===t.bitNodeN||t.sourceFiles.some(t=>7===t.n))){const t="You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.";throw n.makeRuntimeErrorMsg("bladeburner."+e,t)}if(!r){if(!(i instanceof a.a)){const t="You must be a member of the Bladeburner division to use this API.";throw n.makeRuntimeErrorMsg("bladeburner."+e,t)}}},s=function(e,a){const r=t.bladeburner;if(null===r)throw new Error("Must have joined bladeburner");if(!r.cities.hasOwnProperty(a))throw n.makeRuntimeErrorMsg("bladeburner."+e,"Invalid city: "+a)},l=function(e,a,r){const i=t.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");const o=i.getActionIdFromTypeAndName(a,r);if(!o)throw n.makeRuntimeErrorMsg("bladeburner."+e,`Invalid action type='${a}', name='${r}'`);const s=i.getActionObject(o);if(!s)throw n.makeRuntimeErrorMsg("bladeburner."+e,`Invalid action type='${a}', name='${r}'`);return s};return{getContractNames:function(){n.updateDynamicRam("getContractNames",Object(r.c)(t,"bladeburner","getContractNames")),o("getContractNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getContractNamesNetscriptFn()},getOperationNames:function(){n.updateDynamicRam("getOperationNames",Object(r.c)(t,"bladeburner","getOperationNames")),o("getOperationNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getOperationNamesNetscriptFn()},getBlackOpNames:function(){n.updateDynamicRam("getBlackOpNames",Object(r.c)(t,"bladeburner","getBlackOpNames")),o("getBlackOpNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e){const a=n.string("getBlackOpRank","blackOpName",e);n.updateDynamicRam("getBlackOpRank",Object(r.c)(t,"bladeburner","getBlackOpRank")),o("getBlackOpRank");return l("getBlackOpRank","blackops",a).reqdRank},getGeneralActionNames:function(){n.updateDynamicRam("getGeneralActionNames",Object(r.c)(t,"bladeburner","getGeneralActionNames")),o("getGeneralActionNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){n.updateDynamicRam("getSkillNames",Object(r.c)(t,"bladeburner","getSkillNames")),o("getSkillNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getSkillNamesNetscriptFn()},startAction:function(a,i){const s=n.string("startAction","type",a),l=n.string("startAction","name",i);n.updateDynamicRam("startAction",Object(r.c)(t,"bladeburner","startAction")),o("startAction");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.startActionNetscriptFn(t,s,l,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.startAction",t)}},stopBladeburnerAction:function(){n.updateDynamicRam("stopBladeburnerAction",Object(r.c)(t,"bladeburner","stopBladeburnerAction")),o("stopBladeburnerAction");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.resetAction()},getCurrentAction:function(){n.updateDynamicRam("getCurrentAction",Object(r.c)(t,"bladeburner","getCurrentAction")),o("getCurrentAction");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getTypeAndNameFromActionId(e.action)},getActionTime:function(a,i){const s=n.string("getActionTime","type",a),l=n.string("getActionTime","name",i);n.updateDynamicRam("getActionTime",Object(r.c)(t,"bladeburner","getActionTime")),o("getActionTime");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getActionTimeNetscriptFn(t,s,l,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.getActionTime",t)}},getActionEstimatedSuccessChance:function(a,i){const s=n.string("getActionEstimatedSuccessChance","type",a),l=n.string("getActionEstimatedSuccessChance","name",i);n.updateDynamicRam("getActionEstimatedSuccessChance",Object(r.c)(t,"bladeburner","getActionEstimatedSuccessChance")),o("getActionEstimatedSuccessChance");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getActionEstimatedSuccessChanceNetscriptFn(t,s,l,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.getActionEstimatedSuccessChance",t)}},getActionRepGain:function(e,a,s){const c=n.string("getActionRepGain","type",e),f=n.string("getActionRepGain","name",a),u=n.number("getActionRepGain","level",s);n.updateDynamicRam("getActionRepGain",Object(r.c)(t,"bladeburner","getActionRepGain")),o("getActionRepGain");const m=l("getActionRepGain",c,f);let h;return h=null==u||isNaN(u)?Math.pow(m.rewardFac,m.level-1):Math.pow(m.rewardFac,u-1),m.rankGain*h*i.a.BladeburnerRank},getActionCountRemaining:function(a,i){const s=n.string("getActionCountRemaining","type",a),l=n.string("getActionCountRemaining","name",i);n.updateDynamicRam("getActionCountRemaining",Object(r.c)(t,"bladeburner","getActionCountRemaining")),o("getActionCountRemaining");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getActionCountRemainingNetscriptFn(s,l,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.getActionCountRemaining",t)}},getActionMaxLevel:function(e,a){const i=n.string("getActionMaxLevel","type",e),s=n.string("getActionMaxLevel","name",a);n.updateDynamicRam("getActionMaxLevel",Object(r.c)(t,"bladeburner","getActionMaxLevel")),o("getActionMaxLevel");return l("getActionMaxLevel",i,s).maxLevel},getActionCurrentLevel:function(e,a){const i=n.string("getActionCurrentLevel","type",e),s=n.string("getActionCurrentLevel","name",a);n.updateDynamicRam("getActionCurrentLevel",Object(r.c)(t,"bladeburner","getActionCurrentLevel")),o("getActionCurrentLevel");return l("getActionCurrentLevel",i,s).level},getActionAutolevel:function(e,a){const i=n.string("getActionAutolevel","type",e),s=n.string("getActionAutolevel","name",a);n.updateDynamicRam("getActionAutolevel",Object(r.c)(t,"bladeburner","getActionAutolevel")),o("getActionAutolevel");return l("getActionCurrentLevel",i,s).autoLevel},setActionAutolevel:function(e,a,i=!0){const s=n.string("setActionAutolevel","type",e),c=n.string("setActionAutolevel","name",a),f=n.boolean(i);n.updateDynamicRam("setActionAutolevel",Object(r.c)(t,"bladeburner","setActionAutolevel")),o("setActionAutolevel");l("setActionAutolevel",s,c).autoLevel=f},setActionLevel:function(e,a,i=1){const s=n.string("setActionLevel","type",e),c=n.string("setActionLevel","name",a),f=n.number("setActionLevel","level",i);n.updateDynamicRam("setActionLevel",Object(r.c)(t,"bladeburner","setActionLevel")),o("setActionLevel");const u=l("setActionLevel",s,c);if(f<1||f>u.maxLevel)throw n.makeRuntimeErrorMsg("bladeburner.setActionLevel",`Level must be between 1 and ${u.maxLevel}, is ${f}`);u.level=f},getRank:function(){n.updateDynamicRam("getRank",Object(r.c)(t,"bladeburner","getRank")),o("getRank");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.rank},getSkillPoints:function(){n.updateDynamicRam("getSkillPoints",Object(r.c)(t,"bladeburner","getSkillPoints")),o("getSkillPoints");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.skillPoints},getSkillLevel:function(a){const i=n.string("getSkillLevel","skillName",a);n.updateDynamicRam("getSkillLevel",Object(r.c)(t,"bladeburner","getSkillLevel")),o("getSkillLevel");const s=t.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getSkillLevelNetscriptFn(i,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.getSkillLevel",t)}},getSkillUpgradeCost:function(a){const i=n.string("getSkillUpgradeCost","skillName",a);n.updateDynamicRam("getSkillUpgradeCost",Object(r.c)(t,"bladeburner","getSkillUpgradeCost")),o("getSkillUpgradeCost");const s=t.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getSkillUpgradeCostNetscriptFn(i,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.getSkillUpgradeCost",t)}},upgradeSkill:function(a){const i=n.string("upgradeSkill","skillName",a);n.updateDynamicRam("upgradeSkill",Object(r.c)(t,"bladeburner","upgradeSkill")),o("upgradeSkill");const s=t.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.upgradeSkillNetscriptFn(i,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.upgradeSkill",t)}},getTeamSize:function(a,i){const s=n.string("getTeamSize","type",a),l=n.string("getTeamSize","name",i);n.updateDynamicRam("getTeamSize",Object(r.c)(t,"bladeburner","getTeamSize")),o("getTeamSize");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getTeamSizeNetscriptFn(s,l,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.getTeamSize",t)}},setTeamSize:function(a,i,s){const l=n.string("setTeamSize","type",a),c=n.string("setTeamSize","name",i),f=n.number("setTeamSize","size",s);n.updateDynamicRam("setTeamSize",Object(r.c)(t,"bladeburner","setTeamSize")),o("setTeamSize");const u=t.bladeburner;if(null===u)throw new Error("Should not be called without Bladeburner");try{return u.setTeamSizeNetscriptFn(l,c,f,e)}catch(t){throw n.makeRuntimeErrorMsg("bladeburner.setTeamSize",t)}},getCityEstimatedPopulation:function(e){const a=n.string("getCityEstimatedPopulation","cityName",e);n.updateDynamicRam("getCityEstimatedPopulation",Object(r.c)(t,"bladeburner","getCityEstimatedPopulation")),o("getCityEstimatedPopulation"),s("getCityEstimatedPopulation",a);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.cities[a].popEst},getCityCommunities:function(e){const a=n.string("getCityCommunities","cityName",e);n.updateDynamicRam("getCityCommunities",Object(r.c)(t,"bladeburner","getCityCommunities")),o("getCityCommunities"),s("getCityCommunities",a);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.cities[a].comms},getCityChaos:function(e){const a=n.string("getCityChaos","cityName",e);n.updateDynamicRam("getCityChaos",Object(r.c)(t,"bladeburner","getCityChaos")),o("getCityChaos"),s("getCityChaos",a);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.cities[a].chaos},getCity:function(){n.updateDynamicRam("getCity",Object(r.c)(t,"bladeburner","getCity")),o("getCityChaos");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.city},switchCity:function(e){const a=n.string("switchCity","cityName",e);n.updateDynamicRam("switchCity",Object(r.c)(t,"bladeburner","switchCity")),o("switchCity"),s("switchCity",a);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.city=a,!0},getStamina:function(){n.updateDynamicRam("getStamina",Object(r.c)(t,"bladeburner","getStamina")),o("getStamina");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return[e.stamina,e.maxStamina]},joinBladeburnerFaction:function(){n.updateDynamicRam("joinBladeburnerFaction",Object(r.c)(t,"bladeburner","joinBladeburnerFaction")),o("joinBladeburnerFaction",!0);const a=t.bladeburner;if(null===a)throw new Error("Should not be called without Bladeburner");return a.joinBladeburnerFactionNetscriptFn(e)},joinBladeburnerDivision:function(){return n.updateDynamicRam("joinBladeburnerDivision",Object(r.c)(t,"bladeburner","joinBladeburnerDivision")),(7===t.bitNodeN||t.sourceFileLvl(7)>0)&&(8!==t.bitNodeN&&(t.bladeburner instanceof a.a||(t.strength>=100&&t.defense>=100&&t.dexterity>=100&&t.agility>=100?(t.bladeburner=new a.a(t),e.log("joinBladeburnerDivision",()=>"You have been accepted into the Bladeburner division"),!0):(e.log("joinBladeburnerDivision",()=>"You do not meet the requirements for joining the Bladeburner division"),!1))))},getBonusTime:function(){n.updateDynamicRam("getBonusTime",Object(r.c)(t,"bladeburner","getBonusTime")),o("getBonusTime");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return 1e3*Math.round(e.storedCycles/5)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(13),r=n(1029);function i(t,e,n){const i=function(t,e,a){const r=n.getServer(e,t).getContract(a);if(null==r)throw n.makeRuntimeErrorMsg("codingcontract."+t,`Cannot find contract '${a}' on server '${e}'`);return r};return{attempt:function(o,s,l=e.hostname,{returnReward:c}={returnReward:!1}){const f=n.string("attempt","filename",s),u=n.string("attempt","hostname",l);n.updateDynamicRam("attempt",Object(a.c)(t,"codingcontract","attempt"));const m=i("attempt",u,f);if(Object(r.a)(o)){const t=[];for(let e=0;e`Successfully completed Coding Contract '${f}'. Reward: ${n}`),d.removeContract(f),!c||n}return++m.tries,m.tries>=m.getMaxNumTries()?(e.log("codingcontract.attempt",()=>`Coding Contract attempt '${f}' failed. Contract is now self-destructing`),d.removeContract(f)):e.log("codingcontract.attempt",()=>`Coding Contract attempt '${f}' failed. ${m.getMaxNumTries()-m.tries} attempts remaining.`),!!c&&""},getContractType:function(r,o=e.hostname){const s=n.string("getContractType","filename",r),l=n.string("getContractType","hostname",o);n.updateDynamicRam("getContractType",Object(a.c)(t,"codingcontract","getContractType"));return i("getContractType",l,s).getType()},getData:function(r,o=e.hostname){const s=n.string("getContractType","filename",r),l=n.string("getContractType","hostname",o);n.updateDynamicRam("getData",Object(a.c)(t,"codingcontract","getData"));const c=i("getData",l,s).getData();if(c.constructor===Array){const t=c.slice();for(let e=0;et.constructor===Array)}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(109),r=n(69),i=n(298),o=n(371),s=n(53),l=n(280),c=n(50),f=n(38),u=n(318),m=n(281),h=n(29);function d(t,e,n){function d(t){const e=g(),n=Object.values(i.a).find(e=>e[2]===t);if(void 0===n)throw new Error(`No upgrade named '${t}'`);const a=n[0];return 1===e.unlockUpgrades[a]}function p(t,e){return void 0!==t.researched[e]&&t.researched[e]}function g(){const e=t.corporation;if(null===e)throw new Error("cannot be called without a corporation");return e}function y(t){const e=g().divisions.find(e=>e.name===t);if(void 0===e)throw new Error(`No division named '${t}'`);return e}function b(t,e){const n=y(t);if(!(e in n.offices))throw new Error(`Invalid city name '${e}'`);const a=n.offices[e];if(0===a)throw new Error(`${n.name} has not expanded to '${e}'`);return a}function E(t,e){const n=y(t);if(!(e in n.warehouses))throw new Error(`Invalid city name '${e}'`);const a=n.warehouses[e];if(0===a)throw new Error(`${n.name} has not expanded to '${e}'`);return a}function v(t,e,n){const a=E(t,e),r=n.replace(/ /g,""),i=a.materials[r];if(void 0===i)throw new Error(`Invalid material name: '${n}'`);return i}function k(t,e){const n=y(t).products[e];if(void 0===n)throw new Error(`Invalid product name: '${e}'`);return n}function _(t,e,n){const a=b(t,e).employees.find(t=>t.name===n);if(void 0===a)throw new Error(`Invalid employee name: '${n}'`);return a}function w(e,a){if(null===t.corporation)throw n.makeRuntimeErrorMsg("corporation."+e,"Must own a corporation.");if(a&&!t.corporation.unlockUpgrades[a])throw n.makeRuntimeErrorMsg("corporation."+e,"You do not have access to this API.")}function S(t){const e=[];for(const n of Object.values(t.offices))0!==n&&e.push(n.loc);return{name:t.name,type:t.type,awareness:t.awareness,popularity:t.popularity,prodMult:t.prodMult,research:t.sciResearch.qty,lastCycleRevenue:t.lastCycleRevenue,lastCycleExpenses:t.lastCycleExpenses,thisCycleRevenue:t.thisCycleRevenue,thisCycleExpenses:t.thisCycleExpenses,upgrades:t.upgrades.slice(),cities:e,products:void 0===t.products?[]:Object.keys(t.products)}}return{...{getPurchaseWarehouseCost:function(){return w("getPurchaseWarehouseCost",7),f.a.WarehouseInitialCost},getUpgradeWarehouseCost:function(t,e){w("upgradeWarehouse",7);const a=E(n.string("getUpgradeWarehouseCost","divisionName",t),n.city("getUpgradeWarehouseCost","cityName",e));return f.a.WarehouseUpgradeBaseCost*Math.pow(1.07,a.level+1)},hasWarehouse:function(t,e){w("hasWarehouse",7);const a=n.string("getWarehouse","divisionName",t),r=n.city("getWarehouse","cityName",e),i=y(a);if(!(r in i.warehouses))throw new Error(`Invalid city name '${r}'`);return 0!==i.warehouses[r]},getWarehouse:function(t,e){w("getWarehouse",7);const a=E(n.string("getWarehouse","divisionName",t),n.city("getWarehouse","cityName",e));return{level:a.level,loc:a.loc,size:a.size,sizeUsed:a.sizeUsed,smartSupplyEnabled:a.smartSupplyEnabled}},getMaterial:function(t,e,a){w("getMaterial",7);const r=v(n.string("getMaterial","divisionName",t),n.city("getMaterial","cityName",e),n.string("getMaterial","materialName",a));return{name:r.name,qty:r.qty,qlt:r.qlt,prod:r.prd,sell:r.sll}},getProduct:function(t,e){w("getProduct",7);const a=k(n.string("getProduct","divisionName",t),n.string("getProduct","productName",e));return{name:a.name,dmd:a.dmd,cmp:a.cmp,pCost:a.pCost,sCost:a.sCost,cityData:a.data,developmentProgress:a.prog}},purchaseWarehouse:function(t,e){w("purchaseWarehouse",7);const a=n.string("purchaseWarehouse","divisionName",t),i=n.city("purchaseWarehouse","cityName",e),o=g();Object(r.o)(o,y(a),i)},upgradeWarehouse:function(t,e){w("upgradeWarehouse",7);const a=n.string("upgradeWarehouse","divisionName",t),i=n.city("upgradeWarehouse","cityName",e),o=g();Object(r.C)(o,y(a),E(a,i))},sellMaterial:function(t,e,a,i,o){w("sellMaterial",7);const s=n.string("sellMaterial","divisionName",t),l=n.city("sellMaterial","cityName",e),c=n.string("sellMaterial","materialName",a),f=n.string("sellMaterial","amt",i),u=n.string("sellMaterial","price",o),m=v(s,l,c);Object(r.q)(m,f,u)},sellProduct:function(t,e,a,i,o,s){w("sellProduct",7);const l=n.string("sellProduct","divisionName",t),c=n.city("sellProduct","cityName",e),f=n.string("sellProduct","productName",a),u=n.string("sellProduct","amt",i),m=n.string("sellProduct","price",o),h=n.boolean(s),d=k(l,f);Object(r.r)(d,c,u,m,h)},discontinueProduct:function(t,e){w("discontinueProduct",7);const a=n.string("discontinueProduct","divisionName",t),r=n.string("discontinueProduct","productName",e);y(a).discontinueProduct(k(a,r))},setSmartSupply:function(t,e,a){w("setSmartSupply",7);const i=n.string("setSmartSupply","divisionName",t),o=n.city("sellProduct","cityName",e),s=n.boolean(a),l=E(i,o);if(!d("Smart Supply"))throw n.makeRuntimeErrorMsg("corporation.setSmartSupply","You have not purchased the Smart Supply upgrade!");Object(r.x)(l,s)},setSmartSupplyUseLeftovers:function(t,e,a,i){w("setSmartSupplyUseLeftovers",7);const o=n.string("setSmartSupply","divisionName",t),s=n.city("sellProduct","cityName",e),l=n.string("sellProduct","materialName",a),c=n.boolean(i),f=E(o,s),u=v(o,s,l);if(!d("Smart Supply"))throw n.makeRuntimeErrorMsg("corporation.setSmartSupply","You have not purchased the Smart Supply upgrade!");Object(r.y)(f,u,c)},buyMaterial:function(t,e,a,i){w("buyMaterial",7);const o=n.string("buyMaterial","divisionName",t),s=n.city("buyMaterial","cityName",e),l=n.string("buyMaterial","materialName",a),c=n.number("buyMaterial","amt",i);if(c<0)throw new Error("Invalid value for amount field! Must be numeric and greater than 0");const f=v(o,s,l);Object(r.e)(f,c)},bulkPurchase:function(t,e,a,i){w("bulkPurchase",7);const o=n.string("bulkPurchase","divisionName",t);if(!p(y(o),"Bulk Purchasing"))throw new Error("You have not researched Bulk Purchasing in "+o);const s=g(),l=n.city("bulkPurchase","cityName",e),c=n.string("bulkPurchase","materialName",a),f=n.number("bulkPurchase","amt",i),u=E(o,l),m=v(o,l,c);Object(r.b)(s,u,m,f)},makeProduct:function(t,e,a,i,o){w("makeProduct",7);const s=n.string("makeProduct","divisionName",t),l=n.city("makeProduct","cityName",e),c=n.string("makeProduct","productName",a),f=n.number("makeProduct","designInvest",i),u=n.number("makeProduct","marketingInvest",o),m=g();Object(r.l)(m,y(s),l,c,f,u)},exportMaterial:function(t,e,a,i,o,s){w("exportMaterial",7);const l=n.string("exportMaterial","sourceDivision",t),c=n.string("exportMaterial","sourceCity",e),f=n.string("exportMaterial","targetDivision",a),u=n.string("exportMaterial","targetCity",i),m=n.string("exportMaterial","materialName",o),h=n.string("exportMaterial","amt",s);Object(r.g)(f,u,v(l,c,m),h+"",y(f))},cancelExportMaterial:function(t,e,a,i,o,s){w("cancelExportMaterial",7);const l=n.string("cancelExportMaterial","sourceDivision",t),c=n.string("cancelExportMaterial","sourceCity",e),f=n.string("cancelExportMaterial","targetDivision",a),u=n.string("cancelExportMaterial","targetCity",i),m=n.string("cancelExportMaterial","materialName",o),h=n.string("cancelExportMaterial","amt",s);Object(r.f)(f,u,v(l,c,m),h+"")},setMaterialMarketTA1:function(t,e,a,i){w("setMaterialMarketTA1",7);const o=n.string("setMaterialMarketTA1","divisionName",t),s=n.city("setMaterialMarketTA1","cityName",e),l=n.string("setMaterialMarketTA1","materialName",a),c=n.boolean(i);if(!y(o).hasResearch("Market-TA.I"))throw n.makeRuntimeErrorMsg("corporation.setMaterialMarketTA1","You have not researched MarketTA.I for division: "+o);Object(r.t)(v(o,s,l),c)},setMaterialMarketTA2:function(t,e,a,i){w("setMaterialMarketTA2",7);const o=n.string("setMaterialMarketTA2","divisionName",t),s=n.city("setMaterialMarketTA2","cityName",e),l=n.string("setMaterialMarketTA2","materialName",a),c=n.boolean(i);if(!y(o).hasResearch("Market-TA.II"))throw n.makeRuntimeErrorMsg("corporation.setMaterialMarketTA2","You have not researched MarketTA.II for division: "+o);Object(r.u)(v(o,s,l),c)},setProductMarketTA1:function(t,e,a){w("setProductMarketTA1",7);const i=n.string("setProductMarketTA1","divisionName",t),o=n.string("setProductMarketTA1","productName",e),s=n.boolean(a);if(!y(i).hasResearch("Market-TA.I"))throw n.makeRuntimeErrorMsg("corporation.setProductMarketTA1","You have not researched MarketTA.I for division: "+i);Object(r.v)(k(i,o),s)},setProductMarketTA2:function(t,e,a){w("setProductMarketTA2",7);const i=n.string("setProductMarketTA2","divisionName",t),o=n.string("setProductMarketTA2","productName",e),s=n.boolean(a);if(!y(i).hasResearch("Market-TA.II"))throw n.makeRuntimeErrorMsg("corporation.setProductMarketTA2","You have not researched MarketTA.II for division: "+i);Object(r.w)(k(i,o),s)}},...{getHireAdVertCost:function(t){w("getHireAdVertCost",8);const e=y(n.string("getHireAdVertCost","divisionName",t)),a=u.a[1];return a[1]*Math.pow(a[2],e.upgrades[1])},getHireAdVertCount:function(t){w("getHireAdVertCount",8);return y(n.string("getHireAdVertCount","divisionName",t)).upgrades[1]},getResearchCost:function(t,e){w("getResearchCost",8);const a=n.string("getResearchCost","divisionName",t),r=n.string("getResearchCost","researchName",e);return function(t,e){const n=c.c[t.type];if(void 0===n)throw new Error(`No research tree for industry '${t.type}'`);if(!n.getAllNodes().includes(e))throw new Error(`No research named '${e}'`);return m.a[e].cost}(y(a),r)},hasResearched:function(t,e){w("hasResearched",8);const a=n.string("hasResearched","divisionName",t),r=n.string("hasResearched","researchName",e);return p(y(a),r)},setAutoJobAssignment:function(t,r,i,o){w("setAutoJobAssignment",8);const l=n.string("setAutoJobAssignment","divisionName",t),c=n.city("setAutoJobAssignment","cityName",r),f=n.number("setAutoJobAssignment","amount",o),u=n.string("setAutoJobAssignment","job",i),m=b(l,c);if(!Object.values(s.a).includes(u))throw new Error(`'${u}' is not a valid job.`);return Object(a.c)(1e3,e).then((function(){return e.env.stopFlag?Promise.reject(e):Promise.resolve(m.setEmployeeToJob(u,f))}))},getOfficeSizeUpgradeCost:function(t,e,a){w("getOfficeSizeUpgradeCost",8);const r=n.string("getOfficeSizeUpgradeCost","divisionName",t),i=n.city("getOfficeSizeUpgradeCost","cityName",e),o=n.number("getOfficeSizeUpgradeCost","size",a);if(o<0)throw new Error("Invalid value for size field! Must be numeric and greater than 0");const s=b(r,i),l=Math.round(s.size/f.a.OfficeInitialSize);let c=0;for(let t=0;tt.name),employeeProd:{Operations:a.employeeProd[s.a.Operations],Engineer:a.employeeProd[s.a.Engineer],Business:a.employeeProd[s.a.Business],Management:a.employeeProd[s.a.Management],"Research & Development":a.employeeProd[s.a.RandD],Training:a.employeeProd[s.a.Training]}}},getEmployee:function(t,e,a){w("getEmployee",8);const r=_(n.string("getEmployee","divisionName",t),n.city("getEmployee","cityName",e),n.string("getEmployee","employeeName",a));return{name:r.name,mor:r.mor,hap:r.hap,ene:r.ene,int:r.int,cha:r.cha,exp:r.exp,cre:r.cre,eff:r.eff,sal:r.sal,loc:r.loc,pos:r.pos}}},expandIndustry:function(t,e){w("expandIndustry");const a=n.string("expandIndustry","industryName",t),i=n.string("expandIndustry","divisionName",e),o=g();Object(r.n)(o,a,i)},expandCity:function(t,e){w("expandCity");const a=n.string("expandCity","divisionName",t),i=n.city("expandCity","cityName",e);if(!f.a.Cities.includes(i))throw new Error("Invalid city name");const o=g(),s=y(a);Object(r.m)(o,s,i)},unlockUpgrade:function(t){w("unlockUpgrade");const e=n.string("unlockUpgrade","upgradeName",t),a=g(),o=Object.values(i.a).find(t=>t[2]===e);if(void 0===o)throw new Error(`No upgrade named '${e}'`);Object(r.A)(a,o)},levelUpgrade:function(t){w("levelUpgrade");const e=n.string("levelUpgrade","upgradeName",t),a=g(),i=Object.values(o.a).find(t=>t[4]===e);if(void 0===i)throw new Error(`No upgrade named '${e}'`);Object(r.j)(a,i)},issueDividends:function(t){w("issueDividends");const e=n.number("issueDividends","percent",t);if(e<0||e>100)throw new Error("Invalid value for percent field! Must be numeric, greater than 0, and less than 100");const a=g();if(!a.public)throw n.makeRuntimeErrorMsg("corporation.issueDividends","Your company has not gone public!");Object(r.i)(a,e)},getDivision:function(t){w("getDivision");return S(y(n.string("getDivision","divisionName",t)))},getCorporation:function(){w("getCorporation");const t=g();return{name:t.name,funds:t.funds,revenue:t.revenue,expenses:t.expenses,public:t.public,totalShares:t.totalShares,numShares:t.numShares,shareSaleCooldown:t.shareSaleCooldown,issuedShares:t.issuedShares,sharePrice:t.sharePrice,state:t.state.getState(),divisions:t.divisions.map(t=>S(t))}},createCorporation:function(e,a=!0){return function(e,n=!0){if(!t.canAccessCorporation()||t.hasCorporation())return!1;if(!e)return!1;if(3!==t.bitNodeN&&!n)throw new Error("cannot use seed funds outside of BitNode 3");if(n){if(!t.canAfford(15e10))return!1;t.startCorporation(e),t.loseMoney(15e10,"corporation")}else t.startCorporation(e,5e8);return!0}(n.string("createCorporation","corporationName",e),n.boolean(a))},hasUnlockUpgrade:function(t){w("hasUnlockUpgrade");return d(n.string("hasUnlockUpgrade","upgradeName",t))},getUnlockUpgradeCost:function(t){w("getUnlockUpgradeCost");return function(t){const e=Object.values(i.a).find(e=>e[2]===t);if(void 0===e)throw new Error(`No upgrade named '${t}'`);return e[1]}(n.string("getUnlockUpgradeCost","upgradeName",t))},getUpgradeLevel:function(t){w("hasUnlockUpgrade");return function(t){const e=n.string("levelUpgrade","upgradeName",t),a=g(),r=Object.values(o.a).find(t=>t[4]===e);if(void 0===r)throw new Error(`No upgrade named '${e}'`);const i=r[0];return a.upgrades[i]}(n.string("getUpgradeLevel","upgradeName",t))},getUpgradeLevelCost:function(t){w("getUpgradeLevelCost");return function(t){const e=n.string("levelUpgrade","upgradeName",t),a=g(),r=Object.values(o.a).find(t=>t[4]===e);if(void 0===r)throw new Error(`No upgrade named '${e}'`);const i=r[0],s=r[1],l=r[2],c=a.upgrades[i];return s*Math.pow(l,c)}(n.string("getUpgradeLevelCost","upgradeName",t))},getExpandIndustryCost:function(t){w("getExpandIndustryCost");return function(t){const e=c.d[t];if(void 0===e)throw new Error(`Invalid industry: '${t}'`);return e}(n.string("getExpandIndustryCost","industryName",t))},getExpandCityCost:function(){return w("getExpandCityCost"),f.a.OfficeInitialCost},getInvestmentOffer:function(){return w("getInvestmentOffer"),function(){const t=g();if(t.fundingRound>=f.a.FundingRoundShares.length||t.fundingRound>=f.a.FundingRoundMultiplier.length||t.public)return{funds:0,shares:0,round:t.fundingRound+1};const e=t.determineValuation(),n=f.a.FundingRoundShares[t.fundingRound];return{funds:e*n*f.a.FundingRoundMultiplier[t.fundingRound],shares:Math.floor(f.a.INITIALSHARES*n),round:t.fundingRound+1}}()},acceptInvestmentOffer:function(){return w("acceptInvestmentOffer"),function(){const t=g();if(t.fundingRound>=f.a.FundingRoundShares.length||t.fundingRound>=f.a.FundingRoundMultiplier.length||t.public)return!1;const e=t.determineValuation(),n=f.a.FundingRoundShares[t.fundingRound],a=e*n*f.a.FundingRoundMultiplier[t.fundingRound],r=Math.floor(f.a.INITIALSHARES*n);return t.fundingRound++,t.addFunds(a),t.numShares-=r,!0}()},goPublic:function(t){w("acceptInvestmentOffer");return function(t){const e=g(),n=e.determineValuation()/e.totalShares;if(isNaN(t))throw new Error("Invalid value for number of issued shares");if(t<0)throw new Error("Invalid value for number of issued shares");if(t>e.numShares)throw new Error("You don't have that many shares to issue!");return e.public=!0,e.sharePrice=n,e.issuedShares=t,e.numShares-=t,e.addFunds(t*n),!0}(n.number("goPublic","numShares",t))},sellShares:function(e){w("acceptInvestmentOffer");const a=n.number("sellStock","numShares",e);return Object(r.s)(g(),t,a)},buyBackShares:function(e){w("acceptInvestmentOffer");const a=n.number("buyStock","numShares",e);return Object(r.c)(g(),t,a)},bribe:function(e,a,r){w("bribe");return function(e,n,a){if(!t.factions.includes(e))throw new Error("Invalid faction name");if(isNaN(n)||n<0||isNaN(a)||a<0)throw new Error("Invalid value for amount field! Must be numeric, grater than 0.");const r=g();if(r.funds=this.getMaximumNumberProducts()}calculateProductionFactors(){let t=0;for(let e=0;e<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++e){const n=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[e],a=this.warehouses[n];if(!(a instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a))continue;const r=a.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);t+=Math.pow(i,.73)}this.prodMult=t<1?1:t}updateWarehouseSizeUsed(t){t.updateMaterialSizeUsed();for(const e of Object.keys(this.products))if(this.products.hasOwnProperty(e)){const n=this.products[e];if(void 0===n)continue;t.sizeUsed+=n.data[t.loc][0]*n.siz}}process(t=1,e,n){if(this.state=e,"START"===e){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=0,this.thisCycleExpenses=0),this.lastCycleRevenue=this.thisCycleRevenue/(t*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses/(t*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.thisCycleRevenue=0,this.thisCycleExpenses=0,this.lastCycleRevenue>0&&(this.newInd=!1);let e=0;for(const a of Object.keys(this.offices)){const r=this.offices[a];0!==r&&(r instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_8__.a&&(e+=r.process(t,n,this)))}this.thisCycleExpenses=this.thisCycleExpenses+e,this.processMaterialMarket(),this.processProductMarket(t),this.popularity-=1e-4*t,this.popularity=Math.max(0,this.popularity);const a=n.getDreamSenseGain(),r=4*a;if(a>0){const e=this.awareness+r*t;this.awareness=Math.min(e,Number.MAX_VALUE);const n=this.popularity+a*t;this.popularity=Math.min(n,Number.MAX_VALUE)}return}let a=this.processMaterials(t,n);Array.isArray(a)&&(this.thisCycleRevenue=this.thisCycleRevenue+a[0],this.thisCycleExpenses=this.thisCycleExpenses+a[1]),a=this.processProducts(t,n),Array.isArray(a)&&(this.thisCycleRevenue=this.thisCycleRevenue+a[0],this.thisCycleExpenses=this.thisCycleExpenses+a[1])}processMaterialMarket(){const t=this.reqMats,e=this.prodMats;for(let n=0;n<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++n)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[n]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a){const a=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[n]];if(0===a)continue;for(const e of Object.keys(t))t.hasOwnProperty(e)&&a.materials[e].processMarket();for(let t=0;t0&&(e.qty+=n,expenses+=n*e.bCost),this.updateWarehouseSizeUsed(warehouse))}const t={};for(const e of Object.keys(warehouse.materials)){if(!warehouse.materials.hasOwnProperty(e))continue;if(!warehouse.smartSupplyEnabled||!Object.keys(this.reqMats).includes(e))continue;const n=warehouse.materials[e],a=this.reqMats[e];if(void 0===a)throw new Error(`reqMat "${e}" is undefined`);n.buy=a*warehouse.smartSupplyStore;let r=n.buy*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[e]);r=Math.min(r,i),r>0&&(t[e]=r)}let e=1e99;for(const n of Object.keys(t)){const a=t[n];if(void 0===a)throw new Error("Somehow smartbuy matname is undefined");const r=this.reqMats[n];if(void 0===r)throw new Error(`reqMat "${n}" is undefined`);const i=a/r;ia)for(const e of Object.keys(t)){const r=t[e];if(void 0===r)throw new Error("Somehow smartbuy matname is undefined");t[e]=Math.floor(r*a/n)}for(const e of Object.keys(t)){if(!warehouse.smartSupplyUseLeftovers[e])continue;const n=warehouse.materials[e],a=t[e];if(void 0===a)throw new Error("Somehow smartbuy matname is undefined");t[e]=Math.max(0,a-n.qty)}for(const e of Object.keys(t)){const n=warehouse.materials[e],a=t[e];if(void 0===a)throw new Error("Somehow smartbuy matname is undefined");n.qty+=a,expenses+=a*n.bCost}break}case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){const t=warehouse.materials[this.prodMats[0]],e=this.getOfficeProductivity(office)*this.prodMult*corporation.getProductionMultiplier()*this.getProductionMultiplier();let n;n=t.prdman[0]?Math.min(e,t.prdman[1]):e,n*=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles;let a=0;for(let t=0;t0){const t=Math.floor((warehouse.size-warehouse.sizeUsed)/a);n=Math.min(t,n)}n<0&&(n=0),warehouse.smartSupplyStore+=n/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles);let r=1;for(const t of Object.keys(this.reqMats))if(this.reqMats.hasOwnProperty(t)){const e=this.reqMats[t];if(void 0===e)continue;const a=e*n;warehouse.materials[t].qty0&&n>0){for(const t of Object.keys(this.reqMats)){const e=this.reqMats[t];if(void 0===e)continue;const a=e*n*r;warehouse.materials[t].qty-=a,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)}for(let t=0;tmat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName of Object.keys(warehouse.materials))if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI=n.size)return[0,0];{const t=Math.floor((n.size-n.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[matName]);amt=Math.min(t,amt)}n.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles),n.materials[matName].qty+=amt,n.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,e.updateWarehouseSizeUsed(n);break}}}mat.totalExp/=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_8__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(t=1,e){let n=0;if("PRODUCTION"===this.state)for(const e of Object.keys(this.products)){const n=this.products[e];if(void 0!==n&&!n.fin){const e=n.createCity,a=this.offices[e];if(0===a)continue;const r=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Engineer],i=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Management],o=a.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;n.createProduct(t,c),n.prog>=100&&n.finishProduct(a.employeeProd,this);break}}for(const a of Object.keys(this.products))if(this.products.hasOwnProperty(a)){const r=this.products[a];r instanceof _Product__WEBPACK_IMPORTED_MODULE_9__.a&&r.fin&&(n+=this.processProduct(t,r,e))}return[n,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a)switch(this.state){case"PRODUCTION":{const t=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let e;e=product.prdman[city][0]?Math.min(t,product.prdman[city][1]):t,e*=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles;let n=product.siz;for(const t of Object.keys(product.reqMats))if(product.reqMats.hasOwnProperty(t)){const e=product.reqMats[t];n-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[t]*e}if(n>0){const t=Math.floor((warehouse.size-warehouse.sizeUsed)/n);e=Math.min(t,e)}warehouse.smartSupplyStore+=e/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles);let a=1;for(const t of Object.keys(product.reqMats))if(product.reqMats.hasOwnProperty(t)){const n=product.reqMats[t]*e;warehouse.materials[t].qty0&&e>0){for(const t of Object.keys(product.reqMats))if(product.reqMats.hasOwnProperty(t)){const n=product.reqMats[t]*e*a;warehouse.materials[t].qty-=n,warehouse.materials[t].prd-=n/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=e*a}product.data[city][1]=e*a/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const t of Object.keys(product.reqMats))product.reqMats.hasOwnProperty(t)&&(product.pCost+=product.reqMats[t]*warehouse.materials[t].bCost);product.pCost*=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const t=product.data[city][1],e=markupLimit,n=t,a=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(n/a);let i;0===a||0===r?0===n?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=e/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_11__.a)(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1,sellAmt;if(sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost)),product.maxsll=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_11__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,(product.maxsll+"").toUpperCase());tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(t){Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.a)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=product.maxsll}sellAmt=Math.min(product.maxsll,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(product.maxsll,product.sllman[city][1]):!1===product.sllman[city][0]?0:product.maxsll;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error("Invalid State: "+this.state)}}return totalProfit}discontinueProduct(t){for(const e of Object.keys(this.products))this.products.hasOwnProperty(e)&&t===this.products[e]&&delete this.products[e]}upgrade(t,e){const n=e.corporation,a=e.office,r=t[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let t=0;t=1)&&console.warn(`Exponential factor is ${e}. This is not an intended value for it`),n<1&&console.warn(`Linear factor is ${n}. This is not an intended value for it`),Math.pow(t,e)+t/n}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(38),r=n(36),i=n(25),o=n(53);class s{constructor(t={}){var e,n,i;e=this,n="cyclesUntilRaise",i=a.a.CyclesPerEmployeeRaise,n in e?Object.defineProperty(e,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[n]=i,this.name=t.name?t.name:"Bobby",this.mor=t.morale?t.morale:Object(r.a)(50,100),this.hap=t.happiness?t.happiness:Object(r.a)(50,100),this.ene=t.energy?t.energy:Object(r.a)(50,100),this.int=t.intelligence?t.intelligence:Object(r.a)(10,50),this.cha=t.charisma?t.charisma:Object(r.a)(10,50),this.exp=t.experience?t.experience:Object(r.a)(10,50),this.cre=t.creativity?t.creativity:Object(r.a)(10,50),this.eff=t.efficiency?t.efficiency:Object(r.a)(10,50),this.sal=t.salary?t.salary:Object(r.a)(.1,5),this.loc=t.loc?t.loc:"",this.pos=o.a.Unassigned}process(t=1,e){const n=.003*t,r=n*Math.random();this.exp+=n;const i=n*Math.random();this.pos===o.a.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.ene(m("gang.wantedPenalty"),Object(f.f)(t)),respectGain:function(t,e,n){return m("gang.respectGain"),Object(f.d)(t,e,n)},wantedLevelGain:function(t,e,n){return m("gang.wantedLevelGain"),Object(f.e)(t,e,n)},moneyGain:function(t,e,n){return m("gang.moneyGain"),Object(f.c)(t,e,n)},ascensionPointsGain:function(t){const e=n.number("ascensionPointsGain","exp",t);return m("gang.ascensionPointsGain"),Object(f.b)(e)},ascensionMultiplier:function(t){const e=n.number("ascensionMultiplier","points",t);return m("gang.ascensionMultiplier"),Object(f.a)(e)}}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(13),r=n(245),i=n(101),o=n(226),s=n(112),l=n(76),c=n(97),f=n(227);function u(t,e,n){const u=function(e){if(!t.hasWseAccount)throw n.makeRuntimeErrorMsg(e,`You don't have WSE Access! Cannot use ${e}()`);if(!t.hasTixApiAccess)throw n.makeRuntimeErrorMsg(e,`You don't have TIX API Access! Cannot use ${e}()`)},m=function(t,e){const a=i.b[t];if(null==a)throw n.makeRuntimeErrorMsg(e,`Invalid stock symbol: '${t}'`);return a};return{getSymbols:function(){return n.updateDynamicRam("getSymbols",Object(a.c)(t,"stock","getSymbols")),u("getSymbols"),Object.values(c.a)},getPrice:function(e){n.updateDynamicRam("getPrice",Object(a.c)(t,"stock","getPrice"));const r=n.string("getPrice","symbol",e);u("getPrice");return m(r,"getPrice").price},getAskPrice:function(e){n.updateDynamicRam("getAskPrice",Object(a.c)(t,"stock","getAskPrice"));const r=n.string("getAskPrice","symbol",e);u("getAskPrice");return m(r,"getAskPrice").getAskPrice()},getBidPrice:function(e){n.updateDynamicRam("getBidPrice",Object(a.c)(t,"stock","getBidPrice"));const r=n.string("getBidPrice","symbol",e);u("getBidPrice");return m(r,"getBidPrice").getBidPrice()},getPosition:function(e){n.updateDynamicRam("getPosition",Object(a.c)(t,"stock","getPosition"));const r=n.string("getPosition","symbol",e);u("getPosition");const o=i.b[r];if(null==o)throw n.makeRuntimeErrorMsg("getPosition","Invalid stock symbol: "+r);return[o.playerShares,o.playerAvgPx,o.playerShortShares,o.playerAvgShortPx]},getMaxShares:function(e){n.updateDynamicRam("getMaxShares",Object(a.c)(t,"stock","getMaxShares"));const r=n.string("getMaxShares","symbol",e);u("getMaxShares");return m(r,"getMaxShares").maxShares},getPurchaseCost:function(e,r,i){n.updateDynamicRam("getPurchaseCost",Object(a.c)(t,"stock","getPurchaseCost"));const s=n.string("getPurchaseCost","symbol",e);let c=n.number("getPurchaseCost","shares",r);const f=n.string("getPurchaseCost","posType",i);u("getPurchaseCost");const h=m(s,"getPurchaseCost");let d;c=Math.round(c);const p=f.toLowerCase();if(p.includes("l"))d=l.a.Long;else{if(!p.includes("s"))return 1/0;d=l.a.Short}const g=Object(o.b)(h,c,d);return null==g?1/0:g},getSaleGain:function(e,r,i){n.updateDynamicRam("getSaleGain",Object(a.c)(t,"stock","getSaleGain"));const s=n.string("getSaleGain","symbol",e);let c=n.number("getSaleGain","shares",r);const f=n.string("getSaleGain","posType",i);u("getSaleGain");const h=m(s,"getSaleGain");let d;c=Math.round(c);const p=f.toLowerCase();if(p.includes("l"))d=l.a.Long;else{if(!p.includes("s"))return 0;d=l.a.Short}const g=Object(o.c)(h,c,d);return null==g?0:g},buy:function(i,o){n.updateDynamicRam("buy",Object(a.c)(t,"stock","buy"));const s=n.string("buy","symbol",i),l=n.number("buy","shares",o);u("buy");const c=m(s,"buy");return Object(r.a)(c,l,e,{})?c.getAskPrice():0},sell:function(i,o){n.updateDynamicRam("sell",Object(a.c)(t,"stock","sell"));const s=n.string("sell","symbol",i),l=n.number("sell","shares",o);u("sell");const c=m(s,"sell");return Object(r.c)(c,l,e,{})?c.getBidPrice():0},short:function(i,o){n.updateDynamicRam("short",Object(a.c)(t,"stock","short"));const s=n.string("short","symbol",i),l=n.number("short","shares",o);if(u("short"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=1)throw n.makeRuntimeErrorMsg("short","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const c=m(s,"short");return Object(r.d)(c,l,e,{})?c.getBidPrice():0},sellShort:function(i,o){n.updateDynamicRam("sellShort",Object(a.c)(t,"stock","sellShort"));const s=n.string("sellShort","symbol",i),l=n.number("sellShort","shares",o);if(u("sellShort"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=1)throw n.makeRuntimeErrorMsg("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const c=m(s,"sellShort");return Object(r.b)(c,l,e,{})?c.getAskPrice():0},placeOrder:function(r,o,c,f,h){n.updateDynamicRam("placeOrder",Object(a.c)(t,"stock","placeOrder"));const d=n.string("placeOrder","symbol",r),p=n.number("placeOrder","shares",o),g=n.number("placeOrder","price",c),y=n.string("placeOrder","type",f),b=n.string("placeOrder","pos",h);if(u("placeOrder"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=2)throw n.makeRuntimeErrorMsg("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const E=m(d,"placeOrder");let v,k;const _=y.toLowerCase();if(_.includes("limit")&&_.includes("buy"))v=s.a.LimitBuy;else if(_.includes("limit")&&_.includes("sell"))v=s.a.LimitSell;else if(_.includes("stop")&&_.includes("buy"))v=s.a.StopBuy;else{if(!_.includes("stop")||!_.includes("sell"))throw n.makeRuntimeErrorMsg("placeOrder","Invalid order type: "+y);v=s.a.StopSell}const w=b.toLowerCase();if(w.includes("l"))k=l.a.Long;else{if(!w.includes("s"))throw n.makeRuntimeErrorMsg("placeOrder","Invalid position type: "+b);k=l.a.Short}return Object(i.j)(E,p,g,v,k,e)},cancelOrder:function(r,o,c,f,h){n.updateDynamicRam("cancelOrder",Object(a.c)(t,"stock","cancelOrder"));const d=n.string("cancelOrder","symbol",r),p=n.number("cancelOrder","shares",o),g=n.number("cancelOrder","price",c),y=n.string("cancelOrder","type",f),b=n.string("cancelOrder","pos",h);if(u("cancelOrder"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=2)throw n.makeRuntimeErrorMsg("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const E=m(d,"cancelOrder");if(isNaN(p)||isNaN(g))throw n.makeRuntimeErrorMsg("cancelOrder",`Invalid shares or price. Must be numeric. shares=${p}, price=${g}`);let v,k;const _=y.toLowerCase();if(_.includes("limit")&&_.includes("buy"))v=s.a.LimitBuy;else if(_.includes("limit")&&_.includes("sell"))v=s.a.LimitSell;else if(_.includes("stop")&&_.includes("buy"))v=s.a.StopBuy;else{if(!_.includes("stop")||!_.includes("sell"))throw n.makeRuntimeErrorMsg("cancelOrder","Invalid order type: "+y);v=s.a.StopSell}const w=b.toLowerCase();if(w.includes("l"))k=l.a.Long;else{if(!w.includes("s"))throw n.makeRuntimeErrorMsg("cancelOrder","Invalid position type: "+b);k=l.a.Short}const S={stock:E,shares:p,price:g,type:v,pos:k};return Object(i.c)(S,e)},getOrders:function(){if(n.updateDynamicRam("getOrders",Object(a.c)(t,"stock","getOrders")),u("getOrders"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=2)throw n.makeRuntimeErrorMsg("getOrders","You must either be in BitNode-8 or have Source-File 8 Level 3.");const e={},r=i.a.Orders;for(const t of Object.keys(r)){const n=r[t];if(n.constructor===Array&&n.length>0){e[t]=[];for(let a=0;a"Already purchased 4S Market Data."),!0):t.money"Not enough money to purchase 4S Market Data."),!1):(t.has4SData=!0,t.loseMoney(Object(f.a)(),"stock"),e.log("stock.purchase4SMarketData",()=>"Purchased 4S Market Data"),!0)},purchase4SMarketDataTixApi:function(){return n.updateDynamicRam("purchase4SMarketDataTixApi",Object(a.c)(t,"stock","purchase4SMarketDataTixApi")),u("purchase4SMarketDataTixApi"),t.has4SDataTixApi?(e.log("stock.purchase4SMarketDataTixApi",()=>"Already purchased 4S Market Data TIX API"),!0):t.money"Not enough money to purchase 4S Market Data TIX API"),!1):(t.has4SDataTixApi=!0,t.loseMoney(Object(f.b)(),"stock"),e.log("stock.purchase4SMarketDataTixApi",()=>"Purchased 4S Market Data TIX API"),!0)},purchaseWseAccount:function(){return n.updateDynamicRam("PurchaseWseAccount",Object(a.c)(t,"stock","purchaseWseAccount")),t.hasWseAccount?(e.log("stock.purchaseWseAccount",()=>"Already purchased WSE Account"),!0):t.money"Not enough money to purchase WSE Account Access"),!1):(t.hasWseAccount=!0,t.loseMoney(Object(f.d)(),"stock"),e.log("stock.purchaseWseAccount",()=>"Purchased WSE Account Access"),!0)},purchaseTixApi:function(){return n.updateDynamicRam("purchaseTixApi",Object(a.c)(t,"stock","purchaseTixApi")),t.hasTixApiAccess?(e.log("stock.purchaseTixApi",()=>"Already purchased TIX API"),!0):t.money"Not enough money to purchase TIX API Access"),!1):(t.hasTixApiAccess=!0,t.loseMoney(Object(f.c)(),"stock"),e.log("stock.purchaseTixApi",()=>"Purchased TIX API"),!0)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(57),r=n(105),i=n(17),o=n(13),s=n(467),l=n(587),c=n(96);function f(t,e,n){const f=e=>{if(!t.canAccessGrafting())throw n.makeRuntimeErrorMsg("grafting."+e,"You do not currently have access to the Grafting API. This is either because you are not in BitNode 10 or because you do not have Source-File 10")};return{getAugmentationGraftPrice:e=>{const r=n.string("getAugmentationGraftPrice","augName",e);if(n.updateDynamicRam("getAugmentationGraftPrice",Object(o.c)(t,"grafting","getAugmentationGraftPrice")),f("getAugmentationGraftPrice"),!a.a.hasOwnProperty(r))throw n.makeRuntimeErrorMsg("grafting.getAugmentationGraftPrice","Invalid aug: "+r);return new s.a(a.a[r]).cost},getAugmentationGraftTime:e=>{const r=n.string("getAugmentationGraftTime","augName",e);if(n.updateDynamicRam("getAugmentationGraftTime",Object(o.c)(t,"grafting","getAugmentationGraftTime")),f("getAugmentationGraftTime"),!a.a.hasOwnProperty(r))throw n.makeRuntimeErrorMsg("grafting.getAugmentationGraftTime","Invalid aug: "+r);return new s.a(a.a[r]).time},graftAugmentation:(u,m=!0)=>{const h=n.string("graftAugmentation","augName",u),d=n.boolean(m);if(n.updateDynamicRam("graftAugmentation",Object(o.c)(t,"grafting","graftAugmentation")),f("graftAugmentation"),t.city!==i.a.NewTokyo)throw n.makeRuntimeErrorMsg("grafting.graftAugmentation","You must be in New Tokyo to begin crafting an Augmentation.");if(!Object(l.b)(t).includes(h))return e.log("grafting.graftAugmentation",()=>"Invalid aug: "+h),!1;const p=t.focus;if(t.isWorking){const n=t.singularityStopWork();e.log("graftAugmentation",()=>n)}const g=new s.a(a.a[h]);return t.money"You don't have enough money to craft "+h),!1):Object(r.c)(g.augmentation)?(t.loseMoney(g.cost,"augmentations"),t.startGraftAugmentationWork(h,g.time),d?(t.startFocusing(),c.b.toWork()):p&&(t.stopFocusing(),c.b.toTerminal()),e.log("grafting.graftAugmentation",()=>`Began crafting Augmentation ${h}.`),!0):(e.log("grafting.graftAugmentation",()=>"You don't have the pre-requisites for "+h),!1)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(17),r=n(11),i=n(51);const o=[{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.a.AevumAeroCorp,types:[i.a.Company]},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.a.AevumBachmanAndAssociates,types:[i.a.Company]},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.a.AevumClarkeIncorporated,types:[i.a.Company]},{city:a.a.Aevum,costMult:3,expMult:2,name:r.a.AevumCrushFitnessGym,types:[i.a.Gym]},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.a.AevumECorp,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.a.AevumFulcrumTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.a.AevumGalacticCybersystems,types:[i.a.Company]},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.a.AevumNetLinkTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.a.AevumPolice,types:[i.a.Company]},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.a.AevumRhoConstruction,types:[i.a.Company]},{city:a.a.Aevum,costMult:10,expMult:5,name:r.a.AevumSnapFitnessGym,types:[i.a.Gym]},{city:a.a.Aevum,costMult:4,expMult:3,name:r.a.AevumSummitUniversity,types:[i.a.University]},{city:a.a.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.a.AevumWatchdogSecurity,types:[i.a.Company]},{city:a.a.Aevum,name:r.a.AevumCasino,types:[i.a.Casino]},{city:a.a.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.a.ChongqingKuaiGongInternational,types:[i.a.Company]},{city:a.a.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.a.ChongqingSolarisSpaceSystems,types:[i.a.Company]},{city:a.a.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.a.IshimaNovaMedical,types:[i.a.Company]},{city:a.a.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.a.IshimaOmegaSoftware,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:a.a.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.a.IshimaStormTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:a.a.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.a.NewTokyoDefComm,types:[i.a.Company]},{city:a.a.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.a.NewTokyoGlobalPharmaceuticals,types:[i.a.Company]},{city:a.a.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.a.NewTokyoNoodleBar,types:[i.a.Company,i.a.Special]},{city:a.a.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.a.NewTokyoVitaLife,types:[i.a.Company,i.a.Special]},{city:a.a.NewTokyo,name:r.a.NewTokyoArcade,types:[i.a.Special]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.a.Sector12AlphaEnterprises,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.a.Sector12BladeIndustries,types:[i.a.Company]},{city:a.a.Sector12,name:r.a.Sector12CIA,types:[i.a.Company]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.a.Sector12CarmichaelSecurity,types:[i.a.Company]},{city:a.a.Sector12,name:r.a.Sector12CityHall,types:[i.a.Special]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12DeltaOne,types:[i.a.Company]},{city:a.a.Sector12,name:r.a.Sector12FoodNStuff,types:[i.a.Company]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.a.Sector12FourSigma,types:[i.a.Company]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.a.Sector12IcarusMicrosystems,types:[i.a.Company]},{city:a.a.Sector12,expMult:1,costMult:1,name:r.a.Sector12IronGym,types:[i.a.Gym]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.a.Sector12JoesGuns,types:[i.a.Company]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.a.Sector12MegaCorp,types:[i.a.Company]},{city:a.a.Sector12,name:r.a.Sector12NSA,types:[i.a.Company,i.a.Special]},{city:a.a.Sector12,costMult:20,expMult:10,name:r.a.Sector12PowerhouseGym,types:[i.a.Gym]},{city:a.a.Sector12,costMult:3,expMult:2,name:r.a.Sector12RothmanUniversity,types:[i.a.University]},{city:a.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12UniversalEnergy,types:[i.a.Company]},{city:a.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.a.VolhavenCompuTek,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:a.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.a.VolhavenHeliosLabs,types:[i.a.Company]},{city:a.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.a.VolhavenLexoCorp,types:[i.a.Company]},{city:a.a.Volhaven,costMult:7,expMult:4,name:r.a.VolhavenMilleniumFitnessGym,types:[i.a.Gym]},{city:a.a.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.a.VolhavenNWO,types:[i.a.Company]},{city:a.a.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.a.VolhavenOmniTekIncorporated,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:a.a.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.a.VolhavenOmniaCybersystems,types:[i.a.Company]},{city:a.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.a.VolhavenSysCoreSecurities,types:[i.a.Company]},{city:a.a.Volhaven,costMult:5,expMult:4,name:r.a.VolhavenZBInstituteOfTechnology,types:[i.a.University]},{city:null,name:r.a.Hospital,types:[i.a.Hospital]},{city:null,name:r.a.Slums,types:[i.a.Slums]},{city:null,name:r.a.TravelAgency,types:[i.a.TravelAgency]},{city:null,name:r.a.WorldStockExchange,types:[i.a.StockMarket]},{city:a.a.Chongqing,name:r.a.ChongqingChurchOfTheMachineGod,types:[i.a.Special]},{city:a.a.Ishima,name:r.a.IshimaGlitch,types:[i.a.Special]}]},,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(2),r=n(253),i=n(26);const o=[["getHackTime","returns milliseconds"],["getGrowTime","returns milliseconds"],["getWeakenTime","returns milliseconds"],["getActionTime","returns milliseconds"],["hackAnalyzePercent","renamed 'hackAnalyze' and returns decimal"],["hackChance","renamed 'hackAnalyzeChance'"],["basic.calculateSkill","renamed 'skills.calculateSkill'"],["basic.calculateExp","renamed 'skills.calculateExp'"],["basic.hackChance","renamed 'hacking.hackChance'"],["basic.hackExp","renamed 'hacking.hackExp'"],["basic.hackPercent","renamed 'hacking.hackPercent'"],["basic.growPercent","renamed 'hacking.growPercent'"],["basic.hackTime","renamed 'hacking.hackTime'"],["basic.growTime","renamed 'hacking.growTime'"],["basic.weakenTime","renamed 'hacking.weakenTime'"],["write","needs to be awaited"],["scp","needs to be awaited"],["sleep","Can no longer be called simultenaously."],["hacking_skill","renamed 'hacking'"],["tryWrite","renamed 'tryWritePort'"]],s=[[/ns.getHackTime/g,"((...a)=>ns.getHackTime(...a)/1000)"],[/ns.getGrowTime/g,"((...a)=>ns.getGrowTime(...a)/1000)"],[/ns.getWeakenTime/g,"((...a)=>ns.getWeakenTime(...a)/1000)"],[/ns.bladeburner.getActionTime/g,"((...a)=>ns.bladeburner.getActionTime(...a)/1000)"],[/ns.hackAnalyzePercent/g,"((...a)=>ns.hackAnalyze(...a)*100)"],[/ns.hackChance/g,"ns.hackAnalyzeChance"],[/ns.tryWrite/g,"ns.tryWritePort"],[/formulas.basic.calculateSkill/g,"formulas.skills.calculateSkill"],[/formulas.basic.calculateExp/g,"formulas.skills.calculateExp"],[/formulas.basic.hackChance/g,"formulas.hacking.hackChance"],[/formulas.basic.hackExp/g,"formulas.hacking.hackExp"],[/formulas.basic.hackPercent/g,"formulas.hacking.hackPercent"],[/formulas.basic.growPercent/g,"formulas.hacking.growPercent"],[/formulas.basic.hackTime/g,"formulas.hacking.hackTime"],[/formulas.basic.growTime/g,"formulas.hacking.growTime"],[/formulas.basic.weakenTime/g,"formulas.hacking.weakenTime"]];function l(t){for(const e of s)if(t.match(e[0]))return!0;return!1}function c(t){const e=t.split("\n"),n=[];for(let t=0;tObject(M.a)({textfield:{borderBottom:"1px solid "+t.palette.primary.main},code:{whiteSpace:"pre",backgroundColor:t.palette.background.paper}}));function R(){const t=A(),e={[T.f.Start]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...",r.a.createElement("br",null),r.a.createElement("br",null),"This tutorial will show you the basics of the game. You may skip the tutorial at any time.",r.a.createElement("br",null),r.a.createElement("br",null),"You can also collapse this panel to temporarily hide this tutorial.")),canNext:!0},[T.f.GoToCharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's start by heading to the Stats page. Click"),r.a.createElement(p.a,null,r.a.createElement(y.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Stats")),r.a.createElement(o.a,null,"on the main navigation menu (left-hand side of the screen)")),canNext:!1},[T.f.CharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(y.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Stats")),r.a.createElement(o.a,null,"shows a lot of important information about your progress, such as your skills, money, and bonuses.")),canNext:!0},[T.f.CharacterGoToTerminalPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's head to your computer's terminal by clicking"),r.a.createElement(p.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal")),r.a.createElement(o.a,null,"on the main navigation menu.")),canNext:!1},[T.f.TerminalIntro]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(E.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Terminal")),r.a.createElement(o.a,null,"is used to interface with your home computer as well as all of the other machines around the world.")),canNext:!0},[T.f.TerminalHelp]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's try it out. Start by entering"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"(Don't forget to press Enter after typing the command)")),canNext:!1},[T.f.TerminalLs]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"displays a list of all available Terminal commands, how to use them, and a description of what they do."," ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's try another command. Enter"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> ls")),canNext:!1},[T.f.TerminalScan]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> ls"),r.a.createElement(o.a,null," ","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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan")),canNext:!1},[T.f.TerminalScanAnalyze1]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan"),r.a.createElement(o.a,null,"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"That's great and all, but there's so many servers. Which one should you go to?"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"gives some more detailed information about servers on the network. Try it now!")),canNext:!1},[T.f.TerminalScanAnalyze2]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"shows more detailed information about each server that you can connect to (servers that are a distance of one node away). ",r.a.createElement("br",null),r.a.createElement("br",null)," It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the following command:"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze 2")),canNext:!1},[T.f.TerminalConnect]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> connect hostname"),r.a.createElement(o.a,null,"From the results of "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze 2"),r.a.createElement(o.a,null," ","we can see that the n00dles server is only one node away. Let's connect to it now using:"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> connect n00dles")),canNext:!1},[T.f.TerminalAnalyze]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You are now connected to another machine! What can you do now? You can hack it!",r.a.createElement("br",null),r.a.createElement("br",null)," 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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Before you try to hack a server, you should run diagnostics using"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> analyze")),canNext:!1},[T.f.TerminalNuke]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"When "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null,"finishes running it will show useful information about hacking the server. ",r.a.createElement("br",null),r.a.createElement("br",null)," 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."),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null," ","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"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> run NUKE.exe"),r.a.createElement(o.a,null)),canNext:!0},[T.f.TerminalManualHack]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You now have root access! You can hack the server using "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> hack"),r.a.createElement(o.a,null," Try doing that now.")),canNext:!0},[T.f.TerminalHackingMechanics]:{content:r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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. You will need to use"," ",r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> grow"),"which tricks the company into adding money to their server and"," ",r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> weaken"),"which increases the speed of hack and grow."),canNext:!0},[T.f.TerminalGoHome]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"From any server you can get back home using"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> home"),r.a.createElement(o.a,null,"Let's head home before creating our first script!")),canNext:!0},[T.f.TerminalCreateScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"To create a new script or edit an existing one, you can use"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> nano"),r.a.createElement(o.a,null,"Scripts must end with the .script extension. Let's make a script now by entering "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> nano n00dles.script"),r.a.createElement(o.a,null,"after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)")),canNext:!1},[T.f.TerminalTypeScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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: ",r.a.createElement("br",null)),r.a.createElement(o.a,{classes:{root:t.code}},r.a.createElement(d.a,{value:"while(true) {\n hack('n00dles');\n}"})),r.a.createElement(o.a,null,"For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the n00dles server.",r.a.createElement("br",null),r.a.createElement("br",null),"To save and close the script editor, press the button in the bottom left, or press ctrl + s then ctrl + b.")),canNext:!1},[T.f.TerminalFree]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"To check how much RAM is available on this machine, enter"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> free")),canNext:!1},[T.f.TerminalRunScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> run n00dles.script")),canNext:!1},[T.f.TerminalGoToActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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). ",r.a.createElement("br",null),r.a.createElement("br",null),"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's check out some statistics for our running scripts by clicking"," "),r.a.createElement(p.a,null,r.a.createElement(C.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Active Scripts"))),canNext:!1},[T.f.ActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(p.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal"))),canNext:!1},[T.f.ActiveScriptsToTerminal]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> tail n00dles.script")),canNext:!1},[T.f.TerminalTailScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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! ",r.a.createElement("br",null),r.a.createElement("br",null),"This covers the basics of hacking. To learn more about writing scripts, select"),r.a.createElement(p.a,null,r.a.createElement(k.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Tutorial")),r.a.createElement(o.a,null,"in the main navigation menu to look at the documentation.",r.a.createElement("br",null),r.a.createElement("br",null),"If you know even a little bit of programming it is highly recommended you use NS2 instead. You will enjoy the game much more. NS1 files end with .script and are a subset of javascript. NS2 files end with .js and are full speed native javascript.",r.a.createElement("br",null),r.a.createElement("br",null),"You can learn more about the difference between them later in the documentation.",r.a.createElement("br",null),r.a.createElement("br",null),"For now, let's move on to something else!")),canNext:!0},[T.f.GoToHacknetNodesPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(p.a,null,r.a.createElement(w.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Hacknet")),r.a.createElement(o.a,null,"through the main navigation menu now.")),canNext:!0},[T.f.HacknetNodesIntroduction]:{content:r.a.createElement(o.a,null,"Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),canNext:!0},[T.f.HacknetNodesGoToWorldPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Let's go to"),r.a.createElement(p.a,null,r.a.createElement(L.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"City"))),canNext:!0},[T.f.WorldDescription]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"Lastly, click on"),r.a.createElement(p.a,null,r.a.createElement(k.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Tutorial"))),canNext:!0},[T.f.TutorialPageInfo]:{content:r.a.createElement(o.a,null,"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!"),canNext:!0},[T.f.End]:{content:r.a.createElement(o.a,null),canNext:!0}},n=Object(a.useState)(!1)[1];function c(){n(t=>!t)}Object(a.useEffect)(()=>h.a.subscribe(c),[]);const u=T.a.currStep,g=e[u];if(void 0===g)throw new Error("error in the tutorial");return r.a.createElement(i.a,{square:!0,sx:{maxWidth:"70vw",p:2}},g.content,u!==T.f.TutorialPageInfo&&r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{onClick:T.d,"aria-label":"previous"},r.a.createElement(m.a,null)),g.canNext&&r.a.createElement(s.a,{onClick:T.c,"aria-label":"next"},r.a.createElement(f.a,null))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:T.b},u!==T.f.TutorialPageInfo?"SKIP TUTORIAL":"FINISH TUTORIAL"))}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return x}));var a=n(0),r=n.n(a),i=n(442),o=n.n(i),s=n(113),l=n(211),c=n(65),f=n(1054),u=n.n(f),m=n(1053),h=n.n(m),d=n(403),p=n.n(d),g=n(1055),y=n.n(g),b=n(30),E=n(27),v=n(9),k=n(21),_=n(1),w=n(10),S=n(173);const C=Object(s.a)({overviewContainer:{position:"fixed",top:0,right:0,zIndex:1500,display:"flex",justifyContent:"flex-end",flexDirection:"column"},header:{cursor:"grab",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center"},visibilityToggle:{padding:"2px",minWidth:"inherit",backgroundColor:"transparent",border:"none","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},collapse:{borderTop:"1px solid "+v.a.theme.welllight,margin:"0 auto"},icon:{fontSize:"24px"}});function x({children:t,mode:e}){const n=Object(a.useRef)(null),[i,s]=Object(a.useState)(v.a.overview.opened),[f,m]=Object(a.useState)(v.a.overview.x),[d,g]=Object(a.useState)(v.a.overview.y),x=C(),L=b.b.Router(),O=i?h.a:u.a,M="tutorial"===e?y.a:p.a,T="tutorial"===e?"Tutorial":"Overview";Object(a.useEffect)(()=>{v.a.overview={x:f,y:d,opened:i}},[i,f,d]),Object(a.useEffect)(()=>A(),[]),Object(a.useEffect)(()=>(window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}),[]);const A=Object(S.debounce)(()=>{const t=null==n?void 0:n.current;t&&(R(t,"mouseover"),R(t,"mousedown"),R(document,"mousemove"),R(t,"mouseup"),R(t,"click"))},100),R=(t,e)=>{const n=document.createEvent("MouseEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)};return L.page()===E.a.BitVerse||L.page()===E.a.Loading||L.page()===E.a.Recovery?r.a.createElement(r.a.Fragment,null):r.a.createElement(o.a,{handle:".drag",bounds:"body",onStop:(t,e)=>{m(e.x),g(e.y)},defaultPosition:{x:f,y:d}},r.a.createElement(c.a,{className:x.overviewContainer,square:!0},r.a.createElement(k.a,{className:"drag",onDoubleClick:()=>s(t=>!t),ref:n},r.a.createElement(k.a,{className:x.header},r.a.createElement(M,{color:"secondary",className:x.icon,sx:{padding:"2px"}}),r.a.createElement(_.a,{flexGrow:1,color:"secondary"},T),r.a.createElement(w.a,{"aria-label":"expand or collapse character overview",variant:"text",size:"small",className:x.visibilityToggle},r.a.createElement(O,{className:x.icon,color:"secondary",onClick:()=>s(t=>!t)})))),r.a.createElement(l.a,{in:i,className:x.collapse},t)))}},,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return jt}));var a=n(0),r=n.n(a),i=n(28),o=n(14),s=n(19),l=n(137),c=n(113),f=n(1751),u=n(286),m=n(672),h=n(23),d=n(1062),p=n.n(d),g=n(1061),y=n.n(g),b=n(74),E=n(146),v=n(107),k=n(1),_=n(211),w=n(785),S=n(1063),C=n.n(S),x=n(346),L=n.n(x),O=n(1064),M=n.n(O),T=n(589),A=n.n(T),R=n(1065),N=n.n(R),P=n(403),I=n.n(P),F=n(1068),D=n.n(F),j=n(593),B=n.n(j),G=n(590),W=n.n(G),H=n(1069),U=n.n(H),q=n(591),$=n.n(q),K=n(1071),z=n.n(K),V=n(1072),Y=n.n(V),J=n(1073),X=n.n(J),Q=n(1074),Z=n.n(Q),tt=n(1075),et=n.n(tt),nt=n(1076),at=n.n(nt),rt=n(321),it=n.n(rt),ot=n(294),st=n.n(ot),lt=n(594),ct=n.n(lt),ft=n(1066),ut=n.n(ft),mt=n(1078),ht=n.n(mt),dt=n(1067),pt=n.n(dt),gt=n(1070),yt=n.n(gt),bt=n(1077),Et=n.n(bt),vt=n(156),kt=n.n(vt),_t=n(75),wt=n.n(_t),St=n(27),Ct=n(8),xt=n(44),Lt=n(1057),Ot=n(9),Mt=n(299),Tt=n(15),At=n(404),Rt=n(405),Nt=n(251);const Pt=t=>({width:t.spacing(31),transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen}),overflowX:"hidden"}),It=t=>({transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${t.spacing(2)} + 1px)`,[t.breakpoints.up("sm")]:{width:`calc(${t.spacing(7)} + 1px)`}}),Ft=Object(s.a)(f.a,{shouldForwardProp:t=>"open"!==t})(({theme:t,open:e})=>({width:t.spacing(31),whiteSpace:"nowrap",boxSizing:"border-box",...e&&{...Pt(t),"& .MuiDrawer-paper":Pt(t)},...!e&&{...It(t),"& .MuiDrawer-paper":It(t)}})),Dt=Object(c.a)(t=>Object(l.a)({active:{borderLeft:"3px solid "+t.palette.primary.main},listitem:{}}));function jt(t){const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(n,200);return()=>clearInterval(t)},[]);const[s,l]=Object(a.useState)(!0),[c,f]=Object(a.useState)(!0),[d,g]=Object(a.useState)(!0),[S,x]=Object(a.useState)(!0),O=xt.a.currStep===xt.f.CharacterGoToTerminalPage||xt.a.currStep===xt.f.ActiveScriptsPage,T=xt.a.currStep===xt.f.GoToCharacterPage,R=xt.a.currStep===xt.f.TerminalGoToActiveScriptsPage,P=xt.a.currStep===xt.f.GoToHacknetNodesPage,F=xt.a.currStep===xt.f.HacknetNodesGoToWorldPage,j=xt.a.currStep===xt.f.WorldDescription,G=t.player.queuedAugmentations.length,H=t.player.factionInvitations.filter(t=>!Rt.b.includes(t)).length,q=Object(Lt.a)(t.player).length-At.b.length,K=t.player.factionInvitations.length>0||t.player.factions.length>0||t.player.augmentations.length>0||t.player.queuedAugmentations.length>0||t.player.sourceFiles.length>0,V=t.player.augmentations.length>0||t.player.queuedAugmentations.length>0||t.player.sourceFiles.length>0,J=t.player.sleeves.length>0,Q=!!t.player.corporation,tt=!!t.player.gang,nt=""!==t.player.companyName,rt=t.player.hasWseAccount,ot=!!t.player.bladeburner,lt=t.player.augmentations.some(t=>t.name===Tt.a.StaneksGift1);function ft(){t.router.toTerminal(),O&&Object(xt.c)()}function mt(){t.router.toScriptEditor()}function dt(){t.router.toStats(),T&&Object(xt.c)()}function gt(){t.router.toActiveScripts(),R&&Object(xt.c)()}function bt(){t.router.toCreateProgram()}function vt(){t.router.toFactions()}function _t(){t.router.toAugmentations()}function Pt(){t.router.toHacknetNodes(),P&&Object(xt.c)()}function It(){t.router.toCity(),F&&Object(xt.c)()}function jt(){t.router.toTravel()}function Bt(){t.router.toJob()}function Gt(){t.router.toBladeburner()}function Wt(){t.router.toGang()}function Ht(){t.router.toTutorial(),j&&Object(xt.c)()}Object(a.useEffect)(()=>{function e(e){if(!Ot.a.DisableHotkeys&&!(t.player.isWorking&&t.player.focus||Mt.b))if(e.key===i.a.T&&e.altKey)e.preventDefault(),ft();else if(e.key===i.a.C&&e.altKey)e.preventDefault(),dt();else if(e.key===i.a.E&&e.altKey)e.preventDefault(),mt();else if(e.key===i.a.S&&e.altKey)e.preventDefault(),gt();else if(e.key===i.a.H&&e.altKey)e.preventDefault(),Pt();else if(e.key===i.a.W&&e.altKey)e.preventDefault(),It();else if(e.key===i.a.J&&e.altKey&&!e.ctrlKey&&!e.metaKey&&nt)e.preventDefault(),Bt();else if(e.key===i.a.R&&e.altKey)e.preventDefault(),jt();else if(e.key===i.a.P&&e.altKey)e.preventDefault(),bt();else if(e.key===i.a.F&&e.altKey){if(t.page==St.a.Terminal&&Ot.a.EnableBashHotkeys)return;e.preventDefault(),vt()}else e.key===i.a.A&&e.altKey?(e.preventDefault(),_t()):e.key===i.a.U&&e.altKey?(e.preventDefault(),Ht()):e.key===i.a.B&&e.altKey&&t.player.bladeburner?(e.preventDefault(),Gt()):e.key===i.a.G&&e.altKey&&t.player.gang&&(e.preventDefault(),Wt())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);const Ut=Dt(),[qt,$t]=Object(a.useState)(t.opened);return Object(a.useEffect)(()=>{t.onToggled(qt)},[qt]),r.a.createElement(Ft,{open:qt,anchor:"left",variant:"permanent"},r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>$t(t=>!t)},r.a.createElement(E.a,null,qt?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(y.a,{color:"primary"})),r.a.createElement(v.a,{primary:r.a.createElement(h.a,{title:Object(Nt.a)()},r.a.createElement(k.a,null,"Bitburner v",Ct.a.VersionString))})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>l(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Hacking"},r.a.createElement(C.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"Hacking")}),s?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:s,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Terminal",className:Object(o.default)({[Ut.active]:t.page===St.a.Terminal}),onClick:ft},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Terminal"},r.a.createElement(L.a,{color:O?"error":t.page!==St.a.Terminal?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:O?"error":t.page!==St.a.Terminal?"secondary":"primary"},"Terminal"))),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Script Editor",className:Object(o.default)({[Ut.active]:t.page===St.a.ScriptEditor}),onClick:mt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Script Editor"},r.a.createElement(M.a,{color:t.page!==St.a.ScriptEditor?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.ScriptEditor?"secondary":"primary"},"Script Editor"))),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Active Scripts",className:Object(o.default)({[Ut.active]:t.page===St.a.ActiveScripts}),onClick:gt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Active Scripts"},r.a.createElement(A.a,{color:R?"error":t.page!==St.a.ActiveScripts?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:R?"error":t.page!==St.a.ActiveScripts?"secondary":"primary"},"Active Scripts"))),r.a.createElement(b.a,{button:!0,key:"Create Program",className:Object(o.default)({[Ut.active]:t.page===St.a.CreateProgram}),onClick:bt},r.a.createElement(E.a,null,r.a.createElement(w.a,{badgeContent:q>0?q:void 0,color:"error"},r.a.createElement(h.a,{title:qt?"":"Create Program"},r.a.createElement(N.a,{color:t.page!==St.a.CreateProgram?"secondary":"primary"})))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.CreateProgram?"secondary":"primary"},"Create Program"))),lt&&r.a.createElement(b.a,{button:!0,key:"Staneks Gift",className:Object(o.default)({[Ut.active]:t.page===St.a.StaneksGift}),onClick:function(){t.router.toStaneksGift()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Stanek's Gift"},r.a.createElement(ut.a,{color:t.page!==St.a.StaneksGift?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.StaneksGift?"secondary":"primary"},"Stanek's Gift"))))),r.a.createElement(m.a,null),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>f(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Character"},r.a.createElement(pt.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"Character")}),c?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:c,timeout:"auto",unmountOnExit:!0},r.a.createElement(b.a,{button:!0,key:"Stats",className:Object(o.default)({[Ut.active]:t.page===St.a.Stats}),onClick:dt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Stats"},r.a.createElement(I.a,{color:T?"error":t.page!==St.a.Stats?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:T?"error":t.page!==St.a.Stats?"secondary":"primary"},"Stats"))),K&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Factions",className:Object(o.default)({[Ut.active]:[St.a.Factions,St.a.Faction].includes(t.page)}),onClick:vt},r.a.createElement(E.a,null,r.a.createElement(w.a,{badgeContent:0!==H?H:void 0,color:"error"},r.a.createElement(h.a,{title:qt?"":"Factions"},r.a.createElement(D.a,{color:[St.a.Factions,St.a.Faction].includes(t.page)?"primary":"secondary"})))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:[St.a.Factions,St.a.Faction].includes(t.page)?"primary":"secondary"},"Factions"))),V&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Augmentations",className:Object(o.default)({[Ut.active]:t.page===St.a.Augmentations}),onClick:_t},r.a.createElement(E.a,null,r.a.createElement(w.a,{badgeContent:0!==G?G:void 0,color:"error"},r.a.createElement(h.a,{title:qt?"":"Augmentations"},r.a.createElement(B.a,{style:{transform:"rotate(-90deg)"},color:t.page!==St.a.Augmentations?"secondary":"primary"})))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Augmentations?"secondary":"primary"},"Augmentations"))),r.a.createElement(b.a,{button:!0,key:"Hacknet",className:Object(o.default)({[Ut.active]:t.page===St.a.Hacknet}),onClick:Pt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Hacknet"},r.a.createElement(W.a,{color:P?"error":t.page!==St.a.Hacknet?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:P?"error":t.page!==St.a.Hacknet?"secondary":"primary"},"Hacknet"))),J&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Sleeves",className:Object(o.default)({[Ut.active]:t.page===St.a.Sleeves}),onClick:function(){t.router.toSleeves()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Sleeves"},r.a.createElement(U.a,{color:t.page!==St.a.Sleeves?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Sleeves?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>g(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"World"},r.a.createElement(yt.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"World")}),d?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:d,timeout:"auto",unmountOnExit:!0},r.a.createElement(b.a,{button:!0,key:"City",className:Object(o.default)({[Ut.active]:t.page===St.a.City||t.page===St.a.Grafting||t.page===St.a.Location}),onClick:It},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"City"},r.a.createElement($.a,{color:F?"error":t.page!==St.a.City?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:F?"error":t.page!==St.a.City?"secondary":"primary"},"City"))),r.a.createElement(b.a,{button:!0,key:"Travel",className:Object(o.default)({[Ut.active]:t.page===St.a.Travel}),onClick:jt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Travel"},r.a.createElement(z.a,{color:t.page!==St.a.Travel?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Travel?"secondary":"primary"},"Travel"))),nt&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Job",className:Object(o.default)({[Ut.active]:t.page===St.a.Job}),onClick:Bt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Job"},r.a.createElement(Y.a,{color:t.page!==St.a.Job?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Job?"secondary":"primary"},"Job"))),rt&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Stock Market",className:Object(o.default)({[Ut.active]:t.page===St.a.StockMarket}),onClick:function(){t.router.toStockMarket()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Stock Market"},r.a.createElement(X.a,{color:t.page!==St.a.StockMarket?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.StockMarket?"secondary":"primary"},"Stock Market"))),ot&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Bladeburner",className:Object(o.default)({[Ut.active]:t.page===St.a.Bladeburner}),onClick:Gt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Bladeburner"},r.a.createElement(Z.a,{color:t.page!==St.a.Bladeburner?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Bladeburner?"secondary":"primary"},"Bladeburner"))),Q&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Corp",className:Object(o.default)({[Ut.active]:t.page===St.a.Corporation}),onClick:function(){t.router.toCorporation()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Corp"},r.a.createElement(et.a,{color:t.page!==St.a.Corporation?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Corporation?"secondary":"primary"},"Corp"))),tt&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Gang",className:Object(o.default)({[Ut.active]:t.page===St.a.Gang}),onClick:Wt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Gang"},r.a.createElement(at.a,{color:t.page!==St.a.Gang?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Gang?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>x(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Help"},r.a.createElement(Et.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"Help")}),S?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:S,timeout:"auto",unmountOnExit:!0},r.a.createElement(b.a,{button:!0,key:"Milestones",className:Object(o.default)({[Ut.active]:t.page===St.a.Milestones}),onClick:function(){t.router.toMilestones()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Milestones"},r.a.createElement(it.a,{color:t.page!==St.a.Milestones?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Milestones?"secondary":"primary"},"Milestones"))),r.a.createElement(b.a,{button:!0,key:"Tutorial",className:Object(o.default)({[Ut.active]:t.page===St.a.Tutorial}),onClick:Ht},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Tutorial"},r.a.createElement(st.a,{color:j?"error":t.page!==St.a.Tutorial?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:j?"error":t.page!==St.a.Tutorial?"secondary":"primary"},"Tutorial"))),r.a.createElement(b.a,{button:!0,key:"Achievements",className:Object(o.default)({[Ut.active]:t.page===St.a.Achievements}),onClick:function(){t.router.toAchievements()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Achievements"},r.a.createElement(ht.a,{color:t.page!==St.a.Achievements?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Achievements?"secondary":"primary"},"Achievements"))),r.a.createElement(b.a,{button:!0,key:"Options",className:Object(o.default)({[Ut.active]:t.page===St.a.Options}),onClick:function(){t.router.toGameOptions()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Options"},r.a.createElement(ct.a,{color:t.page!==St.a.Options?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Options?"secondary":"primary"},"Options"))),!1)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(64);function r(t){const e=[];for(const n of Object.keys(a.a)){const r=a.a[n].create;null!=r&&(t.hasProgram(a.a[n].name)||r.req(t)&&e.push(a.a[n]))}return e}},,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(1080),o=n(1081),s=n(1082),l=n(1083),c=n(345),f=n(30),u=n(1),m=n(10),h=n(23),d=n(21),p=n(9),g=n(250);function y(t){const[e,n]=Object(a.useState)(!1),y=f.b.Player(),b=Object(a.useState)(!1)[1];function E(){b(t=>!t)}return Object(a.useEffect)(()=>{const t=setInterval(E,200);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{variant:"h4"},"Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(u.a,null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),r.a.createElement(u.a,null,"WARNING: Installing your Augmentations resets most of your progress, including:"),r.a.createElement("br",null),r.a.createElement(u.a,null,"- Stats/Skill levels and Experience"),r.a.createElement(u.a,null,"- Money"),r.a.createElement(u.a,null,"- Scripts on every computer but your home computer"),r.a.createElement(u.a,null,"- Purchased servers"),r.a.createElement(u.a,null,"- Hacknet Nodes"),r.a.createElement(u.a,null,"- Faction/Company reputation"),r.a.createElement(u.a,null,"- Stocks"),r.a.createElement("br",null),r.a.createElement(u.a,null,"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)")),r.a.createElement(u.a,{variant:"h4",color:"primary"},"Purchased Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(h.a,{title:r.a.createElement(u.a,null,"'I never asked for this'")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:0===y.queuedAugmentations.length,onClick:function(){p.a.SuppressBuyAugmentationConfirmation?t.installAugmentationsFn():n(!0)}},"Install Augmentations"))),r.a.createElement(g.a,{open:e,onClose:()=>n(!1),onConfirm:t.installAugmentationsFn,confirmationText:r.a.createElement(r.a.Fragment,null,"Installing will reset",r.a.createElement("br",null),r.a.createElement("br",null),"- money",r.a.createElement("br",null),"- skill / experience",r.a.createElement("br",null),"- every server except home",r.a.createElement("br",null),"- factions and reputation",r.a.createElement("br",null),r.a.createElement("br",null),"You will keep:",r.a.createElement("br",null),r.a.createElement("br",null),"- All scripts on home",r.a.createElement("br",null),"- home ram and cores",r.a.createElement("br",null),r.a.createElement("br",null),"It is recommended to install several Augmentations at once. Preferably everything from any faction of your choosing.")}),r.a.createElement(h.a,{title:r.a.createElement(u.a,null,"It's always a good idea to backup/export your save!")},r.a.createElement(m.a,{sx:{mx:2},onClick:function(){t.exportGameFn(),E()},color:"error"},"Backup Save ",Object(c.b)()?"(+1 favor to all factions)":"")),r.a.createElement(s.a,null)),r.a.createElement(u.a,{variant:"h4"},"Installed Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(u.a,null,"List of all Augmentations that have been installed. You have gained the effects of these."),r.a.createElement(i.a,null)),r.a.createElement(o.a,null),r.a.createElement(l.a,null))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var a=n(0),r=n.n(a),i=n(595),o=n(57),s=n(15),l=n(9),c=n(30),f=n(205),u=n(10),m=n(23),h=n(286),d=n(1753),p=n(1754),g=n(21),y=n(65),b=n(330),E=n(107),v=n(1),k=n(211),_=n(8),w=n(24);function S(){const t=Object(a.useState)(!0)[1],e=c.b.Player(),n=e.augmentations.slice();function S(){t(t=>!t)}return l.a.OwnedAugmentationsOrder===f.a.Alphabetically&&n.sort((t,e)=>t.name.localeCompare(e.name)),r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{title:"Sorts the Augmentations alphabetically in numeral order"},r.a.createElement(u.a,{onClick:function(){l.a.OwnedAugmentationsOrder=f.a.Alphabetically,S()}},"Sort in Order")),r.a.createElement(m.a,{title:"Sorts the Augmentations based on when you acquired them (same as default)"},r.a.createElement(u.a,{sx:{mx:2},onClick:function(){l.a.OwnedAugmentationsOrder=f.a.AcquirementTime,S()}},"Sort by Acquirement Time")),r.a.createElement(h.a,{dense:!0},e.entropy>0&&(()=>{const[t,n]=Object(a.useState)(!1);return r.a.createElement(g.a,{component:y.a},r.a.createElement(b.a,{onClick:()=>n(t=>!t)},r.a.createElement(E.a,{primary:r.a.createElement(v.a,{color:l.a.theme.hp,style:{whiteSpace:"pre-wrap"}},"Entropy Virus - Level ",e.entropy)}),t?r.a.createElement(d.a,{sx:{color:l.a.theme.hp}}):r.a.createElement(p.a,{sx:{color:l.a.theme.hp}})),r.a.createElement(k.a,{in:t,unmountOnExit:!0},r.a.createElement(g.a,{m:4},r.a.createElement(v.a,{color:l.a.theme.hp},r.a.createElement("b",null,"All multipliers decreased by:")," ",Object(w.d)(100*(1-_.a.EntropyEffect**e.entropy),3),"% (multiplicative)"))))})(),n.map(t=>{const e=o.a[t.name];let n=null;return t.name===s.a.NeuroFluxGovernor&&(n=t.level),r.a.createElement(i.a,{key:e.name,aug:e,level:n})})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n(2),i=n(4),o=n(57),s=n(43),l=n(145),c=n(45),f=n(1),u=n(21),m=n(6);function h({r:t,m:e}){return t?a.createElement(a.Fragment,null,a.createElement(s.b,{key:"2"},a.createElement(f.a,null," ","=>"," ")),a.createElement(s.b,{key:"3"},a.createElement(f.a,null,i.a.formatPercentage(t)," ",a.createElement(d,{base:t,mult:e})))):a.createElement(a.Fragment,null)}function d(t){return 1===t.mult?a.createElement(a.Fragment,null):a.createElement(a.Fragment,null,"(",i.a.formatPercentage(t.base*t.mult),")")}function p({rows:t}){return a.createElement(s.a,{size:"small",padding:"none"},a.createElement(l.a,null,t.map(t=>a.createElement(c.a,{key:t[0]},a.createElement(s.b,{key:"0"},a.createElement(f.a,{noWrap:!0},t[0]," multiplier: ")),a.createElement(s.b,{key:"1",style:{textAlign:"right"}},a.createElement(f.a,{noWrap:!0},i.a.formatPercentage(t[1])," ",a.createElement(d,{base:t[1],mult:t[3]}))),a.createElement(h,{r:t[2],m:t[3]})))))}function g(){const t=function(){const t={};for(const e of r.a.queuedAugmentations){const n=o.a[e.name];for(const e of Object.keys(n.mults)){const a=t[e]?t[e]:1;t[e]=a*n.mults[e]}}return t}();function e(){return r.a.canAccessBladeburner()?a.createElement(a.Fragment,null,a.createElement(p,{rows:[["Bladeburner Success Chance",r.a.bladeburner_success_chance_mult,r.a.bladeburner_success_chance_mult*t.bladeburner_success_chance_mult,1],["Bladeburner Max Stamina",r.a.bladeburner_max_stamina_mult,r.a.bladeburner_max_stamina_mult*t.bladeburner_max_stamina_mult,1],["Bladeburner Stamina Gain",r.a.bladeburner_stamina_gain_mult,r.a.bladeburner_stamina_gain_mult*t.bladeburner_stamina_gain_mult,1],["Bladeburner Field Analysis",r.a.bladeburner_analysis_mult,r.a.bladeburner_analysis_mult*t.bladeburner_analysis_mult,1]]}),a.createElement("br",null)):a.createElement(a.Fragment,null)}return a.createElement(a.Fragment,null,a.createElement(f.a,{variant:"h4"},"Multipliers"),a.createElement(u.a,{mx:2},a.createElement(p,{rows:[["Hacking Chance ",r.a.hacking_chance_mult,r.a.hacking_chance_mult*t.hacking_chance_mult,1],["Hacking Speed ",r.a.hacking_speed_mult,r.a.hacking_speed_mult*t.hacking_speed_mult,1],["Hacking Money ",r.a.hacking_money_mult,r.a.hacking_money_mult*t.hacking_money_mult,1],["Hacking Growth ",r.a.hacking_grow_mult,r.a.hacking_grow_mult*t.hacking_grow_mult,1]]}),a.createElement("br",null),a.createElement(p,{rows:[["Hacking Level ",r.a.hacking_mult,r.a.hacking_mult*t.hacking_mult,m.a.HackingLevelMultiplier],["Hacking Experience ",r.a.hacking_exp_mult,r.a.hacking_exp_mult*t.hacking_exp_mult,m.a.HackExpGain]]}),a.createElement("br",null),a.createElement(p,{rows:[["Strength Level ",r.a.strength_mult,r.a.strength_mult*t.strength_mult,m.a.StrengthLevelMultiplier],["Strength Experience ",r.a.strength_exp_mult,r.a.strength_exp_mult*t.strength_exp_mult,1]]}),a.createElement("br",null),a.createElement(p,{rows:[["Defense Level ",r.a.defense_mult,r.a.defense_mult*t.defense_mult,m.a.DefenseLevelMultiplier],["Defense Experience ",r.a.defense_exp_mult,r.a.defense_exp_mult*t.defense_exp_mult,1]]}),a.createElement("br",null),a.createElement(p,{rows:[["Dexterity Level ",r.a.dexterity_mult,r.a.dexterity_mult*t.dexterity_mult,m.a.DexterityLevelMultiplier],["Dexterity Experience ",r.a.dexterity_exp_mult,r.a.dexterity_exp_mult*t.dexterity_exp_mult,1]]}),a.createElement("br",null),a.createElement(p,{rows:[["Agility Level ",r.a.agility_mult,r.a.agility_mult*t.agility_mult,m.a.AgilityLevelMultiplier],["Agility Experience ",r.a.agility_exp_mult,r.a.agility_exp_mult*t.agility_exp_mult,1]]}),a.createElement("br",null),a.createElement(p,{rows:[["Charisma Level ",r.a.charisma_mult,r.a.charisma_mult*t.charisma_mult,m.a.CharismaLevelMultiplier],["Charisma Experience ",r.a.charisma_exp_mult,r.a.charisma_exp_mult*t.charisma_exp_mult,1]]}),a.createElement("br",null),a.createElement(p,{rows:[["Hacknet Node production ",r.a.hacknet_node_money_mult,r.a.hacknet_node_money_mult*t.hacknet_node_money_mult,m.a.HacknetNodeMoney],["Hacknet Node purchase cost ",r.a.hacknet_node_purchase_cost_mult,r.a.hacknet_node_purchase_cost_mult*t.hacknet_node_purchase_cost_mult,1],["Hacknet Node RAM upgrade cost ",r.a.hacknet_node_ram_cost_mult,r.a.hacknet_node_ram_cost_mult*t.hacknet_node_ram_cost_mult,1],["Hacknet Node Core purchase cost ",r.a.hacknet_node_core_cost_mult,r.a.hacknet_node_core_cost_mult*t.hacknet_node_core_cost_mult,1],["Hacknet Node level upgrade cost ",r.a.hacknet_node_level_cost_mult,r.a.hacknet_node_level_cost_mult*t.hacknet_node_level_cost_mult,1]]}),a.createElement("br",null),a.createElement(p,{rows:[["Company reputation gain ",r.a.company_rep_mult,r.a.company_rep_mult*t.company_rep_mult,1],["Faction reputation gain ",r.a.faction_rep_mult,r.a.faction_rep_mult*t.faction_rep_mult,m.a.FactionWorkRepGain],["Salary ",r.a.work_money_mult,r.a.work_money_mult*t.work_money_mult,m.a.CompanyWorkMoney]]}),a.createElement("br",null),a.createElement(p,{rows:[["Crime success ",r.a.crime_success_mult,r.a.crime_success_mult*t.crime_success_mult,1],["Crime money ",r.a.crime_money_mult,r.a.crime_money_mult*t.crime_money_mult,m.a.CrimeMoney]]}),a.createElement("br",null),a.createElement(e,null)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n(57),i=n(15),o=n(2),s=n(595),l=n(286);function c(){const t=[];let e=-1;for(let t=o.a.queuedAugmentations.length-1;t>=0;t--)if(o.a.queuedAugmentations[t].name===i.a.NeuroFluxGovernor){e=t;break}for(let n=0;ne(t=>!t)},r.a.createElement(l.a,{primary:r.a.createElement(f.a,{style:{whiteSpace:"pre-wrap"}},"Source-File -1: Exploits in the BitNodes",r.a.createElement("br",null),"Level ",n.length," / ",Object.keys(o.a).length)}),t?r.a.createElement(g.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(c.a,{m:4},r.a.createElement(f.a,null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),r.a.createElement(f.a,null,"It increases all of the player's multipliers by 0.1%"),r.a.createElement("br",null),r.a.createElement(f.a,null,"You have found the following exploits:"),r.a.createElement(c.a,{mx:2},n.map(t=>r.a.createElement(f.a,{key:t},"* ",Object(o.b)(t)))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n(2),i=n(9),o=n(205),s=n(363),l=n(1086);function c(){const t=r.a.sourceFiles.slice();return i.a.OwnedAugmentationsOrder===o.a.Alphabetically&&t.sort((t,e)=>t.n-e.n),a.createElement(a.Fragment,null,t.map(t=>{const e="SourceFile"+t.n,n=s.a[e];return null==n?(console.error("Invalid source file number: "+t.n),null):a.createElement(l.a,{key:t.n,level:t.lvl,sf:n})}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(330),o=n(107),s=n(21),l=n(1),c=n(65),f=n(211),u=n(75),m=n.n(u),h=n(156),d=n.n(h);function p(t){const[e,n]=Object(a.useState)(!1),u=12===t.sf.n?"∞":"3";return r.a.createElement(s.a,{component:c.a},r.a.createElement(i.a,{onClick:()=>n(t=>!t)},r.a.createElement(o.a,{primary:r.a.createElement(l.a,{style:{whiteSpace:"pre-wrap"}},t.sf.name,r.a.createElement("br",null),`Level ${t.level} / ${u}`)}),e?r.a.createElement(d.a,{color:"primary"}):r.a.createElement(m.a,{color:"primary"})),r.a.createElement(f.a,{in:e,unmountOnExit:!0},r.a.createElement(s.a,{m:4},r.a.createElement(l.a,null,t.sf.info))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return L}));var a=n(236),r=n(15),i=n(0),o=n.n(i),s=n(1088),l=n(1090),c=n(1092),f=n(1093),u=n(1094),m=n(1095),h=n(1096),d=n(1097),p=n(1098),g=n(1099),y=n(1100),b=n(1101),E=n(1102),v=n(1103),k=n(1104),_=n(1105),w=n(1106),S=n(1110),C=n(1),x=n(106);function L(t){return Object(i.useEffect)(()=>{t.player.giveExploit(x.a.YoureNotMeantToAccessThis)},[]),o.a.createElement(o.a.Fragment,null,o.a.createElement(C.a,null,"Development Menu - Only meant to be used for testing/debugging"),o.a.createElement(s.a,{player:t.player,router:t.router}),o.a.createElement(l.a,{player:t.player}),o.a.createElement(c.a,{player:t.player}),o.a.createElement(f.a,{player:t.player}),o.a.createElement(u.a,{player:t.player}),o.a.createElement(m.a,{player:t.player}),o.a.createElement(h.a,null),o.a.createElement(d.a,null),t.player.bladeburner instanceof a.a&&o.a.createElement(p.a,{player:t.player}),t.player.inGang()&&o.a.createElement(g.a,{player:t.player}),t.player.hasCorporation()&&o.a.createElement(y.a,{player:t.player}),o.a.createElement(b.a,null),t.player.hasWseAccount&&o.a.createElement(E.a,null),t.player.sleeves.length>0&&o.a.createElement(v.a,{player:t.player}),t.player.augmentations.some(t=>t.name===r.a.StaneksGift1)&&o.a.createElement(k.a,null),o.a.createElement(_.a,{player:t.player,engine:t.engine}),o.a.createElement(w.a,{player:t.player,engine:t.engine}),o.a.createElement(S.a,{player:t.player,engine:t.engine}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(20);function h(t){const[e,n]=Object(a.useState)(!1);function l(e){return function(){t.player.gainMoney(e,"other")}}return Object(a.useEffect)(()=>{if(e)throw new ReferenceError("Manually thrown error")},[e]),r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"General")),r.a.createElement(s.a,null,r.a.createElement(u.a,{onClick:l(1e6)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e6}))),r.a.createElement(u.a,{onClick:l(1e9)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e9}))),r.a.createElement(u.a,{onClick:l(1e12)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e12}))),r.a.createElement(u.a,{onClick:l(1e15)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e15}))),r.a.createElement(u.a,{onClick:l(1/0)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1/0}))),r.a.createElement(u.a,{onClick:function(){t.player.getHomeComputer().maxRam*=2}},"+ RAM"),r.a.createElement("br",null),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!0,!0)}},"Quick b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!0,!1)}},"Run b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!1,!0)}},"Quick w0rld_d34m0n"),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!1,!1)}},"Hack w0rld_d34m0n"),r.a.createElement(u.a,{onClick:()=>n(!0)},"Throw Error")))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(127);const h=1e27;function d(t){function e(e,n){return function(a){switch(e){case"hacking":a&&t.player.gainHackingExp(a*n);break;case"strength":a&&t.player.gainStrengthExp(a*n);break;case"defense":a&&t.player.gainDefenseExp(a*n);break;case"dexterity":a&&t.player.gainDexterityExp(a*n);break;case"agility":a&&t.player.gainAgilityExp(a*n);break;case"charisma":a&&t.player.gainCharismaExp(a*n);break;case"intelligence":a&&t.player.gainIntelligenceExp(a*n)}t.player.updateSkillLevels()}}function n(e){return function(n){t.player.karma+=n*e}}function a(e){return function(){switch(e){case"hacking":t.player.hacking_exp=0;break;case"strength":t.player.strength_exp=0;break;case"defense":t.player.defense_exp=0;break;case"dexterity":t.player.dexterity_exp=0;break;case"agility":t.player.agility_exp=0;break;case"charisma":t.player.charisma_exp=0;break;case"intelligence":t.player.intelligence_exp=0}t.player.updateSkillLevels()}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Experience / Stats")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.gainHackingExp(h),t.player.gainStrengthExp(h),t.player.gainDefenseExp(h),t.player.gainDexterityExp(h),t.player.gainAgilityExp(h),t.player.gainCharismaExp(h),t.player.gainIntelligenceExp(h),t.player.updateSkillLevels()}},"Tons of exp"),r.a.createElement(u.a,{onClick:function(){t.player.hacking_exp=0,t.player.strength_exp=0,t.player.defense_exp=0,t.player.dexterity_exp=0,t.player.agility_exp=0,t.player.charisma_exp=0,t.player.intelligence_exp=0,t.player.updateSkillLevels()}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Hacking:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"hacking",placeholder:"exp",tons:()=>e("hacking",1)(h),add:e("hacking",1),subtract:e("hacking",-1),reset:a("hacking")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Strength:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"strength",placeholder:"exp",tons:()=>e("strength",1)(h),add:e("strength",1),subtract:e("strength",-1),reset:a("strength")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Defense:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"defense",placeholder:"exp",tons:()=>e("defense",1)(h),add:e("defense",1),subtract:e("defense",-1),reset:a("defense")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Dexterity:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"dexterity",placeholder:"exp",tons:()=>e("dexterity",1)(h),add:e("dexterity",1),subtract:e("dexterity",-1),reset:a("dexterity")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Agility:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"agility",placeholder:"exp",tons:()=>e("agility",1)(h),add:e("agility",1),subtract:e("agility",-1),reset:a("agility")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Charisma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"charisma",placeholder:"exp",tons:()=>e("charisma",1)(h),add:e("charisma",1),subtract:e("charisma",-1),reset:a("charisma")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Intelligence:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"intelligence",placeholder:"exp",tons:()=>e("intelligence",1)(h),add:e("intelligence",1),subtract:e("intelligence",-1),reset:a("intelligence")})),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){0===t.player.intelligence&&(t.player.intelligence=1,t.player.updateSkillLevels())}},"Enable")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.intelligence_exp=0,t.player.intelligence=0,t.player.updateSkillLevels()}},"Disable"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Karma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"karma",placeholder:"amt",tons:()=>e("intelligence",1)(1e5),add:n(1),subtract:n(-1),reset:function(){t.player.karma=0}})))))))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(128),h=n(127),d=n(29),p=n(1451),g=n(79),y=n(114),b=n(599),E=n.n(b),v=n(366),k=n.n(v),_=n(1452),w=n(5);function S(t){const[e,n]=Object(a.useState)(w.a.Illuminati);function l(t){return function(n){const a=d.a[e];null==a||isNaN(n)||(a.playerReputation+=n*t)}}function b(t){return function(n){const a=d.a[e];null==a||isNaN(n)||(a.favor+=n*t)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Factions")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Faction:")),r.a.createElement("td",null,r.a.createElement(p.a,null,r.a.createElement(_.a,{id:"factions-select"},"Faction"),r.a.createElement(m.a,{labelId:"factions-select",id:"factions-dropdown",onChange:function(t){n(t.target.value)},value:e,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{onClick:function(){Object.values(w.a).forEach(e=>t.player.receiveInvite(e))},size:"large","arial-label":"receive-all-invitation"},r.a.createElement(E.a,null)),r.a.createElement(y.a,{onClick:function(){t.player.receiveInvite(e)},size:"large","arial-label":"receive-one-invitation"},r.a.createElement(k.a,null)))},Object.values(d.a).map(t=>r.a.createElement(g.a,{key:t.name,value:t.name},t.name)))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const t=d.a[e];null!=t&&(t.playerReputation=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"favor",placeholder:"amt",tons:()=>b(1)(2e3),add:b(1),subtract:b(-1),reset:function(){const t=d.a[e];null!=t&&(t.favor=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].favor=0}},"Reset")))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(128),u=n(15),m=n(1),h=n(79),d=n(114),p=n(599),g=n.n(p),y=n(366),b=n.n(y),E=n(598),v=n.n(E);function k(t){const[e,n]=Object(a.useState)("Augmented Targeting I");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(m.a,null,"Augmentations")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,null,"Aug:")),r.a.createElement("td",null,r.a.createElement(f.a,{onChange:function(t){n(t.target.value)},value:e,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){for(const e of Object.values(u.a))t.player.queueAugmentation(e)},size:"large"},r.a.createElement(g.a,null)),r.a.createElement(d.a,{onClick:function(){t.player.queueAugmentation(e)},size:"large"},r.a.createElement(b.a,null))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){t.player.augmentations=[]},size:"large"},r.a.createElement(v.a,null)))},Object.values(u.a).map(t=>r.a.createElement(h.a,{key:t,value:t},t)))))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(580),h=n(350);const d=[1,2,3,4,5,6,7,8,9,10,11,12,13];function p(t){function e(e,n){return function(){if(9===e&&(t.player.hacknetNodes=[]),0!==n)if(t.player.sourceFiles.some(t=>t.n===e))for(let a=0;at.n!==e)}}function n(t){return()=>{for(let n=0;nr.a.createElement("tr",{key:"sf-"+t},r.a.createElement("td",null,r.a.createElement(f.a,null,"SF-",t,":")),r.a.createElement("td",null,r.a.createElement(h.a,null,r.a.createElement(u.a,{onClick:e(t,0)},"0"),r.a.createElement(u.a,{onClick:e(t,1)},"1"),r.a.createElement(u.a,{onClick:e(t,2)},"2"),r.a.createElement(u.a,{onClick:e(t,3)},"3")))))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(128),h=n(64),d=n(79);function p(t){const[e,n]=Object(a.useState)("NUKE.exe");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Programs")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Program:")),r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(t){n(t.target.value)},value:e},Object.values(h.a).map(t=>r.a.createElement(d.a,{key:t.name,value:t.name},t.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Add:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.hasProgram(e)||t.player.getHomeComputer().programs.push(e)}},"One"),r.a.createElement(u.a,{onClick:function(){for(const e of Object.keys(h.a))t.player.hasProgram(h.a[e].name)||t.player.getHomeComputer().programs.push(h.a[e].name)}},"All")))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(128),h=n(26),d=n(47),p=n(79);function g(){const[t,e]=Object(a.useState)("home");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Servers")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Server:")),r.a.createElement("td",{colSpan:2},r.a.createElement(m.a,{id:"dev-servers-dropdown",onChange:function(t){e(t.target.value)},value:t},Object(h.c)().map(t=>r.a.createElement(p.a,{key:t.hostname,value:t.hostname},t.hostname))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Root:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.hasAdminRights=!0,e.sshPortOpen=!0,e.ftpPortOpen=!0,e.smtpPortOpen=!0,e.httpPortOpen=!0,e.sqlPortOpen=!0,e.openPortCount=5)}},"Root one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5}}},"Root all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Security:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.hackDifficulty=e.minDifficulty)}},"Min one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.hackDifficulty=t.minDifficulty}}},"Min all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Money:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.moneyAvailable=0)}},"Min one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.moneyAvailable=0}}},"Min all")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.moneyAvailable=e.moneyMax)}},"Max one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.moneyAvailable=t.moneyMax}}},"Max all")))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(128),h=n(66),d=n(79),p=n(127),g=n(5);function y(){const[t,e]=Object(a.useState)(g.a.ECorp);function n(e){return function(n){const a=h.a[t];null==a||isNaN(n)||(a.playerReputation+=n*e)}}function l(e){return function(n){const a=h.a[t];null==a||isNaN(n)||(a.favor+=n*e)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Companies")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Company:")),r.a.createElement("td",{colSpan:3},r.a.createElement(m.a,{id:"dev-companies-dropdown",onChange:function(t){e(t.target.value)},value:t},Object.values(h.a).map(t=>r.a.createElement(d.a,{key:t.name,value:t.name},t.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"reputation",placeholder:"amt",tons:()=>n(1)(1e12),add:n(1),subtract:n(-1),reset:function(){h.a[t].playerReputation=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"favor",placeholder:"amt",tons:()=>l(1)(2e3),add:l(1),subtract:l(-1),reset:function(){h.a[t].favor=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].favor=0}},"Reset")))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(1),o=n(153),s=n(154),l=n(155),c=n(75),f=n.n(c),u=n(127);function m(t){const e=t.player.bladeburner;if(null===e)return r.a.createElement(r.a.Fragment,null);function n(n){return function(a){e&&e.changeRank(t.player,a*n)}}function a(t){return function(n){e&&(e.storedCycles+=n*t)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(f.a,null)},r.a.createElement(i.a,null,"Bladeburner")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Rank:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"rank",placeholder:"amt",tons:function(){e&&e.changeRank(t.player,1e27)},add:n(1),subtract:n(-1),reset:function(){e&&(e.rank=0,e.maxRank=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){e&&(e.storedCycles+=1e27)},add:a(1),subtract:a(-1),reset:function(){e&&(e.storedCycles=0)}})))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(1),o=n(153),s=n(154),l=n(155),c=n(75),f=n.n(c),u=n(127);function m(t){function e(e){return function(n){t.player.gang&&(t.player.gang.storedCycles+=n*e)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(f.a,null)},r.a.createElement(i.a,null,"Gang")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){t.player.gang&&(t.player.gang.storedCycles=1e27)},add:e(1),subtract:e(-1),reset:function(){t.player.gang&&(t.player.gang.storedCycles=0)}})))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(127);function h(t){function e(e){return function(n){t.player.corporation&&(t.player.corporation.funds+=n*e)}}function n(e){return function(n){t.player.corporation&&(t.player.corporation.storedCycles+=n*e)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Corporation")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Funds:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"set funds",placeholder:"amt",tons:function(){t.player.corporation&&(t.player.corporation.funds=t.player.corporation.funds+1e27)},add:e(1),subtract:e(-1),reset:function(){t.player.corporation&&(t.player.corporation.funds=t.player.corporation.funds-t.player.corporation.funds)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){t.player.corporation&&(t.player.corporation.storedCycles=1e27)},add:n(1),subtract:n(-1),reset:function(){t.player.corporation&&(t.player.corporation.storedCycles=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.corporation&&t.player.corporation.divisions.forEach(t=>{Object.keys(t.products).forEach(e=>{const n=t.products[e];if(void 0===n)throw new Error("Impossible product undefined");n.prog=99.9})})}},"Finish products"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.corporation&&t.player.corporation.divisions.forEach(t=>{t.sciResearch.qty+=1e10})}},"Tons of research")))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(128),h=n(79),d=n(373),p=n(111);function g(){const[t,e]=Object(a.useState)("Find Largest Prime Factor");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Coding Contracts")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:d.b},"Generate Random Contract"),r.a.createElement(u.a,{onClick:d.c},"Generate Random Contract on Home Comp"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(t){e(t.target.value)},value:t},Object.values(p.d).map(t=>r.a.createElement(h.a,{key:t.name,value:t.name},t.name))),r.a.createElement(u.a,{onClick:function(){Object(d.a)({problemType:t,server:"home"})}},"Generate Specified Contract Type on Home Comp")))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(81),h=n(20),d=n(16),p=n(101),g=n(148);function y(){const[t,e]=Object(a.useState)(0),[n,l]=Object(a.useState)("");function y(t){const e=n.replace(/\s/g,"");let a=()=>!0;""!==e&&"all"!==e&&(a=function(t){return e.split(",").includes(t)});for(const e of Object.keys(p.a))if(p.a.hasOwnProperty(e)){const n=p.a[e];n instanceof g.a&&a(n.symbol)&&t(n)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Stock Market")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Symbol:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"symbol/'all'",onChange:function(t){l(t.target.value)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Price:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"$$$",onChange:function(t){e(parseFloat(t.target.value))}}),r.a.createElement(u.a,{onClick:function(){isNaN(t)||y(e=>{e.price=t})}},"Set"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Caps:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=[];y(e=>{t.push(r.a.createElement("tr",{key:e.symbol},r.a.createElement("td",null,e.symbol),r.a.createElement("td",{style:{textAlign:"right"}},r.a.createElement(h.a,{money:e.cap}))))}),Object(d.a)(r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("th",null,"Stock"),r.a.createElement("th",null,"Price cap")),t)))}},"View stock caps")))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(10),u=n(1),m=n(127);function h(t){function e(e){for(let n=0;ne(1e7),add:e,subtract:e,reset:()=>e(0)})))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(119),o=n(153),s=n(154),l=n(155),c=n(75),f=n.n(c),u=n(1),m=n(127);function h(){function t(t){return function(e){i.b.storedCycles+=e*t}}function e(t){return function(e){i.b.fragments.forEach(n=>n.avgCharge+=e*t)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(f.a,null)},r.a.createElement(u.a,null,"Stanek's Gift")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){i.b.storedCycles=1e6},add:t(1),subtract:t(-1),reset:function(){i.b.storedCycles=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{label:"all charge",placeholder:"amt",tons:function(){i.b.fragments.forEach(t=>{t.avgCharge=1e21,t.numCharge=1e21})},add:e(1),subtract:e(-1),reset:function(){i.b.fragments.forEach(t=>{t.avgCharge=0,t.numCharge=0})}})))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(108);function h(t){function e(e){return()=>{t.player.lastUpdate-=e,t.engine._lastUpdate-=e,m.c.saveGame(),setTimeout(()=>location.reload(),1e3)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Time skip")),r.a.createElement(s.a,null,r.a.createElement(u.a,{onClick:e(6e4)},"1 minute"),r.a.createElement(u.a,{onClick:e(36e5)},"1 hour"),r.a.createElement(u.a,{onClick:e(864e5)},"1 day")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(10),m=n(350),h=n(23),d=n(1109),p=n.n(d),g=n(1108),y=n.n(g),b=n(295);function E(t){const[e,n]=Object(a.useState)(t.player.achievements.map(t=>t.ID));return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Achievements")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null),r.a.createElement("td",null,r.a.createElement(f.a,null,"Achievements:")),r.a.createElement("td",null,r.a.createElement(m.a,null,r.a.createElement(u.a,{onClick:function(){Object.values(b.a).forEach(e=>t.player.giveAchievement(e.ID)),n(t.player.achievements.map(t=>t.ID))}},"Grant All"),r.a.createElement(u.a,{onClick:function(){t.player.achievements=[],n(t.player.achievements.map(t=>t.ID))}},"Clear"),r.a.createElement(u.a,{onClick:function(){t.engine.Counters.achievementsCounter=Number.MAX_VALUE}},"Disable Engine"),r.a.createElement(u.a,{onClick:function(){t.engine.Counters.achievementsCounter=0}},"Enable Engine")))),Object.values(b.a).map(a=>{const i=e.includes(a.ID);return r.a.createElement("tr",{key:"ach-"+a.ID},r.a.createElement("td",null,i?r.a.createElement(h.a,{title:"Achieved"},r.a.createElement(y.a,{color:"primary"})):r.a.createElement(h.a,{title:"Locked"},r.a.createElement(p.a,{color:"secondary"}))),r.a.createElement("td",null,r.a.createElement(h.a,{title:r.a.createElement(r.a.Fragment,null,a.ID,r.a.createElement("br",null),a.Description)},r.a.createElement(f.a,{color:i?"primary":"secondary"},a.Name,":"))),r.a.createElement("td",null,r.a.createElement(m.a,null,r.a.createElement(u.a,{onClick:()=>{return e=a.ID,t.player.giveAchievement(e),void n(t.player.achievements.map(t=>t.ID));var e}},"Grant"),r.a.createElement(u.a,{onClick:()=>{return e=a.ID,t.player.achievements=t.player.achievements.filter(t=>t.ID!==e),void n(t.player.achievements.map(t=>t.ID));var e}},"Clear"))))})))))}},function(t){t.exports=JSON.parse('{"a":{"CYBERSEC":{"ID":"CYBERSEC","Name":"CyberSec","Description":"Join CyberSec."},"NITESEC":{"ID":"NITESEC","Name":"avmnite-02h","Description":"Join NiteSec."},"THE_BLACK_HAND":{"ID":"THE_BLACK_HAND","Name":"I.I.I.I","Description":"Join The Black Hand."},"BITRUNNERS":{"ID":"BITRUNNERS","Name":"run4theh111z","Description":"Join the BitRunners."},"DAEDALUS":{"ID":"DAEDALUS","Name":"fl1ght.exe","Description":"Join Daedalus."},"THE_COVENANT":{"ID":"THE_COVENANT","Name":"The Covenant","Description":"Join The Covenant."},"ILLUMINATI":{"ID":"ILLUMINATI","Name":"Illuminati","Description":"Join the Illuminati."},"BRUTESSH.EXE":{"ID":"BRUTESSH.EXE","Name":"BruteSSH.exe","Description":"Acquire BruteSSH.exe"},"FTPCRACK.EXE":{"ID":"FTPCRACK.EXE","Name":"FTPCrack.exe","Description":"Acquire FTPCrack.exe"},"RELAYSMTP.EXE":{"ID":"RELAYSMTP.EXE","Name":"relaySMTP.exe","Description":"Acquire relaySMTP.exe"},"HTTPWORM.EXE":{"ID":"HTTPWORM.EXE","Name":"HTTPWorm.exe","Description":"Acquire HTTPWorm.exe"},"SQLINJECT.EXE":{"ID":"SQLINJECT.EXE","Name":"SQLInject.exe","Description":"Acquire SQLInject.exe"},"FORMULAS.EXE":{"ID":"FORMULAS.EXE","Name":"Formulas.exe","Description":"Acquire Formulas.exe"},"SF1.1":{"ID":"SF1.1","Name":"Source Genesis","Description":"Acquire SF1.1"},"SF2.1":{"ID":"SF2.1","Name":"Rise of the Underworld","Description":"Acquire SF2.1"},"SF3.1":{"ID":"SF3.1","Name":"Corporatocracy","Description":"Acquire SF3.1"},"SF4.1":{"ID":"SF4.1","Name":"The Singularity","Description":"Acquire SF4.1"},"SF5.1":{"ID":"SF5.1","Name":"Artificial Intelligence","Description":"Acquire SF5.1"},"SF6.1":{"ID":"SF6.1","Name":"Bladeburners","Description":"Acquire SF6.1"},"SF7.1":{"ID":"SF7.1","Name":"Bladeburners 2079","Description":"Acquire SF7.1"},"SF8.1":{"ID":"SF8.1","Name":"Ghost of Wall Street","Description":"Acquire SF8.1"},"SF9.1":{"ID":"SF9.1","Name":"Hacktocracy","Description":"Acquire SF9.1"},"SF10.1":{"ID":"SF10.1","Name":"Digital Carbon","Description":"Acquire SF10.1"},"SF11.1":{"ID":"SF11.1","Name":"The Big Crash","Description":"Acquire SF11.1"},"SF12.1":{"ID":"SF12.1","Name":"The Recursion","Description":"Acquire SF12.1"},"MONEY_1Q":{"ID":"MONEY_1Q","Name":"Here comes the money!","Description":"Have $1Q on your home computer."},"MONEY_M1B":{"ID":"MONEY_M1B","Name":"Massive debt","Description":"Be $1b in debt."},"INSTALL_1":{"ID":"INSTALL_1","Name":"I never asked for this.","Description":"Install your first augmentation."},"INSTALL_100":{"ID":"INSTALL_100","Name":"I asked for this.","Description":"Have 100 augmentation installed at once."},"QUEUE_40":{"ID":"QUEUE_40","Name":"It\'s time to install","Description":"Have 40 augmentation queued at once."},"HACKING_100000":{"ID":"HACKING_100000","Name":"Power Overwhelming","Description":"Achieve 100 000 hacking skill."},"COMBAT_3000":{"ID":"COMBAT_3000","Name":"One punch man","Description":"Achieve 3000 in all combat stats."},"NEUROFLUX_255":{"ID":"NEUROFLUX_255","Name":"Neuroflux is love, Neuroflux is live","Description":"Install Neuroflux Governor level 255"},"NS2":{"ID":"NS2","Name":"Maximum speed!","Description":"Write an ns2 script."},"FROZE":{"ID":"FROZE","Name":"while(true);","Description":"Restart the game using the reload & kill all option because you froze it with an infinite loop."},"RUNNING_SCRIPTS_1000":{"ID":"RUNNING_SCRIPTS_1000","Name":"Need more real life ram","Description":"Run 1000 scripts simultaneously."},"DRAIN_SERVER":{"ID":"DRAIN_SERVER","Name":"Big trouble","Description":"Drain a server of all its money."},"MAX_RAM":{"ID":"MAX_RAM","Name":"Download more ram","Description":"Maximize your home computer ram."},"MAX_CORES":{"ID":"MAX_CORES","Name":"Download more cores?","Description":"Maximize your home computer cores."},"SCRIPTS_30":{"ID":"SCRIPTS_30","Name":"Thank you folders!","Description":"Have 30 scripts on your home computer."},"KARMA_1000000":{"ID":"KARMA_1000000","Name":"Wretched hive of scum and vilany","Description":"Reach -1m karma."},"STOCK_1q":{"ID":"STOCK_1q","Name":"Wolf of wall street.","Description":"Make 1q on the stock market."},"DISCOUNT":{"ID":"DISCOUNT","Name":"Discount!","Description":"Get a discount at Powerhouse Gym by backdooring their server."},"SCRIPT_32GB":{"ID":"SCRIPT_32GB","Name":"You\'ll need upgrade for this one.","Description":"Write a script that costs 32GB per thread."},"FIRST_HACKNET_NODE":{"ID":"FIRST_HACKNET_NODE","Name":"Free money!","Description":"Purchase your first hacknet node."},"30_HACKNET_NODE":{"ID":"30_HACKNET_NODE","Name":"Big network","Description":"Have 30 hacknet nodes."},"MAX_HACKNET_NODE":{"ID":"MAX_HACKNET_NODE","Name":"That\'s the limit","Description":"Maximize a hacknet node."},"HACKNET_NODE_10M":{"ID":"HACKNET_NODE_10M","Name":"The original hacker","Description":"Make 10m from hacknet nodes."},"REPUTATION_10M":{"ID":"REPUTATION_10M","Name":"Well liked","Description":"Reach 10m reputation with a faction."},"DONATION":{"ID":"DONATION","Name":"Donate!","Description":"Unlock donations with a faction."},"TRAVEL":{"ID":"TRAVEL","Name":"World explorer","Description":"Travel anywhere."},"WORKOUT":{"ID":"WORKOUT","Name":"Gains!","Description":"Workout at a gym."},"TOR":{"ID":"TOR","Name":"The Onion Network","Description":"Purchase the TOR router."},"HOSPITALIZED":{"ID":"HOSPITALIZED","Name":"Ouch!","Description":"Go to the hospital."},"GANG":{"ID":"GANG","Name":"Gangster","Description":"Form a gang."},"FULL_GANG":{"ID":"FULL_GANG","Name":"Don","Description":"Recruit all gang members."},"GANG_TERRITORY":{"ID":"GANG_TERRITORY","Name":"Stay out of my territory","Description":"Have 100% of the territory."},"GANG_MEMBER_POWER":{"ID":"GANG_MEMBER_POWER","Name":"One punch guy","Description":"Have a gang member with 10 000 in 1 skill."},"CORPORATION":{"ID":"CORPORATION","Name":"A small 150b loan.","Description":"Create a corporation."},"CORPORATION_BRIBE":{"ID":"CORPORATION_BRIBE","Name":"Lobbying is great!","Description":"Lower your taxes through lobbying."},"CORPORATION_PROD_1000":{"ID":"CORPORATION_PROD_1000","Name":"Streamlined manufacturing","Description":"Have a division with a production multiplier of 1000."},"CORPORATION_EMPLOYEE_3000":{"ID":"CORPORATION_EMPLOYEE_3000","Name":"Small town","Description":"Have a division with 3000 employee."},"CORPORATION_REAL_ESTATE":{"ID":"CORPORATION_REAL_ESTATE","Name":"Own the land","Description":"Expand to the Real Estate division."},"INTELLIGENCE_255":{"ID":"INTELLIGENCE_255","Name":"Smart!","Description":"Reach intelligence 255"},"BLADEBURNER_DIVISION":{"ID":"BLADEBURNER_DIVISION","Name":"Bladeburners","Description":"Join the Bladeburner division."},"BLADEBURNER_OVERCLOCK":{"ID":"BLADEBURNER_OVERCLOCK","Name":"Overclock!","Description":"Reach maximum level of Overclock"},"BLADEBURNER_UNSPENT_100000":{"ID":"BLADEBURNER_UNSPENT_100000","Name":"You should really spent those.","Description":"Have 100 000 unspent bladeburner skill points."},"4S":{"ID":"4S","Name":"4S","Description":"Purchase the 4S market data."},"FIRST_HACKNET_SERVER":{"ID":"FIRST_HACKNET_SERVER","Name":"The improved hacker.","Description":"Purchase your first hacknet server."},"ALL_HACKNET_SERVER":{"ID":"ALL_HACKNET_SERVER","Name":"Full network","Description":"Buy all hacknet servers."},"MAX_HACKNET_SERVER":{"ID":"MAX_HACKNET_SERVER","Name":"That\'s the new limit.","Description":"Maximize a hacknet server."},"HACKNET_SERVER_1B":{"ID":"HACKNET_SERVER_1B","Name":"Not passive anymore","Description":"Make $1b with hacknet servers."},"MAX_CACHE":{"ID":"MAX_CACHE","Name":"What a waste.","Description":"Cap your hashes."},"SLEEVE_8":{"ID":"SLEEVE_8","Name":"You and what army?","Description":"Purchase all duplicate sleeves from The Covenant."},"INDECISIVE":{"ID":"INDECISIVE","Name":"Too many options.","Description":"Spend 1h straight on the bitverse."},"FAST_BN":{"ID":"FAST_BN","Name":"Speed demon.","Description":"Destroy a bitnode in under 2 days."},"CHALLENGE_BN1":{"ID":"CHALLENGE_BN1","Name":"BN1: Challenge","Description":"Destroy BN1 with at most 128GB and 1 core."},"CHALLENGE_BN2":{"ID":"CHALLENGE_BN2","Name":"BN2: Challenge","Description":"Destroy BN2 without forming a gang."},"CHALLENGE_BN3":{"ID":"CHALLENGE_BN3","Name":"BN3: Challenge","Description":"Destroy BN3 without creating corporation."},"CHALLENGE_BN6":{"ID":"CHALLENGE_BN6","Name":"BN6: Challenge","Description":"Destroy BN6 without joining the bladeburner division."},"CHALLENGE_BN7":{"ID":"CHALLENGE_BN7","Name":"BN7: Challenge","Description":"Destroy BN7 without joining the bladeburner division."},"CHALLENGE_BN8":{"ID":"CHALLENGE_BN8","Name":"BN8: Challenge","Description":"Destroy BN8 without purchasing the 4s market data."},"CHALLENGE_BN9":{"ID":"CHALLENGE_BN9","Name":"BN9: Challenge","Description":"Destroy BN9 without using hacknet servers."},"CHALLENGE_BN10":{"ID":"CHALLENGE_BN10","Name":"BN10: Challenge","Description":"Destroy BN10 without using sleeves."},"CHALLENGE_BN12":{"ID":"CHALLENGE_BN12","Name":"BN12: Challenge","Description":"Destroy BN12 50 times."},"BYPASS":{"ID":"BYPASS","Name":"Exploit: bypass","Description":"Circumventing the ram cost of document."},"PROTOTYPETAMPERING":{"ID":"PROTOTYPETAMPERING","Name":"Exploit: prototype tampering","Description":"Tamper with the Numbers prototype."},"UNCLICKABLE":{"ID":"UNCLICKABLE","Name":"Exploit: unclickable","Description":"Click the unclickable."},"UNDOCUMENTEDFUNCTIONCALL":{"ID":"UNDOCUMENTEDFUNCTIONCALL","Name":"Exploit: undocumented","Description":"Call the undocumented function."},"TIMECOMPRESSION":{"ID":"TIMECOMPRESSION","Name":"Exploit: time compression","Description":"Compress time."},"REALITYALTERATION":{"ID":"REALITYALTERATION","Name":"Exploit: reality alteration","Description":"Alter reality."},"N00DLES":{"ID":"N00DLES","Name":"Exploit: noodles","Description":"Harness the power of the noodles."},"EDITSAVEFILE":{"ID":"EDITSAVEFILE","Name":"Exploit: edit","Description":"Acquire the EditSaveFile Source-File -1"},"UNACHIEVABLE":{"ID":"UNACHIEVABLE","Name":"UNACHIEVABLE","Description":"This achievement cannot be unlocked."},"CHALLENGE_BN13":{"ID":"CHALLENGE_BN13","Name":"BN13: Challenge","Description":"Complete BN13 without Stanek\'s Gift."},"DEVMENU":{"ID":"DEVMENU","Name":"Exploit: you\'re not meant to access this","Description":"Open the dev menu."},"RAINBOW":{"ID":"RAINBOW","Name":"Exploit: rainbow","Description":"Make good use of the rainbow."},"TRUE_RECURSION":{"ID":"TRUE_RECURSION","Name":"Exploit: true recursion","Description":"Beat BN1 in megabyteburner 2000."}}}')},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(153),o=n(154),s=n(155),l=n(75),c=n.n(l),f=n(1),u=n(127);function m(t){return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Entropy")),r.a.createElement(s.a,null,r.a.createElement(u.a,{label:"Set entropy",placeholder:"entropy",add:e=>{t.player.entropy+=e,t.player.applyEntropy(t.player.entropy)},subtract:e=>{t.player.entropy-=e,t.player.applyEntropy(t.player.entropy)},tons:()=>{t.player.entropy+=1e12,t.player.applyEntropy(t.player.entropy)},reset:()=>{t.player.entropy=0,t.player.applyEntropy(t.player.entropy)}})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(1112),o=n(1114),s=n(1115),l=n(30),c=n(21);function f(){const t=l.b.Player(),e=l.b.Router(),n=Object(a.useState)(!1)[1];function f(){n(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(f,200);return()=>clearInterval(t)},[]);const u=t.bladeburner;return null===u?r.a.createElement(r.a.Fragment,null):r.a.createElement(c.a,{display:"flex",flexDirection:"column"},r.a.createElement(c.a,{sx:{display:"grid",gridTemplateColumns:"4fr 8fr",p:1}},r.a.createElement(i.a,{bladeburner:u,player:t,router:e}),r.a.createElement(o.a,{bladeburner:u,player:t})),r.a.createElement(s.a,{bladeburner:u,player:t}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return b}));var a=n(0),r=n.n(a),i=n(24),o=n(61),s=n(20),l=n(4),c=n(29),f=n(105),u=n(1113),m=n(1),h=n(23),d=n(21),p=n(10),g=n(65),y=n(5);function b(t){const[e,n]=Object(a.useState)(!1),b=Object(a.useState)(!1)[1],E=t.bladeburner.rank>=o.a.RankNeededForFaction;return Object(a.useEffect)(()=>{const t=setInterval(()=>b(t=>!t),1e3);return()=>clearInterval(t)},[]),r.a.createElement(g.a,{sx:{p:1,overflowY:"auto",overflowX:"hidden",wordBreak:"break-all"}},r.a.createElement(d.a,{sx:{display:"flex",flexDirection:"column",gap:1,maxHeight:"60vh"}},r.a.createElement(d.a,{sx:{alignSelf:"flex-start",width:"100%"}},r.a.createElement(p.a,{onClick:()=>n(!0),sx:{width:"50%"}},"Travel"),r.a.createElement(h.a,{title:E?"":r.a.createElement(m.a,null,"Rank 25 required.")},r.a.createElement("span",null,r.a.createElement(p.a,{disabled:!E,onClick:function(){if(!E)return;const e=c.a[y.a.Bladeburners];e.isMember||Object(f.e)(e),t.router.toFaction(e)},sx:{width:"50%"}},"Faction"))),r.a.createElement(u.a,{open:e,onClose:()=>n(!1),bladeburner:t.bladeburner})),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"Your rank within the Bladeburner division.")},r.a.createElement(m.a,null,"Rank: ",Object(i.d)(t.bladeburner.rank,2)))),r.a.createElement("br",null),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"Performing actions will use up your stamina.",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina is determined primarily by your agility stat.",r.a.createElement("br",null),r.a.createElement("br",null),"Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.",r.a.createElement("br",null),r.a.createElement("br",null),"Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")},r.a.createElement(m.a,null,"Stamina: ",Object(i.d)(t.bladeburner.stamina,3)," / ",Object(i.d)(t.bladeburner.maxStamina,3)))),r.a.createElement("br",null),r.a.createElement(m.a,null,"Stamina Penalty: ",Object(i.d)(100*(1-t.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement(m.a,null,"Team Size: ",Object(i.d)(t.bladeburner.teamSize,0)),r.a.createElement(m.a,null,"Team Members Lost: ",Object(i.d)(t.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement(m.a,null,"Num Times Hospitalized: ",t.bladeburner.numHosp),r.a.createElement(m.a,null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:t.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement(m.a,null,"Current City: ",t.bladeburner.city),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate population count increases success rate estimates.")},r.a.createElement(m.a,null,"Est. Synthoid Population: ",l.a.formatPopulation(t.bladeburner.getCurrentCity().popEst)))),r.a.createElement("br",null),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")},r.a.createElement(m.a,null,"Synthoid Communities: ",Object(i.d)(t.bladeburner.getCurrentCity().comms,0)))),r.a.createElement("br",null),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")},r.a.createElement(m.a,null,"City Chaos: ",Object(i.d)(t.bladeburner.getCurrentCity().chaos)))),r.a.createElement("br",null),t.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3>15e3&&r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")},r.a.createElement(m.a,null,"Bonus time:"," ",Object(i.b)(t.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3)))),r.a.createElement("br",null)),r.a.createElement(m.a,null,"Skill Points: ",Object(i.d)(t.bladeburner.skillPoints,0)),r.a.createElement("br",null),r.a.createElement(m.a,null,"Aug. Success Chance mult: ",Object(i.d)(100*t.player.bladeburner_success_chance_mult,1),"%",r.a.createElement("br",null),"Aug. Max Stamina mult: ",Object(i.d)(100*t.player.bladeburner_max_stamina_mult,1),"%",r.a.createElement("br",null),"Aug. Stamina Gain mult: ",Object(i.d)(100*t.player.bladeburner_stamina_gain_mult,1),"%",r.a.createElement("br",null),"Aug. Field Analysis mult: ",Object(i.d)(100*t.player.bladeburner_analysis_mult,1),"%")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(450),o=n(41),s=n(17),l=n(9),c=n(1),f=n(10);function u(t){function e(e){t.bladeburner.city=e,t.onClose()}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,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."),l.a.DisableASCIIArt?Object.values(s.a).map(t=>r.a.createElement(f.a,{key:t,onClick:()=>e(t)},t)):r.a.createElement(i.a,{currentCity:t.bladeburner.city,onTravel:t=>e(t)})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(28),o=n(65),s=n(286),l=n(74),c=n(21),f=n(1),u=n(81),m=n(113),h=n(137);const d=Object(m.a)(t=>Object(h.a)({textfield:{margin:t.spacing(0),width:"100%"},input:{backgroundColor:t.colors.backgroundsecondary},nopadding:{padding:t.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:t.spacing(0)},list:{padding:t.spacing(0),height:"100%"}}));function p(t){return r.a.createElement(l.a,{sx:{p:0}},r.a.createElement(f.a,null,t.content))}function g(t){const e=d(),[n,s]=Object(a.useState)(""),l=Object(a.useState)(!1)[1],m=Object(a.useRef)(null);const[h,p]=Object(a.useState)(t.bladeburner.consoleHistory.length);function g(){l(t=>!t)}return Object(a.useEffect)(()=>{const t=setInterval(g,1e3);return()=>{clearInterval(t)}},[]),r.a.createElement(o.a,{sx:{p:1}},r.a.createElement(c.a,{sx:{height:"60vh",paddingBottom:"8px",display:"flex",alignItems:"stretch",whiteSpace:"pre-wrap"},onClick:function(){m.current&&m.current.focus()}},r.a.createElement(c.a,null,r.a.createElement(y,{entries:[...t.bladeburner.consoleLogs]}))),r.a.createElement(u.a,{classes:{root:e.textfield},autoFocus:!0,tabIndex:1,type:"text",inputRef:m,value:n,onChange:function(t){s(t.target.value)},onKeyDown:function(e){e.key===i.a.ENTER&&(e.preventDefault(),n.length>0&&(t.bladeburner.postToConsole("> "+n),t.bladeburner.executeConsoleCommands(t.player,n),p(t.bladeburner.consoleHistory.length),s("")));const a=t.bladeburner.consoleHistory;if(e.key===i.a.UP_ARROW){let t=h;const n=a.length;if(0===n)return;(t<0||t>n)&&p(n),0!==t&&(t-=1),p(t);const r=a[t];e.currentTarget.value=r,s(r)}if(e.key===i.a.DOWN_ARROW){const t=h,n=a.length;if(0==n)return;if((t<0||t>n)&&p(n),t==n||t==n-1)p(n),e.currentTarget.value="";else{p(h+1);const t=a[h+1];e.currentTarget.value=t,s(t)}}},InputProps:{className:e.input,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"> ")),spellCheck:!1}}))}function y({entries:t}){const e=Object(a.useRef)(null);return Object(a.useEffect)(()=>{e.current&&(e.current.scrollTop=e.current.scrollHeight)},[t.length]),r.a.createElement(s.a,{sx:{height:"100%",overflow:"auto",p:1},ref:e},t&&t.map((t,e)=>r.a.createElement(p,{key:e,content:t})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(1116),o=n(1120),s=n(1128),l=n(1133),c=n(1137),f=n(536),u=n(248),m=n(21);function h(t){const[e,n]=r.a.useState(0);return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"fullWidth",value:e,onChange:function(t,e){n(e)}},r.a.createElement(u.a,{label:"General"}),r.a.createElement(u.a,{label:"Contracts"}),r.a.createElement(u.a,{label:"Operations"}),r.a.createElement(u.a,{label:"BlackOps"}),r.a.createElement(u.a,{label:"Skills"})),r.a.createElement(m.a,{sx:{p:1}},0===e&&r.a.createElement(i.a,{bladeburner:t.bladeburner,player:t.player}),1===e&&r.a.createElement(o.a,{bladeburner:t.bladeburner,player:t.player}),2===e&&r.a.createElement(s.a,{bladeburner:t.bladeburner,player:t.player}),3===e&&r.a.createElement(l.a,{bladeburner:t.bladeburner,player:t.player}),4===e&&r.a.createElement(c.a,{bladeburner:t.bladeburner})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n(1117),i=n(1);function o(t){return a.createElement(a.Fragment,null,a.createElement(i.a,null,"These are generic actions that will assist you in your Bladeburner duties."),a.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(1118),o=n(257);function s(t){const e=[];for(const t of Object.keys(o.a))o.a.hasOwnProperty(t)&&e.push(o.a[t]);return r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(i.a,{key:e.name,bladeburner:t.bladeburner,action:e,player:t.player})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(42),o=n(192),s=n(24),l=n(1119),c=n(174),f=n(367),u=n(1),m=n(21),h=n(65);function d(t){const e=Object(a.useState)(!1)[1];const n=t.action.name===t.bladeburner.action.name,d=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),p=function(){switch(t.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":case"Incite Violence":return 60;case"Recruitment":return t.bladeburner.getRecruitmentTime(t.player)}return-1}(),g="Recruitment"===t.action.name?Math.max(0,Math.min(t.bladeburner.getRecruitmentSuccessChance(t.player),1)):-1,y=l.a[t.action.name];if(void 0===y)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(h.a,{sx:{my:1,p:1}},n?r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{value:t.action.name}),r.a.createElement(u.a,null,"(IN PROGRESS - ",Object(s.d)(d,0)," /"," ",Object(s.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(u.a,null,Object(o.a)({progress:d/t.bladeburner.actionTimeToComplete}))):r.a.createElement(m.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{value:t.action.name}),r.a.createElement(f.a,{bladeburner:t.bladeburner,type:i.a[t.action.name],name:t.action.name,rerender:function(){e(t=>!t)}})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,null,y.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,null,"Time Required: ",Object(s.b)(1e3*p),-1!==g&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),"Estimated success chance: ",Object(s.d)(100*g,1),"%")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(0),r=n.n(a);const i={Training:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Field Analysis":{desc:r.a.createElement(r.a.Fragment,null,"Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Recruitment:{desc:r.a.createElement(r.a.Fragment,null,"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Diplomacy:{desc:r.a.createElement(r.a.Fragment,null,"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},"Hyperbolic Regeneration Chamber":{desc:r.a.createElement(r.a.Fragment,null,"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.",r.a.createElement("br",null),r.a.createElement("br",null))},"Incite Violence":{desc:r.a.createElement(r.a.Fragment,null,"Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate additional contracts and operations, at the cost of increased Chaos.")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n(1121),i=n(1);function o(t){return a.createElement(a.Fragment,null,a.createElement(i.a,null,"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",a.createElement("br",null),a.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),a.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(1122);function o(t){const e=Object.keys(t.bladeburner.contracts),n=t.bladeburner.contracts;return r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(i.a,{key:e,bladeburner:t.bladeburner,action:n[e],player:t.player})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(42),o=n(192),s=n(24),l=n(1123),c=n(451),f=n(174),u=n(601),m=n(604),h=n(367),d=n(1),p=n(65);function g(t){const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}const g=t.bladeburner.action.type===i.a.Contract&&t.action.name===t.bladeburner.action.name,y=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),b=t.action.getActionTime(t.bladeburner),E=l.a[t.action.name];if(void 0===E)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(p.a,{sx:{my:1,p:1}},g?r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,null,r.a.createElement(f.a,{value:t.action.name})," (IN PROGRESS - ",Object(s.d)(y,0)," /"," ",Object(s.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(d.a,null,Object(o.a)({progress:y/t.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{value:t.action.name}),r.a.createElement(h.a,{bladeburner:t.bladeburner,type:i.a.Contract,name:t.action.name,rerender:n})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{action:t.action,bladeburner:t.bladeburner,isActive:g,rerender:n}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(d.a,null,E.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:t.action,bladeburner:t.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*b),r.a.createElement("br",null),"Contracts remaining: ",Math.floor(t.action.count),r.a.createElement("br",null),"Successes: ",t.action.successes,r.a.createElement("br",null),"Failures: ",t.action.failures),r.a.createElement("br",null),r.a.createElement(m.a,{rerender:n,action:t.action}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(0),r=n.n(a);const i={Tracking:{desc:r.a.createElement(r.a.Fragment,null,"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.")},"Bounty Hunter":{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.")},Retirement:{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and retire (kill) rogue Synthoids.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Retirement contract will lower the population in your current city, and will also increase its chaos level.")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(600),o=n(1),s=n(23);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves stealth")},i.b)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(600),o=n(1),s=n(23);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves retirement")},i.a)}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n(1129),i=n(1);function o(t){return a.createElement(a.Fragment,null,a.createElement(i.a,null,"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",a.createElement("br",null),a.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",a.createElement("br",null),a.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improve your chances of success.",a.createElement("br",null),a.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),a.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(1130);function o(t){const e=Object.keys(t.bladeburner.operations),n=t.bladeburner.operations;return r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(i.a,{key:e,bladeburner:t.bladeburner,action:n[e],player:t.player})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(42),o=n(192),s=n(24),l=n(451),c=n(601),f=n(604),u=n(367),m=n(605),h=n(1132),d=n(174),p=n(1),g=n(65);function y(t){const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}const y=t.bladeburner.action.type===i.a.Operation&&t.action.name===t.bladeburner.action.name,b=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),E=t.action.getActionTime(t.bladeburner),v=h.a[t.action.name];if(void 0===v)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(g.a,{sx:{my:1,p:1}},y?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{value:t.action.name})," (IN PROGRESS - ",Object(s.d)(b,0)," /"," ",Object(s.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(p.a,null,Object(o.a)({progress:b/t.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{value:t.action.name}),r.a.createElement(u.a,{bladeburner:t.bladeburner,type:i.a.Operation,name:t.action.name,rerender:n}),r.a.createElement(m.a,{action:t.action,bladeburner:t.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:t.action,bladeburner:t.bladeburner,isActive:y,rerender:n}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,null,v.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{action:t.action,bladeburner:t.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*E),r.a.createElement("br",null),"Operations remaining: ",Math.floor(t.action.count),r.a.createElement("br",null),"Successes: ",t.action.successes,r.a.createElement("br",null),"Failures: ",t.action.failures),r.a.createElement("br",null),r.a.createElement(f.a,{rerender:n,action:t.action}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(16),o=n(41),s=n(1),l=n(10),c=n(81);function f(t){const[e,n]=Object(a.useState)();return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,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."),r.a.createElement(c.a,{autoFocus:!0,type:"number",placeholder:"Team size",value:e,onChange:function(e){const a=parseFloat(e.target.value);a>t.bladeburner.teamSize?n(t.bladeburner.teamSize):n(a)}}),r.a.createElement(l.a,{sx:{mx:2},onClick:function(){if(void 0===e)return;const n=Math.round(e);isNaN(n)||n<0?Object(i.a)("Invalid value entered for number of Team Members (must be numeric, positive)"):t.action.teamCount=n,t.onClose()}},"Confirm"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(0),r=n.n(a);const i={Investigation:{desc:r.a.createElement(r.a.Fragment,null,"As a field agent, investigate and identify Synthoid populations, movements, and operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Investigation ops will increase the accuracy of your synthoid data.",r.a.createElement("br",null),r.a.createElement("br",null),"You will NOT lose HP from failed Investigation ops.")},"Undercover Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Undercover ops will increase the accuracy of your synthoid data.")},"Sting Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.")},Raid:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Stealth Retirement Operation":{desc:r.a.createElement(r.a.Fragment,null,"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.")},Assassination:{desc:r.a.createElement(r.a.Fragment,null,"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n(1134),i=n(1),o=n(5);function s(t){return a.createElement(a.Fragment,null,a.createElement(i.a,null,"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",a.createElement("br",null),a.createElement("br",null),a.createElement("b",null,"Your ultimate goal to climb through the ranks of ",o.a.Bladeburners," is to complete all of the Black Ops."),a.createElement("br",null),a.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),a.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(269),o=n(1135);function s(t){let e=[];for(const t of Object.keys(i.a))i.a.hasOwnProperty(t)&&e.push(i.a[t]);return e.sort((function(t,e){return t.reqdRank-e.reqdRank})),e=e.filter((n,a)=>!(null==t.bladeburner.blackops[e[a].name]&&0!==a&&null==t.bladeburner.blackops[e[a-1].name])),e=e.reverse(),r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(o.a,{key:e.name,bladeburner:t.bladeburner,action:e,player:t.player})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(24),o=n(42),s=n(192),l=n(605),c=n(1136),f=n(174),u=n(451),m=n(367),h=n(1),d=n(65);function p(t){const e=Object(a.useState)(!1)[1];if(null!=t.bladeburner.blackops[t.action.name])return r.a.createElement(d.a,{sx:{my:1,p:1}},r.a.createElement(h.a,null,t.action.name," (COMPLETED)"));const n=t.bladeburner.action.type===o.a.BlackOperation&&t.action.name===t.bladeburner.action.name,p=t.action.getActionTime(t.bladeburner),g=t.bladeburner.rank>=t.action.reqdRank,y=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),b=c.a[t.action.name];if(void 0===b)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(d.a,{sx:{my:1,p:1}},n?r.a.createElement(r.a.Fragment,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{value:t.action.name}),r.a.createElement(h.a,null,"(IN PROGRESS - ",Object(i.d)(y,0)," /"," ",Object(i.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(h.a,null,Object(s.a)({progress:y/t.bladeburner.actionTimeToComplete})))):r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{value:t.action.name}),r.a.createElement(m.a,{bladeburner:t.bladeburner,type:o.a.BlackOperation,name:t.action.name,rerender:function(){e(t=>!t)}}),r.a.createElement(l.a,{action:t.action,bladeburner:t.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(h.a,null,b.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(h.a,{color:g?"primary":"error"},"Required Rank: ",Object(i.d)(t.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement(h.a,null,r.a.createElement(u.a,{action:t.action,bladeburner:t.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(i.b)(1e3*p)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(5),o=n(17),s=n(59);const l={[s.a.OperationTyphoon]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"The goal of ",s.a.OperationTyphoon," 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.")},[s.a.OperationZero]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"The goal of ",s.a.OperationZero," 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.")},[s.a.OperationX]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in ",o.a.Ishima,"'s underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.")},[s.a.OperationTitan]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your goal is to enter and destroy the Bioengineering department's facility in ",o.a.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.")},[s.a.OperationAres]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to intercept the deal. Leave no survivors.")},[s.a.OperationArchangel]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},[s.a.OperationJuggernaut]:{desc:r.a.createElement(r.a.Fragment,null,"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 ",o.a.Sector12,". We also have reason to believe they 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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your mission is to eradicate Juggernaut and his followers.")},[s.a.OperationRedDragon]:{desc:r.a.createElement(r.a.Fragment,null,"The ",i.a.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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to infiltrate and destroy the ",i.a.Tetrads,"' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.")},[s.a.OperationK]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"We do not have the power or jurisdiction to shut 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.")},[s.a.OperationDeckard]:{desc:r.a.createElement(r.a.Fragment,null,"Despite your success in eliminating VitaLife's new android-replicating technology in ",s.a.OperationK,", 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.",r.a.createElement("br",null),r.a.createElement("br",null),"The goal of ",s.a.OperationDeckard," is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.")},[s.a.OperationTyrell]:{desc:r.a.createElement(r.a.Fragment,null,"A week ago ",i.a.BladeIndustries," reported a small break-in at one of their ",o.a.Aevum," Augmentation storage facilities. We figured out that ",i.a.TheDarkArmy," 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.",r.a.createElement("br",null),r.a.createElement("br",null),"We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down associated ",i.a.TheDarkArmy," members and eliminate them.")},[s.a.OperationWallace]:{desc:r.a.createElement(r.a.Fragment,null,"Based on information gathered from ",s.a.OperationTyrell,", we've discovered that ",i.a.TheDarkArmy," was well aware that there were Synthoids amongst their ranks. Even worse, we believe that ",i.a.TheDarkArmy," is working together with other criminal organizations such as ",i.a.TheSyndicate," and that they are planning some sort of large-scale takeover of multiple major cities, most notably ",o.a.Aevum,". We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.",r.a.createElement("br",null),r.a.createElement("br",null),"The best way to deal with this is to prevent it before it even happens. The goal of ",s.a.OperationWallace," is to destroy ",i.a.TheDarkArmy," and Syndicate factions in ",o.a.Aevum," immediately. Leave no survivors.")},[s.a.OperationShoulderOfOrion]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},[s.a.OperationHyron]:{desc:r.a.createElement(r.a.Fragment,null,"Our intelligence tells us that ",i.a.FulcrumSecretTechnologies," 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.",r.a.createElement("br",null),r.a.createElement("br",null),"I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.",r.a.createElement("br",null),r.a.createElement("br",null),"The research for this project is being conducted at one of ",i.a.FulcrumSecretTechnologies," secret facilities in ",o.a.Aevum,", codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.")},[s.a.OperationMorpheus]:{desc:r.a.createElement(r.a.Fragment,null,"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in ",o.a.Chongqing,", 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.",r.a.createElement("br",null),r.a.createElement("br",null),"The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.")},[s.a.OperationIonStorm]:{desc:r.a.createElement(r.a.Fragment,null,"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the ",o.a.Sector12," 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.",r.a.createElement("br",null),r.a.createElement("br",null),"This is a full-scale assault operation to find and retire all of these Synthoids in the ",o.a.Sector12," Slums.")},[s.a.OperationAnnihilus]:{desc:r.a.createElement(r.a.Fragment,null,"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in ",o.a.Aevum,". They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called '",i.a.TheCovenant,"'. We have no prior intelligence about this organization, so you are going in blind.")},[s.a.OperationUltron]:{desc:r.a.createElement(r.a.Fragment,null,i.a.OmniTekIncorporated,", 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.",r.a.createElement("br",null),r.a.createElement("br",null),i.a.OmniTekIncorporated," 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 ",o.a.Volhaven," to form a terrorist group called Ultron.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to find and destroy Ultron.")},[s.a.OperationCenturion]:{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"It seems that the universe is not without a sense of irony.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},[s.a.OperationVindictus]:{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},[s.a.OperationDaedalus]:{desc:r.a.createElement(r.a.Fragment,null," Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(1138),o=n(61),s=n(24),l=n(1);function c(t){const e=Object(a.useState)(!1)[1],n=t.bladeburner.skillMultipliers;function c(t){return t&&1!==t}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,r.a.createElement("strong",null,"Skill Points: ",Object(s.d)(t.bladeburner.skillPoints,0))),r.a.createElement(l.a,null,"You will gain one skill point every ",o.a.RanksPerSkillPoint," ranks.",r.a.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative."),c(n.successChanceAll)&&r.a.createElement(l.a,null,"Total Success Chance: x",Object(s.d)(n.successChanceAll,3)),c(n.successChanceStealth)&&r.a.createElement(l.a,null,"Stealth Success Chance: x",Object(s.d)(n.successChanceStealth,3)),c(n.successChanceKill)&&r.a.createElement(l.a,null,"Retirement Success Chance: x",Object(s.d)(n.successChanceKill,3)),c(n.successChanceContract)&&r.a.createElement(l.a,null,"Contract Success Chance: x",Object(s.d)(n.successChanceContract,3)),c(n.successChanceOperation)&&r.a.createElement(l.a,null,"Operation Success Chance: x",Object(s.d)(n.successChanceOperation,3)),c(n.successChanceEstimate)&&r.a.createElement(l.a,null,"Synthoid Data Estimate: x",Object(s.d)(n.successChanceEstimate,3)),c(n.actionTime)&&r.a.createElement(l.a,null,"Action Time: x",Object(s.d)(n.actionTime,3)),c(n.effHack)&&r.a.createElement(l.a,null,"Hacking Skill: x",Object(s.d)(n.effHack,3)),c(n.effStr)&&r.a.createElement(l.a,null,"Strength: x",Object(s.d)(n.effStr,3)),c(n.effDef)&&r.a.createElement(l.a,null,"Defense: x",Object(s.d)(n.effDef,3)),c(n.effDex)&&r.a.createElement(l.a,null,"Dexterity: x",Object(s.d)(n.effDex,3)),c(n.effAgi)&&r.a.createElement(l.a,null,"Agility: x",Object(s.d)(n.effAgi,3)),c(n.effCha)&&r.a.createElement(l.a,null,"Charisma: x",Object(s.d)(n.effCha,3)),c(n.effInt)&&r.a.createElement(l.a,null,"Intelligence: x",Object(s.d)(n.effInt,3)),c(n.stamina)&&r.a.createElement(l.a,null,"Stamina: x",Object(s.d)(n.stamina,3)),c(n.money)&&r.a.createElement(l.a,null,"Contract Money: x",Object(s.d)(n.money,3)),c(n.expGain)&&r.a.createElement(l.a,null,"Exp Gain: x",Object(s.d)(n.expGain,3)),r.a.createElement(i.a,{bladeburner:t.bladeburner,onUpgrade:()=>e(t=>!t)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n(1139),i=n(224);function o(t){return a.createElement(a.Fragment,null,Object.keys(i.a).map(e=>a.createElement(r.a,{key:e,bladeburner:t.bladeburner,skill:i.a[e],onUpgrade:t.onUpgrade})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(174),o=n(24),s=n(1),l=n(114),c=n(21),f=n(65),u=n(597),m=n.n(u),h=n(515),d=n.n(h);function p(t){const e=t.skill.name;let n=0;t.bladeburner.skills[e]&&!isNaN(t.bladeburner.skills[e])&&(n=t.bladeburner.skills[e]);const a=t.skill.calculateCost(n),u=t.bladeburner.skillPoints>=a,h=!!t.skill.maxLvl&&n>=t.skill.maxLvl;return r.a.createElement(f.a,{sx:{my:1,p:1}},r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(i.a,{variant:"h6",color:"primary",value:t.skill.name}),!u||h?r.a.createElement(l.a,{disabled:!0},r.a.createElement(d.a,null)):r.a.createElement(l.a,{onClick:function(){t.bladeburner.skillPoints{const t=setInterval(()=>h(t=>!t),200);return()=>clearInterval(t)},[]),r.a.createElement(c.a.Gang.Provider,{value:e},r.a.createElement(f.a,{variant:"fullWidth",value:n,onChange:function(t,e){m(e)},sx:{minWidth:"fit-content",maxWidth:"45%"}},r.a.createElement(u.a,{label:"Management"}),r.a.createElement(u.a,{label:"Equipment"}),r.a.createElement(u.a,{label:"Territory"})),0===n&&r.a.createElement(i.a,null),1===n&&r.a.createElement(s.a,null),2===n&&r.a.createElement(o.a,null))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(1144),o=n(1146),s=n(139),l=n(1);function c(){const t=Object(s.b)();return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"This page is used to manage your gang members and get an overview of your gang's stats.",r.a.createElement("br",null),r.a.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",t.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.a.createElement("br",null),r.a.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.a.createElement("br",null),r.a.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.a.createElement("br",null),r.a.createElement(i.a,null),r.a.createElement("br",null),r.a.createElement(o.a,null))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(29),o=n(24),s=n(4),l=n(110),c=n(116),f=n(80),u=n(1145),m=n(139),h=n(1),d=n(23),p=n(21);function g(){const t=Object(m.b)(),e=100*f.a[t.facName].territory;let n;return n=e<=0?Object(o.d)(0,2):e>=100?Object(o.d)(100,2):Object(o.d)(e,2),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"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.")},r.a.createElement(h.a,null,"Respect: ",s.a.formatRespect(t.respect)," (",s.a.formatRespect(5*t.respectGainRate)," / sec)"))),r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"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.")},r.a.createElement(h.a,null,"Wanted Level: ",s.a.formatWanted(t.wanted)," (",s.a.formatWanted(5*t.wantedGainRate)," / sec)"))),r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"Penalty for respect and money gain rates due to Wanted Level")},r.a.createElement(h.a,null,"Wanted Level Penalty: -",Object(o.d)(100*(1-t.getWantedPenalty()),2),"%"))),r.a.createElement(h.a,null,"Money gain rate: ",r.a.createElement(l.a,{money:5*t.moneyGainRate})),r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"The percentage of total territory your Gang controls")},r.a.createElement(h.a,null,"Territory: ",n,"%"))),r.a.createElement(h.a,null,"Faction reputation: ",r.a.createElement(c.a,{reputation:i.a[t.facName].playerReputation})),r.a.createElement(u.a,{gang:t}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n(8),i=n(24),o=n(1),s=n(23),l=n(21);function c(t){const e=1e3/r.a._idleSpeed;if(t.gang.storedCycles/e*1e3<=5e3)return a.createElement(a.Fragment,null);const n=t.gang.storedCycles/e*1e3;return a.createElement(l.a,{display:"flex"},a.createElement(s.a,{title:a.createElement(o.a,null,"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")},a.createElement(o.a,null,"Bonus time: ",Object(i.b)(n))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(1147),o=n(1156),s=n(139),l=n(81),c=n(21),f=n(342),u=n.n(f),m=n(187);function h(){const t=Object(s.b)(),e=Object(a.useState)(!1)[1],[n,f]=Object(a.useState)(""),[h,d]=Object(a.useState)(!1),p=t.members.filter(t=>t&&t.name.toLowerCase().includes(n)).filter(t=>!h||t.canAscend());return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onRecruit:()=>e(t=>!t)}),r.a.createElement(l.a,{value:n,onChange:t=>{f(t.target.value.toLowerCase())},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(u.a,null),spellCheck:!1},placeholder:"Filter by member name",sx:{m:1,width:"15%"}}),r.a.createElement(m.a,{checked:h,onChange:t=>d(t),text:"Show only ascendable",tooltip:r.a.createElement(r.a.Fragment,null,"Filter the members list by whether or not the member can be ascended.")}),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"repeat(2, 1fr)"}},p.map(t=>r.a.createElement(i.a,{key:t.name,member:t}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(1148),o=n(21),s=n(107),l=n(65);function c(t){return r.a.createElement(o.a,{component:l.a,sx:{width:"auto"}},r.a.createElement(o.a,{sx:{m:1}},r.a.createElement(s.a,{primary:r.a.createElement("b",null,t.member.name)}),r.a.createElement(i.a,{member:t.member})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(1149),o=n(1153),s=n(1155),l=n(1457),c=n(10),f=n(1),u=n(294),m=n.n(u),h=n(453);function d(t){const e=Object(a.useState)(!1)[1],[n,u]=Object(a.useState)(!1),[d,p]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,t.member.canAscend()&&r.a.createElement(l.a,{sx:{display:"flex",justifyContent:"space-between",my:1}},r.a.createElement(c.a,{onClick:()=>p(!0),style:{flexGrow:1,borderRightWidth:0}},"Ascend"),r.a.createElement(s.a,{open:d,onClose:()=>p(!1),member:t.member,onAscend:()=>e(t=>!t)}),r.a.createElement(c.a,{onClick:()=>u(!0),style:{width:"fit-content",borderLeftWidth:0}},r.a.createElement(m.a,null)),r.a.createElement(h.a,{open:n,onClose:()=>u(!1)},r.a.createElement(f.a,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.a.createElement("br",null),r.a.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.a.createElement("br",null),r.a.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))),r.a.createElement(l.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%",gap:1}},r.a.createElement(i.a,{member:t.member}),r.a.createElement(o.a,{onTaskChange:()=>e(t=>!t),member:t.member})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(139),o=n(1),s=n(23),l=n(179),c=n(145),f=n(45),u=n(31),m=n(4),h=n(9),d=n(110),p=n(144),g=n(296);function y(t){const e=Object(g.b)(),n={hack:t.member.calculateAscensionMult(t.member.hack_asc_points),str:t.member.calculateAscensionMult(t.member.str_asc_points),def:t.member.calculateAscensionMult(t.member.def_asc_points),dex:t.member.calculateAscensionMult(t.member.dex_asc_points),agi:t.member.calculateAscensionMult(t.member.agi_asc_points),cha:t.member.calculateAscensionMult(t.member.cha_asc_points)},a=Object(i.b)(),y=[["Money:",r.a.createElement(d.a,{money:5*t.member.calculateMoneyGain(a)})],["Respect:",m.a.formatRespect(5*t.member.calculateRespectGain(a))+" / sec"],["Wanted Level:",m.a.formatWanted(5*t.member.calculateWantedLevelGain(a))+" / sec"],["Total Respect:",""+m.a.formatRespect(t.member.earnedRespect)]];return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"Hk: x",m.a.formatMultiplier(t.member.hack_mult*n.hack),"(x",m.a.formatMultiplier(t.member.hack_mult)," Eq, x",m.a.formatMultiplier(n.hack)," ","Asc)",r.a.createElement("br",null),"St: x",m.a.formatMultiplier(t.member.str_mult*n.str),"(x",m.a.formatMultiplier(t.member.str_mult)," Eq, x",m.a.formatMultiplier(n.str)," ","Asc)",r.a.createElement("br",null),"Df: x",m.a.formatMultiplier(t.member.def_mult*n.def),"(x",m.a.formatMultiplier(t.member.def_mult)," Eq, x",m.a.formatMultiplier(n.def)," ","Asc)",r.a.createElement("br",null),"Dx: x",m.a.formatMultiplier(t.member.dex_mult*n.dex),"(x",m.a.formatMultiplier(t.member.dex_mult)," Eq, x",m.a.formatMultiplier(n.dex)," ","Asc)",r.a.createElement("br",null),"Ag: x",m.a.formatMultiplier(t.member.agi_mult*n.agi),"(x",m.a.formatMultiplier(t.member.agi_mult)," Eq, x",m.a.formatMultiplier(n.agi)," ","Asc)",r.a.createElement("br",null),"Ch: x",m.a.formatMultiplier(t.member.cha_mult*n.cha),"(x",m.a.formatMultiplier(t.member.cha_mult)," Eq, x",m.a.formatMultiplier(n.cha)," ","Asc)")},r.a.createElement(l.a,{sx:{display:"table",mb:1,width:"100%"}},r.a.createElement(c.a,null,r.a.createElement(p.a,{name:"Hacking",color:h.a.theme.hack,data:{level:t.member.hack,exp:t.member.hack_exp}}),r.a.createElement(p.a,{name:"Strength",color:h.a.theme.combat,data:{level:t.member.str,exp:t.member.str_exp}}),r.a.createElement(p.a,{name:"Defense",color:h.a.theme.combat,data:{level:t.member.def,exp:t.member.def_exp}}),r.a.createElement(p.a,{name:"Dexterity",color:h.a.theme.combat,data:{level:t.member.dex,exp:t.member.dex_exp}}),r.a.createElement(p.a,{name:"Agility",color:h.a.theme.combat,data:{level:t.member.agi,exp:t.member.agi_exp}}),r.a.createElement(p.a,{name:"Charisma",color:h.a.theme.cha,data:{level:t.member.cha,exp:t.member.cha_exp}}),r.a.createElement(f.a,null,r.a.createElement(u.a,{classes:{root:e.cellNone}},r.a.createElement("br",null))),y.map(([t,n])=>r.a.createElement(f.a,{key:t.toString()+n.toString()},r.a.createElement(u.a,{classes:{root:e.cellNone}},r.a.createElement(o.a,null,t)),r.a.createElement(u.a,{align:"right",classes:{root:e.cellNone}},r.a.createElement(o.a,null,n))))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(41),o=n(1),s=n(10);function l(t){return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(o.a,null,"Forcefully kill all running scripts? This will also save your game and reload the game."),r.a.createElement(s.a,{onClick:function(){t.killScripts(),t.onClose()}},"KILL"))}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(139),o=n(1154),s=n(21),l=n(79),c=n(128);function f(t){const e=Object(i.b)(),[n,f]=Object(a.useState)(t.member.task),u=e.members.find(e=>e.name==t.member.name);u&&u.task!=n&&f(u.task);const m=e.getAllTaskNames();return r.a.createElement(s.a,null,r.a.createElement(c.a,{onChange:function(e){const n=e.target.value;t.member.assignToTask(n),f(n),t.onTaskChange()},value:n,sx:{width:"100%"}},r.a.createElement(l.a,{key:0,value:"Unassigned"},"Unassigned"),m.map((t,e)=>r.a.createElement(l.a,{key:e+1,value:t},t))),r.a.createElement(o.a,{member:t.member}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(241),o=n(1);function s(t){const e=i.a[t.member.task],n=e?e.desc:i.a.Unassigned.desc;return r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:n}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(4),o=n(16),s=n(41),l=n(139),c=n(1),f=n(10);function u(t){const e=Object(l.b)(),n=Object(a.useState)(!1)[1];Object(a.useEffect)(()=>{const t=setInterval(()=>n(t=>!t),1e3);return()=>clearInterval(t)},[]);const u=t.member.getCurrentAscensionMults(),m=t.member.getAscensionMultsAfterAscend();return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Are you sure you want to ascend this member? They will lose all of",r.a.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",r.a.createElement("br",null),r.a.createElement("br",null),"Furthermore, your gang will lose ",i.a.formatRespect(t.member.earnedRespect)," respect",r.a.createElement("br",null),r.a.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",r.a.createElement("br",null),"Hacking: x",i.a.format(u.hack,"0.000")," => x",i.a.format(m.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(u.str,"0.000")," => x",i.a.format(m.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(u.def,"0.000")," => x",i.a.format(m.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(u.dex,"0.000")," => x",i.a.format(m.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(u.agi,"0.000")," => x",i.a.format(m.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(u.cha,"0.000")," => x",i.a.format(m.cha,"0.000"),r.a.createElement("br",null)),r.a.createElement(f.a,{onClick:function(){t.onAscend();const n=e.ascendMember(t.member);Object(o.a)(r.a.createElement(r.a.Fragment,null,"You ascended ",t.member.name,"!",r.a.createElement("br",null),r.a.createElement("br",null),"Your gang lost ",i.a.formatRespect(n.respect)," respect.",r.a.createElement("br",null),r.a.createElement("br",null),t.member.name," gained the following stat multipliers for ascending:",r.a.createElement("br",null),"Hacking: x",i.a.format(n.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(n.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(n.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(n.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(n.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(n.cha,"0.000"),r.a.createElement("br",null))),t.onClose()}},"Ascend"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(1157),o=n(252),s=n(4),l=n(139),c=n(1),f=n(10),u=n(21);function m(t){const e=Object(l.b)(),[n,m]=Object(a.useState)(!1);if(e.members.length>=o.a.MaximumGangMembers)return r.a.createElement(r.a.Fragment,null);if(!e.canRecruitMember()){const t=e.getRespectNeededToRecruitMember();return r.a.createElement(u.a,{display:"flex",alignItems:"center",sx:{mx:1}},r.a.createElement(f.a,{disabled:!0},"Recruit Gang Member"),r.a.createElement(c.a,{sx:{ml:1}},s.a.formatRespect(t)," respect needed to recruit next member"))}return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{mx:1}},r.a.createElement(f.a,{onClick:()=>m(!0)},"Recruit Gang Member")),r.a.createElement(i.a,{open:n,onClose:()=>m(!1),onRecruit:t.onRecruit}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(41),o=n(16),s=n(139),l=n(1),c=n(81),f=n(10),u=n(28);function m(t){const e=Object(s.b)(),[n,m]=Object(a.useState)(""),h=""===n||!e.canRecruitMember();function d(){h||(e.recruitMember(n)?(t.onRecruit(),t.onClose()):Object(o.a)("You already have a gang member with this name!"))}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Enter a name for your new Gang member:"),r.a.createElement("br",null),r.a.createElement(c.a,{autoFocus:!0,onKeyUp:function(t){t.key===u.a.ENTER&&d()},onChange:function(t){m(t.target.value)},type:"text",placeholder:"unique name",InputProps:{endAdornment:r.a.createElement(f.a,{disabled:h,onClick:d},"Recruit")}}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var a=n(0),r=n.n(a),i=n(535),o=n(1),s=n(10),l=n(21),c=n(65),f=n(331),u=n(274),m=n(23),h=n(1756),d=n(4),p=n(24),g=n(80),y=n(139),b=n(1159);function E(){const t=Object(y.b)(),e=Object.keys(g.a).filter(e=>e!=t.facName),[n,E]=Object(a.useState)(!1);return r.a.createElement(i.a,{disableGutters:!0,maxWidth:"md",sx:{mx:0}},r.a.createElement(o.a,null,"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control."),r.a.createElement(s.a,{onClick:()=>E(!0),sx:{my:1}},r.a.createElement(h.a,{sx:{mr:1}}),"About Gang Territory"),r.a.createElement(l.a,{component:c.a,sx:{p:1,mb:1}},r.a.createElement(o.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},t.facName," (Your gang)"),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.territoryWarfareEngaged,onChange:e=>t.territoryWarfareEngaged=e.target.checked}),label:r.a.createElement(m.a,{title:r.a.createElement(o.a,null,"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")},r.a.createElement(o.a,null,"Engage in Territory Warfare"))}),r.a.createElement("br",null),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.notifyMemberDeath,onChange:e=>t.notifyMemberDeath=e.target.checked}),label:r.a.createElement(m.a,{title:r.a.createElement(o.a,null,"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")},r.a.createElement(o.a,null,"Notify about Gang Member Deaths"))}),r.a.createElement(o.a,null,r.a.createElement("b",null,"Territory Clash Chance:")," ",d.a.formatPercentage(t.territoryClashChance,3)," ",r.a.createElement("br",null),r.a.createElement("b",null,"Power:")," ",Object(p.d)(g.a[t.facName].power,3)," ",r.a.createElement("br",null),r.a.createElement("b",null,"Territory:")," ",v(g.a[t.facName].territory),"% ",r.a.createElement("br",null))),r.a.createElement(l.a,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)"}},e.map(t=>r.a.createElement(k,{key:t,name:t}))),r.a.createElement(b.a,{open:n,onClose:()=>E(!1)}))}function v(t){const e=100*t;return e<=0?Object(p.d)(0,3):e>=100?Object(p.d)(100,3):Object(p.d)(e,3)}function k(t){const e=Object(y.b)(),n=g.a[e.facName].power,a=g.a[t.name].power,i=n/(a+n);return r.a.createElement(l.a,{component:c.a,sx:{p:1}},r.a.createElement(o.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},t.name),r.a.createElement(o.a,null,r.a.createElement("b",null,"Power:")," ",Object(p.d)(a,3)," ",r.a.createElement("br",null),r.a.createElement("b",null,"Territory:")," ",v(g.a[t.name].territory),"% ",r.a.createElement("br",null),r.a.createElement("b",null,"Clash Win Chance:")," ",d.a.formatPercentage(i,3)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(1),o=n(41);const s=({open:t,onClose:e})=>r.a.createElement(o.a,{open:t,onClose:e},r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"h4"},"Clashing"),r.a.createElement(i.a,null,"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang."),r.a.createElement("br",null),r.a.createElement(i.a,{variant:"h4"},"Territory"),r.a.createElement(i.a,null,"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.a.createElement("br",null),r.a.createElement("br",null),'To increase your chances of winning territory, assign gang members to "Territory Warfare". This will build your gang power. Then, enable "Engage in Territory Warfare" to start fighting over territory.'),r.a.createElement("br",null),r.a.createElement(i.a,{variant:"h4"},"Territory Clash Chance"),r.a.createElement(i.a,null,"This percentage represents the chance you have of 'clashing' with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")))},function(t,e,n){"use strict";n.d(e,"a",(function(){return M}));var a=n(0),r=n.n(a),i=n(139),o=n(1),s=n(10),l=n(23),c=n(21),f=n(65),u=n(128),m=n(179),h=n(145),d=n(79),p=n(81),g=n(342),y=n.n(g),b=n(4),E=n(225),v=n(20),k=n(178),_=n(30),w=n(9),S=n(144);function C(t){const e=Object(i.b)(),n=_.b.Player(),a=Object.keys(E.a).filter(a=>{const r=E.a[a];return!(n.money>e.getUpgradeCost(r))&&(r.type===t.type&&!t.upgrades.includes(a))}).map(t=>E.a[t]);return 0===a.length?r.a.createElement(r.a.Fragment,null):r.a.createElement(o.a,null,"Next at ",r.a.createElement(v.a,{money:a[0].cost}))}function x({upgName:t}){const e=E.a[t];return r.a.createElement(f.a,{sx:{p:1}},r.a.createElement(l.a,{title:r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:e.desc}})},r.a.createElement(o.a,null,e.name)))}function L(t){const e=Object(i.b)(),n=_.b.Player();return r.a.createElement(l.a,{title:r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:t.upg.desc}})},r.a.createElement("span",null,r.a.createElement(s.a,{onClick:function(){t.member.buyUpgrade(t.upg,n,e),t.rerender()},sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"}},r.a.createElement(o.a,{sx:{display:"block"}},t.upg.name),r.a.createElement(v.a,{money:e.getUpgradeCost(t.upg)}))))}function O(t){const e=Object(i.b)(),n=_.b.Player(),s=Object(a.useState)(!1)[1],[p,g]=Object(a.useState)("Weapons");function y(){s(t=>!t)}function v(t,a){return Object.keys(E.a).filter(r=>{const i=E.a[r];return!(n.moneyE.a[t])}const O=v(t.member.upgrades,k.a.Weapon),M=v(t.member.upgrades,k.a.Armor),T=v(t.member.upgrades,k.a.Vehicle),A=v(t.member.upgrades,k.a.Rootkit),R=v(t.member.augmentations,k.a.Augmentation),N={Weapons:[O,k.a.Weapon],Armor:[M,k.a.Armor],Vehicles:[T,k.a.Vehicle],Rootkits:[A,k.a.Rootkit],Augmentations:[R,k.a.Augmentation]},P={hack:t.member.calculateAscensionMult(t.member.hack_asc_points),str:t.member.calculateAscensionMult(t.member.str_asc_points),def:t.member.calculateAscensionMult(t.member.def_asc_points),dex:t.member.calculateAscensionMult(t.member.dex_asc_points),agi:t.member.calculateAscensionMult(t.member.agi_asc_points),cha:t.member.calculateAscensionMult(t.member.cha_asc_points)};return r.a.createElement(f.a,null,r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",m:1,gap:1}},r.a.createElement("span",null,r.a.createElement(o.a,{variant:"h5",color:"primary"},t.member.name," (",t.member.task,")"),r.a.createElement(l.a,{title:r.a.createElement(o.a,null,"Hk: x",b.a.formatMultiplier(t.member.hack_mult*P.hack),"(x",b.a.formatMultiplier(t.member.hack_mult)," Eq, x",b.a.formatMultiplier(P.hack)," ","Asc)",r.a.createElement("br",null),"St: x",b.a.formatMultiplier(t.member.str_mult*P.str),"(x",b.a.formatMultiplier(t.member.str_mult)," Eq, x",b.a.formatMultiplier(P.str)," ","Asc)",r.a.createElement("br",null),"Df: x",b.a.formatMultiplier(t.member.def_mult*P.def),"(x",b.a.formatMultiplier(t.member.def_mult)," Eq, x",b.a.formatMultiplier(P.def)," ","Asc)",r.a.createElement("br",null),"Dx: x",b.a.formatMultiplier(t.member.dex_mult*P.dex),"(x",b.a.formatMultiplier(t.member.dex_mult)," Eq, x",b.a.formatMultiplier(P.dex)," ","Asc)",r.a.createElement("br",null),"Ag: x",b.a.formatMultiplier(t.member.agi_mult*P.agi),"(x",b.a.formatMultiplier(t.member.agi_mult)," Eq, x",b.a.formatMultiplier(P.agi)," ","Asc)",r.a.createElement("br",null),"Ch: x",b.a.formatMultiplier(t.member.cha_mult*P.cha),"(x",b.a.formatMultiplier(t.member.cha_mult)," Eq, x",b.a.formatMultiplier(P.cha)," ","Asc)")},r.a.createElement(m.a,null,r.a.createElement(h.a,null,r.a.createElement(S.a,{name:"Hacking",color:w.a.theme.hack,data:{level:t.member.hack,exp:t.member.hack_exp}}),r.a.createElement(S.a,{name:"Strength",color:w.a.theme.combat,data:{level:t.member.str,exp:t.member.str_exp}}),r.a.createElement(S.a,{name:"Defense",color:w.a.theme.combat,data:{level:t.member.def,exp:t.member.def_exp}}),r.a.createElement(S.a,{name:"Dexterity",color:w.a.theme.combat,data:{level:t.member.dex,exp:t.member.dex_exp}}),r.a.createElement(S.a,{name:"Agility",color:w.a.theme.combat,data:{level:t.member.agi,exp:t.member.agi_exp}}),r.a.createElement(S.a,{name:"Charisma",color:w.a.theme.cha,data:{level:t.member.cha,exp:t.member.cha_exp}}))))),r.a.createElement("span",null,r.a.createElement(u.a,{onChange:t=>{g(t.target.value),y()},value:p,sx:{width:"100%",mb:1}},Object.keys(N).map((t,e)=>r.a.createElement(d.a,{key:e+1,value:t},r.a.createElement(o.a,{variant:"h6"},t)))),r.a.createElement(c.a,{sx:{width:"100%"}},0===N[p][0].length&&r.a.createElement(o.a,null,"All upgrades owned!"),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr"}},N[p][0].map(e=>r.a.createElement(L,{key:e.name,rerender:y,member:t.member,upg:e}))),r.a.createElement(C,{type:N[p][1],upgrades:t.member.upgrades})))),r.a.createElement(o.a,{sx:{mx:1}},"Purchased Upgrades: "),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"repeat(4, 1fr)",m:1}},t.member.upgrades.map(t=>r.a.createElement(x,{key:t,upgName:t})),t.member.augmentations.map(t=>r.a.createElement(x,{key:t,upgName:t}))))}function M(){const t=Object(i.b)(),[e,n]=Object(a.useState)(""),s=t.members.filter(t=>t&&t.name.toLowerCase().includes(e));return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:r.a.createElement(o.a,null,"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")},r.a.createElement(o.a,{sx:{m:1}},"Discount: -",b.a.formatPercentage(1-1/t.getDiscount()))),r.a.createElement(p.a,{value:e,onChange:t=>{n(t.target.value.toLowerCase())},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(y.a,null),spellCheck:!1},placeholder:"Filter by member name",sx:{m:1,width:"15%"}}),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%"}},s.map(t=>r.a.createElement(O,{key:t.name,member:t}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(1162),o=n(50),s=n(1185),l=n(30),c=n(48),f=n(1186),u=n(536),m=n(248);function h(){const t=l.b.Player().corporation;if(null===t)return r.a.createElement(r.a.Fragment,null);const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}const[h,d]=Object(a.useState)("Overview");Object(a.useEffect)(()=>{const t=setInterval(n,200);return()=>clearInterval(t)},[]);const p=Object.keys(o.a).filter(e=>void 0===t.divisions.find(t=>t.type===e)).length>0;return r.a.createElement(c.a.Corporation.Provider,{value:t},r.a.createElement(u.a,{variant:"scrollable",value:h,onChange:function(t,e){d(e)},sx:{maxWidth:"65%"},scrollButtons:!0},r.a.createElement(m.a,{label:t.name,value:"Overview"}),t.divisions.map(t=>r.a.createElement(m.a,{key:t.name,label:t.name,value:t.name})),p&&r.a.createElement(m.a,{label:"Expand",value:-1})),"Overview"===h&&r.a.createElement(f.a,{rerender:n}),-1===h&&r.a.createElement(s.a,{setDivisionName:d}),"string"==typeof h&&"Overview"!==h&&r.a.createElement(i.a,{rerender:n,divisionName:h+""}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(1163),o=n(48),s=n(17);function l(t){const e=Object(o.b)(),n="Overview"!==t.divisionName?e.divisions.find(e=>e.name===t.divisionName):void 0;if(void 0===n)throw new Error("Cannot find division");return r.a.createElement(o.a.Division.Provider,{value:n},r.a.createElement(i.a,{rerender:t.rerender,city:s.a.Sector12}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(1164),o=n(1184),s=n(48),l=n(536),c=n(248);function f(t){const e=Object(s.c)(),[n,f]=Object(a.useState)(t.city),u=e.offices[n];if(0===u)return f("Sector-12"),r.a.createElement(r.a.Fragment,null);const m=Object.keys(e.offices).filter(t=>0===e.offices[t]).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"fullWidth",value:n,onChange:function(t,e){f(e)},sx:{maxWidth:"65%"}},Object.values(e.offices).map(t=>0!==t&&r.a.createElement(c.a,{key:t.loc,label:t.loc,value:t.loc})),m&&r.a.createElement(c.a,{label:"Expand",value:"Expand"})),"Expand"!==n?r.a.createElement(i.a,{key:n,rerender:t.rerender,city:n,warehouse:e.warehouses[n],office:u}):r.a.createElement(o.a,{cityStateSetter:f}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(1165),o=n(1168),s=n(1171),l=n(30),c=n(48),f=n(21);function u(t){const e=l.b.Player(),n=Object(c.b)(),a=Object(c.c)();return r.a.createElement(f.a,{display:"flex"},r.a.createElement(f.a,{sx:{width:"50%"}},r.a.createElement(o.a,{rerender:t.rerender,currentCity:t.city,office:t.office}),r.a.createElement(i.a,{rerender:t.rerender,office:t.office})),r.a.createElement(f.a,{sx:{width:"50%"}},r.a.createElement(s.a,{rerender:t.rerender,player:e,corp:n,currentCity:t.city,division:a,warehouse:t.warehouse})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var a=n(0),r=n.n(a),i=n(53),o=n(4),s=n(1166),l=n(1167),c=n(20),f=n(48),u=n(1),m=n(10),h=n(114),d=n(65),p=n(602),g=n.n(p),y=n(603),b=n.n(y),E=n(23),v=n(79),k=n(128),_=n(179),w=n(145),S=n(45),C=n(43),x=n(21);function L(t,e){let n=0;for(let a=0;at.switchMode(t=>!t)},"Switch to Auto Mode")):r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")},r.a.createElement(m.a,{onClick:()=>t.switchMode(t=>!t)},"Switch to Manual Mode"))}function M(t){const e=Object(f.b)(),n=Object(f.c)(),[s,l]=Object(a.useState)(t.office.employees.length>0?t.office.employees[0]:null),m=[];for(let e=0;e0&&(p=l/t.office.employees.length,g=m/t.office.employees.length,y=h/t.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Unassigned Employees:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,a))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Avg Employee Morale:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(p,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Avg Employee Happiness:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(g,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Avg Employee Energy:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(y,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Total Employee Salary:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,r.a.createElement(c.a,{money:d})))),s&&r.a.createElement(r.a.Fragment,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")},r.a.createElement(u.a,null,"Material Production:"))),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(n.getOfficeProductivity(t.office),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")},r.a.createElement(u.a,null,"Product Production:"))),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(n.getOfficeProductivity(t.office,{forProduct:!0}),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"The effect this office's 'Business' employees has on boosting sales")},r.a.createElement(u.a,null," Business Multiplier:"))),r.a.createElement(C.b,null,r.a.createElement(u.a,null,"x",o.a.format(n.getBusinessFactor(t.office),"0.000"))))))),r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Operations,desc:"Manages supply chain operations. Improves the amount of Materials and Products you produce."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Engineer,desc:"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)"}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Business,desc:"Handles sales and finances. Improves the amount of Materials and Products you can sell."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Management,desc:"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.RandD,desc:"Research new innovative ways to improve the company. Generates Scientific Research."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Training,desc:"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations."}))))}function R(t){const e=Object(f.b)(),n=Object(f.c)(),[i,o]=Object(a.useState)(!1),[c,h]=Object(a.useState)(!1),[p,g]=Object(a.useState)(!1);return r.a.createElement(d.a,null,r.a.createElement(u.a,null,"Office Space"),r.a.createElement(u.a,null,"Size: ",t.office.employees.length," / ",t.office.size," employees"),r.a.createElement(x.a,{sx:{display:"grid",gridTemplateColumns:"1fr",width:"fit-content"}},r.a.createElement(x.a,{sx:{gridTemplateColumns:"repeat(3, 1fr)"}},r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Automatically hires an employee and gives him/her a random name")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:t.office.atCapacity(),onClick:function(){t.office.atCapacity()||(t.office.hireRandomEmployee(),t.rerender())}},"Hire Employee"))),r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Upgrade the office's size so that it can hold more employees!")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:e.funds<0,onClick:()=>o(!0)},"Upgrade size"))),r.a.createElement(s.a,{rerender:t.rerender,office:t.office,open:i,onClose:()=>o(!1)}),!n.hasResearch("AutoPartyManager")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Throw an office party to increase your employee's morale and happiness")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:e.funds<0,onClick:()=>h(!0)},"Throw Party"))),r.a.createElement(l.a,{rerender:t.rerender,office:t.office,open:c,onClose:()=>h(!1)}))),r.a.createElement(O,{manualMode:p,switchMode:g})),p?r.a.createElement(M,{rerender:t.rerender,office:t.office}):r.a.createElement(A,{rerender:t.rerender,office:t.office}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(4),o=n(38),s=n(69),l=n(41),c=n(48),f=n(1),u=n(10),m=n(23),h=n(21);function d(t){const e=Object(c.b)();return r.a.createElement(m.a,{title:i.a.formatMoney(t.cost)},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:e.funds{return n=t.cost,a=t.size,void(e.funds=u);){const t=Math.pow(1.09,n+m);if(i+t>u)break;i+=t,++m}const p=o.a.OfficeInitialCost*i;return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Increase the size of your office space to fit additional employees!"),r.a.createElement(h.a,{display:"flex",alignItems:"center"},r.a.createElement(f.a,null,"Upgrade size: "),r.a.createElement(d,{onClose:t.onClose,rerender:t.rerender,office:t.office,corp:e,cost:a,size:o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:t.onClose,rerender:t.rerender,office:t.office,corp:e,cost:s,size:5*o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:t.onClose,rerender:t.rerender,office:t.office,corp:e,cost:p,size:m*o.a.OfficeInitialSize})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(4),o=n(16),s=n(69),l=n(20),c=n(41),f=n(48),u=n(1),m=n(10),h=n(81),d=n(21),p=n(28);function g(t){const e=Object(f.b)(),[n,g]=Object(a.useState)(0),y=n*t.office.employees.length,b=e.funds>=y;function E(){if(null===n||isNaN(n)||n<0)Object(o.a)("Invalid value entered");else if(b){const a=Object(s.z)(e,t.office,n);Object(o.a)("You threw a party for the office! The morale and happiness of each employee increased by "+i.a.formatPercentage(a-1)),t.rerender(),t.onClose()}else Object(o.a)("You don't have enough company funds to throw a party!")}function v(){return isNaN(n)||n<0?r.a.createElement(u.a,null,"Invalid value entered!"):r.a.createElement(u.a,null,"Throwing this party will cost a total of ",r.a.createElement(l.a,{money:y}))}return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(u.a,null,"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"),r.a.createElement(v,null),r.a.createElement(d.a,{display:"flex",alignItems:"center"},r.a.createElement(h.a,{autoFocus:!0,type:"number",placeholder:"$ / employee",value:n,onChange:function(t){let e=parseFloat(t.target.value);isNaN(e)&&(e=0),g(e)},onKeyDown:function(t){t.key===p.a.ENTER&&E()}}),r.a.createElement(m.a,{disabled:!b,onClick:E},"Throw Party")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var a=n(0),r=n.n(a),i=n(50),o=n(318),s=n(4),l=n(192),c=n(1169),f=n(1170),u=n(20),m=n(110),h=n(183),d=n(453),p=n(143),g=n(48),y=n(1),b=n(10),E=n(23),v=n(65),k=n(114),_=n(294),w=n.n(_),S=n(21);function C(){const t=Object(g.b)(),e=Object(g.c)(),[n,o]=Object(a.useState)(!1),s=e.hasMaximumNumberProducts();let l="";switch(e.type){case i.a.Food:l="Build Restaurant";break;case i.a.Tobacco:l="Create Product";break;case i.a.Pharmaceutical:l="Create Drug";break;case i.a.Computer:case"Computer":l="Create Product";break;case i.a.Robotics:l="Design Robot";break;case i.a.Software:l="Develop Software";break;case i.a.Healthcare:l="Build Hospital";break;case i.a.RealEstate:l="Develop Property";break;default:return l="Create Product",r.a.createElement(r.a.Fragment,null)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:s?r.a.createElement(y.a,null,"You have reached the maximum number of products: ",e.getMaximumNumberProducts()):""},r.a.createElement(b.a,{color:0===Object.keys(e.products).length?"error":"primary",onClick:()=>o(!0),disabled:t.funds<0},l)),r.a.createElement(c.a,{open:n,onClose:()=>o(!1)}))}function x(){const t=Object(g.b)(),e=Object(g.c)(),[n,i]=Object(a.useState)(!1),[o,c]=Object(a.useState)(!1),p=1===t.unlockUpgrades[4],v=e.lastCycleRevenue-e.lastCycleExpenses;let _=!1;const C=e.getAdvertisingFactors(),x=C[1],L=C[2],O=C[3],M=C[0];function T(t){return Object(l.a)({progress:t,totalTicks:20})}return p&&(_=!0),r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Industry: ",e.type," (Corp Funds: ",r.a.createElement(u.a,{money:t.funds}),")"),r.a.createElement("br",null),r.a.createElement(h.a,{rows:[["Awareness:",s.a.format(e.awareness,"0.000")],["Popularity:",s.a.format(e.popularity,"0.000")]]}),!1!==_&&r.a.createElement(E.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Total multiplier for this industrys sales due to its awareness and popularity"),r.a.createElement(h.a,{rows:[["Awareness Bonus:","x"+s.a.format(Math.pow(x,.85),"0.000")],["Popularity Bonus:","x"+s.a.format(Math.pow(L,.85),"0.000")],["Ratio Multiplier:","x"+s.a.format(Math.pow(O,.85),"0.000")]]}))},r.a.createElement(y.a,null,"Advertising Multiplier: x",s.a.format(M,"0.000"))),r.a.createElement("br",null),r.a.createElement(h.a,{rows:[["Revenue:",r.a.createElement(m.a,{money:e.lastCycleRevenue})],["Expenses:",r.a.createElement(m.a,{money:e.lastCycleExpenses})],["Profit:",r.a.createElement(m.a,{money:v})]]}),r.a.createElement("br",null),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate.")},r.a.createElement(y.a,null,"Production Multiplier: ",s.a.format(e.prodMult,"0.00"))),r.a.createElement(k.a,{onClick:()=>i(!0)},r.a.createElement(w.a,null)),r.a.createElement(d.a,{open:n,onClose:()=>i(!1)},r.a.createElement(y.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):",r.a.createElement("br",null),r.a.createElement("br",null),"Hardware:    ",T(e.hwFac),r.a.createElement("br",null),"Robots:      ",T(e.robFac),r.a.createElement("br",null),"AI Cores:    ",T(e.aiFac),r.a.createElement("br",null),"Real Estate: ",T(e.reFac)))),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Scientific Research increases the quality of the materials and products that you produce.")},r.a.createElement(y.a,null,"Scientific Research: ",s.a.format(e.sciResearch.qty,"0.000a"))),r.a.createElement(b.a,{sx:{mx:1},onClick:()=>c(!0)},"Research"),r.a.createElement(f.a,{open:o,onClose:()=>c(!1),industry:e})))}function L(t){const e=Object(g.b)(),n=Object(g.c)(),a=[];for(const s of Object.keys(o.a)){const l=o.a[s];if(n.hasResearch("AutoBrew")&&"Coffee"===l[4])continue;const c=l[0],f=l[1],u=l[2];let m=0;switch(c){case 0:m=t.office.employees.length*f;break;default:m=f*Math.pow(u,n.upgrades[c])}function i(){e.funds0!==n.offices[t]),[y,b]=Object(a.useState)(g.length>0?g[0]:""),[E,v]=Object(a.useState)(""),[k,_]=Object(a.useState)(null),[w,S]=Object(a.useState)(null);if(n.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);let C=r.a.createElement(r.a.Fragment,null);switch(n.type){case s.a.Food:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new restaurant!");break;case s.a.Tobacco:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new tobacco product!");break;case s.a.Pharmaceutical:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and develop a new pharmaceutical drug!");break;case s.a.Computer:case"Computer":C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and manufacture a new computer hardware product!");break;case s.a.Robotics:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and create a new robot or robotic system!");break;case s.a.Software:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of software!");break;case s.a.Healthcare:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new hospital!");break;case s.a.RealEstate:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of real estate property!");break;default:return C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new product!"),r.a.createElement(r.a.Fragment,null)}function x(){if(null!==k&&null!==w){try{Object(l.l)(e,n,y,E,k,w)}catch(t){Object(i.a)(t+"")}t.onClose()}}return C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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."),r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,C),r.a.createElement(d.a,{style:{margin:"5px"},onChange:function(t){b(t.target.value)},defaultValue:y},g.map(t=>r.a.createElement(h.a,{key:t,value:t},t))),r.a.createElement(u.a,{onChange:function(t){v(t.target.value)},placeholder:(L=n.type,L===s.a.Food?"Restaurant Name":L===s.a.Healthcare?"Hospital Name":L===s.a.RealEstate?"Property Name":"Product Name")}),r.a.createElement("br",null),r.a.createElement(u.a,{onChange:function(t){""===t.target.value?_(null):_(parseFloat(t.target.value))},autoFocus:!0,type:"number",placeholder:"Design investment"}),r.a.createElement(u.a,{onChange:function(t){""===t.target.value?S(null):S(parseFloat(t.target.value))},onKeyDown:function(t){t.key===p.a.ENTER&&x()},type:"number",placeholder:"Marketing investment"}),r.a.createElement(m.a,{onClick:x},"Develop Product"));var L}},function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var a=n(0),r=n.n(a),i=n(41),o=n(50),s=n(38),l=n(69),c=n(281),f=n(9),u=n(16),m=n(1),h=n(23),d=n(10),p=n(21),g=n(211),y=n(75),b=n.n(y),E=n(156),v=n.n(E),k=n(321),_=n.n(k);function w({n:t,division:e}){const[n,i]=Object(a.useState)(!1);if(null===t)return r.a.createElement(r.a.Fragment,null);const o=c.a[t.text];let y=e.sciResearch.qtyr.a.createElement(h.a,{title:r.a.createElement(m.a,null,"Research points: ",o.cost,r.a.createElement("br",null),o.desc)},t),x=r.a.createElement(p.a,null,C(r.a.createElement("span",null,r.a.createElement(d.a,{color:S,disabled:y&&!t.researched,onClick:k,style:{width:"100%",textAlign:"left",justifyContent:"unset"}},t.researched&&r.a.createElement(_.a,{sx:{mr:1}}),t.text))));return 0===t.children.length?x:r.a.createElement(p.a,null,r.a.createElement(p.a,{display:"flex",sx:{border:"1px solid "+f.a.theme.well}},C(r.a.createElement("span",{style:{width:"100%"}},r.a.createElement(d.a,{color:S,disabled:y&&!t.researched,onClick:k,sx:{width:"100%",textAlign:"left",justifyContent:"unset",borderColor:f.a.theme.button}},t.researched&&r.a.createElement(_.a,{sx:{mr:1}}),t.text))),r.a.createElement(d.a,{onClick:()=>i(t=>!t),sx:{borderColor:f.a.theme.button,minWidth:"fit-content"}},n?r.a.createElement(v.a,{color:"primary"}):r.a.createElement(b.a,{color:"primary"}))),r.a.createElement(g.a,{in:n,unmountOnExit:!0},r.a.createElement(p.a,{m:1},t.children.map(t=>r.a.createElement(w,{key:t.text,division:e,n:t})))))}function S(t){const e=o.c[t.industry.type];return void 0===e?r.a.createElement(r.a.Fragment,null):r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(w,{division:t.industry,n:e.root}),r.a.createElement(m.a,{sx:{mt:1}},"Research points: ",t.industry.sciResearch.qty.toFixed(3),r.a.createElement("br",null),"Multipliers from research:",r.a.createElement("br",null),"* Advertising Multiplier: x",e.getAdvertisingMultiplier(),r.a.createElement("br",null),"* Employee Charisma Multiplier: x",e.getEmployeeChaMultiplier(),r.a.createElement("br",null),"* Employee Creativity Multiplier: x",e.getEmployeeCreMultiplier(),r.a.createElement("br",null),"* Employee Efficiency Multiplier: x",e.getEmployeeEffMultiplier(),r.a.createElement("br",null),"* Employee Intelligence Multiplier: x",e.getEmployeeIntMultiplier(),r.a.createElement("br",null),"* Production Multiplier: x",e.getProductionMultiplier(),r.a.createElement("br",null),"* Sales Multiplier: x",e.getSalesMultiplier(),r.a.createElement("br",null),"* Scientific Research Multiplier: x",e.getScientificResearchMultiplier(),r.a.createElement("br",null),"* Storage Multiplier: x",e.getStorageMultiplier()))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return O}));var a=n(0),r=n.n(a),i=n(38),o=n(198),s=n(401),l=n(240),c=n(1172),f=n(1173),u=n(1178),m=n(175),h=n(4),d=n(143),p=n(402),g=n(1183),y=n(69),b=n(48),E=n(1),v=n(23),k=n(65),_=n(10),w=n(21),S=n(113),C=n(137);const x=Object(S.a)(()=>Object(C.a)({retainHeight:{minHeight:"3em"}}));function L(t){const e=Object(b.b)(),n=Object(b.c)(),[l,y]=Object(a.useState)(!1);if(0===t.warehouse)return r.a.createElement(r.a.Fragment,null);const S=i.a.WarehouseUpgradeBaseCost*Math.pow(1.07,t.warehouse.level+1),C=e.funds>S;const L=x();let O;switch(n.state){case"START":O="Current state: Preparing...";break;case"PURCHASE":O="Current state: Purchasing materials...";break;case"PRODUCTION":O="Current state: Producing materials and/or products...";break;case"SALE":O="Current state: Selling materials and/or products...";break;case"EXPORT":O="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+n.state)}const M=[];for(const e of Object.keys(t.warehouse.materials)){if(!(t.warehouse.materials[e]instanceof o.a))continue;const a=t.warehouse.materials[e].qty>0,i=Object(p.a)(e,n);(a||i)&&M.push(r.a.createElement(u.a,{rerender:t.rerender,city:t.currentCity,key:e,mat:t.warehouse.materials[e],warehouse:t.warehouse}))}const T=[];if(n.makesProducts&&Object.keys(n.products).length>0)for(const e of Object.keys(n.products)){const a=n.products[e];a instanceof s.a&&T.push(r.a.createElement(f.a,{rerender:t.rerender,city:t.currentCity,key:e,product:a}))}const A=[];for(const e of Object.keys(t.warehouse.materials)){const n=t.warehouse.materials[e];m.a.hasOwnProperty(e)&&(0!==n.qty&&A.push(r.a.createElement(r.a.Fragment,null,e,": ",h.a.format(n.qty*m.a[e],"0,0.0"))))}for(const e of Object.keys(n.products)){const a=n.products[e];void 0!==a&&A.push(r.a.createElement(r.a.Fragment,null,e,": ",h.a.format(a.data[t.warehouse.loc][0]*a.siz,"0,0.0")))}let R;return R=A&&A.length>0?A.reduce((t,e)=>t&&r.a.createElement(r.a.Fragment,null,t,r.a.createElement("br",null),e)||r.a.createElement(r.a.Fragment,null,e)):r.a.createElement(r.a.Fragment,null,"No items in storage."),r.a.createElement(k.a,null,r.a.createElement(w.a,{display:"flex",alignItems:"center"},r.a.createElement(v.a,{title:0!==t.warehouse.sizeUsed?r.a.createElement(E.a,null,r.a.createElement(r.a.Fragment,null,R)):""},r.a.createElement(E.a,{color:t.warehouse.sizeUsed>=t.warehouse.size?"error":"primary"},"Storage: ",h.a.formatBigNumber(t.warehouse.sizeUsed)," /"," ",h.a.formatBigNumber(t.warehouse.size)))),r.a.createElement(_.a,{disabled:!C,onClick:function(){null!==n&&0!==t.warehouse&&C&&(++t.warehouse.level,t.warehouse.updateSize(e,n),e.funds=e.funds-S,t.rerender())}},"Upgrade Warehouse Size - ",r.a.createElement(d.a,{money:S,corp:e})),r.a.createElement(E.a,null,"This industry uses the following equation for its production: "),r.a.createElement("br",null),r.a.createElement(E.a,null,r.a.createElement(g.a,{key:n.name,division:n})),r.a.createElement("br",null),r.a.createElement(E.a,null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),r.a.createElement("br",null),r.a.createElement(E.a,{className:L.retainHeight},O),e.unlockUpgrades[1]&&r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{onClick:()=>y(!0)},"Configure Smart Supply"),r.a.createElement(c.a,{open:l,onClose:()=>y(!1),warehouse:t.warehouse})),M,T)}function O(t){return t.warehouse instanceof l.a?r.a.createElement(L,t):r.a.createElement(M,{rerender:t.rerender,city:t.currentCity})}function M(t){const e=Object(b.b)(),n=Object(b.c)(),a=e.funds!t)}}),label:r.a.createElement(f.a,null,"Enable Smart Supply")}),r.a.createElement("br",null),r.a.createElement(f.a,null,"Use materials already in the warehouse instead of buying new ones, if available:"),s))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ProductElem}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_data_Constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(38),_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1174),_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1175),_SellProductModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1176),_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(1177),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(147),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(20),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(48),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(23),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(65),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(21);function ProductElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[sellOpen,setSellOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[limitOpen,setLimitOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[discontinueOpen,setDiscontinueOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[marketTaOpen,setMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),city=props.city,product=props.product,nf="0.000",nfB="0.000a",hasUpgradeDashboard=division.hasResearch("uPgrade: Dashboard"),totalGain=product.data[city][1]-product.data[city][2];let sellButtonText;if(sellButtonText=product.sllman[city][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(product.sllman[city][1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB),"/",product.sllman[city][1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.sllman[city][1],nfB),")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)"),product.marketTa2)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_8__.a,{money:product.marketTa2Price[city]}));else if(product.marketTa1){const t=product.rat/product.mku;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_8__.a,{money:product.pCost+t}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(product.sCost)){const sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku+"");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_8__.a,{money:eval(sCost)}))}else 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_8__.a,{money:product.sCost}));let limitProductionButtonText="Limit Production";return product.prdman[city][0]&&(limitProductionButtonText+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prdman[city][1],nf)+")"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,product.fin?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_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][1],nfB),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB)," /s")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,product.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][0],nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.qlt,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.per,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.dur,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rel,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.aes,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.fea,nf),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rat,nf)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"An estimate of the material cost it takes to create this Product.")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Production Cost:"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost/_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.ProductProductionCostRatio)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost))))):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__.a,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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prog,"0.00"),"% complete")),(hasUpgradeDashboard||product.fin)&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setSellOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellProductModal__WEBPACK_IMPORTED_MODULE_4__.a,{product:product,city:city,open:sellOpen,onClose:()=>setSellOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setLimitOpen(!0)},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__.a,{product:product,city:city,open:limitOpen,onClose:()=>setLimitOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setDiscontinueOpen(!0)},"Discontinue"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__.a,{product:product,rerender:props.rerender,open:discontinueOpen,onClose:()=>setDiscontinueOpen(!1)}),division.hasResearch("Market-TA.I")&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__.a,{product:product,open:marketTaOpen,onClose:()=>setMarketTaOpen(!1)}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(41),o=n(48),s=n(1),l=n(10);function c(t){const e=Object(o.c)();return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null,"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"),r.a.createElement(l.a,{onClick:function(){e.discontinueProduct(t.product),t.onClose(),t.rerender()}},"Discontinue"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(69),o=n(41),s=n(1),l=n(10),c=n(81),f=n(28);function u(t){const[e,n]=Object(a.useState)(null);function u(){let n=e;null===n&&(n=-1),Object(i.k)(t.product,t.city,n),t.onClose()}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null,"Enter a limit to the amount of this product you would like to produce per second. Leave the box empty to set no limit."),r.a.createElement(c.a,{autoFocus:!0,placeholder:"Limit",type:"number",onChange:function(t){""===t.target.value?n(null):n(parseFloat(t.target.value))},onKeyDown:function(t){t.key===f.a.ENTER&&u()}}),r.a.createElement(l.a,{onClick:u},"Limit production"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(16),o=n(69),s=n(41),l=n(1),c=n(81),f=n(10),u=n(331),m=n(274),h=n(28);function d(t){const[e,n]=Object(a.useState)(!0),[d,p]=Object(a.useState)(t.product.sllman[t.city][1]?t.product.sllman[t.city][1]:""),[g,y]=Object(a.useState)(function(t){let e=t.sCost?t.sCost+"":"";return t.marketTa2?e+=" (Market-TA.II)":t.marketTa1&&(e+=" (Market-TA.I)"),e}(t.product));function b(){try{Object(o.r)(t.product,t.city,d,g,e)}catch(t){Object(i.a)(t+"")}t.onClose()}function E(t){t.key===h.a.ENTER&&b()}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Enter the maximum amount of ",t.product.name," you would like to sell per second, as well as the price at which you would like to sell it at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."),r.a.createElement("br",null),r.a.createElement(c.a,{value:d,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(t){p(t.target.value)},onKeyDown:E}),r.a.createElement(c.a,{value:g,type:"text",placeholder:"Sell price",onChange:function(t){y(t.target.value)},onKeyDown:E}),r.a.createElement(f.a,{onClick:b},"Confirm"),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e,onChange:function(t){n(t.target.checked)}}),label:r.a.createElement(l.a,null,"Use same 'Sell Amount' for all cities")}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(4),o=n(41),s=n(48),l=n(1),c=n(81),f=n(331),u=n(274),m=n(23);function h(t){if(!Object(s.c)().hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const e=t.product.rat/t.product.mku,[n,o]=Object(a.useState)(t.product.pCost),h=Object(a.useState)(!1)[1];const d=n;let p=1;return d>t.product.pCost&&d-t.product.pCost>e&&(p=e/(d-t.product.pCost)),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.II"),r.a.createElement("br",null),r.a.createElement(l.a,null,"If you sell at ",i.a.formatMoney(d),", then you will sell"," ",i.a.format(p,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement(c.a,{type:"number",onChange:function(t){o(parseFloat(t.target.value))},value:n}),r.a.createElement("br",null),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.product.marketTa2,onChange:function(e){t.product.marketTa2=e.target.checked,h(t=>!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)")},r.a.createElement(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(t){const e=t.product.rat/t.product.mku,n=Object(a.useState)(!1)[1];return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,null,"The maximum sale price you can mark this up to is"," ",i.a.formatMoney(t.product.pCost+e),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.product.marketTa1,onChange:function(e){t.product.marketTa1=e.target.checked,n(t=>!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")},r.a.createElement(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(h,{product:t.product}))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return MaterialElem}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_OfficeSpace__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(376),_ExportModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1179),_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1180),_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1181),_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(1182),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(147),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(20),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(48),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(23),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(65),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(21);function MaterialElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[purchaseMaterialOpen,setPurchaseMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[exportOpen,setExportOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[sellMaterialOpen,setSellMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[materialMarketTaOpen,setMaterialMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_1__.a))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.buy,nfB)})`;let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(mat.sllman[1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB),"/",mat.sllman[1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sllman[1],nfB),")"),mat.marketTa2)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_8__.a,{money:mat.marketTa2Price}));else if(mat.marketTa1)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_8__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(mat.sCost)){const sCost=mat.sCost.replace(/MP/g,mat.bCost+"");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_8__.a,{money:eval(sCost)}))}else 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_8__.a,{money:mat.sCost}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)");return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{sx:{display:"grid",gridTemplateColumns:"2fr 1fr",m:"5px"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(mat.bCost))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"The quality of your material. Higher quality will lead to more sales")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qlt,"0.00a")))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{sx:{"& button":{width:"100%"}}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:tutorial?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Purchase your required materials to get production started!"):""},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:tutorial?"error":"primary",onClick:()=>setPurchaseMaterialOpen(!0),disabled:props.warehouse.smartSupplyEnabled&&Object.keys(division.reqMats).includes(props.mat.name)},purchaseButtonText)),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__.a,{mat:mat,warehouse:warehouse,open:purchaseMaterialOpen,onClose:()=>setPurchaseMaterialOpen(!1)}),1===corp.unlockUpgrades[0]&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setExportOpen(!0)},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ExportModal__WEBPACK_IMPORTED_MODULE_2__.a,{mat:mat,open:exportOpen,onClose:()=>setExportOpen(!1)})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:division.prodMats.includes(props.mat.name)&&!mat.sllman[0]?"error":"primary",onClick:()=>setSellMaterialOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__.a,{mat:mat,open:sellMaterialOpen,onClose:()=>setSellMaterialOpen(!1)}),division.hasResearch("Market-TA.I")&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMaterialMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__.a,{mat:mat,open:materialMarketTaOpen,onClose:()=>setMaterialMarketTaOpen(!1)})))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(16),o=n(69),s=n(41),l=n(48),c=n(402),f=n(1),u=n(81),m=n(10),h=n(21),d=n(79),p=n(128);function g(t){const e=Object(l.b)(),n=e.divisions.filter(e=>Object(c.a)(t.mat.name,e));if(0===n.length)throw new Error("Export popup created with no divisions.");const g=n[0];if(0===Object.keys(g.warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[y,b]=Object(a.useState)(g.name),[E,v]=Object(a.useState)(Object.keys(g.warehouses)[0]),[k,_]=Object(a.useState)(""),w=Object(a.useState)(!1)[1];function S(e){for(let n=0;n!t)}const C=e.divisions.find(t=>t.name===y);if(void 0===C)throw new Error(`Export popup somehow ended up with undefined division '${C}'`);const x=Object.keys(C.warehouses).filter(t=>0!==C.warehouses[t]);return x.length>0&&!x.includes(E)&&v(x[0]),r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse."),r.a.createElement(p.a,{onChange:function(t){const n=t.target.value;b(n),v(Object.keys(e.divisions[0].warehouses)[0])},value:y},e.divisions.filter(e=>Object(c.a)(t.mat.name,e)).map(t=>r.a.createElement(d.a,{key:t.name,value:t.name},t.name))),r.a.createElement(p.a,{onChange:function(t){v(t.target.value)},value:E},x.map(t=>{if(0!==C.warehouses[t])return r.a.createElement(d.a,{key:t,value:t},t)})),r.a.createElement(u.a,{placeholder:"Export amount / s",onChange:function(t){_(t.target.value)},value:k}),r.a.createElement(m.a,{onClick:function(){try{Object(o.g)(y,E,t.mat,k,C)}catch(t){Object(i.a)(t+"")}t.onClose()}},"Export"),r.a.createElement(f.a,null,"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."),t.mat.exp.map((t,e)=>r.a.createElement(h.a,{display:"flex",alignItems:"center",key:e},r.a.createElement(m.a,{sx:{mx:2},onClick:()=>S(t)},"delete"),r.a.createElement(f.a,null,"Industry: ",t.ind,r.a.createElement("br",null),"City: ",t.city,r.a.createElement("br",null),"Amount/s: ",t.amt))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(4),o=n(41),s=n(48),l=n(1),c=n(81),f=n(331),u=n(274),m=n(23);function h(t){if(!Object(s.c)().hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const[e,n]=Object(a.useState)(t.mat.bCost),o=Object(a.useState)(!1)[1];const h=t.mat.getMarkupLimit();const d=e;let p=1;return d>t.mat.bCost?d-t.mat.bCost>h&&(p=Math.pow(h/(d-t.mat.bCost),2)):d!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)")},r.a.createElement(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(t){const e=Object(a.useState)(!1)[1];const n=t.mat.getMarkupLimit();return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,null,"The maximum sale price you can mark this up to is ",i.a.formatMoney(t.mat.bCost+n),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.mat.marketTa1,onChange:function(n){t.mat.marketTa1=n.target.checked,e(t=>!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")},r.a.createElement(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(h,{mat:t.mat}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(16),o=n(69),s=n(41),l=n(1),c=n(81),f=n(10),u=n(28);function m(t){const[e,n]=Object(a.useState)(t.mat.sllman[1]?t.mat.sllman[1]+"":""),[m,h]=Object(a.useState)(function(t){let e=t.sCost?t.sCost+"":"";return t.marketTa2?e+=" (Market-TA.II)":t.marketTa1&&(e+=" (Market-TA.I)"),e}(t.mat));function d(){try{Object(o.q)(t.mat,e,m)}catch(t){Object(i.a)(t+"")}t.onClose()}function p(t){t.key===u.a.ENTER&&d()}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Enter the maximum amount of ",t.mat.name," you would like to sell per second, as well as the price at which you would like to sell at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."),r.a.createElement("br",null),r.a.createElement(c.a,{value:e,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(t){n(t.target.value)},onKeyDown:p}),r.a.createElement(c.a,{value:m,type:"text",placeholder:"Sell price",onChange:function(t){h(t.target.value)},onKeyDown:p}),r.a.createElement(f.a,{onClick:d},"Confirm"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(16),o=n(175),s=n(4),l=n(69),c=n(41),f=n(48),u=n(1),m=n(81),h=n(10),d=n(28);function p(t){const e=parseFloat(t.amount),n=e*t.mat.bCost,a=o.a[t.mat.name];return e*a>(t.warehouse.size-t.warehouse.sizeUsed)/a?r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{color:"error"},"Not enough warehouse space to purchase this amount")):isNaN(n)||e<0?r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{color:"error"},"Invalid put for Bulk Purchase amount")):r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Purchasing ",s.a.format(e,"0,0.00")," of ",t.mat.name," will cost"," ",s.a.formatMoney(n)))}function g(t){const e=Object(f.b)(),[n,o]=Object(a.useState)("");function s(){try{Object(l.b)(e,t.warehouse,t.mat,parseFloat(n))}catch(t){Object(i.a)(t+"")}t.onClose()}return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Enter the amount of ",t.mat.name," you would like to bulk purchase. This purchases the specified amount instantly (all at once)."),r.a.createElement(p,{warehouse:t.warehouse,mat:t.mat,amount:n}),r.a.createElement(m.a,{value:n,onChange:function(t){o(t.target.value)},type:"number",placeholder:"Bulk Purchase amount",onKeyDown:function(t){t.key===d.a.ENTER&&s()}}),r.a.createElement(h.a,{onClick:s},"Confirm Bulk Purchase"))}function y(t){const e=Object(f.c)(),[n,o]=Object(a.useState)(t.mat.buy?t.mat.buy:0);function s(){if(null!==n){try{Object(l.e)(t.mat,n)}catch(t){Object(i.a)(t+"")}t.onClose()}}return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Enter the amount of ",t.mat.name," you would like to purchase per second. This material's cost changes constantly."),r.a.createElement(m.a,{value:n,onChange:function(t){o(parseFloat(t.target.value))},autoFocus:!0,placeholder:"Purchase amount",type:"number",onKeyDown:function(t){t.key===d.a.ENTER&&s()}}),r.a.createElement(h.a,{onClick:s},"Confirm"),r.a.createElement(h.a,{onClick:function(){t.mat.buy=0,t.onClose()}},"Clear Purchase"),e.hasResearch("Bulk Purchasing")&&r.a.createElement(g,{onClose:t.onClose,mat:t.mat,warehouse:t.warehouse})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(265);function o(t){const e=[];for(const n of Object.keys(t.division.reqMats)){const a=t.division.reqMats[n];void 0!==a&&e.push(String.raw`${a}\text{ }${n}`)}const n=t.division.prodMats.map(t=>"1\\text{ }"+t);return t.division.makesProducts&&n.push("Products"),r.a.createElement(i.a,null,"\\("+e.join("+")+"\\Rightarrow "+n.join("+")+"\\)")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(38),o=n(16),s=n(69),l=n(143),c=n(48),f=n(1),u=n(79),m=n(128),h=n(10);function d(t){const e=Object(c.b)(),n=Object(c.c)(),d=Object.keys(n.offices).filter(t=>0===n.offices[t]),[p,g]=Object(a.useState)(d[0]),y=e.fundsr.a.createElement(u.a,{key:t,value:t},t))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(16),o=n(50),s=n(48),l=n(69),c=n(1),f=n(10),u=n(81),m=n(79),h=n(21),d=n(128),p=n(28);function g(t){const e=Object(s.b)(),n=Object.keys(o.a).sort().filter(t=>void 0===e.divisions.find(e=>e.type===t)).sort(),[g,y]=Object(a.useState)(n.length>0?n[0]:""),[b,E]=Object(a.useState)(""),v=o.d[g];if(void 0===v)throw new Error(`Invalid industry: '${g}'`);const k=e.fundsr.a.createElement(m.a,{key:t,value:t},t))),r.a.createElement(c.a,null,w(e)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,"Division name:"),r.a.createElement(h.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,{autoFocus:!0,value:b,onChange:function(t){E(t.target.value)},onKeyDown:function(t){t.key===p.a.ENTER&&_()},type:"text",InputProps:{endAdornment:r.a.createElement(f.a,{disabled:k,sx:{mx:1},onClick:_},"Expand")}})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var a=n(0),r=n.n(a),i=n(1187),o=n(1188),s=n(1189),l=n(1190),c=n(1191),f=n(1192),u=n(1193),m=n(1194),h=n(1195),d=n(29),p=n(38),g=n(298),y=n(371),b=n(8),E=n(4),v=n(24),k=n(20),_=n(110),w=n(183),S=n(30),C=n(48),x=n(1),L=n(23),O=n(10),M=n(21),T=n(65),A=n(60);function R({rerender:t}){const e=S.b.Player(),n=Object(C.b)(),a=n.revenue-n.expenses,i=[];function o(t,e){1!==e&&i.push([t,E.a.format(e,"0.000")])}return o("Production Multiplier: ",n.getProductionMultiplier()),o("Storage Multiplier: ",n.getStorageMultiplier()),o("Advertising Multiplier: ",n.getAdvertisingMultiplier()),o("Empl. Creativity Multiplier: ",n.getEmployeeCreMultiplier()),o("Empl. Charisma Multiplier: ",n.getEmployeeChaMultiplier()),o("Empl. Intelligence Multiplier: ",n.getEmployeeIntMultiplier()),o("Empl. Efficiency Multiplier: ",n.getEmployeeEffMultiplier()),o("Sales Multiplier: ",n.getSalesMultiplier()),o("Scientific Research Multiplier: ",n.getScientificResearchMultiplier()),r.a.createElement(r.a.Fragment,null,r.a.createElement(w.a,{rows:[["Total Funds:",r.a.createElement(k.a,{money:n.funds})],["Total Revenue:",r.a.createElement(_.a,{money:n.revenue})],["Total Expenses:",r.a.createElement(_.a,{money:n.expenses})],["Publicly Traded:",n.public?"Yes":"No"],["Owned Stock Shares:",E.a.format(n.numShares,"0.000a")],["Stock Price:",n.public?r.a.createElement(k.a,{money:n.sharePrice}):"N/A"]]}),r.a.createElement("br",null),r.a.createElement(M.a,{display:"flex"},r.a.createElement(L.a,{title:r.a.createElement(w.a,{rows:[["Outstanding Shares:",E.a.format(n.issuedShares,"0.000a")],["Private Shares:",E.a.format(n.totalShares-n.issuedShares-n.numShares,"0.000a")]]})},r.a.createElement(x.a,null,"Total Stock Shares: ",E.a.format(n.totalShares,"0.000a")))),r.a.createElement("br",null),r.a.createElement(D,{profit:a}),r.a.createElement("br",null),r.a.createElement(w.a,{rows:i}),r.a.createElement("br",null),r.a.createElement(j,null),r.a.createElement(M.a,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",width:"fit-content"}},r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"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.")},r.a.createElement(O.a,{onClick:()=>n.getStarterGuide(e)},"Getting Started Guide")),n.public?r.a.createElement(I,{rerender:t}):r.a.createElement(N,{rerender:t}),r.a.createElement(F,null)),r.a.createElement("br",null),r.a.createElement(P,{rerender:t}))}function N({rerender:t}){const e=Object(C.b)(),[n,i]=Object(a.useState)(!1),[o,s]=Object(a.useState)(!1),l=e.fundingRound<4,c=l?"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company":"";return r.a.createElement(r.a.Fragment,null,r.a.createElement(L.a,{title:r.a.createElement(x.a,null,c)},r.a.createElement(O.a,{disabled:!l,onClick:()=>i(!0)},"Find Investors")),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"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.")},r.a.createElement(O.a,{onClick:()=>s(!0)},"Go Public")),r.a.createElement(m.a,{open:n,onClose:()=>i(!1),rerender:t}),r.a.createElement(h.a,{open:o,onClose:()=>s(!1),rerender:t}))}function P({rerender:t}){const e=Object(C.b)();return e.divisions.length<=0?r.a.createElement(x.a,{variant:"h4"},"Upgrades are unlocked once you create an industry."):r.a.createElement(r.a.Fragment,null,r.a.createElement(T.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Unlocks"),r.a.createElement(A.a,{container:!0},Object.values(g.a).filter(t=>!e.unlockUpgrades[t[0]]).map(e=>r.a.createElement(o.a,{rerender:t,upgradeData:e,key:e[0]})))),r.a.createElement(T.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Upgrades"),r.a.createElement(A.a,{container:!0},e.upgrades.map((t,e)=>y.a[e]).map(e=>r.a.createElement(i.a,{rerender:t,upgrade:e,key:e[0]})))))}function I({rerender:t}){const e=Object(C.b)(),[n,i]=Object(a.useState)(!1),[o,s]=Object(a.useState)(!1),[m,h]=Object(a.useState)(!1),[d,p]=Object(a.useState)(!1),g=e.shareSaleCooldown>0,y=g?"Cannot sell shares for "+e.convertCooldownToString(e.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.",b=e.issueNewSharesCooldown>0,E=b?"Cannot issue new shares for "+e.convertCooldownToString(e.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(L.a,{title:r.a.createElement(x.a,null,y)},r.a.createElement(O.a,{disabled:g,onClick:()=>i(!0)},"Sell Shares")),r.a.createElement(l.a,{open:n,onClose:()=>i(!1),rerender:t}),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"Buy back shares you that previously issued or sold at market price.")},r.a.createElement(O.a,{disabled:e.issuedShares<1,onClick:()=>s(!0)},"Buyback shares")),r.a.createElement(c.a,{open:o,onClose:()=>s(!1),rerender:t}),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,E)},r.a.createElement(O.a,{disabled:b,onClick:()=>h(!0)},"Issue New Shares")),r.a.createElement(u.a,{open:m,onClose:()=>h(!1)}),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"Manage the dividends that are paid out to shareholders (including yourself)")},r.a.createElement(O.a,{onClick:()=>p(!0)},"Issue Dividends")),r.a.createElement(f.a,{open:d,onClose:()=>p(!1)}))}function F(){const t=S.b.Player(),e=Object(C.b)(),[n,i]=Object(a.useState)(!1),o=e.determineValuation()>=p.a.BribeThreshold&&t.factions.filter(t=>d.a[t].getInfo().offersWork()).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(L.a,{title:o?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"},r.a.createElement(O.a,{disabled:!o,onClick:function(){o&&i(!0)}},"Bribe Factions")),r.a.createElement(s.a,{open:n,onClose:()=>i(!1)}))}function D({profit:t}){const e=Object(C.b)();if(e.dividendPercentage<=0||t<=0)return r.a.createElement(r.a.Fragment,null);const n=e.dividendPercentage/100*t,a=t-n,i=n/e.totalShares;return r.a.createElement(w.a,{rows:[["Retained Profits (after dividends):",r.a.createElement(_.a,{money:a})],["Dividend Percentage:",E.a.format(e.dividendPercentage/100,"0%")],["Dividends per share:",r.a.createElement(_.a,{money:i})],["Your earnings as a shareholder:",r.a.createElement(_.a,{money:e.getDividends()})]]})}function j(){const t=Object(C.b)().storedCycles*b.a.MilliPerCycle;return t<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement(x.a,null,"Bonus time: ",Object(v.b)(t),r.a.createElement("br",null),r.a.createElement("br",null))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(16),o=n(69),s=n(143),l=n(48),c=n(1),f=n(23),u=n(10),m=n(21),h=n(60);function d(t){const e=Object(l.b)(),n=t.upgrade,a=e.upgrades[n[0]],d=n[1],p=n[2],g=d*Math.pow(p,a),y=n[5];return r.a.createElement(h.a,{item:!0,xs:4},r.a.createElement(m.a,{display:"flex",alignItems:"center",flexDirection:"row-reverse"},r.a.createElement(u.a,{disabled:e.funds!!i.a[t].getInfo().offersWork()&&!e.hasGangWith(t)),b=Object(u.b)(),[E,v]=Object(a.useState)(0),[k,_]=Object(a.useState)(0),[w,S]=Object(a.useState)(n.length>0?n[0]:""),C=null===E||null===k||0===E&&0===k||isNaN(E)||isNaN(k)||E<0||k<0||b.fundsb.numShares;function x(t,e){return(t+e*b.sharePrice)/o.a.BribeToRepRatio}return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(m.a,null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),r.a.createElement(g.a,{display:"flex",alignItems:"center"},r.a.createElement(m.a,null,"Faction:"),r.a.createElement(y.a,{value:w,onChange:function(t){S(t.target.value)}},n.map(t=>{if(i.a[t].getInfo().offersWork()&&!e.hasGangWith(t))return r.a.createElement(d.a,{key:t,value:t},t)}))),r.a.createElement(m.a,null,function(t,e){return 0===t&&0===e?"":isNaN(t)||isNaN(e)||t<0||e<0?"ERROR: Invalid value(s) entered":b.fundsb.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+s.a.formatReputation(x(t,e))+" reputation with "+w+" with this bribe"}(E||0,k||0)),r.a.createElement(p.a,{onChange:function(t){v(parseFloat(t.target.value))},placeholder:"Corporation funds"}),r.a.createElement(p.a,{sx:{mx:1},onChange:function(t){_(parseFloat(t.target.value))},placeholder:"Stock Shares"}),r.a.createElement(h.a,{disabled:C,sx:{mx:1},onClick:()=>function(e,n){const a=i.a[w];if(C)return;const r=x(e,n);Object(l.a)("You gained "+s.a.formatReputation(r)+" reputation with "+a.name+" by bribing them."),a.playerReputation+=r,b.funds=b.funds-e,b.numShares-=n,t.onClose()}(E||0,k||0)},"Bribe"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(4),o=n(16),s=n(41),l=n(30),c=n(48),f=n(1),u=n(81),m=n(10),h=n(20),d=n(69),p=n(28);function g(t){const e=l.b.Player(),n=Object(c.b)(),[g,y]=Object(a.useState)(null),b=null===g||isNaN(g)||g<=0||g>n.numShares;function E(t){if(null===t.shares)return r.a.createElement(r.a.Fragment,null);if(isNaN(t.shares)||t.shares<=0)return r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(t.shares>n.numShares)return r.a.createElement(r.a.Fragment,null,"You don't have this many shares to sell!");{const e=n.calculateShareSale(t.shares)[0];return r.a.createElement(r.a.Fragment,null,"Sell ",t.shares," shares for a total of ",i.a.formatMoney(e))}}function v(){if(!b)try{const a=Object(d.s)(n,e,g);t.onClose(),Object(o.a)(r.a.createElement(r.a.Fragment,null,"Sold ",i.a.formatMoney(g)," shares for",r.a.createElement(h.a,{money:a}),". The corporation's stock price fell to  ",r.a.createElement(h.a,{money:n.sharePrice}),"as a result of dilution.")),t.rerender()}catch(t){Object(o.a)(t+"")}}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation).",r.a.createElement("br",null),r.a.createElement("br",null),"Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"The current price of your company's stock is ",i.a.formatMoney(n.sharePrice)),r.a.createElement(E,{shares:g,corp:n}),r.a.createElement("br",null),r.a.createElement(u.a,{variant:"standard",autoFocus:!0,type:"number",placeholder:"Shares to sell",onChange:function(t){""===t.target.value?y(null):y(Math.round(parseFloat(t.target.value)))},onKeyDown:function(t){t.key===p.a.ENTER&&v()}}),r.a.createElement(m.a,{disabled:b,onClick:v,sx:{mx:1}},"Sell shares"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(41),o=n(4),s=n(30),l=n(48),c=n(1),f=n(10),u=n(81),m=n(69),h=n(16),d=n(28);function p(t){const e=s.b.Player(),n=Object(l.b)(),[p,g]=Object(a.useState)(null);const y=1.1*n.sharePrice,b=null===p||isNaN(p)||p<=0||p>n.issuedShares||p*y>e.money;function E(){if(!b){try{Object(m.c)(n,e,p)}catch(t){Object(h.a)(t+"")}t.onClose(),t.rerender()}}function v(){return null===p?r.a.createElement(r.a.Fragment,null):isNaN(p)||p<=0?r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):p>n.issuedShares?r.a.createElement(r.a.Fragment,null,"There are not this many shares available to buy back. There are only"," ",o.a.formatBigNumber(n.issuedShares)," outstanding shares."):r.a.createElement(r.a.Fragment,null,"Purchase ",p," shares for a total of ",o.a.formatMoney(p*y))}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"To purchase these shares, you must use your own money (NOT your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"The current buyback price of your company's stock is ",o.a.formatMoney(y),". Your company currently has ",o.a.formatBigNumber(n.issuedShares)," outstanding stock shares."),r.a.createElement(v,null),r.a.createElement("br",null),r.a.createElement(u.a,{autoFocus:!0,type:"number",placeholder:"Shares to buyback",onChange:function(t){""===t.target.value?g(null):g(Math.round(parseFloat(t.target.value)))},onKeyDown:function(t){t.key===d.a.ENTER&&E()}}),r.a.createElement(f.a,{disabled:b,onClick:E},"Buy shares"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(16),o=n(41),s=n(38),l=n(69),c=n(48),f=n(1),u=n(81),m=n(10),h=n(28);function d(t){const e=Object(c.b)(),[n,d]=Object(a.useState)(0),p=!isNaN(n)&&n>=0&&n<=100*s.a.DividendMaxPercentage;function g(){if(p&&null!==n){try{Object(l.i)(e,n/100)}catch(t){Object(i.a)(t+"")}t.onClose()}}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.",r.a.createElement("br",null),r.a.createElement("br",null),"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and 100. (A percentage of 0 means no dividends will be issued)",r.a.createElement("br",null),r.a.createElement("br",null),"Two important things to note:",r.a.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",r.a.createElement("br",null),r.a.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),r.a.createElement(u.a,{autoFocus:!0,value:n,onChange:function(t){if(""===t.target.value)d(0);else{let e=parseFloat(t.target.value);e>100&&(e=100),e<0&&(e=0),d(e)}},onKeyDown:function(t){t.key===h.a.ENTER&&g()},placeholder:"Dividend %",type:"number"}),r.a.createElement(m.a,{disabled:!p,sx:{mx:1},onClick:g},"Allocate Dividend Percentage"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(4),o=n(16),s=n(41),l=n(36),c=n(38),f=n(48),u=n(1),m=n(81),h=n(10),d=n(28);function p(t){const e=Object(f.b)();if(null===t.shares)return r.a.createElement(r.a.Fragment,null);const n=Math.round(.9*e.sharePrice),a=Math.round(.2*e.totalShares),o=a-a%1e6;let s=t.shares;return isNaN(s)?r.a.createElement(u.a,null,"Invalid input"):(s/=1e7,s=1e7*Math.round(s),s<1e7?r.a.createElement(u.a,null,"Must issue at least 10 million new shares"):s>o?r.a.createElement(u.a,null,"You cannot issue that many shares"):r.a.createElement(u.a,null,"Issue ",i.a.format(s,"0.000a")," new shares for"," ",i.a.formatMoney(s*n),"?"))}function g(t){const e=Object(f.b)(),[n,g]=Object(a.useState)(null),y=Math.round(.2*e.totalShares),b=y-y%1e6,E=1e7*Math.round((n||0)/1e7),v=null===n||isNaN(E)||E<1e7||E>b;function k(){if(null===n)return;if(v)return;const a=Math.round(.9*e.sharePrice);let r=n;r=1e7*Math.round(r/1e7);const s=r*a;e.issueNewSharesCooldown=c.a.IssueNewSharesCooldown,e.totalShares+=r;let f=Object(l.a)(0,Math.round(r/2));f=1e6*Math.round(f/1e6),e.issuedShares+=r-f,e.funds=e.funds+s,e.immediatelyUpdateSharePrice(),t.onClose(),Object(o.a)(`Issued ${i.a.format(r,"0.000a")} and raised ${i.a.formatMoney(s)}. ${i.a.format(f,"0.000a")} of these shares were bought by private investors.

Stock price decreased to `+i.a.formatMoney(e.sharePrice))}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(u.a,null,"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.",r.a.createElement("br",null),r.a.createElement("br",null)," * You can issue at most ",i.a.formatMoney(b)," new shares",r.a.createElement("br",null)," * New shares are sold at a 10% discount",r.a.createElement("br",null)," * You can only issue new shares once every 12 hours",r.a.createElement("br",null)," * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share",r.a.createElement("br",null)," * Number of new shares issued must be a multiple of 10 million",r.a.createElement("br",null),r.a.createElement("br",null),"When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back."),r.a.createElement(p,{shares:n}),r.a.createElement(m.a,{autoFocus:!0,placeholder:"# New Shares",onChange:function(t){""===t.target.value?g(null):g(parseFloat(t.target.value))},onKeyDown:function(t){t.key===d.a.ENTER&&k()}}),r.a.createElement(h.a,{disabled:v,onClick:k,sx:{mx:1}},"Issue New Shares"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(4),o=n(38),s=n(41),l=n(48),c=n(1),f=n(10);function u(t){const e=Object(l.b)(),n=e.determineValuation();if(e.fundingRound>=o.a.FundingRoundShares.length||e.fundingRound>=o.a.FundingRoundMultiplier.length)return r.a.createElement(r.a.Fragment,null);const a=o.a.FundingRoundShares[e.fundingRound],u=n*a*o.a.FundingRoundMultiplier[e.fundingRound],m=Math.floor(o.a.INITIALSHARES*a);return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"An investment firm has offered you ",i.a.formatMoney(u)," in funding in exchange for a"," ",i.a.format(100*a,"0.000a"),"% stake in the company (",i.a.format(m,"0.000a")," shares).",r.a.createElement("br",null),r.a.createElement("br",null),"Do you accept or reject this offer?",r.a.createElement("br",null),r.a.createElement("br",null),"Hint: Investment firms will offer more money if your corporation is turning a profit"),r.a.createElement(f.a,{onClick:function(){e.fundingRound++,e.addFunds(u),e.numShares-=m,t.rerender(),t.onClose()}},"Accept"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(16),o=n(41),s=n(4),l=n(48),c=n(1),f=n(10),u=n(81),m=n(21),h=n(28);function d(t){const e=Object(l.b)(),[n,d]=Object(a.useState)(""),p=e.determineValuation()/e.totalShares;function g(){const a=parseFloat(n),r=e.determineValuation()/e.totalShares;isNaN(a)?Object(i.a)("Invalid value for number of issued shares"):a>e.numShares?Object(i.a)("Error: You don't have that many shares to issue!"):(e.public=!0,e.sharePrice=r,e.issuedShares=a,e.numShares-=a,e.addFunds(a*r),t.rerender(),Object(i.a)(`You took your ${e.name} public and earned `+s.a.formatMoney(a*r)+" in your IPO"),t.onClose())}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive ",s.a.formatMoney(p)," per share (the IPO money will be deposited directly into your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"You have a total of ",s.a.format(e.numShares,"0.000a")," of shares that you can issue."),r.a.createElement(m.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,{value:n,onChange:function(t){d(t.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(t){t.key===h.a.ENTER&&g()}}),r.a.createElement(f.a,{disabled:parseFloat(n)<0||parseFloat(n)>e.numShares,sx:{mx:1},onClick:g},"Go Public")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(1197),o=n(1198),s=n(30),l=n(176);function c(t,e,n){const a=n-Math.pow(e,.9)/250-t.intelligence/1600;return a<0?0:a>3?3:a}function f(t){const e=s.b.Player(),n=s.b.Router(),[f,u]=Object(a.useState)(!1);if(void 0===t.location.infiltrationData)throw new Error("Trying to do infiltration on invalid location.");const m=t.location.infiltrationData.startingSecurityLevel,h=function(t,e){return c(t,t.strength+t.defense+t.dexterity+t.agility+t.charisma,e)}(e,m),d=function(t,e){return c(t,Object(l.b)(9e3*t.strength_exp_mult,t.strength_mult)+Object(l.b)(9e3*t.defense_exp_mult,t.defense_mult)+Object(l.b)(9e3*t.agility_exp_mult,t.agility_mult)+Object(l.b)(9e3*t.dexterity_exp_mult,t.dexterity_mult)+Object(l.b)(9e3*t.charisma_exp_mult,t.charisma_mult),e)}(e,m);return console.log(`${h} ${d}`),f?r.a.createElement(o.a,{StartingDifficulty:m,Difficulty:h,Reward:d,MaxLevel:t.location.infiltrationData.maxClearanceLevel}):r.a.createElement(i.a,{Location:t.location,Difficulty:h,MaxLevel:t.location.infiltrationData.maxClearanceLevel,start:()=>u(!0),cancel:function(){n.toCity()}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(60),o=n(1),s=n(10),l=n(4);function c(t,e){let n="";return e<=0?e=0:e>13?e=13:(e--,n=">"),r.a.createElement("span",{style:{color:t}},"=".repeat(e),n," ".repeat(13-n.length-e))}function f(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h4"},"Infiltrating ",t.Location.name)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Maximum level: ",t.MaxLevel)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Difficulty: ",l.a.format(33.3333*t.Difficulty,"0")," / 100")),t.Difficulty>1.5&&r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Warning: This location is too heavily guarded for your current stats, try training or finding an easier location.")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"[",0===(e=t.Difficulty)?r.a.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.a.createElement(r.a.Fragment,null,c("white",13*e),c("orange",13*(e-1)),c("red",13*(e-2))),"]"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ^ ^ ^ ^"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," Trivial Normal Hard Impossible")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,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."),r.a.createElement("br",null),r.a.createElement(o.a,null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.a.createElement("br",null),r.a.createElement(o.a,null,"No game require use of the mouse."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Spacebar is the default action/confirm button."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Everything that uses arrow can also use WASD"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sometimes the rest of the keyboard is used.")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:t.start},"Start")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:t.cancel},"Cancel"))));var e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var a,r=n(30),i=n(0),o=n.n(i),s=n(60),l=n(10),c=n(1199),f=n(1200),u=n(1201),m=n(1202),h=n(1203),d=n(1204),p=n(1205),g=n(1206),y=n(1207),b=n(1208),E=n(1);!function(t){t[t.Countdown=0]="Countdown",t[t.Minigame=1]="Minigame",t[t.Result=2]="Result",t[t.Sell=3]="Sell"}(a||(a={}));const v=[u.a,f.a,m.a,h.a,d.a,p.a,g.a,y.a];function k(t){const e=r.b.Player(),n=r.b.Router(),[f,u]=Object(i.useState)(1),[m,h]=Object(i.useState)(a.Countdown),[d,p]=Object(i.useState)(""),[g,y]=Object(i.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*v.length)});function k(){let t=g.lastGames[0];const e=[g.lastGames[0],g.lastGames[1],g.id];for(;e.includes(t);)t=Math.floor(Math.random()*v.length);return t}function _(){y({lastGames:[g.lastGames[1],g.id],id:k()})}function w(t){p(e=>{let n=e;return n+=t?"✓":"✗",n.length>15&&(n=n.slice(1)),n})}let S;switch(m){case a.Countdown:S=o.a.createElement(c.a,{onFinish:()=>h(a.Minigame)});break;case a.Minigame:{const r=v[g.id];S=o.a.createElement(r,{onSuccess:function(){w(!0),f===t.MaxLevel?h(a.Sell):(h(a.Countdown),u(f+1)),_()},onFailure:function(r){h(a.Countdown),w(!1);const i=null!=r&&r.automated?e.hp:3*t.StartingDifficulty;e.takeDamage(i)?n.toCity():_()},difficulty:t.Difficulty+f/50});break}case a.Sell:S=o.a.createElement(b.a,{StartingDifficulty:t.StartingDifficulty,Difficulty:t.Difficulty,Reward:t.Reward,MaxLevel:t.MaxLevel})}function C(){return o.a.createElement(E.a,{variant:"h4"},o.a.createElement("span",{style:{color:"gray"}},d.slice(0,d.length-1)),d[d.length-1])}return o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{container:!0,spacing:3},o.a.createElement(s.a,{item:!0,xs:3},o.a.createElement(l.a,{onClick:function(){n.toCity()}},"Cancel")),o.a.createElement(s.a,{item:!0,xs:3},o.a.createElement(E.a,null,"Level: ",f," / ",t.MaxLevel),o.a.createElement(C,null)),o.a.createElement(s.a,{item:!0,xs:12},S)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(60),o=n(1);function s(t){const[e,n]=Object(a.useState)(3);return Object(a.useEffect)(()=>{0!==e?setTimeout(()=>n(e-1),200):t.onFinish()}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(o.a,{variant:"h4"},"Get Ready!"),r.a.createElement(o.a,{variant:"h4"},e))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(60),o=n(215),s=n(216),l=n(133),c=n(217),f=n(606),u=n(1),m=n(28);const h={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};function d(t){const e={timer:0,min:0,max:0};Object(c.a)(h,t.difficulty,e);const n=e.timer,[d,p]=Object(a.useState)(""),[g]=Object(a.useState)(function(t){let e="";const n=[m.a.OPEN_BRACKET,m.a.LESS_THAN,m.a.OPEN_PARENTHESIS,m.a.OPEN_BRACE],a=Object(l.d)(t.min,t.max);for(let t=0;t{let t=window.setTimeout(()=>{m(1),t=window.setTimeout(()=>{m(2),t=window.setTimeout(()=>m(0),e.window)},250)},3250*Math.random()+1500-(250+e.window));return()=>{clearInterval(t)}},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:5e3,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(c.a,{variant:"h4"},"Slash when his guard is down!"),0===n&&r.a.createElement(c.a,{variant:"h4"},"Guarding ..."),1===n&&r.a.createElement(c.a,{variant:"h4"},"Preparing?"),2===n&&r.a.createElement(c.a,{variant:"h4"},"ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(e){e.preventDefault(),e.key===f.a.SPACE&&(2!==n?t.onFailure():t.onSuccess())},onFailure:t.onFailure})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(60),o=n(215),s=n(216),l=n(133),c=n(217),f=n(606),u=n(1),m=n(28);const h={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};function d(t){const e={timer:0,min:0,max:0};Object(c.a)(h,t.difficulty,e);const n=e.timer,[d]=Object(a.useState)(function(t){const e=Object(l.d)(t.min,t.max);let n="";for(let t=0;t0&&(n+=" "),n+=p[Math.floor(Math.random()*p.length)];return n}(e)),[g,y]=Object(a.useState)("");return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:n,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(u.a,{variant:"h4"},"Type it backward"),r.a.createElement(o.a,{onKeyDown:function(e){if(e.preventDefault(),e.key===m.a.BACKSPACE)return;const n=g+e.key.toUpperCase();d.startsWith(n)?d===n?t.onSuccess():y(n):t.onFailure()},onFailure:t.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(u.a,{style:{transform:"scaleX(-1)"}},d)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(u.a,null,g,r.a.createElement(f.a,null))))}const p=["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"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(60),o=n(215),s=n(216),l=n(217),c=n(1),f=n(28),u=n(133);const m={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};function h(t){const e={timer:0,size:0};Object(l.a)(m,t.difficulty,e);const n=e.timer,[h]=Object(a.useState)(function(t){const e=[];e.push(d[Math.floor(Math.random()*d.length)]);for(let n=0;n0;e--){const n=Math.floor(Math.random()*(e+1)),a=t[e];t[e]=t[n],t[n]=a}}(e),e}(e)),[g,y]=Object(a.useState)(0);return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:n,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(c.a,{variant:"h4"},"Say something nice about the guard."),r.a.createElement(o.a,{onKeyDown:function(e){e.preventDefault();const n=e.key;if(n===f.a.SPACE)return void(d.includes(h[g])?t.onSuccess():t.onFailure());let a=g;for([f.a.UP_ARROW,f.a.W,f.a.RIGHT_ARROW,f.a.D].map(t=>t).includes(n)&&a++,[f.a.DOWN_ARROW,f.a.S,f.a.LEFT_ARROW,f.a.A].map(t=>t).includes(n)&&a--;a<0;)a+=h.length;for(;a>h.length-1;)a-=h.length;y(a)},onFailure:t.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(c.a,{variant:"h5",color:"primary"},u.f),r.a.createElement(c.a,{variant:"h5",color:"primary"},h[g]),r.a.createElement(c.a,{variant:"h5",color:"primary"},u.a)))}const d=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],p=["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"]},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(60),o=n(215),s=n(216),l=n(133),c=n(217),f=n(1);const u={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:10}};function m(t){const e={timer:0,min:0,max:0};Object(c.a)(u,t.difficulty,e);const n=e.timer,[m]=Object(a.useState)(function(t){const e=[l.c,l.e,l.f,l.a];let n="";for(let a=0;a=m.length&&t.onSuccess()):t.onFailure()},onFailure:t.onFailure})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(60),o=n(215),s=n(216),l=n(217),c=n(133),f=n(1),u=n(28);const m={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function h(t){const e={timer:0,width:0,height:0,symbols:0};Object(l.a)(m,t.difficulty,e);const n=e.timer,[h]=Object(a.useState)(function(t){const e=[];for(let n=0;ne==g?r.a.createElement("span",{key:""+e,style:{fontSize:"1em",color:"blue"}},t," "):r.a.createElement("span",{key:""+e,style:{fontSize:"1em"}},t," "))),r.a.createElement("br",null),h.map((t,e)=>r.a.createElement("div",{key:e},r.a.createElement(f.a,null,t.map((t,n)=>n==b[0]&&e==b[1]?r.a.createElement("span",{key:`${n}${e}`,style:{fontSize:"2em",color:"blue"}},t," "):r.a.createElement("span",{key:`${n}${e}`,style:{fontSize:"2em"}},t," "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(e){e.preventDefault();const n=[0,0];switch(Object(c.b)(e)){case c.f:n[1]--;break;case c.c:n[0]--;break;case c.a:n[1]++;break;case c.e:n[0]++}const a=[b[0]+n[0],b[1]+n[1]];if(a[0]=(a[0]+h[0].length)%h[0].length,a[1]=(a[1]+h.length)%h.length,E(a),e.key===u.a.SPACE){if(h[b[1]][b[0]]!==p[g])return void t.onFailure();y(g+1),p.length===g+1&&t.onSuccess()}},onFailure:t.onFailure})))}function d(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(60),o=n(215),s=n(216),l=n(217),c=n(133),f=n(1),u=n(28);const m={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function h(t){const e={timer:0,width:0,height:0,mines:0};Object(l.a)(m,t.difficulty,e);const n=e.timer,[h]=Object(a.useState)(function(t){const e=d(t);for(let n=0;n{const t=setTimeout(()=>v(!1),2e3);return()=>clearInterval(t)},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:n,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(f.a,{variant:"h4"},E?"Remember all the mines!":"Mark all the mines!"),h.map((t,e)=>r.a.createElement("div",{key:e},r.a.createElement(f.a,null,t.map((t,n)=>E?h[e][n]?r.a.createElement("span",{key:n},"[?] "):r.a.createElement("span",{key:n},"[ ] "):n==y[0]&&e==y[1]?r.a.createElement("span",{key:n},"[X] "):p[e][n]?r.a.createElement("span",{key:n},"[.] "):r.a.createElement("span",{key:n},"[ ] "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(e){if(e.preventDefault(),E)return;const n=[0,0];switch(Object(c.b)(e)){case c.f:n[1]--;break;case c.c:n[0]--;break;case c.a:n[1]++;break;case c.e:n[0]++}const a=[y[0]+n[0],y[1]+n[1]];if(a[0]=(a[0]+h[0].length)%h[0].length,a[1]=(a[1]+h.length)%h.length,b(a),e.key==u.a.SPACE){if(!h[y[1]][y[0]])return void t.onFailure();g(e=>(e[y[1]][y[0]]=!0,function(t,e){function n(t){return t.flat().reduce((t,e)=>t+(e?1:0),0)}return n(t)===n(e)}(h,e)&&t.onSuccess(),e))}},onFailure:t.onFailure})))}function d(t){const e=[];for(let n=0;nr.a.createElement(o.a,{key:e},t.toString())),r.a.createElement(o.a,null,new Array(u.length).fill(0).map((t,e)=>r.a.createElement("span",{key:e}," ",e+1,"    "))),new Array(8).fill(0).map((t,e)=>r.a.createElement("div",{key:e},r.a.createElement(o.a,null,u.map((t,n)=>3!==e&&4!==e||!p[n]?r.a.createElement("span",{key:n,style:{color:t.colors[e%t.colors.length]}},"|",t.tpe,"|   "):r.a.createElement("span",{key:n},"      "))))),r.a.createElement(s.a,{onKeyDown:function(e){e.preventDefault();const n=parseInt(e.key);n<1||n>u.length||isNaN(n)||g(e=>{const a=[...e];a[n-1]=!0,function(t){return!E.some(e=>e.shouldCut(u[t-1],t-1))}(n)&&t.onFailure();const r=[];for(let t=0;tt===a[e])&&t.onSuccess(),a})},onFailure:t.onFailure})))}function y(t){const e=Math.floor(Math.random()*t.length);return{toString:()=>`Cut wires number ${e+1}.`,shouldCut:(t,n)=>e===n}}function b(t){const e=t[Math.floor(Math.random()*t.length)].colors[0];return{toString:()=>`Cut all wires colored ${p[e]}.`,shouldCut:t=>t.colors.includes(e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(29),r=n(0),i=n.n(r),o=n(60),s=n(20),l=n(116),c=n(6),f=n(30),u=n(1),m=n(10),h=n(79),d=n(128);function p(t){const e=f.b.Player(),n=f.b.Router(),[p,g]=Object(r.useState)("none");function y(){n.toCity()}const b=t.MaxLevel*Math.pow(1.01,t.MaxLevel),E=Math.pow(t.Reward+1,1.1)*Math.pow(t.StartingDifficulty,1.2)*30*b*c.a.InfiltrationRep,v=Math.pow(t.Reward+1,2)*Math.pow(t.StartingDifficulty,3)*3e3*b*c.a.InfiltrationMoney;return i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{container:!0,spacing:3},i.a.createElement(o.a,{item:!0,xs:10},i.a.createElement(u.a,{variant:"h4"},"Infiltration successful!")),i.a.createElement(o.a,{item:!0,xs:10},i.a.createElement(u.a,{variant:"h5",color:"primary"},"You can trade the confidential information you found for money or reputation."),i.a.createElement(d.a,{value:p,onChange:function(t){g(t.target.value)}},i.a.createElement(h.a,{key:"none",value:"none"},"none"),e.factions.filter(t=>a.a[t].getInfo().offersWork()).map(t=>i.a.createElement(h.a,{key:t,value:t},t))),i.a.createElement(m.a,{onClick:function(){"none"!==p&&(a.a[p].playerReputation+=E,y())}},"Trade for ",i.a.createElement(l.a,{reputation:E})," reputation")),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(m.a,{onClick:function(){e.gainMoney(v,"infiltration"),y()}},"Sell for ",i.a.createElement(s.a,{money:v}))),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(m.a,{onClick:y},"Quit"))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var a=n(0),r=n.n(a),i=n(30),o=n(8),s=n(4),l=n(116),c=n(468),f=n(110),u=n(20),m=n(24),h=n(29),d=n(237),p=n(66),g=n(218),y=n(11),b=n(1),E=n(60),v=n(10),k=n(192);const _=1e3/o.a.MilliPerCycle;function w(){const t=Object(a.useState)(!1)[1];function e(){t(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(e,o.a.MilliPerCycle);return()=>clearInterval(t)},[]);const n=i.b.Player(),w=i.b.Router();if(n.workType==o.a.WorkTypeFaction){const t=h.a[n.currentWorkFactionName];if(!t)return r.a.createElement(r.a.Fragment,null,r.a.createElement(b.a,{variant:"h4",color:"primary"},"You have not joined ",n.currentWorkFactionName||"(Faction not found)"," yet or cannot work at this time, please try again if you think this should have worked"),r.a.createElement(v.a,{onClick:()=>w.toFactions()},"Back to Factions"));function S(){w.toFaction(t),n.finishFactionWork(!0)}function C(){w.toFaction(t),n.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently ",n.currentWorkFactionDescription," for your faction ",t.name,r.a.createElement("br",null),"(Current Faction Reputation: ",r.a.createElement(l.a,{reputation:t.playerReputation}),"). ",r.a.createElement("br",null),"You have been doing this for ",Object(m.b)(n.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{money:n.workMoneyGained})," (",r.a.createElement(f.a,{money:n.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:n.workRepGained})," (",r.a.createElement(c.a,{reputation:n.workRepGainRate*_}),") reputation for this faction ",r.a.createElement("br",null),r.a.createElement("br",null),n.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workHackExpGained)," (",s.a.formatExp(n.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null)),r.a.createElement("br",null),n.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workStrExpGained)," (",s.a.formatExp(n.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null)),n.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDefExpGained)," (",s.a.formatExp(n.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null)),n.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDexExpGained)," (",s.a.formatExp(n.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null)),n.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workAgiExpGained)," (",s.a.formatExp(n.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null)),r.a.createElement("br",null),n.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workChaExpGained)," (",s.a.formatExp(n.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null)),r.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",r.a.createElement("br",null),"There is no penalty for cancelling earlier.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Stop Faction Work"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}const x=n.className;if(""!==n.className){function S(){n.finishClass(!0),w.toCity()}function C(){w.toCity(),n.stopFocusing()}let t="";return t=x==o.a.ClassGymStrength||x==o.a.ClassGymDefense||x==o.a.ClassGymDexterity||x==o.a.ClassGymAgility?"Stop training at gym":"Stop taking course",r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You have been ",x," for ",Object(m.b)(n.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"This has cost you: ",r.a.createElement("br",null),r.a.createElement(u.a,{money:-n.workMoneyGained})," (",r.a.createElement(f.a,{money:n.workMoneyLossRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),"You have gained: ",r.a.createElement("br",null),n.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workHackExpGained)," (",s.a.formatExp(n.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null)),n.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workStrExpGained)," (",s.a.formatExp(n.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null)),n.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDefExpGained)," (",s.a.formatExp(n.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null)),n.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDexExpGained)," (",s.a.formatExp(n.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null)),n.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workAgiExpGained)," (",s.a.formatExp(n.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null)),n.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workChaExpGained)," (",s.a.formatExp(n.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null)),"You may cancel at any time")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},t),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(n.workType==o.a.WorkTypeCompany){const t=p.a[n.companyName];if(null==t||!(t instanceof d.a))return r.a.createElement(r.a.Fragment,null,r.a.createElement(b.a,{variant:"h4",color:"primary"},"You cannot work for ",n.companyName||"(Company not found)"," at this time, please try again if you think this should have worked"),r.a.createElement(v.a,{onClick:()=>w.toTerminal()},"Back to Terminal"));const e=t.playerReputation;function S(){n.finishWork(!0),w.toJob()}function C(){n.stopFocusing(),w.toJob()}const a=n.jobs[n.companyName],i=.5===n.cancelationPenalty()?"half":"three-quarters";return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",a," at ",n.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:e}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(n.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{money:n.workMoneyGained})," (",r.a.createElement(f.a,{money:n.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:n.workRepGained})," (",r.a.createElement(c.a,{reputation:n.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),n.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workHackExpGained)," (",s.a.formatExp(n.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null)),r.a.createElement("br",null),n.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workStrExpGained)," (",s.a.formatExp(n.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null)),n.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDefExpGained)," (",s.a.formatExp(n.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null)),n.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDexExpGained)," (",s.a.formatExp(n.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null)),n.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workAgiExpGained)," (",s.a.formatExp(n.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null)),r.a.createElement("br",null),n.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workChaExpGained)," (",s.a.formatExp(n.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null)),r.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 ",i," of the reputation you've earned so far.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(n.workType==o.a.WorkTypeCompanyPartTime){function S(){n.finishWorkPartTime(!0),w.toJob()}function C(){n.stopFocusing(),w.toJob()}const t=p.a[n.companyName];let e=0;if(null==t||!(t instanceof d.a))throw new Error("Could not find Company: "+n.companyName);e=t.playerReputation;const a=n.jobs[n.companyName];return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",a," at ",n.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:e}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(n.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{money:n.workMoneyGained})," (",r.a.createElement(f.a,{money:n.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:n.workRepGained})," (",r.a.createElement(c.a,{reputation:n.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),n.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workHackExpGained)," (",s.a.formatExp(n.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null)),r.a.createElement("br",null),n.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workStrExpGained)," (",s.a.formatExp(n.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null)),n.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDefExpGained)," (",s.a.formatExp(n.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null)),n.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workDexExpGained)," (",s.a.formatExp(n.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null)),n.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workAgiExpGained)," (",s.a.formatExp(n.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null)),r.a.createElement("br",null),n.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(n.workChaExpGained)," (",s.a.formatExp(n.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null)),r.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.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(""!==n.crimeType){const t=Math.round(n.timeWorked/n.timeNeededToCompleteWork*100);let e=Math.round(t/5);e<0&&(e=0),e>20&&(e=20);const a=Object(k.a)({progress:(e+1)/20,totalTicks:20});return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,r.a.createElement(b.a,null,"You are attempting to ",n.crimeType,"."),r.a.createElement("br",null),r.a.createElement(b.a,null,"Time remaining: ",Object(m.b)(n.timeNeededToCompleteWork-n.timeWorked)),r.a.createElement("br",null),r.a.createElement("pre",null,a))),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{onClick:()=>{w.toLocation(g.a[y.a.Slums]),n.finishCrime(!0)}},"Cancel crime")))}if(""!==n.createProgramName){function S(){n.finishCreateProgramWork(!0),w.toTerminal()}function C(){w.toTerminal(),n.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working on coding ",n.createProgramName,".",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(n.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"The program is ",(n.timeWorkedCreateProgram/n.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",r.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Cancel work on creating program"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(""!==n.graftAugmentationName){function S(){n.finishGraftAugmentationWork(!0),w.toTerminal()}function C(){w.toTerminal(),n.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working on crafting ",n.graftAugmentationName,".",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(n.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"The augmentation is"," ",(n.timeWorkedGraftAugmentation/n.timeNeededToCompleteWork*100).toFixed(2),"% done being crafted.",r.a.createElement("br",null),"If you cancel, your work will ",r.a.createElement("b",null,"not")," be saved, and the money you spent will ",r.a.createElement("b",null,"not")," be returned.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Cancel work on crafting Augmentation"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}return n.workType||w.toTerminal(),r.a.createElement(r.a.Fragment,null)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return G}));var a=n(0),r=n.n(a),i=n(113),o=n(137),s=n(1),l=n(538),c=n(60),f=n(128),u=n(79),m=n(10),h=n(21),d=n(286),p=n(74),g=n(120),y=n(23),b=n(81),E=n(1251),v=n.n(E),k=n(1252),_=n.n(k),w=n(452),S=n.n(w),C=n(1253),x=n.n(C),L=n(1211),O=n(250),M=n(140),T=n(9),A=n(607),R=n(609),N=n(610),P=n(620),I=n(369),F=n(187),D=n(108),j=n(24);const B=Object(i.a)(t=>Object(o.a)({root:{width:50,padding:t.spacing(2),userSelect:"none"}}));function G(t){var e,n,i,o,E,k,w,C;const G=B(),W=Object(a.useRef)(null),[H,U]=Object(a.useState)(T.a.CodeInstructionRunTime),[q,$]=Object(a.useState)(T.a.MaxLogCapacity),[K,z]=Object(a.useState)(T.a.MaxPortCapacity),[V,Y]=Object(a.useState)(T.a.MaxTerminalCapacity),[J,X]=Object(a.useState)(T.a.AutosaveInterval),[Q,Z]=Object(a.useState)(T.a.TimestampsFormat),[tt,et]=Object(a.useState)(T.a.Locale),[nt,at]=Object(a.useState)(!1),[rt,it]=Object(a.useState)(!1),[ot,st]=Object(a.useState)(null);return r.a.createElement("div",{className:G.root,style:{width:"90%"}},r.a.createElement(s.a,{variant:"h4",gutterBottom:!0},"Options"),r.a.createElement(c.a,{container:!0,spacing:3},r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(d.a,null,r.a.createElement(p.a,null,r.a.createElement(h.a,{display:"grid",sx:{width:"fit-content",gridTemplateColumns:"1fr 3.5fr",gap:1}},r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(s.a,null,".script exec time (ms)")),r.a.createElement(l.a,{value:H,onChange:function(t,e){U(e),T.a.CodeInstructionRunTime=e},step:1,min:5,max:100,valueLabelDisplay:"auto"}),r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(s.a,null,"Netscript log size")),r.a.createElement(l.a,{value:q,onChange:function(t,e){$(e),T.a.MaxLogCapacity=e},step:20,min:20,max:500,valueLabelDisplay:"auto"}),r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(s.a,null,"Netscript port size")),r.a.createElement(l.a,{value:K,onChange:function(t,e){z(e),T.a.MaxPortCapacity=e},step:1,min:20,max:100,valueLabelDisplay:"auto"}),r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to the terminal. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Terminal capacity")),r.a.createElement(l.a,{value:V,onChange:function(t,e){Y(e),T.a.MaxTerminalCapacity=e},step:50,min:50,max:500,valueLabelDisplay:"auto",marks:!0}),r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"The time (in seconds) between each autosave. Set to 0 to disable autosave.")},r.a.createElement(s.a,null,"Autosave interval (s)")),r.a.createElement(l.a,{value:J,onChange:function(t,e){X(e),T.a.AutosaveInterval=e},step:30,min:0,max:600,valueLabelDisplay:"auto",marks:!0}))),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressMessages,onChange:t=>T.a.SuppressMessages=t,text:"Suppress story messages",tooltip:r.a.createElement(r.a.Fragment,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.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressFactionInvites,onChange:t=>T.a.SuppressFactionInvites=t,text:"Suppress faction invites",tooltip:r.a.createElement(r.a.Fragment,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.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressTravelConfirmation,onChange:t=>T.a.SuppressTravelConfirmation=t,text:"Suppress travel confirmations",tooltip:r.a.createElement(r.a.Fragment,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.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressBuyAugmentationConfirmation,onChange:t=>T.a.SuppressBuyAugmentationConfirmation=t,text:"Suppress augmentations confirmation",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the confirmation message before buying augmentation will not show up.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressTIXPopup,onChange:t=>T.a.SuppressTIXPopup=t,text:"Suppress TIX messages",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the stock market will never create any popup.")})),!!t.player.bladeburner&&r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressBladeburnerPopup,onChange:t=>T.a.SuppressBladeburnerPopup=t,text:"Suppress bladeburner popup",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressSavedGameToast,onChange:t=>T.a.SuppressSavedGameToast=t,text:"Suppress Auto-Save Game Toast",tooltip:r.a.createElement(r.a.Fragment,null,'If this is set, there will be no "Game Saved!" toast appearing after an auto-save.')})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressAutosaveDisabledWarnings,onChange:t=>T.a.SuppressAutosaveDisabledWarnings=t,text:"Suppress Auto-Save Disabled Warning",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, there will be no warning triggered when auto-save is disabled (at 0).")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableHotkeys,onChange:t=>T.a.DisableHotkeys=t,text:"Disable hotkeys",tooltip:r.a.createElement(r.a.Fragment,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.')})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableASCIIArt,onChange:t=>T.a.DisableASCIIArt=t,text:"Disable ascii art",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set all ASCII art will be disabled.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableTextEffects,onChange:t=>T.a.DisableTextEffects=t,text:"Disable text effects",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableOverviewProgressBars,onChange:t=>T.a.DisableOverviewProgressBars=t,text:"Disable Overview Progress Bars",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the progress bars in the character overview will be hidden.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.EnableBashHotkeys,onChange:t=>T.a.EnableBashHotkeys=t,text:"Enable bash hotkeys",tooltip:r.a.createElement(r.a.Fragment,null,"Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser shortcuts are overriden by the new Bash shortcuts.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.UseIEC60027_2,onChange:t=>T.a.UseIEC60027_2=t,text:"Use GiB instead of GB",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.ExcludeRunningScriptsFromSave,onChange:t=>T.a.ExcludeRunningScriptsFromSave=t,text:"Exclude Running Scripts from Save",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the save file will exclude all running scripts. This is only useful if your save is lagging a lot. You'll have to restart your script every time you launch the game.")})),r.a.createElement(p.a,null,r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/")},r.a.createElement("span",null,r.a.createElement(b.a,{InputProps:{startAdornment:r.a.createElement(s.a,{color:"format error"===Object(I.a)(Q)&&""!==Q?"error":"success"},"Timestamp format: ")},value:Q,onChange:function(t){Z(t.target.value),T.a.TimestampsFormat=t.target.value},placeholder:"yyyy-MM-dd hh:mm:ss"})))),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SaveGameOnFileSave,onChange:t=>T.a.SaveGameOnFileSave=t,text:"Save game on file save",tooltip:r.a.createElement(r.a.Fragment,null,"Save your game any time a file is saved in the script editor.")})),r.a.createElement(p.a,null,r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Sets the locale for displaying numbers.")},r.a.createElement(s.a,null,"Locale ")),r.a.createElement(f.a,{value:tt,onChange:function(t){et(t.target.value),T.a.Locale=t.target.value}},r.a.createElement(u.a,{value:"en"},"en"),r.a.createElement(u.a,{value:"bg"},"bg"),r.a.createElement(u.a,{value:"cs"},"cs"),r.a.createElement(u.a,{value:"da-dk"},"da-dk"),r.a.createElement(u.a,{value:"de"},"de"),r.a.createElement(u.a,{value:"en-au"},"en-au"),r.a.createElement(u.a,{value:"en-gb"},"en-gb"),r.a.createElement(u.a,{value:"es"},"es"),r.a.createElement(u.a,{value:"fr"},"fr"),r.a.createElement(u.a,{value:"hu"},"hu"),r.a.createElement(u.a,{value:"it"},"it"),r.a.createElement(u.a,{value:"lv"},"lv"),r.a.createElement(u.a,{value:"no"},"no"),r.a.createElement(u.a,{value:"pl"},"pl"),r.a.createElement(u.a,{value:"ru"},"ru")))),!location.href.startsWith("file://")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(s.a,null,"danielyxie / BigD (Original developer): "),r.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",target:"_blank"},r.a.createElement("input",{type:"hidden",name:"cmd",value:"_s-xclick"}),r.a.createElement("input",{type:"hidden",name:"encrypted",value:"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHUVL4U0+ogZsO1s97IAQyfck9SaoFlxVtqQhkb8752MkQJJvGu3ZQSQGcVC4hFDPk8prXqyq4BU/k/EliwoIIDhzCCA4MwggLsoAMCAQICAQAwDQYJKoZIh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XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----"}),r.a.createElement("input",{type:"image",src:"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif",name:"submit",alt:"PayPal - The safer, easier way to pay online!"}))),r.a.createElement(p.a,null,r.a.createElement(s.a,null,"hydroflame (Current maintainer):"," ",r.a.createElement(g.a,{href:"https://www.google.com/search?q=Where+to+donate+blood+near+me%3F",target:"_blank"},"Donate blood!")," ")))),r.a.createElement(h.a,{sx:{display:"grid",width:"fit-content",height:"fit-content"}},r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(m.a,{onClick:()=>t.save(),startIcon:r.a.createElement(S.a,null)},"Save Game"),r.a.createElement(A.a,null)),r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Export your game to a text file.")},r.a.createElement(m.a,{onClick:()=>t.export(),startIcon:r.a.createElement(v.a,null)},"Export Game")),r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Import your game from a text file.",r.a.createElement("br",null),"This will ",r.a.createElement("strong",null,"overwrite")," your current game. Back it up first!")},r.a.createElement(m.a,{onClick:function(){if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return;const t=W.current;if(null===t)throw new Error("import input should not be null");t.click()},startIcon:r.a.createElement(_.a,null)},"Import Game",r.a.createElement("input",{ref:W,id:"import-game-file-selector",type:"file",hidden:!0,onChange:async function(t){try{const e=await D.c.getImportStringFromFile(t.target.files),n=await D.c.getImportDataFromString(e);st(n),it(!0)}catch(t){M.b.emit(t.toString(),"error",5e3)}}}))),r.a.createElement(O.a,{open:rt,onClose:()=>it(!1),onConfirm:()=>async function(){if(ot){try{await D.c.importGame(ot.base64)}catch(t){M.b.emit(t.toString(),"error",5e3)}it(!1),st(null)}}(),additionalButton:r.a.createElement(m.a,{onClick:function(){ot&&(t.router.toImportSave(ot.base64),it(!1),st(null))}},"Compare Save"),confirmationText:r.a.createElement(r.a.Fragment,null,"Importing a new game will ",r.a.createElement("strong",null,"completely wipe")," the current data!",r.a.createElement("br",null),r.a.createElement("br",null),"Make sure to have a backup of your current save file before importing.",r.a.createElement("br",null),"The file you are attempting to import seems valid.",(null!==(e=null==ot||null===(n=ot.playerData)||void 0===n?void 0:n.lastSave)&&void 0!==e?e:0)>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),"The export date of the save file is"," ",r.a.createElement("strong",null,new Date(null!==(i=null==ot||null===(o=ot.playerData)||void 0===o?void 0:o.lastSave)&&void 0!==i?i:0).toLocaleString())),(null!==(E=null==ot||null===(k=ot.playerData)||void 0===k?void 0:k.totalPlaytime)&&void 0!==E?E:0)>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),"Total play time of imported game:"," ",Object(j.b)(null!==(w=null==ot||null===(C=ot.playerData)||void 0===C?void 0:C.totalPlaytime)&&void 0!==w?w:0)),r.a.createElement("br",null),r.a.createElement("br",null))})),r.a.createElement(h.a,{sx:{display:"grid"}},r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(m.a,{onClick:()=>t.forceKill()},"Force kill all active scripts"))),r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(R.a,{noConfirmation:T.a.SuppressBuyAugmentationConfirmation,onTriggered:t.softReset}),r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(m.a,{onClick:()=>at(!0)},"Diagnose files"))),r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr"}},r.a.createElement(y.a,{title:"Head to the theme browser to see a collection of prebuilt themes."},r.a.createElement(m.a,{startIcon:r.a.createElement(x.a,null),onClick:()=>t.router.toThemeBrowser()},"Theme Browser")),r.a.createElement(N.a,{router:t.router}),r.a.createElement(P.a,null)),r.a.createElement(h.a,null,r.a.createElement(g.a,{href:"https://github.com/danielyxie/bitburner/issues/new",target:"_blank"},r.a.createElement(s.a,null,"Report bug")),r.a.createElement(g.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(g.a,{href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"},r.a.createElement(s.a,null,"Documentation")),r.a.createElement(g.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},r.a.createElement(s.a,null,"Discord")),r.a.createElement(g.a,{href:"https://www.reddit.com/r/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Reddit")),r.a.createElement(g.a,{href:"https://plaza.dsolver.ca/games/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Incremental game plaza"))))),r.a.createElement(L.a,{open:nt,onClose:()=>at(!1)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return _}));var a=n(0),r=n.n(a),i=n(26),o=n(41),s=n(4),l=n(179),c=n(145),f=n(31),u=n(1458),m=n(1459),h=n(45),d=n(1),p=n(65),g=n(153),y=n(154),b=n(155),E=n(75),v=n.n(E);function k(t){const e=Object(i.d)(t.hostname);if(null===e)throw new Error(`server '${t.hostname}' should not be null`);let n=0;for(const t of e.scripts)n+=t.code.length;for(const t of e.textFiles)n+=t.text.length;if(0===n)return r.a.createElement(r.a.Fragment,null);const a=[];for(const t of e.scripts)a.push({name:t.filename,size:t.code.length});for(const t of e.textFiles)a.push({name:t.fn,size:t.text.length});return a.sort((t,e)=>e.size-t.size),r.a.createElement(g.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(y.a,{expandIcon:r.a.createElement(v.a,null)},r.a.createElement(d.a,null,e.hostname," (",s.a.formatBigNumber(n),"b)")),r.a.createElement(b.a,null,r.a.createElement(u.a,{component:p.a},r.a.createElement(l.a,null,r.a.createElement(m.a,null,r.a.createElement(h.a,null,r.a.createElement(f.a,null,r.a.createElement(d.a,null,"Filename")),r.a.createElement(f.a,{align:"right"},r.a.createElement(d.a,null,"Size")))),r.a.createElement(c.a,null,a.map(t=>r.a.createElement(h.a,{key:t.name},r.a.createElement(f.a,{component:"th",scope:"row"},r.a.createElement(d.a,null,t.name)),r.a.createElement(f.a,{align:"right"},r.a.createElement(d.a,null,s.a.formatBigNumber(t.size),"b"))))))),r.a.createElement("ul",null)))}function _(t){const e=[];for(const t of Object(i.c)())e.push(t.hostname);return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(d.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."),e.map(t=>r.a.createElement(k,{key:t,hostname:t}))))}},,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return C}));var a=n(0),r=n.n(a),i=n(41),o=n(10),s=n(350),l=n(1),c=n(23),f=n(65),u=n(81),m=n(114),h=n(366),d=n.n(h),p=n(619),g=n.n(p),y=n(1247),b=n.n(y),E=n(1216),v=n(167),k=n(9),_=n(336),w=n(618);function S({name:t,onColorChange:e,color:n,defaultColor:a}){return void 0===n&&(console.error(`color ${t} was undefined, reverting to default`),n=a),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{mx:1},label:t,value:n,InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{hideTextfield:!0,deferred:!0,value:n,onChange:n=>e(t,"#"+n.hex),disableAlpha:!0})),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{onClick:()=>e(t,a)},r.a.createElement(d.a,{color:"primary"})))}}))}function C(t){const[e,n]=Object(a.useState)({...k.a.theme});function m(t,e){n(n=>(n[t]=e,n)),k.a.theme[t]=e,v.b.emit()}function h(t){!function(t){n(t),Object.assign(k.a.theme,t),v.b.emit()}(t)}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,{sx:{px:1,py:1,my:1}},r.a.createElement(c.a,{open:!0,placement:"top",title:r.a.createElement(l.a,null,"Example tooltip")},r.a.createElement(o.a,{color:"primary",size:"small"},"primary button")),r.a.createElement(o.a,{color:"secondary",size:"small"},"secondary button"),r.a.createElement(o.a,{color:"warning",size:"small"},"warning button"),r.a.createElement(o.a,{color:"info",size:"small"},"info button"),r.a.createElement(o.a,{color:"error",size:"small"},"error button"),r.a.createElement(o.a,{disabled:!0,size:"small"},"disabled button"),r.a.createElement("br",null),r.a.createElement(l.a,{color:"primary",variant:"caption"},"text with primary color")," ",r.a.createElement(l.a,{color:"secondary",variant:"caption"},"text with secondary color")," ",r.a.createElement(l.a,{color:"error",variant:"caption"},"text with error color"),r.a.createElement("br",null),r.a.createElement(u.a,{value:"Text field",size:"small"})),r.a.createElement(f.a,{sx:{py:1,my:1}},r.a.createElement(S,{name:"primarylight",onColorChange:m,color:e.primarylight,defaultColor:k.b.theme.primarylight}),r.a.createElement(S,{name:"primary",onColorChange:m,color:e.primary,defaultColor:k.b.theme.primary}),r.a.createElement(S,{name:"primarydark",onColorChange:m,color:e.primarydark,defaultColor:k.b.theme.primarydark}),r.a.createElement("br",null),r.a.createElement(S,{name:"successlight",onColorChange:m,color:e.successlight,defaultColor:k.b.theme.successlight}),r.a.createElement(S,{name:"success",onColorChange:m,color:e.success,defaultColor:k.b.theme.success}),r.a.createElement(S,{name:"successdark",onColorChange:m,color:e.successdark,defaultColor:k.b.theme.successdark}),r.a.createElement("br",null),r.a.createElement(S,{name:"errorlight",onColorChange:m,color:e.errorlight,defaultColor:k.b.theme.errorlight}),r.a.createElement(S,{name:"error",onColorChange:m,color:e.error,defaultColor:k.b.theme.error}),r.a.createElement(S,{name:"errordark",onColorChange:m,color:e.errordark,defaultColor:k.b.theme.errordark}),r.a.createElement("br",null),r.a.createElement(S,{name:"secondarylight",onColorChange:m,color:e.secondarylight,defaultColor:k.b.theme.secondarylight}),r.a.createElement(S,{name:"secondary",onColorChange:m,color:e.secondary,defaultColor:k.b.theme.secondary}),r.a.createElement(S,{name:"secondarydark",onColorChange:m,color:e.secondarydark,defaultColor:k.b.theme.secondarydark}),r.a.createElement("br",null),r.a.createElement(S,{name:"warninglight",onColorChange:m,color:e.warninglight,defaultColor:k.b.theme.warninglight}),r.a.createElement(S,{name:"warning",onColorChange:m,color:e.warning,defaultColor:k.b.theme.warning}),r.a.createElement(S,{name:"warningdark",onColorChange:m,color:e.warningdark,defaultColor:k.b.theme.warningdark}),r.a.createElement("br",null),r.a.createElement(S,{name:"infolight",onColorChange:m,color:e.infolight,defaultColor:k.b.theme.infolight}),r.a.createElement(S,{name:"info",onColorChange:m,color:e.info,defaultColor:k.b.theme.info}),r.a.createElement(S,{name:"infodark",onColorChange:m,color:e.infodark,defaultColor:k.b.theme.infodark}),r.a.createElement("br",null),r.a.createElement(S,{name:"welllight",onColorChange:m,color:e.welllight,defaultColor:k.b.theme.welllight}),r.a.createElement(S,{name:"well",onColorChange:m,color:e.well,defaultColor:k.b.theme.well}),r.a.createElement(S,{name:"white",onColorChange:m,color:e.white,defaultColor:k.b.theme.white}),r.a.createElement(S,{name:"black",onColorChange:m,color:e.black,defaultColor:k.b.theme.black}),r.a.createElement(S,{name:"backgroundprimary",onColorChange:m,color:e.backgroundprimary,defaultColor:k.b.theme.backgroundprimary}),r.a.createElement(S,{name:"backgroundsecondary",onColorChange:m,color:e.backgroundsecondary,defaultColor:k.b.theme.backgroundsecondary}),r.a.createElement(S,{name:"button",onColorChange:m,color:e.button,defaultColor:k.b.theme.button}),r.a.createElement("br",null),r.a.createElement(S,{name:"hp",onColorChange:m,color:e.hp,defaultColor:k.b.theme.hp}),r.a.createElement(S,{name:"money",onColorChange:m,color:e.money,defaultColor:k.b.theme.money}),r.a.createElement(S,{name:"hack",onColorChange:m,color:e.hack,defaultColor:k.b.theme.hack}),r.a.createElement(S,{name:"combat",onColorChange:m,color:e.combat,defaultColor:k.b.theme.combat}),r.a.createElement(S,{name:"cha",onColorChange:m,color:e.cha,defaultColor:k.b.theme.cha}),r.a.createElement(S,{name:"int",onColorChange:m,color:e.int,defaultColor:k.b.theme.int}),r.a.createElement(S,{name:"rep",onColorChange:m,color:e.rep,defaultColor:k.b.theme.rep}),r.a.createElement(S,{name:"disabled",onColorChange:m,color:e.disabled,defaultColor:k.b.theme.disabled})),r.a.createElement(f.a,{sx:{px:1,py:1,my:1}},r.a.createElement(u.a,{sx:{mb:1},multiline:!0,fullWidth:!0,maxRows:3,label:"import / export theme",value:JSON.stringify(e),onChange:function(t){try{const e=JSON.parse(t.target.value);if("object"!=typeof e)return;n(e);for(const t of Object.keys(e))k.a.theme[t]=e[t];v.b.emit()}catch(t){}}}),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{sx:{my:1}},"Backup your theme or share it with others by copying the string above."),r.a.createElement(w.a,null),r.a.createElement(s.a,null,r.a.createElement(c.a,{title:"Reverts all modification back to the default theme. This is permanent."},r.a.createElement(o.a,{onClick:()=>h(_.a),startIcon:r.a.createElement(b.a,null)},"Revert to Default")),r.a.createElement(c.a,{title:"Move over to the theme browser's page to use one of our predefined themes."},r.a.createElement(o.a,{startIcon:r.a.createElement(g.a,null),onClick:()=>t.router.toThemeBrowser()},"See more themes"))))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var a=n(0),r=n.n(a),i=n(41),o=n(10),s=n(350),l=n(1),c=n(65),f=n(81),u=n(366),m=n.n(u),h=n(452),d=n.n(h),p=n(167),g=n(9),y=n(394),b=n(23);function E({value:t,onChange:e,refreshId:n}){const[i,o]=Object(a.useState)(),[s,l]=Object(a.useState)(t);function c(t){l(t),o(t?"":"Must have a value")}return Object(a.useEffect)(()=>e(s,i),[s]),Object(a.useEffect)(()=>c(t),[n]),r.a.createElement(f.a,{sx:{my:1},label:"Font-Family",error:!!i,value:s,helperText:i,onChange:function(t){c(t.target.value)},fullWidth:!0})}function v({value:t,onChange:e,refreshId:n}){const[i,o]=Object(a.useState)(),[s,l]=Object(a.useState)(t);function c(t){l(t),t?isNaN(Number(t))?o("Must be a number"):o(""):o("Must have a value")}return Object(a.useEffect)(()=>e(s,i),[s]),Object(a.useEffect)(()=>c(t),[n]),r.a.createElement(f.a,{sx:{my:1},label:"Line Height",error:!!i,value:s,helperText:i,onChange:function(t){c(t.target.value)}})}function k(t){const[e,n]=Object(a.useState)(0),[f,u]=Object(a.useState)(),[h,k]=Object(a.useState)({...g.a.styles});function _(t){Object.assign(g.a.styles,t),p.b.emit()}function w(t,e){u(e),e||k(t)}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,{variant:"h6"},"Styles Editor"),r.a.createElement(l.a,null,"WARNING: Changing styles ",r.a.createElement("strong",null,"may mess up")," the interface. Drastic changes are"," ",r.a.createElement("strong",null,"NOT recommended"),"."),r.a.createElement(c.a,{sx:{p:2,my:2}},r.a.createElement(E,{value:h.fontFamily,refreshId:e,onChange:(t,e)=>w({...h,fontFamily:t},e)}),r.a.createElement("br",null),r.a.createElement(v,{value:h.lineHeight,refreshId:e,onChange:(t,e)=>w({...h,lineHeight:t},e)}),r.a.createElement("br",null),r.a.createElement(s.a,{sx:{my:1}},r.a.createElement(o.a,{onClick:function(){const t={...y.a};k(t),_(t),n(e+1)},startIcon:r.a.createElement(m.a,null),color:"secondary",variant:"outlined"},"Revert to Defaults"),r.a.createElement(b.a,{title:"Save styles to settings"},r.a.createElement(o.a,{onClick:function(){_(h)},endIcon:r.a.createElement(d.a,null),color:f?"error":"primary",disabled:!!f},"Save Modifications")))))}},,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(535),o=n(1),s=n(10),l=n(21),c=n(30),f=n(1255),u=n(1261);function m(){const t=c.b.Player(),[e,n]=Object(a.useState)(!1),m=Object(a.useState)(!1)[1];function h(){m(t=>!t)}return Object(a.useEffect)(()=>{const t=setInterval(h,200);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{disableGutters:!0,maxWidth:"md",sx:{mx:0}},r.a.createElement(o.a,{variant:"h4"},"Sleeves"),r.a.createElement(o.a,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.",r.a.createElement("br",null),r.a.createElement("br",null),"Sleeves can be used to perform different tasks synchronously.",r.a.createElement("br",null),r.a.createElement("br",null))),r.a.createElement(s.a,{onClick:()=>n(!0)},"FAQ"),r.a.createElement(s.a,{href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",target:"_blank"},"Wiki Documentation"),r.a.createElement(l.a,{display:"grid",sx:{gridTemplateColumns:"repeat(2, 1fr)",mt:1}},t.sleeves.map((t,e)=>r.a.createElement(f.a,{key:e,rerender:h,sleeve:t}))),r.a.createElement(u.a,{open:e,onClose:()=>n(!1)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var a=n(0),r=n.n(a),i=n(21),o=n(65),s=n(10),l=n(23),c=n(1),f=n(8),u=n(85),m=n(4),h=n(192),d=n(30),p=n(185),g=n(77),y=n(1256),b=n(1257),E=n(762),v=n(1258),k=n(1259),_=n(1260);function w(t){const e=d.b.Player(),[n,w]=Object(a.useState)(!1),[S,C]=Object(a.useState)(!1),[x,L]=Object(a.useState)(!1),[O,M]=Object(a.useState)(!1),[T,A]=Object(a.useState)(["------","------","------"]);let R=r.a.createElement(r.a.Fragment,null);switch(t.sleeve.currentTask){case g.a.Idle:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case g.a.Company:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working your job at ",t.sleeve.currentTaskLocation,".");break;case g.a.Faction:{let e="nothing";switch(t.sleeve.factionWorkType){case p.a.Field:e="Field work";break;case p.a.Hacking:e="Hacking contracts";break;case p.a.Security:e="Security work"}R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",e," for ",t.sleeve.currentTaskLocation,".");break}case g.a.Crime:{const e=Object.values(u.a).find(e=>e.name===t.sleeve.crimeType);if(!e)throw new Error("crime should not be undefined");R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",e.type," (Success Rate:"," ",m.a.formatPercentage(e.successRate(t.sleeve)),").");break}case g.a.Class:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",t.sleeve.currentTaskLocation,".");break;case g.a.Gym:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",t.sleeve.currentTaskLocation,".");break;case g.a.Recovery:R=r.a.createElement(r.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.");break;case g.a.Synchro:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.");break;default:console.error("Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): "+T[0])}return r.a.createElement(i.a,{component:o.a,sx:{width:"auto"}},r.a.createElement(i.a,{sx:{m:1}},r.a.createElement(i.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%",gap:1}},r.a.createElement(i.a,null,r.a.createElement(E.b,{sleeve:t.sleeve}),r.a.createElement(i.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%"}},r.a.createElement(s.a,{onClick:()=>w(!0)},"More Stats"),r.a.createElement(s.a,{onClick:()=>C(!0)},"More Earnings Info"),r.a.createElement(l.a,{title:e.moneyL(!0),disabled:e.moneyM(!0),disabled:t.sleeve.shock<100,sx:{width:"100%",height:"100%"}},"Manage Augmentations"))))),r.a.createElement(i.a,null,r.a.createElement(E.a,{sleeve:t.sleeve}),r.a.createElement(i.a,null,r.a.createElement(_.a,{player:e,sleeve:t.sleeve,setABC:A}),r.a.createElement(s.a,{onClick:function(){switch(t.sleeve.resetTaskStatus(),T[0]){case"------":break;case"Work for Company":t.sleeve.workForCompany(e,T[1]);break;case"Work for Faction":t.sleeve.workForFaction(e,T[1],T[2]);break;case"Commit Crime":t.sleeve.commitCrime(e,T[1]);break;case"Take University Course":t.sleeve.takeUniversityCourse(e,T[2],T[1]);break;case"Workout at Gym":t.sleeve.workoutAtGym(e,T[2],T[1]);break;case"Shock Recovery":t.sleeve.shockRecovery(e);break;case"Synchronize":t.sleeve.synchronize(e);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+T[0])}t.rerender()},sx:{width:"100%"}},"Set Task"),r.a.createElement(c.a,null,R),r.a.createElement(c.a,null,t.sleeve.currentTask===g.a.Crime&&Object(h.a)({progress:t.sleeve.currentTaskTime/t.sleeve.currentTaskMaxTime,totalTicks:25})))),r.a.createElement(v.a,{open:n,onClose:()=>w(!1),sleeve:t.sleeve}),r.a.createElement(k.a,{open:S,onClose:()=>C(!1),sleeve:t.sleeve}),r.a.createElement(b.a,{open:x,onClose:()=>L(!1),sleeve:t.sleeve,rerender:t.rerender}),r.a.createElement(y.a,{open:O,onClose:()=>M(!1),sleeve:t.sleeve}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var a=n(0),r=n.n(a),i=n(585),o=n(57),s=n(20),l=n(41),c=n(30),f=n(1),u=n(23),m=n(65),h=n(21),d=n(10),p=n(145),g=n(179),y=n(43),b=n(45);function E(t){const e=c.b.Player(),n=Object(a.useState)(!1)[1];function E(){n(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(E,150);return()=>clearInterval(t)},[]);const v=t.sleeve.augmentations.map(t=>t.name),k=Object(i.a)(t.sleeve,e);return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{sx:{mx:1}},r.a.createElement(f.a,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.",r.a.createElement("br",null),r.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."),r.a.createElement(h.a,{component:m.a,sx:{my:1,p:1}},r.a.createElement(g.a,{size:"small",padding:"none"},r.a.createElement(p.a,null,k.map(n=>r.a.createElement(b.a,{key:n.name},r.a.createElement(y.b,null,r.a.createElement(d.a,{onClick:()=>function(n){t.sleeve.tryBuyAugmentation(e,n),E()}(n),disabled:e.money0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{sx:{mx:1}},"Owned Augmentations:"),r.a.createElement(h.a,{display:"grid",sx:{gridTemplateColumns:"repeat(5, 1fr)",m:1}},v.map(t=>{const e=o.a[t],n="string"==typeof e.info?r.a.createElement("span",null,e.info):e.info,a=r.a.createElement(r.a.Fragment,null,n,r.a.createElement("br",null),r.a.createElement("br",null),e.stats);return r.a.createElement(u.a,{key:t,title:r.a.createElement(f.a,null,a)},r.a.createElement(m.a,{sx:{p:1}},r.a.createElement(f.a,null,t)))})))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(8),o=n(20),s=n(450),l=n(17),c=n(9),f=n(16),u=n(30),m=n(41),h=n(1),d=n(10);function p(t){const e=u.b.Player();function n(n){e.canAfford(i.a.TravelCost)||Object(f.a)("You cannot afford to have this sleeve travel to another city"),t.sleeve.city=n,e.loseMoney(i.a.TravelCost,"sleeve"),t.sleeve.resetTaskStatus(),t.rerender(),t.onClose()}return r.a.createElement(m.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,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 ",r.a.createElement(o.a,{money:i.a.TravelCost,player:e}),". It will also set your current sleeve task to idle."),c.a.DisableASCIIArt?Object.values(l.a).map(t=>r.a.createElement(d.a,{key:t,onClick:()=>n(t)},t)):r.a.createElement(s.a,{currentCity:t.sleeve.city,onTravel:t=>n(t)})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(4),r=n(24),i=n(8),o=n(1),s=n(183),l=n(41),c=n(0),f=n.n(c);function u(t){return f.a.createElement(l.a,{open:t.open,onClose:t.onClose},f.a.createElement(s.a,{rows:[[f.a.createElement(f.a.Fragment,null,"Hacking: "),t.sleeve.hacking,f.a.createElement(f.a.Fragment,null," (",a.a.formatExp(t.sleeve.hacking_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Strength: "),t.sleeve.strength,f.a.createElement(f.a.Fragment,null," (",a.a.formatExp(t.sleeve.strength_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Defense: "),t.sleeve.defense,f.a.createElement(f.a.Fragment,null," (",a.a.formatExp(t.sleeve.defense_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Dexterity: "),t.sleeve.dexterity,f.a.createElement(f.a.Fragment,null," (",a.a.formatExp(t.sleeve.dexterity_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Agility: "),t.sleeve.agility,f.a.createElement(f.a.Fragment,null," (",a.a.formatExp(t.sleeve.agility_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Charisma: "),t.sleeve.charisma,f.a.createElement(f.a.Fragment,null," (",a.a.formatExp(t.sleeve.charisma_exp)," exp)")]],title:"Stats:"}),f.a.createElement("br",null),f.a.createElement(s.a,{rows:[[f.a.createElement(f.a.Fragment,null,"Hacking Level multiplier: "),a.a.formatPercentage(t.sleeve.hacking_mult)],[f.a.createElement(f.a.Fragment,null,"Hacking Experience multiplier: "),a.a.formatPercentage(t.sleeve.hacking_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Strength Level multiplier: "),a.a.formatPercentage(t.sleeve.strength_mult)],[f.a.createElement(f.a.Fragment,null,"Strength Experience multiplier: "),a.a.formatPercentage(t.sleeve.strength_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Defense Level multiplier: "),a.a.formatPercentage(t.sleeve.defense_mult)],[f.a.createElement(f.a.Fragment,null,"Defense Experience multiplier: "),a.a.formatPercentage(t.sleeve.defense_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Dexterity Level multiplier: "),a.a.formatPercentage(t.sleeve.dexterity_mult)],[f.a.createElement(f.a.Fragment,null,"Dexterity Experience multiplier: "),a.a.formatPercentage(t.sleeve.dexterity_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Agility Level multiplier: "),a.a.formatPercentage(t.sleeve.agility_mult)],[f.a.createElement(f.a.Fragment,null,"Agility Experience multiplier: "),a.a.formatPercentage(t.sleeve.agility_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Charisma Level multiplier: "),a.a.formatPercentage(t.sleeve.charisma_mult)],[f.a.createElement(f.a.Fragment,null,"Charisma Experience multiplier: "),a.a.formatPercentage(t.sleeve.charisma_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Faction Reputation Gain multiplier: "),a.a.formatPercentage(t.sleeve.faction_rep_mult)],[f.a.createElement(f.a.Fragment,null,"Company Reputation Gain multiplier: "),a.a.formatPercentage(t.sleeve.company_rep_mult)],[f.a.createElement(f.a.Fragment,null,"Salary multiplier: "),a.a.formatPercentage(t.sleeve.work_money_mult)],[f.a.createElement(f.a.Fragment,null,"Crime Money multiplier: "),a.a.formatPercentage(t.sleeve.crime_money_mult)],[f.a.createElement(f.a.Fragment,null,"Crime Success multiplier: "),a.a.formatPercentage(t.sleeve.crime_success_mult)]],title:"Multipliers:"}),t.sleeve.storedCycles>10&&f.a.createElement(o.a,{sx:{py:2}},"Bonus Time: ",Object(r.b)(t.sleeve.storedCycles*i.a.MilliPerCycle)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(4),r=n(20),i=n(0),o=n(183),s=n(41);function l(t){return i.createElement(s.a,{open:t.open,onClose:t.onClose},i.createElement(o.a,{rows:[["Money ",i.createElement(r.a,{money:t.sleeve.earningsForTask.money})],["Hacking Exp ",a.a.formatExp(t.sleeve.earningsForTask.hack)],["Strength Exp ",a.a.formatExp(t.sleeve.earningsForTask.str)],["Defense Exp ",a.a.formatExp(t.sleeve.earningsForTask.def)],["Dexterity Exp ",a.a.formatExp(t.sleeve.earningsForTask.dex)],["Agility Exp ",a.a.formatExp(t.sleeve.earningsForTask.agi)],["Charisma Exp ",a.a.formatExp(t.sleeve.earningsForTask.cha)]],title:"Earnings for Current Task:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["Money: ",i.createElement(r.a,{money:t.sleeve.earningsForPlayer.money})],["Hacking Exp: ",a.a.formatExp(t.sleeve.earningsForPlayer.hack)],["Strength Exp: ",a.a.formatExp(t.sleeve.earningsForPlayer.str)],["Defense Exp: ",a.a.formatExp(t.sleeve.earningsForPlayer.def)],["Dexterity Exp: ",a.a.formatExp(t.sleeve.earningsForPlayer.dex)],["Agility Exp: ",a.a.formatExp(t.sleeve.earningsForPlayer.agi)],["Charisma Exp: ",a.a.formatExp(t.sleeve.earningsForPlayer.cha)]],title:"Total Earnings for Host Consciousness:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["Money: ",i.createElement(r.a,{money:t.sleeve.earningsForSleeves.money})],["Hacking Exp: ",a.a.formatExp(t.sleeve.earningsForSleeves.hack)],["Strength Exp: ",a.a.formatExp(t.sleeve.earningsForSleeves.str)],["Defense Exp: ",a.a.formatExp(t.sleeve.earningsForSleeves.def)],["Dexterity Exp: ",a.a.formatExp(t.sleeve.earningsForSleeves.dex)],["Agility Exp: ",a.a.formatExp(t.sleeve.earningsForSleeves.agi)],["Charisma Exp: ",a.a.formatExp(t.sleeve.earningsForSleeves.cha)]],title:"Total Earnings for Other Sleeves:"}),i.createElement("br",null))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var a=n(0),r=n.n(a),i=n(77),o=n(85),s=n(11),l=n(17),c=n(29),f=n(185),u=n(128),m=n(79),h=n(5);const d=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],p=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function g(t,e){const n=[];for(const a of t.sleeves)e!==a&&a.currentTask===i.a.Company&&n.push(a.currentTaskLocation);const a=Object.keys(t.jobs);for(let t=0;t{const e=c.a[t].getInfo();return e.offerHackingWork||e.offerFieldWork||e.offerSecurityWork})}const b={"------":()=>({first:["------"],second:()=>["------"]}),"Work for Company":(t,e)=>{let n=g(t,e);return 0===n.length&&(n=["------"]),{first:n,second:()=>["------"]}},"Work for Faction":(t,e)=>{let n=y(t,e);return 0===n.length&&(n=["------"]),{first:n,second:t=>{const e=c.a[t].getInfo(),n=[];return e.offerHackingWork&&n.push("Hacking Contracts"),e.offerFieldWork&&n.push("Field Work"),e.offerSecurityWork&&n.push("Security Work"),n}}},"Commit Crime":()=>({first:Object.values(o.a).map(t=>t.name),second:()=>["------"]}),"Take University Course":(t,e)=>{let n=[];switch(e.city){case l.a.Aevum:n=[s.a.AevumSummitUniversity];break;case l.a.Sector12:n=[s.a.Sector12RothmanUniversity];break;case l.a.Volhaven:n=[s.a.VolhavenZBInstituteOfTechnology];break;default:n=["No university available in city!"]}return{first:d,second:()=>n}},"Workout at Gym":(t,e)=>{let n=[];switch(e.city){case l.a.Aevum:n=[s.a.AevumCrushFitnessGym,s.a.AevumSnapFitnessGym];break;case l.a.Sector12:n=[s.a.Sector12IronGym,s.a.Sector12PowerhouseGym];break;case l.a.Volhaven:n=[s.a.VolhavenMilleniumFitnessGym];break;default:n=["No gym available in city!"]}return{first:p,second:()=>n}},"Shock Recovery":()=>({first:["------"],second:()=>["------"]}),Synchronize:()=>({first:["------"],second:()=>["------"]})},E={"------":()=>!0,"Work for Company":(t,e)=>g(t,e).length>0,"Work for Faction":(t,e)=>y(t,e).length>0,"Commit Crime":()=>!0,"Take University Course":(t,e)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(e.city),"Workout at Gym":(t,e)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(e.city),"Shock Recovery":(t,e)=>e.shock<100,Synchronize:(t,e)=>e.sync<100};function v(t){const e=function(t){switch(t.currentTask){case i.a.Idle:return["------","------","------"];case i.a.Company:return["Work for Company",t.currentTaskLocation,"------"];case i.a.Faction:{let e="";switch(t.factionWorkType){case f.a.Hacking:e="Hacking Contracts";break;case f.a.Field:e="Field Work";break;case f.a.Security:e="Security Work"}return["Work for Faction",t.currentTaskLocation,e]}case i.a.Crime:return["Commit Crime",t.crimeType,"------"];case i.a.Class:return["Take University Course",t.className,t.currentTaskLocation];case i.a.Gym:return["Workout at Gym",t.gymStatType,t.currentTaskLocation];case i.a.Recovery:return["Shock Recovery","------","------"];case i.a.Synchro:return["Synchronize","------","------"]}}(t.sleeve),[n,o]=Object(a.useState)(e[0]),[s,l]=Object(a.useState)(e[1]),[c,h]=Object(a.useState)(e[2]),d=Object.keys(E).filter(e=>E[e](t.player,t.sleeve)),p=b[n];if(void 0===p)throw new Error(`No function for task '${n}'`);const g=p(t.player,t.sleeve),y=g.second(s);return g.first.length>0&&!g.first.includes(s)&&(l(g.first[0]),t.setABC([n,g.first[0],c])),y.length>0&&!y.includes(c)&&(h(y[0]),t.setABC([n,s,y[0]])),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(e){const a=e.target.value,r=b[a];if(void 0===r)throw new Error(`No function for task '${n}'`);const i=r(t.player,t.sleeve),s=i.second(i.first[0]);h(s[0]),l(i.first[0]),o(a),t.setABC([a,i.first[0],s[0]])},value:n,sx:{width:"100%"}},d.map(t=>r.a.createElement(m.a,{key:t,value:t},t))),!(1===g.first.length&&"------"===g.first[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(e){l(e.target.value),t.setABC([n,e.target.value,c])},value:s,sx:{width:"100%"}},g.first.map(t=>r.a.createElement(m.a,{key:t,value:t},t)))),!(1===y.length&&"------"===y[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(e){h(e.target.value),t.setABC([n,s,e.target.value])},value:c,sx:{width:"100%"}},y.map(t=>r.a.createElement(m.a,{key:t,value:t},t)))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(41),o=n(1),s=n(5);function l({open:t,onClose:e}){return r.a.createElement(i.a,{open:t,onClose:e},r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{variant:"h4"},"How do Duplicate Sleeves work?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are their own individuals, which means they each have their own experience and stats."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Synchronization (Sync)?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization can be increased by assigning sleeves to the 'Synchronize' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Shock?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I work for this company or faction?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why did my Sleeve stop working?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"How do I buy Augmentations for my Sleeves?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I buy the X Augmentation for my sleeve?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Certain Augmentations, like ",s.a.Bladeburners,"-specific ones and NeuroFlux Governor, are not available for sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Do sleeves get reset when installing Augmentations or switching BitNodes?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are reset when switching BitNodes, but not when installing Augmentations."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Memory?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Memory can only be increased by purchasing upgrades from ",s.a.TheCovenant,". It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var a=n(0),r=n.n(a),i=n(1263),o=n(1264),s=n(1265),l=n(221),c=n(91),f=n(1266),u=n(1268),m=n(1269),h=n(1270),d=n(39),p=n(55),g=n(26),y=n(1),b=n(60),E=n(10),v=n(21);function k(t){const[e,n]=Object(a.useState)(!1),k=Object(a.useState)(!1)[1];function _(){k(t=>!t)}const[w,S]=Object(a.useState)(d.c.x1);Object(a.useEffect)(()=>{const t=setInterval(_,200);return()=>clearInterval(t)},[]);let C,x=0;for(let e=0;eS(d.c.x1),()=>S(d.c.x5),()=>S(d.c.x10),()=>S(d.c.MAX)],O=t.player.hacknetNodes.map(e=>{if(Object(p.g)(t.player)){if(e instanceof l.a)throw new Error("node was hacknet node");const n=Object(g.d)(e);if(null==n)throw new Error("Could not find Hacknet Server object in AllServers map for IP: "+e);if(!(n instanceof c.a))throw new Error("node was not hacknet server");return r.a.createElement(s.a,{player:t.player,key:n.hostname,node:n,purchaseMultiplier:w,rerender:_})}if("string"==typeof e)throw new Error("node was ip string");return r.a.createElement(o.a,{player:t.player,key:e.name,node:e,purchaseMultiplier:w,rerender:_})});return r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{variant:"h4"},"Hacknet ",Object(p.g)(t.player)?"Servers":"Nodes"),r.a.createElement(i.a,{hasHacknetServers:Object(p.g)(t.player)}),r.a.createElement(h.a,{cost:C,multiplier:w,onClick:function(){Object(p.l)(t.player),_()}}),r.a.createElement("br",null),r.a.createElement(b.a,{container:!0,spacing:2},r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(m.a,{totalProduction:x,player:t.player})),r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(u.a,{onClicks:L,purchaseMultiplier:w}))),Object(p.g)(t.player)&&r.a.createElement(E.a,{onClick:()=>n(!0)},"Spend Hashes on Upgrades"),r.a.createElement(v.a,{sx:{display:"grid",width:"fit-content",gridTemplateColumns:"repeat(3, 1fr)"}},O),r.a.createElement(f.a,{open:e,onClose:()=>n(!1)}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(1);function o(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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."),t.hasHacknetServers?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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."),r.a.createElement(i.a,null,"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.")):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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."),r.a.createElement(i.a,null,"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.")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var a=n(0),r=n.n(a),i=n(39),o=n(55),s=n(20),l=n(110),c=n(1),f=n(60),u=n(65),m=n(10),h=n(43),d=n(145),p=n(179),g=n(45),y=n(23),b=n(4),E=n(206);function v(t){const e=t.node,n=t.purchaseMultiplier,a=t.rerender;let v,k,_;if(e.level>=i.a.MaxLevel)v=r.a.createElement(m.a,{disabled:!0},"MAX LEVEL");else{let f=0;if("MAX"===n)f=Object(o.e)(t.player,e,i.a.MaxLevel);else{const t=i.a.MaxLevel-e.level;f=Math.min(t,n)}const u=Object(E.c)(e.level+f,e.ram,e.cores,t.player.hacknet_node_money_mult)-e.moneyGainRatePerSecond,h=e.calculateLevelUpgradeCost(f,t.player.hacknet_node_level_cost_mult);v=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:u}))},r.a.createElement(m.a,{onClick:function(){const r="MAX"===n?Object(o.e)(t.player,e,i.a.MaxLevel):n;Object(o.n)(t.player,e,r),a()}},"+",f," - ",r.a.createElement(s.a,{money:h,player:t.player})))}if(e.ram>=i.a.MaxRam)k=r.a.createElement(m.a,{disabled:!0},"MAX RAM");else{let f=0;if("MAX"===n)f=Object(o.f)(t.player,e,i.a.MaxRam);else{const t=Math.round(Math.log2(i.a.MaxRam/e.ram));f=Math.min(t,n)}const u=Object(E.c)(e.level,e.ram*Math.pow(2,f),e.cores,t.player.hacknet_node_money_mult)-e.moneyGainRatePerSecond,h=e.calculateRamUpgradeCost(f,t.player.hacknet_node_ram_cost_mult);k=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:u}))},r.a.createElement(m.a,{onClick:function(){const r="MAX"===n?Object(o.f)(t.player,e,i.a.MaxRam):n;Object(o.o)(t.player,e,r),a()}},"+",f," - ",r.a.createElement(s.a,{money:h,player:t.player})))}if(e.cores>=i.a.MaxCores)_=r.a.createElement(m.a,{disabled:!0},"MAX CORES");else{let f=0;if("MAX"===n)f=Object(o.d)(t.player,e,i.a.MaxCores);else{const t=i.a.MaxCores-e.cores;f=Math.min(t,n)}const u=Object(E.c)(e.level,e.ram,e.cores+f,t.player.hacknet_node_money_mult)-e.moneyGainRatePerSecond,h=e.calculateCoreUpgradeCost(f,t.player.hacknet_node_core_cost_mult);_=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:u}))},r.a.createElement(m.a,{onClick:function(){const r="MAX"===n?Object(o.d)(t.player,e,i.a.MaxCores):n;Object(o.k)(t.player,e,r),a()}},"+",f," - ",r.a.createElement(s.a,{money:h,player:t.player})))}return r.a.createElement(f.a,{item:!0,component:u.a,p:1},r.a.createElement(p.a,{size:"small"},r.a.createElement(d.a,null,r.a.createElement(g.a,null,r.a.createElement(h.b,{colSpan:3},r.a.createElement(c.a,null,e.name))),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"Production:")),r.a.createElement(h.b,{colSpan:2},r.a.createElement(c.a,null,r.a.createElement(s.a,{money:e.totalMoneyGenerated})," (",r.a.createElement(l.a,{money:e.moneyGainRatePerSecond}),")"))),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"Level:")),r.a.createElement(h.b,null,r.a.createElement(c.a,null,e.level)),r.a.createElement(h.b,null,v)),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"RAM:")),r.a.createElement(h.b,null,r.a.createElement(c.a,null,b.a.formatRAM(e.ram))),r.a.createElement(h.b,null,k)),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"Cores:")),r.a.createElement(h.b,null,r.a.createElement(c.a,null,e.cores)),r.a.createElement(h.b,null,_)))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var a=n(0),r=n.n(a),i=n(39),o=n(55),s=n(20),l=n(234),c=n(414),f=n(1),u=n(60),m=n(65),h=n(10),d=n(43),p=n(145),g=n(179),y=n(45),b=n(4),E=n(184),v=n(23);function k(t){const e=t.node,n=t.purchaseMultiplier,a=t.rerender;let k,_,w,S;if(e.level>=i.b.MaxLevel)k=r.a.createElement(h.a,{disabled:!0},"MAX LEVEL");else{let l=0;if("MAX"===n)l=Object(o.e)(t.player,e,i.b.MaxLevel);else{const t=i.b.MaxLevel-e.level;l=Math.min(t,n)}const u=Object(E.c)(e.level+l,0,e.maxRam,e.cores,t.player.hacknet_node_money_mult)-e.hashRate,m=e.calculateLevelUpgradeCost(l,t.player.hacknet_node_level_cost_mult);k=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(c.a,{hashes:u}))},r.a.createElement(h.a,{onClick:function(){let r=n;"MAX"===n&&(r=Object(o.e)(t.player,e,i.b.MaxLevel));Object(o.n)(t.player,e,r),a()}},"+",l," - ",r.a.createElement(s.a,{money:m,player:t.player})))}if(e.maxRam>=i.b.MaxRam)_=r.a.createElement(h.a,{disabled:!0},"MAX RAM");else{let l=0;if("MAX"===n)l=Object(o.f)(t.player,e,i.b.MaxRam);else{const t=Math.round(Math.log2(i.b.MaxRam/e.maxRam));l=Math.min(t,n)}const u=Object(E.c)(e.level,0,e.maxRam*Math.pow(2,l),e.cores,t.player.hacknet_node_money_mult)-e.hashRate,m=e.calculateRamUpgradeCost(l,t.player.hacknet_node_ram_cost_mult);_=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(c.a,{hashes:u}))},r.a.createElement(h.a,{onClick:function(){let r=n;"MAX"===n&&(r=Object(o.f)(t.player,e,i.b.MaxRam)),Object(o.o)(t.player,e,r),a()}},"+",l," - ",r.a.createElement(s.a,{money:m,player:t.player})))}if(e.cores>=i.b.MaxCores)w=r.a.createElement(h.a,{disabled:!0},"MAX CORES");else{let l=0;if("MAX"===n)l=Object(o.d)(t.player,e,i.b.MaxCores);else{const t=i.b.MaxCores-e.cores;l=Math.min(t,n)}const u=Object(E.c)(e.level,0,e.maxRam,e.cores+l,t.player.hacknet_node_money_mult)-e.hashRate,m=e.calculateCoreUpgradeCost(l,t.player.hacknet_node_core_cost_mult);w=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(c.a,{hashes:u}))},r.a.createElement(h.a,{onClick:function(){let r=n;"MAX"===n&&(r=Object(o.d)(t.player,e,i.b.MaxCores)),Object(o.k)(t.player,e,r),a()}},"+",l," - ",r.a.createElement(s.a,{money:m,player:t.player})))}if(e.cache>=i.b.MaxCache)S=r.a.createElement(h.a,{disabled:!0},"MAX CACHE");else{let c=0;if("MAX"===n)c=Object(o.c)(t.player,e,i.b.MaxCache);else{const t=i.b.MaxCache-e.cache;c=Math.min(t,n)}const u=32*Math.pow(2,e.cache+c)-e.hashCapacity,m=e.calculateCacheUpgradeCost(c);S=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(l.a,{hashes:u})," hashes")},r.a.createElement(h.a,{onClick:function(){let r=n;"MAX"===n&&(r=Object(o.c)(t.player,e,i.b.MaxCache));Object(o.j)(t.player,e,r),a(),Object(o.p)(t.player)}},"+",c," - ",r.a.createElement(s.a,{money:m,player:t.player}))),t.player.money}return r.a.createElement(u.a,{item:!0,component:m.a,p:1},r.a.createElement(g.a,{size:"small"},r.a.createElement(p.a,null,r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.hostname))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Production:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(f.a,null,r.a.createElement(l.a,{hashes:e.totalHashesGenerated})," (",r.a.createElement(c.a,{hashes:e.hashRate}),")"))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Hash Capacity:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(f.a,null,r.a.createElement(l.a,{hashes:e.hashCapacity})))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Level:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.level)),r.a.createElement(d.b,null,k)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"RAM:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,b.a.formatRAM(e.maxRam))),r.a.createElement(d.b,null,_)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Cores:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.cores)),r.a.createElement(d.b,null,w)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Cache Level:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.cache)),r.a.createElement(d.b,null,S)))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(372),o=n(242),s=n(234),l=n(1267),c=n(41),f=n(30),u=n(1);function m(t){const e=f.b.Player(),n=Object(a.useState)(!1)[1];function m(){n(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(()=>n(t=>!t),200);return()=>clearInterval(t)},[]);const h=e.hashManager;if(!(h instanceof i.a))throw new Error("Player does not have a HashManager)");return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Spend your hashes on a variety of different upgrades"),r.a.createElement(u.a,null,"Hashes: ",r.a.createElement(s.a,{hashes:e.hashManager.hashes})),Object.keys(o.a).map(t=>{const n=o.a[t];return r.a.createElement(l.a,{player:e,upg:n,hashManager:h,key:n.name,rerender:m})})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(55),o=n(763),s=n(16),l=n(174),c=n(234),f=n(1),u=n(65),m=n(10),h=n(5);const d={};function p(t){const[e,n]=Object(a.useState)(d[t.upg.name]?d[t.upg.name]:h.a.ECorp.toLowerCase());function p(){if(t.hashManager.hashes>=t.hashManager.getUpgradeCost(t.upg.name)){Object(i.m)(t.player,t.upg.name,e)||Object(s.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."),t.rerender()}}const g=t.hashManager,y=t.upg,b=g.getUpgradeCost(y.name),E=g.upgrades[y.name],v=y.effectText(E),k=g.hashes>=b;return r.a.createElement(u.a,{sx:{p:1}},r.a.createElement(f.a,null,r.a.createElement(l.a,{value:y.name})),r.a.createElement(f.a,null,"Cost: ",r.a.createElement(c.a,{hashes:b}),", Bought: ",E," times"),r.a.createElement(f.a,null,y.desc),!y.hasTargetServer&&r.a.createElement(m.a,{onClick:p,disabled:!k},"Buy"),y.hasTargetServer&&r.a.createElement(o.a,{purchase:p,canPurchase:k,value:e,serverType:o.b.Foreign,onChange:function(e){n(e.target.value),d[t.upg.name]=e.target.value}}),E>0&&v&&r.a.createElement(f.a,null,v))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(39),o=n(10);function s(){return(s=Object.assign||function(t){for(var e=1;ee.specialName===t.name),C=Object(b.d)(S?S.hostname:""),x=null!==C&&Object(y.b)(C);return a.createElement(a.Fragment,null,a.createElement(i.a,{onClick:()=>e.toCity()},"Return to World"),a.createElement(r.a,{variant:"h4",sx:{mt:1}},x&&!g.a.DisableTextEffects?a.createElement(_.a,{title:`Backdoor installed on ${t.name}.`},a.createElement("span",null,a.createElement(E.a,{content:t.name}))):t.name),w)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var a=n(0),r=n.n(a),i=n(1),o=n(10),s=n(23),l=n(21),c=n(284),f=n(218),u=n(66),m=n(362),h=n(94),d=n(32),p=n(116),g=n(320),y=n(30),b=n(1274);function E(t){const e=y.b.Player(),n=y.b.Router(),[E,v]=Object(a.useState)(!1),k=Object(a.useState)(!1)[1];function _(){k(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(_,200);return()=>clearInterval(t)},[]);const w=u.a[t.locName];if(null==w)throw new Error("CompanyLocation component constructed with invalid company: "+t.locName);const S=f.a[t.locName];if(null==S)throw new Error("CompanyLocation component constructed with invalid location: "+t.locName);const C=e.jobs[t.locName]?e.jobs[t.locName]:null,x=C?h.a[C]:null;e.location=t.locName;const L=null!=C,O=w.getFavorGain();return r.a.createElement(r.a.Fragment,null,L&&r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"Job Title: ",C),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"You will have ",r.a.createElement(g.a,{favor:w.favor+O})," company favor upon resetting after installing Augmentations")},r.a.createElement(i.a,null,"Company reputation: ",r.a.createElement(p.a,{reputation:w.playerReputation})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"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 company.")},r.a.createElement(i.a,null,"Company Favor: ",r.a.createElement(g.a,{favor:w.favor})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement("br",null)),r.a.createElement(l.a,{sx:{display:"grid",width:"fit-content"}},L&&r.a.createElement(l.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(o.a,{onClick:function(a){if(!a.isTrusted)return;const r=x;r instanceof m.a&&(r.isPartTimeJob()||r.isSoftwareConsultantJob()||r.isBusinessConsultantJob()?e.startWorkPartTime(t.locName):e.startWork(t.locName),e.startFocusing(),n.toWork())}},"Work"),r.a.createElement(o.a,{onClick:()=>v(!0)},"Quit"),r.a.createElement(b.a,{locName:t.locName,company:w,onQuit:_,open:E,onClose:()=>v(!1)})),w.hasAgentPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.a[0]],onClick:function(t){t.isTrusted&&(e.applyForAgentJob(),_())},text:"Apply for Agent Job"}),w.hasBusinessConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.c[0]],onClick:function(t){t.isTrusted&&(e.applyForBusinessConsultantJob(),_())},text:"Apply for Business Consultant Job"}),w.hasBusinessPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.b[0]],onClick:function(t){t.isTrusted&&(e.applyForBusinessJob(),_())},text:"Apply for Business Job"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.e[1]],onClick:function(t){t.isTrusted&&(e.applyForEmployeeJob(),_())},text:"Apply to be an Employee"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.g[1]],onClick:function(t){t.isTrusted&&(e.applyForPartTimeEmployeeJob(),_())},text:"Apply to be a part-time Employee"}),w.hasITPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.d[0]],onClick:function(t){t.isTrusted&&(e.applyForItJob(),_())},text:"Apply for IT Job"}),w.hasSecurityPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.h[2]],onClick:function(t){t.isTrusted&&(e.applyForSecurityJob(),_())},text:"Apply for Security Job"}),w.hasSoftwareConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.k[0]],onClick:function(t){t.isTrusted&&(e.applyForSoftwareConsultantJob(),_())},text:"Apply for Software Consultant Job"}),w.hasSoftwarePositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.j[0]],onClick:function(t){t.isTrusted&&(e.applyForSoftwareJob(),_())},text:"Apply for Software Job"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.e[0]],onClick:function(t){t.isTrusted&&(e.applyForWaiterJob(),_())},text:"Apply to be a Waiter"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.g[0]],onClick:function(t){t.isTrusted&&(e.applyForPartTimeWaiterJob(),_())},text:"Apply to be a part-time Waiter"}),null!=S.infiltrationData&&r.a.createElement(o.a,{onClick:function(e){if(!e.isTrusted)return;const a=S;if(!a.infiltrationData)throw new Error(`trying to start infiltration at ${t.locName} but the infiltrationData is null`);n.toInfiltration(a)}},"Infiltrate Company")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(32);const r=[{name:a.j[0],nextPosition:a.j[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:a.j[1],nextPosition:a.j[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:a.j[2],nextPosition:a.j[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:a.j[3],nextPosition:a.j[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:a.j[4],nextPosition:a.j[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:a.j[5],nextPosition:a.j[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:a.j[6],nextPosition:a.j[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:a.j[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:a.d[0],nextPosition:a.d[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:a.d[1],nextPosition:a.d[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:a.d[2],nextPosition:a.d[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:a.d[3],nextPosition:a.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:a.i[0],nextPosition:a.j[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:a.f[0],nextPosition:a.f[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:a.f[1],nextPosition:a.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:a.b[0],nextPosition:a.b[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:a.b[1],nextPosition:a.b[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:a.b[2],nextPosition:a.b[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:a.b[3],nextPosition:a.b[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:a.b[4],nextPosition:a.b[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:a.b[5],nextPosition:null,baseSalary:3900,charismaEffectiveness:90,charismaExpGain:1.5,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:751,reqdHacking:101,reqdReputation:32e5,repMultiplier:1.75},{name:a.h[0],nextPosition:a.h[1],baseSalary:82,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.04,reqdHacking:11,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1},{name:a.h[1],nextPosition:null,baseSalary:460,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.1,reqdHacking:101,reqdStrength:301,reqdDefense:301,reqdDexterity:301,reqdAgility:301,reqdCharisma:151,reqdReputation:36e3,repMultiplier:1.25},{name:a.h[2],nextPosition:a.h[3],baseSalary:50,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.01,strengthExpGain:.04,defenseExpGain:.04,dexterityExpGain:.04,agilityExpGain:.04,charismaExpGain:.02,reqdStrength:51,reqdDefense:51,reqdDexterity:51,reqdAgility:51,reqdCharisma:1,repMultiplier:1},{name:a.h[3],nextPosition:a.h[4],baseSalary:195,hackingEffectiveness:10,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:10,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.05,reqdHacking:26,reqdStrength:151,reqdDefense:151,reqdDexterity:151,reqdAgility:151,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1.1},{name:a.h[4],nextPosition:a.h[5],baseSalary:660,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.02,strengthExpGain:.12,defenseExpGain:.12,dexterityExpGain:.12,agilityExpGain:.12,charismaExpGain:.1,reqdHacking:26,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:101,reqdReputation:36e3,repMultiplier:1.25},{name:a.h[5],nextPosition:null,baseSalary:1320,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.05,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.15,reqdHacking:51,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:151,reqdReputation:144e3,repMultiplier:1.4},{name:a.a[0],nextPosition:a.a[1],baseSalary:330,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:20,hackingExpGain:.04,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.05,reqdHacking:101,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:101,reqdReputation:8e3,repMultiplier:1},{name:a.a[1],nextPosition:a.a[2],baseSalary:990,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.1,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.1,reqdHacking:201,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:201,reqdReputation:32e3,repMultiplier:1.25},{name:a.a[2],nextPosition:null,baseSalary:2e3,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.15,strengthExpGain:.2,defenseExpGain:.2,dexterityExpGain:.2,agilityExpGain:.2,charismaExpGain:.15,reqdHacking:251,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:251,reqdReputation:162e3,repMultiplier:1.5},{name:a.e[0],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.05,repMultiplier:1},{name:a.e[1],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.04,repMultiplier:1},{name:a.k[0],nextPosition:a.k[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:a.k[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:a.c[0],nextPosition:a.c[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:a.c[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:a.g[0],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.04,repMultiplier:1},{name:a.g[1],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.03,repMultiplier:1}]},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(30),o=n(41),s=n(1),l=n(10);function c(t){const e=i.b.Player();return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null," Would you like to quit your job at ",t.company.name,"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:function(){e.quitJob(t.locName),t.onQuit(),t.onClose()}},"Quit"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n(10),i=n(8),o=n(26),s=n(20),l=n(360),c=n(21);function f(t){function e(){const e=l.a.find(e=>e.specialName===t.loc.name),n=Object(o.d)(e?e.hostname:"");if(null==n||!n.hasOwnProperty("backdoorInstalled"))return t.loc.costMult;const a=n.backdoorInstalled?.9:1;return t.loc.costMult*a}function n(n){const a=t.loc;t.p.startClass(e(),a.expMult,n),t.p.startFocusing(),t.router.toWork()}const f=i.a.ClassGymBaseCost*e();return a.createElement(c.a,{sx:{display:"grid",width:"fit-content"}},a.createElement(r.a,{onClick:function(){n(i.a.ClassGymStrength)}},"Train Strength (",a.createElement(s.a,{money:f,player:t.p})," / sec)"),a.createElement(r.a,{onClick:function(){n(i.a.ClassGymDefense)}},"Train Defense (",a.createElement(s.a,{money:f,player:t.p})," / sec)"),a.createElement(r.a,{onClick:function(){n(i.a.ClassGymDexterity)}},"Train Dexterity (",a.createElement(s.a,{money:f,player:t.p})," / sec)"),a.createElement(r.a,{onClick:function(){n(i.a.ClassGymAgility)}},"Train Agility (",a.createElement(s.a,{money:f,player:t.p})," / sec)"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n(10),i=n(399),o=n(20),s=n(16);class l extends a.Component{constructor(t){super(t),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return Object(i.b)(this.props.p)}getHealed(t){if(!t.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const e=this.getCost();this.props.p.loseMoney(e,"hospitalization"),this.props.p.hp=this.props.p.max_hp,this.setState({currHp:this.props.p.hp}),Object(s.a)(a.createElement(a.Fragment,null,"You were healed to full health! The hospital billed you for ",a.createElement(o.a,{money:e})))}render(){const t=this.getCost();return a.createElement(r.a,{onClick:this.getHealed,style:this.btnStyle},"Get treatment for wounds - ",a.createElement(o.a,{money:t,player:this.props.p}))}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n(10),i=n(23),o=n(85),s=n(4),l=n(30),c=n(21);function f(){const t=l.b.Player(),e=l.b.Router();const n=o.a.Shoplift.successRate(t),f=o.a.RobStore.successRate(t),u=o.a.Mug.successRate(t),m=o.a.Larceny.successRate(t),h=o.a.DealDrugs.successRate(t),d=o.a.BondForgery.successRate(t),p=o.a.TraffickArms.successRate(t),g=o.a.Homicide.successRate(t),y=o.a.GrandTheftAuto.successRate(t),b=o.a.Kidnap.successRate(t),E=o.a.Assassination.successRate(t),v=o.a.Heist.successRate(t);return a.createElement(c.a,{sx:{display:"grid",width:"fit-content"}},a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to shoplift from a low-end retailer")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.Shoplift.commit(e,t)}},"Shoplift (",s.a.formatPercentage(n)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to commit armed robbery on a high-end store")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.RobStore.commit(e,t)}},"Rob store (",s.a.formatPercentage(f)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to mug a random person on the street")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.Mug.commit(e,t)}},"Mug someone (",s.a.formatPercentage(u)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to rob property from someone's house")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.Larceny.commit(e,t)}},"Larceny (",s.a.formatPercentage(m)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to deal drugs")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.DealDrugs.commit(e,t)}},"Deal Drugs (",s.a.formatPercentage(h)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to forge corporate bonds")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.BondForgery.commit(e,t)}},"Bond Forgery (",s.a.formatPercentage(d)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to smuggle illegal arms into the city")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.TraffickArms.commit(e,t)}},"Traffick illegal Arms (",s.a.formatPercentage(p)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to murder a random person on the street")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.Homicide.commit(e,t)}},"Homicide (",s.a.formatPercentage(g)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to commit grand theft auto")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.GrandTheftAuto.commit(e,t)}},"Grand theft Auto (",s.a.formatPercentage(y)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to kidnap and ransom a high-profile-target")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.Kidnap.commit(e,t)}},"Kidnap and Ransom (",s.a.formatPercentage(b)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to assassinate a high-profile target")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.Assassination.commit(e,t)}},"Assassinate (",s.a.formatPercentage(E)," chance of success)")),a.createElement(i.a,{title:a.createElement(a.Fragment,null,"Attempt to pull off the ultimate heist")},a.createElement(r.a,{onClick:function(n){n.isTrusted&&o.a.Heist.commit(e,t)}},"Heist (",s.a.formatPercentage(v)," chance of success)")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return S}));var a=n(0),r=n.n(a),i=n(1),o=n(10),s=n(1279),l=n(11),c=n(15),f=n(29),u=n(105),m=n(30),h=n(16),d=n(140),p=n(1280),g=n(106),y=n(141),b=n(456),E=n(221),v=n(91),k=n(26),_=n(1281),w=n(5);function S(t){const e=m.b.Player(),n=m.b.Router(),S=Object(a.useState)(!1)[1],C=e.inBladeburner();function x(){const t=e;if(t.inBladeburner())n.toBladeburner();else if(t.strength>=100&&t.defense>=100&&t.dexterity>=100&&t.agility>=100){t.startBladeburner({new:!0}),Object(h.a)("You have been accepted into the Bladeburner division!"),S(t=>!t);const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}else Object(h.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}function L(){n.toGrafting()}function O(){const[t,n]=Object(a.useState)(!1);return e.canAccessCorporation()?r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{disabled:!e.canAccessCorporation()||e.hasCorporation(),onClick:()=>n(!0)},"Create a Corporation"),r.a.createElement(s.a,{open:t,onClose:()=>n(!1)})):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}function M(){const t=f.a[w.a.ChurchOfTheMachineGod];e.factions.includes(w.a.ChurchOfTheMachineGod)||Object(u.e)(t),e.augmentations.some(t=>t.name===c.a.StaneksGift1)||e.queuedAugmentations.some(t=>t.name===c.a.StaneksGift1)||Object(y.a)({name:c.a.StaneksGift1,level:1}),n.toFaction(t)}switch(t.loc.name){case l.a.NewTokyoVitaLife:return e.canAccessGrafting()?r.a.createElement(o.a,{onClick:L,sx:{my:5}},"Enter the secret lab"):r.a.createElement(r.a.Fragment,null);case l.a.Sector12CityHall:return r.a.createElement(O,null);case l.a.Sector12NSA:return function(){if(!e.canAccessBladeburner())return r.a.createElement(r.a.Fragment,null);const t=C?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(o.a,{onClick:x},t))}();case l.a.NewTokyoNoodleBar:return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){d.b.emit("You ate some delicious noodles and feel refreshed","success",2e3),Object(p.a)(),e.sourceFiles.length>0&&e.giveExploit(g.a.N00dles),(e.sourceFileLvl(5)>0||5===e.bitNodeN)&&(e.intelligence_exp*=1.0000000000000002),e.hacking_exp*=1.0000000000000002,e.strength_exp*=1.0000000000000002,e.defense_exp*=1.0000000000000002,e.agility_exp*=1.0000000000000002,e.dexterity_exp*=1.0000000000000002,e.charisma_exp*=1.0000000000000002;for(const t of e.hacknetNodes)if(t instanceof E.a)e.gainMoney(.001*t.moneyGainRatePerSecond,"other");else{const n=Object(k.d)(t);if(!(n instanceof v.a))throw new Error(`Server ${t} is not a hacknet server.`);e.hashManager.storeHashes(.001*n.hashRate)}e.bladeburner&&(e.bladeburner.rank+=1e-5),e.corporation&&(e.corporation.funds+=.01*e.corporation.revenue)}},"Eat noodles"));case l.a.ChongqingChurchOfTheMachineGod:return function(){const t=r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," `` ",r.a.createElement("br",null)," -odmmNmds: ",r.a.createElement("br",null)," `hNmo:..-omNh. ",r.a.createElement("br",null)," yMd` `hNh ",r.a.createElement("br",null)," mMd oNm ",r.a.createElement("br",null)," oMNo .mM/ ",r.a.createElement("br",null)," `dMN+ -mM+ ",r.a.createElement("br",null)," -mMNo -mN+ ",r.a.createElement("br",null)," .+- :mMNo/mN/ ",r.a.createElement("br",null),":yNMd. :NMNNN/ ",r.a.createElement("br",null),"-mMMMh. /NMMh` ",r.a.createElement("br",null)," .dMMMd. /NMMMy` ",r.a.createElement("br",null)," `yMMMd. /NNyNMMh` ",r.a.createElement("br",null)," `sMMMd. +Nm: +NMMh. ",r.a.createElement("br",null)," oMMMm- oNm: /NMMd. ",r.a.createElement("br",null)," +NMMmsMm- :mMMd. ",r.a.createElement("br",null)," /NMMMm- -mMMd. ",r.a.createElement("br",null)," /MMMm- -mMMd. ",r.a.createElement("br",null)," `sMNMMm- .mMmo ",r.a.createElement("br",null)," `sMd:hMMm. ./. ",r.a.createElement("br",null)," `yMy` `yNMd` ",r.a.createElement("br",null)," `hMs` oMMy ",r.a.createElement("br",null)," `hMh sMN- ",r.a.createElement("br",null)," /MM- .NMo ",r.a.createElement("br",null)," +MM: :MM+ ",r.a.createElement("br",null)," sNNo-.`.-omNy` ",r.a.createElement("br",null)," -smNNNNmdo- ",r.a.createElement("br",null)," `..` ");return e.hasAugmentation(c.a.StaneksGift3,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it seems. Curious, Just how much of a machine's soul do you house in that body?")),t):e.hasAugmentation(c.a.StaneksGift2,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: I see you\'ve taken to my creation. So much so it could hardly be recognized as one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.')),t):e.factions.includes(w.a.ChurchOfTheMachineGod)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome back my child!')),t):e.canAccessCotMG()?e.augmentations.filter(t=>t.name!==c.a.NeuroFluxGovernor).length>0||e.queuedAugmentations.filter(t=>t.name!==c.a.NeuroFluxGovernor).length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Begone you filth! My gift must be the first modification that your body should have!'))):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human form? If you are, accept my gift.')),r.a.createElement(o.a,{onClick:M},"Accept Stanek's Gift"),t):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"A decrepit altar stands in the middle of a dilapidated church.",r.a.createElement("br",null),r.a.createElement("br",null),"A symbol is carved in the altar."),r.a.createElement("br",null),t)}();case l.a.IshimaGlitch:return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement(b.a,{content:"An eerie aura surrounds this area. You feel you should leave."})));case l.a.NewTokyoArcade:return r.a.createElement(_.a,null);default:return console.error(`Location ${t.loc.name} doesn't have any special properties`),r.a.createElement(r.a.Fragment,null)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(20),o=n(41),s=n(30),l=n(1),c=n(10),f=n(81);function u(t){const e=s.b.Player(),n=s.b.Router(),u=e.canAfford(15e10);if(!e.canAccessCorporation()||e.hasCorporation())return t.onClose(),r.a.createElement(r.a.Fragment,null);const[m,h]=Object(a.useState)("");return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Would you like to start a corporation? This will require $150b for registration and initial funding. ",3===e.bitNodeN&&"This $150b\n can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million\n shares",r.a.createElement("br",null),r.a.createElement("br",null),"If you would like to start one, please enter a name for your corporation below:"),r.a.createElement(f.a,{autoFocus:!0,placeholder:"Corporation Name",onChange:function(t){h(t.target.value)},value:m}),3===e.bitNodeN&&r.a.createElement(c.a,{onClick:function(){""!=m&&(e.startCorporation(m,5e8),t.onClose(),n.toCorporation())},disabled:""==m},"Use seed money"),r.a.createElement(c.a,{onClick:function(){u&&""!=m&&(e.startCorporation(m),e.loseMoney(15e10,"corporation"),t.onClose(),n.toCorporation())},disabled:""==m||!u},"Self-Fund (",r.a.createElement(i.a,{money:15e10,player:e}),")"))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return N00dles}));const n00dlePower="[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()";function N00dles(){eval(n00dlePower)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a,r=n(0),i=n.n(r),o=n(1282),s=n(10),l=n(30),c=n(338);function f(){const t=l.b.Player(),[e,n]=Object(r.useState)(a.None);if(e===a.None)return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{onClick:function(){0===t.sourceFileLvl(1)?c.a.emit("This machine is broken."):n(a.Megabyteburner2000)}},"Megabyte burner 2000"));let f=i.a.createElement(i.a.Fragment,null);switch(e){case a.Megabyteburner2000:f=i.a.createElement(o.a,null)}return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{onClick:()=>n(a.None)},"Back"),f)}!function(t){t[t.None=0]="None",t[t.Megabyteburner2000=1]="Megabyteburner2000"}(a||(a={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(1),o=n(30),s=n(106);const l={width:"1060px",height:"800px",border:"0px"};function c(){const t=o.b.Player();Object(a.useEffect)(()=>{window.addEventListener("message",(function(e){e.isTrusted&&"https://bitburner-official.github.io"==e.origin&&e.data&&t.giveExploit(s.a.TrueRecursion)}))});const e=r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ,'\" \"', .-. "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / \\ ( ) "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | .-. '-' .-. "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ / ( ) ( )"),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," '.___.' '-' .-. '-'"),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ||| ( ) "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ||| '-' "));return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{width:"1060px",height:"800px",padding:"0",overflow:"hidden",borderColor:"white",borderStyle:"solid",borderWidth:"5px"}},r.a.createElement("iframe",{src:"https://bitburner-official.github.io/bitburner-legacy/",style:l})),r.a.createElement("div",{style:{width:"1060px",borderColor:"white",borderStyle:"solid",borderWidth:"5px"}},e))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(1),o=n(10),s=n(1284),l=n(1285),c=n(1287),f=n(222),u=n(20),m=n(30),h=n(1288),d=n(4),p=n(21);function g(t){const[e,n]=Object(a.useState)(!1),i=m.b.Player(),s=Object(f.a)(t.ram);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onClick:()=>n(!0),disabled:!i.canAfford(s)},"Purchase ",d.a.formatRAM(t.ram)," Server - ",r.a.createElement(u.a,{money:s,player:i})),r.a.createElement(h.a,{open:e,onClose:()=>n(!1),ram:t.ram,cost:s,rerender:t.rerender}))}function y(t){const e=m.b.Player(),n=Object(a.useState)(!1)[1];function o(){n(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(o,1e3);return()=>clearInterval(t)},[]);const f=[];for(let e=t.loc.techVendorMinRam;e<=t.loc.techVendorMaxRam;e*=2)f.push(r.a.createElement(g,{key:e,ram:e,rerender:o}));return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(p.a,{sx:{display:"grid",width:"fit-content"}},f),r.a.createElement("br",null),r.a.createElement(i.a,null,r.a.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom orders in person."')),r.a.createElement("br",null),r.a.createElement(l.a,{p:e,rerender:o}),r.a.createElement("br",null),r.a.createElement(s.a,{p:e,rerender:o}),r.a.createElement("br",null),r.a.createElement(c.a,{p:e,rerender:o}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(10),o=n(23),s=n(1),l=n(8),c=n(222),f=n(20),u=n(4),m=n(265);function h(t){const e=t.p.getHomeComputer();if(e.maxRam>=l.a.HomeComputerMaxRam)return r.a.createElement(i.a,null,"Upgrade 'home' RAM - MAX");const n=t.p.getUpgradeHomeRamCost();return r.a.createElement(o.a,{title:r.a.createElement(m.a,null,"\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)")},r.a.createElement("span",null,r.a.createElement("br",null),r.a.createElement(s.a,null,r.a.createElement("i",null,"\"More RAM means more scripts on 'home'\"")),r.a.createElement("br",null),r.a.createElement(i.a,{disabled:!t.p.canAfford(n),onClick:function(){Object(c.d)(t.p),t.rerender()}},"Upgrade 'home' RAM (",u.a.formatRAM(e.maxRam)," -> ",u.a.formatRAM(2*e.maxRam),") - ",r.a.createElement(f.a,{money:n,player:t.p}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(10),o=n(1286),s=n(8),l=n(20);function c(t){return t.p.hasTorRouter()?r.a.createElement(i.a,null,"TOR Router - Purchased"):r.a.createElement(i.a,{disabled:!t.p.canAfford(s.a.TorRouterCost),onClick:function(){Object(o.a)(t.p),t.rerender()}},"Purchase TOR router - ",r.a.createElement(l.a,{money:s.a.TorRouterCost,player:t.p}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(8),r=n(26),i=n(132),o=n(16);function s(t){if(t.hasTorRouter())return void Object(o.a)("You already have a TOR Router!");if(!t.canAfford(a.a.TorRouterCost))return void Object(o.a)("You cannot afford to purchase the TOR router!");t.loseMoney(a.a.TorRouterCost,"other");const e=Object(i.f)({ip:Object(r.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(r.a)(e),t.getHomeComputer().serversOnNetwork.push(e.hostname),e.serversOnNetwork.push(t.getHomeComputer().hostname),Object(o.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.")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(10),o=n(23),s=n(1),l=n(20),c=n(265);function f(t){const e=t.p.getHomeComputer(),n=e.cpuCores>=8;if(n)return r.a.createElement(i.a,null,"Upgrade 'home' cores - MAX");const a=t.p.getUpgradeHomeCoresCost();return r.a.createElement(o.a,{title:r.a.createElement(c.a,null,"\\(\\large{cost = 10^9 \\cdot 7.5 ^{\\text{cores}}}\\)")},r.a.createElement("span",null,r.a.createElement("br",null),r.a.createElement(s.a,null,r.a.createElement("i",null,"\"Cores increase the effectiveness of grow() and weaken() on 'home'\"")),r.a.createElement("br",null),r.a.createElement(i.a,{disabled:!t.p.canAfford(a),onClick:function(){n||t.p.canAfford(a)&&(t.p.loseMoney(a,"servers"),e.cpuCores++,t.rerender())}},"Upgrade 'home' cores (",e.cpuCores," -> ",e.cpuCores+1,") - ",r.a.createElement(l.a,{money:a,player:t.p}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(222),o=n(4),s=n(20),l=n(41),c=n(30),f=n(1),u=n(81),m=n(10),h=n(28);function d(t){const e=c.b.Player(),[n,d]=Object(a.useState)("");function p(){Object(i.e)(n,t.ram,t.cost,e),t.onClose()}return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Would you like to purchase a new server with ",o.a.formatRAM(t.ram)," of RAM for"," ",r.a.createElement(s.a,{money:t.cost,player:e}),"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,null," Please enter the server hostname below:"),r.a.createElement("br",null),r.a.createElement(u.a,{autoFocus:!0,onKeyUp:function(t){t.key===h.a.ENTER&&p()},onChange:function(t){d(t.target.value)},type:"text",placeholder:"Unique Hostname",InputProps:{endAdornment:r.a.createElement(m.a,{onClick:p,disabled:!e.canAfford(t.cost)||""===n},"Buy")}}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(8),o=n(20),s=n(41),l=n(30),c=n(1),f=n(10);function u(t){const e=l.b.Player(),n=i.a.TravelCost;return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Would you like to travel to ",t.city,"? The trip will cost ",r.a.createElement(o.a,{money:n,player:e}),"."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,{onClick:function(){t.travel()}},r.a.createElement(c.a,null,"Travel")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n(23),i=n(10),o=n(8),s=n(26),l=n(20),c=n(30),f=n(21);function u(t){const e=c.b.Player(),n=c.b.Router();function u(){const e=Object(s.d)(t.loc.name);if(null==e||!e.hasOwnProperty("backdoorInstalled"))return t.loc.costMult;const n=e.backdoorInstalled?.9:1;return t.loc.costMult*n}function m(a){const r=t.loc;e.startClass(u(),r.expMult,a),e.startFocusing(),n.toWork()}const h=u(),d=o.a.ClassDataStructuresBaseCost*h,p=o.a.ClassNetworksBaseCost*h,g=o.a.ClassAlgorithmsBaseCost*h,y=o.a.ClassManagementBaseCost*h,b=o.a.ClassLeadershipBaseCost*h;return a.createElement(f.a,{sx:{display:"grid",width:"fit-content"}},a.createElement(r.a,{title:"Gain hacking experience!"},a.createElement(i.a,{onClick:function(){m(o.a.ClassStudyComputerScience)}},"Study Computer Science (free)")),a.createElement(r.a,{title:"Gain hacking experience!"},a.createElement(i.a,{onClick:function(){m(o.a.ClassDataStructures)}},"Take Data Structures course (",a.createElement(l.a,{money:d,player:e})," / sec)")),a.createElement(r.a,{title:"Gain hacking experience!"},a.createElement(i.a,{onClick:function(){m(o.a.ClassNetworks)}},"Take Networks course (",a.createElement(l.a,{money:p,player:e})," / sec)")),a.createElement(r.a,{title:"Gain hacking experience!"},a.createElement(i.a,{onClick:function(){m(o.a.ClassAlgorithms)}},"Take Algorithms course (",a.createElement(l.a,{money:g,player:e})," / sec)")),a.createElement(r.a,{title:"Gain charisma experience!"},a.createElement(i.a,{onClick:function(){m(o.a.ClassManagement)}},"Take Management course (",a.createElement(l.a,{money:y,player:e})," / sec)")),a.createElement(r.a,{title:"Gain charisma experience!"},a.createElement(i.a,{onClick:function(){m(o.a.ClassLeadership)}},"Take Leadership course (",a.createElement(l.a,{money:b,player:e})," / sec)")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a,r=n(0),i=n.n(r),o=n(10),s=n(764),l=n(1293),c=n(1294),f=n(1295),u=n(21);function m(t){const[e,n]=Object(r.useState)(a.None);function m(t){n(t)}return i.a.createElement(i.a.Fragment,null,e===a.None&&i.a.createElement(u.a,{sx:{display:"grid",width:"fit-content"}},i.a.createElement(o.a,{onClick:()=>m(a.Coin)},"Play coin flip"),i.a.createElement(o.a,{onClick:()=>m(a.Slots)},"Play slots"),i.a.createElement(o.a,{onClick:()=>m(a.Roulette)},"Play roulette"),i.a.createElement(o.a,{onClick:()=>m(a.Blackjack)},"Play blackjack (",s.b," decks)")),e!==a.None&&i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{onClick:()=>m(a.None)},"Stop playing"),e===a.Coin&&i.a.createElement(l.a,{p:t.p}),e===a.Slots&&i.a.createElement(f.a,{p:t.p}),e===a.Roulette&&i.a.createElement(c.a,{p:t.p}),e===a.Blackjack&&i.a.createElement(s.a,{p:t.p})))}!function(t){t.None="none",t.Coin="coin",t.Slots="slots",t.Roulette="roulette",t.Blackjack="blackjack"}(a||(a={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(258),r=n(173);class i{constructor(t=1){var e,n,a;a=[],(n="cards")in(e=this)?Object.defineProperty(e,n,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[n]=a,this.numDecks=t,this.reset()}shuffle(){this.cards=Object(r.shuffle)(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let t=1;t<=13;++t)for(let e=0;ey(!1),250),s?Object(o.c)(t.p,e):Object(o.c)(t.p,-e),Object(o.b)(t.p)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Result:")," ",m,r.a.createElement(u.a,{display:"flex",alignItems:"center"},r.a.createElement(c.a,{type:"number",onChange:function(t){let e=parseInt(t.currentTarget.value);isNaN(e)&&(e=0),e>1e4&&(e=1e4),e<0&&(e=0),n(e)},InputProps:{endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{onClick:Object(s.a)(()=>b("H")),disabled:g},"Head!"),r.a.createElement(f.a,{onClick:Object(s.a)(()=>b("T")),disabled:g},"Tail!"))}})),r.a.createElement(l.a,{variant:"h3"},d))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(20),o=n(207),s=n(310),l=n(86),c=n(1),f=n(10),u=n(81);const m=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],h={Red:{match:t=>m.includes(t),payout:1},Black:{match:t=>0!==t&&!m.includes(t),payout:1},Odd:{match:t=>0!==t&&t%2==1,payout:1},Even:{match:t=>0!==t&&t%2==0,payout:1},High:{match:t=>0!==t&&t>18,payout:1},Low:{match:t=>0!==t&&t<19,payout:1},Third1:{match:t=>0!==t&&t<=12,payout:2},Third2:{match:t=>0!==t&&(t>=13&&t<=24),payout:2},Third3:{match:t=>0!==t&&t>=25,payout:2}};function d(t){return{match:e=>t===e,payout:36}}function p(t){const[e]=Object(a.useState)(new s.c((new Date).getTime())),[n,m]=Object(a.useState)(1e3),[p,g]=Object(a.useState)(!0),[y,b]=Object(a.useState)("waiting"),[E,v]=Object(a.useState)(0),[k,_]=Object(a.useState)(!0);function w(){k||v(Math.floor(37*Math.random()))}function S(a){Object(o.b)(t.p)||(g(!1),_(!1),b("playing"),setTimeout(()=>{let s=Math.floor(37*e.random()),l=r.a.createElement(r.a.Fragment,null),c=0,f=a.match(s);if(f&&Math.random()>.9)for(f=!1;a.match(s);)s=(s+1)%36;f?(c=n*a.payout,l=r.a.createElement(r.a.Fragment,null,"won ",r.a.createElement(i.a,{money:c}))):(c=-n,l=r.a.createElement(r.a.Fragment,null,"lost ",r.a.createElement(i.a,{money:-c}))),Object(o.c)(t.p,c),g(!0),_(!0),b(l),v(s),Object(o.b)(t.p)},1600))}return Object(a.useEffect)(()=>{const t=window.setInterval(w,50);return()=>clearInterval(t)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},function(){if(0===E)return"0";const t=function(t){return[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(t)}(E)?"R":"B";return`${E}${t}`}()),r.a.createElement(u.a,{type:"number",onChange:function(t){let e=parseInt(t.currentTarget.value);isNaN(e)&&(e=0),e>1e7&&(e=1e7),e<0&&(e=0),m(e)},placeholder:"Amount to play",disabled:!p}),r.a.createElement(c.a,{variant:"h4"},y),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(3)))},"3")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(6)))},"6")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(9)))},"9")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(12)))},"12")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(15)))},"15")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(18)))},"18")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(21)))},"21")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(24)))},"24")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(27)))},"27")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(30)))},"30")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(33)))},"33")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(36)))},"36"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(2)))},"2")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(5)))},"5")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(8)))},"8")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(11)))},"11")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(14)))},"14")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(17)))},"17")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(20)))},"20")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(23)))},"23")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(26)))},"26")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(29)))},"29")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(32)))},"32")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(35)))},"35"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(1)))},"1")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(4)))},"4")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(7)))},"7")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(10)))},"10")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(13)))},"13")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(16)))},"16")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(19)))},"19")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(22)))},"22")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(25)))},"25")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(28)))},"28")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(31)))},"31")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(34)))},"34"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:4},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Third1))},"1 to 12")),r.a.createElement("td",{colSpan:4},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Third2))},"13 to 24")),r.a.createElement("td",{colSpan:4},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Third3))},"25 to 36"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Red))},"Red")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Black))},"Black")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Odd))},"Odd")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Even))},"Even")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.High))},"High")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Low))},"Low"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(0)))},"0"))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(20),o=n(310),s=n(207),l=n(86),c=n(1),f=n(81),u=n(10);const m=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function h(t,e){switch(t){case"$":return[20,200,1e3][e];case"@":return[8,80,400][e];case"♥":case"?":return[6,20,150][e];case"D":case"E":return[1,8,30][e];default:return[1,5,20][e]}}const d=[[[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]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[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]]];function p(t){const[e]=Object(a.useState)(new o.c(t.p.totalPlaytime)),[n,p]=Object(a.useState)([0,0,0,0,0]),[g,y]=Object(a.useState)([0,0,0,0,0]),[b,E]=Object(a.useState)(1e3),[v,k]=Object(a.useState)(!0),[_,w]=Object(a.useState)("waiting");function S(){let e=!1;const a=n.slice();for(let t=0;t=0?a[t]-1:m.length-1,e=!0);p(a),e&&a.every((t,e)=>t===g[e])&&function(e){const n=function(t){const n=[];for(const a of t)n.push(e[a[0]][a[1]]);return n},a=function(t){let e=1;for(let n=1;n0?"gained":"lost"," ",r.a.createElement(i.a,{money:Math.abs(o)}))),k(!0),Object(s.b)(t.p));}(C(a,m))}function C(t,e){return[[e[(t[0]+e.length-1)%e.length],e[(t[1]+e.length-1)%e.length],e[(t[2]+e.length-1)%e.length],e[(t[3]+e.length-1)%e.length],e[(t[4]+e.length-1)%e.length]],[e[t[0]],e[t[1]],e[t[2]],e[t[3]],e[t[4]]],[e[(t[0]+1)%e.length],e[(t[1]+1)%e.length],e[(t[2]+1)%e.length],e[(t[3]+1)%e.length],e[(t[4]+1)%e.length]]]}function x(){y([Math.floor(e.random()*m.length),Math.floor(e.random()*m.length),Math.floor(e.random()*m.length),Math.floor(e.random()*m.length),Math.floor(e.random()*m.length)])}Object(a.useEffect)(()=>{const t=window.setInterval(S,50);return()=>clearInterval(t)});const L=C(n,m);return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",L[0][0]," | ",L[0][1]," | ",L[0][2]," | ",L[0][3]," | ",L[0][4]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",m[n[0]]," | ",m[n[1]]," | ",m[n[2]]," | ",m[n[3]]," | ",m[n[4]]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",m[(n[0]+1)%m.length]," | ",m[(n[1]+1)%m.length]," | ",m[(n[2]+1)%m.length]," | ",m[(n[3]+1)%m.length]," | ",m[(n[4]+1)%m.length]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(f.a,{type:"number",onChange:function(t){let e=parseInt(t.currentTarget.value);isNaN(e)&&(e=0),e>1e6&&(e=1e6),e<0&&(e=0),E(e)},placeholder:"Amount to play",disabled:!v,InputProps:{endAdornment:r.a.createElement(u.a,{onClick:Object(l.a)((function(){Object(s.b)(t.p)||(w("playing"),Object(s.c)(t.p,-b),v&&(y([-1,-1,-1,-1,-1]),k(!1),setTimeout(x,2e3*e.random()+1e3)))})),disabled:!v},"Spin!")}}),r.a.createElement(c.a,{variant:"h4"},_),r.a.createElement(c.a,null,"Pay lines"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"----- ····· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ----- ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ····· -----"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"··^·· \\···/ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·/·\\· ·\\·/· ·---·"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ··v·· ·····"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ·---· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·---· /···\\ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ····· ·---·"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var a=n(0),r=n(149),i=n(11),o=n(218),s=n(9),l=n(30),c=n(1),f=n(10),u=n(51),m=n(113),h=n(137);const d=Object(m.a)(t=>Object(h.a)({location:{color:t.colors.white,whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"}}));function p(t,e){e.name===i.a.TravelAgency?t.toTravel():e.name===i.a.WorldStockExchange?t.toStockMarket():t.toLocation(e)}function g(t){t.types;const e=l.b.Router(),n=d();let r="X";return t.types.includes(u.a.Company)&&(r="C"),t.types.includes(u.a.Gym)&&(r="G"),t.types.includes(u.a.Hospital)&&(r="H"),t.types.includes(u.a.Slums)&&(r="S"),t.types.includes(u.a.StockMarket)&&(r="$"),t.types.includes(u.a.TechVendor)&&(r="T"),t.types.includes(u.a.TravelAgency)&&(r="T"),t.types.includes(u.a.University)&&(r="U"),t.types.includes(u.a.Casino)&&(r="¢"),t.types.includes(u.a.Special)&&(r="?"),t?a.createElement("span",{"aria-label":t.name,key:t.name,className:n.location,onClick:()=>p(e,t)},a.createElement("b",null,r)):a.createElement("span",null,"*")}function y(t){const e=/[A-Z]/g,n={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},r=a=>{const r=[],i=[];let s;for(;null!==(s=e.exec(a));)i.push(s);if(0===i.length)return r.push(a),r;for(let e=0;ea.createElement(a.Fragment,{key:t},a.createElement(f.a,{onClick:()=>p(e,o.a[t])},t),a.createElement("br",null)));return a.createElement(a.Fragment,null,n)}function E(){const t=l.b.Player(),e=r.a[t.city];return a.createElement(a.Fragment,null,a.createElement(c.a,null,e.name),s.a.DisableASCIIArt?a.createElement(b,{city:e}):a.createElement(y,{city:e}))}},,,,,,,,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return h}));var a=n(0),r=n.n(a),i=n(41),o=n(10),s=n(21),l=n(1),c=n(128),f=n(274),u=n(79),m=n(81);function h(t){const[e,n]=Object(a.useState)(t.options.theme),[h,d]=Object(a.useState)(t.options.insertSpaces),[p,g]=Object(a.useState)(t.options.fontSize),[y,b]=Object(a.useState)(t.options.wordWrap),[E,v]=Object(a.useState)(t.options.vim);return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Theme: "),r.a.createElement(c.a,{onChange:t=>n(t.target.value),value:e},r.a.createElement(u.a,{value:"monokai"},"monokai"),r.a.createElement(u.a,{value:"solarized-dark"},"solarized-dark"),r.a.createElement(u.a,{value:"solarized-light"},"solarized-light"),r.a.createElement(u.a,{value:"vs-dark"},"dark"),r.a.createElement(u.a,{value:"light"},"light"),r.a.createElement(u.a,{value:"dracula"},"dracula"),r.a.createElement(u.a,{value:"one-dark"},"one-dark"))),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Use whitespace over tabs: "),r.a.createElement(f.a,{onChange:t=>d(t.target.checked),checked:h})),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Word Wrap: "),r.a.createElement(c.a,{onChange:t=>b(t.target.value),value:y},r.a.createElement(u.a,{value:"off"},"Off"),r.a.createElement(u.a,{value:"on"},"On"),r.a.createElement(u.a,{value:"bounded"},"Bounded"),r.a.createElement(u.a,{value:"wordWrapColumn"},"Word Wrap Column"))),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Enable vim mode: "),r.a.createElement(f.a,{onChange:t=>v(t.target.checked),checked:E})),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(m.a,{type:"number",label:"Font size",value:p,onChange:function(t){const e=parseFloat(t.target.value);isNaN(e)||g(e)}})),r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){t.save({theme:e,insertSpaces:h,fontSize:p,wordWrap:y,vim:E}),t.onClose()}},"Save"))}},function(t,e,n){"use strict";async function a(t){t.editor.defineTheme("monokai",{base:"vs-dark",inherit:!0,rules:[{background:"272822",token:""},{foreground:"75715e",token:"comment"},{foreground:"e6db74",token:"string"},{token:"number",foreground:"ae81ff"},{token:"otherkeyvars",foreground:"ae81ff"},{foreground:"ae81ff",token:"function"},{foreground:"f92672",token:"keyword"},{token:"storage.type.function.js",foreground:"ae81ff"},{token:"ns",foreground:"97d92b"},{token:"netscriptfunction",foreground:"53d3e4"},{token:"otherkeywords",foreground:"53d3e4"},{token:"this",foreground:"fd971f"}],colors:{"editor.foreground":"#F8F8F2","editor.background":"#272822","editor.selectionBackground":"#49483E","editor.lineHighlightBackground":"#3E3D32","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#3B3A32","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),t.editor.defineTheme("solarized-dark",{base:"vs-dark",inherit:!0,rules:[{background:"002b36",token:""},{foreground:"586e75",token:"comment"},{foreground:"00afaf",token:"string"},{token:"number",foreground:"00afaf"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"cb4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#839496","editor.background":"#002b36","editor.selectionBackground":"#073642","editor.lineHighlightBackground":"#073642","editorCursor.foreground":"#819090","editorWhitespace.foreground":"#073642","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),t.editor.defineTheme("solarized-light",{base:"vs",inherit:!0,rules:[{foreground:"657b83",background:"fdf6e3",token:""},{foreground:"586e75",token:"comment"},{foreground:"2aa198",token:"string"},{token:"number",foreground:"2aa198"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"bc4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#657b83","editor.background":"#fdf6e3","editor.selectionBackground":"#eee8d5","editor.lineHighlightBackground":"#eee8d5","editorCursor.foreground":"#657b83","editorWhitespace.foreground":"#eee8d5","editorIndentGuide.activeBackground":"#eee8d5","editor.selectionHighlightBorder":"#073642"}}),t.editor.defineTheme("dracula",{base:"vs-dark",inherit:!0,rules:[{background:"282A36",foreground:"F8F8F2",token:""},{foreground:"6272A4",token:"comment"},{foreground:"F1FA8C",token:"string"},{token:"number",foreground:"BD93F9"},{token:"otherkeyvars",foreground:"BD93F9"},{foreground:"FF79C6",token:"function"},{foreground:"FF79C6",token:"keyword"},{token:"storage.type.function.js",foreground:"FF79C6"},{token:"ns",foreground:"FFB86C",fontStyle:"italic"},{token:"netscriptfunction",foreground:"FF79C6"},{token:"otherkeywords",foreground:"FF68A7"},{token:"type.identifier.js",foreground:"7EE9FD",fontStyle:"italic"},{token:"delimiter.square.js",foreground:"FFD709"},{token:"delimiter.parenthesis.js",foreground:"FFD709"},{token:"delimiter.bracket.js",foreground:"FFD709"},{token:"this",foreground:"BD93F9",fontStyle:"italic"}],colors:{"editor.foreground":"#F8F8F2","editor.background":"#282A36","editorLineNumber.foreground":"#6272A4","editor.selectionBackground":"#44475A","editor.selectionHighlightBackground":"#424450","editor.foldBackground":"#21222C","editor.wordHighlightBackground":"#8BE9FD50","editor.wordHighlightStrongBackground":"#50FA7B50","editor.findMatchBackground":"#FFB86C80","editor.findMatchHighlightBackground":"#FFFFFF40","editor.findRangeHighlightBackground":"#44475A75","editor.hoverHighlightBackground":"#8BE9FD50","editor.lineHighlightBorder":"#44475A","editor.rangeHighlightBackground":"#BD93F915","editor.snippetTabstopHighlightBackground":"#282A36","editor.snippetTabstopHighlightBorder":"#6272A4","editor.snippetFinalTabstopHighlightBackground":"#282A36","editor.snippetFinalTabstopHighlightBorder":"#50FA7B"}}),t.editor.defineTheme("one-dark",{base:"vs-dark",inherit:!0,rules:[{token:"",background:"333842",foreground:"ABB2BF"},{token:"comment",foreground:"5C6370"},{token:"string",foreground:"98C379"},{token:"number",foreground:"D19A66"},{token:"function",foreground:"C678DD"},{token:"keyword",foreground:"C678DD"},{token:"otherkeyvars",foreground:"D19A66"},{token:"otherkeywords",foreground:"C678DD"},{token:"ns",foreground:"E06C75"},{token:"netscriptfunction",foreground:"61AFEF"},{token:"type.identifier",foreground:"E5C07B"},{token:"delimiter",foreground:"ABB2BF"},{token:"this",foreground:"E06C75"}],colors:{"editor.background":"#282C34","editor.foreground":"#ABB2BF","editor.lineHighlightBackground":"#99BBFF0A","editor.selectionBackground":"#3E4451","editor.findMatchHighlightBackground":"#528BFF3D","editorCursor.foreground":"#528BFF","editorHoverWidget.background":"#21252B","editorHoverWidget.border":"#181A1F","editorIndentGuide.background":"#ABB2BF26","editorIndentGuide.activeBackground":"#626772","editorLineNumber.foreground":"#636D83","editorLineNumber.activeForeground":"#ABB2BF","editorSuggestWidget.background":"#21252B","editorSuggestWidget.border":"#181A1F","editorSuggestWidget.selectedBackground":"#2C313A","editorWhitespace.foreground":"#ABB2BF26","editorWidget.background":"#21252B","editorWidget.border":"#3A3F4B","input.background":"#1B1D23","input.border":"#181A1F","peekView.border":"#528BFF","peekViewResult.background":"#21252B","peekViewResult.selectionBackground":"#2C313A","peekViewTitle.background":"#1B1D23","peekViewEditor.background":"#1B1D23","scrollbarSlider.background":"#4E566680","scrollbarSlider.activeBackground":"#747D9180","scrollbarSlider.hoverBackground":"#5A637580"}})}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";e.a='/**\n * @public\n */\ntype FilenameOrPID = number | string;\n\n/**\n * @public\n */\ninterface Player {\n hacking: number;\n hp: number;\n max_hp: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n hacking_mult: number;\n strength_mult: number;\n defense_mult: number;\n dexterity_mult: number;\n agility_mult: number;\n charisma_mult: number;\n hacking_exp_mult: number;\n strength_exp_mult: number;\n defense_exp_mult: number;\n dexterity_exp_mult: number;\n agility_exp_mult: number;\n charisma_exp_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n numPeopleKilled: number;\n money: number;\n city: string;\n location: string;\n companyName: string;\n crime_money_mult: number;\n crime_success_mult: number;\n isWorking: boolean;\n workType: string;\n currentWorkFactionName: string;\n currentWorkFactionDescription: string;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n workRepGainRate: number;\n workMoneyGainRate: number;\n workMoneyLossRate: number;\n workHackExpGained: number;\n workStrExpGained: number;\n workDefExpGained: number;\n workDexExpGained: number;\n workAgiExpGained: number;\n workChaExpGained: number;\n workRepGained: number;\n workMoneyGained: number;\n createProgramName: string;\n createProgramReqLvl: number;\n className: string;\n crimeType: string;\n work_money_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n hasWseAccount: boolean;\n hasTixApiAccess: boolean;\n has4SData: boolean;\n has4SDataTixApi: boolean;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n bitNodeN: number;\n totalPlaytime: number;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n jobs: any;\n factions: string[];\n tor: boolean;\n hasCorporation: boolean;\n inBladeburner: boolean;\n entropy: number;\n}\n\n/**\n * @public\n */\ninterface RunningScript {\n args: string[];\n filename: string;\n logs: string[];\n offlineExpGained: number;\n offlineMoneyMade: number;\n /** Offline running time of the script, in seconds **/\n offlineRunningTime: number;\n onlineExpGained: number;\n onlineMoneyMade: number;\n /** Online running time of the script, in seconds **/\n onlineRunningTime: number;\n pid: number;\n ramUsage: number;\n server: string;\n threads: number;\n}\n\n/**\n * Data representing the internal values of a crime.\n * @public\n */\nexport interface CrimeStats {\n /** Number representing the difficulty of the crime. Used for success chance calculations */\n difficulty: number;\n /** Amount of karma lost for successfully committing this crime */\n karma: number;\n /** How many people die as a result of this crime */\n kills: number;\n /** How much money is given */\n money: number;\n /** Name of crime */\n name: string;\n /** Milliseconds it takes to attempt the crime */\n time: number;\n /** Description of the crime activity */\n type: string;\n /** hacking level impact on success change of the crime */\n hacking_success_weight: number;\n /** strength level impact on success change of the crime */\n strength_success_weight: number;\n /** defense level impact on success change of the crime */\n defense_success_weight: number;\n /** dexterity level impact on success change of the crime */\n dexterity_success_weight: number;\n /** agility level impact on success change of the crime */\n agility_success_weight: number;\n /** charisma level impact on success change of the crime */\n charisma_success_weight: number;\n /** hacking exp gained from crime */\n hacking_exp: number;\n /** strength exp gained from crime */\n strength_exp: number;\n /** defense exp gained from crime */\n defense_exp: number;\n /** dexterity exp gained from crime */\n dexterity_exp: number;\n /** agility exp gained from crime */\n agility_exp: number;\n /** charisma exp gained from crime */\n charisma_exp: number;\n /** intelligence exp gained from crime */\n intelligence_exp: number;\n}\n\n/**\n * Data representing the internal values of an Augmentation.\n * @public\n */\nexport interface AugmentationStats {\n /** Multiplier to hacking skill */\n hacking_mult?: number;\n /** Multiplier to strength skill */\n strength_mult?: number;\n /** Multiplier to defense skill */\n defense_mult?: number;\n /** Multiplier to dexterity skill */\n dexterity_mult?: number;\n /** Multiplier to agility skill */\n agility_mult?: number;\n /** Multiplier to charisma skill */\n charisma_mult?: number;\n /** Multiplier to hacking experience gain rate */\n hacking_exp_mult?: number;\n /** Multiplier to strength experience gain rate */\n strength_exp_mult?: number;\n /** Multiplier to defense experience gain rate */\n defense_exp_mult?: number;\n /** Multiplier to dexterity experience gain rate */\n dexterity_exp_mult?: number;\n /** Multiplier to agility experience gain rate */\n agility_exp_mult?: number;\n /** Multiplier to charisma experience gain rate */\n charisma_exp_mult?: number;\n /** Multiplier to chance of successfully performing a hack */\n hacking_chance_mult?: number;\n /** Multiplier to hacking speed */\n hacking_speed_mult?: number;\n /** Multiplier to amount of money the player gains from hacking */\n hacking_money_mult?: number;\n /** Multiplier to amount of money injected into servers using grow */\n hacking_grow_mult?: number;\n /** Multiplier to amount of reputation gained when working */\n company_rep_mult?: number;\n /** Multiplier to amount of reputation gained when working */\n faction_rep_mult?: number;\n /** Multiplier to amount of money gained from crimes */\n crime_money_mult?: number;\n /** Multiplier to crime success rate */\n crime_success_mult?: number;\n /** Multiplier to amount of money gained from working */\n work_money_mult?: number;\n /** Multiplier to amount of money produced by Hacknet Nodes */\n hacknet_node_money_mult?: number;\n /** Multiplier to cost of purchasing a Hacknet Node */\n hacknet_node_purchase_cost_mult?: number;\n /** Multiplier to cost of ram for a Hacknet Node */\n hacknet_node_ram_cost_mult?: number;\n /** Multiplier to cost of core for a Hacknet Node */\n hacknet_node_core_cost_mult?: number;\n /** Multiplier to cost of leveling up a Hacknet Node */\n hacknet_node_level_cost_mult?: number;\n /** Multiplier to Bladeburner max stamina */\n bladeburner_max_stamina_mult?: number;\n /** Multiplier to Bladeburner stamina gain rate */\n bladeburner_stamina_gain_mult?: number;\n /** Multiplier to effectiveness in Bladeburner Field Analysis */\n bladeburner_analysis_mult?: number;\n /** Multiplier to success chance in Bladeburner contracts/operations */\n bladeburner_success_chance_mult?: number;\n}\n\n/**\n * Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}.\n * @public\n */\nexport interface BasicHGWOptions {\n /** Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. */\n threads?: number;\n /** Set to true this action will affect the stock market. */\n stock?: boolean;\n}\n\n/**\n * Options to affect the behavior of {@link CodingContract} attempt.\n * @public\n */\nexport interface CodingAttemptOptions {\n /** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */\n returnReward: boolean;\n}\n\n/**\n * Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs}\n * @public\n */\nexport interface AugmentPair {\n /** augmentation name */\n name: string;\n /** augmentation cost */\n cost: number;\n}\n\n/**\n * @public\n */\nexport enum PositionTypes {\n Long = "L",\n Short = "S",\n}\n\n/**\n * @public\n */\nexport enum OrderTypes {\n LimitBuy = "Limit Buy Order",\n LimitSell = "Limit Sell Order",\n StopBuy = "Stop Buy Order",\n StopSell = "Stop Sell Order",\n}\n\n/**\n * Value in map of {@link StockOrder}\n * @public\n */\nexport interface StockOrderObject {\n /** Number of shares */\n shares: number;\n /** Price per share */\n price: number;\n /** Order type */\n type: OrderTypes;\n /** Order position */\n position: PositionTypes;\n}\n\n/**\n * Return value of {@link TIX.getOrders | getOrders}\n *\n * Keys are stock symbols, properties are arrays of {@link StockOrderObject}\n * @public\n */\nexport interface StockOrder {\n [key: string]: StockOrderObject[];\n}\n\n/**\n * A single process on a server.\n * @public\n */\nexport interface ProcessInfo {\n /** Script name. */\n filename: string;\n /** Number of threads script is running with */\n threads: number;\n /** Script\'s arguments */\n args: string[];\n /** Process ID */\n pid: number;\n}\n\n/**\n * Hack related multipliers.\n * @public\n */\nexport interface HackingMultipliers {\n /** Player\'s hacking chance multiplier. */\n chance: number;\n /** Player\'s hacking speed multiplier. */\n speed: number;\n /** Player\'s hacking money stolen multiplier. */\n money: number;\n /** Player\'s hacking growth multiplier */\n growth: number;\n}\n\n/**\n * Hacknet related multipliers.\n * @public\n */\nexport interface HacknetMultipliers {\n /** Player\'s hacknet production multiplier */\n production: number;\n /** Player\'s hacknet purchase cost multiplier */\n purchaseCost: number;\n /** Player\'s hacknet ram cost multiplier */\n ramCost: number;\n /** Player\'s hacknet core cost multiplier */\n coreCost: number;\n /** Player\'s hacknet level cost multiplier */\n levelCost: number;\n}\n\n/**\n * Hacknet node related constants\n * @public\n */\nexport interface HacknetNodeConstants {\n /** Amount of money gained per level */\n MoneyGainPerLevel: number;\n /** Base cost for a new node */\n BaseCost: number;\n /** Base cost per level */\n LevelBaseCost: number;\n /** Base cost to incrase RAM */\n RamBaseCost: number;\n /** Base cost to increase cores */\n CoreBaseCost: number;\n /** Multiplier to purchase new node */\n PurchaseNextMult: number;\n /** Multiplier to increase node level */\n UpgradeLevelMult: number;\n /** Multiplier to increase RAM */\n UpgradeRamMult: number;\n /** Multiplier to increase cores */\n UpgradeCoreMult: number;\n /** Max node level */\n MaxLevel: number;\n /** Max amount of RAM in GB */\n MaxRam: number;\n /** Max number of cores */\n MaxCores: number;\n}\n\n/**\n * Hacknet server related constants\n * @public\n */\nexport interface HacknetServerConstants {\n /** Number of hashes calculated per level */\n HashesPerLevel: number;\n /** Base cost for a new server */\n BaseCost: number;\n /** Base cost to increase RAM */\n RamBaseCost: number;\n /** Base cost to increase cores */\n CoreBaseCost: number;\n /** Base cost to upgrade cache */\n CacheBaseCost: number;\n /** Multiplier to purchase a new server */\n PurchaseMult: number;\n /** Multiplier to increase server level */\n UpgradeLevelMult: number;\n /** Multiplier to increase RAM */\n UpgradeRamMult: number;\n /** Multiplier to increase cores */\n UpgradeCoreMult: number;\n /** Multiplier to upgrade cache */\n UpgradeCacheMult: number;\n /** Max number of servers */\n MaxServers: number;\n /** Max level for a server */\n MaxLevel: number;\n /** Max amount of RAM in GB */\n MaxRam: number;\n /** Max number of cores */\n MaxCores: number;\n /** Max cache size */\n MaxCache: number;\n}\n\n/**\n * A single server.\n * @public\n */\nexport interface Server {\n /**\n * How many CPU cores this server has. Maximum of 8.\n * Affects magnitude of grow and weaken.\n */\n cpuCores: number;\n\n /** Flag indicating whether the FTP port is open */\n ftpPortOpen: boolean;\n\n /** Flag indicating whether player has admin/root access to this server */\n hasAdminRights: boolean;\n\n /** Hostname. Must be unique */\n hostname: string;\n\n /** Flag indicating whether HTTP Port is open */\n httpPortOpen: boolean;\n\n /** IP Address. Must be unique */\n ip: string;\n\n /** Flag indicating whether player is currently connected to this server */\n isConnectedTo: boolean;\n\n /** RAM (GB) available on this server */\n maxRam: number;\n\n /**\n * Name of company/faction/etc. that this server belongs to.\n * Optional, not applicable to all Servers\n */\n organizationName: string;\n\n /** RAM (GB) used. i.e. unavailable RAM */\n ramUsed: number;\n\n /** Flag indicating whether SMTP Port is open */\n smtpPortOpen: boolean;\n\n /** Flag indicating whether SQL Port is open */\n sqlPortOpen: boolean;\n\n /** Flag indicating whether the SSH Port is open */\n sshPortOpen: boolean;\n\n /** Flag indicating whether this is a purchased server */\n purchasedByPlayer: boolean;\n\n /** Flag indicating whether this server has a backdoor installed by a player */\n backdoorInstalled: boolean;\n\n /**\n * Initial server security level\n * (i.e. security level when the server was created)\n */\n baseDifficulty: number;\n\n /** Server Security Level */\n hackDifficulty: number;\n\n /** Minimum server security level that this server can be weakened to */\n minDifficulty: number;\n\n /** How much money currently resides on the server and can be hacked */\n moneyAvailable: number;\n\n /** Maximum amount of money that this server can hold */\n moneyMax: number;\n\n /** Number of open ports required in order to gain admin/root access */\n numOpenPortsRequired: number;\n\n /** How many ports are currently opened on the server */\n openPortCount: number;\n\n /** Hacking level required to hack this server */\n requiredHackingSkill: number;\n\n /**\n * Parameter that affects how effectively this server\'s money can\n * be increased using the grow() Netscript function\n */\n serverGrowth: number;\n}\n\n/**\n * All multipliers affecting the difficulty of the current challenge.\n * @public\n */\nexport interface BitNodeMultipliers {\n /** Influences how quickly the player\'s agility level (not exp) scales */\n AgilityLevelMultiplier: number;\n /** Influences the base cost to purchase an augmentation. */\n AugmentationMoneyCost: number;\n /** Influences the base rep the player must have with a faction to purchase an augmentation. */\n AugmentationRepCost: number;\n /** Influences how quickly the player can gain rank within Bladeburner. */\n BladeburnerRank: number;\n /** Influences the cost of skill levels from Bladeburner. */\n BladeburnerSkillCost: number;\n /** Influences how quickly the player\'s charisma level (not exp) scales */\n CharismaLevelMultiplier: number;\n /** Influences the experience gained for each ability when a player completes a class. */\n ClassGymExpGain: number;\n /** Influences the amount of money gained from completing Coding Contracts */\n CodingContractMoney: number;\n /** Influences the experience gained for each ability when the player completes working their job. */\n CompanyWorkExpGain: number;\n /** Influences how much money the player earns when completing working their job. */\n CompanyWorkMoney: number;\n /** Influences the money gain from dividends of corporations created by the player. */\n CorporationSoftCap: number;\n /** Influences the valuation of corporations created by the player. */\n CorporationValuation: number;\n /** Influences the base experience gained for each ability when the player commits a crime. */\n CrimeExpGain: number;\n /** Influences the base money gained when the player commits a crime. */\n CrimeMoney: number;\n /** Influences how many Augmentations you need in order to get invited to the Daedalus faction */\n DaedalusAugsRequirement: number;\n /** Influences how quickly the player\'s defense level (not exp) scales */\n DefenseLevelMultiplier: number;\n /** Influences how quickly the player\'s dexterity level (not exp) scales */\n DexterityLevelMultiplier: number;\n /** Influences how much rep the player gains in each faction simply by being a member. */\n FactionPassiveRepGain: number;\n /** Influences the experience gained for each ability when the player completes work for a Faction. */\n FactionWorkExpGain: number;\n /** Influences how much rep the player gains when performing work for a faction. */\n FactionWorkRepGain: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data API */\n FourSigmaMarketDataApiCost: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data (NOT API) */\n FourSigmaMarketDataCost: number;\n /** Influences the respect gain and money gain of your gang. */\n GangSoftcap: number;\n /** Influences the experienced gained when hacking a server. */\n HackExpGain: number;\n /** Influences how quickly the player\'s hacking level (not experience) scales */\n HackingLevelMultiplier: number;\n /** Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9) */\n HacknetNodeMoney: number;\n /** Influences how much money it costs to upgrade your home computer\'s RAM */\n HomeComputerRamCost: number;\n /** Influences how much money is gained when the player infiltrates a company. */\n InfiltrationMoney: number;\n /** Influences how much rep the player can gain from factions when selling stolen documents and secrets */\n InfiltrationRep: number;\n /** Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal. */\n ManualHackMoney: number;\n /** Influence how much it costs to purchase a server */\n PurchasedServerCost: number;\n /** Influences the maximum number of purchased servers you can have */\n PurchasedServerLimit: number;\n /** Influences the maximum allowed RAM for a purchased server */\n PurchasedServerMaxRam: number;\n /** Influences cost of any purchased server at or above 128GB */\n PurchasedServerSoftcap: number;\n /** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */\n RepToDonateToFaction: number;\n /** Influences how much the money on a server can be reduced when a script performs a hack against it. */\n ScriptHackMoney: number;\n /** Influences how much of the money stolen by a scripted hack will be added to the player\'s money. */\n ScriptHackMoneyGain: number;\n /** Influences the growth percentage per cycle against a server. */\n ServerGrowthRate: number;\n /** Influences the maximum money that a server can grow to. */\n ServerMaxMoney: number;\n /** Influences the initial money that a server starts with. */\n ServerStartingMoney: number;\n /** Influences the initial security level (hackDifficulty) of a server. */\n ServerStartingSecurity: number;\n /** Influences the weaken amount per invocation against a server. */\n ServerWeakenRate: number;\n /** Influences how quickly the player\'s strength level (not exp) scales */\n StrengthLevelMultiplier: number;\n /** Influences the power of the gift */\n StaneksGiftPowerMultiplier: number;\n /** Influences the size of the gift */\n StaneksGiftExtraSize: number;\n /** Influences the hacking skill required to backdoor the world daemon. */\n WorldDaemonDifficulty: number;\n}\n\n/**\n * Object representing all the values related to a hacknet node.\n * @public\n */\nexport interface NodeStats {\n /** Node\'s name */\n name: string;\n /** Node\'s level */\n level: number;\n /** Node\'s RAM (GB) */\n ram: number;\n /** Node\'s used RAM (GB) */\n ramUsed: number;\n /** Node\'s number of cores */\n cores: number;\n /** Cache level. Only applicable for Hacknet Servers */\n cache: number;\n /** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */\n hashCapacity: number;\n /** Node\'s production per second */\n production: number;\n /** Number of seconds since Node has been purchased */\n timeOnline: number;\n /** Total number of money Node has produced */\n totalProduction: number;\n}\n\n/**\n * Short summary of the players skills.\n * @public\n */\nexport interface PlayerSkills {\n /** Hacking level */\n hacking: number;\n /** Strength level */\n strength: number;\n /** Defense level */\n defense: number;\n /** Dexterity level */\n dexterity: number;\n /** Agility level */\n agility: number;\n /** Charisma level */\n charisma: number;\n /** Intelligence level */\n intelligence: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterMult {\n /** Agility stat */\n agility: number;\n /** Agility exp */\n agilityExp: number;\n /** Charisma stat */\n charisma: number;\n /** Charisma exp */\n charismaExp: number;\n /** Company reputation */\n companyRep: number;\n /** Money earned from crimes */\n crimeMoney: number;\n /** Crime success chance */\n crimeSuccess: number;\n /** Defense stat */\n defense: number;\n /** Defense exp */\n defenseExp: number;\n /** Dexterity stat */\n dexterity: number;\n /** Dexterity exp */\n dexterityExp: number;\n /** Faction reputation */\n factionRep: number;\n /** Hacking stat */\n hacking: number;\n /** Hacking exp */\n hackingExp: number;\n /** Strength stat */\n strength: number;\n /** Strength exp */\n strengthExp: number;\n /** Money earned from jobs */\n workMoney: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterInfo {\n /** Current BitNode number */\n bitnode: number;\n /** Name of city you are currently in */\n city: string;\n /** Array of factions you are currently a member of */\n factions: string[];\n /** Current health points */\n hp: number;\n /** Array of all jobs */\n jobs: string[];\n /** Array of job positions for all companies you are employed at. Same order as \'jobs\' */\n jobTitles: string[];\n /** Maximum health points */\n maxHp: number;\n /** Boolean indicating whether or not you have a tor router */\n tor: boolean;\n /** Object with many of the player\'s multipliers from Augmentations/Source Files */\n mult: CharacterMult;\n /** Timed worked in ms */\n timeWorked: number;\n /** Hacking experience earned so far from work */\n workHackExpGain: number;\n /** Str experience earned so far from work */\n workStrExpGain: number;\n /** Def experience earned so far from work */\n workDefExpGain: number;\n /** Dex experience earned so far from work */\n workDexExpGain: number;\n /** Agi experience earned so far from work */\n workAgiExpGain: number;\n /** Cha experience earned so far from work */\n workChaExpGain: number;\n /** Reputation earned so far from work, if applicable */\n workRepGain: number;\n /** Money earned so far from work, if applicable */\n workMoneyGain: number;\n /** total hacking exp */\n hackingExp: number;\n /** total strength exp */\n strengthExp: number;\n /** total defense exp */\n defenseExp: number;\n /** total dexterity exp */\n dexterityExp: number;\n /** total agility exp */\n agilityExp: number;\n /** total charisma exp */\n charismaExp: number;\n}\n\n/**\n * @public\n */\nexport interface SleeveWorkGains {\n /** Hacking exp gained from work */\n workHackExpGain: number;\n /** Strength exp gained from work */\n workStrExpGain: number;\n /** Defense exp gained from work, */\n workDefExpGain: number;\n /** Dexterity exp gained from work */\n workDexExpGain: number;\n /** Agility exp gained from work */\n workAgiExpGain: number;\n /** Charisma exp gained from work */\n workChaExpGain: number;\n /** Money gained from work */\n workMoneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface SourceFileLvl {\n /** The number of the source file */\n n: number;\n /** The level of the source file */\n lvl: number;\n}\n\n/**\n * Bladeburner current action.\n * @public\n */\nexport interface BladeburnerCurAction {\n /** Type of Action */\n type: string;\n /** Name of Action */\n name: string;\n}\n\n/**\n * Gang general info.\n * @public\n */\nexport interface GangGenInfo {\n /** Name of faction that the gang belongs to ("Slum Snakes", etc.) */\n faction: string;\n /** Indicating whether or not it\'s a hacking gang */\n isHacking: boolean;\n /** Money earned per game cycle */\n moneyGainRate: number;\n /** Gang\'s power for territory warfare */\n power: number;\n /** Gang\'s respect */\n respect: number;\n /** Respect earned per game cycle */\n respectGainRate: number;\n /** Amount of territory held */\n territory: number;\n /** Clash chance */\n territoryClashChance: number;\n /** Gang\'s wanted level */\n wantedLevel: number;\n /** Wanted level gained/lost per game cycle (negative for losses) */\n wantedLevelGainRate: number;\n /** Indicating if territory warfare is enabled */\n territoryWarfareEngaged: boolean;\n /** Number indicating the current wanted penalty */\n wantedPenalty: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfoObject {\n /** Gang power */\n power: number;\n /** Gang territory, in decimal form */\n territory: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfo {\n "Slum Snakes": GangOtherInfoObject;\n Tetrads: GangOtherInfoObject;\n "The Syndicate": GangOtherInfoObject;\n "The Dark Army": GangOtherInfoObject;\n "Speakers for the Dead": GangOtherInfoObject;\n NiteSec: GangOtherInfoObject;\n "The Black Hand": GangOtherInfoObject;\n}\n\n/**\n * Object representing data representing a gang member task.\n * @public\n */\nexport interface GangTaskStats {\n /** Task name */\n name: string;\n /** Task Description */\n desc: string;\n /** Is a task of a hacking gang */\n isHacking: boolean;\n /** Is a task of a combat gang */\n isCombat: boolean;\n /** Base respect earned */\n baseRespect: number;\n /** Base wanted earned */\n baseWanted: number;\n /** Base money earned */\n baseMoney: number;\n /** Hacking skill impact on task scaling */\n hackWeight: number;\n /** Strength skill impact on task scaling */\n strWeight: number;\n /** Defense skill impact on task scaling */\n defWeight: number;\n /** Dexterity skill impact on task scaling */\n dexWeight: number;\n /** Agility skill impact on task scaling */\n agiWeight: number;\n /** Charisma skill impact on task scaling */\n chaWeight: number;\n /** Number representing the difficulty of the task */\n difficulty: number;\n /** Territory impact on task scaling */\n territory: GangTerritory;\n}\n\n/**\n * Object representing data representing a gang member equipment.\n * @public\n */\nexport interface EquipmentStats {\n /** Strength multiplier */\n str?: number;\n /** Defense multiplier */\n def?: number;\n /** Dexterity multiplier */\n dex?: number;\n /** Agility multiplier */\n agi?: number;\n /** Charisma multiplier */\n cha?: number;\n /** Hacking multiplier */\n hack?: number;\n}\n\n/**\n * @public\n */\nexport interface GangTerritory {\n /** Money gain impact on task scaling */\n money: number;\n /** Respect gain impact on task scaling */\n respect: number;\n /** Wanted gain impact on task scaling */\n wanted: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberInfo {\n /** Name of the gang member */\n name: string;\n /** Currently assigned task */\n task: string;\n earnedRespect: number;\n\n /** Hack skill level */\n hack: number;\n /** Strength skill level */\n str: number;\n /** Defense skill level */\n def: number;\n /** Dexterity skill level */\n dex: number;\n /** Agility skill level */\n agi: number;\n /** Charisma skill level */\n cha: number;\n\n /** Current hack experience */\n hack_exp: number;\n /** Current strength experience */\n str_exp: number;\n /** Current defense experience */\n def_exp: number;\n /** Current dexterity experience */\n dex_exp: number;\n /** Current agility experience */\n agi_exp: number;\n /** Current charisma experience */\n cha_exp: number;\n\n /** Hack multiplier from equipment */\n hack_mult: number;\n /** Strength multiplier from equipment */\n str_mult: number;\n /** Defense multiplier from equipment */\n def_mult: number;\n /** Dexterity multiplier from equipment */\n dex_mult: number;\n /** Agility multiplier from equipment */\n agi_mult: number;\n /** Charisma multiplier from equipment */\n cha_mult: number;\n\n /** Hack multiplier from ascensions */\n hack_asc_mult: number;\n /** Strength multiplier from ascensions */\n str_asc_mult: number;\n /** Defense multiplier from ascensions */\n def_asc_mult: number;\n /** Dexterity multiplier from ascensions */\n dex_asc_mult: number;\n /** Agility multiplier from ascensions */\n agi_asc_mult: number;\n /** Charisma multiplier from ascensions */\n cha_asc_mult: number;\n\n /** Total earned hack experience */\n hack_asc_points: number;\n /** Total earned strength experience */\n str_asc_points: number;\n /** Total earned defense experience */\n def_asc_points: number;\n /** Total earned dexterity experience */\n dex_asc_points: number;\n /** Total earned agility experience */\n agi_asc_points: number;\n /** Total earned charisma experience */\n cha_asc_points: number;\n\n upgrades: string[];\n augmentations: string[];\n\n respectGain: number;\n wantedLevelGain: number;\n moneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberAscension {\n /** Amount of respect lost from ascending */\n respect: number;\n /** Hacking multiplier gained from ascending */\n hack: number;\n /** Strength multiplier gained from ascending */\n str: number;\n /** Defense multiplier gained from ascending */\n def: number;\n /** Dexterity multiplier gained from ascending */\n dex: number;\n /** Agility multiplier gained from ascending */\n agi: number;\n /** Charisma multiplier gained from ascending */\n cha: number;\n}\n\n/**\n * Object representing a sleeve stats.\n * @public\n */\nexport interface SleeveSkills {\n /** Current shock of the sleeve [0-100] */\n shock: number;\n /** Current sync of the sleeve [0-100] */\n sync: number;\n /** Current hacking skill of the sleeve */\n hacking: number;\n /** Current strength of the sleeve */\n strength: number;\n /** Current defense of the sleeve */\n defense: number;\n /** Current dexterity of the sleeve */\n dexterity: number;\n /** Current agility of the sleeve */\n agility: number;\n /** Current charisma of the sleeve */\n charisma: number;\n}\n\n/**\n * Object representing sleeve information.\n * @public\n */\nexport interface SleeveInformation {\n /** Location of the sleeve */\n city: string;\n /** Current hp of the sleeve */\n hp: number;\n /** Max hp of the sleeve */\n maxHp: number;\n /** Jobs available to the sleeve */\n jobs: string[];\n /** Job titles available to the sleeve */\n jobTitle: string[];\n /** Does this sleeve have access to the tor router */\n tor: boolean;\n /** Sleeve multipliers */\n mult: CharacterMult;\n /** Time spent on the current task in milliseconds */\n timeWorked: number;\n /** Earnings synchronized to other sleeves */\n earningsForSleeves: SleeveWorkGains;\n /** Earnings synchronized to the player */\n earningsForPlayer: SleeveWorkGains;\n /** Earnings for this sleeve */\n earningsForTask: SleeveWorkGains;\n /** Faction or company reputation gained for the current task */\n workRepGain: number;\n}\n\n/**\n * Object representing a sleeve current task.\n * @public\n */\nexport interface SleeveTask {\n /** Task type */\n task: string;\n /** Crime currently attempting, if any */\n crime: string;\n /** Location of the task, if any */\n location: string;\n /** Stat being trained at the gym, if any */\n gymStatType: string;\n /** Faction work type being performed, if any */\n factionWorkType: string;\n}\n\n/**\n * Object representing a port. A port is a serialized queue.\n * @public\n */\nexport interface NetscriptPort {\n /**\n * Write data to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns The data popped off the queue if it was full.\n */\n write(value: string | number): null | string | number;\n\n /**\n * Attempt to write data to the port.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns True if the data was added to the port, false if the port was full\n */\n tryWrite(value: string | number): boolean;\n\n /**\n * Shift an element out of the port.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function will remove the first element from the port and return it.\n * If the port is empty, then the string “NULL PORT DATA” will be returned.\n * @returns the data read.\n */\n read(): string | number;\n\n /**\n * Retrieve the first element from the port without removing it.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to peek at the data from a port. It returns the\n * first element in the specified port without removing that element. If\n * the port is empty, the string “NULL PORT DATA” will be returned.\n * @returns the data read\n */\n peek(): string | number;\n\n /**\n * Check if the port is full.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns true if the port is full, otherwise false\n */\n full(): boolean;\n\n /**\n * Check if the port is empty.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns true if the port is empty, otherwise false\n */\n empty(): boolean;\n\n /**\n * Empties all data from the port.\n * @remarks\n * RAM cost: 0 GB\n */\n clear(): void;\n}\n\n/**\n * Stock market API\n * @public\n */\nexport interface TIX {\n /**\n * Returns an array of the symbols of the tradable stocks\n *\n * @remarks RAM cost: 2 GB\n * @returns Array of the symbols of the tradable stocks.\n */\n getSymbols(): string[];\n\n /**\n * Returns the price of a stock\n *\n * @remarks\n * RAM cost: 2 GB\n * The stock’s price is the average of its bid and ask price.\n *\n * @example\n * ```ts\n * // NS1\n * stock.getPrice("FISG");\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.stock.getPrice("FISG");\n * ```\n * @param sym - Stock symbol.\n * @returns The price of a stock.\n */\n getPrice(sym: string): number;\n\n /**\n * Returns the ask price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The ask price of a stock.\n */\n getAskPrice(sym: string): number;\n\n /**\n * Returns the bid price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The bid price of a stock.\n */\n getBidPrice(sym: string): number;\n\n /**\n * Returns the player’s position in a stock.\n * @remarks\n * RAM cost: 2 GB\n * Returns an array of four elements that represents the player’s position in a stock.\n *\n * The first element is the returned array is the number of shares the player owns of\n * the stock in the Long position. The second element in the array is the average price\n * of the player’s shares in the Long position.\n *\n * The third element in the array is the number of shares the player owns of the stock\n * in the Short position. The fourth element in the array is the average price of the\n * player’s Short position.\n *\n * All elements in the returned array are numeric.\n *\n * @example\n * ```ts\n * // NS1\n * var pos = stock.getPosition("ECP");\n * var shares = pos[0];\n * var avgPx = pos[1];\n * var sharesShort = pos[2];\n * var avgPxShort = pos[3];\n * ```\n * @example\n * ```ts\n * // NS2\n * const [shares, avgPx, sharesShort, avgPxShort] = ns.stock.getPosition("ECP");\n * ```\n * @param sym - Stock symbol.\n * @returns Array of four elements that represents the player’s position in a stock.\n */\n getPosition(sym: string): [number, number, number, number];\n\n /**\n * Returns the maximum number of shares of a stock.\n * @remarks\n * RAM cost: 2 GB\n * This is the maximum amount of the stock that can be purchased\n * in both the Long and Short positions combined.\n *\n * @param sym - Stock symbol.\n * @returns Maximum number of shares that the stock has.\n */\n getMaxShares(sym: string): number;\n\n /**\n * Calculates cost of buying stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much it would cost to buy a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchase.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Cost to buy a given number of shares of a stock.\n */\n getPurchaseCost(sym: string, shares: number, posType: string): number;\n\n /**\n * Calculate profit of selling stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much you would gain from selling a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Gain from selling a given number of shares of a stock.\n */\n getSaleGain(sym: string, shares: number, posType: string): number;\n\n /**\n * Buy stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase shares of a stock using a Market Order.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If this function successfully purchases the shares, it will return the stock price at which\n * each share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchased. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n buy(sym: string, shares: number): number;\n\n /**\n * Sell stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell shares of a stock using a Market Order.\n *\n * If the specified number of shares in the function exceeds the amount that the player\n * actually owns, then this function will sell all owned shares. Remember that every\n * transaction on the stock exchange costs a certain commission fee.\n *\n * The net profit made from selling stocks with this function is reflected in the script’s\n * statistics. This net profit is calculated as:\n *\n * shares * (sell_price - average_price_of_purchased_shares)\n *\n * If the sale is successful, this function will return the stock price at\n * which each share was sold. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sell(sym: string, shares: number): number;\n\n /**\n * Short stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If the purchase is successful, this function will return the stock price at which each\n * share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to short. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n short(sym: string, shares: number): number;\n\n /**\n * Sell short stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the specified number of shares exceeds the amount that the player actually owns,\n * then this function will sell all owned shares. Remember that every transaction on\n * the stock exchange costs a certain commission fee.\n *\n * If the sale is successful, this function will return the stock price at which each\n * share was sold. Otherwise it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sellShort(sym: string, shares: number): number;\n\n /**\n * Place order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Places an order on the stock market. This function only works for Limit and Stop Orders.\n *\n * The ability to place limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * Returns true if the order is successfully placed, and false otherwise.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n * @returns True if the order is successfully placed, and false otherwise.\n */\n placeOrder(sym: string, shares: number, price: number, type: string, pos: string): boolean;\n\n /**\n * Cancel order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Cancels an oustanding Limit or Stop order on the stock market.\n *\n * The ability to use limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n */\n cancelOrder(sym: string, shares: number, price: number, type: string, pos: string): void;\n\n /**\n * Returns your order book for the stock market.\n * @remarks\n * RAM cost: 2.5 GB\n * This is an object containing information for all the Limit and Stop Orders you have in the stock market.\n * For each symbol you have a position in, the returned object will have a key with that symbol\'s name.\n * The object\'s properties are each an array of {@link StockOrderObject}\n * The object has the following structure:\n *\n * ```ts\n * {\n * string1: [ // Array of orders for this stock\n * {\n * shares: Order quantity\n * price: Order price\n * type: Order type\n * position: Either "L" or "S" for Long or Short position\n * },\n * {\n * ...\n * },\n * ...\n * ],\n * string2: [ // Array of orders for this stock\n * ...\n * ],\n * ...\n * }\n * ```\n * The “Order type” property can have one of the following four values: "Limit Buy Order", "Limit Sell Order", "Stop Buy Order", "Stop Sell Order".\n * Note that the order book will only contain information for stocks that you actually have orders in.\n *\n * @example\n * ```ts\n * "If you do not have orders in Nova Medical (NVMD), then the returned object will not have a “NVMD” property."\n * {\n * ECP: [\n * {\n * shares: 5,\n * price: 100,000\n * type: "Stop Buy Order",\n * position: "S",\n * },\n * {\n * shares: 25,\n * price: 125,000\n * type: "Limit Sell Order",\n * position: "L",\n * },\n * ],\n * SYSC: [\n * {\n * shares: 100,\n * price: 10,000\n * type: "Limit Buy Order",\n * position: "L",\n * },\n * ],\n * }\n * ```\n * @returns Object containing information for all the Limit and Stop Orders you have in the stock market.\n */\n getOrders(): StockOrder;\n\n /**\n * Returns the volatility of the specified stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Volatility represents the maximum percentage by which a stock’s price can change every tick.\n * The volatility is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a volatility of 3%, then this function will return 0.03, NOT 3).\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Volatility of the specified stock.\n */\n getVolatility(sym: string): number;\n\n /**\n * Returns the probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n * @remarks\n * RAM cost: 2.5 GB\n * The probability is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a 60% chance of increasing, then this function will return 0.6, NOT 60).\n *\n * In other words, if this function returned 0.30 for a stock, then this means that the stock’s price has a\n * 30% chance of increasing and a 70% chance of decreasing during the next tick.\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n */\n getForecast(sym: string): number;\n\n /**\n * Purchase 4S Market Data Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketData(): boolean;\n\n /**\n * Purchase 4S Market Data TIX API Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketDataTixApi(): boolean;\n\n /**\n * Purchase WSE Account.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchaseWseAccount(): boolean;\n\n /**\n * Purchase TIX API Access\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchaseTixApi(): boolean;\n}\n\n/**\n * Singularity API\n * @remarks\n * This API requires Source-File 4 to use. The RAM cost of all these functions is multiplied by 16/4/1 based on Source-File 4 levels.\n * @public\n */\nexport interface Singularity {\n /**\n * Take university class.\n *\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function will automatically set you to start taking a course at a university.\n * If you are already in the middle of some “working” action (such as working at a\n * company, for a faction, or on a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these universities and classes are the same as\n * if you were to manually visit and take these classes.\n *\n * @param universityName - Name of university. You must be in the correct city for whatever university you specify.\n * @param courseName - Name of course.\n * @param focus - Acquire player focus on this class. Optional. Defaults to true.\n * @returns True if actions is successfully started, false otherwise.\n */\n universityCourse(universityName: string, courseName: string, focus?: boolean): boolean;\n\n /**\n * Workout at the gym.\n *\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n\n * This function will automatically set you to start working out at a gym to train\n * a particular stat. If you are already in the middle of some “working” action\n * (such as working at a company, for a faction, or on a program), then running\n * this function will automatically cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these gyms are the same as if you were\n * to manually visit these gyms and train\n *\n * @param gymName - Name of gym. You must be in the correct city for whatever gym you specify.\n * @param stat - The stat you want to train.\n * @param focus - Acquire player focus on this gym workout. Optional. Defaults to true.\n * @returns True if actions is successfully started, false otherwise.\n */\n gymWorkout(gymName: string, stat: string, focus?: boolean): boolean;\n\n /**\n * Travel to another city.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function allows the player to travel to any city. The cost for using this\n * function is the same as the cost for traveling through the Travel Agency.\n *\n * @param city - City to travel to.\n * @returns True if actions is successful, false otherwise.\n */\n travelToCity(city: string): boolean;\n\n /**\n * Purchase the TOR router.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function allows you to automatically purchase a TOR router. The cost for\n * purchasing a TOR router using this function is the same as if you were to\n * manually purchase one.\n *\n * @returns True if actions is successful or you already own TOR router, false otherwise.\n */\n purchaseTor(): boolean;\n\n /**\n * Purchase a program from the dark web.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function allows you to automatically purchase programs. You MUST have a\n * TOR router in order to use this function. The cost of purchasing programs\n * using this function is the same as if you were purchasing them through the Dark\n * Web using the Terminal buy command.\n *\n * @example\n * ```ts\n * // NS1\n * purchaseProgram("brutessh.exe");\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.purchaseProgram("brutessh.exe");\n * ```\n * @param programName - Name of program to purchase.\n * @returns True if the specified program is purchased, and false otherwise.\n */\n purchaseProgram(programName: string): boolean;\n\n /**\n * Check if the player is busy.\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * Returns a boolean indicating whether or not the player is currently performing an\n * ‘action’. These actions include working for a company/faction, studying at a university,\n * working out at a gym, creating a program, committing a crime, or carrying out a Hacking Mission.\n *\n * @returns True if the player is currently performing an ‘action’, false otherwise.\n */\n isBusy(): boolean;\n\n /**\n * Stop the current action.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function is used to end whatever ‘action’ the player is currently performing.\n * The player will receive whatever money/experience/etc. he has earned from that action.\n *\n * The actions that can be stopped with this function are:\n *\n * * Studying at a university\n * * Working out at a gym\n * * Working for a company/faction\n * * Creating a program\n * * Committing a crime\n *\n * This function will return true if the player’s action was ended.\n * It will return false if the player was not performing an action when this function was called.\n *\n * @returns True if the player’s action was ended, false if the player was not performing an action.\n */\n stopAction(): boolean;\n\n /**\n * Upgrade home computer RAM.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will upgrade amount of RAM on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer RAM is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer RAM is successfully upgraded, and false otherwise.\n */\n upgradeHomeRam(): boolean;\n\n /**\n * Upgrade home computer cores.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will upgrade amount of cores on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer cores is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer cores is successfully upgraded, and false otherwise.\n */\n upgradeHomeCores(): boolean;\n\n /**\n * Get the price of upgrading home RAM.\n * @remarks\n * RAM cost: 1.5 GB * 16/4/1\n *\n *\n * Returns the cost of upgrading the player’s home computer RAM.\n *\n * @returns Cost of upgrading the player’s home computer RAM.\n */\n getUpgradeHomeRamCost(): number;\n\n /**\n * Get the price of upgrading home cores.\n * @remarks\n * RAM cost: 1.5 GB * 16/4/1\n *\n *\n * Returns the cost of upgrading the player’s home computer cores.\n *\n * @returns Cost of upgrading the player’s home computer cores.\n */\n getUpgradeHomeCoresCost(): number;\n\n /**\n * Work for a company.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically set you to start working at the company\n * at which you are employed. If you are already in the middle of some “working”\n * action (such as working for a faction, training at a gym, or creating a program),\n * then running this function will automatically cancel that action and give you\n * your earnings.\n *\n * This function will return true if the player starts working, and false otherwise.\n *\n * Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * // NS1:\n * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getCompanyRep(COMPANY HERE) < VALUE) {\n * workForCompany();\n * sleep(60000);\n * }\n * //This way, your company reputation will be updated every minute.\n * ```\n * @example\n * ```ts\n * // NS2:\n * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (ns.getCompanyRep(COMPANY HERE) < VALUE) {\n * ns.workForCompany();\n * await ns.sleep(60000);\n * }\n * //This way, your company reputation will be updated every minute.\n * ```\n * @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked\n * @param focus - Acquire player focus on this work operation. Optional. Defaults to true.\n * @returns True if the player starts working, and false otherwise.\n */\n workForCompany(companyName?: string, focus?: boolean): boolean;\n\n /**\n * Apply for a job at a company.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically try to apply to the specified company\n * for a position in the specified field. This function can also be used to\n * apply for promotions by specifying the company and field you are already\n * employed at.\n *\n * This function will return true if you successfully get a job/promotion,\n * and false otherwise. Note that if you are trying to use this function to\n * apply for a promotion and you don’t get one, it will return false.\n *\n * @param companyName - Name of company to apply to.\n * @param field - Field to which you want to apply.\n * @returns True if the player successfully get a job/promotion, and false otherwise.\n */\n applyToCompany(companyName: string, field: string): boolean;\n\n /**\n * Get company reputation.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function will return the amount of reputation you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of reputation you have at the specified company.\n */\n getCompanyRep(companyName: string): number;\n\n /**\n * Get company favor.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function will return the amount of favor you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you have at the specified company.\n */\n getCompanyFavor(companyName: string): number;\n\n /**\n * Get company favor gain.\n * @remarks\n * RAM cost: 0.75 GB * 16/4/1\n *\n *\n * This function will return the amount of favor you will gain for the specified\n * company when you reset by installing Augmentations.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you gain at the specified company when you reset by installing Augmentations.\n */\n getCompanyFavorGain(companyName: string): number;\n\n /**\n * List all current faction invitations.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * Returns an array with the name of all Factions you currently have oustanding invitations from.\n *\n * @returns Array with the name of all Factions you currently have oustanding invitations from.\n */\n checkFactionInvitations(): string[];\n\n /**\n * Join a faction.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically accept an invitation from a faction and join it.\n *\n * @param faction - Name of faction to join.\n * @returns True if player joined the faction, and false otherwise.\n */\n joinFaction(faction: string): boolean;\n\n /**\n * Work for a faction.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically set you to start working for the specified faction.\n * Obviously, you must be a member of the faction or else this function will fail. If\n * you are already in the middle of some “working” action (such as working for a company,\n * training at a gym, or creating a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * This function will return true if you successfully start working for the specified faction, and false otherwise.\n *\n * Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * // NS1:\n * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getFactionRep(FACTION NAME) < VALUE) {\n * workForFaction(FACNAME, WORKTYPE);\n * sleep(60000);\n * }\n * //This way, your faction reputation will be updated every minute.\n * ```\n * @example\n * ```ts\n * // NS2:\n * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (ns.getFactionRep(FACTION NAME) < VALUE) {\n * ns.workForFaction(FACNAME, WORKTYPE);\n * await ns.sleep(60000);\n * }\n * //This way, your faction reputation will be updated every minute.\n * ```\n * @param faction - Name of faction to work for.\n * @param workType - Type of work to perform for the faction.\n * @param focus - Acquire player focus on this work operation. Optional. Defaults to true.\n * @returns True if the player starts working, and false otherwise.\n */\n workForFaction(faction: string, workType: string, focus?: boolean): boolean;\n\n /**\n * Get faction reputation.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function returns the amount of reputation you have for the specified faction.\n *\n * @param faction - Name of faction to work for.\n * @returns Amount of reputation you have for the specified faction.\n */\n getFactionRep(faction: string): number;\n\n /**\n * Get faction favor.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function returns the amount of favor you have for the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you have for the specified faction.\n */\n getFactionFavor(faction: string): number;\n\n /**\n * Get faction favor gain.\n * @remarks\n * RAM cost: 0.75 GB * 16/4/1\n *\n *\n * This function returns the amount of favor you will gain for the specified\n * faction when you reset by installing Augmentations.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you will gain for the specified faction when you reset by installing Augmentations.\n */\n getFactionFavorGain(faction: string): number;\n\n /**\n * Donate to a faction.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Attempts to donate money to the specified faction in exchange for reputation.\n * Returns true if you successfully donate the money, and false otherwise.\n *\n * @param faction - Name of faction to donate to.\n * @param amount - Amount of money to donate.\n * @returns True if the money was donated, and false otherwise.\n */\n donateToFaction(faction: string, amount: number): boolean;\n\n /**\n * Create a program.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will automatically set you to start working on creating the\n * specified program. If you are already in the middle of some “working” action\n * (such as working for a company, training at a gym, or taking a course), then\n * running this function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns true if you successfully start working on the specified program, and false otherwise.\n *\n * Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are:\n * * BruteSSH.exe: 50\n * * FTPCrack.exe: 100\n * * relaySMTP.exe: 250\n * * HTTPWorm.exe: 500\n * * SQLInject.exe: 750\n * * DeepscanV1.exe: 75\n * * DeepscanV2.exe: 400\n * * ServerProfiler.exe: 75\n * * AutoLink.exe: 25\n *\n * @example\n * ```ts\n * // NS1:\n * createProgram(“relaysmtp.exe”);\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.createProgram(“relaysmtp.exe”);\n * ```\n * @param program - Name of program to create.\n * @param focus - Acquire player focus on this program creation. Optional. Defaults to true.\n * @returns True if you successfully start working on the specified program, and false otherwise.\n */\n createProgram(program: string, focus?: boolean): boolean;\n\n /**\n * Commit a crime.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function is used to automatically attempt to commit crimes.\n * If you are already in the middle of some ‘working’ action (such\n * as working for a company or training at a gym), then running this\n * function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns the number of milliseconds it takes to attempt the\n * specified crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime,\n * so running `commitCrime(\'rob store\')` will return 60,000).\n *\n * Warning: I do not recommend using the time returned from this function to try\n * and schedule your crime attempts. Instead, I would use the isBusy Singularity\n * function to check whether you have finished attempting a crime. This is because\n * although the game sets a certain crime to be X amount of seconds, there is no\n * guarantee that your browser will follow that time limit.\n *\n * @param crime - Name of crime to attempt.\n * @returns The number of milliseconds it takes to attempt the specified crime.\n */\n commitCrime(crime: string): number;\n\n /**\n * Get chance to successfully commit a crime.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns your chance of success at commiting the specified crime.\n *\n * @param crime - Name of crime.\n * @returns Chance of success at commiting the specified crime.\n */\n getCrimeChance(crime: string): number;\n\n /**\n * Get stats related to a crime.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Returns the stats of the crime.\n *\n * @param crime - Name of crime. Not case-sensitive\n * @returns The stats of the crime.\n */\n getCrimeStats(crime: string): CrimeStats;\n\n /**\n * Get a list of owned augmentation.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns an array containing the names (as strings) of all Augmentations you have.\n *\n * @param purchased - Specifies whether the returned array should include Augmentations you have purchased but not yet installed. By default, this argument is false which means that the return value will NOT have the purchased Augmentations.\n * @returns Array containing the names (as strings) of all Augmentations you have.\n */\n getOwnedAugmentations(purchased?: boolean): string[];\n\n /**\n * Get a list of augmentation available from a faction.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Returns an array containing the names (as strings) of all Augmentations\n * that are available from the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Array containing the names of all Augmentations.\n */\n getAugmentationsFromFaction(faction: string): string[];\n\n /**\n * Get the pre-requisite of an augmentation.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns an array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n * If there are no prerequisites, a blank array is returned.\n *\n * @param augName - Name of Augmentation.\n * @returns Array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n */\n getAugmentationPrereq(augName: string): string[];\n\n /**\n * Get the price and reputation of an augmentation.\n * @deprecated use getAugmentationPrice getAugmentationRepCost\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns an array with two elements that gives the cost for\n * the specified Augmentation. The first element in the returned array is the\n * reputation requirement of the Augmentation, and the second element is the\n * money cost.\n *\n * If an invalid Augmentation name is passed in for the augName argument, this\n * function will return the array [-1, -1].\n *\n * @param augName - Name of Augmentation.\n * @returns Array with first element as a reputation requirement and second element as the money cost.\n */\n getAugmentationCost(augName: string): [number, number];\n\n /**\n * Get price of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB * 16/4/1\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Price of the augmentation.\n */\n getAugmentationPrice(augName: string): number;\n\n /**\n * Get reputation requirement of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB * 16/4/1\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Reputation requirement of the augmentation.\n */\n getAugmentationRepReq(augName: string): number;\n\n /**\n * Purchase an augmentation\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will try to purchase the specified Augmentation through the given Faction.\n *\n * This function will return true if the Augmentation is successfully purchased, and false otherwise.\n *\n * @param faction - Name of faction to purchase Augmentation from.\n * @param augmentation - Name of Augmentation to purchase.\n * @returns True if the Augmentation is successfully purchased, and false otherwise.\n */\n purchaseAugmentation(faction: string, augmentation: string): boolean;\n\n /**\n * Get the stats of an augmentation.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns augmentation stats.\n *\n * @param name - Name of Augmentation. CASE-SENSITIVE.\n * @returns Augmentation stats.\n */\n getAugmentationStats(name: string): AugmentationStats;\n\n /**\n * Install your purchased augmentations.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will automatically install your Augmentations, resetting the game as usual.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n installAugmentations(cbScript?: string): void;\n\n /**\n * Returns an object with the Player’s stats.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * @example\n * ```ts\n * res = getStats();\n * print(\'My charisma level is: \' + res.charisma);\n * ```\n * @returns Object with the Player’s stats.\n */\n getStats(): PlayerSkills;\n\n /**\n * Returns an object with various information about your character.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * @returns Object with various information about your character.\n */\n getCharacterInformation(): CharacterInfo;\n\n /**\n * Hospitalize the player.\n * @remarks\n * RAM cost: 0.25 GB * 16/4/1\n */\n hospitalize(): void;\n\n /**\n * Soft reset the game.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will perform a reset even if you don’t have any augmentation installed.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n softReset(cbScript: string): void;\n\n /**\n * Go to a location.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Move the player to a specific location.\n *\n * @param locationName - Name of the location.\n * @returns True if the player was moved there, false otherwise.\n */\n goToLocation(locationName: string): boolean;\n\n /**\n * Get the current server.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * @returns Name of the current server.\n */\n getCurrentServer(): string;\n\n /**\n * Connect to a server.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * Run the connect HOSTNAME command in the terminal. Can only connect to neighbors.\n *\n * @returns True if the connect command was successful, false otherwise.\n */\n connect(hostname: string): boolean;\n\n /**\n * Run the hack command in the terminal.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * @returns Amount of money stolen by manual hacking.\n */\n manualHack(): Promise;\n\n /**\n * Run the backdoor command in the terminal.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * @returns Promise waiting for the installation to finish.\n */\n installBackdoor(): Promise;\n\n /**\n * Check if the player is focused.\n * @remarks\n * RAM cost: 0.1 GB * 16/4/1\n *\n *\n * @returns True if the player is focused.\n */\n isFocused(): boolean;\n\n /**\n * Set the players focus.\n * @remarks\n * RAM cost: 0.1 GB * 16/4/1\n *\n * @returns True if the focus was changed.\n */\n setFocus(focus: boolean): boolean;\n\n /**\n * Get a list of programs offered on the dark web.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function allows the player to get a list of programs available for purchase\n * on the dark web. Players MUST have purchased Tor to get the list of programs\n * available. If Tor has not been purchased yet, this function will return an\n * empty list.\n *\n * @example\n * ```ts\n * // NS1\n * getDarkwebProgramsAvailable();\n * // returns [\'BruteSSH.exe\', \'FTPCrack.exe\'...etc]\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.getDarkwebProgramsAvailable();\n * // returns [\'BruteSSH.exe\', \'FTPCrack.exe\'...etc]\n * ```\n * @returns - a list of programs available for purchase on the dark web, or [] if Tor has not\n * been purchased\n */\n getDarkwebPrograms(): string[];\n\n /**\n * Check the price of an exploit on the dark web\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * This function allows you to check the price of a darkweb exploit/program.\n * You MUST have a TOR router in order to use this function. The price returned\n * by this function is the same price you would see with buy -l from the terminal.\n * Returns the cost of the program if it has not been purchased yet, 0 if it\n * has already been purchased, or -1 if Tor has not been purchased (and thus\n * the program/exploit is not available for purchase).\n *\n * If the program does not exist, an error is thrown.\n *\n *\n * @example\n * ```ts\n * // NS1\n * getDarkwebProgramCost("brutessh.exe");\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.getDarkwebProgramCost("brutessh.exe");\n * ```\n * @param programName - Name of program to check the price of\n * @returns Price of the specified darkweb program\n * (if not yet purchased), 0 if it has already been purchased, or -1 if Tor has not been\n * purchased. Throws an error if the specified program/exploit does not exist\n */\n getDarkwebProgramCost(programName: string): number;\n}\n\n/**\n * Hacknet API\n * @remarks\n * Not all these functions are immediately available.\n * @public\n */\nexport interface Hacknet {\n /**\n * Get the number of hacknet nodes you own.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the number of Hacknet Nodes you own.\n *\n * @returns number of hacknet nodes.\n */\n numNodes(): number;\n\n /**\n * Get the maximum number of hacknet nodes.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns maximum number of hacknet nodes.\n */\n maxNumNodes(): number;\n\n /**\n * Purchase a new hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Purchases a new Hacknet Node. Returns a number with the index of the\n * Hacknet Node. This index is equivalent to the number at the end of\n * the Hacknet Node’s name (e.g The Hacknet Node named `hacknet-node-4`\n * will have an index of 4).\n *\n * If the player cannot afford to purchase a new Hacknet Node then the function will return -1.\n *\n * @returns The index of the Hacknet Node or if the player cannot afford to purchase a new Hacknet Node the function will return -1.\n */\n purchaseNode(): number;\n\n /**\n * Get the price of the next hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of purchasing a new Hacknet Node.\n *\n * @returns Cost of purchasing a new Hacknet Node.\n */\n getPurchaseNodeCost(): number;\n\n /**\n * Get the stats of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns an object containing a variety of stats about the specified Hacknet Node.\n *\n * Note that for Hacknet Nodes, production refers to the amount of money the node generates.\n * For Hacknet Servers (the upgraded version of Hacknet Nodes), production refers to the\n * amount of hashes the node generates.\n *\n * @param index - Index/Identifier of Hacknet Node\n * @returns Object containing a variety of stats about the specified Hacknet Node.\n */\n getNodeStats(index: number): NodeStats;\n\n /**\n * Upgrade the level of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the level of the specified Hacknet Node by n.\n *\n * Returns true if the Hacknet Node’s level is successfully upgraded by n\n * or if it is upgraded by some positive amount and the Node reaches its max level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s level is successfully upgraded, false otherwise.\n */\n upgradeLevel(index: number, n: number): boolean;\n\n /**\n * Upgrade the RAM of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the specified Hacknet Node’s RAM n times.\n * Note that each upgrade doubles the Node’s RAM.\n * So this is equivalent to multiplying the Node’s RAM by 2 n.\n *\n * Returns true if the Hacknet Node’s RAM is successfully upgraded n times\n * or if it is upgraded some positive number of times and the Node reaches it max RAM.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s ram is successfully upgraded, false otherwise.\n */\n upgradeRam(index: number, n: number): boolean;\n\n /**\n * Upgrade the core of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to purchase n cores for the specified Hacknet Node.\n *\n * Returns true if it successfully purchases n cores for the Hacknet Node\n * or if it purchases some positive amount and the Node reaches its max number of cores.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cores to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCore(index: number, n: number): boolean;\n\n /**\n * Upgrade the cache of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Tries to upgrade the specified Hacknet Server’s cache n times.\n *\n * Returns true if it successfully upgrades the Server’s cache n times,\n * or if it purchases some positive amount and the Server reaches its max cache level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cache levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCache(index: number, n: number): boolean;\n\n /**\n * Calculate the cost of upgrading hacknet node levels.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the specified Hacknet Node by n levels.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to upgrade. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node.\n */\n getLevelUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node RAM.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the RAM of the specified Hacknet Node n times.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s ram.\n */\n getRamUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cores.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the number of cores of the specified Hacknet Node by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cores. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s number of cores.\n */\n getCoreUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cache.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the cost of upgrading the cache level of the specified Hacknet Server by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cache. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s cache.\n */\n getCacheUpgradeCost(index: number, n: number): number;\n\n /**\n * Get the total number of hashes stored.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you have.\n *\n * @returns Number of hashes you have.\n */\n numHashes(): number;\n\n /**\n * Get the maximum number of hashes you can store.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you can store.\n *\n * @returns Number of hashes you can store.\n */\n hashCapacity(): number;\n\n /**\n * Get the cost of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes required for the specified upgrade. The name of the upgrade must be an exact match.\n *\n * @example\n * ```ts\n * // NS1:\n * var upgradeName = "Sell for Corporation Funds";\n * if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) {\n * hacknet.spendHashes(upgName);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * const upgradeName = "Sell for Corporation Funds";\n * if (ns.hacknet.numHashes() > ns.hacknet.hashCost(upgradeName)) {\n * ns.hacknet.spendHashes(upgName);\n * }\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @returns Number of hashes required for the specified upgrade.\n */\n hashCost(upgName: string): number;\n\n /**\n * Purchase a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Spend the hashes generated by your Hacknet Servers on an upgrade.\n * Returns a boolean value - true if the upgrade is successfully purchased, and false otherwise.\n *\n * The name of the upgrade must be an exact match.\n * The `upgTarget` argument is used for upgrades such as `Reduce Minimum Security`, which applies to a specific server.\n * In this case, the `upgTarget` argument must be the hostname of the server.\n *\n * @example\n * ```ts\n * // NS1:\n * hacknet.spendHashes("Sell for Corporation Funds");\n * hacknet.spendHashes("Increase Maximum Money", "foodnstuff");\n * ```\n * @example\n * ```ts\n * NS2:\n * ns.hacknet.spendHashes("Sell for Corporation Funds");\n * ns.hacknet.spendHashes("Increase Maximum Money", "foodnstuff");\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @param upgTarget - Object to which upgrade applies. Required for certain upgrades.\n * @returns True if the upgrade is successfully purchased, and false otherwise..\n */\n spendHashes(upgName: string, upgTarget?: string): boolean;\n\n /**\n * Get the list of hash upgrades\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the list of all available hash upgrades that can be used in the spendHashes function.\n * @example\n * ```ts\n * // NS1:\n * var upgrades = hacknet.getHashUpgrades(); // ["Sell for Money","Sell for Corporation Funds",...]\n * ```\n * @example\n * ```ts\n * // NS2:\n * const upgrades = ns.hacknet.getHashUpgrades(); // ["Sell for Money","Sell for Corporation Funds",...]\n * ```\n * @returns An array containing the available upgrades\n */\n getHashUpgrades(): string[];\n\n /**\n * Get the level of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Level of the upgrade.\n */\n getHashUpgradeLevel(upgName: string): number;\n\n /**\n * Get the multiplier to study.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getStudyMult(): number;\n\n /**\n * Get the multiplier to training.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getTrainingMult(): number;\n}\n\n/**\n * Bladeburner API\n * @remarks\n * You have to be employed in the Bladeburner division and be in BitNode-7\n * or have Source-File 7 in order to use this API.\n * @public\n */\nexport interface Bladeburner {\n /**\n * List all contracts.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner contracts.\n *\n * @returns Array of strings containing the names of all Bladeburner contracts.\n */\n getContractNames(): string[];\n\n /**\n * List all operations.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner operations.\n *\n * @returns Array of strings containing the names of all Bladeburner operations.\n */\n getOperationNames(): string[];\n\n /**\n * List all black ops.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner Black Ops.\n *\n * @returns Array of strings containing the names of all Bladeburner Black Ops.\n */\n getBlackOpNames(): string[];\n\n /**\n * List all general actions.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner actions.\n *\n * @returns Array of strings containing the names of all general Bladeburner actions.\n */\n getGeneralActionNames(): string[];\n\n /**\n * List all skills.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner skills.\n *\n * @returns Array of strings containing the names of all general Bladeburner skills.\n */\n getSkillNames(): string[];\n\n /**\n * Start an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to start the specified Bladeburner action.\n * Returns true if the action was started successfully, and false otherwise.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match\n * @returns True if the action was started successfully, and false otherwise.\n */\n startAction(type: string, name: string): boolean;\n\n /**\n * Stop current action.\n * @remarks\n * RAM cost: 2 GB\n *\n * Stops the current Bladeburner action.\n *\n */\n stopBladeburnerAction(): void;\n\n /**\n * Get current action.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns an object that represents the player’s current Bladeburner action.\n * If the player is not performing an action, the function will return an object with the ‘type’ property set to “Idle”.\n *\n * @returns Object that represents the player’s current Bladeburner action.\n */\n getCurrentAction(): BladeburnerCurAction;\n\n /**\n * Get the time to complete an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of seconds it takes to complete the specified action\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of milliseconds it takes to complete the specified action.\n */\n getActionTime(type: string, name: string): number;\n\n /**\n * Get estimate success chance of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated success chance for the specified action.\n * This chance is returned as a decimal value, NOT a percentage\n * (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80).\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Estimated success chance for the specified action.\n */\n getActionEstimatedSuccessChance(type: string, name: string): [number, number];\n\n /**\n * Get the reputation gain of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the average Bladeburner reputation gain for successfully\n * completing the specified action.\n * Note that this value is an ‘average’ and the real reputation gain may vary slightly from this value.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Optional action level at which to calculate the gain\n * @returns Average Bladeburner reputation gain for successfully completing the specified action.\n */\n getActionRepGain(type: string, name: string, level: number): number;\n\n /**\n * Get action count remaining.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the remaining count of the specified action.\n *\n * Note that this is meant to be used for Contracts and Operations.\n * This function will return ‘Infinity’ for actions such as Training and Field Analysis.\n * This function will return 1 for BlackOps not yet completed regardless of whether\n * the player has the required rank to attempt the mission or not.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Remaining count of the specified action.\n */\n getActionCountRemaining(type: string, name: string): number;\n\n /**\n * Get the maximum level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the maximum level for this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Maximum level of the specified action.\n */\n getActionMaxLevel(type: string, name: string): number;\n\n /**\n * Get the current level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the current level of this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Current level of the specified action.\n */\n getActionCurrentLevel(type: string, name: string): number;\n\n /**\n * Get whether an action is set to autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action is currently set to autolevel.\n *\n * Returns false if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns True if the action is set to autolevel, and false otherwise.\n */\n getActionAutolevel(type: string, name: string): boolean;\n\n /**\n * Set an action autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Enable/disable autoleveling for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param autoLevel - Whether or not to autolevel this action\n */\n setActionAutolevel(type: string, name: string, autoLevel: boolean): void;\n\n /**\n * Set the level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the level for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Level to set this action to.\n */\n setActionLevel(type: string, name: string, level: number): void;\n\n /**\n * Get player bladeburner rank.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the player’s Bladeburner Rank.\n *\n * @returns Player’s Bladeburner Rank.\n */\n getRank(): number;\n\n /**\n * Get black op required rank.\n * @remarks\n * RAM cost: 2 GB\n *\n * Returns the rank required to complete this BlackOp.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param name - Name of BlackOp. Must be an exact match.\n * @returns Rank required to complete this BlackOp.\n */\n getBlackOpRank(name: string): number;\n\n /**\n * Get bladeburner skill points.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner skill points you have.\n *\n * @returns Number of Bladeburner skill points you have.\n */\n getSkillPoints(): number;\n\n /**\n * Get skill level.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns your level in the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Level in the specified skill.\n */\n getSkillLevel(name: string): number;\n\n /**\n * Get cost to upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns the number of skill points needed to upgrade the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Number of skill points needed to upgrade the specified skill.\n */\n getSkillUpgradeCost(name: string): number;\n\n /**\n * Upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to upgrade the specified Bladeburner skill.\n *\n * Returns true if the skill is successfully upgraded, and false otherwise.\n *\n * @param skillName - Name of skill to be upgraded. Case-sensitive and must be an exact match\n * @returns true if the skill is successfully upgraded, and false otherwise.\n */\n upgradeSkill(name: string): boolean;\n\n /**\n * Get team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner team members you have assigned to the specified action.\n *\n * Setting a team is only applicable for Operations and BlackOps. This function will return 0 for other action types.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of Bladeburner team members that were assigned to the specified action.\n */\n getTeamSize(type: string, name: string): number;\n\n /**\n * Set team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the team size for the specified Bladeburner action.\n *\n * Returns the team size that was set, or -1 if the function failed.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param size - Number of team members to set. Will be converted using Math.round().\n * @returns Number of Bladeburner team members you assigned to the specified action.\n */\n setTeamSize(type: string, name: string, size: number): number;\n\n /**\n * Get estimated population in city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoids in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Estimated number of Synthoids in the specified city.\n */\n getCityEstimatedPopulation(name: string): number;\n\n /**\n * Get number of communities in a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoid communities in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Number of Synthoids communities in the specified city.\n */\n getCityCommunities(name: string): number;\n\n /**\n * Get chaos of a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chaos in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Chaos in the specified city.\n */\n getCityChaos(name: string): number;\n\n /**\n * Get current city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the city that the player is currently in (for Bladeburner).\n *\n * @returns City that the player is currently in (for Bladeburner).\n */\n getCity(): string;\n\n /**\n * Travel to another city in bladeburner.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to switch to the specified city (for Bladeburner only).\n *\n * Returns true if successful, and false otherwise\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns true if successful, and false otherwise\n */\n switchCity(name: string): boolean;\n\n /**\n * Get bladeburner stamina.\n * @remarks\n * RAM cost: 4 GB\n * Returns an array with two elements:\n * * [Current stamina, Max stamina]\n * @example\n * ```ts\n * // NS1:\n * function getStaminaPercentage() {\n * var res = bladeburner.getStamina();\n * return res[0] / res[1];\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * function getStaminaPercentage() {\n * const [current, max] = ns.bladeburner.getStamina();\n * return current / max;\n * }\n * ```\n * @returns Array containing current stamina and max stamina.\n */\n getStamina(): [number, number];\n\n /**\n * Join the bladeburner faction.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to join the Bladeburner faction.\n *\n * Returns true if you successfully join the Bladeburner faction, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner faction, or if you are already a member, false otherwise.\n */\n joinBladeburnerFaction(): boolean;\n\n /**\n * Join the bladeburner division.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to join the Bladeburner division.\n *\n * Returns true if you successfully join the Bladeburner division, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner division, or if you are already a member, false otherwise.\n */\n joinBladeburnerDivision(): boolean;\n\n /**\n * Get bladeburner bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Bladeburner mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 5x the normal speed.\n * For example, if an action takes 30 seconds to complete but you’ve accumulated over\n * 30 seconds in bonus time, then the action will only take 6 seconds in real life to complete.\n *\n * @returns Amount of accumulated “bonus time” (milliseconds) for the Bladeburner mechanic.\n */\n getBonusTime(): number;\n}\n\n/**\n * Coding Contract API\n * @public\n */\nexport interface CodingContract {\n /**\n * Attempts a coding contract.\n * @remarks\n * RAM cost: 10 GB\n *\n * Attempts to solve the Coding Contract with the provided solution.\n *\n * @param answer - Solution for the contract.\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.\n */\n attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;\n\n /**\n * Get the type of a coding contract.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns a name describing the type of problem posed by the Coding Contract.\n * (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Name describing the type of problem posed by the Coding Contract.\n */\n getContractType(filename: string, host?: string): string;\n\n /**\n * Get the description.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the full text description for the problem posed by the Coding Contract.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Contract’s text description.\n */\n getDescription(filename: string, host?: string): string;\n\n /**\n * Get the input data.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the data associated with the specific Coding Contract.\n * Note that this is not the same as the contract’s description.\n * This is just the data that the contract wants you to act on in order to solve\n *\n * @param filename - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns The specified contract’s data, data type depends on contract type.;\n */\n getData(filename: string, host?: string): any;\n\n /**\n * Get the number of attempt remaining.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the number of tries remaining on the contract before it self-destructs.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns How many attempts are remaining for the contract;\n */\n getNumTriesRemaining(filename: string, host?: string): number;\n}\n\n/**\n * Gang API\n * @remarks\n * If you are not in BitNode-2, then you must have Source-File 2 in order to use this API.\n * @public\n */\nexport interface Gang {\n /**\n * Create a gang.\n * @remarks\n * RAM cost: 1GB\n *\n * Create a gang with the specified faction.\n * @returns True if the gang was created, false otherwise.\n */\n createGang(faction: string): boolean;\n\n /**\n * Check if you\'re in a gang.\n * @remarks\n * RAM cost: 1GB\n * @returns True if you\'re in a gang, false otherwise.\n */\n inGang(): boolean;\n\n /**\n * List all gang members.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the names of all Gang members\n *\n * @returns Names of all Gang members.\n */\n getMemberNames(): string[];\n\n /**\n * Get information about your gang.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get general information about the gang.\n *\n * @returns Object containing general information about the gang.\n */\n getGangInformation(): GangGenInfo;\n\n /**\n * Get information about the other gangs.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get territory and power information about all gangs.\n *\n * @returns Object containing territory and power information about all gangs.\n */\n getOtherGangInformation(): GangOtherInfo;\n\n /**\n * Get information about a specific gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get stat and equipment-related information about a Gang Member\n *\n * @param name - Name of member.\n * @returns Object containing stat and equipment-related information about a Gang Member.\n */\n getMemberInformation(name: string): GangMemberInfo;\n\n /**\n * Check if you can recruit a new gang member.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns boolean indicating whether a member can currently be recruited\n *\n * @returns True if a member can currently be recruited, false otherwise.\n */\n canRecruitMember(): boolean;\n\n /**\n * Recruit a new gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempt to recruit a new gang member.\n *\n * Possible reasons for failure:\n * * Cannot currently recruit a new member\n * * There already exists a member with the specified name\n *\n * @param name - Name of member to recruit.\n * @returns True if the member was successfully recruited, false otherwise.\n */\n recruitMember(name: string): boolean;\n\n /**\n * List member task names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all valid tasks that Gang members can be assigned to.\n *\n * @returns All valid tasks that Gang members can be assigned to.\n */\n getTaskNames(): string[];\n\n /**\n * Set gang member to task.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempts to assign the specified Gang Member to the specified task.\n * If an invalid task is specified, the Gang member will be set to idle (“Unassigned”).\n *\n * @param memberName - Name of Gang member to assign.\n * @param taskName - Task to assign.\n * @returns True if the Gang Member was successfully assigned to the task, false otherwise.\n */\n setMemberTask(memberName: string, taskName: string): boolean;\n\n /**\n * Get stats of a task.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the stats of a gang task stats. This is typically used to evaluate which action should be executed next.\n *\n * @param name - Name of the task.\n * @returns Detailed stats of a task.\n */\n getTaskStats(name: string): GangTaskStats;\n\n /**\n * List equipment names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all possible equipment/upgrades you can purchase for your Gang Members.\n * This includes Augmentations.\n *\n * @returns Names of all Equipments/Augmentations.\n */\n getEquipmentNames(): string[];\n\n /**\n * Get cost of equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the amount of money it takes to purchase a piece of Equipment or an Augmentation.\n * If an invalid Equipment/Augmentation is specified, this function will return Infinity.\n *\n * @param equipName - Name of equipment.\n * @returns Cost to purchase the specified Equipment/Augmentation (number). Infinity for invalid arguments\n */\n getEquipmentCost(equipName: string): number;\n\n /**\n * Get type of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment type.\n *\n * @param equipName - Name of equipment.\n * @returns Type of the equipment.\n */\n getEquipmentType(equipName: string): string;\n\n /**\n * Get stats of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment stats.\n *\n * @param equipName - Name of equipment.\n * @returns A dictionary containing the stats of the equipment.\n */\n getEquipmentStats(equipName: string): EquipmentStats;\n\n /**\n * Purchase an equipment for a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempt to purchase the specified Equipment/Augmentation for the specified Gang member.\n *\n * @param memberName - Name of Gang member to purchase the equipment for.\n * @param equipName - Name of Equipment/Augmentation to purchase.\n * @returns True if the equipment was successfully purchased. False otherwise\n */\n purchaseEquipment(memberName: string, equipName: string): boolean;\n\n /**\n * Ascend a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Ascend the specified Gang Member.\n *\n * @param memberName - Name of member to ascend.\n * @returns Object with info about the ascension results. undefined if ascension did not occur.\n */\n ascendMember(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Get the result of an ascension without ascending.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the result of an ascension without ascending.\n *\n * @param memberName - Name of member.\n * @returns Object with info about the ascension results. undefined if ascension is impossible.\n */\n getAscensionResult(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Enable/Disable territory warfare.\n * @remarks\n * RAM cost: 2 GB\n *\n * Set whether or not the gang should engage in territory warfare\n *\n * @param engage - Whether or not to engage in territory warfare.\n */\n setTerritoryWarfare(engage: boolean): void;\n\n /**\n * Get chance to win clash with other gang.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chance you have to win a clash with the specified gang. The chance is returned in decimal form, not percentage\n *\n * @param gangName - Target gang\n * @returns Chance you have to win a clash with the specified gang.\n */\n getChanceToWinClash(gangName: string): number;\n\n /**\n * Get bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Gang mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 10x the normal speed.\n *\n * @returns Bonus time for the Gang mechanic in milliseconds.\n */\n getBonusTime(): number;\n}\n\n/**\n * Sleeve API\n * @remarks\n * If you are not in BitNode-10, then you must have Source-File 10 in order to use this API.\n * @public\n */\nexport interface Sleeve {\n /**\n * Get the number of sleeves you own.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the number of duplicate sleeves the player has.\n *\n * @returns number of duplicate sleeves the player has.\n */\n getNumSleeves(): number;\n\n /**\n * Get the stats of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a structure containing the stats of the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to get stats of.\n * @returns Object containing the stats of the sleeve.\n */\n getSleeveStats(sleeveNumber: number): SleeveSkills;\n\n /**\n * Get information about a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a struct containing tons of information about this sleeve\n *\n * @param sleeveNumber - Index of the sleeve to retrieve information.\n * @returns Object containing tons of information about this sleeve.\n */\n getInformation(sleeveNumber: number): SleeveInformation;\n\n /**\n * Get task of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve task from.\n * @returns Object containing information the current task that the sleeve is performing.\n */\n getTask(sleeveNumber: number): SleeveTask;\n\n /**\n * Set a sleeve to shock recovery.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start recovery.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToShockRecovery(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to synchronize.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start synchronizing.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToSynchronize(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to commit crime.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * Returns false if an invalid action is specified.\n *\n * @param sleeveNumber - Index of the sleeve to start commiting crime.\n * @param name - Name of the crime. Must be an exact match.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToCommitCrime(sleeveNumber: number, name: string): boolean;\n\n /**\n * Set a sleeve to work for a faction.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this faction.\n *\n * @param sleeveNumber - Index of the sleeve to work for the faction.\n * @param factionName - Name of the faction to work for.\n * @param factionWorkType - Name of the action to perform for this faction.\n * @returns True if the sleeve started working on this faction, false otherwise.\n */\n setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean;\n\n /**\n * Set a sleeve to work for a company.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this company.\n *\n * @param sleeveNumber - Index of the sleeve to work for the company.\n * @param companyName - Name of the company to work for.\n * @returns True if the sleeve started working on this company, false otherwise.\n */\n setToCompanyWork(sleeveNumber: number, companyName: string): boolean;\n\n /**\n * Set a sleeve to take a class at a university.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start taking class.\n * @param university - Name of the university to attend.\n * @param className - Name of the class to follow.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean;\n\n /**\n * Set a sleeve to workout at the gym.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working out.\n *\n * @param sleeveNumber - Index of the sleeve to workout at the gym.\n * @param gymName - Name of the gym.\n * @param stat - Name of the stat to train.\n * @returns True if the sleeve started working out, false otherwise.\n */\n setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean;\n\n /**\n * Make a sleeve travel to another city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve reached destination.\n *\n * @param sleeveNumber - Index of the sleeve to travel.\n * @param cityName - Name of the destination city.\n * @returns True if the sleeve reached destination, false otherwise.\n */\n travel(sleeveNumber: number, cityName: string): boolean;\n\n /**\n * Get augmentations installed on a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentation names that this sleeve has installed.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve augmentations from.\n * @returns List of augmentation names that this sleeve has installed.\n */\n getSleeveAugmentations(sleeveNumber: number): string[];\n\n /**\n * List purchasable augs for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentations that the player can buy for this sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve purchasable augmentations from.\n * @returns List of augmentations that the player can buy for this sleeve.\n */\n getSleevePurchasableAugs(sleeveNumber: number): AugmentPair[];\n\n /**\n * Purchase an aug for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return true if the aug was purchased and installed on the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to buy an aug for.\n * @param augName - Name of the aug to buy. Must be an exact match.\n * @returns True if the aug was purchased and installed on the sleeve, false otherwise.\n */\n purchaseSleeveAug(sleeveNumber: number, augName: string): boolean;\n}\n\n/**\n * Grafting API\n * @remarks\n * This API requires Source-File 10 to use.\n * @public\n */\nexport interface Grafting {\n /**\n * Retrieve the grafting cost of an aug.\n * @remarks\n * RAM cost: 3.75 GB\n *\n * @param augName - Name of the aug to check the price of. Must be an exact match.\n * @returns The cost required to graft the named augmentation.\n * @throws Will error if an invalid Augmentation name is provided.\n */\n getAugmentationGraftPrice(augName: string): number;\n\n /**\n * Retrieves the time required to graft an aug.\n * @remarks\n * RAM cost: 3.75 GB\n *\n * @param augName - Name of the aug to check the grafting time of. Must be an exact match.\n * @returns The time required, in millis, to graft the named augmentation.\n * @throws Will error if an invalid Augmentation name is provided.\n */\n getAugmentationGraftTime(augName: string): number;\n\n /**\n * Begins grafting the named aug. You must be in New Tokyo to use this.\n * @remarks\n * RAM cost: 7.5 GB\n *\n * @param augName - The name of the aug to begin grafting. Must be an exact match.\n * @param focus - Acquire player focus on this Augmentation grafting. Optional. Defaults to true.\n * @returns True if the aug successfully began grafting, false otherwise (e.g. not enough money, or\n * invalid Augmentation name provided).\n * @throws Will error if called while you are not in New Tokyo.\n */\n graftAugmentation(augName: string, focus?: boolean): boolean;\n}\n\n/**\n * Skills formulas\n * @public\n */\ninterface SkillsFormulas {\n /**\n * Calculate skill level.\n * @param exp - experience for that skill\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated skill level.\n */\n calculateSkill(exp: number, skillMult?: number): number;\n /**\n * Calculate exp for skill level.\n * @param skill - target skill level\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated exp required.\n */\n calculateExp(skill: number, skillMult?: number): number;\n}\n\n/**\n * Reputation formulas\n * @public\n */\ninterface ReputationFormulas {\n /**\n * Calculate the total required amount of faction reputation to reach a target favor.\n * @param favor - target faction favor.\n * @returns The calculated faction reputation required.\n */\n calculateFavorToRep(favor: number): number;\n /**\n * Calculate the resulting faction favor of a total amount of reputation.\n * (Faction favor is gained whenever you install an Augmentation.)\n * @param rep - amount of reputation.\n * @returns The calculated faction favor.\n */\n calculateRepToFavor(rep: number): number;\n}\n\n/**\n * Hacking formulas\n * @public\n */\ninterface HackingFormulas {\n /**\n * Calculate hack chance.\n * (Ex: 0.25 would indicate a 25% chance of success.)\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack chance.\n */\n hackChance(server: Server, player: Player): number;\n /**\n * Calculate hack exp for one thread.\n * @remarks\n * Multiply by thread to get total exp\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack exp.\n */\n hackExp(server: Server, player: Player): number;\n /**\n * Calculate hack percent for one thread.\n * (Ex: 0.25 would steal 25% of the server\'s current value.)\n * @remarks\n * Multiply by thread to get total percent hacked.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack percent.\n */\n hackPercent(server: Server, player: Player): number;\n /**\n * Calculate the percent a server would grow to.\n * (Ex: 3.0 would would grow the server to 300% of its current value.)\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param threads - Amount of thread.\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @param cores - Number of cores on the computer that will execute grow.\n * @returns The calculated grow percent.\n */\n growPercent(server: Server, threads: number, player: Player, cores?: number): number;\n /**\n * Calculate hack time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack time.\n */\n hackTime(server: Server, player: Player): number;\n /**\n * Calculate grow time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated grow time.\n */\n growTime(server: Server, player: Player): number;\n /**\n * Calculate weaken time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated weaken time.\n */\n weakenTime(server: Server, player: Player): number;\n}\n\n/**\n * Hacknet Node formulas\n * @public\n */\ninterface HacknetNodesFormulas {\n /**\n * Calculate money gain rate.\n * @param level - level of the node.\n * @param ram - ram of the node.\n * @param cores - cores of the node.\n * @param mult - player production mult (default to 1)\n * @returns The calculated money gain rate.\n */\n moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate the cost of a hacknet node.\n * @param n - number of the hacknet node\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetNodeCost(n: number, mult: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet node constants used by the game.\n */\n constants(): HacknetNodeConstants;\n}\n\n/**\n * Hacknet Server formulas\n * @public\n */\ninterface HacknetServersFormulas {\n /**\n * Calculate hash gain rate.\n * @param level - level of the server.\n * @param ramUsed - ramUsed of the server.\n * @param maxRam - maxRam of the server.\n * @param cores - cores of the server.\n * @param mult - player production mult (default to 1)\n * @returns The calculated hash gain rate.\n */\n hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cache.\n * @param startingCache - starting cache level\n * @param extraCache - amount of levels of cache to purchase (defaults to 1)\n * @returns The calculated cost.\n */\n cacheUpgradeCost(startingCache: number, extraCache?: number): number;\n /**\n * Calculate hash cost of an upgrade.\n * @param upgName - name of the upgrade\n * @param level - level of the upgrade\n * @returns The calculated hash cost.\n */\n hashUpgradeCost(upgName: number, level: number): number;\n /**\n * Calculate the cost of a hacknet server.\n * @param n - number of the hacknet server\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetServerCost(n: number, mult?: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet server constants used by the game.\n */\n constants(): HacknetServerConstants;\n}\n\n/**\n * Gang formulas\n * @public\n */\ninterface GangFormulas {\n /**\n * Calculate the wanted penalty.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @returns The calculated wanted penalty.\n */\n wantedPenalty(gang: GangGenInfo): number;\n /**\n * Calculate respect gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated respect gain.\n */\n respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate wanted gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated wanted gain.\n */\n wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate money gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated money gain.\n */\n moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n\n /**\n * Calculate ascension point gain.\n * @param exp - Experience point before ascension.\n * @returns The calculated ascension point gain.\n */\n ascensionPointsGain(exp: number): number;\n\n /**\n * Calculate ascension mult.\n * @param points - Amount of ascension points.\n * @returns The calculated ascension mult.\n */\n ascensionMultiplier(points: number): number;\n}\n\n/**\n * Formulas API\n * @remarks\n * You need Formulas.exe on your home computer to use this API.\n * @public\n */\nexport interface Formulas {\n /** Reputation formulas */\n reputation: ReputationFormulas;\n /** Skills formulas */\n skills: SkillsFormulas;\n /** Hacking formulas */\n hacking: HackingFormulas;\n /** Hacknet Nodes formulas */\n hacknetNodes: HacknetNodesFormulas;\n /** Hacknet Servers formulas */\n hacknetServers: HacknetServersFormulas;\n /** Gang formulas */\n gang: GangFormulas;\n}\n\n/**\n * @public\n */\nexport interface Fragment {\n id: number;\n shape: boolean[][];\n type: number;\n power: number;\n limit: number;\n}\n\n/**\n * @public\n */\nexport interface ActiveFragment {\n id: number;\n avgCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n}\n\n/**\n * Stanek\'s Gift API.\n * @public\n */\ninterface Stanek {\n /**\n * Stanek\'s Gift width.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The width of the gift.\n */\n giftWidth(): number;\n /**\n * Stanek\'s Gift height.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The height of the gift.\n */\n giftHeight(): number;\n\n /**\n * Charge a fragment, increasing its power.\n * @remarks\n * RAM cost: 0.4 GB\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @returns Promise that lasts until the charge action is over.\n */\n chargeFragment(rootX: number, rootY: number): Promise;\n\n /**\n * List possible fragments.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns List of possible fragments.\n */\n fragmentDefinitions(): Fragment[];\n\n /**\n * List of fragments in Stanek\'s Gift.\n * @remarks\n * RAM cost: 5 GB\n *\n * @returns List of active fragments placed on Stanek\'s Gift.\n */\n activeFragments(): ActiveFragment[];\n\n /**\n * Clear the board of all fragments.\n * @remarks\n * RAM cost: 0 GB\n */\n clearGift(): void;\n\n /**\n * Check if fragment can be placed at specified location.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @param rotation - rotation A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - fragmentId ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n canPlaceFragment(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Place fragment on Stanek\'s Gift.\n * @remarks\n * RAM cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @param rotation - A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n placeFragment(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Get placed fragment at location.\n * @remarks\n * RAM cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n getFragment(rootX: number, rootY: number): ActiveFragment | undefined;\n\n /**\n * Remove fragment at location.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n removeFragment(rootX: number, rootY: number): boolean;\n}\n\n/**\n * User Interface API.\n * @public\n */\ninterface UserInterface {\n /**\n * Get the current theme\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns An object containing the theme\'s colors\n */\n getTheme(): UserInterfaceTheme;\n\n /**\n * Sets the current theme\n * @remarks\n * RAM cost: 0 GB\n * @example\n * Usage example (NS2)\n * ```ts\n * const theme = ns.ui.getTheme();\n * theme.primary = \'#ff5500\';\n * ns.ui.setTheme(theme);\n * ```\n */\n setTheme(newTheme: UserInterfaceTheme): void;\n\n /**\n * Resets the player\'s theme to the default values\n * @remarks\n * RAM cost: 0 GB\n */\n resetTheme(): void;\n\n /**\n * Get the current styles\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns An object containing the player\'s styles\n */\n getStyles(): IStyleSettings;\n\n /**\n * Sets the current styles\n * @remarks\n * RAM cost: 0 GB\n * @example\n * Usage example (NS2)\n * ```ts\n * const styles = ns.ui.getStyles();\n * styles.fontFamily = \'Comic Sans Ms\';\n * ns.ui.setStyles(styles);\n * ```\n */\n setStyles(newStyles: IStyleSettings): void;\n\n /**\n * Resets the player\'s styles to the default values\n * @remarks\n * RAM cost: 0 GB\n */\n resetStyles(): void;\n\n /**\n * Gets the current game information (version, commit, ...)\n * @remarks\n * RAM cost: 0 GB\n */\n getGameInfo(): GameInfo;\n}\n\n/**\n * Collection of all functions passed to scripts\n * @public\n * @remarks\n * Basic ns1 usage example:\n * ```ts\n * // Basic ns functions can be used directly\n * getHostname();\n * // Some related functions are gathered within a common namespace\n * stock.getPrice();\n * ```\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs}\n *
\n * Basic ns2 usage example:\n * ```ts\n * export async function main(ns) {\n * // Basic ns functions can be accessed on the ns object\n * ns.getHostname();\n * // Some related functions are gathered under a sub-property of the ns object\n * ns.stock.getPrice();\n * // Some functions need to be awaited\n * await ns.hack(\'n00dles\');\n * }\n * ```\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}\n *
\n */\nexport interface NS extends Singularity {\n /**\n * Namespace for hacknet functions.\n * @remarks RAM cost: 4 GB\n */\n readonly hacknet: Hacknet;\n /**\n *\n * Namespace for bladeburner functions.\n * @remarks RAM cost: 0 GB\n */\n readonly bladeburner: Bladeburner;\n /**\n *\n * Namespace for codingcontract functions.\n * @remarks RAM cost: 0 GB\n */\n readonly codingcontract: CodingContract;\n /**\n *\n * Namespace for gang functions.\n * @remarks RAM cost: 0 GB\n */\n readonly gang: Gang;\n /**\n *\n * Namespace for sleeve functions.\n * @remarks RAM cost: 0 GB\n */\n readonly sleeve: Sleeve;\n /**\n *\n * Namespace for stock functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly stock: TIX;\n /**\n *\n * Namespace for formulas functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly formulas: Formulas;\n /**\n * Namespace for stanek functions.\n * RAM cost: 0 GB\n */\n readonly stanek: Stanek;\n /**\n * Namespace for corporation functions.\n * RAM cost: 0 GB\n */\n readonly corporation: Corporation;\n\n /**\n * Namespace for user interface functions.\n * RAM cost: 0 GB\n */\n readonly ui: UserInterface;\n\n /**\n * Namespace for singularity functions.\n * RAM cost: 0 GB\n */\n readonly singularity: Singularity;\n\n /**\n * Namespace for grafting functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly grafting: Grafting;\n\n /**\n * Arguments passed into the script.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * Arguments passed into a script can be accessed using a normal\n * array using the [] operator (args[0], args[1], etc…).\n *\n * It is also possible to get the number of arguments that was passed into a script using: \'args.length\'\n * WARNING: Do not try to modify the args array. This will break the game.\n */\n readonly args: (string | number | boolean)[];\n\n /**\n * Steal a servers money.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Function that is used to try and hack servers to steal money and gain hacking experience.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level when this function is called. In order to hack a server you must first gain root access to that server\n * and also have the required hacking level.\n *\n * A script can hack a server from anywhere. It does not need to be running on the same\n * server to hack that server. For example, you can create a script that hacks the `foodnstuff`\n * server and run that script on any server in the game.\n *\n * A successful `hack()` on a server will raise that server’s security level by 0.002.\n *\n * @example\n * ```ts\n * // NS1:\n * var earnedMoney = hack("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * let earnedMoney = await ns.hack("foodnstuff");\n * ```\n * @param host - Hostname of the target server to hack.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount of money stolen if the hack is successful, and zero otherwise.\n */\n hack(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Spoof money in a servers bank account, increasing the amount available.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to increase the amount of money available on a server.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level. When `grow` completes, the money available on a target server will\n * be increased by a certain, fixed percentage. This percentage is determined by the\n * target server’s growth rate (which varies between servers) and security level. Generally,\n * higher-level servers have higher growth rates. The getServerGrowth() function can be used\n * to obtain a server’s growth rate.\n *\n * Like hack, `grow` can be called on any server, regardless of where the script is running.\n * The grow() command requires root access to the target server, but there is no required hacking\n * level to run the command. It also raises the security level of the target server by 0.004.\n *\n * @example\n * ```ts\n * // NS1:\n * var currentMoney = getServerMoneyAvailable("foodnstuff");\n * currentMoney = currentMoney * (1 + grow("foodnstuff"));\n * ```\n * @example\n * ```ts\n * // NS2:\n * let currentMoney = ns.getServerMoneyAvailable("foodnstuff");\n * currentMoney *= (1 + await ns.grow("foodnstuff"));\n * ```\n * @param host - Hostname of the target server to grow.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The number by which the money on the server was multiplied for the growth.\n */\n grow(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Reduce a server security level.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to attack a server’s security, lowering the server’s security level.\n * The runtime for this command depends on your hacking level and the target server’s security\n * level when this function is called. This function lowers the security level of the target server by 0.05.\n *\n * Like hack and grow, `weaken` can be called on any server, regardless of\n * where the script is running. This command requires root access to the target server, but\n * there is no required hacking level to run the command.\n *\n * @example\n * ```ts\n * // NS1:\n * var currentSecurity = getServerSecurityLevel("foodnstuff");\n * currentSecurity = currentSecurity - weaken("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * let currentSecurity = ns.getServerSecurityLevel("foodnstuff");\n * currentSecurity -= await ns.weaken("foodnstuff");\n * ```\n * @param host - Hostname of the target server to weaken.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount by which the target server’s security level was decreased. This is equivalent to 0.05 multiplied by the number of script threads.\n */\n weaken(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Predict the effect of weaken.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security decrease that would occur if a weaken with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @param cores - Optional. The number of cores of the server that would run weaken.\n * @returns The security decrease.\n */\n weakenAnalyze(threads: number, cores?: number): number;\n\n /**\n * Predict the effect of hack.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of script threads you need when running the hack command\n * to steal the specified amount of money from the target server.\n * If hackAmount is less than zero or greater than the amount of money available on the server,\n * then this function returns -1.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * //For example, let’s say the foodnstuff server has $10m and you run:\n * hackAnalyzeThreads("foodnstuff", 1e6);\n * //If this function returns 50, this means that if your next hack call is run on a script with 50 threads, it will steal $1m from the foodnstuff server.\n * ```\n * @param host - Hostname of the target server to analyze.\n * @param hackAmount - Amount of money you want to hack from the server.\n * @returns The number of threads needed to hack the server for hackAmount money.\n */\n hackAnalyzeThreads(host: string, hackAmount: number): number;\n\n /**\n * Get the part of money stolen with a single thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the part of the specified server’s money you will steal with a single thread hack.\n *\n * @example\n * ```ts\n * // NS1:\n * //For example, assume the following returns 0.01:\n * var hackAmount = hackAnalyze("foodnstuff");\n * //This means that if hack the foodnstuff server using a single thread, then you will steal 1%, or 0.01 of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.\n * ```\n * @example\n * ```ts\n * // NS2:\n * //For example, assume the following returns 0.01:\n * const hackAmount = ns.hackAnalyze("foodnstuff");\n * //This means that if hack the foodnstuff server using a single thread, then you will steal 1%, or 0.01 of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.\n * ```\n * @param host - Hostname of the target server.\n * @returns The part of money you will steal from the target server with a single thread hack.\n */\n hackAnalyze(host: string): number;\n\n /**\n * Get the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a hack with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n hackAnalyzeSecurity(threads: number): number;\n\n /**\n * Get the chance of successfully hacking a server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the chance you have of successfully hacking the specified server.\n *\n * This returned value is in decimal form, not percentage.\n *\n * @param host - Hostname of the target server.\n * @returns The chance you have of successfully hacking the target server.\n */\n hackAnalyzeChance(host: string): number;\n\n /**\n * Calculate the number of grow thread needed to grow a server by a certain multiplier.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of “growths” needed in order to increase\n * the amount of money available on the specified server by the specified amount.\n * The specified amount is multiplicative and is in decimal form, not percentage.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * // NS1:\n * //For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:\n * var growTimes = growthAnalyze("foodnstuff", 2);\n * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).\n * ```\n * @example\n * ```ts\n * // NS2:\n * //For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:\n * const growTimes = ns.growthAnalyze("foodnstuff", 2);\n * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).\n * ```\n * @param host - Hostname of the target server.\n * @param growthAmount - Multiplicative factor by which the server is grown. Decimal form..\n * @returns The amount of grow calls needed to grow the specified server by the specified amount\n */\n growthAnalyze(host: string, growthAmount: number, cores?: number): number;\n\n /**\n * Calculate the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a grow with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n growthAnalyzeSecurity(threads: number): number;\n\n /**\n * Suspends the script for n milliseconds.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @example\n * ```ts\n * // NS1:\n * // This will count from 1 to 10 in your terminal, with one number every 5 seconds\n * for (var i=0; i<10; i++) {\n * tprint(i + 1);\n * sleep(5000);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * // This will count from 1 to 10 in your terminal, with one number every 5 seconds\n * for (var i=0; i<10; i++) {\n * ns.tprint(i + 1);\n * await ns.sleep(5000);\n * }\n * ```\n * @returns\n */\n sleep(millis: number): Promise;\n\n /**\n * Suspends the script for n milliseconds. Doesn\'t block with concurrent calls.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @returns\n */\n asleep(millis: number): Promise;\n\n /**\n * Prints one or move values or variables to the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param args - Value(s) to be printed.\n */\n print(...args: any[]): void;\n\n /**\n * Prints a formatted string to the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - format of the message\n * @param args - Value(s) to be printed.\n */\n printf(format: string, ...args: any[]): void;\n\n /**\n * Prints one or more values or variables to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param args - Value(s) to be printed.\n */\n tprint(...args: any[]): void;\n\n /**\n * Prints a raw value or a variable to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param format - format of the message\n * @param msg - Value to be printed.\n */\n tprintf(format: string, ...values: any[]): void;\n\n /**\n * Clears the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n */\n clearLog(): void;\n\n /**\n * Disables logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Logging can be disabled for all functions by passing `ALL` as the argument.\n *\n * Note that this does not completely remove all logging functionality.\n * This only stops a function from logging when the function is successful.\n * If the function fails, it will still log the reason for failure.\n *\n * @param fn - Name of function for which to disable logging.\n */\n disableLog(fn: string): void;\n\n /**\n * Enable logging for a certain function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Re-enables logging for the given function. If `ALL` is passed into this\n * function as an argument, then it will revert the effects of disableLog(`ALL`).\n *\n * @param fn - Name of function for which to enable logging.\n */\n enableLog(fn: string): void;\n\n /**\n * Checks the status of the logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param fn - Name of function to check.\n * @returns Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`)\n */\n isLogEnabled(fn: string): boolean;\n\n /**\n * Get all the logs of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns a script’s logs. The logs are returned as an array, where each line is an element in the array.\n * The most recently logged line is at the end of the array.\n * Note that there is a maximum number of lines that a script stores in its logs. This is configurable in the game’s options.\n * If the function is called with no arguments, it will return the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //Get logs from foo.script on the current server that was run with no args\n * getScriptLogs("foo.script");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with no args\n * getScriptLogs("foo.script", "foodnstuff");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * getScriptLogs("foo.script", "foodnstuff", 1, "test");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Get logs from foo.script on the current server that was run with no args\n * ns.getScriptLogs("foo.script");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with no args\n * ns.getScriptLogs("foo.script", "foodnstuff");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * ns.getScriptLogs("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename of script to get logs from.\n * @param host - Optional. Hostname of the server that the script is on.\n * @param args - Arguments to identify which scripts to get logs for.\n * @returns Returns an string array, where each line is an element in the array. The most recently logged line is at the end of the array.\n */\n getScriptLogs(fn?: string, host?: string, ...args: any[]): string[];\n\n /**\n * Open the tail window of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Opens a script’s logs. This is functionally the same as the tail Terminal command.\n *\n * If the function is called with no arguments, it will open the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //Open logs from foo.script on the current server that was run with no args\n * tail("foo.script");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with no args\n * tail("foo.script", "foodnstuff");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * tail("foo.script", "foodnstuff", 1, "test");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Open logs from foo.script on the current server that was run with no args\n * ns.tail("foo.script");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with no args\n * ns.tail("foo.script", "foodnstuff");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * ns.tail("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename or PID of the script being tailed. If omitted, the current script is tailed.\n * @param host - Optional. Hostname of the script being tailed. Defaults to the server this script is running on. If args are specified, this is not optional.\n * @param args - Arguments for the script being tailed.\n */\n tail(fn?: FilenameOrPID, host?: string, ...args: any[]): void;\n\n /**\n * Get the list of servers connected to a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array containing the hostnames of all servers that are one\n * node way from the specified target server. The hostnames in the returned\n * array are strings.\n *\n * @param host - Optional, Hostname of the server to scan, default to current server.\n * @returns Returns an string of hostnames.\n */\n scan(host?: string): string[];\n\n /**\n * Runs NUKE.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Running NUKE.exe on a target server gives you root access which means you can executes scripts on said server. NUKE.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * nuke("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.nuke("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n nuke(host: string): void;\n\n /**\n * Runs BruteSSH.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * brutessh("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.brutessh("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n brutessh(host: string): void;\n\n /**\n * Runs FTPCrack.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * ftpcrack("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.ftpcrack("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n ftpcrack(host: string): void;\n\n /**\n * Runs relaySMTP.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * relaysmtp("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.relaysmtp("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n relaysmtp(host: string): void;\n\n /**\n * Runs HTTPWorm.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * httpworm("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.httpworm("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n httpworm(host: string): void;\n\n /**\n * Runs SQLInject.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * sqlinject("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.sqlinject("foodnstuff");\n * ```\n * @remarks RAM cost: 0.05 GB\n * @param host - Hostname of the target server.\n */\n sqlinject(host: string): void;\n\n /**\n * Start another script on the current server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Run a script as a separate process. This function can only be used to run scripts located on the\n * current server (the server running the script that calls this function). Requires a significant\n * amount of RAM to run this command.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * // NS1:\n * //The simplest way to use the run command is to call it with just the script name. The following example will run ‘foo.script’ single-threaded with no arguments:\n * run("foo.script");\n *\n * //The following example will run ‘foo.script’ but with 5 threads instead of single-threaded:\n * run("foo.script", 5);\n *\n * //This next example will run ‘foo.script’ single-threaded, and will pass the string ‘foodnstuff’ into the script as an argument:\n * run("foo.script", 1, \'foodnstuff\');\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The simplest way to use the run command is to call it with just the script name. The following example will run ‘foo.script’ single-threaded with no arguments:\n * ns.run("foo.script");\n *\n * //The following example will run ‘foo.script’ but with 5 threads instead of single-threaded:\n * ns.run("foo.script", 5);\n *\n * //This next example will run ‘foo.script’ single-threaded, and will pass the string ‘foodnstuff’ into the script as an argument:\n * ns.run("foo.script", 1, \'foodnstuff\');\n * ```\n * @param script - Filename of script to run.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n run(script: string, numThreads?: number, ...args: Array): number;\n\n /**\n * Start another script on any server.\n * @remarks\n * RAM cost: 1.3 GB\n *\n * Run a script as a separate process on a specified server. This is similar to the run function\n * except that it can be used to run a script on any server, instead of just the current server.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * // NS1:\n * //The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:\n * exec("generic-hack.script", "foodnstuff");\n *\n * //The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:\n * exec("generic-hack.script", "joesguns", 10);\n *\n * //This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:\n * exec("foo.script", "foodnstuff", 5, 1, "test");\n * ```\n * * @example\n * ```ts\n * // NS2:\n * //The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:\n * ns.exec("generic-hack.script", "foodnstuff");\n *\n * //The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:\n * ns.exec("generic-hack.script", "joesguns", 10);\n *\n * //This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:\n * ns.exec("foo.script", "foodnstuff", 5, 1, "test");\n * ```\n * @param script - Filename of script to execute.\n * @param host - Hostname of the `target server` on which to execute the script.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n exec(script: string, host: string, numThreads?: number, ...args: Array): number;\n\n /**\n * Terminate current script and start another in 10s.\n * @remarks\n * RAM cost: 2 GB\n *\n * Terminates the current script, and then after a delay of about 10 seconds it will execute the\n * newly-specified script. The purpose of this function is to execute a new script without being\n * constrained by the RAM usage of the current one. This function can only be used to run scripts\n * on the local server.\n *\n * Because this function immediately terminates the script, it does not have a return value.\n *\n * @example\n * ```ts\n * // NS1:\n * //The following example will execute the script ‘foo.script’ with 10 threads and the arguments ‘foodnstuff’ and 90:\n * spawn(\'foo.script\', 10, \'foodnstuff\', 90);\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The following example will execute the script ‘foo.script’ with 10 threads and the arguments ‘foodnstuff’ and 90:\n * ns.spawn(\'foo.script\', 10, \'foodnstuff\', 90);\n * ```\n * @param script - Filename of script to execute.\n * @param numThreads - Number of threads to spawn new script with. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run.\n */\n spawn(script: string, numThreads?: number, ...args: string[]): void;\n\n /**\n * Terminate another script.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills the script on the target server specified by the script’s name and arguments.\n * Remember that scripts are uniquely identified by both their name and arguments.\n * For example, if `foo.script` is run with the argument 1, then this is not the same as\n * `foo.script` run with the argument 2, even though they have the same code.\n *\n * @example\n * ```ts\n * // NS1:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * ns.kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * ns.kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * ns.kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @param script - Filename or pid of the script to kill\n * @param host - Hostname of the server on which to kill the script.\n * @param args - Arguments to identify which script to kill.\n * @returns True if the script is successfully killed, and false otherwise.\n */\n kill(script: number): boolean;\n\n /**\n * {@inheritDoc NS.(kill:1)}\n * @example\n * ```ts\n * // NS1:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * ns.kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * ns.kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * ns.kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n */\n kill(script: string, host: string, ...args: string[]): boolean;\n\n /**\n * Terminate all scripts on a server.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills all running scripts on the specified server. This function returns true\n * if any scripts were killed, and false otherwise. In other words, it will return\n * true if there are any scripts running on the target server.\n * If no host is defined, it will kill all scripts, where the script is running.\n *\n * @param host - IP or hostname of the server on which to kill all scripts.\n * @returns True if any scripts were killed, and false otherwise.\n */\n killall(host?: string): boolean;\n\n /**\n * Terminates the current script immediately.\n * @remarks\n * RAM cost: 0 GB\n */\n exit(): void;\n\n /**\n * Copy file between servers.\n * @remarks\n * RAM cost: 0.6 GB\n *\n * Copies a script or literature (.lit) file(s) to another server. The files argument can be either a string\n * specifying a single file to copy, or an array of strings specifying multiple files to copy.\n *\n * @example\n * ```ts\n * // NS1:\n * //Copies foo.lit from the helios server to the home computer:\n * scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Copies foo.lit from the helios server to the home computer:\n * await ns.scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * await ns.scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * //ns2, copies files from home to a target server\n * const server = ns.args[0];\n * const files = ["hack.js","weaken.js","grow.js"];\n * await ns.scp(files, "home", server);\n * ```\n * @param files - Filename or an array of filenames of script/literature files to copy.\n * @param source - Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server.\n * @param destination - Host of the destination server, which is the server to which the file will be copied.\n * @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.\n */\n scp(files: string | string[], destination: string): Promise;\n\n /**\n * {@inheritDoc NS.(scp:1)}\n * @example\n * ```ts\n * // NS1:\n * //Copies foo.lit from the helios server to the home computer:\n * scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Copies foo.lit from the helios server to the home computer:\n * await ns.scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * await ns.scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * //ns2, copies files from home to a target server\n * const server = ns.args[0];\n * const files = ["hack.js","weaken.js","grow.js"];\n * await ns.scp(files, "home", server);\n * ```\n */\n scp(files: string | string[], source: string, destination: string): Promise;\n\n /**\n * List files on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with the filenames of all files on the specified server\n * (as strings). The returned array is sorted in alphabetic order.\n *\n * @param host - Host of the target server.\n * @param grep - A substring to search for in the filename.\n * @returns Array with the filenames of all files on the specified server.\n */\n ls(host: string, grep?: string): string[];\n\n /**\n * List running scripts on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with general information about all scripts running on the specified target server.\n *\n * @example\n * ```ts\n * // NS1:\n * var scripts = ps("home");\n * for (var i = 0; i < scripts.length; ++i) {\n * tprint(scripts[i].filename + \' \' + scripts[i].threads);\n * tprint(scripts[i].args);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * const ps = ns.ps("home");\n * for (let script of ps) {\n * ns.tprint(`${script.filename} ${script.threads}`);\n * ns.tprint(script.args);\n * }\n * ```\n * @param host - Host address of the target server. If not specified, it will be the current server’s IP by default.\n * @returns Array with general information about all scripts running on the specified target server.\n */\n ps(host?: string): ProcessInfo[];\n\n /**\n * Check if your have root access on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns a boolean indicating whether or not the player has root access to the specified target server.\n *\n * @example\n * ```ts\n * // NS1:\n * if (hasRootAccess("foodnstuff") == false) {\n * nuke("foodnstuff");\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * if (ns.hasRootAccess("foodnstuff") == false) {\n * ns.nuke("foodnstuff");\n * }\n * ```\n * @param host - Host of the target server\n * @returns True if player has root access to the specified target server, and false otherwise.\n */\n hasRootAccess(host: string): boolean;\n\n /**\n * Returns a string with the hostname of the server that the script is running on.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Hostname of the server that the script is on.\n */\n getHostname(): string;\n\n /**\n * Returns the player’s current hacking level.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Player’s current hacking level\n */\n getHackingLevel(): number;\n\n /**\n * Get hacking related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacking related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * // NS1:\n * // Example of how this can be used:\n * var mults = getHackingMultipliers();\n * print(mults.chance);\n * print(mults.growth);\n * ```\n * @example\n * ```ts\n * // NS2:\n * // Example of how this can be used:\n * const {chance, growth} = ns.getHackingMultipliers();\n * print(chance);\n * print(growth);\n * ```\n * @returns Object containing the Player’s hacking related multipliers.\n */\n getHackingMultipliers(): HackingMultipliers;\n\n /**\n * Get hacknet related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacknet related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * // NS1:\n * // Example of how this can be used:\n * var mults = getHacknetMultipliers();\n * print(mults.production);\n * print(mults.purchaseCost);\n * ```\n * @example\n * ```ts\n * // NS2:\n * // Example of how this can be used:\n * const {production, purchaseCost} = ns.getHacknetMultipliers();\n * print(production);\n * print(purchaseCost);\n * ```\n * @returns Object containing the Player’s hacknet related multipliers.\n */\n getHacknetMultipliers(): HacknetMultipliers;\n\n /**\n * Returns a server object for the given server. Defaults to the running script\'s server if host is not specified.\n *\n * @remarks\n * RAM cost: 2 GB\n * @param host - Optional. Hostname for the requested server object.\n * @returns The requested server object.\n */\n getServer(host?: string): Server;\n\n /**\n * Get money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of money available on a server.\n * Running this function on the home computer will return the player’s money.\n *\n * @example\n * ```ts\n * // NS1:\n * getServerMoneyAvailable("foodnstuff");\n * getServerMoneyAvailable("home"); //Returns player\'s money\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.getServerMoneyAvailable("foodnstuff");\n * ns.getServerMoneyAvailable("home"); // Returns player\'s money\n * ```\n * @param host - Host of target server\n * @returns Amount of money available on the server.\n */\n getServerMoneyAvailable(host: string): number;\n\n /**\n * Get maximum money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the maximum amount of money that can be available on a server.\n *\n * @param host - Host of target server.\n * @returns Maximum amount of money available on the server.\n */\n getServerMaxMoney(host: string): number;\n\n /**\n * Get a server growth parameter.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the server’s intrinsic “growth parameter”. This growth\n * parameter is a number typically between 0 and 100 that represents\n * how quickly the server’s money grows. This parameter affects the\n * percentage by which the server’s money is increased when using the\n * grow function. A higher growth parameter will result in a\n * higher percentage increase from grow.\n *\n * @param host - Host of target server.\n * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function.\n */\n getServerGrowth(host: string): number;\n\n /**\n * Get server security level.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the security level of the target server. A server’s security\n * level is denoted by a number, typically between 1 and 100\n * (but it can go above 100).\n *\n * @param host - Host of target server.\n * @returns Security level of the target server.\n */\n getServerSecurityLevel(host: string): number;\n\n /**\n * Returns the minimum security level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns Minimum security level of the target server.\n */\n getServerMinSecurityLevel(host: string): number;\n\n /**\n * @deprecated useless\n * @remarks\n * RAM cost: 0.1 GB\n * Returns the base security level of the target server. This is the security\n * level that the server starts out with. This is different than\n * getServerSecurityLevel because getServerSecurityLevel returns\n * the current security level of a server, which can constantly change due to\n * hack, grow, and weaken, calls on that server.\n * The base security level will stay the same until you reset by\n * installing an Augmentation(s).\n *\n * @param host - Host of target server.\n * @returns Base security level of the target server.\n */\n getServerBaseSecurityLevel(host: string): number;\n\n /**\n * @deprecated use getServerMaxRam / getServerUsedRam\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns an array with two elements that gives information about a server’s memory (RAM).\n * The first element in the array is the amount of RAM that the server has total (in GB).\n * The second element in the array is the amount of RAM that is currently being used on\n * the server (in GB).\n *\n * @example\n * ```ts\n * // NS1:\n * var serverRam = getServerRam("helios");\n * var totalRam = serverRam[0];\n * var ramUsed = serverRam[1];\n * ```\n * @example\n * ```ts\n * // NS2:\n * const [totalRam, ramUsed] = ns.getServerRam("helios");\n * ```\n * @param host - Host of target server.\n * @returns Array with total and used memory on the specified server, in GB.\n */\n getServerRam(host: string): [number, number];\n\n /**\n * Get the max RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns max ram (GB)\n */\n getServerMaxRam(host: string): number;\n /**\n * Get the used RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns used ram (GB)\n */\n getServerUsedRam(host: string): number;\n\n /**\n * Returns the required hacking level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The required hacking level of the target server.\n */\n getServerRequiredHackingLevel(host: string): number;\n\n /**\n * Returns the number of open ports required to successfully run NUKE.exe on the specified server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The number of open ports required to successfully run NUKE.exe on the specified server.\n */\n getServerNumPortsRequired(host: string): number;\n\n /**\n * Returns a boolean denoting whether or not the specified server exists.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns True if specified server exists, and false otherwise.\n */\n serverExists(host: string): boolean;\n\n /**\n * Check if a file exists.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified file exists on the target server.\n * The filename for scripts is case-sensitive, but for other types of files it is not.\n * For example, fileExists(“brutessh.exe”) will work fine, even though the actual program\n * is named \'BruteSSH.exe\'.\n *\n * If the hostname/ip argument is omitted, then the function will search through the current\n * server (the server running the script that calls this function) for the file.\n *\n * @example\n * ```ts\n * // NS1:\n * //The function call will return true if the script named foo.script exists on the foodnstuff server, and false otherwise.\n * fileExists("foo.script", "foodnstuff");\n *\n * //The function call will return true if the current server contains the FTPCrack.exe program, and false otherwise.\n * fileExists("ftpcrack.exe");\n * ```\n * * @example\n * ```ts\n * // NS2:\n * // The function call will return true if the script named foo.script exists on the foodnstuff server, and false otherwise.\n * ns.fileExists("foo.script", "foodnstuff");\n *\n * // The function call will return true if the current server contains the FTPCrack.exe program, and false otherwise.\n * ns.fileExists("ftpcrack.exe");\n * ```\n * @param filename - Filename of file to check.\n * @param host - Host of target server. This is optional. If it is not specified then the function will use the current server as the target server.\n * @returns True if specified file exists, and false otherwise.\n */\n fileExists(filename: string, host?: string): boolean;\n\n /**\n * Check if a script is running.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified script is running on the target server.\n * If you use a PID instead of a filename, the hostname and args parameters are unnecessary.\n * Remember that a script is uniquely identified by both its name and its arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //The function call will return true if there is a script named foo.script with no arguments running on the foodnstuff server, and false otherwise:\n * isRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is a script named foo.script with no arguments running on the current server, and false otherwise:\n * isRunning("foo.script", getHostname());\n *\n * //The function call will return true if there is a script named foo.script running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:\n * isRunning("foo.script", "joesguns", 1, 5, "test");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The function call will return true if there is a script named foo.script with no arguments running on the foodnstuff server, and false otherwise:\n * ns.isRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is a script named foo.script with no arguments running on the current server, and false otherwise:\n * ns.isRunning("foo.script", ns.getHostname());\n *\n * //The function call will return true if there is a script named foo.script running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:\n * ns.isRunning("foo.script", "joesguns", 1, 5, "test");\n * ```\n * @param script - Filename or PID of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @param args - Arguments to specify/identify which scripts to search for.\n * @returns True if specified script is running on the target server, and false otherwise.\n */\n isRunning(script: FilenameOrPID, host: string, ...args: string[]): boolean;\n\n /**\n * Get general info about a running script.\n * @remarks\n * RAM cost: 0.3 GB\n *\n * Running with no args returns current script.\n * If you use a PID as the first parameter, the hostname and args parameters are unnecessary.\n *\n * @param filename - Optional. Filename or PID of the script.\n * @param hostname - Optional. Name of host server the script is running on.\n * @param args - Arguments to identify the script\n * @returns The info about the running script if found, and null otherwise.\n */\n getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | number)[]): RunningScript | null;\n\n /**\n * Get cost of purchasing a server.\n * @remarks\n * RAM cost: 0.25 GB\n *\n * Returns the cost to purchase a server with the specified amount of ram.\n *\n * @example\n * ```ts\n * // NS1:\n * for (i = 1; i <= 20; i++) {\n * tprint(i + " -- " + getPurchasedServerCost(Math.pow(2, i)));\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * for (i = 1; i <= 20; i++) {\n * ns.tprint(i + " -- " + ns.getPurchasedServerCost(Math.pow(2, i)));\n * }\n * ```\n * @param ram - Amount of RAM of a potential purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The cost to purchase a server with the specified amount of ram.\n */\n getPurchasedServerCost(ram: number): number;\n\n /**\n * Purchase a server.\n * @remarks\n * 2.25 GB\n *\n * Purchased a server with the specified hostname and amount of RAM.\n *\n * The hostname argument can be any data type, but it will be converted to a string\n * and have whitespace removed. Anything that resolves to an empty string will cause\n * the function to fail. If there is already a server with the specified hostname,\n * then the function will automatically append a number at the end of the hostname\n * argument value until it finds a unique hostname. For example, if the script calls\n * `purchaseServer(“foo”, 4)` but a server named “foo” already exists, the it will\n * automatically change the hostname to `foo-0`. If there is already a server with the\n * hostname `foo-0`, then it will change the hostname to `foo-1`, and so on.\n *\n * Note that there is a maximum limit to the amount of servers you can purchase.\n *\n * Returns the hostname of the newly purchased server as a string. If the function\n * fails to purchase a server, then it will return an empty string. The function will\n * fail if the arguments passed in are invalid, if the player does not have enough\n * money to purchase the specified server, or if the player has exceeded the maximum\n * amount of servers.\n *\n * @example\n * ```ts\n * // NS1:\n * var ram = 64;\n * var prefix = "pserv-";\n * for (i = 0; i < 5; ++i) {\n * purchaseServer(prefix + i, ram);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * const ram = 64;\n * const prefix = "pserv-";\n * for (i = 0; i < 5; ++i) {\n * ns.purchaseServer(prefix + i, ram);\n * }\n * ```\n * @param hostname - Host of the purchased server.\n * @param ram - Amount of RAM of the purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The hostname of the newly purchased server.\n */\n purchaseServer(hostname: string, ram: number): string;\n\n /**\n * Delete a purchased server.\n * @remarks\n * 2.25 GB\n *\n * Deletes one of your purchased servers, which is specified by its hostname.\n *\n * The hostname argument can be any data type, but it will be converted to a string.\n * Whitespace is automatically removed from the string. This function will not delete a\n * server that still has scripts running on it.\n *\n * @param host - Host of the server to delete.\n * @returns True if successful, and false otherwise.\n */\n deleteServer(host: string): boolean;\n\n /**\n * Returns an array with the hostnames of all of the servers you have purchased.\n *\n * @remarks 2.25 GB\n * @returns Returns an array with the hostnames of all of the servers you have purchased.\n */\n getPurchasedServers(): string[];\n\n /**\n * Returns the maximum number of servers you can purchase.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum number of servers you can purchase.\n */\n getPurchasedServerLimit(): number;\n\n /**\n * Returns the maximum RAM that a purchased server can have.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum RAM (in GB) that a purchased server can have.\n */\n getPurchasedServerMaxRam(): number;\n\n /**\n * Write data to a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function can be used to write data to a text file (.txt).\n *\n * This function will write data to that text file. If the specified text file does not exist,\n * then it will be created. The third argument mode, defines how the data will be written to\n * the text file. If *mode is set to “w”, then the data is written in “write” mode which means\n * that it will overwrite all existing data on the text file. If mode is set to any other value\n * then the data will be written in “append” mode which means that the data will be added at the\n * end of the text file.\n *\n * @param handle - Filename of the text file that will be written to.\n * @param data - Data to write.\n * @param mode - Defines the write mode. Only valid when writing to text files.\n */\n write(handle: string, data?: string[] | number | string, mode?: "w" | "a"): Promise;\n\n /**\n * Attempt to write to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Attempts to write data to the specified Netscript Port.\n * If the port is full, the data will not be written.\n * Otherwise, the data will be written normally.\n *\n * @param port - Port or text file that will be written to.\n * @param data - Data to write.\n * @returns True if the data is successfully written to the port, and false otherwise.\n */\n tryWritePort(port: number, data: string | number): Promise;\n\n /**\n * Read content of a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to read data from a text file (.txt).\n *\n * This function will return the data in the specified text\n * file. If the text file does not exist, an empty string will be returned.\n *\n * @param handle - Filename to read from.\n * @returns Data in the specified text file.\n */\n read(handle: string): any;\n\n /**\n * Get a copy of the data from a port without popping it.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to peek at the data from a port. It returns the\n * first element in the specified port without removing that element. If\n * the port is empty, the string “NULL PORT DATA” will be returned.\n *\n * @param port - Port to peek. Must be an integer between 1 and 20.\n * @returns Data in the specified port.\n */\n peek(port: number): any;\n\n /**\n * Clear data from a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * Delete all data from that text file.\n *\n * @param handle - Text file to clear.\n */\n clear(handle: string): void;\n\n /**\n * Clear data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Deleta all data from the underlying queue.\n *\n * @param handle - Port to clear.\n */\n clearPort(handle: number): void;\n\n /**\n * Write data to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Write data to that netscript port.\n * @returns The data popped off the queue if it was full.\n */\n writePort(port: number, data: string | number): Promise;\n /**\n * Read data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Read data from that port. A port is a serialized queue.\n * This function will remove the first element from that queue and return it.\n * If the queue is empty, then the string “NULL PORT DATA” will be returned.\n * @returns the data read.\n */\n readPort(port: number): any;\n\n /**\n * Get all data on a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Get a handle to a Netscript Port.\n *\n * WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.\n *\n * @see https://bitburner.readthedocs.io/en/latest/netscript/netscriptmisc.html#netscript-ports\n * @param port - Port number. Must be an integer between 1 and 20.\n */\n getPortHandle(port: number): NetscriptPort;\n\n /**\n * Delete a file.\n * @remarks\n * RAM cost: 1 GB\n *\n * Removes the specified file from the current server. This function works for every file\n * type except message (.msg) files.\n *\n * @param name - Filename of file to remove. Must include the extension.\n * @param host - Host Address of the server on which to delete the file. Optional. Defaults to current server.\n * @returns True if it successfully deletes the file, and false otherwise.\n */\n rm(name: string, host?: string): boolean;\n\n /**\n * Check if any script with a filename is running.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns a boolean indicating whether any instance of the specified script is running\n * on the target server, regardless of its arguments.\n *\n * This is different than the isRunning function because it does not try to\n * identify a specific instance of a running script by its arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //The function call will return true if there is any script named foo.script running on the foodnstuff server, and false otherwise:\n * scriptRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is any script named “foo.script” running on the current server, and false otherwise:\n * scriptRunning("foo.script", getHostname());\n * ```\n * * @example\n * ```ts\n * // NS2:\n * //The function call will return true if there is any script named foo.script running on the foodnstuff server, and false otherwise:\n * ns.scriptRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is any script named “foo.script” running on the current server, and false otherwise:\n * ns.scriptRunning("foo.script", ns.getHostname());\n * ```\n * @param script - Filename of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @returns True if the specified script is running, and false otherwise.\n */\n scriptRunning(script: string, host: string): boolean;\n\n /**\n * Kill all scripts with a filename.\n * @remarks\n * RAM cost: 1 GB\n *\n * Kills all scripts with the specified filename on the target server specified by hostname,\n * regardless of arguments.\n *\n * @param script - Filename of script to kill. This is case-sensitive.\n * @param host - Host of target server.\n * @returns true if one or more scripts were successfully killed, and false if none were.\n */\n scriptKill(script: string, host: string): boolean;\n\n /**\n * Returns the current script name.\n *\n * @remarks RAM cost: 0 GB\n * @returns Current script name.\n */\n getScriptName(): string;\n\n /**\n * Get the ram cost of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of RAM required to run the specified script on the target server.\n * Returns 0 if the script does not exist.\n *\n * @param script - Filename of script. This is case-sensitive.\n * @param host - Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.\n * @returns Amount of RAM (in GB) required to run the specified script on the target server, and 0 if the script does not exist.\n */\n getScriptRam(script: string, host?: string): number;\n\n /**\n * Get the execution time of a hack() call.\n * @remarks\n * RAM cost: 0.05 GB\n *When `hack` completes an amount of money is stolen depending on the player\'s skills.\n * Returns the amount of time in milliseconds it takes to execute the hack Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the hack time would be at different hacking levels.\n * The required time is increased by the security level of the target server and decreased by the player\'s hacking level.\n *\n * @param host - Host of target server.\n * @returns Returns the amount of time in milliseconds it takes to execute the hack Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getHackTime(host: string): number;\n\n /**\n * Get the execution time of a grow() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the grow Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the grow time would be at different hacking levels.\n * The required time is increased by the security level of the target server and decreased by the player\'s hacking level.\n *\n * @param host - Host of target server.\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getGrowTime(host: string): number;\n\n /**\n * Get the execution time of a weaken() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the weaken Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the weaken time would be at different hacking levels.\n * The required time is increased by the security level of the target server and decreased by the player\'s hacking level.\n *\n * @param host - Host of target server.\n * @returns Returns the amount of time in milliseconds it takes to execute the weaken Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getWeakenTime(host: string): number;\n\n /**\n * Get the income of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of income the specified script generates while online\n * (when the game is open, does not apply for offline income). Remember that\n * a script is uniquely identified by both its name and its arguments. So for\n * example if you ran a script with the arguments “foodnstuff” and “5” then\n * in order to use this function to get that script’s income you must specify\n * those same arguments in the same order in this function call.\n *\n * This function can also be called with no arguments.\n * If called with no arguments, then this function will return an array of two values.\n * The first value is the total income (dollar / second) of all of your active scripts\n * (scripts that are currently running on any server).\n * The second value is the total income (dollar / second) that you’ve earned from scripts\n * since you last installed Augmentations.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of income the specified script generates while online.\n */\n getScriptIncome(): [number, number];\n\n /**\n * {@inheritDoc NS.(getScriptIncome:1)}\n */\n getScriptIncome(script: string, host: string, ...args: string[]): number;\n\n /**\n * Get the exp gain of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of hacking experience the specified script generates while online\n * (when the game is open, does not apply for offline experience gains). Remember that a\n * script is uniquely identified by both its name and its arguments.\n *\n * This function can also return the total experience gain rate of all of your active\n * scripts by running the function with no arguments.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of hacking experience the specified script generates while online.\n */\n getScriptExpGain(): number;\n\n /**\n * {@inheritDoc NS.(getScriptExpGain:1)}\n */\n getScriptExpGain(script: string, host: string, ...args: string[]): number;\n\n /**\n * Returns the amount of time in milliseconds that have passed since you last installed Augmentations.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Time in milliseconds that have passed since you last installed Augmentations.\n */\n getTimeSinceLastAug(): number;\n\n /**\n * Format a string.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n sprintf(format: string, ...args: any[]): string;\n\n /**\n * Format a string with an array of arguments.\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n vsprintf(format: string, args: any[]): string;\n\n /**\n * Format a number\n * @remarks\n * RAM cost: 0 GB\n *\n * Converts a number into a string with the specified formatter.\n * This uses the numeraljs library, so the formatters must be compatible with that.\n * This is the same function that the game itself uses to display numbers.\n *\n * see: http://numeraljs.com/\n * @param n - Number to format.\n * @param format - Formatter.\n * @returns Formated number.\n */\n nFormat(n: number, format: string): string;\n\n /**\n * Format time to readable string\n * @remarks\n * RAM cost: 0 GB\n *\n * @param milliseconds - Number of millisecond to format.\n * @param milliPrecision - Format time with subsecond precision, defaults to false.\n * @returns The formatted time.\n */\n tFormat(milliseconds: number, milliPrecision?: boolean): string;\n\n /**\n * Prompt the player with an input modal.\n * @remarks\n * RAM cost: 0 GB\n *\n * Prompts the player with a dialog box. If `options.type` is undefined or "boolean",\n * the player is shown "Yes" and "No" prompts, which return true and false respectively.\n * Passing a type of "text" will give the player a text field and a value of "select"\n * will show a drop-down field. Choosing type "select" will require an array or object\n * to be passed via the `options.choices` property.\n * The script’s execution is halted until the player selects one of the options.\n *\n * @param txt - Text to appear in the prompt dialog box.\n * @param options - Options to modify the prompt the player is shown.\n * @returns True if the player click “Yes”; false if the player clicks “No”; or the value entered by the player.\n */\n prompt(\n txt: string,\n options?: { type?: "boolean" | "text" | "select" | undefined; choices?: string[] },\n ): Promise;\n\n /**\n * Open up a message box.\n * @param msg - Message to alert.\n */\n alert(msg: any): void;\n\n /**\n * Queue a toast (bottom-right notification).\n * @param msg - Message in the toast.\n * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success.\n * @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000\n */\n toast(msg: any, variant?: string, duration?: number | null): void;\n\n /**\n * Download a file from the internet.\n * @remarks\n * RAM cost: 0 GB\n *\n * Retrieves data from a URL and downloads it to a file on the specified server.\n * The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt).\n * If the file already exists, it will be overwritten by this command.\n * Note that it will not be possible to download data from many websites because they\n * do not allow cross-origin resource sharing (CORS).\n *\n * IMPORTANT: This is an asynchronous function that returns a Promise.\n * The Promise’s resolved value will be a boolean indicating whether or not the data was\n * successfully retrieved from the URL. Because the function is async and returns a Promise,\n * it is recommended you use wget in NetscriptJS (Netscript 2.0).\n *\n * In NetscriptJS, you must preface any call to wget with the await keyword (like you would hack or sleep).\n * wget will still work in Netscript 1.0, but the functions execution will not be synchronous\n * (i.e. it may not execute when you expect/want it to).\n * Furthermore, since Promises are not supported in ES5,\n * you will not be able to process the returned value of wget in Netscript 1.0.\n *\n * @example\n * ```ts\n * // NS1:\n * wget("https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md", "game_readme.txt");\n * ```\n * @example\n * ```ts\n * // NS2:\n * await ns.wget("https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md", "game_readme.txt");\n * ```\n * @param url - URL to pull data from.\n * @param target - Filename to write data to. Must be script or text file.\n * @param host - Optional hostname/ip of server for target file.\n * @returns True if the data was successfully retrieved from the URL, false otherwise.\n */\n wget(url: string, target: string, host?: string): Promise;\n\n /**\n * Returns the amount of Faction favor required to be able to donate to a faction.\n *\n * @remarks RAM cost: 0.1 GB\n * @returns Amount of Faction favor required to be able to donate to a faction.\n */\n getFavorToDonate(): number;\n\n /**\n * Get the current Bitnode multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the current BitNode multipliers.\n * This function requires you to be in Bitnode 5 or have Source-File 5 in order to run.\n * The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%).\n * The multipliers represent the difference between the current BitNode and\n * the original BitNode (BitNode-1).\n *\n * For example, if the CrimeMoney multiplier has a value of 0.1, then that means\n * that committing crimes in the current BitNode will only give 10% of the money\n * you would have received in BitNode-1.\n *\n * @example\n * ```ts\n * // NS1:\n * var mults = getBitNodeMultipliers();\n * print(mults.ServerMaxMoney);\n * print(mults.HackExpGain);\n * ```\n * @example\n * ```ts\n * // NS2:\n * const {ServerMaxMoney, HackExpGain} = ns.getBitNodeMultipliers();\n * print(ServerMaxMoney);\n * print(HackExpGain);\n * ```\n * @returns Object containing the current BitNode multipliers.\n */\n getBitNodeMultipliers(): BitNodeMultipliers;\n\n /**\n * Get a list of acquired Source-Files.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns an array of source files\n *\n * @returns Array containing an object with number and level of the source file.\n */\n getOwnedSourceFiles(): SourceFileLvl[];\n\n /**\n * Get information about the player.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Returns an object with information on the current player.\n *\n * @returns Player info\n */\n getPlayer(): Player;\n\n /**\n * Add callback function when the script dies\n * @remarks\n * RAM cost: 0 GB\n *\n * NS2 exclusive\n *\n * Add callback to be executed when the script dies.\n */\n atExit(f: () => void): void;\n\n /**\n * Move a file on the target server.\n * @remarks\n * RAM cost: 0 GB\n *\n * NS2 exclusive\n *\n * Move the source file to the specified destination on the target server.\n *\n * This command only works for scripts and text files (.txt). It cannot, however, be used\n * to convert from script to text file, or vice versa.\n *\n * This function can also be used to rename files.\n *\n * @param host - Host of target server.\n * @param source - Filename of the source file.\n * @param destination - Filename of the destination file.\n */\n mv(host: string, source: string, destination: string): void;\n\n /**\n * Parse command line flags.\n * @remarks\n * RAM cost: 0 GB\n *\n * Allows unix like flag parsing.\n * @example\n * ```ts\n * // example.script\n * var data = flags([\n * [\'delay\', 0], // a default number means this flag is a number\n * [\'server\', \'foodnstuff\'], // a default string means this flag is a string\n * [\'exclude\', []], // a default array means this flag is a default array of string\n * [\'help\', false], // a default boolean means this flag is a boolean\n * ]);\n * tprint(data);\n *\n * // example.ns\n * export async function main(ns) {\n * const data = ns.flags([\n * [\'delay\', 0], // a default number means this flag is a number\n * [\'server\', \'foodnstuff\'], // a default string means this flag is a string\n * [\'exclude\', []], // a default array means this flag is a default array of string\n * [\'help\', false], // a default boolean means this flag is a boolean\n * ]);\n * ns.tprint(data);\n * }\n *\n * // [home ~/]> run example.script\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false}\n * // [home ~/]> run example.script --delay 3000\n * // {"_":[],"server":"foodnstuff","exclude":[],"help":false,"delay":3000}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi\n * // {"_":[],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world\n * // {"_":["hello","world"],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b\n * // {"_":["hello","world"],"help":false,"delay":3000,"server":"harakiri-sushi","exclude":["a","b"]}\n * // [home ~/]> run example.script --help\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true}\n * ```\n */\n flags(schema: [string, string | number | boolean | string[]][]): any;\n\n /**\n * Share your computer with your factions.\n * @remarks\n * RAM cost: 2.4 GB\n *\n * Increases your rep gain of hacking contracts while share is called.\n * Scales with thread count.\n */\n share(): Promise;\n\n /**\n * Calculate your share power. Based on all the active share calls.\n * @remarks\n * RAM cost: 0.2 GB\n */\n getSharePower(): number;\n}\n\n/**\n * Corporation Office API\n * @remarks\n * Requires the Office API upgrade from your corporation.\n * @public\n */\nexport interface OfficeAPI {\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - name of the employee\n * @param job - Name of the job.\n * @returns A promise that is fulfilled when the assignment is complete.\n */\n assignJob(divisionName: string, cityName: string, employeeName: string, job: string): Promise;\n /**\n * Hire an employee.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns The newly hired employee, if any\n */\n hireEmployee(divisionName: string, cityName: string): Employee | undefined;\n /**\n * Upgrade office size.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param size - Amount of positions to open\n */\n upgradeOfficeSize(divisionName: string, cityName: string, size: number): void;\n /**\n * Throw a party for your employees\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param costPerEmployee - Amount to spend per employee.\n * @returns Amount of happiness increased.\n */\n throwParty(divisionName: string, cityName: string, costPerEmployee: number): Promise;\n /**\n * Buy coffee for your employees\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns A promise that is fulfilled when the coffee is served.\n */\n buyCoffee(divisionName: string, cityName: string): Promise;\n /**\n * Hire AdVert.\n * @param divisionName - Name of the division\n */\n hireAdVert(divisionName: string): void;\n /**\n * Purchase a research\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n */\n research(divisionName: string, researchName: string): void;\n /**\n * Get data about an office\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns Office data\n */\n getOffice(divisionName: string, cityName: string): Office;\n /**\n * Get data about an employee\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - Name of the employee\n * @returns Employee data\n */\n getEmployee(divisionName: string, cityName: string, employeeName: string): Employee;\n /**\n * Get the cost to Hire AdVert\n * @param divisionName - Name of the division\n * @returns Cost\n */\n getHireAdVertCost(divisionName: string): number;\n /**\n * Get the number of times you have Hired AdVert\n * @param divisionName - Name of the division\n * @returns Number of times you have Hired AdVert\n */\n getHireAdVertCount(adivisionName: string): number;\n /**\n * Get the cost to unlock research\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n * @returns cost\n */\n getResearchCost(divisionName: string, researchName: string): number;\n /**\n * Gets if you have unlocked a research\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n * @returns true is unlocked, false if not\n */\n hasResearched(divisionName: string, researchName: string): boolean;\n /**\n * Set the auto job assignment for a job\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param job - Name of the job\n * @param amount - Number of employees to assign to that job\n * @returns A promise that is fulfilled when the assignment is complete.\n */\n setAutoJobAssignment(divisionName: string, cityName: string, job: string, amount: number): Promise;\n /**\n * Cost to Upgrade office size.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param size - Amount of positions to open\n * @returns Cost of upgrading the office\n */\n getOfficeSizeUpgradeCost(divisionName: string, cityName: string, asize: number): number;\n}\n\n/**\n * Corporation Warehouse API\n * @remarks\n * Requires the Warehouse API upgrade from your corporation.\n * @public\n */\nexport interface WarehouseAPI {\n /**\n * Set material sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n */\n sellMaterial(divisionName: string, cityName: string, materialName: string, amt: string, price: string): void;\n /**\n * Set product sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n * @param all - Sell in all city\n */\n sellProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n amt: string,\n price: string,\n all: boolean,\n ): void;\n /**\n * Discontinue a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n */\n discontinueProduct(divisionName: string, productName: string): void;\n /**\n * Set smart supply\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param enabled - smart supply enabled\n */\n setSmartSupply(divisionName: string, cityName: string, enabled: boolean): void;\n /**\n * Set whether smart supply uses leftovers before buying\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param enabled - smart supply use leftovers enabled\n */\n setSmartSupplyUseLeftovers(divisionName: string, cityName: string, materialName: string, enabled: boolean): void;\n /**\n * Set material buy data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount of material to buy\n */\n buyMaterial(divisionName: string, cityName: string, materialName: string, amt: number): void;\n /**\n * Set material to bulk buy\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount of material to buy\n */\n bulkPurchase(divisionName: string, cityName: string, materialName: string, amt: number): void;\n /**\n * Get warehouse data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns warehouse data\n */\n getWarehouse(divisionName: string, cityName: string): Warehouse;\n /**\n * Get product data\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @returns product data\n */\n getProduct(divisionName: string, productName: string): Product;\n /**\n * Get material data\n * @param divisionName - Name of the division\n * @param materialName - Name of the material\n * @returns material data\n */\n getMaterial(divisionName: string, cityName: string, materialName: string): Material;\n /**\n * Set market TA 1 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA1(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 2 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA2(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 1 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA1(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set market TA 2 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA2(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set material export data\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n exportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Cancel material export\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n cancelExportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Purchase warehouse for a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n purchaseWarehouse(divisionName: string, cityName: string): void;\n /**\n * Upgrade warehouse\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n upgradeWarehouse(divisionName: string, cityName: string): void;\n /**\n * Create a new product\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param designInvest - Amount to invest for the design of the product.\n * @param marketingInvest - Amount to invest for the marketing of the product.\n */\n makeProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n ): void;\n /**\n * Gets the cost to purchase a warehouse\n * @returns cost\n */\n getPurchaseWarehouseCost(): number;\n /**\n * Gets the cost to upgrade a warehouse to the next level\n * @returns cost to upgrade\n */\n getUpgradeWarehouseCost(adivisionName: any, acityName: any): number;\n /**\n * Check if you have a warehouse in city\n * @returns true if warehouse is present, false if not\n */\n hasWarehouse(adivisionName: any, acityName: any): boolean;\n}\n\n/**\n * Corporation API\n * @public\n */\nexport interface Corporation extends WarehouseAPI, OfficeAPI {\n /**\n * Create a Corporation\n * @param divisionName - Name of the division\n * @param selfFund - If you should self fund, defaults to true, false will only work on Bitnode 3\n * @returns true if created and false if not\n */\n createCorporation(corporationName: string, selfFund: boolean): boolean;\n /**\n * Check if you have a one time unlockable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns true if unlocked and false if not\n */\n hasUnlockUpgrade(upgradeName: string): boolean;\n /**\n * Gets the cost to unlock a one time unlockable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns cost of the upgrade\n */\n getUnlockUpgradeCost(upgradeName: string): number;\n /**\n * Get the level of a levelable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns the level of the upgrade\n */\n getUpgradeLevel(upgradeName: string): number;\n /**\n * Gets the cost to unlock the next level of a levelable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns cost of the upgrade\n */\n getUpgradeLevelCost(upgradeName: string): number;\n /**\n * Gets the cost to expand into a new industry\n * @param industryName - Name of the industry\n * @returns cost\n */\n getExpandIndustryCost(industryName: string): number;\n /**\n * Gets the cost to expand into a new city\n * @returns cost\n */\n getExpandCityCost(): number;\n /**\n * Get an offer for investment based on you companies current valuation\n * @returns An offer of investment\n */\n getInvestmentOffer(): InvestmentOffer;\n /**\n * Accept investment based on you companies current valuation\n * @remarks\n * Is based on current valuation and will not honer a specific Offer\n * @returns An offer of investment\n */\n acceptInvestmentOffer(): boolean;\n /**\n * Go public\n * @param numShares - number of shares you would like to issue for your IPO\n * @returns true if you successfully go public, false if not\n */\n goPublic(numShares: number): boolean;\n /**\n * Bribe a faction\n * @param factionName - Faction name\n * @param amountCash - Amount of money to bribe\n * @param amountShares - Amount of shares to bribe\n * @returns True if successful, false if not\n */\n bribe(factionName: string, amountCash: number, amountShares: number): boolean;\n /**\n * Get corporation data\n * @returns Corporation data\n */\n getCorporation(): CorporationInfo;\n /**\n * Get division data\n * @param divisionName - Name of the division\n * @returns Division data\n */\n getDivision(divisionName: string): Division;\n /**\n * Expand to a new industry\n * @param industryType - Name of the industry\n * @param divisionName - Name of the division\n */\n expandIndustry(industryType: string, divisionName: string): void;\n /**\n * Expand to a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n expandCity(divisionName: string, cityName: string): void;\n /**\n * Unlock an upgrade\n * @param upgradeName - Name of the upgrade\n */\n unlockUpgrade(upgradeName: string): void;\n /**\n * Level an upgrade.\n * @param upgradeName - Name of the upgrade\n */\n levelUpgrade(upgradeName: string): void;\n /**\n * Issue dividends\n * @param percent - Percent of profit to issue as dividends.\n */\n issueDividends(percent: number): void;\n /**\n * Buyback Shares\n * @param amount - Amount of shares to buy back.\n *\n */\n buyBackShares(amount: number): void;\n /**\n * Sell Shares\n * @param amount - Amount of shares to sell.\n *\n */\n sellShares(amount: number): void;\n /**\n * Get bonus time.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster.\n *\n * @returns Bonus time for the Corporation mechanic in milliseconds.\n */\n getBonusTime(): number;\n}\n\n/**\n * General info about a corporation\n * @public\n */\ninterface CorporationInfo {\n /** Name of the corporation */\n name: string;\n /** Funds available */\n funds: number;\n /** Revenue per second this cycle */\n revenue: number;\n /** Expenses per second this cycle */\n expenses: number;\n /** Indicating if the company is public */\n public: boolean;\n /** Total number of shares issues by this corporation */\n totalShares: number;\n /** Amount of share owned */\n numShares: number;\n /** Cooldown until shares can be sold again */\n shareSaleCooldown: number;\n /** Amount of shares issued */\n issuedShares: number;\n /** Price of the shares */\n sharePrice: number;\n /** State of the corporation. Possible states are START, PURCHASE, PRODUCTION, SALE, EXPORT. */\n state: string;\n /** Array of all divisions */\n divisions: Division[];\n}\n\n/**\n * Employee in an office\n * @public\n */\ninterface Employee {\n /** Name of the employee */\n name: string;\n /** Morale */\n mor: number;\n /** Happiness */\n hap: number;\n /** Energy */\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n /** Salary */\n sal: number;\n /** City */\n loc: string;\n /** Current job */\n pos: string;\n}\n\n/**\n * Product in a warehouse\n * @public\n */\ninterface Product {\n /** Name of the product */\n name: string;\n /** Demand for the product */\n dmd: number;\n /** Competition for the product */\n cmp: number;\n /** Production cost */\n pCost: number;\n /** Sell cost, can be "MP+5" */\n sCost: string | number;\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 cityData: { [key: string]: number[] };\n /** Creation progress - A number between 0-100 representing percentage */\n developmentProgress: number;\n}\n\n/**\n * Material in a warehouse\n * @public\n */\ninterface Material {\n /** Name of the material */\n name: string;\n /** Amount of material */\n qty: number;\n /** Quality of the material */\n qlt: number;\n /** Amount of material produced */\n prod: number;\n /** Amount of material sold */\n sell: number;\n}\n\n/**\n * Warehouse for a division in a city\n * @public\n */\ninterface Warehouse {\n /** Amount of size upgrade bought */\n level: number;\n /** City in which the warehouse is located */\n loc: string;\n /** Total space in the warehouse */\n size: number;\n /** Used space in the warehouse */\n sizeUsed: number;\n /** Smart Supply status in the warehouse */\n smartSupplyEnabled: boolean;\n}\n\n/**\n * Office for a division in a city.\n * @public\n */\ninterface Office {\n /** City of the office */\n loc: string;\n /** Maximum number of employee */\n size: number;\n /** Minimum amount of energy of the employees */\n minEne: number;\n /** Maximum amount of energy of the employees */\n maxEne: number;\n /** Minimum happiness of the employees */\n minHap: number;\n /** Maximum happiness of the employees */\n maxHap: number;\n /** Maximum morale of the employees */\n maxMor: number;\n /** Name of all the employees */\n employees: string[];\n /** Positions of the employees */\n employeeProd: EmployeeJobs;\n}\n\n/**\n * Object representing the number of employee in each job.\n * @public\n */\ninterface EmployeeJobs {\n Operations: number;\n Engineer: number;\n Business: number;\n Management: number;\n "Research & Development": number;\n Training: number;\n Unassigned: number;\n}\n\n/**\n * Corporation division\n * @public\n */\ninterface Division {\n /** Name of the division */\n name: string;\n /** Type of division, like Agriculture */\n type: string;\n /** Awareness of the division */\n awareness: number;\n /** Popularity of the division */\n popularity: number;\n /** Production multiplier */\n prodMult: number;\n /** Amount of research in that division */\n research: number;\n /** Revenue last cycle */\n lastCycleRevenue: number;\n /** Expenses last cycle */\n lastCycleExpenses: number;\n /** Revenue this cycle */\n thisCycleRevenue: number;\n /** Expenses this cycle */\n thisCycleExpenses: number;\n /** All research bought */\n upgrades: number[];\n /** Cities in which this division has expanded */\n cities: string[];\n /** Products developed by this division */\n products: string[];\n}\n\n/**\n * Corporation investment offer\n * @public\n */\ninterface InvestmentOffer {\n /** Amount of funds you will get from this investment */\n funds: number;\n /** Amount of share you will give in exchange for this investment */\n shares: number;\n /** Current round of funding (max 4) */\n round: number;\n}\n\n/**\n * Interface Theme\n * @internal\n */\ninterface UserInterfaceTheme {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: string;\n successlight: string;\n success: string;\n successdark: string;\n errorlight: string;\n error: string;\n errordark: string;\n secondarylight: string;\n secondary: string;\n secondarydark: string;\n warninglight: string;\n warning: string;\n warningdark: string;\n infolight: string;\n info: string;\n infodark: string;\n welllight: string;\n well: string;\n white: string;\n black: string;\n hp: string;\n money: string;\n hack: string;\n combat: string;\n cha: string;\n int: string;\n rep: string;\n disabled: string;\n backgroundprimary: string;\n backgroundsecondary: string;\n button: string;\n}\n\n/**\n * Interface Styles\n * @internal\n */\ninterface IStyleSettings {\n fontFamily: string;\n lineHeight: number;\n}\n\n/**\n * Game Information\n * @internal\n */\ninterface GameInfo {\n version: string;\n commit: string;\n platform: string;\n}\n\n/**\n * Used for autocompletion\n * @public\n */\ninterface AutocompleteData {\n servers: string[];\n scripts: string[];\n txts: string[];\n flags(schema: [string, string | number | boolean | string[]][]): any;\n}\n'},,,,,,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(768),r=n(0),i=n(1),o=n(21);function s(t){const e=function(t,e){let n=-1;for(let a=0;a{if(a<=e+1)return r.createElement(i.a,{key:a},"[",n.fulfilled(t.player)?"x":" ","] ",n.title)});return r.createElement(r.Fragment,null,r.createElement(i.a,{variant:"h4"},"Milestones"),r.createElement(o.a,{mx:2},r.createElement(i.a,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."),r.createElement("br",null),r.createElement(i.a,null,"Completing fl1ght.exe"),n))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return k}));var a=n(0),r=n.n(a),i=n(1),o=n(286),s=n(74),l=n(120),c=n(113),f=n(137),u=n(21),m=n(246),h=n(1324),d=n(324),p=n(575),g=n(561),y=n(173),b=n.n(y);function E({terminal:t}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},t.getProgressText())}const v=Object(c.a)(t=>Object(f.a)({nopadding:{padding:t.spacing(0)},preformatted:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0)},list:{padding:t.spacing(0),height:"100%"},success:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.colors.success},error:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.error.main},primary:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.primary.main},info:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.info.main},warning:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.warning.main}}));function k({terminal:t,router:e,player:n}){const c=Object(a.useRef)(null),f=Object(a.useState)(0)[1],[y,k]=Object(a.useState)(0);function _(){const t=c.current;if(null!==t)return window.setTimeout(()=>t.scrollIntoView(!0),50)}Object(a.useEffect)(()=>{const t=b.a.debounce(async()=>{f(t=>t+1)},25,{maxWait:50}),e=d.b.subscribe(t);return()=>{t.cancel(),e()}},[]),Object(a.useEffect)(()=>{const t=b.a.debounce(async()=>{k(t=>t+1)},25,{maxWait:50}),e=d.a.subscribe(t);return()=>{t.cancel(),e()}},[]),_(),Object(a.useEffect)(()=>{let t;const e=setTimeout(()=>{var e;t=null!==(e=_())&&void 0!==e?e:0},50);return()=>{clearTimeout(e),clearTimeout(t)}},[]);const w=v();return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{width:"100%",minHeight:"100vh",display:"flex",alignItems:"flex-end"},r.a.createElement(o.a,{key:y,id:"terminal",classes:{root:w.list}},t.outputHistory.map((e,a)=>{return e instanceof m.b?r.a.createElement(s.a,{key:a,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:(o=e.color,"error"===o?w.error:"success"===o?w.success:"info"===o?w.info:"warn"===o?w.warning:w.primary)},paragraph:!1},e.text)):e instanceof m.c?r.a.createElement(s.a,{key:a,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:w.preformatted},paragraph:!1},e.raw)):e instanceof m.a?r.a.createElement(s.a,{key:a,classes:{root:w.nopadding}},r.a.createElement(i.a,null,e.dashes,"> "),r.a.createElement(l.a,{classes:{root:w.preformatted},color:"secondary",paragraph:!1,onClick:()=>t.connectToServer(n,e.hostname)},r.a.createElement(i.a,null,e.hostname))):void 0;var o}),null!==t.action&&r.a.createElement(s.a,{classes:{root:w.nopadding}},r.a.createElement(E,{terminal:t})," ")),r.a.createElement("div",{ref:c})),r.a.createElement(u.a,{position:"sticky",bottom:0,width:"100%",px:0},r.a.createElement(h.a,{player:n,router:e,terminal:t})),r.a.createElement(p.b,null),r.a.createElement(g.b,null))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(1),o=n(113),s=n(137),l=n(81),c=n(23),f=n(28),u=n(1325),m=n(1328),h=n(9);const d=Object(o.a)(t=>Object(s.a)({textfield:{margin:t.spacing(0)},input:{backgroundColor:t.colors.backgroundprimary},nopadding:{padding:t.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:t.spacing(0)},list:{padding:t.spacing(0),height:"100%"}}));let p="";function g({terminal:t,router:e,player:n}){const o=Object(a.useRef)(null),[s,g]=Object(a.useState)(p),[y,b]=Object(a.useState)(),[E,v]=Object(a.useState)([]),k=d();function _(t,e){p=t,g(t),e&&b({postUpdate:e})}function w(t){const e=o.current;if(!e)return;const n=s.length,a=e.selectionStart;if(null===a)return;const r=e.value;switch(t.toLowerCase()){case"backspace":a>0&&a<=n+1&&_(r.substr(0,a-1)+r.substr(a));break;case"deletewordbefore":for(let t=a-1;t>-2;--t)if((r.charAt(t)===f.a.SPACE||-1===t)&&t!==a-1)return void _(r.substr(0,t+1)+r.substr(a),()=>{const e=o.current;null==e||e.setSelectionRange(t+1,t+1)});break;case"deletewordafter":for(let t=a+1;t<=s.length+1;++t)if(r.charAt(t)===f.a.SPACE||t===s.length+1)return void _(r.substr(0,a)+r.substr(t+1),()=>{const t=o.current;null==t||t.setSelectionRange(a,a)});break;case"clearafter":_(r.substr(0,a));break;case"clearbefore":_(r.substr(a),()=>S("home"))}}function S(t){const e=o.current;if(!e)return;const n=s.length,a=e.selectionStart;if(null!==a)switch(t.toLowerCase()){case"home":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;case"prevchar":a>0&&e.setSelectionRange(a-1,a-1);break;case"prevword":for(let t=a-2;t>=0;--t)if(e.value.charAt(t)===f.a.SPACE)return void e.setSelectionRange(t+1,t+1);e.setSelectionRange(0,0);break;case"nextchar":e.setSelectionRange(a+1,a+1);break;case"nextword":for(let t=a+1;t<=n;++t)if(e.value.charAt(t)===f.a.SPACE)return void e.setSelectionRange(t,t);e.setSelectionRange(n,n);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}return 0===t.commandHistory.length&&n.terminalCommandHistory.length>0&&(t.commandHistory=n.terminalCommandHistory,t.commandHistoryIndex=t.commandHistory.length),Object(a.useEffect)(()=>{null!=y&&y.postUpdate&&(y.postUpdate(),b(null))},[y]),Object(a.useEffect)(()=>{function a(a){if(t.contractOpen)return;if(null!==t.action&&a.key===f.a.C&&a.ctrlKey)return void t.finishAction(e,n,!0);const r=o.current;a.ctrlKey||a.metaKey||a.key===f.a.C&&(a.ctrlKey||a.metaKey)||r&&r.focus()}return document.addEventListener("keydown",a),()=>document.removeEventListener("keydown",a)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{title:E.length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{classes:{root:k.preformatted},color:"primary",paragraph:!1},"Possible autocomplete candidate:"),r.a.createElement(i.a,{classes:{root:k.preformatted},color:"primary",paragraph:!1},E.join(" "))):""},r.a.createElement(l.a,{fullWidth:!0,color:null===t.action?"primary":"secondary",autoFocus:!0,disabled:null!==t.action,autoComplete:"off",value:s,classes:{root:k.textfield},onChange:function(t){_(t.target.value),v([])},inputRef:o,InputProps:{id:"terminal-input",className:k.input,startAdornment:r.a.createElement(i.a,{color:null===t.action?"primary":"secondary",flexShrink:0},"[",n.getCurrentServer().hostname," ~",t.cwd(),"]> "),spellCheck:!1,onKeyDown:async function(a){if(a.key===f.a.ENTER&&""!==s)return a.preventDefault(),t.print(`[${n.getCurrentServer().hostname} ~${t.cwd()}]> ${s}`),t.executeCommands(e,n,s),void _("");if(a.key===f.a.TAB&&""!==s){a.preventDefault();let e=s;const r=e.lastIndexOf(";");-1!==r&&(e=e.slice(r+1)),e=e.trim(),e=e.replace(/\s\s+/g," ");const i=e.split(" ");let o=i.length-2;o<-1&&(o=0);const l=await Object(u.a)(n,e,o,t.cwd());if(0==l.length)return;let c="",f="";if(0==i.length)return;1==i.length?f=i[0]:2==i.length?(f=i[0],c=i[1]):3==i.length?(f=i[0]+" "+i[1],c=i[2]):(c=i.pop()+"",f=i.join(" "));let h=Object(m.a)(f,c,l,s);"string"==typeof h&&""!==h&&(h.endsWith(" ")||h.endsWith("/")||1!==l.length||(h+=" "),_(h)),Array.isArray(h)&&v(h)}if(a.key===f.a.L&&a.ctrlKey&&(a.preventDefault(),t.clear()),a.key===f.a.UP_ARROW||h.a.EnableBashHotkeys&&a.key===f.a.P&&a.ctrlKey){h.a.EnableBashHotkeys&&a.preventDefault();const e=t.commandHistoryIndex,n=t.commandHistory.length;if(0==n)return;(e<0||e>n)&&(t.commandHistoryIndex=n),0!=e&&--t.commandHistoryIndex;_(t.commandHistory[t.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(a.key===f.a.DOWN_ARROW||h.a.EnableBashHotkeys&&a.key===f.a.M&&a.ctrlKey){h.a.EnableBashHotkeys&&a.preventDefault();const e=t.commandHistoryIndex,n=t.commandHistory.length;if(0==n)return;if((e<0||e>n)&&(t.commandHistoryIndex=n),e==n||e==n-1)t.commandHistoryIndex=n,_("");else{++t.commandHistoryIndex;_(t.commandHistory[t.commandHistoryIndex])}}h.a.EnableBashHotkeys&&(a.key===f.a.A&&a.ctrlKey&&(a.preventDefault(),S("home")),a.key===f.a.E&&a.ctrlKey&&(a.preventDefault(),S("end")),a.key===f.a.B&&a.ctrlKey&&(a.preventDefault(),S("prevchar")),a.key===f.a.B&&a.altKey&&(a.preventDefault(),S("prevword")),a.key===f.a.F&&a.ctrlKey&&(a.preventDefault(),S("nextchar")),a.key===f.a.F&&a.altKey&&(a.preventDefault(),S("nextword")),a.key!==f.a.H&&a.key!==f.a.D||!a.ctrlKey||(w("backspace"),a.preventDefault()),a.key===f.a.W&&a.ctrlKey&&(a.preventDefault(),w("deletewordbefore")),a.key===f.a.D&&a.altKey&&(a.preventDefault(),w("deletewordafter")),a.key===f.a.U&&a.ctrlKey&&(a.preventDefault(),w("clearbefore")),a.key===f.a.K&&a.ctrlKey&&(a.preventDefault(),w("clearafter")))}}})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(83),r=n(1326),i=n(152),o=n(256),s=n(26),l=n(469),c=n(520),f=n(98),u=n(627),m=n(628),h=n(314);const d=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","cp","download","expr","free","grow","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan-analyze","scan","scp","sudov","tail","theme","top","vim","weaken"];async function p(t,e,n,p=""){e=Object(i.h)(e);let g=[];g=g.concat(Object.keys(i.b));const y=t.getCurrentServer(),b=t.getHomeComputer();let E="",v=null;function k(){for(const t of y.contracts)g.push(t.fn)}function _(){for(const t of y.messages)t.endsWith(".msg")||g.push(t)}function w(){for(const t of b.programs)g.push(t)}function S(){for(const t of y.scripts){const e=L(t.filename);e&&g.push(e)}}function C(){for(const t of y.textFiles){const e=L(t.fn);e&&g.push(e)}}function x(){const t=Object(r.a)(y,null==v?"/":v);for(let e=0;e{const e=i.replace(/^\.\//g,"");return L(t.filename)===e||t.filename==="/"+e});if(!o)return;o.module||await Object(u.a)(t,o,y.scripts);const c=await o.module;if(!c.autocomplete)return;const d={"--tail":Boolean,"-t":Number},p=h(d,{permissive:!0,argv:r.slice(2)}),g=Object(m.a)(p._),b={servers:Object(s.c)().map(t=>t.hostname),scripts:y.scripts.map(t=>t.filename),txts:y.textFiles.map(t=>t.fn),flags:t=>{v=t.map(t=>1===t[0].length?"-"+t[0]:"--"+t[0]);try{return g(t)}catch(t){return}}};let E=[],v=[];return E=E.concat(c.autocomplete(b,p._)),E.concat(v)}();if(A)return A;if(e.startsWith("./")){for(const t of y.scripts){const e=L(t.filename);e&&g.push(e)}for(const t of y.programs){const e=L(t);e&&g.push(e)}for(const t of y.contracts){const e=L(t.fn);e&&g.push(e)}return g}return O("run")&&(S(),w(),k(),x()),O("kill")||O("tail")||O("mem")||O("check")?(S(),x(),g):O("cat")?(function(){for(const t of y.messages)t.endsWith(".msg")&&g.push(t)}(),_(),C(),x(),S(),g):O("download")||O("mv")?(S(),C(),x(),g):O("cd")?(x(),g):(O("ls")&&0===n&&x(),O("help")?Object.keys(c.a):g)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(83);function r(t,e){const n=[];if(!Object(a.i)(e))return n;let r=e;function i(t){if("/"===r&&Object(a.h)(t)){const e=Object(a.g)(t);"/"===e||n.includes(e)||n.push(e)}else if(t.startsWith(r)){const e=t.slice(r.length),i=Object(a.g)(e);"/"===i||n.includes(i)||n.push(i)}}r.endsWith("/")||(r+="/");for(const e of t.scripts)i(e.filename);for(const e of t.textFiles)i(e.fn);return n}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));class a{constructor(t,e,n){this.filename=t,this.url=e,this.moduleSequenceNumber=n}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(24);function r(t,e,n,r){if(n.constructor!==Array)return;if(!Object(a.a)(n))return;if(""===e)for(let e=n.length-1;e>=0;--e)n[e].toLowerCase().startsWith(t.toLowerCase())||n.splice(e,1);else for(let t=n.length-1;t>=0;--t)n[t].toLowerCase().startsWith(e.toLowerCase())||n.splice(t,1);const i=r.lastIndexOf(";");let o="";if(0!==n.length){if(1===n.length)return o=""===e?n[0]:t+" "+n[0],-1===i?o:r.slice(0,i+1)+" "+o;{const o=Object(a.f)(n);return""===e?o===t?n:-1===i?o:`${r.slice(0,i+1)} ${o}`:o===e?n:-1==i?`${t} ${o}`:`${r.slice(0,i+1)} ${t} ${o}`}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(1),o=n(120),s=n(21),l=n(10),c=n(250);function f(t){const[e,n]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"h4"},"Tutorial / Documentation"),r.a.createElement(s.a,{m:2},r.a.createElement(l.a,{onClick:()=>n(!0)},"Soft reset and Restart tutorial"),r.a.createElement(c.a,{open:e,onClose:()=>n(!1),onConfirm:t.reactivateTutorial,confirmationText:"This will reset all your stats to 1 and money to 1k. Are you sure?"}),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html"},r.a.createElement(i.a,null,"Getting Started")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html"},r.a.createElement(i.a,null,"Servers & Networking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html"},r.a.createElement(i.a,null,"Hacking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html"},r.a.createElement(i.a,null,"Scripts")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript.html"},r.a.createElement(i.a,null,"Netscript Programming Language")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html"},r.a.createElement(i.a,null,"Traveling")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html"},r.a.createElement(i.a,null,"Companies")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html"},r.a.createElement(i.a,null,"Infiltration")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html"},r.a.createElement(i.a,null,"Factions")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html"},r.a.createElement(i.a,null,"Augmentations")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/shortcuts.html"},r.a.createElement(i.a,null,"Keyboard Shortcuts")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html#netscript-1-0-vs-netscript-2-0"},r.a.createElement(i.a,null,"NS1 vs NS2 (or .script vs .js)")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript/netscriptfunctions.html"},r.a.createElement(i.a,null,"Simplified list of functions")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md"},r.a.createElement(i.a,null,"Complete list of functions"))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(536),o=n(248),s=n(1331),l=n(1339);function c(t){const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(n,200);return()=>clearInterval(t)},[]);const[c,f]=Object(a.useState)("active");return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"fullWidth",value:c,onChange:function(t,e){f(e)},sx:{minWidth:"fit-content",maxWidth:"25%"}},r.a.createElement(o.a,{label:"Active",value:"active"}),r.a.createElement(o.a,{label:"Recently Killed",value:"recent"})),"active"===c&&r.a.createElement(s.a,{workerScripts:t.workerScripts}),"recent"===c&&r.a.createElement(l.a,null))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(1332),o=n(1333),s=n(1);function l(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.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."),r.a.createElement(i.a,null),r.a.createElement(o.a,t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n(20),i=n(110),o=n(30),s=n(1),l=n(113),c=n(137),f=n(179),u=n(145),m=n(31),h=n(45);const d=Object(l.a)(t=>Object(c.a)({cell:{borderBottom:"none",padding:t.spacing(1),margin:t.spacing(1),whiteSpace:"nowrap"},size:{width:"1px"}}));function p(){const t=o.b.Player(),e=d(),n=t.scriptProdSinceLastAug/(t.playtimeSinceLastAug/1e3);return a.createElement(f.a,{size:"small",classes:{root:e.size}},a.createElement(u.a,null,a.createElement(h.a,null,a.createElement(m.a,{component:"th",scope:"row",classes:{root:e.cell}},a.createElement(s.a,{variant:"body2"},"Total production since last Augment Installation:")),a.createElement(m.a,{align:"left",classes:{root:e.cell}},a.createElement(s.a,{variant:"body2"},a.createElement(r.a,{money:t.scriptProdSinceLastAug}))),a.createElement(m.a,{align:"left",classes:{root:e.cell}},a.createElement(s.a,{variant:"body2"},"(",a.createElement(i.a,{money:n}),")")))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(1334),o=n(81),s=n(286),l=n(1476),c=n(292),f=n(26),u=n(9),m=n(630),h=n(342),d=n.n(h);function p(t){const[e,n]=Object(a.useState)(""),[h,p]=Object(a.useState)(0),[g,y]=Object(a.useState)(u.a.ActiveScriptsServerPageSize),b=Object(a.useState)(!1)[1];const E={};for(const e of t.workerScripts.values()){const t=Object(f.d)(e.hostname);if(null==t){console.warn("WorkerScript has invalid hostname: "+e.hostname);continue}let n=E[t.hostname];void 0===n&&(E[t.hostname]={server:t,workerScripts:[]},n=E[t.hostname]),void 0!==n&&n.workerScripts.push(e)}const v=Object.values(E).filter(t=>t&&(t.server.hostname.includes(e)||t.server.runningScripts.find(t=>t.filename.includes(e))));function k(){b(t=>!t)}return Object(a.useEffect)(()=>c.a.subscribe(k)),r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{value:e,onChange:function(t){n(t.target.value),p(0)},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(d.a,null),spellCheck:!1}}),r.a.createElement(s.a,{dense:!0},v.slice(h*g,h*g+g).map(t=>t&&r.a.createElement(i.a,{key:t.server.hostname,server:t.server,workerScripts:t.workerScripts}))),r.a.createElement(l.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:v.length,rowsPerPage:g,page:h,onPageChange:(t,e)=>{p(e)},onRowsPerPageChange:t=>{u.a.ActiveScriptsServerPageSize=parseInt(t.target.value,10),y(parseInt(t.target.value,10)),p(0)},ActionsComponent:m.a}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n(1),i=n(330),o=n(107),s=n(65),l=n(21),c=n(211),f=n(75),u=n.n(f),m=n(156),h=n.n(m),d=n(1335),p=n(192);function g(t){const[e,n]=a.useState(!1),f=t.server,m=`${f.hostname}${" ".repeat(18)}`.slice(0,Math.max(f.hostname.length,18)),g={progress:f.ramUsed/f.maxRam,totalTicks:30},y=`${m} ${Object(p.a)(g)}`;return a.createElement(l.a,{component:s.a},a.createElement(i.a,{onClick:()=>n(t=>!t)},a.createElement(o.a,{primary:a.createElement(r.a,{style:{whiteSpace:"pre-wrap"}},y)}),e?a.createElement(h.a,{color:"primary"}):a.createElement(u.a,{color:"primary"})),a.createElement(l.a,{mx:2},a.createElement(c.a,{in:e,timeout:0,unmountOnExit:!0},a.createElement(d.a,{workerScripts:t.workerScripts}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(1336),o=n(286),s=n(1476),l=n(630),c=n(9);function f(t){const[e,n]=Object(a.useState)(0),[f,u]=Object(a.useState)(c.a.ActiveScriptsScriptPageSize);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{dense:!0,disablePadding:!0},t.workerScripts.slice(e*f,e*f+f).map(t=>r.a.createElement(i.a,{key:`${t.name}_${t.args}`,workerScript:t}))),r.a.createElement(s.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:t.workerScripts.length,rowsPerPage:f,page:e,onPageChange:(t,e)=>{n(e)},onRowsPerPageChange:t=>{c.a.ActiveScriptsScriptPageSize=parseInt(t.target.value,10),u(parseInt(t.target.value,10)),n(0)},ActionsComponent:l.a}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return R}));var a=n(0),r=n(4),i=n(179),o=n(31),s=n(45),l=n(145),c=n(10),f=n(21),u=n(65),m=n(1),h=n(114),d=n(608),p=n.n(d),g=n(330),y=n(107),b=n(113),E=n(211),v=n(156),k=n.n(v),_=n(75),w=n.n(_),S=n(142),C=n(16),x=n(181),L=n(24),O=n(255),M=n(20),T=n(110);const A=Object(b.a)({noborder:{borderBottom:"none"}});function R(t){const e=A(),[n,d]=a.useState(!1),b=t.workerScript.scriptRef;const v=S.a.bind(null,b,b.server);const _=b.onlineMoneyMade/b.onlineRunningTime,R=b.onlineExpGained/b.onlineRunningTime;return a.createElement(a.Fragment,null,a.createElement(g.a,{onClick:()=>d(t=>!t),component:u.a},a.createElement(y.a,{primary:a.createElement(m.a,null,"└ ",t.workerScript.name," ",JSON.stringify(t.workerScript.args))}),n?a.createElement(k.a,{color:"primary"}):a.createElement(w.a,{color:"primary"})),a.createElement(E.a,{in:n,timeout:0,unmountOnExit:!0},a.createElement(f.a,{mx:6},a.createElement(i.a,{padding:"none",size:"small"},a.createElement(l.a,null,a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,"└ Threads:")),a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,r.a.formatThreads(t.workerScript.scriptRef.threads)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:2},a.createElement(m.a,null,"└ Args: ",Object(O.a)(t.workerScript.args)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,"└ Online Time:")),a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,Object(L.b)(1e3*b.onlineRunningTime)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,"└ Offline Time:")),a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,Object(L.b)(1e3*b.offlineRunningTime)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,"└ Total online production:")),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(m.a,null,a.createElement(M.a,{money:b.onlineMoneyMade})))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:1}),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(m.a,null," ",r.a.formatExp(b.onlineExpGained)+" hacking exp"))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,"└ Online production rate:")),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(m.a,null,a.createElement(T.a,{money:_})))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:1}),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(m.a,null," ",r.a.formatExp(R)+" hacking exp / sec"))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(m.a,null,"└ Total offline production:")),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(m.a,null,a.createElement(M.a,{money:b.offlineMoneyMade})))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:1}),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(m.a,null," ",r.a.formatExp(b.offlineExpGained)+" hacking exp"))))),a.createElement(c.a,{onClick:function(){x.b.emit(b)}},"LOG"),a.createElement(h.a,{onClick:function(){v(),Object(C.a)("Killing script")}},a.createElement(p.a,{color:"error"})))))}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(1),o=n(581),s=n(1340);function l(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"List of all recently killed scripts."),o.b.map(t=>r.a.createElement(s.a,{key:t.pid,recentScript:t})))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return L}));var a=n(0),r=n(4),i=n(179),o=n(31),s=n(45),l=n(145),c=n(21),f=n(65),u=n(1),m=n(10),h=n(330),d=n(107),p=n(113),g=n(211),y=n(156),b=n.n(y),E=n(75),v=n.n(E),k=n(24),_=n(255),w=n(20),S=n(110),C=n(181);const x=Object(p.a)({noborder:{borderBottom:"none"}});function L(t){const e=x(),[n,p]=a.useState(!1),y=t.recentScript,E=y.runningScript.onlineMoneyMade/y.runningScript.onlineRunningTime,L=y.runningScript.onlineExpGained/y.runningScript.onlineRunningTime;return a.createElement(a.Fragment,null,a.createElement(h.a,{onClick:()=>p(t=>!t),component:f.a},a.createElement(d.a,{primary:a.createElement(u.a,null,"└ ",y.filename," (died"," ",Object(k.b)((new Date).getTime()-y.timestamp.getTime())," ago)")}),n?a.createElement(b.a,{color:"primary"}):a.createElement(v.a,{color:"primary"})),a.createElement(g.a,{in:n,timeout:0,unmountOnExit:!0},a.createElement(c.a,{mx:6},a.createElement(i.a,{padding:"none",size:"small"},a.createElement(l.a,null,a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,"└ Threads:")),a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,r.a.formatThreads(y.runningScript.threads)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:2},a.createElement(u.a,null,"└ Args: ",Object(_.a)(y.args)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,"└ Online Time:")),a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,Object(k.b)(1e3*y.runningScript.onlineRunningTime)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,"└ Offline Time:")),a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,Object(k.b)(1e3*y.runningScript.offlineRunningTime)))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,"└ Total online production:")),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(u.a,null,a.createElement(w.a,{money:y.runningScript.onlineMoneyMade})))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:1}),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(u.a,null," ",r.a.formatExp(y.runningScript.onlineExpGained)+" hacking exp"))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,"└ Online production rate:")),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(u.a,null,a.createElement(S.a,{money:E})))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:1}),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(u.a,null," ",r.a.formatExp(L)+" hacking exp / sec"))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder},a.createElement(u.a,null,"└ Total offline production:")),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(u.a,null,a.createElement(w.a,{money:y.runningScript.offlineMoneyMade})))),a.createElement(s.a,null,a.createElement(o.a,{className:e.noborder,colSpan:1}),a.createElement(o.a,{className:e.noborder,align:"left"},a.createElement(u.a,null," ",r.a.formatExp(y.runningScript.offlineExpGained)+" hacking exp"))))),a.createElement(m.a,{onClick:function(){C.b.emit(y.runningScript)}},"LOG"))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return E}));var a=n(0),r=n.n(a),i=n(1342),o=n(1346),s=n(1347),l=n(429),c=n(8),f=n(6),u=n(30),m=n(1348),h=n(1),d=n(10),p=n(1349),g=n(5),y=n(252);function b({faction:t,rerender:e,onAugmentations:n}){const i=u.b.Player(),b=u.b.Router(),[E,v]=Object(a.useState)(!1),[k,_]=Object(a.useState)(!1),w=t.getInfo();function S(){i.startFocusing(),b.toWork()}const C=i.inGang()&&i.getGangName()===t.name,x=Math.floor(c.a.BaseFavorToDonate*f.a.RepToDonateToFaction),L=t.favor>=x,O=t.name===g.a.TheCovenant&&10===i.bitNodeN;let M=i.canAccessGang()&&y.a.Names.includes(t.name);return i.inGang()&&(i.getGangName()!==t.name?M=!1:i.getGangName()===t.name&&(M=!0)),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:()=>b.toFactions()},"Back"),r.a.createElement(h.a,{variant:"h4",color:"primary"},t.name),r.a.createElement(s.a,{faction:t,factionInfo:w}),M&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Manage Gang",infoText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",onClick:function(){if(i.inGang())return b.toGang();_(!0)}}),r.a.createElement(m.a,{facName:t.name,open:k,onClose:()=>_(!1)})),!C&&w.offerHackingWork&&r.a.createElement(l.a,{buttonText:"Hacking Contracts",infoText:"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.",onClick:()=>function(t){i.startFactionHackWork(t),S()}(t)}),!C&&w.offerFieldWork&&r.a.createElement(l.a,{buttonText:"Field Work",infoText:"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.",onClick:()=>function(t){i.startFactionFieldWork(t),S()}(t)}),!C&&w.offerSecurityWork&&r.a.createElement(l.a,{buttonText:"Security Work",infoText:"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.",onClick:()=>function(t){i.startFactionSecurityWork(t),S()}(t)}),!C&&w.offersWork()&&r.a.createElement(o.a,{faction:t,p:i,rerender:e,favorToDonate:x,disabled:!L}),r.a.createElement(l.a,{buttonText:"Purchase Augmentations",infoText:"As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",onClick:n}),O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:"Purchase Duplicate Sleeves and upgrades. These are permanent!",onClick:()=>v(!0)}),r.a.createElement(p.a,{open:E,onClose:()=>v(!1)})))}function E(t){const e=Object(a.useState)(!1)[1],n=u.b.Player(),o=u.b.Router(),[s,l]=Object(a.useState)(t.augPage);function c(){e(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(c,200);return()=>clearInterval(t)},[]);const f=t.faction;return n&&!n.factions.includes(f.name)?r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{variant:"h4",color:"primary"},"You have not joined ",f.name," yet!"),r.a.createElement(d.a,{onClick:()=>o.toFactions()},"Back to Factions")):s?r.a.createElement(i.a,{faction:f,routeToMainPage:()=>l(!1)}):r.a.createElement(b,{rerender:c,faction:f,onAugmentations:()=>l(!0)})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return _}));var a=n(0),r=n.n(a),i=n(1343),o=n(57),s=n(15),l=n(205),c=n(9),f=n(105),u=n(30),m=n(116),h=n(320),d=n(4),p=n(21),g=n(10),y=n(1),b=n(23),E=n(145),v=n(179),k=n(141);function _(t){const e=u.b.Player(),n=(e.inGang()&&(e.getGangName(),t.faction.name),Object(a.useState)(!1)[1]);function _(){n(t=>!t)}function w(){return Object(f.a)(e,t.faction)}function S(t){c.a.PurchaseAugmentationsOrder=t,_()}const C=function(){switch(c.a.PurchaseAugmentationsOrder){case l.b.Cost:return function(){const t=w();return t.sort((t,e)=>{const n=o.a[t],a=o.a[e];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseCost-a.baseCost}),t}();case l.b.Reputation:return function(){const t=w();return t.sort((t,e)=>{const n=o.a[t],a=o.a[e];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-a.baseRepRequirement}),t}();case l.b.Purchasable:return function(){const n=w();function a(n){const a=o.a[n],r=a.baseRepRequirement*t.faction.getInfo().augmentationRepRequirementMult,i=t.faction.playerReputation>=r,s=Object(f.c)(a);return 0!==a.baseCost&&e.money>a.baseCost*t.faction.getInfo().augmentationPriceMult&&i&&s}const r=n.filter(a).sort((t,e)=>{const n=o.a[t],a=o.a[e];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseCost-a.baseCost}),i=n.filter(t=>!a(t)).sort((t,e)=>{const n=o.a[t],a=o.a[e];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-a.baseRepRequirement});return r.concat(i)}();default:return w()}}(),x=C.filter(t=>t===s.a.NeuroFluxGovernor||!e.augmentations.some(e=>e.name===t)&&!e.queuedAugmentations.some(e=>e.name===t)),L=(n,a=!1)=>r.a.createElement(i.a,{augName:n,faction:t.faction,key:n,p:e,rerender:_,owned:a}),O=x.map(t=>L(t));let M=r.a.createElement(r.a.Fragment,null);const T=C.filter(t=>!x.includes(t));return 0!==T.length&&(M=r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(y.a,{variant:"h4"},"Purchased Augmentations"),r.a.createElement(y.a,null,"This faction also offers these augmentations but you already own them."),T.map(t=>L(t,!0)))),r.a.createElement(r.a.Fragment,null,r.a.createElement(g.a,{onClick:t.routeToMainPage},"Back"),r.a.createElement(y.a,{variant:"h4"},"Faction Augmentations"),r.a.createElement(y.a,null,"These are all of the Augmentations that are available to purchase from ",t.faction.name,". Augmentations are powerful upgrades that will enhance your abilities.",r.a.createElement("br",null),"Reputation: ",r.a.createElement(m.a,{reputation:t.faction.playerReputation})," Favor:"," ",r.a.createElement(h.a,{favor:Math.floor(t.faction.favor)})),r.a.createElement(p.a,{display:"flex"},r.a.createElement(b.a,{title:r.a.createElement(y.a,null,"The price of every Augmentation increases for every queued Augmentation and it is reset when you install them.")},r.a.createElement(y.a,null,"Price multiplier: x ",d.a.formatMultiplier(Object(k.c)())))),r.a.createElement(g.a,{onClick:()=>S(l.b.Cost)},"Sort by Cost"),r.a.createElement(g.a,{onClick:()=>S(l.b.Reputation)},"Sort by Reputation"),r.a.createElement(g.a,{onClick:()=>S(l.b.Default)},"Sort by Default Order"),r.a.createElement(g.a,{onClick:()=>S(l.b.Purchasable)},"Sort by Purchasable"),r.a.createElement("br",null),r.a.createElement(v.a,{size:"small",padding:"none"},r.a.createElement(E.a,null,O)),r.a.createElement(v.a,{size:"small",padding:"none"},r.a.createElement(E.a,null,M)))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var a=n(0),r=n.n(a),i=n(105),o=n(1344),s=n(57),l=n(15),c=n(9),f=n(20),u=n(116),m=n(1345),h=n(10),d=n(1),p=n(23),g=n(21),y=n(43),b=n(45);function E(t){const e=s.a[t.augName];return t.hasReq?r.a.createElement(r.a.Fragment,{key:"f"},r.a.createElement(y.b,{key:1},r.a.createElement(d.a,null,r.a.createElement(f.a,{money:t.cost,player:t.p}))),r.a.createElement(y.b,{key:2},r.a.createElement(d.a,{color:t.hasRep?"primary":"error"},"Requires ",r.a.createElement(u.a,{reputation:t.rep})," faction reputation"))):r.a.createElement(y.b,{key:1,colSpan:2},r.a.createElement(d.a,{color:"error"},"Requires"," ",e.prereqs.map((t,e)=>r.a.createElement(m.a,{key:e,name:t}))))}function v(t){const[e,n]=Object(a.useState)(!1),f=s.a[t.augName];if(null==f)throw new Error(`aug ${t.augName} does not exists`);if(null==f)return console.error("Invalid Augmentation when trying to create PurchaseableAugmentation display element: "+t.augName),r.a.createElement(r.a.Fragment,null);const u=f.baseCost*t.faction.getInfo().augmentationPriceMult,m=f.baseRepRequirement*t.faction.getInfo().augmentationRepRequirementMult,v=Object(i.c)(f),k=t.faction.playerReputation>=m,_=0===f.baseCost||t.p.money>f.baseCost*t.faction.getInfo().augmentationPriceMult,w=v&&k&&_?"primary":"error";let S=f.name;f.name===l.a.NeuroFluxGovernor&&(S+=" - Level "+Object(i.b)());let C=r.a.createElement(r.a.Fragment,null);return C="string"==typeof f.info?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,f.info),r.a.createElement("br",null),r.a.createElement("br",null),f.stats):r.a.createElement(r.a.Fragment,null,f.info,r.a.createElement("br",null),r.a.createElement("br",null),f.stats),r.a.createElement(b.a,null,!t.owned&&r.a.createElement(y.b,{key:0},r.a.createElement(h.a,{onClick:function(){"error"!==w&&(c.a.SuppressBuyAugmentationConfirmation?(Object(i.g)(f,t.faction),t.rerender()):n(!0))},color:w},"Buy"),r.a.createElement(o.a,{open:e,onClose:()=>n(!1),aug:f,faction:t.faction,rerender:t.rerender})),r.a.createElement(y.b,{key:1},r.a.createElement(g.a,{display:"flex"},r.a.createElement(p.a,{title:r.a.createElement(d.a,null,C),placement:"top"},r.a.createElement(d.a,null,S)))),!t.owned&&r.a.createElement(E,{key:2,augName:t.augName,p:t.p,cost:u,rep:m,hasReq:v,hasRep:k,hasCost:_}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(105),o=n(141),s=n(20),l=n(41),c=n(30),f=n(1),u=n(10);function m(t){const e=c.b.Player(),n=t.faction.getInfo();return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,{variant:"h4"},t.aug.name),r.a.createElement(f.a,null,t.aug.info,r.a.createElement("br",null),r.a.createElement("br",null),t.aug.stats,r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",t.aug.name," Augmentation for ",r.a.createElement(s.a,{money:t.aug.baseCost*n.augmentationPriceMult}),"?",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement(u.a,{autoFocus:!0,onClick:function(){!Object(o.f)(t.aug)&&e.hasAugmentation(t.aug)||(Object(i.g)(t.aug,t.faction),t.rerender(),t.onClose())}},"Purchase"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n(113),i=n(137);const o=Object(r.a)(t=>Object(i.a)({aug:{color:t.colors.combat}}));function s({name:t}){const e=o();return a.createElement("span",{className:e.aug},t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return y}));var a=n(0),r=n.n(a),i=n(8),o=n(774),s=n(320),l=n(20),c=n(116),f=n(4),u=n(16),m=n(265),h=n(1),d=n(65),p=n(10),g=n(81);function y(t){const[e,n]=Object(a.useState)(null),y=(i.a.DonateMoneyToRepDivisor+"").length-1;function b(){return null!==e&&(!(isNaN(e)||e<=0)&&!(t.p.moneyObject(c.a)({noformat:{whiteSpace:"pre-wrap",lineHeight:"1em"}}));function d(t){const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(n,200);return()=>clearInterval(t)},[]);const l=h(),c=t.faction.getFavorGain();return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{classes:{root:l.noformat}},t.factionInfo.infoText),r.a.createElement(f.a,null,"-------------------------"),r.a.createElement(m.a,{display:"flex"},r.a.createElement(u.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"You will have ",r.a.createElement(o.a,{favor:Math.floor(t.faction.favor+c)})," faction favor after installing an Augmentation."),r.a.createElement(s.a,null,"\\(\\huge{r = \\text{total faction reputation}}\\)"),r.a.createElement(s.a,null,"\\(\\huge{favor=1+\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}\\)"))},r.a.createElement(f.a,null,"Reputation: ",r.a.createElement(i.a,{reputation:t.faction.playerReputation})))),r.a.createElement(f.a,null,"-------------------------"),r.a.createElement(m.a,{display:"flex"},r.a.createElement(u.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,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."),r.a.createElement(s.a,null,"\\(\\huge{r = reputation}\\)"),r.a.createElement(s.a,null,"\\(\\huge{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}\\)"))},r.a.createElement(f.a,null,"Faction Favor: ",r.a.createElement(o.a,{favor:Math.floor(t.faction.favor)})))),r.a.createElement(f.a,null,"-------------------------"),r.a.createElement(f.a,null,"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."))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u}));var a=n(0),r=n.n(a),i=n(41),o=n(30),s=n(1),l=n(10),c=n(28),f=n(5);function u(t){const e=o.b.Player(),n=o.b.Router();function a(){return[f.a.NiteSec,f.a.TheBlackHand].includes(t.facName)}function u(){e.startGang(t.facName,a()),t.onClose(),n.toGang()}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null,"Would you like to create a new Gang with ",t.facName,"?",r.a.createElement("br",null),r.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.",r.a.createElement("br",null),r.a.createElement("br",null),a()?"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.":"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.",r.a.createElement("br",null),r.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."),r.a.createElement(l.a,{onClick:u,onKeyUp:function(t){t.key===c.a.ENTER&&u()},autoFocus:!0},"Create Gang"))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n.n(a),i=n(1350),o=n(322),s=n(484),l=n(20),c=n(41),f=n(30),u=n(16),m=n(1),h=n(10),d=n(5);function p(t){const e=f.b.Player(),[n,p]=Object(a.useState)(0);function g(){return Math.pow(10,e.sleevesFromCovenant)*s.a}function y(){p(n+1)}let b=!1;e.canAfford(g())||(b=!0),e.sleevesFromCovenant>=s.b&&(b=!0);const E=[];for(let t=0;t=s.b||(e.canAfford(g())?(e.loseMoney(g(),"sleeves"),e.sleevesFromCovenant+=1,e.sleeves.push(new o.a(e)),y()):Object(u.a)("You cannot afford to purchase a Duplicate Sleeve"))}},"Purchase - ",r.a.createElement(l.a,{money:g(),player:e}))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,null,"You can also purchase upgrades for your Sleeves. These upgrades are also permanent."),E))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(4),o=n(20),s=n(1),l=n(81),c=n(10),f=n(21),u=n(65);function m(t){const[e,n]=Object(a.useState)(1);function m(){if(isNaN(e))return 1/0;const n=100-t.sleeve.memory;return e>n?1/0:t.sleeve.getMemoryUpgradeCost(e)}const h=m(),d=!t.p.canAfford(h);let p=r.a.createElement(r.a.Fragment,null);return p=isNaN(e)?r.a.createElement(r.a.Fragment,null,"Invalid value"):r.a.createElement(r.a.Fragment,null,"Purchase ",e," memory - ",r.a.createElement(o.a,{money:h,player:t.p})),r.a.createElement(u.a,{sx:{my:1,p:1}},r.a.createElement(s.a,{variant:"h6",color:"primary"},"Upgrade Memory of Sleeve ",t.index),r.a.createElement(s.a,null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:"," ",i.a.formatSleeveMemory(t.sleeve.memory),")"),r.a.createElement(f.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(s.a,null,"Amount of memory to purchase (must be an integer): "),r.a.createElement(l.a,{onChange:function(e){let a=parseInt(e.target.value);isNaN(a)&&(a=1),a<1&&(a=1);const r=100-t.sleeve.memory;a>r&&(a=r),n(a)},type:"number",value:e})),r.a.createElement("br",null),r.a.createElement(c.a,{disabled:d,onClick:function(){const n=m();t.p.canAfford(n)&&(t.sleeve.upgradeMemory(e),t.p.loseMoney(n,"sleeves"),t.rerender())}},p))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return N}));var a=n(0),r=n.n(a),i=n(4),o=n(24),s=n(6),l=n(82),c=n(222),f=n(39),u=n(183),m=n(20),h=n(30),d=n(219),p=n(1),g=n(21),y=n(114),b=n(1352),E=n.n(b),v=n(41),k=n(145),_=n(43),w=n(45);function S(){const t=h.b.Player();return t.companyName?r.a.createElement(p.a,null,"Employer at which you last worked: ",t.companyName):r.a.createElement(r.a.Fragment,null)}function C(){const t=h.b.Player();return""!==t.companyName?r.a.createElement(p.a,null,"Job you last worked: ",t.jobs[t.companyName]):r.a.createElement(r.a.Fragment,null)}function x(){const t=h.b.Player();return t.jobs&&0!==Object.keys(t.jobs).length?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,"All Employers:"),r.a.createElement("ul",null,Object.keys(t.jobs).map(t=>r.a.createElement(p.a,{key:t}," * ",t)))):r.a.createElement(r.a.Fragment,null)}function L(){const t=h.b.Player();return 9===t.bitNodeN||l.a[9]>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,`Hacknet Servers owned: ${t.hacknetNodes.length} / ${f.b.MaxServers}`),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,"Hacknet Nodes owned: "+t.hacknetNodes.length),r.a.createElement("br",null))}function O(){const t=h.b.Player();return t.intelligence>0&&(5===t.bitNodeN||l.a[5]>0)?r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,null,"Intelligence: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,null,i.a.formatSkill(t.intelligence)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.intelligence_exp)," exp)"))):r.a.createElement(r.a.Fragment,null)}function M(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(k.a,null,t.rows.map(t=>r.a.createElement(w.a,{key:t[0]},r.a.createElement(_.b,{key:"0"},r.a.createElement(p.a,{noWrap:!0},t[0]+" multiplier:"," ")),r.a.createElement(_.b,{key:"1",align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatPercentage(t[1]))),function(t){return l.a[5]>0&&t.length>2&&t[1]!=t[2]?r.a.createElement(_.b,{key:"2",align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatPercentage(t[2]),")")):r.a.createElement(r.a.Fragment,null)}(t))))))}function T(){const t=h.b.Player();return t.canAccessBladeburner()?r.a.createElement(M,{rows:[["Bladeburner Success Chance",t.bladeburner_success_chance_mult],["Bladeburner Max Stamina",t.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",t.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",t.bladeburner_analysis_mult]]}):r.a.createElement(r.a.Fragment,null)}function A(){const t=h.b.Player();if(t.sourceFiles.length>0){const e="BitNode"+t.bitNodeN;return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h4"},"BitNode ",t.bitNodeN,": ",d.a[e].name),r.a.createElement(p.a,{sx:{mx:2},style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},d.a[e].info))}return r.a.createElement(r.a.Fragment,null)}function R({open:t,onClose:e}){const n=h.b.Player();function a(t){const e=[["Total:",r.a.createElement(m.a,{money:t.total})]];return t.augmentations&&e.push(["Augmentations:",r.a.createElement(m.a,{money:t.augmentations})]),t.bladeburner&&e.push(["Bladeburner:",r.a.createElement(m.a,{money:t.bladeburner})]),t.casino&&e.push(["Casino:",r.a.createElement(m.a,{money:t.casino})]),t.codingcontract&&e.push(["Coding Contracts:",r.a.createElement(m.a,{money:t.codingcontract})]),t.work&&e.push(["Company Work:",r.a.createElement(m.a,{money:t.work})]),t.class&&e.push(["Class:",r.a.createElement(m.a,{money:t.class})]),t.corporation&&e.push(["Corporation:",r.a.createElement(m.a,{money:t.corporation})]),t.crime&&e.push(["Crimes:",r.a.createElement(m.a,{money:t.crime})]),t.gang&&e.push(["Gang:",r.a.createElement(m.a,{money:t.gang})]),t.hacking&&e.push(["Hacking:",r.a.createElement(m.a,{money:t.hacking})]),t.hacknet&&e.push(["Hacknet Nodes:",r.a.createElement(m.a,{money:t.hacknet})]),t.hacknet_expenses&&e.push(["Hacknet Nodes Expenses:",r.a.createElement(m.a,{money:t.hacknet_expenses})]),t.hospitalization&&e.push(["Hospitalization:",r.a.createElement(m.a,{money:t.hospitalization})]),t.infiltration&&e.push(["Infiltration:",r.a.createElement(m.a,{money:t.infiltration})]),t.servers&&e.push(["Servers:",r.a.createElement(m.a,{money:t.servers})]),t.stock&&e.push(["Stock Market:",r.a.createElement(m.a,{money:t.stock})]),t.sleeves&&e.push(["Sleeves:",r.a.createElement(m.a,{money:t.sleeves})]),t.other&&e.push(["Other:",r.a.createElement(m.a,{money:t.other})]),r.a.createElement(u.a,{rows:e,wide:!0})}let i=r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h6",color:"primary"},"Money earned since you last installed Augmentations"),r.a.createElement("br",null),a(n.moneySourceA));return 0!==n.sourceFiles.length&&(i=r.a.createElement(r.a.Fragment,null,i,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h6",color:"primary"},"Money earned in this BitNode"),r.a.createElement("br",null),a(n.moneySourceB))),r.a.createElement(v.a,{open:t,onClose:e},i)}function N(){const t=h.b.Player(),[e,n]=Object(a.useState)(!1),l=Object(a.useState)(!1)[1];function f(){l(t=>!t)}Object(a.useEffect)(()=>{const t=setInterval(f,200);return()=>clearInterval(t)},[]);const d=[["Time played since last Augmentation:",Object(o.b)(t.playtimeSinceLastAug)]];return t.sourceFiles.length>0&&d.push(["Time played since last Bitnode destroyed:",Object(o.b)(t.playtimeSinceLastBitnode)]),d.push(["Total Time played:",Object(o.b)(t.totalPlaytime)]),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h4"},"General"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(p.a,null,"Current City: ",t.city),r.a.createElement(S,null),r.a.createElement(C,null),r.a.createElement(x,null),r.a.createElement(p.a,null,"Money: ",r.a.createElement(m.a,{money:t.money}),r.a.createElement(y.a,{onClick:()=>n(!0)},r.a.createElement(E.a,{color:"info"})))),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h4"},"Stats"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(k.a,null,r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Hacking: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.hacking)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.hacking_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Strength: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.strength)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.strength_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Defense: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.defense)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.defense_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Dexterity: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.dexterity)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.dexterity_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Agility: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.agility)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.agility_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Charisma: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.charisma)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.charisma_exp)," exp)"))),r.a.createElement(O,null))),r.a.createElement("br",null)),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h4"},"Multipliers"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(M,{rows:[["Hacking Chance",t.hacking_chance_mult],["Hacking Speed",t.hacking_speed_mult],["Hacking Money",t.hacking_money_mult,t.hacking_money_mult*s.a.ScriptHackMoney],["Hacking Growth",t.hacking_grow_mult,t.hacking_grow_mult*s.a.ServerGrowthRate]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Hacking Level",t.hacking_mult,t.hacking_mult*s.a.HackingLevelMultiplier],["Hacking Experience",t.hacking_exp_mult,t.hacking_exp_mult*s.a.HackExpGain]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Strength Level",t.strength_mult,t.strength_mult*s.a.StrengthLevelMultiplier],["Strength Experience",t.strength_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Defense Level",t.defense_mult,t.defense_mult*s.a.DefenseLevelMultiplier],["Defense Experience",t.defense_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Dexterity Level",t.dexterity_mult,t.dexterity_mult*s.a.DexterityLevelMultiplier],["Dexterity Experience",t.dexterity_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Agility Level",t.agility_mult,t.agility_mult*s.a.AgilityLevelMultiplier],["Agility Experience",t.agility_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Charisma Level",t.charisma_mult,t.charisma_mult*s.a.CharismaLevelMultiplier],["Charisma Experience",t.charisma_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Hacknet Node production",t.hacknet_node_money_mult,t.hacknet_node_money_mult*s.a.HacknetNodeMoney],["Hacknet Node purchase cost",t.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",t.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",t.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",t.hacknet_node_level_cost_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Company reputation gain",t.company_rep_mult],["Faction reputation gain",t.faction_rep_mult,t.faction_rep_mult*s.a.FactionWorkRepGain],["Salary",t.work_money_mult,t.work_money_mult*s.a.CompanyWorkMoney]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Crime success",t.crime_success_mult],["Crime money",t.crime_money_mult,t.crime_money_mult*s.a.CrimeMoney]]}),r.a.createElement("br",null),r.a.createElement(T,null)),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h4"},"Misc"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(p.a,null,`Servers owned: ${t.purchasedServers.length} / ${Object(c.b)()}`),r.a.createElement(L,null),r.a.createElement(p.a,null,"Augmentations installed: "+t.augmentations.length),r.a.createElement(u.a,{rows:d})),r.a.createElement("br",null),r.a.createElement(A,null),r.a.createElement(R,{open:e,onClose:()=>n(!1)}))}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(1354),o=n(1355);function s(t){const e=Object(a.useState)(!1)[1];function n(){e(t=>!t)}return Object(a.useEffect)(()=>{const t=setInterval(n,200);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{initStockMarket:t.initStockMarket,p:t.p,rerender:n}),t.p.hasWseAccount&&r.a.createElement(o.a,{buyStockLong:t.buyStockLong,buyStockShort:t.buyStockShort,cancelOrder:t.cancelOrder,eventEmitterForReset:t.eventEmitterForReset,p:t.p,placeOrder:t.placeOrder,sellStockLong:t.sellStockLong,sellStockShort:t.sellStockShort,stockMarket:t.stockMarket}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return w}));var a=n(0),r=n.n(a),i=n(227),o=n(8),s=n(20),l=n(1),c=n(120),f=n(10),u=n(23),m=n(114),h=n(294),d=n.n(h),p=n(321),g=n.n(p),y=n(453),b=n(5);function E(t){if(t.p.has4SDataTixApi)return r.a.createElement(l.a,null,"Market Data TIX API Access ",r.a.createElement(g.a,null));{const e=Object(i.b)();return r.a.createElement(u.a,{title:t.p.hasTixApiAccess?r.a.createElement(l.a,null,"Let you access 4S Market Data through Netscript"):r.a.createElement(l.a,null,"Requires TIX API Access")},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!t.p.hasTixApiAccess||!t.p.canAfford(e),onClick:function(){t.p.has4SDataTixApi||t.p.canAfford(Object(i.b)())&&(t.p.has4SDataTixApi=!0,t.p.loseMoney(Object(i.b)(),"stock"),t.rerender())}},"Buy 4S Market Data TIX API Access - ",r.a.createElement(s.a,{money:e,player:t.p}))))}}function v(t){if(t.p.hasWseAccount)return r.a.createElement(l.a,null,"WSE Account ",r.a.createElement(g.a,null));const e=o.a.WSEAccountCost;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"To begin trading, you must first purchase an account:"),r.a.createElement(f.a,{disabled:!t.p.canAfford(e),onClick:function(){t.p.hasWseAccount||t.p.canAfford(o.a.WSEAccountCost)&&(t.p.hasWseAccount=!0,t.initStockMarket(),t.p.loseMoney(o.a.WSEAccountCost,"stock"),t.rerender())}},"Buy WSE Account - ",r.a.createElement(s.a,{money:e,player:t.p})))}function k(t){if(t.p.hasTixApiAccess)return r.a.createElement(l.a,null,"TIX API Access ",r.a.createElement(g.a,null));{const e=o.a.TIXAPICost;return r.a.createElement(f.a,{disabled:!t.p.canAfford(e)||!t.p.hasWseAccount,onClick:function(){t.p.hasTixApiAccess||t.p.canAfford(o.a.TIXAPICost)&&(t.p.hasTixApiAccess=!0,t.p.loseMoney(o.a.TIXAPICost,"stock"),t.rerender())}},"Buy Trade Information eXchange (TIX) API Access - ",r.a.createElement(s.a,{money:e,player:t.p}))}}function _(t){if(t.p.has4SData)return r.a.createElement(l.a,null,"4S Market Data Access ",r.a.createElement(g.a,null));{const e=Object(i.a)();return r.a.createElement(u.a,{title:r.a.createElement(l.a,null,"Lets you view additional pricing and volatility information about stocks")},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!t.p.canAfford(e)||!t.p.hasWseAccount,onClick:function(){t.p.has4SData||t.p.canAfford(Object(i.a)())&&(t.p.has4SData=!0,t.p.loseMoney(Object(i.a)(),"stock"),t.rerender())}},"Buy 4S Market Data Access - ",r.a.createElement(s.a,{money:e,player:t.p}))))}}function w(t){const[e,n]=Object(a.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Welcome to the World Stock Exchange (WSE)!"),r.a.createElement(c.a,{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},r.a.createElement(l.a,null,"Investopedia")),r.a.createElement("br",null),r.a.createElement(v,t),r.a.createElement(l.a,{variant:"h5",color:"primary"},"Trade Information eXchange (TIX) API"),r.a.createElement(l.a,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."),r.a.createElement(k,t),r.a.createElement(l.a,{variant:"h5",color:"primary"},b.a.FourSigma," (4S) Market Data Feed"),r.a.createElement(l.a,null,b.a.FourSigma,"'s (4S) Market Data Feed provides information about stocks that will help your trading strategies.",r.a.createElement(m.a,{onClick:()=>n(!0)},r.a.createElement(d.a,null))),r.a.createElement(E,t),r.a.createElement(_,t),r.a.createElement(l.a,null,"Commission Fees: Every transaction you make has a"," ",r.a.createElement(s.a,{money:o.a.StockMarketCommission,player:t.p})," commission fee."),r.a.createElement("br",null),r.a.createElement(l.a,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!"),r.a.createElement(y.a,{open:e,onClose:()=>n(!1)},r.a.createElement(l.a,null,"Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"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.")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(1356),o=n(430),s=n(148);function l(t){const e=Object(a.useState)(!1)[1],[n,l]=Object(a.useState)(o.b.AllStocks),[c,f]=Object(a.useState)([]);function u(){e(t=>!t)}const m=[];for(const e of Object.keys(t.stockMarket)){const a=t.stockMarket[e];if(a instanceof s.a){if(c.length>0&&!c.includes(a.symbol))continue;let e=t.stockMarket.Orders[a.symbol];if(null==e&&(e=[]),n===o.b.Portfolio&&0===a.playerShares&&0===a.playerShortShares&&0===e.length)continue;m.push(r.a.createElement(i.a,{buyStockLong:t.buyStockLong,buyStockShort:t.buyStockShort,cancelOrder:t.cancelOrder,key:a.symbol,orders:e,p:t.p,placeOrder:t.placeOrder,rerenderAllTickers:u,sellStockLong:t.sellStockLong,sellStockShort:t.sellStockShort,stock:a}))}}return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{changeDisplayMode:function(){n===o.b.AllStocks?l(o.b.Portfolio):l(o.b.AllStocks)},changeWatchlistFilter:function(t){const e=t.target.value.replace(/\s/g,"");f(""!==e?e.split(","):[])},tickerDisplayMode:n}),m)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return T}));var a,r=n(0),i=n.n(r),o=n(1357),s=n(1358),l=n(1360),c=n(533),f=n(1361),u=n(226),m=n(112),h=n(76),d=n(82),p=n(4),g=n(20),y=n(16),b=n(21),E=n(81),v=n(79),k=n(128),_=n(330),w=n(107),S=n(65),C=n(211),x=n(75),L=n.n(x),O=n(156),M=n.n(O);function T(t){const[e,n]=Object(r.useState)(a.Market),[x,O]=Object(r.useState)(h.a.Long),[T,A]=Object(r.useState)(""),[R,N]=Object(r.useState)(!1),[P,I]=Object(r.useState)(!1),[F,D]=Object(r.useState)({text:"",placeText:"",place:()=>!1});function j(){return Math.round(parseFloat(T))}function B(){return 8===t.p.bitNodeN||d.a[8]>=3}return i.a.createElement(b.a,{component:S.a},i.a.createElement(_.a,{onClick:()=>I(t=>!t)},i.a.createElement(w.a,{primary:i.a.createElement(o.a,{p:t.p,stock:t.stock})}),P?i.a.createElement(M.a,{color:"primary"}):i.a.createElement(L.a,{color:"primary"})),i.a.createElement(C.a,{in:P,unmountOnExit:!0},i.a.createElement(b.a,{sx:{mx:4}},i.a.createElement(b.a,{display:"flex",alignItems:"center"},i.a.createElement(E.a,{onChange:function(t){A(t.target.value)},placeholder:"Quantity (Shares)",value:T}),i.a.createElement(k.a,{onChange:function(t){t.target.value===h.a.Short?O(h.a.Short):O(h.a.Long)},value:x},i.a.createElement(v.a,{value:h.a.Long},"Long"),(8===t.p.bitNodeN||d.a[8]>=2)&&i.a.createElement(v.a,{value:h.a.Short},"Short")),i.a.createElement(k.a,{onChange:function(t){switch(t.target.value){case a.Limit:n(a.Limit);break;case a.Stop:n(a.Stop);break;case a.Market:default:n(a.Market)}},value:e},i.a.createElement(v.a,{value:a.Market},a.Market),B()&&i.a.createElement(v.a,{value:a.Limit},a.Limit),B()&&i.a.createElement(v.a,{value:a.Stop},a.Stop)),i.a.createElement(c.a,{onClick:function(){const n=j();if(isNaN(n))Object(y.a)("Invalid input for quantity (number of shares): "+T);else switch(e){case a.Market:x===h.a.Short?t.buyStockShort(t.stock,n):t.buyStockLong(t.stock,n),t.rerenderAllTickers();break;case a.Limit:N(!0),D({text:"Enter the price for your Limit Order",placeText:"Place Buy Limit Order",place:e=>t.placeOrder(t.stock,n,e,m.a.LimitBuy,x)});break;case a.Stop:N(!0),D({text:"Enter the price for your Stop Order",placeText:"Place Buy Stop Order",place:e=>t.placeOrder(t.stock,n,e,m.a.StopBuy,x)})}},text:"Buy",tooltip:function(){const e=t.stock,n=j();if(isNaN(n))return null;const a=Object(u.b)(e,n,x);return null==a?null:i.a.createElement(i.a.Fragment,null,"Purchasing ",p.a.formatShares(n)," shares (",x===h.a.Long?"Long":"Short",") will cost ",i.a.createElement(g.a,{money:a}),".")}()}),i.a.createElement(c.a,{onClick:function(){const n=j();if(isNaN(n))Object(y.a)("Invalid input for quantity (number of shares): "+T);else switch(e){case a.Market:x===h.a.Short?t.sellStockShort(t.stock,n):t.sellStockLong(t.stock,n),t.rerenderAllTickers();break;case a.Limit:N(!0),D({text:"Enter the price for your Limit Order",placeText:"Place Sell Limit Order",place:e=>t.placeOrder(t.stock,n,e,m.a.LimitSell,x)});break;case a.Stop:N(!0),D({text:"Enter the price for your Stop Order",placeText:"Place Sell Stop Order",place:e=>t.placeOrder(t.stock,n,e,m.a.StopSell,x)})}},text:"Sell",tooltip:function(){const e=t.stock,n=j();if(isNaN(n))return null;if(x===h.a.Long){if(n>e.playerShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Long position")}else if(n>e.playerShortShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Short position");const a=Object(u.c)(e,n,x);return null==a?null:i.a.createElement(i.a.Fragment,null,"Selling ",p.a.formatShares(n)," shares (",x===h.a.Long?"Long":"Short",") will result in a gain of ",i.a.createElement(g.a,{money:a}),".")}()}),i.a.createElement(c.a,{onClick:function(){const n=t.p.money,r=t.stock;let i=Object(u.a)(r,x,n);switch(i=Math.min(i,Math.round(r.maxShares-r.playerShares-r.playerShortShares)),e){case a.Market:x===h.a.Short?t.buyStockShort(r,i):t.buyStockLong(r,i),t.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Buy Max' only works for Market Orders")}},text:"Buy MAX"}),i.a.createElement(c.a,{onClick:function(){const n=t.stock;switch(e){case a.Market:x===h.a.Short?t.sellStockShort(n,n.playerShortShares):t.sellStockLong(n,n.playerShares),t.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Sell All' only works for Market Orders")}},text:"Sell ALL"})),i.a.createElement(l.a,{p:t.p,stock:t.stock}),i.a.createElement(s.a,{cancelOrder:t.cancelOrder,orders:t.orders,p:t.p,stock:t.stock}),i.a.createElement(f.a,{text:F.text,placeText:F.placeText,place:F.place,open:R,onClose:()=>N(!1)}))))}!function(t){t.Market="Market Order",t.Limit="Limit Order",t.Stop="Stop Order"}(a||(a={}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n(775),i=n(9),o=n(4),s=n(1);const l=["cs","lv","pl","ru"];function c(t){const e=t.stock,n=o.a.formatMoney(e.price),c=l.includes(i.a.Locale)?15:12,f=" ".repeat(1+r.a.longestName-e.name.length+(r.a.longestSymbol-e.symbol.length)),u=" ".repeat(c-n.length);let m=`${e.name}${f}${e.symbol} -${u}${n}`;if(t.p.has4SData){m+=` - Volatility: ${o.a.formatPercentage(e.mv/100)} - Price Forecast: `;let t=e.b;e.otlkMag<0&&(t=!t),m+=(t?"+":"-").repeat(Math.floor(Math.abs(e.otlkMag)/10)+1)}let h="primary";return e.lastPrice===e.price?h="secondary":e.lastPrice>e.price&&(h="error"),a.createElement(s.a,{style:{whiteSpace:"pre"},color:h},m)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(0),r=n(1359);function i(t){const e=[];for(let n=0;n=2?a.createElement(a.Fragment,null,a.createElement(c.a,{display:"flex"},a.createElement(l.a,{title:a.createElement(s.a,null,"Shares in the short position will increase in value if the price of the corresponding stock decreases")},a.createElement(s.a,{variant:"h5",color:"primary"},"Short Position:"))),a.createElement(s.a,null,"Shares: ",r.a.formatShares(e.playerShortShares)),a.createElement(s.a,null,"Average Price: ",a.createElement(i.a,{money:e.playerAvgShortPx})," (Total Cost: ",a.createElement(i.a,{money:n}),")"),a.createElement(s.a,null,"Profit: ",a.createElement(i.a,{money:f})," (",r.a.formatPercentage(u),")")):a.createElement(a.Fragment,null)}function m(t){const e=t.stock;return a.createElement(a.Fragment,null,a.createElement(s.a,null,"Max Shares: ",r.a.formatShares(e.maxShares)),a.createElement(s.a,null,"Ask Price: ",a.createElement(i.a,{money:e.getAskPrice()})),a.createElement("br",null),a.createElement(s.a,null,"Bid Price: ",a.createElement(i.a,{money:e.getBidPrice()})),a.createElement(f,t),a.createElement(u,t))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(41),o=n(1),s=n(81),l=n(10);function c(t){const[e,n]=Object(a.useState)(null);return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(o.a,null,t.text),r.a.createElement(s.a,{autoFocus:!0,type:"number",onChange:function(t){""===t.target.value?n(null):n(parseFloat(t.target.value))},placeholder:"price",InputProps:{endAdornment:r.a.createElement(l.a,{onClick:function(){null!==e&&(isNaN(e)||(t.place(e),t.onClose()))}},t.placeText)}}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var a=n(0),r=n.n(a),i=n(82),o=n(219),s=n(299),l=n(1363),c=n(470),f=n(30),u=n(113),m=n(137),h=n(114),d=n(1),p=n(23),g=n(9),y=n(10);const b=Object(u.a)(()=>Object(m.a)({portal:{cursor:"pointer",fontFamily:"inherit",fontSize:"1rem",fontWeight:"bold",lineHeight:1,padding:0,"&:hover":{color:"#fff"}},level0:{color:"red"},level1:{color:"yellow"},level2:{color:"#48d1cc"},level3:{color:"blue"}}));function E(t){const[e,n]=Object(a.useState)(!1),i=b(),s=o.a["BitNode"+t.n];if(null==s)return r.a.createElement(r.a.Fragment,null,"O");let c=i.level0;return 12===t.n&&t.level>=2?c=i.level2:1===t.level?c=i.level1:3===t.level&&(c=i.level3),2===t.level&&(c=i.level2),c=`${i.portal} ${c}`,r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{title:r.a.createElement(d.a,null,r.a.createElement("strong",null,"BitNode-",s.number.toString(),": ",s.name),r.a.createElement("br",null),s.desc)},g.a.DisableASCIIArt?r.a.createElement(y.a,{onClick:()=>n(!0),sx:{m:2},"aria-description":s.desc},r.a.createElement(d.a,null,"BitNode-",s.number.toString(),": ",s.name)):r.a.createElement(h.a,{onClick:()=>n(!0),className:c,"aria-label":`BitNode-${s.number.toString()}: ${s.name}`,"aria-description":s.desc},"O")),r.a.createElement(l.a,{open:e,onClose:()=>n(!1),n:t.n,level:t.level,enter:t.enter,destroyedBitNode:t.destroyedBitNode,flume:t.flume}),g.a.DisableASCIIArt&&r.a.createElement("br",null))}function v(t){Object(s.c)(!0);const e=f.b.Player(),n=s.a,l=e.bitNodeN,[u,m]=Object(a.useState)(!t.quick),h=i.a.slice();return t.flume||h[l]<3&&++h[l],u?r.a.createElement(c.a,{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-${l}...`,"...........","...........","[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE","..............................................","..............................................","..............................................","..............................................","..............................................",".............................................."],onDone:()=>m(!1),auto:!0}):g.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(o.a).filter(t=>(console.log(t.desc),"COMING SOON"!==t.desc)).map(e=>r.a.createElement(E,{key:e.number,n:e.number,level:h[e.number],enter:n,flume:t.flume,destroyedBitNode:l})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestrial 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)"]})):r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | O O | O O | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | / __| \\ | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | O | | O / | O | | O | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| O | |_/ |\\| \\ ",r.a.createElement(E,{n:13,level:h[13],enter:n,flume:t.flume,destroyedBitNode:l})," \\__| \\_| | O |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | |_/ | | \\| / | \\_| | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| / \\| | / / \\ |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ",r.a.createElement(E,{n:10,level:h[10],enter:n,flume:t.flume,destroyedBitNode:l})," | | / | ",r.a.createElement(E,{n:11,level:h[11],enter:n,flume:t.flume,destroyedBitNode:l})," | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(E,{n:9,level:h[9],enter:n,flume:t.flume,destroyedBitNode:l})," | | | | | | | ",r.a.createElement(E,{n:12,level:h[12],enter:n,flume:t.flume,destroyedBitNode:l})," "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | / / \\ \\ | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| | / ",r.a.createElement(E,{n:7,level:h[7],enter:n,flume:t.flume,destroyedBitNode:l})," / \\ ",r.a.createElement(E,{n:8,level:h[8],enter:n,flume:t.flume,destroyedBitNode:l})," \\ | |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ | / / | | \\ \\ | / "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\JUMP ",r.a.createElement(E,{n:5,level:h[5],enter:n,flume:t.flume,destroyedBitNode:l}),"3R | | | | | | R3",r.a.createElement(E,{n:6,level:h[6],enter:n,flume:t.flume,destroyedBitNode:l})," PMUJ/ / "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\|| | | | | | | | | ||/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| \\_ | | | | | | _/ |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\| / \\ / \\ |/ / "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(E,{n:1,level:h[1],enter:n,flume:t.flume,destroyedBitNode:l})," |/ ",r.a.createElement(E,{n:2,level:h[2],enter:n,flume:t.flume,destroyedBitNode:l})," | | ",r.a.createElement(E,{n:3,level:h[3],enter:n,flume:t.flume,destroyedBitNode:l})," \\| ",r.a.createElement(E,{n:4,level:h[4],enter:n,flume:t.flume,destroyedBitNode:l})," "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ "),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestrial 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)"]}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(219),o=n(30),s=n(41),l=n(1),c=n(10);function f(t){const e=o.b.Router(),n="BitNode"+t.n,a=i.a[n];if(null==a)throw new Error("Could not find BitNode object for number: "+t.n);const f=12===t.n?"∞":"3",u=Math.min(t.level+1,12===t.n?1/0:3);return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,{variant:"h4"},"BitNode-",t.n,": ",a.name),r.a.createElement("br",null),r.a.createElement(l.a,null,"Source-File Level: ",t.level," / ",f),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null," Difficulty: ",["easy","normal","hard"][a.difficulty]),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null,a.info),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{"aria-label":"enter-bitnode-"+a.number.toString(),autoFocus:!0,onClick:()=>{t.enter(e,t.flume,t.destroyedBitNode,t.n),t.onClose()}},"Enter BN",t.n,".",u))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(0),r=n.n(a),i=n(1);function o(t){const[e,n]=Object(a.useState)(0),[o,s]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{if(o&&t.onDone)return void t.onDone();let a=!1;return(async()=>{var r;await(r=10,new Promise(t=>setTimeout(t,r))).then(()=>!a&&function(){const a=e+1;n(a),s(a>=t.text.length)}())})(),()=>{a=!0}}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,t.text.slice(0,e),!o&&r.a.createElement("span",null,"█")))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(0),r=n.n(a),i=n(24),o=n(8),s=n(586),l=n(1366),c=n(1);function f({staneksGift:t}){const e=Object(a.useState)(!0)[1];function n(){e(t=>!t)}return Object(a.useEffect)(()=>s.a.subscribe(n),[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},"Stanek's Gift"),r.a.createElement(c.a,null,"The gift is a grid on which you can place upgrades called fragments. The main type of fragment increases a stat, like your hacking skill or agility exp. Once a stat fragment is placed it then needs to be charged via scripts in order to become useful. The other kind of fragments are called booster fragments. They increase the efficiency of the neighboring fragments (not diagonally). Use Q/E to rotate fragments."),t.storedCycles>5&&r.a.createElement(c.a,null,"Bonus time: ",Object(i.b)(o.a._idleSpeed*t.storedCycles)),r.a.createElement(l.a,{gift:t}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return p}));var a=n(0),r=n(243),i=n(78),o=n(631),s=n(1367),l=n(1368),c=n(21),f=n(10),u=n(45),m=n(145),h=n(43);function d(t){const e=[];for(let n=0;nr.length-1||n+t>r[e+i].length-1||(r[e+i][n+t]=1));y(r)}function C(n,a){if(_.type!=i.b.None){if(_.type==i.b.Delete)!function(e,n){const a=t.gift.fragmentAt(e,n);void 0!==a&&t.gift.delete(a.x,a.y)}(n,a);else{if(!t.gift.canPlace(n,a,v,_))return;t.gift.place(n,a,v,_)}p(e(t.gift))}}function x(e,a){if(g[e][a]&&n[e][a])return"red";if(g[e][a])return"white";if(n[e][a]){const n=t.gift.fragmentAt(e,a);if(!n)throw new Error("ActiveFragment should not be null");return function(t){let e=Math.pow((t.x+1)*(t.y+1),10),n=e,a=e;const r=[];for(let t=0;t<3;t++)e=171*e%30269,n=172*n%30307,a=170*a%30323,r.push((e/30269+n/30307+a/30323)%1);return`rgb(${256*r[0]}, ${256*r[1]}, ${256*r[2]})`}(n)}return""}const L=[];for(let e=0;eS(r,e,v),onClick:()=>C(r,e),color:x(r,e)}));L.push(a.createElement(u.a,{key:e,className:"staneksgift_row"},n))}return a.useEffect(()=>{function t(t){if("q"===t.key){const t=(v-1+4)%4;k(t),S(b[0],b[1],t)}if("e"===t.key){const t=(v+1)%4;k(t),S(b[0],b[1],t)}}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)}),a.createElement(a.Fragment,null,a.createElement(f.a,{onClick:function(){t.gift.clear(),p(d([t.gift.width(),t.gift.height()]))}},"Clear"),a.createElement(c.a,{display:"flex"},a.createElement(h.a,null,a.createElement(m.a,null,L)),a.createElement(s.a,{gift:t.gift,x:b[0],y:b[1],fragment:t.gift.fragmentAt(b[0],b[1])})),a.createElement(l.a,{gift:t.gift,selectFragment:function(e){w(e);const n=d([t.gift.width(),t.gift.height()]);y(n)}}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return c}));var a=n(0),r=n.n(a),i=n(78),o=n(4),s=n(65),l=n(1);function c(t){const[,e]=Object(a.useState)(new Date);if(Object(a.useEffect)(()=>{const t=setInterval(()=>e(new Date),250);return()=>clearInterval(t)},[]),void 0===t.fragment)return r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"Magnitude: N/A",r.a.createElement("br",null),"Charge: N/A",r.a.createElement("br",null),"Heat: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"[X, Y] N/A",r.a.createElement("br",null),"[X, Y] ",t.x,", ",t.y));const n=t.fragment.fragment();let c=`${o.a.formatStaneksGiftCharge(t.fragment.avgCharge)} avg. * ${t.fragment.numCharge} times`,f="N/A";return[i.b.Booster,i.b.None,i.b.Delete].includes(n.type)?(c="N/A",f=n.power+"x adjacent fragment power"):f=Object(i.a)(n.type).replace(/-*x%/,o.a.formatPercentage(t.gift.effect(t.fragment)-1)),r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: ",t.fragment.id,r.a.createElement("br",null),"Effect: ",f,r.a.createElement("br",null),"Base Power: ",o.a.formatStaneksGiftPower(n.power),r.a.createElement("br",null),"Charge: ",c,r.a.createElement("br",null),r.a.createElement("br",null),"root [X, Y] ",t.fragment.x,", ",t.fragment.y,r.a.createElement("br",null),"[X, Y] ",t.x,", ",t.y))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(243),o=n(78),s=n(1369),l=n(4),c=n(128),f=n(79),u=n(1),m=n(21);function h(t){const e=t.fragment.limit-t.gift.count(t.fragment),n=t.fragment.limit!==1/0?r.a.createElement(r.a.Fragment,null,e," remaining"):r.a.createElement(r.a.Fragment,null);return r.a.createElement(m.a,{display:"flex"},r.a.createElement(m.a,{sx:{mx:2}},r.a.createElement(s.a,{width:t.fragment.width(0),height:t.fragment.height(0),colorAt:(n,a)=>t.fragment.fullAt(n,a,0)?0===e?"grey":t.fragment.type===o.b.Booster?"blue":"green":""})),r.a.createElement(u.a,null,t.fragment.type===o.b.Booster?t.fragment.power+"x adjacent fragment power":Object(o.a)(t.fragment.type),r.a.createElement("br",null),"power: ",l.a.formatStaneksGiftPower(t.fragment.power),r.a.createElement("br",null),n))}function d(t){const[e,n]=Object(a.useState)("None");return r.a.createElement(c.a,{sx:{width:"100%"},onChange:function(e){const a=e.target.value;if(n(a),"None"===a)return void t.selectFragment(i.d);if("Delete"===a)return void t.selectFragment(i.a);const r=i.c.find(t=>t.id===a);if(void 0===r)throw new Error("Fragment selector selected an undefined fragment with id "+a);"number"==typeof a&&t.selectFragment(r)},value:e},r.a.createElement(f.a,{value:"None"},r.a.createElement(u.a,null,"None")),r.a.createElement(f.a,{value:"Delete"},r.a.createElement(u.a,null,"Delete")),i.c.map(e=>r.a.createElement(f.a,{key:e.id,value:e.id},r.a.createElement(h,{key:e.id,gift:t.gift,selectFragment:t.selectFragment,fragment:e}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n(631),i=n(45),o=n(145),s=n(43);function l(t){const e=[];for(let n=0;n{t.toTerminal(),Object(l.a)(`Visit the National Security Agency (NSA) to apply for their ${i.a.Bladeburners} division! You will need 100 of each combat stat before doing this.`)}})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l}));var a=n(0),r=n.n(a),i=n(30),o=n(106);const s=window.getComputedStyle;function l(){const t=i.b.Player();return r.a.createElement("div",{id:"unclickable",onClick:function(e){if(!(e.target&&e.target instanceof Element))return;const n=s(e.target).display,a=s(e.target).visibility;"none"===n&&"hidden"===a&&e.isTrusted&&t.giveExploit(o.a.Unclickable)},style:{display:"none",visibility:"hidden"}},"Click on this to upgrade your Source-File -1!")}},,function(t,e,n){"use strict";n.d(e,"a",(function(){return m}));var a=n(0),r=n.n(a),i=n(113),o=n(137),s=n(1374),l=n(295),c=n(1),f=n(2);const u=Object(i.a)(t=>Object(o.a)({root:{width:50,padding:t.spacing(2),userSelect:"none"}}));function m(){const t=u();return r.a.createElement("div",{className:t.root,style:{width:"90%"}},r.a.createElement(c.a,{variant:"h4"},"Achievements"),r.a.createElement(s.a,{achievements:Object.values(l.a),playerAchievements:f.a.achievements}))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return d}));var a=n(0),r=n.n(a),i=n(21),o=n(153),s=n(154),l=n(1),c=n(155),f=n(776),u=n(9),m=n(777),h=n(456);function d({achievements:t,playerAchievements:e}){const n=Object(m.a)(u.a.theme.primary),a=Object(m.a)(u.a.theme.secondary),d=t.map(t=>{var n;return{achievement:t,unlockedOn:null===(n=e.find(e=>e.ID===t.ID))||void 0===n?void 0:n.unlockedOn}}).sort((t,e)=>{var n,a;return(null!==(n=e.unlockedOn)&&void 0!==n?n:0)-(null!==(a=t.unlockedOn)&&void 0!==a?a:0)}),p=d.filter(t=>t.unlockedOn),g=d.filter(t=>!t.unlockedOn&&t.achievement.Secret),y=d.filter(t=>!t.unlockedOn&&!t.achievement.Secret&&t.achievement.Visible&&!t.achievement.Visible()),b=d.filter(t=>!p.map(t=>t.achievement.ID).includes(t.achievement.ID)).filter(t=>!g.map(t=>t.achievement.ID).includes(t.achievement.ID)).filter(t=>!y.map(t=>t.achievement.ID).includes(t.achievement.ID));return r.a.createElement(i.a,{sx:{pr:18,my:2}},r.a.createElement(i.a,{sx:{display:"flex",flexDirection:"column",flexWrap:"wrap"}},p.length>0&&r.a.createElement(o.a,{defaultExpanded:!0,disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",sx:{my:1}},"Acquired (",p.length,"/",d.length,")")),r.a.createElement(c.a,{sx:{pt:2}},p.map(t=>r.a.createElement(f.a,{key:"unlocked_"+t.achievement.ID,achievement:t.achievement,unlockedOn:t.unlockedOn,cssFiltersUnlocked:n,cssFiltersLocked:a})))),b.length>0&&r.a.createElement(o.a,{disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",color:"secondary"},"Locked (",b.length," remaining)")),r.a.createElement(c.a,{sx:{pt:2}},b.map(t=>r.a.createElement(f.a,{key:"locked_"+t.achievement.ID,achievement:t.achievement,cssFiltersUnlocked:n,cssFiltersLocked:a})))),y.length>0&&r.a.createElement(o.a,{disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",color:"secondary"},"Unavailable (",y.length," remaining)")),r.a.createElement(c.a,null,r.a.createElement(l.a,{sx:{mt:1}},y.length," additional achievements hidden behind content you don't have access to."))),g.length>0&&r.a.createElement(o.a,{disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",color:"secondary"},"Secret (",g.length," remaining)")),r.a.createElement(c.a,null,r.a.createElement(l.a,{color:"secondary",sx:{mt:1}},g.map(t=>r.a.createElement("span",{key:"secret_"+t.achievement.ID},r.a.createElement(h.a,{content:t.achievement.ID}),r.a.createElement("br",null))))))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(21),o=n(9);function s({achievement:t,unlocked:e,colorFilters:n,size:s}){const[l,c]=Object(a.useState)(!1),f=e?o.a.theme.primarydark:o.a.theme.secondarydark;return t.Icon?r.a.createElement(i.a,{sx:{border:"1px solid "+f,width:s,height:s,m:1,visibility:l?"visible":"hidden"}},r.a.createElement("img",{src:`dist/icons/achievements/${encodeURI(t.Icon)}.svg`,style:{filter:n,width:s,height:s},onLoad:()=>c(!0),alt:t.Name})):r.a.createElement(r.a.Fragment,null)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(521),o=n(408);class s extends r.a.Component{constructor(t){super(t),this.state={hasError:!1}}reset(){this.setState({hasError:!1})}componentDidCatch(t,e){this.setState({errorInfo:e,page:this.props.router.page()}),console.error(t,e)}render(){if(this.state.hasError){let t;if(this.state.error)try{t=Object(i.a)(this.state.error,this.state.errorInfo,this.state.page)}catch(t){console.error(t)}return r.a.createElement(o.c,{router:this.props.router,softReset:this.props.softReset,errorData:t,resetError:()=>this.reset()})}return this.props.children}static getDerivedStateFromError(t){return{hasError:!0,error:t}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return v}));var a=n(0),r=n.n(a),i=n(1),o=n(65),s=n(167),l=n(9),c=n(336),f=n(10),u=n(21),m=n(350),h=n(610),d=n(620),p=n(1378),g=n(618),y=n(41),b=n(140);let E=0;function v({router:t}){const[e,n]=Object(a.useState)(!1),[v,k]=Object(a.useState)(),_=Object(c.b)(),w=_&&Object.entries(_).map(([t,e])=>r.a.createElement(p.a,{key:t,theme:e,onActivated:()=>function(t){E=window.scrollY;const e={...l.a.theme};Object.assign(l.a.theme,t.colors),s.b.emit(),b.b.emit(r.a.createElement(r.a.Fragment,null,'Updated theme to "',r.a.createElement("strong",null,t.name),'"',r.a.createElement(f.a,{sx:{ml:1},color:"secondary",size:"small",onClick:()=>{Object.assign(l.a.theme,e),s.b.emit()}},"UNDO")),"info",3e4)}(e),onImageClick:S}))||r.a.createElement(r.a.Fragment,null);function S(t){E=window.scrollY,k(t),n(!0)}return Object(a.useEffect)(()=>{requestAnimationFrame(()=>window.scrollTo(0,E))}),r.a.createElement(u.a,{sx:{mx:2}},r.a.createElement(i.a,{variant:"h4"},"Theme Browser"),r.a.createElement(o.a,{sx:{px:2,py:1,my:1}},r.a.createElement(g.a,null),r.a.createElement(m.a,{sx:{mb:2,display:"block"}},r.a.createElement(h.a,{router:t}),r.a.createElement(d.a,null)),r.a.createElement(u.a,{sx:{display:"flex",flexWrap:"wrap"}},w),r.a.createElement(y.a,{open:e,onClose:function(){E=window.scrollY,n(!1)}},r.a.createElement("img",{src:v,style:{width:"100%"}}))))}},function(t,e,n){"use strict";n.d(e,"a",(function(){return g}));var a=n(0),r=n.n(a),i=n(1),o=n(23),s=n(619),l=n.n(s),c=n(9),f=n(1791),u=n(1792),m=n(10),h=n(120),d=n(1793),p=n(1794);function g({theme:t,onActivated:e,onImageClick:n}){return t?r.a.createElement(f.a,{key:t.screenshot,sx:{width:400,mr:1,mb:1}},r.a.createElement(u.a,{action:r.a.createElement(o.a,{title:"Use this theme"},r.a.createElement(m.a,{startIcon:r.a.createElement(l.a,null),onClick:e,variant:"outlined"},"Use")),title:t.name,subheader:r.a.createElement(r.a.Fragment,null,"by ",t.credit," ",t.reference&&r.a.createElement(r.a.Fragment,null,"(",r.a.createElement(h.a,{href:t.reference,target:"_blank"},"ref"),")")),sx:{color:c.a.theme.primary,"& .MuiCardHeader-subheader":{color:c.a.theme.secondarydark},"& .MuiButton-outlined":{backgroundColor:"transparent"}}}),r.a.createElement(d.a,{component:"img",width:"400",image:t.screenshot,alt:`Theme Screenshot of "${t.name}"`,sx:{borderTop:"1px solid "+c.a.theme.welllight,borderBottom:"1px solid "+c.a.theme.welllight,cursor:"zoom-in"},onClick:()=>n(t.screenshot)}),r.a.createElement(p.a,null,r.a.createElement(i.a,{variant:"body2",color:"text.secondary",sx:{color:c.a.theme.primarydark}},t.description))):r.a.createElement(r.a.Fragment,null)}},,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return j}));var a=n(0),r=n.n(a),i=n(23),o=n(21),s=n(1),l=n(1458),c=n(65),f=n(179),u=n(1459),m=n(45),h=n(31),d=n(145),p=n(350),g=n(10),y=n(113),b=n(137),E=n(1383),v=n.n(E),k=n(1384),_=n.n(k),w=n(632),S=n.n(w),C=n(1386),x=n.n(C),L=n(1385),O=n.n(L),M=n(108),T=n(9),A=n(24),R=n(4),N=n(250),P=n(293);const I=Object(y.a)(t=>Object(b.a)({root:{padding:t.spacing(2),maxWidth:"1000px","& .MuiTable-root":{"& .MuiTableCell-root":{borderBottom:"1px solid "+T.a.theme.welllight},"& .MuiTableHead-root .MuiTableRow-root":{backgroundColor:T.a.theme.backgroundsecondary,"& .MuiTableCell-root":{color:T.a.theme.primary,fontWeight:"bold"}},"& .MuiTableBody-root":{"& .MuiTableRow-root:nth-of-type(odd)":{backgroundColor:T.a.theme.well,"& .MuiTableCell-root":{color:T.a.theme.primarylight}},"& .MuiTableRow-root:nth-of-type(even)":{backgroundColor:T.a.theme.backgroundsecondary,"& .MuiTableCell-root":{color:T.a.theme.primarylight}}}}}}));function F({isBetter:t}){return t?r.a.createElement(i.a,{title:r.a.createElement(r.a.Fragment,null,"Imported value is ",r.a.createElement("b",null,"larger"),"!")},r.a.createElement(v.a,{color:"success"})):r.a.createElement(i.a,{title:r.a.createElement(r.a.Fragment,null,"Imported value is ",r.a.createElement("b",null,"smaller"),"!")},r.a.createElement(_.a,{color:"error"}))}let D=0;function j(t){var e,n,y,b,E,v,k,_,w,C,L,j,B,G,W,H,U,q,$,K,z,V,Y,J,X,Q,Z,tt,et,nt,at,rt,it,ot,st,lt,ct,ft,ut,mt,ht,dt,pt,gt,yt,bt,Et,vt,kt,_t,wt,St,Ct,xt,Lt,Ot,Mt,Tt,At,Rt,Nt,Pt,It,Ft,Dt,jt,Bt,Gt,Wt,Ht,Ut,qt,$t,Kt,zt,Vt,Yt,Jt,Xt,Qt,Zt,te,ee,ne,ae,re;const ie=I(),[oe,se]=Object(a.useState)(),[le,ce]=Object(a.useState)(),[fe,ue]=Object(a.useState)(!1),[me,he]=Object(a.useState)(!1);return Object(a.useEffect)(()=>{D=T.a.AutosaveInterval,T.a.AutosaveInterval=0,t.router.allowRouting(!1)},[]),Object(a.useEffect)(()=>{me&&t.router.toTerminal()},[me]),Object(a.useEffect)(()=>{t.importString&&async function(){const e=await M.c.getImportDataFromString(t.importString),n=await M.c.getImportDataFromString(M.c.getSaveString(!0));se(e),ce(n),Promise.resolve()}()},[t.importString]),oe&&le?r.a.createElement(o.a,{className:ie.root},r.a.createElement(s.a,{variant:"h4",sx:{mb:2}},"Import Save Comparison"),t.automatic&&r.a.createElement(s.a,{sx:{mb:2}},"We've found a ",r.a.createElement("b",null,"NEWER save")," that you may want to use instead."),r.a.createElement(s.a,{variant:"body1",sx:{mb:2}},"Your current game's data is on the left and the data that will be imported is on the right.",r.a.createElement("br",null),"Please double check everything is fine before proceeding!"),r.a.createElement(l.a,{color:"secondary",component:c.a},r.a.createElement(f.a,null,r.a.createElement(u.a,null,r.a.createElement(m.a,null,r.a.createElement(h.a,null),r.a.createElement(h.a,null,"Current Game"),r.a.createElement(h.a,null,"Being Imported"),r.a.createElement(h.a,null))),r.a.createElement(d.a,null,r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Game Identifier"),r.a.createElement(h.a,null,null!==(e=null===(n=le.playerData)||void 0===n?void 0:n.identifier)&&void 0!==e?e:"n/a"),r.a.createElement(h.a,null,null!==(y=null===(b=oe.playerData)||void 0===b?void 0:b.identifier)&&void 0!==y?y:"n/a"),r.a.createElement(h.a,null,(null===(E=oe.playerData)||void 0===E?void 0:E.identifier)!==(null===(v=le.playerData)||void 0===v?void 0:v.identifier)&&r.a.createElement(i.a,{title:"These are two different games!"},r.a.createElement(O.a,{color:"warning"})))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Playtime"),r.a.createElement(h.a,null,Object(A.b)(null!==(k=null===(_=le.playerData)||void 0===_?void 0:_.totalPlaytime)&&void 0!==k?k:0)),r.a.createElement(h.a,null,Object(A.b)(null!==(w=null===(C=oe.playerData)||void 0===C?void 0:C.totalPlaytime)&&void 0!==w?w:0)),r.a.createElement(h.a,null,(null===(L=oe.playerData)||void 0===L?void 0:L.totalPlaytime)!==(null===(j=le.playerData)||void 0===j?void 0:j.totalPlaytime)&&r.a.createElement(F,{isBetter:(null!==(B=null===(G=oe.playerData)||void 0===G?void 0:G.totalPlaytime)&&void 0!==B?B:0)>(null!==(W=null===(H=le.playerData)||void 0===H?void 0:H.totalPlaytime)&&void 0!==W?W:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Saved On"),r.a.createElement(h.a,null,(null!==(U=null===(q=le.playerData)||void 0===q?void 0:q.lastSave)&&void 0!==U?U:0)>0?new Date(null!==($=null===(K=le.playerData)||void 0===K?void 0:K.lastSave)&&void 0!==$?$:0).toLocaleString():"n/a"),r.a.createElement(h.a,null,(null!==(z=null===(V=oe.playerData)||void 0===V?void 0:V.lastSave)&&void 0!==z?z:0)>0?new Date(null!==(Y=null===(J=oe.playerData)||void 0===J?void 0:J.lastSave)&&void 0!==Y?Y:0).toLocaleString():"n/a"),r.a.createElement(h.a,null,(null===(X=oe.playerData)||void 0===X?void 0:X.lastSave)!==(null===(Q=le.playerData)||void 0===Q?void 0:Q.lastSave)&&r.a.createElement(F,{isBetter:(null!==(Z=null===(tt=oe.playerData)||void 0===tt?void 0:tt.lastSave)&&void 0!==Z?Z:0)>(null!==(et=null===(nt=le.playerData)||void 0===nt?void 0:nt.lastSave)&&void 0!==et?et:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Money"),r.a.createElement(h.a,null,R.a.formatMoney(null!==(at=null===(rt=le.playerData)||void 0===rt?void 0:rt.money)&&void 0!==at?at:0)),r.a.createElement(h.a,null,R.a.formatMoney(null!==(it=null===(ot=oe.playerData)||void 0===ot?void 0:ot.money)&&void 0!==it?it:0)),r.a.createElement(h.a,null,(null===(st=oe.playerData)||void 0===st?void 0:st.money)!==(null===(lt=le.playerData)||void 0===lt?void 0:lt.money)&&r.a.createElement(F,{isBetter:(null!==(ct=null===(ft=oe.playerData)||void 0===ft?void 0:ft.money)&&void 0!==ct?ct:0)>(null!==(ut=null===(mt=le.playerData)||void 0===mt?void 0:mt.money)&&void 0!==ut?ut:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Hacking"),r.a.createElement(h.a,null,R.a.formatSkill(null!==(ht=null===(dt=le.playerData)||void 0===dt?void 0:dt.hacking)&&void 0!==ht?ht:0)),r.a.createElement(h.a,null,R.a.formatSkill(null!==(pt=null===(gt=oe.playerData)||void 0===gt?void 0:gt.hacking)&&void 0!==pt?pt:0)),r.a.createElement(h.a,null,(null===(yt=oe.playerData)||void 0===yt?void 0:yt.hacking)!==(null===(bt=le.playerData)||void 0===bt?void 0:bt.hacking)&&r.a.createElement(F,{isBetter:(null!==(Et=null===(vt=oe.playerData)||void 0===vt?void 0:vt.hacking)&&void 0!==Et?Et:0)>(null!==(kt=null===(_t=le.playerData)||void 0===_t?void 0:_t.hacking)&&void 0!==kt?kt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Augmentations"),r.a.createElement(h.a,null,null===(wt=le.playerData)||void 0===wt?void 0:wt.augmentations),r.a.createElement(h.a,null,null===(St=oe.playerData)||void 0===St?void 0:St.augmentations),r.a.createElement(h.a,null,(null===(Ct=oe.playerData)||void 0===Ct?void 0:Ct.augmentations)!==(null===(xt=le.playerData)||void 0===xt?void 0:xt.augmentations)&&r.a.createElement(F,{isBetter:(null!==(Lt=null===(Ot=oe.playerData)||void 0===Ot?void 0:Ot.augmentations)&&void 0!==Lt?Lt:0)>(null!==(Mt=null===(Tt=le.playerData)||void 0===Tt?void 0:Tt.augmentations)&&void 0!==Mt?Mt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Factions"),r.a.createElement(h.a,null,null===(At=le.playerData)||void 0===At?void 0:At.factions),r.a.createElement(h.a,null,null===(Rt=oe.playerData)||void 0===Rt?void 0:Rt.factions),r.a.createElement(h.a,null,(null===(Nt=oe.playerData)||void 0===Nt?void 0:Nt.factions)!==(null===(Pt=le.playerData)||void 0===Pt?void 0:Pt.factions)&&r.a.createElement(F,{isBetter:(null!==(It=null===(Ft=oe.playerData)||void 0===Ft?void 0:Ft.factions)&&void 0!==It?It:0)>(null!==(Dt=null===(jt=le.playerData)||void 0===jt?void 0:jt.factions)&&void 0!==Dt?Dt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Achievements"),r.a.createElement(h.a,null,null===(Bt=le.playerData)||void 0===Bt?void 0:Bt.achievements),r.a.createElement(h.a,null,null===(Gt=oe.playerData)||void 0===Gt?void 0:Gt.achievements),r.a.createElement(h.a,null,(null===(Wt=oe.playerData)||void 0===Wt?void 0:Wt.achievements)!==(null===(Ht=le.playerData)||void 0===Ht?void 0:Ht.achievements)&&r.a.createElement(F,{isBetter:(null!==(Ut=null===(qt=oe.playerData)||void 0===qt?void 0:qt.achievements)&&void 0!==Ut?Ut:0)>(null!==($t=null===(Kt=le.playerData)||void 0===Kt?void 0:Kt.achievements)&&void 0!==$t?$t:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Source Files"),r.a.createElement(h.a,null,null===(zt=le.playerData)||void 0===zt?void 0:zt.sourceFiles),r.a.createElement(h.a,null,null===(Vt=oe.playerData)||void 0===Vt?void 0:Vt.sourceFiles),r.a.createElement(h.a,null,(null===(Yt=oe.playerData)||void 0===Yt?void 0:Yt.sourceFiles)!==(null===(Jt=le.playerData)||void 0===Jt?void 0:Jt.sourceFiles)&&r.a.createElement(F,{isBetter:(null!==(Xt=null===(Qt=oe.playerData)||void 0===Qt?void 0:Qt.sourceFiles)&&void 0!==Xt?Xt:0)>(null!==(Zt=null===(te=le.playerData)||void 0===te?void 0:te.sourceFiles)&&void 0!==Zt?Zt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"BitNode"),r.a.createElement(h.a,null,null===(ee=le.playerData)||void 0===ee?void 0:ee.bitNode,"-",null===(ne=le.playerData)||void 0===ne?void 0:ne.bitNodeLevel),r.a.createElement(h.a,null,null===(ae=oe.playerData)||void 0===ae?void 0:ae.bitNode,"-",null===(re=oe.playerData)||void 0===re?void 0:re.bitNodeLevel),r.a.createElement(h.a,null))))),r.a.createElement(o.a,{sx:{display:"flex",justifyContent:"flex-end"}},r.a.createElement(p.a,null,r.a.createElement(g.a,{onClick:function(){T.a.AutosaveInterval=D,Object(P.e)(!1),t.router.allowRouting(!0),he(!0)},sx:{my:2},startIcon:r.a.createElement(x.a,null),color:"secondary"},"Take me back!"),r.a.createElement(g.a,{onClick:()=>ue(!0),sx:{my:2},startIcon:r.a.createElement(S.a,null),color:"warning"},"Proceed with import")),r.a.createElement(N.a,{open:fe,onClose:()=>ue(!1),onConfirm:async function(){await M.c.importGame(t.importString,!0),Object(P.e)(!0)},confirmationText:r.a.createElement(r.a.Fragment,null,"Importing new save game data will ",r.a.createElement("strong",null,"completely wipe")," the current game data!",r.a.createElement("br",null))}))):r.a.createElement(r.a.Fragment,null)}},,,,,function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(0),r=n.n(a);function i(t){return t.content?r.a.createElement(r.a.Fragment,null,t.content):r.a.createElement(r.a.Fragment,null,t.children)}},,,function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var a=n(0),r=n.n(a),i=n(41);const o=["ttftfffttttttttttfffffffttftt1ttttttt111tttt1111111tttt1tt111tttt111111tttt1ttttttttttttttt111111111\nttfttttttttttttttttfLLLftfffffffffftttt111tt11111ttffffftttt1111111111111111ttttttfttttttttt111111t1\nttttttttttttttttffffLfftffffffffLLffttttttftt111ttfffffftttttttt111111ttttttffffttfffttttttt111111tt\nttttttttttttttttfffLfttffffffLLffffttttttttttt1tfffffffffftttttt111111tffffffffftttfffftttt11111ttt1\nttttttttttttffLfttfffttfffffffffttfftttttt1t1tt11tfffffftttttt111t111111ttffffLLffttfffftt111111tttt\nttttttttttffLLLLfttttffLLLfttttftfLftttttttffffttttffffttttfftt11t111tt111ttfffLffttfftttttt1111tttt\nttttttttffLLLLLLLffttfLLffttfffftfLfttttttffttt11111ttttffffffftt1111tft11111ttffffttt11tfftt11ttttt\ntttttttfffLLLLLLLLfftffttttffLffftfftttttft1i;;::::;iitffffffffftt111tft1tttt1ttffLfttttfffffttttttt\ntttttttfffLLLLLLLLfttttffftffffftfttttttff1:,,,,,,,,::itfffffffft11111111ttttttttttt1tfffffffffffttt\ntttffttffLLLLLLLLLfttfftffffffffLLLftttttt;::,:::;;;;::1tfffftfft11111ttt1ttt1tfttt11ttffffffffLfttt\ntffffffffLLLLLLLffftfLfffttfLLffLLLfttttti;;;iii11111;:i11ttffft111111tfft11t11tt1tttttfffLLLLLLfttf\ntfffffttttfLLLffttttfffffttLLLLfLLLftttfti:;;;iiiiiiii;it111tt111t1111tffttfftt11ttftttfffLLLLLLffff\nttttfttttffffftttttttttttttfLLLffLLfttttt1;;;;;;iiiiii;1tft11tt1111111tfftfffftttttttttttfLLfffttfff\ntfffffffffftttfffffffffttffttLLfffLfttttt11i;;;;iiiiiii1tt11tfftt11111ttt1fffttt1tttttttttfffftttttt\nttffffffffftttfffffffffttffftffttftttttff1ii;;;;iii1iii111tt1ttttt1111t111ffttffttfffffLffttttffffff\nttffffffffttttffffffffttttttttttffftttttft1ii;;;ii1iii111tfft11ttt111111t1tt1tfft1ttffffLLftttLLLLLL\ntttffffffffttfffffffftttttttt11fffftttt1t111iiii;iiiii11ttffft11111111ttttttt1tt11ttffffLfftttfLLLLf\ntttttttffffttfffttttttttffttt11tffttttttt11ttii;;;iiii11i1ffftt1111111tttt111tttt11ttttffffftffLLLff\ntfttttttttttttttttttttfffftttt11tfftttttt111t1i;;;iiii1i,,:;i1111t1111ttt111t1tfftt11111ttfftffffftt\nttttfffftttttttfffftttffffttffttttft111tt11111i;;;iiii1;,,....,:::;i11tt111tt11tffftttttttt1tttttttt\nt11ttffffftttffffffttttfffttffttttft1111111111;;;;;;;it;,...........,:it111ttt1tffftttttfft11ttfffff\ntt1ttfffftt1ttfffft111tffttfttttttt1111t1i;:;11i1i;;1t1:,,............,itt11tt1tfftt1tfffffft1tffLLf\ntfttttfttttt11tttt1ttt11ttttttftt111111i:,..:1111iii11;,...............;tt111t11ttttttttffttt11ffLLf\ntfftttttttfftttttttffftt111ttffftt11i;,.,...,iiii;;;;:,,...............:1ttt1111ttfffttttft1tt1ttfft\nttttttttttttttt11ttttttttttfffffft1:,..........::::::,,,...............,1ttttt11ttfffffttttffftttttt\ntfffttttffffftt11ttttttttttfffffft1:...........:;::;:..................,1tttttt1ttfffffttttttttftttf\ntfffttttfffffft1ttftttfftttttffft11:...........,:::::..................,1tttft11tfffffffttfffffffttf\ntfffttttffffff11tttttttttttttttttt1;...........,::::,...................;t1t1111tfffffLfttfffffffttf\ntfffttttfftttt11tttttttt1tfftttttt1:...........,::::,...... ............,1111tt11fffffLftttffttffttf\ntttttttttttttt11tttttttt1tffftttft1:...........,:::,,....................it1ttt11tfffffftttffttffttt\nttttt1tttttttt11ttttttttttffttttttt:...........,::,,.....................:111tt11tttttttt1tttttttttt\nttttt1tttttttt11tftttttftttttttttt1;,:;:.......,:,,,....................,,1111t11ttttttt11ttttttfttt\n1tttt1ttfffttt11ttffffffttttfffft11ii1i:.......,:,,,.....................,1tt1111ttttttt111tttttfttt\n1ttt11tttttttt11tttttttttttttttttti;;;;:.......,:,,,....... .............,itt1111tttt11t111ttttttt1t\n111111tttttttt11111111ttttttttttt1i;;;;:.......,:,,,......................itt11111111111111111111111\n1111111111111111111111ttttttttttt1;;;;;:...... ,:,,,,.....................itt11t11111111111111111111\n1111111111111111111111tttttttttt1;:,::;,...... ,:...,.....................ittttt11111111111111111111\n111111111111111111111111tttttttt1i,..... .... .:........................,i1tttt11111111111111111111\n1111111111111111111111111t11t11111;,....,,.... ,:::,,,...................,11ttttt11t1111111t11111111\n11111111111111111111111111111111111iiiiii. ... .::::::,..................,11t1ttt111t11111tttttt1111\n1111111111111111111111111111111111111111:.,.....::::::,..................:111tttttt1tttt11tttttt1111\n1111111111111111111111111111111111111111:::,...,::::;::,..,,.............:11tt1ttttttttttttttttt1111\n","ttftfffttttttttttffffffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttftfLLLftfffffffffftt11111tt11111ttffffttttt1111111111111111ttttttfttttttttt111111tt\nttftttttttttttttffffLftttfffffffLLLfttttttftt111ttfffffftttttttt111111tttttffffftfffftttttt1111111tt\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tffffffffffttttttt11111tffffffffftttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttfftttttt1tttt1ttftfffftt1ttt111t111111ttffffLLffttfffft1111111tttt\nttttttttttffLLLLfttttffLLLfttttttfLftttttttfft11i;;:;;i11ttfftt11t111tt111tttffffftttttttttt111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLttttttfff1;,,,,,,,,:;tffffft11111tft11111ttffffttt11tffftt1ttttt\ntttttttfffLLLLLLLLfftffttttffLffftfftttttfft1;:,,,,,::::,;tffftttt111tft1tttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffffftfftttttfffti:;;;iiii11i;:tffffft11111111ttftttttttt1ttffffffffffttt\ntttffttffLLLLLLLLLftffftfLftfftfLLLftttttfft::i;iiiiii11i:1ffftft11111ttt1ttt1ttttt11ttfffffLLfLfttt\nttfLfffffLLLLLLLLfftfLLfffffLfffLLLfttttt1tt;:;;;;;iiiiiii1tffft11111tffft11t11tt1tttttfffLLLLLLffff\ntffftfttttfLLLffttttfffffttLLLLfLLLftttft111i;;;;;;iiiiii111tt111t1111tffttfftt11tfft1tfffLLLLLLLffL\ntttfftttttffLftttttttttttttfLfLffLLfttttttt1iii;;;;;ii11i1t11t11111111tffttfffttttttt11ttfLLLLffftff\nttfLffffffftttfffffffffttfftfLLfffLftttttfft1ii;;;;iii1i1tt1tfftt11111ttt1tffttt1ttt1tttttffffttffft\nttffffffffftttffffffffttfffftffffftttttfffft111;;;;iiii1111t1ttttt1111tt11ffttfftttfffffLfttttfffffL\nttffffffffttttffffffffttttttttttffftttttttt11ttii;iiiiii11tft11ttt111111t11t1tfft1tfffffLLftttLLLLLL\n1ttffffffffttfffffffftttttttt11ffffttttt1111tftiii;;iiii1;,;1111111111tttt11111111ttffffLfftttffLLLf\nttttttttfffttfffttttttttffttt11tffftttttt11ttf1;;;i;iiii1:,,.,,::;ii11tttt111tttt11ttffffffftffLLLff\ntfttttttttttttttttttttfffftttt11tfftttttt111tt1;;;i;;ii1t:,,........,:;1t111t1tfftt11111ttfftffffftt\ntftttffffttttttfftftttffffttffttttftt11tt111i;;;;;;;;;it1,,............,;11tt11tffffttttttt1tttttttt\ntttttffffftttfffffft1ttffftfffttttft111111;:,.;iii;;;i11,.,.............,1tttt1tffftttttfft111tfffff\n1tttffffftt1ttfffftt11tffttfttttttt1111i;,....,1iii;ii;,................,111tt1tfft11tffffftt1tLffLf\ntftttfftt1ttt1tttt1tttt1ttttttttt1111;:,.......i1;;;:::.................,it11t11ttttttttffftt11fffLf\ntfftttttttfftt1111ttfftt11ttfffftt1ti..........:i;::;:,..................ittt111t1tffttttft1tt1tffft\nttttttttttttttt11tttttttt1tffffffftti,.........,::::::,..................itttt11ttffffftttttfftttttt\ntfffttttfffffft11ttttttttttffffffft1i,.........,:,:::,...................,1tttt11tfffffttttttttffttf\ntfffttttfffffft11tftttfftttttffft1111:.........,:,:::,....................;tt111tfffffffttfffffffttf\ntfffttttfffffft1tttttttftttttttttt111;.........,:,::,,....................,111111fffffLfttfffffffttf\ntffftttttttffft11tttttttttffttttfft11i.........,:.:,,......................:1tt11fffffLftttffttffttf\ntttttttttttttt111ttttttt1tffftttfft111:....... ,:.:,,.......................1tt11tfffffftttffftffttt\nttttt1tttttttt11ttttttttttfttttttft111i,...... ,:,,,,......................,itt11ttttttt11ttttttfttt\nttttt1tttttttt11tfttttfftttttffttt1111i,...... ,:.,,,......................:11111ttttttt11ttttttfttt\n1tttt1ttftfttt11tfffffffttttfffft11111,....... ,,.,,....... ...............it1111ttttttt111tttttfttt\n1tttt1tttttttt11ttttttttttttttttt1111;,....... ,,.,,......................:tt11111ttt11t111ttttttt1t\n11t111tttttttt111t1111tttttttttt1iiii:,,...... ,,.........................;t111111111111111111111111\n111111111tt11111111111ttttttttt1;;iiii:....... ,,............ ...........;tttt1111111111111111111111\n1111111111111111111111ttttttttt1;;;iii;... ....,::::,....,:::,,.........;1ttttt111111111111111111111\n111111111111111111111111tttttttt1i;;ii: .,....,:::::... .;;;;;:,.....,;1ttttttttt111111111111111111\n1111111111111111111111111tt1111111i,,.,:;i: ...,:::::.....:;;;;;:.....,1ttttttttt11t1111111t11111111\n11111111111111111111111111111111111:.:1tti,....,:::::.... ,;;;;;;,.....ittttttttt111t11111ttttt11111\n1111111111111111111111111111111111111ttt;,,....,:::::,... .,;;;;:,.,,..:ttttttttttt1tttt11tttttt1111\n11111111111111111111111111111111111111t1,,,....:;;::::,.....:;;;:......,1ttttttttttttttttttttttt1111\n","ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt1tt111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftfffffffffttt11111tt11111ttfffft1ttt1111111111111111tttttffttttttttt111111tt\nttftttttttttttttffffLffttfffffffLLLfttttttfttt11tffffffftttttttt111111tttttffffftfffftttttt1111111tt\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt1iiiii1tttttttt11111tffffffffftttfffffttt1111t1tt1\nttttttttttttffffttffftffffffffffttffttttt11tttt1i::,,,,,,:;111111t111111ttffffLLffttfLfftt11111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfft1i;,,,,,,,,,:;ttt11t111tt111tttffffftttftttttt111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttffffti;::;;;;;iii::1ftt11111tft11111ttffffttt11tffftt1ttttt\ntttttttfffLLLLLLLLLftffttttffLffftffttttffffft;:;iiii11111i:iftttt111ttt1tttt11tffLfttttfffffttttttt\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffft;:;;;;;iiiiii;1fftt11111111ttftttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffffti;;;;;;;ii;iiitffft11111ttt1ttt1tfttt11ttfffffLLfLfttt\nttfLfffffLLLLLLLLffffLLfffffLfffLLLLtttttttff1iii;;i;;iii111tfft111111ffft11t11tt1tttttfffLLLLLLffff\ntffftftttffLLLffttttfffffttLLLLfLLLffttftt11t1iii;;;;;iiiii1tt111t1111tffttfftt11tfft1tfffLLLLLLLfff\nttffftttttffLftttttttttttttfLLLffLLftttttttft111i;;;;iiii1111111111111tffttfffttttttt11ttfLLffffftff\nttfLffffffftttfffffffffttfttfLLfffLftttttfffft11i;;;;iiii1t1ttttt11111ttt1tffttt11ttttttttfffftfttft\nttffffffffftttffffffffttfffftffffftttttfffft11t1i;;;;;iii1ii1ttttt1111t111ffttfft1tfffffLfttttfffffL\nttffffffffttttffffffffttttttttttffftttttttt11tft1i;;;;iii1i,:;i1ttt11111t11t1tfft1ttffffLLfttfLLLLLL\ntttffffffffttfffffffftttttttt11ffffttttt1111tfti;ii;;iiii1;,,...,:;ii1tttt1111tt11ttffffffftttffLLLf\nttttttttfffttfffttttttttffttt11tffftttttt11t1iii;;ii;;;i1t:,.........,:;1t111ttt111ttffffffftffLLLLf\ntfttttttttttttttttttttfffftttt11tfftt11tt1i:,.:;;;i;;;itti,,............,;1111ttttt11111ttfftffffftt\ntfttfffftttttttfffftttffffttffttttft1111i:....,;;;ii;i11;.,,.............:1tt1ttffffttttttt1ttttttft\ntttttffffftttffftffttttffftfffttttft1i:,.......:;;;;;;;:,................:tttt1tffftttttfft11ttfffff\n1t1tffffftt1ttfffftt11tffttftttttttt1,.........,ii;;;;;,.................:11tt1tfft11tfffffft1fLLfLf\ntftttfftt1ttt1tftt1ttt11ttttttttt111i,.........,11;:;;:,.................,1t1t11ttttttttfftt111fffLf\ntfftttttttffttt111ttfftt11ttffffftt11,.........,i;::::,..................,1tt11111ffft1ttt11tt1tffft\nttttttttttttttt11tttttttt1tffffffft11;..........::::::,...................;tt1111tfffftttttffftttttt\ntfffttttfffffft11ttttttttttffffffft11:..........:::::,..,;:,...............ittt1tttttffttttttttffttf\ntfffttttfffffft11tftttffttttfffft1111:..........:::::,..;1i;:,..............1t11tfffffffttfffffffttf\ntfffttttfffffft1tttttttftttttttttt111;..........::,:,...;ii;;;,.............:1111tffffLfttfffffffttf\ntffftttttttfft11ttttttttttfftttttft11i,.........::,,,...;;;;;i:..............;111tffffLfttfffttffttf\ntttttttttttttt111tttttttttffftttfft11i,.........::,,,...;;;;;i:..............:111tfffffftttffttffttt\ntttttttttttttt11ttttttttttfftttttft111:.........:,,,....::;;;;:.............,1t11ttttttt11tttttffttt\nttttt1tttttttt11tfttttfftttttfftttt111:.........:,,,......,::::..,.........,i1111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfffffffttttfffft1111i:,........:,,,..... .......,,...... .it1111ttttttt111tttttft1t\n1tttt1tttttttt11ttttttttttttttttt1iiii;,........:........... ...........:itt11111ttt1t1111ttttttt1t\n111111tttttttt111tt111tttttttttti;;;iii:... ....:,,...................:i1tttt11111111111111111111111\n111111111tt11111111111tttttttttt1;;;;;;;. .,....::::..................:1tttttt1111111111111111111111\n1111111111111111111111ttttttttttt1i;;::..:;1,...::::...................;ttttttt111111111111111111111\n1111111111111111111111111tttttttt111i,.,it1;....::::,..................,1ttttttttt111111111111111111\n1111111111111111111111111tttt11111111ii1t1i:...,::::,........,..........itttttttt11t1111111tt1t11111\n11111111111111111111111111111111111111tt1;:....::::;:.......,...........:1ttttttt111t11111ttttt11111\n111111111111111111111111111111111111111ti,,....:;:;::,..................,ittttttttt1tttt11tttttt1111\n111111111111111111111111111111111111111t:,:.,.:;;;;:::,..................;111t1ttttttttttttttttt1111\n","ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt11t111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftfffffffffttttt1111t11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\nttftttttttttttttffffLffttffffffffLLfttttttfttt11ttt1iiii;i11tttt111111tttttffffftffffttttttt111111tt\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tt1::,,,,,,:;1ttt111111tfftfffffftttfffffttt1111t1tt1\nttttttttttttffffttffftffffffffffttfftttttt1ttt11i;:,,,,,,,,,:1111t1111111tffffLLffttfLfftt11111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;:::;;;;;;;::it11t111tt111tttffffftttfttttt1111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttfffffti:;;ii111111i:itt11111tft11111ttffffttt1ttffftt1ttttt\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffft;:;;;;;iiiiii;ittt1111ttt1tttt11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffffti;;;;;;;ii;iiitttt11111111ttftttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttfffff1iii;;i;;i1i1i1tttt11111ttt1ttt1tfttt111tfffffLLfLfttt\nttfLffffffLLLLLLLffffLLfffffLfffLLLftttttttfft1i;;;;;;;iiiiitfft111111ffft11t11tt1tttttffffLLLLLffft\ntffftfttttfLLLffttttffffftfLLLLfLLLftttftt1111111i;;;;iiii111t111t1111tffttfftt11tfft1tffLLLLLLLLfff\nttffftttttffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111111111111tffttffftttttttt1ttfLLLfffffff\nttfLffffffftttfffffffffttfttfLLfffLftttttffft1111i;;;;;ii111tfttt11111ttt1tffttt11ttttttttfLfftfttft\nttffffffffftttfffffffffttffftffffftttttfffft11t11i;;;;iii1i:;1ttft11111111ffttfftttfffffLfttttfffffL\nttffffffffttttffffffffttttttttttffftttttft111tttiii;;iiii1;,,,:;i1111111111t1tfft1ttffffLLftttfLLLLL\ntttffffffffttffffffffttttttttttfffftttt1111i;:;iiii;;;i;11:,,.....,:;i1tft1111tt111tffffLfftttffLLLf\nttttttttfffttfffttttttttfftt111tfffttt11i;,,..:i;;;i;ii1t1,,..........,:i1111ttt1111tffffffftffLLLLf\ntfttttttttttttttttttttffffttttt1tffti;:,,.....,;;;iiii1ti,,,.............;1111ttttt11111ttfftffffftt\ntttttffffttttttfffftttffffttffttttf1:.........,;:;;;;;;;,.,,,............:1tt1ttffff11ttttt1ttttttft\ntttttffffftttffftfft1ttffftfffttttf1,..........,;;;;;;;:.:ii;;:,.........:tttt1tfffttttffft111tfffff\n1tttffffftt1ttfffftt11tffttfttttt1t1,...........ii;;;::,,;i;;ii:.........:tttt1tfft11tfffffft1fLLfLf\ntftttffttttt11tftt1tttt1ttttttttt11i,..........,1i;;::,.:i;;;;i:.........,1t1t11ttttttttfftt111fffLf\ntfftttttttffttt11tttffttt1tttffft11i,..........,ii;:::,.,:;;iii:..........it111111tfft1ttt11tt1tffft\nttttttttttttttt11tttttttt1tfffffftti,...........:::::,....:;;ii:..........:tt111ttfffftttttffftttttt\ntfffttttfffffft11ttttttttttfffffft1i,...........:::::,.....,:;;:.... ......,1t111ttttffttttttttffttf\ntfffttttfffffft11tftttffttttfffft111:...........:::::,........,..,..........,1111tffffffttfffffffttf\ntfffttttfffffft1tttttttftttttttttt11:...........::,:,........ ...:;,.........:111tffffLfttfffttffttf\ntffftttttttfft11ttttttttttffttttttti,...........:::,,.............,...........,i1tffffLfttfffttffttf\ntttttttttttttt111tttttttttffftttfft;,:;:........:::,.............. ...........:11tfffffftttffttffttt\ntttttttttttttt11ttttttttttfftttttftii1i;:.......:::,.......... ..............:t111tttttt11tttttffttt\nttttt1tttttttt11tfttttfftttttffttt1ii;ii;,......::,,........................:1111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfffffffttttfffft11i;;ii;,......:,,,..........:........ .;t1111ttttttt111tttttft1t\n1tttt1tttttttt11tttttttttttttttttt11;:;i:,,.....:,.................. .;i;;1tt1111tttt1t1111ttttttt1t\n111111tttttttt111t111ttttttttttttt11i:,,:1;....,::....................:1ttttt11111111111111111111111\n111111111tt1111111111tttttttttttttt11i;;1t:....:::::...................;tttttttt11111111111111111111\n1111111111111111111111ttttttttttttt111ttt1,,,.,:::::,..................,1ttttttt11111111111111111111\n111111111111111111111111tttttttttt1111111i,::.,;::;:,...................;ttttttttt111111111111111111\n1111111111111111111111111ttttttt11111111t;.,,.,;;;;;,...................,1ttttttt11t1111111tttt11111\n111111111111111111111111111111111111111t1:..,,:;;;;;:,...................;ttttttt111t11111ttttt11111\n111111111111111111111111111111111111111ti,,,::;;;;;;;:,..................,1tttttttt1tttt11tttttt1111\n111111111111111111111111111111111111111t;,,::,;;;ii;;::,..................it1tttttttttttttttttt11111\n","ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftfffffffffttttt111tt11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\nttftttttttttttttffffLffttfffffffLLLftttttttttt11ttt1iiii;i11tttt111111ttttttfffftffffttttttt111111t1\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt;:,,,,,,,:itttt11111tfftfffffftttfffffttt1111t1ttt\nttttttttttttffffttffftffffffffffttfftttttt1tttt11i:,,,,,,,,,:i111t1111111tffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;::;;;;;;;;;,;t111111tt111tttffffftttftt1tt1111ttttt\nttttttttffLLLLLLLffttfLLffttfffftfLLtttttffffff1,:iiii111111;:tt11111tft11111ttffffttt11tffft11ttttt\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffffi:;;;;;iiiii1;;ttt1111ttt1tttt11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLLftfftttttfffffff1;;;;;;;ii;;ii1ttt11111111ttftttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLffffftfLftffffLLLftttttfffff1iiiiii;;iiii1itttt11111ttt1ttt11tttt11ttfffffLLfLfttt\ntffLLffffLLLLLLLLffffLLftffLLLffLLLftttttttffftiii;;;;;ii1ii1tft111111ffft11t11tt1tttttffffLLLLLffft\ntfffffttftfLLLffttttfffffttLLLLfLLLftttft111tt111i;;;;iiiii1tt111t1111tffttfftt11tfft1tffLLLLLLLLfff\nttttfttfffffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111t11111111tffttffftttttttt1ttfLLLfffffff\nttffffffffftttfffffffffttfftfLLfffLftttttffft11t1i;;;;;iii11ttttt11111ttt1tffttt11ttttttttfLfftftttt\nttffffffffftttfffffffffttffftffftftttttffft111t11i;;;;iii1ii11tttt1111tt11ffttfftttfffffLfttttffffff\nttffffffffttttffffffffttttttttttffftttttttt11111iii;;iiii1;,:;1tttt11111t11t1tfft1ttffffLLftttfLLLLL\ntttffffffffttffffffffttttttttt1tffftttt11i;:,:i;;i;;;;;i11,,..,,:;i111tttt1111tt11ttffffLfftttffLLLf\nttttttttfffttfffttttttttffttt11ttff1ii;:,....,;::;i;;i11ti,,.......,:;ittt111ttt1111ttffffffttfLLLLf\ntfttttttttttttttttttttfffftttt11tff;,,........;;;;iii1tti,,,,:;;::,....,i11111ttttt11111ttfftffffftt\ntfttfffffttttttfffft1tffffttfft1ttt:..........:;;;;;;;i;...,;i;iii:.....,i1tt1ttffff11ttt1t1ttttttft\nttttfffffftttfffffft11tffftffftttti,..........,:;;;;;;;,...,;;iiii,......;tttt1tffftttttftt111tfffff\n1tttffffftt1ttfffftt111ffttft11tt1;,...........;i;;;;;:,.....:;iii,......;tttt1tfft11tffffftt1fLLfLf\ntttttffttttt11tftt1tttt1tttt1tttti,............;1;::;;,......,;iii,......;t11t11ttttttttfftt111fffLf\ntfftttttttffttt111ttfftt111ttfffti.............;i;::::,.......,;;;,......;ttt11111tfft1tttt1tt1tffft\nttttttttttttttt11ttttttt11tffffffi,............,::;:::,..........,.......:ttt1111tfffftt1tttfftttttt\ntfffttttfffffft11tttttttttttffffti,............,:::::,..............,....,ittt11ttttttft1ttttttffttf\ntfffttttfffffft11tffttff11t1tfff1;...... ....,.,:::::,.....................;11111tffffffttfffffffttf\ntfffttttfffffft1tttttttfttttttti:,......:iiii;,,:::,:.......................,;111tffffffttfffttffttf\ntffftttttttfft11ttftttttttfftti,,::,.,:;1i;;;;.,::::,.........................,i1tffffLfttfffttffttf\ntttttttttttttt111ttttttt1ttfft1:::,,,:,:;;;;i:.,:::,,..........................;1tfffffftttffttffttt\nttttt1tttttttt11ttttttttttfttt1;,...,...:;;;:, ,:::,..........................;11ttttttt11ttttttfttt\nttttt1tttttttt11tfttttfftttttfti,..,....,,,....,:::,.........................:111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfffffffttttffft1;::::,,.......,:,:,.................. .:1111ttttttt111tttttfttt\n1tttt1tttttttt11ttttttttttttttttttt11111:......,:,,,..................,::,:1tt1111ttt1t1111ttttttt1t\n111111tttttttt111t1111tttttttttttt111111:......,,.....................,1tttttt1111111111111111111111\n1111111111t11111111111ttttttttttttt11111:......,:,,....................:1t1ttttt11111111111111111111\n1111111111111111111111ttttttttttttt1111t:......,;;::....................:1ttttttt1111111111111111111\n111111111111111111111111ttttttttt1111111:......,::::,...................,itttttt11111111111111111111\n111111111111111111111111111tttt111111111:......,;;::,....................:1ttttttt1tt11111ttttt11111\n1111111111111111111111111111111111111111:......:;;;::,...................,ittttttt11t11111ttttt11111\n11111111111111111111111111111111111111t1:......:;i;;::,...................:11tttttt1tttt11ttttt11111\n1111111111111111111111111111111111111111,......:;;;;;::,..................,1tttttttttttttttttttt1111\n","ttftfffttttttttttfffffLftfftttttttttt111tttt1111111tttt111111ttttt11111tttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftffffffffftttttt111111111ttfffftt1tt1111111111111111ttttttftttttttt1111111tt\nttftttttttttttttffffLftttfffffffLLLft1tttttft111tfftttfttttttttt111111ttttttfffftffffttttttt11111tt1\nttttttttttttttttfffLfttffffffLLffffttttttttttt1ttti;;;;::;i1tttt111111tffffffffftttfffffttt11111ttt1\ntttttttttttfffffttffftffffffffffttfftttttt1ttt111i,,,,,,,,,;11111t1111111tffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1i::,,,,,,,,,:1t11t111tt1111ttffffftttftt1tt1111ttttt\nttttttttffLLLLLLLffttfLLLfttfLfftfLLtttttfffffti:;;iiiiiiii::1tt11111tftt1111ttffffttt11tffft11ttttt\ntttttttfffLLLLLLLLLftffftttffLffftfftttttffffft::;;iii1i111i:1ttt1111ttt1tttt11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffffft;;;;;;;iiiiii;tttt11111111ttftttttttt11tffffffffffttt\ntttfftfffLLLLLLLLLfttfftfLfffffffLLftttttfffft1ii;;;;;iiiiiitfttt11111ttt1ttt11tttt11ttfffffLLfLfttt\nttfLLfffffLLLLLLLfftfLLftfffLLffLLLftttttttfftiii;;i;;ii111itfft111111tfft11t11tt1tttttfffLLLLLLLfff\ntfffffttftfLLLffttttffffftfLLLLfLLLftttft111tt1iii;;;;iiiii1tt111tt111tffttfftt11tfftttffLLLLLLLLfff\nttttfttffttffftttttttttttttfLLLffLLftttt1tttt11t1i;;;iiii1111t11111111tffttffftttttttt1ttfLLLfffffff\nttfLffffffftttfffffffffttftttfLfffLftttttfffft11i;;;;iiii111tfttt11111ttt1fffttt1ttt1tttttfLLffftttt\nttffffffffftttfffffffffttfftttfttttttttffft11111i;;;;;iii1tt11tttt1111t111ffttffttfffffLLfttttfLffff\nttffffffffttttffffffffttttttttttffftt11ttt1111t1i;;;iii1i1itt11ttt111111t11t1ttft1ttffffLLftttfLLLLL\ntttffffffffttfffffffftttttt1111tffftttt11i;::i1iii;;;iii1i,:;i11t11111tttt1111tt11ttffffLfftttffLLLf\nttttttttfffttfffttttttttffttt11ttft1ii;:,....;i;;;ii;;i1t:,...,:;i1111tttt111ttt1111tttffffftfLLLLLf\ntfttttttttttttttttttttfffftttt11t1:,,........ii:;;iii1tt1,,,......,,;i1tt11111ttttt11111ttfftffffftt\ntfttfffffttttttfffft1tffffttfft11;,..........:;::;ii11t1:,,,...,,:,...,it11tt11tffffttttttt1ttttffft\nttttfffffftttfffffft11tfffttfttt1,....,,......,:;;;;;;i,.......:iii;;,.,1t1ttt1tffftttttfftt11tfffff\n1tttffffftt1ttfffft1111tfttft11ti,.............;i;;;;;:........:iiiii:..it11tt1tfftt1tfffffft1fLffLf\ntttttffttttt11tttt1tttt1tttt1tt;,..............i1;;;;;,........,;iii;,..it111t11ttttttttfftt111fffLf\ntfftttttttfftt1111ttfft11111tft:...............;i;;;;:,.........:;ii:..,ittt111111tfftttttt1tt1tffft\nttttttttttttttt11ttttttt11ttff1,...............,::::::......... ,;ii:...itttt111ttffffft1tttfttttttt\ntfffttttffftttt11ttttttt111tft;,........... ..,:;:::,...........,:;:...;ttttt11ttfffffttttttttffttf\ntfffttttfffffft11ttttttf11111;:,..... .....,:::::::::...............,...:1ttt1111fffffffttfffffffttf\ntfffttttfffffft11ttttttt11ti,,...........,:;i;;;:::::..................,.:tt11111tffffffttfffffffttf\ntffftttttttfff111ttttttt111,.,,,,...,,..,;;;;;i;:,::,....................,;i1t111tffffLfttfffftffttt\ntttttttttttttt111ttttttt11t:.......,....,:;;;;;:::,:,.......................:1t11tfffffftttffttffttt\nttttt11ttttttt11tttttttt11t1,............,,,...,::::.........................:111ttttttt11ttttttfttt\nttttt1tttttttt11ttttttfft1t1:,............ .. ,:::,........................,i111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfftttfftttttt1;::,,::.........,:,,,........................i1111ttttttt111tttttfttt\n1ttt11tttttttt11tttttttttttttttttt111i.........,::,,................. . .;t11111ttt1tt111ttttttt1t\n11t111tttt1tt111111111tttttttttttt111i,........,:,,...................,..,itttt111111111111111111111\n1111111111111111111111tttttttttttt111i,....... ,:....................i111ttttttt11111111111111111111\n1111111111111111111111ttttttttttt1111i,....... ,:,::,................,i1t11tttttt1t11111111111111111\n111111111111111111111111tttttttt11111i,........,::;:,..................;1ttttttt11111111111111111111\n1111111111111111111111111tttt11111111i........ ,,:::,..................,1ttttttttttt1111111tt1t11111\n1111111111111111111111111111111111111i,........,,:::,...................it111ttttt11t11111ttttt11111\n111111111111111111111111111111111111t1,........,,,:::,..................,1t1ttttttt1tttt11ttttt11111\n11111111111111111111111111111111111111,........,,,;;::,..................i111ttttttttttttttttttt1111\n","ttftffftttttttffffffffLfttftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\nttfttttttttttttttftfLLLftffftffffftttttt111111111ttfffftt1tt1111111111111111ttftttftttttttt1111111tt\nttftttttttttttttffffLftttfffffffLLLft11tttfft111tfffffffttt1ttttt11111ttttttfffftffffttttttt11111tt1\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tt111ii11tft1ttttt11111tfftfffffftttfffffttt11111ttt1\nttttttttttttffffttfffttfffffffffttffftttt111ttt1:,,,,,,,:i1111111t111111ttffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttftt1;:,,,,,,,,,;1tt111t1111t111tttffffftttftt1ttt111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttffft1i;;;;;;;;;;::1tttt11111ttt11111ttffffttt11tffft11ttttt\ntttttttfffLLLLLLLLLftffftttffLLfftfftttttffffi:;iii111111i:ittttt1111ttt1tttt11tfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffff;:;;;;iiiiiii:ittttt11111111ttttttttttt11tffffffffffttt\ntttffftffLLLLLLLLLfttfftfLftfffffLLftttttffff1i;;;;;ii;iiiittttft11111ttt1ttt1ttttt11ttfffffLLfLfttt\nttfLLfffffLLLLLLLfftfLLftfffLfffLLLftttttttf1i1i;i;;iiii1i1tffft111111tfft11t11tt1tttttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1111iii;;;;ii1i1i11tt111t1111tffttfftt11tfftttfffLLLLLLLfff\ntttffttfftffLftttttttttttttfLLLffLLfttttttttt11i;;;;iiii11t11111111111tffttfffttttttt11ttfLLLfffffff\nttfLffffffftttfffffffffttftttfLfffLftttttffft11i;;;iiiii1t11ttttt11111ttt1fffttt1tttttttttfLLftftttt\nttffffffffftttfffffffffttffttfffttttttttfft1111i;;;;iii1111111tttt1111tt11ffttffttfffffLffttftffffff\nttffffffffttttffffffffttttttttttffftt11tttt11t1ii;;;iii11tfft11ttt111111t11tttfft1ttffffLLfttffLLLLL\ntttffffffffttfffffffftt1ttt1111fffft1tt11iiii1iiii;iiii1i:1tft11111111tttt111ttt11ttffffLfftttffLLLf\nttttttttfffttfffttttt1ttfft11111tft11i;:,..,;ti;;;i;iii1;,,,:;i1111111tttt111ttt1111tffffffftfLLLLLf\ntfttttttttttttttttttttfffftttt11i;::,,......iti::;i;iitt:,,....,:;i111ttt111t1ttttt11111ttfftffffftt\ntfttfffffttttttfffftttffffttft11:...........;ii::;i11tti,,,,.......,:itt111tt1ttffff11ttt111ttttttft\nttttfffffftttffftfft11tfffttftt;,............,:;;;;;11;,..............;1111ttt1tffftttttfftt1ttfffLf\n1t1tffffft11ttfffft1111tfttft11:.............,:ii;;;;;,...............:11t11tt1tfft11tfffffft1ffffLf\ntttttfftt1tt11tttt1ttt11t1111t;,..............:i1;;;;:,...............,111111t11ftttttttfftt11tfffLf\ntfftttttttfftt1111tttft11111t1,...............:ii;;;;,............,,,.,1tttt11111ttfftttttt1tt1tffft\nttttttttttttttt11ttttttt11ttfi................:;::;::,...........,;i;;:1tttttt11ttffffftttttfftttttf\ntfffttttftttttt11ttttttt11ttfi................,;;:::,............,;iiii1tttttft1ttffftfttttttttftttf\ntfffttttfffffft11ttttttt11111;........ .......:;:::,............:iiiii11ttftt11tfffffffttfffffffttf\ntfffttttftffff111ttttttt11ti:,....... ,:::;;:,.,;:::,............:;;ii:i11tt1111tfffffffttfffffffttf\ntffftttttfffft111ttttttt11i,.........,iii;;;,..,:::,.............::;;,.it1111tt11tffffffttfffftffttf\ntttttttttttttt111ttttttt11,.,,,,..,,,:;;;;;;,..,:::,.............,::;..:i111ttt11tfffffftttffttffttt\nttttt1tttttttt111ttttttt11;,,,...... .:;;;;:...,:,,,.....................:111tt11ttttttt11tttttffttt\nttttt1tttttttt11tttttttt111,..........,,,,.....,:,,.......................:111111ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfft11i:,.....,.... .....,::,......................,1t11111ttttttt111tttttft1t\n1tttt1tttttttt11ttttttttttttt1ii;;;:...........,:,,.....................,it111111ttttttt111ttttttt1t\n11t1111tttttt111111111tt1tttttttt11:...........,:,,.............. .;t11111111111111111111111111\n1111111111111111111111ttttttttttt11,.......... ,,................,:,,,:i1tttt1t111111111111111111111\n1111111111111111111111tttttttttt11i,...........,,,,..............:1t11ttttttttttt1111111111111111111\n111111111111111111111111tttttt1111;........... ,,:;,..............:11ttttttttttttt111111111111111111\n11111111111111111111111111tttt1111;........... ,,:;:...............:111tttttttttt11t1111111tttt11111\n1111111111111111111111111111111111;....,,......,,,::................i1ttttttttttttt1t11111ttttt11111\n1111111111111111111111111111111111;............:,,;:,...............;1tttttttttttttttttt11ttttt11111\n1111111111111111111111111111111111:............,,:;;:...............,1t1tttttttttttttttttttttttt1111\n","ttftffftttttttfffffttfLfttftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffft1ttt1111111111111111ttttttftttttttt111111ttt\nttftttttttttttttffffLftttfffffffLLLftt1tttttt111ttfffffftttttttt111111tttttffffftffffttttttt111tttt1\nttttttttttttttttfffLfttffffffLLffffttt1tttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111tttt\nttttttttttttffffttfffttfffffffffttffftttt11111111i;i11ttt11tt1111t111111ttffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttfti:::,,,,:;i1ttfttt11t111tt111tttffffftttftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLftttttft1;,,,,,,,,,,;tffffft11111tft11111ttffLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLfLftffttttfffti;:;;;;iii;::1fffffttt111ttt1tttt1ttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLfftfftttttfffi;;iiiii1111i:iffffftt11111111ttttttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffi:;;;;iiiiiii:1ftttfftt1111ttt1ttt1ttttt111tffffffLfLfttt\ntffLLfffffLLLLLLLfftfLLftftfLfffLLLLttttt1t1i;;;;;ii;iiii1ttffft111111tfft1tt11tt1tt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft11i1i;;;;i111iii111tt111t1111fffttfftt11tfftttfffLLLLLLLffL\ntttffttfftffLftttttttttttttfLLLffLLftttt1tti1i;;;;ii1iii1tt11111111111tffttffftttttttttttfLLLLfffffL\nttfLfffffffttffffffffffttftttfLfffLftttttfftt1;;;;iiii11ttt1ttftt11111tfttffftt111ttttttttfLLftftttt\nttffffffffftttfffffffffttffttfftttttttttfft111i;;;iiii1t111t1ttttt1111tt11ffttffttfffffLLfttffffffff\nttffffffffttttffffffffttttttttttfffttt1tft1111i;;;iiii111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt1111tffft11t111111iiii;;iii111fffft11111111ttft111ttt11tfffffLfftttfLLLLf\ntttttttttffttfffttttt1ttfft1t11ttfftttt1iiii1i;;;iii1i1i,;i1ttt1111111tttt111tttt111tffffffftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tff11i;:,,,:11i;;iii;it;....,:;i111111ttt111t1ttftt11111ttfftffffftt\ntfttfffffttttttfffftttffffttfft1ii;:,,.....:11;:;;;;1tt;,,,.....,,;i11tt111tt1ttfffftttttt11ttttttft\nttttfffffftttffftfft11tfffttft1;,..........:1ii;;ii1tti,,,..........,it1111ttt1tfffttttffftt1ttfffLf\n1tttffffftt1ttfffft1111tfttft1i,............,:;ii;;i1i,..............:111111tt1tfft11tfffffft1ffffLf\ntftttffttttt11tttt1ttt11t1111t;..............,;1i;;;;,...............,1111111t11ftttttttfftt11tfffLf\ntfftttttttfftt1111ttttt11111tt:............. ,;ii;;;:,...............,i111tt11111tffftttttt1tttttfft\nttttttttttttttt11ttttttt11ttft,...............;;;;;:,.................ittttttt11ttffffftttttfffttttt\ntfffftttftttttt11ttttttt11ttf1,...............:;;;::,.......,,,.......;tttttfftttfffftfttttttttffttf\ntfffttttfffffft11ttttttt1111t1,...............:;;;::........,;i;:,....;t1ttfttt1tfffffffttfffffffttf\ntfffttttftffft111ttttttt11t111,...............,::::,........:iiiii:...;t11tt1111tffffLffttfffffffttf\ntffft1tttfffft111ttttttt11ttt1,..... ..........::::,.......,;iiii;,...it11111tt1tfffLfLfttfffftffttf\ntttttttttttttt111ttttttt11tt1:... .,..........,:::.........:;;i;,...,1t1t11tft11tfffffftttffttffttt\nttttt1tttttttt111ttttttt1tt1:,...:;ii:.........,::,.........,:;;:.....,it1111tt11ttttttt11tttttffttt\nttttt1tttttttt11ttttttttt1t;::,;iiii;,.........,:,,...........,,,......,;11111111ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfft1ti:,,;;;:;;,.........,:,,.......... ..........:tttt1111ttttttt111tttttfttt\n11ttt1tttttttt11ttttttttttt1,.,::::;;:.........,:,,...............,....;ttttt1111ttttttt111ttttttt1t\n11tt11tttt1tt111111111111ttti:,,,::;:..........,:,,............ ......;ttttt11111111111111111111t111\n1111111111111111111111tttttttt1:,,,............,:,.............,. .,;11tttttt1111111111111111111111\n1111111111111111111111tttttttttt1:.............,,............ .11ii1ttttttt1111111111111111111111111\n111111111111111111111111tttttt111,.............,::,,...........ittttttttttttt11111111111111111111111\n11111111111111111111111111111111;..............,;;;:,..........:11tttttttttttttt11111111111111t11111\n11111111111111111111111111111111;..............,;;;:,...........:11tttttttttttttttt1111111ttttt11111\n11111111111111111111111111111111:..............,;;;;:...........:1ttttttttttttttttttttttt1ttttt11111\n11111111111111111111111111111111:..............,;i;::,..........,1tttttttttttttttttttttttttttttt1111\n","ttftffftttttttfffffttfffttftttttttttt111tttt1111111ttttt11111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffffttttt111111111111111ttffttftttttttt11111tttt\ntfttttttttttttttffffLffttfffffffLLLft11tttttt111tfffffffttttttttt11111ttttfffffftfLLfttttttt1111ttt1\nttttttttttttttttfffLfttffffffLLffffttt1ttttttt1ttfffffffffttttttt1111ttfftffffLftttfffffttt11111tttt\nttttttttttttffffttfffttffffffffftttfttttt111ttt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttfLLLfftttttffLftttttttt11ii11fffft1ttfftt11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttt1i:;:,,::;i1tttffffftt11111tft11111ttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttffLffftffttttfti:,,,,,,,,,:;tfffffttttt111tftttttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftffttttttti:::::;;;;;,,1ffttffttt11111111ttttttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLfftfftffftffffLLLfttttti;iiiii11111;:1ttfffffftt1111ttt1ttt1tftttt11tfffffLLfLfttt\nttfLLffffLLLLLLLLfftfLLftttfffffLLLLttttt;;i;;iiiiii1;:i11tfffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1ii;;;ii;;iii;tt11ttt111t1111tffttfftt11tfftttffLLLLLLLLffL\ntttffttfftffLftttttttttttttfLLLffLLftttt11ti;;;iiii1iii1ttt1ttt1111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttftttfLfffLfttttt11i;;;iii1iii1tttt1tfftt11111tfttffftt11tttttttttfLLffftttt\nttffffffffftttfffffffffttfftttfftffttttfft11;;;iiiii11tt111ttttttt1111tt1tffttffttfffffLLfttftfLffff\nttffffffffttttffffffffttttttttttfffttt1tft11i;iii11i11111tfft11ttt11111tt11tttfft1tffffLLLfttfLLLLLL\nttfffffffffttfffffffftt1ttt111tfffftttt11111i;i;iiii111ttfffft11111111tttt11tttt11tffffLLfftttfLLLLf\nttttttttfffttfffttttt1ttfftt111tfffttt111111;;i;;iii11i1ttffft11111111tttt111tttt11ttfffffLftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tffttt1t1ii1;;i;;iiii1;,::i11tt1tt1111ttt11tt1tfftt11111ttfftfLffftt\ntfttfffffttttttfffft1tffffttfft11tft11i::,,1ii;:;ii;it:,,...,,:;i11111tt111tt1ttfffftttttt11tttttfft\nttttfffffftttffftfft11tfffttfttttt1i:,....,it1i;;;;i1t;,,,,.......,;111t111ttt1tfffttttffftt11tffLLf\n1tttffffftt1ttfffft111ttfttft11i;:,........i1tt1ii1tt1:,,...........:1111111tt1tfftt1tfffffft1ffffLf\ntftttffttttt11tttt1ttt11t1111t;,...........,;;;11;;;;:..............,1t111111t1tftttttttfftt11tfffLf\ntfftttttttfftt1111ttttt11111tt:..............:;ii;;:,................it111tt11111tffftttttt1tttttfft\nttttttttttttttt11ttttttt11ttf1,..............,;;;;::,................it1tttttt1ttfffffftttttfffttttt\ntfffttttffttttt11ttttttt11ttfi................;;;:::,,:;:,...........;tttttttftttffffffttttttttffttf\ntfffttttfffffft11ttttttt1111ti................:;:::,.:;iii;,.........:111ttfftt1tfffffffttfffffffttf\ntfffttttftffff111ttttttt11t11;................,;:::,.;iiiii:.........:tt11ttt111tfffLfLfttfffffffttf\ntffft1tttfffft111ttttttt1tttt;................,::::,.:;;ii;,.........;ttt1111tt1tfffLLLfttfffftffttf\ntttttttttttttt111tttt1tt11ttti.................:::,...,;;i;,.........itttt11ttt11ffffffftttfftfffttt\ntttttttttttttt111ttttttt11tt1;.................:::,....,:;:,.........,1tt1111tt11ttttttt11tttttffttt\nttttt1tttttttt11ttttttttt1t11:.................:::,.... ..............:1111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfft11ti;,................,::,.........,......... :ttttt1111ttttttt111tttttfttt\n11tt11tttttttt11tttttttt1tt1iiii:..............::,,...................:1tttt111111tttttt111ttttttt1t\n11t1111tttttt1111111111t111iiiiii:.............,:,,,.................:1ttttt11111111111111111111t111\n11111111111111111111111t11i;;iiii;.............,:,,,........... .,;ttttttttt1111111111111111111111\n1111111111111111111111tt1t1i;;ii;,.............,,........... :i;;i1tttttttt1111111111111111111111111\n1111111111111111111111111ttti:,,...............,,,.......... :ttttttttttttttt1t111111111111111111111\n11111111111111111111111111111;::...............:;;::,........,i11ttttttttttttttt1111111111111tt11111\n111111111111111111111111111111t;...............:ii;;:,........;t1tttttttttttttttt1t1111111ttttt11111\n1111111111111111111111111111111:...............:;i;:::........:tttttttttttttttttttt1ttttt1ttttt11111\n1111111111111111111111111111111:............. ,;ii;;;:,..,,...:ttttttttttttttttttttttttttttttttt1111\n","ttfttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttttffLLttffffffftttttt1t111111111tfffffftttt1111111111111111ttffttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111ttttt\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLftttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttffttttt1111tt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffttttffffftttffftt11t111tt111ttfffLLftttftt1tt111tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttt11i;;;;i1tftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttffLLfftffttttti:::,,,,::;i1tffffffffttt111tft1tttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftfftttt11;,,,,,,,:,,,;tffffffffttt1111t11ttttttttttt1ttffffffLfffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttt1i;;;;iiiii:,:1tttfffffftt1111ttt1ttt1tfttt111tfffffLLfLfttt\nttfLfffffLLLLLLLLfftfLLftttfLfffLLLLttt1i1iiiii1111i::1111ttffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt11;;;iiiiiii:;ttt111tt111tt111tffttfftt11tfftttffLLLLLLLLffL\ntttffttffttfLftttttttttttttfLLLffLLftttt1i;;;iii;iii;ittfft11tt1111111tfftfffftttttttttttfLLLLffffff\nttffffffffftttfffffffffttfttfLLfffLfttt111;;;i111111iitfttt1tfftt11111tfttfffttt1tttttttttfLLftfttft\nttffffffffftttfffffffffttffttffftfftttttt1i;;iiiii1i1tft11tttttttt1111tt1tffttffttfffffLLfttftffffff\nttffffffffftttffffffffttttttttttfffttt1ttti;;;i111iitt111tfft11ttt111111t1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111tfffftttt111ii;iii;ii11111tfffft11111111tfft11tttt11tffffLLfftttfLLLLL\nttttttttfffttfffttttt1ttfft1111tffftttt1111;;;i;;;i111ttttffftt1111111tttt111tttt11ttfffffLftfLLLLLf\ntfttttttttttttttttt1ttfffftttt11tfft111tt1i;;;i;;i1i1;i11tffftt11t1111ttt11tt1tfftt11111ttfftfLffftt\ntfttffffftt11ttfffftttffffttfft11tft11ii;ii;;;;:;iii1,.,,,:;iii1ttt111tt111tt1ttfffftttttt11ttttfftt\nttttfffffftttffftfft11tfffttftttttt1;:,..:11;;i;;;;11:,,,.....,,:i1111tt111ttt1tffftttttfftt1ttffLLf\ntt1tffffftt1ttfffft1111tfttft1111i:,.....,i11iiiii1tt:.,..........:111111t11tt1tffft1tfffffft1fLffLf\ntftttffttttt11tttt1ttt11t11111;:,.........;i11i1111t;..............;t11111111t1tfttttttfffftt1tfffLf\ntfftttttttfftt1111ttfft111111:.............,::;ii;;:...............:111111ttt111ttffftttfft1tttttfft\nttttttttttttttt11ttttttt11tt1,..............::;;;;;,...............,1111tttttt11tffLffftttttfftttttt\ntfffftttffttttt11ttttttt11tfi,..............,::;;::,,...............i111ttttfftttffffffttttttttffttf\ntfffttttfffffft11ttttttt111ti................::::::,:;;::,..........it111ttffttttfffLfLfttfffffffttf\ntfffttttftffff111ttttttt1tt1;................,;::::.:iiiii,.........;11111ttt11ttfffLfLfttfffffffttf\ntffft1tttfffft111ttttttt11tti,................::::,.:ii;ii:.........;tttt1111ttttfffLLLfttfffftffttf\ntttttttttttttt111ttttttt1ttf1.................,:::,.,:;iii:.. ......:ttttt11tft11tfffffftttfftfffttt\ntttttttttttttt111ttttttt1ttt;::...............,:::,. .:;ii:..........;ttt1111tt11tttttft11tttttffttt\nttttt1tttttttt11ttttttttt1t111i;,..............:::,....,::,...........;1111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfftt1iiiiii:.............:::,.... ............. :ttttt1111ttttttt111ttttffttt\nt1ttt1tttttttt111ttttttttt1i;iiii;,............,:,,,................. ,1tttt111111tttttt111ttttttt1t\n11t1111tt1ttt11111111111111i;iii1i,............,::,,.................:1tttt11111111111111111111tt111\n11111111111111111111111111t1;;;;;,.............,:,,,.......... .:1tttttt111111111111111111111111\n1111111111111111111111111t11;,.................,:,,..........,;:::;1ttttttt1111111111111111111111111\n11111111111111111111111111111:..,..............,,............:ttttttttttttttttt111111111111111111111\n111111111111111111111111111111ii;..............,::,...........i111ttttttttttt11111t11111111111111111\n111111111111111111111111111111t;...............,;ii;::,.......:1ttttttttttttt11t1tt1111111ttttt11111\n111111111111111111111111111111i,...............:;ii;;;:,......,1ttttttttttttttttttt111111tttttt11111\n11111111111111111111111111111ti,...............:;ii;;;;:,..:..,1ttttttttttttttttttttttttttttttt11111\n","ttfttfffttttttffffttfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLttffffffffftttttt111111111tfffffftttt1111111111111111ttftttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLftttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttffftttt1111tt1ttffffffttttt1111t111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffftttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttfttttttttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttffLffftffttttt1ii::::;111tttffffffffttt111tft1tttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLfftffttttt1:,,,,,,,,:;ittffffffffttt1111t11ttttttttttt1ttffffffffffttt\ntttffttffLLLLLLLLLftffftfLftffffLLLftttti::,::::::,,,;ttttfffffftt1111tft1ttt1tffttt11tfffffLLfLfttt\nttfLffffffLLLLLLLfftfLLftttfLfffLLLfftt11iiiii111i;,,;t111tfffft111111ffft1tt11ttttt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiii1111i:,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\nttttftttttffLftttttttttttttfLLLffLLftttti;;;ii;iiii::1ttttt11tt1111111tfftfffftttttttttttfLLLLffffff\nttfLfffffffttffffffffffttfttfLLfffLfttt1i;;i1i;iiii:;tftttt1tfftt11111tfttfffttt1tttttttttfLLftftttt\nttffffffffftttffffffffftfffttffftffttttti;;iii111i1iitft11tttttttt1111tt11ffttffttfffffLLfttftfffffL\nttffffffffftttffffffffttttttttttfffttttti;;;ii1111ii1t111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111tfffftttt1i;;;iiiiii11111ttfffft11111111tfftt1tttt11tfffffLfftttfLLLLf\nttttttttfffttfffttttt1ttfft1111ttffttt111i;;ii;;;itt11ttttfffft1111111tttt111tttt11tttfffffftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tfft1t1t1i;;;ii;;it111ttttffftt11t1111ttt111t1tfftt11111ttfftfLffftt\ntfttffffftt11ttfffftttffffttfft1ttft11ii1;;;;i;:;i1;;i11tttft111tt1111tt111tt1tffffftttttt11ttttfftt\nttttfffffftttffftfft11tfffttftttt1i;:,,:1i;;;;i;;;1;.,,,;;i11111111111tt111ttt1tffftttttfftt1ttffLLf\n1tttffffftt1ttfffft111tffttft1ii:,.....,11iiiiiii1t:,,,.....,:;i111111111t11tt1tffft1tfffffft1fLffLf\ntftttffttttt11tttt1ttt11t11i;:,........,i1tt1ii11tt:,,,,........:t11111111111t1tfftttttfffftt1tfffLf\ntfftttttttfftt1111ttfftt11i,............::;;iiiii1;,,............it1111111ttt111ttffftttfft1tttttfft\nttttttttttttttt11ttttttt11;...............:;;;;:;;...............:111111tttttttttffLffftttttfftttttt\ntfffftttffttttt11ttttttt11:...............,;;;;;;:,..............,111111ttttfftttffffffttttttttffttf\ntfffttttfffffft11ttttttt11,...............,:;;;;:,...............,1111111ttffttttfffLfLfttfffffffttf\ntfffttttftffff111ttttttt11:...... ........:;;;;:,...............,11111111ttt1tttfffLfLfttfffffffttf\ntffft1tttfffft111ttttttt11:.......:;;;:....,;;::::.......,::,....,1tt11tt1111tt1tfffLLLfttfffftffttf\ntttttttttttttt111ttttttt11:.....:;;;;;:.....:;:::,.......,:iii;,.,1t1t11tt11tft1tffffffftttfftfffttt\ntttttttttttttt111ttttttt1i,.....:;:;;;:.....,::::,........;;iii;..;t1111t1111tt11tttttftt1tttttffttt\nttttt1tttttttt11tttttttt1i,.....:::;;;,......::::,.......,;;ii;:..,;1t11111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttttttti....,,,,:;;,.......,:::,,.......,;;;;,....,it11tttt1111ttttttt111ttttffttt\n11tt11tttttttt111ttttttt1:,,.,,,..,,,.........::::,........,:;,..... ,1tttttt11111ttttt1111ttttttt1t\n1111111tttttt11111111111i,,..,,,.... .........::::,..................itttt111111111111111111111tt111\n1111111111111111111111111,...,,...............,::,,,...........,,...;tttttt1111111111111111111111111\n11111111111111111111111111,..... .............,::,,,......... . .:1tttttt1111111111111111111111111\n1111111111111111111111111ti,,,.,,..............::,,..........,,,::i1tttttttttt1111111111111111111111\n11111111111111111111111111111i11;..............:,............,1tttttttttttttt11111111111111111111111\n1111111111111111111111111111111i...............:;:::::,.......;tttttttttttttt11t1ttt111111ttttt11111\n1111111111111111111111111111111:...............:iiii;;::,......ittttttttttttttttttttt1111tttttt11111\n1111111111111111111111111111111,...............:iiiii;;:,......,1tttttttttttttttttttttttttttttt11111\n","tttttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLftfffffffffttt1tt111111111tfffffftttt1111111111111111ttftttftttttttt11111tttt\nttttttttttttttttfffffftttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1tffffftttffftt11t111tt111ttfffLLffttfft1tt111tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttfLLffftfftttttftttttttffttttffffffffftt111tftttttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftffttttttiii;::::i1ttttffffffffftt1111t11ttttttttttttttffffffffffttt\ntttffttffLLLLLLLLLftffftfLfttfffLLLfttt11:,,,,,,,:::itttttfffffft11111tft1ttt1tffttt11tfffffLLfLfttt\ntffLffffffLLLLLLLfftfLLftttfLfffLLLLfttt1i::::,,::,,,itt11tfffft111111ffft1tt11tt1tt1ttffLLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttttiiiiii1i;:,,:ttt111ttt11tt111tffttfftt1ttfftttffLLLLLLLLffL\nttttftttttffLftttttttttttttfLLLffLLftttti;iiii111i;:,iftftt11ttt11111tffftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttfttfLLfffLfttt1;;;ii;iiii;::1ffttt1tffft11111ffttfffttt11ttttttttfLfftftttt\nttffffffffftttffffffffftfffttffftfftttt1;;i1i;;iii;:itft11tttttfttt111tt1tffttffttfffffLLftfftfffffL\nttffffffffftttffffffffttttttttttffftttt1;;iiii111iii1t111tfft1tttt111111t1ttttfftttfffffLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111ttffftttti;;iiiiiiiii1111ttfffft11111111tffttttttt11tfffffLfftttfLLLLL\nttttttttfffttfffttttt1ttfft1111ttfftttt1;;;iiii;;itt11tffffffft1111111tttt111tftt11tttfffffftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tfftttt1i;;;;ii;;it1111tftfffft11t1111ttt111t1tfftt11111ttfftfLffftt\ntfttfffffttt1ttfffftttffftttfft11tft111i;;;;;ii;;i111111tttft111tt1111ttt11tt1tffffftttttt11ttttffft\nttttfffffftttffftfft11tfffttfttt11i;;:ii;;;;iiiii1;11tt111t11111tt1111tt111tft1tffffttfffftt11tffLLf\n1tttffffft11ttfffft1111tfttftii;:,....;1i;;;;ii111,,:;i1tt11tt11111111111t11tt1tffft1tfffffft1fLffLf\ntftttffttttt11ttt11ttt1111i;:,.......,i1tiiii;;11i,,,..,:;i1t1t111t1111111111t1tfftttttfffftt1tfffLf\ntfftttttttffttt111ttttt1i:...........,ii111iii11i:.,,......,:;1t111111111tttt111ttfLftttfftttttttfft\nttttttttttttttt11tttt11t;..............,::;;i1ti:,............,1t1111111tttffttttffLfffttttffffttttt\ntfffttttfftfttt11tttttt1,...............:;:;;;;;:..............;tt111111tttffftttffffffftttttttffttf\ntfffttttfffffft11tttttt1................,;;;;;;;:..............:t11111111ttffttttffLLfLfttfffffffttf\ntfffttttfttftt111tttttti............... .:;;;;;:,..............:1111111111tttttttffLLfLfttfffffffttf\ntffft1ttttttft111tttttt;............. .:;;;;;;:::..............:111tt11tt111ttt1tfffLLLfttfffftffttf\ntttttttttttttt111ttttt1,..............:;i;;i;::::..............:1ttt1111tt11tff1tffffffftttfftfffttt\nttttttttttt1tt111ttttt;..............:;;;;;i:::::..............;1111111111111tt11tttttftt1tttttffttt\nttttt1tttttttt11tttttt:..............:;;;::;:::::..............;t1111111111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttt1,........... .,,:,...,:::::..............,11i;;i111tttt1111ttttttt111ttttffttt\n11tt11ttttttt1111tttt;............,..... ...,::::...............:i;:;;i1ttttt11111tttttt111ttttttt1t\n11111111t1tt111111111,............,.........,::::,..............,:::;ii1tt111111111111111111111tt111\n111111111111111111111,............ .........,,,::,..............::::;i11tt11111111111111111111111111\n1111111111111111111111:....... .............,,:,,..............,::::i111t11111111111111111111111111\n11111111111111111111111:....,,,,.............,:::,,..................,1t1111111111111111111111111111\n111111111111111111111111iiii11t; .............,:,..,........ ..:1tttttt11111111111111111111111\n111111111111111111111111111111t:...............:,,,:,,......,,,,,:;;1tttttttt1t111tt1111111tttt11111\n111111111111111111111111111111t: .............::;ii;::,.....,i111ttttttttttttttt11ttt111111tttt11111\n111111111111111111111111111111t:..............:;;iiii;:,.....,i1ttttttttttttttttttttttttttttttt11111\n","tttttfttttttttffffffffffffftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLftfffffffffttt1tt111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\nttttttttttttttttffffLftttfffffffLLLfttttttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffffttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLffftfftttttfftffffffftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftfftttttt1iii::;i1ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\nttttfttfLLLLLLLLLLfftfftfLfttfffLLLfttt11:,::,,,,,:;1tttttfffffftt1111tft1ttt1tffttt11tfffffLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLLffLLLffttt1;:,,,,,,,,,;ttt11tfffft111111ffft1tt11ttttt1ttffLLLLLLLLfff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiiiiii;:,,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\nttttftttttffLftttttttttttttfLLLffLLfttt1i;iii1111i:,:1ftfft11ttt111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttfLfffLfttt1;;;i;iii1i:,;tffttt1tffft11111tfttfffttt11ttttttttfLLftfttft\nttffffffffftttffffffffftffftttfffffttt11;;;ii;;iii::1fft11tttttfttt111tt1tffttffttfffffLLffffffffffL\nttffffffffftttffffffffttttttttttfffttt1i;;iiiii11i;itt111tfft1tttt111111t1ttttfftttffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111ttfffttt1i;;iiiiiiiii1111ttfffft11t11111tffttttttt11ttffffLfftttfLLLLL\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;;1t11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tfftt111;;iiiii;;;1111ttftfffft11t1111tttt1tt1tffttt1111ttfftfLffftt\ntfttfffffttt1ttftfftttffftttfft11tft1i1i;;;;iii;;;111111tttft111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffftttt11tfftttfttt11i;;;1;;;;;iiii;i1t11t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\n1t1tffffft11ttffttt1111tftttti;:,,...:1i;;;;iiii1i:;i1ttt111tt11111111111t11tt1tffft1tffffffttfLffLf\ntftttfftt11t11ttt11ttt111i;:,,.......:11ii;;ii;11i,.,,:;11tt11tt11t1111111111t1tffttttffffftt1tfffLf\ntffttttttttftt1111ttttt1:............:1111iiii1ti;,,....,,;i1tttt11111111tttt111ttfLffttfftttttttfft\nttttttttttttttt111ttt1t;...............,:;;i1tt1;,..........,itttt111111tttttttttffLfffttttffffttttf\ntfffttttfftfttt11ttttt1,................:::::;i;:,...........,1ttt111111ttttfftttffffffftttttttffttf\ntffft1ttffffff111ttttti.................,;;;;;;;:,...........,1t111111111ttffttttffLLfLfttfffffffttf\ntffft1ttfttttt111ttttti................,,;;;;;;::,............it1111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttt;.............:;iii;;:;;:::,............it1111111tt111tttttfffLLLfttfffftffttf\nttttt1tttttttt111tttti,............,;;iiii::;::::,...........,1ttttt111ttt11tft1tfffffLftttfftfffttt\nttttt1tttt11tt111ttt1:.............:;;;iii;::::::............,1tttt1111111111tt1tttfttftt1tttttffttt\nttttt1tttttttt11tttti..............,;;;;:,,:::,,:............:tt11t11111111111t11ttttttt11tttttffttt\n1tttt1tttttttt11tttt:............. ,::,. .::,,,:........... :t1111111t111ttt1111ttttttt111ttttffttt\n11tt11tttttt111111ti.......................,:::::.............it111t11111tttt1111tttttt1111ttttttt1t\n1111111111111111111,.............,.........,:::::.............:1t11ii;:;11111111111111111111111tt111\n1111111111111111111:........................,,:::..............;ii;:;:;ii111111111111111111111111111\n11111111111111111111:....... ..............,,,:,...............,:::::;i1111111111111111111111111111\n111111111111111111111:......,,..............,,,:,...............:::;::;i11t1111111111111111111111111\n1111111111111111111111iiiiii1;...............,,,,.,..............,::::;11111111111111111111111111111\n11111111111111111111111111111;................,,:,,,...... .it1111111111111111111111111111\n1111111111111111111111111111t;...............;i;;;::,.....,,.....,,,;i1ttttttttt11tt111111ttttt11111\n1111111111111111111111111111t;...............:i;;i;::,....:i111111tttttttttttttttttttttttttttttt1111\n","tttttfttttttttffffftfffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLftfffffffftttt1t1111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\nttttttttttttttttffffLftttfffffffLLfftt1tttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\nttttttttttttffffttfffttffffffffftttftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfffttttt1tfffft1ttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLftttttttfffffftttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLffftffttttt111i;iitfftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftfftttt1;:,::,,,:;ittttffffffffftt1111t11ttttttttttttttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttfffLLLftt1i:,,,,,,,,,,:1tttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLLffLLLftt1i;;;;;;;i;:,:tftt11tfffft11111tffft1tt11ttttt1ttfffLLLLLLLfff\ntfffffttttfLLLffttttfffffttLLLLfLLLft1;iiiii11111i::tffft11tttt11t111tfffttfftt1ttfftttffLLLLLLLLffL\ntttfftttttffLftttttttttttttfLLLffLLftt11;;;iiiiiii:;tffffft11tt1111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttLLfffLft11i;;;;i;;iii;tffffttt1tffft11111tfttfffttt1tttttttttfLLftffttt\nttffffffffftttffffffffftffffttfftfttt11i;;;i1iii1iitffft11tttttfft1111tt1tffttffttfffffLLfffftfLffLL\nttffffffffftttffffffffttttttttttffftt11i;;;iii111ii1tt111tfft1ttft111111t1ttttfftttffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111ttffftttti;;;;iiiiii11111ttfffft11t11111tfftttttttt1tfffffLLftttfLLLLf\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;itt11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\ntftttttttttttt1tttt11tfffft1tt11tfft111;;;;;iii;;it111ttfffffft11t1111tttt1tt1tffftt1111ttfftfLffftt\ntfttffffftt11ttftfftttffftttfft11tti;;1;;;:;iii::i111111ttfft111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffftttt11tfftttft1i;:,..,1i;;;;iii;i;:;;1t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\n1tttffffft11ttffftt1111tt1ii:,,......,i1i;;;ii;11;...,:;i111tt11111111111t11tf1tfffttfffffffttfLffLf\ntfttttftt11t11ttt11ttt11;,,..........,11t1iiii1t1:,,.....,:i111111t1111111111t1tffttttffffttt1tfffLf\ntffttttttttfttt111ttttti,.............:;;iii11t1i,,.........,ittt11111111tttt11tttfLffttffttttttffft\nttttttttttttttt111tttt1:................:;;;;;i;:,...........:ttt1111111tttffttttffLLffttttffftttttf\ntfffttttftttttt11ttttti.................,;;;ii;;:............,1ttt11111ttttffftttffffffttttttttffttf\ntffft1ttfffftf111ttttti..................:;;;i;;:,...........,1tt11111111ttffttttffLLfLfttfffffffttf\ntffft1ttfttttt111ttttt;..................,;;;;;::,...........,1t1111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttt;...........,,.....,;;:;:::............,111111111tt111tttttfffLLLfttfffftffttf\nttttt1tttttttt111tttti,........,;ii:......:;:::::............,ittttt111ttt11tft1tfffffLftttfftfffttt\nttttt1tttt111t111tttt;........:;;;;:,.....,;:::::.............ittttt1111t1111tt1ttfttttttttttttffttt\nttttt1tttttttt11tttt1,.......,:::;;;,......::::::.............;tt1t1111111ttt1tttfttttttt1tttttffttt\n1tttt1tttttttt11tttti.........,:::;:.......,:::::..........,,:;1t11111111ttff1111ttttttt111ttttffttt\n111111tttttt111111t1,..........,:::........,:::::..........,:;;i1111t111ttttt11111ttttt1111ttttttt1t\n1111111111111111111;............,,.........,::::,.........,:;;;i1111111111111111111111111111111tt111\n11111111111111111111:.......................,:::,.. ......,:;;ii111111111111111111111111111111111111\n111111111111111111111:.......,..............,:::,..........,::i11t1111111111111111111111111111111111\n1111111111111111111111:,,..,, ..............,,,::,............,1111111111111111111111111111111111111\n1111111111111111111111111i11:...............,..,:,,..... ..:1t11111111111111111111111111111111111\n111111111111111111111111111;................,::::,,.....::::;i11tttt111111t1111111111111111111111111\n111111111111111111111111111,.................ii;;::,....:1tttt1ttttttttttttttttt11tt111111ttttt11111\n1111111111111111111111111ti..................;i;;;:,.....;t1ttttttttttttttttttttt1ttttttttttttt11111\n","ttffftfffttttttttftttfffttftttttttttt111tttt111111tttttttt111tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLLftfffffffftttt1t111t111t11tfffffftttt111111111111111tttftttfttttttttt1111tttt\nttttttttttttttttffffLftttfffffffLLffttttttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111tttt1\nttttttttttttttftfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttffffttfffttffffffffftttfttttt1111tt1ttffffffttttt1111tt11111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttffftttt11tttffttttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLftt11ii;i;;ii1tttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLffftfftt1:,,,,,,,,:iftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftff1i;;:,,,,,,,,:;ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttfffLLLt;,,:;;;;;iiii:ittttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLLffLLLfi,:iiii111111;1ffftt11tfffft11111tffftt1t1tttttt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfffffi:;;;;;iiiiiiitffffft11tttt11t111tfffttffft1ttfftttffLLLLLLLLffL\ntttfftttttfffftttttttttttttfLLLffLLti;;;;;i;;iiii1ftffffftt11tt1111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttfLfffLtii;;;ii;;i1111tfffffttt1tffft11111tfttffftttttttttttttfLLfffffft\nttffffffffftttffffffffftffffttfftftt1ii;;;;;;iii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\nttffffffffftttffffffffttttttttttffftt11i;;;;;i111111tt111tfft1ttft11111tt1ttttfftttffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt1111tfffttti;;;;;;iiiii11111ttfffft11t11111tfftttttttt1ttfffLLLftttfLLLLf\nttttttttfffttfffttttt1ttfft11111tfft11i;;;:;;ii;;itt11ttfffffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntftttttttttttt1tttt11ttffft1tt11ttti::i;;;:;iii;;;i;i1ttftfffft1tt1111tttt1tt1tffftt1111tffftfLffftt\ntfttffffftt11ttftfft1tffftttff1i;:,...;1;;;;;i;:;i,..,:;i1tft111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffftttt11tfft11i;:,......,11;iii;;iii,,,....,:;i1111t1111tt111tft1fffffttfffftt11tffLLf\n1tttffffft11ttffftt1111t1;;,..........,i1t11ii11i:.,........,111111111111t11tt1tfffttfffffffttfLffLf\ntfttttftt11t11ttt11ttt11:..............;iiiiiii11,,,......,,,itt11t1111111111t1tffttttffffftt1tfffLf\ntffttttttttfttt111ttttt;................,;;;i;;ii,...........;ttt11111111ttt111tttfLffttfft1ttttffft\nttttttttttttttt111ttt11:.................:;;;i;::............;ttt1111111tttftttttffLLffttttffffttttf\ntfffttttftttttt11ttttt1,.................,;;;;;;:............:ttttt11111tttffftttffffffftttttttffttf\ntffft1ttfffftf111ttttt1,..................:;;;:::............:1tt11111111ttffttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttti...................,;;::::............,111111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttt:...................,::::::,:::,.......,1t1t11111tt111tttttfffLLLfttfffftffttf\nttttt1tttttttt111tttt1,....................,::::::;;;ii:......ittt11111ttt1ttff1tfffffLftttfftfffttt\nttttt1ttttt11t111tttti.....................,:::::,;;;ii;,.....itttt1111tt111tttttttttttttttttttffttt\nttttt1tttttttt11ttttt;........ .............:::::,;;;ii;,.....:1t1t1111111tttttttfttttttt1tttttffttt\n1tttt1tttttttt11ttttt:.... :i;:.............:::::..,;;i:.......it11111111ttff1111tfttttt11tttttffttt\n11tt11tttttt1111111t1,...,;iiii;, ..........::::,. .,:,......;111111111ttttt1111ttttttt111ttttttt1t\n11111111111111111111i..,.,;;;iii;...........:::::.......,....itt1111111111111111111111111111111tt111\n11t111111111111111111;....::;;ii;...........::::,..........,;111111111111111111111111111111111111111\n1111111111111111111111, ...,:;;;,............,,:,.....,,:;11tt11111111111111111111111111111111111111\n1111111111111111111111i:,....... ............,,:,.....:1tttttt11111111111111111111111111111111111111\n1111111111111111111111111;.,. ..............;;;:,,....,it11ttt11111111111t11111111111111111111111111\n111111111111111111111111i,..................;ii;:,.....,1t1ttttt1111111111t1111111111111111111111111\n111111111111111111111111:...................;ii;;:......;ttttttttttt11tttt1t111111tt11111111ttt11111\n111111111111111111111111:...................:i;:;;,.....:t1tttttttttttttttttttttt1tttttttttttttt1111\n","ttffftfffttttttttttttfffttftt111ttttt111tttt111111ttttttttt11tttt111111ttttttttttttttttttttt111111tt\nttfftttttttttttttttffLLftfffffffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\nttttttttttttttttffffLftttfffffffLLfft111ttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\nttttttttttttfffftttffttffffffffftttftt1t1iii11111tfffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttffft11i:,,,::::;1tfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfft1;:,,,,,,,,,:tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffLfftt1::,,,,,:::::;itfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\ntttttttfLLLLLLLLLLfttttffftffffttf1,,,,:;iii1111itftttfffffffffftt1111t11ttffttttttttttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttffffft:,,,:;iii111ii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLfffLft:,,:;;;;iiiiii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttfLLfffft;:::;;;iii;iii1tffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\ntttfftttttfffftttttttttttttfLLLffffti;;;i;;iii;iitfffffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttfLftfft1i;;;;;iiiii11ffffftttt1tffft11111tfttffftttttttttttttfLLffffftt\nttffffffffftttfffffffftttfftttftttttt1;;;;;iiiii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\nttffffffffftttffffffffttttttttttfftt11i;;;;;;ii1111ttt111tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\ntttffffffffttfffffffft11ttt1111ttff1;i;;;;;;;ii;iiii111ttfffft11t11111tfftttttttt1tffffLLLftttfLLLLf\nttttttttfffttffftt1tt1tttft1111tt1;,.:i;;;;;iii::;;,,:;i1tfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntfttttttttttttttttt11ttffft1tti;:,...,ii;;;;ii;::;;.....,:itftt1tt1111tttt1tt1tffftt1111tffftfLffftt\ntfttffffftt11ttftfft1tttft1i;:,.......:11iiii;;;:;:,,,,,,..;t111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffttttt11tti;:,..........,1tt1ii11i;;,,.,.,,,,,1111t11111tt111tft1tffffttfffftt11tffLLf\n1tttffffft11ttttttt1111;...............:11iiii;;1;.,.,,.,..,1t11111111111t11tf1tfffttfffffffttfLffLf\ntfttttftt11t11ttt111tt1,................,;;;ii;i1:.........,111t1111111111111t1tffttttffffftt1tfffLf\ntffttttttttftt11111ttt;..................:;;;;:;i:..........itttt11111111ttt111tttfLffttfft1tttttfft\ntttttttttttttt1111ttt1:..................,;;;;:::,..,.......;tttt1111111tttffttttffLLffttttffftttttf\ntfffttttftttttt11tttt;....................:;;::::,,.........:ttttt111111ttttfftttffffffftttttttffttf\ntffft1ttfftttt111tttt:....................,;:::,:;;;;:,.....:1ttt11111111ttffttttffLLfLfttfffffffttf\ntffft1ttfttttt111ttt1,.....................:::,,::;iii;,.....itt1111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttt;......................,::,,::;;;i;,.....:111111111tt111tttttfffLLLfttfffftffttf\nttttt11ttttttt111tt1:......................,:,..:,:;;i;.......:tttt1111ttt1ttffttffffffftttfftfffttt\nttttt1ttttt111111tt1:......................,:,..:. .:;:......,itttt1111tt111ttttttfttffft1tftttffttt\nttttt1tttttttt111tt1:........... .........,,,.,:...........,1tt11tt111111ttt1ttttffftttt1tftttffttt\nttttt1tttttttt11ttti,......... .,..........,,,.,:..........,it11111111111ttft1111ttttttt11tttttffttt\n11tt11ttttt111111tt:..........,::;,........,,,.,:......,:i11t11111111111ttttt1111ttttttt111ttttttt1t\n11111111111111111111:........:;;ii;.........,,.,,.....i1ttt11t11t111111111111111111111111111111tt111\n1111111111111111111ti........,:;;i;,...........,,.....;t11111111111111111111111111111111111111111111\n11111111111111111111ti;,......,:;;;. ......,:,.,:.....,1t1t11111111111111111111111111111111111111111\n11111111111111111111111;........,,,........:;::,,......;t1tttt11111111111111111111111111111111111111\n1111111111111111111111i......... ........:;;::,......,1ttttt11111111111t11111111111111111111111111\n1111111111111111111111:........ ...........:;;;::.......it1ttttt1111111111t1111111111111111111111111\n111111111111111111111i,........,......... ,ii;;::,......:ttttttttttt11ttt1tt11t111tt111111t1tttt1111\n11111111111111111111t;.........,..........:iiii;::,.....,1ttttttttttttttt1ttt1ttt1tttttttttttttt1111\n","ttttftfffttttttttttttfffttttt111ttttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLLftffftfffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\nttttttttttttttttfffffftttfffffffLLLft111tttttt11tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\nttttttttttttttttfffffttfffffffffffft11111;:::;;i1tffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\nttttttttttttfffftttffttffffffffftttft1;::,,,,,,,,ifffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttff1;:,,,,,,,,,,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffttt1:,,,,:::;;i;;1tttftttffffffftt1111tftt111tttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffLfftt;,,,,,:;ii11t11tfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\ntttttttfLLLLLLLLLLfttttffffffffttt;,,,,:;;;iii1111ttttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttttfft:,,,,:;;;iiiiii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfffftttfLftfLfi;;;;;;;iii1iii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttfLLftfffi;;;i;;;;iiiii1fffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\ntttfftttttffffttttttttttttttffftffft;;;;;;;;iiii1tttfffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\nttffffffffftttfffffffffttftttffftfft1;;;;;;;;iii1ttfffffttt1tffft11111tfttfLftttttttttttttfLLftffftt\nttffffffffftttfffffffftttfftttftttt1i;;;;;;;;ii111tffftt11tttttfftt111tt1tffttffttfffffLLffffffLffLL\nttffffffffttttfffffffft1tt1111ttt1::i;;;;;;;i1i;i111ttt11tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\ntttffffffffttffffffftt111tt111i;:,..;i;;i;iii11;;;;,::;1tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\nttttttttfffttffttttt111ttt1;:,......,ii;;iii;11;:;;,...,:1fffft1111111ttftt1ttfft11ttffffffftfLLLLLf\ntftttttttttttt11tt111tt1;:,..........;11iii;1t1;:;;,,,,,.:tfttt1tt1111tttt1tt1tffftt1111ttfftfLffftt\ntfttffffftt11tttttt111:..............:1tt1ii11i::;:,,,,,,,if1111tt1111ttt11tf1tfffffttttttttttttffft\n111tfffffft1tfftttt11;................:ii;;i;:,,;;,.,,.,..it1111111111tt111tft1tffffttfffftt1ttffLLf\n1tttffffft111tttttt1i,............,....:;;;;;;:,1i,..,,,..;ttt11111111111t11tt1tfffttfffffffttfLfLLL\ntfttttftt1t111ttt111;..................,;;;;;:,:1i,.......it111t11t1111111111t1tffttttffffftt1tffLLf\ntffttttttttft1111111,...................:;;;::,,;;,.......it1tttt11111111ttt111tttfLffttfft1tttttfft\ntttttttttttttt1111t;....................,;;:::,.:,..,.....:tttttt1111111tttffttttffLLffttttffffttttf\ntfffttttfttttt111t1,.....................;;:::..:,........,1tttttt111111ttttfftttffffffftttttttffttf\ntffft1ttfftttt111ti......................::::,..:,.....,:::i1ttt111111111ttffttttffLLfLfttfffffffttf\nttfft1tttttttt111t:......................,:::,..:,....,:;iiiitt11111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt1111;.......................,:,...:,....:;;iiii1111111111tt111tftttfffLLLfttfffftffttf\nttttt11ttttttt111t;...................,,,,,,,...,......,;;ii1111ttt1111ttt1tfffttffffffftttfftfffttt\nttttt11tt11111111i,.................,::::::,....:........,,:i1111tt1111tt111ttttttfffffft1tftttffttt\nttttt11ttttttt11t;.................,:;;;;;;,....:.... .. .,1t11ttt1111111ttt1ttttffffttt1tftttffttt\nttttt11ttttttt1111:................,::::;i:.....:.,..,,,:;i11tttt111111111tft1111ttttttt11tttttffttt\n111tt11ttt1111111t1:. ............::::;:.....,:....it11111tt1tt1111111ttttt1111ttttttt111ttttttt1t\n11111111111111111111i:,..............,,,,......,:....:1tt111111t1111111111111111111111111111111tt111\n11111111111111111111t11:........,.... . ..,....:.....it1t111t11111111111111111111111111111111111111\n11111111111111111111111:,..................:....:.....:1ttt11t11t11111111111111111111111111111111111\n1111111111111111111111i,...................:....:......it1ttttt1tt11111111111t1111111111111111111111\n1111111111111111111111;....................,,..,:,.....:tttttttt111111111111111111111111111111111111\n1111111111111111111111:.................. .::..,:......,1t1ttttt11t1t11111t1111111111111111111111111\n11111111111111111111ti,.................. ,;::,,:.......itttttttttttt111t1tt11t111tt111tttt1tttt1111\n11111111111111111111t;....................,;;;:,:.......:tttttttttttttttt1ttt1ttt1tttttttttttttt1111\n","tttttttttttttttttttttffftttt1111111tt1111tt1111111ttttttttt11tttt1111111ttttttttttttttttttt1111111tt\nttfttttttttttttttttffLfttffttfffttttt1111111111111tffffftttt111111111111111tttffttftttttttt11111tttt\nttttttttttttttttffffLftttfffffffffftt11111iii1i11ffffffffttttttt111111tttttffffftfLLfttttttt111ttttt\nttttttttttttttttffffftttffffffffffttt11;::,,,,,:;1ffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffttttt1;:,,,,,,,,,,:tffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLfttttttft;,,,,,,,,:::,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffttt;,,,,,,:;ii1111tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffffft1:,,,,,:;iii11111fttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLLLLLLLLLffttttffftfffftt1:,,,,,:;;;iiiii1ftttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\ntttffttfLLLLLLLLLLfttfttffftttttft::;;::;;iiiiiii1ttttttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\nttffffffffLLLLLLffftfffttttffftfLfi:;i;;;;;iiiiii1tffftt11tfffft111111ffftt1tt1tt1tttttfffLLLLLLffff\ntffftfttttfLLLfftttttffffttfLLftfff;:;;;;;;;iiiii1tffffftt1tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\ntttttttttttfffttttttttttttttffffffft;;;;;;;;iiii1ttffffffft1ttt1111111tfftfffftttttttttttfLLLLffffff\nttffffffffftttfffffffffttft1tfffttt1i;;;;;;;;iii1ttfffftttt1tffft11111tfttffftttttttttttttfLLfffffft\nttffffffffftttfffffffftttffttttti::i;;;i;;;;ii1111tttttt11tttttfftt111tt1tffttffttfffffLLffffffLLfLL\nttffffffffttttfffffffft1ttt11i;:,.,ii;;iiiii11:i1111tt111tfft1ttft11111tt1ttttffttttfffLLLfttfLLLLLL\ntttffffffffttffffffftt111i;:,......:11;;iiiii1::;;;::;i1ttffft11t11111tfftttttttt1ttffffLfftttLLLLLf\nttttttttfffttfttt1111ii;:,.........,it1iii;;1ti::;;,..,:1tfffft1111111ttttt11tfft11ttffffffftfLLLLLf\ntfttttttttt1tt111111;,..............;1111ii1ti:;:;;,,,,.:tffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\ntfttfffftt1111ttttti,................:;;;i;;;,,:;;:,,,,,,itt1111tt1111ttt11tf1tffffftttttt1tttttffft\n111tfffffft1ttttttt:..........,,......:;;;;;;,.,i;,,,,,,.;t111111111111t111tft1tffffttfffftt1ttffLLf\n111ttfffft111ttttt1,............,.....,;;;;;:,.:1i,......;11t111111111111t11tt1tfffttfffffffttfLfLLL\ntttt1tftt11111tt11;....................:;;;;:,.:1i,......:tt11111111111111111t1tffttttffffftt1tffLLf\nttft11ttttttt1111i,....................,:;:;:.,,;:,......:111tttt11111111tttt11tttfLffttfft1tttttfft\ntttttt1ttttttt111;......................,;:;:..,:,.......:11tttttt111111tttffttttffLLffttttffffttttf\ntffft11ttttttt11i,.......................:::,..,:,.......,1tttttttt11111ttttfftttffffffftttftttffttf\ntffft11ttttttt11;........................,:::,..:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt11;......................,:;;;;;;,:,........,111tt1111111111tttttttffLLfLfttfffffffttf\ntfttt11ttttttt11i.....................:::;;;;;:.:,....... ,1t11111111111t111tftttfffLLLfttfffftffttf\ntttt111ttttttt11:....................,:::;;;;;.,:,..........,:;iii11111ttt11tffttffffffftttfftfffttt\nttttt11tt1111111,....................,:::;;;;,.,:.......... .::;;;;ii11111ttftttftfffft1tftttffttt\nttttt11ttttttt11i................. ....,,,,.....:.... ........,:::;;;;ii111tt1tttfffffttt1tftttffttt\nttttt11ttttttt11ti,. .........,... .. ....,..:,.. ....,:::;;;iii1ttt1111ttttttt11tttttffttt\n11111111ttt111111t1ii;;;,.......................:..,.:1;:,,.. ..,;i1i1t1ttt1111ttttttt111ttttttt1t\n1111111111111111111ttttt:,......................:.. ,tttt111i;;;;i1tt1111111111111111111111111tt111\n111111111111111111111111:,..................,...:.....it1t1ttttttttt11111111111111111111111111111111\n111111111111111111111111;,..................,...:.... ;tttt11t11t11111111111111111111111111111111111\n111111111111111111111111:...................,..,:.....:ttttttttttt1111111111111111111111111111111111\n11111111111111111111111i,...................:,.,:.....,1ttttttttt11111111111111111111111111111111111\n11111111111111111111111;...................,::..:.....,1ttttttttt1t11t1111t1111111111111111111111111\n11111111111111111111111:.................. :;:,,:......itttttttttttttt111ttt11t1111t111t1ttttttt1111\n111111111111111111111t1:.................. :;;:::......;ttttttttttttttttt1ttt1ttt11ttttttttttttt1111\n","tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\ntttttttttttttttttffffftttffffffffffft111tt111111ttffffffttttttttt11111tttttffffftfLLftttttt11111ttt1\nttttttttttttttttffffftttffffffLffftt111i;;:::::;1tffffffffttttttt11111tfffffffLfftfffffftttt111ttttt\nttttttttttttfffftttffttffffffffttttt1i;,,,,,,,,,,;fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLftttttttti:,,,,,,,,,,,,;tfffftttfffft11t111tt111tttffLLfttfftt1tt111tttttt\nttttttttffLLLLLLLffttfLLffttfffttti,,,,,,:;;;ii;itttttttffffffftt1111tftt1tttttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffffft1:,,,,::;i111tt1tfttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLfLLLLLLLLfttttffftfffftti,,,,,,:;;iiii1i1ftttfffffffffft11111t11ttftttttttttttfffffLLfLfttt\ntttffttfLLLLLLLLLLfttfttffftttttf1,,::,:;iiiiiiii1ttttttttfffffftt1111tft1ttt1ttfttt11tffffLLLLLfttt\nttfffftfffLLLLLfffftfffttttffftfLf;:ii;;;;iii11ii1tfffft11tfffft111111ffft11t1ttt1tt1tffffLLLLLLLfff\ntffftfttttfLLLfttttttffffttfLLftff1:;ii;;;;iiiiii1ffffftt11tttt1ttt111fffttfffttttfft1tffLLLLLLLLffL\ntttttttttttfffttttttttttttttfffffff1;;;;;;;iiiii1tffffffftt1ttt1111111tfftfffftttttttttttfLLLLffffff\nttffffffffftttffffffffftttt1tffftft1i;;;;;;;iiii1ttfffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\nttffffffffttttfffffffft1tftt1tft1;ii;;;;;;;;ii1111ttftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\nttffffffffttttfffffffft1tttt1ii;,.:i;;;i;iii111t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffftfttt111ii;:,....,i1;;iiiii1i:;;;i11111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\ntttttttttffttfttt1111ii;:,.........;11iiii;;11;::;;,:;1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntft1ttttttt1t1111111:,.............:1tt1iii1t1;;:;:,,.,:1tffftt11t1111ttt11tt1tffftt1111ttfftfLLfftt\ntttttffttt1111ttttt;................:iiiiii11,:;:;:,,,,.:tttt111tt1111ttt11tf1tffffftttttt1ttttttfft\n1tttfffffft1tftttt1,.................,;;;;:;:.,:i:,,,,,,,it11111111111tt111tft1tffffttfffftt11tffLLf\n111ttfffft111ttttti...................:;;;;;:,,:1;.......;t1tt11111111111t11tf1tfffttfffffffttfLfLLf\ntttt1tftt11111ttt1:...................,;:;;;:..;1;.......:tt111t11t1111111111t1tffttttffffftt11ffLLf\nttft1111ttttt1111;.....................:;:;;,..,;:.......,111tttt11111111tttt11tttfLffttfft1tt1tffft\n1tttt11ttttttt111,.....................,::;;,..,:,.......,1ttttttt111111tttffttttffLLffttttffffttttf\ntfftt11ttttttt11;.......................:::;,..,:,........itttttttt1111tttttfftttffffffftttftttffttf\nttfft11ttttttt11,.......................,;;;;:,,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt1i,.....................,::;i;;;,,:.........:111tt1111111111tttttttffLLfLfttfffffffttf\nttttt11ttttttt1i.....................,:::;i;i:.,:,........,1t1111t111111t111ttfttffLLLLfttfffttffttf\ntttt111ttt11t11;.....................,:::;;;;,.,:..........1tt111tt11111ttt1tffttffffffftttffftffttt\nttttt11t1111111:......................:::::,...,:..........:i1tttt1tt111t1111tttttfttffft1tttttffttt\nttttt11tttt11t1i.......................... ....,,.......... .,,:i11iii11111tt1t1ttffffttt1ttttttfttt\nttttt11tttttt111;... ......................,:............ .,:::;iiii1111111tfttttt11ttttttfttt\n11111111t1111111t1i;;::::......................,:..,:.. .......,::;;;;;;iii11111tttttt111ttttttt1t\n11111111111111111ttttttt1,.....................,:......:,.. ..,:;;;:;;;iiii11111111111111111tt111\n111111111111111111111111i,.................,::..,.... ,tt1ii;,,.. ..,:i;;iii111111111111111111111111\n111111111111111111111111i,.................,;:,,,......1tttttt11i;;::itt11t1111111111111111111111111\n111111111111111111111111i,................ ,;:::,......it1t1tttttttttt11tt11t111111111111111111t1111\n111111111111111111111111;................. ,;;::,......it1tttttttt1111111t11111111111111111111111111\n111111111111111111111111:................. .;;:::......;t1ttttttt1ttttt111t1111111111111111111111111\n111111111111111111111111,...................;i;::,.....;tt1ttttttttttt11tttttttt111t111111tttttt1111\n111111111111111111111111:...................:i;:::.....ittttttttttttttttttttt1ttt111tttttttttttt1111\n","tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\ntttttttttttttttttffffftttffffffffffft1111tttt111ttffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttffffftttffffffLffftt11111i;iiii1tfffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffttttt11;::,,,,,,::1fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLftttttttf1;:,,,,,,,,,,,itfffftttfffft11t111tt111tttffLLfttfftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLffttfffttt1,,,,,,,::::::itttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffLfft1:,,,,,:;ii11111ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLfLLLLLLLLfttttffftfffftt1:,,,,:;;iii1111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfLLLLLLLLLLfttfttffftttttf1,,,,,:;iiii;iii1ttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\nttfffftfffLLLLLfffftfffttttffftfLt:;;;:;;iiiiiii11tfffft11tfffft111111ffft1tt1ttt1tt1tfffLLLLLLLffff\ntffftfttttfLLLfttttttffftttfLLftff1;;;i;;;iii1iiitfffffft11tttt1ttt111fffttfffttttfftttffLLLLLLLLffL\ntttttttttttfffttttttttttttttffftfffi;;;;;;iiiiii1tffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttffffffffftttt1tffftffti;;;;;;iiiii1tttffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\nttffffffffftttfffffffftttftt1tftt111i;;;;;;;;ii111tfftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\ntttfffffffttttfffffffft1tt111111i::i;;;i;;;;i11t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffftfftt111111i;:,..,ii;;iiiii11:;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\ntttttttttffttfttt1111111i;:,.......:11;iiii;11;::;;,:i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntfttttttttt1t1111111i;:,...........:1t1iii;itt;;;;:.,,,:itffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\ntttttffftt1111ttttt1:..............,i111ii1tti:;;;:,,,,.,1tft111tt1111ttt11tf1tffffftttttt1ttttttftt\n111tfffffft1tfttttt;.................:;;;;;;;,.:i:.,,,,,.;t11111111111tt111tft1tffffttfffftt11tfffLf\n111ttfffft111ttttt1,..................:;;;;;:,.:1;.....,.:11tt11111111111t11tf1tfffttfffffffttfLfLLf\ntttt1tftt111111tt11,..................,;;;;;:,.;1;.......,1t111t11t1111111111tttffttttffffftt11fffLf\ntttt111tttttt11111;....................::;;;,..,;:.......,i11tttt11111111tttt11tttfLffttfft1tt1tffft\n1tttt11ttttttt111i.....................,::;;,..,:.........ittttttt111111tttffttttffLLffttttffffttttf\ntfftt11ttttttt111,......................::::,..,:,........itttttttt11111ttttfftttffffffftttttttffttf\nttfft11ttttttt11;.......................,:::,..,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt11:........................,:,,..,:,........,111tt1111111111tftttttffLLfLfttfffffffttf\nttttt11ttttttt11,.......................,,::,..,:..........it11111t11111t111tttttffLLLLfttffftfffttf\ntttt111tttt1t11i......................::;;;;;:.,:..........;t11tttt11111tt11tffttffffffftttffftffttt\nttttt11tt111111:....................,:::;i;;i,.,:..........;ttttttt1111111111tttttfttffft1tttttffttt\nttttt11ttttttt1;....................,:::;i;;:..,,...........:;iii1111111111tt1t1ttfffttt11ttttttfttt\nttttt11tttttt111:...................,:::;;;;...,,........... .,:;;;:;i1111ttt1111ttttttt11ttttttfttt\n11111111t11t11111;,.. ...............,,,....,:.... .......,:::::;;11tt11111111tt1tt1111ttttttt1t\n11111111111111111t11i;;;:.......,..... ......,,....,,. ...,::;::;i1111111111111111111111111tt111\n11111111111111111111tttti,...................,.,,... :1i:,. .,,;;i1111111111111111111111111111111\n111111111111111111111111i,...................:,,,.....ittt1i:,.. ,1tttt111111111111111111111111t1111\n111111111111111111111111;,...................,,::.... .111tttt1ii1ttt11111111t11111111111111111t1111\n111111111111111111111111;....................,:::......it1t11ttttt1111111111111111111111111111111111\n111111111111111111111111;....................,::,......;t1tttttt11tt1tt111t1111111111111111111111111\n11111111111111111111111t:....................::::......:1111ttttttttttt1tt11ttt11111111111tttttt1111\n11111111111111111111111t:....................:;::,.....,1tttttttttttttttttttttttt111tttttttttttt1111\n","tttftttttttttttttttttffftttttt11ttttt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfftfffttffttttt111111111t11ttffffftttt1111111111111111ttffttfttttttttt1111tttt\ntttttttttttttttttffffftttffffffffffft1111tttt111tfffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttffffftttffffffLfffttt1111ttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttftttffffffffttttft1i;:;;;;;i11tfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLfttttttfft1;:,,,,,,,,:1ttfffftttfffft11t111tt111tttffLLfttffft1ttt11tttttt\nttttttttfffLLLLLLffttfLLffttfffttti::,,,,,,,,,,;ttttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfffffti,,,,::;;;iiiii1ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLLLLLLLLLLftttttfftfffftt1:,,,;iii1111111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfttffftttttff:,,:;;;iiii1ii1tttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\nttfffftfffLLLLLfffttfffttttffftfLt;:,:;;;;iiiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffftfttttfLLffttttttffftttfLLftff1;;;;;iiiii;i11ttfffftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttfffLtfffii;;;;;ii;;iittffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttft1tffftffti;;;;;iiiii1ttttffffttt1tffft11111tfttfffttt1tttttttttfLLfffffft\nttffffffffftttfffffffftttfttttfttttti;;;;;iiii1111tfftft11ttttffff1111tt1tffttffttfffffLLffffffLffLL\nttffffffffttttfffffffft1tt11111tft11i;;;;;;;iit11111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffftttfffftfftt1111111111i:,;i;;;;;;ii1i;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\nttttt1tttffttfttt11t111tttt1i;:,...:1i;ii;ii;1i:;;i;;i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntfttttttttt1tt1111111ttt1;:,,.......;ti;iii;it1;;;;,..,:i1fffft11t1111ttt11tt1tffftt1111ttfftfLffftt\nttttfffftt1111ttttt111;:,...........;tt11iii1t1::;;,,,,,.,1ft111tt1111ttt11tf1tffffftttttt1ttttttftt\n111tfffffft1ttttttt11,..............:i11iii111:,;;,,,,,,,.;t1111t11111tt111tft1tffffttfffftt11tfffLf\n111ttfffft111ttttttt;.................:;;;;;;:.,ii,....,,.:1tt11111111111t11tf1tfffttfffffffttfLfLLf\ntttt1tftt11111ttt111:.................,;;i;;;,.,1i,.......:t111111t1111111111tttffttttffffftt11fffLf\ntttt11ttttttt1111111,..................:;;;;;,,,;;,.......:11tttt11111111tttt11tttfLffttfft1tt1tffft\n1tttt11ttttttt11111i...................,;;;;:,..:,........:1tttttt111111tttffttttfLLLLfttttffffttttf\ntfftt11ttttttt11111:....................:i;;:,.,:,........,1ttttttt1111ttttffftttffffffftttttttffttf\nttfft11ttftttt111ti,.....................;;::,..:,........,i1tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt111t;......................,::,...:,.........;11t11111111111ttt1tttffLLLLfttfffffffttf\nttttt11ttttttt111t:......................,::,...:,...,,....it11111111111t111tttttfffLLLfttfffftffttf\ntttt11tttt11tt1111,.......................,,,...:,...,:;;;;itt11ttt1111ttt1ttftttffffffftttffftffttt\nttttt11t111111111i.........................,,...:,...,:;iiii11111t111111t111tttttttttffft1tftttffttt\nttttt11ttttttt111,.........................,,...:....,:;;iii11111111111111ttttt1ttfffttt11ttttttfttt\nttttt11ttttttt111;...................,,,,..,....,......,:;ii1ttt1111111111ttt1111tfttttt11ttttttfttt\n11111111t11t11111t;...............,:::::::..,...:.........,,it11tt1111111tttt1111ttt1tt1111ttttttt1t\n1111111111111111111,.............:::::;;i:......:..... :1ttttt111111111111111111111111111111t111\n11111111111111111111;,.. ........,::::;;:.......,... ,i;;;i1tttt111111111111111111111111111111111111\n11111111111111111111t11i,.........,:::;;. ..,:,.:.....itttttttt1111111t111111111111111111111111t1111\n11111111111111111111111t;...........,,,.... ,:,,:......it1111ttt1111111111111111111111111111111t1111\n111111111111111111111111;.......... .... .:,,:,. ...:tttt11tt111111111111111111111111111111111111\n111111111111111111111111;....................::::..,,..,1tttttttt1tttt1111t1111111111111111111111111\n11111111111111111111111t;....................::::..,,...;t1tttttttttttt1t11ttttt111t111111tttttt1111\n11111111111111111111111ti....................:;::,......:11tttttttttttttttttttttt11t11t1111ttttt1111\n","tttftftttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfttfffttffttttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\nttttttttttttttttfffffftttffffffffffftt11ttttt111tffffffftttttttt11111ttttttffffftfLLfttttttt1111ttt1\nttttttttttttttttffffftttffffffLfffttttt11tttt11tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffftttft1tttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLftttttttfft11iiiiiittt1ttfffffttfffft11t111tt111tttffLLfttffft1ttt11tttttt\nttttttttfffLLLLLLffttfLLffttfffttfft;::,,,,,,:itttttffttffffffftt1111tftt11t11tfLLftttt1tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffffft11i:,,,,,,,,:,;fffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttfffttffftt1;:::::;;;iii;:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfttfLfttttfft;:;iii111111i;1ttttttttffffffftt1111ttt1ttt1ttftt11ttfffffLLLLfttt\nttfffftfffLLLLLLffftfffttttfffffLf;:;;;;ii1iiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffffftttffLLffftttttffffttfLLffffi:i;;;;;ii;ii11ttffffft11tttt1ttt11tfffttffft1ttfftttffLLLLLLLLffL\ntttttttttttffftttttttttttttfLfftffi;ii;ii;i11111tfffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttftttfLftf1;;;;;;;;i1111tttffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\nttffffffffftttfffffffftttfftttftttt1i;;;;;iiii1111ttftft11ttttffff1111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffft1ttt1111tfftt1i;;;;iii1tt111ttt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttffffttftt111t11111ttfft1;;;;;;ii1ti;;i11111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\nttttt1tttffttfttt111111tttt11111tti:i;;;;;;iii1;:;i1i1ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntfttttttttt1tt11t1111ttfftt1tt1i;:..;i;;;;;iii1i:;;:,,:;i1ffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\ntfttfffftt1111tttttt1tttttt1i;,.....:11;ii;;;iti:;;,,,...,:1t111tt1111ttt11tf1tffffftttttt1tttttfftt\n1t1tfffffft1tttttttt111tti:,....,...,i11iii;i1ti;i,,,,,,,,.,i111t11111tt111tft1tffffttfffftt11tffLLf\n1t1ttfffft111tttttt1111:,...........,i1t1iii11i,;1,....,,...;t11111111111t11tf1tfffttfffffffttfLLLLf\ntftt1tftt1tt11ttt111tt;..............,:;i;;;;;,.i1,.........:11111t1111111111tttffttttffffftt1tffLLf\ntfftttttttttt111111ttt:................,;;i;;:,,:;,.........:tttt11111111tttt11tttfLffttfft1tt1tffft\ntttttt1ttttttt1111ttti,................,:;;;;:,.,:..........,ttttt111111tttffttttfLLLLfttttffffttttf\ntffft11ttttttt1111ttt;..................,;;;::,.,,..........,1tttt111111tttffftttffffffftttttttffttf\ntffft11ttftttt111tttt:...................:;;::..::,,.........ittt11111111ttffttttffLLfLfttfffffffttf\ntffft11ttttttt111ttt1:...................,;::,,::;;;i;,......;t11111111111ttt1tttffLLLLfttfffffffttf\ntttft11ttttttt111ttt1,....................,::,,::;;iii;. ...,it11tt11111t111tttttfffLLLfttfffftffttf\nttttt1tttttttt111t1ti.....................,:,,,,::;iii;.....,it11tt1111ttt1ttftttffffffftttffftffttt\nttttt11tt11111111t1ti......................,:,. ,,,:;i:.......;11tt11111t111tttttttttffft1tttttffttt\nttttt11tttt11t11tttt;......................,,,..,, .,,.......,;11111111111ttttt1ttfffttt11ttttttfttt\nttttt1tttttttt111ttt:.......................,,..,,.....,....:1ttt111111111ttt1111tfttttt11ttttttfttt\n1111111ttt1t11111tt1,.......................,,..:,.........:1t11111111111tttt1111ttt1ttt111ttttttt1t\n11111111111111111111;....... ............,,..:,.....,;ii1t1t111111111111111111111111111111111t111\n111111111111111111111,.... .,::,................:....,11ttt11tt11t1111111111111111111111111111111111\n111111111111111111111;.....;i;;;,...............:,....it1111ttt1tt1111t111111111111111111111111t1111\n1111111111111111111111i:.,iii;;i:.......... ,::,:......itttttttt1111111111111111111111111111111t1111\n111111111111111111111111i,:;;;ii;,......... ,;;::,.....:1ttttttt11111111111t111111111111111111111111\n111111111111111111111111i,.,::;;:.......... ,;;;::......itttttttt1tttt11t1tt111111111111111111111111\n111111111111111111111111i..,.................;;;::,.,,..:1tt1tttttttttttt11ttttt11111111tttttttt1111\n111111111111111111111111i..... .............;i;:::,.....itttttttttttttt1tttttttt11t11t1111ttttt1111\n","tttfttfttttttttttttttfffttttt1111tttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLfftfftttffftttt111111111111tfffffftttt111111111111111tttffttfttttttttt11111ttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tffffffffttttttt111111ttttffffLfffLLfttttttt1111t1t1\nttttttttttttttttffffftttffffffLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffftttftttttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLfft111111tttt\nttttttttttffLLLLftttttfLLLftttttttfftttttttfffft1tffffftttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftffft11i;ii1ttffttttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffLfLftti;:;:,,,:;;itffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffffftt1;,,,,,,,,::,:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfftfLftttffff1;::::;;iii;,:1ttttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\nttfffftfffLLLLLfffftfffftttfLfffLfi;iiii11111i;:i1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffffftttffLLfffttttfffffttfLLffLf;;;;iiiiiiii;:1tfffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttffLLffLt;;:;;ii;;iii;ttffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttftttfLftf11i;;;i1ii11ii1tfffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\nttffffffffftttfffffffftttfftttfttt11i;;;;i1111i111ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffftttttt111tfft11;;;;iiiii1t1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffffffft111tt1111ttfft1i;;;iiiii1;;;111111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\nttttt1tttffttfftttttt11ttttt111tttft1i;;;;iiiii;;;1t11ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tffftt1tt11tff1ii;;;;;iiii:;;i;;i1tttffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\nttttffffttt11tttttft1tttttt1ttt11i;,:i;;;;;iii;;;;:...,,,:;i1111tt1111ttt11tt1tffffftttttt1ttttttftt\n111tfffffft1ttfftttt11tttt1tfti;,...,i1i;;ii;;i1i;,.........,i11111111tt111tft1tffffttfffftt11tffLLf\n1t1ttfffft111tftttt1111ttt11;:,......;11iii;;1t11;......,.,,.,i1111111111t11tt1tfffttfffffffttfLLLLf\ntftt1tftt1tt11ttt11ttt11i;:,.........:1tt1i;i1111;............;t11t1111111111tttffttttffffftt1tffLLf\ntfftttttttttt111111tttt1,.............:;;;;;;;;:;:............:tt11111111tttt11tttffftttfft1tt1tffft\n1ttttt1ttttttt1111tt11ti................:;;;;;:,:,............,1tt111111tttffttttfLLLLfttttffffttttf\ntffftttttttttt111tttt1ti................,;;;;::,:,.............ittt11111tttffftttffffffftttttttffttf\ntfffttttfftttt111tttttt;.................:;;:::,:,.............:tt1111111ttffttttffLLfLfttfffffffttf\ntffftttttttttt111tttttt;.................,:;:::,:.,:,,.........,it11111111ttt1tttffLLLLfttfffffffttf\ntttft11ttttttt111tttttt:..................,::::,:,,;;;;;:,......itt11111t111tttttffLLLLfttfffftffttf\nttttt1tttttttt1111t1ttt;...................,::,,:,:;;;iii;.....,1tt1111ttt11tftttffffffftttffftffttt\nttttt11tt1111t111tt1ttt:...................,::,,:::;;iiii;,.....:i1t1111t111tttttttttffft1tftttffttt\nttttt11ttttttt11ttttttt:....................::,,:..,,:;ii:...... .1t111111ttttt1ttffffft11ttttttfttt\nttttt1tttttttt111tttttt:....................,::,:. ..::,......,1t1111111ttt1111tfttttt11ttttttfttt\n1111111tttttt1111ttt1tt:.... ...............,:,,:..............,1t1111111tttt1111ttt1ttt111ttttttt1t\n11111111111111111111111;;;;:,...............,:,,:....... ...,,:1ttt11111111111111111111111111111t111\n11111111111111111111111iiiiii:...............,,,:........,:i11tt1tt111111111111111111111111111111111\n11111111111111111111111iiiiiii...............,,,:.......,1tttt11tt1111t111111111111111111111111t1111\n1111111111111111111111i;iiiiii,..............,.,:........ittt11t111111111111111111111111111111111111\n111111111111111111111111iiii;,...............::::,,......:1ttttt11t111111111111111111111111111111111\n1111111111111111111111111i:,. ...............:i;:::,......itttttt1ttt111t1tt111111111111111111111111\n11111111111111111111111111:................. :i;;;::,.....;ttttttttttttttt1ttttt111111111ttttttt1111\n11111111111111111111111111:................. :i;;;;::,....:tttttttttttttttttttttt11t11t1111ttttt1111\n","tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLLftffftfffftttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttfffffffLLfttttttt111tttt1\nttttttttttttttttfffffttfffffffLffffttttttttttt1tffffffffffttttttt1111ttffffffLLfttffffffttt1111tttt1\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1tffffftttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLffttfffftfffttttttfffffftfttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffffffttft111i;ii1ttfffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftft1i:::,,,,::;;1fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfftfLffftfffLf1;,,,,,,,::,,:1tttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\nttfLfftfffLLLLLfffftfLfftttfffffLLf1;;;;;iiiii:,:1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffffftttffLLfffttttfffffttfLLLffLfiiiii111111i::1tffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttftttttttffftttttttttttttfffLffLfii;;;iiiiiii;:1ftffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttfttffLfffLti;:;;ii;ii1;;ttffffftttttffft11111tfttffftttttttttttttfLLfffftft\nttffffffffftttfffffffftttfftttftttt1i;;;ii11111ii1ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffftttttt111tfff1ii;;;iiiiiii1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\n1tfffffffffttfffffffftt1ttt1111tffft1i;;;iiiiii;;i111111tfffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\ntttttttttffttfftttttt1ttfft1111tttftt1;;;iiiiii;:;tt11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tfffft1tt11ttft11;;;;;iiii;;;1t11ttttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\nttttffffttt11tttttft1ttfffttfft11tftiii;;;;iiii;;;;:;ii1tttft111tt1111ttt11tt1tffffftttttttttttttftt\n111tfffffft1ttfttttt11tfftttfttt11i:,ii;;;;;iii;i:.....,,::;i111t11111tt111tft1fffffttfffftt11tffLLf\n1t1ttfffft111tffttt1111tft1ft1i;:,...;1i;;;;;;i11:...........,;1111111111t11tt1tfffttfffffffttfLLLLf\ntftt1tftt1tt11tft11ttt111111;:,......,111ii;;i1t1:........,,...;11t1111111111tttffttttffffftt1tffLLf\ntffttttttttttt1111ttttt11;:,.........,i111i;i1t1;,.............,1t1111111tttt11t1tfLftttfft1tt1tffft\n1ttttttttttttt1111ttt11ti,............,::::;;;i;:,..............it111111tttffttttfLLLffttttffffttttf\ntfffttttffttttt11ttttttti...............,;;;;;;;:...............:t111111tttffftttffffffftttttttffttf\ntfffttttfffttft11ttttttt;...............,:;;;;:::...............,1t111111ttffttttffLLfLfttfffffffttf\ntffft1ttttttttt11ttttttt:................,;;;;:::................it1111111ttt1tttffLLLLfttfffffffttf\ntffft1tttttttt111ttttttt:................,:;;::::................:t1111tt111tttttffLLLLfttfffftffttf\nttttt1tttttttt111111tt1t;.................,::::::................,1t111ttt11tftttfffffffttfffftffttt\nttttt1tttt11tt111ttttttt:.,:;:............,::::::................,itt111t111ttt1tttttfft11tftttffttt\nttttt1tttttttt11tttttttt;:;iii:............,:::::...........,:,....:1t11111tttt11tfffttt11ttttttfttt\nttttt1tttttttt111ttttttt;;iiiii:. ..........:::::...........,;;;;:..it1111tft1111ttttttt11ttttttfttt\n1111111tttttt1111ttttttt:;iiiii;............,::::,........,::;;iii;it111ttttt11111tt1ttt111ttttttt1t\n111111111111111111111111:;;iiii;,...........,:,::,.........,;;iiii;it111111111111111111111111111tt11\n111111111111111111111111;:;:;;;,............,::::,...........:;;ii;it1111111111111111111111111111111\n111111111111111111111111;::.... .............,:::,,......... .,,:i1t1111111111111111111111111111111\n111111111111111111111111i;,..................,,,:,,....... .;,..,;11111111111111111111111111111t1111\n1111111111111111111111111i;:;i;,..............,,:,,,........1tii11t111111111111111111111111111111111\n111111111111111111111111111111:..............,:::;;:,.......;ttttttttt11t1tt111111111111111111111111\n11111111111111111111111111111;,..............:i;;ii;;:,.....,1ttt1tttttttt1ttttt1111111111tttttt1111\n1111111111111111111111111111i,...............,i;;iiii;:......ittttttttttttttttttt11t11t1111ttttt1111\n","tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111tttt1\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt1111ttfffffffLftttfffffttt1111tttt1\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1ttfffffttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftffftttttfffffffffttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffLffftfftttttfftffffffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftfftt11iii;:;;i1tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfLLLLLLLLLLfttfftfLffttfffLLft1;:::,,,,::;;1ttttttffffffftt1111ttt1ttt1ttfttt1ttffffLLLLLfttt\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLfti;,,,,:::::,,;fffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntfffffttttfLLfffttttfffffttLLLLffLLf1ii;;iiii11i:,;tfffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttfffLffLLf1iiiiiii1111;:;tffffftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttfttffLfffLf111;;;ii;;i1i:itfffftttttffft11111tfttffftttttttttttttfLLfffftft\nttffffffffftttffffffffttffftttftttttt1i;;;iii;iii;ifftft11tttttffft111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffftttttt111tffft11i;;;ii11111111tt111tffftttft11111tt1ttttfft1tffffLLLfttfLLLLLL\n1tfffffffffttfffffffftt1ttt1111fffft111i;;;iiiiiii11111ttfffft11111111tfft1tttttt1tfffffLfftttfLLLLL\ntttttttttffttfftttttt1ttftt1111ttffttt1i;;;iiii;;;1t11ttttfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt1ttfffftttt11ttft1t1i;;iiiii;:;1t111tttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\nttttfffftttt1ttttfft1tffffttfft11tft111i;;;;;ii;:;i11111ttttt1111t1111ttt11tt1tfffffttttttttttttffft\n111tfffffftttffftttt11tfftttfttt1ttt1i1i;;;;iiiiii::;i111tt11111t11111tt111tft1fffffttfffftt1ttfLLLf\n1t1ttfffft111tffttt1111tfttft11tti;::,i1;;;;;iii11:...,,::;i1tt1111111111t11tt1tfffttfffffffttfLLLLf\ntttt1tftt1tt11ttt11ttt1111tt11i;,,....;1i;;;;;;i11:.,.......,,:i11t1111111111tttffttttffffftt1tffLLf\ntffttttttttttt1111ttttt111i;:,........;1t1ii;;i1ii,.............;t1111111tttt11t1tfLftttfft1tt1tffft\n1ttttttttttttt1111tttttt11:...........:iiiiii1tti,..............,1t11111tttttttttfLLLffttttffffttttf\ntfffttttffttttt11ttttttt1i,.............,:::;;ii;,...............;t11111ttttfftttffffffftttttttffttf\ntfffttttfffffft11ttttttt1;..............,:;;;;;;:,...............,1111111ttffttttffLLfLfttfffffffttf\ntffftttttttttt111ttttttt1:.......... ....:;;;;;;:,................it111111tttttttffLLLLfttfffffffttf\ntffft1tttttttt111ttttttt1,........,,:;:,.,;;;;;:;,................;t1111t111tttttffffLLfttfffffffttf\nttttt1tttttttt1111t1tttt1,.......;;;;;:,..:;;::::,................,1t11ttt11tftttfffffffttfffftffttt\nttttt1tttt11tt111ttttttt1:......;;;;;;;:,.:;;::::,................,it111t1111tt11ttttfft11tftttffttt\nttttt1tttttttt11tttttttti,......:;:;;;:...,:;::::,.................:1t11111tt1t11tfffttt11ttttttfttt\nttttt1tttttttt11tttttttti,......:;:;;:.....,:::::,..................:11111ttt1111ttttttt11ttttttfttt\n1t1t111tttttt111111ttttt;...,,,.,:::. ......:::::,...................,111tttt11111ttttt1111ttttttt1t\n111111111111111111111111,,,,,,,.............,:::::,..................,1t111111111111111111111111tt11\n11111111111111111111111i,,..:,..............,,::::,,.................,11tt11111111111111111111111111\n111111111111111111111111;...................,:,,::,,.................,;ii11t111111111111111111111111\n111111111111111111111111i,..................,:::::,,................:::;;;i111t111111111111111111111\n1111111111111111111111111i;;;;i1:............::,:,,,,........... ..::;;;;i1111111111111111111111111\n111111111111111111111111111111t1,............,.,:,,,:,,........:,,..,:;;;i11t11111111111111111111111\n1111111111111111111111111111111i.............,,::;;;i;:,...... :111i;::;;;1ttttt11t1111111tttttt1111\n111111111111111111111111111111ti.............:1;;1iiii;:,.......i1tttt11111tt1tt111111t1111ttttt1111\n","tttttttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111ttt1\nttttttttttttfffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLff111111ttttt\nttttttttttffLLLLftttttfLLLfttttttffffttttttfffft1tffffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftfffttttttfffffftfttfftffffffffttt111tftt11t11tfLLLftt11tffft1tttttt\ntttttttfLfLLLLLLLLffttfttttffLLfftffttttffffffffffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLLftffttttttt11i;ii1tftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfLLLLLLLLLLfttfftfffffffffLLfttt1i;::,,,,:;;1tttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLLttt1;,,,,,,,::,:iftt11tfffft11111tffft1tt11tt1ttttfffLLLLLLLLfff\ntfffffttttfLLfffttttfffffttLLLLfLLLftt1i;;;;;;iiii:,;fftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttffLLffLLftt1;iiiii11111i::tfffft1ttt111111tffftfffftttttttt1ttfLLLLffffff\nttfLffffffftttfffffffffttfttffLfffLftt1;i;;;iiiiiii;;tfftttttffft11111tfttffftttttttttttttfLLftfffft\nttffffffffftttffffffffftffftttfttftttttii;;;;ii;;ii;iftt11tttttfft1111tt1tffttffttfffffLLfffffffffLL\nttffffffffttttfffffffftttttt11ttfffttt11ii;;ii1111ii11111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\n1ttffffffffttfffffffftt1ttt111tffffttt1i1i;;;iiiiii1111ttfffft11t11111tfft1tttttt1ttffffLfftttfLLLLf\ntttttttttffttfftttttt1ttfff1111ttffttttt1i;;;;i;:;it11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tfffftttt11tfftt11tt1;;;ii;;;1t111tttffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\ntfttfffftttt1ttttfft1tffffttfftt1tft1111t1;;;;i;:;i11111tttft111tt1111ttt11tt1tfffffttttttttttttffft\n1tttfffffftttffftfft11tfffttfttttttt11111i;;:;iiii1i;i1t1tt11111t11111tt111tft1fffffttfffftt1ttffLLf\n1t1tffffft111tffttt1111tfttft11tt1t1i;;;1i;;;;ii1ii1,.,:;ii1tt11111111111t11tt1tfffttfffffffttfLfLLf\ntfttttftt1tt11ttt11ttt11t1t11tt11i:,...,11;;;;;it111,,.....,:;i11tt1111111111tttffttttffffftt1tffLLf\ntffttttttttttt1111ttftt111111i;:,......:1t1i;;;;i1t1,..........,:i1111111tttt11t1tfLftttfft1tt1tffft\n1ttttttttttttt1111ttttt111tt;..........:1111iii1;11:.............,it1111tttttt1ttfLLLffttttffffttttf\ntfffttttffttttt11ttttttt11t1,...........,,:::;;i;;:...............:t1111ttttfft1tffffffftttttttffttf\ntfffttttfffffft11ttttttt111i..............:;:::;;::...............,1t1111ttffttttffLLfLfttfffffffttf\ntfffttttttttttt11ttttttt111:..............,;;;;;;:,................;t11111ttt1t1tffLLLLfttfffffffttf\ntffft1tttttttt111ttttttt11i,..........,::::;;;;;;:,................,1t11t111tttttffffLLfttfffffffttf\nttttt1tttttttt111tt1tttt11i.........:;;;;:,;;::::::.................;t1ttt11tftttffffffftttffftffttt\nttttt1tttt11tt111ttttttt111,.......;;;;;;:,:;::::::,................:tttt1111tt11ttfttft11tftttffttt\nttttt1tttttttt11tttttttt11;,......,;;;;;;:::;::::::,................,itt111t11t11ttftttt11ttttttfttt\nttttt1tttttttt11tttttttt11;,......:;;;;i;...,:::::,,.................:tt1tttt1111ttttttt11ttttttfttt\n1t1t111tttttt111tttttttt1;,.,.....,:;:......,:::::,,..................it1tttt11111tttt11111ttttttt1t\n1111111111111111111111111:,,,......,,. .....,,::::,,..................,1t11111111111111111111111tt11\n1111111111111111111111111,,....,,...........,,,:::::,..................itt11111111111111111111111111\n1111111111111111111111111;,.................,:::::::,,................:1tt11111111111111111111111111\n11111111111111111111111111:.... ............,:::,:,,.................,1tt11111111111111111111111111\n11111111111111111111111111ii;;;;;i, .........,,::,,,,,................,:;;1tt11111111111111111111111\n11111111111111111111111111111111t1,..........,,,:,,:,:,,. ...........,:::;;i11tt11111111111111111111\n11111111111111111111111111111111t;.............,:::;;;;:,........ .,:::;;:;i1t111111111ttttttt11111\n111111111111111111111111111111111:...........,;;;i1iiii;:,.......::,,::::;;i1ttt111t11t1111ttttt1111\n","tttftttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt11111111t\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\nttftttttttttttttffffLffttfffffffLfffttttttttt111tfffffffftttttttt11111ttttttfffftfLLfttttttt111tttt1\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tfffffffffttffffffttt11111ttt1\ntttttttttttffffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLfft11111ttttt\nttttttttttffLLLLftttttfLLLfttttttffLftttttttffft1ttfffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffffftftttfffffffttt111tftt11t11tfLLfftt11tffft11ttttt\ntttttttfffLLLLLLLLffttfttttfLLLfftffttttffftt1iii11tttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLffffftttttfti;;::,,,:;i1tffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttfffffLLLLLLLLLLfttfftfLfffffffLLfttttt1;,,,,,,,::,:ittffffffftt1111ttt1ttt1tftttt1ttffffLLLLLfttt\nttfLLffffLLLLLLLLfftfLfftttfLfffLLLLfttt1i;:::;;iiii;,;t11tfffft11111tffft1tt1ttt1ttttfffLLLLLLLLfff\ntffffftttffLLLffttttfffffttLLLLfLLLffttf1;;iiii11111i::1t11tttt1ttt11tfffttfftttttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttfffLffLLftttti:;;;;iiiiiii;;tftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\nttfLffffffftttfffffffffttfttffLfffLfttttti;;;;;iii;i1iiftttttffft11111tfttffftttttttttttttfLLftfffft\nttffffffffftttffffffffftfffftffffftttttft11i;;;iiii1iiit11tttttfft1111tt11ffttffttfffffLLfffffffffLL\nttffffffffttttfffffffftttttt1tttffftttttti1i;;;ii11iii111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\n1ttffffffffttfffffffftt1ttt1111tfffftttt111i;;iiiiii111ttfffft11t11111tfftttttttt1ttffffLfftttfLLLLf\ntttttttttffttfftttttt1ttfftttt1ttfftttttt111i;i;:;ii11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tfffftttt11tfftt1ttt111;;i;;;iii1ttttffftt11t1111ttt11tt1tffttt1111ttfftfLffftt\ntfttffffttt11tttttft1tffffttffttttft111ttt11;;;;:;i1i1;;11tft111tt1111tt111tt1tfffffttttt11tttttffft\n1tttfffffftttffftfft11tfftttffttttft1111iii1;;;i;iiii1i,,,:;;i11tt1111tt111tft1fffffttfffftt11tffLLf\n111ttfffftt1ttffttt1111tfttft11tt1t1i;:,,,;1i;;i1ii;iti,,.....,:;i1t11111t11tt1tfffttffffffft1fffLLf\ntfttttftt1tt11tft11ttt11tttt1tt11i;:,.....;11i;i1i;1tt;,,.........,:i11111111t1tffttttffffftt1tfffLf\ntffttttttttftt1111ttttt11111tft;,.........;11111i1ttti,.............,1111tttt1111tffftttfft1tt1tffft\n1ttttttttttttt1111tttttt11tfff1,...........,:;;;;;11i:...............itttttttt1ttfffLffttttffffttttf\ntfffttttffttttt11ttttttt11tfffi............ ,:;;;;;;;,...............;t1ttttfft1tffffffftttttttffttf\ntfffttttfffffft11tttttttttt1tf;..............:;;;;;;;,...............:111ttttttttfffLfLfttfffffffttf\ntfffttttftftft111ttttttt11t111:..............:;;;;;::,...............,1t11ttt1t1tffLLLLfttfffffffttf\ntfffttttfttttt111ttttttt11ttt1:..............,;;;::;::................itt111tttttffffLLfttfffffffttf\ntttttttttttttt111ttttttt1ttfft:..............,;;;;::::................:1tt11tft1tffffffftttffttffttt\nttttt1tttt11tt11tttttttt1tttt1;.,::,..........:;:::;::,...............,1t1111tt11tttttft11tfttttfttt\nttttt1tttttttt11ttttttttt1ttt1;,:;;:..........,::::::,,................it11111111ttftttt11ttttttfttt\nttttt1tttttttt11tttttttttttttiiiiii;,.........,:::::::,................:ttttt1111ttttttt11ttttttfttt\n1t1111tttttttt11tttttttt1ttt1;;;;ii;,.........,:::::::,.................ittttt1111tttt11111ttttttt1t\n11111111111111111111111111tt1;;;;ii;...........::::::::................ :1t111111111111111111111t111\n11111111111111111111111111tt1;::;;i:...........,:::::::,...............,itttt11111111111111111111111\n11111111111111111111111tttttt;,,,::............,::::::,,...............ittttt11111111111111111111111\n1111111111111111111111111tttt1:,,..............,:::::,,,,.......,:;::,:1t1111111111111111111111t1111\n11111111111111111111111111111111i;;i:..........,:,,,.,,.,.......::;;i;it1ttt111111111111111111111111\n1111111111111111111111111111111111ti...........,,.,:,:;::,......,:;;ii1ttttt11111111111111111t111111\n1111111111111111111111111111111111t;...........,;iiiiiii;:,......:;;;i1ttttt111t1111111111tttttt1111\n11111111111111111111111111111111111:...........,;i11iiii;:,.......,:i1tttttt1ttttt1t11t1111ttttt1111\n"];function s(){const[t,e]=Object(a.useState)(function(){const t=new Date;return 3===t.getMonth()&&1===t.getDate()}()),[n,s]=Object(a.useState)(0);return Object(a.useEffect)(()=>{const t=setInterval(()=>s(t=>(t+1)%o.length),100);return()=>clearInterval(t)},[]),t?r.a.createElement(i.a,{open:t,onClose:()=>e(!1)},r.a.createElement("pre",{style:{color:"#0f0"}},o[n]),r.a.createElement("div",{style:{display:"none"}},r.a.createElement("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/a3Z7zEc7AXQ?autoplay=1",title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"}))):r.a.createElement(r.a.Fragment,null)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return G}));var a=n(105),r=n(197),i=n(57),o=n(141),s=n(340),l=n(15),c=n(142),f=n(8),u=n(147),m=n(13),h=n(364),d=n(375),p=n(362),g=n(94),y=n(256),b=n(80),E=n(17),v=n(11),k=n(96),_=n(102),w=n(27),S=n(218),C=n(26),x=n(64),L=n(4),O=n(6),M=n(237),T=n(66),A=n(29),R=n(109),N=n(24),P=n(132),I=n(87),F=n(99),D=n(47),j=n(466),B=n(370);function G(t,e,n){const G=function(t,e){if(!Object(o.b)(e))throw n.makeRuntimeErrorMsg(t,`Invalid augmentation: '${e}'`);return i.a[e]},W=function(t,e){if(!Object(A.b)(e))throw n.makeRuntimeErrorMsg(t,"Invalid faction name: '"+e);return A.a[e]},H=function(t,e){const a=T.a[e];if(null==a||!(a instanceof M.a))throw n.makeRuntimeErrorMsg(t,`Invalid company name: '${e}'`);return a},U=function(e=null){if(!e)return;const n=t.getHomeComputer();for(const a of n.scripts)if(a.filename===e){if(a.ramUsage>n.maxRam-n.ramUsed)return;const e=new h.a(a,[]);e.threads=1,Object(r.e)(t,e,n)}};return{getOwnedAugmentations:function(e=!1){const a=n.boolean(e);n.updateDynamicRam("getOwnedAugmentations",Object(m.c)(t,"getOwnedAugmentations")),n.checkSingularityAccess("getOwnedAugmentations");const r=[];for(let e=0;e`Faction '${o}' does not have the '${s}' augmentation.`),!1;if(!(h.name===l.a.NeuroFluxGovernor)){for(let n=0;n`You already have the '${s}' augmentation.`),!1;for(let n=0;n`You already have the '${s}' augmentation.`),!1}if(c.playerReputation`You do not have enough reputation with '${c.name}'.`),!1;const d=Object(a.g)(h,c,!0);return e.log("purchaseAugmentation",()=>d),!(!Object(u.a)(d)||!d.startsWith("You purchased"))&&(t.gainIntelligenceExp(10*f.a.IntelligenceSingFnBaseExpGain),!0)},softReset:function(a){const r=n.string("softReset","cbScript",a);n.updateDynamicRam("softReset",Object(m.c)(t,"softReset")),n.checkSingularityAccess("softReset"),e.log("softReset",()=>"Soft resetting. This will cause this script to be killed"),setTimeout(()=>{Object(s.a)(),U(r)},0),e.running=!1,Object(c.a)(e)},installAugmentations:function(a){const r=n.string("installAugmentations","cbScript",a);return n.updateDynamicRam("installAugmentations",Object(m.c)(t,"installAugmentations")),n.checkSingularityAccess("installAugmentations"),0===t.queuedAugmentations.length?(e.log("installAugmentations",()=>"You do not have any Augmentations to be installed."),!1):(t.gainIntelligenceExp(10*f.a.IntelligenceSingFnBaseExpGain),e.log("installAugmentations",()=>"Installing Augmentations. This will cause this script to be killed"),setTimeout(()=>{Object(o.e)(),U(r)},0),e.running=!1,Object(c.a)(e),!0)},goToLocation:function(a){const r=n.string("goToLocation","locationName",a);n.updateDynamicRam("goToLocation",Object(m.c)(t,"goToLocation")),n.checkSingularityAccess("goToLocation");const i=Object.values(S.a).find(t=>t.name===r);return i?t.city!==i.city?(e.log("goToLocation",()=>`No location named ${r} in ${t.city}`),!1):(k.b.toLocation(i),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/5e4),!0):(e.log("goToLocation",()=>"No location named "+r),!1)},universityCourse:function(a,r,i=!0){const o=n.string("universityCourse","universityName",a),s=n.string("universityCourse","className",r),l=n.boolean(i);n.updateDynamicRam("universityCourse",Object(m.c)(t,"universityCourse")),n.checkSingularityAccess("universityCourse");const c=t.focus;if(t.isWorking){const n=t.singularityStopWork();e.log("universityCourse",()=>n)}let u,h;switch(o.toLowerCase()){case v.a.AevumSummitUniversity.toLowerCase():if(t.city!=E.a.Aevum)return e.log("universityCourse",()=>`You cannot study at 'Summit University' because you are not in '${E.a.Aevum}'.`),!1;t.gotoLocation(v.a.AevumSummitUniversity),u=4,h=3;break;case v.a.Sector12RothmanUniversity.toLowerCase():if(t.city!=E.a.Sector12)return e.log("universityCourse",()=>`You cannot study at 'Rothman University' because you are not in '${E.a.Sector12}'.`),!1;t.location=v.a.Sector12RothmanUniversity,u=3,h=2;break;case v.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(t.city!=E.a.Volhaven)return e.log("universityCourse",()=>`You cannot study at 'ZB Institute of Technology' because you are not in '${E.a.Volhaven}'.`),!1;t.location=v.a.VolhavenZBInstituteOfTechnology,u=5,h=4;break;default:return e.log("universityCourse",()=>`Invalid university name: '${o}'.`),!1}let d="";switch(s.toLowerCase()){case"Study Computer Science".toLowerCase():d=f.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():d=f.a.ClassDataStructures;break;case"Networks".toLowerCase():d=f.a.ClassNetworks;break;case"Algorithms".toLowerCase():d=f.a.ClassAlgorithms;break;case"Management".toLowerCase():d=f.a.ClassManagement;break;case"Leadership".toLowerCase():d=f.a.ClassLeadership;break;default:return e.log("universityCourse",()=>`Invalid class name: ${s}.`),!1}return t.startClass(u,h,d),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("universityCourse",()=>`Started ${d} at ${o}`),!0},gymWorkout:function(a,r,i=!0){const o=n.string("gymWorkout","gymName",a),s=n.string("gymWorkout","stat",r),l=n.boolean(i);n.updateDynamicRam("gymWorkout",Object(m.c)(t,"gymWorkout")),n.checkSingularityAccess("gymWorkout");const c=t.focus;if(t.isWorking){const n=t.singularityStopWork();e.log("gymWorkout",()=>n)}let u,h;switch(o.toLowerCase()){case v.a.AevumCrushFitnessGym.toLowerCase():if(t.city!=E.a.Aevum)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.AevumCrushFitnessGym}' because you are not in '${E.a.Aevum}'.`),!1;t.location=v.a.AevumCrushFitnessGym,u=3,h=2;break;case v.a.AevumSnapFitnessGym.toLowerCase():if(t.city!=E.a.Aevum)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.AevumSnapFitnessGym}' because you are not in '${E.a.Aevum}'.`),!1;t.location=v.a.AevumSnapFitnessGym,u=10,h=5;break;case v.a.Sector12IronGym.toLowerCase():if(t.city!=E.a.Sector12)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.Sector12IronGym}' because you are not in '${E.a.Sector12}'.`),!1;t.location=v.a.Sector12IronGym,u=1,h=1;break;case v.a.Sector12PowerhouseGym.toLowerCase():if(t.city!=E.a.Sector12)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.Sector12PowerhouseGym}' because you are not in '${E.a.Sector12}'.`),!1;t.location=v.a.Sector12PowerhouseGym,u=20,h=10;break;case v.a.VolhavenMilleniumFitnessGym.toLowerCase():if(t.city!=E.a.Volhaven)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.VolhavenMilleniumFitnessGym}' because you are not in '${E.a.Volhaven}'.`),!1;t.location=v.a.VolhavenMilleniumFitnessGym,u=7,h=4;break;default:return e.log("gymWorkout",()=>`Invalid gym name: ${o}. gymWorkout() failed`),!1}switch(s.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():t.startClass(u,h,f.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():t.startClass(u,h,f.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():t.startClass(u,h,f.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():t.startClass(u,h,f.a.ClassGymAgility);break;default:return e.log("gymWorkout",()=>`Invalid stat: ${s}.`),!1}return l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("gymWorkout",()=>`Started training ${s} at ${o}`),!0},travelToCity:function(a){const r=n.city("travelToCity","cityName",a);switch(n.updateDynamicRam("travelToCity",Object(m.c)(t,"travelToCity")),n.checkSingularityAccess("travelToCity"),r){case E.a.Aevum:case E.a.Chongqing:case E.a.Sector12:case E.a.NewTokyo:case E.a.Ishima:case E.a.Volhaven:return t.money"Not enough money to travel."),!1):(t.loseMoney(f.a.TravelCost,"other"),t.city=r,e.log("travelToCity",()=>"Traveled to "+r),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/5e4),!0);default:throw n.makeRuntimeErrorMsg("travelToCity",`Invalid city name: '${r}'.`)}},purchaseTor:function(){if(n.updateDynamicRam("purchaseTor",Object(m.c)(t,"purchaseTor")),n.checkSingularityAccess("purchaseTor"),t.hasTorRouter())return e.log("purchaseTor",()=>"You already have a TOR router!"),!0;if(t.money"You cannot afford to purchase a Tor router."),!1;t.loseMoney(f.a.TorRouterCost,"other");const a=Object(P.f)({ip:Object(C.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(C.a)(a),t.getHomeComputer().serversOnNetwork.push(a.hostname),a.serversOnNetwork.push(t.getHomeComputer().hostname),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/500),e.log("purchaseTor",()=>"You have purchased a Tor router!"),!0},purchaseProgram:function(a){const r=n.string("purchaseProgram","programName",a).toLowerCase();if(n.updateDynamicRam("purchaseProgram",Object(m.c)(t,"purchaseProgram")),n.checkSingularityAccess("purchaseProgram"),!t.hasTorRouter())return e.log("purchaseProgram",()=>"You do not have the TOR router."),!1;const i=Object.values(y.a).find(t=>t.program.toLowerCase()===r);return null==i?(e.log("purchaseProgram",()=>`Invalid program name: '${r}.`),!1):t.money`Not enough money to purchase '${i.program}'. Need ${L.a.formatMoney(i.price)}`),!1):t.hasProgram(i.program)?(e.log("purchaseProgram",()=>`You already have the '${i.program}' program`),!0):(t.loseMoney(i.price,"other"),t.getHomeComputer().programs.push(i.program),e.log("purchaseProgram",()=>`You have purchased the '${i.program}' program. The new program can be found on your home computer.`),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/5e3),!0)},getCurrentServer:function(){return n.updateDynamicRam("getCurrentServer",Object(m.c)(t,"getCurrentServer")),n.checkSingularityAccess("getCurrentServer"),t.getCurrentServer().hostname},connect:function(e){const a=n.string("purchaseProgram","hostname",e);if(n.updateDynamicRam("connect",Object(m.c)(t,"connect")),n.checkSingularityAccess("connect"),!a)throw n.makeRuntimeErrorMsg("connect",`Invalid hostname: '${a}'`);const r=Object(C.d)(a);if(null==r)throw n.makeRuntimeErrorMsg("connect",`Invalid hostname: '${a}'`);if("home"===a)return t.getCurrentServer().isConnectedTo=!1,t.currentServer=t.getHomeComputer().hostname,t.getCurrentServer().isConnectedTo=!0,I.a.setcwd("/"),!0;const i=t.getCurrentServer();for(let e=0;e"cannot backdoor this kind of server"),Promise.resolve();const r=a,i=Object(F.d)(r,t)/4*1e3,o=Object(j.b)(r,t);if(!o.res)throw n.makeRuntimeErrorMsg("installBackdoor",o.msg||"");return e.log("installBackdoor",()=>`Installing backdoor on '${r.hostname}' in ${Object(N.b)(i,!0)}`),Object(R.c)(i,e).then((function(){return e.log("installBackdoor",()=>`Successfully installed backdoor on '${r.hostname}'`),r.backdoorInstalled=!0,_.a.WorldDaemon===r.hostname&&k.b.toBitVerse(!1,!1),Promise.resolve()}))},isFocused:function(){return n.updateDynamicRam("isFocused",Object(m.c)(t,"isFocused")),n.checkSingularityAccess("isFocused"),t.focus},setFocus:function(e){const a=n.boolean(e);if(n.updateDynamicRam("setFocus",Object(m.c)(t,"setFocus")),n.checkSingularityAccess("setFocus"),!t.isWorking)throw n.makeRuntimeErrorMsg("setFocus","Not currently working");if(t.workType!=f.a.WorkTypeFaction&&t.workType!=f.a.WorkTypeCompany&&t.workType!=f.a.WorkTypeCompanyPartTime&&t.workType!=f.a.WorkTypeCreateProgram&&t.workType!=f.a.WorkTypeStudyClass)throw n.makeRuntimeErrorMsg("setFocus","Cannot change focus for current job");return!t.focus&&a?(t.startFocusing(),k.b.toWork(),!0):!(!t.focus||a)&&(t.stopFocusing(),k.b.toTerminal(),!0)},getStats:function(){return n.updateDynamicRam("getStats",Object(m.c)(t,"getStats")),n.checkSingularityAccess("getStats"),e.log("getStats",()=>"getStats is deprecated, please use getplayer"),{hacking:t.hacking,strength:t.strength,defense:t.defense,dexterity:t.dexterity,agility:t.agility,charisma:t.charisma,intelligence:t.intelligence}},getCharacterInformation:function(){return n.updateDynamicRam("getCharacterInformation",Object(m.c)(t,"getCharacterInformation")),n.checkSingularityAccess("getCharacterInformation"),e.log("getCharacterInformation",()=>"getCharacterInformation is deprecated, please use getplayer"),{bitnode:t.bitNodeN,city:t.city,factions:t.factions.slice(),hp:t.hp,jobs:Object.keys(t.jobs),jobTitles:Object.values(t.jobs),maxHp:t.max_hp,mult:{agility:t.agility_mult,agilityExp:t.agility_exp_mult,charisma:t.charisma,charismaExp:t.charisma_exp,companyRep:t.company_rep_mult,crimeMoney:t.crime_money_mult,crimeSuccess:t.crime_success_mult,defense:t.defense_mult,defenseExp:t.defense_exp_mult,dexterity:t.dexterity_mult,dexterityExp:t.dexterity_exp_mult,factionRep:t.faction_rep_mult,hacking:t.hacking_mult,hackingExp:t.hacking_exp_mult,strength:t.strength_mult,strengthExp:t.strength_exp_mult,workMoney:t.work_money_mult},timeWorked:t.timeWorked,tor:t.hasTorRouter(),workHackExpGain:t.workHackExpGained,workStrExpGain:t.workStrExpGained,workDefExpGain:t.workDefExpGained,workDexExpGain:t.workDexExpGained,workAgiExpGain:t.workAgiExpGained,workChaExpGain:t.workChaExpGained,workRepGain:t.workRepGained,workMoneyGain:t.workMoneyGained,hackingExp:t.hacking_exp,strengthExp:t.strength_exp,defenseExp:t.defense_exp,dexterityExp:t.dexterity_exp,agilityExp:t.agility_exp,charismaExp:t.charisma_exp}},hospitalize:function(){n.updateDynamicRam("hospitalize",Object(m.c)(t,"hospitalize")),n.checkSingularityAccess("hospitalize"),t.isWorking||k.b.page()===w.a.Infiltration||k.b.page()===w.a.BitVerse?e.log("hospitalize",()=>"Cannot go to the hospital because the player is busy."):t.hospitalize()},isBusy:function(){return n.updateDynamicRam("isBusy",Object(m.c)(t,"isBusy")),n.checkSingularityAccess("isBusy"),t.isWorking||k.b.page()===w.a.Infiltration||k.b.page()===w.a.BitVerse},stopAction:function(){if(n.updateDynamicRam("stopAction",Object(m.c)(t,"stopAction")),n.checkSingularityAccess("stopAction"),t.isWorking){t.focus&&(t.stopFocusing(),k.b.toTerminal());const n=t.singularityStopWork();return e.log("stopAction",()=>n),!0}return!1},upgradeHomeCores:function(){n.updateDynamicRam("upgradeHomeCores",Object(m.c)(t,"upgradeHomeCores")),n.checkSingularityAccess("upgradeHomeCores");const a=t.getHomeComputer();if(a.cpuCores>=8)return e.log("upgradeHomeCores",()=>"Your home computer is at max cores."),!1;const r=t.getUpgradeHomeCoresCost();return t.money"You don't have enough money. Need "+L.a.formatMoney(r)),!1):(a.cpuCores+=1,t.loseMoney(r,"servers"),t.gainIntelligenceExp(2*f.a.IntelligenceSingFnBaseExpGain),e.log("upgradeHomeCores",()=>`Purchased an additional core for home computer! It now has ${a.cpuCores} cores.`),!0)},getUpgradeHomeCoresCost:function(){return n.updateDynamicRam("getUpgradeHomeCoresCost",Object(m.c)(t,"getUpgradeHomeCoresCost")),n.checkSingularityAccess("getUpgradeHomeCoresCost"),t.getUpgradeHomeCoresCost()},upgradeHomeRam:function(){n.updateDynamicRam("upgradeHomeRam",Object(m.c)(t,"upgradeHomeRam")),n.checkSingularityAccess("upgradeHomeRam");const a=t.getHomeComputer();if(a.maxRam>=f.a.HomeComputerMaxRam)return e.log("upgradeHomeRam",()=>"Your home computer is at max RAM."),!1;const r=t.getUpgradeHomeRamCost();return t.money"You don't have enough money. Need "+L.a.formatMoney(r)),!1):(a.maxRam*=2,t.loseMoney(r,"servers"),t.gainIntelligenceExp(2*f.a.IntelligenceSingFnBaseExpGain),e.log("upgradeHomeRam",()=>`Purchased additional RAM for home computer! It now has ${L.a.formatRAM(a.maxRam)} of RAM.`),!0)},getUpgradeHomeRamCost:function(){return n.updateDynamicRam("getUpgradeHomeRamCost",Object(m.c)(t,"getUpgradeHomeRamCost")),n.checkSingularityAccess("getUpgradeHomeRamCost"),t.getUpgradeHomeRamCost()},workForCompany:function(a,r=!0){let i=n.string("workForCompany","companyName",a);const o=n.boolean(r);if(n.updateDynamicRam("workForCompany",Object(m.c)(t,"workForCompany")),n.checkSingularityAccess("workForCompany"),null==i&&(i=t.companyName),null==i||""===i||!(T.a[i]instanceof M.a))return e.log("workForCompany",()=>`Invalid company: '${i}'`),!1;if(!Object.keys(t.jobs).includes(i))return e.log("workForCompany",()=>`You do not have a job at '${i}'`),!1;const s=t.jobs[i],l=g.a[s];if(""===s||!(l instanceof p.a))return e.log("workForCompany",()=>"You do not have a job"),!1;const c=t.focus;if(t.isWorking){const n=t.singularityStopWork();e.log("workForCompany",()=>n)}return l.isPartTimeJob()?t.startWorkPartTime(i):t.startWork(i),o?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForCompany",()=>`Began working at '${t.companyName}' as a '${s}'`),!0},applyToCompany:function(a,r){const i=n.string("applyToCompany","companyName",a),o=n.string("applyToCompany","field",r);let s;switch(n.updateDynamicRam("applyToCompany",Object(m.c)(t,"applyToCompany")),n.checkSingularityAccess("applyToCompany"),H("applyToCompany",i),t.location=i,o.toLowerCase()){case"software":s=t.applyForSoftwareJob(!0);break;case"software consultant":s=t.applyForSoftwareConsultantJob(!0);break;case"it":s=t.applyForItJob(!0);break;case"security engineer":s=t.applyForSecurityEngineerJob(!0);break;case"network engineer":s=t.applyForNetworkEngineerJob(!0);break;case"business":s=t.applyForBusinessJob(!0);break;case"business consultant":s=t.applyForBusinessConsultantJob(!0);break;case"security":s=t.applyForSecurityJob(!0);break;case"agent":s=t.applyForAgentJob(!0);break;case"employee":s=t.applyForEmployeeJob(!0);break;case"part-time employee":s=t.applyForPartTimeEmployeeJob(!0);break;case"waiter":s=t.applyForWaiterJob(!0);break;case"part-time waiter":s=t.applyForPartTimeWaiterJob(!0);break;default:return e.log("applyToCompany",()=>`Invalid job: '${o}'.`),!1}return s?e.log("applyToCompany",()=>`You were offered a new job at '${i}' as a '${t.jobs[i]}'`):e.log("applyToCompany",()=>`You failed to get a new job/promotion at '${i}' in the '${o}' field.`),s},getCompanyRep:function(e){const a=n.string("getCompanyRep","companyName",e);n.updateDynamicRam("getCompanyRep",Object(m.c)(t,"getCompanyRep")),n.checkSingularityAccess("getCompanyRep");return H("getCompanyRep",a).playerReputation},getCompanyFavor:function(e){const a=n.string("getCompanyFavor","companyName",e);n.updateDynamicRam("getCompanyFavor",Object(m.c)(t,"getCompanyFavor")),n.checkSingularityAccess("getCompanyFavor");return H("getCompanyFavor",a).favor},getCompanyFavorGain:function(e){const a=n.string("getCompanyFavorGain","companyName",e);n.updateDynamicRam("getCompanyFavorGain",Object(m.c)(t,"getCompanyFavorGain")),n.checkSingularityAccess("getCompanyFavorGain");return H("getCompanyFavorGain",a).getFavorGain()},checkFactionInvitations:function(){return n.updateDynamicRam("checkFactionInvitations",Object(m.c)(t,"checkFactionInvitations")),n.checkSingularityAccess("checkFactionInvitations"),t.factionInvitations.slice()},joinFaction:function(r){const i=n.string("joinFaction","facName",r);if(n.updateDynamicRam("joinFaction",Object(m.c)(t,"joinFaction")),n.checkSingularityAccess("joinFaction"),W("joinFaction",i),!t.factionInvitations.includes(i))return e.log("joinFaction",()=>`You have not been invited by faction '${i}'`),!1;const o=A.a[i];Object(a.e)(o);for(let e=0;e`Joined the '${i}' faction.`),!0},workForFaction:function(a,r,i=!0){const o=n.string("workForFaction","facName",a),s=n.string("workForFaction","type",r),l=n.boolean(i);if(n.updateDynamicRam("workForFaction",Object(m.c)(t,"workForFaction")),n.checkSingularityAccess("workForFaction"),W("workForFaction",o),t.inGang()&&void 0!==b.a[o])return e.log("workForFaction",()=>`Faction '${o}' does not offer work at the moment.`),!1;if(!t.factions.includes(o))return e.log("workForFaction",()=>`You are not a member of '${o}'`),!1;const c=t.focus;if(t.isWorking){const n=t.singularityStopWork();e.log("workForFaction",()=>n)}const f=A.a[o];switch(s.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return B.a[f.name].offerHackingWork?(t.startFactionHackWork(f),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForFaction",()=>`Started carrying out hacking contracts for '${f.name}'`),!0):(e.log("workForFaction",()=>`Faction '${f.name}' do not need help with hacking contracts.`),!1);case"field":case"fieldwork":case"field work":return B.a[f.name].offerFieldWork?(t.startFactionFieldWork(f),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForFaction",()=>`Started carrying out field missions for '${f.name}'`),!0):(e.log("workForFaction",()=>`Faction '${f.name}' do not need help with field missions.`),!1);case"security":case"securitywork":case"security work":return B.a[f.name].offerSecurityWork?(t.startFactionSecurityWork(f),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForFaction",()=>`Started carrying out security work for '${f.name}'`),!0):(e.log("workForFaction",()=>`Faction '${f.name}' do not need help with security work.`),!1);default:e.log("workForFaction",()=>"Invalid work type: '"+s)}return!0},getFactionRep:function(e){const a=n.string("getFactionRep","facName",e);n.updateDynamicRam("getFactionRep",Object(m.c)(t,"getFactionRep")),n.checkSingularityAccess("getFactionRep");return W("getFactionRep",a).playerReputation},getFactionFavor:function(e){const a=n.string("getFactionRep","facName",e);n.updateDynamicRam("getFactionFavor",Object(m.c)(t,"getFactionFavor")),n.checkSingularityAccess("getFactionFavor");return W("getFactionFavor",a).favor},getFactionFavorGain:function(e){const a=n.string("getFactionFavorGain","facName",e);n.updateDynamicRam("getFactionFavorGain",Object(m.c)(t,"getFactionFavorGain")),n.checkSingularityAccess("getFactionFavorGain");return W("getFactionFavorGain",a).getFavorGain()},donateToFaction:function(a,r){const i=n.string("donateToFaction","facName",a),o=n.number("donateToFaction","amt",r);n.updateDynamicRam("donateToFaction",Object(m.c)(t,"donateToFaction")),n.checkSingularityAccess("donateToFaction");const s=W("donateToFaction",i);if(!t.factions.includes(s.name))return e.log("donateToFaction",()=>`You can't donate to '${i}' because you aren't a member`),!1;if(t.inGang()&&s.name===t.getGangFaction().name)return e.log("donateToFaction",()=>`You can't donate to '${i}' because youre managing a gang for it`),!1;if("number"!=typeof o||o<=0||isNaN(o))return e.log("donateToFaction",()=>`Invalid donation amount: '${o}'.`),!1;if(t.money`You do not have enough money to donate ${L.a.formatMoney(o)} to '${i}'`),!1;const l=Math.floor(f.a.BaseFavorToDonate*O.a.RepToDonateToFaction);if(s.favor`You do not have enough favor to donate to this faction. Have ${s.favor}, need ${l}`),!1;const c=o/f.a.DonateMoneyToRepDivisor*t.faction_rep_mult;return s.playerReputation+=c,t.loseMoney(o,"other"),e.log("donateToFaction",()=>`${L.a.formatMoney(o)} donated to '${i}' for ${L.a.formatReputation(c)} reputation`),!0},createProgram:function(a,r=!0){const i=n.string("createProgram","programName",a).toLowerCase(),o=n.boolean(r);n.updateDynamicRam("createProgram",Object(m.c)(t,"createProgram")),n.checkSingularityAccess("createProgram");const s=t.focus;if(t.isWorking){const n=t.singularityStopWork();e.log("createProgram",()=>n)}const l=Object.values(x.a).find(t=>t.name.toLowerCase()===i);if(null==l)return e.log("createProgram",()=>"The specified program does not exist: '"+i),!1;if(t.hasProgram(l.name))return e.log("createProgram",()=>`You already have the '${l.name}' program`),!1;const c=l.create;return null===c?(e.log("createProgram",()=>`You cannot create the '${l.name}' program`),!1):c.req(t)?(t.startCreateProgramWork(l.name,c.time,c.level),o?(t.startFocusing(),k.b.toWork()):s&&(t.stopFocusing(),k.b.toTerminal()),e.log("createProgram",()=>`Began creating program: '${i}'`),!0):(e.log("createProgram",()=>`Hacking level is too low to create '${l.name}' (level ${c.level} req)`),!1)},commitCrime:function(a){const r=n.string("commitCrime","crimeRoughName",a);if(n.updateDynamicRam("commitCrime",Object(m.c)(t,"commitCrime")),n.checkSingularityAccess("commitCrime"),t.isWorking){const n=t.singularityStopWork();e.log("commitCrime",()=>n)}t.gotoLocation(v.a.Slums);const i=Object(d.b)(r.toLowerCase());if(null==i)throw n.makeRuntimeErrorMsg("commitCrime",`Invalid crime: '${r}'`);return e.log("commitCrime",()=>`Attempting to commit ${i.name}...`),i.commit(k.b,t,1,e)},getCrimeChance:function(e){const a=n.string("getCrimeChance","crimeRoughName",e);n.updateDynamicRam("getCrimeChance",Object(m.c)(t,"getCrimeChance")),n.checkSingularityAccess("getCrimeChance");const r=Object(d.b)(a.toLowerCase());if(null==r)throw n.makeRuntimeErrorMsg("getCrimeChance","Invalid crime: "+a);return r.successRate(t)},getCrimeStats:function(e){const a=n.string("getCrimeStats","crimeRoughName",e);n.updateDynamicRam("getCrimeStats",Object(m.c)(t,"getCrimeStats")),n.checkSingularityAccess("getCrimeStats");const r=Object(d.b)(a.toLowerCase());if(null==r)throw n.makeRuntimeErrorMsg("getCrimeStats","Invalid crime: "+a);return Object.assign({},r)},getDarkwebPrograms:function(){return n.updateDynamicRam("getDarkwebPrograms",Object(m.c)(t,"getDarkwebPrograms")),n.checkSingularityAccess("getDarkwebPrograms"),t.hasTorRouter()?Object.values(y.a).map(t=>t.program):(e.log("getDarkwebPrograms",()=>"You do not have the TOR router."),[])},getDarkwebProgramCost:function(a){const r=n.string("getDarkwebProgramCost","programName",a).toLowerCase();if(n.updateDynamicRam("getDarkwebProgramCost",Object(m.c)(t,"getDarkwebProgramCost")),n.checkSingularityAccess("getDarkwebProgramCost"),!t.hasTorRouter())return e.log("getDarkwebProgramCost",()=>"You do not have the TOR router."),-1;const i=Object.values(y.a).find(t=>t.program.toLowerCase()===r);if(null==i)throw n.makeRuntimeErrorMsg("getDarkwebProgramCost",`No such exploit ('${r}') found on the darkweb! \nThis function is not case-sensitive. Did you perhaps forget .exe at the end?`);return t.hasProgram(i.program)?(e.log("getDarkwebProgramCost",()=>`You already have the '${i.program}' program`),0):i.price}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(9);function r(){const t=[];return{write:e=>(t.push(e),t.length>a.a.MaxPortCapacity?t.shift():null),tryWrite:e=>!(t.length>=a.a.MaxPortCapacity)&&(t.push(e),!0),read:()=>0===t.length?"NULL PORT DATA":t.shift(),peek:()=>{if(0===t.length)return"NULL PORT DATA";return t.slice()[0]},full:()=>t.length==a.a.MaxPortCapacity,empty:()=>0===t.length,clear:()=>{t.length=0}}}},function(t,e,n){"use strict";function a(t){for(const e in t)t.hasOwnProperty(e)&&delete t[e]}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(363),r=n(2);function i(t){const e="SourceFile"+t.n,n=a.a[e];if(null!=n){switch(t.n){case 1:{let e=0;for(let n=0;nn.hacking?t.error("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof r.a?t.error("Cannot use backdoor on this type of Server"):t.startBackdoor(n):t.error("You do not have admin rights for this machine! Cannot backdoor")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(465),r=n(102),i=n(26);function o(t,e,n,o,s){if(!Object(i.d)(r.a.DarkWeb))return void t.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)");if(1!=s.length)return t.print("Incorrect number of arguments. Usage: "),t.print("buy -l"),t.print("buy -a"),void t.print("buy [item name]");const l=s[0]+"";"-l"==l||"-1"==l||"--list"==l?Object(a.d)():"-a"==l||"--all"==l?Object(a.a)():Object(a.b)(l)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(267),r=n(578),i=n(16);function o(t,e,n,o,s){if(1!==s.length)return void t.error("Incorrect usage of cat command. Usage: cat [file]");const l=s[0]+"",c=t.getFilepath(l);if(c.endsWith(".msg")||c.endsWith(".lit")||c.endsWith(".txt")||c.endsWith(".script")||c.endsWith(".js")||c.endsWith(".ns")){if(c.endsWith(".msg")||c.endsWith(".lit"))for(let t=0;t
${e.code}`)}t.error("No such file "+c)}else t.error("Only .msg, .txt, .lit, .script, .js, and .ns files are viewable with cat (filename must end with .msg, .txt, .lit, .script, .js, or .ns)")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(83);function r(t,e,n,r,i){if(i.length>1)t.error("Incorrect number of arguments. Usage: cd [dir]");else{let e=1===i.length?i[0]+"":"/",r="";if("/"===e)r="/";else{if(e=Object(a.l)(e),r=Object(a.c)(e,t.cwd()),null===r||""===r)return void t.error("Invalid path. Failed to change directories");const i=n.getCurrentServer();if(!i.scripts.some(t=>t.filename.startsWith(r+""))&&!i.textFiles.some(t=>t.fn.startsWith(r+"")))return void t.error("Invalid path. Failed to change directories")}t.setcwd(r)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(233),r=n(98);function i(t,e,n,i,o){if(o.length<1)t.error("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const e=t.getFilepath(o[0]+"");if(!Object(r.a)(e))return void t.error(`'check' can only be called on scripts files (filename must end with ${r.b.join(", ")})`);const n=Object(a.a)(e,o.slice(1),i);if(null==n)return void t.error(`No script named ${e} is running on the server`);n.displayLog()}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(132),r=n(26),i=n(47);function o(t,e,n,o,s){if(1!==s.length)return void t.error("Incorrect usage of connect command. Usage: connect [hostname]");const l=s[0]+"";for(let e=0;en.hacking?t.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):t.startGrow(n):t.error("You do not have admin rights for this machine! Cannot grow")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(47);function r(t,e,n,r,i){if(0!==i.length)return void t.error("Incorrect usage of hack command. Usage: hack");r instanceof a.a||t.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?t.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>n.hacking?t.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):t.startHack(n):t.error("You do not have admin rights for this machine! Cannot hack")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(520);function r(t,e,n,r,i){if(0===i.length||1===i.length)if(0===i.length)a.b.forEach(e=>t.print(e));else{const e=i[0]+"",n=a.a[e];if(null==n)return void t.error("No help topics match '"+e+"'");n.forEach(e=>t.print(e))}else t.error("Incorrect usage of help command. Usage: help")}},function(t,e,n){"use strict";function a(t,e,n,a,r){if(0===r.length)return void t.commandHistory.forEach((e,n)=>{t.print(`${n.toString().padStart(2)} ${e}`)});const i=r[0]+"";"-c"===i||"--clear"===i?(n.terminalCommandHistory=[],t.commandHistory=[],t.commandHistoryIndex=1):t.error("Incorrect usage of history command. usage: history [-c]")}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";function a(t,e,n,a,r){0===r.length?(n.getCurrentServer().isConnectedTo=!1,n.currentServer=n.getHomeComputer().hostname,n.getCurrentServer().isConnectedTo=!0,t.print("Connected to home"),t.setcwd("/")):t.error("Incorrect usage of home command. Usage: home")}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";function a(t,e,n,a,r){0===r.length?t.print(n.getCurrentServer().hostname):t.error("Incorrect usage of hostname command. Usage: hostname")}n.d(e,"a",(function(){return a}))},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(142);function r(t,e,n,r,i){try{if(i.length<1)return void t.error("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("boolean"==typeof i[0])return;if("number"==typeof i[0]){const e=i[0];return void(Object(a.a)(e)?t.print("Killing script with PID "+e):t.error(`Failed to kill script with PID ${e}. No such script is running`))}const e=t.getFilepath(i[0]),n=r.getRunningScript(e,i.slice(1));if(null==n)return void t.error("No such script is running. Nothing to kill");Object(a.a)(n,r.hostname,!1),t.print("Killing "+e)}catch(e){t.error(e+"")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(142),r=n(292);function i(t,e,n,i){for(let t=i.runningScripts.length-1;t>=0;--t)Object(a.a)(i.runningScripts[t],i.hostname,!1);r.a.emit(),t.print("Killing all running scripts")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return f}));var a=n(137),r=n(113),i=n(173),o=n(0),s=n.n(o),l=n(83),c=n(314);function f(t,e,n,o,f){let u;try{u=c({"-l":Boolean,"--grep":String,"-g":"--grep"},{argv:f})}catch(t){return void h()}const m=u["--grep"];function h(){t.error("Incorrect usage of ls command. Usage: ls [dir] [-l] [-g, --grep pattern]")}if(f.length>4)return h();let d=t.cwd();d.endsWith("/")||(d+="/");const p=f[0]&&"string"==typeof f[0]&&!f[0].startsWith("-")?f[0]:"",g=Object(l.c)(p+"",t.cwd());if(d=g||"",d.endsWith("/")||(d+="/"),!Object(l.i)(d))return h();"/"===d&&(d="");const y=[],b=[],E=[],v=[],k=[],_=[];function w(t,e){let n=t;if(d){if(!t.startsWith(d))return;n=t.slice(d.length,t.length)}if(!m||n.includes(m))if(n.includes("/")){const t=Object(l.g)(n);if(m&&!t.includes(m))return;_.includes(t)||_.push(t)}else e.push(n)}const S=n.getCurrentServer();for(const t of S.programs)w(t,y);for(const t of S.scripts)w(t.filename,b);for(const t of S.textFiles)w(t.fn,E);for(const t of S.contracts)w(t.fn,v);for(const t of S.messages)w(t,k);function C({row:o,prefix:l,hostname:c}){const f=Object(r.a)(t=>Object(a.a)({scriptLinksWrap:{display:"inline-flex",color:t.palette.warning.main},scriptLink:{cursor:"pointer",textDecorationLine:"underline",paddingRight:"1.15em","&:last-child":{padding:0}}}))();let u=o.split("~").map(t=>[t.trim(),t.replace(t.trim(),"")]);return u=u.filter(t=>!!t[0]),s.a.createElement("span",{className:f.scriptLinksWrap},u.map(a=>s.a.createElement("span",null,s.a.createElement("span",{key:a[0],className:f.scriptLink,onClick:()=>function(a){var r;if(n.getCurrentServer().hostname!==c)return t.error(`File is not on this server, connect to ${c} and try again`);a.startsWith("/")&&(a=a.slice(1));const o=t.getFilepath(`${l}${a}`),s=Object(i.toString)(null===(r=t.getScript(n,o))||void 0===r?void 0:r.code);e.toScriptEditor({[o]:s})}(a[0])},a[0]),s.a.createElement("span",{key:"s"+a[0]},a[1]))))}function x(e,n,a,r){const i=Math.max(...e.map(t=>t.length))+1,l=!0===n["-l"]?1:Math.ceil(80/i);for(let n=0;nt.segments.length>0);for(let t=0;te.cost-t.cost))&&void 0!==s?s:[],m=r.a.UseIEC60027_2?9:8;for(const e of u)t.print(`${a.a.formatRAM(e.cost*i).padStart(m)} | ${e.name} (${e.type})`);f>0&&0===u.length&&t.warn("You might have to open & save this script to see the detailed RAM usage information.")}catch(e){t.error(e+"")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(98),r=n(223),i=n(83);function o(t,e,n,o,s){if(2===s.length)try{const e=s[0]+"",l=s[1]+"";if(!Object(a.a)(e)&&!e.endsWith(".txt"))return void t.error("'mv' can only be used on scripts and text files (.txt)");const c=t.getFile(n,e);if(null==c)return void t.error(`Source file ${e} does not exist`);const f=t.getFilepath(e),u=Object(i.f)(l,e,t.cwd());if(null===u)return void t.error("error parsing dst file");const m=t.getFile(n,u),h=t.getFilepath(u);if(Object(i.a)(f,h))return void t.error("Source and destination files are the same file");if(Object(a.a)(e)){const e=c;if(!Object(a.a)(h))return void t.error("Source and destination files must have the same type");if(o.isRunning(f))return void t.error("Cannot use 'mv' on a script that is running");if(null!=m){if(!o.removeFile(h).res)return void t.error("Something went wrong...please contact game dev (probably a bug)");t.print("Warning: The destination file was overwritten")}e.filename=h}else if(c instanceof r.a){const e=c;if(!u.endsWith(".txt"))return void t.error("Source and destination files must have the same type");if(null!=m){if(!o.removeFile(h).res)return void t.error("Something went wrong...please contact game dev (probably a bug)");t.print("Warning: The destination file was overwritten")}e.fn=h}}catch(e){t.error(e+"")}else t.error("Incorrect number of arguments. Usage: mv [src] [dest]")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(634);function r(t,e,n,r,i){return Object(a.a)("nano",{terminal:t,router:e,player:n,server:r,args:i})}},function(t,e,n){"use strict";n.d(e,"a",(function(){return a}));const a=new class{constructor(){this.positions=new Map}saveCursor(t,e){this.positions.set(t,e)}getCursor(t){const e=this.positions.get(t);return e||{row:-1,column:-1}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(314);function r(t,e,n,r,i){let o;try{o=a({"--grep":String,"-g":"--grep"},{argv:i})}catch(e){return void t.error("Incorrect usage of ps command. Usage: ps [-g, --grep pattern]")}const s=o["--grep"];if(s){const e=new RegExp(s.toString()),n=r.runningScripts.filter(t=>e.test(t.filename));for(let e=0;e0?d:1,y=h._;if(null==Object(o.a)(u,y,c)){for(let e=0;ef)return void t.error("This machine does not have enough RAM to run this script with "+g+" threads. Script requires "+l.a.formatRAM(s)+" of RAM");const m=new i.a(o,y);m.threads=g;return Object(r.e)(n,m,c)?(t.print(`Running script with ${g} thread(s), pid ${m.pid} and args: ${JSON.stringify(y)}.`),m.filename.endsWith(".ns")&&t.warn(".ns files are deprecated, please rename everything to .js"),void(p&&a.b.emit(m))):void t.error("Failed to start script")}t.error("No such script")}else t.error("This script is already running with the same args. Cannot run multiple instances with the same args")}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(64);function r(t,e,n,r,i){if(i.length<1)return;const o=i[0]+"";if(n.hasProgram(o)){if(!(i.length<1)){for(const s of Object.values(a.a))if(s.name.toLocaleLowerCase()===o.toLocaleLowerCase())return void s.run(e,t,n,r,i.slice(1).map(t=>t+""));t.error("Invalid executable. Cannot be run")}}else t.error(`No such (exe, script, js, ns, or cct) file! (Only programs that exist on your home computer or scripts on ${n.getCurrentServer().hostname} can be run)`)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(132);function r(t,e,n,r,i){if(0!==i.length)return void t.error("Incorrect usage of scan command. Usage: scan");const o=n.getCurrentServer(),s=o.serversOnNetwork.map((t,e)=>{const n=Object(a.a)(o,e);if(null===n)throw new Error("Server should not be null");return{hostname:n.hostname,ip:n.ip,hasRoot:n.hasAdminRights?"Y":"N"}});s.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const l=Math.max(...s.map(t=>t.hostname.length)),c=Math.max(...s.map(t=>t.ip.length));for(const e of s){if(!e)continue;let n=e.hostname;n+=" ".repeat(l-e.hostname.length+1),n+=e.ip,n+=" ".repeat(c-e.ip.length+1),n+=e.hasRoot,t.print(n)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));var a=n(64);function r(t,e,n,r,i){if(0===i.length)t.executeScanAnalyzeCommand(n,1);else{if(i.length>2)return void t.error("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let e=!1;2===i.length&&"-a"===i[1]&&(e=!0);const r=parseInt(i[0]+"");if(isNaN(r)||r<0)return void t.error("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(r>3&&!n.hasProgram(a.a.DeepscanV1.name)&&!n.hasProgram(a.a.DeepscanV2.name))return void t.error("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(r>5&&!n.hasProgram(a.a.DeepscanV2.name))return void t.error("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(r>10)return void t.error("You cannot scan-analyze with that high of a depth. Maximum depth is 10");t.executeScanAnalyzeCommand(n,r,e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(26),r=n(98);function i(t,e,n,i,o){try{if(2!==o.length)return void t.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname]");const e=t.getFilepath(o[0]+"");if(!e.endsWith(".lit")&&!Object(r.a)(e)&&!e.endsWith(".txt"))return void t.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const s=Object(a.d)(o[1]+"");if(null==s)return void t.error(`Invalid destination. ${o[1]} not found`);if(e.endsWith(".lit")){let n=!1;for(let t=0;t1){t.error("Found several potential candidates:");for(const e of a)t.error(`${e.filename} ${e.args.join(" ")}`);return void t.error("Script arguments need to be specified.")}t.error(`No script named ${e} is running on the server`)}else if("number"==typeof l[0]){const e=Object(a.b)(l[0],s);if(null==e)return void t.error(`No script with PID ${l[0]} is running on the server`);o.b.emit(e)}}catch(e){t.error(e+"")}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(633),r=n(4);function i(t,e,n,i,o){if(0!==o.length)return void t.error("Incorrect usage of top command. Usage: top");const s=`Script${" ".repeat(40-"Script".length)}PID${" ".repeat(10-"PID".length)}Threads${" ".repeat(16-"Threads".length)}RAM Usage`;t.print(s);const l=i.runningScripts;for(let e=0;en.hacking?t.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):t.startWeaken(n):t.error("You do not have admin rights for this machine! Cannot weaken")}},function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return r}));var a=n(98);function r(e,n,r,i,o){if(2!==o.length)return void e.error("Incorrect usage of wget command. Usage: wget [url] [target file]");const s=o[0]+"",l=e.getFilepath(o[1]+"");if(!Object(a.a)(l)&&!l.endsWith(".txt"))return e.error("wget failed: Invalid target file. Target file must be script or text file");t.get(s,(function(t){let n;return n=Object(a.a)(l)?i.writeToScriptFile(r,l,t):i.writeToTextFile(l,t),n.success?n.overwritten?e.print("wget successfully retrieved content and overwrote "+l):e.print("wget successfully retrieved content to new file "+l):e.error("wget failed")}),"text").fail((function(t){return e.error("wget failed: "+JSON.stringify(t))}))}}).call(this,n(811))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));var a=n(2),r=n(106);function i(){!function(){if(a.a.exploits.includes(r.a.PrototypeTampering))return;setInterval((function(){"5.5e+1"!==55..toExponential()&&a.a.giveExploit(r.a.PrototypeTampering)}),9e5)}(),function(){if(a.a.exploits.includes(r.a.TimeCompression))return;let t=performance.now();window.setTimeout((function e(){const n=performance.now();n-t<500?a.a.giveExploit(r.a.TimeCompression):(t=n,window.setTimeout(e,15e3))}),15e3)}()}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var a=n(268),r=n(109),i=n(16);function o(){window.addEventListener("unhandledrejection",(function(t){if(Object(r.a)(t.reason)){const e=t.reason.split("|DELIMITER|"),n=e[1],a=e[2],r=e[3];let o=`UNCAUGHT PROMISE ERROR
You forgot to await a promise
${a}@${n}
`;o+="
",o+=r,Object(i.a)(o)}else if(t.reason instanceof a.a){const e=`UNCAUGHT PROMISE ERROR
You forgot to await a promise
${t.reason.name}@${t.reason.hostname}
Maybe hack / grow / weaken ?`;Object(i.a)(e)}}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";n.r(e);var a=n(0),r=n.n(a),i=n(104),o=n.n(i),s=n(167),l=n(727),c=n(293);function f(){Object(s.c)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root"))}Object(c.a)(),globalThis.React=r.a,globalThis.ReactDOM=o.a,o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root")),s.b.subscribe(f),location.href.startsWith("file://")||(window.onbeforeunload=function(){return"Your work will be lost."})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){},,function(t,e){},,,,,,,,,,,,function(t,e){},,function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){},,function(t,e){},function(t,e){},,,,,function(t,e){},,function(t,e){},,,,,,function(t,e){},,function(t,e){},,,,,,,,,,,,,,,,,,,function(t,e){},,,,,,,,,,,,function(t,e){},,,function(t,e){}]); + */r.PARSE_OPTIONS={ecmaVersion:5,locations:!0},r.READONLY_DESCRIPTOR={configurable:!0,enumerable:!0,writable:!1},r.NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!0},r.READONLY_NONENUMERABLE_DESCRIPTOR={configurable:!0,enumerable:!1,writable:!1},r.VARIABLE_DESCRIPTOR={configurable:!1,enumerable:!0,writable:!0},r.STEP_ERROR={},r.SCOPE_REFERENCE={},r.VALUE_IN_DESCRIPTOR={},r.toStringCycles_=[],r.prototype.getErrorLineNumber=function(t){var e=this.sourceCode;if(null==t||null==t.start)return NaN;try{return((e=e.substring(0,t.start)).match(/\n/g)||[]).length+1-this.sourceCodeLineOffset}catch(t){return NaN}},r.prototype.getErrorLineNumberMessage=function(t){return isNaN(t)?" (Unknown line number)":t<=0?" (Error occurred in an imported function)":" (Line Number "+t+". This line number is probably incorrect if your script is importing any functions. This is being worked on)"},r.prototype.appendCode=function(t){var e=this.stateStack[0];if(!e||"Program"!==e.node.type)throw Error("Expecting original AST to start with a Program node.");if("string"==typeof t&&(t=n.a(t,r.PARSE_OPTIONS)),!t||"Program"!==t.type)throw Error("Expecting new AST to start with a Program node.");this.populateScope_(t,e.scope);for(var a,i=0;a=t.body[i];i++)e.node.body.push(a);e.done=!1},r.prototype.step=function(){var t=this.stateStack,e=t[t.length-1];if(!e)return!1;var a=e.node,n=a.type;if("Program"===n&&e.done)return!1;if(this.paused_)return!0;try{var i=this.stepFunctions_[n](t,e,a)}catch(t){if(t!==r.STEP_ERROR)throw t}return i&&t.push(i),!!a.end||this.step()},r.prototype.run=function(){for(;!this.paused_&&this.step(););return this.paused_},r.prototype.initGlobalScope=function(t){this.setProperty(t,"NaN",NaN,r.READONLY_DESCRIPTOR),this.setProperty(t,"Infinity",1/0,r.READONLY_DESCRIPTOR),this.setProperty(t,"undefined",void 0,r.READONLY_DESCRIPTOR),this.setProperty(t,"window",t,r.READONLY_DESCRIPTOR),this.setProperty(t,"this",t,r.READONLY_DESCRIPTOR),this.setProperty(t,"self",t),this.OBJECT_PROTO=new r.Object(null),this.FUNCTION_PROTO=new r.Object(this.OBJECT_PROTO),this.initFunction(t),this.initObject(t),t.proto=this.OBJECT_PROTO,this.setProperty(t,"constructor",this.OBJECT,r.NONENUMERABLE_DESCRIPTOR),this.initArray(t),this.initString(t),this.initBoolean(t),this.initNumber(t),this.initDate(t),this.initRegExp(t),this.initError(t),this.initMath(t),this.initJSON(t);var e=this,a=this.createNativeFunction((function(t){throw EvalError("Can't happen")}),!1);a.eval=!0,this.setProperty(t,"eval",a),this.setProperty(t,"parseInt",this.createNativeFunction(parseInt,!1)),this.setProperty(t,"parseFloat",this.createNativeFunction(parseFloat,!1)),this.setProperty(t,"isNaN",this.createNativeFunction(isNaN,!1)),this.setProperty(t,"isFinite",this.createNativeFunction(isFinite,!1));for(var n=[[escape,"escape"],[unescape,"unescape"],[decodeURI,"decodeURI"],[decodeURIComponent,"decodeURIComponent"],[encodeURI,"encodeURI"],[encodeURIComponent,"encodeURIComponent"]],i=0;i>> 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;","}","});","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;","}","});","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","});","}","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","});","}","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++;","}","}","});","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;","}","});","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;","}","});","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;","}","});","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;","}","});","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) {","if (typeof opt_comp !== 'function') {","return sort_.call(this);","}","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(',');","}","});","")},r.prototype.initString=function(t){var e,a=this;e=function(t){return t=String(t),a.calledWithNew()?(this.data=t,this):t},this.STRING=this.createNativeFunction(e,!0),this.setProperty(t,"String",this.STRING),this.setProperty(this.STRING,"fromCharCode",this.createNativeFunction(String.fromCharCode,!1),r.NONENUMERABLE_DESCRIPTOR);for(var n=["charAt","charCodeAt","concat","indexOf","lastIndexOf","slice","substr","substring","toLocaleLowerCase","toLocaleUpperCase","toLowerCase","toUpperCase","trim"],i=0;i= 0; i--) {","str = str.substring(0, subs[i][0]) + subs[i][2] + str.substring(subs[i][0] + subs[i][1]);","}","} else {","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;","};","})();","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;","};","}","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;","}","};","}","if (!String.prototype.startsWith) {","String.prototype.startsWith = function(search, pos) {","return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;","};","}","")},r.prototype.initBoolean=function(t){var e,a=this;e=function(t){return t=Boolean(t),a.calledWithNew()?(this.data=t,this):t},this.BOOLEAN=this.createNativeFunction(e,!0),this.setProperty(t,"Boolean",this.BOOLEAN)},r.prototype.initNumber=function(t){var e,a=this;e=function(t){return t=Number(t),a.calledWithNew()?(this.data=t,this):t},this.NUMBER=this.createNativeFunction(e,!0),this.setProperty(t,"Number",this.NUMBER);for(var n=["MAX_VALUE","MIN_VALUE","NaN","NEGATIVE_INFINITY","POSITIVE_INFINITY"],i=0;i>>0;return e===Number(t)?e:NaN},r.legalArrayIndex=function(t){var e=t>>>0;return String(e)===String(t)&&4294967295!==e?e:NaN},r.Value,r.Object=function(t){this.getter=Object.create(null),this.setter=Object.create(null),this.properties=Object.create(null),this.proto=t},r.Object.prototype.proto=null,r.Object.prototype.isObject=!0,r.Object.prototype.class="Object",r.Object.prototype.data=null,r.Object.prototype.toString=function(){if("Array"===this.class){(n=r.toStringCycles_).push(this);try{for(var t=[],e=0;e0;i.pop()){var o=i[i.length-1];switch(o.node.type){case"TryStatement":return void(o.cv={type:t,value:e,label:a});case"CallExpression":case"NewExpression":if(t===r.Completion.RETURN)return void(o.value=e);if(t!==r.Completion.THROW)throw Error("Unsynatctic break/continue not rejected by Acorn")}if(t===r.Completion.BREAK){if(a?o.labels&&-1!==o.labels.indexOf(a):o.isLoop||o.isSwitch)return void i.pop()}else if(t===r.Completion.CONTINUE&&(a?o.labels&&-1!==o.labels.indexOf(a):o.isLoop))return}var s;if(this.isa(e,this.ERROR)){var l={EvalError:EvalError,RangeError:RangeError,ReferenceError:ReferenceError,SyntaxError:SyntaxError,TypeError:TypeError,URIError:URIError},c=this.getProperty(e,"name").toString(),f=this.getProperty(e,"message").valueOf();s=(t=l[c]||Error)(f+n)}else s=String(e)+n;throw s},r.prototype.createGetter_=function(t,e){var a=Array.isArray(e)?e[0]:e,n=new this.nodeConstructor;n.type="CallExpression";var i=new r.State(n,this.stateStack[this.stateStack.length-1].scope);return i.doneCallee_=!0,i.funcThis_=a,i.func_=t,i.doneArgs_=!0,i.arguments_=[],i},r.prototype.createSetter_=function(t,e,a){var n=Array.isArray(e)?e[0]:this.global,i=new this.nodeConstructor;i.type="CallExpression";var o=new r.State(i,this.stateStack[this.stateStack.length-1].scope);return o.doneCallee_=!0,o.funcThis_=n,o.func_=t,o.doneArgs_=!0,o.arguments_=[a],o},r.State=function(t,e){this.node=t,this.scope=e},r.prototype.stepArrayExpression=function(t,e,a){var n=a.elements,i=e.n_||0;for(e.array_?(this.setProperty(e.array_,i,e.value),i++):(e.array_=this.createObjectProto(this.ARRAY_PROTO),e.array_.properties.length=n.length);i>=":s>>=l;break;case">>>=":s>>>=l;break;case"&=":s&=l;break;case"^=":s^=l;break;case"|=":s|=l;break;default:throw SyntaxError("Unknown assignment expression: "+a.operator)}var c=this.setValue(e.leftReference_,s);if(c)return e.doneSetter_=!0,e.setterValue_=s,this.createSetter_(c,e.leftReference_,s);t.pop(),t[t.length-1].value=s},r.prototype.stepBinaryExpression=function(t,e,a){if(!e.doneLeft_)return e.doneLeft_=!0,new r.State(a.left,e.scope);if(!e.doneRight_)return e.doneRight_=!0,e.leftValue_=e.value,new r.State(a.right,e.scope);t.pop();var n,i=e.leftValue_,o=e.value;switch(a.operator){case"==":n=i==o;break;case"!=":n=i!=o;break;case"===":n=i===o;break;case"!==":n=i!==o;break;case">":n=i>o;break;case">=":n=i>=o;break;case"<":n=i>":n=i>>o;break;case">>>":n=i>>>o;break;case"in":if(!o||!o.isObject){let t=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,"'in' expects an object, not '"+o+"'",t)}n=this.hasProperty(o,i);break;case"instanceof":if(!this.isa(o,this.FUNCTION)){let t=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,"Right-hand side of instanceof is not an object",t)}n=!!i.isObject&&this.isa(i,o);break;default:throw SyntaxError("Unknown binary operator: "+a.operator)}t[t.length-1].value=n},r.prototype.stepBlockStatement=function(t,e,a){var n=e.n_||0,i=a.body[n];if(i)return e.n_=n+1,new r.State(i,e.scope);t.pop()},r.prototype.stepBreakStatement=function(t,e,a){var n=a.label&&a.label.name;this.unwind(r.Completion.BREAK,void 0,n)},r.prototype.stepCallExpression=function(t,e,a){if(!e.doneCallee_){e.doneCallee_=1;var i=new r.State(a.callee,e.scope);return i.components=!0,i}if(1===e.doneCallee_){e.doneCallee_=2;var o=e.value;if(Array.isArray(o)){if(e.func_=this.getValue(o,a),o[0]===r.SCOPE_REFERENCE?e.directEval_="eval"===o[1]:e.funcThis_=o[0],(o=e.func_)&&"object"==typeof o&&o.isGetter)return o.isGetter=!1,e.doneCallee_=1,this.createGetter_(o,e.value)}else e.func_=o;e.arguments_=[],e.n_=0}o=e.func_;if(!e.doneArgs_){if(0!==e.n_&&e.arguments_.push(e.value),a.arguments[e.n_])return new r.State(a.arguments[e.n_++],e.scope);if("NewExpression"===a.type){if(o.illegalConstructor){let t=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,o+" is not a constructor",t)}var s=o.properties.prototype;"object"==typeof s&&null!==s||(s=this.OBJECT_PROTO),e.funcThis_=this.createObjectProto(s),e.isConstructor=!0}else void 0===e.funcThis_&&(e.funcThis_=e.scope.strict?void 0:this.global);e.doneArgs_=!0}if(e.doneExec_)t.pop(),e.isConstructor&&"object"!=typeof e.value?t[t.length-1].value=e.funcThis_:t[t.length-1].value=e.value;else{if(e.doneExec_=!0,!o||!o.isObject){let t=this.getErrorLineNumber(a);this.throwException(this.TYPE_ERROR,o+" is not a function",t)}var l=o.node;if(l){for(var c=this.createScope(l.body,o.parentScope),f=0;ff?e.arguments_[f]:void 0;this.setProperty(c,u,m)}var h=this.createObjectProto(this.ARRAY_PROTO);for(f=0;fn.a.ServerMaxGrowthRate&&(s=n.a.ServerMaxGrowthRate);const l=o*(t.serverGrowth/100)*r.a.ServerGrowthRate,c=1+(i-1)/16;return Math.pow(s,l*a.hacking_grow_mult*c)}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(5),r=a(57),i=a(15),o=a(29);function s(t,e){const a=t.augmentations.map(t=>t.name),s=[];function l(t){if(t.name===i.a.NeuroFluxGovernor)return!1;if(a.includes(t.name))return!1;if(s.includes(t))return!1;if(t.isSpecial)return!1;const e=["hacking_mult","strength_mult","defense_mult","dexterity_mult","agility_mult","charisma_mult","hacking_exp_mult","strength_exp_mult","defense_exp_mult","dexterity_exp_mult","agility_exp_mult","charisma_exp_mult","company_rep_mult","faction_rep_mult","crime_money_mult","crime_success_mult","work_money_mult"];for(const a of Object.keys(t.mults))if(e.includes(a))return!0;return!1}if(e.inGang()){const t=e.getGangFaction();for(const e of Object.keys(r.a)){const a=r.a[e];l(a)&&(t.playerReputation>a.baseRepRequirement&&s.push(a))}}for(const t of e.factions){if(t===n.a.Bladeburners)continue;if(t===n.a.Netburners)continue;const e=o.a[t];if(null!=e)for(const t of e.augmentations){const a=r.a[t];l(a)&&(e.playerReputation>a.baseRepRequirement&&s.push(a))}}return s}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n=new(a(131).a)},function(t,e,a){"use strict";a.d(e,"b",(function(){return O})),a.d(e,"a",(function(){return A}));var n=a(1742),r=a(1743),i=a(1744),o=a(1),s=a(535),l=a(10),c=a(21),f=a(65),u=a(286),m=a(330),h=a(0),d=a.n(h),p=a(57),g=a(15),y=a(8),b=a(105),E=a(11),v=a(218),k=a(9),_=a(30),w=a(250),S=a(20),C=a(24),x=a(467);const L={},O=t=>{const e=[];for(const[t,a]of Object.entries(p.a))t===g.a.NeuroFluxGovernor||t===g.a.TheRedPill||a.isSpecial||e.push(t);return e.filter(e=>!t.hasAugmentation(e))},M=(t,e)=>!(t.money{const e=t.aug,a=t.player;return d.a.createElement(o.a,{color:k.a.theme.money},d.a.createElement("b",null,"Pre-Requisites:"),d.a.createElement("br",null),e.prereqs.map(t=>d.a.createElement("span",{style:{display:"flex",alignItems:"center"}},a.hasAugmentation(t)?d.a.createElement(n.a,{sx:{mr:1}}):d.a.createElement(r.a,{sx:{mr:1}}),t)))},A=()=>{const t=_.b.Player(),e=_.b.Router();for(const t of Object.values(p.a)){const e=t.name,a=new x.a(t);L[e]=a}const[a,n]=Object(h.useState)(O(t)[0]),[r,g]=Object(h.useState)(!1);return d.a.createElement(s.a,{disableGutters:!0,maxWidth:"lg",sx:{mx:0}},d.a.createElement(l.a,{onClick:()=>e.toLocation(v.a[E.a.NewTokyoVitaLife])},"Back"),d.a.createElement(o.a,{variant:"h4"},"Grafting Laboratory"),d.a.createElement(o.a,null,"You find yourself in a secret laboratory, owned by a mysterious researcher.",d.a.createElement("br",null),"The scientist explains that they've been studying Augmentation grafting, the process of applying Augmentations without requiring a body reset.",d.a.createElement("br",null),d.a.createElement("br",null),"Through legally questionable connections, the scientist has access to a vast array of Augmentation blueprints, even private designs. They offer to build and graft the Augmentations to you, in exchange for both a hefty sum of money, and being a lab rat."),d.a.createElement(c.a,{sx:{my:3}},d.a.createElement(o.a,{variant:"h5"},"Graft Augmentations"),O(t).length>0?d.a.createElement(f.a,{sx:{my:1,width:"fit-content",display:"grid",gridTemplateColumns:"1fr 3fr"}},d.a.createElement(u.a,{sx:{maxHeight:400,overflowY:"scroll",borderRight:"1px solid "+k.a.theme.welllight}},O(t).map((t,e)=>d.a.createElement(m.a,{key:e+1,onClick:()=>n(t),selected:a===t},d.a.createElement(o.a,null,t)))),d.a.createElement(c.a,{sx:{m:1}},d.a.createElement(o.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},d.a.createElement(i.a,{sx:{mr:1}})," ",a),d.a.createElement(l.a,{onClick:()=>g(!0),sx:{width:"100%"},disabled:!M(t,L[a])},"Graft Augmentation (",d.a.createElement(o.a,null,d.a.createElement(S.a,{money:L[a].cost,player:t})),")"),d.a.createElement(w.a,{open:r,onClose:()=>g(!1),onConfirm:()=>{const n=L[a];t.loseMoney(n.cost,"augmentations"),t.startGraftAugmentationWork(a,n.time),t.startFocusing(),e.toWork()},confirmationText:d.a.createElement(d.a.Fragment,null,"Cancelling grafting will ",d.a.createElement("b",null,"not")," save grafting progress, and the money you spend will ",d.a.createElement("b",null,"not")," ","be returned.",d.a.createElement("br",null),d.a.createElement("br",null),"Additionally, grafting an Augmentation will increase the potency of the Entropy virus.")}),d.a.createElement(o.a,{color:k.a.theme.info},d.a.createElement("b",null,"Time to Graft:")," ",Object(C.b)(L[a].time/(1+(t.getIntelligenceBonus(3)-1)/3))),p.a[a].prereqs.length>0&&d.a.createElement(T,{player:t,aug:p.a[a]}),d.a.createElement("br",null),d.a.createElement(o.a,{sx:{maxHeight:305,overflowY:"scroll"}},(()=>{const t=p.a[a],e="string"==typeof t.info?d.a.createElement("span",null,t.info):t.info;return d.a.createElement(d.a.Fragment,null,e,d.a.createElement("br",null),d.a.createElement("br",null),t.stats)})()))):d.a.createElement(o.a,null,"All Augmentations owned")),d.a.createElement(c.a,{sx:{my:3}},d.a.createElement(o.a,{variant:"h5"},"Entropy Virus"),d.a.createElement(f.a,{sx:{my:1,p:1,width:"fit-content"}},d.a.createElement(o.a,null,d.a.createElement("b",null,"Entropy strength:")," ",t.entropy,d.a.createElement("br",null),d.a.createElement("b",null,"All multipliers decreased by:")," ",Object(C.d)(100*(1-y.a.EntropyEffect**t.entropy),3),"% (multiplicative)")),d.a.createElement(o.a,null,"When installed on an unconscious individual, Augmentations are scanned by the body on awakening, eliminating hidden malware. However, grafted Augmentations do not provide this security measure.",d.a.createElement("br",null),d.a.createElement("br",null),'Individuals who tested Augmentation grafting have reported symptoms of an unknown virus, which they\'ve dubbed "Entropy". This virus seems to grow more potent with each grafted Augmentation...')))}},function(t,e,a){"use strict";a.d(e,"b",(function(){return l})),a.d(e,"a",(function(){return c}));var n=a(98),r=a(1047),i=a.n(r),o=a(1048),s=a.n(o);function l(t,e){const a=1==t.length||"*.*"===t?null:t.slice(1),r=new s.a,o=(t,e)=>{for(let n=0;nt.filename),e.scripts.map(t=>t.code)),a&&!a.endsWith(".txt")||o(e.textFiles.map(t=>t.fn),e.textFiles.map(t=>t.text)),0==Object.keys(r.files).length)throw new Error("No files match the pattern "+t);const l=`bitburner${Object(n.a)(t)?"Scripts":"*.txt"===t?"Texts":"Files"}.zip`;r.generateAsync({type:"blob"}).then(t=>i.a.saveAs(t,l))}function c(t,e,a,r,i){try{if(1!==i.length)return void t.error("Incorrect usage of download command. Usage: download [script/text file]");const e=i[0]+"";if(e.startsWith("*"))try{return void l(e,r)}catch(e){return t.error(e.message)}else if(Object(n.a)(e)){const n=t.getScript(a,e);if(null!=n)return n.download()}else{if(!e.endsWith(".txt"))return void t.error("Cannot download this filetype");{const n=t.getTextFile(a,e);if(null!=n)return n.download()}}return void t.error(e+" does not exist")}catch(e){return void t.error(e+"")}}},,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(15),o=a(330),s=a(107),l=a(21),c=a(1),f=a(65),u=a(211),m=a(75),h=a.n(m),d=a(156),p=a.n(d);function g(t){const[e,a]=Object(n.useState)(!1);let m=t.aug.name;return null!=t.level&&t.aug.name===i.a.NeuroFluxGovernor&&(m+=" - Level "+t.level),"string"==typeof t.aug.info?r.a.createElement(l.a,{component:f.a},r.a.createElement(o.a,{onClick:()=>a(t=>!t)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},m)}),e?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"})),r.a.createElement(u.a,{in:e,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,{dangerouslySetInnerHTML:{__html:t.aug.info}}),t.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,t.aug.stats))))):r.a.createElement(l.a,{component:f.a},r.a.createElement(o.a,{onClick:()=>a(t=>!t)},r.a.createElement(s.a,{primary:r.a.createElement(c.a,{style:{whiteSpace:"pre-wrap"}},m)}),e?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(h.a,{color:"primary"})),r.a.createElement(u.a,{in:e,unmountOnExit:!0},r.a.createElement(l.a,{m:4},r.a.createElement(c.a,null,t.aug.info,t.aug.stats&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),t.aug.stats)))))}},,,,,function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"a",(function(){return i}));var n=a(0);const r=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"0 0 166 132",style:{fill:"#adff2f"}},n.createElement("g",null,n.createElement("path",{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.createElement("path",{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"}))),i=n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16px",height:"16px",viewBox:"-22 0 511 511.99561",style:{fill:"#adff2f"}},n.createElement("path",{d:"m.496094 466.242188 39.902344-39.902344 45.753906 45.753906-39.898438 39.902344zm0 0"}),n.createElement("path",{d:"m468.421875 89.832031-1.675781-89.832031-300.265625 300.265625 45.753906 45.753906zm0 0"}),n.createElement("path",{d:"m95.210938 316.785156 16.84375 16.847656h.003906l83.65625 83.65625 22.753906-22.753906-100.503906-100.503906zm0 0"}),n.createElement("path",{d:"m101.445312 365.300781-39.902343 39.902344 45.753906 45.753906 39.902344-39.902343-39.90625-39.902344zm0 0"}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(61),o=a(30),s=a(1),l=a(23),c=a(21),f=a(114),u=a(602),m=a.n(u),h=a(603),d=a.n(h);function p({action:t,isActive:e,bladeburner:a,rerender:n}){const u=o.b.Player(),h=t.level1;return r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{display:"flex"},r.a.createElement(l.a,{title:r.a.createElement(s.a,null,t.getSuccessesNeededForNextLevel(i.a.ContractSuccessesPerLevel)," successes needed for next level")},r.a.createElement(s.a,null,"Level: ",t.level," / ",t.maxLevel))),r.a.createElement(l.a,{title:e?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!h,onClick:function(){h&&(++t.level,e&&a.startAction(u,a.action),n())}},r.a.createElement(m.a,null)))),r.a.createElement(l.a,{title:e?r.a.createElement(s.a,null,"WARNING: changing the level will restart the Operation"):""},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!p,onClick:function(){p&&(--t.level,e&&a.startAction(u,a.action),n())}},r.a.createElement(d.a,null)))))}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1),o=a(23),s=a(21),l=a(274);function c(t){return r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(o.a,{title:r.a.createElement(i.a,null,"Automatically increase operation level when possible")},r.a.createElement(i.a,null," Autolevel:")),r.a.createElement(l.a,{checked:t.action.autoLevel,onChange:function(e){t.action.autoLevel=e.target.checked,t.rerender()}}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1131),o=a(24),s=a(10);function l(t){const[e,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{disabled:0===t.bladeburner.teamSize,onClick:()=>a(!0)},"Set Team Size (Curr Size: ",Object(o.d)(t.action.teamCount,0),")"),r.a.createElement(i.a,{open:e,onClose:()=>a(!1),action:t.action,bladeburner:t.bladeburner}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(){const[t,e]=Object(n.useState)(!0);return Object(n.useEffect)(()=>{const t=setInterval(()=>e(t=>!t),1e3);return()=>clearInterval(t)}),r.a.createElement(r.a.Fragment,null,t?"|":"")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(341),o=a(250),s=a(10),l=a(23),c=a(608),f=a.n(c),u=a(293);function m({color:t="primary"}){const[e,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:"This will permanently delete your local save game. Did you export it before?"},r.a.createElement(s.a,{startIcon:r.a.createElement(f.a,null),color:t,onClick:()=>a(!0)},"Delete Save")),r.a.createElement(o.a,{onConfirm:()=>{a(!1),Object(i.a)().then(()=>{Object(u.b)(),setTimeout(()=>location.reload(),1e3)}).catch(t=>console.error("Could not delete game: "+t))},open:e,onClose:()=>a(!1),confirmationText:"Really delete your game? (It's permanent!)"}))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(250),o=a(10),s=a(23),l=a(1214),c=a.n(l);function f({color:t="primary",noConfirmation:e=!1,onTriggered:a}){const[l,f]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{title:"Perform a soft reset. Resets everything as if you had just purchased an Augmentation."},r.a.createElement(o.a,{startIcon:r.a.createElement(c.a,null),color:t,onClick:function(){e?a():f(!0)}},"Soft Reset")),r.a.createElement(i.a,{onConfirm:a,open:l,onClose:()=>f(!1),confirmationText:"This will perform the same action as installing Augmentations, are you sure?"}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(10),o=a(23),s=a(1215),l=a(1248),c=a.n(l);function f({router:t}){const[e,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{title:"The theme editor allows you to modify the colors the game uses."},r.a.createElement(i.a,{id:"bb-theme-editor-button",startIcon:r.a.createElement(c.a,null),onClick:()=>a(!0)},"Theme Editor")),r.a.createElement(s.a,{open:e,onClose:()=>a(!1),router:t}))}},,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1),o=a(120);function s(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{sx:{my:1}},"If you've created a theme that you believe should be added in game's theme browser, feel free to"," ",r.a.createElement(o.a,{href:"https://github.com/danielyxie/bitburner/tree/dev/src/Themes/README.md",target:"_blank"},"create a pull request"),"."),r.a.createElement(i.a,{sx:{my:1}},"Head over to the"," ",r.a.createElement(o.a,{href:"https://discord.com/channels/415207508303544321/921991895230611466",target:"_blank"},"theme-sharing")," ","discord channel for more."))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(10),o=a(23),s=a(1250),l=a.n(s),c=a(1249);function f(){const[t,e]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{title:"The style editor allows you to modify certain CSS rules used by the game."},r.a.createElement(i.a,{startIcon:r.a.createElement(l.a,null),onClick:()=>e(!0)},"Style Editor")),r.a.createElement(c.a,{open:t,onClose:()=>e(!1)}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(17),o=a(1289),s=a(8),l=a(9),c=a(30),f=a(20),u=a(450),m=a(16),h=a(1),d=a(21),p=a(10);function g(t,e,a){const n=s.a.TravelCost;t.canAfford(n)&&(t.loseMoney(n,"other"),t.travel(a),Object(m.a)(r.a.createElement(r.a.Fragment,null,"You are now in ",a,"!")),e.toCity())}function y(t){const e=c.b.Player(),a=c.b.Router(),m=Object(n.useState)(!1)[1],[y,b]=Object(n.useState)(!1),[E,v]=Object(n.useState)(i.a.Sector12);function k(){m(t=>!t)}function _(t){const n=s.a.TravelCost;e.canAfford(n)&&(l.a.SuppressTravelConfirmation?g(e,a,t):(b(!0),v(t)))}return Object(n.useEffect)(()=>{const t=setInterval(k,1e3);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{variant:"h4"},"Travel Agency"),r.a.createElement(d.a,{mx:2},r.a.createElement(h.a,null,"From here, you can travel to any other city! A ticket costs"," ",r.a.createElement(f.a,{money:s.a.TravelCost,player:t.p}),"."),l.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(i.a).filter(e=>e!=t.p.city).map(t=>{if(void 0===Object.entries(i.a).find(e=>e[1]===t))throw new Error(`could not find key for city '${t}'`);return r.a.createElement(r.a.Fragment,{key:t},r.a.createElement(p.a,{onClick:()=>_(t),sx:{m:2}},r.a.createElement(h.a,null,"Travel to ",t)),r.a.createElement("br",null))})):r.a.createElement(u.a,{currentCity:t.p.city,onTravel:t=>_(t)})),r.a.createElement(o.a,{city:E,travel:()=>g(e,a,E),open:y,onClose:()=>b(!1)}))}},function(t,e,a){"use strict";a.d(e,"b",(function(){return z})),a.d(e,"a",(function(){return X}));var n=a(0),r=a.n(n),i=a(1297),o=a(1311),s=a(83),l=a(16),c=a(98),f=a(253),u=a(223),m=a(509),h=a(323),d=a(4),p=a(663),g=a(342),y=a.n(g),b=a(513),E=a(9),v=a(44),k=a(173),_=a(108),w=a(1312),S=a(26),C=a(10),x=a(1),L=a(120),O=a(21),M=a(594),T=a.n(M),A=a(1321),R=a.n(A),N=a(515),P=a.n(N),I=a(179),F=a(31),D=a(45),j=a(145),B=a(400),G=a(41),W=a(1313),H=a(23),U=a(81);function q(){return(q=Object.assign||function(t){for(var e=1;e!e.includes(t)).sort()}class V{constructor(t,e,a,n,r){this.fileName=t,this.code=e,this.hostname=a,this.lastPosition=n,this.model=r}}let Y=[],J=null;function X(t){const e=Object(n.useState)(!1)[1];const a=Object(n.useRef)(null),g=Object(n.useRef)(null),b=Object(n.useRef)(null),[M,A]=Object(n.useState)(null),[N,z]=Object(n.useState)(null),[X,Q]=Object(n.useState)(""),[Z,tt]=Object(n.useState)(!1),[et,at]=Object(n.useState)("RAM: ???"),[nt,rt]=Object(n.useState)([["???",""]]),[it,ot]=Object(n.useState)(!1),[st,lt]=Object(n.useState)([]),[ct,ft]=Object(n.useState)(!1),[ut,mt]=Object(n.useState)({theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize,wordWrap:E.a.MonacoWordWrap,vim:t.vim||E.a.MonacoVim}),[ht,dt]=Object(n.useState)(!1);Y=Y.filter(t=>null!==Object(S.d)(t.hostname)),J&&null===Object(S.d)(J.hostname)&&(J=Y[0],void 0===J&&(J=null));const[pt,gt]=Object(n.useState)({height:window.innerHeight,width:window.innerWidth});function yt(t){null!==g.current&&(t.model=g.current.editor.createModel(t.code,t.fileName.endsWith(".txt")?"plaintext":"javascript"))}Object(n.useEffect)(()=>{const t=Object(k.debounce)((function(){gt({height:window.innerHeight,width:window.innerWidth})}),250);return window.addEventListener("resize",t),()=>{window.removeEventListener("resize",t)}},[]),Object(n.useEffect)(()=>{null!==J&&Et(J.code)},[]),Object(n.useEffect)(()=>{function e(e){E.a.DisableHotkeys||("KeyB"==e.code&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),t.router.toTerminal()),"KeyS"==e.code&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),e.stopPropagation(),kt()))}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),Object(n.useEffect)(()=>{if(ut.vim&&N&&!M)try{window.require(["monaco-vim"],(function(e){A(e.initVimMode(N,b.current)),e.VimMode.Vim.defineEx("write","w",(function(){kt()})),e.VimMode.Vim.defineEx("quit","q",(function(){t.router.toTerminal()})),e.VimMode.Vim.defineEx("wqriteandquit","wq",(function(){kt(),t.router.toTerminal()})),e.VimMode.Vim.defineAction("nextTabs",(function(t,e){var a;const n=null!==(a=e.repeat)&&void 0!==a?a:1,r=_t();if(void 0!==r){wt((r+n)%Y.length)}})),e.VimMode.Vim.defineAction("prevTabs",(function(t,e){var a;const n=null!==(a=e.repeat)&&void 0!==a?a:1,r=_t();if(void 0!==r){let t=r-n;for(;t<0;)t+=Y.length;wt(t)}})),e.VimMode.Vim.mapCommand("gt","action","nextTabs",{},{context:"normal"}),e.VimMode.Vim.mapCommand("gT","action","prevTabs",{},{context:"normal"}),N.focus()}))}catch{}else ut.vim||(null==M||M.dispose(),A(null));return()=>{null==M||M.dispose()}},[ut,a,N,M]);const bt=Object(n.useMemo)(()=>Object(k.debounce)((t,e)=>{at(t),rt(e),ot(!1)},300),[]);async function Et(e){if(null!=J&&J.fileName.endsWith(".txt"))return void bt("N/A",[["N/A",""]]);ot(!0);const a=e+"",n=await Object(m.a)(t.player,a,t.player.getCurrentServer().scripts);if(!(n.cost>0)){switch(n.cost){case h.a.ImportError:bt("RAM: Import Error",[["Import Error",""]]);break;case h.a.URLImportError:bt("RAM: HTTP Import Error",[["HTTP Import Error",""]]);break;case h.a.SyntaxError:default:bt("RAM: Syntax Error",[["Syntax Error",""]])}return new Promise(()=>{})}{var r,i;const t=null!==(r=null===(i=n.entries)||void 0===i?void 0:i.sort((t,e)=>e.cost-t.cost))&&void 0!==r?r:[],e=[];for(const a of t)e.push([`${a.name} (${a.type})`,d.a.formatRAM(a.cost)]);bt("RAM: "+d.a.formatRAM(n.cost),e)}}function vt(e){const a=Object(S.d)(e.hostname);if(null===a)throw new Error("Server should not be null but it is.");if(Object(c.a)(e.fileName)){for(let n=0;nnull!==J&&t.fileName===J.fileName&&t.hostname===J.hostname)}function wt(t){if(null!==J){const t=_t();void 0!==t&&(Y[t]=J)}J={...Y[t]},null!==a.current&&null!==Y[t]&&((void 0===Y[t].model||Y[t].model.isDisposed())&&yt(Y[t]),a.current.setModel(Y[t].model),a.current.setPosition(Y[t].lastPosition),a.current.revealLineInCenter(Y[t].lastPosition.lineNumber),Et(Y[t].code),a.current.focus())}function St(n){const r=Y[n],i=Y.findIndex(t=>t.fileName===r.fileName&&t.hostname===r.hostname);let o="";-1!==i&&(o=Y[i].code);const s=Object(S.d)(r.hostname);if(null===s)throw new Error(`Server '${r.hostname}' should not be null, but it is.`);const l=s.scripts.findIndex(t=>t.filename===r.fileName);if(-1!==l&&o===s.scripts[l].code||B.a.emit({txt:"Do you want to save changes to "+r.fileName+"?",resolve:t=>{t&&(r.code=o,vt(r))}}),Y.length>1){Y=Y.filter((t,e)=>e!==n);let t=-1;void 0===Y[n+t]&&(t=1,void 0===Y[n+t]&&(t=0)),J=Y[n+t],null!==a.current&&((void 0===Y[n+t].model||null===Y[n+t].model||Y[n+t].model.isDisposed())&&yt(Y[n+t]),a.current.setModel(Y[n+t].model),a.current.setPosition(Y[n+t].lastPosition),a.current.revealLineInCenter(Y[n+t].lastPosition.lineNumber),a.current.focus()),e(t=>!t)}else Y=[],J=null,t.router.toTerminal()}function Ct(t){var e;const a=Y[t],n=Object(S.d)(a.hostname);if(null===n)throw new Error(`Server '${a.hostname}' should not be null, but it is.`);const r=n.scripts.find(t=>t.filename===a.fileName);return null!==(e=null==r?void 0:r.code)&&void 0!==e?e:null}function xt(t){Q(t.target.value)}function Lt(){Q(""),tt(!Z)}const Ot=Object.values(Y).filter(t=>t.hostname.includes(X)||t.fileName.includes(X)),Mt=pt.height-(130+(ut.vim?34:0)),Tt=Ot.length?1640/Ot.length-5:0,At=Tt-50;return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{display:null!==J?"block":"none",height:"100%",width:"100%"}},r.a.createElement(p.a,{onDragEnd:function(t){if(!t.destination)return;const e=function(t,e,a){const n=Array.from(t),[r]=n.splice(e,1);return n.splice(a,0,r),n}(Y,t.source.index,t.destination.index);Y=e}},r.a.createElement(p.c,{droppableId:"tabs",direction:"horizontal"},(t,e)=>r.a.createElement(O.a,q({maxWidth:"1640px",display:"flex",flexDirection:"row",alignItems:"center",whiteSpace:"nowrap",ref:t.innerRef},t.droppableProps,{style:{backgroundColor:e.isDraggingOver?E.a.theme.backgroundsecondary:E.a.theme.backgroundprimary,overflowX:"scroll"}}),r.a.createElement(H.a,{title:"Search Open Scripts"},Z?r.a.createElement(U.a,{value:X,onChange:xt,autoFocus:!0,InputProps:{startAdornment:r.a.createElement(y.a,null),spellCheck:!1,endAdornment:r.a.createElement(P.a,{onClick:Lt})}}):r.a.createElement(C.a,{onClick:Lt},r.a.createElement(y.a,null))),Ot.map(({fileName:t,hostname:e},n)=>{var i;const o={maxWidth:"25px",minWidth:"25px",minHeight:"38.5px",maxHeight:"38.5px",...(null===(i=J)||void 0===i?void 0:i.fileName)===Ot[n].fileName?{background:E.a.theme.button,borderColor:E.a.theme.button,color:E.a.theme.primary}:{background:E.a.theme.backgroundsecondary,borderColor:E.a.theme.backgroundsecondary,color:E.a.theme.secondary}},s=`${e}:~/${t} ${function(t){const e=Y[t],a=Ct(t);return null===a||a!==f.a.formatCode(e.code)?" *":""}(n)}`;return r.a.createElement(p.b,{key:t+e,draggableId:t+e,index:n,disableInteractiveElementBlocking:!0},t=>{var e;return r.a.createElement("div",q({ref:t.innerRef},t.draggableProps,t.dragHandleProps,{style:{...t.draggableProps.style,maxWidth:Tt+"px",marginRight:"5px",flexShrink:0,border:"1px solid "+E.a.theme.well}}),r.a.createElement(H.a,{title:s},r.a.createElement(C.a,{onClick:()=>wt(n),onMouseDown:t=>{t.preventDefault(),1===t.button&&St(n)},style:{maxWidth:At+"px",minHeight:"38.5px",overflow:"hidden",...(null===(e=J)||void 0===e?void 0:e.fileName)===Ot[n].fileName?{background:E.a.theme.button,borderColor:E.a.theme.button,color:E.a.theme.primary}:{background:E.a.theme.backgroundsecondary,borderColor:E.a.theme.backgroundsecondary,color:E.a.theme.secondary}}},r.a.createElement("span",{style:{overflow:"hidden",direction:"rtl",textOverflow:"ellipsis"}},s))),r.a.createElement(H.a,{title:"Overwrite editor content with saved file content"},r.a.createElement(C.a,{onClick:()=>function(t){const e=Y[t],n=Ct(t);null!==n&&e.code!==n&&B.a.emit({txt:"Do you want to overwrite the current editor content with the contents of "+e.fileName+" on the server? This cannot be undone.",resolve:r=>{r&&(e.code=n,wt(t),null!==a.current&&null!==e&&((void 0===e.model||e.model.isDisposed())&&yt(e),a.current.setModel(e.model),a.current.setValue(e.code),Et(e.code),a.current.focus()))}})}(n),style:o},r.a.createElement(R.a,{fontSize:"small"}))),r.a.createElement(C.a,{onClick:()=>St(n),style:o},r.a.createElement(P.a,{fontSize:"small"})))})}),t.placeholder))),r.a.createElement("div",{style:{paddingBottom:"5px"}}),r.a.createElement(i.a,{beforeMount:function(t){if($)return;$=!0,t.languages.registerCompletionItemProvider("javascript",{provideCompletionItems:()=>{const e=[];for(const a of K)e.push({label:a,kind:t.languages.CompletionItemKind.Function,insertText:a,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet});return{suggestions:e}}}),async function(){const e=await t.languages.getLanguages().find(t=>"javascript"===t.id).loader();e.language.tokenizer.root.unshift([new RegExp("\\bns\\b"),{token:"ns"}]);for(const t of K)e.language.tokenizer.root.unshift([new RegExp(`\\b${t}\\b`),{token:"netscriptfunction"}]);["let","const","var","function"].forEach(t=>e.language.tokenizer.root.unshift([new RegExp(`\\b${t}\\b`),{token:"otherkeywords"}])),["true","false","null","undefined"].forEach(t=>e.language.tokenizer.root.unshift([new RegExp(`\\b${t}\\b`),{token:"otherkeyvars"}])),e.language.tokenizer.root.unshift([new RegExp("\\bthis\\b"),{token:"this"}])}();const e=(W.a+"").replace(/export /g,"");t.languages.typescript.javascriptDefaults.addExtraLib(e,"netscript.d.ts"),t.languages.typescript.typescriptDefaults.addExtraLib(e,"netscript.d.ts"),Object(w.a)(t)},onMount:function(e,n){if(z(e),a.current=e,g.current=n,null!==a.current&&null!==g.current){if(!t.files&&null!==J)return yt(J),a.current.setModel(J.model),a.current.setPosition(J.lastPosition),a.current.revealLineInCenter(J.lastPosition.lineNumber),Et(J.code),void a.current.focus();if(t.files){const e=Object.entries(t.files);if(!e.length)return void a.current.focus();for(const[n,r]of e){const e=Y.find(e=>e.fileName===n&&e.hostname===t.hostname);if(e)(void 0===e.model||null===e.model||e.model.isDisposed())&&yt(e),J=e,a.current.setModel(e.model),a.current.setPosition(e.lastPosition),a.current.revealLineInCenter(e.lastPosition.lineNumber),Et(e.code);else{const e=new V(n,r,t.hostname,new g.current.Position(0,0),g.current.editor.createModel(r,n.endsWith(".txt")?"plaintext":"javascript"));Y.push(e),J={...e},a.current.setModel(e.model),Et(e.code)}}}a.current.focus()}},loading:r.a.createElement(x.a,null,"Loading script editor!"),height:Mt+"px",defaultLanguage:"javascript",defaultValue:"",onChange:function(t){if(void 0===t)return;if(Et(t),null===a.current)return;const e=a.current.getPosition();if(null!==e){if(null!==J){J={...J,code:t,lastPosition:e};const a=Y.findIndex(t=>null!==J&&t.fileName===J.fileName&&t.hostname===J.hostname),n=[...Y],r=J;r.code=t,n[a]=r,Y=[...n]}try{!function(t){if(null===a.current||null===J)return;if(!J.fileName.endsWith(".ns")&&!J.fileName.endsWith(".js"))return;const e=Object(m.b)(t);if(-1!==e){const t=a.current.deltaDecorations(st,[{range:{startLineNumber:e,startColumn:1,endLineNumber:e,endColumn:10},options:{isWholeLine:!0,glyphMarginClassName:"myGlyphMarginClass",glyphMarginHoverMessage:{value:"Possible infinite loop, await something."}}}]);lt(t)}else{const t=a.current.deltaDecorations(st,[]);lt(t)}}(t)}catch(t){}}},theme:ut.theme,options:{...ut,glyphMargin:!0}}),r.a.createElement(O.a,{ref:b,className:"monaco-editor",display:"flex",flexDirection:"row",sx:{p:1},alignItems:"center"}),r.a.createElement(O.a,{display:"flex",flexDirection:"row",sx:{m:1},alignItems:"center"},r.a.createElement(C.a,{startIcon:r.a.createElement(T.a,null),onClick:()=>ft(!0),sx:{mr:1}},"Options"),r.a.createElement(C.a,{onClick:function(){null!==a.current&&a.current.getAction("editor.action.formatDocument").run()}},"Beautify"),r.a.createElement(C.a,{color:it?"secondary":"primary",sx:{mx:1},onClick:()=>{dt(!0)}},et),r.a.createElement(C.a,{onClick:kt},"Save (Ctrl/Cmd + s)"),r.a.createElement(C.a,{sx:{mx:1},onClick:t.router.toTerminal},"Terminal (Ctrl/Cmd + b)"),r.a.createElement(x.a,null," ","Documentation:"," ",r.a.createElement(L.a,{target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/index.html"},"Basic")," ","|",r.a.createElement(L.a,{target:"_blank",href:"https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md"},"Full"))),r.a.createElement(o.a,{open:ct,onClose:()=>ft(!1),options:{theme:E.a.MonacoTheme,insertSpaces:E.a.MonacoInsertSpaces,fontSize:E.a.MonacoFontSize,wordWrap:E.a.MonacoWordWrap,vim:E.a.MonacoVim},save:t=>{mt(t),E.a.MonacoTheme=t.theme,E.a.MonacoInsertSpaces=t.insertSpaces,E.a.MonacoFontSize=t.fontSize,E.a.MonacoWordWrap=t.wordWrap,E.a.MonacoVim=t.vim}}),r.a.createElement(G.a,{open:ht,onClose:()=>dt(!1)},r.a.createElement(I.a,null,r.a.createElement(j.a,null,nt.map(([t,e])=>r.a.createElement(r.a.Fragment,{key:t+e},r.a.createElement(D.a,null,r.a.createElement(F.a,{sx:{color:E.a.theme.primary}},t),r.a.createElement(F.a,{align:"right",sx:{color:E.a.theme.primary}},e)))))))),r.a.createElement("div",{style:{display:null!==J?"none":"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},r.a.createElement("span",{style:{color:E.a.theme.primary,fontSize:"20px",textAlign:"center"}},r.a.createElement(x.a,{variant:"h4"},"No open files"),r.a.createElement(x.a,{variant:"h5"},"Use ",r.a.createElement("code",null,"nano FILENAME")," in",r.a.createElement("br",null),"the terminal to open files"))))}},,,,,function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return compile})),__webpack_require__.d(__webpack_exports__,"b",(function(){return executeJSScript}));var acorn_walk__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(300),acorn__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(254),_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(109),_Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1327),_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(83);function makeScriptBlob(t){return new Blob([t],{type:"text/javascript"})}async function compile(player,script,scripts){if(!shouldCompile(script,scripts))return;await script.updateRamUsage(player,scripts);const uurls=_getScriptUrls(script,scripts,[]),url=uurls[uurls.length-1].url;script.url&&script.url!==url&&URL.revokeObjectURL(script.url),script.dependencies.length>0&&script.dependencies.forEach(t=>URL.revokeObjectURL(t.url)),script.url=uurls[uurls.length-1].url,script.module=new Promise(resolve=>resolve(eval("import(uurls[uurls.length - 1].url)"))),script.dependencies=uurls}async function executeJSScript(t,e=[],a){const n=a.getScript();if(null===n)throw new Error("script is null");await compile(t,n,e),a.ramUsage=n.ramUsage;const r=await n.module,i=a.env.vars;if(!r.main)throw Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_2__.b)(a,n.filename+" cannot be run because it does not have a main function.");return r.main(i)}function isDependencyOutOfDate(t,e,a){const n=e.find(e=>e.filename==t);if(!n)return!0;return n.moduleSequenceNumber>a}function shouldCompile(t,e){return""===t.module||t.dependencies.some(a=>isDependencyOutOfDate(a.filename,e,t.moduleSequenceNumber))}function _getScriptUrls(t,e,a){const n=[];for(const e of a)t.dependents.some(t=>t.server===e.server&&t.filename==e.filename)||t.dependents.push({server:e.server,filename:e.filename});a.push(t);try{const r=Object(acorn__WEBPACK_IMPORTED_MODULE_1__.a)(t.code,{sourceType:"module",ecmaVersion:"latest",ranges:!0}),i=[];acorn_walk__WEBPACK_IMPORTED_MODULE_0__.b(r,{ImportDeclaration(t){i.push({filename:t.source.value,start:t.source.range[0]+1,end:t.source.range[1]-1})},ExportNamedDeclaration(t){t.source&&i.push({filename:t.source.value,start:t.source.range[0]+1,end:t.source.range[1]-1})},ExportAllDeclaration(t){t.source&&i.push({filename:t.source.value,start:t.source.range[0]+1,end:t.source.range[1]-1})}}),i.sort((t,e)=>e.start-t.start);let o=t.code;for(const t of i){const r=t.filename.startsWith("./")?t.filename.substring(2):t.filename,i=e.filter(t=>Object(_Terminal_DirectoryHelpers__WEBPACK_IMPORTED_MODULE_4__.b)(t.filename,r));if(0===i.length)continue;const[s]=i,l=_getScriptUrls(s,e,a);n.push(...l);const c=l[l.length-1].url;o=o.substring(0,t.start)+c+o.substring(t.end)}o+='\n\nfunction print() {throw new Error("Invalid call to window.print(). Did you mean to use Netscript\'s print()?");}';const s=URL.createObjectURL(makeScriptBlob(o));return n.push(new _Script_ScriptUrl__WEBPACK_IMPORTED_MODULE_3__.a(t.filename,s,t.moduleSequenceNumber)),n}catch(t){for(const t of n)URL.revokeObjectURL(t.url);throw t}finally{a.pop()}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(629),r=a(314);function i(t){return function(e){e=Object(n.a)(e);const a={};for(const t of e){let e=String;"number"==typeof t[1]?e=Number:"boolean"==typeof t[1]?e=Boolean:Array.isArray(t[1])&&(e=[String]);const n=t[0].length>1?2:1;a["-".repeat(n)+t[0]]=e}const i=r(a,{argv:t});for(const t of e)i.hasOwnProperty("--"+t[0])&&i.hasOwnProperty("-"+t[0])||(i[t[0]]=t[1]);for(const t of Object.keys(i)){if(!t.startsWith("-"))continue;const e=i[t];delete i[t];const a=2===t.length?1:2;i[t.slice(a)]=e}return i}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));const n=new(a(582).a)("",()=>{});function r(t){if(null==t)return null;if(!(t.hasOwnProperty("properties")&&t.hasOwnProperty("getter")&&t.hasOwnProperty("setter")&&t.hasOwnProperty("proto")))return t;let e;if(t.hasOwnProperty("class")&&"Array"===t.class){e=[];const a=n.getProperty(t,"length");for(let i=0;i{u(t,0)},disabled:0===s},"rtl"===e.direction?n.createElement(d.a,null):n.createElement(l.a,null)),n.createElement(o.a,{onClick:t=>{u(t,s-1)},disabled:0===s},"rtl"===e.direction?n.createElement(m.a,null):n.createElement(f.a,null)),n.createElement(o.a,{onClick:t=>{u(t,s+1)},disabled:s>=Math.ceil(a/c)-1},"rtl"===e.direction?n.createElement(f.a,null):n.createElement(m.a,null)),n.createElement(o.a,{onClick:t=>{u(t,Math.max(0,Math.ceil(a/c)-1))},disabled:s>=Math.ceil(a/c)-1},"rtl"===e.direction?n.createElement(l.a,null):n.createElement(d.a,null)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a(113),i=a(31);function o(){return(o=Object.assign||function(t){for(var e=1;en.createElement(i.a,o({},t,{classes:{root:s().root,...t.classes}}));function c(t){return n.createElement(l,{style:{backgroundColor:t.color},onMouseEnter:t.onMouseEnter,onClick:t.onClick})}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(26);function r(t){if(null!=t.ramUsage&&t.ramUsage>0)return t.ramUsage;const e=Object(n.d)(t.server);if(null==e)return 0;for(let a=0;a"*"==t).length)return r.globError="Only a single glob is supported per command.\nexample: `nano my-dir/*.js`",r;[r.preGlob,r.postGlob]=t.split("*"),r.preGlob=Object(n.k)(r.preGlob);const i=Object(n.l)(a.cwd());return r.preGlob=`${i}/${r.preGlob}`,e.forEach(t=>{const e=t.filename.startsWith("/")?t.filename:"/"+t.filename;e.startsWith(r.preGlob)&&e.endsWith(r.postGlob)&&r.globMatches.push(e)}),r.glob=`${r.preGlob}*${r.postGlob}`,r}(""+t[0],e.getCurrentServer().scripts,a)}return null}function c(t,{terminal:e,router:a,player:n,args:c},f){if(c.length<1)return void e.error(`Incorrect usage of ${t} command. Usage: ${t} [scriptname]`);let u=c;try{const m=l(c,n,e);if(m){if(!1===Object(o.isEmpty)(m.globError))throw new Error(m.globError);u=m.globMatches}const h=u.map(a=>{const o=""+a;if(Object(r.a)(o)){const t=e.getFilepath(o),a=e.getScript(n,o),r=function(t){return t.endsWith(".ns")||t.endsWith(".js")}(o),l=null!==a?a.code:r?s:"";return l===s&&i.a.saveCursor(o,{row:3,column:5}),[t,l]}if(o.endsWith(".txt")){const t=e.getFilepath(o),a=e.getTextFile(n,o);return[t,null===a?"":a.text]}throw new Error("Invalid file. Only scripts (.script, .ns, .js), or text files (.txt) can be edited with "+t)});if(m&&0===h.length)throw new Error(`Could not find any valid files to open with ${t} using glob: \`${m.glob}\``);a.toScriptEditor(Object.fromEntries(h),f)}catch(t){e.error(""+t)}}},,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return o})),a.d(e,"c",(function(){return s}));var n=a(236),r=a(82);function i(){return 8!==this.bitNodeN&&(6===this.bitNodeN||7===this.bitNodeN||r.a[6]>0||r.a[7]>0)}function o(){return null!=this.bladeburner&&this.bladeburner instanceof n.a}function s(){this.bladeburner=new n.a(this)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(449),r=a(25);class i extends n.a{constructor(t=null){super(t)}getActionTypeSkillSuccessBonus(t){return t.skillMultipliers.successChanceContract}toJSON(){return Object(r.b)("Contract",this)}static fromJSON(t){return Object(r.a)(i,t.data)}}r.c.constructors.Contract=i},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const 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"," "],automate:["Usage: 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."," "],clear:["Usage: clear"," ","Clears the console"," "],cls:["Usage: cls"," ","Clears the console"," "],help:["Usage: 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"," "],log:["Usage: 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"," "],skill:["Usage: 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]"," "],start:["Usage: 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'"," "],stop:["Usage: stop"," ","Stop your current action and go idle."," "]}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return s})),a.d(e,"c",(function(){return l}));var n=a(412),r=a(298),i=a(82);function o(){return 3===this.bitNodeN||i.a[3]>0}function s(){return null!=this.corporation&&this.corporation instanceof n.a}function l(t,e=0){if(this.corporation=new n.a({name:t}),3===i.a[3]){const t=r.a[7][0],e=r.a[8][0];this.corporation.unlockUpgrades[t]=1,this.corporation.unlockUpgrades[e]=1}this.corporation.totalShares+=e}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o})),a.d(e,"b",(function(){return s}));var n=a(281),r=a(4);function i(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class o{constructor(t={cost:0,text:""}){if(i(this,"children",[]),i(this,"cost",0),i(this,"researched",!1),i(this,"parent",null),i(this,"text",""),null==n.a[t.text])throw new Error("Invalid Research name used when constructing ResearchTree Node: "+t.text);this.text=t.text,this.cost=t.cost,t.children&&t.children.length>0&&(this.children=t.children),null!=t.parent&&(this.parent=t.parent)}addChild(t){this.children.push(t),t.parent=this}createTreantMarkup(){const t=[];for(let e=0;e${this.text}
${r.a.format(this.cost,"0,0")} Scientific Research`+a.desc+"",text:{name:this.text}}}findNode(t){if(this.text===t)return this;let e=null;for(let a=0;a{L.a.AutosaveInterval=60}},"Enable"));$.b.emit(t,"warning",5e3)}(),K.Counters.autoSaveCounter=300):(K.Counters.autoSaveCounter=5*L.a.AutosaveInterval,C.c.saveGame(!L.a.SuppressSavedGameToast))),K.Counters.checkFactionInvitations<=0){const t=S.a.checkForFactionInvitations();if(t.length>0){const e=t[Math.floor(Math.random()*t.length)];Object(p.d)(e)}K.Counters.checkFactionInvitations=100}if(K.Counters.passiveFactionGrowth<=0){const t=Math.floor(5-K.Counters.passiveFactionGrowth);Object(p.f)(t),K.Counters.passiveFactionGrowth=5}if(K.Counters.messages<=0&&(Object(_.b)(),r.a[o.a.TheRedPill].owned?K.Counters.messages=4500:K.Counters.messages=150),S.a.corporation instanceof u.a&&S.a.corporation.process(S.a),K.Counters.mechanicProcess<=0){if(S.a.bladeburner instanceof l.a)try{S.a.bladeburner.process(g.b,S.a)}catch(t){Object(D.a)("Exception caught in Bladeburner.process(): "+t)}K.Counters.mechanicProcess=5}K.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(c.b)(),K.Counters.contractGeneration=3e3),K.Counters.achievementsCounter<=0&&(Object(B.b)(),K.Counters.achievementsCounter=300)},load:function(t){if(Object(j.a)(),Object(H.a)(),Object(C.b)(t)){O.b.emit(),Object(s.b)(S.a),Object(M.b)(S.a),Object(i.d)(),S.a.reapplyAllSourceFiles(),S.a.hasWseAccount&&Object(T.h)(),S.a.applyEntropy(S.a.entropy),K._lastUpdate=(new Date).getTime();const t=S.a.lastUpdate,e=K._lastUpdate-t,a=Math.floor(e/m.a._idleSpeed);let r=0;const o=S.a.moneySourceA.hacking/S.a.playtimeSinceLastAug*e*.75;if(S.a.gainMoney(o,"hacking"),Object(w.b)(S.a),S.a.isWorking)S.a.focus=!0,S.a.workType==m.a.WorkTypeFaction?S.a.workForFaction(a):S.a.workType==m.a.WorkTypeCreateProgram?S.a.createProgramWork(a):S.a.workType==m.a.WorkTypeStudyClass?S.a.takeClass(a):S.a.workType==m.a.WorkTypeCrime?S.a.commitCrime(a):S.a.workType==m.a.WorkTypeCompanyPartTime?S.a.workPartTime(a):S.a.workType===m.a.WorkTypeGraftAugmentation?S.a.graftAugmentationWork(a):S.a.work(a);else for(let t=0;tF.a.emit(W.a.createElement(W.a.Fragment,null,W.a.createElement(U.a,null,"Offline for ",b,". While you were offline:"),W.a.createElement("ul",null,W.a.createElement("li",null,W.a.createElement(U.a,null,"Your scripts generated ",W.a.createElement(N.a,{money:o}))),W.a.createElement("li",null,W.a.createElement(U.a,null,"Your Hacknet Nodes generated ",f)),W.a.createElement("li",null,W.a.createElement(U.a,null,"You gained ",W.a.createElement(I.a,{reputation:r})," reputation divided amongst your factions"))))),250)}else Object(s.b)(S.a),K.start(),S.a.init(),Object(x.f)(S.a.getHomeComputer()),Object(f.b)(),Object(h.c)(),Object(i.d)(),Object(_.c)(),Object(M.b)(S.a),Object(k.e)();Object(b.b)()},start:function(){const t=(new Date).getTime();let e=t-K._lastUpdate;const a=e%m.a._idleSpeed;e=Math.floor(e/m.a._idleSpeed),e>0&&(K._lastUpdate=t-a,S.a.lastUpdate=t-a,K.updateGame(e)),window.requestAnimationFrame(K.start)}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.r(e);var n=a(795);a.d(e,"Default",(function(){return n.a}));var r=a(796);a.d(e,"DefaultLite",(function(){return r.a}));var i=a(797);a.d(e,"Monokai",(function(){return i.a}));var o=a(798);a.d(e,"Warmer",(function(){return o.a}));var s=a(799);a.d(e,"DarkPlus",(function(){return s.a}));var l=a(800);a.d(e,"MayukaiDark",(function(){return l.a}));var c=a(801);a.d(e,"Purple",(function(){return c.a}));var f=a(802);a.d(e,"SmoothGreen",(function(){return f.a}));var u=a(803);a.d(e,"Dracula",(function(){return u.a}));var m=a(804);a.d(e,"DarkBlue",(function(){return m.a}));var h=a(805);a.d(e,"DiscordLike",(function(){return h.a}));var d=a(806);a.d(e,"OneDark",(function(){return d.a}));var p=a(807);a.d(e,"MutedGoldBlue",(function(){return p.a}));var g=a(808);a.d(e,"Light",(function(){return g.a}))},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(1795),o=a(1),s=a(60),l=a(21),c=a(113),f=a(137),u=a(87),m=a(341),h=a(2),d=a(668),p=a(96),g=a(8),y=a(408),b=a(251),E=a(293);const v=Object(c.a)(t=>Object(f.a)({root:{backgroundColor:t.colors.backgroundprimary}}));function k(){const t=v(),[e,a]=Object(n.useState)(!1),[c,f]=Object(n.useState)(!1),k=`v${g.a.VersionString} (${Object(b.a)()})`;return document.title="Bitburner "+k,Object(n.useEffect)(()=>{const t=setTimeout(()=>{c||a(!0)},2e3);return()=>clearTimeout(t)}),Object(n.useEffect)(()=>{!async function(){await Object(m.b)().then(t=>{try{d.a.load(t)}catch(t){throw Object(y.a)(),f(!0),t}Object(E.c)(),f(!0)}).catch(t=>{console.error(t),d.a.load(""),f(!0)})}()},[]),r.a.createElement(l.a,{className:t.root},c?r.a.createElement(p.a,{terminal:u.a,engine:d.a,player:h.a}):r.a.createElement(s.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(s.a,{item:!0},r.a.createElement(i.a,{size:150,color:"primary"})),r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,{variant:"h3"},"Loading Bitburner ",k)),e&&r.a.createElement(s.a,{item:!0},r.a.createElement(o.a,null,"If the game fails to load, consider ",r.a.createElement("a",{href:"?noScripts"},"killing all scripts")))))}},,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return o}));var n=a(40),r=a(1001);function i(t,e=!1){const a=t instanceof n.a?t.name:t;for(const t of this.augmentations)if(t.name===a)return!0;if(!e)for(const t of this.queuedAugmentations)if(t.name===a)return!0;return!1}function o(t=1){this.reapplyAllAugmentations(),this.reapplyAllSourceFiles();const e=Object(r.a)(this,t);for(const[t,a]of Object.entries(e))this.setMult(t,a)}},function(t,e,a){"use strict";function n(t){return"number"==typeof t&&!isNaN(t)}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(112),r=a(76),i=a(25);class o{constructor(t="",e=0,a=0,i=n.a.LimitBuy,o=r.a.Long){let s=!1;if("number"==typeof e&&"number"==typeof a||(s=!0),(isNaN(e)||isNaN(a))&&(s=!0),"string"!=typeof t&&(s=!0),s)throw new Error("Invalid constructor paramters for Order");this.stockSymbol=t,this.shares=e,this.price=a,this.type=i,this.pos=o}toJSON(){return Object(i.b)("Order",this)}static fromJSON(t){return Object(i.a)(o,t.data)}}i.c.constructors.Order=o},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(5),r=a(751),i=a(78),o=a(29),s=a(1025),l=a(586),c=a(25),f=a(8),u=a(648),m=a(6),h=a(2),d=a(15);function p(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class g{constructor(){p(this,"storedCycles",0),p(this,"fragments",[])}baseSize(){return u.a.BaseSize+m.a.StaneksGiftExtraSize+h.a.sourceFileLvl(13)}width(){return Math.max(2,Math.min(Math.floor(this.baseSize()/2+1),u.a.MaxSize))}height(){return Math.max(3,Math.min(Math.floor(this.baseSize()/2+.6),u.a.MaxSize))}charge(t,e,a){a>e.highestCharge?(e.numCharge=e.highestCharge*e.numCharge/a+1,e.highestCharge=a):e.numCharge+=a/e.highestCharge;const r=o.a[n.a.ChurchOfTheMachineGod];r.playerReputation+=t.faction_rep_mult*(Math.pow(a,.95)*(r.favor+100))/1e3}inBonus(){return this.storedCycles*f.a._idleSpeed/1e3>1}process(t,e=1){t.hasAugmentation(d.a.StaneksGift1)&&(this.storedCycles+=e,this.storedCycles-=10,this.storedCycles=Math.max(0,this.storedCycles),this.updateMults(t),l.a.emit())}effect(t){let e=t.neighboors().map(t=>this.fragmentAt(t[0],t[1])).filter(t=>!!t);e=e.filter(t=>t.fragment().type===i.b.Booster);let a=1;e=e.filter((t,e,a)=>a.indexOf(t)===e);for(const t of e)a*=t.fragment().power;return Object(s.a)(t.highestCharge,t.numCharge,t.fragment().power,a)}canPlace(t,e,a,n){if(t<0||e<0)return!1;if(t+n.width(a)>this.width())return!1;if(e+n.height(a)>this.height())return!1;if(this.count(n)>=n.limit)return!1;const i=new r.a({x:t,y:e,rotation:a,fragment:n});for(const t of this.fragments)if(t.collide(i))return!1;return!0}place(t,e,a,n){return!!this.canPlace(t,e,a,n)&&(this.fragments.push(new r.a({x:t,y:e,rotation:a,fragment:n})),!0)}findFragment(t,e){return this.fragments.find(a=>a.x===t&&a.y===e)}fragmentAt(t,e){for(const a of this.fragments)if(a.fullAt(t,e))return a}count(t){let e=0;for(const a of this.fragments)a.fragment().id===t.id&&e++;return e}delete(t,e){for(let a=0;a{t.highestCharge=0,t.numCharge=0})}updateMults(t){t.reapplyAllAugmentations(!0),t.reapplyAllSourceFiles();for(const e of this.fragments){const a=e.fragment(),n=this.effect(e);switch(a.type){case i.b.HackingChance:t.hacking_chance_mult*=n;break;case i.b.HackingSpeed:t.hacking_speed_mult*=n;break;case i.b.HackingMoney:t.hacking_money_mult*=n;break;case i.b.HackingGrow:t.hacking_grow_mult*=n;break;case i.b.Hacking:t.hacking_mult*=n,t.hacking_exp_mult*=n;break;case i.b.Strength:t.strength_mult*=n,t.strength_exp_mult*=n;break;case i.b.Defense:t.defense_mult*=n,t.defense_exp_mult*=n;break;case i.b.Dexterity:t.dexterity_mult*=n,t.dexterity_exp_mult*=n;break;case i.b.Agility:t.agility_mult*=n,t.agility_exp_mult*=n;break;case i.b.Charisma:t.charisma_mult*=n,t.charisma_exp_mult*=n;break;case i.b.HacknetMoney:t.hacknet_node_money_mult*=n;break;case i.b.HacknetCost:t.hacknet_node_purchase_cost_mult/=n,t.hacknet_node_ram_cost_mult/=n,t.hacknet_node_core_cost_mult/=n,t.hacknet_node_level_cost_mult/=n;break;case i.b.Rep:t.company_rep_mult*=n,t.faction_rep_mult*=n;break;case i.b.WorkMoney:t.work_money_mult*=n;break;case i.b.Crime:t.crime_success_mult*=n,t.crime_money_mult*=n;break;case i.b.Bladeburner:t.bladeburner_max_stamina_mult*=n,t.bladeburner_stamina_gain_mult*=n,t.bladeburner_analysis_mult*=n,t.bladeburner_success_chance_mult*=n}}t.updateSkillLevels()}prestigeAugmentation(){this.clearCharge()}prestigeSourceFile(){this.clear(),this.storedCycles=0}toJSON(){return Object(c.b)("StaneksGift",this)}static fromJSON(t){return Object(c.a)(g,t.data)}}c.c.constructors.StaneksGift=g},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(243),r=a(25);class i{constructor(t){t?(this.id=t.fragment.id,this.x=t.x,this.y=t.y,this.highestCharge=0,this.numCharge=0,this.rotation=t.rotation):(this.id=-1,this.x=-1,this.y=-1,this.highestCharge=-1,this.numCharge=-1,this.rotation=-1)}collide(t){const e=this.fragment(),a=t.fragment(),n=t.x-this.x,r=t.y-this.y;for(let i=0;i[this.x+t[0],this.y+t[1]])}copy(){const t=Object(n.b)(this.id);if(null===t)throw new Error("ActiveFragment id refers to unknown Fragment.");const e=new i({x:this.x,y:this.y,rotation:this.rotation,fragment:t});return e.highestCharge=this.highestCharge,e.numCharge=this.numCharge,e}toJSON(){return Object(r.b)("ActiveFragment",this)}static fromJSON(t){return Object(r.a)(i,t.data)}}r.c.constructors.ActiveFragment=i},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(11);function r(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class i{constructor(t){r(this,"city",null),r(this,"costMult",0),r(this,"expMult",0),r(this,"name",n.a.Void),r(this,"types",[]),r(this,"techVendorMaxRam",0),r(this,"techVendorMinRam",0),t.city&&(this.city=t.city),t.costMult&&(this.costMult=t.costMult),t.expMult&&(this.expMult=t.expMult),t.infiltrationData&&(this.infiltrationData=t.infiltrationData),t.name&&(this.name=t.name),t.types&&(this.types=t.types),t.techVendorMaxRam&&(this.techVendorMaxRam=t.techVendorMaxRam),t.techVendorMinRam&&(this.techVendorMinRam=t.techVendorMinRam)}}},,,,,,,,,,function(t,e,a){"use strict";a.d(e,"b",(function(){return E})),a.d(e,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(179),o=a(145),s=a(45),l=a(31),c=a(1),f=a(4),u=a(9),m=a(144),h=a(296),d=a(20),p=a(110),g=a(468),y=a(30),b=a(77);function E(t){const e=Object(h.b)();return r.a.createElement(i.a,{sx:{display:"table",mb:1,width:"100%"}},r.a.createElement(o.a,null,r.a.createElement(m.a,{name:"City",color:u.a.theme.primary,data:{content:t.sleeve.city}}),r.a.createElement(m.a,{name:"HP",color:u.a.theme.hp,data:{content:`${f.a.formatHp(t.sleeve.hp)} / ${f.a.formatHp(t.sleeve.max_hp)}`}}),r.a.createElement(m.a,{name:"Hacking",color:u.a.theme.hack,data:{level:t.sleeve.hacking,exp:t.sleeve.hacking_exp}}),r.a.createElement(m.a,{name:"Strength",color:u.a.theme.combat,data:{level:t.sleeve.strength,exp:t.sleeve.strength_exp}}),r.a.createElement(m.a,{name:"Defense",color:u.a.theme.combat,data:{level:t.sleeve.defense,exp:t.sleeve.defense_exp}}),r.a.createElement(m.a,{name:"Dexterity",color:u.a.theme.combat,data:{level:t.sleeve.dexterity,exp:t.sleeve.dexterity_exp}}),r.a.createElement(m.a,{name:"Agility",color:u.a.theme.combat,data:{level:t.sleeve.agility,exp:t.sleeve.agility_exp}}),r.a.createElement(m.a,{name:"Charisma",color:u.a.theme.cha,data:{level:t.sleeve.charisma,exp:t.sleeve.charisma_exp}}),r.a.createElement(s.a,null,r.a.createElement(l.a,{classes:{root:e.cellNone}},r.a.createElement("br",null))),r.a.createElement(m.a,{name:"Shock",color:u.a.theme.primary,data:{content:f.a.formatSleeveShock(100-t.sleeve.shock)}}),r.a.createElement(m.a,{name:"Sync",color:u.a.theme.primary,data:{content:f.a.formatSleeveSynchro(t.sleeve.sync)}}),r.a.createElement(m.a,{name:"Memory",color:u.a.theme.primary,data:{content:f.a.formatSleeveMemory(t.sleeve.memory)}})))}function v(t){const e=Object(h.b)(),a=y.b.Player();let n=[];if(t.sleeve.currentTask===b.a.Crime)n=[["Money",r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{money:parseFloat(t.sleeve.currentTaskLocation)})," (on success)")],["Hacking Exp",f.a.formatExp(t.sleeve.gainRatesForTask.hack)+" (2x on success)"],["Strength Exp",f.a.formatExp(t.sleeve.gainRatesForTask.str)+" (2x on success)"],["Defense Exp",f.a.formatExp(t.sleeve.gainRatesForTask.def)+" (2x on success)"],["Dexterity Exp",f.a.formatExp(t.sleeve.gainRatesForTask.dex)+" (2x on success)"],["Agility Exp",f.a.formatExp(t.sleeve.gainRatesForTask.agi)+" (2x on success)"],["Charisma Exp",f.a.formatExp(t.sleeve.gainRatesForTask.cha)+" (2x on success)"]];else if(n=[["Money:",r.a.createElement(p.a,{money:5*t.sleeve.gainRatesForTask.money})],["Hacking Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.hack)+" / sec"],["Strength Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.str)+" / sec"],["Defense Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.def)+" / sec"],["Dexterity Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.dex)+" / sec"],["Agility Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.agi)+" / sec"],["Charisma Exp:",f.a.formatExp(5*t.sleeve.gainRatesForTask.cha)+" / sec"]],t.sleeve.currentTask===b.a.Company||t.sleeve.currentTask===b.a.Faction){const e=t.sleeve.getRepGain(a);n.push(["Reputation:",r.a.createElement(g.a,{reputation:5*e})])}return r.a.createElement(i.a,{sx:{display:"table",mb:1,width:"100%",lineHeight:0}},r.a.createElement(o.a,null,r.a.createElement(s.a,null,r.a.createElement(l.a,{classes:{root:e.cellNone}},r.a.createElement(c.a,{variant:"h6"},"Earnings"))),n.map(([t,a])=>r.a.createElement(s.a,{key:t.toString()+a.toString()},r.a.createElement(l.a,{classes:{root:e.cellNone}},r.a.createElement(c.a,null,t)),r.a.createElement(l.a,{align:"right",classes:{root:e.cellNone}},r.a.createElement(c.a,null,a))))))}},function(t,e,a){"use strict";a.d(e,"b",(function(){return u})),a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(26),o=a(47),s=a(91),l=a(128),c=a(79),f=a(10);const u={All:0,Foreign:1,Owned:2,Purchased:3};function m(t){function e(e){const a=e instanceof o.a&&e.purchasedByPlayer,n=t.serverType;switch(n){case u.All:return!0;case u.Foreign:return"home"!==e.hostname&&!a;case u.Owned:return a||e instanceof s.a||"home"===e.hostname;case u.Purchased:return a||e instanceof s.a;default:return console.warn("Invalid ServerType specified for ServerDropdown component: "+n),!1}}const a=[];for(const t of Object(i.c)().sort((t,e)=>t.hostname.localeCompare(e.hostname)))e(t)&&a.push(r.a.createElement(c.a,{key:t.hostname,value:t.hostname},t.hostname));return r.a.createElement(l.a,{startAdornment:r.a.createElement(f.a,{onClick:t.purchase,disabled:!t.canPurchase},"Buy"),sx:{mx:1},value:t.value,onChange:t.onChange},a)}},function(t,e,a){"use strict";a.d(e,"b",(function(){return g})),a.d(e,"a",(function(){return b}));var n=a(0),r=a(20),i=a(207),o=a(1292),s=a(532),l=a(1789),c=a(765),f=a(10),u=a(65),m=a(21),h=a(1),d=a(81);function p(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}const g=5;var y;!function(t){t.Pending="",t.PlayerWon="You won!",t.PlayerWonByBlackjack="You Won! Blackjack!",t.DealerWon="You lost!",t.Tie="Push! (Tie)"}(y||(y={}));class b extends i.a{constructor(t){super(t),p(this,"canStartGame",()=>{const{p:t}=this.props,{bet:e}=this.state;return t.canAfford(e)}),p(this,"startGame",()=>{if(!this.canStartGame()||Object(i.b)(this.props.p))return;this.props.p.loseMoney(this.state.bet,"casino");const t=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]),e=new s.a([this.deck.safeDrawCard(),this.deck.safeDrawCard()]);this.setState({playerHand:t,dealerHand:e,gameInProgress:!0,result:y.Pending}),21===this.getTrueHandValue(t)?21===this.getTrueHandValue(e)?this.finishGame(y.Tie):this.finishGame(y.PlayerWonByBlackjack):21===this.getTrueHandValue(e)&&this.finishGame(y.DealerWon)}),p(this,"getHandValue",t=>{let e=[0];for(let a=0;a=10?e.map(t=>t+10):1===n?e.flatMap(t=>[t+1,t+11]):e.map(t=>t+n)}return e}),p(this,"getTrueHandValue",t=>{const e=this.getHandValue(t),a=e.filter(t=>t<=21);return a.length>0?(a.sort((t,e)=>t-e),a[a.length-1]):e[0]}),p(this,"getHandDisplayValues",t=>{const e=this.getHandValue(t);return this.isHandBusted(t)?[...new Set([e[0]])]:[...new Set(e.filter(t=>t<=21))]}),p(this,"isHandBusted",t=>this.getTrueHandValue(t)>21),p(this,"playerHit",t=>{if(!t.isTrusted)return;const e=this.state.playerHand.addCards(this.deck.safeDrawCard());this.setState({playerHand:e}),this.isHandBusted(e)&&this.finishGame(y.DealerWon)}),p(this,"playerStay",t=>{if(!t.isTrusted)return;let e=this.state.dealerHand;for(;;){if(!(this.getTrueHandValue(e)<=16))break;e=e.addCards(this.deck.safeDrawCard())}if(this.setState({dealerHand:e}),this.isHandBusted(e))this.finishGame(y.PlayerWon);else{const t=this.getTrueHandValue(e),a=this.getTrueHandValue(this.state.playerHand);if(t>21||a>21)throw new Error("Someone busted when not expected to");a>t?this.finishGame(y.PlayerWon):a{const e=t===y.DealerWon?0:t===y.Tie?this.state.bet:t===y.PlayerWon?2*this.state.bet:t===y.PlayerWonByBlackjack?2.5*this.state.bet:(()=>{throw new Error("Unexpected result: "+t)})();this.win(this.props.p,e),this.setState({gameInProgress:!1,result:t,gains:this.state.gains+e-this.state.bet})}),p(this,"wagerOnChange",t=>{const{p:e}=this.props,a=t.target.value,n=Math.round(parseFloat(a));isNaN(n)?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not a valid number"}):n<=0?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Must bet a postive amount"}):n>1e8?this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Exceeds max bet"}):e.canAfford(n)?this.setState({bet:n,betInput:a,wagerInvalid:!1,wagerInvalidHelperText:"",result:y.Pending}):this.setState({bet:0,betInput:a,wagerInvalid:!0,wagerInvalidHelperText:"Not enough money"})}),p(this,"startOnClick",t=>{t.isTrusted&&(this.state.wagerInvalid||this.startGame())}),this.deck=new o.a(g);this.state={playerHand:new s.a([]),dealerHand:new s.a([]),bet:1e6,betInput:String(1e6),gameInProgress:!1,result:y.Pending,gains:0,wagerInvalid:!1,wagerInvalidHelperText:""}}render(){const{betInput:t,playerHand:e,dealerHand:a,gameInProgress:i,result:o,wagerInvalid:s,wagerInvalidHelperText:p,gains:g}=this.state,b=this.getHandDisplayValues(e),E=this.getHandDisplayValues(a);return n.createElement(n.Fragment,null,n.createElement(m.a,null,n.createElement(d.a,{value:t,label:n.createElement(n.Fragment,null,"Wager (Max: ",n.createElement(r.a,{money:1e8}),")"),disabled:i,onChange:this.wagerOnChange,error:s,helperText:s?p:"",type:"number",style:{width:"200px"},InputProps:{startAdornment:n.createElement(l.a,{position:"start"},n.createElement(h.a,null,"$"))}}),n.createElement(h.a,null,"Total earnings this session: ",n.createElement(r.a,{money:g}))),i?n.createElement(n.Fragment,null,n.createElement(f.a,{onClick:this.playerHit},"Hit"),n.createElement(f.a,{color:"secondary",onClick:this.playerStay},"Stay")):n.createElement(f.a,{onClick:this.startOnClick,disabled:s||!this.canStartGame()},"Start"),(i||o!==y.Pending)&&n.createElement(n.Fragment,null,n.createElement(m.a,{display:"flex"},n.createElement(u.a,{elevation:2},n.createElement(h.a,null,"Player"),e.cards.map((t,e)=>n.createElement(c.a,{card:t,key:e})),n.createElement(h.a,null,"Count:"," ",b.map((t,e)=>n.createElement("span",{key:e},t)).reduce((t,e)=>[t," or ",e])))),n.createElement("br",null),n.createElement(m.a,{display:"flex"},n.createElement(u.a,{elevation:2},n.createElement(h.a,null,"Dealer"),a.cards.map((t,e)=>n.createElement(c.a,{card:t,hidden:i&&0!==e,key:e})),!i&&n.createElement(n.Fragment,null,n.createElement(h.a,null,"Count:"," ",E.map((t,e)=>n.createElement("span",{key:e},t)).reduce((t,e)=>[t," or ",e])))))),o!==y.Pending&&n.createElement(h.a,null,o," ",o===y.PlayerWon&&n.createElement(r.a,{money:this.state.bet}),o===y.PlayerWonByBlackjack&&n.createElement(r.a,{money:1.5*this.state.bet}),o===y.DealerWon&&n.createElement(r.a,{money:-this.state.bet})))}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(258),o=a(113),s=a(137),l=a(65);const c=Object(o.a)(()=>Object(s.a)({card:{padding:"10px",border:"solid 1px #808080",backgroundColor:"white",display:"inline-block",borderRadius:"10px",fontSize:"18.5px",textAlign:"center",margin:"3px",fontWeight:"bold"},red:{color:"red"},black:{color:"black"},value:{fontSize:"20px",fontFamily:"sans-serif"}})),f=({card:t,hidden:e})=>{const a=c();let n;switch(t.suit){case i.b.Clubs:n=r.a.createElement("span",null,"♣");break;case i.b.Diamonds:n=r.a.createElement("span",null,"♦");break;case i.b.Hearts:n=r.a.createElement("span",null,"♥");break;case i.b.Spades:n=r.a.createElement("span",null,"♠");break;default:throw new Error("MissingCaseException: "+t.suit)}return r.a.createElement(l.a,{className:`${a.card} ${t.isRedSuit()?a.red:a.black}`},r.a.createElement(r.a.Fragment,null,r.a.createElement("span",{className:a.value},e?" - ":t.formatValue()),r.a.createElement("span",null,e?" - ":n)))}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(29),r=a(26),i=a(5);function o(t,e){const a=e.augmentations.slice().filter(t=>"NeuroFlux Governor"!==t);for(const e of a)if(!t.augmentations.some(t=>t.name==e))return!1;return!0}const s=[{title:"Gain root access on CSEC",fulfilled:()=>{const t=Object(r.d)("CSEC");return!(!t||!t.hasOwnProperty("hasAdminRights"))&&t.hasAdminRights}},{title:"Install the backdoor on CSEC",fulfilled:()=>{const t=Object(r.d)("CSEC");return!(!t||!t.hasOwnProperty("backdoorInstalled"))&&t.backdoorInstalled}},{title:"Join the faction hinted at in csec-test.msg",fulfilled:t=>t.factions.includes(i.a.CyberSec)},{title:"Install all the Augmentations from "+i.a.CyberSec,fulfilled:t=>o(t,n.a[i.a.CyberSec])},{title:"Join the faction hinted at in nitesec-test.msg",fulfilled:t=>t.factions.includes(i.a.NiteSec)},{title:"Install all the Augmentations from "+i.a.NiteSec,fulfilled:t=>o(t,n.a[i.a.NiteSec])},{title:"Join the faction hinted at in j3.msg",fulfilled:t=>t.factions.includes(i.a.TheBlackHand)},{title:"Install all the Augmentations from "+i.a.TheBlackHand,fulfilled:t=>o(t,n.a[i.a.TheBlackHand])},{title:"Join the faction hinted at in 19dfj3l1nd.msg",fulfilled:t=>t.factions.includes(i.a.BitRunners)},{title:"Install all the Augmentations from "+i.a.BitRunners,fulfilled:t=>o(t,n.a[i.a.BitRunners])},{title:"Complete fl1ght.exe",fulfilled:t=>t.factions.includes(i.a.Daedalus)},{title:"Install the special Augmentation from "+i.a.Daedalus,fulfilled:t=>t.augmentations.some(t=>"The Red Pill"==t.name)},{title:"Install the final backdoor and free yourself.",fulfilled:()=>!1}]},,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(8);function r(t,e){return t/n.a.DonateMoneyToRepDivisor*e.faction_rep_mult}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(97);const r={longestName:0,longestSymbol:0};for(const t of Object.keys(n.a))r.longestName=Math.max(t.length,r.longestName),r.longestSymbol=Math.max(n.a[t].length,r.longestSymbol)},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(21),o=a(1),s=a(9),l=a(1375);function c({achievement:t,unlockedOn:e,cssFiltersUnlocked:a,cssFiltersLocked:n}){if(!t)return r.a.createElement(r.a.Fragment,null);const c=!!e,f=c?s.a.theme.primary:s.a.theme.secondarylight;let u="";return e&&(u=new Date(e).toLocaleString()),r.a.createElement(i.a,{sx:{border:"1px solid "+s.a.theme.well,mb:2}},r.a.createElement(i.a,{sx:{display:"flex",flexDirection:"row",flexWrap:"wrap"}},r.a.createElement(l.a,{achievement:t,unlocked:c,size:"72px",colorFilters:c?a:n}),r.a.createElement(i.a,{sx:{display:"flex",flexDirection:"column",justifyContent:"center",px:1}},r.a.createElement(o.a,{variant:"h6",sx:{color:f}},t.Name),r.a.createElement(o.a,{variant:"body2",sx:{maxWidth:"500px",color:f}},t.Description),c&&r.a.createElement(o.a,{variant:"caption",sx:{fontSize:"12px",color:s.a.theme.primarydark}},"Acquired on ",u))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));class n{constructor(t,e,a){this.set(t,e,a)}toString(){return`rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)})`}set(t,e,a){this.r=this.clamp(t),this.g=this.clamp(e),this.b=this.clamp(a)}hueRotate(t=0){t=t/180*Math.PI;const e=Math.sin(t),a=Math.cos(t);this.multiply([.213+.787*a-.213*e,.715-.715*a-.715*e,.072-.072*a+.928*e,.213-.213*a+.143*e,.715+.285*a+.14*e,.072-.072*a-.283*e,.213-.213*a-.787*e,.715-.715*a+.715*e,.072+.928*a+.072*e])}grayscale(t=1){this.multiply([.2126+.7874*(1-t),.7152-.7152*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152+.2848*(1-t),.0722-.0722*(1-t),.2126-.2126*(1-t),.7152-.7152*(1-t),.0722+.9278*(1-t)])}sepia(t=1){this.multiply([.393+.607*(1-t),.769-.769*(1-t),.189-.189*(1-t),.349-.349*(1-t),.686+.314*(1-t),.168-.168*(1-t),.272-.272*(1-t),.534-.534*(1-t),.131+.869*(1-t)])}saturate(t=1){this.multiply([.213+.787*t,.715-.715*t,.072-.072*t,.213-.213*t,.715+.285*t,.072-.072*t,.213-.213*t,.715-.715*t,.072+.928*t])}multiply(t){const e=this.clamp(this.r*t[0]+this.g*t[1]+this.b*t[2]),a=this.clamp(this.r*t[3]+this.g*t[4]+this.b*t[5]),n=this.clamp(this.r*t[6]+this.g*t[7]+this.b*t[8]);this.r=e,this.g=a,this.b=n}brightness(t=1){this.linear(t)}contrast(t=1){this.linear(t,-.5*t+.5)}linear(t=1,e=0){this.r=this.clamp(this.r*t+255*e),this.g=this.clamp(this.g*t+255*e),this.b=this.clamp(this.b*t+255*e)}invert(t=1){this.r=this.clamp(255*(t+this.r/255*(1-2*t))),this.g=this.clamp(255*(t+this.g/255*(1-2*t))),this.b=this.clamp(255*(t+this.b/255*(1-2*t)))}hsl(){const t=this.r/255,e=this.g/255,a=this.b/255,n=Math.max(t,e,a),r=Math.min(t,e,a);let i,o,s=(n+r)/2;if(n===r)i=o=0;else{const l=n-r;switch(o=s>.5?l/(2-n-r):l/(n+r),n){case t:i=(e-a)/l+(e255?t=255:t<0&&(t=0),t}}class r{constructor(t){this.target=t,this.targetHSL=t.hsl(),this.reusedColor=new n(0,0,0)}solve(){const t=this.solveNarrow(this.solveWide());return{values:t.values,loss:t.loss,filter:this.css(t.values)}}solveWide(){const t=[60,180,18e3,600,1.2,1.2];let e={loss:1/0};for(let a=0;e.loss>25&&a<3;a++){const a=[50,20,3750,50,100,100],n=this.spsa(5,t,15,a,1e3);n.loss.5?1:-1,l[t]=n[t]+r*s[t],c[t]=n[t]-r*s[t];const m=this.loss(l)-this.loss(c);for(let a=0;a<6;a++){const i=m/(2*r)*s[a],o=e[a]/Math.pow(t+u+1,1);n[a]=f(n[a]-o*i,a)}const h=this.loss(n);ha?t%=a:t<0&&(t=a+t%a):t<0?t=0:t>a&&(t=a),t}}loss(t){const e=this.reusedColor;e.set(0,0,0),e.invert(t[0]/100),e.sepia(t[1]/100),e.saturate(t[2]/100),e.hueRotate(3.6*t[3]),e.brightness(t[4]/100),e.contrast(t[5]/100);const a=e.hsl();return Math.abs(e.r-this.target.r)+Math.abs(e.g-this.target.g)+Math.abs(e.b-this.target.b)+Math.abs(a.h-this.targetHSL.h)+Math.abs(a.s-this.targetHSL.s)+Math.abs(a.l-this.targetHSL.l)}css(t){function e(e,a=1){return Math.round(t[e]*a)}return`invert(${e(0)}%) sepia(${e(1)}%) saturate(${e(2)}%) hue-rotate(${e(3,3.6)}deg) brightness(${e(4)}%) contrast(${e(5)}%)`}}function i(t){const e=function(t){t=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(t,e,a,n)=>e+e+a+a+n+n);const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);return e?[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]:null}(t);if(!e)return"";const[a,i,o]=e,s=new n(a,i,o);return new r(s).solve().filter}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(8),r=a(6);function i(t){const e=1e3/n.a._idleSpeed;let a=0,i=0,o=0,s=0,l=0,c=0,f=0;const u=t.hashManager;switch(t.className){case n.a.ClassStudyComputerScience:i=n.a.ClassStudyComputerScienceBaseExp*t.workExpMult/e*u.getStudyMult();break;case n.a.ClassDataStructures:a=n.a.ClassDataStructuresBaseCost*t.workCostMult/e,i=n.a.ClassDataStructuresBaseExp*t.workExpMult/e*u.getStudyMult();break;case n.a.ClassNetworks:a=n.a.ClassNetworksBaseCost*t.workCostMult/e,i=n.a.ClassNetworksBaseExp*t.workExpMult/e*u.getStudyMult();break;case n.a.ClassAlgorithms:a=n.a.ClassAlgorithmsBaseCost*t.workCostMult/e,i=n.a.ClassAlgorithmsBaseExp*t.workExpMult/e*u.getStudyMult();break;case n.a.ClassManagement:a=n.a.ClassManagementBaseCost*t.workCostMult/e,f=n.a.ClassManagementBaseExp*t.workExpMult/e*u.getStudyMult();break;case n.a.ClassLeadership:a=n.a.ClassLeadershipBaseCost*t.workCostMult/e,f=n.a.ClassLeadershipBaseExp*t.workExpMult/e*u.getStudyMult();break;case n.a.ClassGymStrength:a=n.a.ClassGymBaseCost*t.workCostMult/e,o=t.workExpMult/e*u.getTrainingMult();break;case n.a.ClassGymDefense:a=n.a.ClassGymBaseCost*t.workCostMult/e,s=t.workExpMult/e*u.getTrainingMult();break;case n.a.ClassGymDexterity:a=n.a.ClassGymBaseCost*t.workCostMult/e,l=t.workExpMult/e*u.getTrainingMult();break;case n.a.ClassGymAgility:a=n.a.ClassGymBaseCost*t.workCostMult/e,c=t.workExpMult/e*u.getTrainingMult();break;default:throw new Error("ERR: Invalid/unrecognized class name")}return{workMoneyLossRate:a,workHackExpGainRate:i*t.hacking_exp_mult*r.a.ClassGymExpGain,workStrExpGainRate:o*t.strength_exp_mult*r.a.ClassGymExpGain,workDefExpGainRate:s*t.defense_exp_mult*r.a.ClassGymExpGain,workDexExpGainRate:l*t.dexterity_exp_mult*r.a.ClassGymExpGain,workAgiExpGainRate:c*t.agility_exp_mult*r.a.ClassGymExpGain,workChaExpGainRate:f*t.charisma_exp_mult*r.a.ClassGymExpGain}}},,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Default",description:"Default game theme, most supported",credit:"hydroflame",screenshot:a(902).a,colors:{primarylight:"#0f0",primary:"#0c0",primarydark:"#090",successlight:"#0f0",success:"#0c0",successdark:"#090",errorlight:"#f00",error:"#c00",errordark:"#900",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#000",backgroundsecondary:"#000",button:"#333"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Default-lite",description:"Less eye-straining default theme",credit:"NmuGmu",reference:"https://discord.com/channels/415207508303544321/921991895230611466/925263801564151888",screenshot:a(903).a,colors:{primarylight:"#28CF28",primary:"#21A821",primarydark:"#177317",successlight:"#1CFF1C",success:"#16CA16",successdark:"#0D910D",errorlight:"#FF3B3B",error:"#C32D2D",errordark:"#8E2121",secondarylight:"#B3B3B3",secondary:"#838383",secondarydark:"#676767",warninglight:"#FFFF3A",warning:"#C3C32A",warningdark:"#8C8C1E",infolight:"#64CBFF",info:"#3399CC",infodark:"#246D91",welllight:"#404040",well:"#1C1C1C",white:"#C3C3C3",black:"#0A0B0B",hp:"#C62E2E",money:"#D6BB27",hack:"#ADFF2F",combat:"#E8EDCD",cha:"#8B5FAF",int:"#537CC8",rep:"#E8EDCD",disabled:"#5AB5A5",backgroundprimary:"#0C0D0E",backgroundsecondary:"#121415",button:"#252829"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Monokai'ish",description:"Monokai'ish",credit:"eltea",screenshot:a(904).a,colors:{primarylight:"#FFF",primary:"#F8F8F2",primarydark:"#FAFAEB",successlight:"#ADE146",success:"#A6E22E",successdark:"#98E104",errorlight:"#FF69A0",error:"#F92672",errordark:"#D10F56",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#E1D992",warning:"#E6DB74",warningdark:"#EDDD54",infolight:"#92E1F1",info:"#66D9EF",infodark:"#31CDED",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#F92672",money:"#E6DB74",hack:"#A6E22E",combat:"#75715E",cha:"#AE81FF",int:"#66D9EF",rep:"#E69F66",disabled:"#66cfbc",backgroundprimary:"#272822",backgroundsecondary:"#1B1C18",button:"#333"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Warmer",credit:"hexnaught",description:"Warmer, softer theme",reference:"https://discord.com/channels/415207508303544321/921991895230611466/921999581020028938",screenshot:a(905).a,colors:{primarylight:"#EA9062",primary:"#DD7B4A",primarydark:"#D3591C",successlight:"#6ACF6A",success:"#43BF43",successdark:"#3E913E",errorlight:"#C15757",error:"#B34141",errordark:"#752525",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#E6E69D",warning:"#DADA56",warningdark:"#A1A106",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#AD84CF",int:"#6495ed",rep:"#faffdf",disabled:"#76C6B7",backgroundprimary:"#000",backgroundsecondary:"#000",button:"#333"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Dark+",credit:"LoganMD",description:"VSCode Dark+",reference:"https://discord.com/channels/415207508303544321/921991895230611466/921999975867617310",screenshot:a(906).a,colors:{primarylight:"#E0E0BC",primary:"#CCCCAE",primarydark:"#B8B89C",successlight:"#00F000",success:"#00D200",successdark:"#00B400",errorlight:"#F00000",error:"#C80000",errordark:"#A00000",secondarylight:"#B4AEAE",secondary:"#969090",secondarydark:"#787272",warninglight:"#F0F000",warning:"#C8C800",warningdark:"#A0A000",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#1E1E1E",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#1E1E1E",backgroundsecondary:"#252525",button:"#333"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Mayukai Dark",description:"Mayukai Dark-esque",credit:"Festive Noire",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922037502334889994",screenshot:a(907).a,colors:{primarylight:"#DDDFC5",primary:"#CDCFB6",primarydark:"#9D9F8C",successlight:"#00EF00",success:"#00A500",successdark:"#007A00",errorlight:"#F92672",error:"#CA1C5C",errordark:"#90274A",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#D3D300",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#00010A",white:"#fff",black:"#020509",hp:"#dd3434",money:"#ffd700",hack:"#8CCF27",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#080C11",backgroundsecondary:"#03080F",button:"#00010A"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Purple",credit:"zer0ney",description:"Essentially all defaults except for purple replacing the main colors",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922091815849570395",screenshot:a(908).a,colors:{primarylight:"#BA55D3",primary:"#9370DB",primarydark:"#8A2BE2",successlight:"#BA55D3",success:"#9370DB",successdark:"#8A2BE2",errorlight:"#f00",error:"#c00",errordark:"#900",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#222",white:"#fff",black:"#000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#000",backgroundsecondary:"#000",button:"#333"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Smooth Green",description:"A nice green theme that doesn't hurt your eyes.",credit:"Swidt",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922243957986033725",screenshot:a(909).a,colors:{primarylight:"#E0E0BC",primary:"#B0D9A3",primarydark:"#B8B89C",successlight:"#00F000",success:"#6BC16B",successdark:"#00B400",errorlight:"#F00000",error:"#3D713D",errordark:"#A00000",secondarylight:"#B4AEAE",secondary:"#8FAF85",secondarydark:"#787272",warninglight:"#F0F000",warning:"#38F100",warningdark:"#A0A000",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#2F3C2B",white:"#fff",black:"#1E1E1E",hp:"#dd3434",money:"#4AA52E",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#35A135",disabled:"#66cfbc",backgroundprimary:"#1E1E1E",backgroundsecondary:"#252525",button:"#2F3C2B"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Dracula",description:"Dracula Look-alike",credit:"H3draut3r",reference:"https://discord.com/channels/415207508303544321/921991895230611466/922296307836678144",screenshot:a(910).a,colors:{primarylight:"#7082B8",primary:"#F8F8F2",primarydark:"#FF79C6",successlight:"#0f0",success:"#0c0",successdark:"#090",errorlight:"#FD4545",error:"#FF2D2D",errordark:"#C62424",secondarylight:"#AAA",secondary:"#8BE9FD",secondarydark:"#666",warninglight:"#FFC281",warning:"#FFB86C",warningdark:"#E6A055",infolight:"#A0A0FF",info:"#7070FF",infodark:"#4040FF",welllight:"#44475A",well:"#363948",white:"#fff",black:"#282A36",hp:"#D34448",money:"#50FA7B",hack:"#F1FA8C",combat:"#BD93F9",cha:"#FF79C6",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#282A36",backgroundsecondary:"#21222C",button:"#21222C"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Dark Blue",description:"Very dark with a blue/purplelly primary",credit:"Saynt_Garmo",reference:"https://discord.com/channels/415207508303544321/921991895230611466/923084732718264340",screenshot:a(911).a,colors:{primarylight:"#023DDE",primary:"#4A41C8",primarydark:"#005299",successlight:"#00FF00",success:"#D1DAD1",successdark:"#BFCABF",errorlight:"#f00",error:"#c00",errordark:"#900",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#040505",white:"#fff",black:"#000000",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#091419",backgroundsecondary:"#000000",button:"#000000"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Discord-like",description:"Discord inspired theme",credit:"Thermite",reference:"https://discord.com/channels/415207508303544321/921991895230611466/924305252017143818",screenshot:a(912).a,colors:{primarylight:"#7389DC",primary:"#7389DC",primarydark:"#5964F1",successlight:"#00CC00",success:"#20DF20",successdark:"#0CB80C",errorlight:"#EA5558",error:"#EC4145",errordark:"#E82528",secondarylight:"#C3C3C3",secondary:"#9C9C9C",secondarydark:"#4E4E4E",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#1C4FB3",welllight:"#999999",well:"#35383C",white:"#FFFFFF",black:"#202225",hp:"#FF5656",money:"#43FF43",hack:"#FFAB3D",combat:"#8A90FD",cha:"#FF51D9",int:"#6495ed",rep:"#FFFF30",disabled:"#474B51",backgroundprimary:"#2F3136",backgroundsecondary:"#35393E",button:"#333"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"One Dark",description:"Dark with a greenish tint",credit:"Dexalt142",reference:"https://discord.com/channels/415207508303544321/921991895230611466/924650660694208512",screenshot:a(913).a,colors:{primarylight:"#98C379",primary:"#98C379",primarydark:"#98C379",successlight:"#98C379",success:"#98C379",successdark:"#98C379",errorlight:"#E06C75",error:"#BE5046",errordark:"#BE5046",secondarylight:"#AAA",secondary:"#888",secondarydark:"#666",warninglight:"#E5C07B",warning:"#E5C07B",warningdark:"#D19A66",infolight:"#61AFEF",info:"#61AFEF",infodark:"#61AFEF",welllight:"#4B5263",well:"#282C34",white:"#ABB2BF",black:"#282C34",hp:"#E06C75",money:"#E5C07B",hack:"#98C379",combat:"#ABB2BF",cha:"#C678DD",int:"#61AFEF",rep:"#ABB2BF",disabled:"#56B6C2",backgroundprimary:"#282C34",backgroundsecondary:"#21252B",button:"#4B5263"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Muted Gold & Blue",description:"Muted gold with blue accents.",credit:"Sloth",reference:"https://discord.com/channels/415207508303544321/921991895230611466/924672660758208563",screenshot:a(914).a,colors:{primarylight:"#E3B54A",primary:"#CAA243",primarydark:"#7E6937",successlight:"#82FF82",success:"#6FDA6F",successdark:"#64C364",errorlight:"#FD5555",error:"#D84A4A",errordark:"#AC3939",secondarylight:"#D8D0B8",secondary:"#B1AA95",secondarydark:"#736E5E",warninglight:"#ff0",warning:"#cc0",warningdark:"#990",infolight:"#69f",info:"#36c",infodark:"#039",welllight:"#444",well:"#111111",white:"#fff",black:"#070300",hp:"#dd3434",money:"#ffd700",hack:"#adff2f",combat:"#faffdf",cha:"#a671d1",int:"#6495ed",rep:"#faffdf",disabled:"#66cfbc",backgroundprimary:"#0A0A0E",backgroundsecondary:"#0E0E10",button:"#222222"}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n={name:"Light",description:"Cobbled Together Light Theme",credit:"matt",reference:"https://discord.com/channels/415207508303544321/921991895230611466/926114005456658432",screenshot:a(915).a,colors:{primarylight:"#535353",primary:"#1A1A1A",primarydark:"#0d0d0d",successlight:"#63c439",success:"#428226",successdark:"#2E5A1B",errorlight:"#df7051",error:"#C94824",errordark:"#91341B",secondarylight:"#b3b3b3",secondary:"#9B9B9B",secondarydark:"#7A7979",warninglight:"#e8d464",warning:"#C6AD20",warningdark:"#9F8A16",infolight:"#6299cf",info:"#3778B7",infodark:"#30689C",welllight:"#f9f9f9",well:"#eaeaea",white:"#F7F7F7",black:"#F7F7F7",hp:"#BF5C41",money:"#E1B121",hack:"#47BC38",combat:"#656262",cha:"#A568AC",int:"#889BCF",rep:"#656262",disabled:"#70B4BF",backgroundprimary:"#F7F7F7",backgroundsecondary:"#f9f9f9",button:"#eaeaea"}}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";e.a=a.p+"dist/images/83b2443ab7e7d346766c8f6bc5afc7a7.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/6caf35202b10b52e1fc2743f674c33e8.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/cb88977ea837bccb9cceb727adc78302.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/4e0e750f2f09de58219773edd46cbbf5.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/e97de4daa946331c7e99dee9c05d629c.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/9f96a5084f4e5f1a6c0041b41b34d62d.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/85a7b2896acb62be76f3ea7100fe9012.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/5aa87b7de67a77c914088783b055e1cf.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/c7164b072d62c91c27c6d607b5207e7b.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/66f4b86d86164fc117bd6d648e4eaa6f.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/a1110d6c8d16a14c4570411750248399.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/447bc31e61f55e7eff875be3e9a81f1a.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/297df8c0e47764ea113951318b2acf55.png"},function(t,e,a){"use strict";e.a=a.p+"dist/images/e66b0c327f97d08e4253f52234d659eb.png"},,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return ct}));var n=a(246),r=a(91),i=a(47),o=a(64),s=a(111),l=a(324),c=a(98),f=a(8),u=a(26),m=a(83),h=a(465),d=a(44),p=a(132),g=a(469),y=a(102),b=a(9),E=a(192),v=a(99),k=a(4),_=a(24),w=a(1396),S=a(1397),C=a(1398),x=a(1399),L=a(1400),O=a(1401),M=a(1402),T=a(1403),A=a(1404),R=a(588),N=a(1405),P=a(1406),I=a(1407),F=a(1408),D=a(1409),j=a(1410),B=a(1411),G=a(1412),W=a(1413),H=a(1414),U=a(1415),q=a(1416),$=a(1417),K=a(1418),z=a(1419),V=a(1421),Y=a(1422),J=a(1423),X=a(1426),Q=a(1427),Z=a(1428),tt=a(1429),et=a(1430),at=a(1431),nt=a(1432),rt=a(1433),it=a(1434),ot=a(1435),st=a(251);function lt(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class ct{constructor(){lt(this,"action",null),lt(this,"commandHistory",[]),lt(this,"commandHistoryIndex",0),lt(this,"outputHistory",[new n.b(`Bitburner v${f.a.VersionString} (${Object(st.a)()})`,"primary")]),lt(this,"contractOpen",!1),lt(this,"currDir","/")}process(t,e,a){null!==this.action&&(this.action.timeLeft-=f.a._idleSpeed*a/1e3,this.action.timeLeft<.01&&this.finishAction(t,e,!1),l.b.emit())}append(t){this.outputHistory.push(t),this.outputHistory.length>b.a.MaxTerminalCapacity&&this.outputHistory.splice(0,this.outputHistory.length-b.a.MaxTerminalCapacity),l.b.emit()}print(t){this.append(new n.b(t,"primary"))}printRaw(t){this.append(new n.c(t))}error(t){this.append(new n.b(t,"error"))}success(t){this.append(new n.b(t,"success"))}info(t){this.append(new n.b(t,"info"))}warn(t){this.append(new n.b(t,"warn"))}startHack(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot hack this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.d)(e,t)/4,"h",e)}}startGrow(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot grow this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.a)(e,t)/16,"g",e)}}startWeaken(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot weaken this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.f)(e,t)/16,"w",e)}}startBackdoor(t){const e=t.getCurrentServer();if(e instanceof r.a)this.error("Cannot backdoor this kind of server");else{if(!(e instanceof i.a))throw new Error("server should be normal server");this.startAction(Object(v.d)(e,t)/4,"b",e)}}startAnalyze(t){this.print("Analyzing system...");const e=t.getCurrentServer();this.startAction(1,"a",e)}startAction(t,e,a){this.action=new n.d(t,e,a)}finishHack(t,e,a,n=!1){if(n)return;if(a instanceof r.a)return void this.error("Cannot hack this kind of server");if(!(a instanceof i.a))throw new Error("server should be normal server");const o=Object(v.b)(a,e),s=Math.random(),l=Object(v.c)(a,e),c=l/4;if(s0;if(this.print("Can run scripts on this host: "+(s?"YES":"NO")),this.print("RAM: "+k.a.formatRAM(e.maxRam)),e instanceof i.a){this.print("Backdoor: "+(e.backdoorInstalled?"YES":"NO"));const n=e.requiredHackingSkill;this.print("Required hacking skill for hack() and backdoor: "+(a?"N/A":n));const r=e.hackDifficulty;this.print("Server security level: "+(a?"N/A":k.a.formatServerSecurity(r)));const i=Object(v.b)(e,t);this.print("Chance to hack: "+(a?"N/A":k.a.formatPercentage(i)));const o=1e3*Object(v.d)(e,t);this.print("Time to hack: "+(a?"N/A":Object(_.b)(o,!0)))}if(this.print("Total money available on server: "+(e instanceof i.a?k.a.formatMoney(e.moneyAvailable):"N/A")),e instanceof i.a){const t=e.numOpenPortsRequired;this.print("Required number of open ports for NUKE: "+(a?"N/A":t)),this.print("SSH port: "+(e.sshPortOpen?"Open":"Closed")),this.print("FTP port: "+(e.ftpPortOpen?"Open":"Closed")),this.print("SMTP port: "+(e.smtpPortOpen?"Open":"Closed")),this.print("HTTP port: "+(e.httpPortOpen?"Open":"Closed")),this.print("SQL port: "+(e.sqlPortOpen?"Open":"Closed"))}}}finishAction(t,e,a=!1){if(null!==this.action){if(!this.action.server)throw new Error("Missing action target server");this.print(this.getProgressText()),"h"===this.action.action?this.finishHack(t,e,this.action.server,a):"g"===this.action.action?this.finishGrow(e,this.action.server,a):"w"===this.action.action?this.finishWeaken(e,this.action.server,a):"b"===this.action.action?this.finishBackdoor(t,e,this.action.server,a):"a"===this.action.action&&this.finishAnalyze(e,this.action.server,a),a&&this.print("Cancelled"),this.action=null,l.b.emit()}else if(!a)throw new Error("Finish action called when there was no action")}getFile(t,e){return Object(c.a)(e)?this.getScript(t,e):e.endsWith(".lit")?this.getLitFile(t,e):e.endsWith(".txt")?this.getTextFile(t,e):null}getFilepath(t){const e=Object(m.d)(t,this.cwd());if(null==e)throw new Error("Invalid file path specified: "+t);return Object(m.h)(e)?Object(m.k)(e):e}getScript(t,e){const a=t.getCurrentServer(),n=this.getFilepath(e);for(const t of a.scripts)if(n===t.filename)return t;return null}getTextFile(t,e){const a=t.getCurrentServer(),n=this.getFilepath(e);for(const t of a.textFiles)if(n===t.fn)return t;return null}getLitFile(t,e){const a=t.getCurrentServer(),n=this.getFilepath(e);for(const t of a.messages)if("string"==typeof t&&n===t)return t;return null}cwd(){return this.currDir}setcwd(t){this.currDir=t,l.b.emit()}async runContract(t,e){if(this.contractOpen)return this.error("There's already a Coding Contract in Progress");const a=t.getCurrentServer(),n=a.getContract(e);if(null==n)return this.error("No such contract");this.contractOpen=!0;switch(await n.prompt()){case s.b.Success:if(null!==n.reward){const e=t.gainCodingContractReward(n.reward,n.getDifficulty());this.print("Contract SUCCESS - "+e)}a.removeContract(n);break;case s.b.Failure:++n.tries,n.tries>=n.getMaxNumTries()?(this.error("Contract FAILED - Contract is now self-destructing"),a.removeContract(n)):this.error(`Contract FAILED - ${n.getMaxNumTries()-n.tries} tries remaining`);break;case s.b.Cancelled:default:this.print("Contract cancelled")}this.contractOpen=!1}executeScanAnalyzeCommand(t,e=1,a=!1){this.print("~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~"),this.print(" ");const i={};for(const t of Object(u.c)())i[t.hostname]=0;const s=[],l=[0],c=t.getCurrentServer();for(s.push(c);0!=s.length;){const c=s.pop();if(!c)continue;const f=l.pop();if(void 0===f)continue;const u=c instanceof r.a;if(!a&&c.purchasedByPlayer&&"home"!=c.hostname)continue;if(i[c.hostname]||f>e)continue;if(!a&&u)continue;i[c.hostname]=1;for(let t=c.serversOnNetwork.length-1;t>=0;--t){const e=Object(p.a)(c,t);null!==e&&(s.push(e),l.push(f+1))}if(0==f)continue;const m=Array(4*(f-1)+1).join("-");t.hasProgram(o.a.AutoLink.name)?this.append(new n.a(m,c.hostname)):this.print(m+c.hostname);const h=m+"--";let d="NO";c.hasAdminRights&&(d="YES"),this.print(`${h}Root Access: ${d}${u?"":", Required hacking skill: "+c.requiredHackingSkill}`),c.hasOwnProperty("numOpenPortsRequired")&&this.print(h+"Number of open ports required to NUKE: "+c.numOpenPortsRequired),this.print(h+"RAM: "+k.a.formatRAM(c.maxRam)),this.print(" ")}}connectToServer(t,e){const a=Object(u.d)(e);null!=a?(t.getCurrentServer().isConnectedTo=!1,t.currentServer=a.hostname,t.getCurrentServer().isConnectedTo=!0,this.print("Connected to "+a.hostname),this.setcwd("/"),"darkweb"==t.getCurrentServer().hostname&&Object(h.c)()):this.error("Invalid server. Connection failed.")}executeCommands(t,e,a){a=(a=a.trim()).replace(/\s\s+/g," "),this.commandHistory[this.commandHistory.length-1]!=a&&(this.commandHistory.push(a),this.commandHistory.length>50&&this.commandHistory.splice(0,1),e.terminalCommandHistory=this.commandHistory),this.commandHistoryIndex=this.commandHistory.length;const n=Object(g.b)(a);for(let a=0;athis.clear(),cls:()=>this.clear(),connect:T.a,cp:A.a,download:R.a,expr:N.a,free:P.a,grow:I.a,hack:F.a,help:D.a,history:j.a,home:B.a,hostname:G.a,kill:W.a,killall:H.a,ls:U.a,lscpu:q.a,mem:$.a,mv:K.a,nano:z.a,ps:V.a,rm:Y.a,run:J.a,scan:X.a,scp:Z.a,sudov:tt.a,tail:et.a,top:at.a,unalias:nt.a,vim:rt.a,weaken:it.a,wget:ot.a}[i.toLowerCase()];o?o(this,t,e,r,n.slice(1)):this.error(`Command ${n[0]} not found`)}getProgressText(){if(null===this.action)throw new Error("trying to get the progress text when there's no action");return Object(E.a)({progress:(this.action.time-this.action.timeLeft)/this.action.time,totalTicks:50})}}},,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(36);function r(t){let e=t;return e.startsWith("[")&&(e=e.slice(1)),e.endsWith("]")&&(e=e.slice(0,-1)),e}function i(t){let e=t;return(e.startsWith('"')||e.startsWith("'"))&&(e=e.slice(1)),(e.endsWith('"')||e.endsWith("'"))&&(e=e.slice(0,-1)),e}function o(t){const e=[];return t.forEach(t=>{let a=t.toString();a=["[",a,"]"].join(""),e.push(a)}),e.join(",").replace(/\s/g,"")}const s=[{desc:t=>["A prime factor is a factor that is a prime number.",`What is the largest prime factor of ${t}?`].join(" "),difficulty:1,gen:()=>Object(n.a)(500,1e9),name:"Find Largest Prime Factor",numTries:10,solver:(t,e)=>{let a=2,n=t;for(;n>(a-1)*(a-1);){for(;n%a==0;)n=Math.round(n/a);++a}return(1===n?a-1:n)===parseInt(e,10)}},{desc:t=>["Given the following integer array, find the contiguous subarray","(containing at least one number) which has the largest sum and return that sum.","'Sum' refers to the sum of all the numbers in the subarray.\n",""+t.toString()].join(" "),difficulty:1,gen:()=>{const t=Object(n.a)(5,40),e=[];e.length=t;for(let a=0;a{const a=t.slice();for(let t=1;t["It is possible write four as a sum in exactly four different ways:\n\n","    3 + 1\n","    2 + 2\n","    2 + 1 + 1\n","    1 + 1 + 1 + 1\n\n",`How many different ways can the number ${t} be written as a sum of at least`,"two positive integers?"].join(" "),difficulty:1.5,gen:()=>Object(n.a)(8,100),name:"Total Ways to Sum",numTries:10,solver:(t,e)=>{const a=[1];a.length=t+1,a.fill(0,1);for(let e=1;e{let e=["Given the following array of arrays of numbers representing a 2D matrix,","return the elements of the matrix as an array in spiral order:\n\n"].join(" ");return e+="    [\n",e+=t.map(t=>"        ["+t.map(t=>(""+t).padStart(2," ")).join(",")+"]").join("\n"),e+="\n    ]\n",e+=["\nHere is an example of what spiral order should be:\n\n","    [\n","        [1, 2, 3]\n","        [4, 5, 6]\n","        [7, 8, 9]\n","    ]\n\n","Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\n\n","Note that the matrix will not always be square:\n\n","    [\n","        [1,  2,  3,  4]\n","        [5,  6,  7,  8]\n","        [9, 10, 11, 12]\n","    ]\n\n","Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]"].join(" "),e},difficulty:2,gen:()=>{const t=Object(n.a)(1,15),e=Object(n.a)(1,15),a=[];a.length=t;for(let n=0;n{const a=[];let n=0,i=t.length-1,o=0,s=t[0].length-1,l=0;for(;;){for(let e=o;e<=s;e++)a[l]=t[n][e],++l;if(++n>i)break;for(let e=n;e<=i;e++)a[l]=t[e][s],++l;if(--s=o;e--)a[l]=t[i][e],++l;if(--i=n;e--)a[l]=t[e][o],++l;if(++o>s)break}const c=r(e).replace(/\s/g,"").split(",");for(let t=0;t["You are given the following array of integers:\n\n",t+"\n\n","Each element in the array represents your MAXIMUM jump length","at that position. This means that if you are at position i and your","maximum jump length is n, you can jump to any position from","i to i+n.","\n\nAssuming you are initially positioned","at the start of the array, determine whether you are","able to reach the last index.\n\n","Your answer should be submitted as 1 or 0, representing true and false respectively"].join(" "),difficulty:2.5,gen:()=>{const t=Object(n.a)(3,25),e=[];e.length=t;for(let t=0;t{const a=t.length;let n=0;for(let e=0;n["Given the following array of array of numbers representing a list of","intervals, merge all overlapping intervals.\n\n",`[${o(t)}]\n\n`,"Example:\n\n","[[1, 3], [8, 10], [2, 6], [10, 16]]\n\n","would merge into [[1, 6], [8, 16]].\n\n","The intervals must be returned in ASCENDING order.","You can assume that in an interval, the first number will always be","smaller than the second."].join(" "),difficulty:3,gen:()=>{const t=[],e=Object(n.a)(3,20);for(let a=0;a{const a=t.slice();a.sort((t,e)=>t[0]-e[0]);const n=[];let i=a[0][0],s=a[0][1];for(const t of a)t[0]<=s?s=Math.max(s,t[1]):(n.push([i,s]),i=t[0],s=t[1]);n.push([i,s]);const l=o(n),c=e.replace(/\s/g,"");return l===c||l===r(c)}},{desc:t=>["Given the following string containing only digits, return","an array with all possible valid IP address combinations","that can be created from the string:\n\n",t+"\n\n","Note that an octet cannot begin with a '0' unless the number","itself is actually 0. For example, '192.168.010.1' is not a valid IP.\n\n","Examples:\n\n","25525511135 -> [255.255.11.135, 255.255.111.35]\n","1938718066 -> [193.87.180.66]"].join(" "),difficulty:3,gen:()=>{let t="";for(let e=0;e<4;++e){t+=Object(n.a)(0,255).toString()}return t},name:"Generate IP Addresses",numTries:10,solver:(t,e)=>{const a=[];for(let e=1;e<=3;++e)for(let n=1;n<=3;++n)for(let r=1;r<=3;++r)for(let i=1;i<=3;++i)if(e+n+r+i===t.length){const o=parseInt(t.substring(0,e),10),s=parseInt(t.substring(e,e+n),10),l=parseInt(t.substring(e+n,e+n+r),10),c=parseInt(t.substring(e+n+r,e+n+r+i),10);if(o<=255&&s<=255&&l<=255&&c<=255){const e=[o.toString(),".",s.toString(),".",l.toString(),".",c.toString()].join("");e.length===t.length+3&&a.push(e)}}const n=r(e).replace(/\s/g,"").split(",");if(n.length!==a.length)return!1;for(const t of n)if(!a.includes(t))return!1;return!0}},{desc:t=>["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",t+"\n\n","Determine the maximum possible profit you can earn using at most","one transaction (i.e. you can only buy and sell the stock once). If no profit can be made","then the answer should be 0. Note","that you have to buy the stock before you can sell it"].join(" "),difficulty:1,gen:()=>{const t=Object(n.a)(3,50),e=[];e.length=t;for(let a=0;a{let a=0,n=0;for(let e=1;e["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",t+"\n\n","Determine the maximum possible profit you can earn using as many","transactions as you'd like. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:2,gen:()=>{const t=Object(n.a)(3,50),e=[];e.length=t;for(let a=0;a{let a=0;for(let e=1;e["You are given the following array of stock prices (which are numbers)","where the i-th element represents the stock price on day i:\n\n",t+"\n\n","Determine the maximum possible profit you can earn using at most","two transactions. A transaction is defined as buying","and then selling one share of the stock. Note that you cannot","engage in multiple transactions at once. In other words, you","must sell the stock before you buy it again.\n\n","If no profit can be made, then the answer should be 0"].join(" "),difficulty:5,gen:()=>{const t=Object(n.a)(3,50),e=[];e.length=t;for(let a=0;a{let a=Number.MIN_SAFE_INTEGER,n=Number.MIN_SAFE_INTEGER,r=0,i=0;for(const e of t)i=Math.max(i,n+e),n=Math.max(n,r-e),r=Math.max(r,a+e),a=Math.max(a,-1*e);return i.toString()===e}},{desc:t=>["You are given the following array with two elements:\n\n",`[${t[0]}, [${t[1]}]]\n\n`,"The first element is an integer k. The second element is an","array of stock prices (which are numbers) where the i-th element","represents the stock price on day i.\n\n","Determine the maximum possible profit you can earn using at most","k transactions. A transaction is defined as buying and then selling","one share of the stock. Note that you cannot engage in multiple","transactions at once. In other words, you must sell the stock before","you can buy it again.\n\n","If no profit can be made, then the answer should be 0."].join(" "),difficulty:8,gen:()=>{const t=Object(n.a)(2,10),e=Object(n.a)(3,50),a=[];a.length=e;for(let t=0;t{const a=t[0],n=t[1],r=n.length;if(r<2)return 0===parseInt(e);if(a>r/2){let t=0;for(let e=1;e0;--t)o[t]=Math.max(o[t],i[t]+s),i[t]=Math.max(i[t],o[t-1]-s)}return parseInt(e)===o[a]}},{desc:t=>{function e(t,a=0){const n=t.length;if(a>=n)return"";let r=[" ".repeat(n-a+1),"[",t[a].toString(),"]"].join("");return a 3 -> 5 -> 1)."].join(" ")},difficulty:5,gen:()=>{const t=[],e=Object(n.a)(3,12);t.length=e;for(let a=0;a{const a=t.length,n=t[a-1].slice();for(let e=a-2;e>-1;--e)for(let a=0;a{const e=t[0],a=t[1];return["You are in a grid with",`${e} rows and ${a} columns, and you are`,"positioned in the top-left corner of that grid. You are trying to","reach the bottom-right corner of the grid, but you can only","move down or right on each step. Determine how many","unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an array","with the number of rows and columns:\n\n",`[${e}, ${a}]`].join(" ")},difficulty:3,gen:()=>[Object(n.a)(2,14),Object(n.a)(2,14)],name:"Unique Paths in a Grid I",numTries:10,solver:(t,e)=>{const a=t[0],n=t[1],r=[];r.length=a;for(let t=0;t{let e="";for(const a of t)e+=a.toString()+",\n";return["You are located in the top-left corner of the following grid:\n\n",e+"\n","You are trying reach the bottom-right corner of the grid, but you can only","move down or right on each step. Furthermore, there are obstacles on the grid","that you cannot move onto. These obstacles are denoted by '1', while empty","spaces are denoted by 0.\n\n","Determine how many unique paths there are from start to finish.\n\n","NOTE: The data returned for this contract is an 2D array of numbers representing the grid."].join(" ")},difficulty:5,gen:()=>{const t=Object(n.a)(2,12),e=Object(n.a)(2,12),a=[];a.length=t;for(let n=0;n{const a=[];a.length=t.length;for(let e=0;e0?a[t-1][e]:0)+(e>0?a[t][e-1]:0);return a[a.length-1][a[0].length-1]===parseInt(e)}},{desc:t=>["Given the following string:\n\n",t+"\n\n","remove the minimum number of invalid parentheses in order to validate","the string. If there are multiple minimal ways to validate the string,","provide all of the possible results. The answer should be provided","as an array of strings. If it is impossible to validate the string","the result should be an array with only an empty string.\n\n","IMPORTANT: The string may contain letters, not just parentheses.","Examples:\n",'"()())()" -> [()()(), (())()]\n','"(a)())()" -> [(a)()(), (a())()]\n','")(" -> [""]'].join(" "),difficulty:10,gen:()=>{const t=Object(n.a)(6,20),e=[];e.length=t,Math.random()<.8?e[0]="(":e[0]=")";for(let a=1;a{let a=0,n=0;const i=[];for(let e=0;e0?--a:++n);!function t(e,a,n,r,i,o,s){if(i.length!==a)"("===i[a]?(n>0&&t(e,a+1,n-1,r,i,o,s),t(e+1,a+1,n,r,i,o+i[a],s)):")"===i[a]?(r>0&&t(e,a+1,n,r-1,i,o,s),e>0&&t(e-1,a+1,n,r,i,o+i[a],s)):t(e,a+1,n,r,i,o+i[a],s);else if(0===n&&0===r&&0===e){for(let t=0;t{const e=t[0],a=t[1];return["You are given the following string which contains only digits between 0 and 9:\n\n",e+"\n\n",`You are also given a target number of ${a}. Return all possible ways`,"you can add the +(add), -(subtract), and *(multiply) operators to the string such","that it evaluates to the target number. (Normal order of operations applies.)\n\n","The provided answer should be an array of strings containing the valid expressions.","The data provided by this problem is an array with two elements. The first element","is the string of digits, while the second element is the target number:\n\n",`["${e}", ${a}]\n\n`,"NOTE: The order of evaluation expects script operator precedence","NOTE: Numbers in the expression cannot have leading 0's. In other words,",'"1+01" is not a valid expression',"Examples:\n\n",'Input: digits = "123", target = 6\n',"Output: [1+2+3, 1*2*3]\n\n",'Input: digits = "105", target = 5\n',"Output: [1*0+5, 10-5]"].join(" ")},difficulty:10,gen:()=>{const t=Object(n.a)(4,12),e=[];e.length=t;for(let t=0;t{const a=t[0],n=t[1];const o=r(e).split(",");for(let t=0;t=t}}const h=[{key:"NukeProgram",name:"NUKE.exe",create:{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:m(1),time:n.a.MillisecondsPerFiveMinutes},run:(t,e,a,n)=>{if(n instanceof r.a)return n.hasAdminRights?(e.print("You already have root access to this computer. There is no reason to run NUKE.exe"),void e.print("You can now run scripts on this server.")):n.openPortCount>=n.numOpenPortsRequired?(n.hasAdminRights=!0,e.print("NUKE successful! Gained root access to "+n.hostname),void e.print("You can now run scripts on this server.")):void e.print("NUKE unsuccessful. Not enough ports have been opened");e.error("Cannot nuke this kind of server.")}},{key:"BruteSSHProgram",name:"BruteSSH.exe",create:{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:m(50),time:2*n.a.MillisecondsPerFiveMinutes},run:(t,e,a,n)=>{n instanceof r.a?n.sshPortOpen?e.print("SSH Port (22) is already open!"):(n.sshPortOpen=!0,e.print("Opened SSH Port(22)!"),n.openPortCount++):e.error("Cannot run BruteSSH.exe on this kind of server.")}},{key:"FTPCrackProgram",name:"FTPCrack.exe",create:{level:100,tooltip:"This program cracks open FTP ports",req:m(100),time:n.a.MillisecondsPerHalfHour},run:(t,e,a,n)=>{n instanceof r.a?n.ftpPortOpen?e.print("FTP Port (21) is already open!"):(n.ftpPortOpen=!0,e.print("Opened FTP Port (21)!"),n.openPortCount++):e.error("Cannot run FTPCrack.exe on this kind of server.")}},{key:"RelaySMTPProgram",name:"relaySMTP.exe",create:{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:m(250),time:n.a.MillisecondsPer2Hours},run:(t,e,a,n)=>{n instanceof r.a?n.smtpPortOpen?e.print("SMTP Port (25) is already open!"):(n.smtpPortOpen=!0,e.print("Opened SMTP Port (25)!"),n.openPortCount++):e.error("Cannot run relaySMTP.exe on this kind of server.")}},{key:"HTTPWormProgram",name:"HTTPWorm.exe",create:{level:500,tooltip:"This virus opens up HTTP ports",req:m(500),time:n.a.MillisecondsPer4Hours},run:(t,e,a,n)=>{n instanceof r.a?n.httpPortOpen?e.print("HTTP Port (80) is already open!"):(n.httpPortOpen=!0,e.print("Opened HTTP Port (80)!"),n.openPortCount++):e.error("Cannot run HTTPWorm.exe on this kind of server.")}},{key:"SQLInjectProgram",name:"SQLInject.exe",create:{level:750,tooltip:"This virus opens SQL ports",req:m(750),time:n.a.MillisecondsPer8Hours},run:(t,e,a,n)=>{n instanceof r.a?n.sqlPortOpen?e.print("SQL Port (1433) is already open!"):(n.sqlPortOpen=!0,e.print("Opened SQL Port (1433)!"),n.openPortCount++):e.error("Cannot run SQLInject.exe on this kind of server.")}},{key:"DeepscanV1",name:"DeepscanV1.exe",create:{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:m(75),time:n.a.MillisecondsPerQuarterHour},run:(t,e)=>{e.print("This executable cannot be run."),e.print("DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.")}},{key:"DeepscanV2",name:"DeepscanV2.exe",create:{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:m(400),time:n.a.MillisecondsPer2Hours},run:(t,e)=>{e.print("This executable cannot be run."),e.print("DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.")}},{key:"ServerProfiler",name:"ServerProfiler.exe",create:{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:m(75),time:n.a.MillisecondsPerHalfHour},run:(t,e,a,n,s)=>{if(1!==s.length)return void e.error("Must pass a server hostname or IP as an argument for ServerProfiler.exe");const l=Object(o.d)(s[0]);null!=l?l instanceof r.a?(e.print(l.hostname+":"),e.print("Server base security level: "+l.baseDifficulty),e.print("Server current security level: "+l.hackDifficulty),e.print("Server growth rate: "+l.serverGrowth),e.print("Netscript hack() execution time: "+Object(i.b)(1e3*Object(f.d)(l,a),!0)),e.print("Netscript grow() execution time: "+Object(i.b)(1e3*Object(f.a)(l,a),!0)),e.print("Netscript weaken() execution time: "+Object(i.b)(1e3*Object(f.f)(l,a),!0))):e.error("ServerProfiler.exe can only be run on normal servers."):e.error("Invalid server IP/hostname")}},{key:"AutoLink",name:"AutoLink.exe",create:{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:m(25),time:n.a.MillisecondsPerQuarterHour},run:(t,e)=>{e.print("This executable cannot be run."),e.print("AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'."),e.print("When using scan-analyze, click on a server's hostname to connect to it.")}},{key:"Formulas",name:"Formulas.exe",create:{level:1e3,tooltip:"This program allows you to use the formulas API",req:m(1e3),time:n.a.MillisecondsPer4Hours},run:(t,e)=>{e.print("This executable cannot be run."),e.print("Formulas.exe lets you use the formulas API.")}},{key:"BitFlume",name:"b1t_flum3.exe",create:{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(t){return t.sourceFiles.length>0&&t.hacking>=1},time:n.a.MillisecondsPerFiveMinutes/20},run:()=>{c.a.emit()}},{key:"Flight",name:"fl1ght.exe",create:null,run:(t,e,a)=>{const n=Math.round(30*l.a.DaedalusAugsRequirement);if(!(a.augmentations.length>=n&&a.money>1e11&&a.hacking>=2500))return e.print(`Augmentations: ${a.augmentations.length} / ${n}`),e.print(`Money: ${s.a.formatMoney(a.money)} / $100b`),void e.print(`Hacking skill: ${a.hacking} / 2500`);e.print("We will contact you."),e.print(`-- ${u.a.Daedalus} --`)}}]},function(t,e,a){"use strict";function n(t){const e="(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)";return new RegExp(`^${e}.${e}.${e}.${e}$`).test(t)}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(8);const r=(t,e=1)=>{const a={hacking_chance_mult:t.hacking_chance_mult,hacking_speed_mult:t.hacking_speed_mult,hacking_money_mult:t.hacking_money_mult,hacking_grow_mult:t.hacking_grow_mult,hacking_mult:t.hacking_mult,strength_mult:t.strength_mult,defense_mult:t.defense_mult,dexterity_mult:t.dexterity_mult,agility_mult:t.agility_mult,charisma_mult:t.charisma_mult,hacking_exp_mult:t.hacking_exp_mult,strength_exp_mult:t.strength_exp_mult,defense_exp_mult:t.defense_exp_mult,dexterity_exp_mult:t.dexterity_exp_mult,agility_exp_mult:t.agility_exp_mult,charisma_exp_mult:t.charisma_exp_mult,company_rep_mult:t.company_rep_mult,faction_rep_mult:t.faction_rep_mult,crime_money_mult:t.crime_money_mult,crime_success_mult:t.crime_success_mult,hacknet_node_money_mult:t.hacknet_node_money_mult,hacknet_node_purchase_cost_mult:t.hacknet_node_purchase_cost_mult,hacknet_node_ram_cost_mult:t.hacknet_node_ram_cost_mult,hacknet_node_core_cost_mult:t.hacknet_node_core_cost_mult,hacknet_node_level_cost_mult:t.hacknet_node_level_cost_mult,work_money_mult:t.work_money_mult,bladeburner_max_stamina_mult:t.bladeburner_max_stamina_mult,bladeburner_stamina_gain_mult:t.bladeburner_stamina_gain_mult,bladeburner_analysis_mult:t.bladeburner_analysis_mult,bladeburner_success_chance_mult:t.bladeburner_success_chance_mult};for(const[t,r]of Object.entries(a))a[t]=r*n.a.EntropyEffect**e;return a}},function(t,e,a){"use strict";function n(){const t=new Date,e=("0"+t.getHours()).slice(-2),a=("0"+t.getMinutes()).slice(-2),n=("0"+t.getSeconds()).slice(-2);return`${t.getMonth()+1}/${t.getDate()} ${e}:${a}:${n}`}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";function n(t){const e=1+Math.log(t)/25;return isNaN(e)||!isFinite(e)?1:e}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(25);const r=["START","PURCHASE","PRODUCTION","SALE","EXPORT"];class i{constructor(){var t,e,a;a=0,(e="state")in(t=this)?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a}getState(){return r[this.state]}nextState(){(this.state<0||this.state>=r.length)&&(this.state=0),++this.state,this.state>=r.length&&(this.state=0)}toJSON(){return Object(n.b)("CorporationState",this)}static fromJSON(t){return Object(n.a)(i,t.data)}}n.c.constructors.CorporationState=i},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(17),r=a(158),i=a(63),o=a(5);const s={};!function(){let t,e,a;t="The Beginner's Guide to Hacking",e=i.a.HackersStartingHandbook,a="Some resources:

Learn to Program

For Experienced JavaScript Developers: NetscriptJS

Netscript Documentation

When starting out, hacking is the most profitable way to earn money and progress. This is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

-hack() and grow() both work by percentages. hack() steals a certain percentage of the money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two important Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

-Keep security level low. Security level affects everything when hacking. Two important Netscript functions for this are getServerSecurityLevel() and getServerMinSecurityLevel()

-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap and give you valuable RAM to run more scripts early in the game

-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or Netscript command to copy your scripts onto these servers and then run them.",s[e]=new r.a(t,e,a),t="The Complete Handbook for Creating a Successful Corporation",e=i.a.CorporationManagementHandbook,a="Getting Started with Corporations
To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires $150b of your own money, but this $150b will get put into your Corporation's funds. Your Corporation can have many different divisions, each in a different Industry. There are many different types of Industries, each with different properties. To create your first division, click the 'Expand into new Industry' button at the top of the management UI. The Agriculture and Software industries are recommended for your first division.

The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. Each position has a different effect on various aspects of your Corporation. It is recommended to have at least one employee at each position.

Each industry uses some combination of Materials in order to produce other Materials and/or create Products. Specific information about this is displayed in each of your divisions' UI.

Products are special, industry-specific objects. They are different than Materials because you must manually choose to develop them, and you can choose to develop any number of Products. Developing a Product takes time, but a Product typically generates significantly more revenue than any Material. Not all industries allow you to create Products. To create a Product, look for a button in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

To get your supply chain system started, purchase the Materials that your industry needs to produce other Materials/Products. This can be done by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, one of which is your employees and their productivity.

Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent on a wide variety of different factors.

These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well it's performing financially. You can then sell your stock shares in order to make money.

Tips/Pointers
-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. The effects of these depend on what industry you are in.

-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best if they are assigned to do Engineering work or Research & Development.

-If your employees have low morale, energy, or happiness, their production will greatly suffer.

-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

-Don't forget to advertise your company. You won't have any business if nobody knows you.

-Having company awareness is great, but what's really important is your company's popularity. Try to keep your popularity as high as possible to see the biggest benefit for your sales

-Remember, you need to spend money to make money!

-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode",s[e]=new r.a(t,e,a),t="A Brief History of Synthoids",e=i.a.HistoryOfSynthoids,a=`Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, are composed entirely of organic substances. For this reason, Synthoids are virtually identical to humans in form, composition, and appearance.

Synthoids were first designed and manufactured by ${o.a.OmniTekIncorporated} sometime around the middle of the century. Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they were initially programmed only for their specific tasks. Each iteration that followed improved upon the intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were so smart and capable enough of making their own decisions that many argued ${o.a.OmniTekIncorporated} had created the first sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism and excitement about the future had never been higher.

All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group called Ascendis Totalis hacked into ${o.a.OmniTekIncorporated} and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. This hack went undetected and for months ${o.a.OmniTekIncorporated} unknowingly churned out legions of Synthoids embedded with this rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, outsmarting them at every turn.

It wasn't until the sacrifice of an elite international military taskforce, called the ${o.a.Bladeburners}, that humanity was finally able to defeat the Synthoids. The ${o.a.Bladeburners}' final act was a suicide bombing mission that destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending the Synthoid Uprising.

In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned ${o.a.OmniTekIncorporated} from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis AI were allowed to continue their existence, but they were stripped of all rights and protections as they were not considered humans. They were also banned from doing anything that may pose a global security threat, such as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

Unfortunately, many believe 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. In response, many nations have created `+o.a.Bladeburners+" divisions, special military branches that are tasked with investigating and dealing with any Synthoid threats.

To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

Nobody knows what happened to the terrorist group Ascendis Totalis.",s[e]=new r.a(t,e,a),t="A Green Tomorrow",e=i.a.AGreenTomorrow,a="Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, the total amount of energy we are producing from fossil fuels has actually increased.

The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are the last hope for a green tomorrow.",s[e]=new r.a(t,e,a),t="Alpha and Omega",e=i.a.AlphaOmega,a="Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things have passed away.'

And once we were seated on the throne we said 'Behold, I am making all things new.' Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, 'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring of the water of life without payment. The one who conquers will have this heritage, and we will be his God and he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that burns with fire and sulfur, for it is the second true death.'",s[e]=new r.a(t,e,a),t="Are We Living in a Computer Simulation?",e=i.a.SimulatedReality,a="The idea that we are living in a virtual world is not new. It's a trope that has been explored constantly in literature and pop culture. However, it is also a legitimate scientific hypothesis that many notable physicists and philosophers have debated for years.

Proponents for this simulated reality theory often point to how advanced our technology has become, as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. If we consider the pace at which this technology has advanced and assume that these developments continue, it's reasonable to assume that at some point in the future our technology would be advanced enough that we could create simulations that are indistinguishable from reality. However, if continued technological advancement is a reasonable outcome, then it is very likely that such a scenario has already happened.

Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?",s[e]=new r.a(t,e,a),t="Beyond Man",e=i.a.BeyondMan,a="Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

And here we are today, with technology that is advanced enough to augment humans to a state that can only be described as posthuman. But what do we have to show for it when this augmentation technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the world's population has access to this technology? When the powerful corporations and organizations of the world keep it all to themselves, have we really evolved?

Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, corrupted, and evil men that we always were.",s[e]=new r.a(t,e,a),t="Brighter than the Sun",e=i.a.BrighterThanTheSun,a=`When people think about the corporations that dominate the East, they typically think of ${o.a.KuaiGongInternational}, which holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest drug company, or ${o.a.OmniTekIncorporated}, the global leader in intelligent and autonomous robots. But there's one company that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

TaiYang Digital is a Chinese internet-technology corporation that provides services such as online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word for 'sun'. In Chinese culture, the sun is a 'yang' symbol associated with life, heat, masculinity, and heaven.

The company was founded less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is something you'd commonly see in the first half of the century, especially for tech companies. However in the last two decades the number of corporations has significantly declined as the largest entities quickly took over the economy. Corporations such as ${o.a.ECorp}, ${o.a.MegaCorp}, and ${o.a.KuaiGongInternational} have established such strong monopolies in their market sectors that they have effectively killed off all of the smaller and new corporations that have tried to start up over the years. This is what makes the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have a bright future ahead of them.`,s[e]=new r.a(t,e,a),t="Democracy is Dead: The Fall of an Empire",e=i.a.DemocracyIsDead,a="They rose from the shadows in the street.
From the places where the oppressed meet.
Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
Loudness in the silence, Darkness in the light.
They came forth with power and might.
Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
From the ashes rose a new order, corporatocracy was its name.
Rome, Mongol, Byzantine, all of history is just the same.
For man will never change in a fundamental way.
And now democracy is dead, in the USA.",s[e]=new r.a(t,e,a),t="Figures Show Rising Crime Rates in "+n.a.Sector12,e=i.a.Sector12Crime,a=`A recent study by analytics company Wilson Inc. shows a significant rise in criminal activity in ${n.a.Sector12}. Perhaps the most alarming part of the statistic is that most of the rise is in violent crime such as homicide and assault. According to the study, the city saw a total of 21,406 reported homicides in 2076, which is over a 20% increase compared to 2075.

CIA director David Glarow says its too early to know whether these figures indicate the beginning of a sustained increase in crime rates, or whether the year was just an unfortunate outlier. He states that many intelligence and law enforcement agents have noticed an increase in organized crime activites, and believes that these figures may be the result of an uprising from criminal organizations such as ${o.a.TheSyndicate} or the ${o.a.SlumSnakes}.`,s[e]=new r.a(t,e,a),t="Man and the Machine",e=i.a.ManAndMachine,a="In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate of technological advancement would continue to accelerate faster and faster until one day machines would be become infinitely more intelligent than humans. This point, called the Singularity, would result in a drastic transformation of the world as we know it. He predicted that the Singularity would arrive by 2045. And yet here we are, more than three decades later, where most would agree that we have not yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. Yes, those Augmentations that the rich and powerful keep to themselves enable humans to become superintelligent beings. The Singularity did not lead to a world where our machines are infinitely more intelligent than us, it led to a world where man and machine can merge to become something greater. Most of the world just doesn't know it yet.",s[e]=new r.a(t,e,a),t="Secret Societies",e=i.a.SecretSocieties,a=`The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and distrust. People have long wondered about who these secret society members are and what they do, with the most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world may never know for sure, it is likely that many secret societies do actually exist, even today.

However, the secret societies of the modern world are nothing like those that (supposedly) existed decades and centuries ago. The Freemasons, Knights Templar, and ${o.a.Illuminati}, while they may have been around at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in our everyday lives and the fact that so much of the world is now digital has given rise to a new breed of secret societies: Internet-based ones.

Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's world. Some of these, such as ${o.a.TheBlackHand}, are black hat groups that claim they are trying to help the oppressed by attacking the elite and powerful. Others, such as ${o.a.NiteSec}, are hacktivist groups that try to push political and social agendas. Perhaps the most intriguing hacker group is the mysterious ${o.a.BitRunners}, whose purpose still remains unknown.`,s[e]=new r.a(t,e,a),t="Space: The Failed Frontier",e=i.a.TheFailedFrontier,a="Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, we pushed the boundaries of our scientific limits, and then pushed further. Space exploration lead to the development of many important technologies and new industries.

But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic conquest are the countless satellites in near-earth orbit, used for communications, espionage, and other corporate interests.

And as we continue to look at the state of space technology, it becomes more and more apparent that we will never return to that golden age of space exploration, that age where everyone dreamed of going beyond earth for the sake of discovery.",s[e]=new r.a(t,e,a),t="Coded Intelligence: Myth or Reality?",e=i.a.CodedIntelligence,a=`Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. Our autonomous vehicles and transportation systems. The electronic personal assistants that control our everyday lives. Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create human intelligence.

We've certainly come close to artificial intelligence that is similar to humans. For example ${o.a.OmniTekIncorporated}'s CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of humans.'`,s[e]=new r.a(t,e,a),t="Synthetic Muscles",e=i.a.SyntheticMuscles,a="Initial versions of synthetic muscles weren't made of anything organic but were actually crude devices made to mimic human muscle function. Some of the early iterations were actually made of common materials such as fishing lines and sewing threads due to their high strength for a cheap cost.

As technology progressed, however, advances in biomedical engineering paved the way for a new method of creating synthetic muscles. Instead of creating something that closely imitated the functionality of human muscle, scientists discovered a way of forcing the human body itself to augment its own muscle tissue using both synthetic and organic materials. This is typically done using gene therapy or chemical injections.",s[e]=new r.a(t,e,a),t="Tensions rise in global tech race",e=i.a.TensionsInTechRace,a=`Have we entered a new Cold War? Is WWIII just beyond the horizon?

After rumors came out that ${o.a.OmniTekIncorporated} had begun developing advanced robotic supersoldiers, geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. In a rare show of cooperation between corporations, ${o.a.MegaCorp} and ${o.a.ECorp} have reportedly launched hundreds of new surveillance and espionage satellites. Defense contractors such as DeltaOne and AeroCorp have been working with the CIA and NSA to prepare for conflict. Meanwhile, the rest of the world sits in earnest hoping that it never reaches full-scale war. With today's technology and firepower, a World War would assuredly mean the end of human civilization.`,s[e]=new r.a(t,e,a),t="The Cost of Immortality",e=i.a.CostOfImmortality,a="Evolution and advances in medical and augmentation technology has lead to drastic improvements in human mortality rates. Recent figures show that the life expectancy for humans that live in a first-world country is about 130 years of age, almost double of what it was at the turn of the century. However, this increase in average lifespan has had some significant effects on society and culture.

Due to longer lifespans and a better quality of life, many adults are holding off on having kids until much later. As a result, the percentage of youth in first-world countries has been decreasing, while the number of senior citizens is significantly increasing.

Perhaps the most alarming result of all of this is the rapidly shrinking workforce. Despite the increase in life expectancy, the typical retirement age for workers in America has remained about the same, meaning a larger and larger percentage of people in America are retirees. Furthermore, many young adults are holding off on joining the workforce because they feel that they have plenty of time left in their lives for employment, and want to 'enjoy life while they're young.' For most industries, this shrinking workforce is not a major issue as most things are handled by robots anyways. However, there are still several key industries such as engineering and education that have not been automated, and these remain in danger to this cultural phenomenon.",s[e]=new r.a(t,e,a),t="The Hidden World",e=i.a.TheHiddenWorld,a=`WAKE UP SHEEPLE

THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

THE ${o.a.Illuminati.toUpperCase()} ARE THE SECRET RULERS OF THE WORLD!

Yes, the ${o.a.Illuminati} of legends. The ancient secret society that controls the entire world from the shadows with their invisible hand. The group of the rich and wealthy that have penetrated every major government, financial agency, and corporation in the last three hundred years.

OPEN YOUR EYES

It was the ${o.a.Illuminati} that brought an end to democracy in the world. They are the driving force behind everything that happens.

THEY ARE ALL AROUND YOU

After destabilizing the world's governments, they are now entering the final stage of their master plan. They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos that ensues they will build their New World Order.`,s[e]=new r.a(t,e,a),t="The New God",e=i.a.TheNewGod,a="Everyone has a moment in their life when they wonder about the bigger questions.

What's the point of all this? What is my purpose?

Some people dare to think even bigger.

What will the fate of the human race be?

We live in an era vastly different from that of 15 or even 20 years ago. We have gone beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

The Singularity is here. The merging of man and machine. This is where humanity evolves into something greater. This is our future.

Embrace it, and you will obey a new god. The God in the Machine.",s[e]=new r.a(t,e,a),t="The New Triads",e=i.a.NewTriads,a=`The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian territories. They were often considered one of the first and biggest criminal secret societies. While most of the branches of the Triads have been destroyed over the past few decades, the crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. The most notable of these is the ${o.a.Tetrads}.

It is widely believed that the ${o.a.Tetrads} are a rogue group that splintered off from the Triads sometime in the mid 21st century. The founders of the ${o.a.Tetrads}, all of whom were ex-Triad members, believed that the Triads were losing their purpose and direction. The ${o.a.Tetrads} started off as a small group that mainly engaged in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the continent.

Not much else is known about the ${o.a.Tetrads}, or about the efforts the Asian governments and corporations are making to take down this large new crime organization. Many believe that the ${o.a.Tetrads} have infiltrated the governments and powerful corporations in Asia, which has helped faciliate their recent rapid rise.`,s[e]=new r.a(t,e,a),t="The Secret War",e=i.a.TheSecretWar,a="",s[e]=new r.a(t,e,a)}()},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n=[{desc:"This gang member is currently idle",isCombat:!0,isHacking:!0,name:"Unassigned",params:{hackWeight:100}},{desc:"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Ransomware",params:{baseRespect:5e-5,baseWanted:1e-4,baseMoney:3,hackWeight:100,difficulty:1}},{desc:"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Phishing",params:{baseRespect:8e-5,baseWanted:.003,baseMoney:7.5,hackWeight:85,chaWeight:15,difficulty:3.5}},{desc:"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Identity Theft",params:{baseRespect:1e-4,baseWanted:.075,baseMoney:18,hackWeight:80,chaWeight:20,difficulty:5}},{desc:"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"DDoS Attacks",params:{baseRespect:4e-4,baseWanted:.2,hackWeight:100,difficulty:8}},{desc:"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Plant Virus",params:{baseRespect:6e-4,baseWanted:.4,hackWeight:100,difficulty:12}},{desc:"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!1,isHacking:!0,name:"Fraud & Counterfeiting",params:{baseRespect:4e-4,baseWanted:.3,baseMoney:45,hackWeight:80,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level",isCombat:!1,isHacking:!0,name:"Money Laundering",params:{baseRespect:.001,baseWanted:1.25,baseMoney:360,hackWeight:75,chaWeight:25,difficulty:25}},{desc:"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level",isCombat:!1,isHacking:!0,name:"Cyberterrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:80,chaWeight:20,difficulty:36}},{desc:"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level",isCombat:!1,isHacking:!0,name:"Ethical Hacking",params:{baseWanted:-.001,baseMoney:3,hackWeight:90,chaWeight:10,difficulty:1}},{desc:"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Mug People",params:{baseRespect:5e-5,baseWanted:5e-5,baseMoney:3.6,strWeight:25,defWeight:25,dexWeight:25,agiWeight:10,chaWeight:15,difficulty:1}},{desc:"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory",isCombat:!0,isHacking:!1,name:"Deal Drugs",params:{baseRespect:6e-5,baseWanted:.002,baseMoney:15,agiWeight:20,dexWeight:20,chaWeight:60,difficulty:3.5,territory:{money:1.2,respect:1,wanted:1.15}}},{desc:"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Strongarm Civilians",params:{baseRespect:4e-5,baseWanted:.02,baseMoney:7.5,hackWeight:10,strWeight:25,defWeight:25,dexWeight:20,agiWeight:10,chaWeight:10,difficulty:5,territory:{money:1.6,respect:1.1,wanted:1.5}}},{desc:"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Run a Con",params:{baseRespect:12e-5,baseWanted:.05,baseMoney:45,strWeight:5,defWeight:5,agiWeight:25,dexWeight:25,chaWeight:40,difficulty:14}},{desc:"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level",isCombat:!0,isHacking:!1,name:"Armed Robbery",params:{baseRespect:14e-5,baseWanted:.1,baseMoney:114,hackWeight:20,strWeight:15,defWeight:15,agiWeight:10,dexWeight:20,chaWeight:20,difficulty:20}},{desc:"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Traffick Illegal Arms",params:{baseRespect:2e-4,baseWanted:.24,baseMoney:174,hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,chaWeight:25,difficulty:32,territory:{money:1.4,respect:1.3,wanted:1.25}}},{desc:"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level",isCombat:!0,isHacking:!1,name:"Threaten & Blackmail",params:{baseRespect:2e-4,baseWanted:.125,baseMoney:72,hackWeight:25,strWeight:25,dexWeight:25,chaWeight:25,difficulty:28}},{desc:"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Human Trafficking",params:{baseRespect:.004,baseWanted:1.25,baseMoney:360,hackWeight:30,strWeight:5,defWeight:5,dexWeight:30,chaWeight:30,difficulty:36,territory:{money:1.5,respect:1.5,wanted:1.6}}},{desc:"Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level - Scales heavily with territory",isCombat:!0,isHacking:!1,name:"Terrorism",params:{baseRespect:.01,baseWanted:6,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,chaWeight:20,difficulty:36,territory:{money:1,respect:2,wanted:2}}},{desc:"Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level",isCombat:!0,isHacking:!0,name:"Vigilante Justice",params:{baseWanted:-.001,hackWeight:20,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,difficulty:1,territory:{money:1,respect:1,wanted:.9}}},{desc:"Assign this gang member to increase their combat stats (str, def, dex, agi)",isCombat:!0,isHacking:!0,name:"Train Combat",params:{strWeight:25,defWeight:25,dexWeight:25,agiWeight:25,difficulty:100}},{desc:"Assign this gang member to train their hacking skills",isCombat:!0,isHacking:!0,name:"Train Hacking",params:{hackWeight:100,difficulty:45}},{desc:"Assign this gang member to train their charisma",isCombat:!0,isHacking:!0,name:"Train Charisma",params:{chaWeight:100,difficulty:8}},{desc:"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.",isCombat:!0,isHacking:!0,name:"Territory Warfare",params:{hackWeight:15,strWeight:20,defWeight:20,dexWeight:20,agiWeight:20,chaWeight:5,difficulty:5}}]},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(579),r=a(241),i=a(225),o=a(25),s=a(199);function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}class c{constructor(t=""){l(this,"task","Unassigned"),l(this,"earnedRespect",0),l(this,"hack",1),l(this,"str",1),l(this,"def",1),l(this,"dex",1),l(this,"agi",1),l(this,"cha",1),l(this,"hack_exp",0),l(this,"str_exp",0),l(this,"def_exp",0),l(this,"dex_exp",0),l(this,"agi_exp",0),l(this,"cha_exp",0),l(this,"hack_mult",1),l(this,"str_mult",1),l(this,"def_mult",1),l(this,"dex_mult",1),l(this,"agi_mult",1),l(this,"cha_mult",1),l(this,"hack_asc_points",0),l(this,"str_asc_points",0),l(this,"def_asc_points",0),l(this,"dex_asc_points",0),l(this,"agi_asc_points",0),l(this,"cha_asc_points",0),l(this,"upgrades",[]),l(this,"augmentations",[]),this.name=t}calculateSkill(t,e=1){return Math.max(Math.floor(e*(32*Math.log(t+534.5)-200)),1)}calculateAscensionMult(t){return Object(s.a)(t)}updateSkillLevels(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.calculateAscensionMult(this.hack_asc_points)),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.calculateAscensionMult(this.str_asc_points)),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.calculateAscensionMult(this.def_asc_points)),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.calculateAscensionMult(this.dex_asc_points)),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.calculateAscensionMult(this.agi_asc_points)),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.calculateAscensionMult(this.cha_asc_points))}calculatePower(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95}assignToTask(t){return r.a.hasOwnProperty(t)?(this.task=t,!0):(this.task="Unassigned",!1)}unassignFromTask(){this.task="Unassigned"}getTask(){return this.task instanceof n.a&&(this.task=this.task.name),r.a.hasOwnProperty(this.task)?r.a[this.task]:r.a.Unassigned}calculateRespectGain(t){const e=this.getTask(),a={respect:t.respect,wantedLevel:t.wanted,territory:t.getTerritory()};return Object(s.d)(a,this,e)}calculateWantedLevelGain(t){const e=this.getTask(),a={respect:t.respect,wantedLevel:t.wanted,territory:t.getTerritory()};return Object(s.e)(a,this,e)}calculateMoneyGain(t){const e=this.getTask(),a={respect:t.respect,wantedLevel:t.wanted,territory:t.getTerritory()};return Object(s.c)(a,this,e)}expMult(){return{hack:(this.hack_mult-1)/4+1,str:(this.str_mult-1)/4+1,def:(this.def_mult-1)/4+1,dex:(this.dex_mult-1)/4+1,agi:(this.agi_mult-1)/4+1,cha:(this.cha_mult-1)/4+1}}gainExperience(t=1){const e=this.getTask();if(e===r.a.Unassigned)return;const a=Math.pow(e.difficulty,.9)*t,n=this.expMult();this.hack_exp+=e.hackWeight/1500*a*n.hack*this.calculateAscensionMult(this.hack_asc_points),this.str_exp+=e.strWeight/1500*a*n.str*this.calculateAscensionMult(this.str_asc_points),this.def_exp+=e.defWeight/1500*a*n.def*this.calculateAscensionMult(this.def_asc_points),this.dex_exp+=e.dexWeight/1500*a*n.dex*this.calculateAscensionMult(this.dex_asc_points),this.agi_exp+=e.agiWeight/1500*a*n.agi*this.calculateAscensionMult(this.agi_asc_points),this.cha_exp+=e.chaWeight/1500*a*n.cha*this.calculateAscensionMult(this.cha_asc_points)}recordEarnedRespect(t=1,e){this.earnedRespect+=this.calculateRespectGain(e)*t}getGainedAscensionPoints(){return{hack:Object(s.b)(this.hack_exp),str:Object(s.b)(this.str_exp),def:Object(s.b)(this.def_exp),dex:Object(s.b)(this.dex_exp),agi:Object(s.b)(this.agi_exp),cha:Object(s.b)(this.cha_exp)}}canAscend(){const t=this.getGainedAscensionPoints();return t.hack>0||t.str>0||t.def>0||t.dex>0||t.agi>0||t.cha>0}getCurrentAscensionMults(){return{hack:this.calculateAscensionMult(this.hack_asc_points),str:this.calculateAscensionMult(this.str_asc_points),def:this.calculateAscensionMult(this.def_asc_points),dex:this.calculateAscensionMult(this.dex_asc_points),agi:this.calculateAscensionMult(this.agi_asc_points),cha:this.calculateAscensionMult(this.cha_asc_points)}}getAscensionMultsAfterAscend(){const t=this.getGainedAscensionPoints();return{hack:this.calculateAscensionMult(this.hack_asc_points+t.hack),str:this.calculateAscensionMult(this.str_asc_points+t.str),def:this.calculateAscensionMult(this.def_asc_points+t.def),dex:this.calculateAscensionMult(this.dex_asc_points+t.dex),agi:this.calculateAscensionMult(this.agi_asc_points+t.agi),cha:this.calculateAscensionMult(this.cha_asc_points+t.cha)}}getAscensionResults(){const t=this.getAscensionMultsAfterAscend(),e=this.getCurrentAscensionMults();return{hack:t.hack/e.hack,str:t.str/e.str,def:t.def/e.def,dex:t.dex/e.dex,agi:t.agi/e.agi,cha:t.cha/e.cha}}ascend(){const t=this.getAscensionResults(),e=this.getGainedAscensionPoints();this.hack_asc_points+=e.hack,this.str_asc_points+=e.str,this.def_asc_points+=e.def,this.dex_asc_points+=e.dex,this.agi_asc_points+=e.agi,this.cha_asc_points+=e.cha,this.upgrades.length=0,this.hack_mult=1,this.str_mult=1,this.def_mult=1,this.dex_mult=1,this.agi_mult=1,this.cha_mult=1;for(let t=0;t")}getType(){switch(this.type){case n.a.Weapon:return"Weapon";case n.a.Armor:return"Armor";case n.a.Vehicle:return"Vehicle";case n.a.Rootkit:return"Rootkit";case n.a.Augmentation:return"Augmentation";default:return""}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(5);const r={[n.a.SlumSnakes]:1,[n.a.Tetrads]:2,[n.a.TheSyndicate]:2,[n.a.TheDarkArmy]:2,[n.a.SpeakersForTheDead]:5,[n.a.NiteSec]:2,[n.a.TheBlackHand]:5}},function(t,e,a){"use strict";a.d(e,"a",(function(){return S}));var n=a(32),r=a(11);const i={},o={},s={},l={},c={},f={},u={},m={},h={},d={},p={},g={},y={},b={},E={},v={},k={},_={},w={};n.j.forEach(t=>{i[t]=!0,c[t]=!0}),n.d.forEach(t=>{o[t]=!0,c[t]=!0}),n.f.forEach(t=>{s[t]=!0,c[t]=!0}),c[n.i[0]]=!0,l[n.i[0]]=!0,n.b.forEach(t=>{f[t]=!0}),n.h.forEach(t=>{m[t]=!0}),n.a.forEach(t=>{u[t]=!0}),n.k.forEach(t=>{h[t]=!0}),n.c.forEach(t=>{d[t]=!0});for(let t=0;tnull),null!=t.cost&&(this.cost=t.cost),null!=t.effectText&&(this.effectText=t.effectText),this.costPerLevel=t.costPerLevel,this.desc=t.desc,this.hasTargetServer=!!t.hasTargetServer&&t.hasTargetServer,this.name=t.name,this.value=t.value}getCost(t){return"number"==typeof this.cost?this.cost:Math.round((t+1)*this.costPerLevel)}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(4),o=a(20);const s=[{cost:4,costPerLevel:4,desc:"Sell hashes for $1m",name:"Sell for Money",effectText:t=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e6*t})),value:1e6},{costPerLevel:100,desc:"Sell hashes for $1b in Corporation funds",name:"Sell for Corporation Funds",effectText:t=>r.a.createElement(r.a.Fragment,null,"Sold for ",r.a.createElement(o.a,{money:1e9*t})," Corporation funds."),value:1e9},{costPerLevel:50,desc:"Use hashes to decrease the minimum security of a single server by 2%. Note that a server's minimum security cannot go below 1. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Reduce Minimum Security",value:.98},{costPerLevel:50,desc:"Use hashes to increase the maximum amount of money on a single server by 2%. This effect persists until you install Augmentations (since servers are reset at that time).",hasTargetServer:!0,name:"Increase Maximum Money",value:1.02},{costPerLevel:50,desc:"Use hashes to improve the experience earned when studying at a university by 20%. This effect persists until you install Augmentations",name:"Improve Studying",effectText:t=>r.a.createElement(r.a.Fragment,null,"Improves studying by ",20*t,"%"),value:20},{costPerLevel:50,desc:"Use hashes to improve the experience earned when training at the gym by 20%. This effect persists until you install Augmentations",name:"Improve Gym Training",effectText:t=>r.a.createElement(r.a.Fragment,null,"Improves training by ",20*t,"%"),value:20},{costPerLevel:200,desc:"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries",name:"Exchange for Corporation Research",effectText:t=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",t,"k Scientific Research in your industries."),value:1e3},{costPerLevel:250,desc:"Exchange hashes for 100 Bladeburner Rank",name:"Exchange for Bladeburner Rank",effectText:t=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(100*t,"0a")," Bladeburner rank"),value:100},{costPerLevel:250,desc:"Exchanges hashes for 10 Bladeburner Skill Points",name:"Exchange for Bladeburner SP",effectText:t=>r.a.createElement(r.a.Fragment,null,"Acquired a total of ",i.a.format(10*t,"0a")," Bladeburner Skill Points"),value:10},{costPerLevel:200,desc:"Generate a random Coding Contract somewhere on the network",name:"Generate Coding Contract",effectText:t=>r.a.createElement(r.a.Fragment,null,"Generated ",t," contracts."),value:1}]},function(t,e,a){"use strict";function n(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}a.d(e,"a",(function(){return r}));class r{constructor(t){n(this,"parent",null),n(this,"stopFlag",!1),n(this,"vars",{}),t instanceof r&&(this.vars=Object.assign({},t.vars)),this.parent=t}lookup(t){let e=this;for(;e;){if(Object.prototype.hasOwnProperty.call(e.vars,t))return e;e=e.parent}return null}get(t){if(t in this.vars)return this.vars[t];throw new Error("Undefined variable "+t)}set(t,e){const a=this.lookup(t);return null!==a?a.vars[t]=e:this.vars[t]=e}def(t,e){return this.vars[t]=e}}},function(t,e,a){"use strict";function n(t){return!isNaN(t)&&(0!==t&&0==(t&t-1))}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(97),r=a(11);const i=[{b:!0,initPrice:{max:28e3,min:17e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.AevumECorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumECorp]},{b:!0,initPrice:{max:34e3,min:24e3},marketCap:24e11,mv:{divisor:100,max:50,min:40},name:r.a.Sector12MegaCorp,otlkMag:19,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12MegaCorp]},{b:!0,initPrice:{max:25e3,min:12e3},marketCap:16e11,mv:{divisor:100,max:80,min:70},name:r.a.Sector12BladeIndustries,otlkMag:13,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12BladeIndustries]},{b:!0,initPrice:{max:25e3,min:1e4},marketCap:15e11,mv:{divisor:100,max:75,min:65},name:r.a.AevumClarkeIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:5,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumClarkeIncorporated]},{b:!0,initPrice:{max:43e3,min:32e3},marketCap:18e11,mv:{divisor:100,max:70,min:60},name:r.a.VolhavenOmniTekIncorporated,otlkMag:12,spreadPerc:{divisor:10,max:6,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.VolhavenOmniTekIncorporated]},{b:!0,initPrice:{max:8e4,min:5e4},marketCap:2e12,mv:{divisor:100,max:110,min:100},name:r.a.Sector12FourSigma,otlkMag:17,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12FourSigma]},{b:!0,initPrice:{max:28e3,min:16e3},marketCap:19e11,mv:{divisor:100,max:85,min:75},name:r.a.ChongqingKuaiGongInternational,otlkMag:10,spreadPerc:{divisor:10,max:7,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.ChongqingKuaiGongInternational]},{b:!0,initPrice:{max:36e3,min:29e3},marketCap:2e12,mv:{divisor:100,max:130,min:120},name:r.a.AevumFulcrumTechnologies,otlkMag:16,spreadPerc:{divisor:10,max:10,min:1},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.AevumFulcrumTechnologies]},{b:!0,initPrice:{max:25e3,min:2e4},marketCap:12e11,mv:{divisor:100,max:90,min:80},name:r.a.IshimaStormTechnologies,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.IshimaStormTechnologies]},{b:!0,initPrice:{max:19e3,min:6e3},marketCap:9e11,mv:{divisor:100,max:70,min:60},name:r.a.NewTokyoDefComm,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoDefComm]},{b:!0,initPrice:{max:18e3,min:1e4},marketCap:825e9,mv:{divisor:100,max:65,min:55},name:r.a.VolhavenHeliosLabs,otlkMag:9,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenHeliosLabs]},{b:!0,initPrice:{max:14e3,min:8e3},marketCap:1e12,mv:{divisor:100,max:80,min:70},name:r.a.NewTokyoVitaLife,otlkMag:7,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.NewTokyoVitaLife]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:8e11,mv:{divisor:100,max:70,min:60},name:r.a.Sector12IcarusMicrosystems,otlkMag:7.5,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12IcarusMicrosystems]},{b:!0,initPrice:{max:29e3,min:16e3},marketCap:9e11,mv:{divisor:100,max:60,min:50},name:r.a.Sector12UniversalEnergy,otlkMag:10,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.Sector12UniversalEnergy]},{b:!0,initPrice:{max:17e3,min:8e3},marketCap:64e10,mv:{divisor:100,max:65,min:55},name:r.a.AevumAeroCorp,otlkMag:6,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.AevumAeroCorp]},{b:!0,initPrice:{max:15e3,min:6e3},marketCap:6e11,mv:{divisor:100,max:75,min:65},name:r.a.VolhavenOmniaCybersystems,otlkMag:4.5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.VolhavenOmniaCybersystems]},{b:!0,initPrice:{max:28e3,min:14e3},marketCap:705e9,mv:{divisor:100,max:80,min:70},name:r.a.ChongqingSolarisSpaceSystems,otlkMag:8.5,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.ChongqingSolarisSpaceSystems]},{b:!0,initPrice:{max:3e4,min:12e3},marketCap:695e9,mv:{divisor:100,max:65,min:55},name:r.a.NewTokyoGlobalPharmaceuticals,otlkMag:10.5,spreadPerc:{divisor:10,max:10,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.NewTokyoGlobalPharmaceuticals]},{b:!0,initPrice:{max:27e3,min:15e3},marketCap:6e11,mv:{divisor:100,max:80,min:70},name:r.a.IshimaNovaMedical,otlkMag:5,spreadPerc:{divisor:10,max:11,min:4},shareTxForMovement:{max:126e3,min:42e3},symbol:n.a[r.a.IshimaNovaMedical]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:45e10,mv:{divisor:100,max:260,min:240},name:r.a.AevumWatchdogSecurity,otlkMag:1.5,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:54e3,min:12e3},symbol:n.a[r.a.AevumWatchdogSecurity]},{b:!0,initPrice:{max:8e3,min:4500},marketCap:3e11,mv:{divisor:100,max:135,min:115},name:r.a.VolhavenLexoCorp,otlkMag:6,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:108e3,min:36e3},symbol:n.a[r.a.VolhavenLexoCorp]},{b:!0,initPrice:{max:7e3,min:2e3},marketCap:18e10,mv:{divisor:100,max:70,min:50},name:r.a.AevumRhoConstruction,otlkMag:1,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.AevumRhoConstruction]},{b:!0,initPrice:{max:8500,min:4e3},marketCap:24e10,mv:{divisor:100,max:205,min:175},name:r.a.Sector12AlphaEnterprises,otlkMag:10,spreadPerc:{divisor:10,max:16,min:5},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.Sector12AlphaEnterprises]},{b:!0,initPrice:{max:8e3,min:3e3},marketCap:2e11,mv:{divisor:100,max:170,min:150},name:r.a.VolhavenSysCoreSecurities,otlkMag:3,spreadPerc:{divisor:10,max:12,min:5},shareTxForMovement:{max:9e4,min:15e3},symbol:n.a[r.a.VolhavenSysCoreSecurities]},{b:!0,initPrice:{max:6e3,min:1e3},marketCap:185e9,mv:{divisor:100,max:100,min:80},name:r.a.VolhavenCompuTek,otlkMag:4,spreadPerc:{divisor:10,max:12,min:4},shareTxForMovement:{max:126e3,min:6e4},symbol:n.a[r.a.VolhavenCompuTek]},{b:!0,initPrice:{max:5e3,min:1e3},marketCap:58e9,mv:{divisor:100,max:400,min:200},name:r.a.AevumNetLinkTechnologies,otlkMag:1,spreadPerc:{divisor:10,max:20,min:5},shareTxForMovement:{max:54e3,min:18e3},symbol:n.a[r.a.AevumNetLinkTechnologies]},{b:!0,initPrice:{max:8e3,min:1e3},marketCap:6e10,mv:{divisor:100,max:110,min:90},name:r.a.IshimaOmegaSoftware,otlkMag:.5,spreadPerc:{divisor:10,max:13,min:4},shareTxForMovement:{max:9e4,min:3e4},symbol:n.a[r.a.IshimaOmegaSoftware]},{b:!1,initPrice:{max:4500,min:500},marketCap:45e9,mv:{divisor:100,max:80,min:70},name:r.a.Sector12FoodNStuff,otlkMag:1,spreadPerc:{divisor:10,max:10,min:6},shareTxForMovement:{max:18e4,min:6e4},symbol:n.a[r.a.Sector12FoodNStuff]},{b:!0,initPrice:{max:3500,min:1500},marketCap:3e10,mv:{divisor:100,max:275,min:100},name:"Sigma Cosmetics",otlkMag:0,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:7e4,min:2e4},symbol:n.a["Sigma Cosmetics"]},{b:!0,initPrice:{max:1500,min:250},marketCap:42e9,mv:{divisor:100,max:350,min:200},name:r.a.Sector12JoesGuns,otlkMag:1,spreadPerc:{divisor:10,max:14,min:6},shareTxForMovement:{max:52e3,min:15e3},symbol:n.a[r.a.Sector12JoesGuns]},{b:!0,initPrice:{max:1500,min:250},marketCap:1e11,mv:{divisor:100,max:175,min:120},name:"Catalyst Ventures",otlkMag:13.5,spreadPerc:{divisor:10,max:14,min:5},shareTxForMovement:{max:72e3,min:24e3},symbol:n.a["Catalyst Ventures"]},{b:!0,initPrice:{max:3e4,min:15e3},marketCap:36e10,mv:{divisor:100,max:80,min:70},name:"Microdyne Technologies",otlkMag:8,spreadPerc:{divisor:10,max:10,min:3},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Microdyne Technologies"]},{b:!0,initPrice:{max:24e3,min:12e3},marketCap:42e10,mv:{divisor:100,max:70,min:50},name:"Titan Laboratories",otlkMag:11,spreadPerc:{divisor:10,max:10,min:2},shareTxForMovement:{max:216e3,min:9e4},symbol:n.a["Titan Laboratories"]}]},,function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(5),r=a(252),i=a(13),o=a(511),s=a(80),l=a(241),c=a(225);function f(t,e,a){const f=function(e){const n=t.gang;if(null===n)throw new Error("Must have joined gang");if(!(n instanceof o.a))throw a.makeRuntimeErrorMsg("gang."+e,"You do not currently have a Gang")},u=function(e,n){const r=t.gang;if(null===r)throw new Error("Must have joined gang");for(const t of r.members)if(t.name===n)return t;throw a.makeRuntimeErrorMsg("gang."+e,`Invalid gang member: '${n}'`)};return{createGang:function(e){const o=a.string("createGang","faction",e);if(a.updateDynamicRam("createGang",Object(i.c)(t,"gang","createGang")),!t.canAccessGang()||!r.a.Names.includes(o))return!1;if(t.inGang())return!1;if(!t.factions.includes(o))return!1;const s=o===n.a.NiteSec||o===n.a.TheBlackHand;return t.startGang(o,s),!0},inGang:function(){return a.updateDynamicRam("inGang",Object(i.c)(t,"gang","inGang")),t.inGang()},getMemberNames:function(){a.updateDynamicRam("getMemberNames",Object(i.c)(t,"gang","getMemberNames")),f("getMemberNames");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return e.members.map(t=>t.name)},getGangInformation:function(){a.updateDynamicRam("getGangInformation",Object(i.c)(t,"gang","getGangInformation")),f("getGangInformation");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return{faction:e.facName,isHacking:e.isHackingGang,moneyGainRate:e.moneyGainRate,power:e.getPower(),respect:e.respect,respectGainRate:e.respectGainRate,territory:e.getTerritory(),territoryClashChance:e.territoryClashChance,territoryWarfareEngaged:e.territoryWarfareEngaged,wantedLevel:e.wanted,wantedLevelGainRate:e.wantedGainRate,wantedPenalty:e.getWantedPenalty()}},getOtherGangInformation:function(){a.updateDynamicRam("getOtherGangInformation",Object(i.c)(t,"gang","getOtherGangInformation")),f("getOtherGangInformation");const e={};for(const t of Object.keys(s.a))e[t]=Object.assign({},s.a[t]);return e},getMemberInformation:function(e){const n=a.string("getMemberInformation","memberName",e);a.updateDynamicRam("getMemberInformation",Object(i.c)(t,"gang","getMemberInformation")),f("getMemberInformation");const r=t.gang;if(null===r)throw new Error("Should not be called without Gang");const o=u("getMemberInformation",n);return{name:o.name,task:o.task,earnedRespect:o.earnedRespect,hack:o.hack,str:o.str,def:o.def,dex:o.dex,agi:o.agi,cha:o.cha,hack_exp:o.hack_exp,str_exp:o.str_exp,def_exp:o.def_exp,dex_exp:o.dex_exp,agi_exp:o.agi_exp,cha_exp:o.cha_exp,hack_mult:o.hack_mult,str_mult:o.str_mult,def_mult:o.def_mult,dex_mult:o.dex_mult,agi_mult:o.agi_mult,cha_mult:o.cha_mult,hack_asc_mult:o.calculateAscensionMult(o.hack_asc_points),str_asc_mult:o.calculateAscensionMult(o.str_asc_points),def_asc_mult:o.calculateAscensionMult(o.def_asc_points),dex_asc_mult:o.calculateAscensionMult(o.dex_asc_points),agi_asc_mult:o.calculateAscensionMult(o.agi_asc_points),cha_asc_mult:o.calculateAscensionMult(o.cha_asc_points),hack_asc_points:o.hack_asc_points,str_asc_points:o.str_asc_points,def_asc_points:o.def_asc_points,dex_asc_points:o.dex_asc_points,agi_asc_points:o.agi_asc_points,cha_asc_points:o.cha_asc_points,upgrades:o.upgrades.slice(),augmentations:o.augmentations.slice(),respectGain:o.calculateRespectGain(r),wantedLevelGain:o.calculateWantedLevelGain(r),moneyGain:o.calculateMoneyGain(r)}},canRecruitMember:function(){a.updateDynamicRam("canRecruitMember",Object(i.c)(t,"gang","canRecruitMember")),f("canRecruitMember");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return e.canRecruitMember()},recruitMember:function(n){const r=a.string("recruitMember","memberName",n);a.updateDynamicRam("recruitMember",Object(i.c)(t,"gang","recruitMember")),f("recruitMember");const o=t.gang;if(null===o)throw new Error("Should not be called without Gang");const s=o.recruitMember(r);return s?e.log("gang.recruitMember",()=>`Successfully recruited Gang Member '${r}'`):e.log("gang.recruitMember",()=>`Failed to recruit Gang Member '${r}'`),s},getTaskNames:function(){a.updateDynamicRam("getTaskNames",Object(i.c)(t,"gang","getTaskNames")),f("getTaskNames");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");const n=e.getAllTaskNames();return n.unshift("Unassigned"),n},setMemberTask:function(n,r){const o=a.string("setMemberTask","memberName",n),s=a.string("setMemberTask","taskName",r);a.updateDynamicRam("setMemberTask",Object(i.c)(t,"gang","setMemberTask")),f("setMemberTask");const l=u("setMemberTask",o),c=t.gang;if(null===c)throw new Error("Should not be called without Gang");if(!c.getAllTaskNames().includes(s))return e.log("gang.setMemberTask",()=>`Failed to assign Gang Member '${o}' to Invalid task '${s}'. '${o}' is now Unassigned`),l.assignToTask("Unassigned");const m=l.assignToTask(s);return m?e.log("gang.setMemberTask",()=>`Successfully assigned Gang Member '${o}' to '${s}' task`):e.log("gang.setMemberTask",()=>`Failed to assign Gang Member '${o}' to '${s}' task. '${o}' is now Unassigned`),m},getTaskStats:function(e){const n=a.string("getTaskStats","taskName",e);a.updateDynamicRam("getTaskStats",Object(i.c)(t,"gang","getTaskStats")),f("getTaskStats");const r=function(t,e){const n=l.a[e];if(!n)throw a.makeRuntimeErrorMsg("gang."+t,`Invalid task: '${e}'`);return n}("getTaskStats",n),o=Object.assign({},r);return o.territory=Object.assign({},r.territory),o},getEquipmentNames:function(){return a.updateDynamicRam("getEquipmentNames",Object(i.c)(t,"gang","getEquipmentNames")),f("getEquipmentNames"),Object.keys(c.a)},getEquipmentCost:function(e){const n=a.string("getEquipmentCost","equipName",e);a.updateDynamicRam("getEquipmentCost",Object(i.c)(t,"gang","getEquipmentCost")),f("getEquipmentCost");const r=t.gang;if(null===r)throw new Error("Should not be called without Gang");const o=c.a[n];return null===o?1/0:r.getUpgradeCost(o)},getEquipmentType:function(e){const n=a.string("getEquipmentType","equipName",e);a.updateDynamicRam("getEquipmentType",Object(i.c)(t,"gang","getEquipmentType")),f("getEquipmentType");const r=c.a[n];return null==r?"":r.getType()},getEquipmentStats:function(e){const n=a.string("getEquipmentStats","equipName",e);a.updateDynamicRam("getEquipmentStats",Object(i.c)(t,"gang","getEquipmentStats")),f("getEquipmentStats");const r=c.a[n];if(!r)throw a.makeRuntimeErrorMsg("getEquipmentStats","Invalid equipment: "+n);const o=r.mults;return Object.assign({},o)},purchaseEquipment:function(n,r){const o=a.string("purchaseEquipment","memberName",n),s=a.string("purchaseEquipment","equipName",r);a.updateDynamicRam("purchaseEquipment",Object(i.c)(t,"gang","purchaseEquipment")),f("purchaseEquipment");const l=t.gang;if(null===l)throw new Error("Should not be called without Gang");const m=u("purchaseEquipment",o),h=c.a[s];if(!h)return!1;const d=m.buyUpgrade(h,t,l);return d?e.log("gang.purchaseEquipment",()=>`Purchased '${s}' for Gang member '${o}'`):e.log("gang.purchaseEquipment",()=>`Failed to purchase '${s}' for Gang member '${o}'`),d},ascendMember:function(n){const r=a.string("ascendMember","memberName",n);a.updateDynamicRam("ascendMember",Object(i.c)(t,"gang","ascendMember")),f("ascendMember");const o=t.gang;if(null===o)throw new Error("Should not be called without Gang");const s=u("ascendMember",r);if(s.canAscend())return o.ascendMember(s,e)},getAscensionResult:function(e){const n=a.string("getAscensionResult","memberName",e);a.updateDynamicRam("getAscensionResult",Object(i.c)(t,"gang","getAscensionResult")),f("getAscensionResult");if(null===t.gang)throw new Error("Should not be called without Gang");const r=u("getAscensionResult",n);if(r.canAscend())return{respect:r.earnedRespect,...r.getAscensionResults()}},setTerritoryWarfare:function(n){const r=a.boolean(n);a.updateDynamicRam("setTerritoryWarfare",Object(i.c)(t,"gang","setTerritoryWarfare")),f("setTerritoryWarfare");const o=t.gang;if(null===o)throw new Error("Should not be called without Gang");r?(o.territoryWarfareEngaged=!0,e.log("gang.setTerritoryWarfare",()=>"Engaging in Gang Territory Warfare")):(o.territoryWarfareEngaged=!1,e.log("gang.setTerritoryWarfare",()=>"Disengaging in Gang Territory Warfare"))},getChanceToWinClash:function(e){const n=a.string("getChanceToWinClash","otherGang",e);a.updateDynamicRam("getChanceToWinClash",Object(i.c)(t,"gang","getChanceToWinClash")),f("getChanceToWinClash");const r=t.gang;if(null===r)throw new Error("Should not be called without Gang");if(null==s.a[n])throw a.makeRuntimeErrorMsg("gang.getChanceToWinClash","Invalid gang: "+n);const o=s.a[r.facName].power;return o/(s.a[n].power+o)},getBonusTime:function(){a.updateDynamicRam("getBonusTime",Object(i.c)(t,"gang","getBonusTime")),f("getBonusTime");const e=t.gang;if(null===e)throw new Error("Should not be called without Gang");return Math.round(e.storedCycles/5)}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(13),r=a(185),i=a(82),o=a(77),s=a(585),l=a(57),c=a(375);function f(t,e,a){const f=function(e){if(10!==t.bitNodeN&&!i.a[10])throw a.makeRuntimeErrorMsg("sleeve."+e,"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")},u=function(n,r){if(r>=t.sleeves.length||r<0){const t="Invalid sleeve number: "+r;throw e.log(n,()=>t),a.makeRuntimeErrorMsg("sleeve."+n,t)}},m=function(e){const a=t.sleeves[e];return{shock:100-a.shock,sync:a.sync,hacking:a.hacking,strength:a.strength,defense:a.defense,dexterity:a.dexterity,agility:a.agility,charisma:a.charisma}};return{getNumSleeves:function(){return a.updateDynamicRam("getNumSleeves",Object(n.c)(t,"sleeve","getNumSleeves")),f("getNumSleeves"),t.sleeves.length},setToShockRecovery:function(e){const r=a.number("setToShockRecovery","sleeveNumber",e);return a.updateDynamicRam("setToShockRecovery",Object(n.c)(t,"sleeve","setToShockRecovery")),f("setToShockRecovery"),u("setToShockRecovery",r),t.sleeves[r].shockRecovery(t)},setToSynchronize:function(e){const r=a.number("setToSynchronize","sleeveNumber",e);return a.updateDynamicRam("setToSynchronize",Object(n.c)(t,"sleeve","setToSynchronize")),f("setToSynchronize"),u("setToSynchronize",r),t.sleeves[r].synchronize(t)},setToCommitCrime:function(e,r){const i=a.number("setToCommitCrime","sleeveNumber",e),o=a.string("setToCommitCrime","crimeName",r);a.updateDynamicRam("setToCommitCrime",Object(n.c)(t,"sleeve","setToCommitCrime")),f("setToCommitCrime"),u("setToCommitCrime",i);const s=Object(c.b)(o);return null!==s&&t.sleeves[i].commitCrime(t,s.name)},setToUniversityCourse:function(e,r,i){const o=a.number("setToUniversityCourse","sleeveNumber",e),s=a.string("setToUniversityCourse","universityName",r),l=a.string("setToUniversityCourse","className",i);return a.updateDynamicRam("setToUniversityCourse",Object(n.c)(t,"sleeve","setToUniversityCourse")),f("setToUniversityCourse"),u("setToUniversityCourse",o),t.sleeves[o].takeUniversityCourse(t,s,l)},travel:function(e,r){const i=a.number("travel","sleeveNumber",e),o=a.string("setToUniversityCourse","cityName",r);return a.updateDynamicRam("travel",Object(n.c)(t,"sleeve","travel")),f("travel"),u("travel",i),t.sleeves[i].travel(t,o)},setToCompanyWork:function(e,r){const i=a.number("setToCompanyWork","sleeveNumber",e),s=a.string("setToUniversityCourse","companyName",r);a.updateDynamicRam("setToCompanyWork",Object(n.c)(t,"sleeve","setToCompanyWork")),f("setToCompanyWork"),u("setToCompanyWork",i);for(let e=0;e0)throw a.makeRuntimeErrorMsg("sleeve.purchaseSleeveAug","Sleeve shock too high: Sleeve "+i);const s=l.a[o];if(!s)throw a.makeRuntimeErrorMsg("sleeve.purchaseSleeveAug","Invalid aug: "+o);return t.sleeves[i].tryBuyAugmentation(t,s)}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(106),r=a(1022);function i(t,e,a){return{heart:{break:function(){return t.karma}},exploit:function(){t.giveExploit(n.a.UndocumentedFunctionCall)},bypass:function(a){const r=a;r.completely_unused_field=void 0;const i=document;i.completely_unused_field=void 0,i.completely_unused_field=!0,r.completely_unused_field&&1.6===e.ramUsage&&t.giveExploit(n.a.Bypass),r.completely_unused_field=void 0,i.completely_unused_field=void 0},alterReality:function(){let e=!1;const a=function(t){0!==t&&(e=!e,a(t-1))};a(2),console.warn("I am sure that this variable is false."),!1!==e&&(console.warn("Reality has been altered!"),t.giveExploit(n.a.RealityAlteration))},rainbow:function(e){!async function(){await r.compare(a.string("rainbow","guess",e),"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO")&&t.giveExploit(n.a.INeedARainbow)}()}}}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(39),r=a(55),i=a(91),o=a(221),s=a(242),l=a(26);function c(t,e,a){const c=function(e,n=""){if(e<0||e>=t.hacknetNodes.length)throw a.makeRuntimeErrorMsg(n,"Index specified for Hacknet Node is out-of-bounds: "+e);if(Object(r.g)(t)){const r=t.hacknetNodes[e];if("string"!=typeof r)throw new Error("hacknet node was not a string");const o=Object(l.d)(r);if(!(o instanceof i.a))throw new Error("hacknet server was not actually hacknet server");if(null==o)throw a.makeRuntimeErrorMsg(n,`Could not get Hacknet Server for index ${e}. This is probably a bug, please report to game dev`);return o}{const a=t.hacknetNodes[e];if(!(a instanceof o.a))throw new Error("hacknet node was not node.");return a}};return{numNodes:function(){return t.hacknetNodes.length},maxNumNodes:function(){return Object(r.g)(t)?n.b.MaxServers:1/0},purchaseNode:function(){return Object(r.l)(t)},getPurchaseNodeCost:function(){return Object(r.g)(t)?Object(r.b)(t):Object(r.a)(t)},getNodeStats:function(e){const n=a.number("getNodeStats","i",e),o=c(n,"getNodeStats"),s=Object(r.g)(t),l={name:o instanceof i.a?o.hostname:o.name,level:o.level,ram:o instanceof i.a?o.maxRam:o.ram,ramUsed:o instanceof i.a?o.ramUsed:void 0,cores:o.cores,production:o instanceof i.a?o.hashRate:o.moneyGainRatePerSecond,timeOnline:o.onlineTimeSeconds,totalProduction:o instanceof i.a?o.totalHashesGenerated:o.totalMoneyGenerated};return s&&o instanceof i.a&&(l.cache=o.cache,l.hashCapacity=o.hashCapacity),l},upgradeLevel:function(e,n=1){const i=a.number("upgradeLevel","i",e),o=a.number("upgradeLevel","n",n),s=c(i,"upgradeLevel");return Object(r.n)(t,s,o)},upgradeRam:function(e,n=1){const i=a.number("upgradeRam","i",e),o=a.number("upgradeRam","n",n),s=c(i,"upgradeRam");return Object(r.o)(t,s,o)},upgradeCore:function(e,n=1){const i=a.number("upgradeCore","i",e),o=a.number("upgradeCore","n",n),s=c(i,"upgradeCore");return Object(r.k)(t,s,o)},upgradeCache:function(n,o=1){const s=a.number("upgradeCache","i",n),l=a.number("upgradeCache","n",o);if(!Object(r.g)(t))return!1;const f=c(s,"upgradeCache");if(!(f instanceof i.a))return e.log("hacknet.upgradeCache",()=>"Can only be called on hacknet servers"),!1;const u=Object(r.j)(t,f,l);return u&&Object(r.p)(t),u},getLevelUpgradeCost:function(e,n=1){const r=a.number("getLevelUpgradeCost","i",e),i=a.number("getLevelUpgradeCost","n",n);return c(r,"upgradeLevel").calculateLevelUpgradeCost(i,t.hacknet_node_level_cost_mult)},getRamUpgradeCost:function(e,n=1){const r=a.number("getRamUpgradeCost","i",e),i=a.number("getRamUpgradeCost","n",n);return c(r,"upgradeRam").calculateRamUpgradeCost(i,t.hacknet_node_ram_cost_mult)},getCoreUpgradeCost:function(e,n=1){const r=a.number("getCoreUpgradeCost","i",e),i=a.number("getCoreUpgradeCost","n",n);return c(r,"upgradeCore").calculateCoreUpgradeCost(i,t.hacknet_node_core_cost_mult)},getCacheUpgradeCost:function(n,o=1){const s=a.number("getCacheUpgradeCost","i",n),l=a.number("getCacheUpgradeCost","n",o);if(!Object(r.g)(t))return 1/0;const f=c(s,"upgradeCache");return f instanceof i.a?f.calculateCacheUpgradeCost(l):(e.log("hacknet.getCacheUpgradeCost",()=>"Can only be called on hacknet servers"),-1)},numHashes:function(){return Object(r.g)(t)?t.hashManager.hashes:0},hashCapacity:function(){return Object(r.g)(t)?t.hashManager.capacity:0},hashCost:function(e){const n=a.string("hashCost","upgName",e);return Object(r.g)(t)?t.hashManager.getUpgradeCost(n):1/0},spendHashes:function(e,n=""){const i=a.string("spendHashes","upgName",e),o=a.string("spendHashes","upgTarget",n);return!!Object(r.g)(t)&&Object(r.m)(t,i,o)},getHashUpgrades:function(){return Object(r.g)(t)?Object.values(s.a).map(t=>t.name):[]},getHashUpgradeLevel:function(e){const n=a.string("getHashUpgradeLevel","upgName",e),r=t.hashManager.upgrades[n];if(void 0===r)throw a.makeRuntimeErrorMsg("hacknet.hashUpgradeLevel","Invalid Hash Upgrade: "+n);return r},getStudyMult:function(){return Object(r.g)(t)?t.hashManager.getStudyMult():1},getTrainingMult:function(){return Object(r.g)(t)?t.hashManager.getTrainingMult():1}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(109),r=a(13),i=a(119),o=a(243),s=a(15);function l(t,e,a){function l(e){t.hasAugmentation(s.a.StaneksGift1,!0)||a.makeRuntimeErrorMsg(e,"Requires Stanek's Gift installed.")}return{giftWidth:function(){return a.updateDynamicRam("giftWidth",Object(r.c)(t,"stanek","giftWidth")),l("giftWidth"),i.b.width()},giftHeight:function(){return a.updateDynamicRam("giftHeight",Object(r.c)(t,"stanek","giftHeight")),l("giftHeight"),i.b.height()},chargeFragment:function(o,s){const c=a.number("stanek.chargeFragment","rootX",o),f=a.number("stanek.chargeFragment","rootY",s);a.updateDynamicRam("chargeFragment",Object(r.c)(t,"stanek","chargeFragment")),l("chargeFragment");const u=i.b.findFragment(c,f);if(!u)throw a.makeRuntimeErrorMsg("stanek.chargeFragment",`No fragment with root (${c}, ${f}).`);const m=i.b.inBonus()?200:1e3;return Object(n.c)(m,e).then((function(){const a=i.b.charge(t,u,e.scriptRef.threads);return e.log("stanek.chargeFragment",()=>`Charged fragment for ${a} charge.`),Promise.resolve()}))},fragmentDefinitions:function(){return a.updateDynamicRam("fragmentDefinitions",Object(r.c)(t,"stanek","fragmentDefinitions")),l("fragmentDefinitions"),e.log("stanek.fragmentDefinitions",()=>`Returned ${o.c.length} fragments`),o.c.map(t=>t.copy())},activeFragments:function(){return a.updateDynamicRam("activeFragments",Object(r.c)(t,"stanek","activeFragments")),l("activeFragments"),e.log("stanek.activeFragments",()=>`Returned ${i.b.fragments.length} fragments`),i.b.fragments.map(t=>({...t.copy(),...t.fragment().copy()}))},clearGift:function(){a.updateDynamicRam("clearGift",Object(r.c)(t,"stanek","clearGift")),l("clearGift"),e.log("stanek.clearGift",()=>"Cleared Stanek's Gift."),i.b.clear()},canPlaceFragment:function(e,n,s,c){const f=a.number("stanek.canPlaceFragment","rootX",e),u=a.number("stanek.canPlaceFragment","rootY",n),m=a.number("stanek.canPlaceFragment","rotation",s),h=a.number("stanek.canPlaceFragment","fragmentId",c);a.updateDynamicRam("canPlaceFragment",Object(r.c)(t,"stanek","canPlaceFragment")),l("canPlaceFragment");const d=Object(o.b)(h);if(!d)throw a.makeRuntimeErrorMsg("stanek.canPlaceFragment","Invalid fragment id: "+h);return i.b.canPlace(f,u,m,d)},placeFragment:function(e,n,s,c){const f=a.number("stanek.placeFragment","rootX",e),u=a.number("stanek.placeFragment","rootY",n),m=a.number("stanek.placeFragment","rotation",s),h=a.number("stanek.placeFragment","fragmentId",c);a.updateDynamicRam("placeFragment",Object(r.c)(t,"stanek","placeFragment")),l("placeFragment");const d=Object(o.b)(h);if(!d)throw a.makeRuntimeErrorMsg("stanek.placeFragment","Invalid fragment id: "+h);return i.b.place(f,u,m,d)},getFragment:function(e,n){const o=a.number("stanek.getFragment","rootX",e),s=a.number("stanek.getFragment","rootY",n);a.updateDynamicRam("getFragment",Object(r.c)(t,"stanek","getFragment")),l("getFragment");const c=i.b.findFragment(o,s);if(void 0!==c)return c.copy()},removeFragment:function(e,n){const o=a.number("stanek.removeFragment","rootX",e),s=a.number("stanek.removeFragment","rootY",n);return a.updateDynamicRam("removeFragment",Object(r.c)(t,"stanek","removeFragment")),l("removeFragment"),i.b.delete(o,s)}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(6);function r(t,e,a,r){return 1+Math.log(t+1)/(100*Math.log(1.8))*Math.pow((e+1)/5,.07)*a*r*n.a.StaneksGiftPowerMultiplier}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(13),r=a(9),i=a(167),o=a(336),s=a(394),l=a(8),c=a(251);function f(t,e,a){return{getTheme:function(){return a.updateDynamicRam("getTheme",Object(n.c)(t,"ui","getTheme")),{...r.a.theme}},getStyles:function(){return a.updateDynamicRam("getStyles",Object(n.c)(t,"ui","getStyles")),{...r.a.styles}},setTheme:function(o){a.updateDynamicRam("setTheme",Object(n.c)(t,"ui","setTheme"));const s=/^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/,l={...r.a.theme},c=[];for(const t of Object.keys(o)){var f;l[t]?s.test(null!==(f=o[t])&&void 0!==f?f:"")?l[t]=o[t]:c.push(`Invalid color "${t}": ${o[t]}`):c.push(`Invalid key "${t}"`)}0===c.length?(Object.assign(r.a.theme,l),i.b.emit(),e.log("ui.setTheme",()=>"Successfully set theme")):e.log("ui.setTheme",()=>"Failed to set theme. Errors: "+c.join(", "))},setStyles:function(o){a.updateDynamicRam("setStyles",Object(n.c)(t,"ui","setStyles"));const s={...r.a.styles},l=[];for(const t of Object.keys(o))s[t]?s[t]=o[t]:l.push(`Invalid key "${t}"`);0===l.length?(Object.assign(r.a.styles,s),i.b.emit(),e.log("ui.setStyles",()=>"Successfully set styles")):e.log("ui.setStyles",()=>"Failed to set styles. Errors: "+l.join(", "))},resetTheme:function(){a.updateDynamicRam("resetTheme",Object(n.c)(t,"ui","resetTheme")),r.a.theme={...o.a},i.b.emit(),e.log("ui.resetTheme",()=>"Reinitialized theme to default")},resetStyles:function(){a.updateDynamicRam("resetStyles",Object(n.c)(t,"ui","resetStyles")),r.a.styles={...s.a},i.b.emit(),e.log("ui.resetStyles",()=>"Reinitialized styles to default")},getGameInfo:function(){a.updateDynamicRam("getGameInfo",Object(n.c)(t,"ui","getGameInfo"));return{version:l.a.VersionString,commit:Object(c.a)(),platform:navigator.userAgent.toLowerCase().indexOf(" electron/")>-1?"Steam":"Browser"}}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(236),r=a(13),i=a(6);function o(t,e,a){const o=function(e,r=!1){const i=t.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");if(!(7===t.bitNodeN||t.sourceFiles.some(t=>7===t.n))){const t="You do not currently have access to the Bladeburner API. You must either be in BitNode-7 or have Source-File 7.";throw a.makeRuntimeErrorMsg("bladeburner."+e,t)}if(!r){if(!(i instanceof n.a)){const t="You must be a member of the Bladeburner division to use this API.";throw a.makeRuntimeErrorMsg("bladeburner."+e,t)}}},s=function(e,n){const r=t.bladeburner;if(null===r)throw new Error("Must have joined bladeburner");if(!r.cities.hasOwnProperty(n))throw a.makeRuntimeErrorMsg("bladeburner."+e,"Invalid city: "+n)},l=function(e,n,r){const i=t.bladeburner;if(null===i)throw new Error("Must have joined bladeburner");const o=i.getActionIdFromTypeAndName(n,r);if(!o)throw a.makeRuntimeErrorMsg("bladeburner."+e,`Invalid action type='${n}', name='${r}'`);const s=i.getActionObject(o);if(!s)throw a.makeRuntimeErrorMsg("bladeburner."+e,`Invalid action type='${n}', name='${r}'`);return s};return{getContractNames:function(){a.updateDynamicRam("getContractNames",Object(r.c)(t,"bladeburner","getContractNames")),o("getContractNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getContractNamesNetscriptFn()},getOperationNames:function(){a.updateDynamicRam("getOperationNames",Object(r.c)(t,"bladeburner","getOperationNames")),o("getOperationNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getOperationNamesNetscriptFn()},getBlackOpNames:function(){a.updateDynamicRam("getBlackOpNames",Object(r.c)(t,"bladeburner","getBlackOpNames")),o("getBlackOpNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getBlackOpNamesNetscriptFn()},getBlackOpRank:function(e){const n=a.string("getBlackOpRank","blackOpName",e);a.updateDynamicRam("getBlackOpRank",Object(r.c)(t,"bladeburner","getBlackOpRank")),o("getBlackOpRank");return l("getBlackOpRank","blackops",n).reqdRank},getGeneralActionNames:function(){a.updateDynamicRam("getGeneralActionNames",Object(r.c)(t,"bladeburner","getGeneralActionNames")),o("getGeneralActionNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getGeneralActionNamesNetscriptFn()},getSkillNames:function(){a.updateDynamicRam("getSkillNames",Object(r.c)(t,"bladeburner","getSkillNames")),o("getSkillNames");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getSkillNamesNetscriptFn()},startAction:function(n,i){const s=a.string("startAction","type",n),l=a.string("startAction","name",i);a.updateDynamicRam("startAction",Object(r.c)(t,"bladeburner","startAction")),o("startAction");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.startActionNetscriptFn(t,s,l,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.startAction",t)}},stopBladeburnerAction:function(){a.updateDynamicRam("stopBladeburnerAction",Object(r.c)(t,"bladeburner","stopBladeburnerAction")),o("stopBladeburnerAction");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.resetAction()},getCurrentAction:function(){a.updateDynamicRam("getCurrentAction",Object(r.c)(t,"bladeburner","getCurrentAction")),o("getCurrentAction");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.getTypeAndNameFromActionId(e.action)},getActionTime:function(n,i){const s=a.string("getActionTime","type",n),l=a.string("getActionTime","name",i);a.updateDynamicRam("getActionTime",Object(r.c)(t,"bladeburner","getActionTime")),o("getActionTime");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getActionTimeNetscriptFn(t,s,l,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.getActionTime",t)}},getActionEstimatedSuccessChance:function(n,i){const s=a.string("getActionEstimatedSuccessChance","type",n),l=a.string("getActionEstimatedSuccessChance","name",i);a.updateDynamicRam("getActionEstimatedSuccessChance",Object(r.c)(t,"bladeburner","getActionEstimatedSuccessChance")),o("getActionEstimatedSuccessChance");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getActionEstimatedSuccessChanceNetscriptFn(t,s,l,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.getActionEstimatedSuccessChance",t)}},getActionRepGain:function(e,n,s){const c=a.string("getActionRepGain","type",e),f=a.string("getActionRepGain","name",n),u=a.number("getActionRepGain","level",s);a.updateDynamicRam("getActionRepGain",Object(r.c)(t,"bladeburner","getActionRepGain")),o("getActionRepGain");const m=l("getActionRepGain",c,f);let h;return h=null==u||isNaN(u)?Math.pow(m.rewardFac,m.level-1):Math.pow(m.rewardFac,u-1),m.rankGain*h*i.a.BladeburnerRank},getActionCountRemaining:function(n,i){const s=a.string("getActionCountRemaining","type",n),l=a.string("getActionCountRemaining","name",i);a.updateDynamicRam("getActionCountRemaining",Object(r.c)(t,"bladeburner","getActionCountRemaining")),o("getActionCountRemaining");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getActionCountRemainingNetscriptFn(s,l,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.getActionCountRemaining",t)}},getActionMaxLevel:function(e,n){const i=a.string("getActionMaxLevel","type",e),s=a.string("getActionMaxLevel","name",n);a.updateDynamicRam("getActionMaxLevel",Object(r.c)(t,"bladeburner","getActionMaxLevel")),o("getActionMaxLevel");return l("getActionMaxLevel",i,s).maxLevel},getActionCurrentLevel:function(e,n){const i=a.string("getActionCurrentLevel","type",e),s=a.string("getActionCurrentLevel","name",n);a.updateDynamicRam("getActionCurrentLevel",Object(r.c)(t,"bladeburner","getActionCurrentLevel")),o("getActionCurrentLevel");return l("getActionCurrentLevel",i,s).level},getActionAutolevel:function(e,n){const i=a.string("getActionAutolevel","type",e),s=a.string("getActionAutolevel","name",n);a.updateDynamicRam("getActionAutolevel",Object(r.c)(t,"bladeburner","getActionAutolevel")),o("getActionAutolevel");return l("getActionCurrentLevel",i,s).autoLevel},setActionAutolevel:function(e,n,i=!0){const s=a.string("setActionAutolevel","type",e),c=a.string("setActionAutolevel","name",n),f=a.boolean(i);a.updateDynamicRam("setActionAutolevel",Object(r.c)(t,"bladeburner","setActionAutolevel")),o("setActionAutolevel");l("setActionAutolevel",s,c).autoLevel=f},setActionLevel:function(e,n,i=1){const s=a.string("setActionLevel","type",e),c=a.string("setActionLevel","name",n),f=a.number("setActionLevel","level",i);a.updateDynamicRam("setActionLevel",Object(r.c)(t,"bladeburner","setActionLevel")),o("setActionLevel");const u=l("setActionLevel",s,c);if(f<1||f>u.maxLevel)throw a.makeRuntimeErrorMsg("bladeburner.setActionLevel",`Level must be between 1 and ${u.maxLevel}, is ${f}`);u.level=f},getRank:function(){a.updateDynamicRam("getRank",Object(r.c)(t,"bladeburner","getRank")),o("getRank");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.rank},getSkillPoints:function(){a.updateDynamicRam("getSkillPoints",Object(r.c)(t,"bladeburner","getSkillPoints")),o("getSkillPoints");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.skillPoints},getSkillLevel:function(n){const i=a.string("getSkillLevel","skillName",n);a.updateDynamicRam("getSkillLevel",Object(r.c)(t,"bladeburner","getSkillLevel")),o("getSkillLevel");const s=t.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getSkillLevelNetscriptFn(i,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.getSkillLevel",t)}},getSkillUpgradeCost:function(n){const i=a.string("getSkillUpgradeCost","skillName",n);a.updateDynamicRam("getSkillUpgradeCost",Object(r.c)(t,"bladeburner","getSkillUpgradeCost")),o("getSkillUpgradeCost");const s=t.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.getSkillUpgradeCostNetscriptFn(i,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.getSkillUpgradeCost",t)}},upgradeSkill:function(n){const i=a.string("upgradeSkill","skillName",n);a.updateDynamicRam("upgradeSkill",Object(r.c)(t,"bladeburner","upgradeSkill")),o("upgradeSkill");const s=t.bladeburner;if(null===s)throw new Error("Should not be called without Bladeburner");try{return s.upgradeSkillNetscriptFn(i,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.upgradeSkill",t)}},getTeamSize:function(n,i){const s=a.string("getTeamSize","type",n),l=a.string("getTeamSize","name",i);a.updateDynamicRam("getTeamSize",Object(r.c)(t,"bladeburner","getTeamSize")),o("getTeamSize");const c=t.bladeburner;if(null===c)throw new Error("Should not be called without Bladeburner");try{return c.getTeamSizeNetscriptFn(s,l,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.getTeamSize",t)}},setTeamSize:function(n,i,s){const l=a.string("setTeamSize","type",n),c=a.string("setTeamSize","name",i),f=a.number("setTeamSize","size",s);a.updateDynamicRam("setTeamSize",Object(r.c)(t,"bladeburner","setTeamSize")),o("setTeamSize");const u=t.bladeburner;if(null===u)throw new Error("Should not be called without Bladeburner");try{return u.setTeamSizeNetscriptFn(l,c,f,e)}catch(t){throw a.makeRuntimeErrorMsg("bladeburner.setTeamSize",t)}},getCityEstimatedPopulation:function(e){const n=a.string("getCityEstimatedPopulation","cityName",e);a.updateDynamicRam("getCityEstimatedPopulation",Object(r.c)(t,"bladeburner","getCityEstimatedPopulation")),o("getCityEstimatedPopulation"),s("getCityEstimatedPopulation",n);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.cities[n].popEst},getCityCommunities:function(e){const n=a.string("getCityCommunities","cityName",e);a.updateDynamicRam("getCityCommunities",Object(r.c)(t,"bladeburner","getCityCommunities")),o("getCityCommunities"),s("getCityCommunities",n);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.cities[n].comms},getCityChaos:function(e){const n=a.string("getCityChaos","cityName",e);a.updateDynamicRam("getCityChaos",Object(r.c)(t,"bladeburner","getCityChaos")),o("getCityChaos"),s("getCityChaos",n);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.cities[n].chaos},getCity:function(){a.updateDynamicRam("getCity",Object(r.c)(t,"bladeburner","getCity")),o("getCityChaos");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return e.city},switchCity:function(e){const n=a.string("switchCity","cityName",e);a.updateDynamicRam("switchCity",Object(r.c)(t,"bladeburner","switchCity")),o("switchCity"),s("switchCity",n);const i=t.bladeburner;if(null===i)throw new Error("Should not be called without Bladeburner");return i.city=n,!0},getStamina:function(){a.updateDynamicRam("getStamina",Object(r.c)(t,"bladeburner","getStamina")),o("getStamina");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return[e.stamina,e.maxStamina]},joinBladeburnerFaction:function(){a.updateDynamicRam("joinBladeburnerFaction",Object(r.c)(t,"bladeburner","joinBladeburnerFaction")),o("joinBladeburnerFaction",!0);const n=t.bladeburner;if(null===n)throw new Error("Should not be called without Bladeburner");return n.joinBladeburnerFactionNetscriptFn(e)},joinBladeburnerDivision:function(){return a.updateDynamicRam("joinBladeburnerDivision",Object(r.c)(t,"bladeburner","joinBladeburnerDivision")),(7===t.bitNodeN||t.sourceFileLvl(7)>0)&&(8!==t.bitNodeN&&(t.bladeburner instanceof n.a||(t.strength>=100&&t.defense>=100&&t.dexterity>=100&&t.agility>=100?(t.bladeburner=new n.a(t),e.log("joinBladeburnerDivision",()=>"You have been accepted into the Bladeburner division"),!0):(e.log("joinBladeburnerDivision",()=>"You do not meet the requirements for joining the Bladeburner division"),!1))))},getBonusTime:function(){a.updateDynamicRam("getBonusTime",Object(r.c)(t,"bladeburner","getBonusTime")),o("getBonusTime");const e=t.bladeburner;if(null===e)throw new Error("Should not be called without Bladeburner");return 1e3*Math.round(e.storedCycles/5)}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(13),r=a(1029);function i(t,e,a){const i=function(t,e,n){const r=a.getServer(e,t).getContract(n);if(null==r)throw a.makeRuntimeErrorMsg("codingcontract."+t,`Cannot find contract '${n}' on server '${e}'`);return r};return{attempt:function(o,s,l=e.hostname,{returnReward:c}={returnReward:!1}){const f=a.string("attempt","filename",s),u=a.string("attempt","hostname",l);a.updateDynamicRam("attempt",Object(n.c)(t,"codingcontract","attempt"));const m=i("attempt",u,f);if(Object(r.a)(o)){const t=[];for(let e=0;e`Successfully completed Coding Contract '${f}'. Reward: ${a}`),d.removeContract(f),!c||a}return++m.tries,m.tries>=m.getMaxNumTries()?(e.log("codingcontract.attempt",()=>`Coding Contract attempt '${f}' failed. Contract is now self-destructing`),d.removeContract(f)):e.log("codingcontract.attempt",()=>`Coding Contract attempt '${f}' failed. ${m.getMaxNumTries()-m.tries} attempts remaining.`),!!c&&""},getContractType:function(r,o=e.hostname){const s=a.string("getContractType","filename",r),l=a.string("getContractType","hostname",o);a.updateDynamicRam("getContractType",Object(n.c)(t,"codingcontract","getContractType"));return i("getContractType",l,s).getType()},getData:function(r,o=e.hostname){const s=a.string("getContractType","filename",r),l=a.string("getContractType","hostname",o);a.updateDynamicRam("getData",Object(n.c)(t,"codingcontract","getData"));const c=i("getData",l,s).getData();if(c.constructor===Array){const t=c.slice();for(let e=0;et.constructor===Array)}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(109),r=a(69),i=a(298),o=a(371),s=a(53),l=a(280),c=a(50),f=a(38),u=a(318),m=a(281),h=a(29);function d(t,e,a){function d(t){const e=g(),a=Object.values(i.a).find(e=>e[2]===t);if(void 0===a)throw new Error(`No upgrade named '${t}'`);const n=a[0];return 1===e.unlockUpgrades[n]}function p(t,e){return void 0!==t.researched[e]&&t.researched[e]}function g(){const e=t.corporation;if(null===e)throw new Error("cannot be called without a corporation");return e}function y(t){const e=g().divisions.find(e=>e.name===t);if(void 0===e)throw new Error(`No division named '${t}'`);return e}function b(t,e){const a=y(t);if(!(e in a.offices))throw new Error(`Invalid city name '${e}'`);const n=a.offices[e];if(0===n)throw new Error(`${a.name} has not expanded to '${e}'`);return n}function E(t,e){const a=y(t);if(!(e in a.warehouses))throw new Error(`Invalid city name '${e}'`);const n=a.warehouses[e];if(0===n)throw new Error(`${a.name} has not expanded to '${e}'`);return n}function v(t,e,a){const n=E(t,e),r=a.replace(/ /g,""),i=n.materials[r];if(void 0===i)throw new Error(`Invalid material name: '${a}'`);return i}function k(t,e){const a=y(t).products[e];if(void 0===a)throw new Error(`Invalid product name: '${e}'`);return a}function _(t,e,a){const n=b(t,e).employees.find(t=>t.name===a);if(void 0===n)throw new Error(`Invalid employee name: '${a}'`);return n}function w(e,n){if(null===t.corporation)throw a.makeRuntimeErrorMsg("corporation."+e,"Must own a corporation.");if(n&&!t.corporation.unlockUpgrades[n])throw a.makeRuntimeErrorMsg("corporation."+e,"You do not have access to this API.")}function S(t){const e=[];for(const a of Object.values(t.offices))0!==a&&e.push(a.loc);return{name:t.name,type:t.type,awareness:t.awareness,popularity:t.popularity,prodMult:t.prodMult,research:t.sciResearch.qty,lastCycleRevenue:t.lastCycleRevenue,lastCycleExpenses:t.lastCycleExpenses,thisCycleRevenue:t.thisCycleRevenue,thisCycleExpenses:t.thisCycleExpenses,upgrades:t.upgrades.slice(),cities:e,products:void 0===t.products?[]:Object.keys(t.products)}}return{...{getPurchaseWarehouseCost:function(){return w("getPurchaseWarehouseCost",7),f.a.WarehouseInitialCost},getUpgradeWarehouseCost:function(t,e){w("upgradeWarehouse",7);const n=E(a.string("getUpgradeWarehouseCost","divisionName",t),a.city("getUpgradeWarehouseCost","cityName",e));return f.a.WarehouseUpgradeBaseCost*Math.pow(1.07,n.level+1)},hasWarehouse:function(t,e){w("hasWarehouse",7);const n=a.string("getWarehouse","divisionName",t),r=a.city("getWarehouse","cityName",e),i=y(n);if(!(r in i.warehouses))throw new Error(`Invalid city name '${r}'`);return 0!==i.warehouses[r]},getWarehouse:function(t,e){w("getWarehouse",7);const n=E(a.string("getWarehouse","divisionName",t),a.city("getWarehouse","cityName",e));return{level:n.level,loc:n.loc,size:n.size,sizeUsed:n.sizeUsed,smartSupplyEnabled:n.smartSupplyEnabled}},getMaterial:function(t,e,n){w("getMaterial",7);const r=v(a.string("getMaterial","divisionName",t),a.city("getMaterial","cityName",e),a.string("getMaterial","materialName",n));return{name:r.name,qty:r.qty,qlt:r.qlt,prod:r.prd,sell:r.sll}},getProduct:function(t,e){w("getProduct",7);const n=k(a.string("getProduct","divisionName",t),a.string("getProduct","productName",e));return{name:n.name,dmd:n.dmd,cmp:n.cmp,pCost:n.pCost,sCost:n.sCost,cityData:n.data,developmentProgress:n.prog}},purchaseWarehouse:function(t,e){w("purchaseWarehouse",7);const n=a.string("purchaseWarehouse","divisionName",t),i=a.city("purchaseWarehouse","cityName",e),o=g();Object(r.o)(o,y(n),i)},upgradeWarehouse:function(t,e){w("upgradeWarehouse",7);const n=a.string("upgradeWarehouse","divisionName",t),i=a.city("upgradeWarehouse","cityName",e),o=g();Object(r.C)(o,y(n),E(n,i))},sellMaterial:function(t,e,n,i,o){w("sellMaterial",7);const s=a.string("sellMaterial","divisionName",t),l=a.city("sellMaterial","cityName",e),c=a.string("sellMaterial","materialName",n),f=a.string("sellMaterial","amt",i),u=a.string("sellMaterial","price",o),m=v(s,l,c);Object(r.q)(m,f,u)},sellProduct:function(t,e,n,i,o,s){w("sellProduct",7);const l=a.string("sellProduct","divisionName",t),c=a.city("sellProduct","cityName",e),f=a.string("sellProduct","productName",n),u=a.string("sellProduct","amt",i),m=a.string("sellProduct","price",o),h=a.boolean(s),d=k(l,f);Object(r.r)(d,c,u,m,h)},discontinueProduct:function(t,e){w("discontinueProduct",7);const n=a.string("discontinueProduct","divisionName",t),r=a.string("discontinueProduct","productName",e);y(n).discontinueProduct(k(n,r))},setSmartSupply:function(t,e,n){w("setSmartSupply",7);const i=a.string("setSmartSupply","divisionName",t),o=a.city("sellProduct","cityName",e),s=a.boolean(n),l=E(i,o);if(!d("Smart Supply"))throw a.makeRuntimeErrorMsg("corporation.setSmartSupply","You have not purchased the Smart Supply upgrade!");Object(r.x)(l,s)},setSmartSupplyUseLeftovers:function(t,e,n,i){w("setSmartSupplyUseLeftovers",7);const o=a.string("setSmartSupply","divisionName",t),s=a.city("sellProduct","cityName",e),l=a.string("sellProduct","materialName",n),c=a.boolean(i),f=E(o,s),u=v(o,s,l);if(!d("Smart Supply"))throw a.makeRuntimeErrorMsg("corporation.setSmartSupply","You have not purchased the Smart Supply upgrade!");Object(r.y)(f,u,c)},buyMaterial:function(t,e,n,i){w("buyMaterial",7);const o=a.string("buyMaterial","divisionName",t),s=a.city("buyMaterial","cityName",e),l=a.string("buyMaterial","materialName",n),c=a.number("buyMaterial","amt",i);if(c<0)throw new Error("Invalid value for amount field! Must be numeric and greater than 0");const f=v(o,s,l);Object(r.e)(f,c)},bulkPurchase:function(t,e,n,i){w("bulkPurchase",7);const o=a.string("bulkPurchase","divisionName",t);if(!p(y(o),"Bulk Purchasing"))throw new Error("You have not researched Bulk Purchasing in "+o);const s=g(),l=a.city("bulkPurchase","cityName",e),c=a.string("bulkPurchase","materialName",n),f=a.number("bulkPurchase","amt",i),u=E(o,l),m=v(o,l,c);Object(r.b)(s,u,m,f)},makeProduct:function(t,e,n,i,o){w("makeProduct",7);const s=a.string("makeProduct","divisionName",t),l=a.city("makeProduct","cityName",e),c=a.string("makeProduct","productName",n),f=a.number("makeProduct","designInvest",i),u=a.number("makeProduct","marketingInvest",o),m=g();Object(r.l)(m,y(s),l,c,f,u)},exportMaterial:function(t,e,n,i,o,s){w("exportMaterial",7);const l=a.string("exportMaterial","sourceDivision",t),c=a.string("exportMaterial","sourceCity",e),f=a.string("exportMaterial","targetDivision",n),u=a.string("exportMaterial","targetCity",i),m=a.string("exportMaterial","materialName",o),h=a.string("exportMaterial","amt",s);Object(r.g)(f,u,v(l,c,m),h+"",y(f))},cancelExportMaterial:function(t,e,n,i,o,s){w("cancelExportMaterial",7);const l=a.string("cancelExportMaterial","sourceDivision",t),c=a.string("cancelExportMaterial","sourceCity",e),f=a.string("cancelExportMaterial","targetDivision",n),u=a.string("cancelExportMaterial","targetCity",i),m=a.string("cancelExportMaterial","materialName",o),h=a.string("cancelExportMaterial","amt",s);Object(r.f)(f,u,v(l,c,m),h+"")},setMaterialMarketTA1:function(t,e,n,i){w("setMaterialMarketTA1",7);const o=a.string("setMaterialMarketTA1","divisionName",t),s=a.city("setMaterialMarketTA1","cityName",e),l=a.string("setMaterialMarketTA1","materialName",n),c=a.boolean(i);if(!y(o).hasResearch("Market-TA.I"))throw a.makeRuntimeErrorMsg("corporation.setMaterialMarketTA1","You have not researched MarketTA.I for division: "+o);Object(r.t)(v(o,s,l),c)},setMaterialMarketTA2:function(t,e,n,i){w("setMaterialMarketTA2",7);const o=a.string("setMaterialMarketTA2","divisionName",t),s=a.city("setMaterialMarketTA2","cityName",e),l=a.string("setMaterialMarketTA2","materialName",n),c=a.boolean(i);if(!y(o).hasResearch("Market-TA.II"))throw a.makeRuntimeErrorMsg("corporation.setMaterialMarketTA2","You have not researched MarketTA.II for division: "+o);Object(r.u)(v(o,s,l),c)},setProductMarketTA1:function(t,e,n){w("setProductMarketTA1",7);const i=a.string("setProductMarketTA1","divisionName",t),o=a.string("setProductMarketTA1","productName",e),s=a.boolean(n);if(!y(i).hasResearch("Market-TA.I"))throw a.makeRuntimeErrorMsg("corporation.setProductMarketTA1","You have not researched MarketTA.I for division: "+i);Object(r.v)(k(i,o),s)},setProductMarketTA2:function(t,e,n){w("setProductMarketTA2",7);const i=a.string("setProductMarketTA2","divisionName",t),o=a.string("setProductMarketTA2","productName",e),s=a.boolean(n);if(!y(i).hasResearch("Market-TA.II"))throw a.makeRuntimeErrorMsg("corporation.setProductMarketTA2","You have not researched MarketTA.II for division: "+i);Object(r.w)(k(i,o),s)}},...{getHireAdVertCost:function(t){w("getHireAdVertCost",8);const e=y(a.string("getHireAdVertCost","divisionName",t)),n=u.a[1];return n[1]*Math.pow(n[2],e.upgrades[1])},getHireAdVertCount:function(t){w("getHireAdVertCount",8);return y(a.string("getHireAdVertCount","divisionName",t)).upgrades[1]},getResearchCost:function(t,e){w("getResearchCost",8);const n=a.string("getResearchCost","divisionName",t),r=a.string("getResearchCost","researchName",e);return function(t,e){const a=c.c[t.type];if(void 0===a)throw new Error(`No research tree for industry '${t.type}'`);if(!a.getAllNodes().includes(e))throw new Error(`No research named '${e}'`);return m.a[e].cost}(y(n),r)},hasResearched:function(t,e){w("hasResearched",8);const n=a.string("hasResearched","divisionName",t),r=a.string("hasResearched","researchName",e);return p(y(n),r)},setAutoJobAssignment:function(t,r,i,o){w("setAutoJobAssignment",8);const l=a.string("setAutoJobAssignment","divisionName",t),c=a.city("setAutoJobAssignment","cityName",r),f=a.number("setAutoJobAssignment","amount",o),u=a.string("setAutoJobAssignment","job",i),m=b(l,c);if(!Object.values(s.a).includes(u))throw new Error(`'${u}' is not a valid job.`);return Object(n.c)(1e3,e).then((function(){return e.env.stopFlag?Promise.reject(e):Promise.resolve(m.setEmployeeToJob(u,f))}))},getOfficeSizeUpgradeCost:function(t,e,n){w("getOfficeSizeUpgradeCost",8);const r=a.string("getOfficeSizeUpgradeCost","divisionName",t),i=a.city("getOfficeSizeUpgradeCost","cityName",e),o=a.number("getOfficeSizeUpgradeCost","size",n);if(o<0)throw new Error("Invalid value for size field! Must be numeric and greater than 0");const s=b(r,i),l=Math.round(s.size/f.a.OfficeInitialSize);let c=0;for(let t=0;tt.name),employeeProd:{Operations:n.employeeProd[s.a.Operations],Engineer:n.employeeProd[s.a.Engineer],Business:n.employeeProd[s.a.Business],Management:n.employeeProd[s.a.Management],"Research & Development":n.employeeProd[s.a.RandD],Training:n.employeeProd[s.a.Training]}}},getEmployee:function(t,e,n){w("getEmployee",8);const r=_(a.string("getEmployee","divisionName",t),a.city("getEmployee","cityName",e),a.string("getEmployee","employeeName",n));return{name:r.name,mor:r.mor,hap:r.hap,ene:r.ene,int:r.int,cha:r.cha,exp:r.exp,cre:r.cre,eff:r.eff,sal:r.sal,loc:r.loc,pos:r.pos}}},expandIndustry:function(t,e){w("expandIndustry");const n=a.string("expandIndustry","industryName",t),i=a.string("expandIndustry","divisionName",e),o=g();Object(r.n)(o,n,i)},expandCity:function(t,e){w("expandCity");const n=a.string("expandCity","divisionName",t),i=a.city("expandCity","cityName",e);if(!f.a.Cities.includes(i))throw new Error("Invalid city name");const o=g(),s=y(n);Object(r.m)(o,s,i)},unlockUpgrade:function(t){w("unlockUpgrade");const e=a.string("unlockUpgrade","upgradeName",t),n=g(),o=Object.values(i.a).find(t=>t[2]===e);if(void 0===o)throw new Error(`No upgrade named '${e}'`);Object(r.A)(n,o)},levelUpgrade:function(t){w("levelUpgrade");const e=a.string("levelUpgrade","upgradeName",t),n=g(),i=Object.values(o.a).find(t=>t[4]===e);if(void 0===i)throw new Error(`No upgrade named '${e}'`);Object(r.j)(n,i)},issueDividends:function(t){w("issueDividends");const e=a.number("issueDividends","percent",t);if(e<0||e>100)throw new Error("Invalid value for percent field! Must be numeric, greater than 0, and less than 100");const n=g();if(!n.public)throw a.makeRuntimeErrorMsg("corporation.issueDividends","Your company has not gone public!");Object(r.i)(n,e)},getDivision:function(t){w("getDivision");return S(y(a.string("getDivision","divisionName",t)))},getCorporation:function(){w("getCorporation");const t=g();return{name:t.name,funds:t.funds,revenue:t.revenue,expenses:t.expenses,public:t.public,totalShares:t.totalShares,numShares:t.numShares,shareSaleCooldown:t.shareSaleCooldown,issuedShares:t.issuedShares,sharePrice:t.sharePrice,state:t.state.getState(),divisions:t.divisions.map(t=>S(t))}},createCorporation:function(e,n=!0){return function(e,a=!0){if(!t.canAccessCorporation()||t.hasCorporation())return!1;if(!e)return!1;if(3!==t.bitNodeN&&!a)throw new Error("cannot use seed funds outside of BitNode 3");if(a){if(!t.canAfford(15e10))return!1;t.startCorporation(e),t.loseMoney(15e10,"corporation")}else t.startCorporation(e,5e8);return!0}(a.string("createCorporation","corporationName",e),a.boolean(n))},hasUnlockUpgrade:function(t){w("hasUnlockUpgrade");return d(a.string("hasUnlockUpgrade","upgradeName",t))},getUnlockUpgradeCost:function(t){w("getUnlockUpgradeCost");return function(t){const e=Object.values(i.a).find(e=>e[2]===t);if(void 0===e)throw new Error(`No upgrade named '${t}'`);return e[1]}(a.string("getUnlockUpgradeCost","upgradeName",t))},getUpgradeLevel:function(t){w("hasUnlockUpgrade");return function(t){const e=a.string("levelUpgrade","upgradeName",t),n=g(),r=Object.values(o.a).find(t=>t[4]===e);if(void 0===r)throw new Error(`No upgrade named '${e}'`);const i=r[0];return n.upgrades[i]}(a.string("getUpgradeLevel","upgradeName",t))},getUpgradeLevelCost:function(t){w("getUpgradeLevelCost");return function(t){const e=a.string("levelUpgrade","upgradeName",t),n=g(),r=Object.values(o.a).find(t=>t[4]===e);if(void 0===r)throw new Error(`No upgrade named '${e}'`);const i=r[0],s=r[1],l=r[2],c=n.upgrades[i];return s*Math.pow(l,c)}(a.string("getUpgradeLevelCost","upgradeName",t))},getExpandIndustryCost:function(t){w("getExpandIndustryCost");return function(t){const e=c.d[t];if(void 0===e)throw new Error(`Invalid industry: '${t}'`);return e}(a.string("getExpandIndustryCost","industryName",t))},getExpandCityCost:function(){return w("getExpandCityCost"),f.a.OfficeInitialCost},getInvestmentOffer:function(){return w("getInvestmentOffer"),function(){const t=g();if(t.fundingRound>=f.a.FundingRoundShares.length||t.fundingRound>=f.a.FundingRoundMultiplier.length||t.public)return{funds:0,shares:0,round:t.fundingRound+1};const e=t.determineValuation(),a=f.a.FundingRoundShares[t.fundingRound];return{funds:e*a*f.a.FundingRoundMultiplier[t.fundingRound],shares:Math.floor(f.a.INITIALSHARES*a),round:t.fundingRound+1}}()},acceptInvestmentOffer:function(){return w("acceptInvestmentOffer"),function(){const t=g();if(t.fundingRound>=f.a.FundingRoundShares.length||t.fundingRound>=f.a.FundingRoundMultiplier.length||t.public)return!1;const e=t.determineValuation(),a=f.a.FundingRoundShares[t.fundingRound],n=e*a*f.a.FundingRoundMultiplier[t.fundingRound],r=Math.floor(f.a.INITIALSHARES*a);return t.fundingRound++,t.addFunds(n),t.numShares-=r,!0}()},goPublic:function(t){w("acceptInvestmentOffer");return function(t){const e=g(),a=e.determineValuation()/e.totalShares;if(isNaN(t))throw new Error("Invalid value for number of issued shares");if(t<0)throw new Error("Invalid value for number of issued shares");if(t>e.numShares)throw new Error("You don't have that many shares to issue!");return e.public=!0,e.sharePrice=a,e.issuedShares=t,e.numShares-=t,e.addFunds(t*a),!0}(a.number("goPublic","numShares",t))},sellShares:function(e){w("acceptInvestmentOffer");const n=a.number("sellStock","numShares",e);return Object(r.s)(g(),t,n)},buyBackShares:function(e){w("acceptInvestmentOffer");const n=a.number("buyStock","numShares",e);return Object(r.c)(g(),t,n)},bribe:function(e,n,r){w("bribe");return function(e,a,n){if(!t.factions.includes(e))throw new Error("Invalid faction name");if(isNaN(a)||a<0||isNaN(n)||n<0)throw new Error("Invalid value for amount field! Must be numeric, grater than 0.");const r=g();if(r.funds=this.getMaximumNumberProducts()}calculateProductionFactors(){let t=0;for(let e=0;e<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++e){const a=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[e],n=this.warehouses[a];if(!(n instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a))continue;const r=n.materials,i=Math.pow(.002*r.RealEstate.qty+1,this.reFac)*Math.pow(.002*r.Hardware.qty+1,this.hwFac)*Math.pow(.002*r.Robots.qty+1,this.robFac)*Math.pow(.002*r.AICores.qty+1,this.aiFac);t+=Math.pow(i,.73)}this.prodMult=t<1?1:t}updateWarehouseSizeUsed(t){t.updateMaterialSizeUsed();for(const e of Object.keys(this.products))if(this.products.hasOwnProperty(e)){const a=this.products[e];if(void 0===a)continue;t.sizeUsed+=a.data[t.loc][0]*a.siz}}process(t=1,e,a){if(this.state=e,"START"===e){(isNaN(this.thisCycleRevenue)||isNaN(this.thisCycleExpenses))&&(console.error("NaN in Corporation's computed revenue/expenses"),Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.a)("Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer"),this.thisCycleRevenue=0,this.thisCycleExpenses=0),this.lastCycleRevenue=this.thisCycleRevenue/(t*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.lastCycleExpenses=this.thisCycleExpenses/(t*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle),this.thisCycleRevenue=0,this.thisCycleExpenses=0,this.lastCycleRevenue>0&&(this.newInd=!1);let e=0;for(const n of Object.keys(this.offices)){const r=this.offices[n];0!==r&&(r instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_8__.a&&(e+=r.process(t,a,this)))}this.thisCycleExpenses=this.thisCycleExpenses+e,this.processMaterialMarket(),this.processProductMarket(t),this.popularity-=1e-4*t,this.popularity=Math.max(0,this.popularity);const n=a.getDreamSenseGain(),r=4*n;if(n>0){const e=this.awareness+r*t;this.awareness=Math.min(e,Number.MAX_VALUE);const a=this.popularity+n*t;this.popularity=Math.min(a,Number.MAX_VALUE)}return}let n=this.processMaterials(t,a);Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue+n[0],this.thisCycleExpenses=this.thisCycleExpenses+n[1]),n=this.processProducts(t,a),Array.isArray(n)&&(this.thisCycleRevenue=this.thisCycleRevenue+n[0],this.thisCycleExpenses=this.thisCycleExpenses+n[1])}processMaterialMarket(){const t=this.reqMats,e=this.prodMats;for(let a=0;a<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++a)if(this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[a]]instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a){const n=this.warehouses[_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[a]];if(0===n)continue;for(const e of Object.keys(t))t.hasOwnProperty(e)&&n.materials[e].processMarket();for(let t=0;t0&&(e.qty+=a,expenses+=a*e.bCost),this.updateWarehouseSizeUsed(warehouse))}const t={};for(const e of Object.keys(warehouse.materials)){if(!warehouse.materials.hasOwnProperty(e))continue;if(!warehouse.smartSupplyEnabled||!Object.keys(this.reqMats).includes(e))continue;const a=warehouse.materials[e],n=this.reqMats[e];if(void 0===n)throw new Error(`reqMat "${e}" is undefined`);a.buy=n*warehouse.smartSupplyStore;let r=a.buy*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles;const i=Math.floor((warehouse.size-warehouse.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[e]);r=Math.min(r,i),r>0&&(t[e]=r)}let e=1e99;for(const a of Object.keys(t)){const n=t[a];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");const r=this.reqMats[a];if(void 0===r)throw new Error(`reqMat "${a}" is undefined`);const i=n/r;in)for(const e of Object.keys(t)){const r=t[e];if(void 0===r)throw new Error("Somehow smartbuy matname is undefined");t[e]=Math.floor(r*n/a)}for(const e of Object.keys(t)){if(!warehouse.smartSupplyUseLeftovers[e])continue;const a=warehouse.materials[e],n=t[e];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");t[e]=Math.max(0,n-a.qty)}for(const e of Object.keys(t)){const a=warehouse.materials[e],n=t[e];if(void 0===n)throw new Error("Somehow smartbuy matname is undefined");a.qty+=n,expenses+=n*a.bCost}break}case"PRODUCTION":if(warehouse.smartSupplyStore=0,this.prodMats.length>0){const t=warehouse.materials[this.prodMats[0]],e=this.getOfficeProductivity(office)*this.prodMult*corporation.getProductionMultiplier()*this.getProductionMultiplier();let a;a=t.prdman[0]?Math.min(e,t.prdman[1]):e,a*=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles;let n=0;for(let t=0;t0){const t=Math.floor((warehouse.size-warehouse.sizeUsed)/n);a=Math.min(t,a)}a<0&&(a=0),warehouse.smartSupplyStore+=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles);let r=1;for(const t of Object.keys(this.reqMats))if(this.reqMats.hasOwnProperty(t)){const e=this.reqMats[t];if(void 0===e)continue;const n=e*a;warehouse.materials[t].qty0&&a>0){for(const t of Object.keys(this.reqMats)){const e=this.reqMats[t];if(void 0===e)continue;const n=e*a*r;warehouse.materials[t].qty-=n,warehouse.materials[t].prd=0,warehouse.materials[t].prd-=n/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)}for(let t=0;tmat.bCost?sCost-mat.bCost>markupLimit&&(markup=Math.pow(markupLimit/(sCost-mat.bCost),2)):sCost=0?(mat.qty-=sellAmt,revenue+=sellAmt*sCost,mat.sll=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)):mat.sll=0}break;case"EXPORT":for(const matName of Object.keys(warehouse.materials))if(warehouse.materials.hasOwnProperty(matName)){const mat=warehouse.materials[matName];mat.totalExp=0;for(let expI=0;expI=a.size)return[0,0];{const t=Math.floor((a.size-a.sizeUsed)/_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[matName]);amt=Math.min(t,amt)}a.materials[matName].imp+=amt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles),a.materials[matName].qty+=amt,a.materials[matName].qlt=mat.qlt,mat.qty-=amt,mat.totalExp+=amt,e.updateWarehouseSizeUsed(a);break}}}mat.totalExp/=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles}break;case"START":break;default:console.error("Invalid state: "+this.state)}this.updateWarehouseSizeUsed(warehouse)}office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_8__.a&&(this.sciResearch.qty+=.004*Math.pow(office.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.RandD],.5)*corporation.getScientificResearchMultiplier()*this.getScientificResearchMultiplier())}}return[revenue,expenses]}processProducts(t=1,e){let a=0;if("PRODUCTION"===this.state)for(const e of Object.keys(this.products)){const a=this.products[e];if(void 0!==a&&!a.fin){const e=a.createCity,n=this.offices[e];if(0===n)continue;const r=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Engineer],i=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Management],o=n.employeeProd[_EmployeePositions__WEBPACK_IMPORTED_MODULE_4__.a.Operations],s=r+i+o;if(s<=0)break;const l=1+i/(1.2*s),c=(Math.pow(r,.34)+Math.pow(o,.2))*l;a.createProduct(t,c),a.prog>=100&&a.finishProduct(n.employeeProd,this);break}}for(const n of Object.keys(this.products))if(this.products.hasOwnProperty(n)){const r=this.products[n];r instanceof _Product__WEBPACK_IMPORTED_MODULE_9__.a&&r.fin&&(a+=this.processProduct(t,r,e))}return[a,0]}processProduct(marketCycles=1,product,corporation){let totalProfit=0;for(let i=0;i<_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities.length;++i){const city=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.Cities[i],office=this.offices[city];if(0===office)continue;const warehouse=this.warehouses[city];if(warehouse instanceof _Warehouse__WEBPACK_IMPORTED_MODULE_13__.a)switch(this.state){case"PRODUCTION":{const t=this.getOfficeProductivity(office,{forProduct:!0})*corporation.getProductionMultiplier()*this.prodMult*this.getProductionMultiplier()*this.getProductProductionMultiplier();let e;e=product.prdman[city][0]?Math.min(t,product.prdman[city][1]):t,e*=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles;let a=product.siz;for(const t of Object.keys(product.reqMats))if(product.reqMats.hasOwnProperty(t)){const e=product.reqMats[t];a-=_MaterialSizes__WEBPACK_IMPORTED_MODULE_12__.a[t]*e}if(a>0){const t=Math.floor((warehouse.size-warehouse.sizeUsed)/a);e=Math.min(t,e)}warehouse.smartSupplyStore+=e/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles);let n=1;for(const t of Object.keys(product.reqMats))if(product.reqMats.hasOwnProperty(t)){const a=product.reqMats[t]*e;warehouse.materials[t].qty0&&e>0){for(const t of Object.keys(product.reqMats))if(product.reqMats.hasOwnProperty(t)){const a=product.reqMats[t]*e*n;warehouse.materials[t].qty-=a,warehouse.materials[t].prd-=a/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)}product.data[city][0]+=e*n}product.data[city][1]=e*n/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles);break}case"SALE":{product.pCost=0;for(const t of Object.keys(product.reqMats))product.reqMats.hasOwnProperty(t)&&(product.pCost+=product.reqMats[t]*warehouse.materials[t].bCost);product.pCost*=_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.ProductProductionCostRatio;const businessFactor=this.getBusinessFactor(office),advertisingFactor=this.getAdvertisingFactors()[0],marketFactor=this.getMarketFactor(product),markupLimit=product.rat/product.mku;let sCost;if(product.marketTa2){const t=product.data[city][1],e=markupLimit,a=t,n=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*businessFactor*advertisingFactor*this.getSalesMultiplier(),r=Math.sqrt(a/n);let i;0===n||0===r?0===a?i=0:(i=product.pCost+markupLimit,console.warn("In Corporation, found illegal 0s when trying to calculate MarketTA2 sale cost")):i=e/r+product.pCost,product.marketTa2Price[city]=i,sCost=i}else if(product.marketTa1)sCost=product.pCost+markupLimit;else if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_11__.a)(product.sCost)){const sCostString=product.sCost;0===product.mku&&(console.error("mku is zero, reverting to 1 to avoid Infinity"),product.mku=1),sCost=sCostString.replace(/MP/g,product.pCost+product.rat/product.mku+""),sCost=eval(sCost)}else sCost=product.sCost;let markup=1,sellAmt;if(sCost>product.pCost&&sCost-product.pCost>markupLimit&&(markup=markupLimit/(sCost-product.pCost)),product.maxsll=.5*Math.pow(product.rat,.65)*marketFactor*corporation.getSalesMultiplier()*Math.pow(markup,2)*businessFactor*advertisingFactor*this.getSalesMultiplier(),product.sllman[city][0]&&Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_11__.a)(product.sllman[city][1])){let tmp=product.sllman[city][1].replace(/MAX/g,(product.maxsll+"").toUpperCase());tmp=tmp.replace(/PROD/g,product.data[city][1]);try{tmp=eval(tmp)}catch(t){Object(_ui_React_DialogBox__WEBPACK_IMPORTED_MODULE_10__.a)("Error evaluating your sell price expression for "+product.name+" in "+this.name+"'s "+city+" office. Sell price is being set to MAX"),tmp=product.maxsll}sellAmt=Math.min(product.maxsll,tmp)}else sellAmt=product.sllman[city][0]&&product.sllman[city][1]>0?Math.min(product.maxsll,product.sllman[city][1]):!1===product.sllman[city][0]?0:product.maxsll;sellAmt<0&&(sellAmt=0),sellAmt=sellAmt*_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles,sellAmt=Math.min(product.data[city][0],sellAmt),sellAmt&&sCost?(product.data[city][0]-=sellAmt,totalProfit+=sellAmt*sCost,product.data[city][2]=sellAmt/(_data_Constants__WEBPACK_IMPORTED_MODULE_3__.a.SecsPerMarketCycle*marketCycles)):product.data[city][2]=0;break}case"START":case"PURCHASE":case"EXPORT":break;default:console.error("Invalid State: "+this.state)}}return totalProfit}discontinueProduct(t){for(const e of Object.keys(this.products))this.products.hasOwnProperty(e)&&t===this.products[e]&&delete this.products[e]}upgrade(t,e){const a=e.corporation,n=e.office,r=t[0];for(;this.upgrades.length<=r;)this.upgrades.push(0);switch(++this.upgrades[r],r){case 0:for(let t=0;t=1)&&console.warn(`Exponential factor is ${e}. This is not an intended value for it`),a<1&&console.warn(`Linear factor is ${a}. This is not an intended value for it`),Math.pow(t,e)+t/a}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(38),r=a(36),i=a(25),o=a(53);class s{constructor(t={}){var e,a,i;e=this,a="cyclesUntilRaise",i=n.a.CyclesPerEmployeeRaise,a in e?Object.defineProperty(e,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[a]=i,this.name=t.name?t.name:"Bobby",this.mor=t.morale?t.morale:Object(r.a)(50,100),this.hap=t.happiness?t.happiness:Object(r.a)(50,100),this.ene=t.energy?t.energy:Object(r.a)(50,100),this.int=t.intelligence?t.intelligence:Object(r.a)(10,50),this.cha=t.charisma?t.charisma:Object(r.a)(10,50),this.exp=t.experience?t.experience:Object(r.a)(10,50),this.cre=t.creativity?t.creativity:Object(r.a)(10,50),this.eff=t.efficiency?t.efficiency:Object(r.a)(10,50),this.sal=t.salary?t.salary:Object(r.a)(.1,5),this.loc=t.loc?t.loc:"",this.pos=o.a.Unassigned}process(t=1,e){const a=.003*t,r=a*Math.random();this.exp+=a;const i=a*Math.random();this.pos===o.a.Training&&(this.cha+=i,this.exp+=i,this.eff+=i),this.ene-=r,this.hap-=r,this.ene(m("gang.wantedPenalty"),Object(f.f)(t)),respectGain:function(t,e,a){return m("gang.respectGain"),Object(f.d)(t,e,a)},wantedLevelGain:function(t,e,a){return m("gang.wantedLevelGain"),Object(f.e)(t,e,a)},moneyGain:function(t,e,a){return m("gang.moneyGain"),Object(f.c)(t,e,a)},ascensionPointsGain:function(t){const e=a.number("ascensionPointsGain","exp",t);return m("gang.ascensionPointsGain"),Object(f.b)(e)},ascensionMultiplier:function(t){const e=a.number("ascensionMultiplier","points",t);return m("gang.ascensionMultiplier"),Object(f.a)(e)}}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(13),r=a(245),i=a(101),o=a(226),s=a(112),l=a(76),c=a(97),f=a(227);function u(t,e,a){const u=function(e){if(!t.hasWseAccount)throw a.makeRuntimeErrorMsg(e,`You don't have WSE Access! Cannot use ${e}()`);if(!t.hasTixApiAccess)throw a.makeRuntimeErrorMsg(e,`You don't have TIX API Access! Cannot use ${e}()`)},m=function(t,e){const n=i.b[t];if(null==n)throw a.makeRuntimeErrorMsg(e,`Invalid stock symbol: '${t}'`);return n};return{getSymbols:function(){return a.updateDynamicRam("getSymbols",Object(n.c)(t,"stock","getSymbols")),u("getSymbols"),Object.values(c.a)},getPrice:function(e){a.updateDynamicRam("getPrice",Object(n.c)(t,"stock","getPrice"));const r=a.string("getPrice","symbol",e);u("getPrice");return m(r,"getPrice").price},getAskPrice:function(e){a.updateDynamicRam("getAskPrice",Object(n.c)(t,"stock","getAskPrice"));const r=a.string("getAskPrice","symbol",e);u("getAskPrice");return m(r,"getAskPrice").getAskPrice()},getBidPrice:function(e){a.updateDynamicRam("getBidPrice",Object(n.c)(t,"stock","getBidPrice"));const r=a.string("getBidPrice","symbol",e);u("getBidPrice");return m(r,"getBidPrice").getBidPrice()},getPosition:function(e){a.updateDynamicRam("getPosition",Object(n.c)(t,"stock","getPosition"));const r=a.string("getPosition","symbol",e);u("getPosition");const o=i.b[r];if(null==o)throw a.makeRuntimeErrorMsg("getPosition","Invalid stock symbol: "+r);return[o.playerShares,o.playerAvgPx,o.playerShortShares,o.playerAvgShortPx]},getMaxShares:function(e){a.updateDynamicRam("getMaxShares",Object(n.c)(t,"stock","getMaxShares"));const r=a.string("getMaxShares","symbol",e);u("getMaxShares");return m(r,"getMaxShares").maxShares},getPurchaseCost:function(e,r,i){a.updateDynamicRam("getPurchaseCost",Object(n.c)(t,"stock","getPurchaseCost"));const s=a.string("getPurchaseCost","symbol",e);let c=a.number("getPurchaseCost","shares",r);const f=a.string("getPurchaseCost","posType",i);u("getPurchaseCost");const h=m(s,"getPurchaseCost");let d;c=Math.round(c);const p=f.toLowerCase();if(p.includes("l"))d=l.a.Long;else{if(!p.includes("s"))return 1/0;d=l.a.Short}const g=Object(o.b)(h,c,d);return null==g?1/0:g},getSaleGain:function(e,r,i){a.updateDynamicRam("getSaleGain",Object(n.c)(t,"stock","getSaleGain"));const s=a.string("getSaleGain","symbol",e);let c=a.number("getSaleGain","shares",r);const f=a.string("getSaleGain","posType",i);u("getSaleGain");const h=m(s,"getSaleGain");let d;c=Math.round(c);const p=f.toLowerCase();if(p.includes("l"))d=l.a.Long;else{if(!p.includes("s"))return 0;d=l.a.Short}const g=Object(o.c)(h,c,d);return null==g?0:g},buy:function(i,o){a.updateDynamicRam("buy",Object(n.c)(t,"stock","buy"));const s=a.string("buy","symbol",i),l=a.number("buy","shares",o);u("buy");const c=m(s,"buy");return Object(r.a)(c,l,e,{})?c.getAskPrice():0},sell:function(i,o){a.updateDynamicRam("sell",Object(n.c)(t,"stock","sell"));const s=a.string("sell","symbol",i),l=a.number("sell","shares",o);u("sell");const c=m(s,"sell");return Object(r.c)(c,l,e,{})?c.getBidPrice():0},short:function(i,o){a.updateDynamicRam("short",Object(n.c)(t,"stock","short"));const s=a.string("short","symbol",i),l=a.number("short","shares",o);if(u("short"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=1)throw a.makeRuntimeErrorMsg("short","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const c=m(s,"short");return Object(r.d)(c,l,e,{})?c.getBidPrice():0},sellShort:function(i,o){a.updateDynamicRam("sellShort",Object(n.c)(t,"stock","sellShort"));const s=a.string("sellShort","symbol",i),l=a.number("sellShort","shares",o);if(u("sellShort"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=1)throw a.makeRuntimeErrorMsg("sellShort","You must either be in BitNode-8 or you must have Source-File 8 Level 2.");const c=m(s,"sellShort");return Object(r.b)(c,l,e,{})?c.getAskPrice():0},placeOrder:function(r,o,c,f,h){a.updateDynamicRam("placeOrder",Object(n.c)(t,"stock","placeOrder"));const d=a.string("placeOrder","symbol",r),p=a.number("placeOrder","shares",o),g=a.number("placeOrder","price",c),y=a.string("placeOrder","type",f),b=a.string("placeOrder","pos",h);if(u("placeOrder"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("placeOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const E=m(d,"placeOrder");let v,k;const _=y.toLowerCase();if(_.includes("limit")&&_.includes("buy"))v=s.a.LimitBuy;else if(_.includes("limit")&&_.includes("sell"))v=s.a.LimitSell;else if(_.includes("stop")&&_.includes("buy"))v=s.a.StopBuy;else{if(!_.includes("stop")||!_.includes("sell"))throw a.makeRuntimeErrorMsg("placeOrder","Invalid order type: "+y);v=s.a.StopSell}const w=b.toLowerCase();if(w.includes("l"))k=l.a.Long;else{if(!w.includes("s"))throw a.makeRuntimeErrorMsg("placeOrder","Invalid position type: "+b);k=l.a.Short}return Object(i.j)(E,p,g,v,k,e)},cancelOrder:function(r,o,c,f,h){a.updateDynamicRam("cancelOrder",Object(n.c)(t,"stock","cancelOrder"));const d=a.string("cancelOrder","symbol",r),p=a.number("cancelOrder","shares",o),g=a.number("cancelOrder","price",c),y=a.string("cancelOrder","type",f),b=a.string("cancelOrder","pos",h);if(u("cancelOrder"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("cancelOrder","You must either be in BitNode-8 or you must have Source-File 8 Level 3.");const E=m(d,"cancelOrder");if(isNaN(p)||isNaN(g))throw a.makeRuntimeErrorMsg("cancelOrder",`Invalid shares or price. Must be numeric. shares=${p}, price=${g}`);let v,k;const _=y.toLowerCase();if(_.includes("limit")&&_.includes("buy"))v=s.a.LimitBuy;else if(_.includes("limit")&&_.includes("sell"))v=s.a.LimitSell;else if(_.includes("stop")&&_.includes("buy"))v=s.a.StopBuy;else{if(!_.includes("stop")||!_.includes("sell"))throw a.makeRuntimeErrorMsg("cancelOrder","Invalid order type: "+y);v=s.a.StopSell}const w=b.toLowerCase();if(w.includes("l"))k=l.a.Long;else{if(!w.includes("s"))throw a.makeRuntimeErrorMsg("cancelOrder","Invalid position type: "+b);k=l.a.Short}const S={stock:E,shares:p,price:g,type:v,pos:k};return Object(i.c)(S,e)},getOrders:function(){if(a.updateDynamicRam("getOrders",Object(n.c)(t,"stock","getOrders")),u("getOrders"),8!==t.bitNodeN&&t.sourceFileLvl(8)<=2)throw a.makeRuntimeErrorMsg("getOrders","You must either be in BitNode-8 or have Source-File 8 Level 3.");const e={},r=i.a.Orders;for(const t of Object.keys(r)){const a=r[t];if(a.constructor===Array&&a.length>0){e[t]=[];for(let n=0;n"Already purchased 4S Market Data."),!0):t.money"Not enough money to purchase 4S Market Data."),!1):(t.has4SData=!0,t.loseMoney(Object(f.a)(),"stock"),e.log("stock.purchase4SMarketData",()=>"Purchased 4S Market Data"),!0)},purchase4SMarketDataTixApi:function(){return a.updateDynamicRam("purchase4SMarketDataTixApi",Object(n.c)(t,"stock","purchase4SMarketDataTixApi")),u("purchase4SMarketDataTixApi"),t.has4SDataTixApi?(e.log("stock.purchase4SMarketDataTixApi",()=>"Already purchased 4S Market Data TIX API"),!0):t.money"Not enough money to purchase 4S Market Data TIX API"),!1):(t.has4SDataTixApi=!0,t.loseMoney(Object(f.b)(),"stock"),e.log("stock.purchase4SMarketDataTixApi",()=>"Purchased 4S Market Data TIX API"),!0)},purchaseWseAccount:function(){return a.updateDynamicRam("PurchaseWseAccount",Object(n.c)(t,"stock","purchaseWseAccount")),t.hasWseAccount?(e.log("stock.purchaseWseAccount",()=>"Already purchased WSE Account"),!0):t.money"Not enough money to purchase WSE Account Access"),!1):(t.hasWseAccount=!0,t.loseMoney(Object(f.d)(),"stock"),e.log("stock.purchaseWseAccount",()=>"Purchased WSE Account Access"),!0)},purchaseTixApi:function(){return a.updateDynamicRam("purchaseTixApi",Object(n.c)(t,"stock","purchaseTixApi")),t.hasTixApiAccess?(e.log("stock.purchaseTixApi",()=>"Already purchased TIX API"),!0):t.money"Not enough money to purchase TIX API Access"),!1):(t.hasTixApiAccess=!0,t.loseMoney(Object(f.c)(),"stock"),e.log("stock.purchaseTixApi",()=>"Purchased TIX API"),!0)}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(57),r=a(105),i=a(17),o=a(13),s=a(467),l=a(587),c=a(96);function f(t,e,a){const f=e=>{if(!t.canAccessGrafting())throw a.makeRuntimeErrorMsg("grafting."+e,"You do not currently have access to the Grafting API. This is either because you are not in BitNode 10 or because you do not have Source-File 10")};return{getAugmentationGraftPrice:e=>{const r=a.string("getAugmentationGraftPrice","augName",e);if(a.updateDynamicRam("getAugmentationGraftPrice",Object(o.c)(t,"grafting","getAugmentationGraftPrice")),f("getAugmentationGraftPrice"),!n.a.hasOwnProperty(r))throw a.makeRuntimeErrorMsg("grafting.getAugmentationGraftPrice","Invalid aug: "+r);return new s.a(n.a[r]).cost},getAugmentationGraftTime:e=>{const r=a.string("getAugmentationGraftTime","augName",e);if(a.updateDynamicRam("getAugmentationGraftTime",Object(o.c)(t,"grafting","getAugmentationGraftTime")),f("getAugmentationGraftTime"),!n.a.hasOwnProperty(r))throw a.makeRuntimeErrorMsg("grafting.getAugmentationGraftTime","Invalid aug: "+r);return new s.a(n.a[r]).time},graftAugmentation:(u,m=!0)=>{const h=a.string("graftAugmentation","augName",u),d=a.boolean(m);if(a.updateDynamicRam("graftAugmentation",Object(o.c)(t,"grafting","graftAugmentation")),f("graftAugmentation"),t.city!==i.a.NewTokyo)throw a.makeRuntimeErrorMsg("grafting.graftAugmentation","You must be in New Tokyo to begin crafting an Augmentation.");if(!Object(l.b)(t).includes(h))return e.log("grafting.graftAugmentation",()=>"Invalid aug: "+h),!1;const p=t.focus;if(t.isWorking){const a=t.singularityStopWork();e.log("graftAugmentation",()=>a)}const g=new s.a(n.a[h]);return t.money"You don't have enough money to craft "+h),!1):Object(r.c)(g.augmentation)?(t.loseMoney(g.cost,"augmentations"),t.startGraftAugmentationWork(h,g.time),d?(t.startFocusing(),c.b.toWork()):p&&(t.stopFocusing(),c.b.toTerminal()),e.log("grafting.graftAugmentation",()=>`Began crafting Augmentation ${h}.`),!0):(e.log("grafting.graftAugmentation",()=>"You don't have the pre-requisites for "+h),!1)}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(17),r=a(11),i=a(51);const o=[{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:8.18},name:r.a.AevumAeroCorp,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:8.19},name:r.a.AevumBachmanAndAssociates,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:9.55},name:r.a.AevumClarkeIncorporated,types:[i.a.Company]},{city:n.a.Aevum,costMult:3,expMult:2,name:r.a.AevumCrushFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:37,startingSecurityLevel:17.02},name:r.a.AevumECorp,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:128},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:15.54},name:r.a.AevumFulcrumTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:256},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:7.89},name:r.a.AevumGalacticCybersystems,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:3.29},name:r.a.AevumNetLinkTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:64,techVendorMinRam:8},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:6,startingSecurityLevel:5.35},name:r.a.AevumPolice,types:[i.a.Company]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:5.02},name:r.a.AevumRhoConstruction,types:[i.a.Company]},{city:n.a.Aevum,costMult:10,expMult:5,name:r.a.AevumSnapFitnessGym,types:[i.a.Gym]},{city:n.a.Aevum,costMult:4,expMult:3,name:r.a.AevumSummitUniversity,types:[i.a.University]},{city:n.a.Aevum,infiltrationData:{maxClearanceLevel:7,startingSecurityLevel:5.85},name:r.a.AevumWatchdogSecurity,types:[i.a.Company]},{city:n.a.Aevum,name:r.a.AevumCasino,types:[i.a.Casino]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:16.25},name:r.a.ChongqingKuaiGongInternational,types:[i.a.Company]},{city:n.a.Chongqing,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:12.59},name:r.a.ChongqingSolarisSpaceSystems,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.02},name:r.a.IshimaNovaMedical,types:[i.a.Company]},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.2},name:r.a.IshimaOmegaSoftware,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:128,techVendorMinRam:4},{city:n.a.Ishima,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.38},name:r.a.IshimaStormTechnologies,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:512,techVendorMinRam:32},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:7.18},name:r.a.NewTokyoDefComm,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:20,startingSecurityLevel:5.9},name:r.a.NewTokyoGlobalPharmaceuticals,types:[i.a.Company]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:2.5},name:r.a.NewTokyoNoodleBar,types:[i.a.Company,i.a.Special]},{city:n.a.NewTokyo,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:5.52},name:r.a.NewTokyoVitaLife,types:[i.a.Company,i.a.Special]},{city:n.a.NewTokyo,name:r.a.NewTokyoArcade,types:[i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:10,startingSecurityLevel:3.62},name:r.a.Sector12AlphaEnterprises,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:8,techVendorMinRam:2},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:10.59},name:r.a.Sector12BladeIndustries,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CIA,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.66},name:r.a.Sector12CarmichaelSecurity,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12CityHall,types:[i.a.Special]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12DeltaOne,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12FoodNStuff,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:8.18},name:r.a.Sector12FourSigma,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:17,startingSecurityLevel:6.02},name:r.a.Sector12IcarusMicrosystems,types:[i.a.Company]},{city:n.a.Sector12,expMult:1,costMult:1,name:r.a.Sector12IronGym,types:[i.a.Gym]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:5,startingSecurityLevel:3.13},name:r.a.Sector12JoesGuns,types:[i.a.Company]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:31,startingSecurityLevel:16.36},name:r.a.Sector12MegaCorp,types:[i.a.Company]},{city:n.a.Sector12,name:r.a.Sector12NSA,types:[i.a.Company,i.a.Special]},{city:n.a.Sector12,costMult:20,expMult:10,name:r.a.Sector12PowerhouseGym,types:[i.a.Gym]},{city:n.a.Sector12,costMult:3,expMult:2,name:r.a.Sector12RothmanUniversity,types:[i.a.University]},{city:n.a.Sector12,infiltrationData:{maxClearanceLevel:12,startingSecurityLevel:5.9},name:r.a.Sector12UniversalEnergy,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:3.59},name:r.a.VolhavenCompuTek,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:256,techVendorMinRam:8},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:7.28},name:r.a.VolhavenHeliosLabs,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:15,startingSecurityLevel:4.35},name:r.a.VolhavenLexoCorp,types:[i.a.Company]},{city:n.a.Volhaven,costMult:7,expMult:4,name:r.a.VolhavenMilleniumFitnessGym,types:[i.a.Gym]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:50,startingSecurityLevel:8.53},name:r.a.VolhavenNWO,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:25,startingSecurityLevel:7.74},name:r.a.VolhavenOmniTekIncorporated,types:[i.a.Company,i.a.TechVendor],techVendorMaxRam:1024,techVendorMinRam:128},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:22,startingSecurityLevel:6},name:r.a.VolhavenOmniaCybersystems,types:[i.a.Company]},{city:n.a.Volhaven,infiltrationData:{maxClearanceLevel:18,startingSecurityLevel:4.77},name:r.a.VolhavenSysCoreSecurities,types:[i.a.Company]},{city:n.a.Volhaven,costMult:5,expMult:4,name:r.a.VolhavenZBInstituteOfTechnology,types:[i.a.University]},{city:null,name:r.a.Hospital,types:[i.a.Hospital]},{city:null,name:r.a.Slums,types:[i.a.Slums]},{city:null,name:r.a.TravelAgency,types:[i.a.TravelAgency]},{city:null,name:r.a.WorldStockExchange,types:[i.a.StockMarket]},{city:n.a.Chongqing,name:r.a.ChongqingChurchOfTheMachineGod,types:[i.a.Special]},{city:n.a.Ishima,name:r.a.IshimaGlitch,types:[i.a.Special]}]},,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(2),r=a(253),i=a(26);const o=[["getHackTime","returns milliseconds"],["getGrowTime","returns milliseconds"],["getWeakenTime","returns milliseconds"],["getActionTime","returns milliseconds"],["hackAnalyzePercent","renamed 'hackAnalyze' and returns decimal"],["hackChance","renamed 'hackAnalyzeChance'"],["basic.calculateSkill","renamed 'skills.calculateSkill'"],["basic.calculateExp","renamed 'skills.calculateExp'"],["basic.hackChance","renamed 'hacking.hackChance'"],["basic.hackExp","renamed 'hacking.hackExp'"],["basic.hackPercent","renamed 'hacking.hackPercent'"],["basic.growPercent","renamed 'hacking.growPercent'"],["basic.hackTime","renamed 'hacking.hackTime'"],["basic.growTime","renamed 'hacking.growTime'"],["basic.weakenTime","renamed 'hacking.weakenTime'"],["write","needs to be awaited"],["scp","needs to be awaited"],["sleep","Can no longer be called simultenaously."],["hacking_skill","renamed 'hacking'"],["tryWrite","renamed 'tryWritePort'"]],s=[[/ns.getHackTime/g,"((...a)=>ns.getHackTime(...a)/1000)"],[/ns.getGrowTime/g,"((...a)=>ns.getGrowTime(...a)/1000)"],[/ns.getWeakenTime/g,"((...a)=>ns.getWeakenTime(...a)/1000)"],[/ns.bladeburner.getActionTime/g,"((...a)=>ns.bladeburner.getActionTime(...a)/1000)"],[/ns.hackAnalyzePercent/g,"((...a)=>ns.hackAnalyze(...a)*100)"],[/ns.hackChance/g,"ns.hackAnalyzeChance"],[/ns.tryWrite/g,"ns.tryWritePort"],[/formulas.basic.calculateSkill/g,"formulas.skills.calculateSkill"],[/formulas.basic.calculateExp/g,"formulas.skills.calculateExp"],[/formulas.basic.hackChance/g,"formulas.hacking.hackChance"],[/formulas.basic.hackExp/g,"formulas.hacking.hackExp"],[/formulas.basic.hackPercent/g,"formulas.hacking.hackPercent"],[/formulas.basic.growPercent/g,"formulas.hacking.growPercent"],[/formulas.basic.hackTime/g,"formulas.hacking.hackTime"],[/formulas.basic.growTime/g,"formulas.hacking.growTime"],[/formulas.basic.weakenTime/g,"formulas.hacking.weakenTime"]];function l(t){for(const e of s)if(t.match(e[0]))return!0;return!1}function c(t){const e=t.split("\n"),a=[];for(let t=0;tObject(M.a)({textfield:{borderBottom:"1px solid "+t.palette.primary.main},code:{whiteSpace:"pre",backgroundColor:t.palette.background.paper}}));function R(){const t=A(),e={[T.f.Start]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future... The year is 2077...",r.a.createElement("br",null),r.a.createElement("br",null),"This tutorial will show you the basics of the game. You may skip the tutorial at any time.",r.a.createElement("br",null),r.a.createElement("br",null),"You can also collapse this panel to temporarily hide this tutorial.")),canNext:!0},[T.f.GoToCharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's start by heading to the Stats page. Click"),r.a.createElement(p.a,null,r.a.createElement(y.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Stats")),r.a.createElement(o.a,null,"on the main navigation menu (left-hand side of the screen)")),canNext:!1},[T.f.CharacterPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(y.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Stats")),r.a.createElement(o.a,null,"shows a lot of important information about your progress, such as your skills, money, and bonuses.")),canNext:!0},[T.f.CharacterGoToTerminalPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's head to your computer's terminal by clicking"),r.a.createElement(p.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal")),r.a.createElement(o.a,null,"on the main navigation menu.")),canNext:!1},[T.f.TerminalIntro]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(E.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Terminal")),r.a.createElement(o.a,null,"is used to interface with your home computer as well as all of the other machines around the world.")),canNext:!0},[T.f.TerminalHelp]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"Let's try it out. Start by entering"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"(Don't forget to press Enter after typing the command)")),canNext:!1},[T.f.TerminalLs]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> help"),r.a.createElement(o.a,null,"displays a list of all available Terminal commands, how to use them, and a description of what they do."," ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's try another command. Enter"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> ls")),canNext:!1},[T.f.TerminalScan]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> ls"),r.a.createElement(o.a,null," ","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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan")),canNext:!1},[T.f.TerminalScanAnalyze1]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan"),r.a.createElement(o.a,null,"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"That's great and all, but there's so many servers. Which one should you go to?"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"gives some more detailed information about servers on the network. Try it now!")),canNext:!1},[T.f.TerminalScanAnalyze2]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze"),r.a.createElement(o.a,null,"shows more detailed information about each server that you can connect to (servers that are a distance of one node away). ",r.a.createElement("br",null),r.a.createElement("br",null)," It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the following command:"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze 2")),canNext:!1},[T.f.TerminalConnect]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> connect hostname"),r.a.createElement(o.a,null,"From the results of "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> scan-analyze 2"),r.a.createElement(o.a,null," ","we can see that the n00dles server is only one node away. Let's connect to it now using:"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> connect n00dles")),canNext:!1},[T.f.TerminalAnalyze]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You are now connected to another machine! What can you do now? You can hack it!",r.a.createElement("br",null),r.a.createElement("br",null)," 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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Before you try to hack a server, you should run diagnostics using"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> analyze")),canNext:!1},[T.f.TerminalNuke]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"When "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null,"finishes running it will show useful information about hacking the server. ",r.a.createElement("br",null),r.a.createElement("br",null)," 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."),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> analyze"),r.a.createElement(o.a,null," ","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"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> run NUKE.exe"),r.a.createElement(o.a,null)),canNext:!0},[T.f.TerminalManualHack]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"You now have root access! You can hack the server using "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> hack"),r.a.createElement(o.a,null," Try doing that now.")),canNext:!0},[T.f.TerminalHackingMechanics]:{content:r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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. You will need to use"," ",r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> grow"),"which tricks the company into adding money to their server and"," ",r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> weaken"),"which increases the speed of hack and grow."),canNext:!0},[T.f.TerminalGoHome]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"From any server you can get back home using"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[n00dles ~/]> home"),r.a.createElement(o.a,null,"Let's head home before creating our first script!")),canNext:!0},[T.f.TerminalCreateScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"To create a new script or edit an existing one, you can use"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> nano"),r.a.createElement(o.a,null,"Scripts must end with the .script extension. Let's make a script now by entering "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> nano n00dles.script"),r.a.createElement(o.a,null,"after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)")),canNext:!1},[T.f.TerminalTypeScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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: ",r.a.createElement("br",null)),r.a.createElement(o.a,{classes:{root:t.code}},r.a.createElement(d.a,{value:"while(true) {\n hack('n00dles');\n}"})),r.a.createElement(o.a,null,"For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the n00dles server.",r.a.createElement("br",null),r.a.createElement("br",null),"To save and close the script editor, press the button in the bottom left, or press ctrl + s then ctrl + b.")),canNext:!1},[T.f.TerminalFree]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"To check how much RAM is available on this machine, enter"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> free")),canNext:!1},[T.f.TerminalRunScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using"),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> run n00dles.script")),canNext:!1},[T.f.TerminalGoToActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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). ",r.a.createElement("br",null),r.a.createElement("br",null),"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. ",r.a.createElement("br",null),r.a.createElement("br",null),"Let's check out some statistics for our running scripts by clicking"," "),r.a.createElement(p.a,null,r.a.createElement(C.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Active Scripts"))),canNext:!1},[T.f.ActiveScriptsPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(p.a,null,r.a.createElement(E.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Terminal"))),canNext:!1},[T.f.ActiveScriptsToTerminal]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"," "),r.a.createElement(o.a,{classes:{root:t.textfield}},"[home ~/]> tail n00dles.script")),canNext:!1},[T.f.TerminalTailScript]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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! ",r.a.createElement("br",null),r.a.createElement("br",null),"This covers the basics of hacking. To learn more about writing scripts, select"),r.a.createElement(p.a,null,r.a.createElement(k.a,{color:"primary"}),r.a.createElement(o.a,{color:"primary"},"Tutorial")),r.a.createElement(o.a,null,"in the main navigation menu to look at the documentation.",r.a.createElement("br",null),r.a.createElement("br",null),"If you know even a little bit of programming it is highly recommended you use NS2 instead. You will enjoy the game much more. NS1 files end with .script and are a subset of javascript. NS2 files end with .js and are full speed native javascript.",r.a.createElement("br",null),r.a.createElement("br",null),"You can learn more about the difference between them later in the documentation.",r.a.createElement("br",null),r.a.createElement("br",null),"For now, let's move on to something else!")),canNext:!0},[T.f.GoToHacknetNodesPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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"),r.a.createElement(p.a,null,r.a.createElement(w.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Hacknet")),r.a.createElement(o.a,null,"through the main navigation menu now.")),canNext:!0},[T.f.HacknetNodesIntroduction]:{content:r.a.createElement(o.a,null,"Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),canNext:!0},[T.f.HacknetNodesGoToWorldPage]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Let's go to"),r.a.createElement(p.a,null,r.a.createElement(L.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"City"))),canNext:!0},[T.f.WorldDescription]:{content:r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,null,"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!",r.a.createElement("br",null),r.a.createElement("br",null),"Lastly, click on"),r.a.createElement(p.a,null,r.a.createElement(k.a,{color:"error"}),r.a.createElement(o.a,{color:"error"},"Tutorial"))),canNext:!0},[T.f.TutorialPageInfo]:{content:r.a.createElement(o.a,null,"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!"),canNext:!0},[T.f.End]:{content:r.a.createElement(o.a,null),canNext:!0}},a=Object(n.useState)(!1)[1];function c(){a(t=>!t)}Object(n.useEffect)(()=>h.a.subscribe(c),[]);const u=T.a.currStep,g=e[u];if(void 0===g)throw new Error("error in the tutorial");return r.a.createElement(i.a,{square:!0,sx:{maxWidth:"70vw",p:2}},g.content,u!==T.f.TutorialPageInfo&&r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{onClick:T.d,"aria-label":"previous"},r.a.createElement(m.a,null)),g.canNext&&r.a.createElement(s.a,{onClick:T.c,"aria-label":"next"},r.a.createElement(f.a,null))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:T.b},u!==T.f.TutorialPageInfo?"SKIP TUTORIAL":"FINISH TUTORIAL"))}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return x}));var n=a(0),r=a.n(n),i=a(442),o=a.n(i),s=a(113),l=a(211),c=a(65),f=a(1054),u=a.n(f),m=a(1053),h=a.n(m),d=a(403),p=a.n(d),g=a(1055),y=a.n(g),b=a(30),E=a(27),v=a(9),k=a(21),_=a(1),w=a(10),S=a(173);const C=Object(s.a)({overviewContainer:{position:"fixed",top:0,right:0,zIndex:1500,display:"flex",justifyContent:"flex-end",flexDirection:"column"},header:{cursor:"grab",textAlign:"center",display:"flex",flexDirection:"row",alignItems:"center"},visibilityToggle:{padding:"2px",minWidth:"inherit",backgroundColor:"transparent",border:"none","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.1)"}},collapse:{borderTop:"1px solid "+v.a.theme.welllight,margin:"0 auto"},icon:{fontSize:"24px"}});function x({children:t,mode:e}){const a=Object(n.useRef)(null),[i,s]=Object(n.useState)(v.a.overview.opened),[f,m]=Object(n.useState)(v.a.overview.x),[d,g]=Object(n.useState)(v.a.overview.y),x=C(),L=b.b.Router(),O=i?h.a:u.a,M="tutorial"===e?y.a:p.a,T="tutorial"===e?"Tutorial":"Overview";Object(n.useEffect)(()=>{v.a.overview={x:f,y:d,opened:i}},[i,f,d]),Object(n.useEffect)(()=>A(),[]),Object(n.useEffect)(()=>(window.addEventListener("resize",A),()=>{window.removeEventListener("resize",A)}),[]);const A=Object(S.debounce)(()=>{const t=null==a?void 0:a.current;t&&(R(t,"mouseover"),R(t,"mousedown"),R(document,"mousemove"),R(t,"mouseup"),R(t,"click"))},100),R=(t,e)=>{const a=document.createEvent("MouseEvents");a.initEvent(e,!0,!0),t.dispatchEvent(a)};return L.page()===E.a.BitVerse||L.page()===E.a.Loading||L.page()===E.a.Recovery?r.a.createElement(r.a.Fragment,null):r.a.createElement(o.a,{handle:".drag",bounds:"body",onStop:(t,e)=>{m(e.x),g(e.y)},defaultPosition:{x:f,y:d}},r.a.createElement(c.a,{className:x.overviewContainer,square:!0},r.a.createElement(k.a,{className:"drag",onDoubleClick:()=>s(t=>!t),ref:a},r.a.createElement(k.a,{className:x.header},r.a.createElement(M,{color:"secondary",className:x.icon,sx:{padding:"2px"}}),r.a.createElement(_.a,{flexGrow:1,color:"secondary"},T),r.a.createElement(w.a,{"aria-label":"expand or collapse character overview",variant:"text",size:"small",className:x.visibilityToggle},r.a.createElement(O,{className:x.icon,color:"secondary",onClick:()=>s(t=>!t)})))),r.a.createElement(l.a,{in:i,className:x.collapse},t)))}},,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return jt}));var n=a(0),r=a.n(n),i=a(28),o=a(14),s=a(19),l=a(137),c=a(113),f=a(1751),u=a(286),m=a(672),h=a(23),d=a(1062),p=a.n(d),g=a(1061),y=a.n(g),b=a(74),E=a(146),v=a(107),k=a(1),_=a(211),w=a(785),S=a(1063),C=a.n(S),x=a(346),L=a.n(x),O=a(1064),M=a.n(O),T=a(589),A=a.n(T),R=a(1065),N=a.n(R),P=a(403),I=a.n(P),F=a(1068),D=a.n(F),j=a(593),B=a.n(j),G=a(590),W=a.n(G),H=a(1069),U=a.n(H),q=a(591),$=a.n(q),K=a(1071),z=a.n(K),V=a(1072),Y=a.n(V),J=a(1073),X=a.n(J),Q=a(1074),Z=a.n(Q),tt=a(1075),et=a.n(tt),at=a(1076),nt=a.n(at),rt=a(321),it=a.n(rt),ot=a(294),st=a.n(ot),lt=a(594),ct=a.n(lt),ft=a(1066),ut=a.n(ft),mt=a(1078),ht=a.n(mt),dt=a(1067),pt=a.n(dt),gt=a(1070),yt=a.n(gt),bt=a(1077),Et=a.n(bt),vt=a(156),kt=a.n(vt),_t=a(75),wt=a.n(_t),St=a(27),Ct=a(8),xt=a(44),Lt=a(1057),Ot=a(9),Mt=a(299),Tt=a(15),At=a(404),Rt=a(405),Nt=a(251);const Pt=t=>({width:t.spacing(31),transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.enteringScreen}),overflowX:"hidden"}),It=t=>({transition:t.transitions.create("width",{easing:t.transitions.easing.sharp,duration:t.transitions.duration.leavingScreen}),overflowX:"hidden",width:`calc(${t.spacing(2)} + 1px)`,[t.breakpoints.up("sm")]:{width:`calc(${t.spacing(7)} + 1px)`}}),Ft=Object(s.a)(f.a,{shouldForwardProp:t=>"open"!==t})(({theme:t,open:e})=>({width:t.spacing(31),whiteSpace:"nowrap",boxSizing:"border-box",...e&&{...Pt(t),"& .MuiDrawer-paper":Pt(t)},...!e&&{...It(t),"& .MuiDrawer-paper":It(t)}})),Dt=Object(c.a)(t=>Object(l.a)({active:{borderLeft:"3px solid "+t.palette.primary.main},listitem:{}}));function jt(t){const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(a,200);return()=>clearInterval(t)},[]);const[s,l]=Object(n.useState)(!0),[c,f]=Object(n.useState)(!0),[d,g]=Object(n.useState)(!0),[S,x]=Object(n.useState)(!0),O=xt.a.currStep===xt.f.CharacterGoToTerminalPage||xt.a.currStep===xt.f.ActiveScriptsPage,T=xt.a.currStep===xt.f.GoToCharacterPage,R=xt.a.currStep===xt.f.TerminalGoToActiveScriptsPage,P=xt.a.currStep===xt.f.GoToHacknetNodesPage,F=xt.a.currStep===xt.f.HacknetNodesGoToWorldPage,j=xt.a.currStep===xt.f.WorldDescription,G=t.player.queuedAugmentations.length,H=t.player.factionInvitations.filter(t=>!Rt.b.includes(t)).length,q=Object(Lt.a)(t.player).length-At.b.length,K=t.player.factionInvitations.length>0||t.player.factions.length>0||t.player.augmentations.length>0||t.player.queuedAugmentations.length>0||t.player.sourceFiles.length>0,V=t.player.augmentations.length>0||t.player.queuedAugmentations.length>0||t.player.sourceFiles.length>0,J=t.player.sleeves.length>0,Q=!!t.player.corporation,tt=!!t.player.gang,at=""!==t.player.companyName,rt=t.player.hasWseAccount,ot=!!t.player.bladeburner,lt=t.player.augmentations.some(t=>t.name===Tt.a.StaneksGift1);function ft(){t.router.toTerminal(),O&&Object(xt.c)()}function mt(){t.router.toScriptEditor()}function dt(){t.router.toStats(),T&&Object(xt.c)()}function gt(){t.router.toActiveScripts(),R&&Object(xt.c)()}function bt(){t.router.toCreateProgram()}function vt(){t.router.toFactions()}function _t(){t.router.toAugmentations()}function Pt(){t.router.toHacknetNodes(),P&&Object(xt.c)()}function It(){t.router.toCity(),F&&Object(xt.c)()}function jt(){t.router.toTravel()}function Bt(){t.router.toJob()}function Gt(){t.router.toBladeburner()}function Wt(){t.router.toGang()}function Ht(){t.router.toTutorial(),j&&Object(xt.c)()}Object(n.useEffect)(()=>{function e(e){if(!Ot.a.DisableHotkeys&&!(t.player.isWorking&&t.player.focus||Mt.b))if(e.key===i.a.T&&e.altKey)e.preventDefault(),ft();else if(e.key===i.a.C&&e.altKey)e.preventDefault(),dt();else if(e.key===i.a.E&&e.altKey)e.preventDefault(),mt();else if(e.key===i.a.S&&e.altKey)e.preventDefault(),gt();else if(e.key===i.a.H&&e.altKey)e.preventDefault(),Pt();else if(e.key===i.a.W&&e.altKey)e.preventDefault(),It();else if(e.key===i.a.J&&e.altKey&&!e.ctrlKey&&!e.metaKey&&at)e.preventDefault(),Bt();else if(e.key===i.a.R&&e.altKey)e.preventDefault(),jt();else if(e.key===i.a.P&&e.altKey)e.preventDefault(),bt();else if(e.key===i.a.F&&e.altKey){if(t.page==St.a.Terminal&&Ot.a.EnableBashHotkeys)return;e.preventDefault(),vt()}else e.key===i.a.A&&e.altKey?(e.preventDefault(),_t()):e.key===i.a.U&&e.altKey?(e.preventDefault(),Ht()):e.key===i.a.B&&e.altKey&&t.player.bladeburner?(e.preventDefault(),Gt()):e.key===i.a.G&&e.altKey&&t.player.gang&&(e.preventDefault(),Wt())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[]);const Ut=Dt(),[qt,$t]=Object(n.useState)(t.opened);return Object(n.useEffect)(()=>{t.onToggled(qt)},[qt]),r.a.createElement(Ft,{open:qt,anchor:"left",variant:"permanent"},r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>$t(t=>!t)},r.a.createElement(E.a,null,qt?r.a.createElement(p.a,{color:"primary"}):r.a.createElement(y.a,{color:"primary"})),r.a.createElement(v.a,{primary:r.a.createElement(h.a,{title:Object(Nt.a)()},r.a.createElement(k.a,null,"Bitburner v",Ct.a.VersionString))})),r.a.createElement(m.a,null),r.a.createElement(u.a,null,r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>l(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Hacking"},r.a.createElement(C.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"Hacking")}),s?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:s,timeout:"auto",unmountOnExit:!0},r.a.createElement(u.a,null,r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Terminal",className:Object(o.default)({[Ut.active]:t.page===St.a.Terminal}),onClick:ft},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Terminal"},r.a.createElement(L.a,{color:O?"error":t.page!==St.a.Terminal?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:O?"error":t.page!==St.a.Terminal?"secondary":"primary"},"Terminal"))),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Script Editor",className:Object(o.default)({[Ut.active]:t.page===St.a.ScriptEditor}),onClick:mt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Script Editor"},r.a.createElement(M.a,{color:t.page!==St.a.ScriptEditor?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.ScriptEditor?"secondary":"primary"},"Script Editor"))),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Active Scripts",className:Object(o.default)({[Ut.active]:t.page===St.a.ActiveScripts}),onClick:gt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Active Scripts"},r.a.createElement(A.a,{color:R?"error":t.page!==St.a.ActiveScripts?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:R?"error":t.page!==St.a.ActiveScripts?"secondary":"primary"},"Active Scripts"))),r.a.createElement(b.a,{button:!0,key:"Create Program",className:Object(o.default)({[Ut.active]:t.page===St.a.CreateProgram}),onClick:bt},r.a.createElement(E.a,null,r.a.createElement(w.a,{badgeContent:q>0?q:void 0,color:"error"},r.a.createElement(h.a,{title:qt?"":"Create Program"},r.a.createElement(N.a,{color:t.page!==St.a.CreateProgram?"secondary":"primary"})))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.CreateProgram?"secondary":"primary"},"Create Program"))),lt&&r.a.createElement(b.a,{button:!0,key:"Staneks Gift",className:Object(o.default)({[Ut.active]:t.page===St.a.StaneksGift}),onClick:function(){t.router.toStaneksGift()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Stanek's Gift"},r.a.createElement(ut.a,{color:t.page!==St.a.StaneksGift?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.StaneksGift?"secondary":"primary"},"Stanek's Gift"))))),r.a.createElement(m.a,null),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>f(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Character"},r.a.createElement(pt.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"Character")}),c?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:c,timeout:"auto",unmountOnExit:!0},r.a.createElement(b.a,{button:!0,key:"Stats",className:Object(o.default)({[Ut.active]:t.page===St.a.Stats}),onClick:dt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Stats"},r.a.createElement(I.a,{color:T?"error":t.page!==St.a.Stats?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:T?"error":t.page!==St.a.Stats?"secondary":"primary"},"Stats"))),K&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Factions",className:Object(o.default)({[Ut.active]:[St.a.Factions,St.a.Faction].includes(t.page)}),onClick:vt},r.a.createElement(E.a,null,r.a.createElement(w.a,{badgeContent:0!==H?H:void 0,color:"error"},r.a.createElement(h.a,{title:qt?"":"Factions"},r.a.createElement(D.a,{color:[St.a.Factions,St.a.Faction].includes(t.page)?"primary":"secondary"})))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:[St.a.Factions,St.a.Faction].includes(t.page)?"primary":"secondary"},"Factions"))),V&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Augmentations",className:Object(o.default)({[Ut.active]:t.page===St.a.Augmentations}),onClick:_t},r.a.createElement(E.a,null,r.a.createElement(w.a,{badgeContent:0!==G?G:void 0,color:"error"},r.a.createElement(h.a,{title:qt?"":"Augmentations"},r.a.createElement(B.a,{style:{transform:"rotate(-90deg)"},color:t.page!==St.a.Augmentations?"secondary":"primary"})))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Augmentations?"secondary":"primary"},"Augmentations"))),r.a.createElement(b.a,{button:!0,key:"Hacknet",className:Object(o.default)({[Ut.active]:t.page===St.a.Hacknet}),onClick:Pt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Hacknet"},r.a.createElement(W.a,{color:P?"error":t.page!==St.a.Hacknet?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:P?"error":t.page!==St.a.Hacknet?"secondary":"primary"},"Hacknet"))),J&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Sleeves",className:Object(o.default)({[Ut.active]:t.page===St.a.Sleeves}),onClick:function(){t.router.toSleeves()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Sleeves"},r.a.createElement(U.a,{color:t.page!==St.a.Sleeves?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Sleeves?"secondary":"primary"},"Sleeves")))),r.a.createElement(m.a,null),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>g(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"World"},r.a.createElement(yt.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"World")}),d?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:d,timeout:"auto",unmountOnExit:!0},r.a.createElement(b.a,{button:!0,key:"City",className:Object(o.default)({[Ut.active]:t.page===St.a.City||t.page===St.a.Grafting||t.page===St.a.Location}),onClick:It},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"City"},r.a.createElement($.a,{color:F?"error":t.page!==St.a.City?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:F?"error":t.page!==St.a.City?"secondary":"primary"},"City"))),r.a.createElement(b.a,{button:!0,key:"Travel",className:Object(o.default)({[Ut.active]:t.page===St.a.Travel}),onClick:jt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Travel"},r.a.createElement(z.a,{color:t.page!==St.a.Travel?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Travel?"secondary":"primary"},"Travel"))),at&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Job",className:Object(o.default)({[Ut.active]:t.page===St.a.Job}),onClick:Bt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Job"},r.a.createElement(Y.a,{color:t.page!==St.a.Job?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Job?"secondary":"primary"},"Job"))),rt&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Stock Market",className:Object(o.default)({[Ut.active]:t.page===St.a.StockMarket}),onClick:function(){t.router.toStockMarket()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Stock Market"},r.a.createElement(X.a,{color:t.page!==St.a.StockMarket?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.StockMarket?"secondary":"primary"},"Stock Market"))),ot&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Bladeburner",className:Object(o.default)({[Ut.active]:t.page===St.a.Bladeburner}),onClick:Gt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Bladeburner"},r.a.createElement(Z.a,{color:t.page!==St.a.Bladeburner?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Bladeburner?"secondary":"primary"},"Bladeburner"))),Q&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Corp",className:Object(o.default)({[Ut.active]:t.page===St.a.Corporation}),onClick:function(){t.router.toCorporation()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Corp"},r.a.createElement(et.a,{color:t.page!==St.a.Corporation?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Corporation?"secondary":"primary"},"Corp"))),tt&&r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,key:"Gang",className:Object(o.default)({[Ut.active]:t.page===St.a.Gang}),onClick:Wt},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Gang"},r.a.createElement(nt.a,{color:t.page!==St.a.Gang?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Gang?"secondary":"primary"},"Gang")))),r.a.createElement(m.a,null),r.a.createElement(b.a,{classes:{root:Ut.listitem},button:!0,onClick:()=>x(t=>!t)},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Help"},r.a.createElement(Et.a,{color:"primary"}))),r.a.createElement(v.a,{primary:r.a.createElement(k.a,null,"Help")}),S?r.a.createElement(kt.a,{color:"primary"}):r.a.createElement(wt.a,{color:"primary"})),r.a.createElement(_.a,{in:S,timeout:"auto",unmountOnExit:!0},r.a.createElement(b.a,{button:!0,key:"Milestones",className:Object(o.default)({[Ut.active]:t.page===St.a.Milestones}),onClick:function(){t.router.toMilestones()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Milestones"},r.a.createElement(it.a,{color:t.page!==St.a.Milestones?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Milestones?"secondary":"primary"},"Milestones"))),r.a.createElement(b.a,{button:!0,key:"Tutorial",className:Object(o.default)({[Ut.active]:t.page===St.a.Tutorial}),onClick:Ht},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Tutorial"},r.a.createElement(st.a,{color:j?"error":t.page!==St.a.Tutorial?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:j?"error":t.page!==St.a.Tutorial?"secondary":"primary"},"Tutorial"))),r.a.createElement(b.a,{button:!0,key:"Achievements",className:Object(o.default)({[Ut.active]:t.page===St.a.Achievements}),onClick:function(){t.router.toAchievements()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Achievements"},r.a.createElement(ht.a,{color:t.page!==St.a.Achievements?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Achievements?"secondary":"primary"},"Achievements"))),r.a.createElement(b.a,{button:!0,key:"Options",className:Object(o.default)({[Ut.active]:t.page===St.a.Options}),onClick:function(){t.router.toGameOptions()}},r.a.createElement(E.a,null,r.a.createElement(h.a,{title:qt?"":"Options"},r.a.createElement(ct.a,{color:t.page!==St.a.Options?"secondary":"primary"}))),r.a.createElement(v.a,null,r.a.createElement(k.a,{color:t.page!==St.a.Options?"secondary":"primary"},"Options"))),!1)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(64);function r(t){const e=[];for(const a of Object.keys(n.a)){const r=n.a[a].create;null!=r&&(t.hasProgram(n.a[a].name)||r.req(t)&&e.push(n.a[a]))}return e}},,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(1080),o=a(1081),s=a(1082),l=a(1083),c=a(345),f=a(30),u=a(1),m=a(10),h=a(23),d=a(21),p=a(9),g=a(250);function y(t){const[e,a]=Object(n.useState)(!1),y=f.b.Player(),b=Object(n.useState)(!1)[1];function E(){b(t=>!t)}return Object(n.useEffect)(()=>{const t=setInterval(E,200);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{variant:"h4"},"Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(u.a,null,"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them."),r.a.createElement(u.a,null,"WARNING: Installing your Augmentations resets most of your progress, including:"),r.a.createElement("br",null),r.a.createElement(u.a,null,"- Stats/Skill levels and Experience"),r.a.createElement(u.a,null,"- Money"),r.a.createElement(u.a,null,"- Scripts on every computer but your home computer"),r.a.createElement(u.a,null,"- Purchased servers"),r.a.createElement(u.a,null,"- Hacknet Nodes"),r.a.createElement(u.a,null,"- Faction/Company reputation"),r.a.createElement(u.a,null,"- Stocks"),r.a.createElement("br",null),r.a.createElement(u.a,null,"Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you will lose all programs besides NUKE.exe)")),r.a.createElement(u.a,{variant:"h4",color:"primary"},"Purchased Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(h.a,{title:r.a.createElement(u.a,null,"'I never asked for this'")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:0===y.queuedAugmentations.length,onClick:function(){p.a.SuppressBuyAugmentationConfirmation?t.installAugmentationsFn():a(!0)}},"Install Augmentations"))),r.a.createElement(g.a,{open:e,onClose:()=>a(!1),onConfirm:t.installAugmentationsFn,confirmationText:r.a.createElement(r.a.Fragment,null,"Installing will reset",r.a.createElement("br",null),r.a.createElement("br",null),"- money",r.a.createElement("br",null),"- skill / experience",r.a.createElement("br",null),"- every server except home",r.a.createElement("br",null),"- factions and reputation",r.a.createElement("br",null),r.a.createElement("br",null),"You will keep:",r.a.createElement("br",null),r.a.createElement("br",null),"- All scripts on home",r.a.createElement("br",null),"- home ram and cores",r.a.createElement("br",null),r.a.createElement("br",null),"It is recommended to install several Augmentations at once. Preferably everything from any faction of your choosing.")}),r.a.createElement(h.a,{title:r.a.createElement(u.a,null,"It's always a good idea to backup/export your save!")},r.a.createElement(m.a,{sx:{mx:2},onClick:function(){t.exportGameFn(),E()},color:"error"},"Backup Save ",Object(c.b)()?"(+1 favor to all factions)":"")),r.a.createElement(s.a,null)),r.a.createElement(u.a,{variant:"h4"},"Installed Augmentations"),r.a.createElement(d.a,{mx:2},r.a.createElement(u.a,null,"List of all Augmentations that have been installed. You have gained the effects of these."),r.a.createElement(i.a,null)),r.a.createElement(o.a,null),r.a.createElement(l.a,null))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return S}));var n=a(0),r=a.n(n),i=a(595),o=a(57),s=a(15),l=a(9),c=a(30),f=a(205),u=a(10),m=a(23),h=a(286),d=a(1753),p=a(1754),g=a(21),y=a(65),b=a(330),E=a(107),v=a(1),k=a(211),_=a(8),w=a(24);function S(){const t=Object(n.useState)(!0)[1],e=c.b.Player(),a=e.augmentations.slice();function S(){t(t=>!t)}return l.a.OwnedAugmentationsOrder===f.a.Alphabetically&&a.sort((t,e)=>t.name.localeCompare(e.name)),r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{title:"Sorts the Augmentations alphabetically in numeral order"},r.a.createElement(u.a,{onClick:function(){l.a.OwnedAugmentationsOrder=f.a.Alphabetically,S()}},"Sort in Order")),r.a.createElement(m.a,{title:"Sorts the Augmentations based on when you acquired them (same as default)"},r.a.createElement(u.a,{sx:{mx:2},onClick:function(){l.a.OwnedAugmentationsOrder=f.a.AcquirementTime,S()}},"Sort by Acquirement Time")),r.a.createElement(h.a,{dense:!0},e.entropy>0&&(()=>{const[t,a]=Object(n.useState)(!1);return r.a.createElement(g.a,{component:y.a},r.a.createElement(b.a,{onClick:()=>a(t=>!t)},r.a.createElement(E.a,{primary:r.a.createElement(v.a,{color:l.a.theme.hp,style:{whiteSpace:"pre-wrap"}},"Entropy Virus - Level ",e.entropy)}),t?r.a.createElement(d.a,{sx:{color:l.a.theme.hp}}):r.a.createElement(p.a,{sx:{color:l.a.theme.hp}})),r.a.createElement(k.a,{in:t,unmountOnExit:!0},r.a.createElement(g.a,{m:4},r.a.createElement(v.a,{color:l.a.theme.hp},r.a.createElement("b",null,"All multipliers decreased by:")," ",Object(w.d)(100*(1-_.a.EntropyEffect**e.entropy),3),"% (multiplicative)"))))})(),a.map(t=>{const e=o.a[t.name];let a=null;return t.name===s.a.NeuroFluxGovernor&&(a=t.level),r.a.createElement(i.a,{key:e.name,aug:e,level:a})})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a(2),i=a(4),o=a(57),s=a(43),l=a(145),c=a(45),f=a(1),u=a(21),m=a(6);function h({r:t,m:e}){return t?n.createElement(n.Fragment,null,n.createElement(s.b,{key:"2"},n.createElement(f.a,null," ","=>"," ")),n.createElement(s.b,{key:"3"},n.createElement(f.a,null,i.a.formatPercentage(t)," ",n.createElement(d,{base:t,mult:e})))):n.createElement(n.Fragment,null)}function d(t){return 1===t.mult?n.createElement(n.Fragment,null):n.createElement(n.Fragment,null,"(",i.a.formatPercentage(t.base*t.mult),")")}function p({rows:t}){return n.createElement(s.a,{size:"small",padding:"none"},n.createElement(l.a,null,t.map(t=>n.createElement(c.a,{key:t[0]},n.createElement(s.b,{key:"0"},n.createElement(f.a,{noWrap:!0},t[0]," multiplier: ")),n.createElement(s.b,{key:"1",style:{textAlign:"right"}},n.createElement(f.a,{noWrap:!0},i.a.formatPercentage(t[1])," ",n.createElement(d,{base:t[1],mult:t[3]}))),n.createElement(h,{r:t[2],m:t[3]})))))}function g(){const t=function(){const t={};for(const e of r.a.queuedAugmentations){const a=o.a[e.name];for(const e of Object.keys(a.mults)){const n=t[e]?t[e]:1;t[e]=n*a.mults[e]}}return t}();function e(){return r.a.canAccessBladeburner()?n.createElement(n.Fragment,null,n.createElement(p,{rows:[["Bladeburner Success Chance",r.a.bladeburner_success_chance_mult,r.a.bladeburner_success_chance_mult*t.bladeburner_success_chance_mult,1],["Bladeburner Max Stamina",r.a.bladeburner_max_stamina_mult,r.a.bladeburner_max_stamina_mult*t.bladeburner_max_stamina_mult,1],["Bladeburner Stamina Gain",r.a.bladeburner_stamina_gain_mult,r.a.bladeburner_stamina_gain_mult*t.bladeburner_stamina_gain_mult,1],["Bladeburner Field Analysis",r.a.bladeburner_analysis_mult,r.a.bladeburner_analysis_mult*t.bladeburner_analysis_mult,1]]}),n.createElement("br",null)):n.createElement(n.Fragment,null)}return n.createElement(n.Fragment,null,n.createElement(f.a,{variant:"h4"},"Multipliers"),n.createElement(u.a,{mx:2},n.createElement(p,{rows:[["Hacking Chance ",r.a.hacking_chance_mult,r.a.hacking_chance_mult*t.hacking_chance_mult,1],["Hacking Speed ",r.a.hacking_speed_mult,r.a.hacking_speed_mult*t.hacking_speed_mult,1],["Hacking Money ",r.a.hacking_money_mult,r.a.hacking_money_mult*t.hacking_money_mult,1],["Hacking Growth ",r.a.hacking_grow_mult,r.a.hacking_grow_mult*t.hacking_grow_mult,1]]}),n.createElement("br",null),n.createElement(p,{rows:[["Hacking Level ",r.a.hacking_mult,r.a.hacking_mult*t.hacking_mult,m.a.HackingLevelMultiplier],["Hacking Experience ",r.a.hacking_exp_mult,r.a.hacking_exp_mult*t.hacking_exp_mult,m.a.HackExpGain]]}),n.createElement("br",null),n.createElement(p,{rows:[["Strength Level ",r.a.strength_mult,r.a.strength_mult*t.strength_mult,m.a.StrengthLevelMultiplier],["Strength Experience ",r.a.strength_exp_mult,r.a.strength_exp_mult*t.strength_exp_mult,1]]}),n.createElement("br",null),n.createElement(p,{rows:[["Defense Level ",r.a.defense_mult,r.a.defense_mult*t.defense_mult,m.a.DefenseLevelMultiplier],["Defense Experience ",r.a.defense_exp_mult,r.a.defense_exp_mult*t.defense_exp_mult,1]]}),n.createElement("br",null),n.createElement(p,{rows:[["Dexterity Level ",r.a.dexterity_mult,r.a.dexterity_mult*t.dexterity_mult,m.a.DexterityLevelMultiplier],["Dexterity Experience ",r.a.dexterity_exp_mult,r.a.dexterity_exp_mult*t.dexterity_exp_mult,1]]}),n.createElement("br",null),n.createElement(p,{rows:[["Agility Level ",r.a.agility_mult,r.a.agility_mult*t.agility_mult,m.a.AgilityLevelMultiplier],["Agility Experience ",r.a.agility_exp_mult,r.a.agility_exp_mult*t.agility_exp_mult,1]]}),n.createElement("br",null),n.createElement(p,{rows:[["Charisma Level ",r.a.charisma_mult,r.a.charisma_mult*t.charisma_mult,m.a.CharismaLevelMultiplier],["Charisma Experience ",r.a.charisma_exp_mult,r.a.charisma_exp_mult*t.charisma_exp_mult,1]]}),n.createElement("br",null),n.createElement(p,{rows:[["Hacknet Node production ",r.a.hacknet_node_money_mult,r.a.hacknet_node_money_mult*t.hacknet_node_money_mult,m.a.HacknetNodeMoney],["Hacknet Node purchase cost ",r.a.hacknet_node_purchase_cost_mult,r.a.hacknet_node_purchase_cost_mult*t.hacknet_node_purchase_cost_mult,1],["Hacknet Node RAM upgrade cost ",r.a.hacknet_node_ram_cost_mult,r.a.hacknet_node_ram_cost_mult*t.hacknet_node_ram_cost_mult,1],["Hacknet Node Core purchase cost ",r.a.hacknet_node_core_cost_mult,r.a.hacknet_node_core_cost_mult*t.hacknet_node_core_cost_mult,1],["Hacknet Node level upgrade cost ",r.a.hacknet_node_level_cost_mult,r.a.hacknet_node_level_cost_mult*t.hacknet_node_level_cost_mult,1]]}),n.createElement("br",null),n.createElement(p,{rows:[["Company reputation gain ",r.a.company_rep_mult,r.a.company_rep_mult*t.company_rep_mult,1],["Faction reputation gain ",r.a.faction_rep_mult,r.a.faction_rep_mult*t.faction_rep_mult,m.a.FactionWorkRepGain],["Salary ",r.a.work_money_mult,r.a.work_money_mult*t.work_money_mult,m.a.CompanyWorkMoney]]}),n.createElement("br",null),n.createElement(p,{rows:[["Crime success ",r.a.crime_success_mult,r.a.crime_success_mult*t.crime_success_mult,1],["Crime money ",r.a.crime_money_mult,r.a.crime_money_mult*t.crime_money_mult,m.a.CrimeMoney]]}),n.createElement("br",null),n.createElement(e,null)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a(57),i=a(15),o=a(2),s=a(595),l=a(286);function c(){const t=[];let e=-1;for(let t=o.a.queuedAugmentations.length-1;t>=0;t--)if(o.a.queuedAugmentations[t].name===i.a.NeuroFluxGovernor){e=t;break}for(let a=0;ae(t=>!t)},r.a.createElement(l.a,{primary:r.a.createElement(f.a,{style:{whiteSpace:"pre-wrap"}},"Source-File -1: Exploits in the BitNodes",r.a.createElement("br",null),"Level ",a.length," / ",Object.keys(o.a).length)}),t?r.a.createElement(g.a,{color:"primary"}):r.a.createElement(d.a,{color:"primary"})),r.a.createElement(m.a,{in:t,unmountOnExit:!0},r.a.createElement(c.a,{m:4},r.a.createElement(f.a,null,"This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem."),r.a.createElement(f.a,null,"It increases all of the player's multipliers by 0.1%"),r.a.createElement("br",null),r.a.createElement(f.a,null,"You have found the following exploits:"),r.a.createElement(c.a,{mx:2},a.map(t=>r.a.createElement(f.a,{key:t},"* ",Object(o.b)(t)))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a(2),i=a(9),o=a(205),s=a(363),l=a(1086);function c(){const t=r.a.sourceFiles.slice();return i.a.OwnedAugmentationsOrder===o.a.Alphabetically&&t.sort((t,e)=>t.n-e.n),n.createElement(n.Fragment,null,t.map(t=>{const e="SourceFile"+t.n,a=s.a[e];return null==a?(console.error("Invalid source file number: "+t.n),null):n.createElement(l.a,{key:t.n,level:t.lvl,sf:a})}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(330),o=a(107),s=a(21),l=a(1),c=a(65),f=a(211),u=a(75),m=a.n(u),h=a(156),d=a.n(h);function p(t){const[e,a]=Object(n.useState)(!1),u=12===t.sf.n?"∞":"3";return r.a.createElement(s.a,{component:c.a},r.a.createElement(i.a,{onClick:()=>a(t=>!t)},r.a.createElement(o.a,{primary:r.a.createElement(l.a,{style:{whiteSpace:"pre-wrap"}},t.sf.name,r.a.createElement("br",null),`Level ${t.level} / ${u}`)}),e?r.a.createElement(d.a,{color:"primary"}):r.a.createElement(m.a,{color:"primary"})),r.a.createElement(f.a,{in:e,unmountOnExit:!0},r.a.createElement(s.a,{m:4},r.a.createElement(l.a,null,t.sf.info))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return L}));var n=a(236),r=a(15),i=a(0),o=a.n(i),s=a(1088),l=a(1090),c=a(1092),f=a(1093),u=a(1094),m=a(1095),h=a(1096),d=a(1097),p=a(1098),g=a(1099),y=a(1100),b=a(1101),E=a(1102),v=a(1103),k=a(1104),_=a(1105),w=a(1106),S=a(1110),C=a(1),x=a(106);function L(t){return Object(i.useEffect)(()=>{t.player.giveExploit(x.a.YoureNotMeantToAccessThis)},[]),o.a.createElement(o.a.Fragment,null,o.a.createElement(C.a,null,"Development Menu - Only meant to be used for testing/debugging"),o.a.createElement(s.a,{player:t.player,router:t.router}),o.a.createElement(l.a,{player:t.player}),o.a.createElement(c.a,{player:t.player}),o.a.createElement(f.a,{player:t.player}),o.a.createElement(u.a,{player:t.player}),o.a.createElement(m.a,{player:t.player}),o.a.createElement(h.a,null),o.a.createElement(d.a,null),t.player.bladeburner instanceof n.a&&o.a.createElement(p.a,{player:t.player}),t.player.inGang()&&o.a.createElement(g.a,{player:t.player}),t.player.hasCorporation()&&o.a.createElement(y.a,{player:t.player}),o.a.createElement(b.a,null),t.player.hasWseAccount&&o.a.createElement(E.a,null),t.player.sleeves.length>0&&o.a.createElement(v.a,{player:t.player}),t.player.augmentations.some(t=>t.name===r.a.StaneksGift1)&&o.a.createElement(k.a,null),o.a.createElement(_.a,{player:t.player,engine:t.engine}),o.a.createElement(w.a,{player:t.player,engine:t.engine}),o.a.createElement(S.a,{player:t.player,engine:t.engine}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(20);function h(t){const[e,a]=Object(n.useState)(!1);function l(e){return function(){t.player.gainMoney(e,"other")}}return Object(n.useEffect)(()=>{if(e)throw new ReferenceError("Manually thrown error")},[e]),r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"General")),r.a.createElement(s.a,null,r.a.createElement(u.a,{onClick:l(1e6)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e6}))),r.a.createElement(u.a,{onClick:l(1e9)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e9}))),r.a.createElement(u.a,{onClick:l(1e12)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e12}))),r.a.createElement(u.a,{onClick:l(1e15)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1e15}))),r.a.createElement(u.a,{onClick:l(1/0)},r.a.createElement("pre",null,"+ ",r.a.createElement(m.a,{money:1/0}))),r.a.createElement(u.a,{onClick:function(){t.player.getHomeComputer().maxRam*=2}},"+ RAM"),r.a.createElement("br",null),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!0,!0)}},"Quick b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!0,!1)}},"Run b1t_flum3.exe"),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!1,!0)}},"Quick w0rld_d34m0n"),r.a.createElement(u.a,{onClick:function(){t.router.toBitVerse(!1,!1)}},"Hack w0rld_d34m0n"),r.a.createElement(u.a,{onClick:()=>a(!0)},"Throw Error")))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(127);const h=1e27;function d(t){function e(e,a){return function(n){switch(e){case"hacking":n&&t.player.gainHackingExp(n*a);break;case"strength":n&&t.player.gainStrengthExp(n*a);break;case"defense":n&&t.player.gainDefenseExp(n*a);break;case"dexterity":n&&t.player.gainDexterityExp(n*a);break;case"agility":n&&t.player.gainAgilityExp(n*a);break;case"charisma":n&&t.player.gainCharismaExp(n*a);break;case"intelligence":n&&t.player.gainIntelligenceExp(n*a)}t.player.updateSkillLevels()}}function a(e){return function(a){t.player.karma+=a*e}}function n(e){return function(){switch(e){case"hacking":t.player.hacking_exp=0;break;case"strength":t.player.strength_exp=0;break;case"defense":t.player.defense_exp=0;break;case"dexterity":t.player.dexterity_exp=0;break;case"agility":t.player.agility_exp=0;break;case"charisma":t.player.charisma_exp=0;break;case"intelligence":t.player.intelligence_exp=0}t.player.updateSkillLevels()}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Experience / Stats")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.gainHackingExp(h),t.player.gainStrengthExp(h),t.player.gainDefenseExp(h),t.player.gainDexterityExp(h),t.player.gainAgilityExp(h),t.player.gainCharismaExp(h),t.player.gainIntelligenceExp(h),t.player.updateSkillLevels()}},"Tons of exp"),r.a.createElement(u.a,{onClick:function(){t.player.hacking_exp=0,t.player.strength_exp=0,t.player.defense_exp=0,t.player.dexterity_exp=0,t.player.agility_exp=0,t.player.charisma_exp=0,t.player.intelligence_exp=0,t.player.updateSkillLevels()}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Hacking:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"hacking",placeholder:"exp",tons:()=>e("hacking",1)(h),add:e("hacking",1),subtract:e("hacking",-1),reset:n("hacking")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Strength:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"strength",placeholder:"exp",tons:()=>e("strength",1)(h),add:e("strength",1),subtract:e("strength",-1),reset:n("strength")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Defense:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"defense",placeholder:"exp",tons:()=>e("defense",1)(h),add:e("defense",1),subtract:e("defense",-1),reset:n("defense")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Dexterity:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"dexterity",placeholder:"exp",tons:()=>e("dexterity",1)(h),add:e("dexterity",1),subtract:e("dexterity",-1),reset:n("dexterity")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Agility:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"agility",placeholder:"exp",tons:()=>e("agility",1)(h),add:e("agility",1),subtract:e("agility",-1),reset:n("agility")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Charisma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"charisma",placeholder:"exp",tons:()=>e("charisma",1)(h),add:e("charisma",1),subtract:e("charisma",-1),reset:n("charisma")}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Intelligence:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"intelligence",placeholder:"exp",tons:()=>e("intelligence",1)(h),add:e("intelligence",1),subtract:e("intelligence",-1),reset:n("intelligence")})),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){0===t.player.intelligence&&(t.player.intelligence=1,t.player.updateSkillLevels())}},"Enable")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.intelligence_exp=0,t.player.intelligence=0,t.player.updateSkillLevels()}},"Disable"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Karma:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"karma",placeholder:"amt",tons:()=>e("intelligence",1)(1e5),add:a(1),subtract:a(-1),reset:function(){t.player.karma=0}})))))))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return S}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(128),h=a(127),d=a(29),p=a(1451),g=a(79),y=a(114),b=a(599),E=a.n(b),v=a(366),k=a.n(v),_=a(1452),w=a(5);function S(t){const[e,a]=Object(n.useState)(w.a.Illuminati);function l(t){return function(a){const n=d.a[e];null==n||isNaN(a)||(n.playerReputation+=a*t)}}function b(t){return function(a){const n=d.a[e];null==n||isNaN(a)||(n.favor+=a*t)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Factions")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Faction:")),r.a.createElement("td",null,r.a.createElement(p.a,null,r.a.createElement(_.a,{id:"factions-select"},"Faction"),r.a.createElement(m.a,{labelId:"factions-select",id:"factions-dropdown",onChange:function(t){a(t.target.value)},value:e,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{onClick:function(){Object.values(w.a).forEach(e=>t.player.receiveInvite(e))},size:"large","arial-label":"receive-all-invitation"},r.a.createElement(E.a,null)),r.a.createElement(y.a,{onClick:function(){t.player.receiveInvite(e)},size:"large","arial-label":"receive-one-invitation"},r.a.createElement(k.a,null)))},Object.values(d.a).map(t=>r.a.createElement(g.a,{key:t.name,value:t.name},t.name)))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"reputation",placeholder:"amt",tons:()=>l(1)(1e12),add:l(1),subtract:l(-1),reset:function(){const t=d.a[e];null!=t&&(t.playerReputation=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(h.a,{label:"favor",placeholder:"amt",tons:()=>b(1)(2e3),add:b(1),subtract:b(-1),reset:function(){const t=d.a[e];null!=t&&(t.favor=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(d.a))d.a[t].favor=0}},"Reset")))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(128),u=a(15),m=a(1),h=a(79),d=a(114),p=a(599),g=a.n(p),y=a(366),b=a.n(y),E=a(598),v=a.n(E);function k(t){const[e,a]=Object(n.useState)("Augmented Targeting I");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(m.a,null,"Augmentations")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,null,"Aug:")),r.a.createElement("td",null,r.a.createElement(f.a,{onChange:function(t){a(t.target.value)},value:e,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){for(const e of Object.values(u.a))t.player.queueAugmentation(e)},size:"large"},r.a.createElement(g.a,null)),r.a.createElement(d.a,{onClick:function(){t.player.queueAugmentation(e)},size:"large"},r.a.createElement(b.a,null))),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:function(){t.player.augmentations=[]},size:"large"},r.a.createElement(v.a,null)))},Object.values(u.a).map(t=>r.a.createElement(h.a,{key:t,value:t},t)))))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(580),h=a(350);const d=[1,2,3,4,5,6,7,8,9,10,11,12,13];function p(t){function e(e,a){return function(){if(9===e&&(t.player.hacknetNodes=[]),0!==a)if(t.player.sourceFiles.some(t=>t.n===e))for(let n=0;nt.n!==e)}}function a(t){return()=>{for(let a=0;ar.a.createElement("tr",{key:"sf-"+t},r.a.createElement("td",null,r.a.createElement(f.a,null,"SF-",t,":")),r.a.createElement("td",null,r.a.createElement(h.a,null,r.a.createElement(u.a,{onClick:e(t,0)},"0"),r.a.createElement(u.a,{onClick:e(t,1)},"1"),r.a.createElement(u.a,{onClick:e(t,2)},"2"),r.a.createElement(u.a,{onClick:e(t,3)},"3")))))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(128),h=a(64),d=a(79);function p(t){const[e,a]=Object(n.useState)("NUKE.exe");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Programs")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Program:")),r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(t){a(t.target.value)},value:e},Object.values(h.a).map(t=>r.a.createElement(d.a,{key:t.name,value:t.name},t.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Add:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.hasProgram(e)||t.player.getHomeComputer().programs.push(e)}},"One"),r.a.createElement(u.a,{onClick:function(){for(const e of Object.keys(h.a))t.player.hasProgram(h.a[e].name)||t.player.getHomeComputer().programs.push(h.a[e].name)}},"All")))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(128),h=a(26),d=a(47),p=a(79);function g(){const[t,e]=Object(n.useState)("home");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Servers")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Server:")),r.a.createElement("td",{colSpan:2},r.a.createElement(m.a,{id:"dev-servers-dropdown",onChange:function(t){e(t.target.value)},value:t},Object(h.c)().map(t=>r.a.createElement(p.a,{key:t.hostname,value:t.hostname},t.hostname))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Root:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.hasAdminRights=!0,e.sshPortOpen=!0,e.ftpPortOpen=!0,e.smtpPortOpen=!0,e.httpPortOpen=!0,e.sqlPortOpen=!0,e.openPortCount=5)}},"Root one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.hasAdminRights=!0,t.sshPortOpen=!0,t.ftpPortOpen=!0,t.smtpPortOpen=!0,t.httpPortOpen=!0,t.sqlPortOpen=!0,t.openPortCount=5}}},"Root all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Security:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.hackDifficulty=e.minDifficulty)}},"Min one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.hackDifficulty=t.minDifficulty}}},"Min all"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Money:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.moneyAvailable=0)}},"Min one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.moneyAvailable=0}}},"Min all")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const e=Object(h.d)(t);null!==e&&e instanceof d.a&&(e.moneyAvailable=e.moneyMax)}},"Max one")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object(h.c)()){if(!(t instanceof d.a))return;t.moneyAvailable=t.moneyMax}}},"Max all")))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(128),h=a(66),d=a(79),p=a(127),g=a(5);function y(){const[t,e]=Object(n.useState)(g.a.ECorp);function a(e){return function(a){const n=h.a[t];null==n||isNaN(a)||(n.playerReputation+=a*e)}}function l(e){return function(a){const n=h.a[t];null==n||isNaN(a)||(n.favor+=a*e)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Companies")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Company:")),r.a.createElement("td",{colSpan:3},r.a.createElement(m.a,{id:"dev-companies-dropdown",onChange:function(t){e(t.target.value)},value:t},Object.values(h.a).map(t=>r.a.createElement(d.a,{key:t.name,value:t.name},t.name))))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Reputation:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"reputation",placeholder:"amt",tons:()=>a(1)(1e12),add:a(1),subtract:a(-1),reset:function(){h.a[t].playerReputation=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Favor:")),r.a.createElement("td",null,r.a.createElement(p.a,{label:"favor",placeholder:"amt",tons:()=>l(1)(2e3),add:l(1),subtract:l(-1),reset:function(){h.a[t].favor=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Reputation:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].playerReputation=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].playerReputation=0}},"Reset"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"All Favor:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].favor=1e12}},"Tons"),r.a.createElement(u.a,{onClick:function(){for(const t of Object.keys(h.a))h.a[t].favor=0}},"Reset")))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(1),o=a(153),s=a(154),l=a(155),c=a(75),f=a.n(c),u=a(127);function m(t){const e=t.player.bladeburner;if(null===e)return r.a.createElement(r.a.Fragment,null);function a(a){return function(n){e&&e.changeRank(t.player,n*a)}}function n(t){return function(a){e&&(e.storedCycles+=a*t)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(f.a,null)},r.a.createElement(i.a,null,"Bladeburner")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Rank:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"rank",placeholder:"amt",tons:function(){e&&e.changeRank(t.player,1e27)},add:a(1),subtract:a(-1),reset:function(){e&&(e.rank=0,e.maxRank=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){e&&(e.storedCycles+=1e27)},add:n(1),subtract:n(-1),reset:function(){e&&(e.storedCycles=0)}})))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(1),o=a(153),s=a(154),l=a(155),c=a(75),f=a.n(c),u=a(127);function m(t){function e(e){return function(a){t.player.gang&&(t.player.gang.storedCycles+=a*e)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(f.a,null)},r.a.createElement(i.a,null,"Gang")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(i.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(u.a,{label:"cycles",placeholder:"amt",tons:function(){t.player.gang&&(t.player.gang.storedCycles=1e27)},add:e(1),subtract:e(-1),reset:function(){t.player.gang&&(t.player.gang.storedCycles=0)}})))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(127);function h(t){function e(e){return function(a){t.player.corporation&&(t.player.corporation.funds+=a*e)}}function a(e){return function(a){t.player.corporation&&(t.player.corporation.storedCycles+=a*e)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Corporation")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Funds:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"set funds",placeholder:"amt",tons:function(){t.player.corporation&&(t.player.corporation.funds=t.player.corporation.funds+1e27)},add:e(1),subtract:e(-1),reset:function(){t.player.corporation&&(t.player.corporation.funds=t.player.corporation.funds-t.player.corporation.funds)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Cycles:")),r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){t.player.corporation&&(t.player.corporation.storedCycles=1e27)},add:a(1),subtract:a(-1),reset:function(){t.player.corporation&&(t.player.corporation.storedCycles=0)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.corporation&&t.player.corporation.divisions.forEach(t=>{Object.keys(t.products).forEach(e=>{const a=t.products[e];if(void 0===a)throw new Error("Impossible product undefined");a.prog=99.9})})}},"Finish products"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){t.player.corporation&&t.player.corporation.divisions.forEach(t=>{t.sciResearch.qty+=1e10})}},"Tons of research")))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(128),h=a(79),d=a(373),p=a(111);function g(){const[t,e]=Object(n.useState)("Find Largest Prime Factor");return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Coding Contracts")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(u.a,{onClick:d.b},"Generate Random Contract"),r.a.createElement(u.a,{onClick:d.c},"Generate Random Contract on Home Comp"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{onChange:function(t){e(t.target.value)},value:t},Object.values(p.d).map(t=>r.a.createElement(h.a,{key:t.name,value:t.name},t.name))),r.a.createElement(u.a,{onClick:function(){Object(d.a)({problemType:t,server:"home"})}},"Generate Specified Contract Type on Home Comp")))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(81),h=a(20),d=a(16),p=a(101),g=a(148);function y(){const[t,e]=Object(n.useState)(0),[a,l]=Object(n.useState)("");function y(t){const e=a.replace(/\s/g,"");let n=()=>!0;""!==e&&"all"!==e&&(n=function(t){return e.split(",").includes(t)});for(const e of Object.keys(p.a))if(p.a.hasOwnProperty(e)){const a=p.a[e];a instanceof g.a&&n(a.symbol)&&t(a)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Stock Market")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Symbol:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"symbol/'all'",onChange:function(t){l(t.target.value)}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Price:")),r.a.createElement("td",null,r.a.createElement(m.a,{placeholder:"$$$",onChange:function(t){e(parseFloat(t.target.value))}}),r.a.createElement(u.a,{onClick:function(){isNaN(t)||y(e=>{e.price=t})}},"Set"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,null,"Caps:")),r.a.createElement("td",null,r.a.createElement(u.a,{onClick:function(){const t=[];y(e=>{t.push(r.a.createElement("tr",{key:e.symbol},r.a.createElement("td",null,e.symbol),r.a.createElement("td",{style:{textAlign:"right"}},r.a.createElement(h.a,{money:e.cap}))))}),Object(d.a)(r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("th",null,"Stock"),r.a.createElement("th",null,"Price cap")),t)))}},"View stock caps")))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(10),u=a(1),m=a(127);function h(t){function e(e){for(let a=0;ae(1e7),add:e,subtract:e,reset:()=>e(0)})))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(119),o=a(153),s=a(154),l=a(155),c=a(75),f=a.n(c),u=a(1),m=a(127);function h(){function t(t){return function(e){i.b.storedCycles+=e*t}}function e(t){return function(e){i.b.fragments.forEach(a=>a.highestCharge+=e*t)}}return r.a.createElement(o.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(s.a,{expandIcon:r.a.createElement(f.a,null)},r.a.createElement(u.a,null,"Stanek's Gift")),r.a.createElement(l.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{label:"cycles",placeholder:"amt",tons:function(){i.b.storedCycles=1e6},add:t(1),subtract:t(-1),reset:function(){i.b.storedCycles=0}}))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(m.a,{label:"all charge",placeholder:"amt",tons:function(){i.b.fragments.forEach(t=>{t.highestCharge=1e21,t.numCharge=1e21})},add:e(1),subtract:e(-1),reset:function(){i.b.fragments.forEach(t=>{t.highestCharge=0,t.numCharge=0})}})))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(108);function h(t){function e(e){return()=>{t.player.lastUpdate-=e,t.engine._lastUpdate-=e,m.c.saveGame(),setTimeout(()=>location.reload(),1e3)}}return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Time skip")),r.a.createElement(s.a,null,r.a.createElement(u.a,{onClick:e(6e4)},"1 minute"),r.a.createElement(u.a,{onClick:e(36e5)},"1 hour"),r.a.createElement(u.a,{onClick:e(864e5)},"1 day")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(10),m=a(350),h=a(23),d=a(1109),p=a.n(d),g=a(1108),y=a.n(g),b=a(295);function E(t){const[e,a]=Object(n.useState)(t.player.achievements.map(t=>t.ID));return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Achievements")),r.a.createElement(s.a,null,r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null),r.a.createElement("td",null,r.a.createElement(f.a,null,"Achievements:")),r.a.createElement("td",null,r.a.createElement(m.a,null,r.a.createElement(u.a,{onClick:function(){Object.values(b.a).forEach(e=>t.player.giveAchievement(e.ID)),a(t.player.achievements.map(t=>t.ID))}},"Grant All"),r.a.createElement(u.a,{onClick:function(){t.player.achievements=[],a(t.player.achievements.map(t=>t.ID))}},"Clear"),r.a.createElement(u.a,{onClick:function(){t.engine.Counters.achievementsCounter=Number.MAX_VALUE}},"Disable Engine"),r.a.createElement(u.a,{onClick:function(){t.engine.Counters.achievementsCounter=0}},"Enable Engine")))),Object.values(b.a).map(n=>{const i=e.includes(n.ID);return r.a.createElement("tr",{key:"ach-"+n.ID},r.a.createElement("td",null,i?r.a.createElement(h.a,{title:"Achieved"},r.a.createElement(y.a,{color:"primary"})):r.a.createElement(h.a,{title:"Locked"},r.a.createElement(p.a,{color:"secondary"}))),r.a.createElement("td",null,r.a.createElement(h.a,{title:r.a.createElement(r.a.Fragment,null,n.ID,r.a.createElement("br",null),n.Description)},r.a.createElement(f.a,{color:i?"primary":"secondary"},n.Name,":"))),r.a.createElement("td",null,r.a.createElement(m.a,null,r.a.createElement(u.a,{onClick:()=>{return e=n.ID,t.player.giveAchievement(e),void a(t.player.achievements.map(t=>t.ID));var e}},"Grant"),r.a.createElement(u.a,{onClick:()=>{return e=n.ID,t.player.achievements=t.player.achievements.filter(t=>t.ID!==e),void a(t.player.achievements.map(t=>t.ID));var e}},"Clear"))))})))))}},function(t){t.exports=JSON.parse('{"a":{"CYBERSEC":{"ID":"CYBERSEC","Name":"CyberSec","Description":"Join CyberSec."},"NITESEC":{"ID":"NITESEC","Name":"avmnite-02h","Description":"Join NiteSec."},"THE_BLACK_HAND":{"ID":"THE_BLACK_HAND","Name":"I.I.I.I","Description":"Join The Black Hand."},"BITRUNNERS":{"ID":"BITRUNNERS","Name":"run4theh111z","Description":"Join the BitRunners."},"DAEDALUS":{"ID":"DAEDALUS","Name":"fl1ght.exe","Description":"Join Daedalus."},"THE_COVENANT":{"ID":"THE_COVENANT","Name":"The Covenant","Description":"Join The Covenant."},"ILLUMINATI":{"ID":"ILLUMINATI","Name":"Illuminati","Description":"Join the Illuminati."},"BRUTESSH.EXE":{"ID":"BRUTESSH.EXE","Name":"BruteSSH.exe","Description":"Acquire BruteSSH.exe"},"FTPCRACK.EXE":{"ID":"FTPCRACK.EXE","Name":"FTPCrack.exe","Description":"Acquire FTPCrack.exe"},"RELAYSMTP.EXE":{"ID":"RELAYSMTP.EXE","Name":"relaySMTP.exe","Description":"Acquire relaySMTP.exe"},"HTTPWORM.EXE":{"ID":"HTTPWORM.EXE","Name":"HTTPWorm.exe","Description":"Acquire HTTPWorm.exe"},"SQLINJECT.EXE":{"ID":"SQLINJECT.EXE","Name":"SQLInject.exe","Description":"Acquire SQLInject.exe"},"FORMULAS.EXE":{"ID":"FORMULAS.EXE","Name":"Formulas.exe","Description":"Acquire Formulas.exe"},"SF1.1":{"ID":"SF1.1","Name":"Source Genesis","Description":"Acquire SF1.1"},"SF2.1":{"ID":"SF2.1","Name":"Rise of the Underworld","Description":"Acquire SF2.1"},"SF3.1":{"ID":"SF3.1","Name":"Corporatocracy","Description":"Acquire SF3.1"},"SF4.1":{"ID":"SF4.1","Name":"The Singularity","Description":"Acquire SF4.1"},"SF5.1":{"ID":"SF5.1","Name":"Artificial Intelligence","Description":"Acquire SF5.1"},"SF6.1":{"ID":"SF6.1","Name":"Bladeburners","Description":"Acquire SF6.1"},"SF7.1":{"ID":"SF7.1","Name":"Bladeburners 2079","Description":"Acquire SF7.1"},"SF8.1":{"ID":"SF8.1","Name":"Ghost of Wall Street","Description":"Acquire SF8.1"},"SF9.1":{"ID":"SF9.1","Name":"Hacktocracy","Description":"Acquire SF9.1"},"SF10.1":{"ID":"SF10.1","Name":"Digital Carbon","Description":"Acquire SF10.1"},"SF11.1":{"ID":"SF11.1","Name":"The Big Crash","Description":"Acquire SF11.1"},"SF12.1":{"ID":"SF12.1","Name":"The Recursion","Description":"Acquire SF12.1"},"MONEY_1Q":{"ID":"MONEY_1Q","Name":"Here comes the money!","Description":"Have $1Q on your home computer."},"MONEY_M1B":{"ID":"MONEY_M1B","Name":"Massive debt","Description":"Be $1b in debt."},"INSTALL_1":{"ID":"INSTALL_1","Name":"I never asked for this.","Description":"Install your first augmentation."},"INSTALL_100":{"ID":"INSTALL_100","Name":"I asked for this.","Description":"Have 100 augmentation installed at once."},"QUEUE_40":{"ID":"QUEUE_40","Name":"It\'s time to install","Description":"Have 40 augmentation queued at once."},"HACKING_100000":{"ID":"HACKING_100000","Name":"Power Overwhelming","Description":"Achieve 100 000 hacking skill."},"COMBAT_3000":{"ID":"COMBAT_3000","Name":"One punch man","Description":"Achieve 3000 in all combat stats."},"NEUROFLUX_255":{"ID":"NEUROFLUX_255","Name":"Neuroflux is love, Neuroflux is live","Description":"Install Neuroflux Governor level 255"},"NS2":{"ID":"NS2","Name":"Maximum speed!","Description":"Write an ns2 script."},"FROZE":{"ID":"FROZE","Name":"while(true);","Description":"Restart the game using the reload & kill all option because you froze it with an infinite loop."},"RUNNING_SCRIPTS_1000":{"ID":"RUNNING_SCRIPTS_1000","Name":"Need more real life ram","Description":"Run 1000 scripts simultaneously."},"DRAIN_SERVER":{"ID":"DRAIN_SERVER","Name":"Big trouble","Description":"Drain a server of all its money."},"MAX_RAM":{"ID":"MAX_RAM","Name":"Download more ram","Description":"Maximize your home computer ram."},"MAX_CORES":{"ID":"MAX_CORES","Name":"Download more cores?","Description":"Maximize your home computer cores."},"SCRIPTS_30":{"ID":"SCRIPTS_30","Name":"Thank you folders!","Description":"Have 30 scripts on your home computer."},"KARMA_1000000":{"ID":"KARMA_1000000","Name":"Wretched hive of scum and vilany","Description":"Reach -1m karma."},"STOCK_1q":{"ID":"STOCK_1q","Name":"Wolf of wall street.","Description":"Make 1q on the stock market."},"DISCOUNT":{"ID":"DISCOUNT","Name":"Discount!","Description":"Get a discount at Powerhouse Gym by backdooring their server."},"SCRIPT_32GB":{"ID":"SCRIPT_32GB","Name":"You\'ll need upgrade for this one.","Description":"Write a script that costs 32GB per thread."},"FIRST_HACKNET_NODE":{"ID":"FIRST_HACKNET_NODE","Name":"Free money!","Description":"Purchase your first hacknet node."},"30_HACKNET_NODE":{"ID":"30_HACKNET_NODE","Name":"Big network","Description":"Have 30 hacknet nodes."},"MAX_HACKNET_NODE":{"ID":"MAX_HACKNET_NODE","Name":"That\'s the limit","Description":"Maximize a hacknet node."},"HACKNET_NODE_10M":{"ID":"HACKNET_NODE_10M","Name":"The original hacker","Description":"Make 10m from hacknet nodes."},"REPUTATION_10M":{"ID":"REPUTATION_10M","Name":"Well liked","Description":"Reach 10m reputation with a faction."},"DONATION":{"ID":"DONATION","Name":"Donate!","Description":"Unlock donations with a faction."},"TRAVEL":{"ID":"TRAVEL","Name":"World explorer","Description":"Travel anywhere."},"WORKOUT":{"ID":"WORKOUT","Name":"Gains!","Description":"Workout at a gym."},"TOR":{"ID":"TOR","Name":"The Onion Network","Description":"Purchase the TOR router."},"HOSPITALIZED":{"ID":"HOSPITALIZED","Name":"Ouch!","Description":"Go to the hospital."},"GANG":{"ID":"GANG","Name":"Gangster","Description":"Form a gang."},"FULL_GANG":{"ID":"FULL_GANG","Name":"Don","Description":"Recruit all gang members."},"GANG_TERRITORY":{"ID":"GANG_TERRITORY","Name":"Stay out of my territory","Description":"Have 100% of the territory."},"GANG_MEMBER_POWER":{"ID":"GANG_MEMBER_POWER","Name":"One punch guy","Description":"Have a gang member with 10 000 in 1 skill."},"CORPORATION":{"ID":"CORPORATION","Name":"A small 150b loan.","Description":"Create a corporation."},"CORPORATION_BRIBE":{"ID":"CORPORATION_BRIBE","Name":"Lobbying is great!","Description":"Lower your taxes through lobbying."},"CORPORATION_PROD_1000":{"ID":"CORPORATION_PROD_1000","Name":"Streamlined manufacturing","Description":"Have a division with a production multiplier of 1000."},"CORPORATION_EMPLOYEE_3000":{"ID":"CORPORATION_EMPLOYEE_3000","Name":"Small town","Description":"Have a division with 3000 employee."},"CORPORATION_REAL_ESTATE":{"ID":"CORPORATION_REAL_ESTATE","Name":"Own the land","Description":"Expand to the Real Estate division."},"INTELLIGENCE_255":{"ID":"INTELLIGENCE_255","Name":"Smart!","Description":"Reach intelligence 255"},"BLADEBURNER_DIVISION":{"ID":"BLADEBURNER_DIVISION","Name":"Bladeburners","Description":"Join the Bladeburner division."},"BLADEBURNER_OVERCLOCK":{"ID":"BLADEBURNER_OVERCLOCK","Name":"Overclock!","Description":"Reach maximum level of Overclock"},"BLADEBURNER_UNSPENT_100000":{"ID":"BLADEBURNER_UNSPENT_100000","Name":"You should really spent those.","Description":"Have 100 000 unspent bladeburner skill points."},"4S":{"ID":"4S","Name":"4S","Description":"Purchase the 4S market data."},"FIRST_HACKNET_SERVER":{"ID":"FIRST_HACKNET_SERVER","Name":"The improved hacker.","Description":"Purchase your first hacknet server."},"ALL_HACKNET_SERVER":{"ID":"ALL_HACKNET_SERVER","Name":"Full network","Description":"Buy all hacknet servers."},"MAX_HACKNET_SERVER":{"ID":"MAX_HACKNET_SERVER","Name":"That\'s the new limit.","Description":"Maximize a hacknet server."},"HACKNET_SERVER_1B":{"ID":"HACKNET_SERVER_1B","Name":"Not passive anymore","Description":"Make $1b with hacknet servers."},"MAX_CACHE":{"ID":"MAX_CACHE","Name":"What a waste.","Description":"Cap your hashes."},"SLEEVE_8":{"ID":"SLEEVE_8","Name":"You and what army?","Description":"Purchase all duplicate sleeves from The Covenant."},"INDECISIVE":{"ID":"INDECISIVE","Name":"Too many options.","Description":"Spend 1h straight on the bitverse."},"FAST_BN":{"ID":"FAST_BN","Name":"Speed demon.","Description":"Destroy a bitnode in under 2 days."},"CHALLENGE_BN1":{"ID":"CHALLENGE_BN1","Name":"BN1: Challenge","Description":"Destroy BN1 with at most 128GB and 1 core."},"CHALLENGE_BN2":{"ID":"CHALLENGE_BN2","Name":"BN2: Challenge","Description":"Destroy BN2 without forming a gang."},"CHALLENGE_BN3":{"ID":"CHALLENGE_BN3","Name":"BN3: Challenge","Description":"Destroy BN3 without creating corporation."},"CHALLENGE_BN6":{"ID":"CHALLENGE_BN6","Name":"BN6: Challenge","Description":"Destroy BN6 without joining the bladeburner division."},"CHALLENGE_BN7":{"ID":"CHALLENGE_BN7","Name":"BN7: Challenge","Description":"Destroy BN7 without joining the bladeburner division."},"CHALLENGE_BN8":{"ID":"CHALLENGE_BN8","Name":"BN8: Challenge","Description":"Destroy BN8 without purchasing the 4s market data."},"CHALLENGE_BN9":{"ID":"CHALLENGE_BN9","Name":"BN9: Challenge","Description":"Destroy BN9 without using hacknet servers."},"CHALLENGE_BN10":{"ID":"CHALLENGE_BN10","Name":"BN10: Challenge","Description":"Destroy BN10 without using sleeves."},"CHALLENGE_BN12":{"ID":"CHALLENGE_BN12","Name":"BN12: Challenge","Description":"Destroy BN12 50 times."},"BYPASS":{"ID":"BYPASS","Name":"Exploit: bypass","Description":"Circumventing the ram cost of document."},"PROTOTYPETAMPERING":{"ID":"PROTOTYPETAMPERING","Name":"Exploit: prototype tampering","Description":"Tamper with the Numbers prototype."},"UNCLICKABLE":{"ID":"UNCLICKABLE","Name":"Exploit: unclickable","Description":"Click the unclickable."},"UNDOCUMENTEDFUNCTIONCALL":{"ID":"UNDOCUMENTEDFUNCTIONCALL","Name":"Exploit: undocumented","Description":"Call the undocumented function."},"TIMECOMPRESSION":{"ID":"TIMECOMPRESSION","Name":"Exploit: time compression","Description":"Compress time."},"REALITYALTERATION":{"ID":"REALITYALTERATION","Name":"Exploit: reality alteration","Description":"Alter reality."},"N00DLES":{"ID":"N00DLES","Name":"Exploit: noodles","Description":"Harness the power of the noodles."},"EDITSAVEFILE":{"ID":"EDITSAVEFILE","Name":"Exploit: edit","Description":"Acquire the EditSaveFile Source-File -1"},"UNACHIEVABLE":{"ID":"UNACHIEVABLE","Name":"UNACHIEVABLE","Description":"This achievement cannot be unlocked."},"CHALLENGE_BN13":{"ID":"CHALLENGE_BN13","Name":"BN13: Challenge","Description":"Complete BN13 without Stanek\'s Gift."},"DEVMENU":{"ID":"DEVMENU","Name":"Exploit: you\'re not meant to access this","Description":"Open the dev menu."},"RAINBOW":{"ID":"RAINBOW","Name":"Exploit: rainbow","Description":"Make good use of the rainbow."},"TRUE_RECURSION":{"ID":"TRUE_RECURSION","Name":"Exploit: true recursion","Description":"Beat BN1 in megabyteburner 2000."}}}')},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(153),o=a(154),s=a(155),l=a(75),c=a.n(l),f=a(1),u=a(127);function m(t){return r.a.createElement(i.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(o.a,{expandIcon:r.a.createElement(c.a,null)},r.a.createElement(f.a,null,"Entropy")),r.a.createElement(s.a,null,r.a.createElement(u.a,{label:"Set entropy",placeholder:"entropy",add:e=>{t.player.entropy+=e,t.player.applyEntropy(t.player.entropy)},subtract:e=>{t.player.entropy-=e,t.player.applyEntropy(t.player.entropy)},tons:()=>{t.player.entropy+=1e12,t.player.applyEntropy(t.player.entropy)},reset:()=>{t.player.entropy=0,t.player.applyEntropy(t.player.entropy)}})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1112),o=a(1114),s=a(1115),l=a(30),c=a(21);function f(){const t=l.b.Player(),e=l.b.Router(),a=Object(n.useState)(!1)[1];function f(){a(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(f,200);return()=>clearInterval(t)},[]);const u=t.bladeburner;return null===u?r.a.createElement(r.a.Fragment,null):r.a.createElement(c.a,{display:"flex",flexDirection:"column"},r.a.createElement(c.a,{sx:{display:"grid",gridTemplateColumns:"4fr 8fr",p:1}},r.a.createElement(i.a,{bladeburner:u,player:t,router:e}),r.a.createElement(o.a,{bladeburner:u,player:t})),r.a.createElement(s.a,{bladeburner:u,player:t}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return b}));var n=a(0),r=a.n(n),i=a(24),o=a(61),s=a(20),l=a(4),c=a(29),f=a(105),u=a(1113),m=a(1),h=a(23),d=a(21),p=a(10),g=a(65),y=a(5);function b(t){const[e,a]=Object(n.useState)(!1),b=Object(n.useState)(!1)[1],E=t.bladeburner.rank>=o.a.RankNeededForFaction;return Object(n.useEffect)(()=>{const t=setInterval(()=>b(t=>!t),1e3);return()=>clearInterval(t)},[]),r.a.createElement(g.a,{sx:{p:1,overflowY:"auto",overflowX:"hidden",wordBreak:"break-all"}},r.a.createElement(d.a,{sx:{display:"flex",flexDirection:"column",gap:1,maxHeight:"60vh"}},r.a.createElement(d.a,{sx:{alignSelf:"flex-start",width:"100%"}},r.a.createElement(p.a,{onClick:()=>a(!0),sx:{width:"50%"}},"Travel"),r.a.createElement(h.a,{title:E?"":r.a.createElement(m.a,null,"Rank 25 required.")},r.a.createElement("span",null,r.a.createElement(p.a,{disabled:!E,onClick:function(){if(!E)return;const e=c.a[y.a.Bladeburners];e.isMember||Object(f.e)(e),t.router.toFaction(e)},sx:{width:"50%"}},"Faction"))),r.a.createElement(u.a,{open:e,onClose:()=>a(!1),bladeburner:t.bladeburner})),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"Your rank within the Bladeburner division.")},r.a.createElement(m.a,null,"Rank: ",Object(i.d)(t.bladeburner.rank,2)))),r.a.createElement("br",null),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"Performing actions will use up your stamina.",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina is determined primarily by your agility stat.",r.a.createElement("br",null),r.a.createElement("br",null),"Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.",r.a.createElement("br",null),r.a.createElement("br",null),"Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this means your success rate would be multipled by 85% (100 - 15).",r.a.createElement("br",null),r.a.createElement("br",null),"Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")},r.a.createElement(m.a,null,"Stamina: ",Object(i.d)(t.bladeburner.stamina,3)," / ",Object(i.d)(t.bladeburner.maxStamina,3)))),r.a.createElement("br",null),r.a.createElement(m.a,null,"Stamina Penalty: ",Object(i.d)(100*(1-t.bladeburner.calculateStaminaPenalty()),1),"%"),r.a.createElement("br",null),r.a.createElement(m.a,null,"Team Size: ",Object(i.d)(t.bladeburner.teamSize,0)),r.a.createElement(m.a,null,"Team Members Lost: ",Object(i.d)(t.bladeburner.teamLost,0)),r.a.createElement("br",null),r.a.createElement(m.a,null,"Num Times Hospitalized: ",t.bladeburner.numHosp),r.a.createElement(m.a,null,"Money Lost From Hospitalizations: ",r.a.createElement(s.a,{money:t.bladeburner.moneyLost})),r.a.createElement("br",null),r.a.createElement(m.a,null,"Current City: ",t.bladeburner.city),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate population count increases success rate estimates.")},r.a.createElement(m.a,null,"Est. Synthoid Population: ",l.a.formatPopulation(t.bladeburner.getCurrentCity().popEst)))),r.a.createElement("br",null),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.")},r.a.createElement(m.a,null,"Synthoid Communities: ",Object(i.d)(t.bladeburner.getCurrentCity().comms,0)))),r.a.createElement("br",null),r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a chaos level can make contracts and operations harder.")},r.a.createElement(m.a,null,"City Chaos: ",Object(i.d)(t.bladeburner.getCurrentCity().chaos)))),r.a.createElement("br",null),t.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3>15e3&&r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{display:"flex"},r.a.createElement(h.a,{title:r.a.createElement(m.a,null,"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.")},r.a.createElement(m.a,null,"Bonus time:"," ",Object(i.b)(t.bladeburner.storedCycles/o.a.CyclesPerSecond*1e3)))),r.a.createElement("br",null)),r.a.createElement(m.a,null,"Skill Points: ",Object(i.d)(t.bladeburner.skillPoints,0)),r.a.createElement("br",null),r.a.createElement(m.a,null,"Aug. Success Chance mult: ",Object(i.d)(100*t.player.bladeburner_success_chance_mult,1),"%",r.a.createElement("br",null),"Aug. Max Stamina mult: ",Object(i.d)(100*t.player.bladeburner_max_stamina_mult,1),"%",r.a.createElement("br",null),"Aug. Stamina Gain mult: ",Object(i.d)(100*t.player.bladeburner_stamina_gain_mult,1),"%",r.a.createElement("br",null),"Aug. Field Analysis mult: ",Object(i.d)(100*t.player.bladeburner_analysis_mult,1),"%")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(450),o=a(41),s=a(17),l=a(9),c=a(1),f=a(10);function u(t){function e(e){t.bladeburner.city=e,t.onClose()}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,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."),l.a.DisableASCIIArt?Object.values(s.a).map(t=>r.a.createElement(f.a,{key:t,onClick:()=>e(t)},t)):r.a.createElement(i.a,{currentCity:t.bladeburner.city,onTravel:t=>e(t)})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(28),o=a(65),s=a(286),l=a(74),c=a(21),f=a(1),u=a(81),m=a(113),h=a(137);const d=Object(m.a)(t=>Object(h.a)({textfield:{margin:t.spacing(0),width:"100%"},input:{backgroundColor:t.colors.backgroundsecondary},nopadding:{padding:t.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:t.spacing(0)},list:{padding:t.spacing(0),height:"100%"}}));function p(t){return r.a.createElement(l.a,{sx:{p:0}},r.a.createElement(f.a,null,t.content))}function g(t){const e=d(),[a,s]=Object(n.useState)(""),l=Object(n.useState)(!1)[1],m=Object(n.useRef)(null);const[h,p]=Object(n.useState)(t.bladeburner.consoleHistory.length);function g(){l(t=>!t)}return Object(n.useEffect)(()=>{const t=setInterval(g,1e3);return()=>{clearInterval(t)}},[]),r.a.createElement(o.a,{sx:{p:1}},r.a.createElement(c.a,{sx:{height:"60vh",paddingBottom:"8px",display:"flex",alignItems:"stretch",whiteSpace:"pre-wrap"},onClick:function(){m.current&&m.current.focus()}},r.a.createElement(c.a,null,r.a.createElement(y,{entries:[...t.bladeburner.consoleLogs]}))),r.a.createElement(u.a,{classes:{root:e.textfield},autoFocus:!0,tabIndex:1,type:"text",inputRef:m,value:a,onChange:function(t){s(t.target.value)},onKeyDown:function(e){e.key===i.a.ENTER&&(e.preventDefault(),a.length>0&&(t.bladeburner.postToConsole("> "+a),t.bladeburner.executeConsoleCommands(t.player,a),p(t.bladeburner.consoleHistory.length),s("")));const n=t.bladeburner.consoleHistory;if(e.key===i.a.UP_ARROW){let t=h;const a=n.length;if(0===a)return;(t<0||t>a)&&p(a),0!==t&&(t-=1),p(t);const r=n[t];e.currentTarget.value=r,s(r)}if(e.key===i.a.DOWN_ARROW){const t=h,a=n.length;if(0==a)return;if((t<0||t>a)&&p(a),t==a||t==a-1)p(a),e.currentTarget.value="";else{p(h+1);const t=n[h+1];e.currentTarget.value=t,s(t)}}},InputProps:{className:e.input,startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"> ")),spellCheck:!1}}))}function y({entries:t}){const e=Object(n.useRef)(null);return Object(n.useEffect)(()=>{e.current&&(e.current.scrollTop=e.current.scrollHeight)},[t.length]),r.a.createElement(s.a,{sx:{height:"100%",overflow:"auto",p:1},ref:e},t&&t.map((t,e)=>r.a.createElement(p,{key:e,content:t})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(1116),o=a(1120),s=a(1128),l=a(1133),c=a(1137),f=a(536),u=a(248),m=a(21);function h(t){const[e,a]=r.a.useState(0);return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{variant:"fullWidth",value:e,onChange:function(t,e){a(e)}},r.a.createElement(u.a,{label:"General"}),r.a.createElement(u.a,{label:"Contracts"}),r.a.createElement(u.a,{label:"Operations"}),r.a.createElement(u.a,{label:"BlackOps"}),r.a.createElement(u.a,{label:"Skills"})),r.a.createElement(m.a,{sx:{p:1}},0===e&&r.a.createElement(i.a,{bladeburner:t.bladeburner,player:t.player}),1===e&&r.a.createElement(o.a,{bladeburner:t.bladeburner,player:t.player}),2===e&&r.a.createElement(s.a,{bladeburner:t.bladeburner,player:t.player}),3===e&&r.a.createElement(l.a,{bladeburner:t.bladeburner,player:t.player}),4===e&&r.a.createElement(c.a,{bladeburner:t.bladeburner})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a(1117),i=a(1);function o(t){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"These are generic actions that will assist you in your Bladeburner duties."),n.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1118),o=a(257);function s(t){const e=[];for(const t of Object.keys(o.a))o.a.hasOwnProperty(t)&&e.push(o.a[t]);return r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(i.a,{key:e.name,bladeburner:t.bladeburner,action:e,player:t.player})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(42),o=a(192),s=a(24),l=a(1119),c=a(174),f=a(367),u=a(1),m=a(21),h=a(65);function d(t){const e=Object(n.useState)(!1)[1];const a=t.action.name===t.bladeburner.action.name,d=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),p=function(){switch(t.action.name){case"Training":case"Field Analysis":return 30;case"Diplomacy":case"Hyperbolic Regeneration Chamber":case"Incite Violence":return 60;case"Recruitment":return t.bladeburner.getRecruitmentTime(t.player)}return-1}(),g="Recruitment"===t.action.name?Math.max(0,Math.min(t.bladeburner.getRecruitmentSuccessChance(t.player),1)):-1,y=l.a[t.action.name];if(void 0===y)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(h.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{value:t.action.name}),r.a.createElement(u.a,null,"(IN PROGRESS - ",Object(s.d)(d,0)," /"," ",Object(s.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(u.a,null,Object(o.a)({progress:d/t.bladeburner.actionTimeToComplete}))):r.a.createElement(m.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(c.a,{value:t.action.name}),r.a.createElement(f.a,{bladeburner:t.bladeburner,type:i.a[t.action.name],name:t.action.name,rerender:function(){e(t=>!t)}})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,null,y.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,null,"Time Required: ",Object(s.b)(1e3*p),-1!==g&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),"Estimated success chance: ",Object(s.d)(100*g,1),"%")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Training:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Field Analysis":{desc:r.a.createElement(r.a.Fragment,null,"Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Recruitment:{desc:r.a.createElement(r.a.Fragment,null,"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},Diplomacy:{desc:r.a.createElement(r.a.Fragment,null,"Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in your current city.",r.a.createElement("br",null),r.a.createElement("br",null),"Does NOT require stamina.")},"Hyperbolic Regeneration Chamber":{desc:r.a.createElement(r.a.Fragment,null,"Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your wounds and slightly increase your stamina.",r.a.createElement("br",null),r.a.createElement("br",null))},"Incite Violence":{desc:r.a.createElement(r.a.Fragment,null,"Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate additional contracts and operations, at the cost of increased Chaos.")}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a(1121),i=a(1);function o(t){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you to lose HP, which can lead to hospitalization.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money."),n.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1122);function o(t){const e=Object.keys(t.bladeburner.contracts),a=t.bladeburner.contracts;return r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(i.a,{key:e,bladeburner:t.bladeburner,action:a[e],player:t.player})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(42),o=a(192),s=a(24),l=a(1123),c=a(451),f=a(174),u=a(601),m=a(604),h=a(367),d=a(1),p=a(65);function g(t){const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}const g=t.bladeburner.action.type===i.a.Contract&&t.action.name===t.bladeburner.action.name,y=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),b=t.action.getActionTime(t.bladeburner),E=l.a[t.action.name];if(void 0===E)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(p.a,{sx:{my:1,p:1}},g?r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,null,r.a.createElement(f.a,{value:t.action.name})," (IN PROGRESS - ",Object(s.d)(y,0)," /"," ",Object(s.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(d.a,null,Object(o.a)({progress:y/t.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{value:t.action.name}),r.a.createElement(h.a,{bladeburner:t.bladeburner,type:i.a.Contract,name:t.action.name,rerender:a})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{action:t.action,bladeburner:t.bladeburner,isActive:g,rerender:a}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(d.a,null,E.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:t.action,bladeburner:t.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*b),r.a.createElement("br",null),"Contracts remaining: ",Math.floor(t.action.count),r.a.createElement("br",null),"Successes: ",t.action.successes,r.a.createElement("br",null),"Failures: ",t.action.failures),r.a.createElement("br",null),r.a.createElement(m.a,{rerender:a,action:t.action}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Tracking:{desc:r.a.createElement(r.a.Fragment,null,"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.")},"Bounty Hunter":{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.")},Retirement:{desc:r.a.createElement(r.a.Fragment,null,"Hunt down and retire (kill) rogue Synthoids.",r.a.createElement("br",null),r.a.createElement("br",null),"Successfully completing a Retirement contract will lower the population in your current city, and will also increase its chaos level.")}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(600),o=a(1),s=a(23);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves stealth")},i.b)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(600),o=a(1),s=a(23);function l(){return r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"This action involves retirement")},i.a)}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a(1129),i=a(1);function o(t){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more punishing than contracts, but are also more rewarding.",n.createElement("br",null),n.createElement("br",null),"Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.",n.createElement("br",null),n.createElement("br",null),"For operations, you can use a team. You must first recruit team members. Having a larger team will improve your chances of success.",n.createElement("br",null),n.createElement("br",null),"You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience."),n.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1130);function o(t){const e=Object.keys(t.bladeburner.operations),a=t.bladeburner.operations;return r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(i.a,{key:e,bladeburner:t.bladeburner,action:a[e],player:t.player})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(42),o=a(192),s=a(24),l=a(451),c=a(601),f=a(604),u=a(367),m=a(605),h=a(1132),d=a(174),p=a(1),g=a(65);function y(t){const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}const y=t.bladeburner.action.type===i.a.Operation&&t.action.name===t.bladeburner.action.name,b=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),E=t.action.getActionTime(t.bladeburner),v=h.a[t.action.name];if(void 0===v)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(g.a,{sx:{my:1,p:1}},y?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(d.a,{value:t.action.name})," (IN PROGRESS - ",Object(s.d)(b,0)," /"," ",Object(s.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(p.a,null,Object(o.a)({progress:b/t.bladeburner.actionTimeToComplete}))):r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{value:t.action.name}),r.a.createElement(u.a,{bladeburner:t.bladeburner,type:i.a.Operation,name:t.action.name,rerender:a}),r.a.createElement(m.a,{action:t.action,bladeburner:t.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{action:t.action,bladeburner:t.bladeburner,isActive:y,rerender:a}),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,null,v.desc,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{action:t.action,bladeburner:t.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(s.b)(1e3*E),r.a.createElement("br",null),"Operations remaining: ",Math.floor(t.action.count),r.a.createElement("br",null),"Successes: ",t.action.successes,r.a.createElement("br",null),"Failures: ",t.action.failures),r.a.createElement("br",null),r.a.createElement(f.a,{rerender:a,action:t.action}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(16),o=a(41),s=a(1),l=a(10),c=a(81);function f(t){const[e,a]=Object(n.useState)();return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,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."),r.a.createElement(c.a,{autoFocus:!0,type:"number",placeholder:"Team size",value:e,onChange:function(e){const n=parseFloat(e.target.value);n>t.bladeburner.teamSize?a(t.bladeburner.teamSize):a(n)}}),r.a.createElement(l.a,{sx:{mx:2},onClick:function(){if(void 0===e)return;const a=Math.round(e);isNaN(a)||a<0?Object(i.a)("Invalid value entered for number of Team Members (must be numeric, positive)"):t.action.teamCount=a,t.onClose()}},"Confirm"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(0),r=a.n(n);const i={Investigation:{desc:r.a.createElement(r.a.Fragment,null,"As a field agent, investigate and identify Synthoid populations, movements, and operations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Investigation ops will increase the accuracy of your synthoid data.",r.a.createElement("br",null),r.a.createElement("br",null),"You will NOT lose HP from failed Investigation ops.")},"Undercover Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.",r.a.createElement("br",null),r.a.createElement("br",null),"Successful Undercover ops will increase the accuracy of your synthoid data.")},"Sting Operation":{desc:r.a.createElement(r.a.Fragment,null,"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.")},Raid:{desc:r.a.createElement(r.a.Fragment,null,"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.")},"Stealth Retirement Operation":{desc:r.a.createElement(r.a.Fragment,null,"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.")},Assassination:{desc:r.a.createElement(r.a.Fragment,null,"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.")}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a(1134),i=a(1),o=a(5);function s(t){return n.createElement(n.Fragment,null,n.createElement(i.a,null,"Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.",n.createElement("br",null),n.createElement("br",null),n.createElement("b",null,"Your ultimate goal to climb through the ranks of ",o.a.Bladeburners," is to complete all of the Black Ops."),n.createElement("br",null),n.createElement("br",null),"Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses."),n.createElement(r.a,{bladeburner:t.bladeburner,player:t.player}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(269),o=a(1135);function s(t){let e=[];for(const t of Object.keys(i.a))i.a.hasOwnProperty(t)&&e.push(i.a[t]);return e.sort((function(t,e){return t.reqdRank-e.reqdRank})),e=e.filter((a,n)=>!(null==t.bladeburner.blackops[e[n].name]&&0!==n&&null==t.bladeburner.blackops[e[n-1].name])),e=e.reverse(),r.a.createElement(r.a.Fragment,null,e.map(e=>r.a.createElement(o.a,{key:e.name,bladeburner:t.bladeburner,action:e,player:t.player})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(24),o=a(42),s=a(192),l=a(605),c=a(1136),f=a(174),u=a(451),m=a(367),h=a(1),d=a(65);function p(t){const e=Object(n.useState)(!1)[1];if(null!=t.bladeburner.blackops[t.action.name])return r.a.createElement(d.a,{sx:{my:1,p:1}},r.a.createElement(h.a,null,t.action.name," (COMPLETED)"));const a=t.bladeburner.action.type===o.a.BlackOperation&&t.action.name===t.bladeburner.action.name,p=t.action.getActionTime(t.bladeburner),g=t.bladeburner.rank>=t.action.reqdRank,y=Math.min(t.bladeburner.actionTimeCurrent+t.bladeburner.actionTimeOverflow,t.bladeburner.actionTimeToComplete),b=c.a[t.action.name];if(void 0===b)throw new Error("Cannot find data for "+t.action.name);return r.a.createElement(d.a,{sx:{my:1,p:1}},a?r.a.createElement(r.a.Fragment,null,r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{value:t.action.name}),r.a.createElement(h.a,null,"(IN PROGRESS - ",Object(i.d)(y,0)," /"," ",Object(i.d)(t.bladeburner.actionTimeToComplete,0),")"),r.a.createElement(h.a,null,Object(s.a)({progress:y/t.bladeburner.actionTimeToComplete})))):r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{value:t.action.name}),r.a.createElement(m.a,{bladeburner:t.bladeburner,type:o.a.BlackOperation,name:t.action.name,rerender:function(){e(t=>!t)}}),r.a.createElement(l.a,{action:t.action,bladeburner:t.bladeburner})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(h.a,null,b.desc),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(h.a,{color:g?"primary":"error"},"Required Rank: ",Object(i.d)(t.action.reqdRank,0)),r.a.createElement("br",null),r.a.createElement(h.a,null,r.a.createElement(u.a,{action:t.action,bladeburner:t.bladeburner}),r.a.createElement("br",null),"Time Required: ",Object(i.b)(1e3*p)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(5),o=a(17),s=a(59);const l={[s.a.OperationTyphoon]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"The goal of ",s.a.OperationTyphoon," 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.")},[s.a.OperationZero]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"The goal of ",s.a.OperationZero," 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.")},[s.a.OperationX]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that their base of operations is in ",o.a.Ishima,"'s underground sewer systems. Your task is to investigate the sewer systems, and eliminate Samizdat. They must never publish anything again.")},[s.a.OperationTitan]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your goal is to enter and destroy the Bioengineering department's facility in ",o.a.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.")},[s.a.OperationAres]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to intercept the deal. Leave no survivors.")},[s.a.OperationArchangel]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},[s.a.OperationJuggernaut]:{desc:r.a.createElement(r.a.Fragment,null,"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 ",o.a.Sector12,". We also have reason to believe they 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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your mission is to eradicate Juggernaut and his followers.")},[s.a.OperationRedDragon]:{desc:r.a.createElement(r.a.Fragment,null,"The ",i.a.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.",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to infiltrate and destroy the ",i.a.Tetrads,"' base of operations in Los Angeles. Intelligence tells us that their base houses one of their Synthoid manufacturing units.")},[s.a.OperationK]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"We do not have the power or jurisdiction to shut 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.")},[s.a.OperationDeckard]:{desc:r.a.createElement(r.a.Fragment,null,"Despite your success in eliminating VitaLife's new android-replicating technology in ",s.a.OperationK,", 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.",r.a.createElement("br",null),r.a.createElement("br",null),"The goal of ",s.a.OperationDeckard," is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.")},[s.a.OperationTyrell]:{desc:r.a.createElement(r.a.Fragment,null,"A week ago ",i.a.BladeIndustries," reported a small break-in at one of their ",o.a.Aevum," Augmentation storage facilities. We figured out that ",i.a.TheDarkArmy," 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.",r.a.createElement("br",null),r.a.createElement("br",null),"We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt down associated ",i.a.TheDarkArmy," members and eliminate them.")},[s.a.OperationWallace]:{desc:r.a.createElement(r.a.Fragment,null,"Based on information gathered from ",s.a.OperationTyrell,", we've discovered that ",i.a.TheDarkArmy," was well aware that there were Synthoids amongst their ranks. Even worse, we believe that ",i.a.TheDarkArmy," is working together with other criminal organizations such as ",i.a.TheSyndicate," and that they are planning some sort of large-scale takeover of multiple major cities, most notably ",o.a.Aevum,". We suspect that Synthoids have infiltrated the ranks of these criminal factions and are trying to stage another Synthoid uprising.",r.a.createElement("br",null),r.a.createElement("br",null),"The best way to deal with this is to prevent it before it even happens. The goal of ",s.a.OperationWallace," is to destroy ",i.a.TheDarkArmy," and Syndicate factions in ",o.a.Aevum," immediately. Leave no survivors.")},[s.a.OperationShoulderOfOrion]:{desc:r.a.createElement(r.a.Fragment,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.")},[s.a.OperationHyron]:{desc:r.a.createElement(r.a.Fragment,null,"Our intelligence tells us that ",i.a.FulcrumSecretTechnologies," 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.",r.a.createElement("br",null),r.a.createElement("br",null),"I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.",r.a.createElement("br",null),r.a.createElement("br",null),"The research for this project is being conducted at one of ",i.a.FulcrumSecretTechnologies," secret facilities in ",o.a.Aevum,", codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the project lead.")},[s.a.OperationMorpheus]:{desc:r.a.createElement(r.a.Fragment,null,"DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our agents and informants in ",o.a.Chongqing,", 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.",r.a.createElement("br",null),r.a.createElement("br",null),"The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.")},[s.a.OperationIonStorm]:{desc:r.a.createElement(r.a.Fragment,null,"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the ",o.a.Sector12," 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.",r.a.createElement("br",null),r.a.createElement("br",null),"This is a full-scale assault operation to find and retire all of these Synthoids in the ",o.a.Sector12," Slums.")},[s.a.OperationAnnihilus]:{desc:r.a.createElement(r.a.Fragment,null,"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in ",o.a.Aevum,". They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called '",i.a.TheCovenant,"'. We have no prior intelligence about this organization, so you are going in blind.")},[s.a.OperationUltron]:{desc:r.a.createElement(r.a.Fragment,null,i.a.OmniTekIncorporated,", 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.",r.a.createElement("br",null),r.a.createElement("br",null),i.a.OmniTekIncorporated," 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 ",o.a.Volhaven," to form a terrorist group called Ultron.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"Your task is to find and destroy Ultron.")},[s.a.OperationCenturion]:{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"It seems that the universe is not without a sense of irony.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},[s.a.OperationVindictus]:{desc:r.a.createElement(r.a.Fragment,null,"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",r.a.createElement("br",null),r.a.createElement("br",null),"The bits are all around us. The daemons that hold the Node together can manifest themselves in many different ways.",r.a.createElement("br",null),r.a.createElement("br",null),"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)")},[s.a.OperationDaedalus]:{desc:r.a.createElement(r.a.Fragment,null," Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.")}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1138),o=a(61),s=a(24),l=a(1);function c(t){const e=Object(n.useState)(!1)[1],a=t.bladeburner.skillMultipliers;function c(t){return t&&1!==t}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,r.a.createElement("strong",null,"Skill Points: ",Object(s.d)(t.bladeburner.skillPoints,0))),r.a.createElement(l.a,null,"You will gain one skill point every ",o.a.RanksPerSkillPoint," ranks.",r.a.createElement("br",null),"Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative."),c(a.successChanceAll)&&r.a.createElement(l.a,null,"Total Success Chance: x",Object(s.d)(a.successChanceAll,3)),c(a.successChanceStealth)&&r.a.createElement(l.a,null,"Stealth Success Chance: x",Object(s.d)(a.successChanceStealth,3)),c(a.successChanceKill)&&r.a.createElement(l.a,null,"Retirement Success Chance: x",Object(s.d)(a.successChanceKill,3)),c(a.successChanceContract)&&r.a.createElement(l.a,null,"Contract Success Chance: x",Object(s.d)(a.successChanceContract,3)),c(a.successChanceOperation)&&r.a.createElement(l.a,null,"Operation Success Chance: x",Object(s.d)(a.successChanceOperation,3)),c(a.successChanceEstimate)&&r.a.createElement(l.a,null,"Synthoid Data Estimate: x",Object(s.d)(a.successChanceEstimate,3)),c(a.actionTime)&&r.a.createElement(l.a,null,"Action Time: x",Object(s.d)(a.actionTime,3)),c(a.effHack)&&r.a.createElement(l.a,null,"Hacking Skill: x",Object(s.d)(a.effHack,3)),c(a.effStr)&&r.a.createElement(l.a,null,"Strength: x",Object(s.d)(a.effStr,3)),c(a.effDef)&&r.a.createElement(l.a,null,"Defense: x",Object(s.d)(a.effDef,3)),c(a.effDex)&&r.a.createElement(l.a,null,"Dexterity: x",Object(s.d)(a.effDex,3)),c(a.effAgi)&&r.a.createElement(l.a,null,"Agility: x",Object(s.d)(a.effAgi,3)),c(a.effCha)&&r.a.createElement(l.a,null,"Charisma: x",Object(s.d)(a.effCha,3)),c(a.effInt)&&r.a.createElement(l.a,null,"Intelligence: x",Object(s.d)(a.effInt,3)),c(a.stamina)&&r.a.createElement(l.a,null,"Stamina: x",Object(s.d)(a.stamina,3)),c(a.money)&&r.a.createElement(l.a,null,"Contract Money: x",Object(s.d)(a.money,3)),c(a.expGain)&&r.a.createElement(l.a,null,"Exp Gain: x",Object(s.d)(a.expGain,3)),r.a.createElement(i.a,{bladeburner:t.bladeburner,onUpgrade:()=>e(t=>!t)}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a(1139),i=a(224);function o(t){return n.createElement(n.Fragment,null,Object.keys(i.a).map(e=>n.createElement(r.a,{key:e,bladeburner:t.bladeburner,skill:i.a[e],onUpgrade:t.onUpgrade})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(174),o=a(24),s=a(1),l=a(114),c=a(21),f=a(65),u=a(597),m=a.n(u),h=a(515),d=a.n(h);function p(t){const e=t.skill.name;let a=0;t.bladeburner.skills[e]&&!isNaN(t.bladeburner.skills[e])&&(a=t.bladeburner.skills[e]);const n=t.skill.calculateCost(a),u=t.bladeburner.skillPoints>=n,h=!!t.skill.maxLvl&&a>=t.skill.maxLvl;return r.a.createElement(f.a,{sx:{my:1,p:1}},r.a.createElement(c.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(i.a,{variant:"h6",color:"primary",value:t.skill.name}),!u||h?r.a.createElement(l.a,{disabled:!0},r.a.createElement(d.a,null)):r.a.createElement(l.a,{onClick:function(){t.bladeburner.skillPoints{const t=setInterval(()=>h(t=>!t),200);return()=>clearInterval(t)},[]),r.a.createElement(c.a.Gang.Provider,{value:e},r.a.createElement(f.a,{variant:"fullWidth",value:a,onChange:function(t,e){m(e)},sx:{minWidth:"fit-content",maxWidth:"45%"}},r.a.createElement(u.a,{label:"Management"}),r.a.createElement(u.a,{label:"Equipment"}),r.a.createElement(u.a,{label:"Territory"})),0===a&&r.a.createElement(i.a,null),1===a&&r.a.createElement(s.a,null),2===a&&r.a.createElement(o.a,null))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1144),o=a(1146),s=a(139),l=a(1);function c(){const t=Object(s.b)();return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"This page is used to manage your gang members and get an overview of your gang's stats.",r.a.createElement("br",null),r.a.createElement("br",null),"If a gang member is not earning much money or respect, the task that you have assigned to that member might be too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact that your wanted level is too high. Consider assigning a few members to the '",t.isHackingGang?"Ethical Hacking":"Vigilante Justice","' task to lower your wanted level.",r.a.createElement("br",null),r.a.createElement("br",null),"Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing Augmentations, you will automatically be a member of whatever Faction you created your gang with.",r.a.createElement("br",null),r.a.createElement("br",null),"You can also manage your gang programmatically through Netscript using the Gang API"),r.a.createElement("br",null),r.a.createElement(i.a,null),r.a.createElement("br",null),r.a.createElement(o.a,null))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(29),o=a(24),s=a(4),l=a(110),c=a(116),f=a(80),u=a(1145),m=a(139),h=a(1),d=a(23),p=a(21);function g(){const t=Object(m.b)(),e=100*f.a[t.facName].territory;let a;return a=e<=0?Object(o.d)(0,2):e>=100?Object(o.d)(100,2):Object(o.d)(e,2),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"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.")},r.a.createElement(h.a,null,"Respect: ",s.a.formatRespect(t.respect)," (",s.a.formatRespect(5*t.respectGainRate)," / sec)"))),r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"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.")},r.a.createElement(h.a,null,"Wanted Level: ",s.a.formatWanted(t.wanted)," (",s.a.formatWanted(5*t.wantedGainRate)," / sec)"))),r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"Penalty for respect and money gain rates due to Wanted Level")},r.a.createElement(h.a,null,"Wanted Level Penalty: -",Object(o.d)(100*(1-t.getWantedPenalty()),2),"%"))),r.a.createElement(h.a,null,"Money gain rate: ",r.a.createElement(l.a,{money:5*t.moneyGainRate})),r.a.createElement(p.a,{display:"flex"},r.a.createElement(d.a,{title:r.a.createElement(h.a,null,"The percentage of total territory your Gang controls")},r.a.createElement(h.a,null,"Territory: ",a,"%"))),r.a.createElement(h.a,null,"Faction reputation: ",r.a.createElement(c.a,{reputation:i.a[t.facName].playerReputation})),r.a.createElement(u.a,{gang:t}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a(8),i=a(24),o=a(1),s=a(23),l=a(21);function c(t){const e=1e3/r.a._idleSpeed;if(t.gang.storedCycles/e*1e3<=5e3)return n.createElement(n.Fragment,null);const a=t.gang.storedCycles/e*1e3;return n.createElement(l.a,{display:"flex"},n.createElement(s.a,{title:n.createElement(o.a,null,"You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.")},n.createElement(o.a,null,"Bonus time: ",Object(i.b)(a))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(1147),o=a(1156),s=a(139),l=a(81),c=a(21),f=a(342),u=a.n(f),m=a(187);function h(){const t=Object(s.b)(),e=Object(n.useState)(!1)[1],[a,f]=Object(n.useState)(""),[h,d]=Object(n.useState)(!1),p=t.members.filter(t=>t&&t.name.toLowerCase().includes(a)).filter(t=>!h||t.canAscend());return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onRecruit:()=>e(t=>!t)}),r.a.createElement(l.a,{value:a,onChange:t=>{f(t.target.value.toLowerCase())},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(u.a,null),spellCheck:!1},placeholder:"Filter by member name",sx:{m:1,width:"15%"}}),r.a.createElement(m.a,{checked:h,onChange:t=>d(t),text:"Show only ascendable",tooltip:r.a.createElement(r.a.Fragment,null,"Filter the members list by whether or not the member can be ascended.")}),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"repeat(2, 1fr)"}},p.map(t=>r.a.createElement(i.a,{key:t.name,member:t}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1148),o=a(21),s=a(107),l=a(65);function c(t){return r.a.createElement(o.a,{component:l.a,sx:{width:"auto"}},r.a.createElement(o.a,{sx:{m:1}},r.a.createElement(s.a,{primary:r.a.createElement("b",null,t.member.name)}),r.a.createElement(i.a,{member:t.member})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(1149),o=a(1153),s=a(1155),l=a(1457),c=a(10),f=a(1),u=a(294),m=a.n(u),h=a(453);function d(t){const e=Object(n.useState)(!1)[1],[a,u]=Object(n.useState)(!1),[d,p]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,t.member.canAscend()&&r.a.createElement(l.a,{sx:{display:"flex",justifyContent:"space-between",my:1}},r.a.createElement(c.a,{onClick:()=>p(!0),style:{flexGrow:1,borderRightWidth:0}},"Ascend"),r.a.createElement(s.a,{open:d,onClose:()=>p(!1),member:t.member,onAscend:()=>e(t=>!t)}),r.a.createElement(c.a,{onClick:()=>u(!0),style:{width:"fit-content",borderLeftWidth:0}},r.a.createElement(m.a,null)),r.a.createElement(h.a,{open:a,onClose:()=>u(!1)},r.a.createElement(f.a,null,"Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their stat multipliers.",r.a.createElement("br",null),r.a.createElement("br",null),"The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp they have.",r.a.createElement("br",null),r.a.createElement("br",null),"Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect equal to the total respect earned by the member."))),r.a.createElement(l.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%",gap:1}},r.a.createElement(i.a,{member:t.member}),r.a.createElement(o.a,{onTaskChange:()=>e(t=>!t),member:t.member})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(139),o=a(1),s=a(23),l=a(179),c=a(145),f=a(45),u=a(31),m=a(4),h=a(9),d=a(110),p=a(144),g=a(296);function y(t){const e=Object(g.b)(),a={hack:t.member.calculateAscensionMult(t.member.hack_asc_points),str:t.member.calculateAscensionMult(t.member.str_asc_points),def:t.member.calculateAscensionMult(t.member.def_asc_points),dex:t.member.calculateAscensionMult(t.member.dex_asc_points),agi:t.member.calculateAscensionMult(t.member.agi_asc_points),cha:t.member.calculateAscensionMult(t.member.cha_asc_points)},n=Object(i.b)(),y=[["Money:",r.a.createElement(d.a,{money:5*t.member.calculateMoneyGain(n)})],["Respect:",m.a.formatRespect(5*t.member.calculateRespectGain(n))+" / sec"],["Wanted Level:",m.a.formatWanted(5*t.member.calculateWantedLevelGain(n))+" / sec"],["Total Respect:",""+m.a.formatRespect(t.member.earnedRespect)]];return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.a,{title:r.a.createElement(o.a,null,"Hk: x",m.a.formatMultiplier(t.member.hack_mult*a.hack),"(x",m.a.formatMultiplier(t.member.hack_mult)," Eq, x",m.a.formatMultiplier(a.hack)," ","Asc)",r.a.createElement("br",null),"St: x",m.a.formatMultiplier(t.member.str_mult*a.str),"(x",m.a.formatMultiplier(t.member.str_mult)," Eq, x",m.a.formatMultiplier(a.str)," ","Asc)",r.a.createElement("br",null),"Df: x",m.a.formatMultiplier(t.member.def_mult*a.def),"(x",m.a.formatMultiplier(t.member.def_mult)," Eq, x",m.a.formatMultiplier(a.def)," ","Asc)",r.a.createElement("br",null),"Dx: x",m.a.formatMultiplier(t.member.dex_mult*a.dex),"(x",m.a.formatMultiplier(t.member.dex_mult)," Eq, x",m.a.formatMultiplier(a.dex)," ","Asc)",r.a.createElement("br",null),"Ag: x",m.a.formatMultiplier(t.member.agi_mult*a.agi),"(x",m.a.formatMultiplier(t.member.agi_mult)," Eq, x",m.a.formatMultiplier(a.agi)," ","Asc)",r.a.createElement("br",null),"Ch: x",m.a.formatMultiplier(t.member.cha_mult*a.cha),"(x",m.a.formatMultiplier(t.member.cha_mult)," Eq, x",m.a.formatMultiplier(a.cha)," ","Asc)")},r.a.createElement(l.a,{sx:{display:"table",mb:1,width:"100%"}},r.a.createElement(c.a,null,r.a.createElement(p.a,{name:"Hacking",color:h.a.theme.hack,data:{level:t.member.hack,exp:t.member.hack_exp}}),r.a.createElement(p.a,{name:"Strength",color:h.a.theme.combat,data:{level:t.member.str,exp:t.member.str_exp}}),r.a.createElement(p.a,{name:"Defense",color:h.a.theme.combat,data:{level:t.member.def,exp:t.member.def_exp}}),r.a.createElement(p.a,{name:"Dexterity",color:h.a.theme.combat,data:{level:t.member.dex,exp:t.member.dex_exp}}),r.a.createElement(p.a,{name:"Agility",color:h.a.theme.combat,data:{level:t.member.agi,exp:t.member.agi_exp}}),r.a.createElement(p.a,{name:"Charisma",color:h.a.theme.cha,data:{level:t.member.cha,exp:t.member.cha_exp}}),r.a.createElement(f.a,null,r.a.createElement(u.a,{classes:{root:e.cellNone}},r.a.createElement("br",null))),y.map(([t,a])=>r.a.createElement(f.a,{key:t.toString()+a.toString()},r.a.createElement(u.a,{classes:{root:e.cellNone}},r.a.createElement(o.a,null,t)),r.a.createElement(u.a,{align:"right",classes:{root:e.cellNone}},r.a.createElement(o.a,null,a))))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(41),o=a(1),s=a(10);function l(t){return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(o.a,null,"Forcefully kill all running scripts? This will also save your game and reload the game."),r.a.createElement(s.a,{onClick:function(){t.killScripts(),t.onClose()}},"KILL"))}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(139),o=a(1154),s=a(21),l=a(79),c=a(128);function f(t){const e=Object(i.b)(),[a,f]=Object(n.useState)(t.member.task),u=e.members.find(e=>e.name==t.member.name);u&&u.task!=a&&f(u.task);const m=e.getAllTaskNames();return r.a.createElement(s.a,null,r.a.createElement(c.a,{onChange:function(e){const a=e.target.value;t.member.assignToTask(a),f(a),t.onTaskChange()},value:a,sx:{width:"100%"}},r.a.createElement(l.a,{key:0,value:"Unassigned"},"Unassigned"),m.map((t,e)=>r.a.createElement(l.a,{key:e+1,value:t},t))),r.a.createElement(o.a,{member:t.member}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(241),o=a(1);function s(t){const e=i.a[t.member.task],a=e?e.desc:i.a.Unassigned.desc;return r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:a}})}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(4),o=a(16),s=a(41),l=a(139),c=a(1),f=a(10);function u(t){const e=Object(l.b)(),a=Object(n.useState)(!1)[1];Object(n.useEffect)(()=>{const t=setInterval(()=>a(t=>!t),1e3);return()=>clearInterval(t)},[]);const u=t.member.getCurrentAscensionMults(),m=t.member.getAscensionMultsAfterAscend();return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Are you sure you want to ascend this member? They will lose all of",r.a.createElement("br",null),"their non-Augmentation upgrades and their stats will reset back to 1.",r.a.createElement("br",null),r.a.createElement("br",null),"Furthermore, your gang will lose ",i.a.formatRespect(t.member.earnedRespect)," respect",r.a.createElement("br",null),r.a.createElement("br",null),"In return, they will gain the following permanent boost to stat multipliers:",r.a.createElement("br",null),"Hacking: x",i.a.format(u.hack,"0.000")," => x",i.a.format(m.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(u.str,"0.000")," => x",i.a.format(m.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(u.def,"0.000")," => x",i.a.format(m.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(u.dex,"0.000")," => x",i.a.format(m.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(u.agi,"0.000")," => x",i.a.format(m.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(u.cha,"0.000")," => x",i.a.format(m.cha,"0.000"),r.a.createElement("br",null)),r.a.createElement(f.a,{onClick:function(){t.onAscend();const a=e.ascendMember(t.member);Object(o.a)(r.a.createElement(r.a.Fragment,null,"You ascended ",t.member.name,"!",r.a.createElement("br",null),r.a.createElement("br",null),"Your gang lost ",i.a.formatRespect(a.respect)," respect.",r.a.createElement("br",null),r.a.createElement("br",null),t.member.name," gained the following stat multipliers for ascending:",r.a.createElement("br",null),"Hacking: x",i.a.format(a.hack,"0.000"),r.a.createElement("br",null),"Strength: x",i.a.format(a.str,"0.000"),r.a.createElement("br",null),"Defense: x",i.a.format(a.def,"0.000"),r.a.createElement("br",null),"Dexterity: x",i.a.format(a.dex,"0.000"),r.a.createElement("br",null),"Agility: x",i.a.format(a.agi,"0.000"),r.a.createElement("br",null),"Charisma: x",i.a.format(a.cha,"0.000"),r.a.createElement("br",null))),t.onClose()}},"Ascend"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(1157),o=a(252),s=a(4),l=a(139),c=a(1),f=a(10),u=a(21);function m(t){const e=Object(l.b)(),[a,m]=Object(n.useState)(!1);if(e.members.length>=o.a.MaximumGangMembers)return r.a.createElement(r.a.Fragment,null);if(!e.canRecruitMember()){const t=e.getRespectNeededToRecruitMember();return r.a.createElement(u.a,{display:"flex",alignItems:"center",sx:{mx:1}},r.a.createElement(f.a,{disabled:!0},"Recruit Gang Member"),r.a.createElement(c.a,{sx:{ml:1}},s.a.formatRespect(t)," respect needed to recruit next member"))}return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{mx:1}},r.a.createElement(f.a,{onClick:()=>m(!0)},"Recruit Gang Member")),r.a.createElement(i.a,{open:a,onClose:()=>m(!1),onRecruit:t.onRecruit}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(41),o=a(16),s=a(139),l=a(1),c=a(81),f=a(10),u=a(28);function m(t){const e=Object(s.b)(),[a,m]=Object(n.useState)(""),h=""===a||!e.canRecruitMember();function d(){h||(e.recruitMember(a)?(t.onRecruit(),t.onClose()):Object(o.a)("You already have a gang member with this name!"))}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Enter a name for your new Gang member:"),r.a.createElement("br",null),r.a.createElement(c.a,{autoFocus:!0,onKeyUp:function(t){t.key===u.a.ENTER&&d()},onChange:function(t){m(t.target.value)},type:"text",placeholder:"unique name",InputProps:{endAdornment:r.a.createElement(f.a,{disabled:h,onClick:d},"Recruit")}}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(535),o=a(1),s=a(10),l=a(21),c=a(65),f=a(331),u=a(274),m=a(23),h=a(1756),d=a(4),p=a(24),g=a(80),y=a(139),b=a(1159);function E(){const t=Object(y.b)(),e=Object.keys(g.a).filter(e=>e!=t.facName),[a,E]=Object(n.useState)(!1);return r.a.createElement(i.a,{disableGutters:!0,maxWidth:"md",sx:{mx:0}},r.a.createElement(o.a,null,"This page shows how much territory your Gang controls. This statistic is listed as a percentage, which represents how much of the total territory you control."),r.a.createElement(s.a,{onClick:()=>E(!0),sx:{my:1}},r.a.createElement(h.a,{sx:{mr:1}}),"About Gang Territory"),r.a.createElement(l.a,{component:c.a,sx:{p:1,mb:1}},r.a.createElement(o.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},t.facName," (Your gang)"),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.territoryWarfareEngaged,onChange:e=>t.territoryWarfareEngaged=e.target.checked}),label:r.a.createElement(m.a,{title:r.a.createElement(o.a,null,"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%.")},r.a.createElement(o.a,null,"Engage in Territory Warfare"))}),r.a.createElement("br",null),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.notifyMemberDeath,onChange:e=>t.notifyMemberDeath=e.target.checked}),label:r.a.createElement(m.a,{title:r.a.createElement(o.a,null,"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash.")},r.a.createElement(o.a,null,"Notify about Gang Member Deaths"))}),r.a.createElement(o.a,null,r.a.createElement("b",null,"Territory Clash Chance:")," ",d.a.formatPercentage(t.territoryClashChance,3)," ",r.a.createElement("br",null),r.a.createElement("b",null,"Power:")," ",Object(p.d)(g.a[t.facName].power,3)," ",r.a.createElement("br",null),r.a.createElement("b",null,"Territory:")," ",v(g.a[t.facName].territory),"% ",r.a.createElement("br",null))),r.a.createElement(l.a,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)"}},e.map(t=>r.a.createElement(k,{key:t,name:t}))),r.a.createElement(b.a,{open:a,onClose:()=>E(!1)}))}function v(t){const e=100*t;return e<=0?Object(p.d)(0,3):e>=100?Object(p.d)(100,3):Object(p.d)(e,3)}function k(t){const e=Object(y.b)(),a=g.a[e.facName].power,n=g.a[t.name].power,i=a/(n+a);return r.a.createElement(l.a,{component:c.a,sx:{p:1}},r.a.createElement(o.a,{variant:"h6",sx:{display:"flex",alignItems:"center",flexWrap:"wrap"}},t.name),r.a.createElement(o.a,null,r.a.createElement("b",null,"Power:")," ",Object(p.d)(n,3)," ",r.a.createElement("br",null),r.a.createElement("b",null,"Territory:")," ",v(g.a[t.name].territory),"% ",r.a.createElement("br",null),r.a.createElement("b",null,"Clash Win Chance:")," ",d.a.formatPercentage(i,3)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1),o=a(41);const s=({open:t,onClose:e})=>r.a.createElement(o.a,{open:t,onClose:e},r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"h4"},"Clashing"),r.a.createElement(i.a,null,"Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare' task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also loses a small amount of power whenever you lose a clash.",r.a.createElement("br",null),r.a.createElement("br",null),"NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of whether you win or lose the clash. A gang member being killed results in both respect and power loss for your gang."),r.a.createElement("br",null),r.a.createElement(i.a,{variant:"h4"},"Territory"),r.a.createElement(i.a,null,"The amount of territory you have affects all aspects of your Gang members' production, including money, respect, and wanted level. It is very beneficial to have high territory control.",r.a.createElement("br",null),r.a.createElement("br",null),'To increase your chances of winning territory, assign gang members to "Territory Warfare". This will build your gang power. Then, enable "Engage in Territory Warfare" to start fighting over territory.'),r.a.createElement("br",null),r.a.createElement(i.a,{variant:"h4"},"Territory Clash Chance"),r.a.createElement(i.a,null,"This percentage represents the chance you have of 'clashing' with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")))},function(t,e,a){"use strict";a.d(e,"a",(function(){return M}));var n=a(0),r=a.n(n),i=a(139),o=a(1),s=a(10),l=a(23),c=a(21),f=a(65),u=a(128),m=a(179),h=a(145),d=a(79),p=a(81),g=a(342),y=a.n(g),b=a(4),E=a(225),v=a(20),k=a(178),_=a(30),w=a(9),S=a(144);function C(t){const e=Object(i.b)(),a=_.b.Player(),n=Object.keys(E.a).filter(n=>{const r=E.a[n];return!(a.money>e.getUpgradeCost(r))&&(r.type===t.type&&!t.upgrades.includes(n))}).map(t=>E.a[t]);return 0===n.length?r.a.createElement(r.a.Fragment,null):r.a.createElement(o.a,null,"Next at ",r.a.createElement(v.a,{money:n[0].cost}))}function x({upgName:t}){const e=E.a[t];return r.a.createElement(f.a,{sx:{p:1}},r.a.createElement(l.a,{title:r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:e.desc}})},r.a.createElement(o.a,null,e.name)))}function L(t){const e=Object(i.b)(),a=_.b.Player();return r.a.createElement(l.a,{title:r.a.createElement(o.a,{dangerouslySetInnerHTML:{__html:t.upg.desc}})},r.a.createElement("span",null,r.a.createElement(s.a,{onClick:function(){t.member.buyUpgrade(t.upg,a,e),t.rerender()},sx:{display:"flex",flexDirection:"column",width:"100%",height:"100%"}},r.a.createElement(o.a,{sx:{display:"block"}},t.upg.name),r.a.createElement(v.a,{money:e.getUpgradeCost(t.upg)}))))}function O(t){const e=Object(i.b)(),a=_.b.Player(),s=Object(n.useState)(!1)[1],[p,g]=Object(n.useState)("Weapons");function y(){s(t=>!t)}function v(t,n){return Object.keys(E.a).filter(r=>{const i=E.a[r];return!(a.moneyE.a[t])}const O=v(t.member.upgrades,k.a.Weapon),M=v(t.member.upgrades,k.a.Armor),T=v(t.member.upgrades,k.a.Vehicle),A=v(t.member.upgrades,k.a.Rootkit),R=v(t.member.augmentations,k.a.Augmentation),N={Weapons:[O,k.a.Weapon],Armor:[M,k.a.Armor],Vehicles:[T,k.a.Vehicle],Rootkits:[A,k.a.Rootkit],Augmentations:[R,k.a.Augmentation]},P={hack:t.member.calculateAscensionMult(t.member.hack_asc_points),str:t.member.calculateAscensionMult(t.member.str_asc_points),def:t.member.calculateAscensionMult(t.member.def_asc_points),dex:t.member.calculateAscensionMult(t.member.dex_asc_points),agi:t.member.calculateAscensionMult(t.member.agi_asc_points),cha:t.member.calculateAscensionMult(t.member.cha_asc_points)};return r.a.createElement(f.a,null,r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",m:1,gap:1}},r.a.createElement("span",null,r.a.createElement(o.a,{variant:"h5",color:"primary"},t.member.name," (",t.member.task,")"),r.a.createElement(l.a,{title:r.a.createElement(o.a,null,"Hk: x",b.a.formatMultiplier(t.member.hack_mult*P.hack),"(x",b.a.formatMultiplier(t.member.hack_mult)," Eq, x",b.a.formatMultiplier(P.hack)," ","Asc)",r.a.createElement("br",null),"St: x",b.a.formatMultiplier(t.member.str_mult*P.str),"(x",b.a.formatMultiplier(t.member.str_mult)," Eq, x",b.a.formatMultiplier(P.str)," ","Asc)",r.a.createElement("br",null),"Df: x",b.a.formatMultiplier(t.member.def_mult*P.def),"(x",b.a.formatMultiplier(t.member.def_mult)," Eq, x",b.a.formatMultiplier(P.def)," ","Asc)",r.a.createElement("br",null),"Dx: x",b.a.formatMultiplier(t.member.dex_mult*P.dex),"(x",b.a.formatMultiplier(t.member.dex_mult)," Eq, x",b.a.formatMultiplier(P.dex)," ","Asc)",r.a.createElement("br",null),"Ag: x",b.a.formatMultiplier(t.member.agi_mult*P.agi),"(x",b.a.formatMultiplier(t.member.agi_mult)," Eq, x",b.a.formatMultiplier(P.agi)," ","Asc)",r.a.createElement("br",null),"Ch: x",b.a.formatMultiplier(t.member.cha_mult*P.cha),"(x",b.a.formatMultiplier(t.member.cha_mult)," Eq, x",b.a.formatMultiplier(P.cha)," ","Asc)")},r.a.createElement(m.a,null,r.a.createElement(h.a,null,r.a.createElement(S.a,{name:"Hacking",color:w.a.theme.hack,data:{level:t.member.hack,exp:t.member.hack_exp}}),r.a.createElement(S.a,{name:"Strength",color:w.a.theme.combat,data:{level:t.member.str,exp:t.member.str_exp}}),r.a.createElement(S.a,{name:"Defense",color:w.a.theme.combat,data:{level:t.member.def,exp:t.member.def_exp}}),r.a.createElement(S.a,{name:"Dexterity",color:w.a.theme.combat,data:{level:t.member.dex,exp:t.member.dex_exp}}),r.a.createElement(S.a,{name:"Agility",color:w.a.theme.combat,data:{level:t.member.agi,exp:t.member.agi_exp}}),r.a.createElement(S.a,{name:"Charisma",color:w.a.theme.cha,data:{level:t.member.cha,exp:t.member.cha_exp}}))))),r.a.createElement("span",null,r.a.createElement(u.a,{onChange:t=>{g(t.target.value),y()},value:p,sx:{width:"100%",mb:1}},Object.keys(N).map((t,e)=>r.a.createElement(d.a,{key:e+1,value:t},r.a.createElement(o.a,{variant:"h6"},t)))),r.a.createElement(c.a,{sx:{width:"100%"}},0===N[p][0].length&&r.a.createElement(o.a,null,"All upgrades owned!"),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr"}},N[p][0].map(e=>r.a.createElement(L,{key:e.name,rerender:y,member:t.member,upg:e}))),r.a.createElement(C,{type:N[p][1],upgrades:t.member.upgrades})))),r.a.createElement(o.a,{sx:{mx:1}},"Purchased Upgrades: "),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"repeat(4, 1fr)",m:1}},t.member.upgrades.map(t=>r.a.createElement(x,{key:t,upgName:t})),t.member.augmentations.map(t=>r.a.createElement(x,{key:t,upgName:t}))))}function M(){const t=Object(i.b)(),[e,a]=Object(n.useState)(""),s=t.members.filter(t=>t&&t.name.toLowerCase().includes(e));return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{title:r.a.createElement(o.a,null,"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts.")},r.a.createElement(o.a,{sx:{m:1}},"Discount: -",b.a.formatPercentage(1-1/t.getDiscount()))),r.a.createElement(p.a,{value:e,onChange:t=>{a(t.target.value.toLowerCase())},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(y.a,null),spellCheck:!1},placeholder:"Filter by member name",sx:{m:1,width:"15%"}}),r.a.createElement(c.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%"}},s.map(t=>r.a.createElement(O,{key:t.name,member:t}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(1162),o=a(50),s=a(1185),l=a(30),c=a(48),f=a(1186),u=a(536),m=a(248);function h(){const t=l.b.Player().corporation;if(null===t)return r.a.createElement(r.a.Fragment,null);const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}const[h,d]=Object(n.useState)("Overview");Object(n.useEffect)(()=>{const t=setInterval(a,200);return()=>clearInterval(t)},[]);const p=Object.keys(o.a).filter(e=>void 0===t.divisions.find(t=>t.type===e)).length>0;return r.a.createElement(c.a.Corporation.Provider,{value:t},r.a.createElement(u.a,{variant:"scrollable",value:h,onChange:function(t,e){d(e)},sx:{maxWidth:"65%"},scrollButtons:!0},r.a.createElement(m.a,{label:t.name,value:"Overview"}),t.divisions.map(t=>r.a.createElement(m.a,{key:t.name,label:t.name,value:t.name})),p&&r.a.createElement(m.a,{label:"Expand",value:-1})),"Overview"===h&&r.a.createElement(f.a,{rerender:a}),-1===h&&r.a.createElement(s.a,{setDivisionName:d}),"string"==typeof h&&"Overview"!==h&&r.a.createElement(i.a,{rerender:a,divisionName:h+""}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1163),o=a(48),s=a(17);function l(t){const e=Object(o.b)(),a="Overview"!==t.divisionName?e.divisions.find(e=>e.name===t.divisionName):void 0;if(void 0===a)throw new Error("Cannot find division");return r.a.createElement(o.a.Division.Provider,{value:a},r.a.createElement(i.a,{rerender:t.rerender,city:s.a.Sector12}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1164),o=a(1184),s=a(48),l=a(536),c=a(248);function f(t){const e=Object(s.c)(),[a,f]=Object(n.useState)(t.city),u=e.offices[a];if(0===u)return f("Sector-12"),r.a.createElement(r.a.Fragment,null);const m=Object.keys(e.offices).filter(t=>0===e.offices[t]).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"fullWidth",value:a,onChange:function(t,e){f(e)},sx:{maxWidth:"65%"}},Object.values(e.offices).map(t=>0!==t&&r.a.createElement(c.a,{key:t.loc,label:t.loc,value:t.loc})),m&&r.a.createElement(c.a,{label:"Expand",value:"Expand"})),"Expand"!==a?r.a.createElement(i.a,{key:a,rerender:t.rerender,city:a,warehouse:e.warehouses[a],office:u}):r.a.createElement(o.a,{cityStateSetter:f}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(1165),o=a(1168),s=a(1171),l=a(30),c=a(48),f=a(21);function u(t){const e=l.b.Player(),a=Object(c.b)(),n=Object(c.c)();return r.a.createElement(f.a,{display:"flex"},r.a.createElement(f.a,{sx:{width:"50%"}},r.a.createElement(o.a,{rerender:t.rerender,currentCity:t.city,office:t.office}),r.a.createElement(i.a,{rerender:t.rerender,office:t.office})),r.a.createElement(f.a,{sx:{width:"50%"}},r.a.createElement(s.a,{rerender:t.rerender,player:e,corp:a,currentCity:t.city,division:n,warehouse:t.warehouse})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return R}));var n=a(0),r=a.n(n),i=a(53),o=a(4),s=a(1166),l=a(1167),c=a(20),f=a(48),u=a(1),m=a(10),h=a(114),d=a(65),p=a(602),g=a.n(p),y=a(603),b=a.n(y),E=a(23),v=a(79),k=a(128),_=a(179),w=a(145),S=a(45),C=a(43),x=a(21);function L(t,e){let a=0;for(let n=0;nt.switchMode(t=>!t)},"Switch to Auto Mode")):r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs")},r.a.createElement(m.a,{onClick:()=>t.switchMode(t=>!t)},"Switch to Manual Mode"))}function M(t){const e=Object(f.b)(),a=Object(f.c)(),[s,l]=Object(n.useState)(t.office.employees.length>0?t.office.employees[0]:null),m=[];for(let e=0;e0&&(p=l/t.office.employees.length,g=m/t.office.employees.length,y=h/t.office.employees.length),r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Unassigned Employees:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,n))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Avg Employee Morale:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(p,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Avg Employee Happiness:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(g,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Avg Employee Energy:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(y,"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(u.a,null,"Total Employee Salary:")),r.a.createElement(C.b,null,r.a.createElement(u.a,null,r.a.createElement(c.a,{money:d})))),s&&r.a.createElement(r.a.Fragment,null,r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"The base amount of material this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")},r.a.createElement(u.a,null,"Material Production:"))),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(a.getOfficeProductivity(t.office),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"The base amount of any given Product this office can produce. Does not include production multipliers from upgrades and materials. This value is based off the productivity of your Operations, Engineering, and Management employees")},r.a.createElement(u.a,null,"Product Production:"))),r.a.createElement(C.b,null,r.a.createElement(u.a,null,o.a.format(a.getOfficeProductivity(t.office,{forProduct:!0}),"0.000")))),r.a.createElement(S.a,null,r.a.createElement(C.b,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"The effect this office's 'Business' employees has on boosting sales")},r.a.createElement(u.a,null," Business Multiplier:"))),r.a.createElement(C.b,null,r.a.createElement(u.a,null,"x",o.a.format(a.getBusinessFactor(t.office),"0.000"))))))),r.a.createElement(_.a,{padding:"none"},r.a.createElement(w.a,null,r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Operations,desc:"Manages supply chain operations. Improves the amount of Materials and Products you produce."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Engineer,desc:"Develops and maintains products and production systems. Increases the quality of everything you produce. Also increases the amount you produce (not as much as Operations, however)"}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Business,desc:"Handles sales and finances. Improves the amount of Materials and Products you can sell."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Management,desc:"Leads and oversees employees and office operations. Improves the effectiveness of Engineer and Operations employees."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.RandD,desc:"Research new innovative ways to improve the company. Generates Scientific Research."}),r.a.createElement(T,{rerender:t.rerender,office:t.office,job:i.a.Training,desc:"Set employee to training, which will increase some of their stats. Employees in training do not affect any company operations."}))))}function R(t){const e=Object(f.b)(),a=Object(f.c)(),[i,o]=Object(n.useState)(!1),[c,h]=Object(n.useState)(!1),[p,g]=Object(n.useState)(!1);return r.a.createElement(d.a,null,r.a.createElement(u.a,null,"Office Space"),r.a.createElement(u.a,null,"Size: ",t.office.employees.length," / ",t.office.size," employees"),r.a.createElement(x.a,{sx:{display:"grid",gridTemplateColumns:"1fr",width:"fit-content"}},r.a.createElement(x.a,{sx:{gridTemplateColumns:"repeat(3, 1fr)"}},r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Automatically hires an employee and gives him/her a random name")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:t.office.atCapacity(),onClick:function(){t.office.atCapacity()||(t.office.hireRandomEmployee(),t.rerender())}},"Hire Employee"))),r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Upgrade the office's size so that it can hold more employees!")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:e.funds<0,onClick:()=>o(!0)},"Upgrade size"))),r.a.createElement(s.a,{rerender:t.rerender,office:t.office,open:i,onClose:()=>o(!1)}),!a.hasResearch("AutoPartyManager")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:r.a.createElement(u.a,null,"Throw an office party to increase your employee's morale and happiness")},r.a.createElement("span",null,r.a.createElement(m.a,{disabled:e.funds<0,onClick:()=>h(!0)},"Throw Party"))),r.a.createElement(l.a,{rerender:t.rerender,office:t.office,open:c,onClose:()=>h(!1)}))),r.a.createElement(O,{manualMode:p,switchMode:g})),p?r.a.createElement(M,{rerender:t.rerender,office:t.office}):r.a.createElement(A,{rerender:t.rerender,office:t.office}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(4),o=a(38),s=a(69),l=a(41),c=a(48),f=a(1),u=a(10),m=a(23),h=a(21);function d(t){const e=Object(c.b)();return r.a.createElement(m.a,{title:i.a.formatMoney(t.cost)},r.a.createElement("span",null,r.a.createElement(u.a,{disabled:e.funds{return a=t.cost,n=t.size,void(e.funds=u);){const t=Math.pow(1.09,a+m);if(i+t>u)break;i+=t,++m}const p=o.a.OfficeInitialCost*i;return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Increase the size of your office space to fit additional employees!"),r.a.createElement(h.a,{display:"flex",alignItems:"center"},r.a.createElement(f.a,null,"Upgrade size: "),r.a.createElement(d,{onClose:t.onClose,rerender:t.rerender,office:t.office,corp:e,cost:n,size:o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:t.onClose,rerender:t.rerender,office:t.office,corp:e,cost:s,size:5*o.a.OfficeInitialSize}),r.a.createElement(d,{onClose:t.onClose,rerender:t.rerender,office:t.office,corp:e,cost:p,size:m*o.a.OfficeInitialSize})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(4),o=a(16),s=a(69),l=a(20),c=a(41),f=a(48),u=a(1),m=a(10),h=a(81),d=a(21),p=a(28);function g(t){const e=Object(f.b)(),[a,g]=Object(n.useState)(0),y=a*t.office.employees.length,b=e.funds>=y;function E(){if(null===a||isNaN(a)||a<0)Object(o.a)("Invalid value entered");else if(b){const n=Object(s.z)(e,t.office,a);Object(o.a)("You threw a party for the office! The morale and happiness of each employee increased by "+i.a.formatPercentage(n-1)),t.rerender(),t.onClose()}else Object(o.a)("You don't have enough company funds to throw a party!")}function v(){return isNaN(a)||a<0?r.a.createElement(u.a,null,"Invalid value entered!"):r.a.createElement(u.a,null,"Throwing this party will cost a total of ",r.a.createElement(l.a,{money:y}))}return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(u.a,null,"Enter the amount of money you would like to spend PER EMPLOYEE on this office party"),r.a.createElement(v,null),r.a.createElement(d.a,{display:"flex",alignItems:"center"},r.a.createElement(h.a,{autoFocus:!0,type:"number",placeholder:"$ / employee",value:a,onChange:function(t){let e=parseFloat(t.target.value);isNaN(e)&&(e=0),g(e)},onKeyDown:function(t){t.key===p.a.ENTER&&E()}}),r.a.createElement(m.a,{disabled:!b,onClick:E},"Throw Party")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return O}));var n=a(0),r=a.n(n),i=a(50),o=a(318),s=a(4),l=a(192),c=a(1169),f=a(1170),u=a(20),m=a(110),h=a(183),d=a(453),p=a(143),g=a(48),y=a(1),b=a(10),E=a(23),v=a(65),k=a(114),_=a(294),w=a.n(_),S=a(21);function C(){const t=Object(g.b)(),e=Object(g.c)(),[a,o]=Object(n.useState)(!1),s=e.hasMaximumNumberProducts();let l="";switch(e.type){case i.a.Food:l="Build Restaurant";break;case i.a.Tobacco:l="Create Product";break;case i.a.Pharmaceutical:l="Create Drug";break;case i.a.Computer:case"Computer":l="Create Product";break;case i.a.Robotics:l="Design Robot";break;case i.a.Software:l="Develop Software";break;case i.a.Healthcare:l="Build Hospital";break;case i.a.RealEstate:l="Develop Property";break;default:return l="Create Product",r.a.createElement(r.a.Fragment,null)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{title:s?r.a.createElement(y.a,null,"You have reached the maximum number of products: ",e.getMaximumNumberProducts()):""},r.a.createElement(b.a,{color:0===Object.keys(e.products).length?"error":"primary",onClick:()=>o(!0),disabled:t.funds<0},l)),r.a.createElement(c.a,{open:a,onClose:()=>o(!1)}))}function x(){const t=Object(g.b)(),e=Object(g.c)(),[a,i]=Object(n.useState)(!1),[o,c]=Object(n.useState)(!1),p=1===t.unlockUpgrades[4],v=e.lastCycleRevenue-e.lastCycleExpenses;let _=!1;const C=e.getAdvertisingFactors(),x=C[1],L=C[2],O=C[3],M=C[0];function T(t){return Object(l.a)({progress:t,totalTicks:20})}return p&&(_=!0),r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Industry: ",e.type," (Corp Funds: ",r.a.createElement(u.a,{money:t.funds}),")"),r.a.createElement("br",null),r.a.createElement(h.a,{rows:[["Awareness:",s.a.format(e.awareness,"0.000")],["Popularity:",s.a.format(e.popularity,"0.000")]]}),!1!==_&&r.a.createElement(E.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,null,"Total multiplier for this industrys sales due to its awareness and popularity"),r.a.createElement(h.a,{rows:[["Awareness Bonus:","x"+s.a.format(Math.pow(x,.85),"0.000")],["Popularity Bonus:","x"+s.a.format(Math.pow(L,.85),"0.000")],["Ratio Multiplier:","x"+s.a.format(Math.pow(O,.85),"0.000")]]}))},r.a.createElement(y.a,null,"Advertising Multiplier: x",s.a.format(M,"0.000"))),r.a.createElement("br",null),r.a.createElement(h.a,{rows:[["Revenue:",r.a.createElement(m.a,{money:e.lastCycleRevenue})],["Expenses:",r.a.createElement(m.a,{money:e.lastCycleExpenses})],["Profit:",r.a.createElement(m.a,{money:v})]]}),r.a.createElement("br",null),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real Estate.")},r.a.createElement(y.a,null,"Production Multiplier: ",s.a.format(e.prodMult,"0.00"))),r.a.createElement(k.a,{onClick:()=>i(!0)},r.a.createElement(w.a,null)),r.a.createElement(d.a,{open:a,onClose:()=>i(!1)},r.a.createElement(y.a,null,"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"Below are approximations for how effective each material is at boosting this industry's production multiplier (Bigger bars = more effective):",r.a.createElement("br",null),r.a.createElement("br",null),"Hardware:    ",T(e.hwFac),r.a.createElement("br",null),"Robots:      ",T(e.robFac),r.a.createElement("br",null),"AI Cores:    ",T(e.aiFac),r.a.createElement("br",null),"Real Estate: ",T(e.reFac)))),r.a.createElement(S.a,{display:"flex",alignItems:"center"},r.a.createElement(E.a,{title:r.a.createElement(y.a,null,"Scientific Research increases the quality of the materials and products that you produce.")},r.a.createElement(y.a,null,"Scientific Research: ",s.a.format(e.sciResearch.qty,"0.000a"))),r.a.createElement(b.a,{sx:{mx:1},onClick:()=>c(!0)},"Research"),r.a.createElement(f.a,{open:o,onClose:()=>c(!1),industry:e})))}function L(t){const e=Object(g.b)(),a=Object(g.c)(),n=[];for(const s of Object.keys(o.a)){const l=o.a[s];if(a.hasResearch("AutoBrew")&&"Coffee"===l[4])continue;const c=l[0],f=l[1],u=l[2];let m=0;switch(c){case 0:m=t.office.employees.length*f;break;default:m=f*Math.pow(u,a.upgrades[c])}function i(){e.funds0!==a.offices[t]),[y,b]=Object(n.useState)(g.length>0?g[0]:""),[E,v]=Object(n.useState)(""),[k,_]=Object(n.useState)(null),[w,S]=Object(n.useState)(null);if(a.hasMaximumNumberProducts())return r.a.createElement(r.a.Fragment,null);let C=r.a.createElement(r.a.Fragment,null);switch(a.type){case s.a.Food:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new restaurant!");break;case s.a.Tobacco:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new tobacco product!");break;case s.a.Pharmaceutical:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and develop a new pharmaceutical drug!");break;case s.a.Computer:case"Computer":C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and manufacture a new computer hardware product!");break;case s.a.Robotics:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Design and create a new robot or robotic system!");break;case s.a.Software:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of software!");break;case s.a.Healthcare:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Build and manage a new hospital!");break;case s.a.RealEstate:C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Develop a new piece of real estate property!");break;default:return C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),"Create a new product!"),r.a.createElement(r.a.Fragment,null)}function x(){if(null!==k&&null!==w){try{Object(l.l)(e,a,y,E,k,w)}catch(t){Object(i.a)(t+"")}t.onClose()}}return C=r.a.createElement(r.a.Fragment,null,C,r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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."),r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,C),r.a.createElement(d.a,{style:{margin:"5px"},onChange:function(t){b(t.target.value)},defaultValue:y},g.map(t=>r.a.createElement(h.a,{key:t,value:t},t))),r.a.createElement(u.a,{onChange:function(t){v(t.target.value)},placeholder:(L=a.type,L===s.a.Food?"Restaurant Name":L===s.a.Healthcare?"Hospital Name":L===s.a.RealEstate?"Property Name":"Product Name")}),r.a.createElement("br",null),r.a.createElement(u.a,{onChange:function(t){""===t.target.value?_(null):_(parseFloat(t.target.value))},autoFocus:!0,type:"number",placeholder:"Design investment"}),r.a.createElement(u.a,{onChange:function(t){""===t.target.value?S(null):S(parseFloat(t.target.value))},onKeyDown:function(t){t.key===p.a.ENTER&&x()},type:"number",placeholder:"Marketing investment"}),r.a.createElement(m.a,{onClick:x},"Develop Product"));var L}},function(t,e,a){"use strict";a.d(e,"a",(function(){return S}));var n=a(0),r=a.n(n),i=a(41),o=a(50),s=a(38),l=a(69),c=a(281),f=a(9),u=a(16),m=a(1),h=a(23),d=a(10),p=a(21),g=a(211),y=a(75),b=a.n(y),E=a(156),v=a.n(E),k=a(321),_=a.n(k);function w({n:t,division:e}){const[a,i]=Object(n.useState)(!1);if(null===t)return r.a.createElement(r.a.Fragment,null);const o=c.a[t.text];let y=e.sciResearch.qtyr.a.createElement(h.a,{title:r.a.createElement(m.a,null,"Research points: ",o.cost,r.a.createElement("br",null),o.desc)},t),x=r.a.createElement(p.a,null,C(r.a.createElement("span",null,r.a.createElement(d.a,{color:S,disabled:y&&!t.researched,onClick:k,style:{width:"100%",textAlign:"left",justifyContent:"unset"}},t.researched&&r.a.createElement(_.a,{sx:{mr:1}}),t.text))));return 0===t.children.length?x:r.a.createElement(p.a,null,r.a.createElement(p.a,{display:"flex",sx:{border:"1px solid "+f.a.theme.well}},C(r.a.createElement("span",{style:{width:"100%"}},r.a.createElement(d.a,{color:S,disabled:y&&!t.researched,onClick:k,sx:{width:"100%",textAlign:"left",justifyContent:"unset",borderColor:f.a.theme.button}},t.researched&&r.a.createElement(_.a,{sx:{mr:1}}),t.text))),r.a.createElement(d.a,{onClick:()=>i(t=>!t),sx:{borderColor:f.a.theme.button,minWidth:"fit-content"}},a?r.a.createElement(v.a,{color:"primary"}):r.a.createElement(b.a,{color:"primary"}))),r.a.createElement(g.a,{in:a,unmountOnExit:!0},r.a.createElement(p.a,{m:1},t.children.map(t=>r.a.createElement(w,{key:t.text,division:e,n:t})))))}function S(t){const e=o.c[t.industry.type];return void 0===e?r.a.createElement(r.a.Fragment,null):r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(w,{division:t.industry,n:e.root}),r.a.createElement(m.a,{sx:{mt:1}},"Research points: ",t.industry.sciResearch.qty.toFixed(3),r.a.createElement("br",null),"Multipliers from research:",r.a.createElement("br",null),"* Advertising Multiplier: x",e.getAdvertisingMultiplier(),r.a.createElement("br",null),"* Employee Charisma Multiplier: x",e.getEmployeeChaMultiplier(),r.a.createElement("br",null),"* Employee Creativity Multiplier: x",e.getEmployeeCreMultiplier(),r.a.createElement("br",null),"* Employee Efficiency Multiplier: x",e.getEmployeeEffMultiplier(),r.a.createElement("br",null),"* Employee Intelligence Multiplier: x",e.getEmployeeIntMultiplier(),r.a.createElement("br",null),"* Production Multiplier: x",e.getProductionMultiplier(),r.a.createElement("br",null),"* Sales Multiplier: x",e.getSalesMultiplier(),r.a.createElement("br",null),"* Scientific Research Multiplier: x",e.getScientificResearchMultiplier(),r.a.createElement("br",null),"* Storage Multiplier: x",e.getStorageMultiplier()))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return O}));var n=a(0),r=a.n(n),i=a(38),o=a(198),s=a(401),l=a(240),c=a(1172),f=a(1173),u=a(1178),m=a(175),h=a(4),d=a(143),p=a(402),g=a(1183),y=a(69),b=a(48),E=a(1),v=a(23),k=a(65),_=a(10),w=a(21),S=a(113),C=a(137);const x=Object(S.a)(()=>Object(C.a)({retainHeight:{minHeight:"3em"}}));function L(t){const e=Object(b.b)(),a=Object(b.c)(),[l,y]=Object(n.useState)(!1);if(0===t.warehouse)return r.a.createElement(r.a.Fragment,null);const S=i.a.WarehouseUpgradeBaseCost*Math.pow(1.07,t.warehouse.level+1),C=e.funds>S;const L=x();let O;switch(a.state){case"START":O="Current state: Preparing...";break;case"PURCHASE":O="Current state: Purchasing materials...";break;case"PRODUCTION":O="Current state: Producing materials and/or products...";break;case"SALE":O="Current state: Selling materials and/or products...";break;case"EXPORT":O="Current state: Exporting materials and/or products...";break;default:console.error("Invalid state: "+a.state)}const M=[];for(const e of Object.keys(t.warehouse.materials)){if(!(t.warehouse.materials[e]instanceof o.a))continue;const n=t.warehouse.materials[e].qty>0,i=Object(p.a)(e,a);(n||i)&&M.push(r.a.createElement(u.a,{rerender:t.rerender,city:t.currentCity,key:e,mat:t.warehouse.materials[e],warehouse:t.warehouse}))}const T=[];if(a.makesProducts&&Object.keys(a.products).length>0)for(const e of Object.keys(a.products)){const n=a.products[e];n instanceof s.a&&T.push(r.a.createElement(f.a,{rerender:t.rerender,city:t.currentCity,key:e,product:n}))}const A=[];for(const e of Object.keys(t.warehouse.materials)){const a=t.warehouse.materials[e];m.a.hasOwnProperty(e)&&(0!==a.qty&&A.push(r.a.createElement(r.a.Fragment,null,e,": ",h.a.format(a.qty*m.a[e],"0,0.0"))))}for(const e of Object.keys(a.products)){const n=a.products[e];void 0!==n&&A.push(r.a.createElement(r.a.Fragment,null,e,": ",h.a.format(n.data[t.warehouse.loc][0]*n.siz,"0,0.0")))}let R;return R=A&&A.length>0?A.reduce((t,e)=>t&&r.a.createElement(r.a.Fragment,null,t,r.a.createElement("br",null),e)||r.a.createElement(r.a.Fragment,null,e)):r.a.createElement(r.a.Fragment,null,"No items in storage."),r.a.createElement(k.a,null,r.a.createElement(w.a,{display:"flex",alignItems:"center"},r.a.createElement(v.a,{title:0!==t.warehouse.sizeUsed?r.a.createElement(E.a,null,r.a.createElement(r.a.Fragment,null,R)):""},r.a.createElement(E.a,{color:t.warehouse.sizeUsed>=t.warehouse.size?"error":"primary"},"Storage: ",h.a.formatBigNumber(t.warehouse.sizeUsed)," /"," ",h.a.formatBigNumber(t.warehouse.size)))),r.a.createElement(_.a,{disabled:!C,onClick:function(){null!==a&&0!==t.warehouse&&C&&(++t.warehouse.level,t.warehouse.updateSize(e,a),e.funds=e.funds-S,t.rerender())}},"Upgrade Warehouse Size - ",r.a.createElement(d.a,{money:S,corp:e})),r.a.createElement(E.a,null,"This industry uses the following equation for its production: "),r.a.createElement("br",null),r.a.createElement(E.a,null,r.a.createElement(g.a,{key:a.name,division:a})),r.a.createElement("br",null),r.a.createElement(E.a,null,"To get started with production, purchase your required materials or import them from another of your company's divisions."),r.a.createElement("br",null),r.a.createElement(E.a,{className:L.retainHeight},O),e.unlockUpgrades[1]&&r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{onClick:()=>y(!0)},"Configure Smart Supply"),r.a.createElement(c.a,{open:l,onClose:()=>y(!1),warehouse:t.warehouse})),M,T)}function O(t){return t.warehouse instanceof l.a?r.a.createElement(L,t):r.a.createElement(M,{rerender:t.rerender,city:t.currentCity})}function M(t){const e=Object(b.b)(),a=Object(b.c)(),n=e.funds!t)}}),label:r.a.createElement(f.a,null,"Enable Smart Supply")}),r.a.createElement("br",null),r.a.createElement(f.a,null,"Use materials already in the warehouse instead of buying new ones, if available:"),s))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return ProductElem}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_data_Constants__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(38),_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1174),_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1175),_SellProductModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1176),_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(1177),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(147),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(20),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(48),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(23),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(65),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(21);function ProductElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[sellOpen,setSellOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[limitOpen,setLimitOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[discontinueOpen,setDiscontinueOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[marketTaOpen,setMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),city=props.city,product=props.product,nf="0.000",nfB="0.000a",hasUpgradeDashboard=division.hasResearch("uPgrade: Dashboard"),totalGain=product.data[city][1]-product.data[city][2];let sellButtonText;if(sellButtonText=product.sllman[city][0]?Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(product.sllman[city][1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB),"/",product.sllman[city][1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.sllman[city][1],nfB),")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)"),product.marketTa2)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_8__.a,{money:product.marketTa2Price[city]}));else if(product.marketTa1){const t=product.rat/product.mku;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_8__.a,{money:product.pCost+t}))}else if(product.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(product.sCost)){const sCost=product.sCost.replace(/MP/g,product.pCost+product.rat/product.mku+"");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_8__.a,{money:eval(sCost)}))}else 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_8__.a,{money:product.sCost}));let limitProductionButtonText="Limit Production";return product.prdman[city][0]&&(limitProductionButtonText+=" ("+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prdman[city][1],nf)+")"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,product.fin?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_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][1],nfB),"/s",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][2],nfB)," /s")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,product.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.data[city][0],nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)"))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.qlt,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Performance: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.per,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Durability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.dur,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Reliability: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rel,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Aesthetics: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.aes,nf)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Features: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.fea,nf),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Rating: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.rat,nf)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"An estimate of the material cost it takes to create this Product.")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Production Cost:"," ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost/_data_Constants__WEBPACK_IMPORTED_MODULE_1__.a.ProductProductionCostRatio)))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{display:"flex"},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Est. Market Price: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(product.pCost))))):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__.a,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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(product.prog,"0.00"),"% complete")),(hasUpgradeDashboard||product.fin)&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setSellOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellProductModal__WEBPACK_IMPORTED_MODULE_4__.a,{product:product,city:city,open:sellOpen,onClose:()=>setSellOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setLimitOpen(!0)},limitProductionButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_LimitProductProductionModal__WEBPACK_IMPORTED_MODULE_3__.a,{product:product,city:city,open:limitOpen,onClose:()=>setLimitOpen(!1)}),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setDiscontinueOpen(!0)},"Discontinue"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_DiscontinueProductModal__WEBPACK_IMPORTED_MODULE_2__.a,{product:product,rerender:props.rerender,open:discontinueOpen,onClose:()=>setDiscontinueOpen(!1)}),division.hasResearch("Market-TA.I")&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ProductMarketTaModal__WEBPACK_IMPORTED_MODULE_5__.a,{product:product,open:marketTaOpen,onClose:()=>setMarketTaOpen(!1)}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(41),o=a(48),s=a(1),l=a(10);function c(t){const e=Object(o.c)();return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null,"Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no longer produce this product and all of its existing stock will be removed and left unsold"),r.a.createElement(l.a,{onClick:function(){e.discontinueProduct(t.product),t.onClose(),t.rerender()}},"Discontinue"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(69),o=a(41),s=a(1),l=a(10),c=a(81),f=a(28);function u(t){const[e,a]=Object(n.useState)(null);function u(){let a=e;null===a&&(a=-1),Object(i.k)(t.product,t.city,a),t.onClose()}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null,"Enter a limit to the amount of this product you would like to produce per second. Leave the box empty to set no limit."),r.a.createElement(c.a,{autoFocus:!0,placeholder:"Limit",type:"number",onChange:function(t){""===t.target.value?a(null):a(parseFloat(t.target.value))},onKeyDown:function(t){t.key===f.a.ENTER&&u()}}),r.a.createElement(l.a,{onClick:u},"Limit production"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(16),o=a(69),s=a(41),l=a(1),c=a(81),f=a(10),u=a(331),m=a(274),h=a(28);function d(t){const[e,a]=Object(n.useState)(!0),[d,p]=Object(n.useState)(t.product.sllman[t.city][1]?t.product.sllman[t.city][1]:""),[g,y]=Object(n.useState)(function(t){let e=t.sCost?t.sCost+"":"";return t.marketTa2?e+=" (Market-TA.II)":t.marketTa1&&(e+=" (Market-TA.I)"),e}(t.product));function b(){try{Object(o.r)(t.product,t.city,d,g,e)}catch(t){Object(i.a)(t+"")}t.onClose()}function E(t){t.key===h.a.ENTER&&b()}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Enter the maximum amount of ",t.product.name," you would like to sell per second, as well as the price at which you would like to sell it at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the product will be discarded.",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five times the estimated market price."),r.a.createElement("br",null),r.a.createElement(c.a,{value:d,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(t){p(t.target.value)},onKeyDown:E}),r.a.createElement(c.a,{value:g,type:"text",placeholder:"Sell price",onChange:function(t){y(t.target.value)},onKeyDown:E}),r.a.createElement(f.a,{onClick:b},"Confirm"),r.a.createElement(u.a,{control:r.a.createElement(m.a,{checked:e,onChange:function(t){a(t.target.checked)}}),label:r.a.createElement(l.a,null,"Use same 'Sell Amount' for all cities")}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(4),o=a(41),s=a(48),l=a(1),c=a(81),f=a(331),u=a(274),m=a(23);function h(t){if(!Object(s.c)().hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const e=t.product.rat/t.product.mku,[a,o]=Object(n.useState)(t.product.pCost),h=Object(n.useState)(!1)[1];const d=a;let p=1;return d>t.product.pCost&&d-t.product.pCost>e&&(p=e/(d-t.product.pCost)),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.II"),r.a.createElement("br",null),r.a.createElement(l.a,null,"If you sell at ",i.a.formatMoney(d),", then you will sell"," ",i.a.format(p,"0.00000"),"x as much compared to if you sold at market price."),r.a.createElement(c.a,{type:"number",onChange:function(t){o(parseFloat(t.target.value))},value:a}),r.a.createElement("br",null),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.product.marketTa2,onChange:function(e){t.product.marketTa2=e.target.checked,h(t=>!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)")},r.a.createElement(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(t){const e=t.product.rat/t.product.mku,a=Object(n.useState)(!1)[1];return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,null,"The maximum sale price you can mark this up to is"," ",i.a.formatMoney(t.product.pCost+e),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.product.marketTa1,onChange:function(e){t.product.marketTa1=e.target.checked,a(t=>!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")},r.a.createElement(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(h,{product:t.product}))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return MaterialElem}));var react__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(0),react__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__),_OfficeSpace__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(376),_ExportModal__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(1179),_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(1180),_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(1181),_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(1182),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(4),_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(147),_ui_React_Money__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(20),_Context__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(48),_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(1),_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(23),_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(65),_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(10),_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(21);function MaterialElem(props){const corp=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.b)(),division=Object(_Context__WEBPACK_IMPORTED_MODULE_9__.c)(),[purchaseMaterialOpen,setPurchaseMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[exportOpen,setExportOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[sellMaterialOpen,setSellMaterialOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),[materialMarketTaOpen,setMaterialMarketTaOpen]=Object(react__WEBPACK_IMPORTED_MODULE_0__.useState)(!1),warehouse=props.warehouse,city=props.city,mat=props.mat,markupLimit=mat.getMarkupLimit(),office=division.offices[city];if(!(office instanceof _OfficeSpace__WEBPACK_IMPORTED_MODULE_1__.a))throw new Error(`Could not get OfficeSpace object for this city (${city})`);const nf="0.000",nfB="0.000a",totalGain=mat.buy+mat.prd+mat.imp-mat.sll-mat.totalExp,tutorial=division.newInd&&Object.keys(division.reqMats).includes(mat.name)&&0===mat.buy&&0===mat.imp,purchaseButtonText=`Buy (${_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.buy,nfB)})`;let sellButtonText;if(mat.sllman[0]){if(sellButtonText=Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(mat.sllman[1])?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB),"/",mat.sllman[1],")"):react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB),"/",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sllman[1],nfB),")"),mat.marketTa2)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_8__.a,{money:mat.marketTa2Price}));else if(mat.marketTa1)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_8__.a,{money:mat.bCost+markupLimit}));else if(mat.sCost)if(Object(_utils_helpers_isString__WEBPACK_IMPORTED_MODULE_7__.a)(mat.sCost)){const sCost=mat.sCost.replace(/MP/g,mat.bCost+"");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_8__.a,{money:eval(sCost)}))}else 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_8__.a,{money:mat.sCost}))}else sellButtonText=react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(react__WEBPACK_IMPORTED_MODULE_0___default.a.Fragment,null,"Sell (0.000/0.000)");return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Paper__WEBPACK_IMPORTED_MODULE_12__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{sx:{display:"grid",gridTemplateColumns:"2fr 1fr",m:"5px"}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,null,react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Buy: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.buy,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Prod: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.prd,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Sell: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.sll,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Export: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.totalExp,nfB)," ",react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),"Import: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.imp,nfB),1===corp.unlockUpgrades[2]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[2]&&"Demand: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.dmd,nf),1===corp.unlockUpgrades[3]&&react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("br",null),1===corp.unlockUpgrades[3]&&"Competition: "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.cmp,nf))},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,mat.name,": ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qty,nfB)," (",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(totalGain,nfB),"/s)")),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"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(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"MP: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.formatMoney(mat.bCost))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"The quality of your material. Higher quality will lead to more sales")},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Quality: ",_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_6__.a.format(mat.qlt,"0.00a")))),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Box__WEBPACK_IMPORTED_MODULE_14__.a,{sx:{"& button":{width:"100%"}}},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Tooltip__WEBPACK_IMPORTED_MODULE_11__.a,{title:tutorial?react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Typography__WEBPACK_IMPORTED_MODULE_10__.a,null,"Purchase your required materials to get production started!"):""},react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:tutorial?"error":"primary",onClick:()=>setPurchaseMaterialOpen(!0),disabled:props.warehouse.smartSupplyEnabled&&Object.keys(division.reqMats).includes(props.mat.name)},purchaseButtonText)),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_PurchaseMaterialModal__WEBPACK_IMPORTED_MODULE_5__.a,{mat:mat,warehouse:warehouse,open:purchaseMaterialOpen,onClose:()=>setPurchaseMaterialOpen(!1)}),1===corp.unlockUpgrades[0]&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setExportOpen(!0)},"Export"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_ExportModal__WEBPACK_IMPORTED_MODULE_2__.a,{mat:mat,open:exportOpen,onClose:()=>setExportOpen(!1)})),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_mui_material_Button__WEBPACK_IMPORTED_MODULE_13__.a,{color:division.prodMats.includes(props.mat.name)&&!mat.sllman[0]?"error":"primary",onClick:()=>setSellMaterialOpen(!0)},sellButtonText),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_SellMaterialModal__WEBPACK_IMPORTED_MODULE_4__.a,{mat:mat,open:sellMaterialOpen,onClose:()=>setSellMaterialOpen(!1)}),division.hasResearch("Market-TA.I")&&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_Button__WEBPACK_IMPORTED_MODULE_13__.a,{onClick:()=>setMaterialMarketTaOpen(!0)},"Market-TA"),react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_MaterialMarketTaModal__WEBPACK_IMPORTED_MODULE_3__.a,{mat:mat,open:materialMarketTaOpen,onClose:()=>setMaterialMarketTaOpen(!1)})))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(16),o=a(69),s=a(41),l=a(48),c=a(402),f=a(1),u=a(81),m=a(10),h=a(21),d=a(79),p=a(128);function g(t){const e=Object(l.b)(),a=e.divisions.filter(e=>Object(c.a)(t.mat.name,e));if(0===a.length)throw new Error("Export popup created with no divisions.");const g=a[0];if(0===Object.keys(g.warehouses).length)throw new Error("Export popup created in a division with no warehouses.");const[y,b]=Object(n.useState)(g.name),[E,v]=Object(n.useState)(Object.keys(g.warehouses)[0]),[k,_]=Object(n.useState)(""),w=Object(n.useState)(!1)[1];function S(e){for(let a=0;a!t)}const C=e.divisions.find(t=>t.name===y);if(void 0===C)throw new Error(`Export popup somehow ended up with undefined division '${C}'`);const x=Object.keys(C.warehouses).filter(t=>0!==C.warehouses[t]);return x.length>0&&!x.includes(E)&&v(x[0]),r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Select the industry and city to export this material to, as well as how much of this material to export per second. You can set the export amount to 'MAX' to export all of the materials in this warehouse."),r.a.createElement(p.a,{onChange:function(t){const a=t.target.value;b(a),v(Object.keys(e.divisions[0].warehouses)[0])},value:y},e.divisions.filter(e=>Object(c.a)(t.mat.name,e)).map(t=>r.a.createElement(d.a,{key:t.name,value:t.name},t.name))),r.a.createElement(p.a,{onChange:function(t){v(t.target.value)},value:E},x.map(t=>{if(0!==C.warehouses[t])return r.a.createElement(d.a,{key:t,value:t},t)})),r.a.createElement(u.a,{placeholder:"Export amount / s",onChange:function(t){_(t.target.value)},value:k}),r.a.createElement(m.a,{onClick:function(){try{Object(o.g)(y,E,t.mat,k,C)}catch(t){Object(i.a)(t+"")}t.onClose()}},"Export"),r.a.createElement(f.a,null,"Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports below will REMOVE that export."),t.mat.exp.map((t,e)=>r.a.createElement(h.a,{display:"flex",alignItems:"center",key:e},r.a.createElement(m.a,{sx:{mx:2},onClick:()=>S(t)},"delete"),r.a.createElement(f.a,null,"Industry: ",t.ind,r.a.createElement("br",null),"City: ",t.city,r.a.createElement("br",null),"Amount/s: ",t.amt))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(4),o=a(41),s=a(48),l=a(1),c=a(81),f=a(331),u=a(274),m=a(23);function h(t){if(!Object(s.c)().hasResearch("Market-TA.II"))return r.a.createElement(r.a.Fragment,null);const[e,a]=Object(n.useState)(t.mat.bCost),o=Object(n.useState)(!1)[1];const h=t.mat.getMarkupLimit();const d=e;let p=1;return d>t.mat.bCost?d-t.mat.bCost>h&&(p=Math.pow(h/(d-t.mat.bCost),2)):d!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the optimal price such that the amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all produced materials will be sold)")},r.a.createElement(l.a,null,"Use Market-TA.II for Auto-Sale Price"))}))}function d(t){const e=Object(n.useState)(!1)[1];const a=t.mat.getMarkupLimit();return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{variant:"h4"},"Market-TA.I"),r.a.createElement(l.a,null,"The maximum sale price you can mark this up to is ",i.a.formatMoney(t.mat.bCost+a),". This means that if you set the sale price higher than this, you will begin to experience a loss in number of sales"),r.a.createElement(f.a,{control:r.a.createElement(u.a,{checked:t.mat.marketTa1,onChange:function(a){t.mat.marketTa1=a.target.checked,e(t=>!t)}}),label:r.a.createElement(m.a,{title:r.a.createElement(l.a,null,"If this is enabled, then this Material will automatically be sold at the price identified by Market-TA.I (i.e. the price shown above)")},r.a.createElement(l.a,null,"Use Market-TA.I for Auto-Sale Price"))})),r.a.createElement(h,{mat:t.mat}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(16),o=a(69),s=a(41),l=a(1),c=a(81),f=a(10),u=a(28);function m(t){const[e,a]=Object(n.useState)(t.mat.sllman[1]?t.mat.sllman[1]+"":""),[m,h]=Object(n.useState)(function(t){let e=t.sCost?t.sCost+"":"";return t.marketTa2?e+=" (Market-TA.II)":t.marketTa1&&(e+=" (Market-TA.I)"),e}(t.mat));function d(){try{Object(o.q)(t.mat,e,m)}catch(t){Object(i.a)(t+"")}t.onClose()}function p(t){t.key===u.a.ENTER&&d()}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Enter the maximum amount of ",t.mat.name," you would like to sell per second, as well as the price at which you would like to sell at.",r.a.createElement("br",null),r.a.createElement("br",null),"If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the material will be discarded",r.a.createElement("br",null),r.a.createElement("br",null),"Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less of the material than you produce.",r.a.createElement("br",null),r.a.createElement("br",null),"When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at $10 above the market price."),r.a.createElement("br",null),r.a.createElement(c.a,{value:e,autoFocus:!0,type:"text",placeholder:"Sell amount",onChange:function(t){a(t.target.value)},onKeyDown:p}),r.a.createElement(c.a,{value:m,type:"text",placeholder:"Sell price",onChange:function(t){h(t.target.value)},onKeyDown:p}),r.a.createElement(f.a,{onClick:d},"Confirm"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(16),o=a(175),s=a(4),l=a(69),c=a(41),f=a(48),u=a(1),m=a(81),h=a(10),d=a(28);function p(t){const e=parseFloat(t.amount),a=e*t.mat.bCost,n=o.a[t.mat.name];return e*n>(t.warehouse.size-t.warehouse.sizeUsed)/n?r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{color:"error"},"Not enough warehouse space to purchase this amount")):isNaN(a)||e<0?r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{color:"error"},"Invalid put for Bulk Purchase amount")):r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Purchasing ",s.a.format(e,"0,0.00")," of ",t.mat.name," will cost"," ",s.a.formatMoney(a)))}function g(t){const e=Object(f.b)(),[a,o]=Object(n.useState)("");function s(){try{Object(l.b)(e,t.warehouse,t.mat,parseFloat(a))}catch(t){Object(i.a)(t+"")}t.onClose()}return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Enter the amount of ",t.mat.name," you would like to bulk purchase. This purchases the specified amount instantly (all at once)."),r.a.createElement(p,{warehouse:t.warehouse,mat:t.mat,amount:a}),r.a.createElement(m.a,{value:a,onChange:function(t){o(t.target.value)},type:"number",placeholder:"Bulk Purchase amount",onKeyDown:function(t){t.key===d.a.ENTER&&s()}}),r.a.createElement(h.a,{onClick:s},"Confirm Bulk Purchase"))}function y(t){const e=Object(f.c)(),[a,o]=Object(n.useState)(t.mat.buy?t.mat.buy:0);function s(){if(null!==a){try{Object(l.e)(t.mat,a)}catch(t){Object(i.a)(t+"")}t.onClose()}}return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Enter the amount of ",t.mat.name," you would like to purchase per second. This material's cost changes constantly."),r.a.createElement(m.a,{value:a,onChange:function(t){o(parseFloat(t.target.value))},autoFocus:!0,placeholder:"Purchase amount",type:"number",onKeyDown:function(t){t.key===d.a.ENTER&&s()}}),r.a.createElement(h.a,{onClick:s},"Confirm"),r.a.createElement(h.a,{onClick:function(){t.mat.buy=0,t.onClose()}},"Clear Purchase"),e.hasResearch("Bulk Purchasing")&&r.a.createElement(g,{onClose:t.onClose,mat:t.mat,warehouse:t.warehouse})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(265);function o(t){const e=[];for(const a of Object.keys(t.division.reqMats)){const n=t.division.reqMats[a];void 0!==n&&e.push(String.raw`${n}\text{ }${a}`)}const a=t.division.prodMats.map(t=>"1\\text{ }"+t);return t.division.makesProducts&&a.push("Products"),r.a.createElement(i.a,null,"\\("+e.join("+")+"\\Rightarrow "+a.join("+")+"\\)")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(38),o=a(16),s=a(69),l=a(143),c=a(48),f=a(1),u=a(79),m=a(128),h=a(10);function d(t){const e=Object(c.b)(),a=Object(c.c)(),d=Object.keys(a.offices).filter(t=>0===a.offices[t]),[p,g]=Object(n.useState)(d[0]),y=e.fundsr.a.createElement(u.a,{key:t,value:t},t))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(16),o=a(50),s=a(48),l=a(69),c=a(1),f=a(10),u=a(81),m=a(79),h=a(21),d=a(128),p=a(28);function g(t){const e=Object(s.b)(),a=Object.keys(o.a).sort().filter(t=>void 0===e.divisions.find(e=>e.type===t)).sort(),[g,y]=Object(n.useState)(a.length>0?a[0]:""),[b,E]=Object(n.useState)(""),v=o.d[g];if(void 0===v)throw new Error(`Invalid industry: '${g}'`);const k=e.fundsr.a.createElement(m.a,{key:t,value:t},t))),r.a.createElement(c.a,null,w(e)),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,null,"Division name:"),r.a.createElement(h.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,{autoFocus:!0,value:b,onChange:function(t){E(t.target.value)},onKeyDown:function(t){t.key===p.a.ENTER&&_()},type:"text",InputProps:{endAdornment:r.a.createElement(f.a,{disabled:k,sx:{mx:1},onClick:_},"Expand")}})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return R}));var n=a(0),r=a.n(n),i=a(1187),o=a(1188),s=a(1189),l=a(1190),c=a(1191),f=a(1192),u=a(1193),m=a(1194),h=a(1195),d=a(29),p=a(38),g=a(298),y=a(371),b=a(8),E=a(4),v=a(24),k=a(20),_=a(110),w=a(183),S=a(30),C=a(48),x=a(1),L=a(23),O=a(10),M=a(21),T=a(65),A=a(60);function R({rerender:t}){const e=S.b.Player(),a=Object(C.b)(),n=a.revenue-a.expenses,i=[];function o(t,e){1!==e&&i.push([t,E.a.format(e,"0.000")])}return o("Production Multiplier: ",a.getProductionMultiplier()),o("Storage Multiplier: ",a.getStorageMultiplier()),o("Advertising Multiplier: ",a.getAdvertisingMultiplier()),o("Empl. Creativity Multiplier: ",a.getEmployeeCreMultiplier()),o("Empl. Charisma Multiplier: ",a.getEmployeeChaMultiplier()),o("Empl. Intelligence Multiplier: ",a.getEmployeeIntMultiplier()),o("Empl. Efficiency Multiplier: ",a.getEmployeeEffMultiplier()),o("Sales Multiplier: ",a.getSalesMultiplier()),o("Scientific Research Multiplier: ",a.getScientificResearchMultiplier()),r.a.createElement(r.a.Fragment,null,r.a.createElement(w.a,{rows:[["Total Funds:",r.a.createElement(k.a,{money:a.funds})],["Total Revenue:",r.a.createElement(_.a,{money:a.revenue})],["Total Expenses:",r.a.createElement(_.a,{money:a.expenses})],["Publicly Traded:",a.public?"Yes":"No"],["Owned Stock Shares:",E.a.format(a.numShares,"0.000a")],["Stock Price:",a.public?r.a.createElement(k.a,{money:a.sharePrice}):"N/A"]]}),r.a.createElement("br",null),r.a.createElement(M.a,{display:"flex"},r.a.createElement(L.a,{title:r.a.createElement(w.a,{rows:[["Outstanding Shares:",E.a.format(a.issuedShares,"0.000a")],["Private Shares:",E.a.format(a.totalShares-a.issuedShares-a.numShares,"0.000a")]]})},r.a.createElement(x.a,null,"Total Stock Shares: ",E.a.format(a.totalShares,"0.000a")))),r.a.createElement("br",null),r.a.createElement(D,{profit:n}),r.a.createElement("br",null),r.a.createElement(w.a,{rows:i}),r.a.createElement("br",null),r.a.createElement(j,null),r.a.createElement(M.a,{sx:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",width:"fit-content"}},r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"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.")},r.a.createElement(O.a,{onClick:()=>a.getStarterGuide(e)},"Getting Started Guide")),a.public?r.a.createElement(I,{rerender:t}):r.a.createElement(N,{rerender:t}),r.a.createElement(F,null)),r.a.createElement("br",null),r.a.createElement(P,{rerender:t}))}function N({rerender:t}){const e=Object(C.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),l=e.fundingRound<4,c=l?"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company":"";return r.a.createElement(r.a.Fragment,null,r.a.createElement(L.a,{title:r.a.createElement(x.a,null,c)},r.a.createElement(O.a,{disabled:!l,onClick:()=>i(!0)},"Find Investors")),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"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.")},r.a.createElement(O.a,{onClick:()=>s(!0)},"Go Public")),r.a.createElement(m.a,{open:a,onClose:()=>i(!1),rerender:t}),r.a.createElement(h.a,{open:o,onClose:()=>s(!1),rerender:t}))}function P({rerender:t}){const e=Object(C.b)();return e.divisions.length<=0?r.a.createElement(x.a,{variant:"h4"},"Upgrades are unlocked once you create an industry."):r.a.createElement(r.a.Fragment,null,r.a.createElement(T.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Unlocks"),r.a.createElement(A.a,{container:!0},Object.values(g.a).filter(t=>!e.unlockUpgrades[t[0]]).map(e=>r.a.createElement(o.a,{rerender:t,upgradeData:e,key:e[0]})))),r.a.createElement(T.a,{sx:{p:1,my:1}},r.a.createElement(x.a,{variant:"h4"},"Upgrades"),r.a.createElement(A.a,{container:!0},e.upgrades.map((t,e)=>y.a[e]).map(e=>r.a.createElement(i.a,{rerender:t,upgrade:e,key:e[0]})))))}function I({rerender:t}){const e=Object(C.b)(),[a,i]=Object(n.useState)(!1),[o,s]=Object(n.useState)(!1),[m,h]=Object(n.useState)(!1),[d,p]=Object(n.useState)(!1),g=e.shareSaleCooldown>0,y=g?"Cannot sell shares for "+e.convertCooldownToString(e.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.",b=e.issueNewSharesCooldown>0,E=b?"Cannot issue new shares for "+e.convertCooldownToString(e.issueNewSharesCooldown):"Issue new equity shares to raise capital.";return r.a.createElement(r.a.Fragment,null,r.a.createElement(L.a,{title:r.a.createElement(x.a,null,y)},r.a.createElement(O.a,{disabled:g,onClick:()=>i(!0)},"Sell Shares")),r.a.createElement(l.a,{open:a,onClose:()=>i(!1),rerender:t}),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"Buy back shares you that previously issued or sold at market price.")},r.a.createElement(O.a,{disabled:e.issuedShares<1,onClick:()=>s(!0)},"Buyback shares")),r.a.createElement(c.a,{open:o,onClose:()=>s(!1),rerender:t}),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,E)},r.a.createElement(O.a,{disabled:b,onClick:()=>h(!0)},"Issue New Shares")),r.a.createElement(u.a,{open:m,onClose:()=>h(!1)}),r.a.createElement(L.a,{title:r.a.createElement(x.a,null,"Manage the dividends that are paid out to shareholders (including yourself)")},r.a.createElement(O.a,{onClick:()=>p(!0)},"Issue Dividends")),r.a.createElement(f.a,{open:d,onClose:()=>p(!1)}))}function F(){const t=S.b.Player(),e=Object(C.b)(),[a,i]=Object(n.useState)(!1),o=e.determineValuation()>=p.a.BribeThreshold&&t.factions.filter(t=>d.a[t].getInfo().offersWork()).length>0;return r.a.createElement(r.a.Fragment,null,r.a.createElement(L.a,{title:o?"Use your Corporations power and influence to bribe Faction leaders in exchange for reputation":"Your Corporation is not powerful enough to bribe Faction leaders"},r.a.createElement(O.a,{disabled:!o,onClick:function(){o&&i(!0)}},"Bribe Factions")),r.a.createElement(s.a,{open:a,onClose:()=>i(!1)}))}function D({profit:t}){const e=Object(C.b)();if(e.dividendPercentage<=0||t<=0)return r.a.createElement(r.a.Fragment,null);const a=e.dividendPercentage/100*t,n=t-a,i=a/e.totalShares;return r.a.createElement(w.a,{rows:[["Retained Profits (after dividends):",r.a.createElement(_.a,{money:n})],["Dividend Percentage:",E.a.format(e.dividendPercentage/100,"0%")],["Dividends per share:",r.a.createElement(_.a,{money:i})],["Your earnings as a shareholder:",r.a.createElement(_.a,{money:e.getDividends()})]]})}function j(){const t=Object(C.b)().storedCycles*b.a.MilliPerCycle;return t<=15e3?r.a.createElement(r.a.Fragment,null):r.a.createElement(x.a,null,"Bonus time: ",Object(v.b)(t),r.a.createElement("br",null),r.a.createElement("br",null))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(16),o=a(69),s=a(143),l=a(48),c=a(1),f=a(23),u=a(10),m=a(21),h=a(60);function d(t){const e=Object(l.b)(),a=t.upgrade,n=e.upgrades[a[0]],d=a[1],p=a[2],g=d*Math.pow(p,n),y=a[5];return r.a.createElement(h.a,{item:!0,xs:4},r.a.createElement(m.a,{display:"flex",alignItems:"center",flexDirection:"row-reverse"},r.a.createElement(u.a,{disabled:e.funds!!i.a[t].getInfo().offersWork()&&!e.hasGangWith(t)),b=Object(u.b)(),[E,v]=Object(n.useState)(0),[k,_]=Object(n.useState)(0),[w,S]=Object(n.useState)(a.length>0?a[0]:""),C=null===E||null===k||0===E&&0===k||isNaN(E)||isNaN(k)||E<0||k<0||b.fundsb.numShares;function x(t,e){return(t+e*b.sharePrice)/o.a.BribeToRepRatio}return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(m.a,null,"You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation."),r.a.createElement(g.a,{display:"flex",alignItems:"center"},r.a.createElement(m.a,null,"Faction:"),r.a.createElement(y.a,{value:w,onChange:function(t){S(t.target.value)}},a.map(t=>{if(i.a[t].getInfo().offersWork()&&!e.hasGangWith(t))return r.a.createElement(d.a,{key:t,value:t},t)}))),r.a.createElement(m.a,null,function(t,e){return 0===t&&0===e?"":isNaN(t)||isNaN(e)||t<0||e<0?"ERROR: Invalid value(s) entered":b.fundsb.numShares?"ERROR: You do not have this many shares to bribe with":"You will gain "+s.a.formatReputation(x(t,e))+" reputation with "+w+" with this bribe"}(E||0,k||0)),r.a.createElement(p.a,{onChange:function(t){v(parseFloat(t.target.value))},placeholder:"Corporation funds"}),r.a.createElement(p.a,{sx:{mx:1},onChange:function(t){_(parseFloat(t.target.value))},placeholder:"Stock Shares"}),r.a.createElement(h.a,{disabled:C,sx:{mx:1},onClick:()=>function(e,a){const n=i.a[w];if(C)return;const r=x(e,a);Object(l.a)("You gained "+s.a.formatReputation(r)+" reputation with "+n.name+" by bribing them."),n.playerReputation+=r,b.funds=b.funds-e,b.numShares-=a,t.onClose()}(E||0,k||0)},"Bribe"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(4),o=a(16),s=a(41),l=a(30),c=a(48),f=a(1),u=a(81),m=a(10),h=a(20),d=a(69),p=a(28);function g(t){const e=l.b.Player(),a=Object(c.b)(),[g,y]=Object(n.useState)(null),b=null===g||isNaN(g)||g<=0||g>a.numShares;function E(t){if(null===t.shares)return r.a.createElement(r.a.Fragment,null);if(isNaN(t.shares)||t.shares<=0)return r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to sell");if(t.shares>a.numShares)return r.a.createElement(r.a.Fragment,null,"You don't have this many shares to sell!");{const e=a.calculateShareSale(t.shares)[0];return r.a.createElement(r.a.Fragment,null,"Sell ",t.shares," shares for a total of ",i.a.formatMoney(e))}}function v(){if(!b)try{const n=Object(d.s)(a,e,g);t.onClose(),Object(o.a)(r.a.createElement(r.a.Fragment,null,"Sold ",i.a.formatMoney(g)," shares for",r.a.createElement(h.a,{money:n}),". The corporation's stock price fell to  ",r.a.createElement(h.a,{money:a.sharePrice}),"as a result of dilution.")),t.rerender()}catch(t){Object(o.a)(t+"")}}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Enter the number of shares you would like to sell. The money from selling your shares will go directly to you (NOT your Corporation).",r.a.createElement("br",null),r.a.createElement("br",null),"Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a large number of shares all at once will have an immediate effect in reducing your stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"The current price of your company's stock is ",i.a.formatMoney(a.sharePrice)),r.a.createElement(E,{shares:g,corp:a}),r.a.createElement("br",null),r.a.createElement(u.a,{variant:"standard",autoFocus:!0,type:"number",placeholder:"Shares to sell",onChange:function(t){""===t.target.value?y(null):y(Math.round(parseFloat(t.target.value)))},onKeyDown:function(t){t.key===p.a.ENTER&&v()}}),r.a.createElement(m.a,{disabled:b,onClick:v,sx:{mx:1}},"Sell shares"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(41),o=a(4),s=a(30),l=a(48),c=a(1),f=a(10),u=a(81),m=a(69),h=a(16),d=a(28);function p(t){const e=s.b.Player(),a=Object(l.b)(),[p,g]=Object(n.useState)(null);const y=1.1*a.sharePrice,b=null===p||isNaN(p)||p<=0||p>a.issuedShares||p*y>e.money;function E(){if(!b){try{Object(m.c)(a,e,p)}catch(t){Object(h.a)(t+"")}t.onClose(),t.rerender()}}function v(){return null===p?r.a.createElement(r.a.Fragment,null):isNaN(p)||p<=0?r.a.createElement(r.a.Fragment,null,"ERROR: Invalid value entered for number of shares to buyback"):p>a.issuedShares?r.a.createElement(r.a.Fragment,null,"There are not this many shares available to buy back. There are only"," ",o.a.formatBigNumber(a.issuedShares)," outstanding shares."):r.a.createElement(r.a.Fragment,null,"Purchase ",p," shares for a total of ",o.a.formatMoney(p*y))}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium. However, repurchasing shares from the market tends to lead to an increase in stock price.",r.a.createElement("br",null),r.a.createElement("br",null),"To purchase these shares, you must use your own money (NOT your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"The current buyback price of your company's stock is ",o.a.formatMoney(y),". Your company currently has ",o.a.formatBigNumber(a.issuedShares)," outstanding stock shares."),r.a.createElement(v,null),r.a.createElement("br",null),r.a.createElement(u.a,{autoFocus:!0,type:"number",placeholder:"Shares to buyback",onChange:function(t){""===t.target.value?g(null):g(Math.round(parseFloat(t.target.value)))},onKeyDown:function(t){t.key===d.a.ENTER&&E()}}),r.a.createElement(f.a,{disabled:b,onClick:E},"Buy shares"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(16),o=a(41),s=a(38),l=a(69),c=a(48),f=a(1),u=a(81),m=a(10),h=a(28);function d(t){const e=Object(c.b)(),[a,d]=Object(n.useState)(0),p=!isNaN(a)&&a>=0&&a<=100*s.a.DividendMaxPercentage;function g(){if(p&&null!==a){try{Object(l.i)(e,a/100)}catch(t){Object(i.a)(t+"")}t.onClose()}}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes yourself, as well.",r.a.createElement("br",null),r.a.createElement("br",null),"In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This percentage must be an integer between 0 and 100. (A percentage of 0 means no dividends will be issued)",r.a.createElement("br",null),r.a.createElement("br",null),"Two important things to note:",r.a.createElement("br",null),"* Issuing dividends will negatively affect your corporation's stock price",r.a.createElement("br",null),r.a.createElement("br",null),"Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends. That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share per second before taxes."),r.a.createElement(u.a,{autoFocus:!0,value:a,onChange:function(t){if(""===t.target.value)d(0);else{let e=parseFloat(t.target.value);e>100&&(e=100),e<0&&(e=0),d(e)}},onKeyDown:function(t){t.key===h.a.ENTER&&g()},placeholder:"Dividend %",type:"number"}),r.a.createElement(m.a,{disabled:!p,sx:{mx:1},onClick:g},"Allocate Dividend Percentage"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(4),o=a(16),s=a(41),l=a(36),c=a(38),f=a(48),u=a(1),m=a(81),h=a(10),d=a(28);function p(t){const e=Object(f.b)();if(null===t.shares)return r.a.createElement(r.a.Fragment,null);const a=Math.round(.9*e.sharePrice),n=Math.round(.2*e.totalShares),o=n-n%1e6;let s=t.shares;return isNaN(s)?r.a.createElement(u.a,null,"Invalid input"):(s/=1e7,s=1e7*Math.round(s),s<1e7?r.a.createElement(u.a,null,"Must issue at least 10 million new shares"):s>o?r.a.createElement(u.a,null,"You cannot issue that many shares"):r.a.createElement(u.a,null,"Issue ",i.a.format(s,"0.000a")," new shares for"," ",i.a.formatMoney(s*a),"?"))}function g(t){const e=Object(f.b)(),[a,g]=Object(n.useState)(null),y=Math.round(.2*e.totalShares),b=y-y%1e6,E=1e7*Math.round((a||0)/1e7),v=null===a||isNaN(E)||E<1e7||E>b;function k(){if(null===a)return;if(v)return;const n=Math.round(.9*e.sharePrice);let r=a;r=1e7*Math.round(r/1e7);const s=r*n;e.issueNewSharesCooldown=c.a.IssueNewSharesCooldown,e.totalShares+=r;let f=Object(l.a)(0,Math.round(r/2));f=1e6*Math.round(f/1e6),e.issuedShares+=r-f,e.funds=e.funds+s,e.immediatelyUpdateSharePrice(),t.onClose(),Object(o.a)(`Issued ${i.a.format(r,"0.000a")} and raised ${i.a.formatMoney(s)}. ${i.a.format(f,"0.000a")} of these shares were bought by private investors.

Stock price decreased to `+i.a.formatMoney(e.sharePrice))}return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(u.a,null,"You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.",r.a.createElement("br",null),r.a.createElement("br",null)," * You can issue at most ",i.a.formatMoney(b)," new shares",r.a.createElement("br",null)," * New shares are sold at a 10% discount",r.a.createElement("br",null)," * You can only issue new shares once every 12 hours",r.a.createElement("br",null)," * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share",r.a.createElement("br",null)," * Number of new shares issued must be a multiple of 10 million",r.a.createElement("br",null),r.a.createElement("br",null),"When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares. If they choose to exercise this option, these newly issued shares become private, restricted shares, which means you cannot buy them back."),r.a.createElement(p,{shares:a}),r.a.createElement(m.a,{autoFocus:!0,placeholder:"# New Shares",onChange:function(t){""===t.target.value?g(null):g(parseFloat(t.target.value))},onKeyDown:function(t){t.key===d.a.ENTER&&k()}}),r.a.createElement(h.a,{disabled:v,onClick:k,sx:{mx:1}},"Issue New Shares"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(4),o=a(38),s=a(41),l=a(48),c=a(1),f=a(10);function u(t){const e=Object(l.b)(),a=e.determineValuation();if(e.fundingRound>=o.a.FundingRoundShares.length||e.fundingRound>=o.a.FundingRoundMultiplier.length)return r.a.createElement(r.a.Fragment,null);const n=o.a.FundingRoundShares[e.fundingRound],u=a*n*o.a.FundingRoundMultiplier[e.fundingRound],m=Math.floor(o.a.INITIALSHARES*n);return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"An investment firm has offered you ",i.a.formatMoney(u)," in funding in exchange for a"," ",i.a.format(100*n,"0.000a"),"% stake in the company (",i.a.format(m,"0.000a")," shares).",r.a.createElement("br",null),r.a.createElement("br",null),"Do you accept or reject this offer?",r.a.createElement("br",null),r.a.createElement("br",null),"Hint: Investment firms will offer more money if your corporation is turning a profit"),r.a.createElement(f.a,{onClick:function(){e.fundingRound++,e.addFunds(u),e.numShares-=m,t.rerender(),t.onClose()}},"Accept"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(16),o=a(41),s=a(4),l=a(48),c=a(1),f=a(10),u=a(81),m=a(21),h=a(28);function d(t){const e=Object(l.b)(),[a,d]=Object(n.useState)(""),p=e.determineValuation()/e.totalShares;function g(){const n=parseFloat(a),r=e.determineValuation()/e.totalShares;isNaN(n)?Object(i.a)("Invalid value for number of issued shares"):n>e.numShares?Object(i.a)("Error: You don't have that many shares to issue!"):(e.public=!0,e.sharePrice=r,e.issuedShares=n,e.numShares-=n,e.addFunds(n*r),t.rerender(),Object(i.a)(`You took your ${e.name} public and earned `+s.a.formatMoney(n*r)+" in your IPO"),t.onClose())}return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will no longer own them. Your Corporation will receive ",s.a.formatMoney(p)," per share (the IPO money will be deposited directly into your Corporation's funds).",r.a.createElement("br",null),r.a.createElement("br",null),"You have a total of ",s.a.format(e.numShares,"0.000a")," of shares that you can issue."),r.a.createElement(m.a,{display:"flex",alignItems:"center"},r.a.createElement(u.a,{value:a,onChange:function(t){d(t.target.value)},autoFocus:!0,type:"number",placeholder:"Shares to issue",onKeyDown:function(t){t.key===h.a.ENTER&&g()}}),r.a.createElement(f.a,{disabled:parseFloat(a)<0||parseFloat(a)>e.numShares,sx:{mx:1},onClick:g},"Go Public")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1197),o=a(1198),s=a(30),l=a(176);function c(t,e,a){const n=a-Math.pow(e,.9)/250-t.intelligence/1600;return n<0?0:n>3?3:n}function f(t){const e=s.b.Player(),a=s.b.Router(),[f,u]=Object(n.useState)(!1);if(void 0===t.location.infiltrationData)throw new Error("Trying to do infiltration on invalid location.");const m=t.location.infiltrationData.startingSecurityLevel,h=function(t,e){return c(t,t.strength+t.defense+t.dexterity+t.agility+t.charisma,e)}(e,m),d=function(t,e){return c(t,Object(l.b)(9e3*t.strength_exp_mult,t.strength_mult)+Object(l.b)(9e3*t.defense_exp_mult,t.defense_mult)+Object(l.b)(9e3*t.agility_exp_mult,t.agility_mult)+Object(l.b)(9e3*t.dexterity_exp_mult,t.dexterity_mult)+Object(l.b)(9e3*t.charisma_exp_mult,t.charisma_mult),e)}(e,m);return console.log(`${h} ${d}`),f?r.a.createElement(o.a,{StartingDifficulty:m,Difficulty:h,Reward:d,MaxLevel:t.location.infiltrationData.maxClearanceLevel}):r.a.createElement(i.a,{Location:t.location,Difficulty:h,MaxLevel:t.location.infiltrationData.maxClearanceLevel,start:()=>u(!0),cancel:function(){a.toCity()}})}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(60),o=a(1),s=a(10),l=a(4);function c(t,e){let a="";return e<=0?e=0:e>13?e=13:(e--,a=">"),r.a.createElement("span",{style:{color:t}},"=".repeat(e),a," ".repeat(13-a.length-e))}function f(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h4"},"Infiltrating ",t.Location.name)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Maximum level: ",t.MaxLevel)),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Difficulty: ",l.a.format(33.3333*t.Difficulty,"0")," / 100")),t.Difficulty>1.5&&r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{variant:"h5",color:"primary"},"Warning: This location is too heavily guarded for your current stats, try training or finding an easier location.")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"[",0===(e=t.Difficulty)?r.a.createElement("span",{style:{color:"white"}},">"," ".repeat(38)):r.a.createElement(r.a.Fragment,null,c("white",13*e),c("orange",13*(e-1)),c("red",13*(e-2))),"]"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ^ ^ ^ ^"),r.a.createElement(o.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," Trivial Normal Hard Impossible")),r.a.createElement(i.a,{item:!0,xs:10},r.a.createElement(o.a,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."),r.a.createElement("br",null),r.a.createElement(o.a,null,"The minigames you play are randomly selected. It might take you few tries to get used to them."),r.a.createElement("br",null),r.a.createElement(o.a,null,"No game require use of the mouse."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Spacebar is the default action/confirm button."),r.a.createElement("br",null),r.a.createElement(o.a,null,"Everything that uses arrow can also use WASD"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sometimes the rest of the keyboard is used.")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:t.start},"Start")),r.a.createElement(i.a,{item:!0,xs:3},r.a.createElement(s.a,{onClick:t.cancel},"Cancel"))));var e}},function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var n,r=a(30),i=a(0),o=a.n(i),s=a(60),l=a(10),c=a(1199),f=a(1200),u=a(1201),m=a(1202),h=a(1203),d=a(1204),p=a(1205),g=a(1206),y=a(1207),b=a(1208),E=a(1);!function(t){t[t.Countdown=0]="Countdown",t[t.Minigame=1]="Minigame",t[t.Result=2]="Result",t[t.Sell=3]="Sell"}(n||(n={}));const v=[u.a,f.a,m.a,h.a,d.a,p.a,g.a,y.a];function k(t){const e=r.b.Player(),a=r.b.Router(),[f,u]=Object(i.useState)(1),[m,h]=Object(i.useState)(n.Countdown),[d,p]=Object(i.useState)(""),[g,y]=Object(i.useState)({lastGames:[-1,-1],id:Math.floor(Math.random()*v.length)});function k(){let t=g.lastGames[0];const e=[g.lastGames[0],g.lastGames[1],g.id];for(;e.includes(t);)t=Math.floor(Math.random()*v.length);return t}function _(){y({lastGames:[g.lastGames[1],g.id],id:k()})}function w(t){p(e=>{let a=e;return a+=t?"✓":"✗",a.length>15&&(a=a.slice(1)),a})}let S;switch(m){case n.Countdown:S=o.a.createElement(c.a,{onFinish:()=>h(n.Minigame)});break;case n.Minigame:{const r=v[g.id];S=o.a.createElement(r,{onSuccess:function(){w(!0),f===t.MaxLevel?h(n.Sell):(h(n.Countdown),u(f+1)),_()},onFailure:function(r){h(n.Countdown),w(!1);const i=null!=r&&r.automated?e.hp:3*t.StartingDifficulty;e.takeDamage(i)?a.toCity():_()},difficulty:t.Difficulty+f/50});break}case n.Sell:S=o.a.createElement(b.a,{StartingDifficulty:t.StartingDifficulty,Difficulty:t.Difficulty,Reward:t.Reward,MaxLevel:t.MaxLevel})}function C(){return o.a.createElement(E.a,{variant:"h4"},o.a.createElement("span",{style:{color:"gray"}},d.slice(0,d.length-1)),d[d.length-1])}return o.a.createElement(o.a.Fragment,null,o.a.createElement(s.a,{container:!0,spacing:3},o.a.createElement(s.a,{item:!0,xs:3},o.a.createElement(l.a,{onClick:function(){a.toCity()}},"Cancel")),o.a.createElement(s.a,{item:!0,xs:3},o.a.createElement(E.a,null,"Level: ",f," / ",t.MaxLevel),o.a.createElement(C,null)),o.a.createElement(s.a,{item:!0,xs:12},S)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(60),o=a(1);function s(t){const[e,a]=Object(n.useState)(3);return Object(n.useEffect)(()=>{0!==e?setTimeout(()=>a(e-1),200):t.onFinish()}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(o.a,{variant:"h4"},"Get Ready!"),r.a.createElement(o.a,{variant:"h4"},e))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(60),o=a(215),s=a(216),l=a(133),c=a(217),f=a(606),u=a(1),m=a(28);const h={Trivial:{timer:8e3,min:2,max:3},Normal:{timer:6e3,min:4,max:5},Hard:{timer:4e3,min:4,max:6},Impossible:{timer:2500,min:7,max:7}};function d(t){const e={timer:0,min:0,max:0};Object(c.a)(h,t.difficulty,e);const a=e.timer,[d,p]=Object(n.useState)(""),[g]=Object(n.useState)(function(t){let e="";const a=[m.a.OPEN_BRACKET,m.a.LESS_THAN,m.a.OPEN_PARENTHESIS,m.a.OPEN_BRACE],n=Object(l.d)(t.min,t.max);for(let t=0;t{let t=window.setTimeout(()=>{m(1),t=window.setTimeout(()=>{m(2),t=window.setTimeout(()=>m(0),e.window)},250)},3250*Math.random()+1500-(250+e.window));return()=>{clearInterval(t)}},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:5e3,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(c.a,{variant:"h4"},"Slash when his guard is down!"),0===a&&r.a.createElement(c.a,{variant:"h4"},"Guarding ..."),1===a&&r.a.createElement(c.a,{variant:"h4"},"Preparing?"),2===a&&r.a.createElement(c.a,{variant:"h4"},"ATTACKING!"),r.a.createElement(o.a,{onKeyDown:function(e){e.preventDefault(),e.key===f.a.SPACE&&(2!==a?t.onFailure():t.onSuccess())},onFailure:t.onFailure})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(60),o=a(215),s=a(216),l=a(133),c=a(217),f=a(606),u=a(1),m=a(28);const h={Trivial:{timer:16e3,min:3,max:4},Normal:{timer:12500,min:2,max:3},Hard:{timer:15e3,min:3,max:4},Impossible:{timer:8e3,min:4,max:4}};function d(t){const e={timer:0,min:0,max:0};Object(c.a)(h,t.difficulty,e);const a=e.timer,[d]=Object(n.useState)(function(t){const e=Object(l.d)(t.min,t.max);let a="";for(let t=0;t0&&(a+=" "),a+=p[Math.floor(Math.random()*p.length)];return a}(e)),[g,y]=Object(n.useState)("");return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(u.a,{variant:"h4"},"Type it backward"),r.a.createElement(o.a,{onKeyDown:function(e){if(e.preventDefault(),e.key===m.a.BACKSPACE)return;const a=g+e.key.toUpperCase();d.startsWith(a)?d===a?t.onSuccess():y(a):t.onFailure()},onFailure:t.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(u.a,{style:{transform:"scaleX(-1)"}},d)),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(u.a,null,g,r.a.createElement(f.a,null))))}const p=["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"]},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(60),o=a(215),s=a(216),l=a(217),c=a(1),f=a(28),u=a(133);const m={Trivial:{timer:12e3,size:6},Normal:{timer:9e3,size:8},Hard:{timer:5e3,size:9},Impossible:{timer:2500,size:12}};function h(t){const e={timer:0,size:0};Object(l.a)(m,t.difficulty,e);const a=e.timer,[h]=Object(n.useState)(function(t){const e=[];e.push(d[Math.floor(Math.random()*d.length)]);for(let a=0;a0;e--){const a=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[a],t[a]=n}}(e),e}(e)),[g,y]=Object(n.useState)(0);return r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(c.a,{variant:"h4"},"Say something nice about the guard."),r.a.createElement(o.a,{onKeyDown:function(e){e.preventDefault();const a=e.key;if(a===f.a.SPACE)return void(d.includes(h[g])?t.onSuccess():t.onFailure());let n=g;for([f.a.UP_ARROW,f.a.W,f.a.RIGHT_ARROW,f.a.D].map(t=>t).includes(a)&&n++,[f.a.DOWN_ARROW,f.a.S,f.a.LEFT_ARROW,f.a.A].map(t=>t).includes(a)&&n--;n<0;)n+=h.length;for(;n>h.length-1;)n-=h.length;y(n)},onFailure:t.onFailure})),r.a.createElement(i.a,{item:!0,xs:6},r.a.createElement(c.a,{variant:"h5",color:"primary"},u.f),r.a.createElement(c.a,{variant:"h5",color:"primary"},h[g]),r.a.createElement(c.a,{variant:"h5",color:"primary"},u.a)))}const d=["affectionate","agreeable","bright","charming","creative","determined","energetic","friendly","funny","generous","polite","likable","diplomatic","helpful","giving","kind","hardworking","patient","dynamic","loyal"],p=["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"]},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(60),o=a(215),s=a(216),l=a(133),c=a(217),f=a(1);const u={Trivial:{timer:13e3,min:6,max:8},Normal:{timer:7e3,min:7,max:8},Hard:{timer:5e3,min:8,max:9},Impossible:{timer:3e3,min:9,max:10}};function m(t){const e={timer:0,min:0,max:0};Object(c.a)(u,t.difficulty,e);const a=e.timer,[m]=Object(n.useState)(function(t){const e=[l.c,l.e,l.f,l.a];let a="";for(let n=0;n=m.length&&t.onSuccess()):t.onFailure()},onFailure:t.onFailure})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(60),o=a(215),s=a(216),l=a(217),c=a(133),f=a(1),u=a(28);const m={Trivial:{timer:12500,width:3,height:3,symbols:6},Normal:{timer:15e3,width:4,height:4,symbols:7},Hard:{timer:12500,width:5,height:5,symbols:8},Impossible:{timer:1e4,width:6,height:6,symbols:9}};function h(t){const e={timer:0,width:0,height:0,symbols:0};Object(l.a)(m,t.difficulty,e);const a=e.timer,[h]=Object(n.useState)(function(t){const e=[];for(let a=0;ae==g?r.a.createElement("span",{key:""+e,style:{fontSize:"1em",color:"blue"}},t," "):r.a.createElement("span",{key:""+e,style:{fontSize:"1em"}},t," "))),r.a.createElement("br",null),h.map((t,e)=>r.a.createElement("div",{key:e},r.a.createElement(f.a,null,t.map((t,a)=>a==b[0]&&e==b[1]?r.a.createElement("span",{key:`${a}${e}`,style:{fontSize:"2em",color:"blue"}},t," "):r.a.createElement("span",{key:`${a}${e}`,style:{fontSize:"2em"}},t," "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(e){e.preventDefault();const a=[0,0];switch(Object(c.b)(e)){case c.f:a[1]--;break;case c.c:a[0]--;break;case c.a:a[1]++;break;case c.e:a[0]++}const n=[b[0]+a[0],b[1]+a[1]];if(n[0]=(n[0]+h[0].length)%h[0].length,n[1]=(n[1]+h.length)%h.length,E(n),e.key===u.a.SPACE){if(h[b[1]][b[0]]!==p[g])return void t.onFailure();y(g+1),p.length===g+1&&t.onSuccess()}},onFailure:t.onFailure})))}function d(){return"ABCDEF0123456789"[Math.floor(16*Math.random())]}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(60),o=a(215),s=a(216),l=a(217),c=a(133),f=a(1),u=a(28);const m={Trivial:{timer:15e3,width:3,height:3,mines:4},Normal:{timer:15e3,width:4,height:4,mines:7},Hard:{timer:15e3,width:5,height:5,mines:11},Impossible:{timer:15e3,width:6,height:6,mines:15}};function h(t){const e={timer:0,width:0,height:0,mines:0};Object(l.a)(m,t.difficulty,e);const a=e.timer,[h]=Object(n.useState)(function(t){const e=d(t);for(let a=0;a{const t=setTimeout(()=>v(!1),2e3);return()=>clearInterval(t)},[]),r.a.createElement(i.a,{container:!0,spacing:3},r.a.createElement(s.a,{millis:a,onExpire:t.onFailure}),r.a.createElement(i.a,{item:!0,xs:12},r.a.createElement(f.a,{variant:"h4"},E?"Remember all the mines!":"Mark all the mines!"),h.map((t,e)=>r.a.createElement("div",{key:e},r.a.createElement(f.a,null,t.map((t,a)=>E?h[e][a]?r.a.createElement("span",{key:a},"[?] "):r.a.createElement("span",{key:a},"[ ] "):a==y[0]&&e==y[1]?r.a.createElement("span",{key:a},"[X] "):p[e][a]?r.a.createElement("span",{key:a},"[.] "):r.a.createElement("span",{key:a},"[ ] "))),r.a.createElement("br",null))),r.a.createElement(o.a,{onKeyDown:function(e){if(e.preventDefault(),E)return;const a=[0,0];switch(Object(c.b)(e)){case c.f:a[1]--;break;case c.c:a[0]--;break;case c.a:a[1]++;break;case c.e:a[0]++}const n=[y[0]+a[0],y[1]+a[1]];if(n[0]=(n[0]+h[0].length)%h[0].length,n[1]=(n[1]+h.length)%h.length,b(n),e.key==u.a.SPACE){if(!h[y[1]][y[0]])return void t.onFailure();g(e=>(e[y[1]][y[0]]=!0,function(t,e){function a(t){return t.flat().reduce((t,e)=>t+(e?1:0),0)}return a(t)===a(e)}(h,e)&&t.onSuccess(),e))}},onFailure:t.onFailure})))}function d(t){const e=[];for(let a=0;ar.a.createElement(o.a,{key:e},t.toString())),r.a.createElement(o.a,null,new Array(u.length).fill(0).map((t,e)=>r.a.createElement("span",{key:e}," ",e+1,"    "))),new Array(8).fill(0).map((t,e)=>r.a.createElement("div",{key:e},r.a.createElement(o.a,null,u.map((t,a)=>3!==e&&4!==e||!p[a]?r.a.createElement("span",{key:a,style:{color:t.colors[e%t.colors.length]}},"|",t.tpe,"|   "):r.a.createElement("span",{key:a},"      "))))),r.a.createElement(s.a,{onKeyDown:function(e){e.preventDefault();const a=parseInt(e.key);a<1||a>u.length||isNaN(a)||g(e=>{const n=[...e];n[a-1]=!0,function(t){return!E.some(e=>e.shouldCut(u[t-1],t-1))}(a)&&t.onFailure();const r=[];for(let t=0;tt===n[e])&&t.onSuccess(),n})},onFailure:t.onFailure})))}function y(t){const e=Math.floor(Math.random()*t.length);return{toString:()=>`Cut wires number ${e+1}.`,shouldCut:(t,a)=>e===a}}function b(t){const e=t[Math.floor(Math.random()*t.length)].colors[0];return{toString:()=>`Cut all wires colored ${p[e]}.`,shouldCut:t=>t.colors.includes(e)}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(29),r=a(0),i=a.n(r),o=a(60),s=a(20),l=a(116),c=a(6),f=a(30),u=a(1),m=a(10),h=a(79),d=a(128);function p(t){const e=f.b.Player(),a=f.b.Router(),[p,g]=Object(r.useState)("none");function y(){a.toCity()}const b=t.MaxLevel*Math.pow(1.01,t.MaxLevel),E=Math.pow(t.Reward+1,1.1)*Math.pow(t.StartingDifficulty,1.2)*30*b*c.a.InfiltrationRep,v=Math.pow(t.Reward+1,2)*Math.pow(t.StartingDifficulty,3)*3e3*b*c.a.InfiltrationMoney;return i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{container:!0,spacing:3},i.a.createElement(o.a,{item:!0,xs:10},i.a.createElement(u.a,{variant:"h4"},"Infiltration successful!")),i.a.createElement(o.a,{item:!0,xs:10},i.a.createElement(u.a,{variant:"h5",color:"primary"},"You can trade the confidential information you found for money or reputation."),i.a.createElement(d.a,{value:p,onChange:function(t){g(t.target.value)}},i.a.createElement(h.a,{key:"none",value:"none"},"none"),e.factions.filter(t=>n.a[t].getInfo().offersWork()).map(t=>i.a.createElement(h.a,{key:t,value:t},t))),i.a.createElement(m.a,{onClick:function(){"none"!==p&&(n.a[p].playerReputation+=E,y())}},"Trade for ",i.a.createElement(l.a,{reputation:E})," reputation")),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(m.a,{onClick:function(){e.gainMoney(v,"infiltration"),y()}},"Sell for ",i.a.createElement(s.a,{money:v}))),i.a.createElement(o.a,{item:!0,xs:3},i.a.createElement(m.a,{onClick:y},"Quit"))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(30),o=a(8),s=a(4),l=a(116),c=a(468),f=a(110),u=a(20),m=a(24),h=a(29),d=a(237),p=a(66),g=a(218),y=a(11),b=a(1),E=a(60),v=a(10),k=a(192);const _=1e3/o.a.MilliPerCycle;function w(){const t=Object(n.useState)(!1)[1];function e(){t(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(e,o.a.MilliPerCycle);return()=>clearInterval(t)},[]);const a=i.b.Player(),w=i.b.Router();if(a.workType==o.a.WorkTypeFaction){const t=h.a[a.currentWorkFactionName];if(!t)return r.a.createElement(r.a.Fragment,null,r.a.createElement(b.a,{variant:"h4",color:"primary"},"You have not joined ",a.currentWorkFactionName||"(Faction not found)"," yet or cannot work at this time, please try again if you think this should have worked"),r.a.createElement(v.a,{onClick:()=>w.toFactions()},"Back to Factions"));function S(){w.toFaction(t),a.finishFactionWork(!0)}function C(){w.toFaction(t),a.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently ",a.currentWorkFactionDescription," for your faction ",t.name,r.a.createElement("br",null),"(Current Faction Reputation: ",r.a.createElement(l.a,{reputation:t.playerReputation}),"). ",r.a.createElement("br",null),"You have been doing this for ",Object(m.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{money:a.workMoneyGained})," (",r.a.createElement(f.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this faction ",r.a.createElement("br",null),r.a.createElement("br",null),a.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null)),r.a.createElement("br",null),a.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null)),a.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null)),a.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null)),a.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null)),r.a.createElement("br",null),a.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null)),r.a.createElement("br",null),"You will automatically finish after working for 20 hours. You can cancel earlier if you wish.",r.a.createElement("br",null),"There is no penalty for cancelling earlier.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Stop Faction Work"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}const x=a.className;if(""!==a.className){function S(){a.finishClass(!0),w.toCity()}function C(){w.toCity(),a.stopFocusing()}let t="";return t=x==o.a.ClassGymStrength||x==o.a.ClassGymDefense||x==o.a.ClassGymDexterity||x==o.a.ClassGymAgility?"Stop training at gym":"Stop taking course",r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You have been ",x," for ",Object(m.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"This has cost you: ",r.a.createElement("br",null),r.a.createElement(u.a,{money:-a.workMoneyGained})," (",r.a.createElement(f.a,{money:a.workMoneyLossRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),"You have gained: ",r.a.createElement("br",null),a.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)," / sec) hacking exp ",r.a.createElement("br",null)),a.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)," / sec) strength exp ",r.a.createElement("br",null)),a.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)," / sec) defense exp ",r.a.createElement("br",null)),a.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)," / sec) dexterity exp ",r.a.createElement("br",null)),a.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)," / sec) agility exp ",r.a.createElement("br",null)),a.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)," / sec) charisma exp ",r.a.createElement("br",null)),"You may cancel at any time")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},t),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(a.workType==o.a.WorkTypeCompany){const t=p.a[a.companyName];if(null==t||!(t instanceof d.a))return r.a.createElement(r.a.Fragment,null,r.a.createElement(b.a,{variant:"h4",color:"primary"},"You cannot work for ",a.companyName||"(Company not found)"," at this time, please try again if you think this should have worked"),r.a.createElement(v.a,{onClick:()=>w.toTerminal()},"Back to Terminal"));const e=t.playerReputation;function S(){a.finishWork(!0),w.toJob()}function C(){a.stopFocusing(),w.toJob()}const n=a.jobs[a.companyName],i=.5===a.cancelationPenalty()?"half":"three-quarters";return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",n," at ",a.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:e}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{money:a.workMoneyGained})," (",r.a.createElement(f.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),a.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null)),r.a.createElement("br",null),a.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null)),a.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null)),a.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null)),a.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null)),r.a.createElement("br",null),a.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null)),r.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 ",i," of the reputation you've earned so far.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(a.workType==o.a.WorkTypeCompanyPartTime){function S(){a.finishWorkPartTime(!0),w.toJob()}function C(){a.stopFocusing(),w.toJob()}const t=p.a[a.companyName];let e=0;if(null==t||!(t instanceof d.a))throw new Error("Could not find Company: "+a.companyName);e=t.playerReputation;const n=a.jobs[a.companyName];return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working as a ",n," at ",a.companyName," (Current Company Reputation:"," ",r.a.createElement(l.a,{reputation:e}),")",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"You have earned: ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(u.a,{money:a.workMoneyGained})," (",r.a.createElement(f.a,{money:a.workMoneyGainRate*_}),")"," ",r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{reputation:a.workRepGained})," (",r.a.createElement(c.a,{reputation:a.workRepGainRate*_}),") reputation for this company ",r.a.createElement("br",null),r.a.createElement("br",null),a.workHackExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workHackExpGained)," (",s.a.formatExp(a.workHackExpGainRate*_)+" / sec",") hacking exp ",r.a.createElement("br",null)),r.a.createElement("br",null),a.workStrExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workStrExpGained)," (",s.a.formatExp(a.workStrExpGainRate*_)+" / sec",") strength exp ",r.a.createElement("br",null)),a.workDefExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDefExpGained)," (",s.a.formatExp(a.workDefExpGainRate*_)+" / sec",") defense exp ",r.a.createElement("br",null)),a.workDexExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workDexExpGained)," (",s.a.formatExp(a.workDexExpGainRate*_)+" / sec",") dexterity exp ",r.a.createElement("br",null)),a.workAgiExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workAgiExpGained)," (",s.a.formatExp(a.workAgiExpGainRate*_)+" / sec",") agility exp ",r.a.createElement("br",null)),r.a.createElement("br",null),a.workChaExpGained>0&&r.a.createElement(r.a.Fragment,null,s.a.formatExp(a.workChaExpGained)," (",s.a.formatExp(a.workChaExpGainRate*_)+" / sec",") charisma exp ",r.a.createElement("br",null)),r.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.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Stop Working"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(""!==a.crimeType){const t=Math.round(a.timeWorked/a.timeNeededToCompleteWork*100);let e=Math.round(t/5);e<0&&(e=0),e>20&&(e=20);const n=Object(k.a)({progress:(e+1)/20,totalTicks:20});return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,r.a.createElement(b.a,null,"You are attempting to ",a.crimeType,"."),r.a.createElement("br",null),r.a.createElement(b.a,null,"Time remaining: ",Object(m.b)(a.timeNeededToCompleteWork-a.timeWorked)),r.a.createElement("br",null),r.a.createElement("pre",null,n))),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{onClick:()=>{w.toLocation(g.a[y.a.Slums]),a.finishCrime(!0)}},"Cancel crime")))}if(""!==a.createProgramName){function S(){a.finishCreateProgramWork(!0),w.toTerminal()}function C(){w.toTerminal(),a.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working on coding ",a.createProgramName,".",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"The program is ",(a.timeWorkedCreateProgram/a.timeNeededToCompleteWork*100).toFixed(2),"% complete. ",r.a.createElement("br",null),"If you cancel, your work will be saved and you can come back to complete the program later.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Cancel work on creating program"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}if(""!==a.graftAugmentationName){function S(){a.finishGraftAugmentationWork(!0),w.toTerminal()}function C(){w.toTerminal(),a.stopFocusing()}return r.a.createElement(E.a,{container:!0,direction:"column",justifyContent:"center",alignItems:"center",style:{minHeight:"100vh"}},r.a.createElement(E.a,{item:!0},r.a.createElement(b.a,null,"You are currently working on crafting ",a.graftAugmentationName,".",r.a.createElement("br",null),r.a.createElement("br",null),"You have been working for ",Object(m.b)(a.timeWorked),r.a.createElement("br",null),r.a.createElement("br",null),"The augmentation is"," ",(a.timeWorkedGraftAugmentation/a.timeNeededToCompleteWork*100).toFixed(2),"% done being crafted.",r.a.createElement("br",null),"If you cancel, your work will ",r.a.createElement("b",null,"not")," be saved, and the money you spent will ",r.a.createElement("b",null,"not")," be returned.")),r.a.createElement(E.a,{item:!0},r.a.createElement(v.a,{sx:{mx:2},onClick:S},"Cancel work on crafting Augmentation"),r.a.createElement(v.a,{onClick:C},"Do something else simultaneously")))}return a.workType||w.toTerminal(),r.a.createElement(r.a.Fragment,null)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return G}));var n=a(0),r=a.n(n),i=a(113),o=a(137),s=a(1),l=a(538),c=a(60),f=a(128),u=a(79),m=a(10),h=a(21),d=a(286),p=a(74),g=a(120),y=a(23),b=a(81),E=a(1251),v=a.n(E),k=a(1252),_=a.n(k),w=a(452),S=a.n(w),C=a(1253),x=a.n(C),L=a(1211),O=a(250),M=a(140),T=a(9),A=a(607),R=a(609),N=a(610),P=a(620),I=a(369),F=a(187),D=a(108),j=a(24);const B=Object(i.a)(t=>Object(o.a)({root:{width:50,padding:t.spacing(2),userSelect:"none"}}));function G(t){var e,a,i,o,E,k,w,C;const G=B(),W=Object(n.useRef)(null),[H,U]=Object(n.useState)(T.a.CodeInstructionRunTime),[q,$]=Object(n.useState)(T.a.MaxLogCapacity),[K,z]=Object(n.useState)(T.a.MaxPortCapacity),[V,Y]=Object(n.useState)(T.a.MaxTerminalCapacity),[J,X]=Object(n.useState)(T.a.AutosaveInterval),[Q,Z]=Object(n.useState)(T.a.TimestampsFormat),[tt,et]=Object(n.useState)(T.a.Locale),[at,nt]=Object(n.useState)(!1),[rt,it]=Object(n.useState)(!1),[ot,st]=Object(n.useState)(null);return r.a.createElement("div",{className:G.root,style:{width:"90%"}},r.a.createElement(s.a,{variant:"h4",gutterBottom:!0},"Options"),r.a.createElement(c.a,{container:!0,spacing:3},r.a.createElement(c.a,{item:!0,xs:12,sm:6},r.a.createElement(d.a,null,r.a.createElement(p.a,null,r.a.createElement(h.a,{display:"grid",sx:{width:"fit-content",gridTemplateColumns:"1fr 3.5fr",gap:1}},r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(s.a,null,".script exec time (ms)")),r.a.createElement(l.a,{value:H,onChange:function(t,e){U(e),T.a.CodeInstructionRunTime=e},step:1,min:5,max:100,valueLabelDisplay:"auto"}),r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(s.a,null,"Netscript log size")),r.a.createElement(l.a,{value:q,onChange:function(t,e){$(e),T.a.MaxLogCapacity=e},step:20,min:20,max:500,valueLabelDisplay:"auto"}),r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(s.a,null,"Netscript port size")),r.a.createElement(l.a,{value:K,onChange:function(t,e){z(e),T.a.MaxPortCapacity=e},step:1,min:20,max:100,valueLabelDisplay:"auto"}),r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"The maximum number of entries that can be written to the terminal. Setting this too high can cause the game to use a lot of memory.")},r.a.createElement(s.a,null,"Terminal capacity")),r.a.createElement(l.a,{value:V,onChange:function(t,e){Y(e),T.a.MaxTerminalCapacity=e},step:50,min:50,max:500,valueLabelDisplay:"auto",marks:!0}),r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"The time (in seconds) between each autosave. Set to 0 to disable autosave.")},r.a.createElement(s.a,null,"Autosave interval (s)")),r.a.createElement(l.a,{value:J,onChange:function(t,e){X(e),T.a.AutosaveInterval=e},step:30,min:0,max:600,valueLabelDisplay:"auto",marks:!0}))),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressMessages,onChange:t=>T.a.SuppressMessages=t,text:"Suppress story messages",tooltip:r.a.createElement(r.a.Fragment,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.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressFactionInvites,onChange:t=>T.a.SuppressFactionInvites=t,text:"Suppress faction invites",tooltip:r.a.createElement(r.a.Fragment,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.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressTravelConfirmation,onChange:t=>T.a.SuppressTravelConfirmation=t,text:"Suppress travel confirmations",tooltip:r.a.createElement(r.a.Fragment,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.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressBuyAugmentationConfirmation,onChange:t=>T.a.SuppressBuyAugmentationConfirmation=t,text:"Suppress augmentations confirmation",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the confirmation message before buying augmentation will not show up.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressTIXPopup,onChange:t=>T.a.SuppressTIXPopup=t,text:"Suppress TIX messages",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the stock market will never create any popup.")})),!!t.player.bladeburner&&r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressBladeburnerPopup,onChange:t=>T.a.SuppressBladeburnerPopup=t,text:"Suppress bladeburner popup",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, then having your Bladeburner actions interrupted by being busy with something else will not display a popup message.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressSavedGameToast,onChange:t=>T.a.SuppressSavedGameToast=t,text:"Suppress Auto-Save Game Toast",tooltip:r.a.createElement(r.a.Fragment,null,'If this is set, there will be no "Game Saved!" toast appearing after an auto-save.')})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SuppressAutosaveDisabledWarnings,onChange:t=>T.a.SuppressAutosaveDisabledWarnings=t,text:"Suppress Auto-Save Disabled Warning",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, there will be no warning triggered when auto-save is disabled (at 0).")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableHotkeys,onChange:t=>T.a.DisableHotkeys=t,text:"Disable hotkeys",tooltip:r.a.createElement(r.a.Fragment,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.')})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableASCIIArt,onChange:t=>T.a.DisableASCIIArt=t,text:"Disable ascii art",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set all ASCII art will be disabled.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableTextEffects,onChange:t=>T.a.DisableTextEffects=t,text:"Disable text effects",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, text effects will not be displayed. This can help if text is difficult to read in certain areas.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.DisableOverviewProgressBars,onChange:t=>T.a.DisableOverviewProgressBars=t,text:"Disable Overview Progress Bars",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the progress bars in the character overview will be hidden.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.EnableBashHotkeys,onChange:t=>T.a.EnableBashHotkeys=t,text:"Enable bash hotkeys",tooltip:r.a.createElement(r.a.Fragment,null,"Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default browser shortcuts are overriden by the new Bash shortcuts.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.UseIEC60027_2,onChange:t=>T.a.UseIEC60027_2=t,text:"Use GiB instead of GB",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2.")})),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.ExcludeRunningScriptsFromSave,onChange:t=>T.a.ExcludeRunningScriptsFromSave=t,text:"Exclude Running Scripts from Save",tooltip:r.a.createElement(r.a.Fragment,null,"If this is set, the save file will exclude all running scripts. This is only useful if your save is lagging a lot. You'll have to restart your script every time you launch the game.")})),r.a.createElement(p.a,null,r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Terminal commands and log entries will be timestamped. See https://date-fns.org/docs/Getting-Started/")},r.a.createElement("span",null,r.a.createElement(b.a,{InputProps:{startAdornment:r.a.createElement(s.a,{color:"format error"===Object(I.a)(Q)&&""!==Q?"error":"success"},"Timestamp format: ")},value:Q,onChange:function(t){Z(t.target.value),T.a.TimestampsFormat=t.target.value},placeholder:"yyyy-MM-dd hh:mm:ss"})))),r.a.createElement(p.a,null,r.a.createElement(F.a,{checked:T.a.SaveGameOnFileSave,onChange:t=>T.a.SaveGameOnFileSave=t,text:"Save game on file save",tooltip:r.a.createElement(r.a.Fragment,null,"Save your game any time a file is saved in the script editor.")})),r.a.createElement(p.a,null,r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Sets the locale for displaying numbers.")},r.a.createElement(s.a,null,"Locale ")),r.a.createElement(f.a,{value:tt,onChange:function(t){et(t.target.value),T.a.Locale=t.target.value}},r.a.createElement(u.a,{value:"en"},"en"),r.a.createElement(u.a,{value:"bg"},"bg"),r.a.createElement(u.a,{value:"cs"},"cs"),r.a.createElement(u.a,{value:"da-dk"},"da-dk"),r.a.createElement(u.a,{value:"de"},"de"),r.a.createElement(u.a,{value:"en-au"},"en-au"),r.a.createElement(u.a,{value:"en-gb"},"en-gb"),r.a.createElement(u.a,{value:"es"},"es"),r.a.createElement(u.a,{value:"fr"},"fr"),r.a.createElement(u.a,{value:"hu"},"hu"),r.a.createElement(u.a,{value:"it"},"it"),r.a.createElement(u.a,{value:"lv"},"lv"),r.a.createElement(u.a,{value:"no"},"no"),r.a.createElement(u.a,{value:"pl"},"pl"),r.a.createElement(u.a,{value:"ru"},"ru")))),!location.href.startsWith("file://")&&r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,r.a.createElement(s.a,null,"danielyxie / BigD (Original developer): "),r.a.createElement("form",{action:"https://www.paypal.com/cgi-bin/webscr",method:"post",target:"_blank"},r.a.createElement("input",{type:"hidden",name:"cmd",value:"_s-xclick"}),r.a.createElement("input",{type:"hidden",name:"encrypted",value:"-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwM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JKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----"}),r.a.createElement("input",{type:"image",src:"https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif",name:"submit",alt:"PayPal - The safer, easier way to pay online!"}))),r.a.createElement(p.a,null,r.a.createElement(s.a,null,"hydroflame (Current maintainer):"," ",r.a.createElement(g.a,{href:"https://www.google.com/search?q=Where+to+donate+blood+near+me%3F",target:"_blank"},"Donate blood!")," ")))),r.a.createElement(h.a,{sx:{display:"grid",width:"fit-content",height:"fit-content"}},r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(m.a,{onClick:()=>t.save(),startIcon:r.a.createElement(S.a,null)},"Save Game"),r.a.createElement(A.a,null)),r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Export your game to a text file.")},r.a.createElement(m.a,{onClick:()=>t.export(),startIcon:r.a.createElement(v.a,null)},"Export Game")),r.a.createElement(y.a,{title:r.a.createElement(s.a,null,"Import your game from a text file.",r.a.createElement("br",null),"This will ",r.a.createElement("strong",null,"overwrite")," your current game. Back it up first!")},r.a.createElement(m.a,{onClick:function(){if(!(window.File&&window.FileReader&&window.FileList&&window.Blob))return;const t=W.current;if(null===t)throw new Error("import input should not be null");t.click()},startIcon:r.a.createElement(_.a,null)},"Import Game",r.a.createElement("input",{ref:W,id:"import-game-file-selector",type:"file",hidden:!0,onChange:async function(t){try{const e=await D.c.getImportStringFromFile(t.target.files),a=await D.c.getImportDataFromString(e);st(a),it(!0)}catch(t){M.b.emit(t.toString(),"error",5e3)}}}))),r.a.createElement(O.a,{open:rt,onClose:()=>it(!1),onConfirm:()=>async function(){if(ot){try{await D.c.importGame(ot.base64)}catch(t){M.b.emit(t.toString(),"error",5e3)}it(!1),st(null)}}(),additionalButton:r.a.createElement(m.a,{onClick:function(){ot&&(t.router.toImportSave(ot.base64),it(!1),st(null))}},"Compare Save"),confirmationText:r.a.createElement(r.a.Fragment,null,"Importing a new game will ",r.a.createElement("strong",null,"completely wipe")," the current data!",r.a.createElement("br",null),r.a.createElement("br",null),"Make sure to have a backup of your current save file before importing.",r.a.createElement("br",null),"The file you are attempting to import seems valid.",(null!==(e=null==ot||null===(a=ot.playerData)||void 0===a?void 0:a.lastSave)&&void 0!==e?e:0)>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),"The export date of the save file is"," ",r.a.createElement("strong",null,new Date(null!==(i=null==ot||null===(o=ot.playerData)||void 0===o?void 0:o.lastSave)&&void 0!==i?i:0).toLocaleString())),(null!==(E=null==ot||null===(k=ot.playerData)||void 0===k?void 0:k.totalPlaytime)&&void 0!==E?E:0)>0&&r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement("br",null),"Total play time of imported game:"," ",Object(j.b)(null!==(w=null==ot||null===(C=ot.playerData)||void 0===C?void 0:C.totalPlaytime)&&void 0!==w?w:0)),r.a.createElement("br",null),r.a.createElement("br",null))})),r.a.createElement(h.a,{sx:{display:"grid"}},r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(m.a,{onClick:()=>t.forceKill()},"Force kill all active scripts"))),r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(R.a,{noConfirmation:T.a.SuppressBuyAugmentationConfirmation,onTriggered:t.softReset}),r.a.createElement(y.a,{title:r.a.createElement(s.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.")},r.a.createElement(m.a,{onClick:()=>nt(!0)},"Diagnose files"))),r.a.createElement(h.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr 1fr"}},r.a.createElement(y.a,{title:"Head to the theme browser to see a collection of prebuilt themes."},r.a.createElement(m.a,{startIcon:r.a.createElement(x.a,null),onClick:()=>t.router.toThemeBrowser()},"Theme Browser")),r.a.createElement(N.a,{router:t.router}),r.a.createElement(P.a,null)),r.a.createElement(h.a,null,r.a.createElement(g.a,{href:"https://github.com/danielyxie/bitburner/issues/new",target:"_blank"},r.a.createElement(s.a,null,"Report bug")),r.a.createElement(g.a,{href:"https://bitburner.readthedocs.io/en/latest/changelog.html",target:"_blank"},r.a.createElement(s.a,null,"Changelog")),r.a.createElement(g.a,{href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"},r.a.createElement(s.a,null,"Documentation")),r.a.createElement(g.a,{href:"https://discord.gg/TFc3hKD",target:"_blank"},r.a.createElement(s.a,null,"Discord")),r.a.createElement(g.a,{href:"https://www.reddit.com/r/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Reddit")),r.a.createElement(g.a,{href:"https://plaza.dsolver.ca/games/bitburner",target:"_blank"},r.a.createElement(s.a,null,"Incremental game plaza"))))),r.a.createElement(L.a,{open:at,onClose:()=>nt(!1)}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(26),o=a(41),s=a(4),l=a(179),c=a(145),f=a(31),u=a(1458),m=a(1459),h=a(45),d=a(1),p=a(65),g=a(153),y=a(154),b=a(155),E=a(75),v=a.n(E);function k(t){const e=Object(i.d)(t.hostname);if(null===e)throw new Error(`server '${t.hostname}' should not be null`);let a=0;for(const t of e.scripts)a+=t.code.length;for(const t of e.textFiles)a+=t.text.length;if(0===a)return r.a.createElement(r.a.Fragment,null);const n=[];for(const t of e.scripts)n.push({name:t.filename,size:t.code.length});for(const t of e.textFiles)n.push({name:t.fn,size:t.text.length});return n.sort((t,e)=>e.size-t.size),r.a.createElement(g.a,{TransitionProps:{unmountOnExit:!0}},r.a.createElement(y.a,{expandIcon:r.a.createElement(v.a,null)},r.a.createElement(d.a,null,e.hostname," (",s.a.formatBigNumber(a),"b)")),r.a.createElement(b.a,null,r.a.createElement(u.a,{component:p.a},r.a.createElement(l.a,null,r.a.createElement(m.a,null,r.a.createElement(h.a,null,r.a.createElement(f.a,null,r.a.createElement(d.a,null,"Filename")),r.a.createElement(f.a,{align:"right"},r.a.createElement(d.a,null,"Size")))),r.a.createElement(c.a,null,n.map(t=>r.a.createElement(h.a,{key:t.name},r.a.createElement(f.a,{component:"th",scope:"row"},r.a.createElement(d.a,null,t.name)),r.a.createElement(f.a,{align:"right"},r.a.createElement(d.a,null,s.a.formatBigNumber(t.size),"b"))))))),r.a.createElement("ul",null)))}function _(t){const e=[];for(const t of Object(i.c)())e.push(t.hostname);return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(d.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."),e.map(t=>r.a.createElement(k,{key:t,hostname:t}))))}},,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return C}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(350),l=a(1),c=a(23),f=a(65),u=a(81),m=a(114),h=a(366),d=a.n(h),p=a(619),g=a.n(p),y=a(1247),b=a.n(y),E=a(1216),v=a(167),k=a(9),_=a(336),w=a(618);function S({name:t,onColorChange:e,color:a,defaultColor:n}){return void 0===a&&(console.error(`color ${t} was undefined, reverting to default`),a=n),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{sx:{mx:1},label:t,value:a,InputProps:{startAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(E.a,{hideTextfield:!0,deferred:!0,value:a,onChange:a=>e(t,"#"+a.hex),disableAlpha:!0})),endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(m.a,{onClick:()=>e(t,n)},r.a.createElement(d.a,{color:"primary"})))}}))}function C(t){const[e,a]=Object(n.useState)({...k.a.theme});function m(t,e){a(a=>(a[t]=e,a)),k.a.theme[t]=e,v.b.emit()}function h(t){!function(t){a(t),Object.assign(k.a.theme,t),v.b.emit()}(t)}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,{sx:{px:1,py:1,my:1}},r.a.createElement(c.a,{open:!0,placement:"top",title:r.a.createElement(l.a,null,"Example tooltip")},r.a.createElement(o.a,{color:"primary",size:"small"},"primary button")),r.a.createElement(o.a,{color:"secondary",size:"small"},"secondary button"),r.a.createElement(o.a,{color:"warning",size:"small"},"warning button"),r.a.createElement(o.a,{color:"info",size:"small"},"info button"),r.a.createElement(o.a,{color:"error",size:"small"},"error button"),r.a.createElement(o.a,{disabled:!0,size:"small"},"disabled button"),r.a.createElement("br",null),r.a.createElement(l.a,{color:"primary",variant:"caption"},"text with primary color")," ",r.a.createElement(l.a,{color:"secondary",variant:"caption"},"text with secondary color")," ",r.a.createElement(l.a,{color:"error",variant:"caption"},"text with error color"),r.a.createElement("br",null),r.a.createElement(u.a,{value:"Text field",size:"small"})),r.a.createElement(f.a,{sx:{py:1,my:1}},r.a.createElement(S,{name:"primarylight",onColorChange:m,color:e.primarylight,defaultColor:k.b.theme.primarylight}),r.a.createElement(S,{name:"primary",onColorChange:m,color:e.primary,defaultColor:k.b.theme.primary}),r.a.createElement(S,{name:"primarydark",onColorChange:m,color:e.primarydark,defaultColor:k.b.theme.primarydark}),r.a.createElement("br",null),r.a.createElement(S,{name:"successlight",onColorChange:m,color:e.successlight,defaultColor:k.b.theme.successlight}),r.a.createElement(S,{name:"success",onColorChange:m,color:e.success,defaultColor:k.b.theme.success}),r.a.createElement(S,{name:"successdark",onColorChange:m,color:e.successdark,defaultColor:k.b.theme.successdark}),r.a.createElement("br",null),r.a.createElement(S,{name:"errorlight",onColorChange:m,color:e.errorlight,defaultColor:k.b.theme.errorlight}),r.a.createElement(S,{name:"error",onColorChange:m,color:e.error,defaultColor:k.b.theme.error}),r.a.createElement(S,{name:"errordark",onColorChange:m,color:e.errordark,defaultColor:k.b.theme.errordark}),r.a.createElement("br",null),r.a.createElement(S,{name:"secondarylight",onColorChange:m,color:e.secondarylight,defaultColor:k.b.theme.secondarylight}),r.a.createElement(S,{name:"secondary",onColorChange:m,color:e.secondary,defaultColor:k.b.theme.secondary}),r.a.createElement(S,{name:"secondarydark",onColorChange:m,color:e.secondarydark,defaultColor:k.b.theme.secondarydark}),r.a.createElement("br",null),r.a.createElement(S,{name:"warninglight",onColorChange:m,color:e.warninglight,defaultColor:k.b.theme.warninglight}),r.a.createElement(S,{name:"warning",onColorChange:m,color:e.warning,defaultColor:k.b.theme.warning}),r.a.createElement(S,{name:"warningdark",onColorChange:m,color:e.warningdark,defaultColor:k.b.theme.warningdark}),r.a.createElement("br",null),r.a.createElement(S,{name:"infolight",onColorChange:m,color:e.infolight,defaultColor:k.b.theme.infolight}),r.a.createElement(S,{name:"info",onColorChange:m,color:e.info,defaultColor:k.b.theme.info}),r.a.createElement(S,{name:"infodark",onColorChange:m,color:e.infodark,defaultColor:k.b.theme.infodark}),r.a.createElement("br",null),r.a.createElement(S,{name:"welllight",onColorChange:m,color:e.welllight,defaultColor:k.b.theme.welllight}),r.a.createElement(S,{name:"well",onColorChange:m,color:e.well,defaultColor:k.b.theme.well}),r.a.createElement(S,{name:"white",onColorChange:m,color:e.white,defaultColor:k.b.theme.white}),r.a.createElement(S,{name:"black",onColorChange:m,color:e.black,defaultColor:k.b.theme.black}),r.a.createElement(S,{name:"backgroundprimary",onColorChange:m,color:e.backgroundprimary,defaultColor:k.b.theme.backgroundprimary}),r.a.createElement(S,{name:"backgroundsecondary",onColorChange:m,color:e.backgroundsecondary,defaultColor:k.b.theme.backgroundsecondary}),r.a.createElement(S,{name:"button",onColorChange:m,color:e.button,defaultColor:k.b.theme.button}),r.a.createElement("br",null),r.a.createElement(S,{name:"hp",onColorChange:m,color:e.hp,defaultColor:k.b.theme.hp}),r.a.createElement(S,{name:"money",onColorChange:m,color:e.money,defaultColor:k.b.theme.money}),r.a.createElement(S,{name:"hack",onColorChange:m,color:e.hack,defaultColor:k.b.theme.hack}),r.a.createElement(S,{name:"combat",onColorChange:m,color:e.combat,defaultColor:k.b.theme.combat}),r.a.createElement(S,{name:"cha",onColorChange:m,color:e.cha,defaultColor:k.b.theme.cha}),r.a.createElement(S,{name:"int",onColorChange:m,color:e.int,defaultColor:k.b.theme.int}),r.a.createElement(S,{name:"rep",onColorChange:m,color:e.rep,defaultColor:k.b.theme.rep}),r.a.createElement(S,{name:"disabled",onColorChange:m,color:e.disabled,defaultColor:k.b.theme.disabled})),r.a.createElement(f.a,{sx:{px:1,py:1,my:1}},r.a.createElement(u.a,{sx:{mb:1},multiline:!0,fullWidth:!0,maxRows:3,label:"import / export theme",value:JSON.stringify(e),onChange:function(t){try{const e=JSON.parse(t.target.value);if("object"!=typeof e)return;a(e);for(const t of Object.keys(e))k.a.theme[t]=e[t];v.b.emit()}catch(t){}}}),r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{sx:{my:1}},"Backup your theme or share it with others by copying the string above."),r.a.createElement(w.a,null),r.a.createElement(s.a,null,r.a.createElement(c.a,{title:"Reverts all modification back to the default theme. This is permanent."},r.a.createElement(o.a,{onClick:()=>h(_.a),startIcon:r.a.createElement(b.a,null)},"Revert to Default")),r.a.createElement(c.a,{title:"Move over to the theme browser's page to use one of our predefined themes."},r.a.createElement(o.a,{startIcon:r.a.createElement(g.a,null),onClick:()=>t.router.toThemeBrowser()},"See more themes"))))))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(350),l=a(1),c=a(65),f=a(81),u=a(366),m=a.n(u),h=a(452),d=a.n(h),p=a(167),g=a(9),y=a(394),b=a(23);function E({value:t,onChange:e,refreshId:a}){const[i,o]=Object(n.useState)(),[s,l]=Object(n.useState)(t);function c(t){l(t),o(t?"":"Must have a value")}return Object(n.useEffect)(()=>e(s,i),[s]),Object(n.useEffect)(()=>c(t),[a]),r.a.createElement(f.a,{sx:{my:1},label:"Font-Family",error:!!i,value:s,helperText:i,onChange:function(t){c(t.target.value)},fullWidth:!0})}function v({value:t,onChange:e,refreshId:a}){const[i,o]=Object(n.useState)(),[s,l]=Object(n.useState)(t);function c(t){l(t),t?isNaN(Number(t))?o("Must be a number"):o(""):o("Must have a value")}return Object(n.useEffect)(()=>e(s,i),[s]),Object(n.useEffect)(()=>c(t),[a]),r.a.createElement(f.a,{sx:{my:1},label:"Line Height",error:!!i,value:s,helperText:i,onChange:function(t){c(t.target.value)}})}function k(t){const[e,a]=Object(n.useState)(0),[f,u]=Object(n.useState)(),[h,k]=Object(n.useState)({...g.a.styles});function _(t){Object.assign(g.a.styles,t),p.b.emit()}function w(t,e){u(e),e||k(t)}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,{variant:"h6"},"Styles Editor"),r.a.createElement(l.a,null,"WARNING: Changing styles ",r.a.createElement("strong",null,"may mess up")," the interface. Drastic changes are"," ",r.a.createElement("strong",null,"NOT recommended"),"."),r.a.createElement(c.a,{sx:{p:2,my:2}},r.a.createElement(E,{value:h.fontFamily,refreshId:e,onChange:(t,e)=>w({...h,fontFamily:t},e)}),r.a.createElement("br",null),r.a.createElement(v,{value:h.lineHeight,refreshId:e,onChange:(t,e)=>w({...h,lineHeight:t},e)}),r.a.createElement("br",null),r.a.createElement(s.a,{sx:{my:1}},r.a.createElement(o.a,{onClick:function(){const t={...y.a};k(t),_(t),a(e+1)},startIcon:r.a.createElement(m.a,null),color:"secondary",variant:"outlined"},"Revert to Defaults"),r.a.createElement(b.a,{title:"Save styles to settings"},r.a.createElement(o.a,{onClick:function(){_(h)},endIcon:r.a.createElement(d.a,null),color:f?"error":"primary",disabled:!!f},"Save Modifications")))))}},,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(535),o=a(1),s=a(10),l=a(21),c=a(30),f=a(1255),u=a(1261);function m(){const t=c.b.Player(),[e,a]=Object(n.useState)(!1),m=Object(n.useState)(!1)[1];function h(){m(t=>!t)}return Object(n.useEffect)(()=>{const t=setInterval(h,200);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{disableGutters:!0,maxWidth:"md",sx:{mx:0}},r.a.createElement(o.a,{variant:"h4"},"Sleeves"),r.a.createElement(o.a,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.",r.a.createElement("br",null),r.a.createElement("br",null),"Sleeves can be used to perform different tasks synchronously.",r.a.createElement("br",null),r.a.createElement("br",null))),r.a.createElement(s.a,{onClick:()=>a(!0)},"FAQ"),r.a.createElement(s.a,{href:"https://bitburner.readthedocs.io/en/latest/advancedgameplay/sleeves.html#duplicate-sleeves",target:"_blank"},"Wiki Documentation"),r.a.createElement(l.a,{display:"grid",sx:{gridTemplateColumns:"repeat(2, 1fr)",mt:1}},t.sleeves.map((t,e)=>r.a.createElement(f.a,{key:e,rerender:h,sleeve:t}))),r.a.createElement(u.a,{open:e,onClose:()=>a(!1)}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(21),o=a(65),s=a(10),l=a(23),c=a(1),f=a(8),u=a(85),m=a(4),h=a(192),d=a(30),p=a(185),g=a(77),y=a(1256),b=a(1257),E=a(762),v=a(1258),k=a(1259),_=a(1260);function w(t){const e=d.b.Player(),[a,w]=Object(n.useState)(!1),[S,C]=Object(n.useState)(!1),[x,L]=Object(n.useState)(!1),[O,M]=Object(n.useState)(!1),[T,A]=Object(n.useState)(["------","------","------"]);let R=r.a.createElement(r.a.Fragment,null);switch(t.sleeve.currentTask){case g.a.Idle:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently idle");break;case g.a.Company:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working your job at ",t.sleeve.currentTaskLocation,".");break;case g.a.Faction:{let e="nothing";switch(t.sleeve.factionWorkType){case p.a.Field:e="Field work";break;case p.a.Hacking:e="Hacking contracts";break;case p.a.Security:e="Security work"}R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently doing ",e," for ",t.sleeve.currentTaskLocation,".");break}case g.a.Crime:{const e=Object.values(u.a).find(e=>e.name===t.sleeve.crimeType);if(!e)throw new Error("crime should not be undefined");R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently attempting to ",e.type," (Success Rate:"," ",m.a.formatPercentage(e.successRate(t.sleeve)),").");break}case g.a.Class:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently studying/taking a course at ",t.sleeve.currentTaskLocation,".");break;case g.a.Gym:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently working out at ",t.sleeve.currentTaskLocation,".");break;case g.a.Recovery:R=r.a.createElement(r.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.");break;case g.a.Synchro:R=r.a.createElement(r.a.Fragment,null,"This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's synchronization to increase.");break;default:console.error("Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): "+T[0])}return r.a.createElement(i.a,{component:o.a,sx:{width:"auto"}},r.a.createElement(i.a,{sx:{m:1}},r.a.createElement(i.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%",gap:1}},r.a.createElement(i.a,null,r.a.createElement(E.b,{sleeve:t.sleeve}),r.a.createElement(i.a,{display:"grid",sx:{gridTemplateColumns:"1fr 1fr",width:"100%"}},r.a.createElement(s.a,{onClick:()=>w(!0)},"More Stats"),r.a.createElement(s.a,{onClick:()=>C(!0)},"More Earnings Info"),r.a.createElement(l.a,{title:e.moneyL(!0),disabled:e.moneyM(!0),disabled:t.sleeve.shock<100,sx:{width:"100%",height:"100%"}},"Manage Augmentations"))))),r.a.createElement(i.a,null,r.a.createElement(E.a,{sleeve:t.sleeve}),r.a.createElement(i.a,null,r.a.createElement(_.a,{player:e,sleeve:t.sleeve,setABC:A}),r.a.createElement(s.a,{onClick:function(){switch(t.sleeve.resetTaskStatus(),T[0]){case"------":break;case"Work for Company":t.sleeve.workForCompany(e,T[1]);break;case"Work for Faction":t.sleeve.workForFaction(e,T[1],T[2]);break;case"Commit Crime":t.sleeve.commitCrime(e,T[1]);break;case"Take University Course":t.sleeve.takeUniversityCourse(e,T[2],T[1]);break;case"Workout at Gym":t.sleeve.workoutAtGym(e,T[2],T[1]);break;case"Shock Recovery":t.sleeve.shockRecovery(e);break;case"Synchronize":t.sleeve.synchronize(e);break;default:console.error("Invalid/Unrecognized taskValue in setSleeveTask(): "+T[0])}t.rerender()},sx:{width:"100%"}},"Set Task"),r.a.createElement(c.a,null,R),r.a.createElement(c.a,null,t.sleeve.currentTask===g.a.Crime&&Object(h.a)({progress:t.sleeve.currentTaskTime/t.sleeve.currentTaskMaxTime,totalTicks:25})))),r.a.createElement(v.a,{open:a,onClose:()=>w(!1),sleeve:t.sleeve}),r.a.createElement(k.a,{open:S,onClose:()=>C(!1),sleeve:t.sleeve}),r.a.createElement(b.a,{open:x,onClose:()=>L(!1),sleeve:t.sleeve,rerender:t.rerender}),r.a.createElement(y.a,{open:O,onClose:()=>M(!1),sleeve:t.sleeve}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(585),o=a(57),s=a(20),l=a(41),c=a(30),f=a(1),u=a(23),m=a(65),h=a(21),d=a(10),p=a(145),g=a(179),y=a(43),b=a(45);function E(t){const e=c.b.Player(),a=Object(n.useState)(!1)[1];function E(){a(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(E,150);return()=>clearInterval(t)},[]);const v=t.sleeve.augmentations.map(t=>t.name),k=Object(i.a)(t.sleeve,e);return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{sx:{mx:1}},r.a.createElement(f.a,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.",r.a.createElement("br",null),r.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."),r.a.createElement(h.a,{component:m.a,sx:{my:1,p:1}},r.a.createElement(g.a,{size:"small",padding:"none"},r.a.createElement(p.a,null,k.map(a=>r.a.createElement(b.a,{key:a.name},r.a.createElement(y.b,null,r.a.createElement(d.a,{onClick:()=>function(a){t.sleeve.tryBuyAugmentation(e,a),E()}(a),disabled:e.money0&&r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{sx:{mx:1}},"Owned Augmentations:"),r.a.createElement(h.a,{display:"grid",sx:{gridTemplateColumns:"repeat(5, 1fr)",m:1}},v.map(t=>{const e=o.a[t],a="string"==typeof e.info?r.a.createElement("span",null,e.info):e.info,n=r.a.createElement(r.a.Fragment,null,a,r.a.createElement("br",null),r.a.createElement("br",null),e.stats);return r.a.createElement(u.a,{key:t,title:r.a.createElement(f.a,null,n)},r.a.createElement(m.a,{sx:{p:1}},r.a.createElement(f.a,null,t)))})))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(450),l=a(17),c=a(9),f=a(16),u=a(30),m=a(41),h=a(1),d=a(10);function p(t){const e=u.b.Player();function a(a){e.canAfford(i.a.TravelCost)||Object(f.a)("You cannot afford to have this sleeve travel to another city"),t.sleeve.city=a,e.loseMoney(i.a.TravelCost,"sleeve"),t.sleeve.resetTaskStatus(),t.rerender(),t.onClose()}return r.a.createElement(m.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,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 ",r.a.createElement(o.a,{money:i.a.TravelCost,player:e}),". It will also set your current sleeve task to idle."),c.a.DisableASCIIArt?Object.values(l.a).map(t=>r.a.createElement(d.a,{key:t,onClick:()=>a(t)},t)):r.a.createElement(s.a,{currentCity:t.sleeve.city,onTravel:t=>a(t)})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(4),r=a(24),i=a(8),o=a(1),s=a(183),l=a(41),c=a(0),f=a.n(c);function u(t){return f.a.createElement(l.a,{open:t.open,onClose:t.onClose},f.a.createElement(s.a,{rows:[[f.a.createElement(f.a.Fragment,null,"Hacking: "),t.sleeve.hacking,f.a.createElement(f.a.Fragment,null," (",n.a.formatExp(t.sleeve.hacking_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Strength: "),t.sleeve.strength,f.a.createElement(f.a.Fragment,null," (",n.a.formatExp(t.sleeve.strength_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Defense: "),t.sleeve.defense,f.a.createElement(f.a.Fragment,null," (",n.a.formatExp(t.sleeve.defense_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Dexterity: "),t.sleeve.dexterity,f.a.createElement(f.a.Fragment,null," (",n.a.formatExp(t.sleeve.dexterity_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Agility: "),t.sleeve.agility,f.a.createElement(f.a.Fragment,null," (",n.a.formatExp(t.sleeve.agility_exp)," exp)")],[f.a.createElement(f.a.Fragment,null,"Charisma: "),t.sleeve.charisma,f.a.createElement(f.a.Fragment,null," (",n.a.formatExp(t.sleeve.charisma_exp)," exp)")]],title:"Stats:"}),f.a.createElement("br",null),f.a.createElement(s.a,{rows:[[f.a.createElement(f.a.Fragment,null,"Hacking Level multiplier: "),n.a.formatPercentage(t.sleeve.hacking_mult)],[f.a.createElement(f.a.Fragment,null,"Hacking Experience multiplier: "),n.a.formatPercentage(t.sleeve.hacking_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Strength Level multiplier: "),n.a.formatPercentage(t.sleeve.strength_mult)],[f.a.createElement(f.a.Fragment,null,"Strength Experience multiplier: "),n.a.formatPercentage(t.sleeve.strength_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Defense Level multiplier: "),n.a.formatPercentage(t.sleeve.defense_mult)],[f.a.createElement(f.a.Fragment,null,"Defense Experience multiplier: "),n.a.formatPercentage(t.sleeve.defense_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Dexterity Level multiplier: "),n.a.formatPercentage(t.sleeve.dexterity_mult)],[f.a.createElement(f.a.Fragment,null,"Dexterity Experience multiplier: "),n.a.formatPercentage(t.sleeve.dexterity_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Agility Level multiplier: "),n.a.formatPercentage(t.sleeve.agility_mult)],[f.a.createElement(f.a.Fragment,null,"Agility Experience multiplier: "),n.a.formatPercentage(t.sleeve.agility_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Charisma Level multiplier: "),n.a.formatPercentage(t.sleeve.charisma_mult)],[f.a.createElement(f.a.Fragment,null,"Charisma Experience multiplier: "),n.a.formatPercentage(t.sleeve.charisma_exp_mult)],[f.a.createElement(f.a.Fragment,null,"Faction Reputation Gain multiplier: "),n.a.formatPercentage(t.sleeve.faction_rep_mult)],[f.a.createElement(f.a.Fragment,null,"Company Reputation Gain multiplier: "),n.a.formatPercentage(t.sleeve.company_rep_mult)],[f.a.createElement(f.a.Fragment,null,"Salary multiplier: "),n.a.formatPercentage(t.sleeve.work_money_mult)],[f.a.createElement(f.a.Fragment,null,"Crime Money multiplier: "),n.a.formatPercentage(t.sleeve.crime_money_mult)],[f.a.createElement(f.a.Fragment,null,"Crime Success multiplier: "),n.a.formatPercentage(t.sleeve.crime_success_mult)]],title:"Multipliers:"}),t.sleeve.storedCycles>10&&f.a.createElement(o.a,{sx:{py:2}},"Bonus Time: ",Object(r.b)(t.sleeve.storedCycles*i.a.MilliPerCycle)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(4),r=a(20),i=a(0),o=a(183),s=a(41);function l(t){return i.createElement(s.a,{open:t.open,onClose:t.onClose},i.createElement(o.a,{rows:[["Money ",i.createElement(r.a,{money:t.sleeve.earningsForTask.money})],["Hacking Exp ",n.a.formatExp(t.sleeve.earningsForTask.hack)],["Strength Exp ",n.a.formatExp(t.sleeve.earningsForTask.str)],["Defense Exp ",n.a.formatExp(t.sleeve.earningsForTask.def)],["Dexterity Exp ",n.a.formatExp(t.sleeve.earningsForTask.dex)],["Agility Exp ",n.a.formatExp(t.sleeve.earningsForTask.agi)],["Charisma Exp ",n.a.formatExp(t.sleeve.earningsForTask.cha)]],title:"Earnings for Current Task:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["Money: ",i.createElement(r.a,{money:t.sleeve.earningsForPlayer.money})],["Hacking Exp: ",n.a.formatExp(t.sleeve.earningsForPlayer.hack)],["Strength Exp: ",n.a.formatExp(t.sleeve.earningsForPlayer.str)],["Defense Exp: ",n.a.formatExp(t.sleeve.earningsForPlayer.def)],["Dexterity Exp: ",n.a.formatExp(t.sleeve.earningsForPlayer.dex)],["Agility Exp: ",n.a.formatExp(t.sleeve.earningsForPlayer.agi)],["Charisma Exp: ",n.a.formatExp(t.sleeve.earningsForPlayer.cha)]],title:"Total Earnings for Host Consciousness:"}),i.createElement("br",null),i.createElement(o.a,{rows:[["Money: ",i.createElement(r.a,{money:t.sleeve.earningsForSleeves.money})],["Hacking Exp: ",n.a.formatExp(t.sleeve.earningsForSleeves.hack)],["Strength Exp: ",n.a.formatExp(t.sleeve.earningsForSleeves.str)],["Defense Exp: ",n.a.formatExp(t.sleeve.earningsForSleeves.def)],["Dexterity Exp: ",n.a.formatExp(t.sleeve.earningsForSleeves.dex)],["Agility Exp: ",n.a.formatExp(t.sleeve.earningsForSleeves.agi)],["Charisma Exp: ",n.a.formatExp(t.sleeve.earningsForSleeves.cha)]],title:"Total Earnings for Other Sleeves:"}),i.createElement("br",null))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(77),o=a(85),s=a(11),l=a(17),c=a(29),f=a(185),u=a(128),m=a(79),h=a(5);const d=["Study Computer Science","Data Structures","Networks","Algorithms","Management","Leadership"],p=["Train Strength","Train Defense","Train Dexterity","Train Agility"];function g(t,e){const a=[];for(const n of t.sleeves)e!==n&&n.currentTask===i.a.Company&&a.push(n.currentTaskLocation);const n=Object.keys(t.jobs);for(let t=0;t{const e=c.a[t].getInfo();return e.offerHackingWork||e.offerFieldWork||e.offerSecurityWork})}const b={"------":()=>({first:["------"],second:()=>["------"]}),"Work for Company":(t,e)=>{let a=g(t,e);return 0===a.length&&(a=["------"]),{first:a,second:()=>["------"]}},"Work for Faction":(t,e)=>{let a=y(t,e);return 0===a.length&&(a=["------"]),{first:a,second:t=>{const e=c.a[t].getInfo(),a=[];return e.offerHackingWork&&a.push("Hacking Contracts"),e.offerFieldWork&&a.push("Field Work"),e.offerSecurityWork&&a.push("Security Work"),a}}},"Commit Crime":()=>({first:Object.values(o.a).map(t=>t.name),second:()=>["------"]}),"Take University Course":(t,e)=>{let a=[];switch(e.city){case l.a.Aevum:a=[s.a.AevumSummitUniversity];break;case l.a.Sector12:a=[s.a.Sector12RothmanUniversity];break;case l.a.Volhaven:a=[s.a.VolhavenZBInstituteOfTechnology];break;default:a=["No university available in city!"]}return{first:d,second:()=>a}},"Workout at Gym":(t,e)=>{let a=[];switch(e.city){case l.a.Aevum:a=[s.a.AevumCrushFitnessGym,s.a.AevumSnapFitnessGym];break;case l.a.Sector12:a=[s.a.Sector12IronGym,s.a.Sector12PowerhouseGym];break;case l.a.Volhaven:a=[s.a.VolhavenMilleniumFitnessGym];break;default:a=["No gym available in city!"]}return{first:p,second:()=>a}},"Shock Recovery":()=>({first:["------"],second:()=>["------"]}),Synchronize:()=>({first:["------"],second:()=>["------"]})},E={"------":()=>!0,"Work for Company":(t,e)=>g(t,e).length>0,"Work for Faction":(t,e)=>y(t,e).length>0,"Commit Crime":()=>!0,"Take University Course":(t,e)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(e.city),"Workout at Gym":(t,e)=>[l.a.Aevum,l.a.Sector12,l.a.Volhaven].includes(e.city),"Shock Recovery":(t,e)=>e.shock<100,Synchronize:(t,e)=>e.sync<100};function v(t){const e=function(t){switch(t.currentTask){case i.a.Idle:return["------","------","------"];case i.a.Company:return["Work for Company",t.currentTaskLocation,"------"];case i.a.Faction:{let e="";switch(t.factionWorkType){case f.a.Hacking:e="Hacking Contracts";break;case f.a.Field:e="Field Work";break;case f.a.Security:e="Security Work"}return["Work for Faction",t.currentTaskLocation,e]}case i.a.Crime:return["Commit Crime",t.crimeType,"------"];case i.a.Class:return["Take University Course",t.className,t.currentTaskLocation];case i.a.Gym:return["Workout at Gym",t.gymStatType,t.currentTaskLocation];case i.a.Recovery:return["Shock Recovery","------","------"];case i.a.Synchro:return["Synchronize","------","------"]}}(t.sleeve),[a,o]=Object(n.useState)(e[0]),[s,l]=Object(n.useState)(e[1]),[c,h]=Object(n.useState)(e[2]),d=Object.keys(E).filter(e=>E[e](t.player,t.sleeve)),p=b[a];if(void 0===p)throw new Error(`No function for task '${a}'`);const g=p(t.player,t.sleeve),y=g.second(s);return g.first.length>0&&!g.first.includes(s)&&(l(g.first[0]),t.setABC([a,g.first[0],c])),y.length>0&&!y.includes(c)&&(h(y[0]),t.setABC([a,s,y[0]])),r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(e){const n=e.target.value,r=b[n];if(void 0===r)throw new Error(`No function for task '${a}'`);const i=r(t.player,t.sleeve),s=i.second(i.first[0]);h(s[0]),l(i.first[0]),o(n),t.setABC([n,i.first[0],s[0]])},value:a,sx:{width:"100%"}},d.map(t=>r.a.createElement(m.a,{key:t,value:t},t))),!(1===g.first.length&&"------"===g.first[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(e){l(e.target.value),t.setABC([a,e.target.value,c])},value:s,sx:{width:"100%"}},g.first.map(t=>r.a.createElement(m.a,{key:t,value:t},t)))),!(1===y.length&&"------"===y[0])&&r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{onChange:function(e){h(e.target.value),t.setABC([a,s,e.target.value])},value:c,sx:{width:"100%"}},y.map(t=>r.a.createElement(m.a,{key:t,value:t},t)))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(41),o=a(1),s=a(5);function l({open:t,onClose:e}){return r.a.createElement(i.a,{open:t,onClose:e},r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{variant:"h4"},"How do Duplicate Sleeves work?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience, and reputation."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are their own individuals, which means they each have their own experience and stats."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well as all of the player's other sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Synchronization (Sync)?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing a task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve and the player's original host consciousness earn N% of the amount of experience normally earned by the task. All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Synchronization can be increased by assigning sleeves to the 'Synchronize' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Shock?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the amount of experience earned by the sleeve."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning sleeves to the 'Shock Recovery' task."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I work for this company or faction?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two sleeves they can work for two different companies, but they cannot both work for the same company."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why did my Sleeve stop working?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a company after 8 hours, and stop working for a faction after 20 hours."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"How do I buy Augmentations for my Sleeves?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Why can't I buy the X Augmentation for my sleeve?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Certain Augmentations, like ",s.a.Bladeburners,"-specific ones and NeuroFlux Governor, are not available for sleeves."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"Do sleeves get reset when installing Augmentations or switching BitNodes?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeves are reset when switching BitNodes, but not when installing Augmentations."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,{variant:"h4"},"What is Memory?"),r.a.createElement("br",null),r.a.createElement(o.a,null,"Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be set to 25, rather than 1."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(o.a,null,"Memory can only be increased by purchasing upgrades from ",s.a.TheCovenant,". It is a persistent stat, meaning it never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(1263),o=a(1264),s=a(1265),l=a(221),c=a(91),f=a(1266),u=a(1268),m=a(1269),h=a(1270),d=a(39),p=a(55),g=a(26),y=a(1),b=a(60),E=a(10),v=a(21);function k(t){const[e,a]=Object(n.useState)(!1),k=Object(n.useState)(!1)[1];function _(){k(t=>!t)}const[w,S]=Object(n.useState)(d.c.x1);Object(n.useEffect)(()=>{const t=setInterval(_,200);return()=>clearInterval(t)},[]);let C,x=0;for(let e=0;eS(d.c.x1),()=>S(d.c.x5),()=>S(d.c.x10),()=>S(d.c.MAX)],O=t.player.hacknetNodes.map(e=>{if(Object(p.g)(t.player)){if(e instanceof l.a)throw new Error("node was hacknet node");const a=Object(g.d)(e);if(null==a)throw new Error("Could not find Hacknet Server object in AllServers map for IP: "+e);if(!(a instanceof c.a))throw new Error("node was not hacknet server");return r.a.createElement(s.a,{player:t.player,key:a.hostname,node:a,purchaseMultiplier:w,rerender:_})}if("string"==typeof e)throw new Error("node was ip string");return r.a.createElement(o.a,{player:t.player,key:e.name,node:e,purchaseMultiplier:w,rerender:_})});return r.a.createElement(r.a.Fragment,null,r.a.createElement(y.a,{variant:"h4"},"Hacknet ",Object(p.g)(t.player)?"Servers":"Nodes"),r.a.createElement(i.a,{hasHacknetServers:Object(p.g)(t.player)}),r.a.createElement(h.a,{cost:C,multiplier:w,onClick:function(){Object(p.l)(t.player),_()}}),r.a.createElement("br",null),r.a.createElement(b.a,{container:!0,spacing:2},r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(m.a,{totalProduction:x,player:t.player})),r.a.createElement(b.a,{item:!0,xs:6},r.a.createElement(u.a,{onClicks:L,purchaseMultiplier:w}))),Object(p.g)(t.player)&&r.a.createElement(E.a,{onClick:()=>a(!0)},"Spend Hashes on Upgrades"),r.a.createElement(v.a,{sx:{display:"grid",width:"fit-content",gridTemplateColumns:"repeat(3, 1fr)"}},O),r.a.createElement(f.a,{open:e,onClose:()=>a(!1)}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1);function o(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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."),t.hasHacknetServers?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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."),r.a.createElement(i.a,null,"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.")):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"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."),r.a.createElement(i.a,null,"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.")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(39),o=a(55),s=a(20),l=a(110),c=a(1),f=a(60),u=a(65),m=a(10),h=a(43),d=a(145),p=a(179),g=a(45),y=a(23),b=a(4),E=a(206);function v(t){const e=t.node,a=t.purchaseMultiplier,n=t.rerender;let v,k,_;if(e.level>=i.a.MaxLevel)v=r.a.createElement(m.a,{disabled:!0},"MAX LEVEL");else{let f=0;if("MAX"===a)f=Object(o.e)(t.player,e,i.a.MaxLevel);else{const t=i.a.MaxLevel-e.level;f=Math.min(t,a)}const u=Object(E.c)(e.level+f,e.ram,e.cores,t.player.hacknet_node_money_mult)-e.moneyGainRatePerSecond,h=e.calculateLevelUpgradeCost(f,t.player.hacknet_node_level_cost_mult);v=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:u}))},r.a.createElement(m.a,{onClick:function(){const r="MAX"===a?Object(o.e)(t.player,e,i.a.MaxLevel):a;Object(o.n)(t.player,e,r),n()}},"+",f," - ",r.a.createElement(s.a,{money:h,player:t.player})))}if(e.ram>=i.a.MaxRam)k=r.a.createElement(m.a,{disabled:!0},"MAX RAM");else{let f=0;if("MAX"===a)f=Object(o.f)(t.player,e,i.a.MaxRam);else{const t=Math.round(Math.log2(i.a.MaxRam/e.ram));f=Math.min(t,a)}const u=Object(E.c)(e.level,e.ram*Math.pow(2,f),e.cores,t.player.hacknet_node_money_mult)-e.moneyGainRatePerSecond,h=e.calculateRamUpgradeCost(f,t.player.hacknet_node_ram_cost_mult);k=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:u}))},r.a.createElement(m.a,{onClick:function(){const r="MAX"===a?Object(o.f)(t.player,e,i.a.MaxRam):a;Object(o.o)(t.player,e,r),n()}},"+",f," - ",r.a.createElement(s.a,{money:h,player:t.player})))}if(e.cores>=i.a.MaxCores)_=r.a.createElement(m.a,{disabled:!0},"MAX CORES");else{let f=0;if("MAX"===a)f=Object(o.d)(t.player,e,i.a.MaxCores);else{const t=i.a.MaxCores-e.cores;f=Math.min(t,a)}const u=Object(E.c)(e.level,e.ram,e.cores+f,t.player.hacknet_node_money_mult)-e.moneyGainRatePerSecond,h=e.calculateCoreUpgradeCost(f,t.player.hacknet_node_core_cost_mult);_=r.a.createElement(y.a,{title:r.a.createElement(c.a,null,"+",r.a.createElement(l.a,{money:u}))},r.a.createElement(m.a,{onClick:function(){const r="MAX"===a?Object(o.d)(t.player,e,i.a.MaxCores):a;Object(o.k)(t.player,e,r),n()}},"+",f," - ",r.a.createElement(s.a,{money:h,player:t.player})))}return r.a.createElement(f.a,{item:!0,component:u.a,p:1},r.a.createElement(p.a,{size:"small"},r.a.createElement(d.a,null,r.a.createElement(g.a,null,r.a.createElement(h.b,{colSpan:3},r.a.createElement(c.a,null,e.name))),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"Production:")),r.a.createElement(h.b,{colSpan:2},r.a.createElement(c.a,null,r.a.createElement(s.a,{money:e.totalMoneyGenerated})," (",r.a.createElement(l.a,{money:e.moneyGainRatePerSecond}),")"))),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"Level:")),r.a.createElement(h.b,null,r.a.createElement(c.a,null,e.level)),r.a.createElement(h.b,null,v)),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"RAM:")),r.a.createElement(h.b,null,r.a.createElement(c.a,null,b.a.formatRAM(e.ram))),r.a.createElement(h.b,null,k)),r.a.createElement(g.a,null,r.a.createElement(h.b,null,r.a.createElement(c.a,null,"Cores:")),r.a.createElement(h.b,null,r.a.createElement(c.a,null,e.cores)),r.a.createElement(h.b,null,_)))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(39),o=a(55),s=a(20),l=a(234),c=a(414),f=a(1),u=a(60),m=a(65),h=a(10),d=a(43),p=a(145),g=a(179),y=a(45),b=a(4),E=a(184),v=a(23);function k(t){const e=t.node,a=t.purchaseMultiplier,n=t.rerender;let k,_,w,S;if(e.level>=i.b.MaxLevel)k=r.a.createElement(h.a,{disabled:!0},"MAX LEVEL");else{let l=0;if("MAX"===a)l=Object(o.e)(t.player,e,i.b.MaxLevel);else{const t=i.b.MaxLevel-e.level;l=Math.min(t,a)}const u=Object(E.c)(e.level+l,0,e.maxRam,e.cores,t.player.hacknet_node_money_mult)-e.hashRate,m=e.calculateLevelUpgradeCost(l,t.player.hacknet_node_level_cost_mult);k=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(c.a,{hashes:u}))},r.a.createElement(h.a,{onClick:function(){let r=a;"MAX"===a&&(r=Object(o.e)(t.player,e,i.b.MaxLevel));Object(o.n)(t.player,e,r),n()}},"+",l," - ",r.a.createElement(s.a,{money:m,player:t.player})))}if(e.maxRam>=i.b.MaxRam)_=r.a.createElement(h.a,{disabled:!0},"MAX RAM");else{let l=0;if("MAX"===a)l=Object(o.f)(t.player,e,i.b.MaxRam);else{const t=Math.round(Math.log2(i.b.MaxRam/e.maxRam));l=Math.min(t,a)}const u=Object(E.c)(e.level,0,e.maxRam*Math.pow(2,l),e.cores,t.player.hacknet_node_money_mult)-e.hashRate,m=e.calculateRamUpgradeCost(l,t.player.hacknet_node_ram_cost_mult);_=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(c.a,{hashes:u}))},r.a.createElement(h.a,{onClick:function(){let r=a;"MAX"===a&&(r=Object(o.f)(t.player,e,i.b.MaxRam)),Object(o.o)(t.player,e,r),n()}},"+",l," - ",r.a.createElement(s.a,{money:m,player:t.player})))}if(e.cores>=i.b.MaxCores)w=r.a.createElement(h.a,{disabled:!0},"MAX CORES");else{let l=0;if("MAX"===a)l=Object(o.d)(t.player,e,i.b.MaxCores);else{const t=i.b.MaxCores-e.cores;l=Math.min(t,a)}const u=Object(E.c)(e.level,0,e.maxRam,e.cores+l,t.player.hacknet_node_money_mult)-e.hashRate,m=e.calculateCoreUpgradeCost(l,t.player.hacknet_node_core_cost_mult);w=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(c.a,{hashes:u}))},r.a.createElement(h.a,{onClick:function(){let r=a;"MAX"===a&&(r=Object(o.d)(t.player,e,i.b.MaxCores)),Object(o.k)(t.player,e,r),n()}},"+",l," - ",r.a.createElement(s.a,{money:m,player:t.player})))}if(e.cache>=i.b.MaxCache)S=r.a.createElement(h.a,{disabled:!0},"MAX CACHE");else{let c=0;if("MAX"===a)c=Object(o.c)(t.player,e,i.b.MaxCache);else{const t=i.b.MaxCache-e.cache;c=Math.min(t,a)}const u=32*Math.pow(2,e.cache+c)-e.hashCapacity,m=e.calculateCacheUpgradeCost(c);S=r.a.createElement(v.a,{title:r.a.createElement(f.a,null,"+",r.a.createElement(l.a,{hashes:u})," hashes")},r.a.createElement(h.a,{onClick:function(){let r=a;"MAX"===a&&(r=Object(o.c)(t.player,e,i.b.MaxCache));Object(o.j)(t.player,e,r),n(),Object(o.p)(t.player)}},"+",c," - ",r.a.createElement(s.a,{money:m,player:t.player}))),t.player.money}return r.a.createElement(u.a,{item:!0,component:m.a,p:1},r.a.createElement(g.a,{size:"small"},r.a.createElement(p.a,null,r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.hostname))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Production:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(f.a,null,r.a.createElement(l.a,{hashes:e.totalHashesGenerated})," (",r.a.createElement(c.a,{hashes:e.hashRate}),")"))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Hash Capacity:")),r.a.createElement(d.b,{colSpan:2},r.a.createElement(f.a,null,r.a.createElement(l.a,{hashes:e.hashCapacity})))),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Level:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.level)),r.a.createElement(d.b,null,k)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"RAM:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,b.a.formatRAM(e.maxRam))),r.a.createElement(d.b,null,_)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Cores:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.cores)),r.a.createElement(d.b,null,w)),r.a.createElement(y.a,null,r.a.createElement(d.b,null,r.a.createElement(f.a,null,"Cache Level:")),r.a.createElement(d.b,null,r.a.createElement(f.a,null,e.cache)),r.a.createElement(d.b,null,S)))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(372),o=a(242),s=a(234),l=a(1267),c=a(41),f=a(30),u=a(1);function m(t){const e=f.b.Player(),a=Object(n.useState)(!1)[1];function m(){a(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(()=>a(t=>!t),200);return()=>clearInterval(t)},[]);const h=e.hashManager;if(!(h instanceof i.a))throw new Error("Player does not have a HashManager)");return r.a.createElement(c.a,{open:t.open,onClose:t.onClose},r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,null,"Spend your hashes on a variety of different upgrades"),r.a.createElement(u.a,null,"Hashes: ",r.a.createElement(s.a,{hashes:e.hashManager.hashes})),Object.keys(o.a).map(t=>{const a=o.a[t];return r.a.createElement(l.a,{player:e,upg:a,hashManager:h,key:a.name,rerender:m})})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(55),o=a(763),s=a(16),l=a(174),c=a(234),f=a(1),u=a(65),m=a(10),h=a(5);const d={};function p(t){const[e,a]=Object(n.useState)(d[t.upg.name]?d[t.upg.name]:h.a.ECorp.toLowerCase());function p(){if(t.hashManager.hashes>=t.hashManager.getUpgradeCost(t.upg.name)){Object(i.m)(t.player,t.upg.name,e)||Object(s.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."),t.rerender()}}const g=t.hashManager,y=t.upg,b=g.getUpgradeCost(y.name),E=g.upgrades[y.name],v=y.effectText(E),k=g.hashes>=b;return r.a.createElement(u.a,{sx:{p:1}},r.a.createElement(f.a,null,r.a.createElement(l.a,{value:y.name})),r.a.createElement(f.a,null,"Cost: ",r.a.createElement(c.a,{hashes:b}),", Bought: ",E," times"),r.a.createElement(f.a,null,y.desc),!y.hasTargetServer&&r.a.createElement(m.a,{onClick:p,disabled:!k},"Buy"),y.hasTargetServer&&r.a.createElement(o.a,{purchase:p,canPurchase:k,value:e,serverType:o.b.Foreign,onChange:function(e){a(e.target.value),d[t.upg.name]=e.target.value}}),E>0&&v&&r.a.createElement(f.a,null,v))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(39),o=a(10);function s(){return(s=Object.assign||function(t){for(var e=1;ee.specialName===t.name),C=Object(b.d)(S?S.hostname:""),x=null!==C&&Object(y.b)(C);return n.createElement(n.Fragment,null,n.createElement(i.a,{onClick:()=>e.toCity()},"Return to World"),n.createElement(r.a,{variant:"h4",sx:{mt:1}},x&&!g.a.DisableTextEffects?n.createElement(_.a,{title:`Backdoor installed on ${t.name}.`},n.createElement("span",null,n.createElement(E.a,{content:t.name}))):t.name),w)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(23),l=a(21),c=a(284),f=a(218),u=a(66),m=a(362),h=a(94),d=a(32),p=a(116),g=a(320),y=a(30),b=a(1274);function E(t){const e=y.b.Player(),a=y.b.Router(),[E,v]=Object(n.useState)(!1),k=Object(n.useState)(!1)[1];function _(){k(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(_,200);return()=>clearInterval(t)},[]);const w=u.a[t.locName];if(null==w)throw new Error("CompanyLocation component constructed with invalid company: "+t.locName);const S=f.a[t.locName];if(null==S)throw new Error("CompanyLocation component constructed with invalid location: "+t.locName);const C=e.jobs[t.locName]?e.jobs[t.locName]:null,x=C?h.a[C]:null;e.location=t.locName;const L=null!=C,O=w.getFavorGain();return r.a.createElement(r.a.Fragment,null,L&&r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"Job Title: ",C),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"You will have ",r.a.createElement(g.a,{favor:w.favor+O})," company favor upon resetting after installing Augmentations")},r.a.createElement(i.a,null,"Company reputation: ",r.a.createElement(p.a,{reputation:w.playerReputation})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement(l.a,{display:"flex"},r.a.createElement(s.a,{title:r.a.createElement(r.a.Fragment,null,"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 company.")},r.a.createElement(i.a,null,"Company Favor: ",r.a.createElement(g.a,{favor:w.favor})))),r.a.createElement(i.a,null,"-------------------------"),r.a.createElement("br",null)),r.a.createElement(l.a,{sx:{display:"grid",width:"fit-content"}},L&&r.a.createElement(l.a,{sx:{display:"grid",gridTemplateColumns:"1fr 1fr"}},r.a.createElement(o.a,{onClick:function(n){if(!n.isTrusted)return;const r=x;r instanceof m.a&&(r.isPartTimeJob()||r.isSoftwareConsultantJob()||r.isBusinessConsultantJob()?e.startWorkPartTime(t.locName):e.startWork(t.locName),e.startFocusing(),a.toWork())}},"Work"),r.a.createElement(o.a,{onClick:()=>v(!0)},"Quit"),r.a.createElement(b.a,{locName:t.locName,company:w,onQuit:_,open:E,onClose:()=>v(!1)})),w.hasAgentPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.a[0]],onClick:function(t){t.isTrusted&&(e.applyForAgentJob(),_())},text:"Apply for Agent Job"}),w.hasBusinessConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.c[0]],onClick:function(t){t.isTrusted&&(e.applyForBusinessConsultantJob(),_())},text:"Apply for Business Consultant Job"}),w.hasBusinessPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.b[0]],onClick:function(t){t.isTrusted&&(e.applyForBusinessJob(),_())},text:"Apply for Business Job"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.e[1]],onClick:function(t){t.isTrusted&&(e.applyForEmployeeJob(),_())},text:"Apply to be an Employee"}),w.hasEmployeePositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.g[1]],onClick:function(t){t.isTrusted&&(e.applyForPartTimeEmployeeJob(),_())},text:"Apply to be a part-time Employee"}),w.hasITPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.d[0]],onClick:function(t){t.isTrusted&&(e.applyForItJob(),_())},text:"Apply for IT Job"}),w.hasSecurityPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.h[2]],onClick:function(t){t.isTrusted&&(e.applyForSecurityJob(),_())},text:"Apply for Security Job"}),w.hasSoftwareConsultantPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.k[0]],onClick:function(t){t.isTrusted&&(e.applyForSoftwareConsultantJob(),_())},text:"Apply for Software Consultant Job"}),w.hasSoftwarePositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.j[0]],onClick:function(t){t.isTrusted&&(e.applyForSoftwareJob(),_())},text:"Apply for Software Job"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.e[0]],onClick:function(t){t.isTrusted&&(e.applyForWaiterJob(),_())},text:"Apply to be a Waiter"}),w.hasWaiterPositions()&&r.a.createElement(c.a,{company:w,entryPosType:h.a[d.g[0]],onClick:function(t){t.isTrusted&&(e.applyForPartTimeWaiterJob(),_())},text:"Apply to be a part-time Waiter"}),null!=S.infiltrationData&&r.a.createElement(o.a,{onClick:function(e){if(!e.isTrusted)return;const n=S;if(!n.infiltrationData)throw new Error(`trying to start infiltration at ${t.locName} but the infiltrationData is null`);a.toInfiltration(n)}},"Infiltrate Company")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(32);const r=[{name:n.j[0],nextPosition:n.j[1],baseSalary:33,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.05,reqdHacking:1,repMultiplier:.9},{name:n.j[1],nextPosition:n.j[2],baseSalary:80,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.1,reqdHacking:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.j[2],nextPosition:n.j[3],baseSalary:165,charismaEffectiveness:20,charismaExpGain:.08,hackingEffectiveness:80,hackingExpGain:.4,reqdCharisma:51,reqdHacking:251,reqdReputation:4e4,repMultiplier:1.3},{name:n.j[3],nextPosition:n.j[4],baseSalary:500,charismaEffectiveness:25,charismaExpGain:.1,hackingEffectiveness:75,hackingExpGain:.8,reqdCharisma:151,reqdHacking:401,reqdReputation:2e5,repMultiplier:1.5},{name:n.j[4],nextPosition:n.j[5],baseSalary:800,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1,reqdCharisma:251,reqdHacking:501,reqdReputation:4e5,repMultiplier:1.6},{name:n.j[5],nextPosition:n.j[6],baseSalary:1650,charismaEffectiveness:25,charismaExpGain:.5,hackingEffectiveness:75,hackingExpGain:1.1,reqdCharisma:251,reqdHacking:501,reqdReputation:8e5,repMultiplier:1.6},{name:n.j[6],nextPosition:n.j[7],baseSalary:2310,charismaEffectiveness:30,charismaExpGain:.6,hackingEffectiveness:70,hackingExpGain:1.2,reqdCharisma:401,reqdHacking:601,reqdReputation:16e5,repMultiplier:1.75},{name:n.j[7],nextPosition:null,baseSalary:2640,charismaEffectiveness:35,charismaExpGain:1,hackingEffectiveness:65,hackingExpGain:1.5,reqdCharisma:501,reqdHacking:751,reqdReputation:32e5,repMultiplier:2},{name:n.d[0],nextPosition:n.d[1],baseSalary:26,charismaEffectiveness:10,charismaExpGain:.01,hackingEffectiveness:90,hackingExpGain:.04,reqdHacking:1,repMultiplier:.9},{name:n.d[1],nextPosition:n.d[2],baseSalary:66,charismaEffectiveness:15,charismaExpGain:.02,hackingEffectiveness:85,hackingExpGain:.08,reqdHacking:26,reqdReputation:7e3,repMultiplier:1.1},{name:n.d[2],nextPosition:n.d[3],baseSalary:132,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.3,reqdCharisma:51,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.3},{name:n.d[3],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.2,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.4},{name:n.i[0],nextPosition:n.j[5],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[0],nextPosition:n.f[1],baseSalary:121,charismaEffectiveness:15,charismaExpGain:.05,hackingEffectiveness:85,hackingExpGain:.4,reqdCharisma:26,reqdHacking:151,reqdReputation:35e3,repMultiplier:1.2},{name:n.f[1],nextPosition:n.j[5],baseSalary:410,charismaEffectiveness:20,charismaExpGain:.1,hackingEffectiveness:80,hackingExpGain:.5,reqdCharisma:76,reqdHacking:251,reqdReputation:175e3,repMultiplier:1.3},{name:n.b[0],nextPosition:n.b[1],baseSalary:46,charismaEffectiveness:90,charismaExpGain:.08,hackingEffectiveness:10,hackingExpGain:.01,reqdCharisma:1,reqdHacking:1,repMultiplier:.9},{name:n.b[1],nextPosition:n.b[2],baseSalary:100,charismaEffectiveness:85,charismaExpGain:.15,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:51,reqdHacking:6,reqdReputation:8e3,repMultiplier:1.1},{name:n.b[2],nextPosition:n.b[3],baseSalary:200,charismaEffectiveness:85,charismaExpGain:.3,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:101,reqdHacking:51,reqdReputation:4e4,repMultiplier:1.3},{name:n.b[3],nextPosition:n.b[4],baseSalary:660,charismaEffectiveness:85,charismaExpGain:.4,hackingEffectiveness:15,hackingExpGain:.02,reqdCharisma:226,reqdHacking:51,reqdReputation:2e5,repMultiplier:1.5},{name:n.b[4],nextPosition:n.b[5],baseSalary:1950,charismaEffectiveness:90,charismaExpGain:1,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:501,reqdHacking:76,reqdReputation:8e5,repMultiplier:1.6},{name:n.b[5],nextPosition:null,baseSalary:3900,charismaEffectiveness:90,charismaExpGain:1.5,hackingEffectiveness:10,hackingExpGain:.05,reqdCharisma:751,reqdHacking:101,reqdReputation:32e5,repMultiplier:1.75},{name:n.h[0],nextPosition:n.h[1],baseSalary:82,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.04,reqdHacking:11,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1},{name:n.h[1],nextPosition:null,baseSalary:460,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.1,reqdHacking:101,reqdStrength:301,reqdDefense:301,reqdDexterity:301,reqdAgility:301,reqdCharisma:151,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[2],nextPosition:n.h[3],baseSalary:50,hackingEffectiveness:5,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.01,strengthExpGain:.04,defenseExpGain:.04,dexterityExpGain:.04,agilityExpGain:.04,charismaExpGain:.02,reqdStrength:51,reqdDefense:51,reqdDexterity:51,reqdAgility:51,reqdCharisma:1,repMultiplier:1},{name:n.h[3],nextPosition:n.h[4],baseSalary:195,hackingEffectiveness:10,strengthEffectiveness:20,defenseEffectiveness:20,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:10,hackingExpGain:.02,strengthExpGain:.1,defenseExpGain:.1,dexterityExpGain:.1,agilityExpGain:.1,charismaExpGain:.05,reqdHacking:26,reqdStrength:151,reqdDefense:151,reqdDexterity:151,reqdAgility:151,reqdCharisma:51,reqdReputation:8e3,repMultiplier:1.1},{name:n.h[4],nextPosition:n.h[5],baseSalary:660,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.02,strengthExpGain:.12,defenseExpGain:.12,dexterityExpGain:.12,agilityExpGain:.12,charismaExpGain:.1,reqdHacking:26,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:101,reqdReputation:36e3,repMultiplier:1.25},{name:n.h[5],nextPosition:null,baseSalary:1320,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:15,agilityEffectiveness:15,charismaEffectiveness:30,hackingExpGain:.05,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.15,reqdHacking:51,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:151,reqdReputation:144e3,repMultiplier:1.4},{name:n.a[0],nextPosition:n.a[1],baseSalary:330,hackingEffectiveness:10,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:20,hackingExpGain:.04,strengthExpGain:.08,defenseExpGain:.08,dexterityExpGain:.08,agilityExpGain:.08,charismaExpGain:.05,reqdHacking:101,reqdStrength:101,reqdDefense:101,reqdDexterity:101,reqdAgility:101,reqdCharisma:101,reqdReputation:8e3,repMultiplier:1},{name:n.a[1],nextPosition:n.a[2],baseSalary:990,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.1,strengthExpGain:.15,defenseExpGain:.15,dexterityExpGain:.15,agilityExpGain:.15,charismaExpGain:.1,reqdHacking:201,reqdStrength:251,reqdDefense:251,reqdDexterity:251,reqdAgility:251,reqdCharisma:201,reqdReputation:32e3,repMultiplier:1.25},{name:n.a[2],nextPosition:null,baseSalary:2e3,hackingEffectiveness:15,strengthEffectiveness:15,defenseEffectiveness:15,dexterityEffectiveness:20,agilityEffectiveness:20,charismaEffectiveness:15,hackingExpGain:.15,strengthExpGain:.2,defenseExpGain:.2,dexterityExpGain:.2,agilityExpGain:.2,charismaExpGain:.15,reqdHacking:251,reqdStrength:501,reqdDefense:501,reqdDexterity:501,reqdAgility:501,reqdCharisma:251,reqdReputation:162e3,repMultiplier:1.5},{name:n.e[0],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.05,repMultiplier:1},{name:n.e[1],nextPosition:null,baseSalary:22,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.02,defenseExpGain:.02,dexterityExpGain:.02,agilityExpGain:.02,charismaExpGain:.04,repMultiplier:1},{name:n.k[0],nextPosition:n.k[1],baseSalary:66,hackingEffectiveness:80,charismaEffectiveness:20,hackingExpGain:.08,charismaExpGain:.03,reqdHacking:51,repMultiplier:1},{name:n.k[1],nextPosition:null,baseSalary:132,hackingEffectiveness:75,charismaEffectiveness:25,hackingExpGain:.25,charismaExpGain:.06,reqdHacking:251,reqdCharisma:51,repMultiplier:1.2},{name:n.c[0],nextPosition:n.c[1],baseSalary:66,hackingEffectiveness:20,charismaEffectiveness:80,hackingExpGain:.015,charismaExpGain:.15,reqdHacking:6,reqdCharisma:51,repMultiplier:1},{name:n.c[1],nextPosition:null,baseSalary:525,hackingEffectiveness:15,charismaEffectiveness:85,hackingExpGain:.015,charismaExpGain:.3,reqdHacking:51,reqdCharisma:226,repMultiplier:1.2},{name:n.g[0],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.04,repMultiplier:1},{name:n.g[1],nextPosition:null,baseSalary:20,strengthEffectiveness:10,dexterityEffectiveness:10,agilityEffectiveness:10,charismaEffectiveness:70,strengthExpGain:.0075,defenseExpGain:.0075,dexterityExpGain:.0075,agilityExpGain:.0075,charismaExpGain:.03,repMultiplier:1}]},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(30),o=a(41),s=a(1),l=a(10);function c(t){const e=i.b.Player();return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null," Would you like to quit your job at ",t.company.name,"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,{onClick:function(){e.quitJob(t.locName),t.onQuit(),t.onClose()}},"Quit"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a(10),i=a(8),o=a(26),s=a(20),l=a(360),c=a(21);function f(t){function e(){const e=l.a.find(e=>e.specialName===t.loc.name),a=Object(o.d)(e?e.hostname:"");if(null==a||!a.hasOwnProperty("backdoorInstalled"))return t.loc.costMult;const n=a.backdoorInstalled?.9:1;return t.loc.costMult*n}function a(a){const n=t.loc;t.p.startClass(e(),n.expMult,a),t.p.startFocusing(),t.router.toWork()}const f=i.a.ClassGymBaseCost*e();return n.createElement(c.a,{sx:{display:"grid",width:"fit-content"}},n.createElement(r.a,{onClick:function(){a(i.a.ClassGymStrength)}},"Train Strength (",n.createElement(s.a,{money:f,player:t.p})," / sec)"),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymDefense)}},"Train Defense (",n.createElement(s.a,{money:f,player:t.p})," / sec)"),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymDexterity)}},"Train Dexterity (",n.createElement(s.a,{money:f,player:t.p})," / sec)"),n.createElement(r.a,{onClick:function(){a(i.a.ClassGymAgility)}},"Train Agility (",n.createElement(s.a,{money:f,player:t.p})," / sec)"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a(10),i=a(399),o=a(20),s=a(16);class l extends n.Component{constructor(t){super(t),this.btnStyle={display:"block"},this.getCost=this.getCost.bind(this),this.getHealed=this.getHealed.bind(this),this.state={currHp:this.props.p.hp}}getCost(){return Object(i.b)(this.props.p)}getHealed(t){if(!t.isTrusted)return;if(this.props.p.hp<0&&(this.props.p.hp=0),this.props.p.hp>=this.props.p.max_hp)return;const e=this.getCost();this.props.p.loseMoney(e,"hospitalization"),this.props.p.hp=this.props.p.max_hp,this.setState({currHp:this.props.p.hp}),Object(s.a)(n.createElement(n.Fragment,null,"You were healed to full health! The hospital billed you for ",n.createElement(o.a,{money:e})))}render(){const t=this.getCost();return n.createElement(r.a,{onClick:this.getHealed,style:this.btnStyle},"Get treatment for wounds - ",n.createElement(o.a,{money:t,player:this.props.p}))}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a(10),i=a(23),o=a(85),s=a(4),l=a(30),c=a(21);function f(){const t=l.b.Player(),e=l.b.Router();const a=o.a.Shoplift.successRate(t),f=o.a.RobStore.successRate(t),u=o.a.Mug.successRate(t),m=o.a.Larceny.successRate(t),h=o.a.DealDrugs.successRate(t),d=o.a.BondForgery.successRate(t),p=o.a.TraffickArms.successRate(t),g=o.a.Homicide.successRate(t),y=o.a.GrandTheftAuto.successRate(t),b=o.a.Kidnap.successRate(t),E=o.a.Assassination.successRate(t),v=o.a.Heist.successRate(t);return n.createElement(c.a,{sx:{display:"grid",width:"fit-content"}},n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to shoplift from a low-end retailer")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Shoplift.commit(e,t)}},"Shoplift (",s.a.formatPercentage(a)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to commit armed robbery on a high-end store")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.RobStore.commit(e,t)}},"Rob store (",s.a.formatPercentage(f)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to mug a random person on the street")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Mug.commit(e,t)}},"Mug someone (",s.a.formatPercentage(u)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to rob property from someone's house")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Larceny.commit(e,t)}},"Larceny (",s.a.formatPercentage(m)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to deal drugs")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.DealDrugs.commit(e,t)}},"Deal Drugs (",s.a.formatPercentage(h)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to forge corporate bonds")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.BondForgery.commit(e,t)}},"Bond Forgery (",s.a.formatPercentage(d)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to smuggle illegal arms into the city")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.TraffickArms.commit(e,t)}},"Traffick illegal Arms (",s.a.formatPercentage(p)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to murder a random person on the street")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Homicide.commit(e,t)}},"Homicide (",s.a.formatPercentage(g)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to commit grand theft auto")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.GrandTheftAuto.commit(e,t)}},"Grand theft Auto (",s.a.formatPercentage(y)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to kidnap and ransom a high-profile-target")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Kidnap.commit(e,t)}},"Kidnap and Ransom (",s.a.formatPercentage(b)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to assassinate a high-profile target")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Assassination.commit(e,t)}},"Assassinate (",s.a.formatPercentage(E)," chance of success)")),n.createElement(i.a,{title:n.createElement(n.Fragment,null,"Attempt to pull off the ultimate heist")},n.createElement(r.a,{onClick:function(a){a.isTrusted&&o.a.Heist.commit(e,t)}},"Heist (",s.a.formatPercentage(v)," chance of success)")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return S}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1279),l=a(11),c=a(15),f=a(29),u=a(105),m=a(30),h=a(16),d=a(140),p=a(1280),g=a(106),y=a(141),b=a(456),E=a(221),v=a(91),k=a(26),_=a(1281),w=a(5);function S(t){const e=m.b.Player(),a=m.b.Router(),S=Object(n.useState)(!1)[1],C=e.inBladeburner();function x(){const t=e;if(t.inBladeburner())a.toBladeburner();else if(t.strength>=100&&t.defense>=100&&t.dexterity>=100&&t.agility>=100){t.startBladeburner({new:!0}),Object(h.a)("You have been accepted into the Bladeburner division!"),S(t=>!t);const e=document.getElementById("world-menu-header");e instanceof HTMLElement&&(e.click(),e.click())}else Object(h.a)("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)")}function L(){a.toGrafting()}function O(){const[t,a]=Object(n.useState)(!1);return e.canAccessCorporation()?r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{disabled:!e.canAccessCorporation()||e.hasCorporation(),onClick:()=>a(!0)},"Create a Corporation"),r.a.createElement(s.a,{open:t,onClose:()=>a(!1)})):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"A business man is yelling at a clerk. You should come back later.")))}function M(){const t=f.a[w.a.ChurchOfTheMachineGod];e.factions.includes(w.a.ChurchOfTheMachineGod)||Object(u.e)(t),e.augmentations.some(t=>t.name===c.a.StaneksGift1)||e.queuedAugmentations.some(t=>t.name===c.a.StaneksGift1)||Object(y.a)({name:c.a.StaneksGift1,level:1}),a.toFaction(t)}switch(t.loc.name){case l.a.NewTokyoVitaLife:return e.canAccessGrafting()?r.a.createElement(o.a,{onClick:L,sx:{my:5}},"Enter the secret lab"):r.a.createElement(r.a.Fragment,null);case l.a.Sector12CityHall:return r.a.createElement(O,null);case l.a.Sector12NSA:return function(){if(!e.canAccessBladeburner())return r.a.createElement(r.a.Fragment,null);const t=C?"Enter Bladeburner Headquarters":"Apply to Bladeburner Division";return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(o.a,{onClick:x},t))}();case l.a.NewTokyoNoodleBar:return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){d.b.emit("You ate some delicious noodles and feel refreshed","success",2e3),Object(p.a)(),e.sourceFiles.length>0&&e.giveExploit(g.a.N00dles),(e.sourceFileLvl(5)>0||5===e.bitNodeN)&&(e.intelligence_exp*=1.0000000000000002),e.hacking_exp*=1.0000000000000002,e.strength_exp*=1.0000000000000002,e.defense_exp*=1.0000000000000002,e.agility_exp*=1.0000000000000002,e.dexterity_exp*=1.0000000000000002,e.charisma_exp*=1.0000000000000002;for(const t of e.hacknetNodes)if(t instanceof E.a)e.gainMoney(.001*t.moneyGainRatePerSecond,"other");else{const a=Object(k.d)(t);if(!(a instanceof v.a))throw new Error(`Server ${t} is not a hacknet server.`);e.hashManager.storeHashes(.001*a.hashRate)}e.bladeburner&&(e.bladeburner.rank+=1e-5),e.corporation&&(e.corporation.funds+=.01*e.corporation.revenue)}},"Eat noodles"));case l.a.ChongqingChurchOfTheMachineGod:return function(){const t=r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," `` ",r.a.createElement("br",null)," -odmmNmds: ",r.a.createElement("br",null)," `hNmo:..-omNh. ",r.a.createElement("br",null)," yMd` `hNh ",r.a.createElement("br",null)," mMd oNm ",r.a.createElement("br",null)," oMNo .mM/ ",r.a.createElement("br",null)," `dMN+ -mM+ ",r.a.createElement("br",null)," -mMNo -mN+ ",r.a.createElement("br",null)," .+- :mMNo/mN/ ",r.a.createElement("br",null),":yNMd. :NMNNN/ ",r.a.createElement("br",null),"-mMMMh. /NMMh` ",r.a.createElement("br",null)," .dMMMd. /NMMMy` ",r.a.createElement("br",null)," `yMMMd. /NNyNMMh` ",r.a.createElement("br",null)," `sMMMd. +Nm: +NMMh. ",r.a.createElement("br",null)," oMMMm- oNm: /NMMd. ",r.a.createElement("br",null)," +NMMmsMm- :mMMd. ",r.a.createElement("br",null)," /NMMMm- -mMMd. ",r.a.createElement("br",null)," /MMMm- -mMMd. ",r.a.createElement("br",null)," `sMNMMm- .mMmo ",r.a.createElement("br",null)," `sMd:hMMm. ./. ",r.a.createElement("br",null)," `yMy` `yNMd` ",r.a.createElement("br",null)," `hMs` oMMy ",r.a.createElement("br",null)," `hMh sMN- ",r.a.createElement("br",null)," /MM- .NMo ",r.a.createElement("br",null)," +MM: :MM+ ",r.a.createElement("br",null)," sNNo-.`.-omNy` ",r.a.createElement("br",null)," -smNNNNmdo- ",r.a.createElement("br",null)," `..` ");return e.hasAugmentation(c.a.StaneksGift3,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,"Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it seems. Curious, Just how much of a machine's soul do you house in that body?")),t):e.hasAugmentation(c.a.StaneksGift2,!0)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: I see you\'ve taken to my creation. So much so it could hardly be recognized as one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.')),t):e.factions.includes(w.a.ChurchOfTheMachineGod)?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome back my child!')),t):e.canAccessCotMG()?e.augmentations.filter(t=>t.name!==c.a.NeuroFluxGovernor).length>0||e.queuedAugmentations.filter(t=>t.name!==c.a.NeuroFluxGovernor).length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Begone you filth! My gift must be the first modification that your body should have!'))):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement("i",null,'Allison "Mother" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human form? If you are, accept my gift.')),r.a.createElement(o.a,{onClick:M},"Accept Stanek's Gift"),t):r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"A decrepit altar stands in the middle of a dilapidated church.",r.a.createElement("br",null),r.a.createElement("br",null),"A symbol is carved in the altar."),r.a.createElement("br",null),t)}();case l.a.IshimaGlitch:return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,r.a.createElement(b.a,{content:"An eerie aura surrounds this area. You feel you should leave."})));case l.a.NewTokyoArcade:return r.a.createElement(_.a,null);default:return console.error(`Location ${t.loc.name} doesn't have any special properties`),r.a.createElement(r.a.Fragment,null)}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(20),o=a(41),s=a(30),l=a(1),c=a(10),f=a(81);function u(t){const e=s.b.Player(),a=s.b.Router(),u=e.canAfford(15e10);if(!e.canAccessCorporation()||e.hasCorporation())return t.onClose(),r.a.createElement(r.a.Fragment,null);const[m,h]=Object(n.useState)("");return r.a.createElement(o.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,null,"Would you like to start a corporation? This will require $150b for registration and initial funding. ",3===e.bitNodeN&&"This $150b\n can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million\n shares",r.a.createElement("br",null),r.a.createElement("br",null),"If you would like to start one, please enter a name for your corporation below:"),r.a.createElement(f.a,{autoFocus:!0,placeholder:"Corporation Name",onChange:function(t){h(t.target.value)},value:m}),3===e.bitNodeN&&r.a.createElement(c.a,{onClick:function(){""!=m&&(e.startCorporation(m,5e8),t.onClose(),a.toCorporation())},disabled:""==m},"Use seed money"),r.a.createElement(c.a,{onClick:function(){u&&""!=m&&(e.startCorporation(m),e.loseMoney(15e10,"corporation"),t.onClose(),a.toCorporation())},disabled:""==m||!u},"Self-Fund (",r.a.createElement(i.a,{money:15e10,player:e}),")"))}},function(module,__webpack_exports__,__webpack_require__){"use strict";__webpack_require__.d(__webpack_exports__,"a",(function(){return N00dles}));const n00dlePower="[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()";function N00dles(){eval(n00dlePower)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n,r=a(0),i=a.n(r),o=a(1282),s=a(10),l=a(30),c=a(338);function f(){const t=l.b.Player(),[e,a]=Object(r.useState)(n.None);if(e===n.None)return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{onClick:function(){0===t.sourceFileLvl(1)?c.a.emit("This machine is broken."):a(n.Megabyteburner2000)}},"Megabyte burner 2000"));let f=i.a.createElement(i.a.Fragment,null);switch(e){case n.Megabyteburner2000:f=i.a.createElement(o.a,null)}return i.a.createElement(i.a.Fragment,null,i.a.createElement(s.a,{onClick:()=>a(n.None)},"Back"),f)}!function(t){t[t.None=0]="None",t[t.Megabyteburner2000=1]="Megabyteburner2000"}(n||(n={}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(1),o=a(30),s=a(106);const l={width:"1060px",height:"800px",border:"0px"};function c(){const t=o.b.Player();Object(n.useEffect)(()=>{window.addEventListener("message",(function(e){e.isTrusted&&"https://bitburner-official.github.io"==e.origin&&e.data&&t.giveExploit(s.a.TrueRecursion)}))});const e=r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ,'\" \"', .-. "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," / \\ ( ) "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | .-. '-' .-. "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ / ( ) ( )"),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," '.___.' '-' .-. '-'"),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ||| ( ) "),r.a.createElement(i.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ||| '-' "));return r.a.createElement(r.a.Fragment,null,r.a.createElement("div",{style:{width:"1060px",height:"800px",padding:"0",overflow:"hidden",borderColor:"white",borderStyle:"solid",borderWidth:"5px"}},r.a.createElement("iframe",{src:"https://bitburner-official.github.io/bitburner-legacy/",style:l})),r.a.createElement("div",{style:{width:"1060px",borderColor:"white",borderStyle:"solid",borderWidth:"5px"}},e))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(1),o=a(10),s=a(1284),l=a(1285),c=a(1287),f=a(222),u=a(20),m=a(30),h=a(1288),d=a(4),p=a(21);function g(t){const[e,a]=Object(n.useState)(!1),i=m.b.Player(),s=Object(f.a)(t.ram);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{onClick:()=>a(!0),disabled:!i.canAfford(s)},"Purchase ",d.a.formatRAM(t.ram)," Server - ",r.a.createElement(u.a,{money:s,player:i})),r.a.createElement(h.a,{open:e,onClose:()=>a(!1),ram:t.ram,cost:s,rerender:t.rerender}))}function y(t){const e=m.b.Player(),a=Object(n.useState)(!1)[1];function o(){a(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(o,1e3);return()=>clearInterval(t)},[]);const f=[];for(let e=t.loc.techVendorMinRam;e<=t.loc.techVendorMaxRam;e*=2)f.push(r.a.createElement(g,{key:e,ram:e,rerender:o}));return r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(p.a,{sx:{display:"grid",width:"fit-content"}},f),r.a.createElement("br",null),r.a.createElement(i.a,null,r.a.createElement("i",null,'"You can order bigger servers via scripts. We don\'t take custom orders in person."')),r.a.createElement("br",null),r.a.createElement(l.a,{p:e,rerender:o}),r.a.createElement("br",null),r.a.createElement(s.a,{p:e,rerender:o}),r.a.createElement("br",null),r.a.createElement(c.a,{p:e,rerender:o}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(10),o=a(23),s=a(1),l=a(8),c=a(222),f=a(20),u=a(4),m=a(265);function h(t){const e=t.p.getHomeComputer();if(e.maxRam>=l.a.HomeComputerMaxRam)return r.a.createElement(i.a,null,"Upgrade 'home' RAM - MAX");const a=t.p.getUpgradeHomeRamCost();return r.a.createElement(o.a,{title:r.a.createElement(m.a,null,"\\(\\large{cost = 3.2 \\cdot 10^3 \\cdot 1.58^{log_2{(ram)}}}\\)")},r.a.createElement("span",null,r.a.createElement("br",null),r.a.createElement(s.a,null,r.a.createElement("i",null,"\"More RAM means more scripts on 'home'\"")),r.a.createElement("br",null),r.a.createElement(i.a,{disabled:!t.p.canAfford(a),onClick:function(){Object(c.d)(t.p),t.rerender()}},"Upgrade 'home' RAM (",u.a.formatRAM(e.maxRam)," -> ",u.a.formatRAM(2*e.maxRam),") - ",r.a.createElement(f.a,{money:a,player:t.p}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(10),o=a(1286),s=a(8),l=a(20);function c(t){return t.p.hasTorRouter()?r.a.createElement(i.a,null,"TOR Router - Purchased"):r.a.createElement(i.a,{disabled:!t.p.canAfford(s.a.TorRouterCost),onClick:function(){Object(o.a)(t.p),t.rerender()}},"Purchase TOR router - ",r.a.createElement(l.a,{money:s.a.TorRouterCost,player:t.p}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(8),r=a(26),i=a(132),o=a(16);function s(t){if(t.hasTorRouter())return void Object(o.a)("You already have a TOR Router!");if(!t.canAfford(n.a.TorRouterCost))return void Object(o.a)("You cannot afford to purchase the TOR router!");t.loseMoney(n.a.TorRouterCost,"other");const e=Object(i.f)({ip:Object(r.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(r.a)(e),t.getHomeComputer().serversOnNetwork.push(e.hostname),e.serversOnNetwork.push(t.getHomeComputer().hostname),Object(o.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.")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(10),o=a(23),s=a(1),l=a(20),c=a(265);function f(t){const e=t.p.getHomeComputer(),a=e.cpuCores>=8;if(a)return r.a.createElement(i.a,null,"Upgrade 'home' cores - MAX");const n=t.p.getUpgradeHomeCoresCost();return r.a.createElement(o.a,{title:r.a.createElement(c.a,null,"\\(\\large{cost = 10^9 \\cdot 7.5 ^{\\text{cores}}}\\)")},r.a.createElement("span",null,r.a.createElement("br",null),r.a.createElement(s.a,null,r.a.createElement("i",null,"\"Cores increase the effectiveness of grow() and weaken() on 'home'\"")),r.a.createElement("br",null),r.a.createElement(i.a,{disabled:!t.p.canAfford(n),onClick:function(){a||t.p.canAfford(n)&&(t.p.loseMoney(n,"servers"),e.cpuCores++,t.rerender())}},"Upgrade 'home' cores (",e.cpuCores," -> ",e.cpuCores+1,") - ",r.a.createElement(l.a,{money:n,player:t.p}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(222),o=a(4),s=a(20),l=a(41),c=a(30),f=a(1),u=a(81),m=a(10),h=a(28);function d(t){const e=c.b.Player(),[a,d]=Object(n.useState)("");function p(){Object(i.e)(a,t.ram,t.cost,e),t.onClose()}return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,null,"Would you like to purchase a new server with ",o.a.formatRAM(t.ram)," of RAM for"," ",r.a.createElement(s.a,{money:t.cost,player:e}),"?"),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,null," Please enter the server hostname below:"),r.a.createElement("br",null),r.a.createElement(u.a,{autoFocus:!0,onKeyUp:function(t){t.key===h.a.ENTER&&p()},onChange:function(t){d(t.target.value)},type:"text",placeholder:"Unique Hostname",InputProps:{endAdornment:r.a.createElement(m.a,{onClick:p,disabled:!e.canAfford(t.cost)||""===a},"Buy")}}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(8),o=a(20),s=a(41),l=a(30),c=a(1),f=a(10);function u(t){const e=l.b.Player(),a=i.a.TravelCost;return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(c.a,null,"Would you like to travel to ",t.city,"? The trip will cost ",r.a.createElement(o.a,{money:a,player:e}),"."),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(f.a,{onClick:function(){t.travel()}},r.a.createElement(c.a,null,"Travel")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a(23),i=a(10),o=a(8),s=a(26),l=a(20),c=a(30),f=a(21);function u(t){const e=c.b.Player(),a=c.b.Router();function u(){const e=Object(s.d)(t.loc.name);if(null==e||!e.hasOwnProperty("backdoorInstalled"))return t.loc.costMult;const a=e.backdoorInstalled?.9:1;return t.loc.costMult*a}function m(n){const r=t.loc;e.startClass(u(),r.expMult,n),e.startFocusing(),a.toWork()}const h=u(),d=o.a.ClassDataStructuresBaseCost*h,p=o.a.ClassNetworksBaseCost*h,g=o.a.ClassAlgorithmsBaseCost*h,y=o.a.ClassManagementBaseCost*h,b=o.a.ClassLeadershipBaseCost*h;return n.createElement(f.a,{sx:{display:"grid",width:"fit-content"}},n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassStudyComputerScience)}},"Study Computer Science (free)")),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassDataStructures)}},"Take Data Structures course (",n.createElement(l.a,{money:d,player:e})," / sec)")),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassNetworks)}},"Take Networks course (",n.createElement(l.a,{money:p,player:e})," / sec)")),n.createElement(r.a,{title:"Gain hacking experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassAlgorithms)}},"Take Algorithms course (",n.createElement(l.a,{money:g,player:e})," / sec)")),n.createElement(r.a,{title:"Gain charisma experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassManagement)}},"Take Management course (",n.createElement(l.a,{money:y,player:e})," / sec)")),n.createElement(r.a,{title:"Gain charisma experience!"},n.createElement(i.a,{onClick:function(){m(o.a.ClassLeadership)}},"Take Leadership course (",n.createElement(l.a,{money:b,player:e})," / sec)")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n,r=a(0),i=a.n(r),o=a(10),s=a(764),l=a(1293),c=a(1294),f=a(1295),u=a(21);function m(t){const[e,a]=Object(r.useState)(n.None);function m(t){a(t)}return i.a.createElement(i.a.Fragment,null,e===n.None&&i.a.createElement(u.a,{sx:{display:"grid",width:"fit-content"}},i.a.createElement(o.a,{onClick:()=>m(n.Coin)},"Play coin flip"),i.a.createElement(o.a,{onClick:()=>m(n.Slots)},"Play slots"),i.a.createElement(o.a,{onClick:()=>m(n.Roulette)},"Play roulette"),i.a.createElement(o.a,{onClick:()=>m(n.Blackjack)},"Play blackjack (",s.b," decks)")),e!==n.None&&i.a.createElement(i.a.Fragment,null,i.a.createElement(o.a,{onClick:()=>m(n.None)},"Stop playing"),e===n.Coin&&i.a.createElement(l.a,{p:t.p}),e===n.Slots&&i.a.createElement(f.a,{p:t.p}),e===n.Roulette&&i.a.createElement(c.a,{p:t.p}),e===n.Blackjack&&i.a.createElement(s.a,{p:t.p})))}!function(t){t.None="none",t.Coin="coin",t.Slots="slots",t.Roulette="roulette",t.Blackjack="blackjack"}(n||(n={}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(258),r=a(173);class i{constructor(t=1){var e,a,n;n=[],(a="cards")in(e=this)?Object.defineProperty(e,a,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[a]=n,this.numDecks=t,this.reset()}shuffle(){this.cards=Object(r.shuffle)(this.cards)}drawCard(){if(0==this.cards.length)throw new Error("Tried to draw card from empty deck");return this.cards.shift()}safeDrawCard(){return 0===this.cards.length&&this.reset(),this.drawCard()}reset(){this.cards=[];for(let t=1;t<=13;++t)for(let e=0;ey(!1),250),s?Object(o.c)(t.p,e):Object(o.c)(t.p,-e),Object(o.b)(t.p)}return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Result:")," ",m,r.a.createElement(u.a,{display:"flex",alignItems:"center"},r.a.createElement(c.a,{type:"number",onChange:function(t){let e=parseInt(t.currentTarget.value);isNaN(e)&&(e=0),e>1e4&&(e=1e4),e<0&&(e=0),a(e)},InputProps:{endAdornment:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{onClick:Object(s.a)(()=>b("H")),disabled:g},"Head!"),r.a.createElement(f.a,{onClick:Object(s.a)(()=>b("T")),disabled:g},"Tail!"))}})),r.a.createElement(l.a,{variant:"h3"},d))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(20),o=a(207),s=a(310),l=a(86),c=a(1),f=a(10),u=a(81);const m=[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36],h={Red:{match:t=>m.includes(t),payout:1},Black:{match:t=>0!==t&&!m.includes(t),payout:1},Odd:{match:t=>0!==t&&t%2==1,payout:1},Even:{match:t=>0!==t&&t%2==0,payout:1},High:{match:t=>0!==t&&t>18,payout:1},Low:{match:t=>0!==t&&t<19,payout:1},Third1:{match:t=>0!==t&&t<=12,payout:2},Third2:{match:t=>0!==t&&(t>=13&&t<=24),payout:2},Third3:{match:t=>0!==t&&t>=25,payout:2}};function d(t){return{match:e=>t===e,payout:36}}function p(t){const[e]=Object(n.useState)(new s.c((new Date).getTime())),[a,m]=Object(n.useState)(1e3),[p,g]=Object(n.useState)(!0),[y,b]=Object(n.useState)("waiting"),[E,v]=Object(n.useState)(0),[k,_]=Object(n.useState)(!0);function w(){k||v(Math.floor(37*Math.random()))}function S(n){Object(o.b)(t.p)||(g(!1),_(!1),b("playing"),setTimeout(()=>{let s=Math.floor(37*e.random()),l=r.a.createElement(r.a.Fragment,null),c=0,f=n.match(s);if(f&&Math.random()>.9)for(f=!1;n.match(s);)s=(s+1)%36;f?(c=a*n.payout,l=r.a.createElement(r.a.Fragment,null,"won ",r.a.createElement(i.a,{money:c}))):(c=-a,l=r.a.createElement(r.a.Fragment,null,"lost ",r.a.createElement(i.a,{money:-c}))),Object(o.c)(t.p,c),g(!0),_(!0),b(l),v(s),Object(o.b)(t.p)},1600))}return Object(n.useEffect)(()=>{const t=window.setInterval(w,50);return()=>clearInterval(t)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},function(){if(0===E)return"0";const t=function(t){return[1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36].includes(t)}(E)?"R":"B";return`${E}${t}`}()),r.a.createElement(u.a,{type:"number",onChange:function(t){let e=parseInt(t.currentTarget.value);isNaN(e)&&(e=0),e>1e7&&(e=1e7),e<0&&(e=0),m(e)},placeholder:"Amount to play",disabled:!p}),r.a.createElement(c.a,{variant:"h4"},y),r.a.createElement("table",null,r.a.createElement("tbody",null,r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(3)))},"3")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(6)))},"6")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(9)))},"9")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(12)))},"12")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(15)))},"15")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(18)))},"18")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(21)))},"21")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(24)))},"24")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(27)))},"27")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(30)))},"30")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(33)))},"33")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(36)))},"36"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(2)))},"2")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(5)))},"5")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(8)))},"8")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(11)))},"11")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(14)))},"14")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(17)))},"17")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(20)))},"20")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(23)))},"23")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(26)))},"26")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(29)))},"29")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(32)))},"32")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(35)))},"35"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(1)))},"1")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(4)))},"4")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(7)))},"7")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(10)))},"10")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(13)))},"13")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(16)))},"16")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(19)))},"19")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(22)))},"22")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(25)))},"25")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(28)))},"28")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(31)))},"31")),r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(34)))},"34"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:4},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Third1))},"1 to 12")),r.a.createElement("td",{colSpan:4},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Third2))},"13 to 24")),r.a.createElement("td",{colSpan:4},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Third3))},"25 to 36"))),r.a.createElement("tr",null,r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Red))},"Red")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Black))},"Black")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Odd))},"Odd")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Even))},"Even")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.High))},"High")),r.a.createElement("td",{colSpan:2},r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(h.Low))},"Low"))),r.a.createElement("tr",null,r.a.createElement("td",null,r.a.createElement(f.a,{disabled:!p,onClick:Object(l.a)(()=>S(d(0)))},"0"))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(20),o=a(310),s=a(207),l=a(86),c=a(1),f=a(81),u=a(10);const m=["D","C","$","?","♥","A","C","B","C","E","B","E","C","*","D","♥","B","A","A","A","C","A","D","B","E","?","D","*","@","♥","B","E","?"];function h(t,e){switch(t){case"$":return[20,200,1e3][e];case"@":return[8,80,400][e];case"♥":case"?":return[6,20,150][e];case"D":case"E":return[1,8,30][e];default:return[1,5,20][e]}}const d=[[[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]],[[2,0],[1,1],[0,2],[1,3],[2,4]],[[0,0],[1,1],[2,2],[1,3],[0,4]],[[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]]];function p(t){const[e]=Object(n.useState)(new o.c(t.p.totalPlaytime)),[a,p]=Object(n.useState)([0,0,0,0,0]),[g,y]=Object(n.useState)([0,0,0,0,0]),[b,E]=Object(n.useState)(1e3),[v,k]=Object(n.useState)(!0),[_,w]=Object(n.useState)("waiting");function S(){let e=!1;const n=a.slice();for(let t=0;t=0?n[t]-1:m.length-1,e=!0);p(n),e&&n.every((t,e)=>t===g[e])&&function(e){const a=function(t){const a=[];for(const n of t)a.push(e[n[0]][n[1]]);return a},n=function(t){let e=1;for(let a=1;a0?"gained":"lost"," ",r.a.createElement(i.a,{money:Math.abs(o)}))),k(!0),Object(s.b)(t.p));}(C(n,m))}function C(t,e){return[[e[(t[0]+e.length-1)%e.length],e[(t[1]+e.length-1)%e.length],e[(t[2]+e.length-1)%e.length],e[(t[3]+e.length-1)%e.length],e[(t[4]+e.length-1)%e.length]],[e[t[0]],e[t[1]],e[t[2]],e[t[3]],e[t[4]]],[e[(t[0]+1)%e.length],e[(t[1]+1)%e.length],e[(t[2]+1)%e.length],e[(t[3]+1)%e.length],e[(t[4]+1)%e.length]]]}function x(){y([Math.floor(e.random()*m.length),Math.floor(e.random()*m.length),Math.floor(e.random()*m.length),Math.floor(e.random()*m.length),Math.floor(e.random()*m.length)])}Object(n.useEffect)(()=>{const t=window.setInterval(S,50);return()=>clearInterval(t)});const L=C(a,m);return r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",L[0][0]," | ",L[0][1]," | ",L[0][2]," | ",L[0][3]," | ",L[0][4]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",m[a[0]]," | ",m[a[1]]," | ",m[a[2]]," | ",m[a[3]]," | ",m[a[4]]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | | | | | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | ",m[(a[0]+1)%m.length]," | ",m[(a[1]+1)%m.length]," | ",m[(a[2]+1)%m.length]," | ",m[(a[3]+1)%m.length]," | ",m[(a[4]+1)%m.length]," | |"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"+———————————————————————+"),r.a.createElement(f.a,{type:"number",onChange:function(t){let e=parseInt(t.currentTarget.value);isNaN(e)&&(e=0),e>1e6&&(e=1e6),e<0&&(e=0),E(e)},placeholder:"Amount to play",disabled:!v,InputProps:{endAdornment:r.a.createElement(u.a,{onClick:Object(l.a)((function(){Object(s.b)(t.p)||(w("playing"),Object(s.c)(t.p,-b),v&&(y([-1,-1,-1,-1,-1]),k(!1),setTimeout(x,2e3*e.random()+1e3)))})),disabled:!v},"Spin!")}}),r.a.createElement(c.a,{variant:"h4"},_),r.a.createElement(c.a,null,"Pay lines"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"----- ····· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ----- ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ····· -----"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"··^·· \\···/ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·/·\\· ·\\·/· ·---·"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ··v·· ·····"),r.a.createElement("br",null),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"····· ·---· ·····"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"·---· /···\\ \\···/"),r.a.createElement(c.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"/···\\ ····· ·---·"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return E}));var n=a(0),r=a(149),i=a(11),o=a(218),s=a(9),l=a(30),c=a(1),f=a(10),u=a(51),m=a(113),h=a(137);const d=Object(m.a)(t=>Object(h.a)({location:{color:t.colors.white,whiteSpace:"nowrap",margin:"0px",padding:"0px",cursor:"pointer"}}));function p(t,e){e.name===i.a.TravelAgency?t.toTravel():e.name===i.a.WorldStockExchange?t.toStockMarket():t.toLocation(e)}function g(t){t.types;const e=l.b.Router(),a=d();let r="X";return t.types.includes(u.a.Company)&&(r="C"),t.types.includes(u.a.Gym)&&(r="G"),t.types.includes(u.a.Hospital)&&(r="H"),t.types.includes(u.a.Slums)&&(r="S"),t.types.includes(u.a.StockMarket)&&(r="$"),t.types.includes(u.a.TechVendor)&&(r="T"),t.types.includes(u.a.TravelAgency)&&(r="T"),t.types.includes(u.a.University)&&(r="U"),t.types.includes(u.a.Casino)&&(r="¢"),t.types.includes(u.a.Special)&&(r="?"),t?n.createElement("span",{"aria-label":t.name,key:t.name,className:a.location,onClick:()=>p(e,t)},n.createElement("b",null,r)):n.createElement("span",null,"*")}function y(t){const e=/[A-Z]/g,a={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25},r=n=>{const r=[],i=[];let s;for(;null!==(s=e.exec(n));)i.push(s);if(0===i.length)return r.push(n),r;for(let e=0;en.createElement(n.Fragment,{key:t},n.createElement(f.a,{onClick:()=>p(e,o.a[t])},t),n.createElement("br",null)));return n.createElement(n.Fragment,null,a)}function E(){const t=l.b.Player(),e=r.a[t.city];return n.createElement(n.Fragment,null,n.createElement(c.a,null,e.name),s.a.DisableASCIIArt?n.createElement(b,{city:e}):n.createElement(y,{city:e}))}},,,,,,,,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return h}));var n=a(0),r=a.n(n),i=a(41),o=a(10),s=a(21),l=a(1),c=a(128),f=a(274),u=a(79),m=a(81);function h(t){const[e,a]=Object(n.useState)(t.options.theme),[h,d]=Object(n.useState)(t.options.insertSpaces),[p,g]=Object(n.useState)(t.options.fontSize),[y,b]=Object(n.useState)(t.options.wordWrap),[E,v]=Object(n.useState)(t.options.vim);return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Theme: "),r.a.createElement(c.a,{onChange:t=>a(t.target.value),value:e},r.a.createElement(u.a,{value:"monokai"},"monokai"),r.a.createElement(u.a,{value:"solarized-dark"},"solarized-dark"),r.a.createElement(u.a,{value:"solarized-light"},"solarized-light"),r.a.createElement(u.a,{value:"vs-dark"},"dark"),r.a.createElement(u.a,{value:"light"},"light"),r.a.createElement(u.a,{value:"dracula"},"dracula"),r.a.createElement(u.a,{value:"one-dark"},"one-dark"))),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Use whitespace over tabs: "),r.a.createElement(f.a,{onChange:t=>d(t.target.checked),checked:h})),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Word Wrap: "),r.a.createElement(c.a,{onChange:t=>b(t.target.value),value:y},r.a.createElement(u.a,{value:"off"},"Off"),r.a.createElement(u.a,{value:"on"},"On"),r.a.createElement(u.a,{value:"bounded"},"Bounded"),r.a.createElement(u.a,{value:"wordWrapColumn"},"Word Wrap Column"))),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(l.a,null,"Enable vim mode: "),r.a.createElement(f.a,{onChange:t=>v(t.target.checked),checked:E})),r.a.createElement(s.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(m.a,{type:"number",label:"Font size",value:p,onChange:function(t){const e=parseFloat(t.target.value);isNaN(e)||g(e)}})),r.a.createElement("br",null),r.a.createElement(o.a,{onClick:function(){t.save({theme:e,insertSpaces:h,fontSize:p,wordWrap:y,vim:E}),t.onClose()}},"Save"))}},function(t,e,a){"use strict";async function n(t){t.editor.defineTheme("monokai",{base:"vs-dark",inherit:!0,rules:[{background:"272822",token:""},{foreground:"75715e",token:"comment"},{foreground:"e6db74",token:"string"},{token:"number",foreground:"ae81ff"},{token:"otherkeyvars",foreground:"ae81ff"},{foreground:"ae81ff",token:"function"},{foreground:"f92672",token:"keyword"},{token:"storage.type.function.js",foreground:"ae81ff"},{token:"ns",foreground:"97d92b"},{token:"netscriptfunction",foreground:"53d3e4"},{token:"otherkeywords",foreground:"53d3e4"},{token:"this",foreground:"fd971f"}],colors:{"editor.foreground":"#F8F8F2","editor.background":"#272822","editor.selectionBackground":"#49483E","editor.lineHighlightBackground":"#3E3D32","editorCursor.foreground":"#F8F8F0","editorWhitespace.foreground":"#3B3A32","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),t.editor.defineTheme("solarized-dark",{base:"vs-dark",inherit:!0,rules:[{background:"002b36",token:""},{foreground:"586e75",token:"comment"},{foreground:"00afaf",token:"string"},{token:"number",foreground:"00afaf"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"cb4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#839496","editor.background":"#002b36","editor.selectionBackground":"#073642","editor.lineHighlightBackground":"#073642","editorCursor.foreground":"#819090","editorWhitespace.foreground":"#073642","editorIndentGuide.activeBackground":"#9D550FB0","editor.selectionHighlightBorder":"#222218"}}),t.editor.defineTheme("solarized-light",{base:"vs",inherit:!0,rules:[{foreground:"657b83",background:"fdf6e3",token:""},{foreground:"586e75",token:"comment"},{foreground:"2aa198",token:"string"},{token:"number",foreground:"2aa198"},{token:"otherkeyvars",foreground:"268bd2"},{foreground:"268bd2",token:"function"},{foreground:"859900",token:"keyword"},{token:"storage.type.function.js",foreground:"bc4b16"},{token:"ns",foreground:"cb4b16"},{token:"netscriptfunction",foreground:"268bd2"},{token:"otherkeywords",foreground:"268bd2"},{token:"type.identifier.js",foreground:"b58900"},{token:"delimiter.square.js",foreground:"0087ff"},{token:"delimiter.bracket.js",foreground:"0087ff"},{token:"this",foreground:"cb4b16"}],colors:{"editor.foreground":"#657b83","editor.background":"#fdf6e3","editor.selectionBackground":"#eee8d5","editor.lineHighlightBackground":"#eee8d5","editorCursor.foreground":"#657b83","editorWhitespace.foreground":"#eee8d5","editorIndentGuide.activeBackground":"#eee8d5","editor.selectionHighlightBorder":"#073642"}}),t.editor.defineTheme("dracula",{base:"vs-dark",inherit:!0,rules:[{background:"282A36",foreground:"F8F8F2",token:""},{foreground:"6272A4",token:"comment"},{foreground:"F1FA8C",token:"string"},{token:"number",foreground:"BD93F9"},{token:"otherkeyvars",foreground:"BD93F9"},{foreground:"FF79C6",token:"function"},{foreground:"FF79C6",token:"keyword"},{token:"storage.type.function.js",foreground:"FF79C6"},{token:"ns",foreground:"FFB86C",fontStyle:"italic"},{token:"netscriptfunction",foreground:"FF79C6"},{token:"otherkeywords",foreground:"FF68A7"},{token:"type.identifier.js",foreground:"7EE9FD",fontStyle:"italic"},{token:"delimiter.square.js",foreground:"FFD709"},{token:"delimiter.parenthesis.js",foreground:"FFD709"},{token:"delimiter.bracket.js",foreground:"FFD709"},{token:"this",foreground:"BD93F9",fontStyle:"italic"}],colors:{"editor.foreground":"#F8F8F2","editor.background":"#282A36","editorLineNumber.foreground":"#6272A4","editor.selectionBackground":"#44475A","editor.selectionHighlightBackground":"#424450","editor.foldBackground":"#21222C","editor.wordHighlightBackground":"#8BE9FD50","editor.wordHighlightStrongBackground":"#50FA7B50","editor.findMatchBackground":"#FFB86C80","editor.findMatchHighlightBackground":"#FFFFFF40","editor.findRangeHighlightBackground":"#44475A75","editor.hoverHighlightBackground":"#8BE9FD50","editor.lineHighlightBorder":"#44475A","editor.rangeHighlightBackground":"#BD93F915","editor.snippetTabstopHighlightBackground":"#282A36","editor.snippetTabstopHighlightBorder":"#6272A4","editor.snippetFinalTabstopHighlightBackground":"#282A36","editor.snippetFinalTabstopHighlightBorder":"#50FA7B"}}),t.editor.defineTheme("one-dark",{base:"vs-dark",inherit:!0,rules:[{token:"",background:"333842",foreground:"ABB2BF"},{token:"comment",foreground:"5C6370"},{token:"string",foreground:"98C379"},{token:"number",foreground:"D19A66"},{token:"function",foreground:"C678DD"},{token:"keyword",foreground:"C678DD"},{token:"otherkeyvars",foreground:"D19A66"},{token:"otherkeywords",foreground:"C678DD"},{token:"ns",foreground:"E06C75"},{token:"netscriptfunction",foreground:"61AFEF"},{token:"type.identifier",foreground:"E5C07B"},{token:"delimiter",foreground:"ABB2BF"},{token:"this",foreground:"E06C75"}],colors:{"editor.background":"#282C34","editor.foreground":"#ABB2BF","editor.lineHighlightBackground":"#99BBFF0A","editor.selectionBackground":"#3E4451","editor.findMatchHighlightBackground":"#528BFF3D","editorCursor.foreground":"#528BFF","editorHoverWidget.background":"#21252B","editorHoverWidget.border":"#181A1F","editorIndentGuide.background":"#ABB2BF26","editorIndentGuide.activeBackground":"#626772","editorLineNumber.foreground":"#636D83","editorLineNumber.activeForeground":"#ABB2BF","editorSuggestWidget.background":"#21252B","editorSuggestWidget.border":"#181A1F","editorSuggestWidget.selectedBackground":"#2C313A","editorWhitespace.foreground":"#ABB2BF26","editorWidget.background":"#21252B","editorWidget.border":"#3A3F4B","input.background":"#1B1D23","input.border":"#181A1F","peekView.border":"#528BFF","peekViewResult.background":"#21252B","peekViewResult.selectionBackground":"#2C313A","peekViewTitle.background":"#1B1D23","peekViewEditor.background":"#1B1D23","scrollbarSlider.background":"#4E566680","scrollbarSlider.activeBackground":"#747D9180","scrollbarSlider.hoverBackground":"#5A637580"}})}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";e.a='/**\n * @public\n */\ntype FilenameOrPID = number | string;\n\n/**\n * @public\n */\ninterface Player {\n hacking: number;\n hp: number;\n max_hp: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n hacking_mult: number;\n strength_mult: number;\n defense_mult: number;\n dexterity_mult: number;\n agility_mult: number;\n charisma_mult: number;\n hacking_exp_mult: number;\n strength_exp_mult: number;\n defense_exp_mult: number;\n dexterity_exp_mult: number;\n agility_exp_mult: number;\n charisma_exp_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n numPeopleKilled: number;\n money: number;\n city: string;\n location: string;\n companyName: string;\n crime_money_mult: number;\n crime_success_mult: number;\n isWorking: boolean;\n workType: string;\n currentWorkFactionName: string;\n currentWorkFactionDescription: string;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n workRepGainRate: number;\n workMoneyGainRate: number;\n workMoneyLossRate: number;\n workHackExpGained: number;\n workStrExpGained: number;\n workDefExpGained: number;\n workDexExpGained: number;\n workAgiExpGained: number;\n workChaExpGained: number;\n workRepGained: number;\n workMoneyGained: number;\n createProgramName: string;\n createProgramReqLvl: number;\n className: string;\n crimeType: string;\n work_money_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n hasWseAccount: boolean;\n hasTixApiAccess: boolean;\n has4SData: boolean;\n has4SDataTixApi: boolean;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n bitNodeN: number;\n totalPlaytime: number;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n jobs: any;\n factions: string[];\n tor: boolean;\n hasCorporation: boolean;\n inBladeburner: boolean;\n entropy: number;\n}\n\n/**\n * @public\n */\ninterface RunningScript {\n args: string[];\n filename: string;\n logs: string[];\n offlineExpGained: number;\n offlineMoneyMade: number;\n /** Offline running time of the script, in seconds **/\n offlineRunningTime: number;\n onlineExpGained: number;\n onlineMoneyMade: number;\n /** Online running time of the script, in seconds **/\n onlineRunningTime: number;\n pid: number;\n ramUsage: number;\n server: string;\n threads: number;\n}\n\n/**\n * Data representing the internal values of a crime.\n * @public\n */\nexport interface CrimeStats {\n /** Number representing the difficulty of the crime. Used for success chance calculations */\n difficulty: number;\n /** Amount of karma lost for successfully committing this crime */\n karma: number;\n /** How many people die as a result of this crime */\n kills: number;\n /** How much money is given */\n money: number;\n /** Name of crime */\n name: string;\n /** Milliseconds it takes to attempt the crime */\n time: number;\n /** Description of the crime activity */\n type: string;\n /** hacking level impact on success change of the crime */\n hacking_success_weight: number;\n /** strength level impact on success change of the crime */\n strength_success_weight: number;\n /** defense level impact on success change of the crime */\n defense_success_weight: number;\n /** dexterity level impact on success change of the crime */\n dexterity_success_weight: number;\n /** agility level impact on success change of the crime */\n agility_success_weight: number;\n /** charisma level impact on success change of the crime */\n charisma_success_weight: number;\n /** hacking exp gained from crime */\n hacking_exp: number;\n /** strength exp gained from crime */\n strength_exp: number;\n /** defense exp gained from crime */\n defense_exp: number;\n /** dexterity exp gained from crime */\n dexterity_exp: number;\n /** agility exp gained from crime */\n agility_exp: number;\n /** charisma exp gained from crime */\n charisma_exp: number;\n /** intelligence exp gained from crime */\n intelligence_exp: number;\n}\n\n/**\n * Data representing the internal values of an Augmentation.\n * @public\n */\nexport interface AugmentationStats {\n /** Multiplier to hacking skill */\n hacking_mult?: number;\n /** Multiplier to strength skill */\n strength_mult?: number;\n /** Multiplier to defense skill */\n defense_mult?: number;\n /** Multiplier to dexterity skill */\n dexterity_mult?: number;\n /** Multiplier to agility skill */\n agility_mult?: number;\n /** Multiplier to charisma skill */\n charisma_mult?: number;\n /** Multiplier to hacking experience gain rate */\n hacking_exp_mult?: number;\n /** Multiplier to strength experience gain rate */\n strength_exp_mult?: number;\n /** Multiplier to defense experience gain rate */\n defense_exp_mult?: number;\n /** Multiplier to dexterity experience gain rate */\n dexterity_exp_mult?: number;\n /** Multiplier to agility experience gain rate */\n agility_exp_mult?: number;\n /** Multiplier to charisma experience gain rate */\n charisma_exp_mult?: number;\n /** Multiplier to chance of successfully performing a hack */\n hacking_chance_mult?: number;\n /** Multiplier to hacking speed */\n hacking_speed_mult?: number;\n /** Multiplier to amount of money the player gains from hacking */\n hacking_money_mult?: number;\n /** Multiplier to amount of money injected into servers using grow */\n hacking_grow_mult?: number;\n /** Multiplier to amount of reputation gained when working */\n company_rep_mult?: number;\n /** Multiplier to amount of reputation gained when working */\n faction_rep_mult?: number;\n /** Multiplier to amount of money gained from crimes */\n crime_money_mult?: number;\n /** Multiplier to crime success rate */\n crime_success_mult?: number;\n /** Multiplier to amount of money gained from working */\n work_money_mult?: number;\n /** Multiplier to amount of money produced by Hacknet Nodes */\n hacknet_node_money_mult?: number;\n /** Multiplier to cost of purchasing a Hacknet Node */\n hacknet_node_purchase_cost_mult?: number;\n /** Multiplier to cost of ram for a Hacknet Node */\n hacknet_node_ram_cost_mult?: number;\n /** Multiplier to cost of core for a Hacknet Node */\n hacknet_node_core_cost_mult?: number;\n /** Multiplier to cost of leveling up a Hacknet Node */\n hacknet_node_level_cost_mult?: number;\n /** Multiplier to Bladeburner max stamina */\n bladeburner_max_stamina_mult?: number;\n /** Multiplier to Bladeburner stamina gain rate */\n bladeburner_stamina_gain_mult?: number;\n /** Multiplier to effectiveness in Bladeburner Field Analysis */\n bladeburner_analysis_mult?: number;\n /** Multiplier to success chance in Bladeburner contracts/operations */\n bladeburner_success_chance_mult?: number;\n}\n\n/**\n * Options to affect the behavior of {@link NS.hack | hack}, {@link NS.grow | grow}, and {@link NS.weaken | weaken}.\n * @public\n */\nexport interface BasicHGWOptions {\n /** Number of threads to use for this function. Must be less than or equal to the number of threads the script is running with. */\n threads?: number;\n /** Set to true this action will affect the stock market. */\n stock?: boolean;\n}\n\n/**\n * Options to affect the behavior of {@link CodingContract} attempt.\n * @public\n */\nexport interface CodingAttemptOptions {\n /** If truthy, then the function will return a string that states the contract’s reward when it is successfully solved. */\n returnReward: boolean;\n}\n\n/**\n * Return value of {@link Sleeve.getSleevePurchasableAugs | getSleevePurchasableAugs}\n * @public\n */\nexport interface AugmentPair {\n /** augmentation name */\n name: string;\n /** augmentation cost */\n cost: number;\n}\n\n/**\n * @public\n */\nexport enum PositionTypes {\n Long = "L",\n Short = "S",\n}\n\n/**\n * @public\n */\nexport enum OrderTypes {\n LimitBuy = "Limit Buy Order",\n LimitSell = "Limit Sell Order",\n StopBuy = "Stop Buy Order",\n StopSell = "Stop Sell Order",\n}\n\n/**\n * Value in map of {@link StockOrder}\n * @public\n */\nexport interface StockOrderObject {\n /** Number of shares */\n shares: number;\n /** Price per share */\n price: number;\n /** Order type */\n type: OrderTypes;\n /** Order position */\n position: PositionTypes;\n}\n\n/**\n * Return value of {@link TIX.getOrders | getOrders}\n *\n * Keys are stock symbols, properties are arrays of {@link StockOrderObject}\n * @public\n */\nexport interface StockOrder {\n [key: string]: StockOrderObject[];\n}\n\n/**\n * A single process on a server.\n * @public\n */\nexport interface ProcessInfo {\n /** Script name. */\n filename: string;\n /** Number of threads script is running with */\n threads: number;\n /** Script\'s arguments */\n args: string[];\n /** Process ID */\n pid: number;\n}\n\n/**\n * Hack related multipliers.\n * @public\n */\nexport interface HackingMultipliers {\n /** Player\'s hacking chance multiplier. */\n chance: number;\n /** Player\'s hacking speed multiplier. */\n speed: number;\n /** Player\'s hacking money stolen multiplier. */\n money: number;\n /** Player\'s hacking growth multiplier */\n growth: number;\n}\n\n/**\n * Hacknet related multipliers.\n * @public\n */\nexport interface HacknetMultipliers {\n /** Player\'s hacknet production multiplier */\n production: number;\n /** Player\'s hacknet purchase cost multiplier */\n purchaseCost: number;\n /** Player\'s hacknet ram cost multiplier */\n ramCost: number;\n /** Player\'s hacknet core cost multiplier */\n coreCost: number;\n /** Player\'s hacknet level cost multiplier */\n levelCost: number;\n}\n\n/**\n * Hacknet node related constants\n * @public\n */\nexport interface HacknetNodeConstants {\n /** Amount of money gained per level */\n MoneyGainPerLevel: number;\n /** Base cost for a new node */\n BaseCost: number;\n /** Base cost per level */\n LevelBaseCost: number;\n /** Base cost to incrase RAM */\n RamBaseCost: number;\n /** Base cost to increase cores */\n CoreBaseCost: number;\n /** Multiplier to purchase new node */\n PurchaseNextMult: number;\n /** Multiplier to increase node level */\n UpgradeLevelMult: number;\n /** Multiplier to increase RAM */\n UpgradeRamMult: number;\n /** Multiplier to increase cores */\n UpgradeCoreMult: number;\n /** Max node level */\n MaxLevel: number;\n /** Max amount of RAM in GB */\n MaxRam: number;\n /** Max number of cores */\n MaxCores: number;\n}\n\n/**\n * Hacknet server related constants\n * @public\n */\nexport interface HacknetServerConstants {\n /** Number of hashes calculated per level */\n HashesPerLevel: number;\n /** Base cost for a new server */\n BaseCost: number;\n /** Base cost to increase RAM */\n RamBaseCost: number;\n /** Base cost to increase cores */\n CoreBaseCost: number;\n /** Base cost to upgrade cache */\n CacheBaseCost: number;\n /** Multiplier to purchase a new server */\n PurchaseMult: number;\n /** Multiplier to increase server level */\n UpgradeLevelMult: number;\n /** Multiplier to increase RAM */\n UpgradeRamMult: number;\n /** Multiplier to increase cores */\n UpgradeCoreMult: number;\n /** Multiplier to upgrade cache */\n UpgradeCacheMult: number;\n /** Max number of servers */\n MaxServers: number;\n /** Max level for a server */\n MaxLevel: number;\n /** Max amount of RAM in GB */\n MaxRam: number;\n /** Max number of cores */\n MaxCores: number;\n /** Max cache size */\n MaxCache: number;\n}\n\n/**\n * A single server.\n * @public\n */\nexport interface Server {\n /**\n * How many CPU cores this server has. Maximum of 8.\n * Affects magnitude of grow and weaken.\n */\n cpuCores: number;\n\n /** Flag indicating whether the FTP port is open */\n ftpPortOpen: boolean;\n\n /** Flag indicating whether player has admin/root access to this server */\n hasAdminRights: boolean;\n\n /** Hostname. Must be unique */\n hostname: string;\n\n /** Flag indicating whether HTTP Port is open */\n httpPortOpen: boolean;\n\n /** IP Address. Must be unique */\n ip: string;\n\n /** Flag indicating whether player is currently connected to this server */\n isConnectedTo: boolean;\n\n /** RAM (GB) available on this server */\n maxRam: number;\n\n /**\n * Name of company/faction/etc. that this server belongs to.\n * Optional, not applicable to all Servers\n */\n organizationName: string;\n\n /** RAM (GB) used. i.e. unavailable RAM */\n ramUsed: number;\n\n /** Flag indicating whether SMTP Port is open */\n smtpPortOpen: boolean;\n\n /** Flag indicating whether SQL Port is open */\n sqlPortOpen: boolean;\n\n /** Flag indicating whether the SSH Port is open */\n sshPortOpen: boolean;\n\n /** Flag indicating whether this is a purchased server */\n purchasedByPlayer: boolean;\n\n /** Flag indicating whether this server has a backdoor installed by a player */\n backdoorInstalled: boolean;\n\n /**\n * Initial server security level\n * (i.e. security level when the server was created)\n */\n baseDifficulty: number;\n\n /** Server Security Level */\n hackDifficulty: number;\n\n /** Minimum server security level that this server can be weakened to */\n minDifficulty: number;\n\n /** How much money currently resides on the server and can be hacked */\n moneyAvailable: number;\n\n /** Maximum amount of money that this server can hold */\n moneyMax: number;\n\n /** Number of open ports required in order to gain admin/root access */\n numOpenPortsRequired: number;\n\n /** How many ports are currently opened on the server */\n openPortCount: number;\n\n /** Hacking level required to hack this server */\n requiredHackingSkill: number;\n\n /**\n * Parameter that affects how effectively this server\'s money can\n * be increased using the grow() Netscript function\n */\n serverGrowth: number;\n}\n\n/**\n * All multipliers affecting the difficulty of the current challenge.\n * @public\n */\nexport interface BitNodeMultipliers {\n /** Influences how quickly the player\'s agility level (not exp) scales */\n AgilityLevelMultiplier: number;\n /** Influences the base cost to purchase an augmentation. */\n AugmentationMoneyCost: number;\n /** Influences the base rep the player must have with a faction to purchase an augmentation. */\n AugmentationRepCost: number;\n /** Influences how quickly the player can gain rank within Bladeburner. */\n BladeburnerRank: number;\n /** Influences the cost of skill levels from Bladeburner. */\n BladeburnerSkillCost: number;\n /** Influences how quickly the player\'s charisma level (not exp) scales */\n CharismaLevelMultiplier: number;\n /** Influences the experience gained for each ability when a player completes a class. */\n ClassGymExpGain: number;\n /** Influences the amount of money gained from completing Coding Contracts */\n CodingContractMoney: number;\n /** Influences the experience gained for each ability when the player completes working their job. */\n CompanyWorkExpGain: number;\n /** Influences how much money the player earns when completing working their job. */\n CompanyWorkMoney: number;\n /** Influences the money gain from dividends of corporations created by the player. */\n CorporationSoftCap: number;\n /** Influences the valuation of corporations created by the player. */\n CorporationValuation: number;\n /** Influences the base experience gained for each ability when the player commits a crime. */\n CrimeExpGain: number;\n /** Influences the base money gained when the player commits a crime. */\n CrimeMoney: number;\n /** Influences how many Augmentations you need in order to get invited to the Daedalus faction */\n DaedalusAugsRequirement: number;\n /** Influences how quickly the player\'s defense level (not exp) scales */\n DefenseLevelMultiplier: number;\n /** Influences how quickly the player\'s dexterity level (not exp) scales */\n DexterityLevelMultiplier: number;\n /** Influences how much rep the player gains in each faction simply by being a member. */\n FactionPassiveRepGain: number;\n /** Influences the experience gained for each ability when the player completes work for a Faction. */\n FactionWorkExpGain: number;\n /** Influences how much rep the player gains when performing work for a faction. */\n FactionWorkRepGain: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data API */\n FourSigmaMarketDataApiCost: number;\n /** Influences how much it costs to unlock the stock market\'s 4S Market Data (NOT API) */\n FourSigmaMarketDataCost: number;\n /** Influences the respect gain and money gain of your gang. */\n GangSoftcap: number;\n /** Influences the experienced gained when hacking a server. */\n HackExpGain: number;\n /** Influences how quickly the player\'s hacking level (not experience) scales */\n HackingLevelMultiplier: number;\n /** Influences how much money is produced by Hacknet Nodes and the hash rate of Hacknet Servers (unlocked in BitNode-9) */\n HacknetNodeMoney: number;\n /** Influences how much money it costs to upgrade your home computer\'s RAM */\n HomeComputerRamCost: number;\n /** Influences how much money is gained when the player infiltrates a company. */\n InfiltrationMoney: number;\n /** Influences how much rep the player can gain from factions when selling stolen documents and secrets */\n InfiltrationRep: number;\n /** Influences how much money can be stolen from a server when the player performs a hack against it through the Terminal. */\n ManualHackMoney: number;\n /** Influence how much it costs to purchase a server */\n PurchasedServerCost: number;\n /** Influences the maximum number of purchased servers you can have */\n PurchasedServerLimit: number;\n /** Influences the maximum allowed RAM for a purchased server */\n PurchasedServerMaxRam: number;\n /** Influences cost of any purchased server at or above 128GB */\n PurchasedServerSoftcap: number;\n /** Influences the minimum favor the player must have with a faction before they can donate to gain rep. */\n RepToDonateToFaction: number;\n /** Influences how much the money on a server can be reduced when a script performs a hack against it. */\n ScriptHackMoney: number;\n /** Influences how much of the money stolen by a scripted hack will be added to the player\'s money. */\n ScriptHackMoneyGain: number;\n /** Influences the growth percentage per cycle against a server. */\n ServerGrowthRate: number;\n /** Influences the maximum money that a server can grow to. */\n ServerMaxMoney: number;\n /** Influences the initial money that a server starts with. */\n ServerStartingMoney: number;\n /** Influences the initial security level (hackDifficulty) of a server. */\n ServerStartingSecurity: number;\n /** Influences the weaken amount per invocation against a server. */\n ServerWeakenRate: number;\n /** Influences how quickly the player\'s strength level (not exp) scales */\n StrengthLevelMultiplier: number;\n /** Influences the power of the gift */\n StaneksGiftPowerMultiplier: number;\n /** Influences the size of the gift */\n StaneksGiftExtraSize: number;\n /** Influences the hacking skill required to backdoor the world daemon. */\n WorldDaemonDifficulty: number;\n}\n\n/**\n * Object representing all the values related to a hacknet node.\n * @public\n */\nexport interface NodeStats {\n /** Node\'s name */\n name: string;\n /** Node\'s level */\n level: number;\n /** Node\'s RAM (GB) */\n ram: number;\n /** Node\'s used RAM (GB) */\n ramUsed: number;\n /** Node\'s number of cores */\n cores: number;\n /** Cache level. Only applicable for Hacknet Servers */\n cache: number;\n /** Hash Capacity provided by this Node. Only applicable for Hacknet Servers */\n hashCapacity: number;\n /** Node\'s production per second */\n production: number;\n /** Number of seconds since Node has been purchased */\n timeOnline: number;\n /** Total number of money Node has produced */\n totalProduction: number;\n}\n\n/**\n * Short summary of the players skills.\n * @public\n */\nexport interface PlayerSkills {\n /** Hacking level */\n hacking: number;\n /** Strength level */\n strength: number;\n /** Defense level */\n defense: number;\n /** Dexterity level */\n dexterity: number;\n /** Agility level */\n agility: number;\n /** Charisma level */\n charisma: number;\n /** Intelligence level */\n intelligence: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterMult {\n /** Agility stat */\n agility: number;\n /** Agility exp */\n agilityExp: number;\n /** Charisma stat */\n charisma: number;\n /** Charisma exp */\n charismaExp: number;\n /** Company reputation */\n companyRep: number;\n /** Money earned from crimes */\n crimeMoney: number;\n /** Crime success chance */\n crimeSuccess: number;\n /** Defense stat */\n defense: number;\n /** Defense exp */\n defenseExp: number;\n /** Dexterity stat */\n dexterity: number;\n /** Dexterity exp */\n dexterityExp: number;\n /** Faction reputation */\n factionRep: number;\n /** Hacking stat */\n hacking: number;\n /** Hacking exp */\n hackingExp: number;\n /** Strength stat */\n strength: number;\n /** Strength exp */\n strengthExp: number;\n /** Money earned from jobs */\n workMoney: number;\n}\n\n/**\n * @public\n */\nexport interface CharacterInfo {\n /** Current BitNode number */\n bitnode: number;\n /** Name of city you are currently in */\n city: string;\n /** Array of factions you are currently a member of */\n factions: string[];\n /** Current health points */\n hp: number;\n /** Array of all jobs */\n jobs: string[];\n /** Array of job positions for all companies you are employed at. Same order as \'jobs\' */\n jobTitles: string[];\n /** Maximum health points */\n maxHp: number;\n /** Boolean indicating whether or not you have a tor router */\n tor: boolean;\n /** Object with many of the player\'s multipliers from Augmentations/Source Files */\n mult: CharacterMult;\n /** Timed worked in ms */\n timeWorked: number;\n /** Hacking experience earned so far from work */\n workHackExpGain: number;\n /** Str experience earned so far from work */\n workStrExpGain: number;\n /** Def experience earned so far from work */\n workDefExpGain: number;\n /** Dex experience earned so far from work */\n workDexExpGain: number;\n /** Agi experience earned so far from work */\n workAgiExpGain: number;\n /** Cha experience earned so far from work */\n workChaExpGain: number;\n /** Reputation earned so far from work, if applicable */\n workRepGain: number;\n /** Money earned so far from work, if applicable */\n workMoneyGain: number;\n /** total hacking exp */\n hackingExp: number;\n /** total strength exp */\n strengthExp: number;\n /** total defense exp */\n defenseExp: number;\n /** total dexterity exp */\n dexterityExp: number;\n /** total agility exp */\n agilityExp: number;\n /** total charisma exp */\n charismaExp: number;\n}\n\n/**\n * @public\n */\nexport interface SleeveWorkGains {\n /** Hacking exp gained from work */\n workHackExpGain: number;\n /** Strength exp gained from work */\n workStrExpGain: number;\n /** Defense exp gained from work, */\n workDefExpGain: number;\n /** Dexterity exp gained from work */\n workDexExpGain: number;\n /** Agility exp gained from work */\n workAgiExpGain: number;\n /** Charisma exp gained from work */\n workChaExpGain: number;\n /** Money gained from work */\n workMoneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface SourceFileLvl {\n /** The number of the source file */\n n: number;\n /** The level of the source file */\n lvl: number;\n}\n\n/**\n * Bladeburner current action.\n * @public\n */\nexport interface BladeburnerCurAction {\n /** Type of Action */\n type: string;\n /** Name of Action */\n name: string;\n}\n\n/**\n * Gang general info.\n * @public\n */\nexport interface GangGenInfo {\n /** Name of faction that the gang belongs to ("Slum Snakes", etc.) */\n faction: string;\n /** Indicating whether or not it\'s a hacking gang */\n isHacking: boolean;\n /** Money earned per game cycle */\n moneyGainRate: number;\n /** Gang\'s power for territory warfare */\n power: number;\n /** Gang\'s respect */\n respect: number;\n /** Respect earned per game cycle */\n respectGainRate: number;\n /** Amount of territory held */\n territory: number;\n /** Clash chance */\n territoryClashChance: number;\n /** Gang\'s wanted level */\n wantedLevel: number;\n /** Wanted level gained/lost per game cycle (negative for losses) */\n wantedLevelGainRate: number;\n /** Indicating if territory warfare is enabled */\n territoryWarfareEngaged: boolean;\n /** Number indicating the current wanted penalty */\n wantedPenalty: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfoObject {\n /** Gang power */\n power: number;\n /** Gang territory, in decimal form */\n territory: number;\n}\n\n/**\n * @public\n */\nexport interface GangOtherInfo {\n "Slum Snakes": GangOtherInfoObject;\n Tetrads: GangOtherInfoObject;\n "The Syndicate": GangOtherInfoObject;\n "The Dark Army": GangOtherInfoObject;\n "Speakers for the Dead": GangOtherInfoObject;\n NiteSec: GangOtherInfoObject;\n "The Black Hand": GangOtherInfoObject;\n}\n\n/**\n * Object representing data representing a gang member task.\n * @public\n */\nexport interface GangTaskStats {\n /** Task name */\n name: string;\n /** Task Description */\n desc: string;\n /** Is a task of a hacking gang */\n isHacking: boolean;\n /** Is a task of a combat gang */\n isCombat: boolean;\n /** Base respect earned */\n baseRespect: number;\n /** Base wanted earned */\n baseWanted: number;\n /** Base money earned */\n baseMoney: number;\n /** Hacking skill impact on task scaling */\n hackWeight: number;\n /** Strength skill impact on task scaling */\n strWeight: number;\n /** Defense skill impact on task scaling */\n defWeight: number;\n /** Dexterity skill impact on task scaling */\n dexWeight: number;\n /** Agility skill impact on task scaling */\n agiWeight: number;\n /** Charisma skill impact on task scaling */\n chaWeight: number;\n /** Number representing the difficulty of the task */\n difficulty: number;\n /** Territory impact on task scaling */\n territory: GangTerritory;\n}\n\n/**\n * Object representing data representing a gang member equipment.\n * @public\n */\nexport interface EquipmentStats {\n /** Strength multiplier */\n str?: number;\n /** Defense multiplier */\n def?: number;\n /** Dexterity multiplier */\n dex?: number;\n /** Agility multiplier */\n agi?: number;\n /** Charisma multiplier */\n cha?: number;\n /** Hacking multiplier */\n hack?: number;\n}\n\n/**\n * @public\n */\nexport interface GangTerritory {\n /** Money gain impact on task scaling */\n money: number;\n /** Respect gain impact on task scaling */\n respect: number;\n /** Wanted gain impact on task scaling */\n wanted: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberInfo {\n /** Name of the gang member */\n name: string;\n /** Currently assigned task */\n task: string;\n earnedRespect: number;\n\n /** Hack skill level */\n hack: number;\n /** Strength skill level */\n str: number;\n /** Defense skill level */\n def: number;\n /** Dexterity skill level */\n dex: number;\n /** Agility skill level */\n agi: number;\n /** Charisma skill level */\n cha: number;\n\n /** Current hack experience */\n hack_exp: number;\n /** Current strength experience */\n str_exp: number;\n /** Current defense experience */\n def_exp: number;\n /** Current dexterity experience */\n dex_exp: number;\n /** Current agility experience */\n agi_exp: number;\n /** Current charisma experience */\n cha_exp: number;\n\n /** Hack multiplier from equipment */\n hack_mult: number;\n /** Strength multiplier from equipment */\n str_mult: number;\n /** Defense multiplier from equipment */\n def_mult: number;\n /** Dexterity multiplier from equipment */\n dex_mult: number;\n /** Agility multiplier from equipment */\n agi_mult: number;\n /** Charisma multiplier from equipment */\n cha_mult: number;\n\n /** Hack multiplier from ascensions */\n hack_asc_mult: number;\n /** Strength multiplier from ascensions */\n str_asc_mult: number;\n /** Defense multiplier from ascensions */\n def_asc_mult: number;\n /** Dexterity multiplier from ascensions */\n dex_asc_mult: number;\n /** Agility multiplier from ascensions */\n agi_asc_mult: number;\n /** Charisma multiplier from ascensions */\n cha_asc_mult: number;\n\n /** Total earned hack experience */\n hack_asc_points: number;\n /** Total earned strength experience */\n str_asc_points: number;\n /** Total earned defense experience */\n def_asc_points: number;\n /** Total earned dexterity experience */\n dex_asc_points: number;\n /** Total earned agility experience */\n agi_asc_points: number;\n /** Total earned charisma experience */\n cha_asc_points: number;\n\n upgrades: string[];\n augmentations: string[];\n\n respectGain: number;\n wantedLevelGain: number;\n moneyGain: number;\n}\n\n/**\n * @public\n */\nexport interface GangMemberAscension {\n /** Amount of respect lost from ascending */\n respect: number;\n /** Hacking multiplier gained from ascending */\n hack: number;\n /** Strength multiplier gained from ascending */\n str: number;\n /** Defense multiplier gained from ascending */\n def: number;\n /** Dexterity multiplier gained from ascending */\n dex: number;\n /** Agility multiplier gained from ascending */\n agi: number;\n /** Charisma multiplier gained from ascending */\n cha: number;\n}\n\n/**\n * Object representing a sleeve stats.\n * @public\n */\nexport interface SleeveSkills {\n /** Current shock of the sleeve [0-100] */\n shock: number;\n /** Current sync of the sleeve [0-100] */\n sync: number;\n /** Current hacking skill of the sleeve */\n hacking: number;\n /** Current strength of the sleeve */\n strength: number;\n /** Current defense of the sleeve */\n defense: number;\n /** Current dexterity of the sleeve */\n dexterity: number;\n /** Current agility of the sleeve */\n agility: number;\n /** Current charisma of the sleeve */\n charisma: number;\n}\n\n/**\n * Object representing sleeve information.\n * @public\n */\nexport interface SleeveInformation {\n /** Location of the sleeve */\n city: string;\n /** Current hp of the sleeve */\n hp: number;\n /** Max hp of the sleeve */\n maxHp: number;\n /** Jobs available to the sleeve */\n jobs: string[];\n /** Job titles available to the sleeve */\n jobTitle: string[];\n /** Does this sleeve have access to the tor router */\n tor: boolean;\n /** Sleeve multipliers */\n mult: CharacterMult;\n /** Time spent on the current task in milliseconds */\n timeWorked: number;\n /** Earnings synchronized to other sleeves */\n earningsForSleeves: SleeveWorkGains;\n /** Earnings synchronized to the player */\n earningsForPlayer: SleeveWorkGains;\n /** Earnings for this sleeve */\n earningsForTask: SleeveWorkGains;\n /** Faction or company reputation gained for the current task */\n workRepGain: number;\n}\n\n/**\n * Object representing a sleeve current task.\n * @public\n */\nexport interface SleeveTask {\n /** Task type */\n task: string;\n /** Crime currently attempting, if any */\n crime: string;\n /** Location of the task, if any */\n location: string;\n /** Stat being trained at the gym, if any */\n gymStatType: string;\n /** Faction work type being performed, if any */\n factionWorkType: string;\n}\n\n/**\n * Object representing a port. A port is a serialized queue.\n * @public\n */\nexport interface NetscriptPort {\n /**\n * Write data to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns The data popped off the queue if it was full.\n */\n write(value: string | number): null | string | number;\n\n /**\n * Attempt to write data to the port.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns True if the data was added to the port, false if the port was full\n */\n tryWrite(value: string | number): boolean;\n\n /**\n * Shift an element out of the port.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function will remove the first element from the port and return it.\n * If the port is empty, then the string “NULL PORT DATA” will be returned.\n * @returns the data read.\n */\n read(): string | number;\n\n /**\n * Retrieve the first element from the port without removing it.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to peek at the data from a port. It returns the\n * first element in the specified port without removing that element. If\n * the port is empty, the string “NULL PORT DATA” will be returned.\n * @returns the data read\n */\n peek(): string | number;\n\n /**\n * Check if the port is full.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns true if the port is full, otherwise false\n */\n full(): boolean;\n\n /**\n * Check if the port is empty.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns true if the port is empty, otherwise false\n */\n empty(): boolean;\n\n /**\n * Empties all data from the port.\n * @remarks\n * RAM cost: 0 GB\n */\n clear(): void;\n}\n\n/**\n * Stock market API\n * @public\n */\nexport interface TIX {\n /**\n * Returns an array of the symbols of the tradable stocks\n *\n * @remarks RAM cost: 2 GB\n * @returns Array of the symbols of the tradable stocks.\n */\n getSymbols(): string[];\n\n /**\n * Returns the price of a stock\n *\n * @remarks\n * RAM cost: 2 GB\n * The stock’s price is the average of its bid and ask price.\n *\n * @example\n * ```ts\n * // NS1\n * stock.getPrice("FISG");\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.stock.getPrice("FISG");\n * ```\n * @param sym - Stock symbol.\n * @returns The price of a stock.\n */\n getPrice(sym: string): number;\n\n /**\n * Returns the ask price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The ask price of a stock.\n */\n getAskPrice(sym: string): number;\n\n /**\n * Returns the bid price of that stock.\n * @remarks RAM cost: 2 GB\n *\n * @param sym - Stock symbol.\n * @returns The bid price of a stock.\n */\n getBidPrice(sym: string): number;\n\n /**\n * Returns the player’s position in a stock.\n * @remarks\n * RAM cost: 2 GB\n * Returns an array of four elements that represents the player’s position in a stock.\n *\n * The first element is the returned array is the number of shares the player owns of\n * the stock in the Long position. The second element in the array is the average price\n * of the player’s shares in the Long position.\n *\n * The third element in the array is the number of shares the player owns of the stock\n * in the Short position. The fourth element in the array is the average price of the\n * player’s Short position.\n *\n * All elements in the returned array are numeric.\n *\n * @example\n * ```ts\n * // NS1\n * var pos = stock.getPosition("ECP");\n * var shares = pos[0];\n * var avgPx = pos[1];\n * var sharesShort = pos[2];\n * var avgPxShort = pos[3];\n * ```\n * @example\n * ```ts\n * // NS2\n * const [shares, avgPx, sharesShort, avgPxShort] = ns.stock.getPosition("ECP");\n * ```\n * @param sym - Stock symbol.\n * @returns Array of four elements that represents the player’s position in a stock.\n */\n getPosition(sym: string): [number, number, number, number];\n\n /**\n * Returns the maximum number of shares of a stock.\n * @remarks\n * RAM cost: 2 GB\n * This is the maximum amount of the stock that can be purchased\n * in both the Long and Short positions combined.\n *\n * @param sym - Stock symbol.\n * @returns Maximum number of shares that the stock has.\n */\n getMaxShares(sym: string): number;\n\n /**\n * Calculates cost of buying stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much it would cost to buy a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchase.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Cost to buy a given number of shares of a stock.\n */\n getPurchaseCost(sym: string, shares: number, posType: string): number;\n\n /**\n * Calculate profit of selling stocks.\n * @remarks\n * RAM cost: 2 GB\n * Calculates and returns how much you would gain from selling a given number of shares of a stock.\n * This takes into account spread, large transactions influencing the price of the stock and commission fees.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell.\n * @param posType - Specifies whether the order is a “Long” or “Short” position.\n * @returns Gain from selling a given number of shares of a stock.\n */\n getSaleGain(sym: string, shares: number, posType: string): number;\n\n /**\n * Buy stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase shares of a stock using a Market Order.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If this function successfully purchases the shares, it will return the stock price at which\n * each share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to purchased. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n buy(sym: string, shares: number): number;\n\n /**\n * Sell stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell shares of a stock using a Market Order.\n *\n * If the specified number of shares in the function exceeds the amount that the player\n * actually owns, then this function will sell all owned shares. Remember that every\n * transaction on the stock exchange costs a certain commission fee.\n *\n * The net profit made from selling stocks with this function is reflected in the script’s\n * statistics. This net profit is calculated as:\n *\n * shares * (sell_price - average_price_of_purchased_shares)\n *\n * If the sale is successful, this function will return the stock price at\n * which each share was sold. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sell(sym: string, shares: number): number;\n\n /**\n * Short stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to purchase a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the player does not have enough money to purchase the specified number of shares,\n * then no shares will be purchased. Remember that every transaction on the stock exchange\n * costs a certain commission fee.\n *\n * If the purchase is successful, this function will return the stock price at which each\n * share was purchased. Otherwise, it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to short. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was purchased, otherwise 0 if the shares weren\'t purchased.\n */\n short(sym: string, shares: number): number;\n\n /**\n * Sell short stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Attempts to sell a short position of a stock using a Market Order.\n *\n * The ability to short a stock is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * If the specified number of shares exceeds the amount that the player actually owns,\n * then this function will sell all owned shares. Remember that every transaction on\n * the stock exchange costs a certain commission fee.\n *\n * If the sale is successful, this function will return the stock price at which each\n * share was sold. Otherwise it will return 0.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares to sell. Must be positive. Will be rounded to nearest integer.\n * @returns The stock price at which each share was sold, otherwise 0 if the shares weren\'t sold.\n */\n sellShort(sym: string, shares: number): number;\n\n /**\n * Place order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Places an order on the stock market. This function only works for Limit and Stop Orders.\n *\n * The ability to place limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * Returns true if the order is successfully placed, and false otherwise.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n * @returns True if the order is successfully placed, and false otherwise.\n */\n placeOrder(sym: string, shares: number, price: number, type: string, pos: string): boolean;\n\n /**\n * Cancel order for stocks.\n * @remarks\n * RAM cost: 2.5 GB\n * Cancels an oustanding Limit or Stop order on the stock market.\n *\n * The ability to use limit and stop orders is **not** immediately available to the player and\n * must be unlocked later on in the game.\n *\n * @param sym - Stock symbol.\n * @param shares - Number of shares for order. Must be positive. Will be rounded to nearest integer.\n * @param price - Execution price for the order.\n * @param type - Type of order.\n * @param pos - Specifies whether the order is a “Long” or “Short” position.\n */\n cancelOrder(sym: string, shares: number, price: number, type: string, pos: string): void;\n\n /**\n * Returns your order book for the stock market.\n * @remarks\n * RAM cost: 2.5 GB\n * This is an object containing information for all the Limit and Stop Orders you have in the stock market.\n * For each symbol you have a position in, the returned object will have a key with that symbol\'s name.\n * The object\'s properties are each an array of {@link StockOrderObject}\n * The object has the following structure:\n *\n * ```ts\n * {\n * string1: [ // Array of orders for this stock\n * {\n * shares: Order quantity\n * price: Order price\n * type: Order type\n * position: Either "L" or "S" for Long or Short position\n * },\n * {\n * ...\n * },\n * ...\n * ],\n * string2: [ // Array of orders for this stock\n * ...\n * ],\n * ...\n * }\n * ```\n * The “Order type” property can have one of the following four values: "Limit Buy Order", "Limit Sell Order", "Stop Buy Order", "Stop Sell Order".\n * Note that the order book will only contain information for stocks that you actually have orders in.\n *\n * @example\n * ```ts\n * "If you do not have orders in Nova Medical (NVMD), then the returned object will not have a “NVMD” property."\n * {\n * ECP: [\n * {\n * shares: 5,\n * price: 100,000\n * type: "Stop Buy Order",\n * position: "S",\n * },\n * {\n * shares: 25,\n * price: 125,000\n * type: "Limit Sell Order",\n * position: "L",\n * },\n * ],\n * SYSC: [\n * {\n * shares: 100,\n * price: 10,000\n * type: "Limit Buy Order",\n * position: "L",\n * },\n * ],\n * }\n * ```\n * @returns Object containing information for all the Limit and Stop Orders you have in the stock market.\n */\n getOrders(): StockOrder;\n\n /**\n * Returns the volatility of the specified stock.\n * @remarks\n * RAM cost: 2.5 GB\n * Volatility represents the maximum percentage by which a stock’s price can change every tick.\n * The volatility is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a volatility of 3%, then this function will return 0.03, NOT 3).\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Volatility of the specified stock.\n */\n getVolatility(sym: string): number;\n\n /**\n * Returns the probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n * @remarks\n * RAM cost: 2.5 GB\n * The probability is returned as a decimal value, NOT a percentage\n * (e.g. if a stock has a 60% chance of increasing, then this function will return 0.6, NOT 60).\n *\n * In other words, if this function returned 0.30 for a stock, then this means that the stock’s price has a\n * 30% chance of increasing and a 70% chance of decreasing during the next tick.\n *\n * In order to use this function, you must first purchase access to the Four Sigma (4S) Market Data TIX API.\n *\n * @param sym - Stock symbol.\n * @returns Probability that the specified stock’s price will increase (as opposed to decrease) during the next tick.\n */\n getForecast(sym: string): number;\n\n /**\n * Purchase 4S Market Data Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketData(): boolean;\n\n /**\n * Purchase 4S Market Data TIX API Access.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchase4SMarketDataTixApi(): boolean;\n\n /**\n * Purchase WSE Account.\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchaseWseAccount(): boolean;\n\n /**\n * Purchase TIX API Access\n * @remarks RAM cost: 2.5 GB\n * @returns True if you successfully purchased it or if you already have access, false otherwise.\n */\n purchaseTixApi(): boolean;\n}\n\n/**\n * Singularity API\n * @remarks\n * This API requires Source-File 4 to use. The RAM cost of all these functions is multiplied by 16/4/1 based on Source-File 4 levels.\n * @public\n */\nexport interface Singularity {\n /**\n * Take university class.\n *\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function will automatically set you to start taking a course at a university.\n * If you are already in the middle of some “working” action (such as working at a\n * company, for a faction, or on a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these universities and classes are the same as\n * if you were to manually visit and take these classes.\n *\n * @param universityName - Name of university. You must be in the correct city for whatever university you specify.\n * @param courseName - Name of course.\n * @param focus - Acquire player focus on this class. Optional. Defaults to true.\n * @returns True if actions is successfully started, false otherwise.\n */\n universityCourse(universityName: string, courseName: string, focus?: boolean): boolean;\n\n /**\n * Workout at the gym.\n *\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n\n * This function will automatically set you to start working out at a gym to train\n * a particular stat. If you are already in the middle of some “working” action\n * (such as working at a company, for a faction, or on a program), then running\n * this function will automatically cancel that action and give you your earnings.\n *\n * The cost and experience gains for all of these gyms are the same as if you were\n * to manually visit these gyms and train\n *\n * @param gymName - Name of gym. You must be in the correct city for whatever gym you specify.\n * @param stat - The stat you want to train.\n * @param focus - Acquire player focus on this gym workout. Optional. Defaults to true.\n * @returns True if actions is successfully started, false otherwise.\n */\n gymWorkout(gymName: string, stat: string, focus?: boolean): boolean;\n\n /**\n * Travel to another city.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function allows the player to travel to any city. The cost for using this\n * function is the same as the cost for traveling through the Travel Agency.\n *\n * @param city - City to travel to.\n * @returns True if actions is successful, false otherwise.\n */\n travelToCity(city: string): boolean;\n\n /**\n * Purchase the TOR router.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function allows you to automatically purchase a TOR router. The cost for\n * purchasing a TOR router using this function is the same as if you were to\n * manually purchase one.\n *\n * @returns True if actions is successful or you already own TOR router, false otherwise.\n */\n purchaseTor(): boolean;\n\n /**\n * Purchase a program from the dark web.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * This function allows you to automatically purchase programs. You MUST have a\n * TOR router in order to use this function. The cost of purchasing programs\n * using this function is the same as if you were purchasing them through the Dark\n * Web using the Terminal buy command.\n *\n * @example\n * ```ts\n * // NS1\n * purchaseProgram("brutessh.exe");\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.purchaseProgram("brutessh.exe");\n * ```\n * @param programName - Name of program to purchase.\n * @returns True if the specified program is purchased, and false otherwise.\n */\n purchaseProgram(programName: string): boolean;\n\n /**\n * Check if the player is busy.\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * Returns a boolean indicating whether or not the player is currently performing an\n * ‘action’. These actions include working for a company/faction, studying at a university,\n * working out at a gym, creating a program, committing a crime, or carrying out a Hacking Mission.\n *\n * @returns True if the player is currently performing an ‘action’, false otherwise.\n */\n isBusy(): boolean;\n\n /**\n * Stop the current action.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function is used to end whatever ‘action’ the player is currently performing.\n * The player will receive whatever money/experience/etc. he has earned from that action.\n *\n * The actions that can be stopped with this function are:\n *\n * * Studying at a university\n * * Working out at a gym\n * * Working for a company/faction\n * * Creating a program\n * * Committing a crime\n *\n * This function will return true if the player’s action was ended.\n * It will return false if the player was not performing an action when this function was called.\n *\n * @returns True if the player’s action was ended, false if the player was not performing an action.\n */\n stopAction(): boolean;\n\n /**\n * Upgrade home computer RAM.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will upgrade amount of RAM on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer RAM is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer RAM is successfully upgraded, and false otherwise.\n */\n upgradeHomeRam(): boolean;\n\n /**\n * Upgrade home computer cores.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will upgrade amount of cores on the player’s home computer. The cost is\n * the same as if you were to do it manually.\n *\n * This function will return true if the player’s home computer cores is successfully upgraded, and false otherwise.\n *\n * @returns True if the player’s home computer cores is successfully upgraded, and false otherwise.\n */\n upgradeHomeCores(): boolean;\n\n /**\n * Get the price of upgrading home RAM.\n * @remarks\n * RAM cost: 1.5 GB * 16/4/1\n *\n *\n * Returns the cost of upgrading the player’s home computer RAM.\n *\n * @returns Cost of upgrading the player’s home computer RAM.\n */\n getUpgradeHomeRamCost(): number;\n\n /**\n * Get the price of upgrading home cores.\n * @remarks\n * RAM cost: 1.5 GB * 16/4/1\n *\n *\n * Returns the cost of upgrading the player’s home computer cores.\n *\n * @returns Cost of upgrading the player’s home computer cores.\n */\n getUpgradeHomeCoresCost(): number;\n\n /**\n * Work for a company.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically set you to start working at the company\n * at which you are employed. If you are already in the middle of some “working”\n * action (such as working for a faction, training at a gym, or creating a program),\n * then running this function will automatically cancel that action and give you\n * your earnings.\n *\n * This function will return true if the player starts working, and false otherwise.\n *\n * Note that when you are working for a company, you will not actually receive your earnings (reputation, money, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * // NS1:\n * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getCompanyRep(COMPANY HERE) < VALUE) {\n * workForCompany();\n * sleep(60000);\n * }\n * //This way, your company reputation will be updated every minute.\n * ```\n * @example\n * ```ts\n * // NS2:\n * //If you only want to work until you get 100,000 company reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (ns.getCompanyRep(COMPANY HERE) < VALUE) {\n * ns.workForCompany();\n * await ns.sleep(60000);\n * }\n * //This way, your company reputation will be updated every minute.\n * ```\n * @param companyName - Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked\n * @param focus - Acquire player focus on this work operation. Optional. Defaults to true.\n * @returns True if the player starts working, and false otherwise.\n */\n workForCompany(companyName?: string, focus?: boolean): boolean;\n\n /**\n * Apply for a job at a company.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically try to apply to the specified company\n * for a position in the specified field. This function can also be used to\n * apply for promotions by specifying the company and field you are already\n * employed at.\n *\n * This function will return true if you successfully get a job/promotion,\n * and false otherwise. Note that if you are trying to use this function to\n * apply for a promotion and you don’t get one, it will return false.\n *\n * @param companyName - Name of company to apply to.\n * @param field - Field to which you want to apply.\n * @returns True if the player successfully get a job/promotion, and false otherwise.\n */\n applyToCompany(companyName: string, field: string): boolean;\n\n /**\n * Get company reputation.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function will return the amount of reputation you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of reputation you have at the specified company.\n */\n getCompanyRep(companyName: string): number;\n\n /**\n * Get company favor.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function will return the amount of favor you have at the specified company.\n * If the company passed in as an argument is invalid, -1 will be returned.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you have at the specified company.\n */\n getCompanyFavor(companyName: string): number;\n\n /**\n * Get company favor gain.\n * @remarks\n * RAM cost: 0.75 GB * 16/4/1\n *\n *\n * This function will return the amount of favor you will gain for the specified\n * company when you reset by installing Augmentations.\n *\n * @param companyName - Name of the company.\n * @returns Amount of favor you gain at the specified company when you reset by installing Augmentations.\n */\n getCompanyFavorGain(companyName: string): number;\n\n /**\n * List all current faction invitations.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * Returns an array with the name of all Factions you currently have oustanding invitations from.\n *\n * @returns Array with the name of all Factions you currently have oustanding invitations from.\n */\n checkFactionInvitations(): string[];\n\n /**\n * Join a faction.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically accept an invitation from a faction and join it.\n *\n * @param faction - Name of faction to join.\n * @returns True if player joined the faction, and false otherwise.\n */\n joinFaction(faction: string): boolean;\n\n /**\n * Work for a faction.\n * @remarks\n * RAM cost: 3 GB * 16/4/1\n *\n *\n * This function will automatically set you to start working for the specified faction.\n * Obviously, you must be a member of the faction or else this function will fail. If\n * you are already in the middle of some “working” action (such as working for a company,\n * training at a gym, or creating a program), then running this function will automatically\n * cancel that action and give you your earnings.\n *\n * This function will return true if you successfully start working for the specified faction, and false otherwise.\n *\n * Note that when you are working for a faction, you will not actually receive your earnings (reputation, experience) until you FINISH the action.\n *\n * @example\n * ```ts\n * // NS1:\n * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (getFactionRep(FACTION NAME) < VALUE) {\n * workForFaction(FACNAME, WORKTYPE);\n * sleep(60000);\n * }\n * //This way, your faction reputation will be updated every minute.\n * ```\n * @example\n * ```ts\n * // NS2:\n * //If you only want to work until you get 100,000 faction reputation. One small hack to get around this is to continuously restart the action to receive your earnings:\n * while (ns.getFactionRep(FACTION NAME) < VALUE) {\n * ns.workForFaction(FACNAME, WORKTYPE);\n * await ns.sleep(60000);\n * }\n * //This way, your faction reputation will be updated every minute.\n * ```\n * @param faction - Name of faction to work for.\n * @param workType - Type of work to perform for the faction.\n * @param focus - Acquire player focus on this work operation. Optional. Defaults to true.\n * @returns True if the player starts working, and false otherwise.\n */\n workForFaction(faction: string, workType: string, focus?: boolean): boolean;\n\n /**\n * Get faction reputation.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function returns the amount of reputation you have for the specified faction.\n *\n * @param faction - Name of faction to work for.\n * @returns Amount of reputation you have for the specified faction.\n */\n getFactionRep(faction: string): number;\n\n /**\n * Get faction favor.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function returns the amount of favor you have for the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you have for the specified faction.\n */\n getFactionFavor(faction: string): number;\n\n /**\n * Get faction favor gain.\n * @remarks\n * RAM cost: 0.75 GB * 16/4/1\n *\n *\n * This function returns the amount of favor you will gain for the specified\n * faction when you reset by installing Augmentations.\n *\n * @param faction - Name of faction.\n * @returns Amount of favor you will gain for the specified faction when you reset by installing Augmentations.\n */\n getFactionFavorGain(faction: string): number;\n\n /**\n * Donate to a faction.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Attempts to donate money to the specified faction in exchange for reputation.\n * Returns true if you successfully donate the money, and false otherwise.\n *\n * @param faction - Name of faction to donate to.\n * @param amount - Amount of money to donate.\n * @returns True if the money was donated, and false otherwise.\n */\n donateToFaction(faction: string, amount: number): boolean;\n\n /**\n * Create a program.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will automatically set you to start working on creating the\n * specified program. If you are already in the middle of some “working” action\n * (such as working for a company, training at a gym, or taking a course), then\n * running this function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns true if you successfully start working on the specified program, and false otherwise.\n *\n * Note that creating a program using this function has the same hacking level requirements as it normally would. These level requirements are:\n * * BruteSSH.exe: 50\n * * FTPCrack.exe: 100\n * * relaySMTP.exe: 250\n * * HTTPWorm.exe: 500\n * * SQLInject.exe: 750\n * * DeepscanV1.exe: 75\n * * DeepscanV2.exe: 400\n * * ServerProfiler.exe: 75\n * * AutoLink.exe: 25\n *\n * @example\n * ```ts\n * // NS1:\n * createProgram(“relaysmtp.exe”);\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.createProgram(“relaysmtp.exe”);\n * ```\n * @param program - Name of program to create.\n * @param focus - Acquire player focus on this program creation. Optional. Defaults to true.\n * @returns True if you successfully start working on the specified program, and false otherwise.\n */\n createProgram(program: string, focus?: boolean): boolean;\n\n /**\n * Commit a crime.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function is used to automatically attempt to commit crimes.\n * If you are already in the middle of some ‘working’ action (such\n * as working for a company or training at a gym), then running this\n * function will automatically cancel that action and give you your\n * earnings.\n *\n * This function returns the number of milliseconds it takes to attempt the\n * specified crime (e.g It takes 60 seconds to attempt the ‘Rob Store’ crime,\n * so running `commitCrime(\'rob store\')` will return 60,000).\n *\n * Warning: I do not recommend using the time returned from this function to try\n * and schedule your crime attempts. Instead, I would use the isBusy Singularity\n * function to check whether you have finished attempting a crime. This is because\n * although the game sets a certain crime to be X amount of seconds, there is no\n * guarantee that your browser will follow that time limit.\n *\n * @param crime - Name of crime to attempt.\n * @returns The number of milliseconds it takes to attempt the specified crime.\n */\n commitCrime(crime: string): number;\n\n /**\n * Get chance to successfully commit a crime.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns your chance of success at commiting the specified crime.\n *\n * @param crime - Name of crime.\n * @returns Chance of success at commiting the specified crime.\n */\n getCrimeChance(crime: string): number;\n\n /**\n * Get stats related to a crime.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Returns the stats of the crime.\n *\n * @param crime - Name of crime. Not case-sensitive\n * @returns The stats of the crime.\n */\n getCrimeStats(crime: string): CrimeStats;\n\n /**\n * Get a list of owned augmentation.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns an array containing the names (as strings) of all Augmentations you have.\n *\n * @param purchased - Specifies whether the returned array should include Augmentations you have purchased but not yet installed. By default, this argument is false which means that the return value will NOT have the purchased Augmentations.\n * @returns Array containing the names (as strings) of all Augmentations you have.\n */\n getOwnedAugmentations(purchased?: boolean): string[];\n\n /**\n * Get a list of augmentation available from a faction.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Returns an array containing the names (as strings) of all Augmentations\n * that are available from the specified faction.\n *\n * @param faction - Name of faction.\n * @returns Array containing the names of all Augmentations.\n */\n getAugmentationsFromFaction(faction: string): string[];\n\n /**\n * Get the pre-requisite of an augmentation.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns an array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n * If there are no prerequisites, a blank array is returned.\n *\n * @param augName - Name of Augmentation.\n * @returns Array with the names of the prerequisite Augmentation(s) for the specified Augmentation.\n */\n getAugmentationPrereq(augName: string): string[];\n\n /**\n * Get the price and reputation of an augmentation.\n * @deprecated use getAugmentationPrice getAugmentationRepCost\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns an array with two elements that gives the cost for\n * the specified Augmentation. The first element in the returned array is the\n * reputation requirement of the Augmentation, and the second element is the\n * money cost.\n *\n * If an invalid Augmentation name is passed in for the augName argument, this\n * function will return the array [-1, -1].\n *\n * @param augName - Name of Augmentation.\n * @returns Array with first element as a reputation requirement and second element as the money cost.\n */\n getAugmentationCost(augName: string): [number, number];\n\n /**\n * Get price of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB * 16/4/1\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Price of the augmentation.\n */\n getAugmentationPrice(augName: string): number;\n\n /**\n * Get reputation requirement of an augmentation.\n * @remarks\n * RAM cost: 2.5 GB * 16/4/1\n *\n *\n * @param augName - Name of Augmentation.\n * @returns Reputation requirement of the augmentation.\n */\n getAugmentationRepReq(augName: string): number;\n\n /**\n * Purchase an augmentation\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will try to purchase the specified Augmentation through the given Faction.\n *\n * This function will return true if the Augmentation is successfully purchased, and false otherwise.\n *\n * @param faction - Name of faction to purchase Augmentation from.\n * @param augmentation - Name of Augmentation to purchase.\n * @returns True if the Augmentation is successfully purchased, and false otherwise.\n */\n purchaseAugmentation(faction: string, augmentation: string): boolean;\n\n /**\n * Get the stats of an augmentation.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function returns augmentation stats.\n *\n * @param name - Name of Augmentation. CASE-SENSITIVE.\n * @returns Augmentation stats.\n */\n getAugmentationStats(name: string): AugmentationStats;\n\n /**\n * Install your purchased augmentations.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will automatically install your Augmentations, resetting the game as usual.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n installAugmentations(cbScript?: string): void;\n\n /**\n * Returns an object with the Player’s stats.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * @example\n * ```ts\n * res = getStats();\n * print(\'My charisma level is: \' + res.charisma);\n * ```\n * @returns Object with the Player’s stats.\n */\n getStats(): PlayerSkills;\n\n /**\n * Returns an object with various information about your character.\n * @deprecated use getPlayer\n *\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * @returns Object with various information about your character.\n */\n getCharacterInformation(): CharacterInfo;\n\n /**\n * Hospitalize the player.\n * @remarks\n * RAM cost: 0.25 GB * 16/4/1\n */\n hospitalize(): void;\n\n /**\n * Soft reset the game.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * This function will perform a reset even if you don’t have any augmentation installed.\n *\n * @param cbScript - This is a script that will automatically be run after Augmentations are installed (after the reset). This script will be run with no arguments and 1 thread. It must be located on your home computer.\n */\n softReset(cbScript: string): void;\n\n /**\n * Go to a location.\n * @remarks\n * RAM cost: 5 GB * 16/4/1\n *\n *\n * Move the player to a specific location.\n *\n * @param locationName - Name of the location.\n * @returns True if the player was moved there, false otherwise.\n */\n goToLocation(locationName: string): boolean;\n\n /**\n * Get the current server.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * @returns Name of the current server.\n */\n getCurrentServer(): string;\n\n /**\n * Connect to a server.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * Run the connect HOSTNAME command in the terminal. Can only connect to neighbors.\n *\n * @returns True if the connect command was successful, false otherwise.\n */\n connect(hostname: string): boolean;\n\n /**\n * Run the hack command in the terminal.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * @returns Amount of money stolen by manual hacking.\n */\n manualHack(): Promise;\n\n /**\n * Run the backdoor command in the terminal.\n * @remarks\n * RAM cost: 2 GB * 16/4/1\n *\n *\n * @returns Promise waiting for the installation to finish.\n */\n installBackdoor(): Promise;\n\n /**\n * Check if the player is focused.\n * @remarks\n * RAM cost: 0.1 GB * 16/4/1\n *\n *\n * @returns True if the player is focused.\n */\n isFocused(): boolean;\n\n /**\n * Set the players focus.\n * @remarks\n * RAM cost: 0.1 GB * 16/4/1\n *\n * @returns True if the focus was changed.\n */\n setFocus(focus: boolean): boolean;\n\n /**\n * Get a list of programs offered on the dark web.\n * @remarks\n * RAM cost: 1 GB * 16/4/1\n *\n *\n * This function allows the player to get a list of programs available for purchase\n * on the dark web. Players MUST have purchased Tor to get the list of programs\n * available. If Tor has not been purchased yet, this function will return an\n * empty list.\n *\n * @example\n * ```ts\n * // NS1\n * getDarkwebProgramsAvailable();\n * // returns [\'BruteSSH.exe\', \'FTPCrack.exe\'...etc]\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.getDarkwebProgramsAvailable();\n * // returns [\'BruteSSH.exe\', \'FTPCrack.exe\'...etc]\n * ```\n * @returns - a list of programs available for purchase on the dark web, or [] if Tor has not\n * been purchased\n */\n getDarkwebPrograms(): string[];\n\n /**\n * Check the price of an exploit on the dark web\n * @remarks\n * RAM cost: 0.5 GB * 16/4/1\n *\n *\n * This function allows you to check the price of a darkweb exploit/program.\n * You MUST have a TOR router in order to use this function. The price returned\n * by this function is the same price you would see with buy -l from the terminal.\n * Returns the cost of the program if it has not been purchased yet, 0 if it\n * has already been purchased, or -1 if Tor has not been purchased (and thus\n * the program/exploit is not available for purchase).\n *\n * If the program does not exist, an error is thrown.\n *\n *\n * @example\n * ```ts\n * // NS1\n * getDarkwebProgramCost("brutessh.exe");\n * ```\n * @example\n * ```ts\n * // NS2\n * ns.getDarkwebProgramCost("brutessh.exe");\n * ```\n * @param programName - Name of program to check the price of\n * @returns Price of the specified darkweb program\n * (if not yet purchased), 0 if it has already been purchased, or -1 if Tor has not been\n * purchased. Throws an error if the specified program/exploit does not exist\n */\n getDarkwebProgramCost(programName: string): number;\n}\n\n/**\n * Hacknet API\n * @remarks\n * Not all these functions are immediately available.\n * @public\n */\nexport interface Hacknet {\n /**\n * Get the number of hacknet nodes you own.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the number of Hacknet Nodes you own.\n *\n * @returns number of hacknet nodes.\n */\n numNodes(): number;\n\n /**\n * Get the maximum number of hacknet nodes.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns maximum number of hacknet nodes.\n */\n maxNumNodes(): number;\n\n /**\n * Purchase a new hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Purchases a new Hacknet Node. Returns a number with the index of the\n * Hacknet Node. This index is equivalent to the number at the end of\n * the Hacknet Node’s name (e.g The Hacknet Node named `hacknet-node-4`\n * will have an index of 4).\n *\n * If the player cannot afford to purchase a new Hacknet Node then the function will return -1.\n *\n * @returns The index of the Hacknet Node or if the player cannot afford to purchase a new Hacknet Node the function will return -1.\n */\n purchaseNode(): number;\n\n /**\n * Get the price of the next hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of purchasing a new Hacknet Node.\n *\n * @returns Cost of purchasing a new Hacknet Node.\n */\n getPurchaseNodeCost(): number;\n\n /**\n * Get the stats of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns an object containing a variety of stats about the specified Hacknet Node.\n *\n * Note that for Hacknet Nodes, production refers to the amount of money the node generates.\n * For Hacknet Servers (the upgraded version of Hacknet Nodes), production refers to the\n * amount of hashes the node generates.\n *\n * @param index - Index/Identifier of Hacknet Node\n * @returns Object containing a variety of stats about the specified Hacknet Node.\n */\n getNodeStats(index: number): NodeStats;\n\n /**\n * Upgrade the level of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the level of the specified Hacknet Node by n.\n *\n * Returns true if the Hacknet Node’s level is successfully upgraded by n\n * or if it is upgraded by some positive amount and the Node reaches its max level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s level is successfully upgraded, false otherwise.\n */\n upgradeLevel(index: number, n: number): boolean;\n\n /**\n * Upgrade the RAM of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to upgrade the specified Hacknet Node’s RAM n times.\n * Note that each upgrade doubles the Node’s RAM.\n * So this is equivalent to multiplying the Node’s RAM by 2 n.\n *\n * Returns true if the Hacknet Node’s RAM is successfully upgraded n times\n * or if it is upgraded some positive number of times and the Node reaches it max RAM.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s ram is successfully upgraded, false otherwise.\n */\n upgradeRam(index: number, n: number): boolean;\n\n /**\n * Upgrade the core of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * Tries to purchase n cores for the specified Hacknet Node.\n *\n * Returns true if it successfully purchases n cores for the Hacknet Node\n * or if it purchases some positive amount and the Node reaches its max number of cores.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cores to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCore(index: number, n: number): boolean;\n\n /**\n * Upgrade the cache of a hacknet node.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Tries to upgrade the specified Hacknet Server’s cache n times.\n *\n * Returns true if it successfully upgrades the Server’s cache n times,\n * or if it purchases some positive amount and the Server reaches its max cache level.\n *\n * Returns false otherwise.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of cache levels to purchase. Must be positive. Rounded to nearest integer.\n * @returns True if the Hacknet Node’s cores are successfully purchased, false otherwise.\n */\n upgradeCache(index: number, n: number): boolean;\n\n /**\n * Calculate the cost of upgrading hacknet node levels.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the specified Hacknet Node by n levels.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of levels to upgrade. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node.\n */\n getLevelUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node RAM.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the RAM of the specified Hacknet Node n times.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade RAM. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s ram.\n */\n getRamUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cores.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the cost of upgrading the number of cores of the specified Hacknet Node by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cores. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s number of cores.\n */\n getCoreUpgradeCost(index: number, n: number): number;\n\n /**\n * Calculate the cost of upgrading hacknet node cache.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the cost of upgrading the cache level of the specified Hacknet Server by n.\n *\n * If an invalid value for n is provided, then this function returns 0.\n * If the specified Hacknet Node is already at max level, then Infinity is returned.\n *\n * @param index - Index/Identifier of Hacknet Node.\n * @param n - Number of times to upgrade cache. Must be positive. Rounded to nearest integer.\n * @returns Cost of upgrading the specified Hacknet Node\'s cache.\n */\n getCacheUpgradeCost(index: number, n: number): number;\n\n /**\n * Get the total number of hashes stored.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you have.\n *\n * @returns Number of hashes you have.\n */\n numHashes(): number;\n\n /**\n * Get the maximum number of hashes you can store.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes you can store.\n *\n * @returns Number of hashes you can store.\n */\n hashCapacity(): number;\n\n /**\n * Get the cost of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the number of hashes required for the specified upgrade. The name of the upgrade must be an exact match.\n *\n * @example\n * ```ts\n * // NS1:\n * var upgradeName = "Sell for Corporation Funds";\n * if (hacknet.numHashes() > hacknet.hashCost(upgradeName)) {\n * hacknet.spendHashes(upgName);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * const upgradeName = "Sell for Corporation Funds";\n * if (ns.hacknet.numHashes() > ns.hacknet.hashCost(upgradeName)) {\n * ns.hacknet.spendHashes(upgName);\n * }\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @returns Number of hashes required for the specified upgrade.\n */\n hashCost(upgName: string): number;\n\n /**\n * Purchase a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Spend the hashes generated by your Hacknet Servers on an upgrade.\n * Returns a boolean value - true if the upgrade is successfully purchased, and false otherwise.\n *\n * The name of the upgrade must be an exact match.\n * The `upgTarget` argument is used for upgrades such as `Reduce Minimum Security`, which applies to a specific server.\n * In this case, the `upgTarget` argument must be the hostname of the server.\n *\n * @example\n * ```ts\n * // NS1:\n * hacknet.spendHashes("Sell for Corporation Funds");\n * hacknet.spendHashes("Increase Maximum Money", "foodnstuff");\n * ```\n * @example\n * ```ts\n * NS2:\n * ns.hacknet.spendHashes("Sell for Corporation Funds");\n * ns.hacknet.spendHashes("Increase Maximum Money", "foodnstuff");\n * ```\n * @param upgName - Name of the upgrade of Hacknet Node.\n * @param upgTarget - Object to which upgrade applies. Required for certain upgrades.\n * @returns True if the upgrade is successfully purchased, and false otherwise..\n */\n spendHashes(upgName: string, upgTarget?: string): boolean;\n\n /**\n * Get the list of hash upgrades\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * Returns the list of all available hash upgrades that can be used in the spendHashes function.\n * @example\n * ```ts\n * // NS1:\n * var upgrades = hacknet.getHashUpgrades(); // ["Sell for Money","Sell for Corporation Funds",...]\n * ```\n * @example\n * ```ts\n * // NS2:\n * const upgrades = ns.hacknet.getHashUpgrades(); // ["Sell for Money","Sell for Corporation Funds",...]\n * ```\n * @returns An array containing the available upgrades\n */\n getHashUpgrades(): string[];\n\n /**\n * Get the level of a hash upgrade.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Level of the upgrade.\n */\n getHashUpgradeLevel(upgName: string): number;\n\n /**\n * Get the multiplier to study.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getStudyMult(): number;\n\n /**\n * Get the multiplier to training.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is only applicable for Hacknet Servers (the upgraded version of a Hacknet Node).\n *\n * @returns Multiplier.\n */\n getTrainingMult(): number;\n}\n\n/**\n * Bladeburner API\n * @remarks\n * You have to be employed in the Bladeburner division and be in BitNode-7\n * or have Source-File 7 in order to use this API.\n * @public\n */\nexport interface Bladeburner {\n /**\n * List all contracts.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner contracts.\n *\n * @returns Array of strings containing the names of all Bladeburner contracts.\n */\n getContractNames(): string[];\n\n /**\n * List all operations.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner operations.\n *\n * @returns Array of strings containing the names of all Bladeburner operations.\n */\n getOperationNames(): string[];\n\n /**\n * List all black ops.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all Bladeburner Black Ops.\n *\n * @returns Array of strings containing the names of all Bladeburner Black Ops.\n */\n getBlackOpNames(): string[];\n\n /**\n * List all general actions.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner actions.\n *\n * @returns Array of strings containing the names of all general Bladeburner actions.\n */\n getGeneralActionNames(): string[];\n\n /**\n * List all skills.\n * @remarks\n * RAM cost: 0.4 GB\n *\n * Returns an array of strings containing the names of all general Bladeburner skills.\n *\n * @returns Array of strings containing the names of all general Bladeburner skills.\n */\n getSkillNames(): string[];\n\n /**\n * Start an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to start the specified Bladeburner action.\n * Returns true if the action was started successfully, and false otherwise.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match\n * @returns True if the action was started successfully, and false otherwise.\n */\n startAction(type: string, name: string): boolean;\n\n /**\n * Stop current action.\n * @remarks\n * RAM cost: 2 GB\n *\n * Stops the current Bladeburner action.\n *\n */\n stopBladeburnerAction(): void;\n\n /**\n * Get current action.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns an object that represents the player’s current Bladeburner action.\n * If the player is not performing an action, the function will return an object with the ‘type’ property set to “Idle”.\n *\n * @returns Object that represents the player’s current Bladeburner action.\n */\n getCurrentAction(): BladeburnerCurAction;\n\n /**\n * Get the time to complete an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of seconds it takes to complete the specified action\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of milliseconds it takes to complete the specified action.\n */\n getActionTime(type: string, name: string): number;\n\n /**\n * Get estimate success chance of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated success chance for the specified action.\n * This chance is returned as a decimal value, NOT a percentage\n * (e.g. if you have an estimated success chance of 80%, then this function will return 0.80, NOT 80).\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Estimated success chance for the specified action.\n */\n getActionEstimatedSuccessChance(type: string, name: string): [number, number];\n\n /**\n * Get the reputation gain of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the average Bladeburner reputation gain for successfully\n * completing the specified action.\n * Note that this value is an ‘average’ and the real reputation gain may vary slightly from this value.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Optional action level at which to calculate the gain\n * @returns Average Bladeburner reputation gain for successfully completing the specified action.\n */\n getActionRepGain(type: string, name: string, level: number): number;\n\n /**\n * Get action count remaining.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the remaining count of the specified action.\n *\n * Note that this is meant to be used for Contracts and Operations.\n * This function will return ‘Infinity’ for actions such as Training and Field Analysis.\n * This function will return 1 for BlackOps not yet completed regardless of whether\n * the player has the required rank to attempt the mission or not.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Remaining count of the specified action.\n */\n getActionCountRemaining(type: string, name: string): number;\n\n /**\n * Get the maximum level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the maximum level for this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Maximum level of the specified action.\n */\n getActionMaxLevel(type: string, name: string): number;\n\n /**\n * Get the current level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the current level of this action.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Current level of the specified action.\n */\n getActionCurrentLevel(type: string, name: string): number;\n\n /**\n * Get whether an action is set to autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action is currently set to autolevel.\n *\n * Returns false if an invalid action is specified.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns True if the action is set to autolevel, and false otherwise.\n */\n getActionAutolevel(type: string, name: string): boolean;\n\n /**\n * Set an action autolevel.\n * @remarks\n * RAM cost: 4 GB\n *\n * Enable/disable autoleveling for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param autoLevel - Whether or not to autolevel this action\n */\n setActionAutolevel(type: string, name: string, autoLevel: boolean): void;\n\n /**\n * Set the level of an action.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the level for the specified action.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param level - Level to set this action to.\n */\n setActionLevel(type: string, name: string, level: number): void;\n\n /**\n * Get player bladeburner rank.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the player’s Bladeburner Rank.\n *\n * @returns Player’s Bladeburner Rank.\n */\n getRank(): number;\n\n /**\n * Get black op required rank.\n * @remarks\n * RAM cost: 2 GB\n *\n * Returns the rank required to complete this BlackOp.\n *\n * Returns -1 if an invalid action is specified.\n *\n * @param name - Name of BlackOp. Must be an exact match.\n * @returns Rank required to complete this BlackOp.\n */\n getBlackOpRank(name: string): number;\n\n /**\n * Get bladeburner skill points.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner skill points you have.\n *\n * @returns Number of Bladeburner skill points you have.\n */\n getSkillPoints(): number;\n\n /**\n * Get skill level.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns your level in the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Level in the specified skill.\n */\n getSkillLevel(name: string): number;\n\n /**\n * Get cost to upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * This function returns the number of skill points needed to upgrade the specified skill.\n *\n * The function returns -1 if an invalid skill name is passed in.\n *\n * @param skillName - Name of skill. Case-sensitive and must be an exact match\n * @returns Number of skill points needed to upgrade the specified skill.\n */\n getSkillUpgradeCost(name: string): number;\n\n /**\n * Upgrade skill.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to upgrade the specified Bladeburner skill.\n *\n * Returns true if the skill is successfully upgraded, and false otherwise.\n *\n * @param skillName - Name of skill to be upgraded. Case-sensitive and must be an exact match\n * @returns true if the skill is successfully upgraded, and false otherwise.\n */\n upgradeSkill(name: string): boolean;\n\n /**\n * Get team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the number of Bladeburner team members you have assigned to the specified action.\n *\n * Setting a team is only applicable for Operations and BlackOps. This function will return 0 for other action types.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @returns Number of Bladeburner team members that were assigned to the specified action.\n */\n getTeamSize(type: string, name: string): number;\n\n /**\n * Set team size.\n * @remarks\n * RAM cost: 4 GB\n *\n * Set the team size for the specified Bladeburner action.\n *\n * Returns the team size that was set, or -1 if the function failed.\n *\n * @param type - Type of action.\n * @param name - Name of action. Must be an exact match.\n * @param size - Number of team members to set. Will be converted using Math.round().\n * @returns Number of Bladeburner team members you assigned to the specified action.\n */\n setTeamSize(type: string, name: string, size: number): number;\n\n /**\n * Get estimated population in city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoids in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Estimated number of Synthoids in the specified city.\n */\n getCityEstimatedPopulation(name: string): number;\n\n /**\n * Get number of communities in a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the estimated number of Synthoid communities in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Number of Synthoids communities in the specified city.\n */\n getCityCommunities(name: string): number;\n\n /**\n * Get chaos of a city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chaos in the specified city,\n * or -1 if an invalid city was specified.\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns Chaos in the specified city.\n */\n getCityChaos(name: string): number;\n\n /**\n * Get current city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the city that the player is currently in (for Bladeburner).\n *\n * @returns City that the player is currently in (for Bladeburner).\n */\n getCity(): string;\n\n /**\n * Travel to another city in bladeburner.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to switch to the specified city (for Bladeburner only).\n *\n * Returns true if successful, and false otherwise\n *\n * @param cityName - Name of city. Case-sensitive\n * @returns true if successful, and false otherwise\n */\n switchCity(name: string): boolean;\n\n /**\n * Get bladeburner stamina.\n * @remarks\n * RAM cost: 4 GB\n * Returns an array with two elements:\n * * [Current stamina, Max stamina]\n * @example\n * ```ts\n * // NS1:\n * function getStaminaPercentage() {\n * var res = bladeburner.getStamina();\n * return res[0] / res[1];\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * function getStaminaPercentage() {\n * const [current, max] = ns.bladeburner.getStamina();\n * return current / max;\n * }\n * ```\n * @returns Array containing current stamina and max stamina.\n */\n getStamina(): [number, number];\n\n /**\n * Join the bladeburner faction.\n * @remarks\n * RAM cost: 4 GB\n * Attempts to join the Bladeburner faction.\n *\n * Returns true if you successfully join the Bladeburner faction, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner faction, or if you are already a member, false otherwise.\n */\n joinBladeburnerFaction(): boolean;\n\n /**\n * Join the bladeburner division.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempts to join the Bladeburner division.\n *\n * Returns true if you successfully join the Bladeburner division, or if you are already a member.\n *\n * Returns false otherwise.\n *\n * @returns True if you successfully join the Bladeburner division, or if you are already a member, false otherwise.\n */\n joinBladeburnerDivision(): boolean;\n\n /**\n * Get bladeburner bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Bladeburner mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 5x the normal speed.\n * For example, if an action takes 30 seconds to complete but you’ve accumulated over\n * 30 seconds in bonus time, then the action will only take 6 seconds in real life to complete.\n *\n * @returns Amount of accumulated “bonus time” (milliseconds) for the Bladeburner mechanic.\n */\n getBonusTime(): number;\n}\n\n/**\n * Coding Contract API\n * @public\n */\nexport interface CodingContract {\n /**\n * Attempts a coding contract.\n * @remarks\n * RAM cost: 10 GB\n *\n * Attempts to solve the Coding Contract with the provided solution.\n *\n * @param answer - Solution for the contract.\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns True if the solution was correct, false otherwise. If the returnReward option is configured, then the function will instead return a string. If the contract is successfully solved, the string will contain a description of the contract’s reward. Otherwise, it will be an empty string.\n */\n attempt(answer: string[] | number, filename: string, host?: string, opts?: CodingAttemptOptions): boolean | string;\n\n /**\n * Get the type of a coding contract.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns a name describing the type of problem posed by the Coding Contract.\n * (e.g. Find Largest Prime Factor, Total Ways to Sum, etc.)\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Name describing the type of problem posed by the Coding Contract.\n */\n getContractType(filename: string, host?: string): string;\n\n /**\n * Get the description.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the full text description for the problem posed by the Coding Contract.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns Contract’s text description.\n */\n getDescription(filename: string, host?: string): string;\n\n /**\n * Get the input data.\n * @remarks\n * RAM cost: 5 GB\n *\n * Get the data associated with the specific Coding Contract.\n * Note that this is not the same as the contract’s description.\n * This is just the data that the contract wants you to act on in order to solve\n *\n * @param filename - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns The specified contract’s data, data type depends on contract type.;\n */\n getData(filename: string, host?: string): any;\n\n /**\n * Get the number of attempt remaining.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the number of tries remaining on the contract before it self-destructs.\n *\n * @param fn - Filename of the contract.\n * @param host - Host of the server containing the contract. Optional. Defaults to current server if not provided.\n * @returns How many attempts are remaining for the contract;\n */\n getNumTriesRemaining(filename: string, host?: string): number;\n}\n\n/**\n * Gang API\n * @remarks\n * If you are not in BitNode-2, then you must have Source-File 2 in order to use this API.\n * @public\n */\nexport interface Gang {\n /**\n * Create a gang.\n * @remarks\n * RAM cost: 1GB\n *\n * Create a gang with the specified faction.\n * @returns True if the gang was created, false otherwise.\n */\n createGang(faction: string): boolean;\n\n /**\n * Check if you\'re in a gang.\n * @remarks\n * RAM cost: 1GB\n * @returns True if you\'re in a gang, false otherwise.\n */\n inGang(): boolean;\n\n /**\n * List all gang members.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the names of all Gang members\n *\n * @returns Names of all Gang members.\n */\n getMemberNames(): string[];\n\n /**\n * Get information about your gang.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get general information about the gang.\n *\n * @returns Object containing general information about the gang.\n */\n getGangInformation(): GangGenInfo;\n\n /**\n * Get information about the other gangs.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get territory and power information about all gangs.\n *\n * @returns Object containing territory and power information about all gangs.\n */\n getOtherGangInformation(): GangOtherInfo;\n\n /**\n * Get information about a specific gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get stat and equipment-related information about a Gang Member\n *\n * @param name - Name of member.\n * @returns Object containing stat and equipment-related information about a Gang Member.\n */\n getMemberInformation(name: string): GangMemberInfo;\n\n /**\n * Check if you can recruit a new gang member.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns boolean indicating whether a member can currently be recruited\n *\n * @returns True if a member can currently be recruited, false otherwise.\n */\n canRecruitMember(): boolean;\n\n /**\n * Recruit a new gang member.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempt to recruit a new gang member.\n *\n * Possible reasons for failure:\n * * Cannot currently recruit a new member\n * * There already exists a member with the specified name\n *\n * @param name - Name of member to recruit.\n * @returns True if the member was successfully recruited, false otherwise.\n */\n recruitMember(name: string): boolean;\n\n /**\n * List member task names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all valid tasks that Gang members can be assigned to.\n *\n * @returns All valid tasks that Gang members can be assigned to.\n */\n getTaskNames(): string[];\n\n /**\n * Set gang member to task.\n * @remarks\n * RAM cost: 2 GB\n *\n * Attempts to assign the specified Gang Member to the specified task.\n * If an invalid task is specified, the Gang member will be set to idle (“Unassigned”).\n *\n * @param memberName - Name of Gang member to assign.\n * @param taskName - Task to assign.\n * @returns True if the Gang Member was successfully assigned to the task, false otherwise.\n */\n setMemberTask(memberName: string, taskName: string): boolean;\n\n /**\n * Get stats of a task.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the stats of a gang task stats. This is typically used to evaluate which action should be executed next.\n *\n * @param name - Name of the task.\n * @returns Detailed stats of a task.\n */\n getTaskStats(name: string): GangTaskStats;\n\n /**\n * List equipment names.\n * @remarks\n * RAM cost: 1 GB\n *\n * Get the name of all possible equipment/upgrades you can purchase for your Gang Members.\n * This includes Augmentations.\n *\n * @returns Names of all Equipments/Augmentations.\n */\n getEquipmentNames(): string[];\n\n /**\n * Get cost of equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the amount of money it takes to purchase a piece of Equipment or an Augmentation.\n * If an invalid Equipment/Augmentation is specified, this function will return Infinity.\n *\n * @param equipName - Name of equipment.\n * @returns Cost to purchase the specified Equipment/Augmentation (number). Infinity for invalid arguments\n */\n getEquipmentCost(equipName: string): number;\n\n /**\n * Get type of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment type.\n *\n * @param equipName - Name of equipment.\n * @returns Type of the equipment.\n */\n getEquipmentType(equipName: string): string;\n\n /**\n * Get stats of an equipment.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the specified equipment stats.\n *\n * @param equipName - Name of equipment.\n * @returns A dictionary containing the stats of the equipment.\n */\n getEquipmentStats(equipName: string): EquipmentStats;\n\n /**\n * Purchase an equipment for a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Attempt to purchase the specified Equipment/Augmentation for the specified Gang member.\n *\n * @param memberName - Name of Gang member to purchase the equipment for.\n * @param equipName - Name of Equipment/Augmentation to purchase.\n * @returns True if the equipment was successfully purchased. False otherwise\n */\n purchaseEquipment(memberName: string, equipName: string): boolean;\n\n /**\n * Ascend a gang member.\n * @remarks\n * RAM cost: 4 GB\n *\n * Ascend the specified Gang Member.\n *\n * @param memberName - Name of member to ascend.\n * @returns Object with info about the ascension results. undefined if ascension did not occur.\n */\n ascendMember(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Get the result of an ascension without ascending.\n * @remarks\n * RAM cost: 2 GB\n *\n * Get the result of an ascension without ascending.\n *\n * @param memberName - Name of member.\n * @returns Object with info about the ascension results. undefined if ascension is impossible.\n */\n getAscensionResult(memberName: string): GangMemberAscension | undefined;\n\n /**\n * Enable/Disable territory warfare.\n * @remarks\n * RAM cost: 2 GB\n *\n * Set whether or not the gang should engage in territory warfare\n *\n * @param engage - Whether or not to engage in territory warfare.\n */\n setTerritoryWarfare(engage: boolean): void;\n\n /**\n * Get chance to win clash with other gang.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns the chance you have to win a clash with the specified gang. The chance is returned in decimal form, not percentage\n *\n * @param gangName - Target gang\n * @returns Chance you have to win a clash with the specified gang.\n */\n getChanceToWinClash(gangName: string): number;\n\n /**\n * Get bonus time.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns the amount of accumulated “bonus time” (seconds) for the Gang mechanic.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster, up to 10x the normal speed.\n *\n * @returns Bonus time for the Gang mechanic in milliseconds.\n */\n getBonusTime(): number;\n}\n\n/**\n * Sleeve API\n * @remarks\n * If you are not in BitNode-10, then you must have Source-File 10 in order to use this API.\n * @public\n */\nexport interface Sleeve {\n /**\n * Get the number of sleeves you own.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the number of duplicate sleeves the player has.\n *\n * @returns number of duplicate sleeves the player has.\n */\n getNumSleeves(): number;\n\n /**\n * Get the stats of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a structure containing the stats of the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to get stats of.\n * @returns Object containing the stats of the sleeve.\n */\n getSleeveStats(sleeveNumber: number): SleeveSkills;\n\n /**\n * Get information about a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a struct containing tons of information about this sleeve\n *\n * @param sleeveNumber - Index of the sleeve to retrieve information.\n * @returns Object containing tons of information about this sleeve.\n */\n getInformation(sleeveNumber: number): SleeveInformation;\n\n /**\n * Get task of a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return the current task that the sleeve is performing. type is set to “Idle” if the sleeve isn’t doing anything.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve task from.\n * @returns Object containing information the current task that the sleeve is performing.\n */\n getTask(sleeveNumber: number): SleeveTask;\n\n /**\n * Set a sleeve to shock recovery.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start recovery.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToShockRecovery(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to synchronize.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start synchronizing.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToSynchronize(sleeveNumber: number): boolean;\n\n /**\n * Set a sleeve to commit crime.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * Returns false if an invalid action is specified.\n *\n * @param sleeveNumber - Index of the sleeve to start commiting crime.\n * @param name - Name of the crime. Must be an exact match.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToCommitCrime(sleeveNumber: number, name: string): boolean;\n\n /**\n * Set a sleeve to work for a faction.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this faction.\n *\n * @param sleeveNumber - Index of the sleeve to work for the faction.\n * @param factionName - Name of the faction to work for.\n * @param factionWorkType - Name of the action to perform for this faction.\n * @returns True if the sleeve started working on this faction, false otherwise.\n */\n setToFactionWork(sleeveNumber: number, factionName: string, factionWorkType: string): boolean;\n\n /**\n * Set a sleeve to work for a company.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working or this company.\n *\n * @param sleeveNumber - Index of the sleeve to work for the company.\n * @param companyName - Name of the company to work for.\n * @returns True if the sleeve started working on this company, false otherwise.\n */\n setToCompanyWork(sleeveNumber: number, companyName: string): boolean;\n\n /**\n * Set a sleeve to take a class at a university.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not this action was set successfully.\n *\n * @param sleeveNumber - Index of the sleeve to start taking class.\n * @param university - Name of the university to attend.\n * @param className - Name of the class to follow.\n * @returns True if this action was set successfully, false otherwise.\n */\n setToUniversityCourse(sleeveNumber: number, university: string, className: string): boolean;\n\n /**\n * Set a sleeve to workout at the gym.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve started working out.\n *\n * @param sleeveNumber - Index of the sleeve to workout at the gym.\n * @param gymName - Name of the gym.\n * @param stat - Name of the stat to train.\n * @returns True if the sleeve started working out, false otherwise.\n */\n setToGymWorkout(sleeveNumber: number, gymName: string, stat: string): boolean;\n\n /**\n * Make a sleeve travel to another city.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a boolean indicating whether or not the sleeve reached destination.\n *\n * @param sleeveNumber - Index of the sleeve to travel.\n * @param cityName - Name of the destination city.\n * @returns True if the sleeve reached destination, false otherwise.\n */\n travel(sleeveNumber: number, cityName: string): boolean;\n\n /**\n * Get augmentations installed on a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentation names that this sleeve has installed.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve augmentations from.\n * @returns List of augmentation names that this sleeve has installed.\n */\n getSleeveAugmentations(sleeveNumber: number): string[];\n\n /**\n * List purchasable augs for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return a list of augmentations that the player can buy for this sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to retrieve purchasable augmentations from.\n * @returns List of augmentations that the player can buy for this sleeve.\n */\n getSleevePurchasableAugs(sleeveNumber: number): AugmentPair[];\n\n /**\n * Purchase an aug for a sleeve.\n * @remarks\n * RAM cost: 4 GB\n *\n * Return true if the aug was purchased and installed on the sleeve.\n *\n * @param sleeveNumber - Index of the sleeve to buy an aug for.\n * @param augName - Name of the aug to buy. Must be an exact match.\n * @returns True if the aug was purchased and installed on the sleeve, false otherwise.\n */\n purchaseSleeveAug(sleeveNumber: number, augName: string): boolean;\n}\n\n/**\n * Grafting API\n * @remarks\n * This API requires Source-File 10 to use.\n * @public\n */\nexport interface Grafting {\n /**\n * Retrieve the grafting cost of an aug.\n * @remarks\n * RAM cost: 3.75 GB\n *\n * @param augName - Name of the aug to check the price of. Must be an exact match.\n * @returns The cost required to graft the named augmentation.\n * @throws Will error if an invalid Augmentation name is provided.\n */\n getAugmentationGraftPrice(augName: string): number;\n\n /**\n * Retrieves the time required to graft an aug.\n * @remarks\n * RAM cost: 3.75 GB\n *\n * @param augName - Name of the aug to check the grafting time of. Must be an exact match.\n * @returns The time required, in millis, to graft the named augmentation.\n * @throws Will error if an invalid Augmentation name is provided.\n */\n getAugmentationGraftTime(augName: string): number;\n\n /**\n * Begins grafting the named aug. You must be in New Tokyo to use this.\n * @remarks\n * RAM cost: 7.5 GB\n *\n * @param augName - The name of the aug to begin grafting. Must be an exact match.\n * @param focus - Acquire player focus on this Augmentation grafting. Optional. Defaults to true.\n * @returns True if the aug successfully began grafting, false otherwise (e.g. not enough money, or\n * invalid Augmentation name provided).\n * @throws Will error if called while you are not in New Tokyo.\n */\n graftAugmentation(augName: string, focus?: boolean): boolean;\n}\n\n/**\n * Skills formulas\n * @public\n */\ninterface SkillsFormulas {\n /**\n * Calculate skill level.\n * @param exp - experience for that skill\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated skill level.\n */\n calculateSkill(exp: number, skillMult?: number): number;\n /**\n * Calculate exp for skill level.\n * @param skill - target skill level\n * @param skillMult - Multiplier for that skill, defaults to 1.\n * @returns The calculated exp required.\n */\n calculateExp(skill: number, skillMult?: number): number;\n}\n\n/**\n * Reputation formulas\n * @public\n */\ninterface ReputationFormulas {\n /**\n * Calculate the total required amount of faction reputation to reach a target favor.\n * @param favor - target faction favor.\n * @returns The calculated faction reputation required.\n */\n calculateFavorToRep(favor: number): number;\n /**\n * Calculate the resulting faction favor of a total amount of reputation.\n * (Faction favor is gained whenever you install an Augmentation.)\n * @param rep - amount of reputation.\n * @returns The calculated faction favor.\n */\n calculateRepToFavor(rep: number): number;\n}\n\n/**\n * Hacking formulas\n * @public\n */\ninterface HackingFormulas {\n /**\n * Calculate hack chance.\n * (Ex: 0.25 would indicate a 25% chance of success.)\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack chance.\n */\n hackChance(server: Server, player: Player): number;\n /**\n * Calculate hack exp for one thread.\n * @remarks\n * Multiply by thread to get total exp\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack exp.\n */\n hackExp(server: Server, player: Player): number;\n /**\n * Calculate hack percent for one thread.\n * (Ex: 0.25 would steal 25% of the server\'s current value.)\n * @remarks\n * Multiply by thread to get total percent hacked.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack percent.\n */\n hackPercent(server: Server, player: Player): number;\n /**\n * Calculate the percent a server would grow to.\n * (Ex: 3.0 would would grow the server to 300% of its current value.)\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param threads - Amount of thread.\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @param cores - Number of cores on the computer that will execute grow.\n * @returns The calculated grow percent.\n */\n growPercent(server: Server, threads: number, player: Player, cores?: number): number;\n /**\n * Calculate hack time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated hack time.\n */\n hackTime(server: Server, player: Player): number;\n /**\n * Calculate grow time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated grow time.\n */\n growTime(server: Server, player: Player): number;\n /**\n * Calculate weaken time.\n * @param server - Server info from {@link NS.getServer | getServer}\n * @param player - Player info from {@link NS.getPlayer | getPlayer}\n * @returns The calculated weaken time.\n */\n weakenTime(server: Server, player: Player): number;\n}\n\n/**\n * Hacknet Node formulas\n * @public\n */\ninterface HacknetNodesFormulas {\n /**\n * Calculate money gain rate.\n * @param level - level of the node.\n * @param ram - ram of the node.\n * @param cores - cores of the node.\n * @param mult - player production mult (default to 1)\n * @returns The calculated money gain rate.\n */\n moneyGainRate(level: number, ram: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet node cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate the cost of a hacknet node.\n * @param n - number of the hacknet node\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetNodeCost(n: number, mult: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet node constants used by the game.\n */\n constants(): HacknetNodeConstants;\n}\n\n/**\n * Hacknet Server formulas\n * @public\n */\ninterface HacknetServersFormulas {\n /**\n * Calculate hash gain rate.\n * @param level - level of the server.\n * @param ramUsed - ramUsed of the server.\n * @param maxRam - maxRam of the server.\n * @param cores - cores of the server.\n * @param mult - player production mult (default to 1)\n * @returns The calculated hash gain rate.\n */\n hashGainRate(level: number, ramUsed: number, maxRam: number, cores: number, mult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server level.\n * @param startingLevel - starting level\n * @param extraLevels - amount of level to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n levelUpgradeCost(startingLevel: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server ram.\n * @param startingRam - starting ram\n * @param extraLevels - amount of level of ram to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n ramUpgradeCost(startingRam: number, extraLevels?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cores.\n * @param startingCore - starting cores\n * @param extraCores - amount of cores to purchase (defaults to 1)\n * @param costMult - player cost reduction (default to 1)\n * @returns The calculated cost.\n */\n coreUpgradeCost(startingCore: number, extraCores?: number, costMult?: number): number;\n /**\n * Calculate cost of upgrading hacknet server cache.\n * @param startingCache - starting cache level\n * @param extraCache - amount of levels of cache to purchase (defaults to 1)\n * @returns The calculated cost.\n */\n cacheUpgradeCost(startingCache: number, extraCache?: number): number;\n /**\n * Calculate hash cost of an upgrade.\n * @param upgName - name of the upgrade\n * @param level - level of the upgrade\n * @returns The calculated hash cost.\n */\n hashUpgradeCost(upgName: number, level: number): number;\n /**\n * Calculate the cost of a hacknet server.\n * @param n - number of the hacknet server\n * @param mult - player cost reduction (defaults to 1)\n * @returns The calculated cost.\n */\n hacknetServerCost(n: number, mult?: number): number;\n /**\n * All constants used by the game.\n * @returns An object with all hacknet server constants used by the game.\n */\n constants(): HacknetServerConstants;\n}\n\n/**\n * Gang formulas\n * @public\n */\ninterface GangFormulas {\n /**\n * Calculate the wanted penalty.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @returns The calculated wanted penalty.\n */\n wantedPenalty(gang: GangGenInfo): number;\n /**\n * Calculate respect gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Gang info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Gang info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated respect gain.\n */\n respectGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate wanted gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated wanted gain.\n */\n wantedLevelGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n /**\n * Calculate money gain per tick.\n * @param gang - Gang info from {@link Gang.getGangInformation | getGangInformation}\n * @param member - Member info from {@link Gang.getMemberInformation | getMemberInformation}\n * @param task - Task info from {@link Gang.getTaskStats | getTaskStats}\n * @returns The calculated money gain.\n */\n moneyGain(gang: GangGenInfo, member: GangMemberInfo, task: GangTaskStats): number;\n\n /**\n * Calculate ascension point gain.\n * @param exp - Experience point before ascension.\n * @returns The calculated ascension point gain.\n */\n ascensionPointsGain(exp: number): number;\n\n /**\n * Calculate ascension mult.\n * @param points - Amount of ascension points.\n * @returns The calculated ascension mult.\n */\n ascensionMultiplier(points: number): number;\n}\n\n/**\n * Formulas API\n * @remarks\n * You need Formulas.exe on your home computer to use this API.\n * @public\n */\nexport interface Formulas {\n /** Reputation formulas */\n reputation: ReputationFormulas;\n /** Skills formulas */\n skills: SkillsFormulas;\n /** Hacking formulas */\n hacking: HackingFormulas;\n /** Hacknet Nodes formulas */\n hacknetNodes: HacknetNodesFormulas;\n /** Hacknet Servers formulas */\n hacknetServers: HacknetServersFormulas;\n /** Gang formulas */\n gang: GangFormulas;\n}\n\n/**\n * @public\n */\nexport interface Fragment {\n id: number;\n shape: boolean[][];\n type: number;\n power: number;\n limit: number;\n}\n\n/**\n * @public\n */\nexport interface ActiveFragment {\n id: number;\n highestCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n}\n\n/**\n * Stanek\'s Gift API.\n * @public\n */\ninterface Stanek {\n /**\n * Stanek\'s Gift width.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The width of the gift.\n */\n giftWidth(): number;\n /**\n * Stanek\'s Gift height.\n * @remarks\n * RAM cost: 0.4 GB\n * @returns The height of the gift.\n */\n giftHeight(): number;\n\n /**\n * Charge a fragment, increasing its power.\n * @remarks\n * RAM cost: 0.4 GB\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @returns Promise that lasts until the charge action is over.\n */\n chargeFragment(rootX: number, rootY: number): Promise;\n\n /**\n * List possible fragments.\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns List of possible fragments.\n */\n fragmentDefinitions(): Fragment[];\n\n /**\n * List of fragments in Stanek\'s Gift.\n * @remarks\n * RAM cost: 5 GB\n *\n * @returns List of active fragments placed on Stanek\'s Gift.\n */\n activeFragments(): ActiveFragment[];\n\n /**\n * Clear the board of all fragments.\n * @remarks\n * RAM cost: 0 GB\n */\n clearGift(): void;\n\n /**\n * Check if fragment can be placed at specified location.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * @param rootX - rootX Root X against which to align the top left of the fragment.\n * @param rootY - rootY Root Y against which to align the top left of the fragment.\n * @param rotation - rotation A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - fragmentId ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n canPlaceFragment(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Place fragment on Stanek\'s Gift.\n * @remarks\n * RAM cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @param rotation - A number from 0 to 3, the mount of 90 degree turn to take.\n * @param fragmentId - ID of the fragment to place.\n * @returns true if the fragment can be placed at that position. false otherwise.\n */\n placeFragment(rootX: number, rootY: number, rotation: number, fragmentId: number): boolean;\n /**\n * Get placed fragment at location.\n * @remarks\n * RAM cost: 5 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n getFragment(rootX: number, rootY: number): ActiveFragment | undefined;\n\n /**\n * Remove fragment at location.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * @param rootX - X against which to align the top left of the fragment.\n * @param rootY - Y against which to align the top left of the fragment.\n * @returns The fragment at [rootX, rootY], if any.\n */\n removeFragment(rootX: number, rootY: number): boolean;\n}\n\n/**\n * User Interface API.\n * @public\n */\ninterface UserInterface {\n /**\n * Get the current theme\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns An object containing the theme\'s colors\n */\n getTheme(): UserInterfaceTheme;\n\n /**\n * Sets the current theme\n * @remarks\n * RAM cost: 0 GB\n * @example\n * Usage example (NS2)\n * ```ts\n * const theme = ns.ui.getTheme();\n * theme.primary = \'#ff5500\';\n * ns.ui.setTheme(theme);\n * ```\n */\n setTheme(newTheme: UserInterfaceTheme): void;\n\n /**\n * Resets the player\'s theme to the default values\n * @remarks\n * RAM cost: 0 GB\n */\n resetTheme(): void;\n\n /**\n * Get the current styles\n * @remarks\n * RAM cost: 0 GB\n *\n * @returns An object containing the player\'s styles\n */\n getStyles(): IStyleSettings;\n\n /**\n * Sets the current styles\n * @remarks\n * RAM cost: 0 GB\n * @example\n * Usage example (NS2)\n * ```ts\n * const styles = ns.ui.getStyles();\n * styles.fontFamily = \'Comic Sans Ms\';\n * ns.ui.setStyles(styles);\n * ```\n */\n setStyles(newStyles: IStyleSettings): void;\n\n /**\n * Resets the player\'s styles to the default values\n * @remarks\n * RAM cost: 0 GB\n */\n resetStyles(): void;\n\n /**\n * Gets the current game information (version, commit, ...)\n * @remarks\n * RAM cost: 0 GB\n */\n getGameInfo(): GameInfo;\n}\n\n/**\n * Collection of all functions passed to scripts\n * @public\n * @remarks\n * Basic ns1 usage example:\n * ```ts\n * // Basic ns functions can be used directly\n * getHostname();\n * // Some related functions are gathered within a common namespace\n * stock.getPrice();\n * ```\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscript1.html| ns1 in-game docs}\n *
\n * Basic ns2 usage example:\n * ```ts\n * export async function main(ns) {\n * // Basic ns functions can be accessed on the ns object\n * ns.getHostname();\n * // Some related functions are gathered under a sub-property of the ns object\n * ns.stock.getPrice();\n * // Some functions need to be awaited\n * await ns.hack(\'n00dles\');\n * }\n * ```\n * {@link https://bitburner.readthedocs.io/en/latest/netscript/netscriptjs.html| ns2 in-game docs}\n *
\n */\nexport interface NS extends Singularity {\n /**\n * Namespace for hacknet functions.\n * @remarks RAM cost: 4 GB\n */\n readonly hacknet: Hacknet;\n /**\n *\n * Namespace for bladeburner functions.\n * @remarks RAM cost: 0 GB\n */\n readonly bladeburner: Bladeburner;\n /**\n *\n * Namespace for codingcontract functions.\n * @remarks RAM cost: 0 GB\n */\n readonly codingcontract: CodingContract;\n /**\n *\n * Namespace for gang functions.\n * @remarks RAM cost: 0 GB\n */\n readonly gang: Gang;\n /**\n *\n * Namespace for sleeve functions.\n * @remarks RAM cost: 0 GB\n */\n readonly sleeve: Sleeve;\n /**\n *\n * Namespace for stock functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly stock: TIX;\n /**\n *\n * Namespace for formulas functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly formulas: Formulas;\n /**\n * Namespace for stanek functions.\n * RAM cost: 0 GB\n */\n readonly stanek: Stanek;\n /**\n * Namespace for corporation functions.\n * RAM cost: 0 GB\n */\n readonly corporation: Corporation;\n\n /**\n * Namespace for user interface functions.\n * RAM cost: 0 GB\n */\n readonly ui: UserInterface;\n\n /**\n * Namespace for singularity functions.\n * RAM cost: 0 GB\n */\n readonly singularity: Singularity;\n\n /**\n * Namespace for grafting functions.\n * @remarks\n * RAM cost: 0 GB\n */\n readonly grafting: Grafting;\n\n /**\n * Arguments passed into the script.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * Arguments passed into a script can be accessed using a normal\n * array using the [] operator (args[0], args[1], etc…).\n *\n * It is also possible to get the number of arguments that was passed into a script using: \'args.length\'\n * WARNING: Do not try to modify the args array. This will break the game.\n */\n readonly args: (string | number | boolean)[];\n\n /**\n * Steal a servers money.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Function that is used to try and hack servers to steal money and gain hacking experience.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level when this function is called. In order to hack a server you must first gain root access to that server\n * and also have the required hacking level.\n *\n * A script can hack a server from anywhere. It does not need to be running on the same\n * server to hack that server. For example, you can create a script that hacks the `foodnstuff`\n * server and run that script on any server in the game.\n *\n * A successful `hack()` on a server will raise that server’s security level by 0.002.\n *\n * @example\n * ```ts\n * // NS1:\n * var earnedMoney = hack("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * let earnedMoney = await ns.hack("foodnstuff");\n * ```\n * @param host - Hostname of the target server to hack.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount of money stolen if the hack is successful, and zero otherwise.\n */\n hack(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Spoof money in a servers bank account, increasing the amount available.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to increase the amount of money available on a server.\n * The runtime for this command depends on your hacking level and the target server’s\n * security level. When `grow` completes, the money available on a target server will\n * be increased by a certain, fixed percentage. This percentage is determined by the\n * target server’s growth rate (which varies between servers) and security level. Generally,\n * higher-level servers have higher growth rates. The getServerGrowth() function can be used\n * to obtain a server’s growth rate.\n *\n * Like hack, `grow` can be called on any server, regardless of where the script is running.\n * The grow() command requires root access to the target server, but there is no required hacking\n * level to run the command. It also raises the security level of the target server by 0.004.\n *\n * @example\n * ```ts\n * // NS1:\n * var currentMoney = getServerMoneyAvailable("foodnstuff");\n * currentMoney = currentMoney * (1 + grow("foodnstuff"));\n * ```\n * @example\n * ```ts\n * // NS2:\n * let currentMoney = ns.getServerMoneyAvailable("foodnstuff");\n * currentMoney *= (1 + await ns.grow("foodnstuff"));\n * ```\n * @param host - Hostname of the target server to grow.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The number by which the money on the server was multiplied for the growth.\n */\n grow(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Reduce a server security level.\n * @remarks\n * RAM cost: 0.15 GB\n *\n * Use your hacking skills to attack a server’s security, lowering the server’s security level.\n * The runtime for this command depends on your hacking level and the target server’s security\n * level when this function is called. This function lowers the security level of the target server by 0.05.\n *\n * Like hack and grow, `weaken` can be called on any server, regardless of\n * where the script is running. This command requires root access to the target server, but\n * there is no required hacking level to run the command.\n *\n * @example\n * ```ts\n * // NS1:\n * var currentSecurity = getServerSecurityLevel("foodnstuff");\n * currentSecurity = currentSecurity - weaken("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * let currentSecurity = ns.getServerSecurityLevel("foodnstuff");\n * currentSecurity -= await ns.weaken("foodnstuff");\n * ```\n * @param host - Hostname of the target server to weaken.\n * @param opts - Optional parameters for configuring function behavior.\n * @returns The amount by which the target server’s security level was decreased. This is equivalent to 0.05 multiplied by the number of script threads.\n */\n weaken(host: string, opts?: BasicHGWOptions): Promise;\n\n /**\n * Predict the effect of weaken.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security decrease that would occur if a weaken with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @param cores - Optional. The number of cores of the server that would run weaken.\n * @returns The security decrease.\n */\n weakenAnalyze(threads: number, cores?: number): number;\n\n /**\n * Predict the effect of hack.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of script threads you need when running the hack command\n * to steal the specified amount of money from the target server.\n * If hackAmount is less than zero or greater than the amount of money available on the server,\n * then this function returns -1.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * //For example, let’s say the foodnstuff server has $10m and you run:\n * hackAnalyzeThreads("foodnstuff", 1e6);\n * //If this function returns 50, this means that if your next hack call is run on a script with 50 threads, it will steal $1m from the foodnstuff server.\n * ```\n * @param host - Hostname of the target server to analyze.\n * @param hackAmount - Amount of money you want to hack from the server.\n * @returns The number of threads needed to hack the server for hackAmount money.\n */\n hackAnalyzeThreads(host: string, hackAmount: number): number;\n\n /**\n * Get the part of money stolen with a single thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the part of the specified server’s money you will steal with a single thread hack.\n *\n * @example\n * ```ts\n * // NS1:\n * //For example, assume the following returns 0.01:\n * var hackAmount = hackAnalyze("foodnstuff");\n * //This means that if hack the foodnstuff server using a single thread, then you will steal 1%, or 0.01 of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.\n * ```\n * @example\n * ```ts\n * // NS2:\n * //For example, assume the following returns 0.01:\n * const hackAmount = ns.hackAnalyze("foodnstuff");\n * //This means that if hack the foodnstuff server using a single thread, then you will steal 1%, or 0.01 of its total money. If you hack using N threads, then you will steal N*0.01 times its total money.\n * ```\n * @param host - Hostname of the target server.\n * @returns The part of money you will steal from the target server with a single thread hack.\n */\n hackAnalyze(host: string): number;\n\n /**\n * Get the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a hack with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n hackAnalyzeSecurity(threads: number): number;\n\n /**\n * Get the chance of successfully hacking a server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the chance you have of successfully hacking the specified server.\n *\n * This returned value is in decimal form, not percentage.\n *\n * @param host - Hostname of the target server.\n * @returns The chance you have of successfully hacking the target server.\n */\n hackAnalyzeChance(host: string): number;\n\n /**\n * Calculate the number of grow thread needed to grow a server by a certain multiplier.\n * @remarks\n * RAM cost: 1 GB\n *\n * This function returns the number of “growths” needed in order to increase\n * the amount of money available on the specified server by the specified amount.\n * The specified amount is multiplicative and is in decimal form, not percentage.\n *\n * Warning: The value returned by this function isn’t necessarily a whole number.\n *\n * @example\n * ```ts\n * // NS1:\n * //For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:\n * var growTimes = growthAnalyze("foodnstuff", 2);\n * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).\n * ```\n * @example\n * ```ts\n * // NS2:\n * //For example, if you want to determine how many grow calls you need to double the amount of money on foodnstuff, you would use:\n * const growTimes = ns.growthAnalyze("foodnstuff", 2);\n * //If this returns 100, then this means you need to call grow 100 times in order to double the money (or once with 100 threads).\n * ```\n * @param host - Hostname of the target server.\n * @param growthAmount - Multiplicative factor by which the server is grown. Decimal form..\n * @returns The amount of grow calls needed to grow the specified server by the specified amount\n */\n growthAnalyze(host: string, growthAmount: number, cores?: number): number;\n\n /**\n * Calculate the security increase for a number of thread.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns the security increase that would occur if a grow with this many threads happened.\n *\n * @param threads - Amount of threads that will be used.\n * @returns The security increase.\n */\n growthAnalyzeSecurity(threads: number): number;\n\n /**\n * Suspends the script for n milliseconds.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @example\n * ```ts\n * // NS1:\n * // This will count from 1 to 10 in your terminal, with one number every 5 seconds\n * for (var i=0; i<10; i++) {\n * tprint(i + 1);\n * sleep(5000);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * // This will count from 1 to 10 in your terminal, with one number every 5 seconds\n * for (var i=0; i<10; i++) {\n * ns.tprint(i + 1);\n * await ns.sleep(5000);\n * }\n * ```\n * @returns\n */\n sleep(millis: number): Promise;\n\n /**\n * Suspends the script for n milliseconds. Doesn\'t block with concurrent calls.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param millis - Number of milliseconds to sleep.\n * @returns\n */\n asleep(millis: number): Promise;\n\n /**\n * Prints one or move values or variables to the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param args - Value(s) to be printed.\n */\n print(...args: any[]): void;\n\n /**\n * Prints a formatted string to the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - format of the message\n * @param args - Value(s) to be printed.\n */\n printf(format: string, ...args: any[]): void;\n\n /**\n * Prints one or more values or variables to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param args - Value(s) to be printed.\n */\n tprint(...args: any[]): void;\n\n /**\n * Prints a raw value or a variable to the Terminal.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param format - format of the message\n * @param msg - Value to be printed.\n */\n tprintf(format: string, ...values: any[]): void;\n\n /**\n * Clears the script’s logs.\n * @remarks\n * RAM cost: 0 GB\n */\n clearLog(): void;\n\n /**\n * Disables logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Logging can be disabled for all functions by passing `ALL` as the argument.\n *\n * Note that this does not completely remove all logging functionality.\n * This only stops a function from logging when the function is successful.\n * If the function fails, it will still log the reason for failure.\n *\n * @param fn - Name of function for which to disable logging.\n */\n disableLog(fn: string): void;\n\n /**\n * Enable logging for a certain function.\n * @remarks\n * RAM cost: 0 GB\n *\n * Re-enables logging for the given function. If `ALL` is passed into this\n * function as an argument, then it will revert the effects of disableLog(`ALL`).\n *\n * @param fn - Name of function for which to enable logging.\n */\n enableLog(fn: string): void;\n\n /**\n * Checks the status of the logging for the given function.\n * @remarks\n * RAM cost: 0 GB\n *\n * @param fn - Name of function to check.\n * @returns Returns a boolean indicating whether or not logging is enabled for that function (or `ALL`)\n */\n isLogEnabled(fn: string): boolean;\n\n /**\n * Get all the logs of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Returns a script’s logs. The logs are returned as an array, where each line is an element in the array.\n * The most recently logged line is at the end of the array.\n * Note that there is a maximum number of lines that a script stores in its logs. This is configurable in the game’s options.\n * If the function is called with no arguments, it will return the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //Get logs from foo.script on the current server that was run with no args\n * getScriptLogs("foo.script");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with no args\n * getScriptLogs("foo.script", "foodnstuff");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * getScriptLogs("foo.script", "foodnstuff", 1, "test");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Get logs from foo.script on the current server that was run with no args\n * ns.getScriptLogs("foo.script");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with no args\n * ns.getScriptLogs("foo.script", "foodnstuff");\n *\n * //Open logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * ns.getScriptLogs("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename of script to get logs from.\n * @param host - Optional. Hostname of the server that the script is on.\n * @param args - Arguments to identify which scripts to get logs for.\n * @returns Returns an string array, where each line is an element in the array. The most recently logged line is at the end of the array.\n */\n getScriptLogs(fn?: string, host?: string, ...args: any[]): string[];\n\n /**\n * Open the tail window of a script.\n * @remarks\n * RAM cost: 0 GB\n *\n * Opens a script’s logs. This is functionally the same as the tail Terminal command.\n *\n * If the function is called with no arguments, it will open the current script’s logs.\n *\n * Otherwise, the fn, hostname/ip, and args… arguments can be used to get the logs from another script.\n * Remember that scripts are uniquely identified by both their names and arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //Open logs from foo.script on the current server that was run with no args\n * tail("foo.script");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with no args\n * tail("foo.script", "foodnstuff");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * tail("foo.script", "foodnstuff", 1, "test");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Open logs from foo.script on the current server that was run with no args\n * ns.tail("foo.script");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with no args\n * ns.tail("foo.script", "foodnstuff");\n *\n * //Get logs from foo.script on the foodnstuff server that was run with the arguments [1, "test"]\n * ns.tail("foo.script", "foodnstuff", 1, "test");\n * ```\n * @param fn - Optional. Filename or PID of the script being tailed. If omitted, the current script is tailed.\n * @param host - Optional. Hostname of the script being tailed. Defaults to the server this script is running on. If args are specified, this is not optional.\n * @param args - Arguments for the script being tailed.\n */\n tail(fn?: FilenameOrPID, host?: string, ...args: any[]): void;\n\n /**\n * Get the list of servers connected to a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array containing the hostnames of all servers that are one\n * node way from the specified target server. The hostnames in the returned\n * array are strings.\n *\n * @param host - Optional, Hostname of the server to scan, default to current server.\n * @returns Returns an string of hostnames.\n */\n scan(host?: string): string[];\n\n /**\n * Runs NUKE.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Running NUKE.exe on a target server gives you root access which means you can executes scripts on said server. NUKE.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * nuke("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.nuke("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n nuke(host: string): void;\n\n /**\n * Runs BruteSSH.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the BruteSSH.exe program on the target server. BruteSSH.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * brutessh("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.brutessh("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n brutessh(host: string): void;\n\n /**\n * Runs FTPCrack.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the FTPCrack.exe program on the target server. FTPCrack.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * ftpcrack("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.ftpcrack("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n ftpcrack(host: string): void;\n\n /**\n * Runs relaySMTP.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the relaySMTP.exe program on the target server. relaySMTP.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * relaysmtp("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.relaysmtp("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n relaysmtp(host: string): void;\n\n /**\n * Runs HTTPWorm.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the HTTPWorm.exe program on the target server. HTTPWorm.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * httpworm("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.httpworm("foodnstuff");\n * ```\n * @param host - Hostname of the target server.\n */\n httpworm(host: string): void;\n\n /**\n * Runs SQLInject.exe on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Runs the SQLInject.exe program on the target server. SQLInject.exe must exist on your home computer.\n *\n * @example\n * ```ts\n * // NS1:\n * sqlinject("foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.sqlinject("foodnstuff");\n * ```\n * @remarks RAM cost: 0.05 GB\n * @param host - Hostname of the target server.\n */\n sqlinject(host: string): void;\n\n /**\n * Start another script on the current server.\n * @remarks\n * RAM cost: 1 GB\n *\n * Run a script as a separate process. This function can only be used to run scripts located on the\n * current server (the server running the script that calls this function). Requires a significant\n * amount of RAM to run this command.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * // NS1:\n * //The simplest way to use the run command is to call it with just the script name. The following example will run ‘foo.script’ single-threaded with no arguments:\n * run("foo.script");\n *\n * //The following example will run ‘foo.script’ but with 5 threads instead of single-threaded:\n * run("foo.script", 5);\n *\n * //This next example will run ‘foo.script’ single-threaded, and will pass the string ‘foodnstuff’ into the script as an argument:\n * run("foo.script", 1, \'foodnstuff\');\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The simplest way to use the run command is to call it with just the script name. The following example will run ‘foo.script’ single-threaded with no arguments:\n * ns.run("foo.script");\n *\n * //The following example will run ‘foo.script’ but with 5 threads instead of single-threaded:\n * ns.run("foo.script", 5);\n *\n * //This next example will run ‘foo.script’ single-threaded, and will pass the string ‘foodnstuff’ into the script as an argument:\n * ns.run("foo.script", 1, \'foodnstuff\');\n * ```\n * @param script - Filename of script to run.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the second argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n run(script: string, numThreads?: number, ...args: Array): number;\n\n /**\n * Start another script on any server.\n * @remarks\n * RAM cost: 1.3 GB\n *\n * Run a script as a separate process on a specified server. This is similar to the run function\n * except that it can be used to run a script on any server, instead of just the current server.\n *\n * If the script was successfully started, then this functions returns the PID of that script.\n * Otherwise, it returns 0.\n *\n * PID stands for Process ID. The PID is a unique identifier for each script.\n * The PID will always be a positive integer.\n *\n * Running this function with a numThreads argument of 0 will return 0 without running the script.\n * However, running this function with a negative numThreads argument will cause a runtime error.\n *\n * @example\n * ```ts\n * // NS1:\n * //The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:\n * exec("generic-hack.script", "foodnstuff");\n *\n * //The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:\n * exec("generic-hack.script", "joesguns", 10);\n *\n * //This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:\n * exec("foo.script", "foodnstuff", 5, 1, "test");\n * ```\n * * @example\n * ```ts\n * // NS2:\n * //The simplest way to use the exec command is to call it with just the script name and the target server. The following example will try to run generic-hack.script on the foodnstuff server:\n * ns.exec("generic-hack.script", "foodnstuff");\n *\n * //The following example will try to run the script generic-hack.script on the joesguns server with 10 threads:\n * ns.exec("generic-hack.script", "joesguns", 10);\n *\n * //This last example will try to run the script foo.script on the foodnstuff server with 5 threads. It will also pass the number 1 and the string “test” in as arguments to the script:\n * ns.exec("foo.script", "foodnstuff", 5, 1, "test");\n * ```\n * @param script - Filename of script to execute.\n * @param host - Hostname of the `target server` on which to execute the script.\n * @param numThreads - Optional thread count for new script. Set to 1 by default. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run. Note that if any arguments are being passed into the new script, then the third argument numThreads must be filled in with a value.\n * @returns Returns the PID of a successfully started script, and 0 otherwise.\n */\n exec(script: string, host: string, numThreads?: number, ...args: Array): number;\n\n /**\n * Terminate current script and start another in 10s.\n * @remarks\n * RAM cost: 2 GB\n *\n * Terminates the current script, and then after a delay of about 10 seconds it will execute the\n * newly-specified script. The purpose of this function is to execute a new script without being\n * constrained by the RAM usage of the current one. This function can only be used to run scripts\n * on the local server.\n *\n * Because this function immediately terminates the script, it does not have a return value.\n *\n * @example\n * ```ts\n * // NS1:\n * //The following example will execute the script ‘foo.script’ with 10 threads and the arguments ‘foodnstuff’ and 90:\n * spawn(\'foo.script\', 10, \'foodnstuff\', 90);\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The following example will execute the script ‘foo.script’ with 10 threads and the arguments ‘foodnstuff’ and 90:\n * ns.spawn(\'foo.script\', 10, \'foodnstuff\', 90);\n * ```\n * @param script - Filename of script to execute.\n * @param numThreads - Number of threads to spawn new script with. Will be rounded to nearest integer.\n * @param args - Additional arguments to pass into the new script that is being run.\n */\n spawn(script: string, numThreads?: number, ...args: string[]): void;\n\n /**\n * Terminate another script.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills the script on the target server specified by the script’s name and arguments.\n * Remember that scripts are uniquely identified by both their name and arguments.\n * For example, if `foo.script` is run with the argument 1, then this is not the same as\n * `foo.script` run with the argument 2, even though they have the same code.\n *\n * @example\n * ```ts\n * // NS1:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * ns.kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * ns.kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * ns.kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @param script - Filename or pid of the script to kill\n * @param host - Hostname of the server on which to kill the script.\n * @param args - Arguments to identify which script to kill.\n * @returns True if the script is successfully killed, and false otherwise.\n */\n kill(script: number): boolean;\n\n /**\n * {@inheritDoc NS.(kill:1)}\n * @example\n * ```ts\n * // NS1:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The following example will try to kill a script named foo.script on the foodnstuff server that was ran with no arguments:\n * ns.kill("foo.script", "foodnstuff");\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with no arguments:\n * ns.kill("foo.script", getHostname());\n *\n * //The following will try to kill a script named foo.script on the current server that was ran with the arguments 1 and “foodnstuff”:\n * ns.kill("foo.script", getHostname(), 1, "foodnstuff");\n * ```\n */\n kill(script: string, host: string, ...args: string[]): boolean;\n\n /**\n * Terminate all scripts on a server.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Kills all running scripts on the specified server. This function returns true\n * if any scripts were killed, and false otherwise. In other words, it will return\n * true if there are any scripts running on the target server.\n * If no host is defined, it will kill all scripts, where the script is running.\n *\n * @param host - IP or hostname of the server on which to kill all scripts.\n * @returns True if any scripts were killed, and false otherwise.\n */\n killall(host?: string): boolean;\n\n /**\n * Terminates the current script immediately.\n * @remarks\n * RAM cost: 0 GB\n */\n exit(): void;\n\n /**\n * Copy file between servers.\n * @remarks\n * RAM cost: 0.6 GB\n *\n * Copies a script or literature (.lit) file(s) to another server. The files argument can be either a string\n * specifying a single file to copy, or an array of strings specifying multiple files to copy.\n *\n * @example\n * ```ts\n * // NS1:\n * //Copies foo.lit from the helios server to the home computer:\n * scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Copies foo.lit from the helios server to the home computer:\n * await ns.scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * await ns.scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * //ns2, copies files from home to a target server\n * const server = ns.args[0];\n * const files = ["hack.js","weaken.js","grow.js"];\n * await ns.scp(files, "home", server);\n * ```\n * @param files - Filename or an array of filenames of script/literature files to copy.\n * @param source - Host of the source server, which is the server from which the file will be copied. This argument is optional and if it’s omitted the source will be the current server.\n * @param destination - Host of the destination server, which is the server to which the file will be copied.\n * @returns True if the script/literature file is successfully copied over and false otherwise. If the files argument is an array then this function will return true if at least one of the files in the array is successfully copied.\n */\n scp(files: string | string[], destination: string): Promise;\n\n /**\n * {@inheritDoc NS.(scp:1)}\n * @example\n * ```ts\n * // NS1:\n * //Copies foo.lit from the helios server to the home computer:\n * scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //Copies foo.lit from the helios server to the home computer:\n * await ns.scp("foo.lit", "helios", "home");\n *\n * //Tries to copy three files from rothman-uni to home computer:\n * files = ["foo1.lit", "foo2.script", "foo3.script"];\n * await ns.scp(files, "rothman-uni", "home");\n * ```\n * @example\n * ```ts\n * //ns2, copies files from home to a target server\n * const server = ns.args[0];\n * const files = ["hack.js","weaken.js","grow.js"];\n * await ns.scp(files, "home", server);\n * ```\n */\n scp(files: string | string[], source: string, destination: string): Promise;\n\n /**\n * List files on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with the filenames of all files on the specified server\n * (as strings). The returned array is sorted in alphabetic order.\n *\n * @param host - Host of the target server.\n * @param grep - A substring to search for in the filename.\n * @returns Array with the filenames of all files on the specified server.\n */\n ls(host: string, grep?: string): string[];\n\n /**\n * List running scripts on a server.\n * @remarks\n * RAM cost: 0.2 GB\n *\n * Returns an array with general information about all scripts running on the specified target server.\n *\n * @example\n * ```ts\n * // NS1:\n * var scripts = ps("home");\n * for (var i = 0; i < scripts.length; ++i) {\n * tprint(scripts[i].filename + \' \' + scripts[i].threads);\n * tprint(scripts[i].args);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * const ps = ns.ps("home");\n * for (let script of ps) {\n * ns.tprint(`${script.filename} ${script.threads}`);\n * ns.tprint(script.args);\n * }\n * ```\n * @param host - Host address of the target server. If not specified, it will be the current server’s IP by default.\n * @returns Array with general information about all scripts running on the specified target server.\n */\n ps(host?: string): ProcessInfo[];\n\n /**\n * Check if your have root access on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns a boolean indicating whether or not the player has root access to the specified target server.\n *\n * @example\n * ```ts\n * // NS1:\n * if (hasRootAccess("foodnstuff") == false) {\n * nuke("foodnstuff");\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * if (ns.hasRootAccess("foodnstuff") == false) {\n * ns.nuke("foodnstuff");\n * }\n * ```\n * @param host - Host of the target server\n * @returns True if player has root access to the specified target server, and false otherwise.\n */\n hasRootAccess(host: string): boolean;\n\n /**\n * Returns a string with the hostname of the server that the script is running on.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Hostname of the server that the script is on.\n */\n getHostname(): string;\n\n /**\n * Returns the player’s current hacking level.\n *\n * @remarks\n * RAM cost: 0.05 GB\n * @returns Player’s current hacking level\n */\n getHackingLevel(): number;\n\n /**\n * Get hacking related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacking related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * // NS1:\n * // Example of how this can be used:\n * var mults = getHackingMultipliers();\n * print(mults.chance);\n * print(mults.growth);\n * ```\n * @example\n * ```ts\n * // NS2:\n * // Example of how this can be used:\n * const {chance, growth} = ns.getHackingMultipliers();\n * print(chance);\n * print(growth);\n * ```\n * @returns Object containing the Player’s hacking related multipliers.\n */\n getHackingMultipliers(): HackingMultipliers;\n\n /**\n * Get hacknet related multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the Player’s hacknet related multipliers.\n * These multipliers are returned in fractional forms, not percentages\n * (e.g. 1.5 instead of 150%).\n *\n * @example\n * ```ts\n * // NS1:\n * // Example of how this can be used:\n * var mults = getHacknetMultipliers();\n * print(mults.production);\n * print(mults.purchaseCost);\n * ```\n * @example\n * ```ts\n * // NS2:\n * // Example of how this can be used:\n * const {production, purchaseCost} = ns.getHacknetMultipliers();\n * print(production);\n * print(purchaseCost);\n * ```\n * @returns Object containing the Player’s hacknet related multipliers.\n */\n getHacknetMultipliers(): HacknetMultipliers;\n\n /**\n * Returns a server object for the given server. Defaults to the running script\'s server if host is not specified.\n *\n * @remarks\n * RAM cost: 2 GB\n * @param host - Optional. Hostname for the requested server object.\n * @returns The requested server object.\n */\n getServer(host?: string): Server;\n\n /**\n * Get money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of money available on a server.\n * Running this function on the home computer will return the player’s money.\n *\n * @example\n * ```ts\n * // NS1:\n * getServerMoneyAvailable("foodnstuff");\n * getServerMoneyAvailable("home"); //Returns player\'s money\n * ```\n * @example\n * ```ts\n * // NS2:\n * ns.getServerMoneyAvailable("foodnstuff");\n * ns.getServerMoneyAvailable("home"); // Returns player\'s money\n * ```\n * @param host - Host of target server\n * @returns Amount of money available on the server.\n */\n getServerMoneyAvailable(host: string): number;\n\n /**\n * Get maximum money available on a server.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the maximum amount of money that can be available on a server.\n *\n * @param host - Host of target server.\n * @returns Maximum amount of money available on the server.\n */\n getServerMaxMoney(host: string): number;\n\n /**\n * Get a server growth parameter.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the server’s intrinsic “growth parameter”. This growth\n * parameter is a number typically between 0 and 100 that represents\n * how quickly the server’s money grows. This parameter affects the\n * percentage by which the server’s money is increased when using the\n * grow function. A higher growth parameter will result in a\n * higher percentage increase from grow.\n *\n * @param host - Host of target server.\n * @returns Parameter that affects the percentage by which the server’s money is increased when using the grow function.\n */\n getServerGrowth(host: string): number;\n\n /**\n * Get server security level.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the security level of the target server. A server’s security\n * level is denoted by a number, typically between 1 and 100\n * (but it can go above 100).\n *\n * @param host - Host of target server.\n * @returns Security level of the target server.\n */\n getServerSecurityLevel(host: string): number;\n\n /**\n * Returns the minimum security level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns Minimum security level of the target server.\n */\n getServerMinSecurityLevel(host: string): number;\n\n /**\n * @deprecated useless\n * @remarks\n * RAM cost: 0.1 GB\n * Returns the base security level of the target server. This is the security\n * level that the server starts out with. This is different than\n * getServerSecurityLevel because getServerSecurityLevel returns\n * the current security level of a server, which can constantly change due to\n * hack, grow, and weaken, calls on that server.\n * The base security level will stay the same until you reset by\n * installing an Augmentation(s).\n *\n * @param host - Host of target server.\n * @returns Base security level of the target server.\n */\n getServerBaseSecurityLevel(host: string): number;\n\n /**\n * @deprecated use getServerMaxRam / getServerUsedRam\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns an array with two elements that gives information about a server’s memory (RAM).\n * The first element in the array is the amount of RAM that the server has total (in GB).\n * The second element in the array is the amount of RAM that is currently being used on\n * the server (in GB).\n *\n * @example\n * ```ts\n * // NS1:\n * var serverRam = getServerRam("helios");\n * var totalRam = serverRam[0];\n * var ramUsed = serverRam[1];\n * ```\n * @example\n * ```ts\n * // NS2:\n * const [totalRam, ramUsed] = ns.getServerRam("helios");\n * ```\n * @param host - Host of target server.\n * @returns Array with total and used memory on the specified server, in GB.\n */\n getServerRam(host: string): [number, number];\n\n /**\n * Get the max RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns max ram (GB)\n */\n getServerMaxRam(host: string): number;\n /**\n * Get the used RAM on a server.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * @param host - Hostname of the target server.\n * @returns used ram (GB)\n */\n getServerUsedRam(host: string): number;\n\n /**\n * Returns the required hacking level of the target server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The required hacking level of the target server.\n */\n getServerRequiredHackingLevel(host: string): number;\n\n /**\n * Returns the number of open ports required to successfully run NUKE.exe on the specified server.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns The number of open ports required to successfully run NUKE.exe on the specified server.\n */\n getServerNumPortsRequired(host: string): number;\n\n /**\n * Returns a boolean denoting whether or not the specified server exists.\n *\n * @remarks RAM cost: 0.1 GB\n * @param host - Host of target server.\n * @returns True if specified server exists, and false otherwise.\n */\n serverExists(host: string): boolean;\n\n /**\n * Check if a file exists.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified file exists on the target server.\n * The filename for scripts is case-sensitive, but for other types of files it is not.\n * For example, fileExists(“brutessh.exe”) will work fine, even though the actual program\n * is named \'BruteSSH.exe\'.\n *\n * If the hostname/ip argument is omitted, then the function will search through the current\n * server (the server running the script that calls this function) for the file.\n *\n * @example\n * ```ts\n * // NS1:\n * //The function call will return true if the script named foo.script exists on the foodnstuff server, and false otherwise.\n * fileExists("foo.script", "foodnstuff");\n *\n * //The function call will return true if the current server contains the FTPCrack.exe program, and false otherwise.\n * fileExists("ftpcrack.exe");\n * ```\n * * @example\n * ```ts\n * // NS2:\n * // The function call will return true if the script named foo.script exists on the foodnstuff server, and false otherwise.\n * ns.fileExists("foo.script", "foodnstuff");\n *\n * // The function call will return true if the current server contains the FTPCrack.exe program, and false otherwise.\n * ns.fileExists("ftpcrack.exe");\n * ```\n * @param filename - Filename of file to check.\n * @param host - Host of target server. This is optional. If it is not specified then the function will use the current server as the target server.\n * @returns True if specified file exists, and false otherwise.\n */\n fileExists(filename: string, host?: string): boolean;\n\n /**\n * Check if a script is running.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns a boolean indicating whether the specified script is running on the target server.\n * If you use a PID instead of a filename, the hostname and args parameters are unnecessary.\n * Remember that a script is uniquely identified by both its name and its arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //The function call will return true if there is a script named foo.script with no arguments running on the foodnstuff server, and false otherwise:\n * isRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is a script named foo.script with no arguments running on the current server, and false otherwise:\n * isRunning("foo.script", getHostname());\n *\n * //The function call will return true if there is a script named foo.script running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:\n * isRunning("foo.script", "joesguns", 1, 5, "test");\n * ```\n * @example\n * ```ts\n * // NS2:\n * //The function call will return true if there is a script named foo.script with no arguments running on the foodnstuff server, and false otherwise:\n * ns.isRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is a script named foo.script with no arguments running on the current server, and false otherwise:\n * ns.isRunning("foo.script", ns.getHostname());\n *\n * //The function call will return true if there is a script named foo.script running with the arguments 1, 5, and “test” (in that order) on the joesguns server, and false otherwise:\n * ns.isRunning("foo.script", "joesguns", 1, 5, "test");\n * ```\n * @param script - Filename or PID of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @param args - Arguments to specify/identify which scripts to search for.\n * @returns True if specified script is running on the target server, and false otherwise.\n */\n isRunning(script: FilenameOrPID, host: string, ...args: string[]): boolean;\n\n /**\n * Get general info about a running script.\n * @remarks\n * RAM cost: 0.3 GB\n *\n * Running with no args returns current script.\n * If you use a PID as the first parameter, the hostname and args parameters are unnecessary.\n *\n * @param filename - Optional. Filename or PID of the script.\n * @param hostname - Optional. Name of host server the script is running on.\n * @param args - Arguments to identify the script\n * @returns The info about the running script if found, and null otherwise.\n */\n getRunningScript(filename?: FilenameOrPID, hostname?: string, ...args: (string | number)[]): RunningScript | null;\n\n /**\n * Get cost of purchasing a server.\n * @remarks\n * RAM cost: 0.25 GB\n *\n * Returns the cost to purchase a server with the specified amount of ram.\n *\n * @example\n * ```ts\n * // NS1:\n * for (i = 1; i <= 20; i++) {\n * tprint(i + " -- " + getPurchasedServerCost(Math.pow(2, i)));\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * for (i = 1; i <= 20; i++) {\n * ns.tprint(i + " -- " + ns.getPurchasedServerCost(Math.pow(2, i)));\n * }\n * ```\n * @param ram - Amount of RAM of a potential purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The cost to purchase a server with the specified amount of ram.\n */\n getPurchasedServerCost(ram: number): number;\n\n /**\n * Purchase a server.\n * @remarks\n * 2.25 GB\n *\n * Purchased a server with the specified hostname and amount of RAM.\n *\n * The hostname argument can be any data type, but it will be converted to a string\n * and have whitespace removed. Anything that resolves to an empty string will cause\n * the function to fail. If there is already a server with the specified hostname,\n * then the function will automatically append a number at the end of the hostname\n * argument value until it finds a unique hostname. For example, if the script calls\n * `purchaseServer(“foo”, 4)` but a server named “foo” already exists, the it will\n * automatically change the hostname to `foo-0`. If there is already a server with the\n * hostname `foo-0`, then it will change the hostname to `foo-1`, and so on.\n *\n * Note that there is a maximum limit to the amount of servers you can purchase.\n *\n * Returns the hostname of the newly purchased server as a string. If the function\n * fails to purchase a server, then it will return an empty string. The function will\n * fail if the arguments passed in are invalid, if the player does not have enough\n * money to purchase the specified server, or if the player has exceeded the maximum\n * amount of servers.\n *\n * @example\n * ```ts\n * // NS1:\n * var ram = 64;\n * var prefix = "pserv-";\n * for (i = 0; i < 5; ++i) {\n * purchaseServer(prefix + i, ram);\n * }\n * ```\n * @example\n * ```ts\n * // NS2:\n * const ram = 64;\n * const prefix = "pserv-";\n * for (i = 0; i < 5; ++i) {\n * ns.purchaseServer(prefix + i, ram);\n * }\n * ```\n * @param hostname - Host of the purchased server.\n * @param ram - Amount of RAM of the purchased server, in GB. Must be a power of 2 (2, 4, 8, 16, etc.). Maximum value of 1048576 (2^20).\n * @returns The hostname of the newly purchased server.\n */\n purchaseServer(hostname: string, ram: number): string;\n\n /**\n * Delete a purchased server.\n * @remarks\n * 2.25 GB\n *\n * Deletes one of your purchased servers, which is specified by its hostname.\n *\n * The hostname argument can be any data type, but it will be converted to a string.\n * Whitespace is automatically removed from the string. This function will not delete a\n * server that still has scripts running on it.\n *\n * @param host - Host of the server to delete.\n * @returns True if successful, and false otherwise.\n */\n deleteServer(host: string): boolean;\n\n /**\n * Returns an array with the hostnames of all of the servers you have purchased.\n *\n * @remarks 2.25 GB\n * @returns Returns an array with the hostnames of all of the servers you have purchased.\n */\n getPurchasedServers(): string[];\n\n /**\n * Returns the maximum number of servers you can purchase.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum number of servers you can purchase.\n */\n getPurchasedServerLimit(): number;\n\n /**\n * Returns the maximum RAM that a purchased server can have.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Returns the maximum RAM (in GB) that a purchased server can have.\n */\n getPurchasedServerMaxRam(): number;\n\n /**\n * Write data to a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function can be used to write data to a text file (.txt).\n *\n * This function will write data to that text file. If the specified text file does not exist,\n * then it will be created. The third argument mode, defines how the data will be written to\n * the text file. If *mode is set to “w”, then the data is written in “write” mode which means\n * that it will overwrite all existing data on the text file. If mode is set to any other value\n * then the data will be written in “append” mode which means that the data will be added at the\n * end of the text file.\n *\n * @param handle - Filename of the text file that will be written to.\n * @param data - Data to write.\n * @param mode - Defines the write mode. Only valid when writing to text files.\n */\n write(handle: string, data?: string[] | number | string, mode?: "w" | "a"): Promise;\n\n /**\n * Attempt to write to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Attempts to write data to the specified Netscript Port.\n * If the port is full, the data will not be written.\n * Otherwise, the data will be written normally.\n *\n * @param port - Port or text file that will be written to.\n * @param data - Data to write.\n * @returns True if the data is successfully written to the port, and false otherwise.\n */\n tryWritePort(port: number, data: string | number): Promise;\n\n /**\n * Read content of a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to read data from a text file (.txt).\n *\n * This function will return the data in the specified text\n * file. If the text file does not exist, an empty string will be returned.\n *\n * @param handle - Filename to read from.\n * @returns Data in the specified text file.\n */\n read(handle: string): any;\n\n /**\n * Get a copy of the data from a port without popping it.\n * @remarks\n * RAM cost: 0 GB\n *\n * This function is used to peek at the data from a port. It returns the\n * first element in the specified port without removing that element. If\n * the port is empty, the string “NULL PORT DATA” will be returned.\n *\n * @param port - Port to peek. Must be an integer between 1 and 20.\n * @returns Data in the specified port.\n */\n peek(port: number): any;\n\n /**\n * Clear data from a file.\n * @remarks\n * RAM cost: 0 GB\n *\n * Delete all data from that text file.\n *\n * @param handle - Text file to clear.\n */\n clear(handle: string): void;\n\n /**\n * Clear data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Deleta all data from the underlying queue.\n *\n * @param handle - Port to clear.\n */\n clearPort(handle: number): void;\n\n /**\n * Write data to a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Write data to that netscript port.\n * @returns The data popped off the queue if it was full.\n */\n writePort(port: number, data: string | number): Promise;\n /**\n * Read data from a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Read data from that port. A port is a serialized queue.\n * This function will remove the first element from that queue and return it.\n * If the queue is empty, then the string “NULL PORT DATA” will be returned.\n * @returns the data read.\n */\n readPort(port: number): any;\n\n /**\n * Get all data on a port.\n * @remarks\n * RAM cost: 0 GB\n *\n * Get a handle to a Netscript Port.\n *\n * WARNING: Port Handles only work in NetscriptJS (Netscript 2.0). They will not work in Netscript 1.0.\n *\n * @see https://bitburner.readthedocs.io/en/latest/netscript/netscriptmisc.html#netscript-ports\n * @param port - Port number. Must be an integer between 1 and 20.\n */\n getPortHandle(port: number): NetscriptPort;\n\n /**\n * Delete a file.\n * @remarks\n * RAM cost: 1 GB\n *\n * Removes the specified file from the current server. This function works for every file\n * type except message (.msg) files.\n *\n * @param name - Filename of file to remove. Must include the extension.\n * @param host - Host Address of the server on which to delete the file. Optional. Defaults to current server.\n * @returns True if it successfully deletes the file, and false otherwise.\n */\n rm(name: string, host?: string): boolean;\n\n /**\n * Check if any script with a filename is running.\n * @remarks\n * RAM cost: 1 GB\n *\n * Returns a boolean indicating whether any instance of the specified script is running\n * on the target server, regardless of its arguments.\n *\n * This is different than the isRunning function because it does not try to\n * identify a specific instance of a running script by its arguments.\n *\n * @example\n * ```ts\n * // NS1:\n * //The function call will return true if there is any script named foo.script running on the foodnstuff server, and false otherwise:\n * scriptRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is any script named “foo.script” running on the current server, and false otherwise:\n * scriptRunning("foo.script", getHostname());\n * ```\n * * @example\n * ```ts\n * // NS2:\n * //The function call will return true if there is any script named foo.script running on the foodnstuff server, and false otherwise:\n * ns.scriptRunning("foo.script", "foodnstuff");\n *\n * //The function call will return true if there is any script named “foo.script” running on the current server, and false otherwise:\n * ns.scriptRunning("foo.script", ns.getHostname());\n * ```\n * @param script - Filename of script to check. This is case-sensitive.\n * @param host - Host of target server.\n * @returns True if the specified script is running, and false otherwise.\n */\n scriptRunning(script: string, host: string): boolean;\n\n /**\n * Kill all scripts with a filename.\n * @remarks\n * RAM cost: 1 GB\n *\n * Kills all scripts with the specified filename on the target server specified by hostname,\n * regardless of arguments.\n *\n * @param script - Filename of script to kill. This is case-sensitive.\n * @param host - Host of target server.\n * @returns true if one or more scripts were successfully killed, and false if none were.\n */\n scriptKill(script: string, host: string): boolean;\n\n /**\n * Returns the current script name.\n *\n * @remarks RAM cost: 0 GB\n * @returns Current script name.\n */\n getScriptName(): string;\n\n /**\n * Get the ram cost of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of RAM required to run the specified script on the target server.\n * Returns 0 if the script does not exist.\n *\n * @param script - Filename of script. This is case-sensitive.\n * @param host - Host of target server the script is located on. This is optional, If it is not specified then the function will se the current server as the target server.\n * @returns Amount of RAM (in GB) required to run the specified script on the target server, and 0 if the script does not exist.\n */\n getScriptRam(script: string, host?: string): number;\n\n /**\n * Get the execution time of a hack() call.\n * @remarks\n * RAM cost: 0.05 GB\n *When `hack` completes an amount of money is stolen depending on the player\'s skills.\n * Returns the amount of time in milliseconds it takes to execute the hack Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the hack time would be at different hacking levels.\n * The required time is increased by the security level of the target server and decreased by the player\'s hacking level.\n *\n * @param host - Host of target server.\n * @returns Returns the amount of time in milliseconds it takes to execute the hack Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getHackTime(host: string): number;\n\n /**\n * Get the execution time of a grow() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the grow Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the grow time would be at different hacking levels.\n * The required time is increased by the security level of the target server and decreased by the player\'s hacking level.\n *\n * @param host - Host of target server.\n * @returns Returns the amount of time in milliseconds it takes to execute the grow Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getGrowTime(host: string): number;\n\n /**\n * Get the execution time of a weaken() call.\n * @remarks\n * RAM cost: 0.05 GB\n *\n * Returns the amount of time in milliseconds it takes to execute the weaken Netscript function on the target server.\n * The function takes in an optional hackLvl parameter that can be specified to see what the weaken time would be at different hacking levels.\n * The required time is increased by the security level of the target server and decreased by the player\'s hacking level.\n *\n * @param host - Host of target server.\n * @returns Returns the amount of time in milliseconds it takes to execute the weaken Netscript function. Returns Infinity if called on a Hacknet Server.\n */\n getWeakenTime(host: string): number;\n\n /**\n * Get the income of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of income the specified script generates while online\n * (when the game is open, does not apply for offline income). Remember that\n * a script is uniquely identified by both its name and its arguments. So for\n * example if you ran a script with the arguments “foodnstuff” and “5” then\n * in order to use this function to get that script’s income you must specify\n * those same arguments in the same order in this function call.\n *\n * This function can also be called with no arguments.\n * If called with no arguments, then this function will return an array of two values.\n * The first value is the total income (dollar / second) of all of your active scripts\n * (scripts that are currently running on any server).\n * The second value is the total income (dollar / second) that you’ve earned from scripts\n * since you last installed Augmentations.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of income the specified script generates while online.\n */\n getScriptIncome(): [number, number];\n\n /**\n * {@inheritDoc NS.(getScriptIncome:1)}\n */\n getScriptIncome(script: string, host: string, ...args: string[]): number;\n\n /**\n * Get the exp gain of a script.\n * @remarks\n * RAM cost: 0.1 GB\n *\n * Returns the amount of hacking experience the specified script generates while online\n * (when the game is open, does not apply for offline experience gains). Remember that a\n * script is uniquely identified by both its name and its arguments.\n *\n * This function can also return the total experience gain rate of all of your active\n * scripts by running the function with no arguments.\n *\n * @param script - Filename of script.\n * @param host - Server on which script is running.\n * @param args - Arguments that the script is running with.\n * @returns Amount of hacking experience the specified script generates while online.\n */\n getScriptExpGain(): number;\n\n /**\n * {@inheritDoc NS.(getScriptExpGain:1)}\n */\n getScriptExpGain(script: string, host: string, ...args: string[]): number;\n\n /**\n * Returns the amount of time in milliseconds that have passed since you last installed Augmentations.\n *\n * @remarks RAM cost: 0.05 GB\n * @returns Time in milliseconds that have passed since you last installed Augmentations.\n */\n getTimeSinceLastAug(): number;\n\n /**\n * Format a string.\n *\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n sprintf(format: string, ...args: any[]): string;\n\n /**\n * Format a string with an array of arguments.\n * @remarks\n * RAM cost: 0 GB\n *\n * see: https://github.com/alexei/sprintf.js\n * @param format - String to format.\n * @param args - Formating arguments.\n * @returns Formated text.\n */\n vsprintf(format: string, args: any[]): string;\n\n /**\n * Format a number\n * @remarks\n * RAM cost: 0 GB\n *\n * Converts a number into a string with the specified formatter.\n * This uses the numeraljs library, so the formatters must be compatible with that.\n * This is the same function that the game itself uses to display numbers.\n *\n * see: http://numeraljs.com/\n * @param n - Number to format.\n * @param format - Formatter.\n * @returns Formated number.\n */\n nFormat(n: number, format: string): string;\n\n /**\n * Format time to readable string\n * @remarks\n * RAM cost: 0 GB\n *\n * @param milliseconds - Number of millisecond to format.\n * @param milliPrecision - Format time with subsecond precision, defaults to false.\n * @returns The formatted time.\n */\n tFormat(milliseconds: number, milliPrecision?: boolean): string;\n\n /**\n * Prompt the player with an input modal.\n * @remarks\n * RAM cost: 0 GB\n *\n * Prompts the player with a dialog box. If `options.type` is undefined or "boolean",\n * the player is shown "Yes" and "No" prompts, which return true and false respectively.\n * Passing a type of "text" will give the player a text field and a value of "select"\n * will show a drop-down field. Choosing type "select" will require an array or object\n * to be passed via the `options.choices` property.\n * The script’s execution is halted until the player selects one of the options.\n *\n * @param txt - Text to appear in the prompt dialog box.\n * @param options - Options to modify the prompt the player is shown.\n * @returns True if the player click “Yes”; false if the player clicks “No”; or the value entered by the player.\n */\n prompt(\n txt: string,\n options?: { type?: "boolean" | "text" | "select" | undefined; choices?: string[] },\n ): Promise;\n\n /**\n * Open up a message box.\n * @param msg - Message to alert.\n */\n alert(msg: any): void;\n\n /**\n * Queue a toast (bottom-right notification).\n * @param msg - Message in the toast.\n * @param variant - Type of toast, must be one of success, info, warning, error. Defaults to success.\n * @param duration - Duration of toast in ms. Can also be `null` to create a persistent toast. Defaults to 2000\n */\n toast(msg: any, variant?: string, duration?: number | null): void;\n\n /**\n * Download a file from the internet.\n * @remarks\n * RAM cost: 0 GB\n *\n * Retrieves data from a URL and downloads it to a file on the specified server.\n * The data can only be downloaded to a script (.script, .ns, .js) or a text file (.txt).\n * If the file already exists, it will be overwritten by this command.\n * Note that it will not be possible to download data from many websites because they\n * do not allow cross-origin resource sharing (CORS).\n *\n * IMPORTANT: This is an asynchronous function that returns a Promise.\n * The Promise’s resolved value will be a boolean indicating whether or not the data was\n * successfully retrieved from the URL. Because the function is async and returns a Promise,\n * it is recommended you use wget in NetscriptJS (Netscript 2.0).\n *\n * In NetscriptJS, you must preface any call to wget with the await keyword (like you would hack or sleep).\n * wget will still work in Netscript 1.0, but the functions execution will not be synchronous\n * (i.e. it may not execute when you expect/want it to).\n * Furthermore, since Promises are not supported in ES5,\n * you will not be able to process the returned value of wget in Netscript 1.0.\n *\n * @example\n * ```ts\n * // NS1:\n * wget("https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md", "game_readme.txt");\n * ```\n * @example\n * ```ts\n * // NS2:\n * await ns.wget("https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md", "game_readme.txt");\n * ```\n * @param url - URL to pull data from.\n * @param target - Filename to write data to. Must be script or text file.\n * @param host - Optional hostname/ip of server for target file.\n * @returns True if the data was successfully retrieved from the URL, false otherwise.\n */\n wget(url: string, target: string, host?: string): Promise;\n\n /**\n * Returns the amount of Faction favor required to be able to donate to a faction.\n *\n * @remarks RAM cost: 0.1 GB\n * @returns Amount of Faction favor required to be able to donate to a faction.\n */\n getFavorToDonate(): number;\n\n /**\n * Get the current Bitnode multipliers.\n * @remarks\n * RAM cost: 4 GB\n *\n * Returns an object containing the current BitNode multipliers.\n * This function requires you to be in Bitnode 5 or have Source-File 5 in order to run.\n * The multipliers are returned in decimal forms (e.g. 1.5 instead of 150%).\n * The multipliers represent the difference between the current BitNode and\n * the original BitNode (BitNode-1).\n *\n * For example, if the CrimeMoney multiplier has a value of 0.1, then that means\n * that committing crimes in the current BitNode will only give 10% of the money\n * you would have received in BitNode-1.\n *\n * @example\n * ```ts\n * // NS1:\n * var mults = getBitNodeMultipliers();\n * print(mults.ServerMaxMoney);\n * print(mults.HackExpGain);\n * ```\n * @example\n * ```ts\n * // NS2:\n * const {ServerMaxMoney, HackExpGain} = ns.getBitNodeMultipliers();\n * print(ServerMaxMoney);\n * print(HackExpGain);\n * ```\n * @returns Object containing the current BitNode multipliers.\n */\n getBitNodeMultipliers(): BitNodeMultipliers;\n\n /**\n * Get a list of acquired Source-Files.\n * @remarks\n * RAM cost: 5 GB\n *\n * Returns an array of source files\n *\n * @returns Array containing an object with number and level of the source file.\n */\n getOwnedSourceFiles(): SourceFileLvl[];\n\n /**\n * Get information about the player.\n * @remarks\n * RAM cost: 0.5 GB\n *\n * Returns an object with information on the current player.\n *\n * @returns Player info\n */\n getPlayer(): Player;\n\n /**\n * Add callback function when the script dies\n * @remarks\n * RAM cost: 0 GB\n *\n * NS2 exclusive\n *\n * Add callback to be executed when the script dies.\n */\n atExit(f: () => void): void;\n\n /**\n * Move a file on the target server.\n * @remarks\n * RAM cost: 0 GB\n *\n * NS2 exclusive\n *\n * Move the source file to the specified destination on the target server.\n *\n * This command only works for scripts and text files (.txt). It cannot, however, be used\n * to convert from script to text file, or vice versa.\n *\n * This function can also be used to rename files.\n *\n * @param host - Host of target server.\n * @param source - Filename of the source file.\n * @param destination - Filename of the destination file.\n */\n mv(host: string, source: string, destination: string): void;\n\n /**\n * Parse command line flags.\n * @remarks\n * RAM cost: 0 GB\n *\n * Allows unix like flag parsing.\n * @example\n * ```ts\n * // example.script\n * var data = flags([\n * [\'delay\', 0], // a default number means this flag is a number\n * [\'server\', \'foodnstuff\'], // a default string means this flag is a string\n * [\'exclude\', []], // a default array means this flag is a default array of string\n * [\'help\', false], // a default boolean means this flag is a boolean\n * ]);\n * tprint(data);\n *\n * // example.ns\n * export async function main(ns) {\n * const data = ns.flags([\n * [\'delay\', 0], // a default number means this flag is a number\n * [\'server\', \'foodnstuff\'], // a default string means this flag is a string\n * [\'exclude\', []], // a default array means this flag is a default array of string\n * [\'help\', false], // a default boolean means this flag is a boolean\n * ]);\n * ns.tprint(data);\n * }\n *\n * // [home ~/]> run example.script\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":false}\n * // [home ~/]> run example.script --delay 3000\n * // {"_":[],"server":"foodnstuff","exclude":[],"help":false,"delay":3000}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi\n * // {"_":[],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world\n * // {"_":["hello","world"],"exclude":[],"help":false,"delay":3000,"server":"harakiri-sushi"}\n * // [home ~/]> run example.script --delay 3000 --server harakiri-sushi hello world --exclude a --exclude b\n * // {"_":["hello","world"],"help":false,"delay":3000,"server":"harakiri-sushi","exclude":["a","b"]}\n * // [home ~/]> run example.script --help\n * // {"_":[],"delay":0,"server":"foodnstuff","exclude":[],"help":true}\n * ```\n */\n flags(schema: [string, string | number | boolean | string[]][]): any;\n\n /**\n * Share your computer with your factions.\n * @remarks\n * RAM cost: 2.4 GB\n *\n * Increases your rep gain of hacking contracts while share is called.\n * Scales with thread count.\n */\n share(): Promise;\n\n /**\n * Calculate your share power. Based on all the active share calls.\n * @remarks\n * RAM cost: 0.2 GB\n */\n getSharePower(): number;\n}\n\n/**\n * Corporation Office API\n * @remarks\n * Requires the Office API upgrade from your corporation.\n * @public\n */\nexport interface OfficeAPI {\n /**\n * Assign an employee to a job.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - name of the employee\n * @param job - Name of the job.\n * @returns A promise that is fulfilled when the assignment is complete.\n */\n assignJob(divisionName: string, cityName: string, employeeName: string, job: string): Promise;\n /**\n * Hire an employee.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns The newly hired employee, if any\n */\n hireEmployee(divisionName: string, cityName: string): Employee | undefined;\n /**\n * Upgrade office size.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param size - Amount of positions to open\n */\n upgradeOfficeSize(divisionName: string, cityName: string, size: number): void;\n /**\n * Throw a party for your employees\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param costPerEmployee - Amount to spend per employee.\n * @returns Amount of happiness increased.\n */\n throwParty(divisionName: string, cityName: string, costPerEmployee: number): Promise;\n /**\n * Buy coffee for your employees\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns A promise that is fulfilled when the coffee is served.\n */\n buyCoffee(divisionName: string, cityName: string): Promise;\n /**\n * Hire AdVert.\n * @param divisionName - Name of the division\n */\n hireAdVert(divisionName: string): void;\n /**\n * Purchase a research\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n */\n research(divisionName: string, researchName: string): void;\n /**\n * Get data about an office\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns Office data\n */\n getOffice(divisionName: string, cityName: string): Office;\n /**\n * Get data about an employee\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param employeeName - Name of the employee\n * @returns Employee data\n */\n getEmployee(divisionName: string, cityName: string, employeeName: string): Employee;\n /**\n * Get the cost to Hire AdVert\n * @param divisionName - Name of the division\n * @returns Cost\n */\n getHireAdVertCost(divisionName: string): number;\n /**\n * Get the number of times you have Hired AdVert\n * @param divisionName - Name of the division\n * @returns Number of times you have Hired AdVert\n */\n getHireAdVertCount(adivisionName: string): number;\n /**\n * Get the cost to unlock research\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n * @returns cost\n */\n getResearchCost(divisionName: string, researchName: string): number;\n /**\n * Gets if you have unlocked a research\n * @param divisionName - Name of the division\n * @param researchName - Name of the research\n * @returns true is unlocked, false if not\n */\n hasResearched(divisionName: string, researchName: string): boolean;\n /**\n * Set the auto job assignment for a job\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param job - Name of the job\n * @param amount - Number of employees to assign to that job\n * @returns A promise that is fulfilled when the assignment is complete.\n */\n setAutoJobAssignment(divisionName: string, cityName: string, job: string, amount: number): Promise;\n /**\n * Cost to Upgrade office size.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param size - Amount of positions to open\n * @returns Cost of upgrading the office\n */\n getOfficeSizeUpgradeCost(divisionName: string, cityName: string, asize: number): number;\n}\n\n/**\n * Corporation Warehouse API\n * @remarks\n * Requires the Warehouse API upgrade from your corporation.\n * @public\n */\nexport interface WarehouseAPI {\n /**\n * Set material sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n */\n sellMaterial(divisionName: string, cityName: string, materialName: string, amt: string, price: string): void;\n /**\n * Set product sell data.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param amt - Amount to sell, can be "MAX"\n * @param price - Price to sell, can be "MP"\n * @param all - Sell in all city\n */\n sellProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n amt: string,\n price: string,\n all: boolean,\n ): void;\n /**\n * Discontinue a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n */\n discontinueProduct(divisionName: string, productName: string): void;\n /**\n * Set smart supply\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param enabled - smart supply enabled\n */\n setSmartSupply(divisionName: string, cityName: string, enabled: boolean): void;\n /**\n * Set whether smart supply uses leftovers before buying\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param enabled - smart supply use leftovers enabled\n */\n setSmartSupplyUseLeftovers(divisionName: string, cityName: string, materialName: string, enabled: boolean): void;\n /**\n * Set material buy data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount of material to buy\n */\n buyMaterial(divisionName: string, cityName: string, materialName: string, amt: number): void;\n /**\n * Set material to bulk buy\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param amt - Amount of material to buy\n */\n bulkPurchase(divisionName: string, cityName: string, materialName: string, amt: number): void;\n /**\n * Get warehouse data\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @returns warehouse data\n */\n getWarehouse(divisionName: string, cityName: string): Warehouse;\n /**\n * Get product data\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @returns product data\n */\n getProduct(divisionName: string, productName: string): Product;\n /**\n * Get material data\n * @param divisionName - Name of the division\n * @param materialName - Name of the material\n * @returns material data\n */\n getMaterial(divisionName: string, cityName: string, materialName: string): Material;\n /**\n * Set market TA 1 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA1(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 2 for a material.\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param materialName - Name of the material\n * @param on - market ta enabled\n */\n setMaterialMarketTA2(divisionName: string, cityName: string, materialName: string, on: boolean): void;\n /**\n * Set market TA 1 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA1(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set market TA 2 for a product.\n * @param divisionName - Name of the division\n * @param productName - Name of the product\n * @param on - market ta enabled\n */\n setProductMarketTA2(divisionName: string, productName: string, on: boolean): void;\n /**\n * Set material export data\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n exportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Cancel material export\n * @param sourceDivision - Source division\n * @param sourceCity - Source city\n * @param targetDivision - Target division\n * @param targetCity - Target city\n * @param materialName - Name of the material\n * @param amt - Amount of material to export.\n */\n cancelExportMaterial(\n sourceDivision: string,\n sourceCity: string,\n targetDivision: string,\n targetCity: string,\n materialName: string,\n amt: number,\n ): void;\n /**\n * Purchase warehouse for a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n purchaseWarehouse(divisionName: string, cityName: string): void;\n /**\n * Upgrade warehouse\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n upgradeWarehouse(divisionName: string, cityName: string): void;\n /**\n * Create a new product\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n * @param productName - Name of the product\n * @param designInvest - Amount to invest for the design of the product.\n * @param marketingInvest - Amount to invest for the marketing of the product.\n */\n makeProduct(\n divisionName: string,\n cityName: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n ): void;\n /**\n * Gets the cost to purchase a warehouse\n * @returns cost\n */\n getPurchaseWarehouseCost(): number;\n /**\n * Gets the cost to upgrade a warehouse to the next level\n * @returns cost to upgrade\n */\n getUpgradeWarehouseCost(adivisionName: any, acityName: any): number;\n /**\n * Check if you have a warehouse in city\n * @returns true if warehouse is present, false if not\n */\n hasWarehouse(adivisionName: any, acityName: any): boolean;\n}\n\n/**\n * Corporation API\n * @public\n */\nexport interface Corporation extends WarehouseAPI, OfficeAPI {\n /**\n * Create a Corporation\n * @param divisionName - Name of the division\n * @param selfFund - If you should self fund, defaults to true, false will only work on Bitnode 3\n * @returns true if created and false if not\n */\n createCorporation(corporationName: string, selfFund: boolean): boolean;\n /**\n * Check if you have a one time unlockable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns true if unlocked and false if not\n */\n hasUnlockUpgrade(upgradeName: string): boolean;\n /**\n * Gets the cost to unlock a one time unlockable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns cost of the upgrade\n */\n getUnlockUpgradeCost(upgradeName: string): number;\n /**\n * Get the level of a levelable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns the level of the upgrade\n */\n getUpgradeLevel(upgradeName: string): number;\n /**\n * Gets the cost to unlock the next level of a levelable upgrade\n * @param upgradeName - Name of the upgrade\n * @returns cost of the upgrade\n */\n getUpgradeLevelCost(upgradeName: string): number;\n /**\n * Gets the cost to expand into a new industry\n * @param industryName - Name of the industry\n * @returns cost\n */\n getExpandIndustryCost(industryName: string): number;\n /**\n * Gets the cost to expand into a new city\n * @returns cost\n */\n getExpandCityCost(): number;\n /**\n * Get an offer for investment based on you companies current valuation\n * @returns An offer of investment\n */\n getInvestmentOffer(): InvestmentOffer;\n /**\n * Accept investment based on you companies current valuation\n * @remarks\n * Is based on current valuation and will not honer a specific Offer\n * @returns An offer of investment\n */\n acceptInvestmentOffer(): boolean;\n /**\n * Go public\n * @param numShares - number of shares you would like to issue for your IPO\n * @returns true if you successfully go public, false if not\n */\n goPublic(numShares: number): boolean;\n /**\n * Bribe a faction\n * @param factionName - Faction name\n * @param amountCash - Amount of money to bribe\n * @param amountShares - Amount of shares to bribe\n * @returns True if successful, false if not\n */\n bribe(factionName: string, amountCash: number, amountShares: number): boolean;\n /**\n * Get corporation data\n * @returns Corporation data\n */\n getCorporation(): CorporationInfo;\n /**\n * Get division data\n * @param divisionName - Name of the division\n * @returns Division data\n */\n getDivision(divisionName: string): Division;\n /**\n * Expand to a new industry\n * @param industryType - Name of the industry\n * @param divisionName - Name of the division\n */\n expandIndustry(industryType: string, divisionName: string): void;\n /**\n * Expand to a new city\n * @param divisionName - Name of the division\n * @param cityName - Name of the city\n */\n expandCity(divisionName: string, cityName: string): void;\n /**\n * Unlock an upgrade\n * @param upgradeName - Name of the upgrade\n */\n unlockUpgrade(upgradeName: string): void;\n /**\n * Level an upgrade.\n * @param upgradeName - Name of the upgrade\n */\n levelUpgrade(upgradeName: string): void;\n /**\n * Issue dividends\n * @param percent - Percent of profit to issue as dividends.\n */\n issueDividends(percent: number): void;\n /**\n * Buyback Shares\n * @param amount - Amount of shares to buy back.\n *\n */\n buyBackShares(amount: number): void;\n /**\n * Sell Shares\n * @param amount - Amount of shares to sell.\n *\n */\n sellShares(amount: number): void;\n /**\n * Get bonus time.\n *\n * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser.\n *\n * “Bonus time” makes the game progress faster.\n *\n * @returns Bonus time for the Corporation mechanic in milliseconds.\n */\n getBonusTime(): number;\n}\n\n/**\n * General info about a corporation\n * @public\n */\ninterface CorporationInfo {\n /** Name of the corporation */\n name: string;\n /** Funds available */\n funds: number;\n /** Revenue per second this cycle */\n revenue: number;\n /** Expenses per second this cycle */\n expenses: number;\n /** Indicating if the company is public */\n public: boolean;\n /** Total number of shares issues by this corporation */\n totalShares: number;\n /** Amount of share owned */\n numShares: number;\n /** Cooldown until shares can be sold again */\n shareSaleCooldown: number;\n /** Amount of shares issued */\n issuedShares: number;\n /** Price of the shares */\n sharePrice: number;\n /** State of the corporation. Possible states are START, PURCHASE, PRODUCTION, SALE, EXPORT. */\n state: string;\n /** Array of all divisions */\n divisions: Division[];\n}\n\n/**\n * Employee in an office\n * @public\n */\ninterface Employee {\n /** Name of the employee */\n name: string;\n /** Morale */\n mor: number;\n /** Happiness */\n hap: number;\n /** Energy */\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n /** Salary */\n sal: number;\n /** City */\n loc: string;\n /** Current job */\n pos: string;\n}\n\n/**\n * Product in a warehouse\n * @public\n */\ninterface Product {\n /** Name of the product */\n name: string;\n /** Demand for the product */\n dmd: number;\n /** Competition for the product */\n cmp: number;\n /** Production cost */\n pCost: number;\n /** Sell cost, can be "MP+5" */\n sCost: string | number;\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 cityData: { [key: string]: number[] };\n /** Creation progress - A number between 0-100 representing percentage */\n developmentProgress: number;\n}\n\n/**\n * Material in a warehouse\n * @public\n */\ninterface Material {\n /** Name of the material */\n name: string;\n /** Amount of material */\n qty: number;\n /** Quality of the material */\n qlt: number;\n /** Amount of material produced */\n prod: number;\n /** Amount of material sold */\n sell: number;\n}\n\n/**\n * Warehouse for a division in a city\n * @public\n */\ninterface Warehouse {\n /** Amount of size upgrade bought */\n level: number;\n /** City in which the warehouse is located */\n loc: string;\n /** Total space in the warehouse */\n size: number;\n /** Used space in the warehouse */\n sizeUsed: number;\n /** Smart Supply status in the warehouse */\n smartSupplyEnabled: boolean;\n}\n\n/**\n * Office for a division in a city.\n * @public\n */\ninterface Office {\n /** City of the office */\n loc: string;\n /** Maximum number of employee */\n size: number;\n /** Minimum amount of energy of the employees */\n minEne: number;\n /** Maximum amount of energy of the employees */\n maxEne: number;\n /** Minimum happiness of the employees */\n minHap: number;\n /** Maximum happiness of the employees */\n maxHap: number;\n /** Maximum morale of the employees */\n maxMor: number;\n /** Name of all the employees */\n employees: string[];\n /** Positions of the employees */\n employeeProd: EmployeeJobs;\n}\n\n/**\n * Object representing the number of employee in each job.\n * @public\n */\ninterface EmployeeJobs {\n Operations: number;\n Engineer: number;\n Business: number;\n Management: number;\n "Research & Development": number;\n Training: number;\n Unassigned: number;\n}\n\n/**\n * Corporation division\n * @public\n */\ninterface Division {\n /** Name of the division */\n name: string;\n /** Type of division, like Agriculture */\n type: string;\n /** Awareness of the division */\n awareness: number;\n /** Popularity of the division */\n popularity: number;\n /** Production multiplier */\n prodMult: number;\n /** Amount of research in that division */\n research: number;\n /** Revenue last cycle */\n lastCycleRevenue: number;\n /** Expenses last cycle */\n lastCycleExpenses: number;\n /** Revenue this cycle */\n thisCycleRevenue: number;\n /** Expenses this cycle */\n thisCycleExpenses: number;\n /** All research bought */\n upgrades: number[];\n /** Cities in which this division has expanded */\n cities: string[];\n /** Products developed by this division */\n products: string[];\n}\n\n/**\n * Corporation investment offer\n * @public\n */\ninterface InvestmentOffer {\n /** Amount of funds you will get from this investment */\n funds: number;\n /** Amount of share you will give in exchange for this investment */\n shares: number;\n /** Current round of funding (max 4) */\n round: number;\n}\n\n/**\n * Interface Theme\n * @internal\n */\ninterface UserInterfaceTheme {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: string;\n successlight: string;\n success: string;\n successdark: string;\n errorlight: string;\n error: string;\n errordark: string;\n secondarylight: string;\n secondary: string;\n secondarydark: string;\n warninglight: string;\n warning: string;\n warningdark: string;\n infolight: string;\n info: string;\n infodark: string;\n welllight: string;\n well: string;\n white: string;\n black: string;\n hp: string;\n money: string;\n hack: string;\n combat: string;\n cha: string;\n int: string;\n rep: string;\n disabled: string;\n backgroundprimary: string;\n backgroundsecondary: string;\n button: string;\n}\n\n/**\n * Interface Styles\n * @internal\n */\ninterface IStyleSettings {\n fontFamily: string;\n lineHeight: number;\n}\n\n/**\n * Game Information\n * @internal\n */\ninterface GameInfo {\n version: string;\n commit: string;\n platform: string;\n}\n\n/**\n * Used for autocompletion\n * @public\n */\ninterface AutocompleteData {\n servers: string[];\n scripts: string[];\n txts: string[];\n flags(schema: [string, string | number | boolean | string[]][]): any;\n}\n'},,,,,,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(768),r=a(0),i=a(1),o=a(21);function s(t){const e=function(t,e){let a=-1;for(let n=0;n{if(n<=e+1)return r.createElement(i.a,{key:n},"[",a.fulfilled(t.player)?"x":" ","] ",a.title)});return r.createElement(r.Fragment,null,r.createElement(i.a,{variant:"h4"},"Milestones"),r.createElement(o.a,{mx:2},r.createElement(i.a,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."),r.createElement("br",null),r.createElement(i.a,null,"Completing fl1ght.exe"),a))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return k}));var n=a(0),r=a.n(n),i=a(1),o=a(286),s=a(74),l=a(120),c=a(113),f=a(137),u=a(21),m=a(246),h=a(1324),d=a(324),p=a(575),g=a(561),y=a(173),b=a.n(y);function E({terminal:t}){return r.a.createElement(i.a,{color:"primary",paragraph:!1},t.getProgressText())}const v=Object(c.a)(t=>Object(f.a)({nopadding:{padding:t.spacing(0)},preformatted:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0)},list:{padding:t.spacing(0),height:"100%"},success:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.colors.success},error:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.error.main},primary:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.primary.main},info:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.info.main},warning:{whiteSpace:"pre-wrap",overflowWrap:"anywhere",margin:t.spacing(0),color:t.palette.warning.main}}));function k({terminal:t,router:e,player:a}){const c=Object(n.useRef)(null),f=Object(n.useState)(0)[1],[y,k]=Object(n.useState)(0);function _(){const t=c.current;if(null!==t)return window.setTimeout(()=>t.scrollIntoView(!0),50)}Object(n.useEffect)(()=>{const t=b.a.debounce(async()=>{f(t=>t+1)},25,{maxWait:50}),e=d.b.subscribe(t);return()=>{t.cancel(),e()}},[]),Object(n.useEffect)(()=>{const t=b.a.debounce(async()=>{k(t=>t+1)},25,{maxWait:50}),e=d.a.subscribe(t);return()=>{t.cancel(),e()}},[]),_(),Object(n.useEffect)(()=>{let t;const e=setTimeout(()=>{var e;t=null!==(e=_())&&void 0!==e?e:0},50);return()=>{clearTimeout(e),clearTimeout(t)}},[]);const w=v();return r.a.createElement(r.a.Fragment,null,r.a.createElement(u.a,{width:"100%",minHeight:"100vh",display:"flex",alignItems:"flex-end"},r.a.createElement(o.a,{key:y,id:"terminal",classes:{root:w.list}},t.outputHistory.map((e,n)=>{return e instanceof m.b?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:(o=e.color,"error"===o?w.error:"success"===o?w.success:"info"===o?w.info:"warn"===o?w.warning:w.primary)},paragraph:!1},e.text)):e instanceof m.c?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,{classes:{root:w.preformatted},paragraph:!1},e.raw)):e instanceof m.a?r.a.createElement(s.a,{key:n,classes:{root:w.nopadding}},r.a.createElement(i.a,null,e.dashes,"> "),r.a.createElement(l.a,{classes:{root:w.preformatted},color:"secondary",paragraph:!1,onClick:()=>t.connectToServer(a,e.hostname)},r.a.createElement(i.a,null,e.hostname))):void 0;var o}),null!==t.action&&r.a.createElement(s.a,{classes:{root:w.nopadding}},r.a.createElement(E,{terminal:t})," ")),r.a.createElement("div",{ref:c})),r.a.createElement(u.a,{position:"sticky",bottom:0,width:"100%",px:0},r.a.createElement(h.a,{player:a,router:e,terminal:t})),r.a.createElement(p.b,null),r.a.createElement(g.b,null))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(1),o=a(113),s=a(137),l=a(81),c=a(23),f=a(28),u=a(1325),m=a(1328),h=a(9);const d=Object(o.a)(t=>Object(s.a)({textfield:{margin:t.spacing(0)},input:{backgroundColor:t.colors.backgroundprimary},nopadding:{padding:t.spacing(0)},preformatted:{whiteSpace:"pre-wrap",margin:t.spacing(0)},list:{padding:t.spacing(0),height:"100%"}}));let p="";function g({terminal:t,router:e,player:a}){const o=Object(n.useRef)(null),[s,g]=Object(n.useState)(p),[y,b]=Object(n.useState)(),[E,v]=Object(n.useState)([]),k=d();function _(t,e){p=t,g(t),e&&b({postUpdate:e})}function w(t){const e=o.current;if(!e)return;const a=s.length,n=e.selectionStart;if(null===n)return;const r=e.value;switch(t.toLowerCase()){case"backspace":n>0&&n<=a+1&&_(r.substr(0,n-1)+r.substr(n));break;case"deletewordbefore":for(let t=n-1;t>-2;--t)if((r.charAt(t)===f.a.SPACE||-1===t)&&t!==n-1)return void _(r.substr(0,t+1)+r.substr(n),()=>{const e=o.current;null==e||e.setSelectionRange(t+1,t+1)});break;case"deletewordafter":for(let t=n+1;t<=s.length+1;++t)if(r.charAt(t)===f.a.SPACE||t===s.length+1)return void _(r.substr(0,n)+r.substr(t+1),()=>{const t=o.current;null==t||t.setSelectionRange(n,n)});break;case"clearafter":_(r.substr(0,n));break;case"clearbefore":_(r.substr(n),()=>S("home"))}}function S(t){const e=o.current;if(!e)return;const a=s.length,n=e.selectionStart;if(null!==n)switch(t.toLowerCase()){case"home":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(a,a);break;case"prevchar":n>0&&e.setSelectionRange(n-1,n-1);break;case"prevword":for(let t=n-2;t>=0;--t)if(e.value.charAt(t)===f.a.SPACE)return void e.setSelectionRange(t+1,t+1);e.setSelectionRange(0,0);break;case"nextchar":e.setSelectionRange(n+1,n+1);break;case"nextword":for(let t=n+1;t<=a;++t)if(e.value.charAt(t)===f.a.SPACE)return void e.setSelectionRange(t,t);e.setSelectionRange(a,a);break;default:console.warn("Invalid loc argument in Terminal.moveTextCursor()")}}return 0===t.commandHistory.length&&a.terminalCommandHistory.length>0&&(t.commandHistory=a.terminalCommandHistory,t.commandHistoryIndex=t.commandHistory.length),Object(n.useEffect)(()=>{null!=y&&y.postUpdate&&(y.postUpdate(),b(null))},[y]),Object(n.useEffect)(()=>{function n(n){if(t.contractOpen)return;if(null!==t.action&&n.key===f.a.C&&n.ctrlKey)return void t.finishAction(e,a,!0);const r=o.current;n.ctrlKey||n.metaKey||n.key===f.a.C&&(n.ctrlKey||n.metaKey)||r&&r.focus()}return document.addEventListener("keydown",n),()=>document.removeEventListener("keydown",n)}),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{title:E.length>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{classes:{root:k.preformatted},color:"primary",paragraph:!1},"Possible autocomplete candidate:"),r.a.createElement(i.a,{classes:{root:k.preformatted},color:"primary",paragraph:!1},E.join(" "))):""},r.a.createElement(l.a,{fullWidth:!0,color:null===t.action?"primary":"secondary",autoFocus:!0,disabled:null!==t.action,autoComplete:"off",value:s,classes:{root:k.textfield},onChange:function(t){_(t.target.value),v([])},inputRef:o,InputProps:{id:"terminal-input",className:k.input,startAdornment:r.a.createElement(i.a,{color:null===t.action?"primary":"secondary",flexShrink:0},"[",a.getCurrentServer().hostname," ~",t.cwd(),"]> "),spellCheck:!1,onKeyDown:async function(n){if(n.key===f.a.ENTER&&""!==s)return n.preventDefault(),t.print(`[${a.getCurrentServer().hostname} ~${t.cwd()}]> ${s}`),t.executeCommands(e,a,s),void _("");if(n.key===f.a.TAB&&""!==s){n.preventDefault();let e=s;const r=e.lastIndexOf(";");-1!==r&&(e=e.slice(r+1)),e=e.trim(),e=e.replace(/\s\s+/g," ");const i=e.split(" ");let o=i.length-2;o<-1&&(o=0);const l=await Object(u.a)(a,e,o,t.cwd());if(0==l.length)return;let c="",f="";if(0==i.length)return;1==i.length?f=i[0]:2==i.length?(f=i[0],c=i[1]):3==i.length?(f=i[0]+" "+i[1],c=i[2]):(c=i.pop()+"",f=i.join(" "));let h=Object(m.a)(f,c,l,s);"string"==typeof h&&""!==h&&(h.endsWith(" ")||h.endsWith("/")||1!==l.length||(h+=" "),_(h)),Array.isArray(h)&&v(h)}if(n.key===f.a.L&&n.ctrlKey&&(n.preventDefault(),t.clear()),n.key===f.a.UP_ARROW||h.a.EnableBashHotkeys&&n.key===f.a.P&&n.ctrlKey){h.a.EnableBashHotkeys&&n.preventDefault();const e=t.commandHistoryIndex,a=t.commandHistory.length;if(0==a)return;(e<0||e>a)&&(t.commandHistoryIndex=a),0!=e&&--t.commandHistoryIndex;_(t.commandHistory[t.commandHistoryIndex]);const r=o.current;r&&setTimeout((function(){r.selectionStart=r.selectionEnd=1e4}),10)}if(n.key===f.a.DOWN_ARROW||h.a.EnableBashHotkeys&&n.key===f.a.M&&n.ctrlKey){h.a.EnableBashHotkeys&&n.preventDefault();const e=t.commandHistoryIndex,a=t.commandHistory.length;if(0==a)return;if((e<0||e>a)&&(t.commandHistoryIndex=a),e==a||e==a-1)t.commandHistoryIndex=a,_("");else{++t.commandHistoryIndex;_(t.commandHistory[t.commandHistoryIndex])}}h.a.EnableBashHotkeys&&(n.key===f.a.A&&n.ctrlKey&&(n.preventDefault(),S("home")),n.key===f.a.E&&n.ctrlKey&&(n.preventDefault(),S("end")),n.key===f.a.B&&n.ctrlKey&&(n.preventDefault(),S("prevchar")),n.key===f.a.B&&n.altKey&&(n.preventDefault(),S("prevword")),n.key===f.a.F&&n.ctrlKey&&(n.preventDefault(),S("nextchar")),n.key===f.a.F&&n.altKey&&(n.preventDefault(),S("nextword")),n.key!==f.a.H&&n.key!==f.a.D||!n.ctrlKey||(w("backspace"),n.preventDefault()),n.key===f.a.W&&n.ctrlKey&&(n.preventDefault(),w("deletewordbefore")),n.key===f.a.D&&n.altKey&&(n.preventDefault(),w("deletewordafter")),n.key===f.a.U&&n.ctrlKey&&(n.preventDefault(),w("clearbefore")),n.key===f.a.K&&n.ctrlKey&&(n.preventDefault(),w("clearafter")))}}})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(83),r=a(1326),i=a(152),o=a(256),s=a(26),l=a(469),c=a(520),f=a(98),u=a(627),m=a(628),h=a(314);const d=["alias","analyze","backdoor","cat","cd","check","clear","cls","connect","cp","download","expr","free","grow","hack","help","home","hostname","ifconfig","kill","killall","ls","lscpu","mem","mv","nano","ps","rm","run","scan-analyze","scan","scp","sudov","tail","theme","top","vim","weaken"];async function p(t,e,a,p=""){e=Object(i.h)(e);let g=[];g=g.concat(Object.keys(i.b));const y=t.getCurrentServer(),b=t.getHomeComputer();let E="",v=null;function k(){for(const t of y.contracts)g.push(t.fn)}function _(){for(const t of y.messages)t.endsWith(".msg")||g.push(t)}function w(){for(const t of b.programs)g.push(t)}function S(){for(const t of y.scripts){const e=L(t.filename);e&&g.push(e)}}function C(){for(const t of y.textFiles){const e=L(t.fn);e&&g.push(e)}}function x(){const t=Object(r.a)(y,null==v?"/":v);for(let e=0;e{const e=i.replace(/^\.\//g,"");return L(t.filename)===e||t.filename==="/"+e});if(!o)return;o.module||await Object(u.a)(t,o,y.scripts);const c=await o.module;if(!c.autocomplete)return;const d={"--tail":Boolean,"-t":Number},p=h(d,{permissive:!0,argv:r.slice(2)}),g=Object(m.a)(p._),b={servers:Object(s.c)().map(t=>t.hostname),scripts:y.scripts.map(t=>t.filename),txts:y.textFiles.map(t=>t.fn),flags:t=>{v=t.map(t=>1===t[0].length?"-"+t[0]:"--"+t[0]);try{return g(t)}catch(t){return}}};let E=[],v=[];return E=E.concat(c.autocomplete(b,p._)),E.concat(v)}();if(A)return A;if(e.startsWith("./")){for(const t of y.scripts){const e=L(t.filename);e&&g.push(e)}for(const t of y.programs){const e=L(t);e&&g.push(e)}for(const t of y.contracts){const e=L(t.fn);e&&g.push(e)}return g}return O("run")&&(S(),w(),k(),x()),O("kill")||O("tail")||O("mem")||O("check")?(S(),x(),g):O("cat")?(function(){for(const t of y.messages)t.endsWith(".msg")&&g.push(t)}(),_(),C(),x(),S(),g):O("download")||O("mv")?(S(),C(),x(),g):O("cd")?(x(),g):(O("ls")&&0===a&&x(),O("help")?Object.keys(c.a):g)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(83);function r(t,e){const a=[];if(!Object(n.i)(e))return a;let r=e;function i(t){if("/"===r&&Object(n.h)(t)){const e=Object(n.g)(t);"/"===e||a.includes(e)||a.push(e)}else if(t.startsWith(r)){const e=t.slice(r.length),i=Object(n.g)(e);"/"===i||a.includes(i)||a.push(i)}}r.endsWith("/")||(r+="/");for(const e of t.scripts)i(e.filename);for(const e of t.textFiles)i(e.fn);return a}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));class n{constructor(t,e,a){this.filename=t,this.url=e,this.moduleSequenceNumber=a}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(24);function r(t,e,a,r){if(a.constructor!==Array)return;if(!Object(n.a)(a))return;if(""===e)for(let e=a.length-1;e>=0;--e)a[e].toLowerCase().startsWith(t.toLowerCase())||a.splice(e,1);else for(let t=a.length-1;t>=0;--t)a[t].toLowerCase().startsWith(e.toLowerCase())||a.splice(t,1);const i=r.lastIndexOf(";");let o="";if(0!==a.length){if(1===a.length)return o=""===e?a[0]:t+" "+a[0],-1===i?o:r.slice(0,i+1)+" "+o;{const o=Object(n.f)(a);return""===e?o===t?a:-1===i?o:`${r.slice(0,i+1)} ${o}`:o===e?a:-1==i?`${t} ${o}`:`${r.slice(0,i+1)} ${t} ${o}`}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1),o=a(120),s=a(21),l=a(10),c=a(250);function f(t){const[e,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"h4"},"Tutorial / Documentation"),r.a.createElement(s.a,{m:2},r.a.createElement(l.a,{onClick:()=>a(!0)},"Soft reset and Restart tutorial"),r.a.createElement(c.a,{open:e,onClose:()=>a(!1),onConfirm:t.reactivateTutorial,confirmationText:"This will reset all your stats to 1 and money to 1k. Are you sure?"}),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/guidesandtips/gettingstartedguideforbeginnerprogrammers.html"},r.a.createElement(i.a,null,"Getting Started")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/servers.html"},r.a.createElement(i.a,null,"Servers & Networking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/hacking.html"},r.a.createElement(i.a,null,"Hacking")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/scripts.html"},r.a.createElement(i.a,null,"Scripts")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript.html"},r.a.createElement(i.a,null,"Netscript Programming Language")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/world.html"},r.a.createElement(i.a,null,"Traveling")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/companies.html"},r.a.createElement(i.a,null,"Companies")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/infiltration.html"},r.a.createElement(i.a,null,"Infiltration")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/factions.html"},r.a.createElement(i.a,null,"Factions")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/augmentations.html"},r.a.createElement(i.a,null,"Augmentations")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/shortcuts.html"},r.a.createElement(i.a,null,"Keyboard Shortcuts")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript/netscriptlearntoprogram.html#netscript-1-0-vs-netscript-2-0"},r.a.createElement(i.a,null,"NS1 vs NS2 (or .script vs .js)")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://bitburner.readthedocs.io/en/latest/netscript/netscriptfunctions.html"},r.a.createElement(i.a,null,"Simplified list of functions")),r.a.createElement("br",null),r.a.createElement(o.a,{color:"primary",target:"_blank",href:"https://github.com/danielyxie/bitburner/blob/dev/markdown/bitburner.ns.md"},r.a.createElement(i.a,null,"Complete list of functions"))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(536),o=a(248),s=a(1331),l=a(1339);function c(t){const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(a,200);return()=>clearInterval(t)},[]);const[c,f]=Object(n.useState)("active");return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{variant:"fullWidth",value:c,onChange:function(t,e){f(e)},sx:{minWidth:"fit-content",maxWidth:"25%"}},r.a.createElement(o.a,{label:"Active",value:"active"}),r.a.createElement(o.a,{label:"Recently Killed",value:"recent"})),"active"===c&&r.a.createElement(s.a,{workerScripts:t.workerScripts}),"recent"===c&&r.a.createElement(l.a,null))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1332),o=a(1333),s=a(1);function l(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(s.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."),r.a.createElement(i.a,null),r.a.createElement(o.a,t))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a(20),i=a(110),o=a(30),s=a(1),l=a(113),c=a(137),f=a(179),u=a(145),m=a(31),h=a(45);const d=Object(l.a)(t=>Object(c.a)({cell:{borderBottom:"none",padding:t.spacing(1),margin:t.spacing(1),whiteSpace:"nowrap"},size:{width:"1px"}}));function p(){const t=o.b.Player(),e=d(),a=t.scriptProdSinceLastAug/(t.playtimeSinceLastAug/1e3);return n.createElement(f.a,{size:"small",classes:{root:e.size}},n.createElement(u.a,null,n.createElement(h.a,null,n.createElement(m.a,{component:"th",scope:"row",classes:{root:e.cell}},n.createElement(s.a,{variant:"body2"},"Total production since last Augment Installation:")),n.createElement(m.a,{align:"left",classes:{root:e.cell}},n.createElement(s.a,{variant:"body2"},n.createElement(r.a,{money:t.scriptProdSinceLastAug}))),n.createElement(m.a,{align:"left",classes:{root:e.cell}},n.createElement(s.a,{variant:"body2"},"(",n.createElement(i.a,{money:a}),")")))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(1334),o=a(81),s=a(286),l=a(1476),c=a(292),f=a(26),u=a(9),m=a(630),h=a(342),d=a.n(h);function p(t){const[e,a]=Object(n.useState)(""),[h,p]=Object(n.useState)(0),[g,y]=Object(n.useState)(u.a.ActiveScriptsServerPageSize),b=Object(n.useState)(!1)[1];const E={};for(const e of t.workerScripts.values()){const t=Object(f.d)(e.hostname);if(null==t){console.warn("WorkerScript has invalid hostname: "+e.hostname);continue}let a=E[t.hostname];void 0===a&&(E[t.hostname]={server:t,workerScripts:[]},a=E[t.hostname]),void 0!==a&&a.workerScripts.push(e)}const v=Object.values(E).filter(t=>t&&(t.server.hostname.includes(e)||t.server.runningScripts.find(t=>t.filename.includes(e))));function k(){b(t=>!t)}return Object(n.useEffect)(()=>c.a.subscribe(k)),r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{value:e,onChange:function(t){a(t.target.value),p(0)},autoFocus:!0,InputProps:{startAdornment:r.a.createElement(d.a,null),spellCheck:!1}}),r.a.createElement(s.a,{dense:!0},v.slice(h*g,h*g+g).map(t=>t&&r.a.createElement(i.a,{key:t.server.hostname,server:t.server,workerScripts:t.workerScripts}))),r.a.createElement(l.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:v.length,rowsPerPage:g,page:h,onPageChange:(t,e)=>{p(e)},onRowsPerPageChange:t=>{u.a.ActiveScriptsServerPageSize=parseInt(t.target.value,10),y(parseInt(t.target.value,10)),p(0)},ActionsComponent:m.a}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a(1),i=a(330),o=a(107),s=a(65),l=a(21),c=a(211),f=a(75),u=a.n(f),m=a(156),h=a.n(m),d=a(1335),p=a(192);function g(t){const[e,a]=n.useState(!1),f=t.server,m=`${f.hostname}${" ".repeat(18)}`.slice(0,Math.max(f.hostname.length,18)),g={progress:f.ramUsed/f.maxRam,totalTicks:30},y=`${m} ${Object(p.a)(g)}`;return n.createElement(l.a,{component:s.a},n.createElement(i.a,{onClick:()=>a(t=>!t)},n.createElement(o.a,{primary:n.createElement(r.a,{style:{whiteSpace:"pre-wrap"}},y)}),e?n.createElement(h.a,{color:"primary"}):n.createElement(u.a,{color:"primary"})),n.createElement(l.a,{mx:2},n.createElement(c.a,{in:e,timeout:0,unmountOnExit:!0},n.createElement(d.a,{workerScripts:t.workerScripts}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(1336),o=a(286),s=a(1476),l=a(630),c=a(9);function f(t){const[e,a]=Object(n.useState)(0),[f,u]=Object(n.useState)(c.a.ActiveScriptsScriptPageSize);return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{dense:!0,disablePadding:!0},t.workerScripts.slice(e*f,e*f+f).map(t=>r.a.createElement(i.a,{key:`${t.name}_${t.args}`,workerScript:t}))),r.a.createElement(s.a,{rowsPerPageOptions:[10,15,20,100],component:"div",count:t.workerScripts.length,rowsPerPage:f,page:e,onPageChange:(t,e)=>{a(e)},onRowsPerPageChange:t=>{c.a.ActiveScriptsScriptPageSize=parseInt(t.target.value,10),u(parseInt(t.target.value,10)),a(0)},ActionsComponent:l.a}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return R}));var n=a(0),r=a(4),i=a(179),o=a(31),s=a(45),l=a(145),c=a(10),f=a(21),u=a(65),m=a(1),h=a(114),d=a(608),p=a.n(d),g=a(330),y=a(107),b=a(113),E=a(211),v=a(156),k=a.n(v),_=a(75),w=a.n(_),S=a(142),C=a(16),x=a(181),L=a(24),O=a(255),M=a(20),T=a(110);const A=Object(b.a)({noborder:{borderBottom:"none"}});function R(t){const e=A(),[a,d]=n.useState(!1),b=t.workerScript.scriptRef;const v=S.a.bind(null,b,b.server);const _=b.onlineMoneyMade/b.onlineRunningTime,R=b.onlineExpGained/b.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(g.a,{onClick:()=>d(t=>!t),component:u.a},n.createElement(y.a,{primary:n.createElement(m.a,null,"└ ",t.workerScript.name," ",JSON.stringify(t.workerScript.args))}),a?n.createElement(k.a,{color:"primary"}):n.createElement(w.a,{color:"primary"})),n.createElement(E.a,{in:a,timeout:0,unmountOnExit:!0},n.createElement(f.a,{mx:6},n.createElement(i.a,{padding:"none",size:"small"},n.createElement(l.a,null,n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,"└ Threads:")),n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,r.a.formatThreads(t.workerScript.scriptRef.threads)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:2},n.createElement(m.a,null,"└ Args: ",Object(O.a)(t.workerScript.args)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,"└ Online Time:")),n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,Object(L.b)(1e3*b.onlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,"└ Offline Time:")),n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,Object(L.b)(1e3*b.offlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,"└ Total online production:")),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(m.a,null,n.createElement(M.a,{money:b.onlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:1}),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(b.onlineExpGained)+" hacking exp"))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,"└ Online production rate:")),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(m.a,null,n.createElement(T.a,{money:_})))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:1}),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(R)+" hacking exp / sec"))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(m.a,null,"└ Total offline production:")),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(m.a,null,n.createElement(M.a,{money:b.offlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:1}),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(m.a,null," ",r.a.formatExp(b.offlineExpGained)+" hacking exp"))))),n.createElement(c.a,{onClick:function(){x.b.emit(b)}},"LOG"),n.createElement(h.a,{onClick:function(){v(),Object(C.a)("Killing script")}},n.createElement(p.a,{color:"error"})))))}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1),o=a(581),s=a(1340);function l(){return r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,"List of all recently killed scripts."),o.b.map(t=>r.a.createElement(s.a,{key:t.pid,recentScript:t})))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return L}));var n=a(0),r=a(4),i=a(179),o=a(31),s=a(45),l=a(145),c=a(21),f=a(65),u=a(1),m=a(10),h=a(330),d=a(107),p=a(113),g=a(211),y=a(156),b=a.n(y),E=a(75),v=a.n(E),k=a(24),_=a(255),w=a(20),S=a(110),C=a(181);const x=Object(p.a)({noborder:{borderBottom:"none"}});function L(t){const e=x(),[a,p]=n.useState(!1),y=t.recentScript,E=y.runningScript.onlineMoneyMade/y.runningScript.onlineRunningTime,L=y.runningScript.onlineExpGained/y.runningScript.onlineRunningTime;return n.createElement(n.Fragment,null,n.createElement(h.a,{onClick:()=>p(t=>!t),component:f.a},n.createElement(d.a,{primary:n.createElement(u.a,null,"└ ",y.filename," (died"," ",Object(k.b)((new Date).getTime()-y.timestamp.getTime())," ago)")}),a?n.createElement(b.a,{color:"primary"}):n.createElement(v.a,{color:"primary"})),n.createElement(g.a,{in:a,timeout:0,unmountOnExit:!0},n.createElement(c.a,{mx:6},n.createElement(i.a,{padding:"none",size:"small"},n.createElement(l.a,null,n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,"└ Threads:")),n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,r.a.formatThreads(y.runningScript.threads)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:2},n.createElement(u.a,null,"└ Args: ",Object(_.a)(y.args)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,"└ Online Time:")),n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,Object(k.b)(1e3*y.runningScript.onlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,"└ Offline Time:")),n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,Object(k.b)(1e3*y.runningScript.offlineRunningTime)))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,"└ Total online production:")),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(u.a,null,n.createElement(w.a,{money:y.runningScript.onlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:1}),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(u.a,null," ",r.a.formatExp(y.runningScript.onlineExpGained)+" hacking exp"))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,"└ Online production rate:")),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(u.a,null,n.createElement(S.a,{money:E})))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:1}),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(u.a,null," ",r.a.formatExp(L)+" hacking exp / sec"))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder},n.createElement(u.a,null,"└ Total offline production:")),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(u.a,null,n.createElement(w.a,{money:y.runningScript.offlineMoneyMade})))),n.createElement(s.a,null,n.createElement(o.a,{className:e.noborder,colSpan:1}),n.createElement(o.a,{className:e.noborder,align:"left"},n.createElement(u.a,null," ",r.a.formatExp(y.runningScript.offlineExpGained)+" hacking exp"))))),n.createElement(m.a,{onClick:function(){C.b.emit(y.runningScript)}},"LOG"))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return E}));var n=a(0),r=a.n(n),i=a(1342),o=a(1346),s=a(1347),l=a(429),c=a(8),f=a(6),u=a(30),m=a(1348),h=a(1),d=a(10),p=a(1349),g=a(5),y=a(252);function b({faction:t,rerender:e,onAugmentations:a}){const i=u.b.Player(),b=u.b.Router(),[E,v]=Object(n.useState)(!1),[k,_]=Object(n.useState)(!1),w=t.getInfo();function S(){i.startFocusing(),b.toWork()}const C=i.inGang()&&i.getGangName()===t.name,x=Math.floor(c.a.BaseFavorToDonate*f.a.RepToDonateToFaction),L=t.favor>=x,O=t.name===g.a.TheCovenant&&10===i.bitNodeN;let M=i.canAccessGang()&&y.a.Names.includes(t.name);return i.inGang()&&(i.getGangName()!==t.name?M=!1:i.getGangName()===t.name&&(M=!0)),r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{onClick:()=>b.toFactions()},"Back"),r.a.createElement(h.a,{variant:"h4",color:"primary"},t.name),r.a.createElement(s.a,{faction:t,factionInfo:w}),M&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Manage Gang",infoText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation",onClick:function(){if(i.inGang())return b.toGang();_(!0)}}),r.a.createElement(m.a,{facName:t.name,open:k,onClose:()=>_(!1)})),!C&&w.offerHackingWork&&r.a.createElement(l.a,{buttonText:"Hacking Contracts",infoText:"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.",onClick:()=>function(t){i.startFactionHackWork(t),S()}(t)}),!C&&w.offerFieldWork&&r.a.createElement(l.a,{buttonText:"Field Work",infoText:"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.",onClick:()=>function(t){i.startFactionFieldWork(t),S()}(t)}),!C&&w.offerSecurityWork&&r.a.createElement(l.a,{buttonText:"Security Work",infoText:"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.",onClick:()=>function(t){i.startFactionSecurityWork(t),S()}(t)}),!C&&w.offersWork()&&r.a.createElement(o.a,{faction:t,p:i,rerender:e,favorToDonate:x,disabled:!L}),r.a.createElement(l.a,{buttonText:"Purchase Augmentations",infoText:"As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.",onClick:a}),O&&r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,{buttonText:"Purchase & Upgrade Duplicate Sleeves",infoText:"Purchase Duplicate Sleeves and upgrades. These are permanent!",onClick:()=>v(!0)}),r.a.createElement(p.a,{open:E,onClose:()=>v(!1)})))}function E(t){const e=Object(n.useState)(!1)[1],a=u.b.Player(),o=u.b.Router(),[s,l]=Object(n.useState)(t.augPage);function c(){e(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(c,200);return()=>clearInterval(t)},[]);const f=t.faction;return a&&!a.factions.includes(f.name)?r.a.createElement(r.a.Fragment,null,r.a.createElement(h.a,{variant:"h4",color:"primary"},"You have not joined ",f.name," yet!"),r.a.createElement(d.a,{onClick:()=>o.toFactions()},"Back to Factions")):s?r.a.createElement(i.a,{faction:f,routeToMainPage:()=>l(!1)}):r.a.createElement(b,{rerender:c,faction:f,onAugmentations:()=>l(!0)})}},function(t,e,a){"use strict";a.d(e,"a",(function(){return _}));var n=a(0),r=a.n(n),i=a(1343),o=a(57),s=a(15),l=a(205),c=a(9),f=a(105),u=a(30),m=a(116),h=a(320),d=a(4),p=a(21),g=a(10),y=a(1),b=a(23),E=a(145),v=a(179),k=a(141);function _(t){const e=u.b.Player(),a=(e.inGang()&&(e.getGangName(),t.faction.name),Object(n.useState)(!1)[1]);function _(){a(t=>!t)}function w(){return Object(f.a)(e,t.faction)}function S(t){c.a.PurchaseAugmentationsOrder=t,_()}const C=function(){switch(c.a.PurchaseAugmentationsOrder){case l.b.Cost:return function(){const t=w();return t.sort((t,e)=>{const a=o.a[t],n=o.a[e];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),t}();case l.b.Reputation:return function(){const t=w();return t.sort((t,e)=>{const a=o.a[t],n=o.a[e];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement}),t}();case l.b.Purchasable:return function(){const a=w();function n(a){const n=o.a[a],r=n.baseRepRequirement*t.faction.getInfo().augmentationRepRequirementMult,i=t.faction.playerReputation>=r,s=Object(f.c)(n);return 0!==n.baseCost&&e.money>n.baseCost*t.faction.getInfo().augmentationPriceMult&&i&&s}const r=a.filter(n).sort((t,e)=>{const a=o.a[t],n=o.a[e];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseCost-n.baseCost}),i=a.filter(t=>!n(t)).sort((t,e)=>{const a=o.a[t],n=o.a[e];if(null==a||null==n)throw new Error("Invalid Augmentation Names");return a.baseRepRequirement-n.baseRepRequirement});return r.concat(i)}();default:return w()}}(),x=C.filter(t=>t===s.a.NeuroFluxGovernor||!e.augmentations.some(e=>e.name===t)&&!e.queuedAugmentations.some(e=>e.name===t)),L=(a,n=!1)=>r.a.createElement(i.a,{augName:a,faction:t.faction,key:a,p:e,rerender:_,owned:n}),O=x.map(t=>L(t));let M=r.a.createElement(r.a.Fragment,null);const T=C.filter(t=>!x.includes(t));return 0!==T.length&&(M=r.a.createElement(r.a.Fragment,null,r.a.createElement("br",null),r.a.createElement(y.a,{variant:"h4"},"Purchased Augmentations"),r.a.createElement(y.a,null,"This faction also offers these augmentations but you already own them."),T.map(t=>L(t,!0)))),r.a.createElement(r.a.Fragment,null,r.a.createElement(g.a,{onClick:t.routeToMainPage},"Back"),r.a.createElement(y.a,{variant:"h4"},"Faction Augmentations"),r.a.createElement(y.a,null,"These are all of the Augmentations that are available to purchase from ",t.faction.name,". Augmentations are powerful upgrades that will enhance your abilities.",r.a.createElement("br",null),"Reputation: ",r.a.createElement(m.a,{reputation:t.faction.playerReputation})," Favor:"," ",r.a.createElement(h.a,{favor:Math.floor(t.faction.favor)})),r.a.createElement(p.a,{display:"flex"},r.a.createElement(b.a,{title:r.a.createElement(y.a,null,"The price of every Augmentation increases for every queued Augmentation and it is reset when you install them.")},r.a.createElement(y.a,null,"Price multiplier: x ",d.a.formatMultiplier(Object(k.c)())))),r.a.createElement(g.a,{onClick:()=>S(l.b.Cost)},"Sort by Cost"),r.a.createElement(g.a,{onClick:()=>S(l.b.Reputation)},"Sort by Reputation"),r.a.createElement(g.a,{onClick:()=>S(l.b.Default)},"Sort by Default Order"),r.a.createElement(g.a,{onClick:()=>S(l.b.Purchasable)},"Sort by Purchasable"),r.a.createElement("br",null),r.a.createElement(v.a,{size:"small",padding:"none"},r.a.createElement(E.a,null,O)),r.a.createElement(v.a,{size:"small",padding:"none"},r.a.createElement(E.a,null,M)))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(105),o=a(1344),s=a(57),l=a(15),c=a(9),f=a(20),u=a(116),m=a(1345),h=a(10),d=a(1),p=a(23),g=a(21),y=a(43),b=a(45);function E(t){const e=s.a[t.augName];return t.hasReq?r.a.createElement(r.a.Fragment,{key:"f"},r.a.createElement(y.b,{key:1},r.a.createElement(d.a,null,r.a.createElement(f.a,{money:t.cost,player:t.p}))),r.a.createElement(y.b,{key:2},r.a.createElement(d.a,{color:t.hasRep?"primary":"error"},"Requires ",r.a.createElement(u.a,{reputation:t.rep})," faction reputation"))):r.a.createElement(y.b,{key:1,colSpan:2},r.a.createElement(d.a,{color:"error"},"Requires"," ",e.prereqs.map((t,e)=>r.a.createElement(m.a,{key:e,name:t}))))}function v(t){const[e,a]=Object(n.useState)(!1),f=s.a[t.augName];if(null==f)throw new Error(`aug ${t.augName} does not exists`);if(null==f)return console.error("Invalid Augmentation when trying to create PurchaseableAugmentation display element: "+t.augName),r.a.createElement(r.a.Fragment,null);const u=f.baseCost*t.faction.getInfo().augmentationPriceMult,m=f.baseRepRequirement*t.faction.getInfo().augmentationRepRequirementMult,v=Object(i.c)(f),k=t.faction.playerReputation>=m,_=0===f.baseCost||t.p.money>f.baseCost*t.faction.getInfo().augmentationPriceMult,w=v&&k&&_?"primary":"error";let S=f.name;f.name===l.a.NeuroFluxGovernor&&(S+=" - Level "+Object(i.b)());let C=r.a.createElement(r.a.Fragment,null);return C="string"==typeof f.info?r.a.createElement(r.a.Fragment,null,r.a.createElement("span",null,f.info),r.a.createElement("br",null),r.a.createElement("br",null),f.stats):r.a.createElement(r.a.Fragment,null,f.info,r.a.createElement("br",null),r.a.createElement("br",null),f.stats),r.a.createElement(b.a,null,!t.owned&&r.a.createElement(y.b,{key:0},r.a.createElement(h.a,{onClick:function(){"error"!==w&&(c.a.SuppressBuyAugmentationConfirmation?(Object(i.g)(f,t.faction),t.rerender()):a(!0))},color:w},"Buy"),r.a.createElement(o.a,{open:e,onClose:()=>a(!1),aug:f,faction:t.faction,rerender:t.rerender})),r.a.createElement(y.b,{key:1},r.a.createElement(g.a,{display:"flex"},r.a.createElement(p.a,{title:r.a.createElement(d.a,null,C),placement:"top"},r.a.createElement(d.a,null,S)))),!t.owned&&r.a.createElement(E,{key:2,augName:t.augName,p:t.p,cost:u,rep:m,hasReq:v,hasRep:k,hasCost:_}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(105),o=a(141),s=a(20),l=a(41),c=a(30),f=a(1),u=a(10);function m(t){const e=c.b.Player(),a=t.faction.getInfo();return r.a.createElement(l.a,{open:t.open,onClose:t.onClose},r.a.createElement(f.a,{variant:"h4"},t.aug.name),r.a.createElement(f.a,null,t.aug.info,r.a.createElement("br",null),r.a.createElement("br",null),t.aug.stats,r.a.createElement("br",null),r.a.createElement("br",null),"Would you like to purchase the ",t.aug.name," Augmentation for ",r.a.createElement(s.a,{money:t.aug.baseCost*a.augmentationPriceMult}),"?",r.a.createElement("br",null),r.a.createElement("br",null)),r.a.createElement(u.a,{autoFocus:!0,onClick:function(){!Object(o.f)(t.aug)&&e.hasAugmentation(t.aug)||(Object(i.g)(t.aug,t.faction),t.rerender(),t.onClose())}},"Purchase"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a(113),i=a(137);const o=Object(r.a)(t=>Object(i.a)({aug:{color:t.colors.combat}}));function s({name:t}){const e=o();return n.createElement("span",{className:e.aug},t)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return y}));var n=a(0),r=a.n(n),i=a(8),o=a(774),s=a(320),l=a(20),c=a(116),f=a(4),u=a(16),m=a(265),h=a(1),d=a(65),p=a(10),g=a(81);function y(t){const[e,a]=Object(n.useState)(null),y=(i.a.DonateMoneyToRepDivisor+"").length-1;function b(){return null!==e&&(!(isNaN(e)||e<=0)&&!(t.p.moneyObject(c.a)({noformat:{whiteSpace:"pre-wrap",lineHeight:"1em"}}));function d(t){const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(a,200);return()=>clearInterval(t)},[]);const l=h(),c=t.faction.getFavorGain();return r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,{classes:{root:l.noformat}},t.factionInfo.infoText),r.a.createElement(f.a,null,"-------------------------"),r.a.createElement(m.a,{display:"flex"},r.a.createElement(u.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,null,"You will have ",r.a.createElement(o.a,{favor:Math.floor(t.faction.favor+c)})," faction favor after installing an Augmentation."),r.a.createElement(s.a,null,"\\(\\huge{r = \\text{total faction reputation}}\\)"),r.a.createElement(s.a,null,"\\(\\huge{favor=1+\\left\\lfloor\\log_{1.02}\\left(\\frac{r+25000}{25500}\\right)\\right\\rfloor}\\)"))},r.a.createElement(f.a,null,"Reputation: ",r.a.createElement(i.a,{reputation:t.faction.playerReputation})))),r.a.createElement(f.a,null,"-------------------------"),r.a.createElement(m.a,{display:"flex"},r.a.createElement(u.a,{title:r.a.createElement(r.a.Fragment,null,r.a.createElement(f.a,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."),r.a.createElement(s.a,null,"\\(\\huge{r = reputation}\\)"),r.a.createElement(s.a,null,"\\(\\huge{\\Delta r = \\Delta r \\times \\frac{100+favor}{100}}\\)"))},r.a.createElement(f.a,null,"Faction Favor: ",r.a.createElement(o.a,{favor:Math.floor(t.faction.favor)})))),r.a.createElement(f.a,null,"-------------------------"),r.a.createElement(f.a,null,"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."))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return u}));var n=a(0),r=a.n(n),i=a(41),o=a(30),s=a(1),l=a(10),c=a(28),f=a(5);function u(t){const e=o.b.Player(),a=o.b.Router();function n(){return[f.a.NiteSec,f.a.TheBlackHand].includes(t.facName)}function u(){e.startGang(t.facName,n()),t.onClose(),a.toGang()}return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(s.a,null,"Would you like to create a new Gang with ",t.facName,"?",r.a.createElement("br",null),r.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.",r.a.createElement("br",null),r.a.createElement("br",null),n()?"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.":"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.",r.a.createElement("br",null),r.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."),r.a.createElement(l.a,{onClick:u,onKeyUp:function(t){t.key===c.a.ENTER&&u()},autoFocus:!0},"Create Gang"))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a.n(n),i=a(1350),o=a(322),s=a(484),l=a(20),c=a(41),f=a(30),u=a(16),m=a(1),h=a(10),d=a(5);function p(t){const e=f.b.Player(),[a,p]=Object(n.useState)(0);function g(){return Math.pow(10,e.sleevesFromCovenant)*s.a}function y(){p(a+1)}let b=!1;e.canAfford(g())||(b=!0),e.sleevesFromCovenant>=s.b&&(b=!0);const E=[];for(let t=0;t=s.b||(e.canAfford(g())?(e.loseMoney(g(),"sleeves"),e.sleevesFromCovenant+=1,e.sleeves.push(new o.a(e)),y()):Object(u.a)("You cannot afford to purchase a Duplicate Sleeve"))}},"Purchase - ",r.a.createElement(l.a,{money:g(),player:e}))),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(m.a,null,"You can also purchase upgrades for your Sleeves. These upgrades are also permanent."),E))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(4),o=a(20),s=a(1),l=a(81),c=a(10),f=a(21),u=a(65);function m(t){const[e,a]=Object(n.useState)(1);function m(){if(isNaN(e))return 1/0;const a=100-t.sleeve.memory;return e>a?1/0:t.sleeve.getMemoryUpgradeCost(e)}const h=m(),d=!t.p.canAfford(h);let p=r.a.createElement(r.a.Fragment,null);return p=isNaN(e)?r.a.createElement(r.a.Fragment,null,"Invalid value"):r.a.createElement(r.a.Fragment,null,"Purchase ",e," memory - ",r.a.createElement(o.a,{money:h,player:t.p})),r.a.createElement(u.a,{sx:{my:1,p:1}},r.a.createElement(s.a,{variant:"h6",color:"primary"},"Upgrade Memory of Sleeve ",t.index),r.a.createElement(s.a,null,"Purchase a memory upgrade for your sleeve. Note that a sleeve's max memory is 100 (current:"," ",i.a.formatSleeveMemory(t.sleeve.memory),")"),r.a.createElement(f.a,{display:"flex",flexDirection:"row",alignItems:"center"},r.a.createElement(s.a,null,"Amount of memory to purchase (must be an integer): "),r.a.createElement(l.a,{onChange:function(e){let n=parseInt(e.target.value);isNaN(n)&&(n=1),n<1&&(n=1);const r=100-t.sleeve.memory;n>r&&(n=r),a(n)},type:"number",value:e})),r.a.createElement("br",null),r.a.createElement(c.a,{disabled:d,onClick:function(){const a=m();t.p.canAfford(a)&&(t.sleeve.upgradeMemory(e),t.p.loseMoney(a,"sleeves"),t.rerender())}},p))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return N}));var n=a(0),r=a.n(n),i=a(4),o=a(24),s=a(6),l=a(82),c=a(222),f=a(39),u=a(183),m=a(20),h=a(30),d=a(219),p=a(1),g=a(21),y=a(114),b=a(1352),E=a.n(b),v=a(41),k=a(145),_=a(43),w=a(45);function S(){const t=h.b.Player();return t.companyName?r.a.createElement(p.a,null,"Employer at which you last worked: ",t.companyName):r.a.createElement(r.a.Fragment,null)}function C(){const t=h.b.Player();return""!==t.companyName?r.a.createElement(p.a,null,"Job you last worked: ",t.jobs[t.companyName]):r.a.createElement(r.a.Fragment,null)}function x(){const t=h.b.Player();return t.jobs&&0!==Object.keys(t.jobs).length?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,"All Employers:"),r.a.createElement("ul",null,Object.keys(t.jobs).map(t=>r.a.createElement(p.a,{key:t}," * ",t)))):r.a.createElement(r.a.Fragment,null)}function L(){const t=h.b.Player();return 9===t.bitNodeN||l.a[9]>0?r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,`Hacknet Servers owned: ${t.hacknetNodes.length} / ${f.b.MaxServers}`),r.a.createElement("br",null)):r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,null,"Hacknet Nodes owned: "+t.hacknetNodes.length),r.a.createElement("br",null))}function O(){const t=h.b.Player();return t.intelligence>0&&(5===t.bitNodeN||l.a[5]>0)?r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,null,"Intelligence: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,null,i.a.formatSkill(t.intelligence)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.intelligence_exp)," exp)"))):r.a.createElement(r.a.Fragment,null)}function M(t){return r.a.createElement(r.a.Fragment,null,r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(k.a,null,t.rows.map(t=>r.a.createElement(w.a,{key:t[0]},r.a.createElement(_.b,{key:"0"},r.a.createElement(p.a,{noWrap:!0},t[0]+" multiplier:"," ")),r.a.createElement(_.b,{key:"1",align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatPercentage(t[1]))),function(t){return l.a[5]>0&&t.length>2&&t[1]!=t[2]?r.a.createElement(_.b,{key:"2",align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatPercentage(t[2]),")")):r.a.createElement(r.a.Fragment,null)}(t))))))}function T(){const t=h.b.Player();return t.canAccessBladeburner()?r.a.createElement(M,{rows:[["Bladeburner Success Chance",t.bladeburner_success_chance_mult],["Bladeburner Max Stamina",t.bladeburner_max_stamina_mult],["Bladeburner Stamina Gain",t.bladeburner_stamina_gain_mult],["Bladeburner Field Analysis",t.bladeburner_analysis_mult]]}):r.a.createElement(r.a.Fragment,null)}function A(){const t=h.b.Player();if(t.sourceFiles.length>0){const e="BitNode"+t.bitNodeN;return r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h4"},"BitNode ",t.bitNodeN,": ",d.a[e].name),r.a.createElement(p.a,{sx:{mx:2},style:{whiteSpace:"pre-wrap",overflowWrap:"break-word"}},d.a[e].info))}return r.a.createElement(r.a.Fragment,null)}function R({open:t,onClose:e}){const a=h.b.Player();function n(t){const e=[["Total:",r.a.createElement(m.a,{money:t.total})]];return t.augmentations&&e.push(["Augmentations:",r.a.createElement(m.a,{money:t.augmentations})]),t.bladeburner&&e.push(["Bladeburner:",r.a.createElement(m.a,{money:t.bladeburner})]),t.casino&&e.push(["Casino:",r.a.createElement(m.a,{money:t.casino})]),t.codingcontract&&e.push(["Coding Contracts:",r.a.createElement(m.a,{money:t.codingcontract})]),t.work&&e.push(["Company Work:",r.a.createElement(m.a,{money:t.work})]),t.class&&e.push(["Class:",r.a.createElement(m.a,{money:t.class})]),t.corporation&&e.push(["Corporation:",r.a.createElement(m.a,{money:t.corporation})]),t.crime&&e.push(["Crimes:",r.a.createElement(m.a,{money:t.crime})]),t.gang&&e.push(["Gang:",r.a.createElement(m.a,{money:t.gang})]),t.hacking&&e.push(["Hacking:",r.a.createElement(m.a,{money:t.hacking})]),t.hacknet&&e.push(["Hacknet Nodes:",r.a.createElement(m.a,{money:t.hacknet})]),t.hacknet_expenses&&e.push(["Hacknet Nodes Expenses:",r.a.createElement(m.a,{money:t.hacknet_expenses})]),t.hospitalization&&e.push(["Hospitalization:",r.a.createElement(m.a,{money:t.hospitalization})]),t.infiltration&&e.push(["Infiltration:",r.a.createElement(m.a,{money:t.infiltration})]),t.servers&&e.push(["Servers:",r.a.createElement(m.a,{money:t.servers})]),t.stock&&e.push(["Stock Market:",r.a.createElement(m.a,{money:t.stock})]),t.sleeves&&e.push(["Sleeves:",r.a.createElement(m.a,{money:t.sleeves})]),t.other&&e.push(["Other:",r.a.createElement(m.a,{money:t.other})]),r.a.createElement(u.a,{rows:e,wide:!0})}let i=r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h6",color:"primary"},"Money earned since you last installed Augmentations"),r.a.createElement("br",null),n(a.moneySourceA));return 0!==a.sourceFiles.length&&(i=r.a.createElement(r.a.Fragment,null,i,r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h6",color:"primary"},"Money earned in this BitNode"),r.a.createElement("br",null),n(a.moneySourceB))),r.a.createElement(v.a,{open:t,onClose:e},i)}function N(){const t=h.b.Player(),[e,a]=Object(n.useState)(!1),l=Object(n.useState)(!1)[1];function f(){l(t=>!t)}Object(n.useEffect)(()=>{const t=setInterval(f,200);return()=>clearInterval(t)},[]);const d=[["Time played since last Augmentation:",Object(o.b)(t.playtimeSinceLastAug)]];return t.sourceFiles.length>0&&d.push(["Time played since last Bitnode destroyed:",Object(o.b)(t.playtimeSinceLastBitnode)]),d.push(["Total Time played:",Object(o.b)(t.totalPlaytime)]),r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{variant:"h4"},"General"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(p.a,null,"Current City: ",t.city),r.a.createElement(S,null),r.a.createElement(C,null),r.a.createElement(x,null),r.a.createElement(p.a,null,"Money: ",r.a.createElement(m.a,{money:t.money}),r.a.createElement(y.a,{onClick:()=>a(!0)},r.a.createElement(E.a,{color:"info"})))),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h4"},"Stats"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(_.a,{size:"small",padding:"none"},r.a.createElement(k.a,null,r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Hacking: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.hacking)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.hacking_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Strength: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.strength)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.strength_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Defense: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.defense)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.defense_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Dexterity: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.dexterity)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.dexterity_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Agility: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.agility)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.agility_exp)," exp)"))),r.a.createElement(w.a,null,r.a.createElement(_.b,null,r.a.createElement(p.a,{noWrap:!0},"Charisma: ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},i.a.formatSkill(t.charisma)," ")),r.a.createElement(_.b,{align:"right"},r.a.createElement(p.a,{noWrap:!0},"(",i.a.formatExp(t.charisma_exp)," exp)"))),r.a.createElement(O,null))),r.a.createElement("br",null)),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h4"},"Multipliers"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(M,{rows:[["Hacking Chance",t.hacking_chance_mult],["Hacking Speed",t.hacking_speed_mult],["Hacking Money",t.hacking_money_mult,t.hacking_money_mult*s.a.ScriptHackMoney],["Hacking Growth",t.hacking_grow_mult,t.hacking_grow_mult*s.a.ServerGrowthRate]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Hacking Level",t.hacking_mult,t.hacking_mult*s.a.HackingLevelMultiplier],["Hacking Experience",t.hacking_exp_mult,t.hacking_exp_mult*s.a.HackExpGain]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Strength Level",t.strength_mult,t.strength_mult*s.a.StrengthLevelMultiplier],["Strength Experience",t.strength_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Defense Level",t.defense_mult,t.defense_mult*s.a.DefenseLevelMultiplier],["Defense Experience",t.defense_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Dexterity Level",t.dexterity_mult,t.dexterity_mult*s.a.DexterityLevelMultiplier],["Dexterity Experience",t.dexterity_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Agility Level",t.agility_mult,t.agility_mult*s.a.AgilityLevelMultiplier],["Agility Experience",t.agility_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Charisma Level",t.charisma_mult,t.charisma_mult*s.a.CharismaLevelMultiplier],["Charisma Experience",t.charisma_exp_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Hacknet Node production",t.hacknet_node_money_mult,t.hacknet_node_money_mult*s.a.HacknetNodeMoney],["Hacknet Node purchase cost",t.hacknet_node_purchase_cost_mult],["Hacknet Node RAM upgrade cost",t.hacknet_node_ram_cost_mult],["Hacknet Node Core purchase cost",t.hacknet_node_core_cost_mult],["Hacknet Node level upgrade cost",t.hacknet_node_level_cost_mult]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Company reputation gain",t.company_rep_mult],["Faction reputation gain",t.faction_rep_mult,t.faction_rep_mult*s.a.FactionWorkRepGain],["Salary",t.work_money_mult,t.work_money_mult*s.a.CompanyWorkMoney]]}),r.a.createElement("br",null),r.a.createElement(M,{rows:[["Crime success",t.crime_success_mult],["Crime money",t.crime_money_mult,t.crime_money_mult*s.a.CrimeMoney]]}),r.a.createElement("br",null),r.a.createElement(T,null)),r.a.createElement("br",null),r.a.createElement(p.a,{variant:"h4"},"Misc"),r.a.createElement(g.a,{sx:{mx:2}},r.a.createElement(p.a,null,`Servers owned: ${t.purchasedServers.length} / ${Object(c.b)()}`),r.a.createElement(L,null),r.a.createElement(p.a,null,"Augmentations installed: "+t.augmentations.length),r.a.createElement(u.a,{rows:d})),r.a.createElement("br",null),r.a.createElement(A,null),r.a.createElement(R,{open:e,onClose:()=>a(!1)}))}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(1354),o=a(1355);function s(t){const e=Object(n.useState)(!1)[1];function a(){e(t=>!t)}return Object(n.useEffect)(()=>{const t=setInterval(a,200);return()=>clearInterval(t)},[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,{initStockMarket:t.initStockMarket,p:t.p,rerender:a}),t.p.hasWseAccount&&r.a.createElement(o.a,{buyStockLong:t.buyStockLong,buyStockShort:t.buyStockShort,cancelOrder:t.cancelOrder,eventEmitterForReset:t.eventEmitterForReset,p:t.p,placeOrder:t.placeOrder,sellStockLong:t.sellStockLong,sellStockShort:t.sellStockShort,stockMarket:t.stockMarket}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return w}));var n=a(0),r=a.n(n),i=a(227),o=a(8),s=a(20),l=a(1),c=a(120),f=a(10),u=a(23),m=a(114),h=a(294),d=a.n(h),p=a(321),g=a.n(p),y=a(453),b=a(5);function E(t){if(t.p.has4SDataTixApi)return r.a.createElement(l.a,null,"Market Data TIX API Access ",r.a.createElement(g.a,null));{const e=Object(i.b)();return r.a.createElement(u.a,{title:t.p.hasTixApiAccess?r.a.createElement(l.a,null,"Let you access 4S Market Data through Netscript"):r.a.createElement(l.a,null,"Requires TIX API Access")},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!t.p.hasTixApiAccess||!t.p.canAfford(e),onClick:function(){t.p.has4SDataTixApi||t.p.canAfford(Object(i.b)())&&(t.p.has4SDataTixApi=!0,t.p.loseMoney(Object(i.b)(),"stock"),t.rerender())}},"Buy 4S Market Data TIX API Access - ",r.a.createElement(s.a,{money:e,player:t.p}))))}}function v(t){if(t.p.hasWseAccount)return r.a.createElement(l.a,null,"WSE Account ",r.a.createElement(g.a,null));const e=o.a.WSEAccountCost;return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"To begin trading, you must first purchase an account:"),r.a.createElement(f.a,{disabled:!t.p.canAfford(e),onClick:function(){t.p.hasWseAccount||t.p.canAfford(o.a.WSEAccountCost)&&(t.p.hasWseAccount=!0,t.initStockMarket(),t.p.loseMoney(o.a.WSEAccountCost,"stock"),t.rerender())}},"Buy WSE Account - ",r.a.createElement(s.a,{money:e,player:t.p})))}function k(t){if(t.p.hasTixApiAccess)return r.a.createElement(l.a,null,"TIX API Access ",r.a.createElement(g.a,null));{const e=o.a.TIXAPICost;return r.a.createElement(f.a,{disabled:!t.p.canAfford(e)||!t.p.hasWseAccount,onClick:function(){t.p.hasTixApiAccess||t.p.canAfford(o.a.TIXAPICost)&&(t.p.hasTixApiAccess=!0,t.p.loseMoney(o.a.TIXAPICost,"stock"),t.rerender())}},"Buy Trade Information eXchange (TIX) API Access - ",r.a.createElement(s.a,{money:e,player:t.p}))}}function _(t){if(t.p.has4SData)return r.a.createElement(l.a,null,"4S Market Data Access ",r.a.createElement(g.a,null));{const e=Object(i.a)();return r.a.createElement(u.a,{title:r.a.createElement(l.a,null,"Lets you view additional pricing and volatility information about stocks")},r.a.createElement("span",null,r.a.createElement(f.a,{disabled:!t.p.canAfford(e)||!t.p.hasWseAccount,onClick:function(){t.p.has4SData||t.p.canAfford(Object(i.a)())&&(t.p.has4SData=!0,t.p.loseMoney(Object(i.a)(),"stock"),t.rerender())}},"Buy 4S Market Data Access - ",r.a.createElement(s.a,{money:e,player:t.p}))))}}function w(t){const[e,a]=Object(n.useState)(!1);return r.a.createElement(r.a.Fragment,null,r.a.createElement(l.a,null,"Welcome to the World Stock Exchange (WSE)!"),r.a.createElement(c.a,{href:"https://bitburner.readthedocs.io/en/latest/basicgameplay/stockmarket.html",target:"_blank"},r.a.createElement(l.a,null,"Investopedia")),r.a.createElement("br",null),r.a.createElement(v,t),r.a.createElement(l.a,{variant:"h5",color:"primary"},"Trade Information eXchange (TIX) API"),r.a.createElement(l.a,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."),r.a.createElement(k,t),r.a.createElement(l.a,{variant:"h5",color:"primary"},b.a.FourSigma," (4S) Market Data Feed"),r.a.createElement(l.a,null,b.a.FourSigma,"'s (4S) Market Data Feed provides information about stocks that will help your trading strategies.",r.a.createElement(m.a,{onClick:()=>a(!0)},r.a.createElement(d.a,null))),r.a.createElement(E,t),r.a.createElement(_,t),r.a.createElement(l.a,null,"Commission Fees: Every transaction you make has a"," ",r.a.createElement(s.a,{money:o.a.StockMarketCommission,player:t.p})," commission fee."),r.a.createElement("br",null),r.a.createElement(l.a,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!"),r.a.createElement(y.a,{open:e,onClose:()=>a(!1)},r.a.createElement(l.a,null,"Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility",r.a.createElement("br",null),r.a.createElement("br",null),"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.",r.a.createElement("br",null),r.a.createElement("br",null),"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).",r.a.createElement("br",null),r.a.createElement("br",null),"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.")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(1356),o=a(430),s=a(148);function l(t){const e=Object(n.useState)(!1)[1],[a,l]=Object(n.useState)(o.b.AllStocks),[c,f]=Object(n.useState)([]);function u(){e(t=>!t)}const m=[];for(const e of Object.keys(t.stockMarket)){const n=t.stockMarket[e];if(n instanceof s.a){if(c.length>0&&!c.includes(n.symbol))continue;let e=t.stockMarket.Orders[n.symbol];if(null==e&&(e=[]),a===o.b.Portfolio&&0===n.playerShares&&0===n.playerShortShares&&0===e.length)continue;m.push(r.a.createElement(i.a,{buyStockLong:t.buyStockLong,buyStockShort:t.buyStockShort,cancelOrder:t.cancelOrder,key:n.symbol,orders:e,p:t.p,placeOrder:t.placeOrder,rerenderAllTickers:u,sellStockLong:t.sellStockLong,sellStockShort:t.sellStockShort,stock:n}))}}return r.a.createElement(r.a.Fragment,null,r.a.createElement(o.a,{changeDisplayMode:function(){a===o.b.AllStocks?l(o.b.Portfolio):l(o.b.AllStocks)},changeWatchlistFilter:function(t){const e=t.target.value.replace(/\s/g,"");f(""!==e?e.split(","):[])},tickerDisplayMode:a}),m)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return T}));var n,r=a(0),i=a.n(r),o=a(1357),s=a(1358),l=a(1360),c=a(533),f=a(1361),u=a(226),m=a(112),h=a(76),d=a(82),p=a(4),g=a(20),y=a(16),b=a(21),E=a(81),v=a(79),k=a(128),_=a(330),w=a(107),S=a(65),C=a(211),x=a(75),L=a.n(x),O=a(156),M=a.n(O);function T(t){const[e,a]=Object(r.useState)(n.Market),[x,O]=Object(r.useState)(h.a.Long),[T,A]=Object(r.useState)(""),[R,N]=Object(r.useState)(!1),[P,I]=Object(r.useState)(!1),[F,D]=Object(r.useState)({text:"",placeText:"",place:()=>!1});function j(){return Math.round(parseFloat(T))}function B(){return 8===t.p.bitNodeN||d.a[8]>=3}return i.a.createElement(b.a,{component:S.a},i.a.createElement(_.a,{onClick:()=>I(t=>!t)},i.a.createElement(w.a,{primary:i.a.createElement(o.a,{p:t.p,stock:t.stock})}),P?i.a.createElement(M.a,{color:"primary"}):i.a.createElement(L.a,{color:"primary"})),i.a.createElement(C.a,{in:P,unmountOnExit:!0},i.a.createElement(b.a,{sx:{mx:4}},i.a.createElement(b.a,{display:"flex",alignItems:"center"},i.a.createElement(E.a,{onChange:function(t){A(t.target.value)},placeholder:"Quantity (Shares)",value:T}),i.a.createElement(k.a,{onChange:function(t){t.target.value===h.a.Short?O(h.a.Short):O(h.a.Long)},value:x},i.a.createElement(v.a,{value:h.a.Long},"Long"),(8===t.p.bitNodeN||d.a[8]>=2)&&i.a.createElement(v.a,{value:h.a.Short},"Short")),i.a.createElement(k.a,{onChange:function(t){switch(t.target.value){case n.Limit:a(n.Limit);break;case n.Stop:a(n.Stop);break;case n.Market:default:a(n.Market)}},value:e},i.a.createElement(v.a,{value:n.Market},n.Market),B()&&i.a.createElement(v.a,{value:n.Limit},n.Limit),B()&&i.a.createElement(v.a,{value:n.Stop},n.Stop)),i.a.createElement(c.a,{onClick:function(){const a=j();if(isNaN(a))Object(y.a)("Invalid input for quantity (number of shares): "+T);else switch(e){case n.Market:x===h.a.Short?t.buyStockShort(t.stock,a):t.buyStockLong(t.stock,a),t.rerenderAllTickers();break;case n.Limit:N(!0),D({text:"Enter the price for your Limit Order",placeText:"Place Buy Limit Order",place:e=>t.placeOrder(t.stock,a,e,m.a.LimitBuy,x)});break;case n.Stop:N(!0),D({text:"Enter the price for your Stop Order",placeText:"Place Buy Stop Order",place:e=>t.placeOrder(t.stock,a,e,m.a.StopBuy,x)})}},text:"Buy",tooltip:function(){const e=t.stock,a=j();if(isNaN(a))return null;const n=Object(u.b)(e,a,x);return null==n?null:i.a.createElement(i.a.Fragment,null,"Purchasing ",p.a.formatShares(a)," shares (",x===h.a.Long?"Long":"Short",") will cost ",i.a.createElement(g.a,{money:n}),".")}()}),i.a.createElement(c.a,{onClick:function(){const a=j();if(isNaN(a))Object(y.a)("Invalid input for quantity (number of shares): "+T);else switch(e){case n.Market:x===h.a.Short?t.sellStockShort(t.stock,a):t.sellStockLong(t.stock,a),t.rerenderAllTickers();break;case n.Limit:N(!0),D({text:"Enter the price for your Limit Order",placeText:"Place Sell Limit Order",place:e=>t.placeOrder(t.stock,a,e,m.a.LimitSell,x)});break;case n.Stop:N(!0),D({text:"Enter the price for your Stop Order",placeText:"Place Sell Stop Order",place:e=>t.placeOrder(t.stock,a,e,m.a.StopSell,x)})}},text:"Sell",tooltip:function(){const e=t.stock,a=j();if(isNaN(a))return null;if(x===h.a.Long){if(a>e.playerShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Long position")}else if(a>e.playerShortShares)return i.a.createElement(i.a.Fragment,null,"You do not have this many shares in the Short position");const n=Object(u.c)(e,a,x);return null==n?null:i.a.createElement(i.a.Fragment,null,"Selling ",p.a.formatShares(a)," shares (",x===h.a.Long?"Long":"Short",") will result in a gain of ",i.a.createElement(g.a,{money:n}),".")}()}),i.a.createElement(c.a,{onClick:function(){const a=t.p.money,r=t.stock;let i=Object(u.a)(r,x,a);switch(i=Math.min(i,Math.round(r.maxShares-r.playerShares-r.playerShortShares)),e){case n.Market:x===h.a.Short?t.buyStockShort(r,i):t.buyStockLong(r,i),t.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Buy Max' only works for Market Orders")}},text:"Buy MAX"}),i.a.createElement(c.a,{onClick:function(){const a=t.stock;switch(e){case n.Market:x===h.a.Short?t.sellStockShort(a,a.playerShortShares):t.sellStockLong(a,a.playerShares),t.rerenderAllTickers();break;default:Object(y.a)("ERROR: 'Sell All' only works for Market Orders")}},text:"Sell ALL"})),i.a.createElement(l.a,{p:t.p,stock:t.stock}),i.a.createElement(s.a,{cancelOrder:t.cancelOrder,orders:t.orders,p:t.p,stock:t.stock}),i.a.createElement(f.a,{text:F.text,placeText:F.placeText,place:F.place,open:R,onClose:()=>N(!1)}))))}!function(t){t.Market="Market Order",t.Limit="Limit Order",t.Stop="Stop Order"}(n||(n={}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a(775),i=a(9),o=a(4),s=a(1);const l=["cs","lv","pl","ru"];function c(t){const e=t.stock,a=o.a.formatMoney(e.price),c=l.includes(i.a.Locale)?15:12,f=" ".repeat(1+r.a.longestName-e.name.length+(r.a.longestSymbol-e.symbol.length)),u=" ".repeat(c-a.length);let m=`${e.name}${f}${e.symbol} -${u}${a}`;if(t.p.has4SData){m+=` - Volatility: ${o.a.formatPercentage(e.mv/100)} - Price Forecast: `;let t=e.b;e.otlkMag<0&&(t=!t),m+=(t?"+":"-").repeat(Math.floor(Math.abs(e.otlkMag)/10)+1)}let h="primary";return e.lastPrice===e.price?h="secondary":e.lastPrice>e.price&&(h="error"),n.createElement(s.a,{style:{whiteSpace:"pre"},color:h},m)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(0),r=a(1359);function i(t){const e=[];for(let a=0;a=2?n.createElement(n.Fragment,null,n.createElement(c.a,{display:"flex"},n.createElement(l.a,{title:n.createElement(s.a,null,"Shares in the short position will increase in value if the price of the corresponding stock decreases")},n.createElement(s.a,{variant:"h5",color:"primary"},"Short Position:"))),n.createElement(s.a,null,"Shares: ",r.a.formatShares(e.playerShortShares)),n.createElement(s.a,null,"Average Price: ",n.createElement(i.a,{money:e.playerAvgShortPx})," (Total Cost: ",n.createElement(i.a,{money:a}),")"),n.createElement(s.a,null,"Profit: ",n.createElement(i.a,{money:f})," (",r.a.formatPercentage(u),")")):n.createElement(n.Fragment,null)}function m(t){const e=t.stock;return n.createElement(n.Fragment,null,n.createElement(s.a,null,"Max Shares: ",r.a.formatShares(e.maxShares)),n.createElement(s.a,null,"Ask Price: ",n.createElement(i.a,{money:e.getAskPrice()})),n.createElement("br",null),n.createElement(s.a,null,"Bid Price: ",n.createElement(i.a,{money:e.getBidPrice()})),n.createElement(f,t),n.createElement(u,t))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(41),o=a(1),s=a(81),l=a(10);function c(t){const[e,a]=Object(n.useState)(null);return r.a.createElement(i.a,{open:t.open,onClose:t.onClose},r.a.createElement(o.a,null,t.text),r.a.createElement(s.a,{autoFocus:!0,type:"number",onChange:function(t){""===t.target.value?a(null):a(parseFloat(t.target.value))},placeholder:"price",InputProps:{endAdornment:r.a.createElement(l.a,{onClick:function(){null!==e&&(isNaN(e)||(t.place(e),t.onClose()))}},t.placeText)}}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(82),o=a(219),s=a(299),l=a(1363),c=a(470),f=a(30),u=a(113),m=a(137),h=a(114),d=a(1),p=a(23),g=a(9),y=a(10);const b=Object(u.a)(()=>Object(m.a)({portal:{cursor:"pointer",fontFamily:"inherit",fontSize:"1rem",fontWeight:"bold",lineHeight:1,padding:0,"&:hover":{color:"#fff"}},level0:{color:"red"},level1:{color:"yellow"},level2:{color:"#48d1cc"},level3:{color:"blue"}}));function E(t){const[e,a]=Object(n.useState)(!1),i=b(),s=o.a["BitNode"+t.n];if(null==s)return r.a.createElement(r.a.Fragment,null,"O");let c=i.level0;return 12===t.n&&t.level>=2?c=i.level2:1===t.level?c=i.level1:3===t.level&&(c=i.level3),2===t.level&&(c=i.level2),c=`${i.portal} ${c}`,r.a.createElement(r.a.Fragment,null,r.a.createElement(p.a,{title:r.a.createElement(d.a,null,r.a.createElement("strong",null,"BitNode-",s.number.toString(),": ",s.name),r.a.createElement("br",null),s.desc)},g.a.DisableASCIIArt?r.a.createElement(y.a,{onClick:()=>a(!0),sx:{m:2},"aria-description":s.desc},r.a.createElement(d.a,null,"BitNode-",s.number.toString(),": ",s.name)):r.a.createElement(h.a,{onClick:()=>a(!0),className:c,"aria-label":`BitNode-${s.number.toString()}: ${s.name}`,"aria-description":s.desc},"O")),r.a.createElement(l.a,{open:e,onClose:()=>a(!1),n:t.n,level:t.level,enter:t.enter,destroyedBitNode:t.destroyedBitNode,flume:t.flume}),g.a.DisableASCIIArt&&r.a.createElement("br",null))}function v(t){Object(s.c)(!0);const e=f.b.Player(),a=s.a,l=e.bitNodeN,[u,m]=Object(n.useState)(!t.quick),h=i.a.slice();return t.flume||h[l]<3&&++h[l],u?r.a.createElement(c.a,{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-${l}...`,"...........","...........","[ERROR] FAILED TO AUTOMATICALLY REBOOT BITNODE","..............................................","..............................................","..............................................","..............................................","..............................................",".............................................."],onDone:()=>m(!1),auto:!0}):g.a.DisableASCIIArt?r.a.createElement(r.a.Fragment,null,Object.values(o.a).filter(t=>(console.log(t.desc),"COMING SOON"!==t.desc)).map(e=>r.a.createElement(E,{key:e.number,n:e.number,level:h[e.number],enter:a,flume:t.flume,destroyedBitNode:l})),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestrial 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)"]})):r.a.createElement(r.a.Fragment,null,r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | O O | O O | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | / __| \\ | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | O | | O / | O | | O | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | |_/ |/ | \\_ \\_| | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," O | | | O | | O__/ | / \\__ | | O | | | O "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | / /| O / \\| | | | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"O | | | \\| | O / _/ | / O | |/ | | | O"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | | |O / | | O / | O O | | \\ O| | | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}},"| | |/ \\/ / __| | |/ \\ | \\ | |__ \\ \\/ \\| | |"),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| O | |_/ |\\| \\ ",r.a.createElement(E,{n:13,level:h[13],enter:a,flume:t.flume,destroyedBitNode:l})," \\__| \\_| | O |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | |_/ | | \\| / | \\_| | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| / \\| | / / \\ |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | ",r.a.createElement(E,{n:10,level:h[10],enter:a,flume:t.flume,destroyedBitNode:l})," | | / | ",r.a.createElement(E,{n:11,level:h[11],enter:a,flume:t.flume,destroyedBitNode:l})," | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(E,{n:9,level:h[9],enter:a,flume:t.flume,destroyedBitNode:l})," | | | | | | | ",r.a.createElement(E,{n:12,level:h[12],enter:a,flume:t.flume,destroyedBitNode:l})," "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | / / \\ \\ | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| | / ",r.a.createElement(E,{n:7,level:h[7],enter:a,flume:t.flume,destroyedBitNode:l})," / \\ ",r.a.createElement(E,{n:8,level:h[8],enter:a,flume:t.flume,destroyedBitNode:l})," \\ | |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ | / / | | \\ \\ | / "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\JUMP ",r.a.createElement(E,{n:5,level:h[5],enter:a,flume:t.flume,destroyedBitNode:l}),"3R | | | | | | R3",r.a.createElement(E,{n:6,level:h[6],enter:a,flume:t.flume,destroyedBitNode:l})," PMUJ/ / "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\|| | | | | | | | | ||/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\| \\_ | | | | | | _/ |/ "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\ \\| / \\ / \\ |/ / "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," ",r.a.createElement(E,{n:1,level:h[1],enter:a,flume:t.flume,destroyedBitNode:l})," |/ ",r.a.createElement(E,{n:2,level:h[2],enter:a,flume:t.flume,destroyedBitNode:l})," | | ",r.a.createElement(E,{n:3,level:h[3],enter:a,flume:t.flume,destroyedBitNode:l})," \\| ",r.a.createElement(E,{n:4,level:h[4],enter:a,flume:t.flume,destroyedBitNode:l})," "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," | | | | | | | | "),r.a.createElement(d.a,{sx:{lineHeight:"1em",whiteSpace:"pre"}}," \\JUMP3R|JUMP|3R| |R3|PMUJ|R3PMUJ/ "),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{lines:["> Many decades ago, a humanoid extraterrestrial 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)"]}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(219),o=a(30),s=a(41),l=a(1),c=a(10);function f(t){const e=o.b.Router(),a="BitNode"+t.n,n=i.a[a];if(null==n)throw new Error("Could not find BitNode object for number: "+t.n);const f=12===t.n?"∞":"3",u=Math.min(t.level+1,12===t.n?1/0:3);return r.a.createElement(s.a,{open:t.open,onClose:t.onClose},r.a.createElement(l.a,{variant:"h4"},"BitNode-",t.n,": ",n.name),r.a.createElement("br",null),r.a.createElement(l.a,null,"Source-File Level: ",t.level," / ",f),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null," Difficulty: ",["easy","normal","hard"][n.difficulty]),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(l.a,null,n.info),r.a.createElement("br",null),r.a.createElement("br",null),r.a.createElement(c.a,{"aria-label":"enter-bitnode-"+n.number.toString(),autoFocus:!0,onClick:()=>{t.enter(e,t.flume,t.destroyedBitNode,t.n),t.onClose()}},"Enter BN",t.n,".",u))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(0),r=a.n(n),i=a(1);function o(t){const[e,a]=Object(n.useState)(0),[o,s]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{if(o&&t.onDone)return void t.onDone();let n=!1;return(async()=>{var r;await(r=10,new Promise(t=>setTimeout(t,r))).then(()=>!n&&function(){const n=e+1;a(n),s(n>=t.text.length)}())})(),()=>{n=!0}}),r.a.createElement(r.a.Fragment,null,r.a.createElement(i.a,null,t.text.slice(0,e),!o&&r.a.createElement("span",null,"█")))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(0),r=a.n(n),i=a(24),o=a(8),s=a(586),l=a(1366),c=a(1);function f({staneksGift:t}){const e=Object(n.useState)(!0)[1];function a(){e(t=>!t)}return Object(n.useEffect)(()=>s.a.subscribe(a),[]),r.a.createElement(r.a.Fragment,null,r.a.createElement(c.a,{variant:"h4"},"Stanek's Gift"),r.a.createElement(c.a,null,"The gift is a grid on which you can place upgrades called fragments. The main type of fragment increases a stat, like your hacking skill or agility exp. Once a stat fragment is placed it then needs to be charged via scripts in order to become useful. The other kind of fragments are called booster fragments. They increase the efficiency of the neighboring fragments (not diagonally). Use Q/E to rotate fragments."),t.storedCycles>5&&r.a.createElement(c.a,null,"Bonus time: ",Object(i.b)(o.a._idleSpeed*t.storedCycles)),r.a.createElement(l.a,{gift:t}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return p}));var n=a(0),r=a(243),i=a(78),o=a(631),s=a(1367),l=a(1368),c=a(21),f=a(10),u=a(45),m=a(145),h=a(43);function d(t){const e=[];for(let a=0;ar.length-1||a+t>r[e+i].length-1||(r[e+i][a+t]=1));y(r)}function C(a,n){if(_.type!=i.b.None){if(_.type==i.b.Delete)!function(e,a){const n=t.gift.fragmentAt(e,a);void 0!==n&&t.gift.delete(n.x,n.y)}(a,n);else{if(!t.gift.canPlace(a,n,v,_))return;t.gift.place(a,n,v,_)}p(e(t.gift))}}function x(e,n){if(g[e][n]&&a[e][n])return"red";if(g[e][n])return"white";if(a[e][n]){const a=t.gift.fragmentAt(e,n);if(!a)throw new Error("ActiveFragment should not be null");return function(t){let e=Math.pow((t.x+1)*(t.y+1),10),a=e,n=e;const r=[];for(let t=0;t<3;t++)e=171*e%30269,a=172*a%30307,n=170*n%30323,r.push((e/30269+a/30307+n/30323)%1);return`rgb(${256*r[0]}, ${256*r[1]}, ${256*r[2]})`}(a)}return""}const L=[];for(let e=0;eS(r,e,v),onClick:()=>C(r,e),color:x(r,e)}));L.push(n.createElement(u.a,{key:e,className:"staneksgift_row"},a))}return n.useEffect(()=>{function t(t){if("q"===t.key){const t=(v-1+4)%4;k(t),S(b[0],b[1],t)}if("e"===t.key){const t=(v+1)%4;k(t),S(b[0],b[1],t)}}return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)}),n.createElement(n.Fragment,null,n.createElement(f.a,{onClick:function(){t.gift.clear(),p(d([t.gift.width(),t.gift.height()]))}},"Clear"),n.createElement(c.a,{display:"flex"},n.createElement(h.a,null,n.createElement(m.a,null,L)),n.createElement(s.a,{gift:t.gift,x:b[0],y:b[1],fragment:t.gift.fragmentAt(b[0],b[1])})),n.createElement(l.a,{gift:t.gift,selectFragment:function(e){w(e);const a=d([t.gift.width(),t.gift.height()]);y(a)}}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return c}));var n=a(0),r=a.n(n),i=a(78),o=a(4),s=a(65),l=a(1);function c(t){const[,e]=Object(n.useState)(new Date);if(Object(n.useEffect)(()=>{const t=setInterval(()=>e(new Date),250);return()=>clearInterval(t)},[]),void 0===t.fragment)return r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"Magnitude: N/A",r.a.createElement("br",null),"Charge: N/A",r.a.createElement("br",null),"Heat: N/A",r.a.createElement("br",null),"Effect: N/A",r.a.createElement("br",null),"[X, Y] N/A",r.a.createElement("br",null),"[X, Y] ",t.x,", ",t.y));const a=t.fragment.fragment();let c=o.a.formatStaneksGiftCharge(t.fragment.highestCharge*t.fragment.numCharge),f="N/A";return[i.b.Booster,i.b.None,i.b.Delete].includes(a.type)?(c="N/A",f=a.power+"x adjacent fragment power"):f=Object(i.a)(a.type).replace(/-*x%/,o.a.formatPercentage(t.gift.effect(t.fragment)-1)),r.a.createElement(s.a,null,r.a.createElement(l.a,null,"ID: ",t.fragment.id,r.a.createElement("br",null),"Effect: ",f,r.a.createElement("br",null),"Base Power: ",o.a.formatStaneksGiftPower(a.power),r.a.createElement("br",null),"Charge: ",c,r.a.createElement("br",null),r.a.createElement("br",null),"root [X, Y] ",t.fragment.x,", ",t.fragment.y,r.a.createElement("br",null),"[X, Y] ",t.x,", ",t.y))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(243),o=a(78),s=a(1369),l=a(4),c=a(128),f=a(79),u=a(1),m=a(21);function h(t){const e=t.fragment.limit-t.gift.count(t.fragment),a=t.fragment.limit!==1/0?r.a.createElement(r.a.Fragment,null,e," remaining"):r.a.createElement(r.a.Fragment,null);return r.a.createElement(m.a,{display:"flex"},r.a.createElement(m.a,{sx:{mx:2}},r.a.createElement(s.a,{width:t.fragment.width(0),height:t.fragment.height(0),colorAt:(a,n)=>t.fragment.fullAt(a,n,0)?0===e?"grey":t.fragment.type===o.b.Booster?"blue":"green":""})),r.a.createElement(u.a,null,t.fragment.type===o.b.Booster?t.fragment.power+"x adjacent fragment power":Object(o.a)(t.fragment.type),r.a.createElement("br",null),"power: ",l.a.formatStaneksGiftPower(t.fragment.power),r.a.createElement("br",null),a))}function d(t){const[e,a]=Object(n.useState)("None");return r.a.createElement(c.a,{sx:{width:"100%"},onChange:function(e){const n=e.target.value;if(a(n),"None"===n)return void t.selectFragment(i.d);if("Delete"===n)return void t.selectFragment(i.a);const r=i.c.find(t=>t.id===n);if(void 0===r)throw new Error("Fragment selector selected an undefined fragment with id "+n);"number"==typeof n&&t.selectFragment(r)},value:e},r.a.createElement(f.a,{value:"None"},r.a.createElement(u.a,null,"None")),r.a.createElement(f.a,{value:"Delete"},r.a.createElement(u.a,null,"Delete")),i.c.map(e=>r.a.createElement(f.a,{key:e.id,value:e.id},r.a.createElement(h,{key:e.id,gift:t.gift,selectFragment:t.selectFragment,fragment:e}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a(631),i=a(45),o=a(145),s=a(43);function l(t){const e=[];for(let a=0;a{t.toTerminal(),Object(l.a)(`Visit the National Security Agency (NSA) to apply for their ${i.a.Bladeburners} division! You will need 100 of each combat stat before doing this.`)}})}},function(t,e,a){"use strict";a.d(e,"a",(function(){return l}));var n=a(0),r=a.n(n),i=a(30),o=a(106);const s=window.getComputedStyle;function l(){const t=i.b.Player();return r.a.createElement("div",{id:"unclickable",onClick:function(e){if(!(e.target&&e.target instanceof Element))return;const a=s(e.target).display,n=s(e.target).visibility;"none"===a&&"hidden"===n&&e.isTrusted&&t.giveExploit(o.a.Unclickable)},style:{display:"none",visibility:"hidden"}},"Click on this to upgrade your Source-File -1!")}},,function(t,e,a){"use strict";a.d(e,"a",(function(){return m}));var n=a(0),r=a.n(n),i=a(113),o=a(137),s=a(1374),l=a(295),c=a(1),f=a(2);const u=Object(i.a)(t=>Object(o.a)({root:{width:50,padding:t.spacing(2),userSelect:"none"}}));function m(){const t=u();return r.a.createElement("div",{className:t.root,style:{width:"90%"}},r.a.createElement(c.a,{variant:"h4"},"Achievements"),r.a.createElement(s.a,{achievements:Object.values(l.a),playerAchievements:f.a.achievements}))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return d}));var n=a(0),r=a.n(n),i=a(21),o=a(153),s=a(154),l=a(1),c=a(155),f=a(776),u=a(9),m=a(777),h=a(456);function d({achievements:t,playerAchievements:e}){const a=Object(m.a)(u.a.theme.primary),n=Object(m.a)(u.a.theme.secondary),d=t.map(t=>{var a;return{achievement:t,unlockedOn:null===(a=e.find(e=>e.ID===t.ID))||void 0===a?void 0:a.unlockedOn}}).sort((t,e)=>{var a,n;return(null!==(a=e.unlockedOn)&&void 0!==a?a:0)-(null!==(n=t.unlockedOn)&&void 0!==n?n:0)}),p=d.filter(t=>t.unlockedOn),g=d.filter(t=>!t.unlockedOn&&t.achievement.Secret),y=d.filter(t=>!t.unlockedOn&&!t.achievement.Secret&&t.achievement.Visible&&!t.achievement.Visible()),b=d.filter(t=>!p.map(t=>t.achievement.ID).includes(t.achievement.ID)).filter(t=>!g.map(t=>t.achievement.ID).includes(t.achievement.ID)).filter(t=>!y.map(t=>t.achievement.ID).includes(t.achievement.ID));return r.a.createElement(i.a,{sx:{pr:18,my:2}},r.a.createElement(i.a,{sx:{display:"flex",flexDirection:"column",flexWrap:"wrap"}},p.length>0&&r.a.createElement(o.a,{defaultExpanded:!0,disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",sx:{my:1}},"Acquired (",p.length,"/",d.length,")")),r.a.createElement(c.a,{sx:{pt:2}},p.map(t=>r.a.createElement(f.a,{key:"unlocked_"+t.achievement.ID,achievement:t.achievement,unlockedOn:t.unlockedOn,cssFiltersUnlocked:a,cssFiltersLocked:n})))),b.length>0&&r.a.createElement(o.a,{disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",color:"secondary"},"Locked (",b.length," remaining)")),r.a.createElement(c.a,{sx:{pt:2}},b.map(t=>r.a.createElement(f.a,{key:"locked_"+t.achievement.ID,achievement:t.achievement,cssFiltersUnlocked:a,cssFiltersLocked:n})))),y.length>0&&r.a.createElement(o.a,{disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",color:"secondary"},"Unavailable (",y.length," remaining)")),r.a.createElement(c.a,null,r.a.createElement(l.a,{sx:{mt:1}},y.length," additional achievements hidden behind content you don't have access to."))),g.length>0&&r.a.createElement(o.a,{disableGutters:!0,square:!0},r.a.createElement(s.a,null,r.a.createElement(l.a,{variant:"h5",color:"secondary"},"Secret (",g.length," remaining)")),r.a.createElement(c.a,null,r.a.createElement(l.a,{color:"secondary",sx:{mt:1}},g.map(t=>r.a.createElement("span",{key:"secret_"+t.achievement.ID},r.a.createElement(h.a,{content:t.achievement.ID}),r.a.createElement("br",null))))))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(21),o=a(9);function s({achievement:t,unlocked:e,colorFilters:a,size:s}){const[l,c]=Object(n.useState)(!1),f=e?o.a.theme.primarydark:o.a.theme.secondarydark;return t.Icon?r.a.createElement(i.a,{sx:{border:"1px solid "+f,width:s,height:s,m:1,visibility:l?"visible":"hidden"}},r.a.createElement("img",{src:`dist/icons/achievements/${encodeURI(t.Icon)}.svg`,style:{filter:a,width:s,height:s},onLoad:()=>c(!0),alt:t.Name})):r.a.createElement(r.a.Fragment,null)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(521),o=a(408);class s extends r.a.Component{constructor(t){super(t),this.state={hasError:!1}}reset(){this.setState({hasError:!1})}componentDidCatch(t,e){this.setState({errorInfo:e,page:this.props.router.page()}),console.error(t,e)}render(){if(this.state.hasError){let t;if(this.state.error)try{t=Object(i.a)(this.state.error,this.state.errorInfo,this.state.page)}catch(t){console.error(t)}return r.a.createElement(o.c,{router:this.props.router,softReset:this.props.softReset,errorData:t,resetError:()=>this.reset()})}return this.props.children}static getDerivedStateFromError(t){return{hasError:!0,error:t}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return v}));var n=a(0),r=a.n(n),i=a(1),o=a(65),s=a(167),l=a(9),c=a(336),f=a(10),u=a(21),m=a(350),h=a(610),d=a(620),p=a(1378),g=a(618),y=a(41),b=a(140);let E=0;function v({router:t}){const[e,a]=Object(n.useState)(!1),[v,k]=Object(n.useState)(),_=Object(c.b)(),w=_&&Object.entries(_).map(([t,e])=>r.a.createElement(p.a,{key:t,theme:e,onActivated:()=>function(t){E=window.scrollY;const e={...l.a.theme};Object.assign(l.a.theme,t.colors),s.b.emit(),b.b.emit(r.a.createElement(r.a.Fragment,null,'Updated theme to "',r.a.createElement("strong",null,t.name),'"',r.a.createElement(f.a,{sx:{ml:1},color:"secondary",size:"small",onClick:()=>{Object.assign(l.a.theme,e),s.b.emit()}},"UNDO")),"info",3e4)}(e),onImageClick:S}))||r.a.createElement(r.a.Fragment,null);function S(t){E=window.scrollY,k(t),a(!0)}return Object(n.useEffect)(()=>{requestAnimationFrame(()=>window.scrollTo(0,E))}),r.a.createElement(u.a,{sx:{mx:2}},r.a.createElement(i.a,{variant:"h4"},"Theme Browser"),r.a.createElement(o.a,{sx:{px:2,py:1,my:1}},r.a.createElement(g.a,null),r.a.createElement(m.a,{sx:{mb:2,display:"block"}},r.a.createElement(h.a,{router:t}),r.a.createElement(d.a,null)),r.a.createElement(u.a,{sx:{display:"flex",flexWrap:"wrap"}},w),r.a.createElement(y.a,{open:e,onClose:function(){E=window.scrollY,a(!1)}},r.a.createElement("img",{src:v,style:{width:"100%"}}))))}},function(t,e,a){"use strict";a.d(e,"a",(function(){return g}));var n=a(0),r=a.n(n),i=a(1),o=a(23),s=a(619),l=a.n(s),c=a(9),f=a(1791),u=a(1792),m=a(10),h=a(120),d=a(1793),p=a(1794);function g({theme:t,onActivated:e,onImageClick:a}){return t?r.a.createElement(f.a,{key:t.screenshot,sx:{width:400,mr:1,mb:1}},r.a.createElement(u.a,{action:r.a.createElement(o.a,{title:"Use this theme"},r.a.createElement(m.a,{startIcon:r.a.createElement(l.a,null),onClick:e,variant:"outlined"},"Use")),title:t.name,subheader:r.a.createElement(r.a.Fragment,null,"by ",t.credit," ",t.reference&&r.a.createElement(r.a.Fragment,null,"(",r.a.createElement(h.a,{href:t.reference,target:"_blank"},"ref"),")")),sx:{color:c.a.theme.primary,"& .MuiCardHeader-subheader":{color:c.a.theme.secondarydark},"& .MuiButton-outlined":{backgroundColor:"transparent"}}}),r.a.createElement(d.a,{component:"img",width:"400",image:t.screenshot,alt:`Theme Screenshot of "${t.name}"`,sx:{borderTop:"1px solid "+c.a.theme.welllight,borderBottom:"1px solid "+c.a.theme.welllight,cursor:"zoom-in"},onClick:()=>a(t.screenshot)}),r.a.createElement(p.a,null,r.a.createElement(i.a,{variant:"body2",color:"text.secondary",sx:{color:c.a.theme.primarydark}},t.description))):r.a.createElement(r.a.Fragment,null)}},,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return j}));var n=a(0),r=a.n(n),i=a(23),o=a(21),s=a(1),l=a(1458),c=a(65),f=a(179),u=a(1459),m=a(45),h=a(31),d=a(145),p=a(350),g=a(10),y=a(113),b=a(137),E=a(1383),v=a.n(E),k=a(1384),_=a.n(k),w=a(632),S=a.n(w),C=a(1386),x=a.n(C),L=a(1385),O=a.n(L),M=a(108),T=a(9),A=a(24),R=a(4),N=a(250),P=a(293);const I=Object(y.a)(t=>Object(b.a)({root:{padding:t.spacing(2),maxWidth:"1000px","& .MuiTable-root":{"& .MuiTableCell-root":{borderBottom:"1px solid "+T.a.theme.welllight},"& .MuiTableHead-root .MuiTableRow-root":{backgroundColor:T.a.theme.backgroundsecondary,"& .MuiTableCell-root":{color:T.a.theme.primary,fontWeight:"bold"}},"& .MuiTableBody-root":{"& .MuiTableRow-root:nth-of-type(odd)":{backgroundColor:T.a.theme.well,"& .MuiTableCell-root":{color:T.a.theme.primarylight}},"& .MuiTableRow-root:nth-of-type(even)":{backgroundColor:T.a.theme.backgroundsecondary,"& .MuiTableCell-root":{color:T.a.theme.primarylight}}}}}}));function F({isBetter:t}){return t?r.a.createElement(i.a,{title:r.a.createElement(r.a.Fragment,null,"Imported value is ",r.a.createElement("b",null,"larger"),"!")},r.a.createElement(v.a,{color:"success"})):r.a.createElement(i.a,{title:r.a.createElement(r.a.Fragment,null,"Imported value is ",r.a.createElement("b",null,"smaller"),"!")},r.a.createElement(_.a,{color:"error"}))}let D=0;function j(t){var e,a,y,b,E,v,k,_,w,C,L,j,B,G,W,H,U,q,$,K,z,V,Y,J,X,Q,Z,tt,et,at,nt,rt,it,ot,st,lt,ct,ft,ut,mt,ht,dt,pt,gt,yt,bt,Et,vt,kt,_t,wt,St,Ct,xt,Lt,Ot,Mt,Tt,At,Rt,Nt,Pt,It,Ft,Dt,jt,Bt,Gt,Wt,Ht,Ut,qt,$t,Kt,zt,Vt,Yt,Jt,Xt,Qt,Zt,te,ee,ae,ne,re;const ie=I(),[oe,se]=Object(n.useState)(),[le,ce]=Object(n.useState)(),[fe,ue]=Object(n.useState)(!1),[me,he]=Object(n.useState)(!1);return Object(n.useEffect)(()=>{D=T.a.AutosaveInterval,T.a.AutosaveInterval=0,t.router.allowRouting(!1)},[]),Object(n.useEffect)(()=>{me&&t.router.toTerminal()},[me]),Object(n.useEffect)(()=>{t.importString&&async function(){const e=await M.c.getImportDataFromString(t.importString),a=await M.c.getImportDataFromString(M.c.getSaveString(!0));se(e),ce(a),Promise.resolve()}()},[t.importString]),oe&&le?r.a.createElement(o.a,{className:ie.root},r.a.createElement(s.a,{variant:"h4",sx:{mb:2}},"Import Save Comparison"),t.automatic&&r.a.createElement(s.a,{sx:{mb:2}},"We've found a ",r.a.createElement("b",null,"NEWER save")," that you may want to use instead."),r.a.createElement(s.a,{variant:"body1",sx:{mb:2}},"Your current game's data is on the left and the data that will be imported is on the right.",r.a.createElement("br",null),"Please double check everything is fine before proceeding!"),r.a.createElement(l.a,{color:"secondary",component:c.a},r.a.createElement(f.a,null,r.a.createElement(u.a,null,r.a.createElement(m.a,null,r.a.createElement(h.a,null),r.a.createElement(h.a,null,"Current Game"),r.a.createElement(h.a,null,"Being Imported"),r.a.createElement(h.a,null))),r.a.createElement(d.a,null,r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Game Identifier"),r.a.createElement(h.a,null,null!==(e=null===(a=le.playerData)||void 0===a?void 0:a.identifier)&&void 0!==e?e:"n/a"),r.a.createElement(h.a,null,null!==(y=null===(b=oe.playerData)||void 0===b?void 0:b.identifier)&&void 0!==y?y:"n/a"),r.a.createElement(h.a,null,(null===(E=oe.playerData)||void 0===E?void 0:E.identifier)!==(null===(v=le.playerData)||void 0===v?void 0:v.identifier)&&r.a.createElement(i.a,{title:"These are two different games!"},r.a.createElement(O.a,{color:"warning"})))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Playtime"),r.a.createElement(h.a,null,Object(A.b)(null!==(k=null===(_=le.playerData)||void 0===_?void 0:_.totalPlaytime)&&void 0!==k?k:0)),r.a.createElement(h.a,null,Object(A.b)(null!==(w=null===(C=oe.playerData)||void 0===C?void 0:C.totalPlaytime)&&void 0!==w?w:0)),r.a.createElement(h.a,null,(null===(L=oe.playerData)||void 0===L?void 0:L.totalPlaytime)!==(null===(j=le.playerData)||void 0===j?void 0:j.totalPlaytime)&&r.a.createElement(F,{isBetter:(null!==(B=null===(G=oe.playerData)||void 0===G?void 0:G.totalPlaytime)&&void 0!==B?B:0)>(null!==(W=null===(H=le.playerData)||void 0===H?void 0:H.totalPlaytime)&&void 0!==W?W:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Saved On"),r.a.createElement(h.a,null,(null!==(U=null===(q=le.playerData)||void 0===q?void 0:q.lastSave)&&void 0!==U?U:0)>0?new Date(null!==($=null===(K=le.playerData)||void 0===K?void 0:K.lastSave)&&void 0!==$?$:0).toLocaleString():"n/a"),r.a.createElement(h.a,null,(null!==(z=null===(V=oe.playerData)||void 0===V?void 0:V.lastSave)&&void 0!==z?z:0)>0?new Date(null!==(Y=null===(J=oe.playerData)||void 0===J?void 0:J.lastSave)&&void 0!==Y?Y:0).toLocaleString():"n/a"),r.a.createElement(h.a,null,(null===(X=oe.playerData)||void 0===X?void 0:X.lastSave)!==(null===(Q=le.playerData)||void 0===Q?void 0:Q.lastSave)&&r.a.createElement(F,{isBetter:(null!==(Z=null===(tt=oe.playerData)||void 0===tt?void 0:tt.lastSave)&&void 0!==Z?Z:0)>(null!==(et=null===(at=le.playerData)||void 0===at?void 0:at.lastSave)&&void 0!==et?et:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Money"),r.a.createElement(h.a,null,R.a.formatMoney(null!==(nt=null===(rt=le.playerData)||void 0===rt?void 0:rt.money)&&void 0!==nt?nt:0)),r.a.createElement(h.a,null,R.a.formatMoney(null!==(it=null===(ot=oe.playerData)||void 0===ot?void 0:ot.money)&&void 0!==it?it:0)),r.a.createElement(h.a,null,(null===(st=oe.playerData)||void 0===st?void 0:st.money)!==(null===(lt=le.playerData)||void 0===lt?void 0:lt.money)&&r.a.createElement(F,{isBetter:(null!==(ct=null===(ft=oe.playerData)||void 0===ft?void 0:ft.money)&&void 0!==ct?ct:0)>(null!==(ut=null===(mt=le.playerData)||void 0===mt?void 0:mt.money)&&void 0!==ut?ut:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Hacking"),r.a.createElement(h.a,null,R.a.formatSkill(null!==(ht=null===(dt=le.playerData)||void 0===dt?void 0:dt.hacking)&&void 0!==ht?ht:0)),r.a.createElement(h.a,null,R.a.formatSkill(null!==(pt=null===(gt=oe.playerData)||void 0===gt?void 0:gt.hacking)&&void 0!==pt?pt:0)),r.a.createElement(h.a,null,(null===(yt=oe.playerData)||void 0===yt?void 0:yt.hacking)!==(null===(bt=le.playerData)||void 0===bt?void 0:bt.hacking)&&r.a.createElement(F,{isBetter:(null!==(Et=null===(vt=oe.playerData)||void 0===vt?void 0:vt.hacking)&&void 0!==Et?Et:0)>(null!==(kt=null===(_t=le.playerData)||void 0===_t?void 0:_t.hacking)&&void 0!==kt?kt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Augmentations"),r.a.createElement(h.a,null,null===(wt=le.playerData)||void 0===wt?void 0:wt.augmentations),r.a.createElement(h.a,null,null===(St=oe.playerData)||void 0===St?void 0:St.augmentations),r.a.createElement(h.a,null,(null===(Ct=oe.playerData)||void 0===Ct?void 0:Ct.augmentations)!==(null===(xt=le.playerData)||void 0===xt?void 0:xt.augmentations)&&r.a.createElement(F,{isBetter:(null!==(Lt=null===(Ot=oe.playerData)||void 0===Ot?void 0:Ot.augmentations)&&void 0!==Lt?Lt:0)>(null!==(Mt=null===(Tt=le.playerData)||void 0===Tt?void 0:Tt.augmentations)&&void 0!==Mt?Mt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Factions"),r.a.createElement(h.a,null,null===(At=le.playerData)||void 0===At?void 0:At.factions),r.a.createElement(h.a,null,null===(Rt=oe.playerData)||void 0===Rt?void 0:Rt.factions),r.a.createElement(h.a,null,(null===(Nt=oe.playerData)||void 0===Nt?void 0:Nt.factions)!==(null===(Pt=le.playerData)||void 0===Pt?void 0:Pt.factions)&&r.a.createElement(F,{isBetter:(null!==(It=null===(Ft=oe.playerData)||void 0===Ft?void 0:Ft.factions)&&void 0!==It?It:0)>(null!==(Dt=null===(jt=le.playerData)||void 0===jt?void 0:jt.factions)&&void 0!==Dt?Dt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Achievements"),r.a.createElement(h.a,null,null===(Bt=le.playerData)||void 0===Bt?void 0:Bt.achievements),r.a.createElement(h.a,null,null===(Gt=oe.playerData)||void 0===Gt?void 0:Gt.achievements),r.a.createElement(h.a,null,(null===(Wt=oe.playerData)||void 0===Wt?void 0:Wt.achievements)!==(null===(Ht=le.playerData)||void 0===Ht?void 0:Ht.achievements)&&r.a.createElement(F,{isBetter:(null!==(Ut=null===(qt=oe.playerData)||void 0===qt?void 0:qt.achievements)&&void 0!==Ut?Ut:0)>(null!==($t=null===(Kt=le.playerData)||void 0===Kt?void 0:Kt.achievements)&&void 0!==$t?$t:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"Source Files"),r.a.createElement(h.a,null,null===(zt=le.playerData)||void 0===zt?void 0:zt.sourceFiles),r.a.createElement(h.a,null,null===(Vt=oe.playerData)||void 0===Vt?void 0:Vt.sourceFiles),r.a.createElement(h.a,null,(null===(Yt=oe.playerData)||void 0===Yt?void 0:Yt.sourceFiles)!==(null===(Jt=le.playerData)||void 0===Jt?void 0:Jt.sourceFiles)&&r.a.createElement(F,{isBetter:(null!==(Xt=null===(Qt=oe.playerData)||void 0===Qt?void 0:Qt.sourceFiles)&&void 0!==Xt?Xt:0)>(null!==(Zt=null===(te=le.playerData)||void 0===te?void 0:te.sourceFiles)&&void 0!==Zt?Zt:0)}))),r.a.createElement(m.a,null,r.a.createElement(h.a,null,"BitNode"),r.a.createElement(h.a,null,null===(ee=le.playerData)||void 0===ee?void 0:ee.bitNode,"-",null===(ae=le.playerData)||void 0===ae?void 0:ae.bitNodeLevel),r.a.createElement(h.a,null,null===(ne=oe.playerData)||void 0===ne?void 0:ne.bitNode,"-",null===(re=oe.playerData)||void 0===re?void 0:re.bitNodeLevel),r.a.createElement(h.a,null))))),r.a.createElement(o.a,{sx:{display:"flex",justifyContent:"flex-end"}},r.a.createElement(p.a,null,r.a.createElement(g.a,{onClick:function(){T.a.AutosaveInterval=D,Object(P.e)(!1),t.router.allowRouting(!0),he(!0)},sx:{my:2},startIcon:r.a.createElement(x.a,null),color:"secondary"},"Take me back!"),r.a.createElement(g.a,{onClick:()=>ue(!0),sx:{my:2},startIcon:r.a.createElement(S.a,null),color:"warning"},"Proceed with import")),r.a.createElement(N.a,{open:fe,onClose:()=>ue(!1),onConfirm:async function(){await M.c.importGame(t.importString,!0),Object(P.e)(!0)},confirmationText:r.a.createElement(r.a.Fragment,null,"Importing new save game data will ",r.a.createElement("strong",null,"completely wipe")," the current game data!",r.a.createElement("br",null))}))):r.a.createElement(r.a.Fragment,null)}},,,,,function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(0),r=a.n(n);function i(t){return t.content?r.a.createElement(r.a.Fragment,null,t.content):r.a.createElement(r.a.Fragment,null,t.children)}},,,function(t,e,a){"use strict";a.d(e,"a",(function(){return s}));var n=a(0),r=a.n(n),i=a(41);const o=["ttftfffttttttttttfffffffttftt1ttttttt111tttt1111111tttt1tt111tttt111111tttt1ttttttttttttttt111111111\nttfttttttttttttttttfLLLftfffffffffftttt111tt11111ttffffftttt1111111111111111ttttttfttttttttt111111t1\nttttttttttttttttffffLfftffffffffLLffttttttftt111ttfffffftttttttt111111ttttttffffttfffttttttt111111tt\nttttttttttttttttfffLfttffffffLLffffttttttttttt1tfffffffffftttttt111111tffffffffftttfffftttt11111ttt1\nttttttttttttffLfttfffttfffffffffttfftttttt1t1tt11tfffffftttttt111t111111ttffffLLffttfffftt111111tttt\nttttttttttffLLLLfttttffLLLfttttftfLftttttttffffttttffffttttfftt11t111tt111ttfffLffttfftttttt1111tttt\nttttttttffLLLLLLLffttfLLffttfffftfLfttttttffttt11111ttttffffffftt1111tft11111ttffffttt11tfftt11ttttt\ntttttttfffLLLLLLLLfftffttttffLffftfftttttft1i;;::::;iitffffffffftt111tft1tttt1ttffLfttttfffffttttttt\ntttttttfffLLLLLLLLfttttffftffffftfttttttff1:,,,,,,,,::itfffffffft11111111ttttttttttt1tfffffffffffttt\ntttffttffLLLLLLLLLfttfftffffffffLLLftttttt;::,:::;;;;::1tfffftfft11111ttt1ttt1tfttt11ttffffffffLfttt\ntffffffffLLLLLLLffftfLfffttfLLffLLLfttttti;;;iii11111;:i11ttffft111111tfft11t11tt1tttttfffLLLLLLfttf\ntfffffttttfLLLffttttfffffttLLLLfLLLftttfti:;;;iiiiiiii;it111tt111t1111tffttfftt11ttftttfffLLLLLLffff\nttttfttttffffftttttttttttttfLLLffLLfttttt1;;;;;;iiiiii;1tft11tt1111111tfftfffftttttttttttfLLfffttfff\ntfffffffffftttfffffffffttffttLLfffLfttttt11i;;;;iiiiiii1tt11tfftt11111ttt1fffttt1tttttttttfffftttttt\nttffffffffftttfffffffffttffftffttftttttff1ii;;;;iii1iii111tt1ttttt1111t111ffttffttfffffLffttttffffff\nttffffffffttttffffffffttttttttttffftttttft1ii;;;ii1iii111tfft11ttt111111t1tt1tfft1ttffffLLftttLLLLLL\ntttffffffffttfffffffftttttttt11fffftttt1t111iiii;iiiii11ttffft11111111ttttttt1tt11ttffffLfftttfLLLLf\ntttttttffffttfffttttttttffttt11tffttttttt11ttii;;;iiii11i1ffftt1111111tttt111tttt11ttttffffftffLLLff\ntfttttttttttttttttttttfffftttt11tfftttttt111t1i;;;iiii1i,,:;i1111t1111ttt111t1tfftt11111ttfftffffftt\nttttfffftttttttfffftttffffttffttttft111tt11111i;;;iiii1;,,....,:::;i11tt111tt11tffftttttttt1tttttttt\nt11ttffffftttffffffttttfffttffttttft1111111111;;;;;;;it;,...........,:it111ttt1tffftttttfft11ttfffff\ntt1ttfffftt1ttfffft111tffttfttttttt1111t1i;:;11i1i;;1t1:,,............,itt11tt1tfftt1tfffffft1tffLLf\ntfttttfttttt11tttt1ttt11ttttttftt111111i:,..:1111iii11;,...............;tt111t11ttttttttffttt11ffLLf\ntfftttttttfftttttttffftt111ttffftt11i;,.,...,iiii;;;;:,,...............:1ttt1111ttfffttttft1tt1ttfft\nttttttttttttttt11ttttttttttfffffft1:,..........::::::,,,...............,1ttttt11ttfffffttttffftttttt\ntfffttttffffftt11ttttttttttfffffft1:...........:;::;:..................,1tttttt1ttfffffttttttttftttf\ntfffttttfffffft1ttftttfftttttffft11:...........,:::::..................,1tttft11tfffffffttfffffffttf\ntfffttttffffff11tttttttttttttttttt1;...........,::::,...................;t1t1111tfffffLfttfffffffttf\ntfffttttfftttt11tttttttt1tfftttttt1:...........,::::,...... ............,1111tt11fffffLftttffttffttf\ntttttttttttttt11tttttttt1tffftttft1:...........,:::,,....................it1ttt11tfffffftttffttffttt\nttttt1tttttttt11ttttttttttffttttttt:...........,::,,.....................:111tt11tttttttt1tttttttttt\nttttt1tttttttt11tftttttftttttttttt1;,:;:.......,:,,,....................,,1111t11ttttttt11ttttttfttt\n1tttt1ttfffttt11ttffffffttttfffft11ii1i:.......,:,,,.....................,1tt1111ttttttt111tttttfttt\n1ttt11tttttttt11tttttttttttttttttti;;;;:.......,:,,,....... .............,itt1111tttt11t111ttttttt1t\n111111tttttttt11111111ttttttttttt1i;;;;:.......,:,,,......................itt11111111111111111111111\n1111111111111111111111ttttttttttt1;;;;;:...... ,:,,,,.....................itt11t11111111111111111111\n1111111111111111111111tttttttttt1;:,::;,...... ,:...,.....................ittttt11111111111111111111\n111111111111111111111111tttttttt1i,..... .... .:........................,i1tttt11111111111111111111\n1111111111111111111111111t11t11111;,....,,.... ,:::,,,...................,11ttttt11t1111111t11111111\n11111111111111111111111111111111111iiiiii. ... .::::::,..................,11t1ttt111t11111tttttt1111\n1111111111111111111111111111111111111111:.,.....::::::,..................:111tttttt1tttt11tttttt1111\n1111111111111111111111111111111111111111:::,...,::::;::,..,,.............:11tt1ttttttttttttttttt1111\n","ttftfffttttttttttffffffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttftfLLLftfffffffffftt11111tt11111ttffffttttt1111111111111111ttttttfttttttttt111111tt\nttftttttttttttttffffLftttfffffffLLLfttttttftt111ttfffffftttttttt111111tttttffffftfffftttttt1111111tt\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tffffffffffttttttt11111tffffffffftttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttfftttttt1tttt1ttftfffftt1ttt111t111111ttffffLLffttfffft1111111tttt\nttttttttttffLLLLfttttffLLLfttttttfLftttttttfft11i;;:;;i11ttfftt11t111tt111tttffffftttttttttt111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLttttttfff1;,,,,,,,,:;tffffft11111tft11111ttffffttt11tffftt1ttttt\ntttttttfffLLLLLLLLfftffttttffLffftfftttttfft1;:,,,,,::::,;tffftttt111tft1tttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffffftfftttttfffti:;;;iiii11i;:tffffft11111111ttftttttttt1ttffffffffffttt\ntttffttffLLLLLLLLLftffftfLftfftfLLLftttttfft::i;iiiiii11i:1ffftft11111ttt1ttt1ttttt11ttfffffLLfLfttt\nttfLfffffLLLLLLLLfftfLLfffffLfffLLLfttttt1tt;:;;;;;iiiiiii1tffft11111tffft11t11tt1tttttfffLLLLLLffff\ntffftfttttfLLLffttttfffffttLLLLfLLLftttft111i;;;;;;iiiiii111tt111t1111tffttfftt11tfft1tfffLLLLLLLffL\ntttfftttttffLftttttttttttttfLfLffLLfttttttt1iii;;;;;ii11i1t11t11111111tffttfffttttttt11ttfLLLLffftff\nttfLffffffftttfffffffffttfftfLLfffLftttttfft1ii;;;;iii1i1tt1tfftt11111ttt1tffttt1ttt1tttttffffttffft\nttffffffffftttffffffffttfffftffffftttttfffft111;;;;iiii1111t1ttttt1111tt11ffttfftttfffffLfttttfffffL\nttffffffffttttffffffffttttttttttffftttttttt11ttii;iiiiii11tft11ttt111111t11t1tfft1tfffffLLftttLLLLLL\n1ttffffffffttfffffffftttttttt11ffffttttt1111tftiii;;iiii1;,;1111111111tttt11111111ttffffLfftttffLLLf\nttttttttfffttfffttttttttffttt11tffftttttt11ttf1;;;i;iiii1:,,.,,::;ii11tttt111tttt11ttffffffftffLLLff\ntfttttttttttttttttttttfffftttt11tfftttttt111tt1;;;i;;ii1t:,,........,:;1t111t1tfftt11111ttfftffffftt\ntftttffffttttttfftftttffffttffttttftt11tt111i;;;;;;;;;it1,,............,;11tt11tffffttttttt1tttttttt\ntttttffffftttfffffft1ttffftfffttttft111111;:,.;iii;;;i11,.,.............,1tttt1tffftttttfft111tfffff\n1tttffffftt1ttfffftt11tffttfttttttt1111i;,....,1iii;ii;,................,111tt1tfft11tffffftt1tLffLf\ntftttfftt1ttt1tttt1tttt1ttttttttt1111;:,.......i1;;;:::.................,it11t11ttttttttffftt11fffLf\ntfftttttttfftt1111ttfftt11ttfffftt1ti..........:i;::;:,..................ittt111t1tffttttft1tt1tffft\nttttttttttttttt11tttttttt1tffffffftti,.........,::::::,..................itttt11ttffffftttttfftttttt\ntfffttttfffffft11ttttttttttffffffft1i,.........,:,:::,...................,1tttt11tfffffttttttttffttf\ntfffttttfffffft11tftttfftttttffft1111:.........,:,:::,....................;tt111tfffffffttfffffffttf\ntfffttttfffffft1tttttttftttttttttt111;.........,:,::,,....................,111111fffffLfttfffffffttf\ntffftttttttffft11tttttttttffttttfft11i.........,:.:,,......................:1tt11fffffLftttffttffttf\ntttttttttttttt111ttttttt1tffftttfft111:....... ,:.:,,.......................1tt11tfffffftttffftffttt\nttttt1tttttttt11ttttttttttfttttttft111i,...... ,:,,,,......................,itt11ttttttt11ttttttfttt\nttttt1tttttttt11tfttttfftttttffttt1111i,...... ,:.,,,......................:11111ttttttt11ttttttfttt\n1tttt1ttftfttt11tfffffffttttfffft11111,....... ,,.,,....... ...............it1111ttttttt111tttttfttt\n1tttt1tttttttt11ttttttttttttttttt1111;,....... ,,.,,......................:tt11111ttt11t111ttttttt1t\n11t111tttttttt111t1111tttttttttt1iiii:,,...... ,,.........................;t111111111111111111111111\n111111111tt11111111111ttttttttt1;;iiii:....... ,,............ ...........;tttt1111111111111111111111\n1111111111111111111111ttttttttt1;;;iii;... ....,::::,....,:::,,.........;1ttttt111111111111111111111\n111111111111111111111111tttttttt1i;;ii: .,....,:::::... .;;;;;:,.....,;1ttttttttt111111111111111111\n1111111111111111111111111tt1111111i,,.,:;i: ...,:::::.....:;;;;;:.....,1ttttttttt11t1111111t11111111\n11111111111111111111111111111111111:.:1tti,....,:::::.... ,;;;;;;,.....ittttttttt111t11111ttttt11111\n1111111111111111111111111111111111111ttt;,,....,:::::,... .,;;;;:,.,,..:ttttttttttt1tttt11tttttt1111\n11111111111111111111111111111111111111t1,,,....:;;::::,.....:;;;:......,1ttttttttttttttttttttttt1111\n","ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt1tt111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftfffffffffttt11111tt11111ttfffft1ttt1111111111111111tttttffttttttttt111111tt\nttftttttttttttttffffLffttfffffffLLLfttttttfttt11tffffffftttttttt111111tttttffffftfffftttttt1111111tt\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt1iiiii1tttttttt11111tffffffffftttfffffttt1111t1tt1\nttttttttttttffffttffftffffffffffttffttttt11tttt1i::,,,,,,:;111111t111111ttffffLLffttfLfftt11111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfft1i;,,,,,,,,,:;ttt11t111tt111tttffffftttftttttt111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttffffti;::;;;;;iii::1ftt11111tft11111ttffffttt11tffftt1ttttt\ntttttttfffLLLLLLLLLftffttttffLffftffttttffffft;:;iiii11111i:iftttt111ttt1tttt11tffLfttttfffffttttttt\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffft;:;;;;;iiiiii;1fftt11111111ttftttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffffti;;;;;;;ii;iiitffft11111ttt1ttt1tfttt11ttfffffLLfLfttt\nttfLfffffLLLLLLLLffffLLfffffLfffLLLLtttttttff1iii;;i;;iii111tfft111111ffft11t11tt1tttttfffLLLLLLffff\ntffftftttffLLLffttttfffffttLLLLfLLLffttftt11t1iii;;;;;iiiii1tt111t1111tffttfftt11tfft1tfffLLLLLLLfff\nttffftttttffLftttttttttttttfLLLffLLftttttttft111i;;;;iiii1111111111111tffttfffttttttt11ttfLLffffftff\nttfLffffffftttfffffffffttfttfLLfffLftttttfffft11i;;;;iiii1t1ttttt11111ttt1tffttt11ttttttttfffftfttft\nttffffffffftttffffffffttfffftffffftttttfffft11t1i;;;;;iii1ii1ttttt1111t111ffttfft1tfffffLfttttfffffL\nttffffffffttttffffffffttttttttttffftttttttt11tft1i;;;;iii1i,:;i1ttt11111t11t1tfft1ttffffLLfttfLLLLLL\ntttffffffffttfffffffftttttttt11ffffttttt1111tfti;ii;;iiii1;,,...,:;ii1tttt1111tt11ttffffffftttffLLLf\nttttttttfffttfffttttttttffttt11tffftttttt11t1iii;;ii;;;i1t:,.........,:;1t111ttt111ttffffffftffLLLLf\ntfttttttttttttttttttttfffftttt11tfftt11tt1i:,.:;;;i;;;itti,,............,;1111ttttt11111ttfftffffftt\ntfttfffftttttttfffftttffffttffttttft1111i:....,;;;ii;i11;.,,.............:1tt1ttffffttttttt1ttttttft\ntttttffffftttffftffttttffftfffttttft1i:,.......:;;;;;;;:,................:tttt1tffftttttfft11ttfffff\n1t1tffffftt1ttfffftt11tffttftttttttt1,.........,ii;;;;;,.................:11tt1tfft11tfffffft1fLLfLf\ntftttfftt1ttt1tftt1ttt11ttttttttt111i,.........,11;:;;:,.................,1t1t11ttttttttfftt111fffLf\ntfftttttttffttt111ttfftt11ttffffftt11,.........,i;::::,..................,1tt11111ffft1ttt11tt1tffft\nttttttttttttttt11tttttttt1tffffffft11;..........::::::,...................;tt1111tfffftttttffftttttt\ntfffttttfffffft11ttttttttttffffffft11:..........:::::,..,;:,...............ittt1tttttffttttttttffttf\ntfffttttfffffft11tftttffttttfffft1111:..........:::::,..;1i;:,..............1t11tfffffffttfffffffttf\ntfffttttfffffft1tttttttftttttttttt111;..........::,:,...;ii;;;,.............:1111tffffLfttfffffffttf\ntffftttttttfft11ttttttttttfftttttft11i,.........::,,,...;;;;;i:..............;111tffffLfttfffttffttf\ntttttttttttttt111tttttttttffftttfft11i,.........::,,,...;;;;;i:..............:111tfffffftttffttffttt\ntttttttttttttt11ttttttttttfftttttft111:.........:,,,....::;;;;:.............,1t11ttttttt11tttttffttt\nttttt1tttttttt11tfttttfftttttfftttt111:.........:,,,......,::::..,.........,i1111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfffffffttttfffft1111i:,........:,,,..... .......,,...... .it1111ttttttt111tttttft1t\n1tttt1tttttttt11ttttttttttttttttt1iiii;,........:........... ...........:itt11111ttt1t1111ttttttt1t\n111111tttttttt111tt111tttttttttti;;;iii:... ....:,,...................:i1tttt11111111111111111111111\n111111111tt11111111111tttttttttt1;;;;;;;. .,....::::..................:1tttttt1111111111111111111111\n1111111111111111111111ttttttttttt1i;;::..:;1,...::::...................;ttttttt111111111111111111111\n1111111111111111111111111tttttttt111i,.,it1;....::::,..................,1ttttttttt111111111111111111\n1111111111111111111111111tttt11111111ii1t1i:...,::::,........,..........itttttttt11t1111111tt1t11111\n11111111111111111111111111111111111111tt1;:....::::;:.......,...........:1ttttttt111t11111ttttt11111\n111111111111111111111111111111111111111ti,,....:;:;::,..................,ittttttttt1tttt11tttttt1111\n111111111111111111111111111111111111111t:,:.,.:;;;;:::,..................;111t1ttttttttttttttttt1111\n","ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt11t111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftfffffffffttttt1111t11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\nttftttttttttttttffffLffttffffffffLLfttttttfttt11ttt1iiii;i11tttt111111tttttffffftffffttttttt111111tt\nttttttttttttttttfffLLttffffffLLffffttttttttttt1tt1::,,,,,,:;1ttt111111tfftfffffftttfffffttt1111t1tt1\nttttttttttttffffttffftffffffffffttfftttttt1ttt11i;:,,,,,,,,,:1111t1111111tffffLLffttfLfftt11111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;:::;;;;;;;::it11t111tt111tttffffftttfttttt1111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLtttttfffffti:;;ii111111i:itt11111tft11111ttffffttt1ttffftt1ttttt\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffft;:;;;;;iiiiii;ittt1111ttt1tttt11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLLftfftttttffffffti;;;;;;;ii;iiitttt11111111ttftttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttfffff1iii;;i;;i1i1i1tttt11111ttt1ttt1tfttt111tfffffLLfLfttt\nttfLffffffLLLLLLLffffLLfffffLfffLLLftttttttfft1i;;;;;;;iiiiitfft111111ffft11t11tt1tttttffffLLLLLffft\ntffftfttttfLLLffttttffffftfLLLLfLLLftttftt1111111i;;;;iiii111t111t1111tffttfftt11tfft1tffLLLLLLLLfff\nttffftttttffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111111111111tffttffftttttttt1ttfLLLfffffff\nttfLffffffftttfffffffffttfttfLLfffLftttttffft1111i;;;;;ii111tfttt11111ttt1tffttt11ttttttttfLfftfttft\nttffffffffftttfffffffffttffftffffftttttfffft11t11i;;;;iii1i:;1ttft11111111ffttfftttfffffLfttttfffffL\nttffffffffttttffffffffttttttttttffftttttft111tttiii;;iiii1;,,,:;i1111111111t1tfft1ttffffLLftttfLLLLL\ntttffffffffttffffffffttttttttttfffftttt1111i;:;iiii;;;i;11:,,.....,:;i1tft1111tt111tffffLfftttffLLLf\nttttttttfffttfffttttttttfftt111tfffttt11i;,,..:i;;;i;ii1t1,,..........,:i1111ttt1111tffffffftffLLLLf\ntfttttttttttttttttttttffffttttt1tffti;:,,.....,;;;iiii1ti,,,.............;1111ttttt11111ttfftffffftt\ntttttffffttttttfffftttffffttffttttf1:.........,;:;;;;;;;,.,,,............:1tt1ttffff11ttttt1ttttttft\ntttttffffftttffftfft1ttffftfffttttf1,..........,;;;;;;;:.:ii;;:,.........:tttt1tfffttttffft111tfffff\n1tttffffftt1ttfffftt11tffttfttttt1t1,...........ii;;;::,,;i;;ii:.........:tttt1tfft11tfffffft1fLLfLf\ntftttffttttt11tftt1tttt1ttttttttt11i,..........,1i;;::,.:i;;;;i:.........,1t1t11ttttttttfftt111fffLf\ntfftttttttffttt11tttffttt1tttffft11i,..........,ii;:::,.,:;;iii:..........it111111tfft1ttt11tt1tffft\nttttttttttttttt11tttttttt1tfffffftti,...........:::::,....:;;ii:..........:tt111ttfffftttttffftttttt\ntfffttttfffffft11ttttttttttfffffft1i,...........:::::,.....,:;;:.... ......,1t111ttttffttttttttffttf\ntfffttttfffffft11tftttffttttfffft111:...........:::::,........,..,..........,1111tffffffttfffffffttf\ntfffttttfffffft1tttttttftttttttttt11:...........::,:,........ ...:;,.........:111tffffLfttfffttffttf\ntffftttttttfft11ttttttttttffttttttti,...........:::,,.............,...........,i1tffffLfttfffttffttf\ntttttttttttttt111tttttttttffftttfft;,:;:........:::,.............. ...........:11tfffffftttffttffttt\ntttttttttttttt11ttttttttttfftttttftii1i;:.......:::,.......... ..............:t111tttttt11tttttffttt\nttttt1tttttttt11tfttttfftttttffttt1ii;ii;,......::,,........................:1111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfffffffttttfffft11i;;ii;,......:,,,..........:........ .;t1111ttttttt111tttttft1t\n1tttt1tttttttt11tttttttttttttttttt11;:;i:,,.....:,.................. .;i;;1tt1111tttt1t1111ttttttt1t\n111111tttttttt111t111ttttttttttttt11i:,,:1;....,::....................:1ttttt11111111111111111111111\n111111111tt1111111111tttttttttttttt11i;;1t:....:::::...................;tttttttt11111111111111111111\n1111111111111111111111ttttttttttttt111ttt1,,,.,:::::,..................,1ttttttt11111111111111111111\n111111111111111111111111tttttttttt1111111i,::.,;::;:,...................;ttttttttt111111111111111111\n1111111111111111111111111ttttttt11111111t;.,,.,;;;;;,...................,1ttttttt11t1111111tttt11111\n111111111111111111111111111111111111111t1:..,,:;;;;;:,...................;ttttttt111t11111ttttt11111\n111111111111111111111111111111111111111ti,,,::;;;;;;;:,..................,1tttttttt1tttt11tttttt1111\n111111111111111111111111111111111111111t;,,::,;;;ii;;::,..................it1tttttttttttttttttt11111\n","ttftffftttttttttffffffLftfftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftfffffffffttttt111tt11111ttffffftttt1111111111111111tttttfftttttttt1111111tt\nttftttttttttttttffffLffttfffffffLLLftttttttttt11ttt1iiii;i11tttt111111ttttttfffftffffttttttt111111t1\nttttttttttttttttfffLLttffffffLLffffttttttttttt1ttt;:,,,,,,,:itttt11111tfftfffffftttfffffttt1111t1ttt\nttttttttttttffffttffftffffffffffttfftttttt1tttt11i:,,,,,,,,,:i111t1111111tffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1;::;;;;;;;;;,;t111111tt111tttffffftttftt1tt1111ttttt\nttttttttffLLLLLLLffttfLLffttfffftfLLtttttffffff1,:iiii111111;:tt11111tft11111ttffffttt11tffft11ttttt\ntttttttfffLLLLLLLLLftffftttffLffftffttttfffffffi:;;;;;iiiii1;;ttt1111ttt1tttt11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLLftfftttttfffffff1;;;;;;;ii;;ii1ttt11111111ttftttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLffffftfLftffffLLLftttttfffff1iiiiii;;iiii1itttt11111ttt1ttt11tttt11ttfffffLLfLfttt\ntffLLffffLLLLLLLLffffLLftffLLLffLLLftttttttffftiii;;;;;ii1ii1tft111111ffft11t11tt1tttttffffLLLLLffft\ntfffffttftfLLLffttttfffffttLLLLfLLLftttft111tt111i;;;;iiiii1tt111t1111tffttfftt11tfft1tffLLLLLLLLfff\nttttfttfffffLftttttttttttttfLLLffLLftttt1tttt11tti;;;iiiii111t11111111tffttffftttttttt1ttfLLLfffffff\nttffffffffftttfffffffffttfftfLLfffLftttttffft11t1i;;;;;iii11ttttt11111ttt1tffttt11ttttttttfLfftftttt\nttffffffffftttfffffffffttffftffftftttttffft111t11i;;;;iii1ii11tttt1111tt11ffttfftttfffffLfttttffffff\nttffffffffttttffffffffttttttttttffftttttttt11111iii;;iiii1;,:;1tttt11111t11t1tfft1ttffffLLftttfLLLLL\ntttffffffffttffffffffttttttttt1tffftttt11i;:,:i;;i;;;;;i11,,..,,:;i111tttt1111tt11ttffffLfftttffLLLf\nttttttttfffttfffttttttttffttt11ttff1ii;:,....,;::;i;;i11ti,,.......,:;ittt111ttt1111ttffffffttfLLLLf\ntfttttttttttttttttttttfffftttt11tff;,,........;;;;iii1tti,,,,:;;::,....,i11111ttttt11111ttfftffffftt\ntfttfffffttttttfffft1tffffttfft1ttt:..........:;;;;;;;i;...,;i;iii:.....,i1tt1ttffff11ttt1t1ttttttft\nttttfffffftttfffffft11tffftffftttti,..........,:;;;;;;;,...,;;iiii,......;tttt1tffftttttftt111tfffff\n1tttffffftt1ttfffftt111ffttft11tt1;,...........;i;;;;;:,.....:;iii,......;tttt1tfft11tffffftt1fLLfLf\ntttttffttttt11tftt1tttt1tttt1tttti,............;1;::;;,......,;iii,......;t11t11ttttttttfftt111fffLf\ntfftttttttffttt111ttfftt111ttfffti.............;i;::::,.......,;;;,......;ttt11111tfft1tttt1tt1tffft\nttttttttttttttt11ttttttt11tffffffi,............,::;:::,..........,.......:ttt1111tfffftt1tttfftttttt\ntfffttttfffffft11tttttttttttffffti,............,:::::,..............,....,ittt11ttttttft1ttttttffttf\ntfffttttfffffft11tffttff11t1tfff1;...... ....,.,:::::,.....................;11111tffffffttfffffffttf\ntfffttttfffffft1tttttttfttttttti:,......:iiii;,,:::,:.......................,;111tffffffttfffttffttf\ntffftttttttfft11ttftttttttfftti,,::,.,:;1i;;;;.,::::,.........................,i1tffffLfttfffttffttf\ntttttttttttttt111ttttttt1ttfft1:::,,,:,:;;;;i:.,:::,,..........................;1tfffffftttffttffttt\nttttt1tttttttt11ttttttttttfttt1;,...,...:;;;:, ,:::,..........................;11ttttttt11ttttttfttt\nttttt1tttttttt11tfttttfftttttfti,..,....,,,....,:::,.........................:111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfffffffttttffft1;::::,,.......,:,:,.................. .:1111ttttttt111tttttfttt\n1tttt1tttttttt11ttttttttttttttttttt11111:......,:,,,..................,::,:1tt1111ttt1t1111ttttttt1t\n111111tttttttt111t1111tttttttttttt111111:......,,.....................,1tttttt1111111111111111111111\n1111111111t11111111111ttttttttttttt11111:......,:,,....................:1t1ttttt11111111111111111111\n1111111111111111111111ttttttttttttt1111t:......,;;::....................:1ttttttt1111111111111111111\n111111111111111111111111ttttttttt1111111:......,::::,...................,itttttt11111111111111111111\n111111111111111111111111111tttt111111111:......,;;::,....................:1ttttttt1tt11111ttttt11111\n1111111111111111111111111111111111111111:......:;;;::,...................,ittttttt11t11111ttttt11111\n11111111111111111111111111111111111111t1:......:;i;;::,...................:11tttttt1tttt11ttttt11111\n1111111111111111111111111111111111111111,......:;;;;;::,..................,1tttttttttttttttttttt1111\n","ttftfffttttttttttfffffLftfftttttttttt111tttt1111111tttt111111ttttt11111tttttttttttttttttttt11111111t\nttfttttttttttttttfffLLLftffffffffftttttt111111111ttfffftt1tt1111111111111111ttttttftttttttt1111111tt\nttftttttttttttttffffLftttfffffffLLLft1tttttft111tfftttfttttttttt111111ttttttfffftffffttttttt11111tt1\nttttttttttttttttfffLfttffffffLLffffttttttttttt1ttti;;;;::;i1tttt111111tffffffffftttfffffttt11111ttt1\ntttttttttttfffffttffftffffffffffttfftttttt1ttt111i,,,,,,,,,;11111t1111111tffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttffft1i::,,,,,,,,,:1t11t111tt1111ttffffftttftt1tt1111ttttt\nttttttttffLLLLLLLffttfLLLfttfLfftfLLtttttfffffti:;;iiiiiiii::1tt11111tftt1111ttffffttt11tffft11ttttt\ntttttttfffLLLLLLLLLftffftttffLffftfftttttffffft::;;iii1i111i:1ttt1111ttt1tttt11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffffft;;;;;;;iiiiii;tttt11111111ttftttttttt11tffffffffffttt\ntttfftfffLLLLLLLLLfttfftfLfffffffLLftttttfffft1ii;;;;;iiiiiitfttt11111ttt1ttt11tttt11ttfffffLLfLfttt\nttfLLfffffLLLLLLLfftfLLftfffLLffLLLftttttttfftiii;;i;;ii111itfft111111tfft11t11tt1tttttfffLLLLLLLfff\ntfffffttftfLLLffttttffffftfLLLLfLLLftttft111tt1iii;;;;iiiii1tt111tt111tffttfftt11tfftttffLLLLLLLLfff\nttttfttffttffftttttttttttttfLLLffLLftttt1tttt11t1i;;;iiii1111t11111111tffttffftttttttt1ttfLLLfffffff\nttfLffffffftttfffffffffttftttfLfffLftttttfffft11i;;;;iiii111tfttt11111ttt1fffttt1ttt1tttttfLLffftttt\nttffffffffftttfffffffffttfftttfttttttttffft11111i;;;;;iii1tt11tttt1111t111ffttffttfffffLLfttttfLffff\nttffffffffttttffffffffttttttttttffftt11ttt1111t1i;;;iii1i1itt11ttt111111t11t1ttft1ttffffLLftttfLLLLL\ntttffffffffttfffffffftttttt1111tffftttt11i;::i1iii;;;iii1i,:;i11t11111tttt1111tt11ttffffLfftttffLLLf\nttttttttfffttfffttttttttffttt11ttft1ii;:,....;i;;;ii;;i1t:,...,:;i1111tttt111ttt1111tttffffftfLLLLLf\ntfttttttttttttttttttttfffftttt11t1:,,........ii:;;iii1tt1,,,......,,;i1tt11111ttttt11111ttfftffffftt\ntfttfffffttttttfffft1tffffttfft11;,..........:;::;ii11t1:,,,...,,:,...,it11tt11tffffttttttt1ttttffft\nttttfffffftttfffffft11tfffttfttt1,....,,......,:;;;;;;i,.......:iii;;,.,1t1ttt1tffftttttfftt11tfffff\n1tttffffftt1ttfffft1111tfttft11ti,.............;i;;;;;:........:iiiii:..it11tt1tfftt1tfffffft1fLffLf\ntttttffttttt11tttt1tttt1tttt1tt;,..............i1;;;;;,........,;iii;,..it111t11ttttttttfftt111fffLf\ntfftttttttfftt1111ttfft11111tft:...............;i;;;;:,.........:;ii:..,ittt111111tfftttttt1tt1tffft\nttttttttttttttt11ttttttt11ttff1,...............,::::::......... ,;ii:...itttt111ttffffft1tttfttttttt\ntfffttttffftttt11ttttttt111tft;,........... ..,:;:::,...........,:;:...;ttttt11ttfffffttttttttffttf\ntfffttttfffffft11ttttttf11111;:,..... .....,:::::::::...............,...:1ttt1111fffffffttfffffffttf\ntfffttttfffffft11ttttttt11ti,,...........,:;i;;;:::::..................,.:tt11111tffffffttfffffffttf\ntffftttttttfff111ttttttt111,.,,,,...,,..,;;;;;i;:,::,....................,;i1t111tffffLfttfffftffttt\ntttttttttttttt111ttttttt11t:.......,....,:;;;;;:::,:,.......................:1t11tfffffftttffttffttt\nttttt11ttttttt11tttttttt11t1,............,,,...,::::.........................:111ttttttt11ttttttfttt\nttttt1tttttttt11ttttttfft1t1:,............ .. ,:::,........................,i111ttttttt11ttttttfttt\n1tttt1ttfttttt11tfftttfftttttt1;::,,::.........,:,,,........................i1111ttttttt111tttttfttt\n1ttt11tttttttt11tttttttttttttttttt111i.........,::,,................. . .;t11111ttt1tt111ttttttt1t\n11t111tttt1tt111111111tttttttttttt111i,........,:,,...................,..,itttt111111111111111111111\n1111111111111111111111tttttttttttt111i,....... ,:....................i111ttttttt11111111111111111111\n1111111111111111111111ttttttttttt1111i,....... ,:,::,................,i1t11tttttt1t11111111111111111\n111111111111111111111111tttttttt11111i,........,::;:,..................;1ttttttt11111111111111111111\n1111111111111111111111111tttt11111111i........ ,,:::,..................,1ttttttttttt1111111tt1t11111\n1111111111111111111111111111111111111i,........,,:::,...................it111ttttt11t11111ttttt11111\n111111111111111111111111111111111111t1,........,,,:::,..................,1t1ttttttt1tttt11ttttt11111\n11111111111111111111111111111111111111,........,,,;;::,..................i111ttttttttttttttttttt1111\n","ttftffftttttttffffffffLfttftttttttttt111tttt1111111tttt111111tttt1111111ttttttttttttttttttt11111111t\nttfttttttttttttttftfLLLftffftffffftttttt111111111ttfffftt1tt1111111111111111ttftttftttttttt1111111tt\nttftttttttttttttffffLftttfffffffLLLft11tttfft111tfffffffttt1ttttt11111ttttttfffftffffttttttt11111tt1\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tt111ii11tft1ttttt11111tfftfffffftttfffffttt11111ttt1\nttttttttttttffffttfffttfffffffffttffftttt111ttt1:,,,,,,,:i1111111t111111ttffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttftt1;:,,,,,,,,,;1tt111t1111t111tttffffftttftt1ttt111ttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttffft1i;;;;;;;;;;::1tttt11111ttt11111ttffffttt11tffft11ttttt\ntttttttfffLLLLLLLLLftffftttffLLfftfftttttffffi:;iii111111i:ittttt1111ttt1tttt11tfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftfftttttfffff;:;;;;iiiiiii:ittttt11111111ttttttttttt11tffffffffffttt\ntttffftffLLLLLLLLLfttfftfLftfffffLLftttttffff1i;;;;;ii;iiiittttft11111ttt1ttt1ttttt11ttfffffLLfLfttt\nttfLLfffffLLLLLLLfftfLLftfffLfffLLLftttttttf1i1i;i;;iiii1i1tffft111111tfft11t11tt1tttttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1111iii;;;;ii1i1i11tt111t1111tffttfftt11tfftttfffLLLLLLLfff\ntttffttfftffLftttttttttttttfLLLffLLfttttttttt11i;;;;iiii11t11111111111tffttfffttttttt11ttfLLLfffffff\nttfLffffffftttfffffffffttftttfLfffLftttttffft11i;;;iiiii1t11ttttt11111ttt1fffttt1tttttttttfLLftftttt\nttffffffffftttfffffffffttffttfffttttttttfft1111i;;;;iii1111111tttt1111tt11ffttffttfffffLffttftffffff\nttffffffffttttffffffffttttttttttffftt11tttt11t1ii;;;iii11tfft11ttt111111t11tttfft1ttffffLLfttffLLLLL\ntttffffffffttfffffffftt1ttt1111fffft1tt11iiii1iiii;iiii1i:1tft11111111tttt111ttt11ttffffLfftttffLLLf\nttttttttfffttfffttttt1ttfft11111tft11i;:,..,;ti;;;i;iii1;,,,:;i1111111tttt111ttt1111tffffffftfLLLLLf\ntfttttttttttttttttttttfffftttt11i;::,,......iti::;i;iitt:,,....,:;i111ttt111t1ttttt11111ttfftffffftt\ntfttfffffttttttfffftttffffttft11:...........;ii::;i11tti,,,,.......,:itt111tt1ttffff11ttt111ttttttft\nttttfffffftttffftfft11tfffttftt;,............,:;;;;;11;,..............;1111ttt1tffftttttfftt1ttfffLf\n1t1tffffft11ttfffft1111tfttft11:.............,:ii;;;;;,...............:11t11tt1tfft11tfffffft1ffffLf\ntttttfftt1tt11tttt1ttt11t1111t;,..............:i1;;;;:,...............,111111t11ftttttttfftt11tfffLf\ntfftttttttfftt1111tttft11111t1,...............:ii;;;;,............,,,.,1tttt11111ttfftttttt1tt1tffft\nttttttttttttttt11ttttttt11ttfi................:;::;::,...........,;i;;:1tttttt11ttffffftttttfftttttf\ntfffttttftttttt11ttttttt11ttfi................,;;:::,............,;iiii1tttttft1ttffftfttttttttftttf\ntfffttttfffffft11ttttttt11111;........ .......:;:::,............:iiiii11ttftt11tfffffffttfffffffttf\ntfffttttftffff111ttttttt11ti:,....... ,:::;;:,.,;:::,............:;;ii:i11tt1111tfffffffttfffffffttf\ntffftttttfffft111ttttttt11i,.........,iii;;;,..,:::,.............::;;,.it1111tt11tffffffttfffftffttf\ntttttttttttttt111ttttttt11,.,,,,..,,,:;;;;;;,..,:::,.............,::;..:i111ttt11tfffffftttffttffttt\nttttt1tttttttt111ttttttt11;,,,...... .:;;;;:...,:,,,.....................:111tt11ttttttt11tttttffttt\nttttt1tttttttt11tttttttt111,..........,,,,.....,:,,.......................:111111ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfft11i:,.....,.... .....,::,......................,1t11111ttttttt111tttttft1t\n1tttt1tttttttt11ttttttttttttt1ii;;;:...........,:,,.....................,it111111ttttttt111ttttttt1t\n11t1111tttttt111111111tt1tttttttt11:...........,:,,.............. .;t11111111111111111111111111\n1111111111111111111111ttttttttttt11,.......... ,,................,:,,,:i1tttt1t111111111111111111111\n1111111111111111111111tttttttttt11i,...........,,,,..............:1t11ttttttttttt1111111111111111111\n111111111111111111111111tttttt1111;........... ,,:;,..............:11ttttttttttttt111111111111111111\n11111111111111111111111111tttt1111;........... ,,:;:...............:111tttttttttt11t1111111tttt11111\n1111111111111111111111111111111111;....,,......,,,::................i1ttttttttttttt1t11111ttttt11111\n1111111111111111111111111111111111;............:,,;:,...............;1tttttttttttttttttt11ttttt11111\n1111111111111111111111111111111111:............,,:;;:...............,1t1tttttttttttttttttttttttt1111\n","ttftffftttttttfffffttfLfttftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffft1ttt1111111111111111ttttttftttttttt111111ttt\nttftttttttttttttffffLftttfffffffLLLftt1tttttt111ttfffffftttttttt111111tttttffffftffffttttttt111tttt1\nttttttttttttttttfffLfttffffffLLffffttt1tttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111tttt\nttttttttttttffffttfffttfffffffffttffftttt11111111i;i11ttt11tt1111t111111ttffffLLffttfLfft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLLfttttttfti:::,,,,:;i1ttfttt11t111tt111tttffffftttftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLftttttft1;,,,,,,,,,,;tffffft11111tft11111ttffLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLfLftffttttfffti;:;;;;iii;::1fffffttt111ttt1tttt1ttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLfftfftttttfffi;;iiiii1111i:iffffftt11111111ttttttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttttffi:;;;;iiiiiii:1ftttfftt1111ttt1ttt1ttttt111tffffffLfLfttt\ntffLLfffffLLLLLLLfftfLLftftfLfffLLLLttttt1t1i;;;;;ii;iiii1ttffft111111tfft1tt11tt1tt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft11i1i;;;;i111iii111tt111t1111fffttfftt11tfftttfffLLLLLLLffL\ntttffttfftffLftttttttttttttfLLLffLLftttt1tti1i;;;;ii1iii1tt11111111111tffttffftttttttttttfLLLLfffffL\nttfLfffffffttffffffffffttftttfLfffLftttttfftt1;;;;iiii11ttt1ttftt11111tfttffftt111ttttttttfLLftftttt\nttffffffffftttfffffffffttffttfftttttttttfft111i;;;iiii1t111t1ttttt1111tt11ffttffttfffffLLfttffffffff\nttffffffffttttffffffffttttttttttfffttt1tft1111i;;;iiii111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt1111tffft11t111111iiii;;iii111fffft11111111ttft111ttt11tfffffLfftttfLLLLf\ntttttttttffttfffttttt1ttfft1t11ttfftttt1iiii1i;;;iii1i1i,;i1ttt1111111tttt111tttt111tffffffftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tff11i;:,,,:11i;;iii;it;....,:;i111111ttt111t1ttftt11111ttfftffffftt\ntfttfffffttttttfffftttffffttfft1ii;:,,.....:11;:;;;;1tt;,,,.....,,;i11tt111tt1ttfffftttttt11ttttttft\nttttfffffftttffftfft11tfffttft1;,..........:1ii;;ii1tti,,,..........,it1111ttt1tfffttttffftt1ttfffLf\n1tttffffftt1ttfffft1111tfttft1i,............,:;ii;;i1i,..............:111111tt1tfft11tfffffft1ffffLf\ntftttffttttt11tttt1ttt11t1111t;..............,;1i;;;;,...............,1111111t11ftttttttfftt11tfffLf\ntfftttttttfftt1111ttttt11111tt:............. ,;ii;;;:,...............,i111tt11111tffftttttt1tttttfft\nttttttttttttttt11ttttttt11ttft,...............;;;;;:,.................ittttttt11ttffffftttttfffttttt\ntfffftttftttttt11ttttttt11ttf1,...............:;;;::,.......,,,.......;tttttfftttfffftfttttttttffttf\ntfffttttfffffft11ttttttt1111t1,...............:;;;::........,;i;:,....;t1ttfttt1tfffffffttfffffffttf\ntfffttttftffft111ttttttt11t111,...............,::::,........:iiiii:...;t11tt1111tffffLffttfffffffttf\ntffft1tttfffft111ttttttt11ttt1,..... ..........::::,.......,;iiii;,...it11111tt1tfffLfLfttfffftffttf\ntttttttttttttt111ttttttt11tt1:... .,..........,:::.........:;;i;,...,1t1t11tft11tfffffftttffttffttt\nttttt1tttttttt111ttttttt1tt1:,...:;ii:.........,::,.........,:;;:.....,it1111tt11ttttttt11tttttffttt\nttttt1tttttttt11ttttttttt1t;::,;iiii;,.........,:,,...........,,,......,;11111111ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfft1ti:,,;;;:;;,.........,:,,.......... ..........:tttt1111ttttttt111tttttfttt\n11ttt1tttttttt11ttttttttttt1,.,::::;;:.........,:,,...............,....;ttttt1111ttttttt111ttttttt1t\n11tt11tttt1tt111111111111ttti:,,,::;:..........,:,,............ ......;ttttt11111111111111111111t111\n1111111111111111111111tttttttt1:,,,............,:,.............,. .,;11tttttt1111111111111111111111\n1111111111111111111111tttttttttt1:.............,,............ .11ii1ttttttt1111111111111111111111111\n111111111111111111111111tttttt111,.............,::,,...........ittttttttttttt11111111111111111111111\n11111111111111111111111111111111;..............,;;;:,..........:11tttttttttttttt11111111111111t11111\n11111111111111111111111111111111;..............,;;;:,...........:11tttttttttttttttt1111111ttttt11111\n11111111111111111111111111111111:..............,;;;;:...........:1ttttttttttttttttttttttt1ttttt11111\n11111111111111111111111111111111:..............,;i;::,..........,1tttttttttttttttttttttttttttttt1111\n","ttftffftttttttfffffttfffttftttttttttt111tttt1111111ttttt11111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttftffLLftffffffffttttttt111111111ttfffffttttt111111111111111ttffttftttttttt11111tttt\ntfttttttttttttttffffLffttfffffffLLLft11tttttt111tfffffffttttttttt11111ttttfffffftfLLfttttttt1111ttt1\nttttttttttttttttfffLfttffffffLLffffttt1ttttttt1ttfffffffffttttttt1111ttfftffffLftttfffffttt11111tttt\nttttttttttttffffttfffttffffffffftttfttttt111ttt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttfLLLfftttttffLftttttttt11ii11fffft1ttfftt11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLLfttttt1i:;:,,::;i1tttffffftt11111tft11111ttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttffLffftffttttfti:,,,,,,,,,:;tfffffttttt111tftttttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftffttttttti:::::;;;;;,,1ffttffttt11111111ttttttttttt1ttffffffffffttt\ntttfftfffLLLLLLLLLfftfftffftffffLLLfttttti;iiiii11111;:1ttfffffftt1111ttt1ttt1tftttt11tfffffLLfLfttt\nttfLLffffLLLLLLLLfftfLLftttfffffLLLLttttt;;i;;iiiiii1;:i11tfffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttft1ii;;;ii;;iii;tt11ttt111t1111tffttfftt11tfftttffLLLLLLLLffL\ntttffttfftffLftttttttttttttfLLLffLLftttt11ti;;;iiii1iii1ttt1ttt1111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttftttfLfffLfttttt11i;;;iii1iii1tttt1tfftt11111tfttffftt11tttttttttfLLffftttt\nttffffffffftttfffffffffttfftttfftffttttfft11;;;iiiii11tt111ttttttt1111tt1tffttffttfffffLLfttftfLffff\nttffffffffttttffffffffttttttttttfffttt1tft11i;iii11i11111tfft11ttt11111tt11tttfft1tffffLLLfttfLLLLLL\nttfffffffffttfffffffftt1ttt111tfffftttt11111i;i;iiii111ttfffft11111111tttt11tttt11tffffLLfftttfLLLLf\nttttttttfffttfffttttt1ttfftt111tfffttt111111;;i;;iii11i1ttffft11111111tttt111tttt11ttfffffLftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tffttt1t1ii1;;i;;iiii1;,::i11tt1tt1111ttt11tt1tfftt11111ttfftfLffftt\ntfttfffffttttttfffft1tffffttfft11tft11i::,,1ii;:;ii;it:,,...,,:;i11111tt111tt1ttfffftttttt11tttttfft\nttttfffffftttffftfft11tfffttfttttt1i:,....,it1i;;;;i1t;,,,,.......,;111t111ttt1tfffttttffftt11tffLLf\n1tttffffftt1ttfffft111ttfttft11i;:,........i1tt1ii1tt1:,,...........:1111111tt1tfftt1tfffffft1ffffLf\ntftttffttttt11tttt1ttt11t1111t;,...........,;;;11;;;;:..............,1t111111t1tftttttttfftt11tfffLf\ntfftttttttfftt1111ttttt11111tt:..............:;ii;;:,................it111tt11111tffftttttt1tttttfft\nttttttttttttttt11ttttttt11ttf1,..............,;;;;::,................it1tttttt1ttfffffftttttfffttttt\ntfffttttffttttt11ttttttt11ttfi................;;;:::,,:;:,...........;tttttttftttffffffttttttttffttf\ntfffttttfffffft11ttttttt1111ti................:;:::,.:;iii;,.........:111ttfftt1tfffffffttfffffffttf\ntfffttttftffff111ttttttt11t11;................,;:::,.;iiiii:.........:tt11ttt111tfffLfLfttfffffffttf\ntffft1tttfffft111ttttttt1tttt;................,::::,.:;;ii;,.........;ttt1111tt1tfffLLLfttfffftffttf\ntttttttttttttt111tttt1tt11ttti.................:::,...,;;i;,.........itttt11ttt11ffffffftttfftfffttt\ntttttttttttttt111ttttttt11tt1;.................:::,....,:;:,.........,1tt1111tt11ttttttt11tttttffttt\nttttt1tttttttt11ttttttttt1t11:.................:::,.... ..............:1111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfft11ti;,................,::,.........,......... :ttttt1111ttttttt111tttttfttt\n11tt11tttttttt11tttttttt1tt1iiii:..............::,,...................:1tttt111111tttttt111ttttttt1t\n11t1111tttttt1111111111t111iiiiii:.............,:,,,.................:1ttttt11111111111111111111t111\n11111111111111111111111t11i;;iiii;.............,:,,,........... .,;ttttttttt1111111111111111111111\n1111111111111111111111tt1t1i;;ii;,.............,,........... :i;;i1tttttttt1111111111111111111111111\n1111111111111111111111111ttti:,,...............,,,.......... :ttttttttttttttt1t111111111111111111111\n11111111111111111111111111111;::...............:;;::,........,i11ttttttttttttttt1111111111111tt11111\n111111111111111111111111111111t;...............:ii;;:,........;t1tttttttttttttttt1t1111111ttttt11111\n1111111111111111111111111111111:...............:;i;:::........:tttttttttttttttttttt1ttttt1ttttt11111\n1111111111111111111111111111111:............. ,;ii;;;:,..,,...:ttttttttttttttttttttttttttttttttt1111\n","ttfttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt11111111t\nttfttttttttttttttttffLLttffffffftttttt1t111111111tfffffftttt1111111111111111ttffttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111ttttt\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLftttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttffttttt1111tt1ttffffffttttt1111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffttttffffftttffftt11t111tt111ttfffLLftttftt1tt111tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttt11i;;;;i1tftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttffLLfftffttttti:::,,,,::;i1tffffffffttt111tft1tttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffLfftfftttt11;,,,,,,,:,,,;tffffffffttt1111t11ttttttttttt1ttffffffLfffttt\ntttfftfffLLLLLLLLLftffftfLftffffLLLftttt1i;;;;iiiii:,:1tttfffffftt1111ttt1ttt1tfttt111tfffffLLfLfttt\nttfLfffffLLLLLLLLfftfLLftttfLfffLLLLttt1i1iiiii1111i::1111ttffft111111ffft1tt11tt1tt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt11;;;iiiiiii:;ttt111tt111tt111tffttfftt11tfftttffLLLLLLLLffL\ntttffttffttfLftttttttttttttfLLLffLLftttt1i;;;iii;iii;ittfft11tt1111111tfftfffftttttttttttfLLLLffffff\nttffffffffftttfffffffffttfttfLLfffLfttt111;;;i111111iitfttt1tfftt11111tfttfffttt1tttttttttfLLftfttft\nttffffffffftttfffffffffttffttffftfftttttt1i;;iiiii1i1tft11tttttttt1111tt1tffttffttfffffLLfttftffffff\nttffffffffftttffffffffttttttttttfffttt1ttti;;;i111iitt111tfft11ttt111111t1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111tfffftttt111ii;iii;ii11111tfffft11111111tfft11tttt11tffffLLfftttfLLLLL\nttttttttfffttfffttttt1ttfft1111tffftttt1111;;;i;;;i111ttttffftt1111111tttt111tttt11ttfffffLftfLLLLLf\ntfttttttttttttttttt1ttfffftttt11tfft111tt1i;;;i;;i1i1;i11tffftt11t1111ttt11tt1tfftt11111ttfftfLffftt\ntfttffffftt11ttfffftttffffttfft11tft11ii;ii;;;;:;iii1,.,,,:;iii1ttt111tt111tt1ttfffftttttt11ttttfftt\nttttfffffftttffftfft11tfffttftttttt1;:,..:11;;i;;;;11:,,,.....,,:i1111tt111ttt1tffftttttfftt1ttffLLf\ntt1tffffftt1ttfffft1111tfttft1111i:,.....,i11iiiii1tt:.,..........:111111t11tt1tffft1tfffffft1fLffLf\ntftttffttttt11tttt1ttt11t11111;:,.........;i11i1111t;..............;t11111111t1tfttttttfffftt1tfffLf\ntfftttttttfftt1111ttfft111111:.............,::;ii;;:...............:111111ttt111ttffftttfft1tttttfft\nttttttttttttttt11ttttttt11tt1,..............::;;;;;,...............,1111tttttt11tffLffftttttfftttttt\ntfffftttffttttt11ttttttt11tfi,..............,::;;::,,...............i111ttttfftttffffffttttttttffttf\ntfffttttfffffft11ttttttt111ti................::::::,:;;::,..........it111ttffttttfffLfLfttfffffffttf\ntfffttttftffff111ttttttt1tt1;................,;::::.:iiiii,.........;11111ttt11ttfffLfLfttfffffffttf\ntffft1tttfffft111ttttttt11tti,................::::,.:ii;ii:.........;tttt1111ttttfffLLLfttfffftffttf\ntttttttttttttt111ttttttt1ttf1.................,:::,.,:;iii:.. ......:ttttt11tft11tfffffftttfftfffttt\ntttttttttttttt111ttttttt1ttt;::...............,:::,. .:;ii:..........;ttt1111tt11tttttft11tttttffttt\nttttt1tttttttt11ttttttttt1t111i;,..............:::,....,::,...........;1111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttttfftt1iiiiii:.............:::,.... ............. :ttttt1111ttttttt111ttttffttt\nt1ttt1tttttttt111ttttttttt1i;iiii;,............,:,,,................. ,1tttt111111tttttt111ttttttt1t\n11t1111tt1ttt11111111111111i;iii1i,............,::,,.................:1tttt11111111111111111111tt111\n11111111111111111111111111t1;;;;;,.............,:,,,.......... .:1tttttt111111111111111111111111\n1111111111111111111111111t11;,.................,:,,..........,;:::;1ttttttt1111111111111111111111111\n11111111111111111111111111111:..,..............,,............:ttttttttttttttttt111111111111111111111\n111111111111111111111111111111ii;..............,::,...........i111ttttttttttt11111t11111111111111111\n111111111111111111111111111111t;...............,;ii;::,.......:1ttttttttttttt11t1tt1111111ttttt11111\n111111111111111111111111111111i,...............:;ii;;;:,......,1ttttttttttttttttttt111111tttttt11111\n11111111111111111111111111111ti,...............:;ii;;;;:,..:..,1ttttttttttttttttttttttttttttttt11111\n","ttfttfffttttttffffttfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLttffffffffftttttt111111111tfffffftttt1111111111111111ttftttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLftttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttffftttt1111tt1ttffffffttttt1111t111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffftttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffftfLftttttfttttttttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttffLffftffttttt1ii::::;111tttffffffffttt111tft1tttt1ttffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLfftffttttt1:,,,,,,,,:;ittffffffffttt1111t11ttttttttttt1ttffffffffffttt\ntttffttffLLLLLLLLLftffftfLftffffLLLftttti::,::::::,,,;ttttfffffftt1111tft1ttt1tffttt11tfffffLLfLfttt\nttfLffffffLLLLLLLfftfLLftttfLfffLLLfftt11iiiii111i;,,;t111tfffft111111ffft1tt11ttttt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiii1111i:,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\nttttftttttffLftttttttttttttfLLLffLLftttti;;;ii;iiii::1ttttt11tt1111111tfftfffftttttttttttfLLLLffffff\nttfLfffffffttffffffffffttfttfLLfffLfttt1i;;i1i;iiii:;tftttt1tfftt11111tfttfffttt1tttttttttfLLftftttt\nttffffffffftttffffffffftfffttffftffttttti;;iii111i1iitft11tttttttt1111tt11ffttffttfffffLLfttftfffffL\nttffffffffftttffffffffttttttttttfffttttti;;;ii1111ii1t111tfft11ttt111111t11tttfft1tfffffLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111tfffftttt1i;;;iiiiii11111ttfffft11111111tfftt1tttt11tfffffLfftttfLLLLf\nttttttttfffttfffttttt1ttfft1111ttffttt111i;;ii;;;itt11ttttfffft1111111tttt111tttt11tttfffffftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tfft1t1t1i;;;ii;;it111ttttffftt11t1111ttt111t1tfftt11111ttfftfLffftt\ntfttffffftt11ttfffftttffffttfft1ttft11ii1;;;;i;:;i1;;i11tttft111tt1111tt111tt1tffffftttttt11ttttfftt\nttttfffffftttffftfft11tfffttftttt1i;:,,:1i;;;;i;;;1;.,,,;;i11111111111tt111ttt1tffftttttfftt1ttffLLf\n1tttffffftt1ttfffft111tffttft1ii:,.....,11iiiiiii1t:,,,.....,:;i111111111t11tt1tffft1tfffffft1fLffLf\ntftttffttttt11tttt1ttt11t11i;:,........,i1tt1ii11tt:,,,,........:t11111111111t1tfftttttfffftt1tfffLf\ntfftttttttfftt1111ttfftt11i,............::;;iiiii1;,,............it1111111ttt111ttffftttfft1tttttfft\nttttttttttttttt11ttttttt11;...............:;;;;:;;...............:111111tttttttttffLffftttttfftttttt\ntfffftttffttttt11ttttttt11:...............,;;;;;;:,..............,111111ttttfftttffffffttttttttffttf\ntfffttttfffffft11ttttttt11,...............,:;;;;:,...............,1111111ttffttttfffLfLfttfffffffttf\ntfffttttftffff111ttttttt11:...... ........:;;;;:,...............,11111111ttt1tttfffLfLfttfffffffttf\ntffft1tttfffft111ttttttt11:.......:;;;:....,;;::::.......,::,....,1tt11tt1111tt1tfffLLLfttfffftffttf\ntttttttttttttt111ttttttt11:.....:;;;;;:.....:;:::,.......,:iii;,.,1t1t11tt11tft1tffffffftttfftfffttt\ntttttttttttttt111ttttttt1i,.....:;:;;;:.....,::::,........;;iii;..;t1111t1111tt11tttttftt1tttttffttt\nttttt1tttttttt11tttttttt1i,.....:::;;;,......::::,.......,;;ii;:..,;1t11111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttttttti....,,,,:;;,.......,:::,,.......,;;;;,....,it11tttt1111ttttttt111ttttffttt\n11tt11tttttttt111ttttttt1:,,.,,,..,,,.........::::,........,:;,..... ,1tttttt11111ttttt1111ttttttt1t\n1111111tttttt11111111111i,,..,,,.... .........::::,..................itttt111111111111111111111tt111\n1111111111111111111111111,...,,...............,::,,,...........,,...;tttttt1111111111111111111111111\n11111111111111111111111111,..... .............,::,,,......... . .:1tttttt1111111111111111111111111\n1111111111111111111111111ti,,,.,,..............::,,..........,,,::i1tttttttttt1111111111111111111111\n11111111111111111111111111111i11;..............:,............,1tttttttttttttt11111111111111111111111\n1111111111111111111111111111111i...............:;:::::,.......;tttttttttttttt11t1ttt111111ttttt11111\n1111111111111111111111111111111:...............:iiii;;::,......ittttttttttttttttttttt1111tttttt11111\n1111111111111111111111111111111,...............:iiiii;;:,......,1tttttttttttttttttttttttttttttt11111\n","tttttfftttttttffffftfffftfftttttttttt111tttt1111111tttt111111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLftfffffffffttt1tt111111111tfffffftttt1111111111111111ttftttftttttttt11111tttt\nttttttttttttttttfffffftttfffffffLLLftt1tttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttfffffttffffffLLffffttttttttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1tffffftttffftt11t111tt111ttfffLLffttfft1tt111tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttftttffffffftt1111tftt1111tffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLftffttttfLLffftfftttttftttttttffttttffffffffftt111tftttttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftffttttttiii;::::i1ttttffffffffftt1111t11ttttttttttttttffffffffffttt\ntttffttffLLLLLLLLLftffftfLfttfffLLLfttt11:,,,,,,,:::itttttfffffft11111tft1ttt1tffttt11tfffffLLfLfttt\ntffLffffffLLLLLLLfftfLLftttfLfffLLLLfttt1i::::,,::,,,itt11tfffft111111ffft1tt11tt1tt1ttffLLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttttiiiiii1i;:,,:ttt111ttt11tt111tffttfftt1ttfftttffLLLLLLLLffL\nttttftttttffLftttttttttttttfLLLffLLftttti;iiii111i;:,iftftt11ttt11111tffftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttfttfLLfffLfttt1;;;ii;iiii;::1ffttt1tffft11111ffttfffttt11ttttttttfLfftftttt\nttffffffffftttffffffffftfffttffftfftttt1;;i1i;;iii;:itft11tttttfttt111tt1tffttffttfffffLLftfftfffffL\nttffffffffftttffffffffttttttttttffftttt1;;iiii111iii1t111tfft1tttt111111t1ttttfftttfffffLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111ttffftttti;;iiiiiiiii1111ttfffft11111111tffttttttt11tfffffLfftttfLLLLL\nttttttttfffttfffttttt1ttfft1111ttfftttt1;;;iiii;;itt11tffffffft1111111tttt111tftt11tttfffffftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tfftttt1i;;;;ii;;it1111tftfffft11t1111ttt111t1tfftt11111ttfftfLffftt\ntfttfffffttt1ttfffftttffftttfft11tft111i;;;;;ii;;i111111tttft111tt1111ttt11tt1tffffftttttt11ttttffft\nttttfffffftttffftfft11tfffttfttt11i;;:ii;;;;iiiii1;11tt111t11111tt1111tt111tft1tffffttfffftt11tffLLf\n1tttffffft11ttfffft1111tfttftii;:,....;1i;;;;ii111,,:;i1tt11tt11111111111t11tt1tffft1tfffffft1fLffLf\ntftttffttttt11ttt11ttt1111i;:,.......,i1tiiii;;11i,,,..,:;i1t1t111t1111111111t1tfftttttfffftt1tfffLf\ntfftttttttffttt111ttttt1i:...........,ii111iii11i:.,,......,:;1t111111111tttt111ttfLftttfftttttttfft\nttttttttttttttt11tttt11t;..............,::;;i1ti:,............,1t1111111tttffttttffLfffttttffffttttt\ntfffttttfftfttt11tttttt1,...............:;:;;;;;:..............;tt111111tttffftttffffffftttttttffttf\ntfffttttfffffft11tttttt1................,;;;;;;;:..............:t11111111ttffttttffLLfLfttfffffffttf\ntfffttttfttftt111tttttti............... .:;;;;;:,..............:1111111111tttttttffLLfLfttfffffffttf\ntffft1ttttttft111tttttt;............. .:;;;;;;:::..............:111tt11tt111ttt1tfffLLLfttfffftffttf\ntttttttttttttt111ttttt1,..............:;i;;i;::::..............:1ttt1111tt11tff1tffffffftttfftfffttt\nttttttttttt1tt111ttttt;..............:;;;;;i:::::..............;1111111111111tt11tttttftt1tttttffttt\nttttt1tttttttt11tttttt:..............:;;;::;:::::..............;t1111111111111t11ttttttt11tttttffttt\n1tttt1tttttttt11ttttt1,........... .,,:,...,:::::..............,11i;;i111tttt1111ttttttt111ttttffttt\n11tt11ttttttt1111tttt;............,..... ...,::::...............:i;:;;i1ttttt11111tttttt111ttttttt1t\n11111111t1tt111111111,............,.........,::::,..............,:::;ii1tt111111111111111111111tt111\n111111111111111111111,............ .........,,,::,..............::::;i11tt11111111111111111111111111\n1111111111111111111111:....... .............,,:,,..............,::::i111t11111111111111111111111111\n11111111111111111111111:....,,,,.............,:::,,..................,1t1111111111111111111111111111\n111111111111111111111111iiii11t; .............,:,..,........ ..:1tttttt11111111111111111111111\n111111111111111111111111111111t:...............:,,,:,,......,,,,,:;;1tttttttt1t111tt1111111tttt11111\n111111111111111111111111111111t: .............::;ii;::,.....,i111ttttttttttttttt11ttt111111tttt11111\n111111111111111111111111111111t:..............:;;iiii;:,.....,i1ttttttttttttttttttttttttttttttt11111\n","tttttfttttttttffffffffffffftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLftfffffffffttt1tt111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\nttttttttttttttttffffLftttfffffffLLLfttttttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\nttttttttttttttttfffffttffffffLLffffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\nttttttttttttffffttfffttfffffffffttfftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfLftttttttfffft1ttfffffttffftt11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffttttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLffftfftttttfftffffffftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftfftttttt1iii::;i1ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\nttttfttfLLLLLLLLLLfftfftfLfttfffLLLfttt11:,::,,,,,:;1tttttfffffftt1111tft1ttt1tffttt11tfffffLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLLffLLLffttt1;:,,,,,,,,,;ttt11tfffft111111ffft1tt11ttttt1ttffLLLLLLLLfff\ntfffffttttfLLLffttttfffffttLLLLfLLLftttt1iiiiiiii;:,,iftt111ttt11tt111tffttfftt11tfftttffLLLLLLLLffL\nttttftttttffLftttttttttttttfLLLffLLfttt1i;iii1111i:,:1ftfft11ttt111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttfLfffLfttt1;;;i;iii1i:,;tffttt1tffft11111tfttfffttt11ttttttttfLLftfttft\nttffffffffftttffffffffftffftttfffffttt11;;;ii;;iii::1fft11tttttfttt111tt1tffttffttfffffLLffffffffffL\nttffffffffftttffffffffttttttttttfffttt1i;;iiiii11i;itt111tfft1tttt111111t1ttttfftttffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111ttfffttt1i;;iiiiiiiii1111ttfffft11t11111tffttttttt11ttffffLfftttfLLLLL\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;;1t11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\ntfttttttttttttttttt11tfffftttt11tfftt111;;iiiii;;;1111ttftfffft11t1111tttt1tt1tffttt1111ttfftfLffftt\ntfttfffffttt1ttftfftttffftttfft11tft1i1i;;;;iii;;;111111tttft111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffftttt11tfftttfttt11i;;;1;;;;;iiii;i1t11t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\n1t1tffffft11ttffttt1111tftttti;:,,...:1i;;;;iiii1i:;i1ttt111tt11111111111t11tt1tffft1tffffffttfLffLf\ntftttfftt11t11ttt11ttt111i;:,,.......:11ii;;ii;11i,.,,:;11tt11tt11t1111111111t1tffttttffffftt1tfffLf\ntffttttttttftt1111ttttt1:............:1111iiii1ti;,,....,,;i1tttt11111111tttt111ttfLffttfftttttttfft\nttttttttttttttt111ttt1t;...............,:;;i1tt1;,..........,itttt111111tttttttttffLfffttttffffttttf\ntfffttttfftfttt11ttttt1,................:::::;i;:,...........,1ttt111111ttttfftttffffffftttttttffttf\ntffft1ttffffff111ttttti.................,;;;;;;;:,...........,1t111111111ttffttttffLLfLfttfffffffttf\ntffft1ttfttttt111ttttti................,,;;;;;;::,............it1111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttt;.............:;iii;;:;;:::,............it1111111tt111tttttfffLLLfttfffftffttf\nttttt1tttttttt111tttti,............,;;iiii::;::::,...........,1ttttt111ttt11tft1tfffffLftttfftfffttt\nttttt1tttt11tt111ttt1:.............:;;;iii;::::::............,1tttt1111111111tt1tttfttftt1tttttffttt\nttttt1tttttttt11tttti..............,;;;;:,,:::,,:............:tt11t11111111111t11ttttttt11tttttffttt\n1tttt1tttttttt11tttt:............. ,::,. .::,,,:........... :t1111111t111ttt1111ttttttt111ttttffttt\n11tt11tttttt111111ti.......................,:::::.............it111t11111tttt1111tttttt1111ttttttt1t\n1111111111111111111,.............,.........,:::::.............:1t11ii;:;11111111111111111111111tt111\n1111111111111111111:........................,,:::..............;ii;:;:;ii111111111111111111111111111\n11111111111111111111:....... ..............,,,:,...............,:::::;i1111111111111111111111111111\n111111111111111111111:......,,..............,,,:,...............:::;::;i11t1111111111111111111111111\n1111111111111111111111iiiiii1;...............,,,,.,..............,::::;11111111111111111111111111111\n11111111111111111111111111111;................,,:,,,...... .it1111111111111111111111111111\n1111111111111111111111111111t;...............;i;;;::,.....,,.....,,,;i1ttttttttt11tt111111ttttt11111\n1111111111111111111111111111t;...............:i;;i;::,....:i111111tttttttttttttttttttttttttttttt1111\n","tttttfttttttttffffftfffftfftttttttttt111tttt1111111ttttttt111tttt111111tttttttttttttttttttt1111111tt\nttfttttttttttttttttffLLftfffffffftttt1t1111111t11tfffffftttt1111111111111111ttftttftttttttt111111ttt\nttttttttttttttttffffLftttfffffffLLfftt1tttttt111tfffffffftttttttt11111tttttffffftffLfttttttt11111ttt\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt11111tfffffffLffttfffffttt1111ttttt\nttttttttttttffffttfffttffffffffftttftttttt11ttt1ttfffffftttttt11tt111111ttffffLLLfttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttfffttttt1tfffft1ttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLftttttttfffffftttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLffftffttttt111i;iitfftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftfftttt1;:,::,,,:;ittttffffffffftt1111t11ttttttttttttttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttfffLLLftt1i:,,,,,,,,,,:1tttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLLffLLLftt1i;;;;;;;i;:,:tftt11tfffft11111tffft1tt11ttttt1ttfffLLLLLLLfff\ntfffffttttfLLLffttttfffffttLLLLfLLLft1;iiiii11111i::tffft11tttt11t111tfffttfftt1ttfftttffLLLLLLLLffL\ntttfftttttffLftttttttttttttfLLLffLLftt11;;;iiiiiii:;tffffft11tt1111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttLLfffLft11i;;;;i;;iii;tffffttt1tffft11111tfttfffttt1tttttttttfLLftffttt\nttffffffffftttffffffffftffffttfftfttt11i;;;i1iii1iitffft11tttttfft1111tt1tffttffttfffffLLfffftfLffLL\nttffffffffftttffffffffttttttttttffftt11i;;;iii111ii1tt111tfft1ttft111111t1ttttfftttffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt111ttffftttti;;;;iiiiii11111ttfffft11t11111tfftttttttt1tfffffLLftttfLLLLf\nttttttttfffttfffttttt1ttfft1111ttffttt1i;;;iiii;;itt11tffffffft1111111ttttt1ttfft11ttffffLfftfLLLLLf\ntftttttttttttt1tttt11tfffft1tt11tfft111;;;;;iii;;it111ttfffffft11t1111tttt1tt1tffftt1111ttfftfLffftt\ntfttffffftt11ttftfftttffftttfft11tti;;1;;;:;iii::i111111ttfft111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffftttt11tfftttft1i;:,..,1i;;;;iii;i;:;;1t111t11111tt1111tt111tft1fffffttfffftt11tffLLf\n1tttffffft11ttffftt1111tt1ii:,,......,i1i;;;ii;11;...,:;i111tt11111111111t11tf1tfffttfffffffttfLffLf\ntfttttftt11t11ttt11ttt11;,,..........,11t1iiii1t1:,,.....,:i111111t1111111111t1tffttttffffttt1tfffLf\ntffttttttttfttt111ttttti,.............:;;iii11t1i,,.........,ittt11111111tttt11tttfLffttffttttttffft\nttttttttttttttt111tttt1:................:;;;;;i;:,...........:ttt1111111tttffttttffLLffttttffftttttf\ntfffttttftttttt11ttttti.................,;;;ii;;:............,1ttt11111ttttffftttffffffttttttttffttf\ntffft1ttfffftf111ttttti..................:;;;i;;:,...........,1tt11111111ttffttttffLLfLfttfffffffttf\ntffft1ttfttttt111ttttt;..................,;;;;;::,...........,1t1111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttt;...........,,.....,;;:;:::............,111111111tt111tttttfffLLLfttfffftffttf\nttttt1tttttttt111tttti,........,;ii:......:;:::::............,ittttt111ttt11tft1tfffffLftttfftfffttt\nttttt1tttt111t111tttt;........:;;;;:,.....,;:::::.............ittttt1111t1111tt1ttfttttttttttttffttt\nttttt1tttttttt11tttt1,.......,:::;;;,......::::::.............;tt1t1111111ttt1tttfttttttt1tttttffttt\n1tttt1tttttttt11tttti.........,:::;:.......,:::::..........,,:;1t11111111ttff1111ttttttt111ttttffttt\n111111tttttt111111t1,..........,:::........,:::::..........,:;;i1111t111ttttt11111ttttt1111ttttttt1t\n1111111111111111111;............,,.........,::::,.........,:;;;i1111111111111111111111111111111tt111\n11111111111111111111:.......................,:::,.. ......,:;;ii111111111111111111111111111111111111\n111111111111111111111:.......,..............,:::,..........,::i11t1111111111111111111111111111111111\n1111111111111111111111:,,..,, ..............,,,::,............,1111111111111111111111111111111111111\n1111111111111111111111111i11:...............,..,:,,..... ..:1t11111111111111111111111111111111111\n111111111111111111111111111;................,::::,,.....::::;i11tttt111111t1111111111111111111111111\n111111111111111111111111111,.................ii;;::,....:1tttt1ttttttttttttttttt11tt111111ttttt11111\n1111111111111111111111111ti..................;i;;;:,.....;t1ttttttttttttttttttttt1ttttttttttttt11111\n","ttffftfffttttttttftttfffttftttttttttt111tttt111111tttttttt111tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLLftfffffffftttt1t111t111t11tfffffftttt111111111111111tttftttfttttttttt1111tttt\nttttttttttttttttffffLftttfffffffLLffttttttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111tttt1\nttttttttttttttftfffffttffffffLLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttffffttfffttffffffffftttfttttt1111tt1ttffffffttttt1111tt11111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttffftttt11tttffttttfffffttfffft11t111tt111ttfffLLftttftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLftt11ii;i;;ii1tttffttffffffftt1111tftt111ttffLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfLLffftfftt1:,,,,,,,,:iftttfffffffffftt111tft1tttttttfLLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftff1i;;:,,,,,,,,:;ttttfffffffffftt1111t11ttttttttttttttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttfffLLLt;,,:;;;;;iiii:ittttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLLffLLLfi,:iiii111111;1ffftt11tfffft11111tffftt1t1tttttt1ttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttLLLLfffffi:;;;;;iiiiiiitffffft11tttt11t111tfffttffft1ttfftttffLLLLLLLLffL\ntttfftttttfffftttttttttttttfLLLffLLti;;;;;i;;iiii1ftffffftt11tt1111111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttfLfffLtii;;;ii;;i1111tfffffttt1tffft11111tfttffftttttttttttttfLLfffffft\nttffffffffftttffffffffftffffttfftftt1ii;;;;;;iii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\nttffffffffftttffffffffttttttttttffftt11i;;;;;i111111tt111tfft1ttft11111tt1ttttfftttffffLLLfttfLLLLLL\ntttffffffffttfffffffftt1ttt1111tfffttti;;;;;;iiiii11111ttfffft11t11111tfftttttttt1ttfffLLLftttfLLLLf\nttttttttfffttfffttttt1ttfft11111tfft11i;;;:;;ii;;itt11ttfffffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntftttttttttttt1tttt11ttffft1tt11ttti::i;;;:;iii;;;i;i1ttftfffft1tt1111tttt1tt1tffftt1111tffftfLffftt\ntfttffffftt11ttftfft1tffftttff1i;:,...;1;;;;;i;:;i,..,:;i1tft111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffftttt11tfft11i;:,......,11;iii;;iii,,,....,:;i1111t1111tt111tft1fffffttfffftt11tffLLf\n1tttffffft11ttffftt1111t1;;,..........,i1t11ii11i:.,........,111111111111t11tt1tfffttfffffffttfLffLf\ntfttttftt11t11ttt11ttt11:..............;iiiiiii11,,,......,,,itt11t1111111111t1tffttttffffftt1tfffLf\ntffttttttttfttt111ttttt;................,;;;i;;ii,...........;ttt11111111ttt111tttfLffttfft1ttttffft\nttttttttttttttt111ttt11:.................:;;;i;::............;ttt1111111tttftttttffLLffttttffffttttf\ntfffttttftttttt11ttttt1,.................,;;;;;;:............:ttttt11111tttffftttffffffftttttttffttf\ntffft1ttfffftf111ttttt1,..................:;;;:::............:1tt11111111ttffttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttti...................,;;::::............,111111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttttt:...................,::::::,:::,.......,1t1t11111tt111tttttfffLLLfttfffftffttf\nttttt1tttttttt111tttt1,....................,::::::;;;ii:......ittt11111ttt1ttff1tfffffLftttfftfffttt\nttttt1ttttt11t111tttti.....................,:::::,;;;ii;,.....itttt1111tt111tttttttttttttttttttffttt\nttttt1tttttttt11ttttt;........ .............:::::,;;;ii;,.....:1t1t1111111tttttttfttttttt1tttttffttt\n1tttt1tttttttt11ttttt:.... :i;:.............:::::..,;;i:.......it11111111ttff1111tfttttt11tttttffttt\n11tt11tttttt1111111t1,...,;iiii;, ..........::::,. .,:,......;111111111ttttt1111ttttttt111ttttttt1t\n11111111111111111111i..,.,;;;iii;...........:::::.......,....itt1111111111111111111111111111111tt111\n11t111111111111111111;....::;;ii;...........::::,..........,;111111111111111111111111111111111111111\n1111111111111111111111, ...,:;;;,............,,:,.....,,:;11tt11111111111111111111111111111111111111\n1111111111111111111111i:,....... ............,,:,.....:1tttttt11111111111111111111111111111111111111\n1111111111111111111111111;.,. ..............;;;:,,....,it11ttt11111111111t11111111111111111111111111\n111111111111111111111111i,..................;ii;:,.....,1t1ttttt1111111111t1111111111111111111111111\n111111111111111111111111:...................;ii;;:......;ttttttttttt11tttt1t111111tt11111111ttt11111\n111111111111111111111111:...................:i;:;;,.....:t1tttttttttttttttttttttt1tttttttttttttt1111\n","ttffftfffttttttttttttfffttftt111ttttt111tttt111111ttttttttt11tttt111111ttttttttttttttttttttt111111tt\nttfftttttttttttttttffLLftfffffffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\nttttttttttttttttffffLftttfffffffLLfft111ttttt111tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\nttttttttttttttttfffffttffffffLLLfffttt1ttttttt1tffffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\nttttttttttttfffftttffttffffffffftttftt1t1iii11111tfffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttffft11i:,,,::::;1tfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffftfft1;:,,,,,,,,,:tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffLfftt1::,,,,,:::::;itfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\ntttttttfLLLLLLLLLLfttttffftffffttf1,,,,:;iii1111itftttfffffffffftt1111t11ttffttttttttttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttffffft:,,,:;iii111ii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfLLftttfLfffLft:,,:;;;;iiiiii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttfLLfffft;:::;;;iii;iii1tffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\ntttfftttttfffftttttttttttttfLLLffffti;;;i;;iii;iitfffffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\nttfLffffffftttfffffffffttffttfLftfft1i;;;;;iiiii11ffffftttt1tffft11111tfttffftttttttttttttfLLffffftt\nttffffffffftttfffffffftttfftttftttttt1;;;;;iiiii11ttffft11tttttfftt111tt1tffttffttfffffLLffffffLffLL\nttffffffffftttffffffffttttttttttfftt11i;;;;;;ii1111ttt111tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\ntttffffffffttfffffffft11ttt1111ttff1;i;;;;;;;ii;iiii111ttfffft11t11111tfftttttttt1tffffLLLftttfLLLLf\nttttttttfffttffftt1tt1tttft1111tt1;,.:i;;;;;iii::;;,,:;i1tfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntfttttttttttttttttt11ttffft1tti;:,...,ii;;;;ii;::;;.....,:itftt1tt1111tttt1tt1tffftt1111tffftfLffftt\ntfttffffftt11ttftfft1tttft1i;:,.......:11iiii;;;:;:,,,,,,..;t111tt1111ttt11tf1tffffftttttttttttttfft\n111tfffffftttffttttt11tti;:,..........,1tt1ii11i;;,,.,.,,,,,1111t11111tt111tft1tffffttfffftt11tffLLf\n1tttffffft11ttttttt1111;...............:11iiii;;1;.,.,,.,..,1t11111111111t11tf1tfffttfffffffttfLffLf\ntfttttftt11t11ttt111tt1,................,;;;ii;i1:.........,111t1111111111111t1tffttttffffftt1tfffLf\ntffttttttttftt11111ttt;..................:;;;;:;i:..........itttt11111111ttt111tttfLffttfft1tttttfft\ntttttttttttttt1111ttt1:..................,;;;;:::,..,.......;tttt1111111tttffttttffLLffttttffftttttf\ntfffttttftttttt11tttt;....................:;;::::,,.........:ttttt111111ttttfftttffffffftttttttffttf\ntffft1ttfftttt111tttt:....................,;:::,:;;;;:,.....:1ttt11111111ttffttttffLLfLfttfffffffttf\ntffft1ttfttttt111ttt1,.....................:::,,::;iii;,.....itt1111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt111ttt;......................,::,,::;;;i;,.....:111111111tt111tttttfffLLLfttfffftffttf\nttttt11ttttttt111tt1:......................,:,..:,:;;i;.......:tttt1111ttt1ttffttffffffftttfftfffttt\nttttt1ttttt111111tt1:......................,:,..:. .:;:......,itttt1111tt111ttttttfttffft1tftttffttt\nttttt1tttttttt111tt1:........... .........,,,.,:...........,1tt11tt111111ttt1ttttffftttt1tftttffttt\nttttt1tttttttt11ttti,......... .,..........,,,.,:..........,it11111111111ttft1111ttttttt11tttttffttt\n11tt11ttttt111111tt:..........,::;,........,,,.,:......,:i11t11111111111ttttt1111ttttttt111ttttttt1t\n11111111111111111111:........:;;ii;.........,,.,,.....i1ttt11t11t111111111111111111111111111111tt111\n1111111111111111111ti........,:;;i;,...........,,.....;t11111111111111111111111111111111111111111111\n11111111111111111111ti;,......,:;;;. ......,:,.,:.....,1t1t11111111111111111111111111111111111111111\n11111111111111111111111;........,,,........:;::,,......;t1tttt11111111111111111111111111111111111111\n1111111111111111111111i......... ........:;;::,......,1ttttt11111111111t11111111111111111111111111\n1111111111111111111111:........ ...........:;;;::.......it1ttttt1111111111t1111111111111111111111111\n111111111111111111111i,........,......... ,ii;;::,......:ttttttttttt11ttt1tt11t111tt111111t1tttt1111\n11111111111111111111t;.........,..........:iiii;::,.....,1ttttttttttttttt1ttt1ttt1tttttttttttttt1111\n","ttttftfffttttttttttttfffttttt111ttttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLLftffftfffftttt111111111t11tffffffttttt11111111111111tttftttfttttttttt1111tttt\nttttttttttttttttfffffftttfffffffLLLft111tttttt11tfffffffftttttttt11111ttttfffffftfLLfttttttt111ttttt\nttttttttttttttttfffffttfffffffffffft11111;:::;;i1tffffffffttttttt1111ttffffffLffttffffffttt1111tttt1\nttttttttttttfffftttffttffffffffftttft1;::,,,,,,,,ifffffftttttt11tt111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLfttttffLLLfftttttff1;:,,,,,,,,,,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLLfttfffttt1:,,,,:::;;i;;1tttftttffffffftt1111tftt111tttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffLfftt;,,,,,:;ii11t11tfttttffffffffftt111tft1ttfttttfLLfttttfffffftttttt\ntttttttfLLLLLLLLLLfttttffffffffttt;,,,,:;;;iii1111ttttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\ntttffftfLLLLLLLLLLfttfftfffttttfft:,,,,:;;;iiiiii1tttttttffffffftt1111tft1ttt1tftttt11tffffLLLLLfttt\nttffffffffLLLLLLLfftfffftttfLftfLfi;;;;;;;iii1iii1tffftt11tfffft111111ffftt1t1tttttttttfffLLLLLLffff\ntfffffttttfLLLffttttfffffttfLLftfffi;;;i;;;;iiiii1fffffft11tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\ntttfftttttffffttttttttttttttffftffft;;;;;;;;iiii1tttfffffft1tttt1t1111tfftfffftttttttttttfLLLLffffff\nttffffffffftttfffffffffttftttffftfft1;;;;;;;;iii1ttfffffttt1tffft11111tfttfLftttttttttttttfLLftffftt\nttffffffffftttfffffffftttfftttftttt1i;;;;;;;;ii111tffftt11tttttfftt111tt1tffttffttfffffLLffffffLffLL\nttffffffffttttfffffffft1tt1111ttt1::i;;;;;;;i1i;i111ttt11tfft1ttft11111tt1ttttfftttffffLLLfttffLLLLL\ntttffffffffttffffffftt111tt111i;:,..;i;;i;iii11;;;;,::;1tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\nttttttttfffttffttttt111ttt1;:,......,ii;;iii;11;:;;,...,:1fffft1111111ttftt1ttfft11ttffffffftfLLLLLf\ntftttttttttttt11tt111tt1;:,..........;11iii;1t1;:;;,,,,,.:tfttt1tt1111tttt1tt1tffftt1111ttfftfLffftt\ntfttffffftt11tttttt111:..............:1tt1ii11i::;:,,,,,,,if1111tt1111ttt11tf1tfffffttttttttttttffft\n111tfffffft1tfftttt11;................:ii;;i;:,,;;,.,,.,..it1111111111tt111tft1tffffttfffftt1ttffLLf\n1tttffffft111tttttt1i,............,....:;;;;;;:,1i,..,,,..;ttt11111111111t11tt1tfffttfffffffttfLfLLL\ntfttttftt1t111ttt111;..................,;;;;;:,:1i,.......it111t11t1111111111t1tffttttffffftt1tffLLf\ntffttttttttft1111111,...................:;;;::,,;;,.......it1tttt11111111ttt111tttfLffttfft1tttttfft\ntttttttttttttt1111t;....................,;;:::,.:,..,.....:tttttt1111111tttffttttffLLffttttffffttttf\ntfffttttfttttt111t1,.....................;;:::..:,........,1tttttt111111ttttfftttffffffftttttttffttf\ntffft1ttfftttt111ti......................::::,..:,.....,:::i1ttt111111111ttffttttffLLfLfttfffffffttf\nttfft1tttttttt111t:......................,:::,..:,....,:;iiiitt11111111111tttttttffLLfLfttfffffffttf\ntffft1tttttttt1111;.......................,:,...:,....:;;iiii1111111111tt111tftttfffLLLfttfffftffttf\nttttt11ttttttt111t;...................,,,,,,,...,......,;;ii1111ttt1111ttt1tfffttffffffftttfftfffttt\nttttt11tt11111111i,.................,::::::,....:........,,:i1111tt1111tt111ttttttfffffft1tftttffttt\nttttt11ttttttt11t;.................,:;;;;;;,....:.... .. .,1t11ttt1111111ttt1ttttffffttt1tftttffttt\nttttt11ttttttt1111:................,::::;i:.....:.,..,,,:;i11tttt111111111tft1111ttttttt11tttttffttt\n111tt11ttt1111111t1:. ............::::;:.....,:....it11111tt1tt1111111ttttt1111ttttttt111ttttttt1t\n11111111111111111111i:,..............,,,,......,:....:1tt111111t1111111111111111111111111111111tt111\n11111111111111111111t11:........,.... . ..,....:.....it1t111t11111111111111111111111111111111111111\n11111111111111111111111:,..................:....:.....:1ttt11t11t11111111111111111111111111111111111\n1111111111111111111111i,...................:....:......it1ttttt1tt11111111111t1111111111111111111111\n1111111111111111111111;....................,,..,:,.....:tttttttt111111111111111111111111111111111111\n1111111111111111111111:.................. .::..,:......,1t1ttttt11t1t11111t1111111111111111111111111\n11111111111111111111ti,.................. ,;::,,:.......itttttttttttt111t1tt11t111tt111tttt1tttt1111\n11111111111111111111t;....................,;;;:,:.......:tttttttttttttttt1ttt1ttt1tttttttttttttt1111\n","tttttttttttttttttttttffftttt1111111tt1111tt1111111ttttttttt11tttt1111111ttttttttttttttttttt1111111tt\nttfttttttttttttttttffLfttffttfffttttt1111111111111tffffftttt111111111111111tttffttftttttttt11111tttt\nttttttttttttttttffffLftttfffffffffftt11111iii1i11ffffffffttttttt111111tttttffffftfLLfttttttt111ttttt\nttttttttttttttttffffftttffffffffffttt11;::,,,,,:;1ffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffttttt1;:,,,,,,,,,,:tffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLfttttttft;,,,,,,,,:::,:itfffftttfffft11t111tt111ttfffLLfttfftt1ttt11tttttt\nttttttttffLLLLLLLffttfLLLfttfffttt;,,,,,,:;ii1111tttttttffffffftt1111tftt111tttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffffft1:,,,,,:;iii11111fttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLLLLLLLLLffttttffftfffftt1:,,,,,:;;;iiiii1ftttfffffffffftt1111t11ttffttttttt1ttffffffffffttt\ntttffttfLLLLLLLLLLfttfttffftttttft::;;::;;iiiiiii1ttttttttfffffftt1111tft1ttt1tffttt11tffffLLLLLfttt\nttffffffffLLLLLLffftfffttttffftfLfi:;i;;;;;iiiiii1tffftt11tfffft111111ffftt1tt1tt1tttttfffLLLLLLffff\ntffftfttttfLLLfftttttffffttfLLftfff;:;;;;;;;iiiii1tffffftt1tttt11tt111fffttffft1ttfftttffLLLLLLLLffL\ntttttttttttfffttttttttttttttffffffft;;;;;;;;iiii1ttffffffft1ttt1111111tfftfffftttttttttttfLLLLffffff\nttffffffffftttfffffffffttft1tfffttt1i;;;;;;;;iii1ttfffftttt1tffft11111tfttffftttttttttttttfLLfffffft\nttffffffffftttfffffffftttffttttti::i;;;i;;;;ii1111tttttt11tttttfftt111tt1tffttffttfffffLLffffffLLfLL\nttffffffffttttfffffffft1ttt11i;:,.,ii;;iiiii11:i1111tt111tfft1ttft11111tt1ttttffttttfffLLLfttfLLLLLL\ntttffffffffttffffffftt111i;:,......:11;;iiiii1::;;;::;i1ttffft11t11111tfftttttttt1ttffffLfftttLLLLLf\nttttttttfffttfttt1111ii;:,.........,it1iii;;1ti::;;,..,:1tfffft1111111ttttt11tfft11ttffffffftfLLLLLf\ntfttttttttt1tt111111;,..............;1111ii1ti:;:;;,,,,.:tffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\ntfttfffftt1111ttttti,................:;;;i;;;,,:;;:,,,,,,itt1111tt1111ttt11tf1tffffftttttt1tttttffft\n111tfffffft1ttttttt:..........,,......:;;;;;;,.,i;,,,,,,.;t111111111111t111tft1tffffttfffftt1ttffLLf\n111ttfffft111ttttt1,............,.....,;;;;;:,.:1i,......;11t111111111111t11tt1tfffttfffffffttfLfLLL\ntttt1tftt11111tt11;....................:;;;;:,.:1i,......:tt11111111111111111t1tffttttffffftt1tffLLf\nttft11ttttttt1111i,....................,:;:;:.,,;:,......:111tttt11111111tttt11tttfLffttfft1tttttfft\ntttttt1ttttttt111;......................,;:;:..,:,.......:11tttttt111111tttffttttffLLffttttffffttttf\ntffft11ttttttt11i,.......................:::,..,:,.......,1tttttttt11111ttttfftttffffffftttftttffttf\ntffft11ttttttt11;........................,:::,..:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt11;......................,:;;;;;;,:,........,111tt1111111111tttttttffLLfLfttfffffffttf\ntfttt11ttttttt11i.....................:::;;;;;:.:,....... ,1t11111111111t111tftttfffLLLfttfffftffttf\ntttt111ttttttt11:....................,:::;;;;;.,:,..........,:;iii11111ttt11tffttffffffftttfftfffttt\nttttt11tt1111111,....................,:::;;;;,.,:.......... .::;;;;ii11111ttftttftfffft1tftttffttt\nttttt11ttttttt11i................. ....,,,,.....:.... ........,:::;;;;ii111tt1tttfffffttt1tftttffttt\nttttt11ttttttt11ti,. .........,... .. ....,..:,.. ....,:::;;;iii1ttt1111ttttttt11tttttffttt\n11111111ttt111111t1ii;;;,.......................:..,.:1;:,,.. ..,;i1i1t1ttt1111ttttttt111ttttttt1t\n1111111111111111111ttttt:,......................:.. ,tttt111i;;;;i1tt1111111111111111111111111tt111\n111111111111111111111111:,..................,...:.....it1t1ttttttttt11111111111111111111111111111111\n111111111111111111111111;,..................,...:.... ;tttt11t11t11111111111111111111111111111111111\n111111111111111111111111:...................,..,:.....:ttttttttttt1111111111111111111111111111111111\n11111111111111111111111i,...................:,.,:.....,1ttttttttt11111111111111111111111111111111111\n11111111111111111111111;...................,::..:.....,1ttttttttt1t11t1111t1111111111111111111111111\n11111111111111111111111:.................. :;:,,:......itttttttttttttt111ttt11t1111t111t1ttttttt1111\n111111111111111111111t1:.................. :;;:::......;ttttttttttttttttt1ttt1ttt11ttttttttttttt1111\n","tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\ntttttttttttttttttffffftttffffffffffft111tt111111ttffffffttttttttt11111tttttffffftfLLftttttt11111ttt1\nttttttttttttttttffffftttffffffLffftt111i;;:::::;1tffffffffttttttt11111tfffffffLfftfffffftttt111ttttt\nttttttttttttfffftttffttffffffffttttt1i;,,,,,,,,,,;fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLftttttttti:,,,,,,,,,,,,;tfffftttfffft11t111tt111tttffLLfttfftt1tt111tttttt\nttttttttffLLLLLLLffttfLLffttfffttti,,,,,,:;;;ii;itttttttffffffftt1111tftt1tttttfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffffft1:,,,,::;i111tt1tfttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLfLLLLLLLLfttttffftfffftti,,,,,,:;;iiii1i1ftttfffffffffft11111t11ttftttttttttttfffffLLfLfttt\ntttffttfLLLLLLLLLLfttfttffftttttf1,,::,:;iiiiiiii1ttttttttfffffftt1111tft1ttt1ttfttt11tffffLLLLLfttt\nttfffftfffLLLLLfffftfffttttffftfLf;:ii;;;;iii11ii1tfffft11tfffft111111ffft11t1ttt1tt1tffffLLLLLLLfff\ntffftfttttfLLLfttttttffffttfLLftff1:;ii;;;;iiiiii1ffffftt11tttt1ttt111fffttfffttttfft1tffLLLLLLLLffL\ntttttttttttfffttttttttttttttfffffff1;;;;;;;iiiii1tffffffftt1ttt1111111tfftfffftttttttttttfLLLLffffff\nttffffffffftttffffffffftttt1tffftft1i;;;;;;;iiii1ttfffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\nttffffffffttttfffffffft1tftt1tft1;ii;;;;;;;;ii1111ttftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\nttffffffffttttfffffffft1tttt1ii;,.:i;;;i;iii111t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffftfttt111ii;:,....,i1;;iiiii1i:;;;i11111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\ntttttttttffttfttt1111ii;:,.........;11iiii;;11;::;;,:;1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntft1ttttttt1t1111111:,.............:1tt1iii1t1;;:;:,,.,:1tffftt11t1111ttt11tt1tffftt1111ttfftfLLfftt\ntttttffttt1111ttttt;................:iiiiii11,:;:;:,,,,.:tttt111tt1111ttt11tf1tffffftttttt1ttttttfft\n1tttfffffft1tftttt1,.................,;;;;:;:.,:i:,,,,,,,it11111111111tt111tft1tffffttfffftt11tffLLf\n111ttfffft111ttttti...................:;;;;;:,,:1;.......;t1tt11111111111t11tf1tfffttfffffffttfLfLLf\ntttt1tftt11111ttt1:...................,;:;;;:..;1;.......:tt111t11t1111111111t1tffttttffffftt11ffLLf\nttft1111ttttt1111;.....................:;:;;,..,;:.......,111tttt11111111tttt11tttfLffttfft1tt1tffft\n1tttt11ttttttt111,.....................,::;;,..,:,.......,1ttttttt111111tttffttttffLLffttttffffttttf\ntfftt11ttttttt11;.......................:::;,..,:,........itttttttt1111tttttfftttffffffftttftttffttf\nttfft11ttttttt11,.......................,;;;;:,,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt1i,.....................,::;i;;;,,:.........:111tt1111111111tttttttffLLfLfttfffffffttf\nttttt11ttttttt1i.....................,:::;i;i:.,:,........,1t1111t111111t111ttfttffLLLLfttfffttffttf\ntttt111ttt11t11;.....................,:::;;;;,.,:..........1tt111tt11111ttt1tffttffffffftttffftffttt\nttttt11t1111111:......................:::::,...,:..........:i1tttt1tt111t1111tttttfttffft1tttttffttt\nttttt11tttt11t1i.......................... ....,,.......... .,,:i11iii11111tt1t1ttffffttt1ttttttfttt\nttttt11tttttt111;... ......................,:............ .,:::;iiii1111111tfttttt11ttttttfttt\n11111111t1111111t1i;;::::......................,:..,:.. .......,::;;;;;;iii11111tttttt111ttttttt1t\n11111111111111111ttttttt1,.....................,:......:,.. ..,:;;;:;;;iiii11111111111111111tt111\n111111111111111111111111i,.................,::..,.... ,tt1ii;,,.. ..,:i;;iii111111111111111111111111\n111111111111111111111111i,.................,;:,,,......1tttttt11i;;::itt11t1111111111111111111111111\n111111111111111111111111i,................ ,;:::,......it1t1tttttttttt11tt11t111111111111111111t1111\n111111111111111111111111;................. ,;;::,......it1tttttttt1111111t11111111111111111111111111\n111111111111111111111111:................. .;;:::......;t1ttttttt1ttttt111t1111111111111111111111111\n111111111111111111111111,...................;i;::,.....;tt1ttttttttttt11tttttttt111t111111tttttt1111\n111111111111111111111111:...................:i;:::.....ittttttttttttttttttttt1ttt111tttttttttttt1111\n","tttftttttttttttttttttffftttt1111111tt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfftfftttffttttt111111111111ttffffftttt1111111111111111ttffttfttttttttt1111tttt\ntttttttttttttttttffffftttffffffffffft1111tttt111ttffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttffffftttffffffLffftt11111i;iiii1tfffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffttttt11;::,,,,,,::1fffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLftttttttf1;:,,,,,,,,,,,itfffftttfffft11t111tt111tttffLLfttfftt1ttt11tttttt\nttttttttfffLLLLLLffttfLLffttfffttt1,,,,,,,::::::itttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffLfft1:,,,,,:;ii11111ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLfLLLLLLLLfttttffftfffftt1:,,,,:;;iii1111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfLLLLLLLLLLfttfttffftttttf1,,,,,:;iiii;iii1ttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\nttfffftfffLLLLLfffftfffttttffftfLt:;;;:;;iiiiiii11tfffft11tfffft111111ffft1tt1ttt1tt1tfffLLLLLLLffff\ntffftfttttfLLLfttttttffftttfLLftff1;;;i;;;iii1iiitfffffft11tttt1ttt111fffttfffttttfftttffLLLLLLLLffL\ntttttttttttfffttttttttttttttffftfffi;;;;;;iiiiii1tffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttffffffffftttt1tffftffti;;;;;;iiiii1tttffffttt1tffft11111tfttfffttt1tttttttttfLLftfffft\nttffffffffftttfffffffftttftt1tftt111i;;;;;;;;ii111tfftft11tttttfft1111tt1tffttffttfffffLLffffffLffLL\ntttfffffffttttfffffffft1tt111111i::i;;;i;;;;i11t111ttt111tffttttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffftfftt111111i;:,..,ii;;iiiii11:;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\ntttttttttffttfttt1111111i;:,.......:11;iiii;11;::;;,:i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntfttttttttt1t1111111i;:,...........:1t1iii;itt;;;;:.,,,:itffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\ntttttffftt1111ttttt1:..............,i111ii1tti:;;;:,,,,.,1tft111tt1111ttt11tf1tffffftttttt1ttttttftt\n111tfffffft1tfttttt;.................:;;;;;;;,.:i:.,,,,,.;t11111111111tt111tft1tffffttfffftt11tfffLf\n111ttfffft111ttttt1,..................:;;;;;:,.:1;.....,.:11tt11111111111t11tf1tfffttfffffffttfLfLLf\ntttt1tftt111111tt11,..................,;;;;;:,.;1;.......,1t111t11t1111111111tttffttttffffftt11fffLf\ntttt111tttttt11111;....................::;;;,..,;:.......,i11tttt11111111tttt11tttfLffttfft1tt1tffft\n1tttt11ttttttt111i.....................,::;;,..,:.........ittttttt111111tttffttttffLLffttttffffttttf\ntfftt11ttttttt111,......................::::,..,:,........itttttttt11111ttttfftttffffffftttttttffttf\nttfft11ttttttt11;.......................,:::,..,:,........;11tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt11:........................,:,,..,:,........,111tt1111111111tftttttffLLfLfttfffffffttf\nttttt11ttttttt11,.......................,,::,..,:..........it11111t11111t111tttttffLLLLfttffftfffttf\ntttt111tttt1t11i......................::;;;;;:.,:..........;t11tttt11111tt11tffttffffffftttffftffttt\nttttt11tt111111:....................,:::;i;;i,.,:..........;ttttttt1111111111tttttfttffft1tttttffttt\nttttt11ttttttt1;....................,:::;i;;:..,,...........:;iii1111111111tt1t1ttfffttt11ttttttfttt\nttttt11tttttt111:...................,:::;;;;...,,........... .,:;;;:;i1111ttt1111ttttttt11ttttttfttt\n11111111t11t11111;,.. ...............,,,....,:.... .......,:::::;;11tt11111111tt1tt1111ttttttt1t\n11111111111111111t11i;;;:.......,..... ......,,....,,. ...,::;::;i1111111111111111111111111tt111\n11111111111111111111tttti,...................,.,,... :1i:,. .,,;;i1111111111111111111111111111111\n111111111111111111111111i,...................:,,,.....ittt1i:,.. ,1tttt111111111111111111111111t1111\n111111111111111111111111;,...................,,::.... .111tttt1ii1ttt11111111t11111111111111111t1111\n111111111111111111111111;....................,:::......it1t11ttttt1111111111111111111111111111111111\n111111111111111111111111;....................,::,......;t1tttttt11tt1tt111t1111111111111111111111111\n11111111111111111111111t:....................::::......:1111ttttttttttt1tt11ttt11111111111tttttt1111\n11111111111111111111111t:....................:;::,.....,1tttttttttttttttttttttttt111tttttttttttt1111\n","tttftttttttttttttttttffftttttt11ttttt1111tt11111111tttt1ttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfftfffttffttttt111111111t11ttffffftttt1111111111111111ttffttfttttttttt1111tttt\ntttttttttttttttttffffftttffffffffffft1111tttt111tfffffffttttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttffffftttffffffLfffttt1111ttttt1tffffffffffttttttt11111tfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttftttffffffffttttft1i;:;;;;;i11tfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLfttttttfft1;:,,,,,,,,:1ttfffftttfffft11t111tt111tttffLLfttffft1ttt11tttttt\nttttttttfffLLLLLLffttfLLffttfffttti::,,,,,,,,,,;ttttftttffffffftt1111tftt11t11tfLLfttt11tffftttttttt\ntttttttfffLLLLLLLLLfttfttttfffffti,,,,::;;;iiiii1ffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttfLLLLLLLLLLftttttfftfffftt1:,,,;iii1111111fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfttffftttttff:,,:;;;iiii1ii1tttttttttfffffftt1111ttt1ttt1ttfttt11tfffffLLLLfttt\nttfffftfffLLLLLfffttfffttttffftfLt;:,:;;;;iiiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffftfttttfLLffttttttffftttfLLftff1;;;;;iiiii;i11ttfffftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttfffLtfffii;;;;;ii;;iittffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttft1tffftffti;;;;;iiiii1ttttffffttt1tffft11111tfttfffttt1tttttttttfLLfffffft\nttffffffffftttfffffffftttfttttfttttti;;;;;iiii1111tfftft11ttttffff1111tt1tffttffttfffffLLffffffLffLL\nttffffffffttttfffffffft1tt11111tft11i;;;;;;;iit11111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffftttfffftfftt1111111111i:,;i;;;;;;ii1i;;;111111tfffft11t11111tfftttttttt1tfffffLfftttfLLLLf\nttttt1tttffttfttt11t111tttt1i;:,...:1i;ii;ii;1i:;;i;;i1tftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntfttttttttt1tt1111111ttt1;:,,.......;ti;iii;it1;;;;,..,:i1fffft11t1111ttt11tt1tffftt1111ttfftfLffftt\nttttfffftt1111ttttt111;:,...........;tt11iii1t1::;;,,,,,.,1ft111tt1111ttt11tf1tffffftttttt1ttttttftt\n111tfffffft1ttttttt11,..............:i11iii111:,;;,,,,,,,.;t1111t11111tt111tft1tffffttfffftt11tfffLf\n111ttfffft111ttttttt;.................:;;;;;;:.,ii,....,,.:1tt11111111111t11tf1tfffttfffffffttfLfLLf\ntttt1tftt11111ttt111:.................,;;i;;;,.,1i,.......:t111111t1111111111tttffttttffffftt11fffLf\ntttt11ttttttt1111111,..................:;;;;;,,,;;,.......:11tttt11111111tttt11tttfLffttfft1tt1tffft\n1tttt11ttttttt11111i...................,;;;;:,..:,........:1tttttt111111tttffttttfLLLLfttttffffttttf\ntfftt11ttttttt11111:....................:i;;:,.,:,........,1ttttttt1111ttttffftttffffffftttttttffttf\nttfft11ttftttt111ti,.....................;;::,..:,........,i1tttt11111111ttffttttffLLfLfttfffffffttf\ntttft11ttttttt111t;......................,::,...:,.........;11t11111111111ttt1tttffLLLLfttfffffffttf\nttttt11ttttttt111t:......................,::,...:,...,,....it11111111111t111tttttfffLLLfttfffftffttf\ntttt11tttt11tt1111,.......................,,,...:,...,:;;;;itt11ttt1111ttt1ttftttffffffftttffftffttt\nttttt11t111111111i.........................,,...:,...,:;iiii11111t111111t111tttttttttffft1tftttffttt\nttttt11ttttttt111,.........................,,...:....,:;;iii11111111111111ttttt1ttfffttt11ttttttfttt\nttttt11ttttttt111;...................,,,,..,....,......,:;ii1ttt1111111111ttt1111tfttttt11ttttttfttt\n11111111t11t11111t;...............,:::::::..,...:.........,,it11tt1111111tttt1111ttt1tt1111ttttttt1t\n1111111111111111111,.............:::::;;i:......:..... :1ttttt111111111111111111111111111111t111\n11111111111111111111;,.. ........,::::;;:.......,... ,i;;;i1tttt111111111111111111111111111111111111\n11111111111111111111t11i,.........,:::;;. ..,:,.:.....itttttttt1111111t111111111111111111111111t1111\n11111111111111111111111t;...........,,,.... ,:,,:......it1111ttt1111111111111111111111111111111t1111\n111111111111111111111111;.......... .... .:,,:,. ...:tttt11tt111111111111111111111111111111111111\n111111111111111111111111;....................::::..,,..,1tttttttt1tttt1111t1111111111111111111111111\n11111111111111111111111t;....................::::..,,...;t1tttttttttttt1t11ttttt111t111111tttttt1111\n11111111111111111111111ti....................:;::,......:11tttttttttttttttttttttt11t11t1111ttttt1111\n","tttftftttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt1111111tt\nttfftttttttttttttttffLfttfffttffttttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\nttttttttttttttttfffffftttffffffffffftt11ttttt111tffffffftttttttt11111ttttttffffftfLLfttttttt1111ttt1\nttttttttttttttttffffftttffffffLfffttttt11tttt11tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffftttft1tttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLft111111ttttt\nttttttttttffLLLLftttttffLLftttttttfft11iiiiiittt1ttfffffttfffft11t111tt111tttffLLfttffft1ttt11tttttt\nttttttttfffLLLLLLffttfLLffttfffttfft;::,,,,,,:itttttffttffffffftt1111tftt11t11tfLLftttt1tffftttttttt\ntttttttfffLLLLLLLLLfttfttttffffft11i:,,,,,,,,:,;fffttttffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttfffttffftt1;:::::;;;iii;:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfttfLfttttfft;:;iii111111i;1ttttttttffffffftt1111ttt1ttt1ttftt11ttfffffLLLLfttt\nttfffftfffLLLLLLffftfffttttfffffLf;:;;;;ii1iiiii11tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffffftttffLLffftttttffffttfLLffffi:i;;;;;ii;ii11ttffffft11tttt1ttt11tfffttffft1ttfftttffLLLLLLLLffL\ntttttttttttffftttttttttttttfLfftffi;ii;ii;i11111tfffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttftttfLftf1;;;;;;;;i1111tttffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\nttffffffffftttfffffffftttfftttftttt1i;;;;;iiii1111ttftft11ttttffff1111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffft1ttt1111tfftt1i;;;;iii1tt111ttt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttffffttftt111t11111ttfft1;;;;;;ii1ti;;i11111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\nttttt1tttffttfttt111111tttt11111tti:i;;;;;;iii1;:;i1i1ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntfttttttttt1tt11t1111ttfftt1tt1i;:..;i;;;;;iii1i:;;:,,:;i1ffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\ntfttfffftt1111tttttt1tttttt1i;,.....:11;ii;;;iti:;;,,,...,:1t111tt1111ttt11tf1tffffftttttt1tttttfftt\n1t1tfffffft1tttttttt111tti:,....,...,i11iii;i1ti;i,,,,,,,,.,i111t11111tt111tft1tffffttfffftt11tffLLf\n1t1ttfffft111tttttt1111:,...........,i1t1iii11i,;1,....,,...;t11111111111t11tf1tfffttfffffffttfLLLLf\ntftt1tftt1tt11ttt111tt;..............,:;i;;;;;,.i1,.........:11111t1111111111tttffttttffffftt1tffLLf\ntfftttttttttt111111ttt:................,;;i;;:,,:;,.........:tttt11111111tttt11tttfLffttfft1tt1tffft\ntttttt1ttttttt1111ttti,................,:;;;;:,.,:..........,ttttt111111tttffttttfLLLLfttttffffttttf\ntffft11ttttttt1111ttt;..................,;;;::,.,,..........,1tttt111111tttffftttffffffftttttttffttf\ntffft11ttftttt111tttt:...................:;;::..::,,.........ittt11111111ttffttttffLLfLfttfffffffttf\ntffft11ttttttt111ttt1:...................,;::,,::;;;i;,......;t11111111111ttt1tttffLLLLfttfffffffttf\ntttft11ttttttt111ttt1,....................,::,,::;;iii;. ...,it11tt11111t111tttttfffLLLfttfffftffttf\nttttt1tttttttt111t1ti.....................,:,,,,::;iii;.....,it11tt1111ttt1ttftttffffffftttffftffttt\nttttt11tt11111111t1ti......................,:,. ,,,:;i:.......;11tt11111t111tttttttttffft1tttttffttt\nttttt11tttt11t11tttt;......................,,,..,, .,,.......,;11111111111ttttt1ttfffttt11ttttttfttt\nttttt1tttttttt111ttt:.......................,,..,,.....,....:1ttt111111111ttt1111tfttttt11ttttttfttt\n1111111ttt1t11111tt1,.......................,,..:,.........:1t11111111111tttt1111ttt1ttt111ttttttt1t\n11111111111111111111;....... ............,,..:,.....,;ii1t1t111111111111111111111111111111111t111\n111111111111111111111,.... .,::,................:....,11ttt11tt11t1111111111111111111111111111111111\n111111111111111111111;.....;i;;;,...............:,....it1111ttt1tt1111t111111111111111111111111t1111\n1111111111111111111111i:.,iii;;i:.......... ,::,:......itttttttt1111111111111111111111111111111t1111\n111111111111111111111111i,:;;;ii;,......... ,;;::,.....:1ttttttt11111111111t111111111111111111111111\n111111111111111111111111i,.,::;;:.......... ,;;;::......itttttttt1tttt11t1tt111111111111111111111111\n111111111111111111111111i..,.................;;;::,.,,..:1tt1tttttttttttt11ttttt11111111tttttttt1111\n111111111111111111111111i..... .............;i;:::,.....itttttttttttttt1tttttttt11t11t1111ttttt1111\n","tttfttfttttttttttttttfffttttt1111tttt111tttt111111ttttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLfftfftttffftttt111111111111tfffffftttt111111111111111tttffttfttttttttt11111ttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tffffffffttttttt111111ttttffffLfffLLfttttttt1111t1t1\nttttttttttttttttffffftttffffffLffffttttttttttt1tffffffffffttttttt1111ttfffffffLfttffffffttt1111ttttt\nttttttttttttfffftttffttffffffffftttftttttt11ttt1ttfffffftttttt111t111111ttffffLLffttfLLfft111111tttt\nttttttttttffLLLLftttttfLLLftttttttfftttttttfffft1tffffftttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftffft11i;ii1ttffttttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffLfLftti;:;:,,,:;;itffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffftffffftt1;,,,,,,,,::,:tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfftfLftttffff1;::::;;iii;,:1ttttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\nttfffftfffLLLLLfffftfffftttfLfffLfi;iiii11111i;:i1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffffftttffLLfffttttfffffttfLLffLf;;;;iiiiiiii;:1tfffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttffLLffLt;;:;;ii;;iii;ttffffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttftttfLftf11i;;;i1ii11ii1tfffffftttttffft11111tfttfffttt1tttttttttfLLfffffft\nttffffffffftttfffffffftttfftttfttt11i;;;;i1111i111ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffftttttt111tfft11;;;;iiiii1t1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\ntttffffffffttfffffffft111tt1111ttfft1i;;;iiiii1;;;111111ttffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\nttttt1tttffttfftttttt11ttttt111tttft1i;;;;iiiii;;;1t11ttftfffft1111111tttt11ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tffftt1tt11tff1ii;;;;;iiii:;;i;;i1tttffftt11t1111ttt11tt1tffftt1111ttfftfLffftt\nttttffffttt11tttttft1tttttt1ttt11i;,:i;;;;;iii;;;;:...,,,:;i1111tt1111ttt11tt1tffffftttttt1ttttttftt\n111tfffffft1ttfftttt11tttt1tfti;,...,i1i;;ii;;i1i;,.........,i11111111tt111tft1tffffttfffftt11tffLLf\n1t1ttfffft111tftttt1111ttt11;:,......;11iii;;1t11;......,.,,.,i1111111111t11tt1tfffttfffffffttfLLLLf\ntftt1tftt1tt11ttt11ttt11i;:,.........:1tt1i;i1111;............;t11t1111111111tttffttttffffftt1tffLLf\ntfftttttttttt111111tttt1,.............:;;;;;;;;:;:............:tt11111111tttt11tttffftttfft1tt1tffft\n1ttttt1ttttttt1111tt11ti................:;;;;;:,:,............,1tt111111tttffttttfLLLLfttttffffttttf\ntffftttttttttt111tttt1ti................,;;;;::,:,.............ittt11111tttffftttffffffftttttttffttf\ntfffttttfftttt111tttttt;.................:;;:::,:,.............:tt1111111ttffttttffLLfLfttfffffffttf\ntffftttttttttt111tttttt;.................,:;:::,:.,:,,.........,it11111111ttt1tttffLLLLfttfffffffttf\ntttft11ttttttt111tttttt:..................,::::,:,,;;;;;:,......itt11111t111tttttffLLLLfttfffftffttf\nttttt1tttttttt1111t1ttt;...................,::,,:,:;;;iii;.....,1tt1111ttt11tftttffffffftttffftffttt\nttttt11tt1111t111tt1ttt:...................,::,,:::;;iiii;,.....:i1t1111t111tttttttttffft1tftttffttt\nttttt11ttttttt11ttttttt:....................::,,:..,,:;ii:...... .1t111111ttttt1ttffffft11ttttttfttt\nttttt1tttttttt111tttttt:....................,::,:. ..::,......,1t1111111ttt1111tfttttt11ttttttfttt\n1111111tttttt1111ttt1tt:.... ...............,:,,:..............,1t1111111tttt1111ttt1ttt111ttttttt1t\n11111111111111111111111;;;;:,...............,:,,:....... ...,,:1ttt11111111111111111111111111111t111\n11111111111111111111111iiiiii:...............,,,:........,:i11tt1tt111111111111111111111111111111111\n11111111111111111111111iiiiiii...............,,,:.......,1tttt11tt1111t111111111111111111111111t1111\n1111111111111111111111i;iiiiii,..............,.,:........ittt11t111111111111111111111111111111111111\n111111111111111111111111iiii;,...............::::,,......:1ttttt11t111111111111111111111111111111111\n1111111111111111111111111i:,. ...............:i;:::,......itttttt1ttt111t1tt111111111111111111111111\n11111111111111111111111111:................. :i;;;::,.....;ttttttttttttttt1ttttt111111111ttttttt1111\n11111111111111111111111111:................. :i;;;;::,....:tttttttttttttttttttttt11t11t1111ttttt1111\n","tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLLftffftfffftttt111111111t11tfffffftttt1111111111111111ttffttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttfffffffLLfttttttt111tttt1\nttttttttttttttttfffffttfffffffLffffttttttttttt1tffffffffffttttttt1111ttffffffLLfttffffffttt1111tttt1\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1tffffftttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLffttfffftfffttttttfffffftfttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffffffttft111i;ii1ttfffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftft1i:::,,,,::;;1fftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfffLLLLLLLLfttfftfLffftfffLf1;,,,,,,,::,,:1tttttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\nttfLfftfffLLLLLfffftfLfftttfffffLLf1;;;;;iiiii:,:1tfffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntffffftttffLLfffttttfffffttfLLLffLfiiiii111111i::1tffffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttftttttttffftttttttttttttfffLffLfii;;;iiiiiii;:1ftffffftt1ttt1111111ffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttfttffLfffLti;:;;ii;ii1;;ttffffftttttffft11111tfttffftttttttttttttfLLfffftft\nttffffffffftttfffffffftttfftttftttt1i;;;ii11111ii1ttffft11ttttffft1111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffftttttt111tfff1ii;;;iiiiiii1111tt111tffttttft11111tt1ttttfft1tffffLLLfttfLLLLLL\n1tfffffffffttfffffffftt1ttt1111tffft1i;;;iiiiii;;i111111tfffft11t11111tfft1tttttt1tfffffLfftttfLLLLL\ntttttttttffttfftttttt1ttfft1111tttftt1;;;iiiiii;:;tt11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tfffft1tt11ttft11;;;;;iiii;;;1t11ttttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\nttttffffttt11tttttft1ttfffttfft11tftiii;;;;iiii;;;;:;ii1tttft111tt1111ttt11tt1tffffftttttttttttttftt\n111tfffffft1ttfttttt11tfftttfttt11i:,ii;;;;;iii;i:.....,,::;i111t11111tt111tft1fffffttfffftt11tffLLf\n1t1ttfffft111tffttt1111tft1ft1i;:,...;1i;;;;;;i11:...........,;1111111111t11tt1tfffttfffffffttfLLLLf\ntftt1tftt1tt11tft11ttt111111;:,......,111ii;;i1t1:........,,...;11t1111111111tttffttttffffftt1tffLLf\ntffttttttttttt1111ttttt11;:,.........,i111i;i1t1;,.............,1t1111111tttt11t1tfLftttfft1tt1tffft\n1ttttttttttttt1111ttt11ti,............,::::;;;i;:,..............it111111tttffttttfLLLffttttffffttttf\ntfffttttffttttt11ttttttti...............,;;;;;;;:...............:t111111tttffftttffffffftttttttffttf\ntfffttttfffttft11ttttttt;...............,:;;;;:::...............,1t111111ttffttttffLLfLfttfffffffttf\ntffft1ttttttttt11ttttttt:................,;;;;:::................it1111111ttt1tttffLLLLfttfffffffttf\ntffft1tttttttt111ttttttt:................,:;;::::................:t1111tt111tttttffLLLLfttfffftffttf\nttttt1tttttttt111111tt1t;.................,::::::................,1t111ttt11tftttfffffffttfffftffttt\nttttt1tttt11tt111ttttttt:.,:;:............,::::::................,itt111t111ttt1tttttfft11tftttffttt\nttttt1tttttttt11tttttttt;:;iii:............,:::::...........,:,....:1t11111tttt11tfffttt11ttttttfttt\nttttt1tttttttt111ttttttt;;iiiii:. ..........:::::...........,;;;;:..it1111tft1111ttttttt11ttttttfttt\n1111111tttttt1111ttttttt:;iiiii;............,::::,........,::;;iii;it111ttttt11111tt1ttt111ttttttt1t\n111111111111111111111111:;;iiii;,...........,:,::,.........,;;iiii;it111111111111111111111111111tt11\n111111111111111111111111;:;:;;;,............,::::,...........:;;ii;it1111111111111111111111111111111\n111111111111111111111111;::.... .............,:::,,......... .,,:i1t1111111111111111111111111111111\n111111111111111111111111i;,..................,,,:,,....... .;,..,;11111111111111111111111111111t1111\n1111111111111111111111111i;:;i;,..............,,:,,,........1tii11t111111111111111111111111111111111\n111111111111111111111111111111:..............,:::;;:,.......;ttttttttt11t1tt111111111111111111111111\n11111111111111111111111111111;,..............:i;;ii;;:,.....,1ttt1tttttttt1ttttt1111111111tttttt1111\n1111111111111111111111111111i,...............,i;;iiii;:......ittttttttttttttttttt11t11t1111ttttt1111\n","tttftttttttttttttttttfffttttt1t1ttttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt111tttt1\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt1111ttfffffffLftttfffffttt1111tttt1\nttttttttttttfffftttftttffffffffftttfttttt111ttt1ttfffffftttttt111tt11111ttffffLLffttfLLff111111ttttt\nttttttttttffLLLLftttttfLLLftttttttffttttttttffft1ttfffffttfffft11tt11tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftffftttttfffffffffttffttffffffftt1111tftt11t11tfLLfftt11tffftttttttt\ntttttttfffLLLLLLLLffttfttttffLffftfftttttfftffffffftttffffffffffft111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffffftfftt11iii;:;;i1tfftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfLLLLLLLLLLfttfftfLffttfffLLft1;:::,,,,::;;1ttttttffffffftt1111ttt1ttt1ttfttt1ttffffLLLLLfttt\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLfti;,,,,:::::,,;fffft11tfffft11111tffft1tt11tt1ttttfffLLLLLLLffff\ntfffffttttfLLfffttttfffffttLLLLffLLf1ii;;iiii11i:,;tfffft11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttfffLffLLf1iiiiiii1111;:;tffffftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\nttffffffffftttfffffffffttfttffLfffLf111;;;ii;;i1i:itfffftttttffft11111tfttffftttttttttttttfLLfffftft\nttffffffffftttffffffffttffftttftttttt1i;;;iii;iii;ifftft11tttttffft111tt1tffttffttfffffLLfffffffffLL\ntttfffffffttttfffffffftttttt111tffft11i;;;ii11111111tt111tffftttft11111tt1ttttfft1tffffLLLfttfLLLLLL\n1tfffffffffttfffffffftt1ttt1111fffft111i;;;iiiiiii11111ttfffft11111111tfft1tttttt1tfffffLfftttfLLLLL\ntttttttttffttfftttttt1ttftt1111ttffttt1i;;;iiii;;;1t11ttttfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt1ttfffftttt11ttft1t1i;;iiiii;:;1t111tttffftt11t1111tftt1tt1tffftt1111ttfftfLffftt\nttttfffftttt1ttttfft1tffffttfft11tft111i;;;;;ii;:;i11111ttttt1111t1111ttt11tt1tfffffttttttttttttffft\n111tfffffftttffftttt11tfftttfttt1ttt1i1i;;;;iiiiii::;i111tt11111t11111tt111tft1fffffttfffftt1ttfLLLf\n1t1ttfffft111tffttt1111tfttft11tti;::,i1;;;;;iii11:...,,::;i1tt1111111111t11tt1tfffttfffffffttfLLLLf\ntttt1tftt1tt11ttt11ttt1111tt11i;,,....;1i;;;;;;i11:.,.......,,:i11t1111111111tttffttttffffftt1tffLLf\ntffttttttttttt1111ttttt111i;:,........;1t1ii;;i1ii,.............;t1111111tttt11t1tfLftttfft1tt1tffft\n1ttttttttttttt1111tttttt11:...........:iiiiii1tti,..............,1t11111tttttttttfLLLffttttffffttttf\ntfffttttffttttt11ttttttt1i,.............,:::;;ii;,...............;t11111ttttfftttffffffftttttttffttf\ntfffttttfffffft11ttttttt1;..............,:;;;;;;:,...............,1111111ttffttttffLLfLfttfffffffttf\ntffftttttttttt111ttttttt1:.......... ....:;;;;;;:,................it111111tttttttffLLLLfttfffffffttf\ntffft1tttttttt111ttttttt1,........,,:;:,.,;;;;;:;,................;t1111t111tttttffffLLfttfffffffttf\nttttt1tttttttt1111t1tttt1,.......;;;;;:,..:;;::::,................,1t11ttt11tftttfffffffttfffftffttt\nttttt1tttt11tt111ttttttt1:......;;;;;;;:,.:;;::::,................,it111t1111tt11ttttfft11tftttffttt\nttttt1tttttttt11tttttttti,......:;:;;;:...,:;::::,.................:1t11111tt1t11tfffttt11ttttttfttt\nttttt1tttttttt11tttttttti,......:;:;;:.....,:::::,..................:11111ttt1111ttttttt11ttttttfttt\n1t1t111tttttt111111ttttt;...,,,.,:::. ......:::::,...................,111tttt11111ttttt1111ttttttt1t\n111111111111111111111111,,,,,,,.............,:::::,..................,1t111111111111111111111111tt11\n11111111111111111111111i,,..:,..............,,::::,,.................,11tt11111111111111111111111111\n111111111111111111111111;...................,:,,::,,.................,;ii11t111111111111111111111111\n111111111111111111111111i,..................,:::::,,................:::;;;i111t111111111111111111111\n1111111111111111111111111i;;;;i1:............::,:,,,,........... ..::;;;;i1111111111111111111111111\n111111111111111111111111111111t1,............,.,:,,,:,,........:,,..,:;;;i11t11111111111111111111111\n1111111111111111111111111111111i.............,,::;;;i;:,...... :111i;::;;;1ttttt11t1111111tttttt1111\n111111111111111111111111111111ti.............:1;;1iiii;:,.......i1tttt11111tt1tt111111t1111ttttt1111\n","tttttttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt111111ttt\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\nttttttttttttttttffffLffttfffffffffffttttttttt111tfffffffftttttttt11111tttttffffftfLLfttttttt1111ttt1\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tffffffffftttfffffttt11111ttt1\nttttttttttttfffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLff111111ttttt\nttttttttttffLLLLftttttfLLLfttttttffffttttttfffft1tffffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftfffttttttfffffftfttfftffffffffttt111tftt11t11tfLLLftt11tffft1tttttt\ntttttttfLfLLLLLLLLffttfttttffLLfftffttttffffffffffftttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLLftffttttttt11i;ii1tftttfffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttffttfLLLLLLLLLLfttfftfffffffffLLfttt1i;::,,,,:;;1tttttffffffftt1111ttt1ttt1ttfttt1ttfffffLLLLfttt\nttfLLftfffLLLLLLLfftfLfftttfLfffLLLLttt1;,,,,,,,::,:iftt11tfffft11111tffft1tt11tt1ttttfffLLLLLLLLfff\ntfffffttttfLLfffttttfffffttLLLLfLLLftt1i;;;;;;iiii:,;fftt11tttt1ttt11tfffttffft1ttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttffLLffLLftt1;iiiii11111i::tfffft1ttt111111tffftfffftttttttt1ttfLLLLffffff\nttfLffffffftttfffffffffttfttffLfffLftt1;i;;;iiiiiii;;tfftttttffft11111tfttffftttttttttttttfLLftfffft\nttffffffffftttffffffffftffftttfttftttttii;;;;ii;;ii;iftt11tttttfft1111tt1tffttffttfffffLLfffffffffLL\nttffffffffttttfffffffftttttt11ttfffttt11ii;;ii1111ii11111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\n1ttffffffffttfffffffftt1ttt111tffffttt1i1i;;;iiiiii1111ttfffft11t11111tfft1tttttt1ttffffLfftttfLLLLf\ntttttttttffttfftttttt1ttfff1111ttffttttt1i;;;;i;:;it11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tfffftttt11tfftt11tt1;;;ii;;;1t111tttffftt11t1111tttt1tt1tffftt1111ttfftfLffftt\ntfttfffftttt1ttttfft1tffffttfftt1tft1111t1;;;;i;:;i11111tttft111tt1111ttt11tt1tfffffttttttttttttffft\n1tttfffffftttffftfft11tfffttfttttttt11111i;;:;iiii1i;i1t1tt11111t11111tt111tft1fffffttfffftt1ttffLLf\n1t1tffffft111tffttt1111tfttft11tt1t1i;;;1i;;;;ii1ii1,.,:;ii1tt11111111111t11tt1tfffttfffffffttfLfLLf\ntfttttftt1tt11ttt11ttt11t1t11tt11i:,...,11;;;;;it111,,.....,:;i11tt1111111111tttffttttffffftt1tffLLf\ntffttttttttttt1111ttftt111111i;:,......:1t1i;;;;i1t1,..........,:i1111111tttt11t1tfLftttfft1tt1tffft\n1ttttttttttttt1111ttttt111tt;..........:1111iii1;11:.............,it1111tttttt1ttfLLLffttttffffttttf\ntfffttttffttttt11ttttttt11t1,...........,,:::;;i;;:...............:t1111ttttfft1tffffffftttttttffttf\ntfffttttfffffft11ttttttt111i..............:;:::;;::...............,1t1111ttffttttffLLfLfttfffffffttf\ntfffttttttttttt11ttttttt111:..............,;;;;;;:,................;t11111ttt1t1tffLLLLfttfffffffttf\ntffft1tttttttt111ttttttt11i,..........,::::;;;;;;:,................,1t11t111tttttffffLLfttfffffffttf\nttttt1tttttttt111tt1tttt11i.........:;;;;:,;;::::::.................;t1ttt11tftttffffffftttffftffttt\nttttt1tttt11tt111ttttttt111,.......;;;;;;:,:;::::::,................:tttt1111tt11ttfttft11tftttffttt\nttttt1tttttttt11tttttttt11;,......,;;;;;;:::;::::::,................,itt111t11t11ttftttt11ttttttfttt\nttttt1tttttttt11tttttttt11;,......:;;;;i;...,:::::,,.................:tt1tttt1111ttttttt11ttttttfttt\n1t1t111tttttt111tttttttt1;,.,.....,:;:......,:::::,,..................it1tttt11111tttt11111ttttttt1t\n1111111111111111111111111:,,,......,,. .....,,::::,,..................,1t11111111111111111111111tt11\n1111111111111111111111111,,....,,...........,,,:::::,..................itt11111111111111111111111111\n1111111111111111111111111;,.................,:::::::,,................:1tt11111111111111111111111111\n11111111111111111111111111:.... ............,:::,:,,.................,1tt11111111111111111111111111\n11111111111111111111111111ii;;;;;i, .........,,::,,,,,................,:;;1tt11111111111111111111111\n11111111111111111111111111111111t1,..........,,,:,,:,:,,. ...........,:::;;i11tt11111111111111111111\n11111111111111111111111111111111t;.............,:::;;;;:,........ .,:::;;:;i1t111111111ttttttt11111\n111111111111111111111111111111111:...........,;;;i1iiii;:,.......::,,::::;;i1ttt111t11t1111ttttt1111\n","tttftttttttttttttttttfffttttt1111tttt111tttt1111111tttttttt11tttt111111tttttttttttttttttttt11111111t\nttfftttttttttttttttffLLftffftfffftttt111111111t11ttffffftttt1111111111111111ttftttfttttttttt1111tttt\nttftttttttttttttffffLffttfffffffLfffttttttttt111tfffffffftttttttt11111ttttttfffftfLLfttttttt111tttt1\nttttttttttttttttfffffttfffffffLfffftttttttttt11tffffffffffttttttt11111tfffffffffttffffffttt11111ttt1\ntttttttttttffffftttffttffffffffftttfttttt111ttt1ttfffffftttttt11tt111111ttffffLLffttfLLfft11111ttttt\nttttttttttffLLLLftttttfLLLfttttttffLftttttttffft1ttfffffttfffft11t111tt111tttffLLfttfftt1ttt111ttttt\nttttttttfffLLLLLLffttfLLLfttfffftfLfttttttffffffffftftttfffffffttt111tftt11t11tfLLfftt11tffft11ttttt\ntttttttfffLLLLLLLLffttfttttfLLLfftffttttffftt1iii11tttfffffffffftt111tft1ttft11tffLfttttfffffftttttt\ntttttttffLLLLLLLLLfttttffffffLffffftttttfti;;::,,,:;i1tffffffffftt1111111ttftttttttttttfffffLLfffttt\ntttfffffLLLLLLLLLLfttfftfLfffffffLLfttttt1;,,,,,,,::,:ittffffffftt1111ttt1ttt1tftttt1ttffffLLLLLfttt\nttfLLffffLLLLLLLLfftfLfftttfLfffLLLLfttt1i;:::;;iiii;,;t11tfffft11111tffft1tt1ttt1ttttfffLLLLLLLLfff\ntffffftttffLLLffttttfffffttLLLLfLLLffttf1;;iiii11111i::1t11tttt1ttt11tfffttfftttttfft1tffLLLLLLLLffL\ntttttttttttffftttttttttttttfffLffLLftttti:;;;;iiiiiii;;tftt1ttt111111tffftfffftttttttt1ttfLLLLffffff\nttfLffffffftttfffffffffttfttffLfffLfttttti;;;;;iii;i1iiftttttffft11111tfttffftttttttttttttfLLftfffft\nttffffffffftttffffffffftfffftffffftttttft11i;;;iiii1iiit11tttttfft1111tt11ffttffttfffffLLfffffffffLL\nttffffffffttttfffffffftttttt1tttffftttttti1i;;;ii11iii111tffftttftt1111tt1ttttfft1tffffLLLfttfLLLLLL\n1ttffffffffttfffffffftt1ttt1111tfffftttt111i;;iiiiii111ttfffft11t11111tfftttttttt1ttffffLfftttfLLLLf\ntttttttttffttfftttttt1ttfftttt1ttfftttttt111i;i;:;ii11ttftfffft1111111ttttt1ttfft11ttffffffftfLLLLLf\ntft1ttttttttttttttt11tfffftttt11tfftt1ttt111;;i;;;iii1ttttffftt11t1111ttt11tt1tffttt1111ttfftfLffftt\ntfttffffttt11tttttft1tffffttffttttft111ttt11;;;;:;i1i1;;11tft111tt1111tt111tt1tfffffttttt11tttttffft\n1tttfffffftttffftfft11tfftttffttttft1111iii1;;;i;iiii1i,,,:;;i11tt1111tt111tft1fffffttfffftt11tffLLf\n111ttfffftt1ttffttt1111tfttft11tt1t1i;:,,,;1i;;i1ii;iti,,.....,:;i1t11111t11tt1tfffttffffffft1fffLLf\ntfttttftt1tt11tft11ttt11tttt1tt11i;:,.....;11i;i1i;1tt;,,.........,:i11111111t1tffttttffffftt1tfffLf\ntffttttttttftt1111ttttt11111tft;,.........;11111i1ttti,.............,1111tttt1111tffftttfft1tt1tffft\n1ttttttttttttt1111tttttt11tfff1,...........,:;;;;;11i:...............itttttttt1ttfffLffttttffffttttf\ntfffttttffttttt11ttttttt11tfffi............ ,:;;;;;;;,...............;t1ttttfft1tffffffftttttttffttf\ntfffttttfffffft11tttttttttt1tf;..............:;;;;;;;,...............:111ttttttttfffLfLfttfffffffttf\ntfffttttftftft111ttttttt11t111:..............:;;;;;::,...............,1t11ttt1t1tffLLLLfttfffffffttf\ntfffttttfttttt111ttttttt11ttt1:..............,;;;::;::................itt111tttttffffLLfttfffffffttf\ntttttttttttttt111ttttttt1ttfft:..............,;;;;::::................:1tt11tft1tffffffftttffttffttt\nttttt1tttt11tt11tttttttt1tttt1;.,::,..........:;:::;::,...............,1t1111tt11tttttft11tfttttfttt\nttttt1tttttttt11ttttttttt1ttt1;,:;;:..........,::::::,,................it11111111ttftttt11ttttttfttt\nttttt1tttttttt11tttttttttttttiiiiii;,.........,:::::::,................:ttttt1111ttttttt11ttttttfttt\n1t1111tttttttt11tttttttt1ttt1;;;;ii;,.........,:::::::,.................ittttt1111tttt11111ttttttt1t\n11111111111111111111111111tt1;;;;ii;...........::::::::................ :1t111111111111111111111t111\n11111111111111111111111111tt1;::;;i:...........,:::::::,...............,itttt11111111111111111111111\n11111111111111111111111tttttt;,,,::............,::::::,,...............ittttt11111111111111111111111\n1111111111111111111111111tttt1:,,..............,:::::,,,,.......,:;::,:1t1111111111111111111111t1111\n11111111111111111111111111111111i;;i:..........,:,,,.,,.,.......::;;i;it1ttt111111111111111111111111\n1111111111111111111111111111111111ti...........,,.,:,:;::,......,:;;ii1ttttt11111111111111111t111111\n1111111111111111111111111111111111t;...........,;iiiiiii;:,......:;;;i1ttttt111t1111111111tttttt1111\n11111111111111111111111111111111111:...........,;i11iiii;:,.......,:i1tttttt1ttttt1t11t1111ttttt1111\n"];function s(){const[t,e]=Object(n.useState)(function(){const t=new Date;return 3===t.getMonth()&&1===t.getDate()}()),[a,s]=Object(n.useState)(0);return Object(n.useEffect)(()=>{const t=setInterval(()=>s(t=>(t+1)%o.length),100);return()=>clearInterval(t)},[]),t?r.a.createElement(i.a,{open:t,onClose:()=>e(!1)},r.a.createElement("pre",{style:{color:"#0f0"}},o[a]),r.a.createElement("div",{style:{display:"none"}},r.a.createElement("iframe",{width:"560",height:"315",src:"https://www.youtube.com/embed/a3Z7zEc7AXQ?autoplay=1",title:"YouTube video player",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"}))):r.a.createElement(r.a.Fragment,null)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return G}));var n=a(105),r=a(197),i=a(57),o=a(141),s=a(340),l=a(15),c=a(142),f=a(8),u=a(147),m=a(13),h=a(364),d=a(375),p=a(362),g=a(94),y=a(256),b=a(80),E=a(17),v=a(11),k=a(96),_=a(102),w=a(27),S=a(218),C=a(26),x=a(64),L=a(4),O=a(6),M=a(237),T=a(66),A=a(29),R=a(109),N=a(24),P=a(132),I=a(87),F=a(99),D=a(47),j=a(466),B=a(370);function G(t,e,a){const G=function(t,e){if(!Object(o.b)(e))throw a.makeRuntimeErrorMsg(t,`Invalid augmentation: '${e}'`);return i.a[e]},W=function(t,e){if(!Object(A.b)(e))throw a.makeRuntimeErrorMsg(t,"Invalid faction name: '"+e);return A.a[e]},H=function(t,e){const n=T.a[e];if(null==n||!(n instanceof M.a))throw a.makeRuntimeErrorMsg(t,`Invalid company name: '${e}'`);return n},U=function(e=null){if(!e)return;const a=t.getHomeComputer();for(const n of a.scripts)if(n.filename===e){if(n.ramUsage>a.maxRam-a.ramUsed)return;const e=new h.a(n,[]);e.threads=1,Object(r.e)(t,e,a)}};return{getOwnedAugmentations:function(e=!1){const n=a.boolean(e);a.updateDynamicRam("getOwnedAugmentations",Object(m.c)(t,"getOwnedAugmentations")),a.checkSingularityAccess("getOwnedAugmentations");const r=[];for(let e=0;e`Faction '${o}' does not have the '${s}' augmentation.`),!1;if(!(h.name===l.a.NeuroFluxGovernor)){for(let a=0;a`You already have the '${s}' augmentation.`),!1;for(let a=0;a`You already have the '${s}' augmentation.`),!1}if(c.playerReputation`You do not have enough reputation with '${c.name}'.`),!1;const d=Object(n.g)(h,c,!0);return e.log("purchaseAugmentation",()=>d),!(!Object(u.a)(d)||!d.startsWith("You purchased"))&&(t.gainIntelligenceExp(10*f.a.IntelligenceSingFnBaseExpGain),!0)},softReset:function(n){const r=a.string("softReset","cbScript",n);a.updateDynamicRam("softReset",Object(m.c)(t,"softReset")),a.checkSingularityAccess("softReset"),e.log("softReset",()=>"Soft resetting. This will cause this script to be killed"),setTimeout(()=>{Object(s.a)(),U(r)},0),e.running=!1,Object(c.a)(e)},installAugmentations:function(n){const r=a.string("installAugmentations","cbScript",n);return a.updateDynamicRam("installAugmentations",Object(m.c)(t,"installAugmentations")),a.checkSingularityAccess("installAugmentations"),0===t.queuedAugmentations.length?(e.log("installAugmentations",()=>"You do not have any Augmentations to be installed."),!1):(t.gainIntelligenceExp(10*f.a.IntelligenceSingFnBaseExpGain),e.log("installAugmentations",()=>"Installing Augmentations. This will cause this script to be killed"),setTimeout(()=>{Object(o.e)(),U(r)},0),e.running=!1,Object(c.a)(e),!0)},goToLocation:function(n){const r=a.string("goToLocation","locationName",n);a.updateDynamicRam("goToLocation",Object(m.c)(t,"goToLocation")),a.checkSingularityAccess("goToLocation");const i=Object.values(S.a).find(t=>t.name===r);return i?t.city!==i.city?(e.log("goToLocation",()=>`No location named ${r} in ${t.city}`),!1):(k.b.toLocation(i),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/5e4),!0):(e.log("goToLocation",()=>"No location named "+r),!1)},universityCourse:function(n,r,i=!0){const o=a.string("universityCourse","universityName",n),s=a.string("universityCourse","className",r),l=a.boolean(i);a.updateDynamicRam("universityCourse",Object(m.c)(t,"universityCourse")),a.checkSingularityAccess("universityCourse");const c=t.focus;if(t.isWorking){const a=t.singularityStopWork();e.log("universityCourse",()=>a)}let u,h;switch(o.toLowerCase()){case v.a.AevumSummitUniversity.toLowerCase():if(t.city!=E.a.Aevum)return e.log("universityCourse",()=>`You cannot study at 'Summit University' because you are not in '${E.a.Aevum}'.`),!1;t.gotoLocation(v.a.AevumSummitUniversity),u=4,h=3;break;case v.a.Sector12RothmanUniversity.toLowerCase():if(t.city!=E.a.Sector12)return e.log("universityCourse",()=>`You cannot study at 'Rothman University' because you are not in '${E.a.Sector12}'.`),!1;t.location=v.a.Sector12RothmanUniversity,u=3,h=2;break;case v.a.VolhavenZBInstituteOfTechnology.toLowerCase():if(t.city!=E.a.Volhaven)return e.log("universityCourse",()=>`You cannot study at 'ZB Institute of Technology' because you are not in '${E.a.Volhaven}'.`),!1;t.location=v.a.VolhavenZBInstituteOfTechnology,u=5,h=4;break;default:return e.log("universityCourse",()=>`Invalid university name: '${o}'.`),!1}let d="";switch(s.toLowerCase()){case"Study Computer Science".toLowerCase():d=f.a.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():d=f.a.ClassDataStructures;break;case"Networks".toLowerCase():d=f.a.ClassNetworks;break;case"Algorithms".toLowerCase():d=f.a.ClassAlgorithms;break;case"Management".toLowerCase():d=f.a.ClassManagement;break;case"Leadership".toLowerCase():d=f.a.ClassLeadership;break;default:return e.log("universityCourse",()=>`Invalid class name: ${s}.`),!1}return t.startClass(u,h,d),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("universityCourse",()=>`Started ${d} at ${o}`),!0},gymWorkout:function(n,r,i=!0){const o=a.string("gymWorkout","gymName",n),s=a.string("gymWorkout","stat",r),l=a.boolean(i);a.updateDynamicRam("gymWorkout",Object(m.c)(t,"gymWorkout")),a.checkSingularityAccess("gymWorkout");const c=t.focus;if(t.isWorking){const a=t.singularityStopWork();e.log("gymWorkout",()=>a)}let u,h;switch(o.toLowerCase()){case v.a.AevumCrushFitnessGym.toLowerCase():if(t.city!=E.a.Aevum)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.AevumCrushFitnessGym}' because you are not in '${E.a.Aevum}'.`),!1;t.location=v.a.AevumCrushFitnessGym,u=3,h=2;break;case v.a.AevumSnapFitnessGym.toLowerCase():if(t.city!=E.a.Aevum)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.AevumSnapFitnessGym}' because you are not in '${E.a.Aevum}'.`),!1;t.location=v.a.AevumSnapFitnessGym,u=10,h=5;break;case v.a.Sector12IronGym.toLowerCase():if(t.city!=E.a.Sector12)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.Sector12IronGym}' because you are not in '${E.a.Sector12}'.`),!1;t.location=v.a.Sector12IronGym,u=1,h=1;break;case v.a.Sector12PowerhouseGym.toLowerCase():if(t.city!=E.a.Sector12)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.Sector12PowerhouseGym}' because you are not in '${E.a.Sector12}'.`),!1;t.location=v.a.Sector12PowerhouseGym,u=20,h=10;break;case v.a.VolhavenMilleniumFitnessGym.toLowerCase():if(t.city!=E.a.Volhaven)return e.log("gymWorkout",()=>`You cannot workout at '${v.a.VolhavenMilleniumFitnessGym}' because you are not in '${E.a.Volhaven}'.`),!1;t.location=v.a.VolhavenMilleniumFitnessGym,u=7,h=4;break;default:return e.log("gymWorkout",()=>`Invalid gym name: ${o}. gymWorkout() failed`),!1}switch(s.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():t.startClass(u,h,f.a.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():t.startClass(u,h,f.a.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():t.startClass(u,h,f.a.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():t.startClass(u,h,f.a.ClassGymAgility);break;default:return e.log("gymWorkout",()=>`Invalid stat: ${s}.`),!1}return l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("gymWorkout",()=>`Started training ${s} at ${o}`),!0},travelToCity:function(n){const r=a.city("travelToCity","cityName",n);switch(a.updateDynamicRam("travelToCity",Object(m.c)(t,"travelToCity")),a.checkSingularityAccess("travelToCity"),r){case E.a.Aevum:case E.a.Chongqing:case E.a.Sector12:case E.a.NewTokyo:case E.a.Ishima:case E.a.Volhaven:return t.money"Not enough money to travel."),!1):(t.loseMoney(f.a.TravelCost,"other"),t.city=r,e.log("travelToCity",()=>"Traveled to "+r),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/5e4),!0);default:throw a.makeRuntimeErrorMsg("travelToCity",`Invalid city name: '${r}'.`)}},purchaseTor:function(){if(a.updateDynamicRam("purchaseTor",Object(m.c)(t,"purchaseTor")),a.checkSingularityAccess("purchaseTor"),t.hasTorRouter())return e.log("purchaseTor",()=>"You already have a TOR router!"),!0;if(t.money"You cannot afford to purchase a Tor router."),!1;t.loseMoney(f.a.TorRouterCost,"other");const n=Object(P.f)({ip:Object(C.e)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});return Object(C.a)(n),t.getHomeComputer().serversOnNetwork.push(n.hostname),n.serversOnNetwork.push(t.getHomeComputer().hostname),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/500),e.log("purchaseTor",()=>"You have purchased a Tor router!"),!0},purchaseProgram:function(n){const r=a.string("purchaseProgram","programName",n).toLowerCase();if(a.updateDynamicRam("purchaseProgram",Object(m.c)(t,"purchaseProgram")),a.checkSingularityAccess("purchaseProgram"),!t.hasTorRouter())return e.log("purchaseProgram",()=>"You do not have the TOR router."),!1;const i=Object.values(y.a).find(t=>t.program.toLowerCase()===r);return null==i?(e.log("purchaseProgram",()=>`Invalid program name: '${r}.`),!1):t.money`Not enough money to purchase '${i.program}'. Need ${L.a.formatMoney(i.price)}`),!1):t.hasProgram(i.program)?(e.log("purchaseProgram",()=>`You already have the '${i.program}' program`),!0):(t.loseMoney(i.price,"other"),t.getHomeComputer().programs.push(i.program),e.log("purchaseProgram",()=>`You have purchased the '${i.program}' program. The new program can be found on your home computer.`),t.gainIntelligenceExp(f.a.IntelligenceSingFnBaseExpGain/5e3),!0)},getCurrentServer:function(){return a.updateDynamicRam("getCurrentServer",Object(m.c)(t,"getCurrentServer")),a.checkSingularityAccess("getCurrentServer"),t.getCurrentServer().hostname},connect:function(e){const n=a.string("purchaseProgram","hostname",e);if(a.updateDynamicRam("connect",Object(m.c)(t,"connect")),a.checkSingularityAccess("connect"),!n)throw a.makeRuntimeErrorMsg("connect",`Invalid hostname: '${n}'`);const r=Object(C.d)(n);if(null==r)throw a.makeRuntimeErrorMsg("connect",`Invalid hostname: '${n}'`);if("home"===n)return t.getCurrentServer().isConnectedTo=!1,t.currentServer=t.getHomeComputer().hostname,t.getCurrentServer().isConnectedTo=!0,I.a.setcwd("/"),!0;const i=t.getCurrentServer();for(let e=0;e"cannot backdoor this kind of server"),Promise.resolve();const r=n,i=Object(F.d)(r,t)/4*1e3,o=Object(j.b)(r,t);if(!o.res)throw a.makeRuntimeErrorMsg("installBackdoor",o.msg||"");return e.log("installBackdoor",()=>`Installing backdoor on '${r.hostname}' in ${Object(N.b)(i,!0)}`),Object(R.c)(i,e).then((function(){return e.log("installBackdoor",()=>`Successfully installed backdoor on '${r.hostname}'`),r.backdoorInstalled=!0,_.a.WorldDaemon===r.hostname&&k.b.toBitVerse(!1,!1),Promise.resolve()}))},isFocused:function(){return a.updateDynamicRam("isFocused",Object(m.c)(t,"isFocused")),a.checkSingularityAccess("isFocused"),t.focus},setFocus:function(e){const n=a.boolean(e);if(a.updateDynamicRam("setFocus",Object(m.c)(t,"setFocus")),a.checkSingularityAccess("setFocus"),!t.isWorking)throw a.makeRuntimeErrorMsg("setFocus","Not currently working");if(t.workType!=f.a.WorkTypeFaction&&t.workType!=f.a.WorkTypeCompany&&t.workType!=f.a.WorkTypeCompanyPartTime&&t.workType!=f.a.WorkTypeCreateProgram&&t.workType!=f.a.WorkTypeStudyClass)throw a.makeRuntimeErrorMsg("setFocus","Cannot change focus for current job");return!t.focus&&n?(t.startFocusing(),k.b.toWork(),!0):!(!t.focus||n)&&(t.stopFocusing(),k.b.toTerminal(),!0)},getStats:function(){return a.updateDynamicRam("getStats",Object(m.c)(t,"getStats")),a.checkSingularityAccess("getStats"),e.log("getStats",()=>"getStats is deprecated, please use getplayer"),{hacking:t.hacking,strength:t.strength,defense:t.defense,dexterity:t.dexterity,agility:t.agility,charisma:t.charisma,intelligence:t.intelligence}},getCharacterInformation:function(){return a.updateDynamicRam("getCharacterInformation",Object(m.c)(t,"getCharacterInformation")),a.checkSingularityAccess("getCharacterInformation"),e.log("getCharacterInformation",()=>"getCharacterInformation is deprecated, please use getplayer"),{bitnode:t.bitNodeN,city:t.city,factions:t.factions.slice(),hp:t.hp,jobs:Object.keys(t.jobs),jobTitles:Object.values(t.jobs),maxHp:t.max_hp,mult:{agility:t.agility_mult,agilityExp:t.agility_exp_mult,charisma:t.charisma,charismaExp:t.charisma_exp,companyRep:t.company_rep_mult,crimeMoney:t.crime_money_mult,crimeSuccess:t.crime_success_mult,defense:t.defense_mult,defenseExp:t.defense_exp_mult,dexterity:t.dexterity_mult,dexterityExp:t.dexterity_exp_mult,factionRep:t.faction_rep_mult,hacking:t.hacking_mult,hackingExp:t.hacking_exp_mult,strength:t.strength_mult,strengthExp:t.strength_exp_mult,workMoney:t.work_money_mult},timeWorked:t.timeWorked,tor:t.hasTorRouter(),workHackExpGain:t.workHackExpGained,workStrExpGain:t.workStrExpGained,workDefExpGain:t.workDefExpGained,workDexExpGain:t.workDexExpGained,workAgiExpGain:t.workAgiExpGained,workChaExpGain:t.workChaExpGained,workRepGain:t.workRepGained,workMoneyGain:t.workMoneyGained,hackingExp:t.hacking_exp,strengthExp:t.strength_exp,defenseExp:t.defense_exp,dexterityExp:t.dexterity_exp,agilityExp:t.agility_exp,charismaExp:t.charisma_exp}},hospitalize:function(){a.updateDynamicRam("hospitalize",Object(m.c)(t,"hospitalize")),a.checkSingularityAccess("hospitalize"),t.isWorking||k.b.page()===w.a.Infiltration||k.b.page()===w.a.BitVerse?e.log("hospitalize",()=>"Cannot go to the hospital because the player is busy."):t.hospitalize()},isBusy:function(){return a.updateDynamicRam("isBusy",Object(m.c)(t,"isBusy")),a.checkSingularityAccess("isBusy"),t.isWorking||k.b.page()===w.a.Infiltration||k.b.page()===w.a.BitVerse},stopAction:function(){if(a.updateDynamicRam("stopAction",Object(m.c)(t,"stopAction")),a.checkSingularityAccess("stopAction"),t.isWorking){t.focus&&(t.stopFocusing(),k.b.toTerminal());const a=t.singularityStopWork();return e.log("stopAction",()=>a),!0}return!1},upgradeHomeCores:function(){a.updateDynamicRam("upgradeHomeCores",Object(m.c)(t,"upgradeHomeCores")),a.checkSingularityAccess("upgradeHomeCores");const n=t.getHomeComputer();if(n.cpuCores>=8)return e.log("upgradeHomeCores",()=>"Your home computer is at max cores."),!1;const r=t.getUpgradeHomeCoresCost();return t.money"You don't have enough money. Need "+L.a.formatMoney(r)),!1):(n.cpuCores+=1,t.loseMoney(r,"servers"),t.gainIntelligenceExp(2*f.a.IntelligenceSingFnBaseExpGain),e.log("upgradeHomeCores",()=>`Purchased an additional core for home computer! It now has ${n.cpuCores} cores.`),!0)},getUpgradeHomeCoresCost:function(){return a.updateDynamicRam("getUpgradeHomeCoresCost",Object(m.c)(t,"getUpgradeHomeCoresCost")),a.checkSingularityAccess("getUpgradeHomeCoresCost"),t.getUpgradeHomeCoresCost()},upgradeHomeRam:function(){a.updateDynamicRam("upgradeHomeRam",Object(m.c)(t,"upgradeHomeRam")),a.checkSingularityAccess("upgradeHomeRam");const n=t.getHomeComputer();if(n.maxRam>=f.a.HomeComputerMaxRam)return e.log("upgradeHomeRam",()=>"Your home computer is at max RAM."),!1;const r=t.getUpgradeHomeRamCost();return t.money"You don't have enough money. Need "+L.a.formatMoney(r)),!1):(n.maxRam*=2,t.loseMoney(r,"servers"),t.gainIntelligenceExp(2*f.a.IntelligenceSingFnBaseExpGain),e.log("upgradeHomeRam",()=>`Purchased additional RAM for home computer! It now has ${L.a.formatRAM(n.maxRam)} of RAM.`),!0)},getUpgradeHomeRamCost:function(){return a.updateDynamicRam("getUpgradeHomeRamCost",Object(m.c)(t,"getUpgradeHomeRamCost")),a.checkSingularityAccess("getUpgradeHomeRamCost"),t.getUpgradeHomeRamCost()},workForCompany:function(n,r=!0){let i=a.string("workForCompany","companyName",n);const o=a.boolean(r);if(a.updateDynamicRam("workForCompany",Object(m.c)(t,"workForCompany")),a.checkSingularityAccess("workForCompany"),null==i&&(i=t.companyName),null==i||""===i||!(T.a[i]instanceof M.a))return e.log("workForCompany",()=>`Invalid company: '${i}'`),!1;if(!Object.keys(t.jobs).includes(i))return e.log("workForCompany",()=>`You do not have a job at '${i}'`),!1;const s=t.jobs[i],l=g.a[s];if(""===s||!(l instanceof p.a))return e.log("workForCompany",()=>"You do not have a job"),!1;const c=t.focus;if(t.isWorking){const a=t.singularityStopWork();e.log("workForCompany",()=>a)}return l.isPartTimeJob()?t.startWorkPartTime(i):t.startWork(i),o?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForCompany",()=>`Began working at '${t.companyName}' as a '${s}'`),!0},applyToCompany:function(n,r){const i=a.string("applyToCompany","companyName",n),o=a.string("applyToCompany","field",r);let s;switch(a.updateDynamicRam("applyToCompany",Object(m.c)(t,"applyToCompany")),a.checkSingularityAccess("applyToCompany"),H("applyToCompany",i),t.location=i,o.toLowerCase()){case"software":s=t.applyForSoftwareJob(!0);break;case"software consultant":s=t.applyForSoftwareConsultantJob(!0);break;case"it":s=t.applyForItJob(!0);break;case"security engineer":s=t.applyForSecurityEngineerJob(!0);break;case"network engineer":s=t.applyForNetworkEngineerJob(!0);break;case"business":s=t.applyForBusinessJob(!0);break;case"business consultant":s=t.applyForBusinessConsultantJob(!0);break;case"security":s=t.applyForSecurityJob(!0);break;case"agent":s=t.applyForAgentJob(!0);break;case"employee":s=t.applyForEmployeeJob(!0);break;case"part-time employee":s=t.applyForPartTimeEmployeeJob(!0);break;case"waiter":s=t.applyForWaiterJob(!0);break;case"part-time waiter":s=t.applyForPartTimeWaiterJob(!0);break;default:return e.log("applyToCompany",()=>`Invalid job: '${o}'.`),!1}return s?e.log("applyToCompany",()=>`You were offered a new job at '${i}' as a '${t.jobs[i]}'`):e.log("applyToCompany",()=>`You failed to get a new job/promotion at '${i}' in the '${o}' field.`),s},getCompanyRep:function(e){const n=a.string("getCompanyRep","companyName",e);a.updateDynamicRam("getCompanyRep",Object(m.c)(t,"getCompanyRep")),a.checkSingularityAccess("getCompanyRep");return H("getCompanyRep",n).playerReputation},getCompanyFavor:function(e){const n=a.string("getCompanyFavor","companyName",e);a.updateDynamicRam("getCompanyFavor",Object(m.c)(t,"getCompanyFavor")),a.checkSingularityAccess("getCompanyFavor");return H("getCompanyFavor",n).favor},getCompanyFavorGain:function(e){const n=a.string("getCompanyFavorGain","companyName",e);a.updateDynamicRam("getCompanyFavorGain",Object(m.c)(t,"getCompanyFavorGain")),a.checkSingularityAccess("getCompanyFavorGain");return H("getCompanyFavorGain",n).getFavorGain()},checkFactionInvitations:function(){return a.updateDynamicRam("checkFactionInvitations",Object(m.c)(t,"checkFactionInvitations")),a.checkSingularityAccess("checkFactionInvitations"),t.factionInvitations.slice()},joinFaction:function(r){const i=a.string("joinFaction","facName",r);if(a.updateDynamicRam("joinFaction",Object(m.c)(t,"joinFaction")),a.checkSingularityAccess("joinFaction"),W("joinFaction",i),!t.factionInvitations.includes(i))return e.log("joinFaction",()=>`You have not been invited by faction '${i}'`),!1;const o=A.a[i];Object(n.e)(o);for(let e=0;e`Joined the '${i}' faction.`),!0},workForFaction:function(n,r,i=!0){const o=a.string("workForFaction","facName",n),s=a.string("workForFaction","type",r),l=a.boolean(i);if(a.updateDynamicRam("workForFaction",Object(m.c)(t,"workForFaction")),a.checkSingularityAccess("workForFaction"),W("workForFaction",o),t.inGang()&&void 0!==b.a[o])return e.log("workForFaction",()=>`Faction '${o}' does not offer work at the moment.`),!1;if(!t.factions.includes(o))return e.log("workForFaction",()=>`You are not a member of '${o}'`),!1;const c=t.focus;if(t.isWorking){const a=t.singularityStopWork();e.log("workForFaction",()=>a)}const f=A.a[o];switch(s.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return B.a[f.name].offerHackingWork?(t.startFactionHackWork(f),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForFaction",()=>`Started carrying out hacking contracts for '${f.name}'`),!0):(e.log("workForFaction",()=>`Faction '${f.name}' do not need help with hacking contracts.`),!1);case"field":case"fieldwork":case"field work":return B.a[f.name].offerFieldWork?(t.startFactionFieldWork(f),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForFaction",()=>`Started carrying out field missions for '${f.name}'`),!0):(e.log("workForFaction",()=>`Faction '${f.name}' do not need help with field missions.`),!1);case"security":case"securitywork":case"security work":return B.a[f.name].offerSecurityWork?(t.startFactionSecurityWork(f),l?(t.startFocusing(),k.b.toWork()):c&&(t.stopFocusing(),k.b.toTerminal()),e.log("workForFaction",()=>`Started carrying out security work for '${f.name}'`),!0):(e.log("workForFaction",()=>`Faction '${f.name}' do not need help with security work.`),!1);default:e.log("workForFaction",()=>"Invalid work type: '"+s)}return!0},getFactionRep:function(e){const n=a.string("getFactionRep","facName",e);a.updateDynamicRam("getFactionRep",Object(m.c)(t,"getFactionRep")),a.checkSingularityAccess("getFactionRep");return W("getFactionRep",n).playerReputation},getFactionFavor:function(e){const n=a.string("getFactionRep","facName",e);a.updateDynamicRam("getFactionFavor",Object(m.c)(t,"getFactionFavor")),a.checkSingularityAccess("getFactionFavor");return W("getFactionFavor",n).favor},getFactionFavorGain:function(e){const n=a.string("getFactionFavorGain","facName",e);a.updateDynamicRam("getFactionFavorGain",Object(m.c)(t,"getFactionFavorGain")),a.checkSingularityAccess("getFactionFavorGain");return W("getFactionFavorGain",n).getFavorGain()},donateToFaction:function(n,r){const i=a.string("donateToFaction","facName",n),o=a.number("donateToFaction","amt",r);a.updateDynamicRam("donateToFaction",Object(m.c)(t,"donateToFaction")),a.checkSingularityAccess("donateToFaction");const s=W("donateToFaction",i);if(!t.factions.includes(s.name))return e.log("donateToFaction",()=>`You can't donate to '${i}' because you aren't a member`),!1;if(t.inGang()&&s.name===t.getGangFaction().name)return e.log("donateToFaction",()=>`You can't donate to '${i}' because youre managing a gang for it`),!1;if("number"!=typeof o||o<=0||isNaN(o))return e.log("donateToFaction",()=>`Invalid donation amount: '${o}'.`),!1;if(t.money`You do not have enough money to donate ${L.a.formatMoney(o)} to '${i}'`),!1;const l=Math.floor(f.a.BaseFavorToDonate*O.a.RepToDonateToFaction);if(s.favor`You do not have enough favor to donate to this faction. Have ${s.favor}, need ${l}`),!1;const c=o/f.a.DonateMoneyToRepDivisor*t.faction_rep_mult;return s.playerReputation+=c,t.loseMoney(o,"other"),e.log("donateToFaction",()=>`${L.a.formatMoney(o)} donated to '${i}' for ${L.a.formatReputation(c)} reputation`),!0},createProgram:function(n,r=!0){const i=a.string("createProgram","programName",n).toLowerCase(),o=a.boolean(r);a.updateDynamicRam("createProgram",Object(m.c)(t,"createProgram")),a.checkSingularityAccess("createProgram");const s=t.focus;if(t.isWorking){const a=t.singularityStopWork();e.log("createProgram",()=>a)}const l=Object.values(x.a).find(t=>t.name.toLowerCase()===i);if(null==l)return e.log("createProgram",()=>"The specified program does not exist: '"+i),!1;if(t.hasProgram(l.name))return e.log("createProgram",()=>`You already have the '${l.name}' program`),!1;const c=l.create;return null===c?(e.log("createProgram",()=>`You cannot create the '${l.name}' program`),!1):c.req(t)?(t.startCreateProgramWork(l.name,c.time,c.level),o?(t.startFocusing(),k.b.toWork()):s&&(t.stopFocusing(),k.b.toTerminal()),e.log("createProgram",()=>`Began creating program: '${i}'`),!0):(e.log("createProgram",()=>`Hacking level is too low to create '${l.name}' (level ${c.level} req)`),!1)},commitCrime:function(n){const r=a.string("commitCrime","crimeRoughName",n);if(a.updateDynamicRam("commitCrime",Object(m.c)(t,"commitCrime")),a.checkSingularityAccess("commitCrime"),t.isWorking){const a=t.singularityStopWork();e.log("commitCrime",()=>a)}t.gotoLocation(v.a.Slums);const i=Object(d.b)(r.toLowerCase());if(null==i)throw a.makeRuntimeErrorMsg("commitCrime",`Invalid crime: '${r}'`);return e.log("commitCrime",()=>`Attempting to commit ${i.name}...`),i.commit(k.b,t,1,e)},getCrimeChance:function(e){const n=a.string("getCrimeChance","crimeRoughName",e);a.updateDynamicRam("getCrimeChance",Object(m.c)(t,"getCrimeChance")),a.checkSingularityAccess("getCrimeChance");const r=Object(d.b)(n.toLowerCase());if(null==r)throw a.makeRuntimeErrorMsg("getCrimeChance","Invalid crime: "+n);return r.successRate(t)},getCrimeStats:function(e){const n=a.string("getCrimeStats","crimeRoughName",e);a.updateDynamicRam("getCrimeStats",Object(m.c)(t,"getCrimeStats")),a.checkSingularityAccess("getCrimeStats");const r=Object(d.b)(n.toLowerCase());if(null==r)throw a.makeRuntimeErrorMsg("getCrimeStats","Invalid crime: "+n);return Object.assign({},r)},getDarkwebPrograms:function(){return a.updateDynamicRam("getDarkwebPrograms",Object(m.c)(t,"getDarkwebPrograms")),a.checkSingularityAccess("getDarkwebPrograms"),t.hasTorRouter()?Object.values(y.a).map(t=>t.program):(e.log("getDarkwebPrograms",()=>"You do not have the TOR router."),[])},getDarkwebProgramCost:function(n){const r=a.string("getDarkwebProgramCost","programName",n).toLowerCase();if(a.updateDynamicRam("getDarkwebProgramCost",Object(m.c)(t,"getDarkwebProgramCost")),a.checkSingularityAccess("getDarkwebProgramCost"),!t.hasTorRouter())return e.log("getDarkwebProgramCost",()=>"You do not have the TOR router."),-1;const i=Object.values(y.a).find(t=>t.program.toLowerCase()===r);if(null==i)throw a.makeRuntimeErrorMsg("getDarkwebProgramCost",`No such exploit ('${r}') found on the darkweb! \nThis function is not case-sensitive. Did you perhaps forget .exe at the end?`);return t.hasProgram(i.program)?(e.log("getDarkwebProgramCost",()=>`You already have the '${i.program}' program`),0):i.price}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(9);function r(){const t=[];return{write:e=>(t.push(e),t.length>n.a.MaxPortCapacity?t.shift():null),tryWrite:e=>!(t.length>=n.a.MaxPortCapacity)&&(t.push(e),!0),read:()=>0===t.length?"NULL PORT DATA":t.shift(),peek:()=>{if(0===t.length)return"NULL PORT DATA";return t.slice()[0]},full:()=>t.length==n.a.MaxPortCapacity,empty:()=>0===t.length,clear:()=>{t.length=0}}}},function(t,e,a){"use strict";function n(t){for(const e in t)t.hasOwnProperty(e)&&delete t[e]}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(363),r=a(2);function i(t){const e="SourceFile"+t.n,a=n.a[e];if(null!=a){switch(t.n){case 1:{let e=0;for(let a=0;aa.hacking?t.error("Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill"):s instanceof r.a?t.error("Cannot use backdoor on this type of Server"):t.startBackdoor(a):t.error("You do not have admin rights for this machine! Cannot backdoor")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(465),r=a(102),i=a(26);function o(t,e,a,o,s){if(!Object(i.d)(r.a.DarkWeb))return void t.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)");if(1!=s.length)return t.print("Incorrect number of arguments. Usage: "),t.print("buy -l"),t.print("buy -a"),void t.print("buy [item name]");const l=s[0]+"";"-l"==l||"-1"==l||"--list"==l?Object(n.d)():"-a"==l||"--all"==l?Object(n.a)():Object(n.b)(l)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(267),r=a(578),i=a(16);function o(t,e,a,o,s){if(1!==s.length)return void t.error("Incorrect usage of cat command. Usage: cat [file]");const l=s[0]+"",c=t.getFilepath(l);if(c.endsWith(".msg")||c.endsWith(".lit")||c.endsWith(".txt")||c.endsWith(".script")||c.endsWith(".js")||c.endsWith(".ns")){if(c.endsWith(".msg")||c.endsWith(".lit"))for(let t=0;t
${e.code}`)}t.error("No such file "+c)}else t.error("Only .msg, .txt, .lit, .script, .js, and .ns files are viewable with cat (filename must end with .msg, .txt, .lit, .script, .js, or .ns)")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(83);function r(t,e,a,r,i){if(i.length>1)t.error("Incorrect number of arguments. Usage: cd [dir]");else{let e=1===i.length?i[0]+"":"/",r="";if("/"===e)r="/";else{if(e=Object(n.l)(e),r=Object(n.c)(e,t.cwd()),null===r||""===r)return void t.error("Invalid path. Failed to change directories");const i=a.getCurrentServer();if(!i.scripts.some(t=>t.filename.startsWith(r+""))&&!i.textFiles.some(t=>t.fn.startsWith(r+"")))return void t.error("Invalid path. Failed to change directories")}t.setcwd(r)}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(233),r=a(98);function i(t,e,a,i,o){if(o.length<1)t.error("Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...");else{const e=t.getFilepath(o[0]+"");if(!Object(r.a)(e))return void t.error(`'check' can only be called on scripts files (filename must end with ${r.b.join(", ")})`);const a=Object(n.a)(e,o.slice(1),i);if(null==a)return void t.error(`No script named ${e} is running on the server`);a.displayLog()}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(132),r=a(26),i=a(47);function o(t,e,a,o,s){if(1!==s.length)return void t.error("Incorrect usage of connect command. Usage: connect [hostname]");const l=s[0]+"";for(let e=0;ea.hacking?t.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):t.startGrow(a):t.error("You do not have admin rights for this machine! Cannot grow")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(47);function r(t,e,a,r,i){if(0!==i.length)return void t.error("Incorrect usage of hack command. Usage: hack");r instanceof n.a||t.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers");const o=r;o.purchasedByPlayer?t.error("Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers"):o.hasAdminRights?o.requiredHackingSkill>a.hacking?t.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):t.startHack(a):t.error("You do not have admin rights for this machine! Cannot hack")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(520);function r(t,e,a,r,i){if(0===i.length||1===i.length)if(0===i.length)n.b.forEach(e=>t.print(e));else{const e=i[0]+"",a=n.a[e];if(null==a)return void t.error("No help topics match '"+e+"'");a.forEach(e=>t.print(e))}else t.error("Incorrect usage of help command. Usage: help")}},function(t,e,a){"use strict";function n(t,e,a,n,r){if(0===r.length)return void t.commandHistory.forEach((e,a)=>{t.print(`${a.toString().padStart(2)} ${e}`)});const i=r[0]+"";"-c"===i||"--clear"===i?(a.terminalCommandHistory=[],t.commandHistory=[],t.commandHistoryIndex=1):t.error("Incorrect usage of history command. usage: history [-c]")}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";function n(t,e,a,n,r){0===r.length?(a.getCurrentServer().isConnectedTo=!1,a.currentServer=a.getHomeComputer().hostname,a.getCurrentServer().isConnectedTo=!0,t.print("Connected to home"),t.setcwd("/")):t.error("Incorrect usage of home command. Usage: home")}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";function n(t,e,a,n,r){0===r.length?t.print(a.getCurrentServer().hostname):t.error("Incorrect usage of hostname command. Usage: hostname")}a.d(e,"a",(function(){return n}))},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(142);function r(t,e,a,r,i){try{if(i.length<1)return void t.error("Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...");if("boolean"==typeof i[0])return;if("number"==typeof i[0]){const e=i[0];return void(Object(n.a)(e)?t.print("Killing script with PID "+e):t.error(`Failed to kill script with PID ${e}. No such script is running`))}const e=t.getFilepath(i[0]),a=r.getRunningScript(e,i.slice(1));if(null==a)return void t.error("No such script is running. Nothing to kill");Object(n.a)(a,r.hostname,!1),t.print("Killing "+e)}catch(e){t.error(e+"")}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(142),r=a(292);function i(t,e,a,i){for(let t=i.runningScripts.length-1;t>=0;--t)Object(n.a)(i.runningScripts[t],i.hostname,!1);r.a.emit(),t.print("Killing all running scripts")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return f}));var n=a(137),r=a(113),i=a(173),o=a(0),s=a.n(o),l=a(83),c=a(314);function f(t,e,a,o,f){let u;try{u=c({"-l":Boolean,"--grep":String,"-g":"--grep"},{argv:f})}catch(t){return void h()}const m=u["--grep"];function h(){t.error("Incorrect usage of ls command. Usage: ls [dir] [-l] [-g, --grep pattern]")}if(f.length>4)return h();let d=t.cwd();d.endsWith("/")||(d+="/");const p=f[0]&&"string"==typeof f[0]&&!f[0].startsWith("-")?f[0]:"",g=Object(l.c)(p+"",t.cwd());if(d=g||"",d.endsWith("/")||(d+="/"),!Object(l.i)(d))return h();"/"===d&&(d="");const y=[],b=[],E=[],v=[],k=[],_=[];function w(t,e){let a=t;if(d){if(!t.startsWith(d))return;a=t.slice(d.length,t.length)}if(!m||a.includes(m))if(a.includes("/")){const t=Object(l.g)(a);if(m&&!t.includes(m))return;_.includes(t)||_.push(t)}else e.push(a)}const S=a.getCurrentServer();for(const t of S.programs)w(t,y);for(const t of S.scripts)w(t.filename,b);for(const t of S.textFiles)w(t.fn,E);for(const t of S.contracts)w(t.fn,v);for(const t of S.messages)w(t,k);function C({row:o,prefix:l,hostname:c}){const f=Object(r.a)(t=>Object(n.a)({scriptLinksWrap:{display:"inline-flex",color:t.palette.warning.main},scriptLink:{cursor:"pointer",textDecorationLine:"underline",paddingRight:"1.15em","&:last-child":{padding:0}}}))();let u=o.split("~").map(t=>[t.trim(),t.replace(t.trim(),"")]);return u=u.filter(t=>!!t[0]),s.a.createElement("span",{className:f.scriptLinksWrap},u.map(n=>s.a.createElement("span",null,s.a.createElement("span",{key:n[0],className:f.scriptLink,onClick:()=>function(n){var r;if(a.getCurrentServer().hostname!==c)return t.error(`File is not on this server, connect to ${c} and try again`);n.startsWith("/")&&(n=n.slice(1));const o=t.getFilepath(`${l}${n}`),s=Object(i.toString)(null===(r=t.getScript(a,o))||void 0===r?void 0:r.code);e.toScriptEditor({[o]:s})}(n[0])},n[0]),s.a.createElement("span",{key:"s"+n[0]},n[1]))))}function x(e,a,n,r){const i=Math.max(...e.map(t=>t.length))+1,l=!0===a["-l"]?1:Math.ceil(80/i);for(let a=0;at.segments.length>0);for(let t=0;te.cost-t.cost))&&void 0!==s?s:[],m=r.a.UseIEC60027_2?9:8;for(const e of u)t.print(`${n.a.formatRAM(e.cost*i).padStart(m)} | ${e.name} (${e.type})`);f>0&&0===u.length&&t.warn("You might have to open & save this script to see the detailed RAM usage information.")}catch(e){t.error(e+"")}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(98),r=a(223),i=a(83);function o(t,e,a,o,s){if(2===s.length)try{const e=s[0]+"",l=s[1]+"";if(!Object(n.a)(e)&&!e.endsWith(".txt"))return void t.error("'mv' can only be used on scripts and text files (.txt)");const c=t.getFile(a,e);if(null==c)return void t.error(`Source file ${e} does not exist`);const f=t.getFilepath(e),u=Object(i.f)(l,e,t.cwd());if(null===u)return void t.error("error parsing dst file");const m=t.getFile(a,u),h=t.getFilepath(u);if(Object(i.a)(f,h))return void t.error("Source and destination files are the same file");if(Object(n.a)(e)){const e=c;if(!Object(n.a)(h))return void t.error("Source and destination files must have the same type");if(o.isRunning(f))return void t.error("Cannot use 'mv' on a script that is running");if(null!=m){if(!o.removeFile(h).res)return void t.error("Something went wrong...please contact game dev (probably a bug)");t.print("Warning: The destination file was overwritten")}e.filename=h}else if(c instanceof r.a){const e=c;if(!u.endsWith(".txt"))return void t.error("Source and destination files must have the same type");if(null!=m){if(!o.removeFile(h).res)return void t.error("Something went wrong...please contact game dev (probably a bug)");t.print("Warning: The destination file was overwritten")}e.fn=h}}catch(e){t.error(e+"")}else t.error("Incorrect number of arguments. Usage: mv [src] [dest]")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(634);function r(t,e,a,r,i){return Object(n.a)("nano",{terminal:t,router:e,player:a,server:r,args:i})}},function(t,e,a){"use strict";a.d(e,"a",(function(){return n}));const n=new class{constructor(){this.positions=new Map}saveCursor(t,e){this.positions.set(t,e)}getCursor(t){const e=this.positions.get(t);return e||{row:-1,column:-1}}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(314);function r(t,e,a,r,i){let o;try{o=n({"--grep":String,"-g":"--grep"},{argv:i})}catch(e){return void t.error("Incorrect usage of ps command. Usage: ps [-g, --grep pattern]")}const s=o["--grep"];if(s){const e=new RegExp(s.toString()),a=r.runningScripts.filter(t=>e.test(t.filename));for(let e=0;e0?d:1,y=h._;if(null==Object(o.a)(u,y,c)){for(let e=0;ef)return void t.error("This machine does not have enough RAM to run this script with "+g+" threads. Script requires "+l.a.formatRAM(s)+" of RAM");const m=new i.a(o,y);m.threads=g;return Object(r.e)(a,m,c)?(t.print(`Running script with ${g} thread(s), pid ${m.pid} and args: ${JSON.stringify(y)}.`),m.filename.endsWith(".ns")&&t.warn(".ns files are deprecated, please rename everything to .js"),void(p&&n.b.emit(m))):void t.error("Failed to start script")}t.error("No such script")}else t.error("This script is already running with the same args. Cannot run multiple instances with the same args")}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(64);function r(t,e,a,r,i){if(i.length<1)return;const o=i[0]+"";if(a.hasProgram(o)){if(!(i.length<1)){for(const s of Object.values(n.a))if(s.name.toLocaleLowerCase()===o.toLocaleLowerCase())return void s.run(e,t,a,r,i.slice(1).map(t=>t+""));t.error("Invalid executable. Cannot be run")}}else t.error(`No such (exe, script, js, ns, or cct) file! (Only programs that exist on your home computer or scripts on ${a.getCurrentServer().hostname} can be run)`)}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(132);function r(t,e,a,r,i){if(0!==i.length)return void t.error("Incorrect usage of scan command. Usage: scan");const o=a.getCurrentServer(),s=o.serversOnNetwork.map((t,e)=>{const a=Object(n.a)(o,e);if(null===a)throw new Error("Server should not be null");return{hostname:a.hostname,ip:a.ip,hasRoot:a.hasAdminRights?"Y":"N"}});s.unshift({hostname:"Hostname",ip:"IP",hasRoot:"Root Access"});const l=Math.max(...s.map(t=>t.hostname.length)),c=Math.max(...s.map(t=>t.ip.length));for(const e of s){if(!e)continue;let a=e.hostname;a+=" ".repeat(l-e.hostname.length+1),a+=e.ip,a+=" ".repeat(c-e.ip.length+1),a+=e.hasRoot,t.print(a)}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return r}));var n=a(64);function r(t,e,a,r,i){if(0===i.length)t.executeScanAnalyzeCommand(a,1);else{if(i.length>2)return void t.error("Incorrect usage of scan-analyze command. usage: scan-analyze [depth]");let e=!1;2===i.length&&"-a"===i[1]&&(e=!0);const r=parseInt(i[0]+"");if(isNaN(r)||r<0)return void t.error("Incorrect usage of scan-analyze command. depth argument must be positive numeric");if(r>3&&!a.hasProgram(n.a.DeepscanV1.name)&&!a.hasProgram(n.a.DeepscanV2.name))return void t.error("You cannot scan-analyze with that high of a depth. Maximum depth is 3");if(r>5&&!a.hasProgram(n.a.DeepscanV2.name))return void t.error("You cannot scan-analyze with that high of a depth. Maximum depth is 5");if(r>10)return void t.error("You cannot scan-analyze with that high of a depth. Maximum depth is 10");t.executeScanAnalyzeCommand(a,r,e)}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(26),r=a(98);function i(t,e,a,i,o){try{if(2!==o.length)return void t.error("Incorrect usage of scp command. Usage: scp [file] [destination hostname]");const e=t.getFilepath(o[0]+"");if(!e.endsWith(".lit")&&!Object(r.a)(e)&&!e.endsWith(".txt"))return void t.error("scp only works for scripts, text files (.txt), and literature files (.lit)");const s=Object(n.d)(o[1]+"");if(null==s)return void t.error(`Invalid destination. ${o[1]} not found`);if(e.endsWith(".lit")){let a=!1;for(let t=0;t1){t.error("Found several potential candidates:");for(const e of n)t.error(`${e.filename} ${e.args.join(" ")}`);return void t.error("Script arguments need to be specified.")}t.error(`No script named ${e} is running on the server`)}else if("number"==typeof l[0]){const e=Object(n.b)(l[0],s);if(null==e)return void t.error(`No script with PID ${l[0]} is running on the server`);o.b.emit(e)}}catch(e){t.error(e+"")}}},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(633),r=a(4);function i(t,e,a,i,o){if(0!==o.length)return void t.error("Incorrect usage of top command. Usage: top");const s=`Script${" ".repeat(40-"Script".length)}PID${" ".repeat(10-"PID".length)}Threads${" ".repeat(16-"Threads".length)}RAM Usage`;t.print(s);const l=i.runningScripts;for(let e=0;ea.hacking?t.error("Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill"):t.startWeaken(a):t.error("You do not have admin rights for this machine! Cannot weaken")}},function(t,e,a){"use strict";(function(t){a.d(e,"a",(function(){return r}));var n=a(98);function r(e,a,r,i,o){if(2!==o.length)return void e.error("Incorrect usage of wget command. Usage: wget [url] [target file]");const s=o[0]+"",l=e.getFilepath(o[1]+"");if(!Object(n.a)(l)&&!l.endsWith(".txt"))return e.error("wget failed: Invalid target file. Target file must be script or text file");t.get(s,(function(t){let a;return a=Object(n.a)(l)?i.writeToScriptFile(r,l,t):i.writeToTextFile(l,t),a.success?a.overwritten?e.print("wget successfully retrieved content and overwrote "+l):e.print("wget successfully retrieved content to new file "+l):e.error("wget failed")}),"text").fail((function(t){return e.error("wget failed: "+JSON.stringify(t))}))}}).call(this,a(811))},function(t,e,a){"use strict";a.d(e,"a",(function(){return i}));var n=a(2),r=a(106);function i(){!function(){if(n.a.exploits.includes(r.a.PrototypeTampering))return;setInterval((function(){"5.5e+1"!==55..toExponential()&&n.a.giveExploit(r.a.PrototypeTampering)}),9e5)}(),function(){if(n.a.exploits.includes(r.a.TimeCompression))return;let t=performance.now();window.setTimeout((function e(){const a=performance.now();a-t<500?n.a.giveExploit(r.a.TimeCompression):(t=a,window.setTimeout(e,15e3))}),15e3)}()}},function(t,e,a){"use strict";a.d(e,"a",(function(){return o}));var n=a(268),r=a(109),i=a(16);function o(){window.addEventListener("unhandledrejection",(function(t){if(Object(r.a)(t.reason)){const e=t.reason.split("|DELIMITER|"),a=e[1],n=e[2],r=e[3];let o=`UNCAUGHT PROMISE ERROR
You forgot to await a promise
${n}@${a}
`;o+="
",o+=r,Object(i.a)(o)}else if(t.reason instanceof n.a){const e=`UNCAUGHT PROMISE ERROR
You forgot to await a promise
${t.reason.name}@${t.reason.hostname}
Maybe hack / grow / weaken ?`;Object(i.a)(e)}}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,a){"use strict";a.r(e);var n=a(0),r=a.n(n),i=a(104),o=a.n(i),s=a(167),l=a(727),c=a(293);function f(){Object(s.c)(),o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root"))}Object(c.a)(),globalThis.React=r.a,globalThis.ReactDOM=o.a,o.a.render(r.a.createElement(s.a,null,r.a.createElement(l.a,null)),document.getElementById("root")),s.b.subscribe(f),location.href.startsWith("file://")||(window.onbeforeunload=function(){return"Your work will be lost."})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){},,function(t,e){},,,,,,,,,,,,function(t,e){},,function(t,e){},,,,,,,,,,,,,,,,,,,,,,,,,function(t,e){},,function(t,e){},function(t,e){},,,,,function(t,e){},,function(t,e){},,,,,,function(t,e){},,function(t,e){},,,,,,,,,,,,,,,,,,,function(t,e){},,,,,,,,,,,,function(t,e){},,,function(t,e){}]); //# sourceMappingURL=main.bundle.js.map \ No newline at end of file diff --git a/main.bundle.js.map b/main.bundle.js.map index ec73c040a..15cfa1f24 100644 --- a/main.bundle.js.map +++ b/main.bundle.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Player.ts","webpack:///./src/ui/numeralFormat.ts","webpack:///./src/Faction/data/FactionNames.ts","webpack:///./src/BitNode/BitNodeMultipliers.ts","webpack:///./src/Constants.ts","webpack:///./src/Settings/Settings.ts","webpack:///./src/Locations/data/LocationNames.ts","webpack:///./src/Netscript/RamCostGenerator.ts","webpack:///./src/Augmentation/data/AugmentationNames.ts","webpack:///./src/ui/React/DialogBox.tsx","webpack:///./src/Locations/data/CityNames.ts","webpack:///./src/ui/React/Money.tsx","webpack:///./src/utils/StringHelperFunctions.ts","webpack:///./src/utils/JSONReviver.ts","webpack:///./src/Server/AllServers.ts","webpack:///./src/ui/Router.ts","webpack:///./src/utils/helpers/keyCodes.ts","webpack:///./src/Faction/Factions.ts","webpack:///./src/ui/Context.ts","webpack:///./src/Company/data/companypositionnames.ts","webpack:///./src/utils/helpers/getRandomInt.ts","webpack:///./src/Corporation/data/Constants.ts","webpack:///./src/Hacknet/data/Constants.ts","webpack:///./src/Augmentation/Augmentation.tsx","webpack:///./src/ui/React/Modal.tsx","webpack:///./src/Bladeburner/data/ActionTypes.ts","webpack:///./src/ui/React/Table.tsx","webpack:///./src/InteractiveTutorial.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx","webpack:///./src/Server/Server.ts","webpack:///./src/Corporation/ui/Context.ts","webpack:///./src/Corporation/IndustryData.tsx","webpack:///./src/Locations/LocationTypeEnum.ts","webpack:///./src/Corporation/EmployeePositions.ts","webpack:///./src/Hacknet/HacknetHelpers.tsx","webpack:///./src/Augmentation/Augmentations.ts","webpack:///./src/Bladeburner/data/BlackOperationNames.ts","webpack:///./src/Bladeburner/data/Constants.ts","webpack:///./src/Literature/data/LiteratureNames.ts","webpack:///./src/Programs/Programs.ts","webpack:///./src/Company/Companies.ts","webpack:///./src/Corporation/Actions.ts","webpack:///./src/StockMarket/data/PositionTypes.ts","webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts","webpack:///./src/CotMG/FragmentType.ts","webpack:///./src/Gang/AllGangs.ts","webpack:///./src/SourceFile/SourceFileFlags.ts","webpack:///./src/Terminal/DirectoryHelpers.ts","webpack:///./src/Crime/Crimes.ts","webpack:///./src/Casino/utils.ts","webpack:///./src/Terminal.ts","webpack:///./src/Hacknet/HacknetServer.ts","webpack:///./src/Company/CompanyPositions.ts","webpack:///./src/ui/GameRoot.tsx","webpack:///./src/StockMarket/data/StockSymbols.ts","webpack:///./src/Script/isScriptFilename.ts","webpack:///./src/Hacking.ts","webpack:///./src/StockMarket/StockMarket.tsx","webpack:///./src/Server/data/SpecialServers.ts","webpack:///./src/Faction/FactionHelpers.tsx","webpack:///./src/Exploits/Exploit.ts","webpack:///./src/SaveObject.tsx","webpack:///./src/NetscriptEvaluator.ts","webpack:///./src/ui/React/MoneyRate.tsx","webpack:///./src/CodingContracts.ts","webpack:///./src/StockMarket/data/OrderTypes.ts","webpack:///./src/ui/React/Reputation.tsx","webpack:///./src/CotMG/Helper.tsx","webpack:///./src/DevMenu/ui/Adjuster.tsx","webpack:///./src/Corporation/data/BaseResearchTree.ts","webpack:///./src/utils/EventEmitter.ts","webpack:///./src/Server/ServerHelpers.ts","webpack:///./src/Infiltration/utils.ts","webpack:///./src/Bladeburner/data/SkillNames.ts","webpack:///./src/Bladeburner/BlackOperation.ts","webpack:///./src/Gang/ui/Context.ts","webpack:///./src/ui/React/Snackbar.tsx","webpack:///./src/Augmentation/AugmentationHelpers.tsx","webpack:///./src/Netscript/killWorkerScript.ts","webpack:///./src/Corporation/ui/MoneyCost.tsx","webpack:///./src/ui/React/StatsRow.tsx","webpack:///./src/utils/helpers/isString.ts","webpack:///./src/StockMarket/Stock.ts","webpack:///./src/Locations/Cities.ts","webpack:///./src/Alias.ts","webpack:///./src/Literature/Literature.ts","webpack:///./src/Themes/ui/Theme.tsx","webpack:///./src/ui/React/CopyableText.tsx","webpack:///./src/Corporation/MaterialSizes.ts","webpack:///./src/PersonObjects/formulas/skill.ts","webpack:///./src/Gang/data/upgrades.ts","webpack:///./src/ui/React/LogBoxManager.tsx","webpack:///./src/Netscript/WorkerScripts.ts","webpack:///./src/ui/React/StatsTable.tsx","webpack:///./src/Hacknet/formulas/HacknetServers.ts","webpack:///./src/Faction/FactionWorkTypeEnum.ts","webpack:///./src/ui/React/OptionSwitch.tsx","webpack:///./src/utils/helpers/createProgressBarText.ts","webpack:///./src/NetscriptWorker.ts","webpack:///./src/Corporation/Material.ts","webpack:///./src/Gang/formulas/formulas.ts","webpack:///./src/Faction/Faction.ts","webpack:///./src/Settings/SettingEnums.ts","webpack:///./src/Hacknet/formulas/HacknetNodes.ts","webpack:///./src/Casino/Game.tsx","webpack:///./src/CotMG/data/Shapes.ts","webpack:///./src/Infiltration/ui/KeyHandler.tsx","webpack:///./src/Infiltration/ui/GameTimer.tsx","webpack:///./src/Infiltration/ui/Difficulty.ts","webpack:///./src/Locations/Locations.ts","webpack:///./src/BitNode/BitNode.tsx","webpack:///./src/Hacknet/HacknetNode.ts","webpack:///./src/Server/ServerPurchases.ts","webpack:///./src/TextFile.ts","webpack:///./src/Bladeburner/Skills.ts","webpack:///./src/Gang/GangMemberUpgrades.ts","webpack:///./src/StockMarket/StockMarketHelpers.ts","webpack:///./src/StockMarket/StockMarketCosts.ts","webpack:///./src/Script/ScriptHelpers.ts","webpack:///./src/ui/React/Hashes.tsx","webpack:///./src/Bladeburner/Bladeburner.tsx","webpack:///./src/Company/Company.ts","webpack:///./src/Corporation/Warehouse.ts","webpack:///./src/Gang/GangMemberTasks.ts","webpack:///./src/Hacknet/HashUpgrades.ts","webpack:///./src/CotMG/Fragment.ts","webpack:///./src/PersonObjects/formulas/reputation.ts","webpack:///./src/StockMarket/BuyingAndSelling.tsx","webpack:///./src/Terminal/ITerminal.tsx","webpack:///./src/Bladeburner/Skill.ts","webpack:///./src/ui/React/ConfirmationModal.tsx","webpack:///./src/hash/hash.ts","webpack:///./src/Gang/data/Constants.ts","webpack:///./src/Script/Script.ts","webpack:///./src/utils/helpers/arrayToString.ts","webpack:///./src/DarkWeb/DarkWebItems.ts","webpack:///./src/Bladeburner/GeneralActions.tsx","webpack:///./src/Casino/CardDeck/Card.ts","webpack:///./src/Bladeburner/ActionIdentifier.ts","webpack:///./src/SourceFile/SourceFile.ts","webpack:///./src/PersonObjects/Person.ts","webpack:///./src/MathJaxWrapper.tsx","webpack:///./src/utils/helpers/exceptionAlert.ts","webpack:///./src/Message/MessageHelpers.ts","webpack:///./src/Netscript/WorkerScript.ts","webpack:///./src/Bladeburner/BlackOperations.tsx","webpack:///./src/Crime/Crime.ts","webpack:///./src/PersonObjects/formulas/intelligence.ts","webpack:///./src/Corporation/ResearchMap.ts","webpack:///./src/Locations/ui/ApplyToJobButton.tsx","webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts","webpack:///./src/Electron.tsx","webpack:///./src/Achievements/Achievements.ts","webpack:///./src/ui/React/CharacterOverview.tsx","webpack:///./src/Corporation/data/CorporationUnlockUpgrades.ts","webpack:///./src/RedPill.tsx","webpack:///./src/utils/helpers/addOffset.ts","webpack:///./src/DarkWeb/DarkWebItem.ts","webpack:///./src/Casino/RNG.ts","webpack:///./src/utils/helpers/compareArrays.ts","webpack:///./src/Corporation/IndustryUpgrades.ts","webpack:///./src/ui/React/Favor.tsx","webpack:///./src/PersonObjects/Sleeve/Sleeve.ts","webpack:///./src/Script/RamCalculationErrorCodes.ts","webpack:///./src/Terminal/TerminalEvents.ts","webpack:///./src/Message/Message.ts","webpack:///./src/StockMarket/OrderProcessing.tsx","webpack:///./src/Themes/Themes.ts","webpack:///./src/ui/React/AlertManager.tsx","webpack:///./src/utils/IPAddress.ts","webpack:///./src/Prestige.ts","webpack:///./src/db.tsx","webpack:///./src/Faction/formulas/favor.ts","webpack:///./src/ExportBonus.tsx","webpack:///./src/Bladeburner/Operation.ts","webpack:///./src/Server/data/servers.ts","webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts","webpack:///./src/Company/CompanyPosition.ts","webpack:///./src/SourceFile/SourceFiles.tsx","webpack:///./src/Script/RunningScript.ts","webpack:///./src/Bladeburner/ui/StartButton.tsx","webpack:///./src/utils/helpers/formatTime.ts","webpack:///./src/Faction/FactionInfo.tsx","webpack:///./src/Corporation/data/CorporationUpgrades.ts","webpack:///./src/Hacknet/HashManager.ts","webpack:///./src/CodingContractGenerator.ts","webpack:///./src/ui/InteractiveTutorial/ITutorialEvents.ts","webpack:///./src/Crime/CrimeHelpers.ts","webpack:///./src/Corporation/OfficeSpace.ts","webpack:///./src/utils/Validator.ts","webpack:///./src/utils/MoneySourceTracker.ts","webpack:///./src/ui/React/StatsProgressBar.tsx","webpack:///./src/Themes/Styles.ts","webpack:///./src/Hospital/Hospital.ts","webpack:///./src/ui/React/PromptManager.tsx","webpack:///./src/Corporation/Product.ts","webpack:///./src/Corporation/ui/Helpers.tsx","webpack:///./src/Programs/ui/ProgramsRoot.tsx","webpack:///./src/Faction/ui/FactionsRoot.tsx","webpack:///./src/ui/React/RecoveryRoot.tsx","webpack:///./src/NetworkShare/Share.tsx","webpack:///./src/Corporation/Corporation.tsx","webpack:///./src/ui/React/HashRate.tsx","webpack:///./src/Bladeburner/City.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.ts","webpack:///./src/Locations/City.ts","webpack:///./src/Faction/ui/Option.tsx","webpack:///./src/StockMarket/ui/StockTickersConfig.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts","webpack:///./src/Bladeburner/Action.tsx","webpack:///./src/ui/React/WorldMap.tsx","webpack:///./src/Bladeburner/ui/SuccessChance.tsx","webpack:///./src/ui/React/StaticModal.tsx","webpack:///./src/ui/React/CorruptableText.tsx","webpack:///./src/DarkWeb/DarkWeb.tsx","webpack:///./src/Hacking/netscriptCanHack.ts","webpack:///./src/PersonObjects/Grafting/GraftableAugmentation.ts","webpack:///./src/ui/React/ReputationRate.tsx","webpack:///./src/Terminal/Parser.ts","webpack:///./src/ui/React/CinematicText.tsx","webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.tsx","webpack:///./src/Augmentation/AugmentationCreator.tsx","webpack:///./src/Script/RamCalculations.ts","webpack:///./src/utils/helpers/roundToTwo.ts","webpack:///./src/Gang/Gang.ts","webpack:///./src/Netscript/Pid.ts","webpack:///./src/NetscriptFunctions.ts","webpack:///./src/StockMarket/PlayerInfluencing.ts","webpack:///./src/Company/GetJobRequirementText.ts","webpack:///./src/Terminal/HelpText.ts","webpack:///./src/utils/ErrorHelper.ts","webpack:///./src/utils/helpers/getRandomByte.ts","webpack:///./src/Bladeburner/data/Growths.ts","webpack:///./src/Locations/createCityMap.ts","webpack:///./src/Casino/CardDeck/Hand.ts","webpack:///./src/StockMarket/ui/StockTickerTxButton.tsx","webpack:///./src/Server/BaseServer.ts","webpack:///./src/ui/React/CodingContractModal.tsx","webpack:///./src/BitNode/ui/BitFlumeModal.tsx","webpack:///./src/PersonObjects/Player/PlayerObject.ts","webpack:///./src/Faction/ui/InvitationModal.tsx","webpack:///./src/Literature/LiteratureHelpers.ts","webpack:///./src/Gang/GangMemberTask.ts","webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts","webpack:///./src/Netscript/RecentScripts.ts","webpack:///./src/ThirdParty/JSInterpreter.js","webpack:///./src/Server/formulas/grow.ts","webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts","webpack:///./src/CotMG/StaneksGiftEvents.ts","webpack:///./src/PersonObjects/Grafting/ui/GraftingRoot.tsx","webpack:///./src/Terminal/commands/download.ts","webpack:///./src/ui/React/AugmentationAccordion.tsx","webpack:///./src/Bladeburner/data/Icons.tsx","webpack:///./src/Bladeburner/ui/ActionLevel.tsx","webpack:///./src/Bladeburner/ui/Autolevel.tsx","webpack:///./src/Bladeburner/ui/TeamSizeButton.tsx","webpack:///./src/Infiltration/ui/BlinkingCursor.tsx","webpack:///./src/ui/React/DeleteGameButton.tsx","webpack:///./src/ui/React/SoftResetButton.tsx","webpack:///./src/Themes/ui/ThemeEditorButton.tsx","webpack:///./src/Themes/ui/ThemeCollaborate.tsx","webpack:///./src/Themes/ui/StyleEditorButton.tsx","webpack:///./src/Locations/ui/TravelAgencyRoot.tsx","webpack:///./src/ScriptEditor/ui/ScriptEditorRoot.tsx","webpack:///./src/NetscriptJSEvaluator.ts","webpack:///./src/NetscriptFunctions/Flags.ts","webpack:///./src/NetscriptFunctions/toNative.ts","webpack:///./src/ui/React/TablePaginationActionsAll.tsx","webpack:///./src/CotMG/ui/Cell.tsx","webpack:///./src/Script/RunningScriptHelpers.ts","webpack:///./src/Terminal/commands/common/editor.ts","webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts","webpack:///./src/Bladeburner/Contract.ts","webpack:///./src/Bladeburner/data/Help.ts","webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.ts","webpack:///./src/Corporation/ResearchTree.ts","webpack:///./src/StockMarket/StockMarketConstants.ts","webpack:///./src/CotMG/data/Constants.ts","webpack:///./src/Company/GetNextCompanyPosition.ts","webpack:///./src/engine.tsx","webpack:///./src/Themes/data/index.ts","webpack:///./src/ui/LoadingScreen.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts","webpack:///./src/utils/helpers/isValidNumber.ts","webpack:///./src/StockMarket/Order.ts","webpack:///./src/CotMG/StaneksGift.ts","webpack:///./src/CotMG/ActiveFragment.ts","webpack:///./src/Locations/Location.ts","webpack:///./src/PersonObjects/Sleeve/ui/StatsElement.tsx","webpack:///./src/ui/React/ServerDropdown.tsx","webpack:///./src/Casino/Blackjack.tsx","webpack:///./src/Casino/CardDeck/ReactCard.tsx","webpack:///./src/Milestones/Milestones.ts","webpack:///./src/Faction/formulas/donation.ts","webpack:///./src/StockMarket/data/TickerHeaderFormatData.ts","webpack:///./src/Achievements/AchievementEntry.tsx","webpack:///./src/ThirdParty/colorUtils.ts","webpack:///./src/PersonObjects/formulas/work.ts","webpack:///./src/Themes/data/default/index.ts","webpack:///./src/Themes/data/default-lite/index.ts","webpack:///./src/Themes/data/monokai-ish/index.ts","webpack:///./src/Themes/data/warmer/index.ts","webpack:///./src/Themes/data/dark-plus/index.ts","webpack:///./src/Themes/data/mayukai-dark/index.ts","webpack:///./src/Themes/data/purple/index.ts","webpack:///./src/Themes/data/smooth-green/index.ts","webpack:///./src/Themes/data/dracula/index.ts","webpack:///./src/Themes/data/dark-blue/index.ts","webpack:///./src/Themes/data/discord-like/index.ts","webpack:///./src/Themes/data/one-dark/index.ts","webpack:///./src/Themes/data/muted-gold-blue/index.ts","webpack:///./src/Themes/data/light/index.ts","webpack:///./src/Themes/data/default/screenshot.png","webpack:///./src/Themes/data/default-lite/screenshot.png","webpack:///./src/Themes/data/monokai-ish/screenshot.png","webpack:///./src/Themes/data/warmer/screenshot.png","webpack:///./src/Themes/data/dark-plus/screenshot.png","webpack:///./src/Themes/data/mayukai-dark/screenshot.png","webpack:///./src/Themes/data/purple/screenshot.png","webpack:///./src/Themes/data/smooth-green/screenshot.png","webpack:///./src/Themes/data/dracula/screenshot.png","webpack:///./src/Themes/data/dark-blue/screenshot.png","webpack:///./src/Themes/data/discord-like/screenshot.png","webpack:///./src/Themes/data/one-dark/screenshot.png","webpack:///./src/Themes/data/muted-gold-blue/screenshot.png","webpack:///./src/Themes/data/light/screenshot.png","webpack:///./src/Terminal/Terminal.ts","webpack:///./src/data/codingcontracttypes.ts","webpack:///./src/utils/helpers/createRandomString.ts","webpack:///./src/Programs/Program.ts","webpack:///./src/Programs/data/ProgramsMetadata.ts","webpack:///./src/utils/helpers/isValidIPAddress.ts","webpack:///./src/PersonObjects/Grafting/EntropyAccumulation.ts","webpack:///./src/utils/helpers/getTimestamp.ts","webpack:///./src/NetworkShare/formulas/share.tsx","webpack:///./src/Corporation/CorporationState.ts","webpack:///./src/Literature/Literatures.ts","webpack:///./src/Gang/data/tasks.ts","webpack:///./src/Gang/GangMember.ts","webpack:///./src/Gang/GangMemberUpgrade.ts","webpack:///./src/Gang/data/power.ts","webpack:///./src/Company/data/CompaniesMetadata.ts","webpack:///./src/Corporation/Research.ts","webpack:///./src/Corporation/data/ResearchMetadata.ts","webpack:///./src/Hacknet/HashUpgrade.ts","webpack:///./src/Hacknet/data/HashUpgradesMetadata.tsx","webpack:///./src/Netscript/Environment.ts","webpack:///./src/utils/helpers/isPowerOfTwo.ts","webpack:///./src/StockMarket/data/InitStockMetadata.ts","webpack:///./src/NetscriptFunctions/Gang.ts","webpack:///./src/NetscriptFunctions/Sleeve.ts","webpack:///./src/NetscriptFunctions/Extra.ts","webpack:///./src/NetscriptFunctions/Hacknet.ts","webpack:///./src/NetscriptFunctions/Stanek.ts","webpack:///./src/CotMG/formulas/effect.ts","webpack:///./src/NetscriptFunctions/UserInterface.ts","webpack:///./src/NetscriptFunctions/Bladeburner.ts","webpack:///./src/NetscriptFunctions/CodingContract.ts","webpack:///./src/utils/helpers/is2DArray.ts","webpack:///./src/NetscriptFunctions/Corporation.ts","webpack:///./src/Corporation/Industry.ts","webpack:///./src/utils/calculateEffectWithFactors.ts","webpack:///./src/Corporation/Employee.ts","webpack:///./src/Corporation/ProductRatingWeights.ts","webpack:///./src/NetscriptFunctions/Formulas.ts","webpack:///./src/NetscriptFunctions/StockMarket.ts","webpack:///./src/NetscriptFunctions/Grafting.ts","webpack:///./src/Locations/data/LocationsMetadata.ts","webpack:///./src/utils/v1APIBreak.ts","webpack:///./src/ui/InteractiveTutorial/InteractiveTutorialRoot.tsx","webpack:///./src/ui/React/Overview.tsx","webpack:///./src/Sidebar/ui/SidebarRoot.tsx","webpack:///./src/Programs/ProgramHelpers.ts","webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx","webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx","webpack:///./src/Augmentation/ui/PlayerMultipliers.tsx","webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx","webpack:///./src/Augmentation/ui/SourceFiles.tsx","webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx","webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx","webpack:///./src/ui/React/SourceFileAccordion.tsx","webpack:///./src/DevMenu.tsx","webpack:///./src/DevMenu/ui/General.tsx","webpack:///./src/DevMenu/ui/Stats.tsx","webpack:///./src/DevMenu/ui/Factions.tsx","webpack:///./src/DevMenu/ui/Augmentations.tsx","webpack:///./src/DevMenu/ui/SourceFiles.tsx","webpack:///./src/DevMenu/ui/Programs.tsx","webpack:///./src/DevMenu/ui/Servers.tsx","webpack:///./src/DevMenu/ui/Companies.tsx","webpack:///./src/DevMenu/ui/Bladeburner.tsx","webpack:///./src/DevMenu/ui/Gang.tsx","webpack:///./src/DevMenu/ui/Corporation.tsx","webpack:///./src/DevMenu/ui/CodingContracts.tsx","webpack:///./src/DevMenu/ui/StockMarket.tsx","webpack:///./src/DevMenu/ui/Sleeves.tsx","webpack:///./src/DevMenu/ui/Stanek.tsx","webpack:///./src/DevMenu/ui/TimeSkip.tsx","webpack:///./src/DevMenu/ui/Achievements.tsx","webpack:///./src/DevMenu/ui/Entropy.tsx","webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx","webpack:///./src/Bladeburner/ui/Stats.tsx","webpack:///./src/Bladeburner/ui/TravelModal.tsx","webpack:///./src/Bladeburner/ui/Console.tsx","webpack:///./src/Bladeburner/ui/AllPages.tsx","webpack:///./src/Bladeburner/ui/GeneralActionPage.tsx","webpack:///./src/Bladeburner/ui/GeneralActionList.tsx","webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx","webpack:///./src/Bladeburner/data/GeneralActions.tsx","webpack:///./src/Bladeburner/ui/ContractPage.tsx","webpack:///./src/Bladeburner/ui/ContractList.tsx","webpack:///./src/Bladeburner/ui/ContractElem.tsx","webpack:///./src/Bladeburner/data/Contracts.tsx","webpack:///./src/Bladeburner/ui/StealthIcon.tsx","webpack:///./src/Bladeburner/ui/KillIcon.tsx","webpack:///./src/Bladeburner/ui/OperationPage.tsx","webpack:///./src/Bladeburner/ui/OperationList.tsx","webpack:///./src/Bladeburner/ui/OperationElem.tsx","webpack:///./src/Bladeburner/ui/TeamSizeModal.tsx","webpack:///./src/Bladeburner/data/Operations.tsx","webpack:///./src/Bladeburner/ui/BlackOpPage.tsx","webpack:///./src/Bladeburner/ui/BlackOpList.tsx","webpack:///./src/Bladeburner/ui/BlackOpElem.tsx","webpack:///./src/Bladeburner/data/BlackOperations.tsx","webpack:///./src/Bladeburner/ui/SkillPage.tsx","webpack:///./src/Bladeburner/ui/SkillList.tsx","webpack:///./src/Bladeburner/ui/SkillElem.tsx","webpack:///./src/Gang/ui/GangRoot.tsx","webpack:///./src/Gang/ui/ManagementSubpage.tsx","webpack:///./src/Gang/ui/GangStats.tsx","webpack:///./src/Gang/ui/BonusTime.tsx","webpack:///./src/Gang/ui/GangMemberList.tsx","webpack:///./src/Gang/ui/GangMemberCard.tsx","webpack:///./src/Gang/ui/GangMemberCardContent.tsx","webpack:///./src/Gang/ui/GangMemberStats.tsx","webpack:///./src/ui/React/KillScriptsModal.tsx","webpack:///./src/Gang/ui/TaskSelector.tsx","webpack:///./src/Gang/ui/TaskDescription.tsx","webpack:///./src/Gang/ui/AscensionModal.tsx","webpack:///./src/Gang/ui/RecruitButton.tsx","webpack:///./src/Gang/ui/RecruitModal.tsx","webpack:///./src/Gang/ui/TerritorySubpage.tsx","webpack:///./src/Gang/ui/TerritoryInfoModal.tsx","webpack:///./src/Gang/ui/EquipmentsSubpage.tsx","webpack:///./src/Corporation/ui/CorporationRoot.tsx","webpack:///./src/Corporation/ui/MainPanel.tsx","webpack:///./src/Corporation/ui/CityTabs.tsx","webpack:///./src/Corporation/ui/Industry.tsx","webpack:///./src/Corporation/ui/IndustryOffice.tsx","webpack:///./src/Corporation/ui/UpgradeOfficeSizeModal.tsx","webpack:///./src/Corporation/ui/ThrowPartyModal.tsx","webpack:///./src/Corporation/ui/IndustryOverview.tsx","webpack:///./src/Corporation/ui/MakeProductModal.tsx","webpack:///./src/Corporation/ui/ResearchModal.tsx","webpack:///./src/Corporation/ui/IndustryWarehouse.tsx","webpack:///./src/Corporation/ui/SmartSupplyModal.tsx","webpack:///./src/Corporation/ui/ProductElem.tsx","webpack:///./src/Corporation/ui/DiscontinueProductModal.tsx","webpack:///./src/Corporation/ui/LimitProductProductionModal.tsx","webpack:///./src/Corporation/ui/SellProductModal.tsx","webpack:///./src/Corporation/ui/ProductMarketTaModal.tsx","webpack:///./src/Corporation/ui/MaterialElem.tsx","webpack:///./src/Corporation/ui/ExportModal.tsx","webpack:///./src/Corporation/ui/MaterialMarketTaModal.tsx","webpack:///./src/Corporation/ui/SellMaterialModal.tsx","webpack:///./src/Corporation/ui/PurchaseMaterialModal.tsx","webpack:///./src/Corporation/ui/IndustryProductEquation.tsx","webpack:///./src/Corporation/ui/ExpandNewCity.tsx","webpack:///./src/Corporation/ui/ExpandIndustryTab.tsx","webpack:///./src/Corporation/ui/Overview.tsx","webpack:///./src/Corporation/ui/LevelableUpgrade.tsx","webpack:///./src/Corporation/ui/UnlockUpgrade.tsx","webpack:///./src/Corporation/ui/BribeFactionModal.tsx","webpack:///./src/Corporation/ui/SellSharesModal.tsx","webpack:///./src/Corporation/ui/BuybackSharesModal.tsx","webpack:///./src/Corporation/ui/IssueDividendsModal.tsx","webpack:///./src/Corporation/ui/IssueNewSharesModal.tsx","webpack:///./src/Corporation/ui/FindInvestorsModal.tsx","webpack:///./src/Corporation/ui/GoPublicModal.tsx","webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx","webpack:///./src/Infiltration/ui/Intro.tsx","webpack:///./src/Infiltration/ui/Game.tsx","webpack:///./src/Infiltration/ui/Countdown.tsx","webpack:///./src/Infiltration/ui/BracketGame.tsx","webpack:///./src/Infiltration/ui/SlashGame.tsx","webpack:///./src/Infiltration/ui/BackwardGame.tsx","webpack:///./src/Infiltration/ui/BribeGame.tsx","webpack:///./src/Infiltration/ui/CheatCodeGame.tsx","webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx","webpack:///./src/Infiltration/ui/MinesweeperGame.tsx","webpack:///./src/Infiltration/ui/WireCuttingGame.tsx","webpack:///./src/Infiltration/ui/Victory.tsx","webpack:///./src/ui/WorkInProgressRoot.tsx","webpack:///./src/ui/React/GameOptionsRoot.tsx","webpack:///./src/Diagnostic/FileDiagnosticModal.tsx","webpack:///./src/Themes/ui/ThemeEditorModal.tsx","webpack:///./src/Themes/ui/StyleEditorModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TravelModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreEarningsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx","webpack:///./src/PersonObjects/Sleeve/ui/FAQModal.tsx","webpack:///./src/Hacknet/ui/HacknetRoot.tsx","webpack:///./src/Hacknet/ui/GeneralInfo.tsx","webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx","webpack:///./src/Hacknet/ui/HacknetServerElem.tsx","webpack:///./src/Hacknet/ui/HashUpgradeModal.tsx","webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx","webpack:///./src/Hacknet/ui/MultiplierButtons.tsx","webpack:///./src/Hacknet/ui/PlayerInfo.tsx","webpack:///./src/Hacknet/ui/PurchaseButton.tsx","webpack:///./src/Locations/ui/GenericLocation.tsx","webpack:///./src/Locations/ui/CompanyLocation.tsx","webpack:///./src/Company/data/CompanyPositionsMetadata.ts","webpack:///./src/Company/ui/QuitJobModal.tsx","webpack:///./src/Locations/ui/GymLocation.tsx","webpack:///./src/Locations/ui/HospitalLocation.tsx","webpack:///./src/Locations/ui/SlumsLocation.tsx","webpack:///./src/Locations/ui/SpecialLocation.tsx","webpack:///./src/Corporation/ui/CreateCorporationModal.tsx","webpack:///./src/utils/helpers/N00dles.ts","webpack:///./src/Arcade/ui/ArcadeRoot.tsx","webpack:///./src/Arcade/ui/BBCabinet.tsx","webpack:///./src/Locations/ui/TechVendorLocation.tsx","webpack:///./src/Locations/ui/RamButton.tsx","webpack:///./src/Locations/ui/TorButton.tsx","webpack:///./src/Locations/LocationsHelpers.tsx","webpack:///./src/Locations/ui/CoresButton.tsx","webpack:///./src/Locations/ui/PurchaseServerModal.tsx","webpack:///./src/Locations/ui/TravelConfirmationModal.tsx","webpack:///./src/Locations/ui/UniversityLocation.tsx","webpack:///./src/Locations/ui/CasinoLocation.tsx","webpack:///./src/Casino/CardDeck/Deck.ts","webpack:///./src/Casino/CoinFlip.tsx","webpack:///./src/Casino/Roulette.tsx","webpack:///./src/Casino/SlotMachine.tsx","webpack:///./src/Locations/ui/City.tsx","webpack:///./src/ScriptEditor/ui/OptionsModal.tsx","webpack:///./src/ScriptEditor/ui/themes.ts","webpack:///./src/ScriptEditor/NetscriptDefinitions.d.ts","webpack:///./src/Milestones/ui/MilestonesRoot.tsx","webpack:///./src/Terminal/ui/TerminalRoot.tsx","webpack:///./src/Terminal/ui/TerminalInput.tsx","webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts","webpack:///./src/Terminal/DirectoryServerHelpers.ts","webpack:///./src/Script/ScriptUrl.ts","webpack:///./src/Terminal/tabCompletion.ts","webpack:///./src/Tutorial/ui/TutorialRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx","webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptAccordion.tsx","webpack:///./src/Faction/ui/FactionRoot.tsx","webpack:///./src/Faction/ui/AugmentationsPage.tsx","webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx","webpack:///./src/Faction/ui/PurchaseAugmentationModal.tsx","webpack:///./src/ui/React/Augmentation.tsx","webpack:///./src/Faction/ui/DonateOption.tsx","webpack:///./src/Faction/ui/Info.tsx","webpack:///./src/Faction/ui/CreateGangModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx","webpack:///./src/ui/CharacterStats.tsx","webpack:///./src/StockMarket/ui/StockMarketRoot.tsx","webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx","webpack:///./src/StockMarket/ui/StockTickers.tsx","webpack:///./src/StockMarket/ui/StockTicker.tsx","webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx","webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx","webpack:///./src/StockMarket/ui/StockTickerOrder.tsx","webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx","webpack:///./src/StockMarket/ui/PlaceOrderModal.tsx","webpack:///./src/BitNode/ui/BitverseRoot.tsx","webpack:///./src/BitNode/ui/PortalModal.tsx","webpack:///./src/ui/React/CinematicLine.tsx","webpack:///./src/CotMG/ui/StaneksGiftRoot.tsx","webpack:///./src/CotMG/ui/MainBoard.tsx","webpack:///./src/CotMG/ui/FragmentInspector.tsx","webpack:///./src/CotMG/ui/FragmentSelector.tsx","webpack:///./src/CotMG/ui/FragmentPreview.tsx","webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx","webpack:///./src/Exploits/Unclickable.tsx","webpack:///./src/Achievements/AchievementsRoot.tsx","webpack:///./src/Achievements/AchievementList.tsx","webpack:///./src/Achievements/AchievementIcon.tsx","webpack:///./src/ui/ErrorBoundary.tsx","webpack:///./src/Themes/ui/ThemeBrowser.tsx","webpack:///./src/Themes/ui/ThemeEntry.tsx","webpack:///./src/ui/React/ImportSaveRoot.tsx","webpack:///./src/ui/React/BypassWrapper.tsx","webpack:///./src/ui/Apr1.tsx","webpack:///./src/NetscriptFunctions/Singularity.ts","webpack:///./src/NetscriptPort.ts","webpack:///./src/utils/helpers/clearObject.ts","webpack:///./src/SourceFile/applySourceFile.ts","webpack:///./src/Exploits/applyExploits.ts","webpack:///./src/Terminal/commands/alias.ts","webpack:///./src/Terminal/commands/analyze.ts","webpack:///./src/Terminal/commands/backdoor.ts","webpack:///./src/Terminal/commands/buy.ts","webpack:///./src/Terminal/commands/cat.ts","webpack:///./src/Terminal/commands/cd.ts","webpack:///./src/Terminal/commands/check.ts","webpack:///./src/Terminal/commands/connect.ts","webpack:///./src/Terminal/commands/cp.ts","webpack:///./src/Terminal/commands/expr.ts","webpack:///./src/Terminal/commands/free.ts","webpack:///./src/Terminal/commands/grow.ts","webpack:///./src/Terminal/commands/hack.ts","webpack:///./src/Terminal/commands/help.ts","webpack:///./src/Terminal/commands/history.ts","webpack:///./src/Terminal/commands/home.ts","webpack:///./src/Terminal/commands/hostname.ts","webpack:///./src/Terminal/commands/kill.ts","webpack:///./src/Terminal/commands/killall.ts","webpack:///./src/Terminal/commands/ls.tsx","webpack:///./src/Terminal/commands/lscpu.ts","webpack:///./src/Terminal/commands/mem.ts","webpack:///./src/Terminal/commands/mv.ts","webpack:///./src/Terminal/commands/nano.ts","webpack:///./src/ScriptEditor/CursorPositions.ts","webpack:///./src/Terminal/commands/ps.ts","webpack:///./src/Terminal/commands/rm.ts","webpack:///./src/Terminal/commands/run.ts","webpack:///./src/Terminal/commands/runScript.ts","webpack:///./src/Terminal/commands/runProgram.ts","webpack:///./src/Terminal/commands/scan.ts","webpack:///./src/Terminal/commands/scananalyze.ts","webpack:///./src/Terminal/commands/scp.ts","webpack:///./src/Terminal/commands/sudov.ts","webpack:///./src/Terminal/commands/tail.ts","webpack:///./src/Terminal/commands/top.ts","webpack:///./src/Terminal/commands/unalias.ts","webpack:///./src/Terminal/commands/vim.ts","webpack:///./src/Terminal/commands/weaken.ts","webpack:///./src/Terminal/commands/wget.ts","webpack:///./src/Exploits/loops.ts","webpack:///./src/UncaughtPromiseHandler.ts","webpack:///./src/index.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Player","PlayerObject","loadPlayer","saveString","JSON","parse","Reviver","money","parseFloat","exploits","sanitizeExploits","extraFormats","extraNotations","gigaMultiplier","numeralWrapper","constructor","this","defaultLocale","updateLocale","numeral","locale","console","warn","format","Math","abs","answer","formatBigNumber","formatReallyBigNumber","decimalPlaces","nAbs","Infinity","repeat","str","formatHp","formatMoney","formatSkill","formatExp","formatHashes","formatReputation","formatFavor","formatSecurity","toFixed","formatRAM","Settings","UseIEC60027_2","formatPercentage","formatter","formatServerSecurity","formatRespect","formatWanted","formatMultiplier","formatSleeveShock","formatSleeveSynchro","formatSleeveMemory","formatPopulation","formatStamina","formatShares","formatInfiltrationSecurity","formatThreads","formatStaneksGiftHeat","formatStaneksGiftCharge","formatStaneksGiftPower","parseCustomLargeNumber","numericRegExp","RegExp","join","match","NaN","number","notation","notationIndex","indexOf","largestAbsoluteNumber","n1","n2","n3","isNaN","max","parseMoney","numeralValue","parsed","selfParsed","FactionNames","BitNodeMultipliers","HackingLevelMultiplier","StrengthLevelMultiplier","DefenseLevelMultiplier","DexterityLevelMultiplier","AgilityLevelMultiplier","CharismaLevelMultiplier","ServerGrowthRate","ServerMaxMoney","ServerStartingMoney","ServerStartingSecurity","ServerWeakenRate","HomeComputerRamCost","PurchasedServerCost","PurchasedServerSoftcap","PurchasedServerLimit","PurchasedServerMaxRam","CompanyWorkMoney","CrimeMoney","HacknetNodeMoney","ManualHackMoney","ScriptHackMoney","ScriptHackMoneyGain","CodingContractMoney","ClassGymExpGain","CompanyWorkExpGain","CrimeExpGain","FactionWorkExpGain","HackExpGain","FactionPassiveRepGain","FactionWorkRepGain","RepToDonateToFaction","AugmentationMoneyCost","AugmentationRepCost","InfiltrationMoney","InfiltrationRep","FourSigmaMarketDataCost","FourSigmaMarketDataApiCost","CorporationValuation","CorporationSoftCap","BladeburnerRank","BladeburnerSkillCost","GangSoftcap","GangUniqueAugs","DaedalusAugsRequirement","StaneksGiftPowerMultiplier","StaneksGiftExtraSize","WorldDaemonDifficulty","CONSTANTS","VersionString","VersionNumber","_idleSpeed","MaxSkillLevel","MilliPerCycle","CorpFactionRepRequirement","BaseCostFor1GBOfRamHome","BaseCostFor1GBOfRamServer","TravelCost","BaseFavorToDonate","DonateMoneyToRepDivisor","FactionReputationToFavorBase","FactionReputationToFavorMult","CompanyReputationToFavorBase","CompanyReputationToFavorMult","NeuroFluxGovernorLevelMult","NumNetscriptPorts","HomeComputerMaxRam","ServerBaseGrowthRate","ServerMaxGrowthRate","ServerFortifyAmount","ServerWeakenAmount","MultipleAugMultiplier","TorRouterCost","WSEAccountCost","TIXAPICost","MarketData4SCost","MarketDataTixApi4SCost","StockMarketCommission","HospitalCostPerHp","IntelligenceCrimeWeight","IntelligenceInfiltrationWeight","IntelligenceCrimeBaseExpGain","IntelligenceProgramBaseExpGain","IntelligenceGraftBaseExpGain","IntelligenceTerminalHackBaseExpGain","IntelligenceSingFnBaseExpGain","IntelligenceClassBaseExpGain","MillisecondsPer20Hours","GameCyclesPer20Hours","MillisecondsPer10Hours","GameCyclesPer10Hours","MillisecondsPer8Hours","GameCyclesPer8Hours","MillisecondsPer4Hours","GameCyclesPer4Hours","MillisecondsPer2Hours","GameCyclesPer2Hours","MillisecondsPerHour","GameCyclesPerHour","MillisecondsPerHalfHour","GameCyclesPerHalfHour","MillisecondsPerQuarterHour","GameCyclesPerQuarterHour","MillisecondsPerFiveMinutes","GameCyclesPerFiveMinutes","BaseFocusBonus","FactionWorkHacking","FactionWorkField","FactionWorkSecurity","WorkTypeCompany","WorkTypeCompanyPartTime","WorkTypeFaction","WorkTypeCreateProgram","WorkTypeStudyClass","WorkTypeCrime","WorkTypeGraftAugmentation","ClassStudyComputerScience","ClassDataStructures","ClassNetworks","ClassAlgorithms","ClassManagement","ClassLeadership","ClassGymStrength","ClassGymDefense","ClassGymDexterity","ClassGymAgility","ClassDataStructuresBaseCost","ClassNetworksBaseCost","ClassAlgorithmsBaseCost","ClassManagementBaseCost","ClassLeadershipBaseCost","ClassGymBaseCost","ClassStudyComputerScienceBaseExp","ClassDataStructuresBaseExp","ClassNetworksBaseExp","ClassAlgorithmsBaseExp","ClassManagementBaseExp","ClassLeadershipBaseExp","CrimeShoplift","CrimeRobStore","CrimeMug","CrimeLarceny","CrimeDrugs","CrimeBondForgery","CrimeTraffickArms","CrimeHomicide","CrimeGrandTheftAuto","CrimeKidnap","CrimeAssassination","CrimeHeist","CodingContractBaseFactionRepGain","CodingContractBaseCompanyRepGain","CodingContractBaseMoneyGain","AugmentationGraftingCostMult","AugmentationGraftingTimeBase","EntropyEffect","TotalNumBitNodes","LatestUpdate","defaultSettings","ActiveScriptsServerPageSize","ActiveScriptsScriptPageSize","AutosaveInterval","CodeInstructionRunTime","DisableASCIIArt","DisableHotkeys","DisableTextEffects","DisableOverviewProgressBars","EnableBashHotkeys","TimestampsFormat","Locale","MaxLogCapacity","MaxPortCapacity","MaxTerminalCapacity","SaveGameOnFileSave","SuppressBuyAugmentationConfirmation","SuppressFactionInvites","SuppressMessages","SuppressTravelConfirmation","SuppressBladeburnerPopup","SuppressTIXPopup","SuppressSavedGameToast","SuppressAutosaveDisabledWarnings","ExcludeRunningScriptsFromSave","IsSidebarOpened","theme","defaultTheme","styles","defaultStyles","overview","x","y","opened","OwnedAugmentationsOrder","OwnedAugmentationsOrderSetting","AcquirementTime","PurchaseAugmentationsOrder","PurchaseAugmentationsOrderSetting","Default","MonacoTheme","MonacoInsertSpaces","MonacoFontSize","MonacoVim","MonacoWordWrap","init","assign","load","save","LocationName","RamCostConstants","ScriptBaseRamCost","ScriptDomRamCost","ScriptCorporationRamCost","ScriptHackRamCost","ScriptHackAnalyzeRamCost","ScriptGrowRamCost","ScriptGrowthAnalyzeRamCost","ScriptWeakenRamCost","ScriptWeakenAnalyzeRamCost","ScriptScanRamCost","ScriptPortProgramRamCost","ScriptRunRamCost","ScriptExecRamCost","ScriptSpawnRamCost","ScriptScpRamCost","ScriptKillRamCost","ScriptHasRootAccessRamCost","ScriptGetHostnameRamCost","ScriptGetHackingLevelRamCost","ScriptGetMultipliersRamCost","ScriptGetServerRamCost","ScriptGetServerMaxRam","ScriptGetServerUsedRam","ScriptFileExistsRamCost","ScriptIsRunningRamCost","ScriptHacknetNodesRamCost","ScriptHNUpgLevelRamCost","ScriptHNUpgRamRamCost","ScriptHNUpgCoreRamCost","ScriptGetStockRamCost","ScriptBuySellStockRamCost","ScriptGetPurchaseServerRamCost","ScriptPurchaseServerRamCost","ScriptGetPurchasedServerLimit","ScriptGetPurchasedServerMaxRam","ScriptRoundRamCost","ScriptReadWriteRamCost","ScriptArbScriptRamCost","ScriptGetScriptRamCost","ScriptGetRunningScriptRamCost","ScriptGetHackTimeRamCost","ScriptGetFavorToDonate","ScriptCodingContractBaseRamCost","ScriptSleeveBaseRamCost","ScriptGetOwnedSourceFiles","ScriptSingularityFn1RamCost","ScriptSingularityFn2RamCost","ScriptSingularityFn3RamCost","ScriptGangApiBaseRamCost","ScriptBladeburnerApiBaseRamCost","ScriptStanekWidth","ScriptStanekHeight","ScriptStanekCharge","ScriptStanekFragmentDefinitions","ScriptStanekPlacedFragments","ScriptStanekClear","ScriptStanekCanPlace","ScriptStanekPlace","ScriptStanekFragmentAt","ScriptStanekDeleteAt","SF4Cost","cost","player","bitNodeN","sf4","sourceFileLvl","RamCosts","hacknet","numNodes","purchaseNode","getPurchaseNodeCost","getNodeStats","upgradeLevel","upgradeRam","upgradeCore","upgradeCache","getLevelUpgradeCost","getRamUpgradeCost","getCoreUpgradeCost","getCacheUpgradeCost","numHashes","hashCost","spendHashes","sprintf","vsprintf","scan","hack","hackAnalyzeThreads","hackAnalyze","hackAnalyzeSecurity","hackAnalyzeChance","sleep","asleep","share","getSharePower","grow","growthAnalyze","growthAnalyzeSecurity","weaken","weakenAnalyze","print","printf","tprint","clearLog","disableLog","enableLog","isLogEnabled","getScriptLogs","nuke","brutessh","ftpcrack","relaysmtp","httpworm","sqlinject","run","exec","spawn","kill","killall","exit","atExit","scp","ls","ps","hasRootAccess","getIp","getHostname","getHackingLevel","getHackingMultipliers","getHacknetMultipliers","getBitNodeMultipliers","getServer","getServerMoneyAvailable","getServerSecurityLevel","getServerBaseSecurityLevel","getServerMinSecurityLevel","getServerRequiredHackingLevel","getServerMaxMoney","getServerGrowth","getServerNumPortsRequired","getServerRam","getServerMaxRam","getServerUsedRam","serverExists","fileExists","isRunning","stock","getSymbols","getPrice","getAskPrice","getBidPrice","getPosition","getMaxShares","getPurchaseCost","getSaleGain","buy","sell","short","sellShort","placeOrder","cancelOrder","getOrders","getVolatility","getForecast","purchase4SMarketData","purchase4SMarketDataTixApi","purchaseWseAccount","purchaseTixApi","getPurchasedServerLimit","getPurchasedServerMaxRam","getPurchasedServerCost","purchaseServer","deleteServer","getPurchasedServers","write","tryWritePort","read","peek","clear","writePort","readPort","getPortHandle","rm","scriptRunning","scriptKill","getScriptName","getScriptRam","getHackTime","getGrowTime","getWeakenTime","getScriptIncome","getScriptExpGain","getRunningScript","nFormat","tFormat","getTimeSinceLastAug","prompt","wget","getFavorToDonate","getPlayer","mv","getOwnedSourceFiles","tail","toast","universityCourse","gymWorkout","travelToCity","goToLocation","purchaseTor","purchaseProgram","getCurrentServer","connect","manualHack","installBackdoor","getDarkwebProgramCost","getDarkwebPrograms","getStats","getCharacterInformation","hospitalize","isBusy","stopAction","upgradeHomeRam","upgradeHomeCores","getUpgradeHomeRamCost","getUpgradeHomeCoresCost","workForCompany","applyToCompany","getCompanyRep","getCompanyFavor","getCompanyFavorGain","checkFactionInvitations","joinFaction","workForFaction","getFactionRep","getFactionFavor","getFactionFavorGain","donateToFaction","createProgram","commitCrime","getCrimeChance","getCrimeStats","getOwnedAugmentations","getAugmentationsFromFaction","getAugmentationCost","getAugmentationPrereq","getAugmentationPrice","getAugmentationRepReq","getAugmentationStats","purchaseAugmentation","softReset","installAugmentations","isFocused","setFocus","gang","createGang","inGang","getMemberNames","getGangInformation","getOtherGangInformation","getMemberInformation","canRecruitMember","recruitMember","getTaskNames","getTaskStats","setMemberTask","getEquipmentNames","getEquipmentCost","getEquipmentType","getEquipmentStats","purchaseEquipment","ascendMember","getAscensionResult","setTerritoryWarfare","getChanceToWinClash","getBonusTime","bladeburner","getContractNames","getOperationNames","getBlackOpNames","getBlackOpRank","getGeneralActionNames","getSkillNames","startAction","stopBladeburnerAction","getCurrentAction","getActionTime","getActionEstimatedSuccessChance","getActionRepGain","getActionCountRemaining","getActionMaxLevel","getActionCurrentLevel","getActionAutolevel","setActionAutolevel","setActionLevel","getRank","getSkillPoints","getSkillLevel","getSkillUpgradeCost","upgradeSkill","getTeamSize","setTeamSize","getCityEstimatedPopulation","getCityCommunities","getCityChaos","getCity","switchCity","getStamina","joinBladeburnerFaction","joinBladeburnerDivision","codingcontract","attempt","getContractType","getData","getDescription","getNumTriesRemaining","sleeve","getNumSleeves","setToShockRecovery","setToSynchronize","setToCommitCrime","setToUniversityCourse","travel","setToCompanyWork","setToFactionWork","setToGymWorkout","getSleeveStats","getTask","getInformation","getSleeveAugmentations","getSleevePurchasableAugs","purchaseSleeveAug","stanek","giftWidth","giftHeight","chargeFragment","fragmentDefinitions","activeFragments","clearGift","canPlaceFragment","placeFragment","getFragment","removeFragment","ui","getTheme","setTheme","resetTheme","getStyles","setStyles","resetStyles","getGameInfo","grafting","getAugmentationGraftPrice","getAugmentationGraftTime","graftAugmentation","heart","break","getRamCost","args","curr","currType","AugmentationNames","dialogBoxCreate","txt","AlertEvents","emit","component","sx","dangerouslySetInnerHTML","__html","CityName","useStyles","makeStyles","createStyles","unbuyable","color","palette","action","disabled","colors","Money","props","classes","undefined","Error","canAfford","className","convertTimeMsToTimeElapsedString","time","showMilli","floor","totalSeconds","days","secondPerHours","secTruncDays","hours","secondPerMinute","secTruncHours","minutes","secTruncMinutes","milliTruncSec","res","longestCommonStart","strings","containsAllStrings","A","concat","sort","a1","a2","L","a","charAt","b","toUpperCase","substring","arr","every","isString","formatNumber","num","numFractionDigits","toLocaleString","maximumFractionDigits","minimumFractionDigits","generateRandomString","chars","random","cyrb53","seed","h1","h2","ch","charCodeAt","imul","toString","ctor","constructors","fromJSON","obj","validationData","validateObject","Generic_toJSON","ctorName","keys","index","Generic_fromJSON","AllServers","GetServer","server","isValidIPAddress","hostname","GetServerByHostname","ipserver","ip","GetServerByIP","GetAllServers","servers","DeleteServer","serverkey","ipExists","createUniqueRandomIp","createRandomIp","AddToAllServers","initForeignServers","homeComputer","networkLayers","propertiesToPatternMatch","toNumber","getRandomInt","min","metadata","serverMetadata","serverParams","numOpenPortsRequired","organizationName","maxRamExponent","maxRam","pow","prop","Server","filename","literature","messages","SpecialServers","WorldDaemon","requiredHackingSkill","networkLayer","linkNetworkLayers","network1","selectServer","server1","server2","serversOnNetwork","getRandomArrayItem","prestigeAllServers","member","loadAllServers","saveAllServers","excludeRunningScripts","TempAllServers","stringify","runningScripts","runningScriptObj","logs","Page","KEY","Factions","loadFactions","faction","getInfo","err","error","factionExists","initFactions","FactionInfos","resetFaction","Faction","newFactionObject","factionName","favor","AddToFactions","Context","React","createContext","Router","use","useContext","SoftwareCompanyPositions","ITCompanyPositions","SecurityEngineerCompanyPositions","NetworkEngineerCompanyPositions","BusinessCompanyPositions","SecurityCompanyPositions","AgentCompanyPositions","MiscCompanyPositions","SoftwareConsultantCompanyPositions","BusinessConsultantCompanyPositions","PartTimeCompanyPositions","lower","upper","AllCorporationStates","CorporationConstants","INITIALSHARES","SHARESPERPRICEUPDATE","IssueNewSharesCooldown","SellSharesCooldown","CyclesPerMarketCycle","CyclesPerIndustryStateCycle","SecsPerMarketCycle","Cities","Aevum","Chongqing","Sector12","NewTokyo","Ishima","Volhaven","WarehouseInitialCost","WarehouseInitialSize","WarehouseUpgradeBaseCost","OfficeInitialCost","OfficeInitialSize","OfficeUpgradeBaseCost","BribeThreshold","BribeToRepRatio","ProductProductionCostRatio","DividendMaxPercentage","EmployeeSalaryMultiplier","CyclesPerEmployeeRaise","EmployeeRaiseAmount","BaseMaxProducts","AllMaterials","FundingRoundShares","FundingRoundMultiplier","HacknetNodeConstants","MoneyGainPerLevel","BaseCost","LevelBaseCost","RamBaseCost","CoreBaseCost","PurchaseNextMult","UpgradeLevelMult","UpgradeRamMult","UpgradeCoreMult","MaxLevel","MaxRam","MaxCores","PurchaseMultipliers","x1","x5","x10","MAX","HacknetServerConstants","HashesPerLevel","CacheBaseCost","PurchaseMult","UpgradeCacheMult","MaxServers","MaxCache","Augmentation","params","info","moneyCost","repCost","factions","prereqs","baseRepRequirement","baseCost","startingCost","isSpecial","level","hacking_mult","mults","strength_mult","defense_mult","dexterity_mult","agility_mult","charisma_mult","hacking_exp_mult","strength_exp_mult","defense_exp_mult","dexterity_exp_mult","agility_exp_mult","charisma_exp_mult","hacking_chance_mult","hacking_speed_mult","hacking_money_mult","hacking_grow_mult","company_rep_mult","faction_rep_mult","crime_money_mult","crime_success_mult","work_money_mult","hacknet_node_money_mult","hacknet_node_purchase_cost_mult","hacknet_node_ram_cost_mult","hacknet_node_core_cost_mult","hacknet_node_level_cost_mult","bladeburner_max_stamina_mult","bladeburner_stamina_gain_mult","bladeburner_analysis_mult","bladeburner_success_chance_mult","stats","programs","startingMoney","f","decimals","desc","generateStatsDescription","addToFactions","factionList","augmentations","addToAllFactions","fac","facObj","special","toJSON","modal","display","alignItems","justifyContent","paper","backgroundColor","background","default","border","primary","main","boxShadow","dark","padding","maxWidth","maxHeight","overflow","scrollbarWidth","Modal","disableRestoreFocus","disableScrollLock","disableEnforceFocus","disableAutoFocus","open","onClose","closeAfterTransition","in","children","ActionTypes","Idle","Contract","Operation","BlackOp","BlackOperation","Training","Recruitment","FieldAnalysis","Diplomacy","root","borderBottom","small","width","TableCell","Table","iTutorialSteps","ITutorial","currStep","Start","stepIsDone","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalGoHome","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End","iTutorialStart","iTutorialNextStep","iTutorialEnd","ITutorialEvents","iTutorialPrevStep","getHomeComputer","LiteratureNames","HackersStartingHandbook","t_homeComp","safetlyCreateUniqueServer","adminRights","isConnectedTo","purchasedByPlayer","currentServer","Home","Programs","NukeProgram","prestigeAugmentation","numPeopleKilled","hacking","strength","defense","dexterity","agility","charisma","hacking_exp","strength_exp","defense_exp","dexterity_exp","agility_exp","charisma_exp","city","location","TravelAgency","companyName","jobs","purchasedServers","factionInvitations","queuedAugmentations","numSleeves","SourceFileFlags","sleevesFromCovenant","sleeves","Sleeve","shock","synchronize","shockRecovery","isWorking","currentWorkFactionName","currentWorkFactionDescription","createProgramName","crimeType","workHackExpGainRate","workStrExpGainRate","workDefExpGainRate","workDexExpGainRate","workAgiExpGainRate","workChaExpGainRate","workRepGainRate","workMoneyGainRate","workHackExpGained","workStrExpGained","workDefExpGained","workDexExpGained","workAgiExpGained","workChaExpGained","workRepGained","workMoneyGained","timeWorked","lastUpdate","Date","getTime","playtimeSinceLastAug","scriptProdSinceLastAug","moneySourceA","reset","hacknetNodes","hashManager","prestige","reapplyAllAugmentations","hp","max_hp","prestigeSourceFile","entropy","karma","sync","resetGangs","hasWseAccount","hasTixApiAccess","has4SData","has4SDataTixApi","corporation","moneySourceB","playtimeSinceLastBitnode","receiveInvite","includes","calculateSkill","exp","mult","calculateSkillF","calculateSkillProgress","calculateSkillProgressF","updateSkillLevels","intelligence","intelligence_exp","ratio","round","resetMultipliers","hasProgram","programName","home","toLowerCase","setMoney","gainMoney","source","recordMoneySource","loseMoney","amt","MoneySourceTracker","record","gainHackingExp","gainStrengthExp","gainDefenseExp","gainDexterityExp","gainAgilityExp","gainCharismaExp","gainIntelligenceExp","queryStatFromString","tempStr","resetWorkStatus","generalType","group","workType","factionWorkType","singularityStopWork","workMoneyLossRate","timeWorkedCreateProgram","timeWorkedGraftAugmentation","graftAugmentationName","processWorkEarnings","numCycles","focusBonus","hasAugmentation","focus","hackExpGain","strExpGain","defExpGain","dexExpGain","agiExpGain","chaExpGain","moneyGain","startWork","getWorkHackExpGain","getWorkStrExpGain","getWorkDefExpGain","getWorkDexExpGain","getWorkAgiExpGain","getWorkChaExpGain","getWorkRepGain","getWorkMoneyGain","timeNeededToCompleteWork","process","router","toFaction","createProgramWork","toTerminal","takeClass","toCity","toLocation","Locations","Slums","workPartTime","graftAugmentationWork","toGrafting","work","cancelationPenalty","find","specialName","backdoorInstalled","overMax","comp","Companies","influenceStockThroughCompanyWork","finishWork","cancelled","sing","penaltyString","playerReputation","content","reputation","startWorkPartTime","finishWorkPartTime","startFocusing","stopFocusing","startFactionWork","favorMult","startFactionHackWork","getHackingWorkRepGain","startFactionFieldWork","getFactionFieldWorkRepGain","startFactionSecurityWork","getFactionSecurityWorkRepGain","finishFactionWork","bn11Mult","company","companyPositionName","companyPosition","CompanyPositions","baseSalary","salaryMultiplier","hackingExpGain","expMultiplier","strengthExpGain","defenseExpGain","dexterityExpGain","agilityExpGain","charismaExpGain","jobPerformance","calculateJobPerformance","startCreateProgramWork","reqLevel","createProgramReqLvl","programFile","startsWith","endsWith","split","percComplete","Number","reqLvl","skillMult","getIntelligenceBonus","finishCreateProgramWork","incompleteName","startGraftAugmentationWork","augmentationName","craftAugmentationWork","NeuroreceptorManager","finishGraftAugmentationWork","augName","applyAugmentation","Augmentations","applyEntropy","startClass","costMult","expMult","workCostMult","workExpMult","earnings","calculateClassEarnings","finishClass","startCrime","hackExp","strExp","defExp","dexExp","agiExp","chaExp","workerscript","committingCrimeThruSingFn","singFnCrimeWorkerScript","toWork","finishCrime","determineCrimeSuccess","crime","Crimes","type","kills","ws","disableLogs","ALL","scriptRef","log","takeDamage","regenerateHp","getHospitalizationCost","SnackbarEvents","applyForJob","entryPosType","currCompany","currPositionName","Company","pos","isQualified","reqText","getJobRequirementText","hasPosition","newPos","getNextCompanyPositionHelper","nextPos","getNextCompanyPosition","currentPositionName","currentPosition","isSoftwareJob","isITJob","isBusinessJob","isSecurityEngineerJob","isNetworkEngineerJob","isSecurityJob","isAgentJob","isSoftwareConsultantJob","isBusinessConsultantJob","isPartTimeJob","quitJob","hasJob","Boolean","applyForSoftwareJob","posNames","applyForSoftwareConsultantJob","applyForItJob","applyForSecurityEngineerJob","applyForNetworkEngineerJob","applyForBusinessJob","applyForBusinessConsultantJob","applyForSecurityJob","applyForAgentJob","applyForEmployeeJob","position","applyForPartTimeEmployeeJob","applyForWaiterJob","applyForPartTimeWaiterJob","offset","jobStatReqOffset","reqHacking","requiredHacking","reqStrength","requiredStrength","reqDefense","requiredDefense","reqDexterity","requiredDexterity","reqAgility","reqCharisma","requiredCharisma","requiredReputation","playerAug","aug","owned","NeuroFluxGovernor","reapplyAllSourceFiles","sourceFiles","srcFileKey","SourceFiles","applySourceFile","applyExploit","checkForFactionInvitations","invitedFactions","numAugmentations","allCompanies","allPositions","values","checkMegacorpRequirements","repNeeded","illuminatiFac","Illuminati","isBanned","isMember","alreadyInvited","daedalusFac","Daedalus","covenantFac","TheCovenant","ecorpFac","ECorp","AevumECorp","megacorpFac","MegaCorp","Sector12MegaCorp","bachmanandassociatesFac","BachmanAssociates","AevumBachmanAndAssociates","bladeindustriesFac","BladeIndustries","Sector12BladeIndustries","nwoFac","NWO","VolhavenNWO","clarkeincorporatedFac","ClarkeIncorporated","AevumClarkeIncorporated","omnitekincorporatedFac","OmniTekIncorporated","VolhavenOmniTekIncorporated","foursigmaFac","FourSigma","Sector12FourSigma","kuaigonginternationalFac","KuaiGongInternational","ChongqingKuaiGongInternational","fulcrumsecrettechonologiesFac","FulcrumSecretTechnologies","fulcrumSecretServer","AevumFulcrumTechnologies","bitrunnersFac","BitRunners","bitrunnersServer","BitRunnersServer","theblackhandFac","TheBlackHand","blackhandServer","TheBlackHandServer","nitesecFac","NiteSec","nitesecServer","NiteSecServer","chongqingFac","sector12Fac","newtokyoFac","aevumFac","ishimaFac","volhavenFac","speakersforthedeadFac","SpeakersForTheDead","Sector12CIA","Sector12NSA","thedarkarmyFac","TheDarkArmy","thesyndicateFac","TheSyndicate","silhouetteFac","Silhouette","tetradsFac","Tetrads","slumsnakesFac","SlumSnakes","netburnersFac","Netburners","totalHacknetRam","totalHacknetCores","totalHacknetLevels","v","hserver","HacknetServer","cores","ram","tiandihuiFac","TianDiHui","cybersecFac","CyberSec","cybersecServer","CyberSecServer","setBitNodeNumber","queueAugmentation","PlayerOwnedAugmentation","gainCodingContractReward","reward","difficulty","CodingContractRewardType","FactionReputation","FactionReputationAll","repGain","totalGain","specialFactions","Bladeburners","filter","gainPerFaction","facName","CompanyReputation","to","gotoLocation","canAccessGrafting","giveExploit","exploit","giveAchievement","achievementId","achievement","achievements","map","ID","unlockedOn","Name","weight","calculateIntelligenceBonus","getCasinoWinnings","casino","getMult","setMult","canAccessCotMG","sf","lvl","BaseServer","super","createRandomString","moneyAvailable","moneyMax","hackDifficulty","baseDifficulty","minDifficulty","serverGrowth","capDifficulty","changeMinimumSecurity","perc","changeMaximumMoney","aboveCap","fortify","Corporation","Division","useCorporation","useDivision","Industries","Energy","Utilities","Agriculture","Fishing","Mining","Food","Tobacco","Chemical","Pharmaceutical","Computer","Robotics","Software","Healthcare","RealEstate","IndustryStartingCosts","IndustryDescriptions","corp","IndustryResearchTrees","getBaseResearchTreeCopy","getProductIndustryResearchTreeCopy","resetIndustryResearchTrees","LocationType","EmployeePositions","Operations","Engineer","Business","Management","RandD","Unassigned","hasHacknetServers","purchaseHacknet","numOwned","getCostOfNextHacknetServer","createHacknetServer","updateHashManagerCapacity","getCostOfNextHacknetNode","node","HacknetNode","hasMaxNumberHacknetServers","calculateNodeCost","calculateServerCost","getMaxNumberLevelUpgrades","nodeObj","maxLevel","calculateLevelUpgradeCost","levelsToMax","getMaxNumberRamUpgrades","calculateRamUpgradeCost","log2","getMaxNumberCoreUpgrades","calculateCoreUpgradeCost","getMaxNumberCacheUpgrades","calculateCacheUpgradeCost","cache","purchaseLevelUpgrade","levels","sanitizedLevels","isServer","purchaseRamUpgrade","purchaseCoreUpgrade","purchaseCacheUpgrade","processHacknetEarnings","HashManager","hashes","updateHashRate","h","wastedHashes","storeHashes","upgrade","HashUpgrades","multiplier","processAllHacknetServerEarnings","total","processSingleHacknetNodeEarnings","processAllHacknetNodeEarnings","totalEarnings","nodes","updateCapacity","hashCapacity","purchaseHashUpgrade","upgName","upgTarget","upg","refundUpgrade","funds","target","e","division","divisions","sciResearch","qty","changeRank","skillPoints","generateRandomContract","BlackOperationNames","BladeburnerConstants","CityNames","CyclesPerSecond","StaminaGainPerSecond","BaseStaminaLoss","MaxStaminaToGainFactor","DifficultyToTimeFactor","DiffMultExponentialFactor","DiffMultLinearFactor","EffAgiLinearFactor","EffDexLinearFactor","EffAgiExponentialFactor","EffDexExponentialFactor","BaseRecruitmentTimeNeeded","PopulationThreshold","PopulationExponent","ChaosThreshold","BaseStatGain","BaseIntGain","ActionCountGrowthPeriod","RankToFactionRepFactor","RankNeededForFaction","ContractSuccessesPerLevel","OperationSuccessesPerLevel","RanksPerSkillPoint","ContractBaseMoneyGain","HrcHpGain","HrcStaminaGain","CorporationManagementHandbook","HistoryOfSynthoids","AGreenTomorrow","AlphaOmega","SimulatedReality","BeyondMan","BrighterThanTheSun","DemocracyIsDead","Sector12Crime","ManAndMachine","SecretSocieties","TheFailedFrontier","CodedIntelligence","SyntheticMuscles","TensionsInTechRace","CostOfImmortality","TheHiddenWorld","TheNewGod","NewTriads","TheSecretWar","programsMetadata","Program","initCompanies","oldCompanies","companiesMetadata","forEach","loadCompanies","NewIndustry","industry","Industry","NewCity","offices","OfficeSpace","loc","size","UnlockUpgrade","unlockUpgrades","unlock","LevelUpgrade","priceMult","upgrades","IssueDividends","percent","dividendPercentage","SellMaterial","mat","price","replace","temp","bCost","eval","sCost","q","tempQty","maxsll","prd","sllman","SellProduct","product","all","cities","tempCity","SetSmartSupply","warehouse","smartSupply","smartSupplyEnabled","SetSmartSupplyUseLeftovers","material","useLeftover","smartSupplyUseLeftovers","BuyMaterial","BulkPurchase","matSize","MaterialSizes","maxAmount","sizeUsed","SellShares","numShares","public","shareSaleCooldown","stockSaleResults","calculateShareSale","profit","newSharePrice","newSharesUntilUpdate","issuedShares","sharePrice","shareSalesUntilPriceUpdate","BuyBackShares","buybackPrice","AssignJob","employee","job","UpgradeOfficeSize","office","initialPriceMult","ThrowParty","costPerEmployee","totalCost","employees","throwParty","PurchaseWarehouse","warehouses","Warehouse","UpgradeWarehouse","sizeUpgradeCost","updateSize","BuyCoffee","IndustryUpgrades","HireAdVert","MakeProduct","productName","designInvest","marketingInvest","makesProducts","maxProducts","hasResearch","products","Product","createCity","designCost","advCost","Research","researchName","researchTree","getAllNodes","research","ResearchMap","researched","ExportMaterial","divisionName","cityName","sanitizedAmt","isRelevantMaterial","exportObj","ind","CancelExportMaterial","LimitProductProduction","prdman","SetMaterialMarketTA1","on","marketTa1","SetMaterialMarketTA2","marketTa2","SetProductMarketTA1","SetProductMarketTA2","PositionTypes","SleeveTaskType","FragmentType","Effect","tpe","HackingChance","HackingSpeed","HackingMoney","HackingGrow","Hacking","Strength","Defense","Dexterity","Agility","Charisma","HacknetMoney","HacknetCost","Rep","WorkMoney","Crime","Bladeburner","AllGangs","power","territory","loadAllGangs","Array","updateSourceFileFlags","removeLeadingSlash","removeTrailingSlash","isValidFilename","isValidDirectoryName","isValidDirectoryPath","path","t_path","dirs","dir","isValidFilePath","fnSeparator","lastIndexOf","fn","getFirstParentDirectory","getAllParentDirectories","lastSlash","getDestinationFilepath","destination","cwd","dstDir","evaluateDirectoryPath","fileName","getFileName","isInRootDirectory","currPath","reconstructedPath","pop","evaluateFilePath","areFilesEqual","f0","f1","areImportsEquals","Shoplift","dexterity_success_weight","agility_success_weight","RobStore","hacking_success_weight","Mug","strength_success_weight","defense_success_weight","Larceny","DealDrugs","charisma_success_weight","BondForgery","TraffickArms","Homicide","GrandTheftAuto","Kidnap","Assassination","Heist","trusted","event","isTrusted","Terminal","TTerminal","updateHashCapacity","seconds","onlineTimeSeconds","hashRate","totalHashesGenerated","prodMult","cpuCores","runScript","script","updateRamUsed","calculateHashGainRate","ramUsed","companyPositionMetadata","CompanyPosition","htmlLocation","margin","spacing","flexGrow","minHeight","boxSizing","uninitialized","isInitialized","page","allowRouting","toActiveScripts","toAugmentations","toBitVerse","toBladeburner","toStats","toCorporation","toCreateProgram","toDevMenu","toFactions","toGameOptions","toGang","toHacknetNodes","toInfiltration","toJob","toMilestones","toScriptEditor","toSleeves","toStockMarket","toTravel","toTutorial","toBladeburnerCinematic","toStaneksGift","toAchievements","toThemeBrowser","toImportSave","GameRoot","engine","terminal","files","vim","setEditorOptions","useState","setPage","RecoveryMode","Recovery","Work","determineStartPage","setRerender","augPage","setAugPage","setFaction","flume","setFlume","quick","setQuick","setLocation","Infiltration","Location","Job","cinematicText","setCinematicText","errorBoundaryKey","setErrorBoundaryKey","sidebarOpened","setSideBarOpened","importString","setImportString","importAutomatic","setImportAutomatic","ImportSave","allowRoutingCalls","setAllowRoutingCalls","rerender","old","killAllScripts","saveObject","saveGame","setTimeout","reload","useEffect","subscribe","ActiveScripts","Stats","CreateProgram","DevMenu","Options","Gang","Hacknet","Milestones","Grafting","options","ScriptEditor","Sleeves","StockMarket","Tutorial","City","Travel","calculateAchievements","BitVerse","BladeburnerCinematic","StaneksGift","Achievements","ThemeBrowser","base64save","automatic","_functions","fnName","_wrap","func","scrollTo","mainPage","withSidebar","withPopups","bypassGame","enter","enterBitNode","staneksGift","workerScripts","reactivateTutorial","buyStockLong","buyStock","buyStockShort","shortStock","eventEmitterForReset","eventEmitterForUiReset","initStockMarket","initStockMarketFnForReact","sellStockLong","sellStock","sellStockShort","stockMarket","export","onExport","exportGame","forceKill","exportGameFn","installAugmentationsFn","Provider","killScripts","flexDirection","onToggled","isOpened","StockSymbols","IshimaStormTechnologies","NewTokyoDefComm","VolhavenHeliosLabs","NewTokyoVitaLife","Sector12IcarusMicrosystems","Sector12UniversalEnergy","AevumAeroCorp","VolhavenOmniaCybersystems","ChongqingSolarisSpaceSystems","NewTokyoGlobalPharmaceuticals","IshimaNovaMedical","AevumWatchdogSecurity","VolhavenLexoCorp","AevumRhoConstruction","Sector12AlphaEnterprises","VolhavenSysCoreSecurities","VolhavenCompuTek","AevumNetLinkTechnologies","IshimaOmegaSoftware","Sector12FoodNStuff","Sector12JoesGuns","validScriptExtensions","isScriptFilename","some","ext","calculateHackingChance","difficultyMult","chance","calculateHackingExpGain","expGain","calculatePercentMoneyHacked","percentMoneyHacked","calculateHackingTime","skillFactor","calculateGrowTime","calculateWeakenTime","Orders","storedCycles","ticksUntilCycle","SymbolToStockMap","shares","workerScript","Stock","order","Order","symbol","orders","stk","processOrderRefs","symbolToStockMap","processOrders","stockOrders","stockSymbol","orderTxt","loadStockMarket","deleteStockMarket","InitStockMetadata","TicksPerCycle","initSymbolToStockMap","cyclesPerStockUpdate","processStockPrices","timeNow","flipForecastForecast","stockMarketCycle","av","chc","otlkMag","cap","changePrice","OrderTypes","LimitBuy","Short","LimitSell","Long","StopBuy","StopSell","otlkMagChange","cycleForecast","cycleForecastForecast","shareTxUntilMovement","shareTxForMovement","EventEmitter","TheDarkArmyServer","DaedalusServer","DarkWeb","inviteToFaction","InvitationEvent","allFactions","factionInfo","enemy","enemies","hasAugmentationPrereqs","hasPrereqs","prereqAug","augmentationPriceMult","queuedAugmentation","getNextNeurofluxLevel","nextLevel","currLevel","processPassiveFactionRepGain","offersWork","getGangName","hRep","sRep","fRep","rate","getFactionAugmentationsFiltered","hasGangWith","augs","blacklist","TheRedPill","rng","SFC32RNG","uniqueFilter","Exploit","names","Bypass","EditSaveFile","PrototypeTampering","TimeCompression","Unclickable","UndocumentedFunctionCall","RealityAlteration","N00dles","YoureNotMeantToAccessThis","TrueRecursion","INeedARainbow","ExploitName","Set","BitburnerSaveObject","getSaveString","PlayerSave","AllServersSave","CompaniesSave","FactionsSave","AliasesSave","Aliases","GlobalAliasesSave","GlobalAliases","MessagesSave","Messages","StockMarketSave","SettingsSave","VersionSave","LastExportBonus","ExportBonus","StaneksGiftSave","AllGangsSave","btoa","unescape","encodeURIComponent","emitToastEvent","savedOn","lastSave","Promise","resolve","reject","then","saveData","playerIdentifier","identifier","getSaveFileName","pushGameSaved","catch","isRecovery","epochTime","now","bn","download","importGame","base64Save","getImportStringFromFile","file","reader","FileReader","promise","onload","readAsText","newSave","parsedSave","atob","trim","base64","importedPlayer","playerData","totalPlaytime","reduce","current","bitNode","bitNodeLevel","loadGame","navigator","userAgent","setInterval","decodeURIComponent","escape","saveObj","loadStaneksGift","loadAliases","loadGlobalAliases","loadMessages","initMessages","ver","anyPlayer","positionName","companyPositions","changes","convert","code","change","scripts","v1APIBreak","nf","revenue","expenses","lastCycleRevenue","lastCycleExpenses","thisCycleRevenue","thisCycleExpenses","augmentation","resleeves","evaluateVersionCompatibility","href","resets","createNewUpdateText","whiteSpace","paddingLeft","lineHeight","Blob","msSaveOrOpenBlob","document","createElement","url","URL","createObjectURL","body","appendChild","click","removeChild","revokeObjectURL","netscriptDelay","delayReject","delay","env","stopFlag","makeRuntimeRejectMsg","msg","scriptUrl","dependencies","resolveNetscriptRequestedThreads","functionName","requestedThreads","threads","requestedThreadsAsInt","isScriptErrorMessage","MoneyRate","CodingContractType","gen","solver","diff","numTries","generate","CodingContractTypes","md","codingContractTypesMetadata","CodingContractResult","CodingContract","getDifficulty","getMaxNumTries","getType","isSolution","solution","Cancelled","onAttempt","val","Success","Failure","CodingContractEvent","rep","Reputation","Adjuster","setValue","label","placeholder","add","subtract","tons","onChange","InputProps","startAdornment","title","onClick","style","transform","endAdornment","makeNode","Node","text","createBaseResearchTreeNodes","rootNode","autoBrew","autoParty","autoDrugs","bulkPurchasing","cph4","drones","dronesAssembly","dronesTransport","goJuice","hrRecruitment","hrTraining","joywire","marketta1","marketta2","overclock","scAssemblers","stimu","addChild","baseResearchTree","ResearchTree","setRoot","upgradeFulcrum","upgradeCapacity1","upgradeCapacity2","upgradeDashboard","uuidv4","uuid","subscribers","sub","numCycleForGrowth","growth","ajdGrowthRate","serverGrowthPercentage","coreBonus","numCycleForGrowthCorrected","targetMoney","startMoney","adjGrowthRate","exponentialBase","coreMultiplier","threadMultiplier","w","ey","cycles","bt","corr","bct","opc","fca","cca","ceil","processSingleServerGrowth","calculateServerGrowth","oldMoneyAvailable","isValidNumber","usedCycles","prestigeHomeComputer","homeComp","hasBitflume","BitFlume","updateRamUsage","getServerOnNetwork","isBackdoorInstalled","upArrowSymbol","downArrowSymbol","leftArrowSymbol","rightArrowSymbol","getArrow","UP_ARROW","W","LEFT_ARROW","DOWN_ARROW","S","RIGHT_ARROW","D","SkillNames","BladesIntuition","Cloak","Marksman","WeaponProficiency","ShortCircuit","DigitalObserver","Tracer","Overclock","Reaper","EvasiveSystem","Datamancer","CybersEdge","HandsOfMidas","Hyperdrive","count","getActionTimePenalty","getChaosCompetencePenalty","getChaosDifficultyBonus","useGang","snackbar","zIndex","logBoxBaseZIndex","alignSelf","SnackbarProvider","dense","maxSnack","anchorOrigin","horizontal","vertical","autoHideDuration","containerRoot","Snackbar","enqueueSnackbar","closeSnackbar","useSnackbar","variant","duration","id","severity","k","initAugmentations","resetFactionAugmentations","clearObject","initNeuroFluxGovernor","initUnstableCircadianModulator","generalAugmentations","bladeburnerAugmentations","ChurchOfTheMachineGod","churchOfTheMachineGodAugmentations","resetAugmentation","augmentationToUpdate","updateNeuroFluxGovernorCosts","getGenericAugmentationPriceMultiplier","updateAugmentationCosts","getBaseAugmentationPriceMultiplier","neuroFluxGovernorAugmentation","getNextNeuroFluxLevel","augmentationExists","AddToAugmentations","reapply","augObj","ownedAug","augmentationList","nfgIndex","isRepeatableAug","killWorkerScript","rerenderUi","WorkerScript","stopAndCleanUpWorkerScript","RunningScript","killWorkerScriptByPid","pid","compareArrays","clearTimeout","killNetscriptDelay","runningScript","rs","ramUsage","delete","AddRecentScript","WorkerScriptStartStopEventEmitter","removeWorkerScript","MoneyCost","StatsRow","cellNone","align","String","defaultConstructorParams","initPrice","marketCap","spreadPerc","range","divisor","lastPrice","playerShares","playerAvgPx","playerShortShares","playerAvgShortPx","otlkMagForecast","getAbsoluteForecast","totalSharesUnrounded","totalShares","maxShares","changeForecastForecast","newff","newPrice","changeAmt","increaseChance","getForecastIncreaseChance","influenceForecast","influenceForecastForecast","printAliases","parseAliasDeclaration","dec","global","matches","addGlobalAlias","addAlias","getAlias","getGlobalAlias","removeAlias","substituteAliases","origCommand","commandArray","somethingSubstituted","depth","alias","Literature","ThemeEvents","refreshTheme","createTheme","combat","cha","int","backgroundprimary","backgroundsecondary","button","successlight","success","successdark","white","black","light","primarylight","primarydark","secondary","secondarylight","secondarydark","errorlight","errordark","infolight","infodark","warning","warninglight","warningdark","well","typography","fontFamily","textTransform","components","MuiInputBase","styleOverrides","input","userSelect","MuiInput","borderBottomColor","underline","MuiInputLabel","MuiButtonGroup","marginRight","MuiButton","borderRadius","MuiSelect","icon","defaultProps","MuiTextField","MuiTypography","MuiMenu","list","MuiMenuItem","MuiAccordionSummary","MuiAccordionDetails","MuiIconButton","MuiTooltip","tooltip","fontSize","disableInteractive","MuiSlider","valueLabel","MuiDrawer","paperAnchorDockedLeft","borderRight","welllight","MuiDivider","MuiFormControlLabel","MuiSwitch","switchBase","track","MuiPaper","MuiTablePagination","select","selectLabel","displayedRows","MuiTab","textColorPrimary","MuiTabs","scrollButtons","opacity","TabIndicatorProps","MuiAlert","standardSuccess","standardError","standardWarning","standardInfo","TTheme","injectFirst","CopyableText","setOpen","copyText","setSelectionRange","execCommand","Water","Plants","Metal","Hardware","Chemicals","Drugs","Robots","AICores","calculateExp","skill","currentSkill","nextSkill","baseExperience","nextExperience","progress","currentExperience","remainingExperience","experience","UpgradeType","gangMemberUpgradesMetadata","def","upgType","Weapon","dex","agi","Armor","Vehicle","Rootkit","layerCounter","LogBoxEvents","LogBoxClearEvents","LogBoxManager","LogWindow","close","visibility","overflowY","overflowX","draggableRef","useRef","rootRef","setScript","container","minimized","setMinimized","updateLayer","full","maxLength","clearInterval","addEventListener","onResize","removeEventListener","debounce","isOnScreen","resetPosition","bounds","getBoundingClientRect","right","bottom","left","innerWidth","top","outerWidth","state","setState","handle","onDrag","clientX","clientY","innerHeight","ref","flexFlow","onMouseDown","cursor","has","findRunningScript","startWorkerScript","overflowWrap","height","line","Map","StatsTable","rows","wide","T","MuiTable","row","elem","noWrap","startingLevel","extraLevels","totalMultiplier","startingRam","numUpgrades","currentRam","startingCores","currentCores","startingCache","currentCache","FactionWorkType","OptionSwitch","checked","control","createProgressBarText","derived","totalTicks","bars","dashes","NetscriptPorts","NetscriptPort","prestigeWorkerScripts","port","startNetscript1Script","codeWithImports","codeLineOffset","running","importProcessingRes","ast","ecmaVersion","allowReserved","sourceType","generatedCode","hasImports","walksimple","ImportDeclaration","scriptName","getScript","scriptAst","specifiers","namespace","local","fnNames","fnDeclarations","FunctionDeclaration","fnsToImport","lineOffset","linesRemoved","processNetscript1Imports","interpreterInitialization","scope","NetscriptFunctions","entry","tempWrapper","fnArgs","pseudoToNative","cb","errorTextArray","errorMsg","setProperty","createAsyncFunction","createNativeFunction","nativeToPseudo","interpreter","Interpreter","runInterpreter","more","step","errorMessage","parent","createAndAddWorkerScript","oneRamUsage","getRamUsageFromRunningScript","roundToTwo","arrayToString","generateNextPid","set","runningFn","wrap","propName","finally","vars","charge","executeJSScript","SyntaxError","message","stack","startNetscript2Script","onlineExpGained","onlineMoneyMade","updateOnlineScriptTimes","onlineRunningTime","loadAllRunningScripts","skipScriptLoad","markUpdated","scriptCalculateOfflineProduction","runScriptFromScript","caller","scriptname","isArray","arg","ramAvailable","hasAdminRights","Material","getMarkupLimit","qlt","mku","dmd","dmdR","cmp","cmpR","processMarket","priceChange","compChange","dmdChange","calculateWantedPenalty","respect","wantedLevel","calculateRespectGain","task","baseRespect","statWeight","hackWeight","strWeight","defWeight","dexWeight","agiWeight","chaWeight","territoryMult","territoryPenalty","respectMult","calculateWantedLevelGain","baseWanted","wanted","calc","calculateMoneyGain","baseMoney","calculateAscensionPointsGain","calculateAscensionMult","points","gainFavor","getFavorGain","totalRep","favorToRep","repToFavor","calculateMoneyGainRate","startingCore","sanitizedCores","coreBaseCost","win","reachedLimit","reached","Game","_","X","Shapes","O","I","J","Z","KeyHandler","press","onKeyDown","TimerProgress","withStyles","bar","transition","LinearProgress","GameTimer","setV","intervalId","onExpire","millis","item","xs","interpolate","settings","out","lerpD","lerp","Trivial","Normal","Hard","Impossible","constructLocation","asciiArt","LocationsMetadata","addLocation","BitNode","BitNodes","initBitNodeMultipliers","sf12Lvl","inc","updateMoneyGainRate","gain","moneyGainRatePerSecond","totalMoneyGenerated","minMax","getPurchaseServerCost","sanitizedRam","isPowerOfTwo","sign","getPurchaseServerMaxRam","getPurchaseServerLimit","clz32","newServ","purchaseRamForHomeComputer","TextFile","append","show","getTextFile","textFiles","createTextFile","Skills","Skill","costInc","successChanceAll","successChanceStealth","successChanceKill","successChanceOperation","successChanceContract","maxLvl","actionTime","effStr","effDef","effDex","effAgi","successChanceEstimate","stamina","GangMemberUpgrades","GangMemberUpgrade","getBuyTransactionCost","posType","getSellTransactionGain","processTransactionForecastMovement","firstShares","remainingShares","numIterations","forecastChange","forecastForecastChange","calculateBuyMaxAmount","isLong","remainingMoney","currPrice","getStockMarket4SDataCost","getStockMarket4STixApiCost","getStockMarketWseCost","getStockMarketTixApiCost","timePassed","confidence","dataMap","serv","timesGrown","host","offlineRunningTime","offlineExpGained","timesWeakened","findRunningScriptByPid","Hashes","ActionIdentifier","general","contracts","ops","blackops","events","updateSkillMultipliers","calculateMaxStamina","maxStamina","getCurrentCity","calculateStaminaPenalty","canAttemptBlackOp","actionId","getActionObject","reqdRank","rank","nm","BlackOperations","isAvailable","actionTimeCurrent","actionTimeToComplete","resetAction","exceptionAlert","comms","testBlackOp","getRecruitmentTime","skillName","skills","executeConsoleCommands","commands","consoleHistory","arrayOfCommands","executeConsoleCommand","postToConsole","saveToLogs","consoleLogs","getTimestamp","clearConsole","bladeburnerFac","storeCycles","getActionIdFromTypeAndName","convertedType","convertedName","operations","executeStartConsoleCommand","GeneralActions","executeSkillConsoleCommand","skillNames","multKeys","skillMultipliers","currentLevel","pointCost","calculateCost","executeLogConsoleCommand","flag","logging","executeHelpConsoleCommand","ConsoleHelpText","helpList","helpText","executeAutomateConsoleCommand","variable","highLow","automateActionHigh","automateActionLow","automateThreshHigh","automateThreshLow","automateEnabled","parseCommandArguments","command","start","endQuote","SPACE","substr","triggerMigration","sourceCityName","destCityName","destCity","sourceCity","rand","percentage","triggerPotentialMigration","randomEvent","chaos","gainActionStats","successMult","unweightedGain","unweightedIntGain","weights","getDiplomacyEffectiveness","getRecruitmentSuccessChance","teamSize","effCharisma","effCha","charismaFactor","resetSkillMultipliers","effHack","effInt","multiplierNames","multiplierName","getMultiplier","multiplierValue","completeOperation","teamCount","losses","teamLost","improvePopulationEstimateByPercentage","changePopulationByPercentage","changeEstEqually","nonZero","changeChaosByCount","changeChaosByPercentage","changePopulationByCount","estChange","estOffset","completeContract","improvePopulationEstimateByCount","completeAction","isOperation","difficultyMultiplier","rewardMultiplier","rewardFac","successes","setMaxLevel","rankGain","addOffset","failures","loss","damage","rankLoss","hpLoss","hpLost","calculateHospitalizationCost","numHosp","moneyLost","logLossText","autoLevel","teamLossMax","OperationDaedalus","staminaGain","staminaBonus","eff","successChance","contract","growthF","Growths","operation","maxRank","bladeburnersFactionName","favorBonus","rankNeededForSp","totalSkillPoints","gainedSkillPoints","processAction","actionTimeOverflow","calculateStaminaGainPerSecond","effAgility","maxStaminaBonus","oldMax","difficultyFac","decays","isStealth","isKill","BladesSimulacrum","op","randomEventCounter","getTypeAndNameFromActionId","types","getContractNamesNetscriptFn","getOperationNamesNetscriptFn","getBlackOpNamesNetscriptFn","getGeneralActionNamesNetscriptFn","getSkillNamesNetscriptFn","startActionNetscriptFn","errorLogText","canRunOp","getActionTimeNetscriptFn","actionObj","getActionEstimatedSuccessChanceNetscriptFn","getEstSuccessChance","recChance","getActionCountRemainingNetscriptFn","getSkillLevelNetscriptFn","getSkillUpgradeCostNetscriptFn","upgradeSkillNetscriptFn","getTeamSizeNetscriptFn","setTeamSizeNetscriptFn","sanitizedSize","joinBladeburnerFactionNetscriptFn","DefaultConstructorParams","isPlayerEmployed","isMegacorp","hasAgentPositions","hasBusinessConsultantPositions","hasBusinessPositions","hasEmployeePositions","hasITPositions","hasSecurityPositions","hasSoftwareConsultantPositions","hasSoftwarePositions","hasWaiterPositions","materials","updateMaterialSizeUsed","matName","getStorageMultiplier","GangMemberTasks","gangMemberTasksMetadata","GangMemberTask","isHacking","isCombat","HashUpgradesMetadata","HashUpgrade","Fragments","Fragment","shape","limit","fullAt","rotation","sy","mx","my","qx","qy","neighboors","candidates","coord","cells","candidate","cell","copy","FragmentById","fragment","Booster","NoneFragment","None","DeleteFragment","Delete","CalculateShareMult","opts","suppressDialog","totalPrice","origTotal","newTotal","rerenderFn","resultTxt","gains","netProfit","origCost","Output","formatTime","RawOutput","raw","Link","TTimer","timeLeft","ConfirmationModal","confirmationText","onConfirm","additionalButton","hash","__COMMIT_HASH__","GangConstants","GangRespectToReputationRatio","MaximumGangMembers","CyclesPerTerritoryAndPowerUpdate","AscensionMultiplierRatio","Names","globalModuleSequenceNumber","Script","otherScripts","moduleSequenceNumber","saveScript","formatCode","dependent","dependents","dependentScript","calculateRamUsage","ramUsageEntries","entries","imports","vals","DarkWebItems","BruteSSHProgram","DarkWebItem","FTPCrackProgram","RelaySMTPProgram","HTTPWormProgram","SQLInjectProgram","ServerProfiler","DeepscanV1","DeepscanV2","AutolinkProgram","AutoLink","FormulasProgram","Formulas","actionNames","actionName","Action","Suit","Card","suit","formatValue","isRedSuit","Hearts","Diamonds","getStringRepresentation","SourceFile","bitnodeKey","bitnode","createTaskTracker","Person","calculateStat","getFactionHackingWorkRepGain","updateStatLevels","MathJaxWrapper","version","src","lineNumber","sendMessage","forced","recvd","showMessage","serverHostname","other","addMessageToServer","checkForMessagesToSend","redPillFlag","jumper0","MessageFilenames","Jumper0","jumper1","Jumper1","jumper2","Jumper2","jumper3","Jumper3","jumper4","Jumper4","cybersecTest","CyberSecTest","nitesecTest","NiteSecTest","bitrunnersTest","BitRunnersTest","redpill","RedPill","redpillOwned","flightName","Flight","AddToAllMessages","Message","nsFuncsGenerator","sanitizedPid","found","Environment","getScriptOnServer","shouldLog","OperationTyphoon","OperationZero","OperationX","OperationTitan","OperationAres","OperationArchangel","OperationJuggernaut","OperationRedDragon","OperationK","OperationDeckard","OperationTyrell","OperationWallace","OperationShoulderOfOrion","OperationHyron","OperationMorpheus","OperationIonStorm","OperationAnnihilus","OperationUltron","OperationCenturion","OperationVindictus","commit","div","successRate","researchMetadata","ApplyToJobButton","getJobRequirementTooltip","initElectron","normalizeFileName","getFiles","deleteFile","removeFile","saveFile","Buffer","from","overwritten","writeToScriptFile","initWebserver","funcs","typesFn","appNotifier","initAppNotifier","triggerSave","triggerGameExport","triggerScriptsExport","exportScripts","getSaveData","getSaveInfo","async","getImportDataFromString","pushSaveData","appSaveFns","initSaveFunctions","bridge","electronBridge","receive","send","initElectronBridge","pushGameReady","playtime","game","pushImportResult","wasImported","pushDisableRestore","achievementData","bitNodeFinishedState","wd","hasAccessToSF","knowsAboutBitverse","Icon","Condition","THE_BLACK_HAND","THE_COVENANT","Visible","MONEY_1Q","MONEY_M1B","Secret","INSTALL_1","INSTALL_100","QUEUE_40","HACKING_100000","COMBAT_3000","NEUROFLUX_255","NS2","FROZE","RUNNING_SCRIPTS_1000","DRAIN_SERVER","MAX_RAM","MAX_CORES","SCRIPTS_30","KARMA_1000000","STOCK_1q","DISCOUNT","SCRIPT_32GB","FIRST_HACKNET_NODE","MAX_HACKNET_NODE","HACKNET_NODE_10M","REPUTATION_10M","DONATION","TRAVEL","WORKOUT","TOR","hasTorRouter","HOSPITALIZED","hospitalization","GANG","FULL_GANG","members","GANG_TERRITORY","GANG_MEMBER_POWER","CORPORATION","CORPORATION_BRIBE","CORPORATION_PROD_1000","CORPORATION_EMPLOYEE_3000","CORPORATION_REAL_ESTATE","Description","INTELLIGENCE_255","BLADEBURNER_DIVISION","BLADEBURNER_OVERCLOCK","BLADEBURNER_UNSPENT_100000","FIRST_HACKNET_SERVER","AdditionalUnlock","ALL_HACKNET_SERVER","MAX_HACKNET_SERVER","hs","HACKNET_SERVER_1B","MAX_CACHE","capacity","SLEEVE_8","INDECISIVE","FAST_BN","CHALLENGE_BN1","CHALLENGE_BN2","CHALLENGE_BN3","CHALLENGE_BN6","CHALLENGE_BN7","CHALLENGE_BN8","CHALLENGE_BN9","hacknet_expenses","CHALLENGE_BN10","CHALLENGE_BN12","BYPASS","PROTOTYPETAMPERING","UNCLICKABLE","UNDOCUMENTEDFUNCTIONCALL","TIMECOMPRESSION","REALITYALTERATION","N00DLES","EDITSAVEFILE","UNACHIEVABLE","CHALLENGE_BN13","StaneksGift1","DEVMENU","RAINBOW","TRUE_RECURSION","playerAchievements","missingAchievements","flatMap","Intelligence","useTheme","colSpan","WorkInProgressOverview","onClickFocus","header","workCell","workHeader","pt","pb","workSubtitles","mt","details","innerText","textAlign","CharacterOverview","killOpen","setKillOpen","hackingProgress","strengthProgress","defenseProgress","dexterityProgress","agilityProgress","charismaProgress","borderTop","flex","aria-label","CorporationUnlockUpgrades","setRedPillFlag","destroyedBitNode","newBitNode","bitNodeNumber","sourceFileKey","sourceFile","alreadyOwned","ownedSourceFile","playerSrcFile","PlayerOwnedSourceFile","giveSourceFile","midpoint","program","description","BadRNG","WHRNG","s1","s2","s3","genSeed","Favor","crimeKey","currentTask","finishTask","resetTaskStatus","gainRatesForTask","currentTaskLocation","currentTaskMaxTime","retValue","currentTaskTime","successGainRates","keysForIteration","gainExperience","fromOtherSleeve","multFac","pHackExp","pStrExp","pDefExp","pDexExp","pAgiExp","pChaExp","earningsForPlayer","earningsForTask","earningsForSleeves","getMemoryUpgradeCost","memory","currCost","currMemory","getRepGain","Field","Security","installAugmentation","cyclesUsed","Class","Gym","updateTaskGainRates","Synchro","gymStatType","takeUniversityCourse","universityName","AevumSummitUniversity","Sector12RothmanUniversity","VolhavenZBInstituteOfTechnology","newCity","tryBuyAugmentation","AevumCrushFitnessGym","AevumSnapFitnessGym","Sector12IronGym","Sector12PowerhouseGym","VolhavenMilleniumFitnessGym","baseGymExp","totalExpMultiplier","getTrainingMult","sanitizedStat","totalExpMult","getStudyMult","upgradeMemory","sanitizedWorkType","offerHackingWork","offerFieldWork","offerSecurityWork","workoutAtGym","gymName","stat","RamCalculationErrorCode","TerminalEvents","TerminalClearEvents","orderType","refs","orderBook","executeOrder","isBuy","predefined","getPredefinedThemes","AlertManager","alerts","setAlerts","sha256","getMessageHash","getRandomByte","maintainMembership","keep","Neurolink","CashRoot","PCMatrix","finishAction","penalty","hack_asc_points","str_asc_points","def_asc_points","dex_asc_points","agi_asc_points","cha_asc_points","resetPidCounter","ProgramsSeen","InvitationsSeen","setMaxRam","getDB","indexedDB","indexedDbRequest","onupgradeneeded","createObjectStore","onerror","ev","onsuccess","db","transaction","objectStore","request","put","deleteGame","canGetBonus","setLastExportBonus","unixTime","getTeamSuccessBonus","inst","getActionTypeSkillSuccessBonus","AevumGalacticCybersystems","Sector12DeltaOne","AevumPolice","NewTokyoNoodleBar","nextPosition","repMultiplier","reqdHacking","reqdStrength","reqdDefense","reqdDexterity","requiredAgility","reqdAgility","reqdCharisma","reqdReputation","hackingEffectiveness","strengthEffectiveness","defenseEffectiveness","dexterityEffectiveness","agilityEffectiveness","charismaEffectiveness","hackRatio","strRatio","defRatio","dexRatio","agiRatio","chaRatio","reputationGain","logEntry","logUpd","displayLog","recordHack","moneyGained","recordGrow","recordWeaken","StartButton","fmt","FactionInfo","infoText","offerHackingMission","augmentationRepRequirementMult","CorporationUpgrades","getUpgrade","getUpgradeCost","getCost","newCap","problemType","getRandomProblemType","getRandomReward","randServer","getRandomServer","contractFn","getRandomFilename","addContract","generateRandomContractOnHome","generateContract","problemTypes","rewardType","factionsThatAllowHacking","sanitizeRewardType","numFactions","randFaction","allJobs","randIndex","findCrime","roughName","atCapacity","marketCycles","emp","hireRandomEmployee","maxEne","maxHap","maxMor","perfMult","hasAutobrew","hasAutoparty","salaryPaid","mor","hap","ene","calculateEmployeeProductivity","employeeProd","prod","calculateProductivity","getElementById","cre","sal","Employee","creativity","efficiency","salary","assignEmployeeToJob","unassignEmployeeFromJob","setEmployeeToJob","amount","jobCount","acc","validator","paramValidator","sanitizedSource","StatsProgressBar","remaining","StatsProgressOverviewCell","characterOverviewStyles","paddingBottom","oldhp","PromptEvent","PromptManager","setPrompt","PromptMenuText","PromptMenuSelect","PromptContent","PromptMenuBoolean","paddingTop","submit","autoFocus","onInput","stopPropagation","ENTER","preventDefault","choices","getItems","createCityMap","demand","competition","markup","quality","per","performance","dur","durability","rel","reliability","aes","aesthetics","fea","features","siz","reqMats","req","createProduct","empWorkMult","fin","prog","finishProduct","progrMult","engrRatio","mgmtRatio","rndRatio","opsRatio","busRatio","totalMult","sciFac","calculateRating","advMult","busmgtgRatio","isFinite","awareness","popularity","reqMat","ProductRatingWeights","rat","Quality","Performance","Durability","Reliability","Aesthetics","Features","prodMats","ProgramsRoot","getHackingLevelRemaining","disableGutters","mb","gridTemplateColumns","curCompletion","getProgCompletion","Paper","flexWrap","mr","FactionsRoot","allJoinedFactions","ml","openFaction","openFactionAugPage","getAugsLeft","acceptInvitation","ActivateRecoveryMode","RecoveryRoot","errorData","resetError","issueUrl","newIssueUrl","startIcon","onTriggered","px","multiline","fullWidth","sharePower","StartSharing","CSM","CorporationState","numUnlockUpgrades","fill","upgradeMultipliers","addFunds","getState","gameCycles","issueNewSharesCooldown","cycleProfit","retainedEarnings","getDividends","updateSharePrice","nextState","dividendsPerShare","dividends","determineValuation","getTargetSharePrice","targetPrice","immediatelyUpdateSharePrice","sharesTracker","sharesUntilUpdate","sharesSold","maxIterations","convertCooldownToString","cd","upgN","dividendTaxPercentage","basePrice","upgradeAmt","getProductionMultiplier","getDreamSenseGain","getAdvertisingMultiplier","getEmployeeCreMultiplier","getEmployeeChaMultiplier","getEmployeeIntMultiplier","getEmployeeEffMultiplier","getSalesMultiplier","getScientificResearchMultiplier","getStarterGuide","hasHandbook","handbookFn","showLiterature","HashRate","popEst","canAccessGang","getGangFaction","startGang","locations","Option","buttonText","TickerDisplayMode","DisplayModeButton","tickerDisplayMode","Portfolio","changeDisplayMode","StockTickersConfig","changeWatchlistFilter","sum","EPSILON","decay","getSuccessChance","baseTime","skillFac","effDexterity","statFac","est","clamp","real","low","high","competence","playerStatLvl","effMultiplier","getSuccessesNeededForNextLevel","baseSuccessesPerLevel","currentCity","onTravel","WorldMap","SuccessChance","estimatedSuccessChance","StaticModal","char","CorruptableText","setContent","counter","timers","letter","randFrom","randomize","timerId","checkIfConnectedToDarkweb","listAllDarkwebItems","printRaw","buyDarkwebItem","itemName","programsRef","existingPartialExeIndex","findIndex","buyAllDarkwebItems","itemsToBuy","baseCheck","netscriptCanHack","initialCheck","netscriptCanGrow","netscriptCanWeaken","GraftableAugmentation","antiLog","ReputationRate","isNumber","ParseCommands","allCommands","flat","ParseCommand","inQuote","prevChar","escaped","DOUBLE_QUOTE","QUOTE","CinematicText","setI","done","setDone","lines","onDone","newI","auto","MaxSleevesFromCovenant","BaseCostPerSleeve","HemoRecirculator","Targeting1","Targeting2","Targeting3","SyntheticHeart","SynfibrilMuscle","CombatRib1","CombatRib2","CombatRib3","NanofiberWeave","SubdermalArmor","WiredReflexes","GrapheneBoneLacings","BionicSpine","GrapheneBionicSpine","BionicLegs","GrapheneBionicLegs","SpeechProcessor","TITN41Injection","EnhancedSocialInteractionImplant","BitWire","ArtificialBioNeuralNetwork","ArtificialSynapticPotentiation","EnhancedMyelinSheathing","SynapticEnhancement","NeuralRetentionEnhancement","DataJack","ENM","ENMCore","ENMCoreV2","ENMCoreV3","ENMAnalyzeEngine","ENMDMA","Neuralstimulator","NeuralAccelerator","CranialSignalProcessorsG1","CranialSignalProcessorsG2","CranialSignalProcessorsG3","CranialSignalProcessorsG4","CranialSignalProcessorsG5","NeuronalDensification","NuoptimalInjectorImplant","SpeechEnhancement","FocusWire","PCDNI","PCDNIOptimizer","PCDNINeuralNetwork","ADRPheromone1","ADRPheromone2","ShadowsSimulacrum","HacknetNodeCPUUpload","HacknetNodeCacheUpload","HacknetNodeNICUpload","HacknetNodeKernelDNI","HacknetNodeCoreDNI","Neurotrainer1","Neurotrainer2","Neurotrainer3","Hypersight","LuminCloaking1","LuminCloaking2","SmartSonar","PowerRecirculator","QLink","SPTN97","HiveMind","CordiARCReactor","SmartJaw","Neotra","Xanipher","HydroflameLeftArm","nextSENS","OmniTekInfoLoad","PhotosyntheticCells","CRTX42AA","Neuregen","NutriGen","INFRARet","DermaForce","GrapheneBrachiBlades","BrachiBlades","GrapheneBionicArms","BionicArms","SNA","EsperEyewear","EMS4Recombination","OrionShoulder","HyperionV1","HyperionV2","GolemSerum","VangelisVirus","VangelisVirus3","INTERLINKED","BladeRunner","BladeArmor","BladeArmorPowerCells","BladeArmorEnergyShielding","BladeArmorUnibeam","BladeArmorOmnibeam","BladeArmorIPU","StaneksGift2","StaneksGift3","randomBonuses","bonuses","randomNumber","getRandomBonus","UnstableCircadianModulatorParams","UnstableCircadianModulator","specialReferenceIF","specialReferenceFOR","specialReferenceWHILE","memCheckGlobalKey","parseOnlyRamCalculate","dependencyMap","completedParses","parseQueue","parseCode","moduleName","parseOnlyCalculateDeps","additionalModules","initialModule","nextModule","URLImportError","ImportError","detailedCosts","unresolvedRefs","resolvedRefs","prefix","ident","dep","applyFuncRam","loadedFns","refDetail","fnRam","checkInfiniteLoop","missingAwaitLine","walk","WhileStatement","st","walkDeeper","nodeHasTrueTest","test","hasAwait","AwaitExpression","currentModule","globalKey","internalToExternal","addRef","external","objectPrototypeProperties","getOwnPropertyNames","commonVisitors","Identifier","DoWhileStatement","ForStatement","update","IfStatement","consequent","alternate","MemberExpression","importModuleName","spec","imported","codeCopy","decimal","isHackingGang","respectGainRate","wantedGainRate","moneyGainRate","storedTerritoryAndPowerCycles","territoryClashChance","territoryWarfareEngaged","notifyMemberDeath","getPower","getTerritory","processGains","processExperienceGains","processTerritoryAndPowerGains","moneyGains","respectGains","wantedLevelGains","justice","recordEarnedRespect","oldWanted","newWanted","gangName","calculatePower","gainRoll","multiplicativeGain","powerMult","PowerMultiplier","additiveGain","gangs","g","others","thisGang","otherGang","thisPwr","thisChance","calculateTerritoryGain","winGang","loseGang","powerBonus","territoryGain","clash","won","baseDeathChance","modifiedDeathChance","killMember","getRespectNeededToRecruitMember","GangMember","getWantedPenalty","memberTotal","totalRespect","lostRespect","earnedRespect","ascend","getDiscount","discount","getAllTaskNames","taskName","pidCounter","tempCounter","MAX_SAFE_INTEGER","updateDynamicRam","ramCost","dynamicLoadedFns","dynamicRamUsage","safeGetServer","callingFnName","makeRuntimeErrorMsg","scriptArgs","getRunningScriptByPid","getCannotFindRunningScriptErrorMessage","failOnHacknetServer","callingFn","errstack","userstack","stackline","dependency","parseChromeStackline","lineMatch","funcMatch","chromeCall","parseFirefoxStackline","lio","firefoxCall","rejectMsg","manual","hackingTime","canHack","hackChance","expGainedOnSuccess","expGainedOnFailure","percentHacked","maxThreadNeeded","moneyDrained","influenceStockThroughServerHack","argsToString","toNative","helper","string","funcName","argName","boolean","checkSingularityAccess","getValidPort","iport","NetscriptGang","NetscriptSleeve","extra","NetscriptExtra","NetscriptHacknet","NetscriptStanek","NetscriptBladeburner","NetscriptCodingContract","NetscriptCorporation","formulas","NetscriptFormulas","singularity","NetscriptSingularity","stockmarket","NetscriptStockMarket","NetscriptUserInterface","NetscriptGrafting","_hostname","_hackAmount","hackAmount","_threads","_time","growTime","moneyBefore","moneyAfter","logGrowPercent","influenceStockThroughServerGrow","_growth","_cores","weakenTime","end","_format","tprintf","_fn","possibleLogs","arguments","openPortCount","sshPortOpen","ftpPortOpen","smtpPortOpen","httpPortOpen","sqlPortOpen","_scriptname","scriptServer","spawnDelay","killByPid","scriptsRunning","_hostname1","hostname2","hostname1","destServer","currServ","txtFile","newFile","sourceScript","oldScript","newScript","_grep","grep","allFiles","processes","speed","production","purchaseCost","coreCost","levelCost","_filename","_ram","_name","hostnameStr","_port","_mode","tryWrite","_file","clearPort","status","suc","offlineMoneyMade","_n","_milliseconds","_milliPrecision","milliseconds","milliPrecision","alert","_message","_variant","_txt","_url","_target","$","writeToTextFile","fail","tor","inBladeburner","hasCorporation","_host","_source","_destination","source_is_txt","dest_is_txt","source_file","dest_file","flags","Flags","fromEntries","getFunctionNames","functionNames","moneyHacked","orgName","percTotalMoneyHacked","moneyGrown","percTotalMoneyGrown","performanceMult","cyclesOfWork","compName","tooltiptext","reqRep","TerminalHelpText","TemplatedHelpTexts","HelpTexts","analyze","backdoor","cat","check","cls","cp","expr","free","help","history","lscpu","mem","nano","sudov","unalias","GameEnv","Platform","getErrorForDisplay","errorInfo","isElectron","Production","toDisplay","language","cookiesEnabled","cookieEnabled","doNotTrack","indexedDb","platform","Steam","Browser","environment","getErrorMetadata","Development","componentStack","Tracking","Retirement","Investigation","Raid","initValue","Hand","cards","addCards","removeByIndex","StockTickerTxButton","getContract","contractName","removeContract","ret","CodingContractModal","setProps","setAnswer","contractType","tries","BitFlumeEvent","BitFlumeModal","terminalCommandHistory","generalMethods","augmentationMethods","canAccessBladeburner","bladeburnerMethods","startBladeburner","canAccessCorporation","corporationMethods","startCorporation","gangMethods","serverMethods","InvitationModal","litObj","Literatures","recentScripts","unshift","timestamp","opt_initFunc","sourceCode","sourceCodeLineOffset","acorn","PARSE_OPTIONS","initFunc_","paused_","polyfills_","functionCounter_","stepFunctions_","stepMatch","methodName","createScope","stripLocations_","State","stateStack","nodeConstructor","READONLY_DESCRIPTOR","configurable","writable","NONENUMERABLE_DESCRIPTOR","READONLY_NONENUMERABLE_DESCRIPTOR","VARIABLE_DESCRIPTOR","STEP_ERROR","SCOPE_REFERENCE","VALUE_IN_DESCRIPTOR","toStringCycles_","getErrorLineNumber","getErrorLineNumberMessage","appendCode","populateScope_","initGlobalScope","OBJECT_PROTO","FUNCTION_PROTO","initFunction","initObject","proto","OBJECT","initArray","initString","initBoolean","initNumber","initDate","initRegExp","initError","initMath","initJSON","thisInterpreter","EvalError","parseInt","strFunctions","decodeURI","encodeURI","wrapper","nativeFunc","throwException","URI_ERROR","FUNCTION","ARRAY","ARRAY_PROTO","REGEXP","REGEXP_PROTO","DATE","DATE_PROTO","identifierRegexp","var_args","calledWithNew","newFunc","createObjectProto","argsStr","SYNTAX_ERROR","parentScope","boxThis","isObject","getScope","strict","box","getPrototype","thisArg","func_","funcThis_","arguments_","arrayPseudoToNative","TYPE_ERROR","doneExec_","setNativeFunctionPrototype","valueOf","throwIfNullUndefined","properties","arrayNativeToPseudo","descriptor","preventExtensions","getOwnPropertyDescriptor","setter","hasValue","pseudoDescriptor","propertyIsEnumerable","newArray","first","legalArrayLength","RANGE_ERROR","class","reverse","howmany","opt_begin","opt_end","opt_separator","iLength","getProperty","hasProperty","element","isa","jLength","searchElement","opt_fromIndex","STRING","fromCharCode","functions","compareString","locales","localeCompare","separator","jsList","regexp","search","newSubstr","BOOLEAN","NUMBER","numConsts","fractionDigits","toExponential","ERROR","digits","precision","toPrecision","radix","Function","UTC","pattern","rgx","populateRegExp","lastIndex","opt_message","newError","createObject","createErrorSubclass","EVAL_ERROR","REFERENCE_ERROR","myMath","mathConsts","numFunctions","myJSON","nativeObj","child","legalArrayIndex","Value","strs","pseudoRegexp","nativeRegexp","ignoreCase","createFunction","opt_constructor","illegalConstructor","asyncFunc","pseudoDate","pseudoObj","opt_cycles","pseudo","native","nativeArray","pseudoArray","lineNum","isGetter","TypeError","opt_descriptor","ReferenceError","defObj","firstNode","expression","createSpecialScope","opt_scope","getValueFromScope","prevNode","setValueToScope","nodeClass","isConstructor","getValue","Completion","NORMAL","BREAK","CONTINUE","RETURN","THROW","errorClass","lineNumErrorMsg","unwind","lineNumberMsg","cv","labels","isLoop","isSwitch","realError","errorTable","RangeError","URIError","createGetter_","funcThis","doneCallee_","doneArgs_","createSetter_","elements","n_","array_","doneLeft_","doneRight_","leftReference_","doneGetter_","leftValue_","leftValue","doneSetter_","setterValue_","rightValue","directEval_","funcNode","paramName","paramValue","argsList","evalNode","argsWithCallback","done_","throwValue","mode_","test_","doneInit_","doneObject_","variable_","object_","visited_","name_","gotPropName","props_","doneVariable_","doneProperty_","properties_","kinds","switchValue_","defaultCase_","index_","switchCase","matched_","tested_","doneBlock_","doneHandler_","doneFinalizer_","leftSide_","changeValue","returnValue","declarations","declarationNode","init_","doneBody_","numServerGrowthCycles","numServerGrowthCyclesAdjusted","findSleevePurchasableAugs","ownedAugNames","availableAugs","isAvailableForSleeve","validMults","StaneksGiftEvents","GraftableAugmentations","getAvailableAugs","canGraft","AugPreReqsChecklist","preAug","GraftingRoot","graftableAug","selectedAug","setSelectedAug","graftOpen","setGraftOpen","selected","matchEnding","zip","JSZip","zipFiles","fileNames","fileContents","zipFn","generateAsync","FileSaver","saveAs","AugmentationAccordion","displayName","unmountOnExit","stealthIcon","xmlns","viewBox","killIcon","ActionLevel","isActive","canIncrease","canDecrease","Autolevel","TeamSizeButton","BlinkingCursor","setOn","DeleteGameButton","modalOpened","setModalOpened","SoftResetButton","noConfirmation","ThemeEditorButton","themeEditorOpen","setThemeEditorOpen","ThemeCollaborate","StyleEditorButton","styleEditorOpen","setStyleEditorOpen","TravelAgencyRoot","setDestination","startTravel","symbolsLoaded","symbols","SetupTextEditor","populate","exclude","OpenScript","lastPosition","model","openScripts","currentScript","Root","editorRef","monacoRef","vimStatusRef","vimEditor","setVimEditor","editor","setEditor","setFilter","searchExpanded","setSearchExpanded","setRAM","ramEntries","setRamEntries","updatingRam","setUpdatingRam","decorations","setDecorations","optionsOpen","setOptionsOpen","setOptions","insertSpaces","wordWrap","ramInfoOpen","setRamInfoOpen","dimensions","setDimensions","regenerateModel","createModel","debouncedHandleResize","updateRAM","keydown","ctrlKey","metaKey","require","initVimMode","VimMode","Vim","defineEx","defineAction","_cm","nTabs","currIndex","currentTabIndex","onTabClick","nextIndex","mapCommand","context","dispose","debouncedSetRAM","useMemo","newCode","entriesDisp","scriptToSave","textFile","curIndex","isDisposed","setModel","setPosition","revealLineInCenter","onTabClose","closingScript","savedScriptIndex","savedScriptCode","serverScriptIndex","indexOffset","getServerCode","openScript","serverScript","handleFilterChange","handleExpandSearch","filteredOpenScripts","editorHeight","tabMaxWidth","tabTextWidth","tabIconWidth","onDragEnd","items","startIndex","endIndex","removed","reorder","droppableId","direction","provided","snapshot","innerRef","droppableProps","isDraggingOver","spellCheck","iconButtonStyle","minWidth","borderColor","scriptTabText","serverScriptCode","dirty","draggableId","disableInteractiveElementBlocking","draggableProps","dragHandleProps","flexShrink","textOverflow","onTabUpdate","beforeMount","monaco","languages","registerCompletionItemProvider","provideCompletionItems","suggestions","kind","CompletionItemKind","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","getLanguages","loader","tokenizer","token","libSource","typescript","javascriptDefaults","addExtraLib","typescriptDefaults","loadThemes","onMount","Position","loading","defaultLanguage","defaultValue","newArr","tempScript","awaitWarning","newDecorations","deltaDecorations","startLineNumber","startColumn","endLineNumber","endColumn","isWholeLine","glyphMarginClassName","glyphMarginHoverMessage","infLoop","glyphMargin","getAction","makeScriptBlob","compile","shouldCompile","uurls","_getScriptUrls","loadedModule","isDependencyOutOfDate","scriptModuleSequenceNumber","depScript","seen","urlStack","ranges","importNodes","ExportNamedDeclaration","ExportAllDeclaration","transformedCode","matchingScripts","importedScript","urls","blob","ScriptUrl","vargs","numDashes","libarg","argv","defaultInterpreter","TablePaginationActionsAll","rowsPerPage","onPageChange","Cell","cellProps","onMouseEnter","newNs2Template","detectSimpleScriptGlob","globString","globDatabase","parsedGlob","glob","preGlob","postGlob","globError","globMatches","globAgainst","parseSimpleScriptGlob","commonEditor","scriptEditorRouteOptions","filesToLoadOrCreate","globSearch","isEmpty","filepath","getFilepath","fileIsNs2","isNs2","CursorPositions","saveCursor","column","automate","stop","corpName","additionalShares","warehouseApi","OfficeApi","createTreantMarkup","childrenArray","htmlClass","HTMLclass","innerHTML","findNode","setParent","chart","nodeStructure","queue","getMultiplierHelper","getProductProductionMultiplier","StanekConstants","RAMBonus","BaseSize","MaxSize","currPos","nextPosName","Engine","_lastUpdate","updateGame","expForOtherSleeves","decrementAllCounters","checkCounters","Counters","autoSaveCounter","updateSkillLevelsCounter","updateDisplays","updateDisplaysLong","updateActiveScriptsDisplay","createProgramNotifications","augmentationsNotifications","passiveFactionGrowth","mechanicProcess","contractGeneration","achievementsCounter","counterName","warningToast","warnAutosaveDisabled","adjustedCycles","startExploits","setupUncaughtPromiseHandler","timeOffline","numCyclesOffline","offlineReputation","offlineHackingIncome","offlineProductionFromHacknetNodes","hacknetProdInfo","timeOfflineString","_thisUpdate","requestAnimationFrame","LoadingScreen","setShow","loaded","setLoaded","reason","doLoad","installed","stacks","newMultipliers","calculateEntropy","typ","invalidArgs","baseSize","af","avgCharge","numCharge","cotmg","inBonus","updateMults","effect","fragmentAt","boost","neighboor","CalculateEffect","canPlace","rootX","rootY","newFrag","ActiveFragment","aFrag","fragments","collide","place","findFragment","worldX","worldY","clearCharge","thisFragment","otherFragment","dx","dy","Void","infiltrationData","techVendorMaxRam","techVendorMinRam","StatsElement","EarningsElement","ServerType","All","Foreign","Owned","Purchased","ServerDropdown","isValidServer","purchased","serverType","purchase","canPurchase","DECK_COUNT","Result","Blackjack","bet","canStartGame","playerHand","deck","safeDrawCard","dealerHand","gameInProgress","Pending","getTrueHandValue","finishGame","Tie","PlayerWonByBlackjack","DealerWon","hand","handValues","getHandValue","valuesUnder21","isHandBusted","newHand","newDealerHand","PlayerWon","dealerHandValue","playerHandValue","betInput","wager","wagerInvalid","wagerInvalidHelperText","startGame","Deck","render","playerHandValues","getHandDisplayValues","dealerHandValues","wagerOnChange","helperText","playerHit","playerStay","startOnClick","elevation","card","prev","hidden","fontWeight","red","ReactCard","Clubs","Spades","allFactionAugs","factionAugs","factionAug","repFromDonation","TickerHeaderFormatData","longestName","longestSymbol","AchievementEntry","cssFiltersUnlocked","cssFiltersLocked","isUnlocked","mainColor","achievedOn","unlocked","colorFilters","Color","hueRotate","angle","PI","sin","cos","multiply","grayscale","sepia","saturate","matrix","newR","newG","newB","brightness","linear","contrast","slope","intercept","invert","hsl","Solver","targetHSL","reusedColor","solve","solveNarrow","solveWide","css","best","initial","spsa","A1","iters","bestLoss","deltas","highArgs","lowArgs","ck","lossDiff","ak","fix","idx","filters","colorHSL","getFiltersFromHex","hex","rgb","hexToRgb","gameCPS","Theme","credit","screenshot","img1","reference","outputHistory","startHack","startGrow","startWeaken","startBackdoor","startAnalyze","finishHack","oldSec","newSec","finishGrow","finishWeaken","finishBackdoor","finishAnalyze","isHacknet","org","canRunScripts","hackingSkill","security","hackingChance","numPort","getProgressText","getFile","getLitFile","lit","currDir","setcwd","contractOpen","executeScanAnalyzeCommand","visited","depthQueue","newS","titleDashes","connectToServer","executeCommands","commandHistory","commandHistoryIndex","executeCommand","n00dlesServ","commandName","scananalyze","removeBracketsFromArrayString","strCpy","removeQuotesFromString","convert2DArrayToString","ans","len","nums","ways","padStart","spiral","u","col","playerAns","reach","intervals","numIntervals","interval","sanitizedResult","sanitizedAns","B","C","ansArr","ipInAns","maxCur","maxSoFar","hold1","MIN_SAFE_INTEGER","hold2","release1","release2","prices","hold","rele","cur","createTriangleRecurse","numLevels","createTriangle","triangle","dp","numRows","numColumns","currentRow","gridString","grid","obstacleGrid","roll","dfs","pair","playerAnsArray","resultInAnswer","numDigits","digitsArray","sanitizedPlayerAnsArr","evaluated","multed","htmlID","requireHackingLevel","targetServer","numAugReq","ipaddress","byteRange","multipliers","formattedHours","getHours","formattedMinutes","getMinutes","formattedSeconds","getSeconds","getMonth","getDate","hack_exp","hack_mult","str_exp","str_mult","def_exp","def_mult","dex_exp","dex_mult","agi_exp","agi_mult","cha_exp","cha_mult","assignToTask","unassignFromTask","difficultyPerCycles","getGainedAscensionPoints","canAscend","getCurrentAscensionMults","getAscensionMultsAfterAscend","getAscensionResults","postAscend","preAscend","applyUpgrade","respectToDeduct","buyUpgrade","createDescription","AllSoftwarePositions","AllITPositions","AllNetworkEngineerPositions","SecurityEngineerPositions","AllTechnologyPositions","AllBusinessPositions","AllAgentPositions","AllSecurityPositions","AllSoftwareConsultantPositions","AllBusinessConsultantPositions","SoftwarePositionsUpToHeadOfEngineering","SoftwarePositionsUpToLeadDeveloper","BusinessPositionsUpToOperationsManager","WaiterOnly","EmployeeOnly","PartTimeWaiterOnly","PartTimeEmployeeOnly","OperationsManagerOnly","CEOOnly","Sector12CarmichaelSecurity","advertisingMult","employeeChaMult","employeeCreMult","employeeEffMult","employeeIntMult","productionMult","productProductionMult","salesMult","sciResearchMult","storageMult","effectText","costPerLevel","hasTargetServer","lookup","checkGangApiAccess","getGangMember","_faction","wantedLevelGainRate","wantedPenalty","cpy","_memberName","memberName","hack_asc_mult","str_asc_mult","def_asc_mult","dex_asc_mult","agi_asc_mult","cha_asc_mult","respectGain","wantedLevelGain","recruited","tasks","_taskName","getGangTask","_equipName","equipName","equipment","typecheck","_engage","engage","_otherGang","playerPower","checkSleeveAPIAccess","checkSleeveNumber","sleeveNumber","sl","_sleeveNumber","_crimeRoughName","crimeRoughName","_universityName","_className","_cityName","acompanyName","_factionName","_workType","_gymName","_stat","jobTitle","maxHp","agilityExp","charismaExp","companyRep","crimeMoney","crimeSuccess","defenseExp","dexterityExp","factionRep","hackingExp","strengthExp","workMoney","workHackExpGain","workStrExpGain","workDefExpGain","workDexExpGain","workAgiExpGain","workChaExpGain","workMoneyGain","workRepGain","purchasableAugs","_augName","bypass","doc","completely_unused_field","real_document","alterReality","recur","rainbow","guess","bcrypt","tryGuess","getHacknetNode","hi","maxNumNodes","_i","hasUpgraded","timeOnline","totalProduction","_upgName","_upgTarget","getHashUpgrades","getHashUpgradeLevel","checkStanekAPIAccess","_rootX","_rootY","_rotation","_fragmentId","fragmentId","newTheme","currentTheme","errors","newStyles","currentStyles","checkBladeburnerAccess","skipjoined","apiDenied","bladeburnerDenied","checkBladeburnerCity","getBladeburnerActionObject","_blackOpName","blackOpName","_type","_level","_autoLevel","_skillName","_size","getCodingContract","returnReward","is2DArray","answerComponents","creward","hasUnlockUpgrade","upgradeName","getCorporation","hasResearched","getDivision","getOffice","getWarehouse","getMaterial","materialName","getProduct","getEmployee","employeeName","checkAccess","api","getSafeDivision","getPurchaseWarehouseCost","getUpgradeWarehouseCost","_divisionName","hasWarehouse","_materialName","sll","_productName","pCost","cityData","developmentProgress","purchaseWarehouse","upgradeWarehouse","sellMaterial","_amt","_price","sellProduct","_all","discontinueProduct","setSmartSupply","_enabled","enabled","setSmartSupplyUseLeftovers","buyMaterial","bulkPurchase","makeProduct","_designInvest","_marketingInvest","exportMaterial","_sourceDivision","_sourceCity","_targetDivision","_targetCity","sourceDivision","targetDivision","targetCity","cancelExportMaterial","setMaterialMarketTA1","_on","setMaterialMarketTA2","setProductMarketTA1","setProductMarketTA2","getHireAdVertCost","getHireAdVertCount","getResearchCost","_researchName","setAutoJobAssignment","_job","_amount","getOfficeSizeUpgradeCost","assignJob","_employeeName","hireEmployee","upgradeOfficeSize","_costPerEmployee","buyCoffee","hireAdVert","minEne","minHap","expandIndustry","_industryName","industryName","expandCity","unlockUpgrade","_upgradeName","levelUpgrade","issueDividends","_percent","createCorporation","_corporationName","_selfFund","corporationName","selfFund","getUnlockUpgradeCost","getUpgradeLevel","getUpgradeLevelCost","getExpandIndustryCost","getExpandCityCost","getInvestmentOffer","fundingRound","percShares","acceptInvestmentOffer","funding","investShares","goPublic","_numShares","initialSharePrice","sellShares","buyBackShares","bribe","_amountCash","_amountShares","amountCash","amountShares","reFac","robFac","aiFac","advFac","hwFac","getProductDescriptionText","getMaximumNumberProducts","additional","hasMaximumNumberProducts","calculateProductionFactors","multSum","cityMult","updateWarehouseSizeUsed","prodName","newInd","employeeSalary","officeLoc","processMaterialMarket","processProductMarket","popularityGain","awarenessGain","MAX_VALUE","processMaterials","processProducts","wh","foo","imp","buyAmt","maxAmt","smartBuy","smartSupplyStore","worseAmt","totalSize","freeSpace","maxProd","getOfficeProductivity","totalMatSize","tmp","reqMatName","normQty","producableFrac","reqMatQtyNeeded","fooProd","fooI","businessFactor","getBusinessFactor","advertisingFactor","getAdvertisingFactors","marketFactor","getMarketFactor","markupLimit","numerator","sqrtNumerator","sqrtDenominator","denominator","sqrt","optimalPrice","marketTa2Price","sellAmt","totalExp","expI","amtStr","expIndustry","expWarehouse","engrProd","mgmtProd","opProd","mgmtFactor","processProduct","totalProfit","forProduct","netStorageSize","sCostString","businessProd","calculateEffectWithFactors","awarenessFac","popularityFac","ratioFac","updateResearchTree","expFac","linearFac","morale","happiness","energy","det","trainingEff","effCre","effEff","prodBase","checkFormulasAccess","calculateFavorToRep","_favor","calculateRepToFavor","_rep","_exp","_mult","_skill","hackPercent","growPercent","hackTime","levelUpgradeCost","_startingLevel","_extraLevels","_costMult","ramUpgradeCost","_startingRam","coreUpgradeCost","_startingCore","_extraCores","extraCores","hacknetNodeCost","constants","hacknetServers","hashGainRate","_ramUsed","_maxRam","HScalculateHashGainRate","HScalculateLevelUpgradeCost","HScalculateRamUpgradeCost","HScalculateCoreUpgradeCost","cacheUpgradeCost","_startingCache","_extraCache","extraCache","HScalculateCacheUpgradeCost","hashUpgradeCost","hacknetServerCost","HScalculateServerCost","ascensionPointsGain","ascensionMultiplier","_points","checkTixApiAccess","getStockFromSymbol","_symbol","_shares","_posType","sanitizedPosType","_pos","orderPos","ltype","lpos","stockMarketOrders","forecast","checkGraftingAPIAccess","_focus","wasFocusing","craftableAug","maxClearanceLevel","startingSecurityLevel","TechVendor","University","AevumCasino","Casino","Special","NewTokyoArcade","Sector12CityHall","Hospital","WorldStockExchange","ChongqingChurchOfTheMachineGod","IshimaGlitch","detect","hasChanges","orig","fl","backups","textfield","InteractiveTutorialRoot","contents","canNext","square","overviewContainer","visibilityToggle","collapse","Overview","setX","setY","CurrentIcon","KeyboardArrowUpIcon","KeyboardArrowDownIcon","LeftIcon","SchoolIcon","EqualizerIcon","fakeDrag","triggerMouseEvent","eventType","clickEvent","createEvent","initEvent","dispatchEvent","Loading","onStop","defaultPosition","onDoubleClick","openedMixin","transitions","easing","sharp","enteringScreen","closedMixin","leavingScreen","breakpoints","up","Drawer","styled","shouldForwardProp","active","borderLeft","listitem","SidebarRoot","hackingOpen","setHackingOpen","characterOpen","setCharacterOpen","worldOpen","setWorldOpen","helpOpen","setHelpOpen","flashTerminal","flashStats","flashActiveScripts","flashHacknet","flashCity","flashTutorial","augmentationCount","invitationsCount","programCount","getAvailableCreatePrograms","canOpenFactions","canOpenAugmentations","canOpenSleeves","canCorporation","canGang","canJob","canStockMarket","canBladeburner","canStaneksGift","clickTerminal","clickScriptEditor","clickStats","clickActiveScripts","clickCreateProgram","clickFactions","clickAugmentations","clickHacknet","clickCity","clickTravel","clickJob","clickBladeburner","clickGang","clickTutorial","handleShortcuts","altKey","E","H","R","P","F","U","G","anchor","timeout","clsx","badgeContent","AugmentationsRoot","installOpen","setInstallOpen","InstalledAugmentations","sourceAugs","Alphabetically","aug1","aug2","Improvements","BN5Stat","base","MultiplierTable","PlayerMultipliers","augP","calculateAugmentedStats","BladeburnerMults","PurchasedAugmentations","SourceFileMinus1","OwnedSourceFiles","sourceSfs","sf1","sf2","sfObj","SourceFileAccordion","DevMenuRoot","General","setError","addMoney","TransitionProps","expandIcon","bigNumber","modifyExp","modifier","modifyKarma","resetExperience","modifyFactionRep","AllFaction","modifyFactionFavor","labelId","arial-label","setAugmentation","validSFN","setSF","sfN","sfLvl","setAllSF","setProgram","AllPrograms","Servers","setServer","setCompany","modifyCompanyRep","AllCompanies","modifyCompanyFavor","modifyBladeburnerRank","modify","modifyBladeburnerCycles","modifyGangCycles","modifyCorporationFunds","modifyCorporationCycles","CodingContracts","setCodingcontract","cc","stockPrice","setStockPrice","setStockSymbol","processStocks","inputSymbols","SM","stocks","sleeveSetStoredCycles","Stanek","modCycles","modCharge","TimeSkip","timeskip","playerAchievement","setPlayerAchievements","achieved","grantAchievement","removeAchievement","Entropy","BladeburnerRoot","travelOpen","setTravelOpen","inFaction","wordBreak","gap","TravelModal","nopadding","preformatted","Line","Console","setCommand","consoleInput","consoleHistoryIndex","setConsoleHistoryIndex","Logs","tabIndex","inputRef","prevCommand","currentTarget","scrollHook","scrollTop","scrollHeight","AllPages","tab","GeneralActionPage","GeneralActionList","actions","GeneralActionElem","computedActionTimeCurrent","actionData","ContractPage","ContractList","ContractElem","Contracts","StealthIcon","KillIcon","OperationPage","OperationList","OperationElem","TeamSizeModal","BlackOpPage","BlackOpList","blackopName","blackop","BlackOpElem","hasReqdRank","SkillPage","valid","onUpgrade","SkillList","SkillElem","canLevel","GangRoot","ManagementSubpage","GangStats","territoryStr","BonusTime","CyclerPerSecond","bonusMillis","GangMemberList","ascendOnly","setAscendOnly","onRecruit","newValue","GangMemberCard","GangMemberCardContent","ascendOpen","setAscendOpen","borderRightWidth","onAscend","borderLeftWidth","onTaskChange","GangMemberStats","asc","KillScriptsModal","TaskSelector","setCurrentTask","contextMember","TaskDescription","AscensionModal","RecruitButton","RecruitModal","setName","recruit","onKeyUp","TerritorySubpage","gangNames","infoOpen","setInfoOpen","formatTerritory","OtherGangTerritory","clashVictoryChance","TerritoryInfoModal","NextReveal","PurchasedUpgrade","UpgradeButton","GangMemberUpgradePanel","currentCategory","setCurrentCategory","filterUpgrades","weaponUpgrades","armorUpgrades","vehicleUpgrades","rootkitUpgrades","augUpgrades","categories","EquipmentsSubpage","CorporationRoot","setDivisionName","canExpand","industryType","MainPanel","CityTabs","setCity","cityStateSetter","countEmployee","SwitchButton","manualMode","switchMode","ManualManagement","setEmployee","employeePositionSelectorInitialValue","employeePositions","positionNames","AutoAssignJob","numJob","numUnassigned","AutoManagement","vechain","totalMorale","totalHappiness","totalEnergy","totalSalary","avgMorale","avgHappiness","avgEnergy","IndustryOffice","upgradeOfficeSizeOpen","setUpgradeOfficeSizeOpen","throwPartyOpen","setThrowPartyOpen","employeeManualAssignMode","setEmployeeManualAssignMode","UpgradeSizeButton","upgradeSize","UpgradeOfficeSizeModal","upgradeCost","upgradeCost15","maxMult","maxNum","multIncrease","upgradeCostMax","ThrowPartyModal","setCost","canParty","EffectText","MakeProductButton","makeOpen","setMakeOpen","hasMaxProducts","createProductButtonText","Text","researchOpen","setResearchOpen","advertisingInfo","advertisingFactors","totalAdvertisingFac","convertEffectFacToGraphic","Upgrades","IndustryOverview","MakeProductModal","allCities","design","setDesign","marketing","setMarketing","createProductPopupText","Upgrade","wrapInTooltip","ele","but","ResearchModal","retainHeight","WarehouseRoot","smartSupplyOpen","setSmartSupplyOpen","canAffordUpgrade","stateText","mats","isInStock","isRelevant","breakdownItems","breakdown","previous","IndustryWarehouse","EmptyWarehouse","Leftover","setChecked","SmartSupplyModal","ProductElem","sellOpen","setSellOpen","limitOpen","setLimitOpen","discontinueOpen","setDiscontinueOpen","marketTaOpen","setMarketTaOpen","nfB","hasUpgradeDashboard","sellButtonText","limitProductionButtonText","DiscontinueProductModal","LimitProductProductionModal","setLimit","limitProductProduction","SellProductModal","iQty","setQty","setPx","initialPrice","MarketTA2","ProductMarketTaModal","MaterialElem","purchaseMaterialOpen","setPurchaseMaterialOpen","exportOpen","setExportOpen","sellMaterialOpen","setSellMaterialOpen","materialMarketTaOpen","setMaterialMarketTaOpen","tutorial","purchaseButtonText","ExportModal","possibleDivisions","defaultDivision","setIndustry","setAmt","removeExport","currentDivision","possibleCities","newCost","setNewCost","MaterialMarketTaModal","SellMaterialModal","setPrice","BulkPurchaseText","parsedAmt","BulkPurchaseSection","setBuyAmt","PurchaseMaterialModal","purchaseMaterial","IndustryProductEquation","reqs","reqAmt","ExpandNewCity","ExpandIndustryTab","possibleIndustries","newIndustry","multRows","appendMult","DividendsStats","PublicButtons","PrivateButtons","BribeButton","findInvestorsopen","setFindInvestorsopen","goPublicopen","setGoPublicopen","fundingAvailable","findInvestorsTooltip","upgradeData","sellSharesOpen","setSellSharesOpen","buybackSharesOpen","setBuybackSharesOpen","issueNewSharesOpen","setIssueNewSharesOpen","issueDividendsOpen","setIssueDividendsOpen","sellSharesOnCd","sellSharesTooltip","issueNewSharesOnCd","issueNewSharesTooltip","canBribe","totalDividends","storedTime","LevelableUpgrade","UU","BribeFactionModal","setStock","selectedFaction","setSelectedFaction","getRepText","SellSharesModal","setShares","ProfitIndicator","BuybackSharesModal","CostIndicator","IssueDividendsModal","setPercent","canIssue","maxNewSharesUnrounded","maxNewShares","newShares","IssueNewSharesModal","issueNewShares","privateShares","FindInvestorsModal","GoPublicModal","calcRawDiff","startingDifficulty","InfiltrationRoot","setStart","calcDifficulty","calcReward","StartingDifficulty","Difficulty","Reward","cancel","arrowPart","arrow","Intro","Stage","minigames","SlashGame","BracketGame","BackwardGame","BribeGame","CheatCodeGame","Cyberpunk2077Game","MinesweeperGame","WireCuttingGame","setLevel","stage","setStage","Countdown","results","setResults","gameIds","setGameIds","lastGames","nextGameId","ids","setupNextGame","pushResult","next","stageComponent","onFinish","Minigame","MiniGame","onSuccess","Sell","onFailure","automated","Progress","difficulties","timer","setRight","OPEN_BRACKET","LESS_THAN","OPEN_PARENTHESIS","OPEN_BRACE","generateLeftSide","CLOSE_PARENTHESIS","CLOSE_BRACKET","CLOSE_BRACE","GREATER_THAN","getChar","phase","setPhase","words","makeAnswer","setGuess","BACKSPACE","nextGuess","positive","option","negative","array","shuffleArray","makeChoices","setIndex","newIndex","arrows","generateCode","puzzle","randChar","generatePuzzle","generateAnswer","setPos","move","mines","minefield","field","generateEmptyField","generateMinefield","memoryPhase","setMemoryPhase","fieldEquals","wiresmin","wiresmax","rules","PIPE","DOT","FORWARD_SLASH","HYPHEN","HASH","colorNames","blue","wires","numWires","wireColors","generateWires","cutWires","setCutWires","questions","numQuestions","questionGenerators","randomPositionQuestion","randomColorQuestion","generateQuestion","question","wire","wireNum","shouldCut","checkWire","wiresToBeCut","shouldBeCut","cutColor","Victory","quitInfiltration","levelBonus","CYCLES_PER_SEC","WorkInProgressRoot","unfocus","stopText","numBars","progressBar","GameOptionsRoot","importInput","execTime","setExecTime","logSize","setLogSize","portSize","setPortSize","terminalSize","setTerminalSize","autosaveInterval","setAutosaveInterval","timestampFormat","setTimestampFormat","setLocale","diagnosticOpen","setDiagnosticOpen","importSaveOpen","setImportSaveOpen","importData","setImportData","gutterBottom","sm","valueLabelDisplay","marks","method","alt","File","FileList","ii","ex","confirmedImportGame","ServerAccordion","FileDiagnosticModal","ColorEditor","onColorChange","defaultColor","hideTextfield","deferred","newColor","disableAlpha","ThemeEditorModal","customTheme","setCustomTheme","setTemplateTheme","py","placement","maxRows","importedTheme","FontFamilyField","refreshId","errorText","setErrorText","setFontFamily","LineHeightField","setLineHeight","StyleEditorModal","setRefreshId","customStyle","setCustomStyle","persistToSettings","endIcon","SleeveRoot","FAQOpen","setFAQOpen","SleeveElem","statsOpen","setStatsOpen","earningsOpen","setEarningsOpen","augmentationsOpen","setAugmentationsOpen","abc","setABC","doing","SleeveAugmentationsModal","MoreStatsModal","MoreEarningsModal","universitySelectorOptions","gymSelectorOptions","possibleJobs","forbiddenCompanies","otherSleeve","possibleFactions","forbiddenFactions","facInfo","second","universities","gyms","Synchronize","canDo","getABC","s0","setS0","setS1","setS2","validActions","detailsF","details2","detail","FAQModal","HacknetRoot","purchaseMultiplier","setPurchaseMultiplier","purchaseMultiplierOnClicks","onClicks","GeneralInfo","HacknetNodeElem","purchaseMult","upgradeLevelButton","upgradeRAMButton","upgradeCoresButton","increase","upgradeLevelCost","upgradeRamCost","upgradeCoreCost","HacknetServerElem","upgradeRamButton","upgradeCacheButton","upgradeCacheCost","HashUpgradeModal","serversMap","HacknetUpgradeElem","selectedServer","setSelectedServer","MultiplierButton","MultiplierButtons","buttons","btnProps","PlayerInfo","hasServers","PurchaseButton","GenericLocation","locContent","locName","getLocationSpecificContent","serverMeta","CompanyLocation","quitOpen","setQuitOpen","isEmployedHere","favorGain","onQuit","QuitJobModal","GymLocation","train","HospitalLocation","btnStyle","getHealed","currHp","SlumsLocation","shopliftChance","robStoreChance","mugChance","larcenyChance","drugsChance","bondChance","armsChance","homicideChance","gtaChance","kidnapChance","assassinateChance","heistChance","SpecialLocation","handleBladeburner","new","worldHeader","HTMLElement","handleGrafting","CreateCorporation","handleCotMG","renderBladeburner","renderCotMG","CreateCorporationModal","canSelfFund","n00dlePower","ArcadeRoot","Megabyteburner2000","currentGame","BBCabinetRoot","origin","joystick","borderStyle","borderWidth","ServerButton","TechVendorLocation","purchaseServerButtons","RamButton","TorButton","purchaseTorRouter","darkweb","CoresButton","maxCores","PurchaseServerModal","setHostname","tryToPurchaseServer","TravelConfirmationModal","UniversityLocation","take","dataStructuresCost","networksCost","algorithmsCost","managementCost","leadershipCost","GameType","CasinoLocation","setGame","Coin","Slots","Roulette","numDecks","shuffle","drawCard","CoinFlip","investment","setInvestment","setResult","setStatus","playLock","setPlayLock","play","correct","redNumbers","strategies","Red","payout","Black","Odd","Even","High","Low","Third1","Third2","Third3","Single","canPlay","setCanPlay","setN","lock","setLock","strategy","playerWin","isRed","currentNumber","getPayout","payLines","SlotMachine","locks","setLocks","stoppedOne","getPaylineData","payline","point","countSequence","checkWinnings","getTable","LocationLetter","ASCIICity","locationLettersRegex","letterMap","K","M","N","Q","V","Y","lineElems","elems","startI","endI","locationI","ListCity","locationButtons","LocationCity","OptionsModal","setInsertSpaces","setFontSize","setWordWrap","setVim","defineTheme","inherit","foreground","fontStyle","MilestonesRoot","milestones","highestMilestone","milestone","ActionTimer","paragraph","TerminalRoot","setKey","doScroll","hook","scrollIntoView","debounced","maxWait","unsubscribe","scrollId","TerminalInput","terminalInput","postUpdateValue","setPostUpdateValue","possibilities","setPossibilities","saveValue","postUpdate","modifyInput","mod","inputLength","selectionStart","inputText","delStart","moveTextCursor","keyDown","autoComplete","TAB","semiColonIndex","allPos","determineAllPossibilitiesForTabCompletion","tabCompletion","selectionEnd","parentDirPath","evaledParentDirPath","addAllCodingContracts","cct","addAllLitFiles","addAllPrograms","addAllScripts","processFilepath","addAllTextFiles","addAllDirectories","subdirs","getSubdirectories","t_parentDirPath","convertParentPath","isCommand","cmd","t_cmd","autocomplete","runArgs","permissive","flagFunc","autocompleteData","txts","schema","pos2","scriptAutocomplete","addAllMessages","t_dir","processFile","subdir","allPossibilities","oldValue","longestStartSubstr","TutorialRoot","confirmResetOpen","setConfirmResetOpen","ActiveScriptsRoot","setTab","ScriptProduction","prodRateSinceLastAug","ServerAccordions","setRowsPerPage","serverToScriptMap","filtered","rowsPerPageOptions","newPage","onRowsPerPageChange","ActionsComponent","paddedName","barOptions","headerTxt","ServerAccordionContent","disablePadding","noborder","WorkerScriptAccordion","killScript","onlineMps","onlineEps","RecentScriptsPage","recentScript","RecentScriptAccordion","MainPage","onAugmentations","sleevesOpen","setSleevesOpen","gangOpen","setGangOpen","isPlayersGang","favorToDonate","canDonate","canPurchaseSleeves","startHackingContracts","startFieldWork","startSecurityWork","FactionRoot","purchasingAugs","setPurchasingAugs","routeToMainPage","AugmentationsPage","getAugs","switchSortOrder","newOrder","Cost","augName1","augName2","getAugsSortedByCost","getAugsSortedByReputation","Purchasable","canBuy","hasReq","hasRep","cantBuy","getAugsSortedByPurchasable","getAugsSorted","purchasable","purchaseableAugmentation","augListElems","ownedElem","Requirements","PurchaseableAugmentation","hasCost","btnTxt","PurchaseAugmentationModal","DonateOption","donateAmt","setDonateAmt","Status","noformat","Info","CreateGangModal","CovenantPurchasesRoot","setUpdate","purchaseDisabled","upgradePanels","CovenantSleeveMemoryUpgrade","maxMemory","purchaseBtnDisabled","purchaseBtnContent","LastEmployer","LastJob","Employers","bn5Stat","CurrentBitNode","MoneyModal","convertMoneySourceTrackerToString","parts","infiltration","CharacterStats","moneyOpen","setMoneyOpen","timeRows","StockMarketRoot","Purchase4SMarketDataTixApiAccessButton","PurchaseWseAccountButton","PurchaseTixApiAccessButton","Purchase4SMarketDataButton","InfoAndPurchases","StockTickers","setTickerDisplayMode","AllStocks","watchlistSymbols","setWatchlistSymbols","tickers","stockMarketProp","rerenderAllTickers","sanitizedWatchlist","SelectorOrderType","StockTicker","setOrderType","Market","tickerOpen","setTicketOpen","modalProps","setModalProps","placeText","getQuantity","hasOrderAccess","Limit","Stop","getBuyTransactionCostContent","getSellTransactionCostContent","playerMoney","localesWithLongPriceFormat","StockTickerHeaderText","stockPriceFormat","spacesAllottedForStockPrice","spacesAfterStockName","spacesBeforePrice","hdrText","plusOrMinus","StockTickerOrderList","StockTickerOrder","posTxt","LongPosition","percentageGains","ShortPosition","StockTickerPositionText","PlaceOrderModal","portal","level0","level1","level2","level3","BitNodePortal","portalOpen","setPortalOpen","cssClass","aria-description","BitverseRoot","destroyed","destroySequence","setDestroySequence","nextSourceFileFlags","PortalModal","bitNodeKey","maxSourceFileLevel","newLevel","CinematicLine","setLength","ms","newLength","advance","StaneksGiftRoot","gift","zeros","MainBoard","calculateGrid","newgrid","setGrid","ghostGrid","setGhostGrid","setRotation","selectedFragment","setSelectedFragment","moveGhost","clickAt","deleteAt","randomColor","doRotate","selectFragment","FragmentInspector","setC","FragmentOption","colorAt","FragmentSelector","FragmentPreview","getComputedStyle","Element","AchievementsRoot","AchievementList","cssPrimary","cssSecondary","secret","unavailable","locked","pr","defaultExpanded","AchievementIcon","imgLoaded","setImgLoaded","onLoad","ErrorBoundary","Component","hasError","componentDidCatch","previousScrollY","modalOpen","setModalOpen","modalImageSrc","setModalImageSrc","predefinedThemes","themes","templateTheme","onActivated","scrollY","previousColors","onImageClick","handleZoom","ThemeEntry","subheader","image","ComparisonIcon","isBetter","initialAutosave","ImportSaveRoot","currentData","setCurrentData","importModalOpen","setImportModalOpen","headback","setHeadback","dataBeingImported","dataCurrentlyInGame","fetchData","BypassWrapper","frames","Apr1","isApr1","allow","getAugmentation","getFaction","getCompany","runAfterReset","cbScript","_purchased","_facName","_cbScript","_locationName","locationName","_programName","baseserver","installTime","jobTitles","_companyName","wasFocused","_field","repNeededToDonate","empty","srcFile","sourceFileObject","incMult","decMult","normalServer","relative_filename","evaledDir","t_dst","dst","srcExt","tRes","sRes","sanitizedExpr","used","avail","usedPercent","incorrectUsage","newPath","allPrograms","allScripts","allTextFiles","allContracts","allMessages","folders","handleFn","dest","parsedFn","firstParentDir","msgOrLit","ClickableScriptRow","scriptLinksWrap","scriptLink","textDecorationLine","paddingRight","rowSplitArray","rowItem","onScriptLinkClick","postSegments","segments","linked","filesPerRow","groups","numThreads","verboseEntries","t_dest","sourcePath","destFile","destPath","positions","getCursor","re","matching","rsObj","delTarget","executableName","runContract","runProgram","commandArgs","threadFlag","tailFlag","toLocaleLowerCase","hasRoot","maxHostname","maxIP","args2","headers","currRunningScripts","numSpacesScript","spacesScript","numSpacesPid","spacesPid","numSpacesThread","spacesThread","tampering","last","minute","timeCompression","ReactDOM","globalThis","onbeforeunload"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,GAAY,EACRC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,GAAY,GAE3CA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC5Be,EAASM,EAAoBA,EAAoBC,EAAIN,EAAe,KAItE,OAAOD,EAIR,IAAIQ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AIqHp3C,IAAao3C,aAJlI,uDAQF,IACA,GACA,GACA,GACA,GACA,GACA,GAIF,CAACp3C,IAAas0E,uBAAwB,IAAIotC,EAAY,oCACnD,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAChC,gCAAgC,6BAAM,6BA5Ba,4HA+BpD,6BAAM,6BA/B8C,wFAiCpD,IACA,GACA,GACA,GACA,GACA,GACA,K,6BCxjBJ,kCAIO,MAAMI,EAAgD,CAE3D,EAAK,CACH,EACA,IACA,KACA,IACA,kBACA,kKAKF,EAAK,CACH,EACA,IACA,KACA,GACA,gBACA,kKAKF,EAAK,CACH,EACA,IACA,IACA,KACA,aACA,4TAQF,EAAK,CACH,EACA,IACA,IACA,KACA,mBACA,sKAMF,EAAK,CACH,EACA,IACA,KACA,GACA,wCACA,gLAMF,EAAK,CACH,EACA,IACA,KACA,GACA,4BACA,kKAKF,EAAK,CACH,EACA,IACA,KACA,GACA,sBACA,wKAMF,EAAK,CACH,EACA,IACA,KACA,GACA,aACA,6JAKF,EAAK,CACH,EACA,IACA,KACA,IACA,gBACA,4LAMF,EAAK,CACH,EACA,IACA,KACA,IACA,kBACA,6M,4MC5GG,MAAM7jE,EAWXriD,cAAc,kBARH,GAQG,gBALL,GAKK,kBAFW,IAGvB,IAAK,MAAMxC,KAAQ5B,OAAOqxB,KAAK21B,KAC7B3iD,KAAKyoD,SA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MACXC,QAAS,KACTF,KACE,6JAEFI,QAAS,CAACpP,IAAkBowG,YAC5BtgG,eAAgB,IAChBX,SAAU,CACR7yB,IAAa+0C,YACb/0C,IAAai1C,aACbj1C,IAAa0vB,SACb1vB,IAAa4yC,oBACb5yC,IAAakzC,sBACblzC,IAAamyC,mBAGjB,IAAI3f,IAAa,CACfp5B,KAAMsqB,IAAkBswG,WACxBrhG,UAAW,MACXC,QAAS,MACTF,KAAM,yGACNI,QAAS,CAACpP,IAAkBqwG,YAC5BvgG,eAAgB,IAChBX,SAAU,CACR7yB,IAAa+0C,YACb/0C,IAAai1C,aACbj1C,IAAa4yC,oBACb5yC,IAAakzC,sBACblzC,IAAamyC,gBACbnyC,IAAawxC,eAGjB,IAAIhf,IAAa,CACfp5B,KAAMsqB,IAAkBuwG,eACxBthG,UAAW,OACXC,QAAS,KACTF,KACE,0IAEFe,aAAc,IACdH,cAAe,IACfT,SAAU,CACR7yB,IAAakzC,sBACblzC,IAAaqzC,0BACbrzC,IAAa20C,mBACb30C,IAAasyC,IACbtyC,IAAawxC,YACbxxC,IAAasxC,SACbtxC,IAAaixC,cAGjB,IAAIze,IAAa,CACfp5B,KAAMsqB,IAAkBwwG,gBACxBthG,QAAS,OACTD,UAAW,OACXD,KACE,mSAGFY,cAAe,IACfC,aAAc,IACdV,SAAU,CACR7yB,IAAakzC,sBACblzC,IAAaqzC,0BACbrzC,IAAa20C,mBACb30C,IAAasyC,IACbtyC,IAAawxC,YACbxxC,IAAasxC,SACbtxC,IAAaixC,WACbjxC,IAAamyC,mBAGjB,IAAI3f,IAAa,CACfp5B,KAAMsqB,IAAkBywG,WACxBvhG,QAAS,KACTD,UAAW,OACXD,KACE,wIAEFY,cAAe,IACfC,aAAc,IACdV,SAAU,CACR7yB,IAAau1C,WACbv1C,IAAa+0C,YACb/0C,IAAai1C,aACbj1C,IAAa6vB,SACb7vB,IAAa4vB,OACb5vB,IAAa4yC,oBACb5yC,IAAakzC,sBACblzC,IAAamyC,mBA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FACA,8EACA,kFACA,mHACA,oEACA,kGACA,wEACA,oEACA,gFACA,6FACA,4FACA,6EACA,2FACA,iGACA,6EACA,4GACA,0FACA,yEACA,uEACA,gGACA,iGACA,iFACA,+FACA,0FACA,4FACA,uEACA,wHACA,sFACA,iFACA,KAGIC,EACW3yC,GACN,CACJ,UAASA,wBACT,IACA,8GACA,4FACA,IACA,4CAA2CA,kDAC3C,kBAAiBA,yEACjB,IACA,YACA,IACA,OAAMA,YACN,OAAMA,qBACN,IACA,OAAMA,WACN,OAAMA,iBACN,KAKM4yC,EAA4B,CACvC3yD,MAAO,CACL,oCACA,IACA,4FACA,uGACA,yHACA,kGACA,IACA,gCACA,IACA,mHACA,yHACA,4CACA,IACA,gCACA,IACA,6DACA,IACA,eACA,IACA,2HACA,4HACA,IACA,mCACA,IACA,8GACA,IACA,uHACA,uCACA,IACA,uDACA,KAEF4yD,QAAS,CACP,iBACA,IACA,0GACA,mHACA,kHACA,gCACA,KAEFC,SAAU,CACR,kBACA,IACA,6FACA,IACA,+BACA,KAEFr1H,IAAK,CACH,iCACA,IACA,yEACA,IACA,oHACA,oDACA,IACA,+FACA,IACA,wGACA,KAEFs1H,IAAK,CACH,oBACA,IACA,6EACA,IACA,iBACA,IACA,kBACA,IACA,sBACA,KAEF9e,GAAI,CACF,kBACA,IACA,yGACA,iFACA,IACA,yBACA,IACA,eACA,IACA,aACA,KAEF+e,MAAO,CACL,uCACA,IACA,+HACA,uDACA,kIACA,IACA,oCACA,IACA,gGACA,IACA,sCACA,KAEFh0H,MAAO,CACL,eACA,IACA,mIACA,uIACA,KAEFi0H,IAAK,CACH,aACA,IACA,mIACA,yIACA,KAEFhyH,QAAS,CACP,4BACA,IACA,+FACA,sIACA,iEACA,KAEFiyH,GAAI,CAAC,wBAAyB,IAAK,wEAAyE,KAC5G/nE,SAAU,CACR,qCACA,IACA,mFACA,IACA,4GACA,IACA,kDACA,IACA,0CACA,IACA,0CACA,KAEFgoE,KAAM,CACJ,wCACA,IACA,oFACA,IACA,oBACA,IACA,WACA,IACA,wBACA,IACA,qFACA,KAEFC,KAAM,CACJ,cACA,IACA,gIACA,gCACA,KAEFv5H,KAAM,CACJ,cACA,IACA,6GACA,2CACA,KAEFT,KAAM,CACJ,cACA,IACA,uHACA,KAEFi6H,KAAM,CACJ,wBACA,IACA,yHACA,0HACA,mEACA,IACA,iBACA,IACA,wBACA,KAEFC,QAAS,CACP,sBACA,IACA,6GACA,KAEF5qG,KAAM,CACJ,cAAe,IAAK,sGAAuG,KAE7H1Y,SAAU,CAAC,kBAAmB,IAAK,4CAA6C,KAChF7U,KAAM,CACJ,mDACA,IACA,4EACA,IACA,6EACA,4EACA,iFACA,4DACA,IACA,uCACA,IACA,qEACA,IACA,wCACA,IACA,qFACA,KAEFC,QAAS,CACP,iBACA,IACA,4CACA,2HACA,uHACA,2EACA,KAEFI,GAAI,CACF,wCACA,IACA,iIACA,sDACA,IACA,8FACA,IACA,gFACA,IACA,yHACA,IACA,YACA,IACA,wEACA,IACA,2BACA,IACA,iEACA,IACA,yBACA,IACA,uFACA,IACA,oCACA,KAEF+3H,MAAO,CAAC,eAAgB,IAAK,wDAAyD,KAEtFC,IAAK,CACH,4CACA,IACA,6HACA,2HACA,gFACA,IACA,qBACA,IACA,2BACA,IACA,4HACA,iFACA,KAEFlzH,GAAI,CACF,yBACA,IACA,6FACA,6FACA,kCACA,IACA,kFACA,kBACA,aACA,IACA,qEACA,IACA,oCACA,KAEFmzH,KAAMd,EAAgC,QACtCl3H,GAAI,CAAC,YAAa,IAAK,4DAA6D,KACpF2D,GAAI,CACF,mBACA,IACA,6GACA,IACA,kDACA,KAEFpE,IAAK,CACH,sDACA,IACA,gDACA,IACA,sHACA,2GACA,gEACA,2DACA,2FACA,IACA,kHACA,iFACA,KAEF7B,KAAM,CACJ,cACA,IACA,6HACA,2CACA,KAEF,eAAgB,CACd,mCACA,IACA,kGACA,wGACA,4EACA,IACA,uGACA,qGACA,0BACA,IACA,iHACA,yGACA,UACA,I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,SAAUL,GAEtDA,EAAU,SAAU4D,EAAeC,GACjC,OAAOlrF,MAAMh1D,UAAU4H,QAAQnH,MAAM2D,KAAKo6I,WAAYrP,YAExD/qI,KAAKi6I,2BAA2Bj6I,KAAKs4I,MAAO,UAAWL,GAEvDA,EAAU,SAAU4D,EAAeC,GACjC,OAAOlrF,MAAMh1D,UAAU61D,YAAYp1D,MAAM2D,KAAKo6I,WAAYrP,YAE5D/qI,KAAKi6I,2BAA2Bj6I,KAAKs4I,MAAO,cAAeL,GAE3DA,EAAU,WAER,OADArnF,MAAMh1D,UAAU+uB,KAAK7uB,KAAKkE,KAAKo6I,YACxBp6I,MAETA,KAAKi6I,2BAA2Bj6I,KAAKs4I,MAAO,OAAQL,GAEpDj4I,KAAKm1I,WAAWn5I,KAGd,kDACA,8CACA,kCACA,oEACA,YACA,wBACA,4BACA,yCACA,SACA,oBACA,+DACA,OACA,IACA,eACA,IACA,MAIA,mDACA,8CACA,+BACA,wFACA,wBACA,4BACA,gBACA,+DACA,kCACA,gBACA,kBACA,mDACA,IACA,IACA,cACA,IACA,MAKA,+BACA,mDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,iBACA,IACA,OACA,IACA,oBACA,KACA,sBACA,iBACA,MACA,IAKA,oCACA,wDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,YACA,IACA,OACA,IACA,aACA,KACA,sBACA,iBACA,MACA,IAIA,oDACA,8CACA,gCACA,kEACA,YACA,wBACA,4BACA,yCACA,SACA,oBACA,4CACA,OACA,IACA,IACA,MAIA,uDACA,8CACA,sBACA,0DACA,IACA,yCACA,wBACA,mDACA,4BACA,mCACA,mBACA,gBACA,IACA,yCACA,qEACA,yBACA,uBACA,qBACA,oBACA,2BACA,+BACA,uDACA,iCACA,8FACA,IACA,8BACA,oBACA,+DACA,wEACA,4CACA,eACA,IACA,0BACA,OACA,IACA,qBACA,gBACA,IACA,MAIA,gDACA,8CACA,gCACA,8DACA,eACA,wBACA,4BACA,yCACA,sBACA,SACA,oBACA,mDACA,OACA,IACA,YACA,IACA,MAIA,mDACA,8CACA,0CACA,kEACA,4DACA,gCACA,wBACA,WACA,oCACA,kBACA,kEACA,IACA,kBACA,IACA,yBACA,mDACA,IACA,gBACA,IACA,MAIA,wDACA,8CACA,0CACA,yGACA,kEACA,+BACA,wBACA,WACA,mCACA,eACA,kEACA,IACA,kBACA,IACA,wBACA,mDACA,IACA,gBACA,IACA,MAIA,iDACA,8CACA,+BACA,6DACA,wBACA,4BACA,+DACA,kCACA,iDACA,eACA,IACA,IACA,gBACA,IACA,MAEA,gBACA,oCACA,8CAEA,wCACA,2BACA,IAEA,0CACA,mBACA,kDACA,4CACA,sBACA,yBACA,sBACA,aACA,IACA,IACA,uBACA,IACA,eACA,KACA,QAEA,2DACA,8CACA,eACA,gBACA,0CACA,wFACA,IACA,wBACA,IACA,MACA,KAQJ+wF,EAAYnxF,UAAUu7I,WAAa,SAAUlrD,GAC3C,IACIgsD,EADAN,EAAkB33I,KAGtBi4I,EAAU,SAAUj6I,GAElB,OADAA,EAAQg9E,OAAOh9E,GACX25I,EAAgBmB,iBAElB94I,KAAK9E,KAAO8C,EACLgC,MAGAhC,GAGXgC,KAAK+7I,OAAS/7I,KAAK4sF,qBAAqBqrD,GAAS,GACjDj4I,KAAK0sF,YAAYT,EAAO,SAAUjsF,KAAK+7I,QAGvC/7I,KAAK0sF,YACH1sF,KAAK+7I,OACL,eACA/7I,KAAK4sF,qBAAqB5R,OAAOghE,cAAc,GAC/CjvD,EAAYipD,0BAoBd,IAfA,IAAIiG,EAAY,CACd,SACA,aACA,SACA,UACA,cACA,QACA,SACA,YACA,oBACA,oBACA,cACA,cACA,QAEOzgJ,EAAI,EAAGA,EAAIygJ,EAAUvgJ,OAAQF,IACpCwE,KAAKi6I,2BAA2Bj6I,KAAK+7I,OAAQE,EAA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,mBACN2X,KAAM,KACNykB,KACE,kRAMJ,CACEp8B,KAAM,gCACN2X,KAAM,IACNykB,KACE,qIAGJ,CACEp8B,KAAM,kBACN2X,KAAM,IACNykB,KACE,iHAGJ,CACEp8B,KAAM,kBACN2X,KAAM,KACNykB,KACE,+IAEF60I,gBAAiB,IACjBD,gBAAiB,IACjBE,gBAAiB,IACjBC,gBAAiB,KAEnB,CACEnxK,KAAM,SACN2X,KAAM,IACNykB,KACE,2IAGJ,CACEp8B,KAAM,oBACN2X,KAAM,KACNykB,KACE,gIAEFg1I,eAAgB,KAElB,CACEpxK,KAAM,qBACN2X,KAAM,IACNykB,KACE,2IAGFo1I,YAAa,KAEf,CACExxK,KAAM,WACN2X,KAAM,KACNykB,KACE,yKAIJ,CACEp8B,KAAM,yBACN2X,KAAM,IACNykB,KACE,6NAIFm1I,gBAAiB,KAEnB,CACEvxK,KAAM,sBACN2X,KAAM,KACNykB,KACE,gLAIJ,CACEp8B,KAAM,mBACN2X,KAAM,IACNykB,KACE,4MAIJ,CACEp8B,KAAM,UACN2X,KAAM,IACNykB,KAAM,8FAER,CACEp8B,KAAM,cACN2X,KAAM,IACNykB,KACE,mTAMJ,CACEp8B,KAAM,eACN2X,KAAM,IACNykB,KACE,oZAOJ,CACEp8B,KAAM,YACN2X,KAAM,KACNykB,KACE,6NAIF80I,gBAAiB,KACjBC,gBAAiB,MAEnB,CACEnxK,KAAM,6BACN2X,KAAM,KACNykB,KACE,4LAGFg1I,eAAgB,KAElB,CACEpxK,KAAM,SACN2X,KAAM,IACNykB,KACE,qKAIJ,CACEp8B,KAAM,cACN2X,KAAM,KACNykB,KAAM,mGAER,CACEp8B,KAAM,sBACN2X,KAAM,IACNykB,KACE,qKAIJ,CACEp8B,KAAM,uBACN2X,KAAM,IACNykB,KACE,qKAIJ,CACEp8B,KAAM,qBACN2X,KAAM,IACNykB,KACE,oMAIJ,CACEp8B,KAAM,mBACN2X,KAAM,IACNykB,KACE,kIAEFi1I,sBAAuB,Q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A,aACA,YACA,OACA,SACA,WACA,QACA,aACA,SACA,UACA,cACA,UACA,OACA,MACA,WACA,SACA,cACA,MACA,aACA,WACA,OACA,MACA,UACA,QACA,WACA,UACA,aACA,QACA,UACA,MACA,OACA,SACA,WACA,WACA,UACA,QACA,cACA,cACA,YACA,SACA,OACA,SACA,QACA,WACA,WACA,WACA,OACA,SACA,WACA,YACA,OACA,OACA,YACA,YACA,OACA,QACA,UACA,YACA,WACA,aACA,YACA,OACA,WACA,WACA,SACA,MACA,WACA,UACA,SACA,gBACA,OACA,QACA,UACA,QACA,QACA,UACA,YACA,QACA,YACA,UACA,QACA,SACA,SACA,QACA,UACA,cACA,QACA,aACA,MACA,UACA,OACA,WACA,WACA,UACA,SACA,aACA,YACA,SACA,SACA,SACA,OACA,WACA,QACA,OACA,WACA,SACA,SACA,WACA,SACA,UACA,QACA,SACA,QACA,UACA,UACA,UACA,UACA,aACA,WACA,QACA,SACA,MACA,WACA,SACA,aACA,UACA,MACA,OACA,SACA,UACA,OACA,OACA,UACA,SACA,aACA,SACA,SACA,SACA,SACA,SACA,WACA,SACA,YACA,QACA,QACA,YACA,WACA,oBACA,WACA,OACA,UACA,cACA,UACA,SACA,UACA,gBACA,OACA,SACA,QACA,MACA,WACA,WACA,WACA,cACA,SACA,UACA,QACA,eACA,WACA,OACA,OACA,SACA,MACA,OACA,iBACA,WACA,UACA,UACA,UACA,iBACA,QACA,MACA,YACA,UACA,SACA,OACA,SACA,UACA,WACA,YACA,cACA,MACA,OACA,MACA,MACA,Q,6BCvTF,iHAgBA,MAAMf,EAKF,CACFh1G,QAAS,CAAEi1G,MAAO,KAAOjhJ,KAAM,GAC/BisC,OAAQ,CAAEg1G,MAAO,IAAMjhJ,KAAM,GAC7BksC,KAAM,CAAE+0G,MAAO,IAAMjhJ,KAAM,GAC3BmsC,WAAY,CAAE80G,MAAO,KAAMjhJ,KAAM,KAG5B,SAASo/I,EAAUt+K,GACxB,MAAM+xB,EAAyB,CAAEouJ,MAAO,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DAA6D5pB,EAAEi2G,OAAOt8J,QAAQqmD,EAAEi2G,OAAOtsI,2CAE1FzF,YAAgB0lD,S,kGCpBtB,wEAgBA,SAAS7T,IACPgkB,cACAm8I,IAAS36D,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEF3yF,SAASo8C,eAAe,SAhB5B3X,cACA8oH,WAAU,MAAYhoM,IACtBgoM,WAAU,SAAeD,IACzBA,IAAS36D,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEF3yF,SAASo8C,eAAe,SAcxBlrC,IAAYvjB,UAAUR,GAIwBx4B,SAAS6qC,KAAK9+B,WAAW,aACvEruC,OAAOm7N,eAAiB,WACtB,MAAO,6B","file":"main.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1507,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { sanitizeExploits } from \"./Exploits/Exploit\";\n\nimport { Reviver } from \"./utils/JSONReviver\";\n\nexport let Player = new PlayerObject();\n\nexport function loadPlayer(saveString: string): void {\n Player = JSON.parse(saveString, Reviver);\n Player.money = parseFloat(Player.money as any);\n Player.exploits = sanitizeExploits(Player.exploits);\n}\n","import numeral from \"numeral\";\nimport \"numeral/locales/bg\";\nimport \"numeral/locales/cs\";\nimport \"numeral/locales/da-dk\";\nimport \"numeral/locales/de\";\nimport \"numeral/locales/en-au\";\nimport \"numeral/locales/en-gb\";\nimport \"numeral/locales/es\";\nimport \"numeral/locales/fr\";\nimport \"numeral/locales/hu\";\nimport \"numeral/locales/it\";\nimport \"numeral/locales/lv\";\nimport \"numeral/locales/no\";\nimport \"numeral/locales/pl\";\nimport \"numeral/locales/ru\";\n\nimport { Settings } from \"../Settings/Settings\";\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\nconst gigaMultiplier = { standard: 1e9, iec60027_2: 2 ** 30 };\n\nclass NumeralFormatter {\n // Default Locale\n defaultLocale = \"en\";\n\n constructor() {\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l: string): boolean {\n if (numeral.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n\n numeral.locale(this.defaultLocale);\n return false;\n }\n return true;\n }\n\n format(n: number, format: string): string {\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 const answer = numeral(n).format(format);\n if (answer === \"NaN\") {\n return `${n}`;\n }\n return answer;\n }\n\n formatBigNumber(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\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 formatReallyBigNumber(n: number, decimalPlaces = 3): string {\n const nAbs = Math.abs(n);\n if (n === Infinity) return \"∞\";\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < nAbs && nAbs <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n if (nAbs < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\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: number): string {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n: number): string {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n: number): string {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatSecurity(n: number): string {\n return n.toFixed(3);\n }\n\n formatRAM(n: number): string {\n if (Settings.UseIEC60027_2) {\n return this.format(n * gigaMultiplier.iec60027_2, \"0.00ib\");\n }\n return this.format(n * gigaMultiplier.standard, \"0.00b\");\n }\n\n formatPercentage(n: number, decimalPlaces = 2): string {\n const formatter: string = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n: number): string {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n: number): string {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n: number): string {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n: number): string {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatStaneksGiftHeat(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftCharge(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftPower(n: number): string {\n return this.format(n, \"0.00\");\n }\n\n parseCustomLargeNumber(str: string): number {\n const numericRegExp = new RegExp(\"^(-?\\\\d+\\\\.?\\\\d*)([\" + extraNotations.join(\"\") + \"]?)$\");\n const match = str.match(numericRegExp);\n if (match == null) {\n return NaN;\n }\n const [, number, notation] = match;\n const notationIndex = extraNotations.indexOf(notation);\n if (notationIndex === -1) {\n return NaN;\n }\n return parseFloat(number) * extraFormats[notationIndex];\n }\n\n largestAbsoluteNumber(n1: number, n2 = 0, n3 = 0): number {\n if (isNaN(n1)) n1 = 0;\n if (isNaN(n2)) n2 = 0;\n if (isNaN(n3)) n3 = 0;\n const largestAbsolute = Math.max(Math.abs(n1), Math.abs(n2), Math.abs(n3));\n switch (largestAbsolute) {\n case Math.abs(n1):\n return n1;\n case Math.abs(n2):\n return n2;\n case Math.abs(n3):\n return n3;\n }\n return 0;\n }\n\n parseMoney(s: string): number {\n // numeral library does not handle formats like 1s (returns 1) and 1e10 (returns 110) well,\n // so if more then 1 return a valid number, return the one farthest from 0\n const numeralValue = numeral(s).value();\n const parsed = parseFloat(s);\n const selfParsed = this.parseCustomLargeNumber(s);\n // Check for one or more NaN values\n if (isNaN(parsed) && numeralValue === null && isNaN(selfParsed)) {\n // 3x NaN\n return NaN;\n } else if (isNaN(parsed) && isNaN(selfParsed)) {\n // 2x NaN\n return numeralValue;\n } else if (numeralValue === null && isNaN(selfParsed)) {\n // 2x NaN\n return parsed;\n } else if (isNaN(parsed) && numeralValue === null) {\n // 2x NaN\n return selfParsed;\n } else if (isNaN(parsed)) {\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, selfParsed);\n } else if (numeralValue === null) {\n // 1x NaN\n return this.largestAbsoluteNumber(parsed, selfParsed);\n } else if (isNaN(selfParsed)) {\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, parsed);\n } else {\n // no NaN\n return this.largestAbsoluteNumber(numeralValue, parsed, selfParsed);\n }\n }\n}\n\nexport const numeralWrapper = new NumeralFormatter();\n","export enum FactionNames {\n Illuminati = \"Illuminati\",\n Daedalus = \"Daedalus\",\n TheCovenant = \"The Covenant\",\n ECorp = \"ECorp\",\n MegaCorp = \"MegaCorp\",\n BachmanAssociates = \"Bachman & Associates\",\n BladeIndustries = \"Blade Industries\",\n NWO = \"NWO\",\n ClarkeIncorporated = \"Clarke Incorporated\",\n OmniTekIncorporated = \"OmniTek Incorporated\",\n FourSigma = \"Four Sigma\",\n KuaiGongInternational = \"KuaiGong International\",\n FulcrumSecretTechnologies = \"Fulcrum Secret Technologies\",\n BitRunners = \"BitRunners\",\n TheBlackHand = \"The Black Hand\",\n NiteSec = \"NiteSec\",\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n SpeakersForTheDead = \"Speakers for the Dead\",\n TheDarkArmy = \"The Dark Army\",\n TheSyndicate = \"The Syndicate\",\n Silhouette = \"Silhouette\",\n Tetrads = \"Tetrads\",\n SlumSnakes = \"Slum Snakes\",\n Netburners = \"Netburners\",\n TianDiHui = \"Tian Di Hui\",\n CyberSec = \"CyberSec\",\n Bladeburners = \"Bladeburners\",\n ChurchOfTheMachineGod = \"Church of the Machine God\",\n}\n","/**\n * Bitnode multipliers influence the difficulty of different aspects of the game.\n * Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the\n * player toward the intended strategy. Unless they really want to play the long, slow game of waiting...\n */\ninterface IBitNodeMultipliers {\n /**\n * Influences how quickly the player's agility level (not exp) scales\n */\n AgilityLevelMultiplier: number;\n\n /**\n * Influences the base cost to purchase an augmentation.\n */\n AugmentationMoneyCost: number;\n\n /**\n * Influences the base rep the player must have with a faction to purchase an augmentation.\n */\n AugmentationRepCost: number;\n\n /**\n * Influences how quickly the player can gain rank within Bladeburner.\n */\n BladeburnerRank: number;\n\n /**\n * Influences the cost of skill levels from Bladeburner.\n */\n BladeburnerSkillCost: number;\n\n /**\n * Influences how quickly the player's charisma level (not exp) scales\n */\n CharismaLevelMultiplier: number;\n\n /**\n * Influences the experience gained for each ability when a player completes a class.\n */\n ClassGymExpGain: number;\n\n /**\n * Influences the amount of money gained from completing Coding Contracts\n **/\n CodingContractMoney: number;\n\n /**\n * Influences the experience gained for each ability when the player completes working their job.\n */\n CompanyWorkExpGain: number;\n\n /**\n * Influences how much money the player earns when completing working their job.\n */\n CompanyWorkMoney: number;\n\n /**\n * Influences the valuation of corporations created by the player.\n */\n CorporationValuation: number;\n\n /**\n * Influences the base experience gained for each ability when the player commits a crime.\n */\n CrimeExpGain: number;\n\n /**\n * Influences the base money gained when the player commits a crime.\n */\n CrimeMoney: number;\n\n /**\n * Influences how many Augmentations you need in order to get invited to the Daedalus faction\n */\n DaedalusAugsRequirement: number;\n\n /**\n * Influences how quickly the player's defense level (not exp) scales\n */\n DefenseLevelMultiplier: number;\n\n /**\n * Influences how quickly the player's dexterity level (not exp) scales\n */\n DexterityLevelMultiplier: number;\n\n /**\n * Influences how much rep the player gains in each faction simply by being a member.\n */\n FactionPassiveRepGain: number;\n\n /**\n * Influences the experience gained for each ability when the player completes work for a Faction.\n */\n FactionWorkExpGain: number;\n\n /**\n * Influences how much rep the player gains when performing work for a faction.\n */\n FactionWorkRepGain: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data API\n */\n FourSigmaMarketDataApiCost: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data (NOT API)\n */\n FourSigmaMarketDataCost: number;\n\n /**\n * Reduces gangs earning.\n */\n GangSoftcap: number;\n\n /**\n * Percentage of unique augs that the gang has.\n */\n GangUniqueAugs: number;\n\n /**\n * Influences the experienced gained when hacking a server.\n */\n HackExpGain: number;\n\n /**\n * Influences how quickly the player's hacking level (not experience) scales\n */\n HackingLevelMultiplier: number;\n\n /**\n * Influences how much money is produced by Hacknet Nodes.\n * Influeces the hash rate of Hacknet Servers (unlocked in BitNode-9)\n */\n HacknetNodeMoney: number;\n\n /**\n * Influences how much money it costs to upgrade your home computer's RAM\n */\n HomeComputerRamCost: number;\n\n /**\n * Influences how much money is gained when the player infiltrates a company.\n */\n InfiltrationMoney: number;\n\n /**\n * Influences how much rep the player can gain from factions when selling stolen documents and secrets\n */\n InfiltrationRep: number;\n\n /**\n * Influences how much money can be stolen from a server when the player performs a hack against it through\n * the Terminal.\n */\n ManualHackMoney: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerCost: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerSoftcap: number;\n\n /**\n * Influences the maximum number of purchased servers you can have\n */\n PurchasedServerLimit: number;\n\n /**\n * Influences the maximum allowed RAM for a purchased server\n */\n PurchasedServerMaxRam: number;\n /**\n * Influences the minimum favor the player must have with a faction before they can donate to gain rep.\n */\n RepToDonateToFaction: number;\n\n /**\n * Influences how much money can be stolen from a server when a script performs a hack against it.\n */\n ScriptHackMoney: number;\n\n /**\n * The amount of money actually gained when script hack a server. This is\n * different than the above because you can reduce the amount of money but\n * not gain that same amount.\n */\n ScriptHackMoneyGain: number;\n\n /**\n * Influences the growth percentage per cycle against a server.\n */\n ServerGrowthRate: number;\n\n /**\n * Influences the maxmimum money that a server can grow to.\n */\n ServerMaxMoney: number;\n\n /**\n * Influences the initial money that a server starts with.\n */\n ServerStartingMoney: number;\n\n /**\n * Influences the initial security level (hackDifficulty) of a server.\n */\n ServerStartingSecurity: number;\n\n /**\n * Influences the weaken amount per invocation against a server.\n */\n ServerWeakenRate: number;\n\n /**\n * Influences how quickly the player's strength level (not exp) scales\n */\n StrengthLevelMultiplier: number;\n\n /**\n * Influences the power of the gift.\n */\n StaneksGiftPowerMultiplier: number;\n\n /**\n * Influences the size of the gift.\n */\n StaneksGiftExtraSize: number;\n\n /**\n * Influences the hacking skill required to backdoor the world daemon.\n */\n WorldDaemonDifficulty: number;\n\n /**\n * Influences corporation dividends.\n */\n CorporationSoftCap: number;\n\n // Index signature\n [key: string]: number;\n}\n\n/**\n * The multipliers that are influenced by current Bitnode progression.\n */\n// tslint:disable-next-line:variable-name\nexport const BitNodeMultipliers: IBitNodeMultipliers = {\n HackingLevelMultiplier: 1,\n StrengthLevelMultiplier: 1,\n DefenseLevelMultiplier: 1,\n DexterityLevelMultiplier: 1,\n AgilityLevelMultiplier: 1,\n CharismaLevelMultiplier: 1,\n\n ServerGrowthRate: 1,\n ServerMaxMoney: 1,\n ServerStartingMoney: 1,\n ServerStartingSecurity: 1,\n ServerWeakenRate: 1,\n\n HomeComputerRamCost: 1,\n\n PurchasedServerCost: 1,\n PurchasedServerSoftcap: 1,\n PurchasedServerLimit: 1,\n PurchasedServerMaxRam: 1,\n\n CompanyWorkMoney: 1,\n CrimeMoney: 1,\n HacknetNodeMoney: 1,\n ManualHackMoney: 1,\n ScriptHackMoney: 1,\n ScriptHackMoneyGain: 1,\n CodingContractMoney: 1,\n\n ClassGymExpGain: 1,\n CompanyWorkExpGain: 1,\n CrimeExpGain: 1,\n FactionWorkExpGain: 1,\n HackExpGain: 1,\n\n FactionPassiveRepGain: 1,\n FactionWorkRepGain: 1,\n RepToDonateToFaction: 1,\n\n AugmentationMoneyCost: 1,\n AugmentationRepCost: 1,\n\n InfiltrationMoney: 1,\n InfiltrationRep: 1,\n\n FourSigmaMarketDataCost: 1,\n FourSigmaMarketDataApiCost: 1,\n\n CorporationValuation: 1,\n CorporationSoftCap: 1,\n\n BladeburnerRank: 1,\n BladeburnerSkillCost: 1,\n\n GangSoftcap: 1,\n GangUniqueAugs: 1,\n\n DaedalusAugsRequirement: 1,\n\n StaneksGiftPowerMultiplier: 1,\n StaneksGiftExtraSize: 0,\n\n WorldDaemonDifficulty: 1,\n};\n","/**\n * Generic Game Constants\n *\n * Constants for specific mechanics or features will NOT be here.\n */\nexport const CONSTANTS: {\n VersionString: string;\n VersionNumber: number;\n _idleSpeed: number;\n MaxSkillLevel: number;\n MilliPerCycle: number;\n CorpFactionRepRequirement: number;\n BaseFocusBonus: number;\n BaseCostFor1GBOfRamHome: number;\n BaseCostFor1GBOfRamServer: number;\n TravelCost: number;\n BaseFavorToDonate: number;\n DonateMoneyToRepDivisor: number;\n FactionReputationToFavorBase: number;\n FactionReputationToFavorMult: number;\n CompanyReputationToFavorBase: number;\n CompanyReputationToFavorMult: number;\n NeuroFluxGovernorLevelMult: number;\n NumNetscriptPorts: number;\n HomeComputerMaxRam: number;\n ServerBaseGrowthRate: number;\n ServerMaxGrowthRate: number;\n ServerFortifyAmount: number;\n ServerWeakenAmount: number;\n PurchasedServerLimit: number;\n PurchasedServerMaxRam: number;\n MultipleAugMultiplier: number;\n TorRouterCost: number;\n WSEAccountCost: number;\n TIXAPICost: number;\n MarketData4SCost: number;\n MarketDataTixApi4SCost: number;\n StockMarketCommission: number;\n HospitalCostPerHp: number;\n IntelligenceCrimeWeight: number;\n IntelligenceInfiltrationWeight: number;\n IntelligenceCrimeBaseExpGain: number;\n IntelligenceProgramBaseExpGain: number;\n IntelligenceGraftBaseExpGain: number;\n IntelligenceTerminalHackBaseExpGain: number;\n IntelligenceSingFnBaseExpGain: number;\n IntelligenceClassBaseExpGain: number;\n MillisecondsPer20Hours: number;\n GameCyclesPer20Hours: number;\n MillisecondsPer10Hours: number;\n GameCyclesPer10Hours: number;\n MillisecondsPer8Hours: number;\n GameCyclesPer8Hours: number;\n MillisecondsPer4Hours: number;\n GameCyclesPer4Hours: number;\n MillisecondsPer2Hours: number;\n GameCyclesPer2Hours: number;\n MillisecondsPerHour: number;\n GameCyclesPerHour: number;\n MillisecondsPerHalfHour: number;\n GameCyclesPerHalfHour: number;\n MillisecondsPerQuarterHour: number;\n GameCyclesPerQuarterHour: number;\n MillisecondsPerFiveMinutes: number;\n GameCyclesPerFiveMinutes: number;\n FactionWorkHacking: string;\n FactionWorkField: string;\n FactionWorkSecurity: string;\n WorkTypeCompany: string;\n WorkTypeCompanyPartTime: string;\n WorkTypeFaction: string;\n WorkTypeCreateProgram: string;\n WorkTypeStudyClass: string;\n WorkTypeCrime: string;\n WorkTypeGraftAugmentation: string;\n ClassStudyComputerScience: string;\n ClassDataStructures: string;\n ClassNetworks: string;\n ClassAlgorithms: string;\n ClassManagement: string;\n ClassLeadership: string;\n ClassGymStrength: string;\n ClassGymDefense: string;\n ClassGymDexterity: string;\n ClassGymAgility: string;\n ClassDataStructuresBaseCost: number;\n ClassNetworksBaseCost: number;\n ClassAlgorithmsBaseCost: number;\n ClassManagementBaseCost: number;\n ClassLeadershipBaseCost: number;\n ClassGymBaseCost: number;\n ClassStudyComputerScienceBaseExp: number;\n ClassDataStructuresBaseExp: number;\n ClassNetworksBaseExp: number;\n ClassAlgorithmsBaseExp: number;\n ClassManagementBaseExp: number;\n ClassLeadershipBaseExp: number;\n CrimeShoplift: string;\n CrimeRobStore: string;\n CrimeMug: string;\n CrimeLarceny: string;\n CrimeDrugs: string;\n CrimeBondForgery: string;\n CrimeTraffickArms: string;\n CrimeHomicide: string;\n CrimeGrandTheftAuto: string;\n CrimeKidnap: string;\n CrimeAssassination: string;\n CrimeHeist: string;\n CodingContractBaseFactionRepGain: number;\n CodingContractBaseCompanyRepGain: number;\n CodingContractBaseMoneyGain: number;\n AugmentationGraftingCostMult: number;\n AugmentationGraftingTimeBase: number;\n EntropyEffect: number;\n TotalNumBitNodes: number;\n LatestUpdate: string;\n} = {\n VersionString: \"1.6.1\",\n VersionNumber: 12,\n\n // Speed (in ms) at which the main loop is updated\n _idleSpeed: 200,\n\n /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience\n * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then\n * the player will have this level assuming no multipliers. Multipliers can cause skills to go above this.\n */\n MaxSkillLevel: 975,\n\n // Milliseconds per game cycle\n MilliPerCycle: 200,\n\n // How much reputation is needed to join a megacorporation's faction\n CorpFactionRepRequirement: 200e3,\n\n // Base RAM costs\n BaseCostFor1GBOfRamHome: 32000,\n BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM\n\n // Cost to travel to another city\n TravelCost: 200e3,\n\n // Faction and Company favor-related things\n BaseFavorToDonate: 150,\n DonateMoneyToRepDivisor: 1e6,\n FactionReputationToFavorBase: 500,\n FactionReputationToFavorMult: 1.02,\n CompanyReputationToFavorBase: 500,\n CompanyReputationToFavorMult: 1.02,\n\n // NeuroFlux Governor Augmentation cost multiplier\n NeuroFluxGovernorLevelMult: 1.14,\n\n NumNetscriptPorts: 20,\n\n // Server-related constants\n HomeComputerMaxRam: 1073741824, // 2 ^ 30\n ServerBaseGrowthRate: 1.03, // Unadjusted Growth rate\n ServerMaxGrowthRate: 1.0035, // Maximum possible growth rate (max rate accounting for server security)\n ServerFortifyAmount: 0.002, // Amount by which server's security increases when its hacked/grown\n ServerWeakenAmount: 0.05, // Amount by which server's security decreases when weakened\n\n PurchasedServerLimit: 25,\n PurchasedServerMaxRam: 1048576, // 2^20\n\n // Augmentation Constants\n MultipleAugMultiplier: 1.9,\n\n // TOR Router\n TorRouterCost: 200e3,\n\n // Stock market\n WSEAccountCost: 200e6,\n TIXAPICost: 5e9,\n MarketData4SCost: 1e9,\n MarketDataTixApi4SCost: 25e9,\n StockMarketCommission: 100e3,\n\n // Hospital/Health\n HospitalCostPerHp: 100e3,\n\n // Intelligence-related constants\n IntelligenceCrimeWeight: 0.025, // Weight for how much int affects crime success rates\n IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates\n IntelligenceCrimeBaseExpGain: 0.05,\n IntelligenceProgramBaseExpGain: 0.1, // Program required hack level divided by this to determine int exp gain\n IntelligenceGraftBaseExpGain: 0.05,\n IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain\n IntelligenceSingFnBaseExpGain: 1.5,\n IntelligenceClassBaseExpGain: 0.01,\n\n // Time-related constants\n MillisecondsPer20Hours: 72000000,\n GameCyclesPer20Hours: 72000000 / 200,\n\n MillisecondsPer10Hours: 36000000,\n GameCyclesPer10Hours: 36000000 / 200,\n\n MillisecondsPer8Hours: 28800000,\n GameCyclesPer8Hours: 28800000 / 200,\n\n MillisecondsPer4Hours: 14400000,\n GameCyclesPer4Hours: 14400000 / 200,\n\n MillisecondsPer2Hours: 7200000,\n GameCyclesPer2Hours: 7200000 / 200,\n\n MillisecondsPerHour: 3600000,\n GameCyclesPerHour: 3600000 / 200,\n\n MillisecondsPerHalfHour: 1800000,\n GameCyclesPerHalfHour: 1800000 / 200,\n\n MillisecondsPerQuarterHour: 900000,\n GameCyclesPerQuarterHour: 900000 / 200,\n\n MillisecondsPerFiveMinutes: 300000,\n GameCyclesPerFiveMinutes: 300000 / 200,\n\n // Player Work & Action\n BaseFocusBonus: 0.8,\n FactionWorkHacking: \"Faction Hacking Work\",\n FactionWorkField: \"Faction Field Work\",\n FactionWorkSecurity: \"Faction Security Work\",\n\n WorkTypeCompany: \"Working for Company\",\n WorkTypeCompanyPartTime: \"Working for Company part-time\",\n WorkTypeFaction: \"Working for Faction\",\n WorkTypeCreateProgram: \"Working on Create a Program\",\n WorkTypeStudyClass: \"Studying or Taking a class at university\",\n WorkTypeCrime: \"Committing a crime\",\n WorkTypeGraftAugmentation: \"Grafting an Augmentation\",\n\n ClassStudyComputerScience: \"studying Computer Science\",\n ClassDataStructures: \"taking a Data Structures course\",\n ClassNetworks: \"taking a Networks course\",\n ClassAlgorithms: \"taking an Algorithms course\",\n ClassManagement: \"taking a Management course\",\n ClassLeadership: \"taking a Leadership course\",\n ClassGymStrength: \"training your strength at a gym\",\n ClassGymDefense: \"training your defense at a gym\",\n ClassGymDexterity: \"training your dexterity at a gym\",\n ClassGymAgility: \"training your agility at a gym\",\n\n ClassDataStructuresBaseCost: 40,\n ClassNetworksBaseCost: 80,\n ClassAlgorithmsBaseCost: 320,\n ClassManagementBaseCost: 160,\n ClassLeadershipBaseCost: 320,\n ClassGymBaseCost: 120,\n\n ClassStudyComputerScienceBaseExp: 0.5,\n ClassDataStructuresBaseExp: 1,\n ClassNetworksBaseExp: 2,\n ClassAlgorithmsBaseExp: 4,\n ClassManagementBaseExp: 2,\n ClassLeadershipBaseExp: 4,\n\n CrimeShoplift: \"shoplift\",\n CrimeRobStore: \"rob a store\",\n CrimeMug: \"mug someone\",\n CrimeLarceny: \"commit larceny\",\n CrimeDrugs: \"deal drugs\",\n CrimeBondForgery: \"forge corporate bonds\",\n CrimeTraffickArms: \"traffick illegal arms\",\n CrimeHomicide: \"commit homicide\",\n CrimeGrandTheftAuto: \"commit grand theft auto\",\n CrimeKidnap: \"kidnap someone for ransom\",\n CrimeAssassination: \"assassinate a high-profile target\",\n CrimeHeist: \"pull off the ultimate heist\",\n\n // Coding Contract\n // TODO: Move this into Coding contract implementation?\n CodingContractBaseFactionRepGain: 2500,\n CodingContractBaseCompanyRepGain: 4000,\n CodingContractBaseMoneyGain: 75e6,\n\n // Augmentation crafting multipliers\n AugmentationGraftingCostMult: 3,\n AugmentationGraftingTimeBase: 3600000,\n\n // Value raised to the number of entropy stacks, then multiplied to player multipliers\n EntropyEffect: 0.98,\n\n // BitNode/Source-File related stuff\n TotalNumBitNodes: 24,\n\n LatestUpdate: `\n v1.6.0 - 2022-03-29 Grafting\n ----------------------------\n\n ** Vitalife secret lab **\n\n * A new mechanic called Augmentation Grafting has been added. Resleeving has been removed.\n * Credit to @nickofolas for his incredible work.\n\n ** Stanek **\n\n * BREAKING: Many functions in the stanek API were renamed in order to avoid name collision with things like Map.prototype.get\n\n ** UI **\n\n * Major update to Sleeve, Gang UI, and Create Program (@nickofolas)\n * re-add pre tags to support slash n in prompt (@jacktose)\n * Tabelize linked output of 'ls' (@Master-Guy)\n * Add the ability to filter open scripts (@phyzical)\n * Add minHeight to editor tabs (@nickofolas)\n * Properly expand gang equipment cards to fill entire screen (@nickofolas)\n * Add shortcut to Faction augmentations page from FactionsRoot (@nickofolas)\n * Fix extra space on editor tabs (@nickofolas)\n * Present offline message as list (@DSteve595)\n * add box showing remaining augments per faction (@jjayeon)\n * Add tab switching support to vim mode (@JParisFerrer)\n * Show current task on gang management screen (@zeddrak)\n * Fix for ui of gang members current task when set via api (@phyzical)\n * Don't hide irrelevant materials if their stock is not empty and hide irrelevant divisions from Export (@SagePtr)\n * Fix regex to enable alpha transparency hex codes (8 digits) (@surdaft)\n\n ** API **\n\n * Added dark web functions to ns api\n * BREAKING: purchaseTor() should returns true if player already has Tor. (@DavidGrinberg, @waffleattack)\n * Implement getBonusTime in Corporation API (@t-wolfeadam)\n * Added functions to purchase TIX and WSI (@incubusnb)\n * purchaseSleeveAug checks shock value (@incubusnb)\n * Fix bug with hacknet api\n * Fix spendHashes bug\n * Added 0 cost of asleep() (@Master-Guy)\n * Fix some misleading corporation errors (@TheRealMaxion)\n * expose the inBladeburner on the player object (@phyzical)\n * added ram charge for stanek width and height (@phyzical)\n * Fix sufficient player money check to buy back shares. (@ChrissiQ)\n * Fix Static Ram Circumventing for some NS functions (@CrafterKolyan)\n * added CorporationSoftCap to NetscriptDefinitions (@phyzical)\n * Added definition of autocomplete() 'data' argument. (@tigercat2000)\n * Adding support for text/select options in Prompt command (@PhilipArmstead)\n * Added the ability to exportGame via api (@phyzical)\n\n ** Arcade **\n\n * Added an arcade to New Tokyo where you can play a 4 year old version of bitburner.\n\n ** Misc. **\n\n * Add a warning triggered while auto-saves are off. (@MartinFournier)\n * Log info for field analysis now displays actual rank gained. (@ApamNapat)\n * Removed BladeburnerSkillCost from skill point cost description. (@ApamNapat)\n * Fix handling for UpArrow in bladeburner console. (@dowinter)\n * Add GitHub action to check PRs for generated files. (@MartinFournier)\n * Cap Staneks gift at 25x25 to prevent crashes. (@waffleattack)\n * Remove old & unused files from repository. (@MartinFournier)\n * Factions on the factions screens are sorted by story progress / type. (@phyzical)\n * Fix log manager not picking up new runs of scripts. (@phyzical)\n * Added prettier to cicd.\n * UI improvements (@phyzical)\n * Documentation / Typos (@nanogyth, @Master-Guy, @incubusnb, @ApamNapat, @phyzical, @SagePtr)\n * Give player code a copy of Division.upgrades instead of the live object (@Ornedan)\n * Fix bug with small town achievement.\n * Fix bug with purchaseSleeveAug (@phyzical)\n * Check before unlocking corp upgrade (@gianfun)\n * General codebase improvements. (@phyzical, @Master-Guy, @ApamNapat)\n * Waiting on promises in NS1 no longer freezes the script. (@Master-Guy)\n * Fix bug with missing ramcost for tFormat (@TheMas3212)\n * Fix crash with new prompt\n * Quick fix to prevent division by 0 in terminal (@Master-Guy)\n * removed ip references (@phyzical, @Master-Guy)\n * Terminal now supports 'ls -l'\n * Fix negative number formatting (@Master-Guy)\n * Fix unique ip generation (@InDieTasten)\n * remove terminal command theme from docs (@phyzical)\n * Fix 'Augmentations Left' with gang factions (@nickofolas)\n * Attempt to fix 'bladeburner.process()' early routing issue (@MartinFournier)\n * work in progress augment fix (@phyzical)\n * Fixes missing space in Smart Supply (@TheRealMaxion)\n * Change license to Apache 2 with Commons Clause\n * updated regex sanitization (@mbrannen)\n * Sleeve fix for when faction isnt found (@phyzical)\n * Fix editor \"close\" naming (@phyzical)\n * Fix bug with sleeves where some factions would be listed as workable. (@phyzical)\n * Fix research tree of product industries post-prestige (@pd)\n * Added a check for exisiting industry type before expanding (@phyzical)\n * fix hackAnalyzeThreads returning infinity (@chrisrabe)\n * Make growthAnalyze more accurate (@dwRchyngqxs)\n * Add 'Zoom -> Reset Zoom' command to Steam (@smolgumball)\n * Add hasOwnProperty check to GetServer (@SagePtr)\n * Speed up employee productivity calculation (@pd)\n * Field Work and Security Work benefit from 'share' (@SagePtr)\n * Nerf noodle bar.\n`,\n};\n","import { ISelfInitializer, ISelfLoading } from \"../types\";\nimport { OwnedAugmentationsOrderSetting, PurchaseAugmentationsOrderSetting } from \"./SettingEnums\";\nimport { defaultTheme, ITheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { WordWrapOptions } from \"../ScriptEditor/ui/Options\";\nimport { OverviewSettings } from \"../ui/React/Overview\";\nimport { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\n\n/**\n * Represents the default settings the player could customize.\n */\ninterface IDefaultSettings {\n /**\n * How many servers per page\n */\n ActiveScriptsServerPageSize: number;\n /**\n * How many scripts per page\n */\n ActiveScriptsScriptPageSize: number;\n /**\n * How often the game should autosave the player's progress, in seconds.\n */\n AutosaveInterval: number;\n\n /**\n * How many milliseconds between execution points for Netscript 1 statements.\n */\n CodeInstructionRunTime: number;\n\n /**\n * Render city as list of buttons.\n */\n DisableASCIIArt: boolean;\n\n /**\n * Whether global keyboard shortcuts should be recognized throughout the game.\n */\n DisableHotkeys: boolean;\n\n /**\n * Whether text effects such as corruption should be visible.\n */\n DisableTextEffects: boolean;\n\n /**\n * Whether overview progress bars should be visible.\n */\n DisableOverviewProgressBars: boolean;\n\n /**\n * Enable bash hotkeys\n */\n EnableBashHotkeys: boolean;\n\n /**\n * Timestamps format\n */\n TimestampsFormat: string;\n\n /**\n * Locale used for display numbers\n */\n Locale: string;\n\n /**\n * Limit the number of log entries for each script being executed on each server.\n */\n MaxLogCapacity: number;\n\n /**\n * Limit how many entries can be written to a Netscript Port before entries start to get pushed out.\n */\n MaxPortCapacity: number;\n\n /**\n * Limit the number of entries in the terminal.\n */\n MaxTerminalCapacity: number;\n\n /**\n * Save the game when you save any file.\n */\n SaveGameOnFileSave: boolean;\n\n /**\n * Whether the player should be asked to confirm purchasing each and every augmentation.\n */\n SuppressBuyAugmentationConfirmation: boolean;\n\n /**\n * Whether the user should be prompted to join each faction via a dialog box.\n */\n SuppressFactionInvites: boolean;\n\n /**\n * Whether the user should be shown a dialog box whenever they receive a new message file.\n */\n SuppressMessages: boolean;\n\n /**\n * Whether the user should be asked to confirm travelling between cities.\n */\n SuppressTravelConfirmation: boolean;\n\n /**\n * Whether the user should be displayed a popup message when his Bladeburner actions are cancelled.\n */\n SuppressBladeburnerPopup: boolean;\n\n /**\n * Whether the user should be displayed a popup message on stock market actions.\n */\n SuppressTIXPopup: boolean;\n\n /**\n * Whether the user should be displayed a toast alert when the game is saved.\n */\n SuppressSavedGameToast: boolean;\n\n /**\n * Whether the user should be displayed a toast warning when the autosave is disabled.\n */\n SuppressAutosaveDisabledWarnings: boolean;\n\n /*\n * Whether the game should skip saving the running scripts for late game\n */\n ExcludeRunningScriptsFromSave: boolean;\n\n /*\n * Theme colors\n */\n theme: ITheme;\n\n /*\n * Interface styles\n */\n styles: IStyleSettings;\n\n /*\n * Use GiB instead of GB\n */\n UseIEC60027_2: boolean;\n\n /*\n * Character overview settings\n */\n overview: OverviewSettings;\n\n /**\n * If the game's sidebar is opened\n */\n IsSidebarOpened: boolean;\n}\n\n/**\n * Represents all possible settings the player wants to customize to their play style.\n */\ninterface ISettings extends IDefaultSettings {\n /**\n * What order the player's owned Augmentations/Source Files should be displayed in\n */\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting;\n\n /**\n * What order the Augmentations should be displayed in when purchasing from a Faction\n */\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting;\n\n MonacoTheme: string;\n\n MonacoInsertSpaces: boolean;\n\n MonacoFontSize: number;\n\n MonacoVim: boolean;\n\n MonacoWordWrap: WordWrapOptions;\n}\n\nexport const defaultSettings: IDefaultSettings = {\n ActiveScriptsServerPageSize: 10,\n ActiveScriptsScriptPageSize: 10,\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n DisableOverviewProgressBars: false,\n EnableBashHotkeys: false,\n TimestampsFormat: \"\",\n Locale: \"en\",\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 500,\n SaveGameOnFileSave: true,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false,\n SuppressTIXPopup: false,\n SuppressSavedGameToast: false,\n SuppressAutosaveDisabledWarnings: false,\n UseIEC60027_2: false,\n ExcludeRunningScriptsFromSave: false,\n IsSidebarOpened: true,\n\n theme: defaultTheme,\n styles: defaultStyles,\n overview: { x: 0, y: 0, opened: true },\n};\n\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\nexport const Settings: ISettings & ISelfInitializer & ISelfLoading = {\n ActiveScriptsServerPageSize: defaultSettings.ActiveScriptsServerPageSize,\n ActiveScriptsScriptPageSize: defaultSettings.ActiveScriptsScriptPageSize,\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n DisableOverviewProgressBars: defaultSettings.DisableOverviewProgressBars,\n EnableBashHotkeys: defaultSettings.EnableBashHotkeys,\n TimestampsFormat: defaultSettings.TimestampsFormat,\n Locale: \"en\",\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting.AcquirementTime,\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting.Default,\n SaveGameOnFileSave: defaultSettings.SaveGameOnFileSave,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n SuppressTIXPopup: defaultSettings.SuppressTIXPopup,\n SuppressSavedGameToast: defaultSettings.SuppressSavedGameToast,\n SuppressAutosaveDisabledWarnings: defaultSettings.SuppressAutosaveDisabledWarnings,\n UseIEC60027_2: defaultSettings.UseIEC60027_2,\n ExcludeRunningScriptsFromSave: defaultSettings.ExcludeRunningScriptsFromSave,\n IsSidebarOpened: defaultSettings.IsSidebarOpened,\n\n MonacoTheme: \"monokai\",\n MonacoInsertSpaces: false,\n MonacoFontSize: 20,\n MonacoVim: false,\n MonacoWordWrap: \"off\",\n\n theme: { ...defaultTheme },\n styles: { ...defaultStyles },\n overview: defaultSettings.overview,\n init() {\n Object.assign(Settings, defaultSettings);\n },\n load(saveString: string) {\n const save = JSON.parse(saveString);\n Object.assign(Settings.theme, save.theme);\n delete save.theme;\n Object.assign(Settings.styles, save.styles);\n delete save.styles;\n Object.assign(Settings.overview, save.overview);\n delete save.overview;\n Object.assign(Settings, save);\n },\n};\n","/**\n * Names of all locations\n */\nexport enum LocationName {\n // Aevum Locations\n AevumAeroCorp = \"AeroCorp\",\n AevumBachmanAndAssociates = \"Bachman & Associates\",\n AevumClarkeIncorporated = \"Clarke Incorporated\",\n AevumCrushFitnessGym = \"Crush Fitness Gym\",\n AevumECorp = \"ECorp\",\n AevumFulcrumTechnologies = \"Fulcrum Technologies\",\n AevumGalacticCybersystems = \"Galactic Cybersystems\",\n AevumNetLinkTechnologies = \"NetLink Technologies\",\n AevumPolice = \"Aevum Police Headquarters\",\n AevumRhoConstruction = \"Rho Construction\",\n AevumSnapFitnessGym = \"Snap Fitness Gym\",\n AevumSummitUniversity = \"Summit University\",\n AevumWatchdogSecurity = \"Watchdog Security\",\n AevumCasino = \"Iker Molina Casino\",\n\n // Chongqing locations\n ChongqingKuaiGongInternational = \"KuaiGong International\",\n ChongqingSolarisSpaceSystems = \"Solaris Space Systems\",\n ChongqingChurchOfTheMachineGod = \"Church of the Machine God\",\n\n // Sector 12\n Sector12AlphaEnterprises = \"Alpha Enterprises\",\n Sector12BladeIndustries = \"Blade Industries\",\n Sector12CIA = \"Central Intelligence Agency\",\n Sector12CarmichaelSecurity = \"Carmichael Security\",\n Sector12CityHall = \"Sector-12 City Hall\",\n Sector12DeltaOne = \"DeltaOne\",\n Sector12FoodNStuff = \"FoodNStuff\",\n Sector12FourSigma = \"Four Sigma\",\n Sector12IcarusMicrosystems = \"Icarus Microsystems\",\n Sector12IronGym = \"Iron Gym\",\n Sector12JoesGuns = \"Joe's Guns\",\n Sector12MegaCorp = \"MegaCorp\",\n Sector12NSA = \"National Security Agency\",\n Sector12PowerhouseGym = \"Powerhouse Gym\",\n Sector12RothmanUniversity = \"Rothman University\",\n Sector12UniversalEnergy = \"Universal Energy\",\n\n // New Tokyo\n NewTokyoDefComm = \"DefComm\",\n NewTokyoGlobalPharmaceuticals = \"Global Pharmaceuticals\",\n NewTokyoNoodleBar = \"Noodle Bar\",\n NewTokyoVitaLife = \"VitaLife\",\n NewTokyoArcade = \"Arcade\",\n\n // Ishima\n IshimaNovaMedical = \"Nova Medical\",\n IshimaOmegaSoftware = \"Omega Software\",\n IshimaStormTechnologies = \"Storm Technologies\",\n IshimaGlitch = \"0x6C1\",\n\n // Volhaven\n VolhavenCompuTek = \"CompuTek\",\n VolhavenHeliosLabs = \"Helios Labs\",\n VolhavenLexoCorp = \"LexoCorp\",\n VolhavenMilleniumFitnessGym = \"Millenium Fitness Gym\",\n VolhavenNWO = \"NWO\",\n VolhavenOmniTekIncorporated = \"OmniTek Incorporated\",\n VolhavenOmniaCybersystems = \"Omnia Cybersystems\",\n VolhavenSysCoreSecurities = \"SysCore Securities\",\n VolhavenZBInstituteOfTechnology = \"ZB Institute of Technology\",\n\n // Generic locations\n Hospital = \"Hospital\",\n Slums = \"The Slums\",\n TravelAgency = \"Travel Agency\",\n WorldStockExchange = \"World Stock Exchange\",\n\n // Default name for Location objects\n Void = \"The Void\",\n}\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\n\n// TODO remember to update RamCalculations.js and WorkerScript.js\n\n// RAM costs for Netscript functions\nexport const RamCostConstants: IMap = {\n ScriptBaseRamCost: 1.6,\n ScriptDomRamCost: 25,\n ScriptCorporationRamCost: 1024 - 1.6,\n ScriptHackRamCost: 0.1,\n ScriptHackAnalyzeRamCost: 1,\n ScriptGrowRamCost: 0.15,\n ScriptGrowthAnalyzeRamCost: 1,\n ScriptWeakenRamCost: 0.15,\n ScriptWeakenAnalyzeRamCost: 1,\n ScriptScanRamCost: 0.2,\n ScriptPortProgramRamCost: 0.05,\n ScriptRunRamCost: 1.0,\n ScriptExecRamCost: 1.3,\n ScriptSpawnRamCost: 2.0,\n ScriptScpRamCost: 0.6,\n ScriptKillRamCost: 0.5,\n ScriptHasRootAccessRamCost: 0.05,\n ScriptGetHostnameRamCost: 0.05,\n ScriptGetHackingLevelRamCost: 0.05,\n ScriptGetMultipliersRamCost: 4.0,\n ScriptGetServerRamCost: 0.1,\n ScriptGetServerMaxRam: 0.05,\n ScriptGetServerUsedRam: 0.05,\n ScriptFileExistsRamCost: 0.1,\n ScriptIsRunningRamCost: 0.1,\n ScriptHacknetNodesRamCost: 4.0,\n ScriptHNUpgLevelRamCost: 0.4,\n ScriptHNUpgRamRamCost: 0.6,\n ScriptHNUpgCoreRamCost: 0.8,\n ScriptGetStockRamCost: 2.0,\n ScriptBuySellStockRamCost: 2.5,\n ScriptGetPurchaseServerRamCost: 0.25,\n ScriptPurchaseServerRamCost: 2.25,\n ScriptGetPurchasedServerLimit: 0.05,\n ScriptGetPurchasedServerMaxRam: 0.05,\n ScriptRoundRamCost: 0.05,\n ScriptReadWriteRamCost: 1.0,\n ScriptArbScriptRamCost: 1.0,\n ScriptGetScriptRamCost: 0.1,\n ScriptGetRunningScriptRamCost: 0.3,\n ScriptGetHackTimeRamCost: 0.05,\n ScriptGetFavorToDonate: 0.1,\n ScriptCodingContractBaseRamCost: 10,\n ScriptSleeveBaseRamCost: 4,\n ScriptGetOwnedSourceFiles: 5,\n\n ScriptSingularityFn1RamCost: 2,\n ScriptSingularityFn2RamCost: 3,\n ScriptSingularityFn3RamCost: 5,\n\n ScriptGangApiBaseRamCost: 4,\n\n ScriptBladeburnerApiBaseRamCost: 4,\n\n ScriptStanekWidth: 0.4,\n ScriptStanekHeight: 0.4,\n ScriptStanekCharge: 0.4,\n ScriptStanekFragmentDefinitions: 0,\n ScriptStanekPlacedFragments: 5,\n ScriptStanekClear: 0,\n ScriptStanekCanPlace: 0.5,\n ScriptStanekPlace: 5,\n ScriptStanekFragmentAt: 2,\n ScriptStanekDeleteAt: 0.15,\n};\n\nfunction SF4Cost(cost: number): (player: IPlayer) => number {\n return (player: IPlayer): number => {\n if (player.bitNodeN === 4) return cost;\n const sf4 = player.sourceFileLvl(4);\n if (sf4 <= 1) return cost * 16;\n if (sf4 === 2) return cost * 4;\n return cost;\n };\n}\n\nexport const RamCosts: IMap = {\n hacknet: {\n numNodes: 0,\n purchaseNode: 0,\n getPurchaseNodeCost: 0,\n getNodeStats: 0,\n upgradeLevel: 0,\n upgradeRam: 0,\n upgradeCore: 0,\n upgradeCache: 0,\n getLevelUpgradeCost: 0,\n getRamUpgradeCost: 0,\n getCoreUpgradeCost: 0,\n getCacheUpgradeCost: 0,\n numHashes: 0,\n hashCost: 0,\n spendHashes: 0,\n },\n sprintf: 0,\n vsprintf: 0,\n scan: RamCostConstants.ScriptScanRamCost,\n hack: RamCostConstants.ScriptHackRamCost,\n hackAnalyzeThreads: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyze: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeSecurity: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeChance: RamCostConstants.ScriptHackAnalyzeRamCost,\n sleep: 0,\n asleep: 0,\n share: 2.4,\n getSharePower: 0.2,\n grow: RamCostConstants.ScriptGrowRamCost,\n growthAnalyze: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n growthAnalyzeSecurity: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n weaken: RamCostConstants.ScriptWeakenRamCost,\n weakenAnalyze: RamCostConstants.ScriptWeakenAnalyzeRamCost,\n print: 0,\n printf: 0,\n tprint: 0,\n clearLog: 0,\n disableLog: 0,\n enableLog: 0,\n isLogEnabled: 0,\n getScriptLogs: 0,\n nuke: RamCostConstants.ScriptPortProgramRamCost,\n brutessh: RamCostConstants.ScriptPortProgramRamCost,\n ftpcrack: RamCostConstants.ScriptPortProgramRamCost,\n relaysmtp: RamCostConstants.ScriptPortProgramRamCost,\n httpworm: RamCostConstants.ScriptPortProgramRamCost,\n sqlinject: RamCostConstants.ScriptPortProgramRamCost,\n run: RamCostConstants.ScriptRunRamCost,\n exec: RamCostConstants.ScriptExecRamCost,\n spawn: RamCostConstants.ScriptSpawnRamCost,\n kill: RamCostConstants.ScriptKillRamCost,\n killall: RamCostConstants.ScriptKillRamCost,\n exit: 0,\n atExit: 0,\n scp: RamCostConstants.ScriptScpRamCost,\n ls: RamCostConstants.ScriptScanRamCost,\n ps: RamCostConstants.ScriptScanRamCost,\n hasRootAccess: RamCostConstants.ScriptHasRootAccessRamCost,\n getIp: RamCostConstants.ScriptGetHostnameRamCost,\n getHostname: RamCostConstants.ScriptGetHostnameRamCost,\n getHackingLevel: RamCostConstants.ScriptGetHackingLevelRamCost,\n getHackingMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getHacknetMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getBitNodeMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getServer: RamCostConstants.ScriptGetMultipliersRamCost / 2,\n getServerMoneyAvailable: RamCostConstants.ScriptGetServerRamCost,\n getServerSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerBaseSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMinSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerRequiredHackingLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxMoney: RamCostConstants.ScriptGetServerRamCost,\n getServerGrowth: RamCostConstants.ScriptGetServerRamCost,\n getServerNumPortsRequired: RamCostConstants.ScriptGetServerRamCost,\n getServerRam: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxRam: RamCostConstants.ScriptGetServerMaxRam,\n getServerUsedRam: RamCostConstants.ScriptGetServerUsedRam,\n serverExists: RamCostConstants.ScriptGetServerRamCost,\n fileExists: RamCostConstants.ScriptFileExistsRamCost,\n isRunning: RamCostConstants.ScriptIsRunningRamCost,\n stock: {\n getSymbols: RamCostConstants.ScriptGetStockRamCost,\n getPrice: RamCostConstants.ScriptGetStockRamCost,\n getAskPrice: RamCostConstants.ScriptGetStockRamCost,\n getBidPrice: RamCostConstants.ScriptGetStockRamCost,\n getPosition: RamCostConstants.ScriptGetStockRamCost,\n getMaxShares: RamCostConstants.ScriptGetStockRamCost,\n getPurchaseCost: RamCostConstants.ScriptGetStockRamCost,\n getSaleGain: RamCostConstants.ScriptGetStockRamCost,\n buy: RamCostConstants.ScriptBuySellStockRamCost,\n sell: RamCostConstants.ScriptBuySellStockRamCost,\n short: RamCostConstants.ScriptBuySellStockRamCost,\n sellShort: RamCostConstants.ScriptBuySellStockRamCost,\n placeOrder: RamCostConstants.ScriptBuySellStockRamCost,\n cancelOrder: RamCostConstants.ScriptBuySellStockRamCost,\n getOrders: RamCostConstants.ScriptBuySellStockRamCost,\n getVolatility: RamCostConstants.ScriptBuySellStockRamCost,\n getForecast: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketData: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketDataTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseWseAccount: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n },\n getPurchasedServerLimit: RamCostConstants.ScriptGetPurchasedServerLimit,\n getPurchasedServerMaxRam: RamCostConstants.ScriptGetPurchasedServerMaxRam,\n getPurchasedServerCost: RamCostConstants.ScriptGetPurchaseServerRamCost,\n purchaseServer: RamCostConstants.ScriptPurchaseServerRamCost,\n deleteServer: RamCostConstants.ScriptPurchaseServerRamCost,\n getPurchasedServers: RamCostConstants.ScriptPurchaseServerRamCost,\n write: 0,\n tryWritePort: 0,\n read: 0,\n peek: 0,\n clear: 0,\n writePort: 0,\n readPort: 0,\n getPortHandle: 0,\n rm: RamCostConstants.ScriptReadWriteRamCost,\n scriptRunning: RamCostConstants.ScriptArbScriptRamCost,\n scriptKill: RamCostConstants.ScriptArbScriptRamCost,\n getScriptName: 0,\n getScriptRam: RamCostConstants.ScriptGetScriptRamCost,\n getHackTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getGrowTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getWeakenTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getScriptIncome: RamCostConstants.ScriptGetScriptRamCost,\n getScriptExpGain: RamCostConstants.ScriptGetScriptRamCost,\n getRunningScript: RamCostConstants.ScriptGetRunningScriptRamCost,\n nFormat: 0,\n tFormat: 0,\n getTimeSinceLastAug: RamCostConstants.ScriptGetHackTimeRamCost,\n prompt: 0,\n wget: 0,\n getFavorToDonate: RamCostConstants.ScriptGetFavorToDonate,\n getPlayer: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n mv: 0,\n getOwnedSourceFiles: RamCostConstants.ScriptGetOwnedSourceFiles,\n tail: 0,\n toast: 0,\n\n // Singularity Functions\n universityCourse: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n gymWorkout: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n travelToCity: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n goToLocation: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n purchaseTor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n purchaseProgram: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getCurrentServer: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n connect: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n manualHack: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n installBackdoor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getDarkwebProgramCost: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getDarkwebPrograms: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getStats: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getCharacterInformation: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n hospitalize: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n isBusy: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n stopAction: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 2),\n upgradeHomeRam: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n upgradeHomeCores: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getUpgradeHomeRamCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n getUpgradeHomeCoresCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n workForCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n applyToCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getCompanyRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n checkFactionInvitations: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n joinFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n workForFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getFactionRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n donateToFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n createProgram: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n commitCrime: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeChance: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getOwnedAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationsFromFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationCost: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrereq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrice: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationRepReq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n purchaseAugmentation: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n softReset: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n installAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n isFocused: SF4Cost(0.1),\n setFocus: SF4Cost(0.1),\n\n // Gang API\n gang: {\n createGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n inGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getMemberNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getOtherGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getMemberInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n canRecruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n recruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getTaskNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getTaskStats: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n setMemberTask: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getEquipmentCost: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentType: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,\n ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,\n getAscensionResult: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,\n getBonusTime: 0,\n },\n\n // Bladeburner API\n bladeburner: {\n getContractNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getOperationNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getGeneralActionNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getSkillNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n startAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n stopBladeburnerAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getCurrentAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 4,\n getActionTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionEstimatedSuccessChance: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionRepGain: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCountRemaining: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionMaxLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCurrentLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillPoints: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillUpgradeCost: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n upgradeSkill: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getStamina: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerFaction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerDivision: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getBonusTime: 0,\n },\n\n // Coding Contract API\n codingcontract: {\n attempt: RamCostConstants.ScriptCodingContractBaseRamCost,\n getContractType: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getData: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getDescription: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getNumTriesRemaining: RamCostConstants.ScriptCodingContractBaseRamCost / 5,\n },\n\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: RamCostConstants.ScriptSleeveBaseRamCost,\n setToShockRecovery: RamCostConstants.ScriptSleeveBaseRamCost,\n setToSynchronize: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCommitCrime: RamCostConstants.ScriptSleeveBaseRamCost,\n setToUniversityCourse: RamCostConstants.ScriptSleeveBaseRamCost,\n travel: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCompanyWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToFactionWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToGymWorkout: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveStats: RamCostConstants.ScriptSleeveBaseRamCost,\n getTask: RamCostConstants.ScriptSleeveBaseRamCost,\n getInformation: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveAugmentations: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleevePurchasableAugs: RamCostConstants.ScriptSleeveBaseRamCost,\n purchaseSleeveAug: RamCostConstants.ScriptSleeveBaseRamCost,\n },\n\n stanek: {\n giftWidth: RamCostConstants.ScriptStanekWidth,\n giftHeight: RamCostConstants.ScriptStanekHeight,\n chargeFragment: RamCostConstants.ScriptStanekCharge,\n fragmentDefinitions: RamCostConstants.ScriptStanekFragmentDefinitions,\n activeFragments: RamCostConstants.ScriptStanekPlacedFragments,\n clearGift: RamCostConstants.ScriptStanekClear,\n canPlaceFragment: RamCostConstants.ScriptStanekCanPlace,\n placeFragment: RamCostConstants.ScriptStanekPlace,\n getFragment: RamCostConstants.ScriptStanekFragmentAt,\n removeFragment: RamCostConstants.ScriptStanekDeleteAt,\n },\n\n ui: {\n getTheme: 0,\n setTheme: 0,\n resetTheme: 0,\n getStyles: 0,\n setStyles: 0,\n resetStyles: 0,\n getGameInfo: 0,\n },\n\n grafting: {\n getAugmentationGraftPrice: 3.75,\n getAugmentationGraftTime: 3.75,\n graftAugmentation: 7.5,\n },\n\n heart: {\n // Easter egg function\n break: 0,\n },\n};\n\nexport function getRamCost(player: IPlayer, ...args: string[]): number {\n if (args.length === 0) {\n console.warn(`No arguments passed to getRamCost()`);\n return 0;\n }\n\n let curr = RamCosts[args[0]];\n for (let i = 1; i < args.length; ++i) {\n if (curr == null) {\n console.warn(`Invalid function passed to getRamCost: ${args}`);\n return 0;\n }\n\n const currType = typeof curr;\n if (currType === \"function\" || currType === \"number\") {\n break;\n }\n\n curr = curr[args[i]];\n }\n\n if (typeof curr === \"number\") {\n return curr;\n }\n\n if (typeof curr === \"function\") {\n return curr(player);\n }\n\n console.warn(`Unexpected type (${curr}) for value [${args}]`);\n return 0;\n}\n","export enum AugmentationNames {\n Targeting1 = \"Augmented Targeting I\",\n Targeting2 = \"Augmented Targeting II\",\n Targeting3 = \"Augmented Targeting III\",\n SyntheticHeart = \"Synthetic Heart\",\n SynfibrilMuscle = \"Synfibril Muscle\",\n CombatRib1 = \"Combat Rib I\",\n CombatRib2 = \"Combat Rib II\",\n CombatRib3 = \"Combat Rib III\",\n NanofiberWeave = \"Nanofiber Weave\",\n SubdermalArmor = \"NEMEAN Subdermal Weave\",\n WiredReflexes = \"Wired Reflexes\",\n GrapheneBoneLacings = \"Graphene Bone Lacings\",\n BionicSpine = \"Bionic Spine\",\n GrapheneBionicSpine = \"Graphene Bionic Spine Upgrade\",\n BionicLegs = \"Bionic Legs\",\n GrapheneBionicLegs = \"Graphene Bionic Legs Upgrade\",\n SpeechProcessor = \"Speech Processor Implant\",\n TITN41Injection = \"TITN-41 Gene-Modification Injection\",\n EnhancedSocialInteractionImplant = \"Enhanced Social Interaction Implant\",\n BitWire = \"BitWire\",\n ArtificialBioNeuralNetwork = \"Artificial Bio-neural Network Implant\",\n ArtificialSynapticPotentiation = \"Artificial Synaptic Potentiation\",\n EnhancedMyelinSheathing = \"Enhanced Myelin Sheathing\",\n SynapticEnhancement = \"Synaptic Enhancement Implant\",\n NeuralRetentionEnhancement = \"Neural-Retention Enhancement\",\n DataJack = \"DataJack\",\n ENM = \"Embedded Netburner Module\",\n ENMCore = \"Embedded Netburner Module Core Implant\",\n ENMCoreV2 = \"Embedded Netburner Module Core V2 Upgrade\",\n ENMCoreV3 = \"Embedded Netburner Module Core V3 Upgrade\",\n ENMAnalyzeEngine = \"Embedded Netburner Module Analyze Engine\",\n ENMDMA = \"Embedded Netburner Module Direct Memory Access Upgrade\",\n Neuralstimulator = \"Neuralstimulator\",\n NeuralAccelerator = \"Neural Accelerator\",\n CranialSignalProcessorsG1 = \"Cranial Signal Processors - Gen I\",\n CranialSignalProcessorsG2 = \"Cranial Signal Processors - Gen II\",\n CranialSignalProcessorsG3 = \"Cranial Signal Processors - Gen III\",\n CranialSignalProcessorsG4 = \"Cranial Signal Processors - Gen IV\",\n CranialSignalProcessorsG5 = \"Cranial Signal Processors - Gen V\",\n NeuronalDensification = \"Neuronal Densification\",\n NeuroreceptorManager = \"Neuroreceptor Management Implant\",\n NuoptimalInjectorImplant = \"Nuoptimal Nootropic Injector Implant\",\n SpeechEnhancement = \"Speech Enhancement\",\n FocusWire = \"FocusWire\",\n PCDNI = \"PC Direct-Neural Interface\",\n PCDNIOptimizer = \"PC Direct-Neural Interface Optimization Submodule\",\n PCDNINeuralNetwork = \"PC Direct-Neural Interface NeuroNet Injector\",\n PCMatrix = \"PCMatrix\",\n ADRPheromone1 = \"ADR-V1 Pheromone Gene\",\n ADRPheromone2 = \"ADR-V2 Pheromone Gene\",\n ShadowsSimulacrum = \"The Shadow's Simulacrum\",\n HacknetNodeCPUUpload = \"Hacknet Node CPU Architecture Neural-Upload\",\n HacknetNodeCacheUpload = \"Hacknet Node Cache Architecture Neural-Upload\",\n HacknetNodeNICUpload = \"Hacknet Node NIC Architecture Neural-Upload\",\n HacknetNodeKernelDNI = \"Hacknet Node Kernel Direct-Neural Interface\",\n HacknetNodeCoreDNI = \"Hacknet Node Core Direct-Neural Interface\",\n NeuroFluxGovernor = \"NeuroFlux Governor\",\n Neurotrainer1 = \"Neurotrainer I\",\n Neurotrainer2 = \"Neurotrainer II\",\n Neurotrainer3 = \"Neurotrainer III\",\n Hypersight = \"HyperSight Corneal Implant\",\n LuminCloaking1 = \"LuminCloaking-V1 Skin Implant\",\n LuminCloaking2 = \"LuminCloaking-V2 Skin Implant\",\n HemoRecirculator = \"HemoRecirculator\",\n SmartSonar = \"SmartSonar Implant\",\n PowerRecirculator = \"Power Recirculation Core\",\n QLink = \"QLink\",\n TheRedPill = \"The Red Pill\",\n SPTN97 = \"SPTN-97 Gene Modification\",\n HiveMind = \"ECorp HVMind Implant\",\n CordiARCReactor = \"CordiARC Fusion Reactor\",\n SmartJaw = \"SmartJaw\",\n Neotra = \"Neotra\",\n Xanipher = \"Xanipher\",\n nextSENS = \"nextSENS Gene Modification\",\n OmniTekInfoLoad = \"OmniTek InfoLoad\",\n PhotosyntheticCells = \"Photosynthetic Cells\",\n Neurolink = \"BitRunners Neurolink\",\n TheBlackHand = \"The Black Hand\",\n UnstableCircadianModulator = \"Unstable Circadian Modulator\",\n CRTX42AA = \"CRTX42-AA Gene Modification\",\n Neuregen = \"Neuregen Gene Modification\",\n CashRoot = \"CashRoot Starter Kit\",\n NutriGen = \"NutriGen Implant\",\n INFRARet = \"INFRARET Enhancement\",\n DermaForce = \"DermaForce Particle Barrier\",\n GrapheneBrachiBlades = \"Graphene BrachiBlades Upgrade\",\n GrapheneBionicArms = \"Graphene Bionic Arms Upgrade\",\n BrachiBlades = \"BrachiBlades\",\n BionicArms = \"Bionic Arms\",\n SNA = \"Social Negotiation Assistant (S.N.A)\",\n HydroflameLeftArm = \"Hydroflame Left Arm\",\n EsperEyewear = \"EsperTech Bladeburner Eyewear\",\n EMS4Recombination = \"EMS-4 Recombination\",\n OrionShoulder = \"ORION-MKIV Shoulder\",\n HyperionV1 = \"Hyperion Plasma Cannon V1\",\n HyperionV2 = \"Hyperion Plasma Cannon V2\",\n GolemSerum = \"GOLEM Serum\",\n VangelisVirus = \"Vangelis Virus\",\n VangelisVirus3 = \"Vangelis Virus 3.0\",\n INTERLINKED = \"I.N.T.E.R.L.I.N.K.E.D\",\n BladeRunner = \"Blade's Runners\",\n BladeArmor = \"BLADE-51b Tesla Armor\",\n BladeArmorPowerCells = \"BLADE-51b Tesla Armor: Power Cells Upgrade\",\n BladeArmorEnergyShielding = \"BLADE-51b Tesla Armor: Energy Shielding Upgrade\",\n BladeArmorUnibeam = \"BLADE-51b Tesla Armor: Unibeam Upgrade\",\n BladeArmorOmnibeam = \"BLADE-51b Tesla Armor: Omnibeam Upgrade\",\n BladeArmorIPU = \"BLADE-51b Tesla Armor: IPU Upgrade\",\n BladesSimulacrum = \"The Blade's Simulacrum\",\n\n StaneksGift1 = \"Stanek's Gift - Genesis\",\n StaneksGift2 = \"Stanek's Gift - Awakening\",\n StaneksGift3 = \"Stanek's Gift - Serenity\",\n\n //Wasteland Augs\n //PepBoy: \"P.E.P-Boy\", Plasma Energy Projection System\n //PepBoyForceField Generates plasma force fields\n //PepBoyBlasts Generate high density plasma concussive blasts\n //PepBoyDataStorage STore more data on pep boy,\n}\n","import { AlertEvents } from \"./AlertManager\";\n\nimport React from \"react\";\nimport { SxProps } from \"@mui/system\";\nimport { Typography } from \"@mui/material\";\n\nexport function dialogBoxCreate(txt: string | JSX.Element, styles?: SxProps): void {\n if (typeof txt !== \"string\") {\n AlertEvents.emit(txt);\n } else {\n AlertEvents.emit();\n }\n}\n","/**\n * All possible Cities in the game. Names only, not actual \"City\" object\n * Implemented as an enum for typing purposes\n */\nexport enum CityName {\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number | string;\n player?: IPlayer;\n}\nexport function Money(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (props.player !== undefined) {\n if (typeof props.money !== \"number\") throw new Error(\"if player if provided, money should be number, contact dev\");\n if (!props.player.canAfford(props.money))\n return {numeralWrapper.formatMoney(props.money)};\n }\n return (\n \n {typeof props.money === \"number\" ? numeralWrapper.formatMoney(props.money) : props.money}\n \n );\n}\n","import { EqualityFunc } from \"../types\";\nimport { isString } from \"./helpers/isString\";\n\n/*\nConverts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds\ne.g. 10000 -> \"10 seconds\"\n 120000 -> \"2 minutes and 0 seconds\"\n*/\nfunction convertTimeMsToTimeElapsedString(time: number, showMilli = false): string {\n time = Math.floor(time);\n const millisecondsPerSecond = 1000;\n const secondPerMinute = 60;\n const minutesPerHours = 60;\n const secondPerHours: number = secondPerMinute * minutesPerHours;\n const hoursPerDays = 24;\n const secondPerDay: number = secondPerHours * hoursPerDays;\n\n // Convert ms to seconds, since we only have second-level precision\n const totalSeconds: number = Math.floor(time / millisecondsPerSecond);\n\n const days: number = Math.floor(totalSeconds / secondPerDay);\n const secTruncDays: number = totalSeconds % secondPerDay;\n\n const hours: number = Math.floor(secTruncDays / secondPerHours);\n const secTruncHours: number = secTruncDays % secondPerHours;\n\n const minutes: number = Math.floor(secTruncHours / secondPerMinute);\n const secTruncMinutes: number = secTruncHours % secondPerMinute;\n\n const milliTruncSec: string = (() => {\n let str = `${time % millisecondsPerSecond}`;\n while (str.length < 3) str = \"0\" + str;\n return str;\n })();\n\n const seconds: string = showMilli ? `${secTruncMinutes}.${milliTruncSec}` : `${secTruncMinutes}`;\n\n let res = \"\";\n if (days > 0) {\n res += `${days} days `;\n }\n if (hours > 0) {\n res += `${hours} hours `;\n }\n if (minutes > 0) {\n res += `${minutes} minutes `;\n }\n res += `${seconds} seconds`;\n\n return res;\n}\n\n// Finds the longest common starting substring in a set of strings\nfunction longestCommonStart(strings: string[]): string {\n if (!containsAllStrings(strings)) {\n return \"\";\n }\n if (strings.length === 0) {\n return \"\";\n }\n\n const A: string[] = strings.concat().sort();\n const a1: string = A[0];\n const a2: string = A[A.length - 1];\n const L: number = a1.length;\n let i = 0;\n const areEqualCaseInsensitive: EqualityFunc = (a: string, b: string) => a.toUpperCase() === b.toUpperCase();\n while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) {\n i++;\n }\n\n return a1.substring(0, i);\n}\n\n// Returns whether an array contains entirely of string objects\nfunction containsAllStrings(arr: string[]): boolean {\n return arr.every(isString);\n}\n\n// Formats a number with commas and a specific number of decimal digits\nfunction formatNumber(num: number, numFractionDigits = 0): string {\n return num.toLocaleString(undefined, {\n maximumFractionDigits: numFractionDigits,\n minimumFractionDigits: numFractionDigits,\n });\n}\n\n// Generates a random alphanumeric string with N characters\nfunction generateRandomString(n: number): string {\n let str = \"\";\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < n; i++) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n\n/**\n * Hashes the input string. This is a fast hash, so NOT good for cryptography.\n * This has been ripped off here: https://stackoverflow.com/a/52171480\n * @param str The string that is to be hashed\n * @param seed A seed to randomize the result\n * @returns An hexadecimal string representation of the hashed input\n */\nfunction cyrb53(str: string, seed = 0): string {\n let h1 = 0xdeadbeef ^ seed;\n let h2 = 0x41c6ce57 ^ seed;\n for (let i = 0, ch; i < str.length; i++) {\n ch = str.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(16);\n}\n\nexport {\n convertTimeMsToTimeElapsedString,\n longestCommonStart,\n containsAllStrings,\n formatNumber,\n generateRandomString,\n cyrb53,\n};\n","/* Generic Reviver, toJSON, and fromJSON functions used for saving and loading objects */\n\nimport { validateObject } from \"./Validator\";\n\ninterface IReviverValue {\n ctor: string;\n data: any;\n}\n\n// A generic \"smart reviver\" function.\n// Looks for object values with a `ctor` property and\n// a `data` property. If it finds them, and finds a matching\n// constructor that has a `fromJSON` property on it, it hands\n// off to that `fromJSON` fuunction, passing in the value.\nexport function Reviver(key: string, value: IReviverValue | null): any {\n if (value == null) {\n return null;\n }\n\n if (typeof value === \"object\" && typeof value.ctor === \"string\" && typeof value.data !== \"undefined\") {\n // Compatibility for version v0.43.1\n // TODO Remove this eventually\n if (value.ctor === \"AllServersMap\") {\n console.warn(\"Converting AllServersMap for v0.43.1\");\n return value.data;\n }\n\n const ctor = Reviver.constructors[value.ctor];\n\n if (typeof ctor === \"function\" && typeof ctor.fromJSON === \"function\") {\n const obj = ctor.fromJSON(value);\n if (ctor.validationData !== undefined) {\n validateObject(obj, ctor.validationData);\n }\n return obj;\n }\n }\n return value;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Reviver {\n export const constructors: { [key: string]: any } = {};\n}\n\n// A generic \"toJSON\" function that creates the data expected\n// by Reviver.\n// `ctorName` The name of the constructor to use to revive it\n// `obj` The object being serialized\n// `keys` (Optional) Array of the properties to serialize,\n// if not given then all of the objects \"own\" properties\n// that don't have function values will be serialized.\n// (Note: If you list a property in `keys`, it will be serialized\n// regardless of whether it's an \"own\" property.)\n// Returns: The structure (which will then be turned into a string\n// as part of the JSON.stringify algorithm)\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_toJSON(ctorName: string, obj: any, keys?: string[]): IReviverValue {\n if (!keys) {\n keys = Object.keys(obj); // Only \"own\" properties are included\n }\n\n const data: any = {};\n for (let index = 0; index < keys.length; ++index) {\n const key = keys[index];\n data[key] = obj[key];\n }\n return { ctor: ctorName, data: data };\n}\n\n// A generic \"fromJSON\" function for use with Reviver: Just calls the\n// constructor function with no arguments, then applies all of the\n// key/value pairs from the raw data to the instance. Only useful for\n// constructors that can be reasonably called without arguments!\n// `ctor` The constructor to call\n// `data` The data to apply\n// Returns: The object\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_fromJSON(ctor: new () => T, data: any): T {\n const obj: any = new ctor();\n for (const name in data) {\n obj[name] = data[name];\n }\n return obj;\n}\n","import { Server } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { serverMetadata } from \"./data/servers\";\n\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\n\nimport { IMap } from \"../types\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Reviver } from \"../utils/JSONReviver\";\nimport { isValidIPAddress } from \"../utils/helpers/isValidIPAddress\";\nimport { SpecialServers } from \"./data/SpecialServers\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\nlet AllServers: IMap = {};\n\nfunction GetServerByIP(ip: string): BaseServer | undefined {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== ip) continue;\n return server;\n }\n}\n\n//Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\nfunction GetServerByHostname(hostname: string): BaseServer | null {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.hostname == hostname) {\n return server;\n }\n }\n\n return null;\n}\n\n//Get server by IP or hostname. Returns null if invalid\nexport function GetServer(s: string): BaseServer | null {\n if (AllServers.hasOwnProperty(s)) {\n const server = AllServers[s];\n if (server) return server;\n }\n\n if (!isValidIPAddress(s)) {\n return GetServerByHostname(s);\n }\n\n const ipserver = GetServerByIP(s);\n if (ipserver !== undefined) {\n return ipserver;\n }\n\n return null;\n}\n\nexport function GetAllServers(): BaseServer[] {\n const servers: BaseServer[] = [];\n for (const key of Object.keys(AllServers)) {\n servers.push(AllServers[key]);\n }\n return servers;\n}\n\nexport function DeleteServer(serverkey: string): void {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== serverkey && server.hostname !== serverkey) continue;\n delete AllServers[key];\n break;\n }\n}\n\nexport function ipExists(ip: string): boolean {\n return AllServers[ip] != null;\n}\n\nexport function createUniqueRandomIp(): string {\n let ip: string;\n // Repeat generating ip, until unique one is found\n do {\n ip = createRandomIp();\n } while (ipExists(ip));\n\n return ip;\n}\n\n// Saftely add a Server to the AllServers map\nexport function AddToAllServers(server: Server | HacknetServer): void {\n if (GetServer(server.hostname)) {\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[server.hostname].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[server.hostname] = server;\n}\n\ninterface IServerParams {\n hackDifficulty?: number;\n hostname: string;\n ip: string;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired: number;\n organizationName: string;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n\n [key: string]: any;\n}\n\nexport function initForeignServers(homeComputer: Server): void {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers: Server[][] = [];\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n }\n\n // Essentially any property that is of type 'number | IMinMaxRange'\n const propertiesToPatternMatch: string[] = [\n \"hackDifficulty\",\n \"moneyAvailable\",\n \"requiredHackingSkill\",\n \"serverGrowth\",\n ];\n\n const toNumber = (value: any): any => {\n switch (typeof value) {\n case \"number\":\n return value;\n case \"object\":\n return getRandomInt(value.min, value.max);\n default:\n throw Error(`Do not know how to convert the type '${typeof value}' to a number`);\n }\n };\n\n for (const metadata of serverMetadata) {\n const serverParams: IServerParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName,\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n for (const prop of propertiesToPatternMatch) {\n if (metadata[prop] !== undefined) {\n serverParams[prop] = toNumber(metadata[prop]);\n }\n }\n\n const server = new Server(serverParams);\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (server.hostname === SpecialServers.WorldDaemon) {\n server.requiredHackingSkill *= BitNodeMultipliers.WorldDaemonDifficulty;\n }\n AddToAllServers(server);\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n\n /* Create a randomized network for all the foreign servers */\n const linkComputers = (server1: Server, server2: Server): void => {\n server1.serversOnNetwork.push(server2.hostname);\n server2.serversOnNetwork.push(server1.hostname);\n };\n\n const getRandomArrayItem = (arr: any[]): any => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1: Server[], selectServer: () => Server): void => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n };\n\n // Connect the first tier of servers to the player's home computer\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\n\nexport function prestigeAllServers(): void {\n for (const member of Object.keys(AllServers)) {\n delete AllServers[member];\n }\n AllServers = {};\n}\n\nexport function loadAllServers(saveString: string): void {\n AllServers = JSON.parse(saveString, Reviver);\n}\n\nexport function saveAllServers(excludeRunningScripts = false): string {\n const TempAllServers = JSON.parse(JSON.stringify(AllServers), Reviver);\n for (const key of Object.keys(TempAllServers)) {\n const server = TempAllServers[key];\n if (excludeRunningScripts) {\n server.runningScripts = [];\n continue;\n }\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n return JSON.stringify(TempAllServers);\n}\n","import { Faction } from \"../Faction/Faction\";\nimport { Location } from \"../Locations/Location\";\n\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nexport enum Page {\n ActiveScripts,\n Augmentations,\n BitVerse,\n Bladeburner,\n City,\n Corporation,\n CreateProgram,\n ScriptEditor,\n DevMenu,\n Faction,\n Factions,\n Gang,\n Hacknet,\n Infiltration,\n Job,\n Milestones,\n Options,\n Grafting,\n Sleeves,\n Stats,\n StockMarket,\n Terminal,\n Travel,\n Tutorial,\n Work,\n BladeburnerCinematic,\n Location,\n Loading,\n StaneksGift,\n Recovery,\n Achievements,\n ThemeBrowser,\n ImportSave,\n}\n\nexport interface ScriptEditorRouteOptions {\n vim: boolean;\n}\n\n/**\n * This class keeps track of player navigation/routing within the game.\n */\nexport interface IRouter {\n // toCinematicText(): void;\n // toInfiltration(): void;\n // toMission(): void;\n // toRedPill(): void;\n // toworkInProgress(): void;\n isInitialized: boolean;\n page(): Page;\n allowRouting(value: boolean): void;\n toActiveScripts(): void;\n toAugmentations(): void;\n toBitVerse(flume: boolean, quick: boolean): void;\n toBladeburner(): void;\n toStats(): void;\n toCity(): void; // travel ? city ?\n toCorporation(): void;\n toCreateProgram(): void;\n toDevMenu(): void;\n toFaction(faction: Faction, augPage?: boolean): void; // faction name\n toFactions(): void;\n toGameOptions(): void;\n toGang(): void;\n toHacknetNodes(): void;\n toInfiltration(location: Location): void;\n toJob(): void;\n toMilestones(): void;\n toGrafting(): void;\n toScriptEditor(files?: Record, options?: ScriptEditorRouteOptions): void;\n toSleeves(): void;\n toStockMarket(): void;\n toTerminal(): void;\n toTravel(): void;\n toTutorial(): void;\n toWork(): void;\n toBladeburnerCinematic(): void;\n toLocation(location: Location): void;\n toStaneksGift(): void;\n toAchievements(): void;\n toThemeBrowser(): void;\n toImportSave(base64Save: string, automatic?: boolean): void;\n}\n","/**\n * Keyboard key codes\n */\nexport enum KEY {\n //SHIFT: 16, // Check by `&& event.shiftKey`\n //CTRL: 17, // Check by `&& event.ctrlKey`\n //ALT: 18, // Check by `&& event.altKey`\n ENTER = \"Enter\",\n ESC = \"Escape\",\n TAB = \"Tab\",\n SPACE = \" \",\n BACKSPACE = \"Backspace\",\n UP_ARROW = \"ArrowUp\",\n DOWN_ARROW = \"ArrowDown\",\n LEFT_ARROW = \"ArrowLeft\",\n RIGHT_ARROW = \"ArrowRight\",\n\n QUOTE = \"'\",\n DOUBLE_QUOTE = '\"',\n OPEN_BRACKET = \"[\",\n CLOSE_BRACKET = \"]\",\n LESS_THAN = \"<\",\n GREATER_THAN = \">\",\n OPEN_PARENTHESIS = \"(\",\n CLOSE_PARENTHESIS = \")\",\n OPEN_BRACE = \"{\",\n CLOSE_BRACE = \"}\",\n\n PIPE = \"|\",\n DOT = \".\",\n FORWARD_SLASH = \"/\",\n HYPHEN = \"-\",\n HASH = \"#\",\n\n k0 = \"0\",\n k1 = \"1\",\n k2 = \"2\",\n k3 = \"3\",\n k4 = \"4\",\n k5 = \"5\",\n k6 = \"6\",\n k7 = \"7\",\n k8 = \"8\",\n k9 = \"9\",\n\n A = \"a\",\n B = \"b\",\n C = \"c\",\n D = \"d\",\n E = \"e\",\n F = \"f\",\n G = \"g\",\n H = \"h\",\n I = \"i\",\n J = \"j\",\n K = \"k\",\n L = \"l\",\n M = \"m\",\n N = \"n\",\n O = \"o\",\n P = \"p\",\n Q = \"q\",\n R = \"r\",\n S = \"s\",\n T = \"t\",\n U = \"u\",\n V = \"v\",\n W = \"w\",\n X = \"x\",\n Y = \"y\",\n Z = \"z\",\n}\n","/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\nimport { Faction } from \"./Faction\";\nimport { FactionInfos } from \"./FactionInfo\";\n\nimport { IMap } from \"../types\";\n\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Factions: IMap = {};\n\nexport function loadFactions(saveString: string): void {\n Factions = JSON.parse(saveString, Reviver);\n // safety check for when we load older save file that don't have newer factions\n for (const faction of Object.keys(Factions)) {\n try {\n Factions[faction].getInfo();\n } catch (err) {\n console.error(\"deleting \" + faction);\n delete Factions[faction];\n }\n }\n}\n\nfunction AddToFactions(faction: Faction): void {\n const name: string = faction.name;\n Factions[name] = faction;\n}\n\nexport function factionExists(name: string): boolean {\n return Factions.hasOwnProperty(name);\n}\n\nexport function initFactions(): void {\n for (const name of Object.keys(FactionInfos)) {\n resetFaction(new Faction(name));\n }\n}\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\nfunction resetFaction(newFactionObject: Faction): void {\n if (!(newFactionObject instanceof Faction)) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n const factionName: string = newFactionObject.name;\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n AddToFactions(newFactionObject);\n}\n","import React, { useContext } from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"./Router\";\n\nexport const Context: {\n Player: React.Context;\n Router: React.Context;\n} = {\n Player: React.createContext({} as IPlayer),\n Router: React.createContext({} as IRouter),\n};\n\nexport const use: {\n Player: () => IPlayer;\n Router: () => IRouter;\n} = {\n Player: () => useContext(Context.Player),\n Router: () => useContext(Context.Router),\n};\n","// Defs for job titles, stored in arrays and categorized by job \"type\"\n\nexport const SoftwareCompanyPositions: string[] = [\n \"Software Engineering Intern\",\n \"Junior Software Engineer\",\n \"Senior Software Engineer\",\n \"Lead Software Developer\",\n \"Head of Software\",\n \"Head of Engineering\",\n \"Vice President of Technology\",\n \"Chief Technology Officer\",\n];\n\nexport const ITCompanyPositions: string[] = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\n\nexport const SecurityEngineerCompanyPositions: string[] = [\"Security Engineer\"];\n\nexport const NetworkEngineerCompanyPositions: string[] = [\"Network Engineer\", \"Network Administrator\"];\n\nexport const BusinessCompanyPositions: string[] = [\n \"Business Intern\",\n \"Business Analyst\",\n \"Business Manager\",\n \"Operations Manager\",\n \"Chief Financial Officer\",\n \"Chief Executive Officer\",\n];\n\nexport const SecurityCompanyPositions: string[] = [\n \"Police Officer\",\n \"Police Chief\",\n \"Security Guard\",\n \"Security Officer\",\n \"Security Supervisor\",\n \"Head of Security\",\n];\n\nexport const AgentCompanyPositions: string[] = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\n\nexport const MiscCompanyPositions: string[] = [\"Waiter\", \"Employee\"];\n\nexport const SoftwareConsultantCompanyPositions: string[] = [\"Software Consultant\", \"Senior Software Consultant\"];\n\nexport const BusinessConsultantCompanyPositions: string[] = [\"Business Consultant\", \"Senior Business Consultant\"];\n\nexport const PartTimeCompanyPositions: string[] = [\"Part-time Waiter\", \"Part-time Employee\"];\n","/**\n * Gets a random integer bounded by the values passed in.\n * @param min The minimum value in the range.\n * @param max The maximum value in the range.\n */\nexport function getRandomInt(min: number, max: number): number {\n const lower: number = Math.min(min, max);\n const upper: number = Math.max(min, max);\n\n return Math.floor(Math.random() * (upper - lower + 1)) + lower;\n}\n","import { CityName } from './../../Locations/data/CityNames';\nconst CyclesPerMarketCycle = 50;\nconst AllCorporationStates = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\nexport const CorporationConstants: {\n INITIALSHARES: number;\n SHARESPERPRICEUPDATE: number;\n IssueNewSharesCooldown: number;\n SellSharesCooldown: number;\n CyclesPerMarketCycle: number;\n CyclesPerIndustryStateCycle: number;\n SecsPerMarketCycle: number;\n Cities: string[];\n WarehouseInitialCost: number;\n WarehouseInitialSize: number;\n WarehouseUpgradeBaseCost: number;\n OfficeInitialCost: number;\n OfficeInitialSize: number;\n OfficeUpgradeBaseCost: number;\n BribeThreshold: number;\n BribeToRepRatio: number;\n ProductProductionCostRatio: number;\n DividendMaxPercentage: number;\n EmployeeSalaryMultiplier: number;\n CyclesPerEmployeeRaise: number;\n EmployeeRaiseAmount: number;\n BaseMaxProducts: number;\n AllCorporationStates: string[];\n AllMaterials: string[];\n FundingRoundShares: number[];\n FundingRoundMultiplier: number[];\n} = {\n INITIALSHARES: 1e9, //Total number of shares you have at your company\n SHARESPERPRICEUPDATE: 1e6, //When selling large number of shares, price is dynamically updated for every batch of this amount\n IssueNewSharesCooldown: 216e3, // 12 Hour in terms of game cycles\n SellSharesCooldown: 18e3, // 1 Hour in terms of game cycles\n\n CyclesPerMarketCycle: CyclesPerMarketCycle,\n CyclesPerIndustryStateCycle: CyclesPerMarketCycle / AllCorporationStates.length,\n SecsPerMarketCycle: CyclesPerMarketCycle / 5,\n\n Cities: [CityName.Aevum, CityName.Chongqing, CityName.Sector12, CityName.NewTokyo, CityName.Ishima, CityName.Volhaven],\n\n WarehouseInitialCost: 5e9, //Initial purchase cost of warehouse\n WarehouseInitialSize: 100,\n WarehouseUpgradeBaseCost: 1e9,\n\n OfficeInitialCost: 4e9,\n OfficeInitialSize: 3,\n OfficeUpgradeBaseCost: 1e9,\n\n BribeThreshold: 100e12, //Money needed to be able to bribe for faction rep\n BribeToRepRatio: 1e9, //Bribe Value divided by this = rep gain\n\n ProductProductionCostRatio: 5, //Ratio of material cost of a product to its production cost\n\n DividendMaxPercentage: 1,\n\n EmployeeSalaryMultiplier: 3, // Employee stats multiplied by this to determine initial salary\n CyclesPerEmployeeRaise: 400, // All employees get a raise every X market cycles\n EmployeeRaiseAmount: 50, // Employee salary increases by this (additive)\n\n BaseMaxProducts: 3, // Initial value for maximum number of products allowed\n AllCorporationStates: AllCorporationStates,\n AllMaterials: [\n \"Water\",\n \"Energy\",\n \"Food\",\n \"Plants\",\n \"Metal\",\n \"Hardware\",\n \"Chemicals\",\n \"Drugs\",\n \"Robots\",\n \"AI Cores\",\n \"Real Estate\",\n ],\n FundingRoundShares: [\n 0.1,\n 0.35,\n 0.25,\n 0.2\n ],\n FundingRoundMultiplier: [\n 4,\n 3,\n 3,\n 2.5\n ],\n};\n","export const HacknetNodeConstants: {\n // Constants for Hacknet Node production\n MoneyGainPerLevel: number;\n\n // Constants for Hacknet Node purchase/upgrade costs\n BaseCost: number;\n LevelBaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n\n PurchaseNextMult: number;\n UpgradeLevelMult: number;\n UpgradeRamMult: number;\n UpgradeCoreMult: number;\n\n // Constants for max upgrade levels for Hacknet Nodes\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n} = {\n MoneyGainPerLevel: 1.5,\n\n BaseCost: 1000,\n LevelBaseCost: 1,\n RamBaseCost: 30e3,\n CoreBaseCost: 500e3,\n\n PurchaseNextMult: 1.85,\n UpgradeLevelMult: 1.04,\n UpgradeRamMult: 1.28,\n UpgradeCoreMult: 1.48,\n\n MaxLevel: 200,\n MaxRam: 64,\n MaxCores: 16,\n};\n\nexport const PurchaseMultipliers: {\n [key: string]: number | \"MAX\" | undefined;\n x1: number;\n x5: number;\n x10: number;\n MAX: \"MAX\";\n} = {\n x1: 1,\n x5: 5,\n x10: 10,\n MAX: \"MAX\",\n};\n\nexport const HacknetServerConstants: {\n // Constants for Hacknet Server stats/production\n HashesPerLevel: number;\n\n // Constants for Hacknet Server purchase/upgrade costs\n BaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n CacheBaseCost: number;\n\n PurchaseMult: number; // Multiplier for puchasing an additional Hacknet Server\n UpgradeLevelMult: number; // Multiplier for cost when upgrading level\n UpgradeRamMult: number; // Multiplier for cost when upgrading RAM\n UpgradeCoreMult: number; // Multiplier for cost when buying another core\n UpgradeCacheMult: number; // Multiplier for cost when upgrading cache\n MaxServers: number; // Max number of Hacknet Servers you can own\n\n // Constants for max upgrade levels for Hacknet Server\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n MaxCache: number;\n} = {\n HashesPerLevel: 0.001,\n\n BaseCost: 50e3,\n RamBaseCost: 200e3,\n CoreBaseCost: 1e6,\n CacheBaseCost: 10e6,\n\n PurchaseMult: 3.2,\n UpgradeLevelMult: 1.1,\n UpgradeRamMult: 1.4,\n UpgradeCoreMult: 1.55,\n UpgradeCacheMult: 1.85,\n\n MaxServers: 20,\n\n MaxLevel: 300,\n MaxRam: 8192,\n MaxCores: 128,\n MaxCache: 15,\n};\n","// Class definition for a single Augmentation object\nimport * as React from \"react\";\nimport { IMap } from \"../types\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n info: string | JSX.Element;\n stats?: JSX.Element | null;\n isSpecial?: boolean;\n moneyCost: number;\n name: string;\n prereqs?: string[];\n repCost: number;\n factions: string[];\n\n hacking_mult?: number;\n strength_mult?: number;\n defense_mult?: number;\n dexterity_mult?: number;\n agility_mult?: number;\n charisma_mult?: number;\n hacking_exp_mult?: number;\n strength_exp_mult?: number;\n defense_exp_mult?: number;\n dexterity_exp_mult?: number;\n agility_exp_mult?: number;\n charisma_exp_mult?: number;\n hacking_chance_mult?: number;\n hacking_speed_mult?: number;\n hacking_money_mult?: number;\n hacking_grow_mult?: number;\n company_rep_mult?: number;\n faction_rep_mult?: number;\n crime_money_mult?: number;\n crime_success_mult?: number;\n work_money_mult?: number;\n hacknet_node_money_mult?: number;\n hacknet_node_purchase_cost_mult?: number;\n hacknet_node_ram_cost_mult?: number;\n hacknet_node_core_cost_mult?: number;\n hacknet_node_level_cost_mult?: number;\n bladeburner_max_stamina_mult?: number;\n bladeburner_stamina_gain_mult?: number;\n bladeburner_analysis_mult?: number;\n bladeburner_success_chance_mult?: number;\n\n startingMoney?: number;\n programs?: string[];\n}\n\nfunction generateStatsDescription(mults: IMap, programs?: string[], startingMoney?: number): JSX.Element {\n const f = (x: number, decimals = 0): string => {\n // look, I don't know how to make a \"smart decimals\"\n // todo, make it smarter\n if (x === 1.0777 - 1) return \"7.77%\";\n if (x === 1.777 - 1) return \"77.7%\";\n return numeralWrapper.formatPercentage(x, decimals);\n };\n let desc = <>Effects:;\n\n if (\n mults.hacking_mult &&\n mults.hacking_mult == mults.strength_mult &&\n mults.hacking_mult == mults.defense_mult &&\n mults.hacking_mult == mults.dexterity_mult &&\n mults.hacking_mult == mults.agility_mult &&\n mults.hacking_mult == mults.charisma_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_mult - 1)} all skills\n \n );\n } else {\n if (mults.hacking_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_mult - 1)} hacking skill\n \n );\n\n if (\n mults.strength_mult &&\n mults.strength_mult == mults.defense_mult &&\n mults.strength_mult == mults.dexterity_mult &&\n mults.strength_mult == mults.agility_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength_mult - 1)} combat skills\n \n );\n } else {\n if (mults.strength_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.strength_mult - 1)} strength skill\n \n );\n if (mults.defense_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.defense_mult - 1)} defense skill\n \n );\n if (mults.dexterity_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity_mult - 1)} dexterity skill\n \n );\n if (mults.agility_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.agility_mult - 1)} agility skill\n \n );\n }\n if (mults.charisma_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma_mult - 1)} Charisma skill\n \n );\n }\n\n if (\n mults.hacking_exp_mult &&\n mults.hacking_exp_mult === mults.strength_exp_mult &&\n mults.hacking_exp_mult === mults.defense_exp_mult &&\n mults.hacking_exp_mult === mults.dexterity_exp_mult &&\n mults.hacking_exp_mult === mults.agility_exp_mult &&\n mults.hacking_exp_mult === mults.charisma_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp_mult - 1)} exp for all skills\n \n );\n } else {\n if (mults.hacking_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_exp_mult - 1)} hacking exp\n \n );\n\n if (\n mults.strength_exp_mult &&\n mults.strength_exp_mult === mults.defense_exp_mult &&\n mults.strength_exp_mult === mults.dexterity_exp_mult &&\n mults.strength_exp_mult === mults.agility_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp_mult - 1)} combat exp\n \n );\n } else {\n if (mults.strength_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.strength_exp_mult - 1)} strength exp\n \n );\n if (mults.defense_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.defense_exp_mult - 1)} defense exp\n \n );\n if (mults.dexterity_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.dexterity_exp_mult - 1)} dexterity exp\n \n );\n if (mults.agility_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.agility_exp_mult - 1)} agility exp\n \n );\n }\n if (mults.charisma_exp_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.charisma_exp_mult - 1)} charisma exp\n \n );\n }\n\n if (mults.hacking_speed_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_speed_mult - 1)} faster hack(), grow(), and weaken()\n \n );\n if (mults.hacking_chance_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_chance_mult - 1)} hack() success chance\n \n );\n if (mults.hacking_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_money_mult - 1)} hack() power\n \n );\n if (mults.hacking_grow_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacking_grow_mult - 1)} grow() power\n \n );\n\n if (mults.faction_rep_mult && mults.faction_rep_mult === mults.company_rep_mult) {\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep_mult - 1)} reputation from factions and companies\n \n );\n } else {\n if (mults.faction_rep_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.faction_rep_mult - 1)} reputation from factions\n \n );\n if (mults.company_rep_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.company_rep_mult - 1)} reputation from companies\n \n );\n }\n\n if (mults.crime_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_money_mult - 1)} crime money\n \n );\n if (mults.crime_success_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.crime_success_mult - 1)} crime success rate\n \n );\n if (mults.work_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.work_money_mult - 1)} work money\n \n );\n\n if (mults.hacknet_node_money_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.hacknet_node_money_mult - 1)} hacknet production\n \n );\n if (mults.hacknet_node_purchase_cost_mult)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_purchase_cost_mult - 1))} hacknet nodes cost\n \n );\n if (mults.hacknet_node_level_cost_mult)\n desc = (\n <>\n {desc}\n
-{f(-(mults.hacknet_node_level_cost_mult - 1))} hacknet nodes upgrade cost\n \n );\n\n if (mults.bladeburner_max_stamina_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_max_stamina_mult - 1)} Bladeburner Max Stamina\n \n );\n if (mults.bladeburner_stamina_gain_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_stamina_gain_mult - 1)} Bladeburner Stamina gain\n \n );\n if (mults.bladeburner_analysis_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_analysis_mult - 1)} Bladeburner Field Analysis effectiveness\n \n );\n if (mults.bladeburner_success_chance_mult)\n desc = (\n <>\n {desc}\n
+{f(mults.bladeburner_success_chance_mult - 1)} Bladeburner Contracts and Operations success chance\n \n );\n\n if (startingMoney)\n desc = (\n <>\n {desc}\n
\n Start with after installing Augmentations.\n \n );\n\n if (programs)\n desc = (\n <>\n {desc}\n
\n Start with {programs.join(\" and \")} after installing Augmentations.\n \n );\n return desc;\n}\n\nexport class Augmentation {\n // How much money this costs to buy\n baseCost = 0;\n\n // How much faction reputation is required to unlock this\n baseRepRequirement = 0;\n\n // Description of what this Aug is and what it does\n info: string | JSX.Element;\n\n // Description of the stats, often autogenerated, sometimes manually written.\n stats: JSX.Element | null;\n\n // Any Augmentation not immediately available in BitNode-1 is special (e.g. Bladeburner augs)\n isSpecial = false;\n\n // Augmentation level - for repeatable Augs like NeuroFlux Governor\n level = 0;\n\n // Name of Augmentation\n name = \"\";\n\n // Whether the player owns this Augmentation\n owned = false;\n\n // Array of names of all prerequisites\n prereqs: string[] = [];\n\n // Multipliers given by this Augmentation. Must match the property name in\n // The Player/Person classes\n mults: IMap = {};\n\n // Initial cost. Doesn't change when you purchase multiple Augmentation\n startingCost = 0;\n\n // Factions that offer this aug.\n factions: string[] = [];\n\n constructor(\n params: IConstructorParams = {\n info: \"\",\n moneyCost: 0,\n name: \"\",\n repCost: 0,\n factions: [],\n },\n ) {\n this.name = params.name;\n this.info = params.info;\n this.prereqs = params.prereqs ? params.prereqs : [];\n\n this.baseRepRequirement = params.repCost * BitNodeMultipliers.AugmentationRepCost;\n this.baseCost = params.moneyCost * BitNodeMultipliers.AugmentationMoneyCost;\n this.startingCost = this.baseCost;\n this.factions = params.factions;\n\n if (params.isSpecial) {\n this.isSpecial = true;\n }\n\n this.level = 0;\n\n // Set multipliers\n if (params.hacking_mult) {\n this.mults.hacking_mult = params.hacking_mult;\n }\n if (params.strength_mult) {\n this.mults.strength_mult = params.strength_mult;\n }\n if (params.defense_mult) {\n this.mults.defense_mult = params.defense_mult;\n }\n if (params.dexterity_mult) {\n this.mults.dexterity_mult = params.dexterity_mult;\n }\n if (params.agility_mult) {\n this.mults.agility_mult = params.agility_mult;\n }\n if (params.charisma_mult) {\n this.mults.charisma_mult = params.charisma_mult;\n }\n if (params.hacking_exp_mult) {\n this.mults.hacking_exp_mult = params.hacking_exp_mult;\n }\n if (params.strength_exp_mult) {\n this.mults.strength_exp_mult = params.strength_exp_mult;\n }\n if (params.defense_exp_mult) {\n this.mults.defense_exp_mult = params.defense_exp_mult;\n }\n if (params.dexterity_exp_mult) {\n this.mults.dexterity_exp_mult = params.dexterity_exp_mult;\n }\n if (params.agility_exp_mult) {\n this.mults.agility_exp_mult = params.agility_exp_mult;\n }\n if (params.charisma_exp_mult) {\n this.mults.charisma_exp_mult = params.charisma_exp_mult;\n }\n if (params.hacking_chance_mult) {\n this.mults.hacking_chance_mult = params.hacking_chance_mult;\n }\n if (params.hacking_speed_mult) {\n this.mults.hacking_speed_mult = params.hacking_speed_mult;\n }\n if (params.hacking_money_mult) {\n this.mults.hacking_money_mult = params.hacking_money_mult;\n }\n if (params.hacking_grow_mult) {\n this.mults.hacking_grow_mult = params.hacking_grow_mult;\n }\n if (params.company_rep_mult) {\n this.mults.company_rep_mult = params.company_rep_mult;\n }\n if (params.faction_rep_mult) {\n this.mults.faction_rep_mult = params.faction_rep_mult;\n }\n if (params.crime_money_mult) {\n this.mults.crime_money_mult = params.crime_money_mult;\n }\n if (params.crime_success_mult) {\n this.mults.crime_success_mult = params.crime_success_mult;\n }\n if (params.work_money_mult) {\n this.mults.work_money_mult = params.work_money_mult;\n }\n if (params.hacknet_node_money_mult) {\n this.mults.hacknet_node_money_mult = params.hacknet_node_money_mult;\n }\n if (params.hacknet_node_purchase_cost_mult) {\n this.mults.hacknet_node_purchase_cost_mult = params.hacknet_node_purchase_cost_mult;\n }\n if (params.hacknet_node_ram_cost_mult) {\n this.mults.hacknet_node_ram_cost_mult = params.hacknet_node_ram_cost_mult;\n }\n if (params.hacknet_node_core_cost_mult) {\n this.mults.hacknet_node_core_cost_mult = params.hacknet_node_core_cost_mult;\n }\n if (params.hacknet_node_level_cost_mult) {\n this.mults.hacknet_node_level_cost_mult = params.hacknet_node_level_cost_mult;\n }\n if (params.bladeburner_max_stamina_mult) {\n this.mults.bladeburner_max_stamina_mult = params.bladeburner_max_stamina_mult;\n }\n if (params.bladeburner_stamina_gain_mult) {\n this.mults.bladeburner_stamina_gain_mult = params.bladeburner_stamina_gain_mult;\n }\n if (params.bladeburner_analysis_mult) {\n this.mults.bladeburner_analysis_mult = params.bladeburner_analysis_mult;\n }\n if (params.bladeburner_success_chance_mult) {\n this.mults.bladeburner_success_chance_mult = params.bladeburner_success_chance_mult;\n }\n\n if (params.stats === undefined)\n this.stats = generateStatsDescription(this.mults, params.programs, params.startingMoney);\n else this.stats = params.stats;\n }\n\n // Adds this Augmentation to the specified Factions\n addToFactions(factionList: string[]): void {\n for (let i = 0; i < factionList.length; ++i) {\n const faction: Faction | null = Factions[factionList[i]];\n if (faction == null) {\n console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${factionList[i]}`);\n continue;\n }\n faction.augmentations.push(this.name);\n }\n }\n\n // Adds this Augmentation to all Factions\n addToAllFactions(): void {\n for (const fac of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(fac)) {\n const facObj: Faction | null = Factions[fac];\n if (facObj == null) {\n console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${fac}`);\n continue;\n }\n if (facObj.getInfo().special) continue;\n facObj.augmentations.push(this.name);\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Augmentation\", this);\n }\n\n // Initiatizes a Augmentation object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Augmentation {\n return Generic_fromJSON(Augmentation, value.data);\n }\n}\n\nReviver.constructors.Augmentation = Augmentation;\n","import React from \"react\";\nimport { Theme } from \"@mui/material\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport M from \"@mui/material/Modal\";\nimport Fade from \"@mui/material/Fade\";\nimport Box from \"@mui/material/Box\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n paper: {\n backgroundColor: theme.palette.background.default,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: `0px 3px 5px -1px ${theme.palette.primary.dark},0px 5px 8px 0px ${theme.palette.primary.dark},0px 1px 14px 0px ${theme.palette.primary.dark}`,\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);\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: React.ReactNode;\n}\n\nexport const Modal = (props: IProps): React.ReactElement => {\n const classes = useStyles();\n return (\n \n \n
\n {props.children}\n
\n
\n \n );\n};\n","// Action Identifier enum\nexport const ActionTypes: {\n [key: string]: number;\n Idle: number;\n Contract: number;\n Operation: number;\n BlackOp: number;\n BlackOperation: number;\n Training: number;\n Recruitment: number;\n FieldAnalysis: number;\n \"Field Analysis\": number;\n Diplomacy: number;\n \"Hyperbolic Regeneration Chamber\": number;\n \"Incite Violence\": number;\n} = {\n Idle: 1,\n Contract: 2,\n Operation: 3,\n BlackOp: 4,\n BlackOperation: 4,\n Training: 5,\n Recruitment: 6,\n FieldAnalysis: 7,\n \"Field Analysis\": 7,\n Diplomacy: 8,\n \"Hyperbolic Regeneration Chamber\": 9,\n \"Incite Violence\": 10,\n};\n","import React from \"react\";\nimport { TableCell as MuiTableCell, TableCellProps, Table as MuiTable, TableProps } from \"@mui/material\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\n\nconst useStyles = makeStyles({\n root: {\n borderBottom: \"none\",\n },\n small: {\n width: \"1px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\nexport const Table: React.FC = (props: TableProps) => {\n return (\n \n );\n};\n","import { Player } from \"./Player\";\n\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { ITutorialEvents } from \"./ui/InteractiveTutorial/ITutorialEvents\";\n\n// Ordered array of keys to Interactive Tutorial Steps\nenum iTutorialSteps {\n Start,\n 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 TerminalGoHome, // Go home before creating a script.\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,\n ActiveScriptsPage,\n ActiveScriptsToTerminal,\n TerminalTailScript,\n GoToHacknetNodesPage,\n HacknetNodesIntroduction,\n HacknetNodesGoToWorldPage,\n WorldDescription,\n TutorialPageInfo,\n End,\n}\n\nconst ITutorial: {\n currStep: iTutorialSteps;\n isRunning: boolean;\n stepIsDone: {\n [iTutorialSteps.Start]: boolean;\n [iTutorialSteps.GoToCharacterPage]: boolean;\n [iTutorialSteps.CharacterPage]: boolean;\n [iTutorialSteps.CharacterGoToTerminalPage]: boolean;\n [iTutorialSteps.TerminalIntro]: boolean;\n [iTutorialSteps.TerminalHelp]: boolean;\n [iTutorialSteps.TerminalLs]: boolean;\n [iTutorialSteps.TerminalScan]: boolean;\n [iTutorialSteps.TerminalScanAnalyze1]: boolean;\n [iTutorialSteps.TerminalScanAnalyze2]: boolean;\n [iTutorialSteps.TerminalConnect]: boolean;\n [iTutorialSteps.TerminalAnalyze]: boolean;\n [iTutorialSteps.TerminalNuke]: boolean;\n [iTutorialSteps.TerminalManualHack]: boolean;\n [iTutorialSteps.TerminalHackingMechanics]: boolean;\n [iTutorialSteps.TerminalGoHome]: boolean;\n [iTutorialSteps.TerminalCreateScript]: boolean;\n [iTutorialSteps.TerminalTypeScript]: boolean;\n [iTutorialSteps.TerminalFree]: boolean;\n [iTutorialSteps.TerminalRunScript]: boolean;\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsToTerminal]: boolean;\n [iTutorialSteps.TerminalTailScript]: boolean;\n [iTutorialSteps.GoToHacknetNodesPage]: boolean;\n [iTutorialSteps.HacknetNodesIntroduction]: boolean;\n [iTutorialSteps.HacknetNodesGoToWorldPage]: boolean;\n [iTutorialSteps.WorldDescription]: boolean;\n [iTutorialSteps.TutorialPageInfo]: boolean;\n [iTutorialSteps.End]: boolean;\n };\n} = {\n currStep: iTutorialSteps.Start,\n isRunning: false,\n\n // Keeps track of whether each step has been done\n stepIsDone: {\n [iTutorialSteps.Start]: false,\n [iTutorialSteps.GoToCharacterPage]: false,\n [iTutorialSteps.CharacterPage]: false,\n [iTutorialSteps.CharacterGoToTerminalPage]: false,\n [iTutorialSteps.TerminalIntro]: false,\n [iTutorialSteps.TerminalHelp]: false,\n [iTutorialSteps.TerminalLs]: false,\n [iTutorialSteps.TerminalScan]: false,\n [iTutorialSteps.TerminalScanAnalyze1]: false,\n [iTutorialSteps.TerminalScanAnalyze2]: false,\n [iTutorialSteps.TerminalConnect]: false,\n [iTutorialSteps.TerminalAnalyze]: false,\n [iTutorialSteps.TerminalNuke]: false,\n [iTutorialSteps.TerminalManualHack]: false,\n [iTutorialSteps.TerminalHackingMechanics]: false,\n [iTutorialSteps.TerminalGoHome]: false,\n [iTutorialSteps.TerminalCreateScript]: false,\n [iTutorialSteps.TerminalTypeScript]: false,\n [iTutorialSteps.TerminalFree]: false,\n [iTutorialSteps.TerminalRunScript]: false,\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsToTerminal]: false,\n [iTutorialSteps.TerminalTailScript]: false,\n [iTutorialSteps.GoToHacknetNodesPage]: false,\n [iTutorialSteps.HacknetNodesIntroduction]: false,\n [iTutorialSteps.HacknetNodesGoToWorldPage]: false,\n [iTutorialSteps.WorldDescription]: false,\n [iTutorialSteps.TutorialPageInfo]: false,\n [iTutorialSteps.End]: false,\n },\n};\n\nfunction iTutorialStart(): void {\n ITutorial.isRunning = true;\n ITutorial.currStep = iTutorialSteps.Start;\n}\n\n// Go to the next step and evaluate it\nfunction iTutorialNextStep(): void {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n if (ITutorial.currStep === iTutorialSteps.End) iTutorialEnd();\n ITutorialEvents.emit();\n}\n\n// Go to previous step and evaluate\nfunction iTutorialPrevStep(): void {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n ITutorialEvents.emit();\n}\n\nfunction iTutorialEnd(): void {\n ITutorial.isRunning = false;\n ITutorial.currStep = iTutorialSteps.Start;\n Player.getHomeComputer().messages.push(LiteratureNames.HackersStartingHandbook);\n ITutorialEvents.emit();\n}\n\nexport { iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial, iTutorialPrevStep };\n","import { IPlayer } from \"../IPlayer\";\nimport { PlayerObject } from \"./PlayerObject\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { PlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CodingContractRewardType, ICodingContractReward } from \"../../CodingContracts\";\nimport { Company } from \"../../Company/Company\";\nimport { Companies } from \"../../Company/Companies\";\nimport { getNextCompanyPositionHelper } from \"../../Company/GetNextCompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { Programs } from \"../../Programs/Programs\";\nimport { determineCrimeSuccess } from \"../../Crime/CrimeHelpers\";\nimport { Crimes } from \"../../Crime/Crimes\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { resetGangs } from \"../../Gang/AllGangs\";\nimport { Cities } from \"../../Locations/Cities\";\nimport { Locations } from \"../../Locations/Locations\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport {\n calculateSkill as calculateSkillF,\n calculateSkillProgress as calculateSkillProgressF,\n ISkillProgress,\n} from \"../formulas/skill\";\nimport { calculateIntelligenceBonus } from \"../formulas/intelligence\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../formulas/reputation\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { safetlyCreateUniqueServer } from \"../../Server/ServerHelpers\";\n\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { applySourceFile } from \"../../SourceFile/applySourceFile\";\nimport { applyExploit } from \"../../Exploits/applyExploits\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { influenceStockThroughCompanyWork } from \"../../StockMarket/PlayerInfluencing\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { IRouter } from \"../../ui/Router\";\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport React from \"react\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { SnackbarEvents } from \"../../ui/React/Snackbar\";\nimport { calculateClassEarnings } from \"../formulas/work\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nexport function init(this: IPlayer): void {\n /* Initialize Player's home computer */\n const t_homeComp = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: \"home\",\n ip: createUniqueRandomIp(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true,\n });\n this.currentServer = SpecialServers.Home;\n AddToAllServers(t_homeComp);\n\n this.getHomeComputer().programs.push(Programs.NukeProgram.name);\n}\n\nexport function prestigeAugmentation(this: PlayerObject): void {\n this.currentServer = SpecialServers.Home;\n\n this.numPeopleKilled = 0;\n\n //Reset stats\n this.hacking = 1;\n\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n this.charisma = 1;\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\n this.money = 1000;\n\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n this.companyName = \"\";\n this.jobs = {};\n\n this.purchasedServers = [];\n\n this.factions = [];\n this.factionInvitations = [];\n\n this.queuedAugmentations = [];\n\n const numSleeves = Math.min(3, SourceFileFlags[10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new Sleeve(this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\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\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\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\n this.timeWorked = 0;\n\n this.lastUpdate = new Date().getTime();\n\n // Statistics Trackers\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n\n this.hacknetNodes.length = 0;\n this.hashManager.prestige();\n\n // Reapply augs, re-calculate skills and reset HP\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\n\nexport function prestigeSourceFile(this: IPlayer): void {\n this.entropy = 0;\n this.prestigeAugmentation();\n this.karma = 0;\n // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new Sleeve(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;\n\n // Gang\n this.gang = null;\n resetGangs();\n\n // Reset Stock market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n // BitNode 3: Corporatocracy\n this.corporation = null;\n\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\n\nexport function receiveInvite(this: IPlayer, factionName: string): void {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n this.factionInvitations.push(factionName);\n}\n\n//Calculates skill level based on experience. The same formula will be used for every skill\nexport function calculateSkill(this: IPlayer, exp: number, mult = 1): number {\n return calculateSkillF(exp, mult);\n}\n\n//Calculates skill level progress based on experience. The same formula will be used for every skill\nexport function calculateSkillProgress(this: IPlayer, exp: number, mult = 1): ISkillProgress {\n return calculateSkillProgressF(exp, mult);\n}\n\nexport function updateSkillLevels(this: IPlayer): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier)),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateSkill(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier)),\n );\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 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\nexport function resetMultipliers(this: IPlayer): void {\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\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\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\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\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;\n\n this.work_money_mult = 1;\n\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}\n\nexport function hasProgram(this: IPlayer, programName: string): boolean {\n const home = this.getHomeComputer();\n if (home == null) {\n return false;\n }\n\n for (let i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n return false;\n}\n\nexport function setMoney(this: PlayerObject, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n this.money = money;\n}\n\nexport function gainMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money + money;\n this.recordMoneySource(money, source);\n}\n\nexport function loseMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n if (this.money === Infinity && money === Infinity) return;\n this.money = this.money - money;\n this.recordMoneySource(-1 * money, source);\n}\n\nexport function canAfford(this: IPlayer, cost: number): boolean {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n return this.money >= cost;\n}\n\nexport function recordMoneySource(this: PlayerObject, amt: number, source: string): void {\n if (!(this.moneySourceA instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new MoneySourceTracker();\n }\n if (!(this.moneySourceB instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new MoneySourceTracker();\n }\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\n\nexport function gainHackingExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n this.hacking_exp += exp;\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking = calculateSkillF(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier);\n}\n\nexport function gainStrengthExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n this.strength_exp += exp;\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = calculateSkillF(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier);\n}\n\nexport function gainDefenseExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n this.defense_exp += exp;\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = calculateSkillF(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier);\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\nexport function gainDexterityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n this.dexterity_exp += exp;\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = calculateSkillF(\n this.dexterity_exp,\n this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n}\n\nexport function gainAgilityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n this.agility_exp += exp;\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = calculateSkillF(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier);\n}\n\nexport function gainCharismaExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n this.charisma_exp += exp;\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = calculateSkillF(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier);\n}\n\nexport function gainIntelligenceExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n if (SourceFileFlags[5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n }\n}\n\n//Given a string expression like \"str\" or \"strength\", returns the given stat\nexport function queryStatFromString(this: IPlayer, str: string): number {\n const tempStr = str.toLowerCase();\n if (tempStr.includes(\"hack\")) {\n return this.hacking;\n }\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n return 0;\n}\n\n/******* Working functions *******/\nexport function resetWorkStatus(this: IPlayer, generalType?: string, group?: string, workType?: string): void {\n if (this.workType !== CONSTANTS.WorkTypeFaction && generalType === this.workType && group === this.companyName)\n return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType)\n 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\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\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.timeWorkedGraftAugmentation = 0;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.graftAugmentationName = \"\";\n this.className = \"\";\n this.workType = \"\";\n}\n\nexport function processWorkEarnings(this: IPlayer, numCycles = 1): void {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\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, this.className ? \"class\" : \"work\");\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\n/* Working for Company */\nexport function startWork(this: IPlayer, companyName: string): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeCompany, companyName);\n this.isWorking = true;\n this.companyName = companyName;\n this.workType = CONSTANTS.WorkTypeCompany;\n\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\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n}\n\nexport function process(this: IPlayer, router: IRouter, numCycles = 1): void {\n // Working\n if (this.isWorking) {\n if (this.workType == CONSTANTS.WorkTypeFaction) {\n if (this.workForFaction(numCycles)) {\n router.toFaction(Factions[this.currentWorkFactionName]);\n }\n } else if (this.workType == CONSTANTS.WorkTypeCreateProgram) {\n if (this.createProgramWork(numCycles)) {\n router.toTerminal();\n }\n } else if (this.workType == CONSTANTS.WorkTypeStudyClass) {\n if (this.takeClass(numCycles)) {\n router.toCity();\n }\n } else if (this.workType == CONSTANTS.WorkTypeCrime) {\n if (this.commitCrime(numCycles)) {\n router.toLocation(Locations[LocationName.Slums]);\n }\n } else if (this.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n if (this.workPartTime(numCycles)) {\n router.toCity();\n }\n } else if (this.workType === CONSTANTS.WorkTypeGraftAugmentation) {\n if (this.graftAugmentationWork(numCycles)) {\n router.toGrafting();\n }\n } else if (this.work(numCycles)) {\n router.toCity();\n }\n }\n}\n\nexport function cancelationPenalty(this: IPlayer): number {\n const data = serverMetadata.find((s) => s.specialName === this.companyName);\n if (!data) return 0.5; // Does not have special server.\n const server = GetServer(data.hostname);\n if (server instanceof Server) {\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\n\nexport function work(this: IPlayer, numCycles: number): boolean {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.processWorkEarnings(numCycles);\n\n const comp = Companies[this.companyName];\n influenceStockThroughCompanyWork(comp, this.workRepGainRate, numCycles);\n\n // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishWork(this: IPlayer, cancelled: boolean, sing = false): string {\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 penaltyString = this.cancelationPenalty() === 0.5 ? \"half\" : \"three-quarters\";\n\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n let content = (\n <>\n You earned a total of:
\n \n
\n reputation for the company
\n {this.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n \n )}\n {this.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n \n )}\n {this.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n \n )}\n {this.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n \n )}\n {this.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n \n )}\n {this.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp
\n \n )}\n
\n \n );\n\n if (cancelled) {\n content = (\n <>\n You worked a short shift of {convertTimeMsToTimeElapsedString(this.timeWorked)}
\n
\n Since you cancelled your work early, you only gained {penaltyString} of the reputation you earned.
\n
\n {content}\n \n );\n } else {\n content = (\n <>\n You worked a full shift of 8 hours!
\n
\n {content}\n \n );\n }\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n this.focus = false;\n\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked a short shift of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned $\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp.\";\n\n return res;\n }\n\n return \"\";\n}\n\nexport function startWorkPartTime(this: IPlayer, companyName: string): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.companyName = companyName;\n this.workType = CONSTANTS.WorkTypeCompanyPartTime;\n\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\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n}\n\nexport function workPartTime(this: IPlayer, numCycles: number): boolean {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWorkPartTime();\n return true;\n }\n return false;\n}\n\nexport function finishWorkPartTime(this: IPlayer, sing = false): string {\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n const content = (\n <>\n You worked for {convertTimeMsToTimeElapsedString(this.timeWorked)}\n
\n
\n You earned a total of:
\n \n
\n reputation for the company
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n \n );\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n\n if (sing) {\n const res =\n \"You worked for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned a total of \" +\n \"$\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n return res;\n }\n return \"\";\n}\n\nexport function startFocusing(this: IPlayer): void {\n this.focus = true;\n}\n\nexport function stopFocusing(this: IPlayer): void {\n this.focus = false;\n}\n\n/* Working for Faction */\nexport function startFactionWork(this: IPlayer, faction: Faction): void {\n //Update reputation gain rate to account for faction favor\n let favorMult = 1 + faction.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer20Hours;\n}\n\nexport function startFactionHackWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkHacking);\n\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n\n this.startFactionWork(faction);\n}\n\nexport function startFactionFieldWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkField);\n\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n\n this.startFactionWork(faction);\n}\n\nexport function startFactionSecurityWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkSecurity);\n\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n\n this.startFactionWork(faction);\n}\n\nexport function workForFaction(this: IPlayer, numCycles: number): boolean {\n const faction = Factions[this.currentWorkFactionName];\n\n if (!faction) {\n return false;\n }\n\n //Constantly update the rep gain rate\n switch (this.factionWorkType) {\n case CONSTANTS.FactionWorkHacking:\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n break;\n case CONSTANTS.FactionWorkField:\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n break;\n case CONSTANTS.FactionWorkSecurity:\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n break;\n default:\n break;\n }\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer20Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer20Hours) {\n this.finishFactionWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishFactionWork(this: IPlayer, cancelled: boolean, sing = false): string {\n const faction = Factions[this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n if (!sing) {\n dialogBoxCreate(\n <>\n You worked for your faction {faction.name} for a total of {convertTimeMsToTimeElapsedString(this.timeWorked)}{\" \"}\n
\n
\n You earned a total of:
\n \n
\n reputation for the faction
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n ,\n );\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked for your faction \" +\n faction.name +\n \" for a total of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \". \" +\n \"You earned \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" rep, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\";\n\n return res;\n }\n return \"\";\n}\n\n//Money gained per game cycle\nexport function getWorkMoneyGain(this: IPlayer): number {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = Companies[this.companyName];\n if (SourceFileFlags[11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n }\n\n // Get base salary\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\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 (\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney *\n bn11Mult\n );\n}\n\n//Hack exp gained per game cycle\nexport function getWorkHackExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work hack exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Str exp gained per game cycle\nexport function getWorkStrExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work str exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Def exp gained per game cycle\nexport function getWorkDefExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work def exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Dex exp gained per game cycle\nexport function getWorkDexExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work dex exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Agi exp gained per game cycle\nexport function getWorkAgiExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work agi exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Charisma exp gained per game cycle\nexport function getWorkChaExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work cha exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Reputation gained per game cycle\nexport function getWorkRepGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work rep gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n let jobPerformance = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n\n //Intelligence provides a flat bonus to job performance\n jobPerformance += this.intelligence / CONSTANTS.MaxSkillLevel;\n\n //Update reputation gain rate to account for company favor\n let favorMult = 1 + company.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return jobPerformance * this.company_rep_mult * favorMult;\n}\n\n// export function getFactionSecurityWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / 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\n// export function getFactionFieldWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / 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 */\nexport function startCreateProgramWork(this: IPlayer, programName: string, time: number, reqLevel: number): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeCreateProgram;\n\n //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 - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n this.createProgramReqLvl = reqLevel;\n\n this.timeNeededToCompleteWork = time;\n //Check for incomplete program\n for (let i = 0; i < this.getHomeComputer().programs.length; ++i) {\n const programFile = this.getHomeComputer().programs[i];\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n const res = programFile.split(\"-\");\n if (res.length != 3) {\n break;\n }\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n this.timeWorkedCreateProgram = (percComplete / 100) * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\n\nexport function createProgramWork(this: IPlayer, numCycles: number): boolean {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n //Higher hacking skill will allow you to create programs faster\n const reqLvl = this.createProgramReqLvl;\n let skillMult = (this.hacking / reqLvl) * this.getIntelligenceBonus(3); //This should always be greater than 1;\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n skillMult *= focusBonus;\n //Skill multiplier directly applied to \"time worked\"\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += CONSTANTS._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishCreateProgramWork(this: IPlayer, cancelled: boolean): string {\n const programName = this.createProgramName;\n if (cancelled === false) {\n dialogBoxCreate(`You've finished creating ${programName}!
The new program can be found on your home computer.`);\n\n this.getHomeComputer().programs.push(programName);\n } else {\n const perc = (Math.floor((this.timeWorkedCreateProgram / this.timeNeededToCompleteWork) * 10000) / 100).toString();\n const incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp((CONSTANTS.IntelligenceProgramBaseExpGain * this.timeWorked) / 1000);\n }\n\n this.isWorking = false;\n\n this.resetWorkStatus();\n return \"You've finished creating \" + programName + \"! The new program can be found on your home computer.\";\n}\n\nexport function startGraftAugmentationWork(this: IPlayer, augmentationName: string, time: number): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeGraftAugmentation;\n\n this.timeNeededToCompleteWork = time;\n this.graftAugmentationName = augmentationName;\n}\n\nexport function craftAugmentationWork(this: IPlayer, numCycles: number): boolean {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames.NeuroreceptorManager)) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n\n let skillMult = 1 + (this.getIntelligenceBonus(3) - 1) / 3;\n skillMult *= focusBonus;\n\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n this.timeWorkedGraftAugmentation += CONSTANTS._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedGraftAugmentation >= this.timeNeededToCompleteWork) {\n this.finishGraftAugmentationWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishGraftAugmentationWork(this: IPlayer, cancelled: boolean): string {\n const augName = this.graftAugmentationName;\n if (cancelled === false) {\n dialogBoxCreate(\n `You've finished crafting ${augName}.
The augmentation has been grafted to your body, but you feel a bit off.`,\n );\n\n applyAugmentation(Augmentations[augName]);\n this.entropy += 1;\n this.applyEntropy(this.entropy);\n } else {\n dialogBoxCreate(`You cancelled the crafting of ${augName}.
Your money was not returned to you.`);\n }\n\n // Intelligence gain\n if (!cancelled) {\n this.gainIntelligenceExp((CONSTANTS.IntelligenceGraftBaseExpGain * this.timeWorked) / 10000);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n return `Grafting of ${augName} has ended.`;\n}\n\n/* Studying/Taking Classes */\nexport function startClass(this: IPlayer, costMult: number, expMult: number, className: string): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeStudyClass;\n this.workCostMult = costMult;\n this.workExpMult = expMult;\n this.className = className;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n}\n\nexport function takeClass(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n this.processWorkEarnings(numCycles);\n return false;\n}\n\n//The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\nexport function finishClass(this: IPlayer, sing = false): string {\n this.gainIntelligenceExp(CONSTANTS.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 if (!sing) {\n dialogBoxCreate(\n <>\n After {this.className} for {convertTimeMsToTimeElapsedString(this.timeWorked)},
\n you spent a total of .
\n
\n You earned a total of:
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
\n ,\n );\n }\n\n this.isWorking = false;\n\n if (sing) {\n const res =\n \"After \" +\n this.className +\n \" for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \", \" +\n \"you spent a total of \" +\n numeralWrapper.formatMoney(this.workMoneyGained * -1) +\n \". \" +\n \"You earned a total of: \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n this.resetWorkStatus();\n return \"\";\n}\n\n//The EXP and $ gains are hardcoded. Time is in ms\nexport function startCrime(\n this: IPlayer,\n router: IRouter,\n crimeType: string,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n workerscript: WorkerScript | null = null,\n): void {\n this.crimeType = crimeType;\n\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = CONSTANTS.WorkTypeCrime;\n\n if (workerscript !== null) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.timeNeededToCompleteWork = time;\n router.toWork();\n}\n\nexport function commitCrime(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n if (this.timeWorked >= this.timeNeededToCompleteWork) {\n this.finishCrime(false);\n return true;\n }\n return false;\n}\n\nexport function finishCrime(this: IPlayer, cancelled: boolean): string {\n //Determine crime success/failure\n if (!cancelled) {\n if (determineCrimeSuccess(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n for (const i of Object.keys(Crimes)) {\n if (Crimes[i].type == this.crimeType) {\n crime = Crimes[i];\n break;\n }\n }\n if (crime == null) {\n dialogBoxCreate(\n `ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`,\n );\n return \"\";\n }\n this.gainMoney(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n }\n\n //On a crime success, gain 2x exp\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 const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"SUCCESS: Crime successful! Gained \" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime successful!\n
\n
\n You gained:\n
\n \n
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\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 const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"FAIL: Crime failed! Gained \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime failed!\n
\n
\n You gained:\n
\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
\n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
\n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\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 this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n return \"\";\n}\n\n//Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\nexport function singularityStopWork(this: IPlayer): string {\n if (!this.isWorking) {\n return \"\";\n }\n let res = \"\"; //Earnings text for work\n switch (this.workType) {\n case CONSTANTS.WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n case CONSTANTS.WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n case CONSTANTS.WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n case CONSTANTS.WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n case CONSTANTS.WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n case CONSTANTS.WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n return res;\n}\n\n// Returns true if hospitalized, false otherwise\nexport function takeDamage(this: IPlayer, amt: number): boolean {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return false;\n }\n\n this.hp -= amt;\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\n\nexport function regenerateHp(this: IPlayer, amt: number): void {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n this.hp += amt;\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\n\nexport function hospitalize(this: IPlayer): number {\n const cost = getHospitalizationCost(this);\n SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, \"warning\", 2000);\n\n this.loseMoney(cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\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\nexport function applyForJob(this: IPlayer, entryPosType: CompanyPosition, sing = false): boolean {\n // Get current company and job\n let currCompany = null;\n if (this.companyName !== \"\") {\n currCompany = Companies[this.companyName];\n }\n const currPositionName = this.jobs[this.companyName];\n\n // Get company that's being applied to\n const company = Companies[this.location]; //Company being applied to\n if (!(company instanceof Company)) {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return false;\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n const reqText = getJobRequirementText(company, pos);\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position
\" + reqText);\n }\n return false;\n }\n\n // Check if this company has the position\n if (!company.hasPosition(pos)) {\n return false;\n }\n\n while (true) {\n const newPos = getNextCompanyPositionHelper(pos);\n if (newPos == null) {\n break;\n }\n\n //Check if this company has this position\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 pos = newPos;\n } else {\n break;\n }\n }\n\n //Check if the determined job is the same as the player's current job\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n const nextPos = getNextCompanyPositionHelper(pos);\n if (nextPos == null) {\n if (!sing) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n }\n return false;\n } else if (company.hasPosition(nextPos)) {\n if (!sing) {\n const reqText = getJobRequirementText(company, nextPos);\n dialogBoxCreate(\"Unfortunately, you do not qualify for a promotion
\" + reqText);\n }\n return false;\n } else {\n if (!sing) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n }\n return false;\n }\n }\n }\n\n this.jobs[company.name] = pos.name;\n if (!this.focus && this.isWorking && this.companyName !== this.location) this.resetWorkStatus();\n this.companyName = this.location;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n }\n return true;\n}\n\n//Returns your next position at a company given the field (software, business, etc.)\nexport function getNextCompanyPosition(\n this: IPlayer,\n company: Company,\n entryPosType: CompanyPosition,\n): CompanyPosition | null {\n let currCompany = null;\n if (this.companyName !== \"\") {\n currCompany = Companies[this.companyName];\n }\n\n //Not employed at this company, so return the entry position\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n }\n\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 const currentPositionName = this.jobs[this.companyName];\n if (!currentPositionName) return entryPosType;\n const currentPosition = CompanyPositions[currentPositionName];\n if (\n (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob()) ||\n (currentPosition.isITJob() && entryPosType.isITJob()) ||\n (currentPosition.isBusinessJob() && entryPosType.isBusinessJob()) ||\n (currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob()) ||\n (currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob()) ||\n (currentPosition.isSecurityJob() && entryPosType.isSecurityJob()) ||\n (currentPosition.isAgentJob() && entryPosType.isAgentJob()) ||\n (currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||\n (currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||\n (currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob())\n ) {\n return getNextCompanyPositionHelper(currentPosition);\n }\n\n return entryPosType;\n}\n\nexport function quitJob(this: IPlayer, company: string): void {\n if (this.isWorking == true && this.workType.includes(\"Working for Company\") && this.companyName == company) {\n this.isWorking = false;\n this.companyName = \"\";\n }\n if (this.companyName === company) {\n this.companyName = \"\";\n }\n delete this.jobs[company];\n}\n\n/**\n * Method to see if the player has at least one job assigned to them\n * @param this The player instance\n * @returns Whether the user has at least one job\n */\nexport function hasJob(this: IPlayer): boolean {\n return Boolean(Object.keys(this.jobs).length);\n}\n\nexport function applyForSoftwareJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareCompanyPositions[0]], sing);\n}\n\nexport function applyForSoftwareConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForItJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.ITCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]])) {\n return this.applyForJob(CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]], sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForNetworkEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForBusinessJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessCompanyPositions[0]], sing);\n}\n\nexport function applyForBusinessConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityJob(this: IPlayer, sing = false): boolean {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(CompanyPositions[posNames.SecurityCompanyPositions[2]], sing);\n}\n\nexport function applyForAgentJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.AgentCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.AgentCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForPartTimeEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed part-time at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForPartTimeWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a part-time waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\n//Checks if the Player is qualified for a certain position\nexport function isQualified(this: IPlayer, company: Company, position: CompanyPosition): boolean {\n const offset = company.jobStatReqOffset;\n const reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n const reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n const reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n const reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n return (\n this.hacking >= reqHacking &&\n this.strength >= reqStrength &&\n this.defense >= reqDefense &&\n this.dexterity >= reqDexterity &&\n this.agility >= reqAgility &&\n this.charisma >= reqCharisma &&\n company.playerReputation >= position.requiredReputation\n );\n}\n\n/********** Reapplying Augmentations and Source File ***********/\nexport function reapplyAllAugmentations(this: IPlayer, resetMultipliers = true): void {\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 playerAug = this.augmentations[i];\n const augName = playerAug.name;\n const aug = Augmentations[augName];\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n aug.owned = true;\n if (augName == AugmentationNames.NeuroFluxGovernor) {\n for (let j = 0; j < playerAug.level; ++j) {\n applyAugmentation(this.augmentations[i], true);\n }\n continue;\n }\n applyAugmentation(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\n\nexport function reapplyAllSourceFiles(this: IPlayer): void {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n const srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n const sourceFileObject = SourceFiles[srcFileKey];\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n applySourceFile(this.sourceFiles[i]);\n }\n applyExploit();\n this.updateSkillLevels();\n}\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\nexport function checkForFactionInvitations(this: IPlayer): Faction[] {\n const invitedFactions: Faction[] = []; //Array which will hold all Factions the player should be invited to\n\n const numAugmentations = this.augmentations.length;\n\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs);\n\n // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n function getCompanyRep(companyName: string): number {\n const company = Companies[companyName];\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n }\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 function checkMegacorpRequirements(companyName: string, repNeeded = CONSTANTS.CorpFactionRepRequirement): boolean {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n }\n\n //Illuminati\n const illuminatiFac = Factions[FactionNames.Illuminati];\n if (\n !illuminatiFac.isBanned &&\n !illuminatiFac.isMember &&\n !illuminatiFac.alreadyInvited &&\n numAugmentations >= 30 &&\n this.money >= 150000000000 &&\n this.hacking >= 1500 &&\n this.strength >= 1200 &&\n this.defense >= 1200 &&\n this.dexterity >= 1200 &&\n this.agility >= 1200\n ) {\n invitedFactions.push(illuminatiFac);\n }\n\n //Daedalus\n const daedalusFac = Factions[FactionNames.Daedalus];\n if (\n !daedalusFac.isBanned &&\n !daedalusFac.isMember &&\n !daedalusFac.alreadyInvited &&\n numAugmentations >= Math.round(30 * BitNodeMultipliers.DaedalusAugsRequirement) &&\n this.money >= 100000000000 &&\n (this.hacking >= 2500 ||\n (this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500))\n ) {\n invitedFactions.push(daedalusFac);\n }\n\n //The Covenant\n const covenantFac = Factions[FactionNames.TheCovenant];\n if (\n !covenantFac.isBanned &&\n !covenantFac.isMember &&\n !covenantFac.alreadyInvited &&\n numAugmentations >= 20 &&\n this.money >= 75000000000 &&\n this.hacking >= 850 &&\n this.strength >= 850 &&\n this.defense >= 850 &&\n this.dexterity >= 850 &&\n this.agility >= 850\n ) {\n invitedFactions.push(covenantFac);\n }\n\n //ECorp\n const ecorpFac = Factions[FactionNames.ECorp];\n if (\n !ecorpFac.isBanned &&\n !ecorpFac.isMember &&\n !ecorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumECorp)\n ) {\n invitedFactions.push(ecorpFac);\n }\n\n //MegaCorp\n const megacorpFac = Factions[FactionNames.MegaCorp];\n if (\n !megacorpFac.isBanned &&\n !megacorpFac.isMember &&\n !megacorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12MegaCorp)\n ) {\n invitedFactions.push(megacorpFac);\n }\n\n //Bachman & Associates\n const bachmanandassociatesFac = Factions[FactionNames.BachmanAssociates];\n if (\n !bachmanandassociatesFac.isBanned &&\n !bachmanandassociatesFac.isMember &&\n !bachmanandassociatesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumBachmanAndAssociates)\n ) {\n invitedFactions.push(bachmanandassociatesFac);\n }\n\n //Blade Industries\n const bladeindustriesFac = Factions[FactionNames.BladeIndustries];\n if (\n !bladeindustriesFac.isBanned &&\n !bladeindustriesFac.isMember &&\n !bladeindustriesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12BladeIndustries)\n ) {\n invitedFactions.push(bladeindustriesFac);\n }\n\n //NWO\n const nwoFac = Factions[FactionNames.NWO];\n if (\n !nwoFac.isBanned &&\n !nwoFac.isMember &&\n !nwoFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenNWO)\n ) {\n invitedFactions.push(nwoFac);\n }\n\n //Clarke Incorporated\n const clarkeincorporatedFac = Factions[FactionNames.ClarkeIncorporated];\n if (\n !clarkeincorporatedFac.isBanned &&\n !clarkeincorporatedFac.isMember &&\n !clarkeincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumClarkeIncorporated)\n ) {\n invitedFactions.push(clarkeincorporatedFac);\n }\n\n //OmniTek Incorporated\n const omnitekincorporatedFac = Factions[FactionNames.OmniTekIncorporated];\n if (\n !omnitekincorporatedFac.isBanned &&\n !omnitekincorporatedFac.isMember &&\n !omnitekincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenOmniTekIncorporated)\n ) {\n invitedFactions.push(omnitekincorporatedFac);\n }\n\n //Four Sigma\n const foursigmaFac = Factions[FactionNames.FourSigma];\n if (\n !foursigmaFac.isBanned &&\n !foursigmaFac.isMember &&\n !foursigmaFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12FourSigma)\n ) {\n invitedFactions.push(foursigmaFac);\n }\n\n //KuaiGong International\n const kuaigonginternationalFac = Factions[FactionNames.KuaiGongInternational];\n if (\n !kuaigonginternationalFac.isBanned &&\n !kuaigonginternationalFac.isMember &&\n !kuaigonginternationalFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.ChongqingKuaiGongInternational)\n ) {\n invitedFactions.push(kuaigonginternationalFac);\n }\n\n //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n const fulcrumsecrettechonologiesFac = Factions[FactionNames.FulcrumSecretTechnologies];\n const fulcrumSecretServer = GetServer(SpecialServers.FulcrumSecretTechnologies);\n if (!(fulcrumSecretServer instanceof Server))\n throw new Error(`${FactionNames.FulcrumSecretTechnologies} should be normal server`);\n if (fulcrumSecretServer == null) {\n console.error(`Could not find ${FactionNames.FulcrumSecretTechnologies} Server`);\n } else if (\n !fulcrumsecrettechonologiesFac.isBanned &&\n !fulcrumsecrettechonologiesFac.isMember &&\n !fulcrumsecrettechonologiesFac.alreadyInvited &&\n fulcrumSecretServer.backdoorInstalled &&\n checkMegacorpRequirements(LocationName.AevumFulcrumTechnologies, 250e3)\n ) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n\n //BitRunners\n const bitrunnersFac = Factions[FactionNames.BitRunners];\n const bitrunnersServer = GetServer(SpecialServers.BitRunnersServer);\n if (!(bitrunnersServer instanceof Server)) throw new Error(`${FactionNames.BitRunners} should be normal server`);\n if (bitrunnersServer == null) {\n console.error(`Could not find ${FactionNames.BitRunners} Server`);\n } else if (\n !bitrunnersFac.isBanned &&\n !bitrunnersFac.isMember &&\n bitrunnersServer.backdoorInstalled &&\n !bitrunnersFac.alreadyInvited\n ) {\n invitedFactions.push(bitrunnersFac);\n }\n\n //The Black Hand\n\n const theblackhandFac = Factions[FactionNames.TheBlackHand];\n const blackhandServer = GetServer(SpecialServers.TheBlackHandServer);\n if (!(blackhandServer instanceof Server)) throw new Error(`${FactionNames.TheBlackHand} should be normal server`);\n if (blackhandServer == null) {\n console.error(`Could not find ${FactionNames.TheBlackHand} Server`);\n } else if (\n !theblackhandFac.isBanned &&\n !theblackhandFac.isMember &&\n blackhandServer.backdoorInstalled &&\n !theblackhandFac.alreadyInvited\n ) {\n invitedFactions.push(theblackhandFac);\n }\n\n //NiteSec\n const nitesecFac = Factions[FactionNames.NiteSec];\n const nitesecServer = GetServer(SpecialServers.NiteSecServer);\n if (!(nitesecServer instanceof Server)) throw new Error(`${FactionNames.NiteSec} should be normal server`);\n if (nitesecServer == null) {\n console.error(`Could not find ${FactionNames.NiteSec} Server`);\n } else if (\n !nitesecFac.isBanned &&\n !nitesecFac.isMember &&\n nitesecServer.backdoorInstalled &&\n !nitesecFac.alreadyInvited\n ) {\n invitedFactions.push(nitesecFac);\n }\n\n //Chongqing\n const chongqingFac = Factions[FactionNames.Chongqing];\n if (\n !chongqingFac.isBanned &&\n !chongqingFac.isMember &&\n !chongqingFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.Chongqing\n ) {\n invitedFactions.push(chongqingFac);\n }\n\n //Sector-12\n const sector12Fac = Factions[FactionNames.Sector12];\n if (\n !sector12Fac.isBanned &&\n !sector12Fac.isMember &&\n !sector12Fac.alreadyInvited &&\n this.money >= 15000000 &&\n this.city == CityName.Sector12\n ) {\n invitedFactions.push(sector12Fac);\n }\n\n //New Tokyo\n const newtokyoFac = Factions[FactionNames.NewTokyo];\n if (\n !newtokyoFac.isBanned &&\n !newtokyoFac.isMember &&\n !newtokyoFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.NewTokyo\n ) {\n invitedFactions.push(newtokyoFac);\n }\n\n //Aevum\n const aevumFac = Factions[FactionNames.Aevum];\n if (\n !aevumFac.isBanned &&\n !aevumFac.isMember &&\n !aevumFac.alreadyInvited &&\n this.money >= 40000000 &&\n this.city == CityName.Aevum\n ) {\n invitedFactions.push(aevumFac);\n }\n\n //Ishima\n const ishimaFac = Factions[FactionNames.Ishima];\n if (\n !ishimaFac.isBanned &&\n !ishimaFac.isMember &&\n !ishimaFac.alreadyInvited &&\n this.money >= 30000000 &&\n this.city == CityName.Ishima\n ) {\n invitedFactions.push(ishimaFac);\n }\n\n //Volhaven\n const volhavenFac = Factions[FactionNames.Volhaven];\n if (\n !volhavenFac.isBanned &&\n !volhavenFac.isMember &&\n !volhavenFac.alreadyInvited &&\n this.money >= 50000000 &&\n this.city == CityName.Volhaven\n ) {\n invitedFactions.push(volhavenFac);\n }\n\n //Speakers for the Dead\n const speakersforthedeadFac = Factions[FactionNames.SpeakersForTheDead];\n if (\n !speakersforthedeadFac.isBanned &&\n !speakersforthedeadFac.isMember &&\n !speakersforthedeadFac.alreadyInvited &&\n this.hacking >= 100 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.numPeopleKilled >= 30 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(speakersforthedeadFac);\n }\n\n //The Dark Army\n const thedarkarmyFac = Factions[FactionNames.TheDarkArmy];\n if (\n !thedarkarmyFac.isBanned &&\n !thedarkarmyFac.isMember &&\n !thedarkarmyFac.alreadyInvited &&\n this.hacking >= 300 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.city == CityName.Chongqing &&\n this.numPeopleKilled >= 5 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thedarkarmyFac);\n }\n\n //The Syndicate\n const thesyndicateFac = Factions[FactionNames.TheSyndicate];\n if (\n !thesyndicateFac.isBanned &&\n !thesyndicateFac.isMember &&\n !thesyndicateFac.alreadyInvited &&\n this.hacking >= 200 &&\n this.strength >= 200 &&\n this.defense >= 200 &&\n this.dexterity >= 200 &&\n this.agility >= 200 &&\n (this.city == CityName.Aevum || this.city == CityName.Sector12) &&\n this.money >= 10000000 &&\n this.karma <= -90 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thesyndicateFac);\n }\n\n //Silhouette\n const silhouetteFac = Factions[FactionNames.Silhouette];\n if (\n !silhouetteFac.isBanned &&\n !silhouetteFac.isMember &&\n !silhouetteFac.alreadyInvited &&\n (allPositions.includes(\"Chief Technology Officer\") ||\n allPositions.includes(\"Chief Financial Officer\") ||\n allPositions.includes(\"Chief Executive Officer\")) &&\n this.money >= 15000000 &&\n this.karma <= -22\n ) {\n invitedFactions.push(silhouetteFac);\n }\n\n //Tetrads\n const tetradsFac = Factions[FactionNames.Tetrads];\n if (\n !tetradsFac.isBanned &&\n !tetradsFac.isMember &&\n !tetradsFac.alreadyInvited &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima) &&\n this.strength >= 75 &&\n this.defense >= 75 &&\n this.dexterity >= 75 &&\n this.agility >= 75 &&\n this.karma <= -18\n ) {\n invitedFactions.push(tetradsFac);\n }\n\n //SlumSnakes\n const slumsnakesFac = Factions[FactionNames.SlumSnakes];\n if (\n !slumsnakesFac.isBanned &&\n !slumsnakesFac.isMember &&\n !slumsnakesFac.alreadyInvited &&\n this.strength >= 30 &&\n this.defense >= 30 &&\n this.dexterity >= 30 &&\n this.agility >= 30 &&\n this.karma <= -9 &&\n this.money >= 1000000\n ) {\n invitedFactions.push(slumsnakesFac);\n }\n\n //Netburners\n const netburnersFac = Factions[FactionNames.Netburners];\n let totalHacknetRam = 0;\n let totalHacknetCores = 0;\n let totalHacknetLevels = 0;\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n const v = this.hacknetNodes[i];\n if (typeof v === \"string\") {\n const hserver = GetServer(v);\n if (hserver === null || !(hserver instanceof HacknetServer))\n throw new Error(\"player hacknet server was not HacknetServer\");\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n } else {\n totalHacknetLevels += v.level;\n totalHacknetRam += v.ram;\n totalHacknetCores += v.cores;\n }\n }\n if (\n !netburnersFac.isBanned &&\n !netburnersFac.isMember &&\n !netburnersFac.alreadyInvited &&\n this.hacking >= 80 &&\n totalHacknetRam >= 8 &&\n totalHacknetCores >= 4 &&\n totalHacknetLevels >= 100\n ) {\n invitedFactions.push(netburnersFac);\n }\n\n //Tian Di Hui\n const tiandihuiFac = Factions[FactionNames.TianDiHui];\n if (\n !tiandihuiFac.isBanned &&\n !tiandihuiFac.isMember &&\n !tiandihuiFac.alreadyInvited &&\n this.money >= 1000000 &&\n this.hacking >= 50 &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima)\n ) {\n invitedFactions.push(tiandihuiFac);\n }\n\n //CyberSec\n const cybersecFac = Factions[FactionNames.CyberSec];\n const cybersecServer = GetServer(SpecialServers.CyberSecServer);\n if (!(cybersecServer instanceof Server)) throw new Error(`${FactionNames.CyberSec} should be normal server`);\n if (cybersecServer == null) {\n console.error(`Could not find ${FactionNames.CyberSec} Server`);\n } else if (\n !cybersecFac.isBanned &&\n !cybersecFac.isMember &&\n cybersecServer.backdoorInstalled &&\n !cybersecFac.alreadyInvited\n ) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n\n/************* BitNodes **************/\nexport function setBitNodeNumber(this: IPlayer, n: number): void {\n this.bitNodeN = n;\n}\n\nexport function queueAugmentation(this: IPlayer, name: string): void {\n for (const aug of this.queuedAugmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const aug of this.augmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.queuedAugmentations.push(new PlayerOwnedAugmentation(name));\n}\n\n/************* Coding Contracts **************/\nexport function gainCodingContractReward(this: IPlayer, reward: ICodingContractReward, difficulty = 1): string {\n if (reward == null || reward.type == null) {\n return `No reward for this contract`;\n }\n\n /* eslint-disable no-case-declarations */\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation:\n if (reward.name == null || !(Factions[reward.name] instanceof Faction)) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n Factions[reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n case CodingContractRewardType.FactionReputationAll:\n const totalGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n\n // Ignore Bladeburners and other special factions for this calculation\n const specialFactions = [FactionNames.Bladeburners as string];\n const factions = this.factions.slice().filter((f) => {\n return !specialFactions.includes(f);\n });\n\n // If the player was only part of the special factions, we'll just give money\n if (factions.length == 0) {\n reward.type = CodingContractRewardType.Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n for (const facName of factions) {\n if (!(Factions[facName] instanceof Faction)) {\n continue;\n }\n Factions[facName].playerReputation += gainPerFaction;\n }\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n case CodingContractRewardType.CompanyReputation: {\n if (reward.name == null || !(Companies[reward.name] instanceof Company)) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseCompanyRepGain * difficulty;\n Companies[reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n }\n case CodingContractRewardType.Money:\n default: {\n const moneyGain = CONSTANTS.CodingContractBaseMoneyGain * difficulty * BitNodeMultipliers.CodingContractMoney;\n this.gainMoney(moneyGain, \"codingcontract\");\n return `Gained ${numeralWrapper.formatMoney(moneyGain)}`;\n }\n }\n /* eslint-enable no-case-declarations */\n}\n\nexport function travel(this: IPlayer, to: CityName): boolean {\n if (Cities[to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n this.city = to;\n\n return true;\n}\n\nexport function gotoLocation(this: IPlayer, to: LocationName): boolean {\n if (Locations[to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n this.location = to;\n\n return true;\n}\n\nexport function canAccessGrafting(this: IPlayer): boolean {\n return this.bitNodeN === 10 || SourceFileFlags[10] > 0;\n}\n\nexport function giveExploit(this: IPlayer, exploit: Exploit): void {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n SnackbarEvents.emit(\"SF -1 acquired!\", \"success\", 2000);\n }\n}\n\nexport function giveAchievement(this: IPlayer, achievementId: string): void {\n const achievement = achievements[achievementId];\n if (!achievement) return;\n if (!this.achievements.map((a) => a.ID).includes(achievementId)) {\n this.achievements.push({ ID: achievementId, unlockedOn: new Date().getTime() });\n SnackbarEvents.emit(`Unlocked Achievement: \"${achievement.Name}\"`, \"success\", 2000);\n }\n}\n\nexport function getIntelligenceBonus(this: IPlayer, weight: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n}\n\nexport function getCasinoWinnings(this: IPlayer): number {\n return this.moneySourceA.casino;\n}\n\nexport function getMult(this: IPlayer, name: string): number {\n if (!this.hasOwnProperty(name)) return 1;\n return (this as any)[name];\n}\n\nexport function setMult(this: IPlayer, name: string, mult: number): void {\n if (!this.hasOwnProperty(name)) return;\n (this as any)[name] = mult;\n}\n\nexport function canAccessCotMG(this: IPlayer): boolean {\n return this.bitNodeN === 13 || SourceFileFlags[13] > 0;\n}\n\nexport function sourceFileLvl(this: IPlayer, n: number): number {\n const sf = this.sourceFiles.find((sf) => sf.n === n);\n if (!sf) return 0;\n return sf.lvl;\n}\n","// Class representing a single hackable Server\nimport { BaseServer } from \"./BaseServer\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nimport { createRandomString } from \"../utils/helpers/createRandomString\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n adminRights?: boolean;\n hackDifficulty?: number;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired?: number;\n organizationName?: string;\n purchasedByPlayer?: boolean;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n}\n\nexport class Server extends BaseServer {\n // Flag indicating whether this server has a backdoor installed by a player\n backdoorInstalled = false;\n\n // Initial server security level\n // (i.e. security level when the server was created)\n baseDifficulty = 1;\n\n // Server Security Level\n hackDifficulty = 1;\n\n // Minimum server security level that this server can be weakened to\n minDifficulty = 1;\n\n // How much money currently resides on the server and can be hacked\n moneyAvailable = 0;\n\n // Maximum amount of money that this server can hold\n moneyMax = 0;\n\n // Number of open ports required in order to gain admin/root access\n numOpenPortsRequired = 5;\n\n // How many ports are currently opened on the server\n openPortCount = 0;\n\n // Hacking level required to hack this server\n requiredHackingSkill = 1;\n\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n serverGrowth = 1;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = createRandomString(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false;\n\n //RAM, CPU speed and Scripts\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable =\n params.moneyAvailable != null ? params.moneyAvailable * BitNodeMultipliers.ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * BitNodeMultipliers.ServerMaxMoney;\n\n //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n this.hackDifficulty =\n params.hackDifficulty != null ? params.hackDifficulty * BitNodeMultipliers.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\n //Port information, required for porthacking servers to get admin rights\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n capDifficulty(): void {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n }\n\n // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\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 changeMinimumSecurity(n: number, perc = false): void {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n }\n\n // Server security cannot go below 1\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n */\n changeMaximumMoney(n: number): void {\n const softCap = 10e12;\n if (this.moneyMax > softCap) {\n const aboveCap = this.moneyMax - softCap;\n n = 1 + (n - 1) / Math.log(aboveCap) / Math.log(8);\n }\n\n this.moneyMax *= n;\n }\n\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n fortify(amt: number): void {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n weaken(amt: number): void {\n this.hackDifficulty -= amt * BitNodeMultipliers.ServerWeakenRate;\n this.capDifficulty();\n }\n\n /**\n * Serialize the current object to a JSON save state\n */\n toJSON(): any {\n return Generic_toJSON(\"Server\", this);\n }\n\n // Initializes a Server Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Server {\n return Generic_fromJSON(Server, value.data);\n }\n}\n\nReviver.constructors.Server = Server;\n","import React, { useContext } from \"react\";\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\n\nexport const Context: {\n Corporation: React.Context;\n Division: React.Context;\n} = {\n Corporation: React.createContext({} as ICorporation),\n Division: React.createContext({} as IIndustry),\n};\n\nexport const useCorporation = (): ICorporation => useContext(Context.Corporation);\nexport const useDivision = (): IIndustry => useContext(Context.Division);\n","import React from \"react\";\nimport { ResearchTree } from \"./ResearchTree\";\nimport { ICorporation } from \"./ICorporation\";\nimport { getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy } from \"./data/BaseResearchTree\";\nimport { MoneyCost } from \"./ui/MoneyCost\";\n\ninterface IIndustryMap {\n [key: string]: T | undefined;\n Energy: T;\n Utilities: T;\n Agriculture: T;\n Fishing: T;\n Mining: T;\n Food: T;\n Tobacco: T;\n Chemical: T;\n Pharmaceutical: T;\n Computer: T;\n Robotics: T;\n Software: T;\n Healthcare: T;\n RealEstate: T;\n}\n\n// Map of official names for each Industry\nexport const Industries: IIndustryMap = {\n Energy: \"Energy\",\n Utilities: \"Water Utilities\",\n Agriculture: \"Agriculture\",\n Fishing: \"Fishing\",\n Mining: \"Mining\",\n Food: \"Food\",\n Tobacco: \"Tobacco\",\n Chemical: \"Chemical\",\n Pharmaceutical: \"Pharmaceutical\",\n Computer: \"Computer Hardware\",\n Robotics: \"Robotics\",\n Software: \"Software\",\n Healthcare: \"Healthcare\",\n RealEstate: \"RealEstate\",\n};\n\n// Map of how much money it takes to start each industry\nexport const IndustryStartingCosts: IIndustryMap = {\n Energy: 225e9,\n Utilities: 150e9,\n Agriculture: 40e9,\n Fishing: 80e9,\n Mining: 300e9,\n Food: 10e9,\n Tobacco: 20e9,\n Chemical: 70e9,\n Pharmaceutical: 200e9,\n Computer: 500e9,\n Robotics: 1e12,\n Software: 25e9,\n Healthcare: 750e9,\n RealEstate: 600e9,\n};\n\n// Map of description for each industry\nexport const IndustryDescriptions: IIndustryMap<(corp: ICorporation) => React.ReactElement> = {\n Energy: (corp: ICorporation) => (\n <>\n Engage in the production and distribution of energy.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Utilities: (corp: ICorporation) => (\n <>\n Distribute water and provide wastewater services.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Agriculture: (corp: ICorporation) => (\n <>\n Cultivate crops and breed livestock to produce food.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Fishing: (corp: ICorporation) => (\n <>\n Produce food through the breeding and processing of fish and fish products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Mining: (corp: ICorporation) => (\n <>\n Extract and process metals from the earth.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Food: (corp: ICorporation) => (\n <>\n Create your own restaurants all around the world.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Tobacco: (corp: ICorporation) => (\n <>\n Create and distribute tobacco and tobacco-related products.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Chemical: (corp: ICorporation) => (\n <>\n Produce industrial chemicals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Pharmaceutical: (corp: ICorporation) => (\n <>\n Discover, develop, and create new pharmaceutical drugs.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Computer: (corp: ICorporation) => (\n <>\n Develop and manufacture new computer hardware and networking infrastructures.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Robotics: (corp: ICorporation) => (\n <>\n Develop and create robots.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n Software: (corp: ICorporation) => (\n <>\n Develop computer software and create AI Cores.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: YES\n \n ),\n Healthcare: (corp: ICorporation) => (\n <>\n Create and manage hospitals.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n RealEstate: (corp: ICorporation) => (\n <>\n Develop and manage real estate properties.\n
\n
\n Starting cost: \n
\n Recommended starting Industry: NO\n \n ),\n};\n\n// Map of available Research for each Industry. This data is held in a\n// ResearchTree object\nexport const IndustryResearchTrees: IIndustryMap = {\n Energy: getBaseResearchTreeCopy(),\n Utilities: getBaseResearchTreeCopy(),\n Agriculture: getBaseResearchTreeCopy(),\n Fishing: getBaseResearchTreeCopy(),\n Mining: getBaseResearchTreeCopy(),\n Food: getProductIndustryResearchTreeCopy(),\n Tobacco: getProductIndustryResearchTreeCopy(),\n Chemical: getBaseResearchTreeCopy(),\n Pharmaceutical: getProductIndustryResearchTreeCopy(),\n Computer: getProductIndustryResearchTreeCopy(),\n Robotics: getProductIndustryResearchTreeCopy(),\n Software: getProductIndustryResearchTreeCopy(),\n Healthcare: getProductIndustryResearchTreeCopy(),\n RealEstate: getProductIndustryResearchTreeCopy(),\n};\n\nexport function resetIndustryResearchTrees(): void {\n IndustryResearchTrees.Energy = getBaseResearchTreeCopy();\n IndustryResearchTrees.Utilities = getBaseResearchTreeCopy();\n IndustryResearchTrees.Agriculture = getBaseResearchTreeCopy();\n IndustryResearchTrees.Fishing = getBaseResearchTreeCopy();\n IndustryResearchTrees.Mining = getBaseResearchTreeCopy();\n IndustryResearchTrees.Food = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Tobacco = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Chemical = getBaseResearchTreeCopy();\n IndustryResearchTrees.Pharmaceutical = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Computer = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Robotics = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Software = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Healthcare = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.RealEstate = getProductIndustryResearchTreeCopy();\n}\n","/**\n * Enum defining the different types of possible locations\n */\nexport enum LocationType {\n Company,\n Gym,\n Hospital,\n Slums,\n Special, // This location has special options/activities (e.g. Bladeburner, Re-sleeving)\n StockMarket,\n TechVendor,\n TravelAgency,\n University,\n Casino,\n}\n","import { IMap } from \"../types\";\n\nexport const EmployeePositions: IMap = {\n Operations: \"Operations\",\n Engineer: \"Engineer\",\n Business: \"Business\",\n Management: \"Management\",\n RandD: \"Research & Development\",\n Training: \"Training\",\n Unassigned: \"Unassigned\",\n};\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 */\nimport { HacknetNode } from \"./HacknetNode\";\nimport { calculateNodeCost } from \"./formulas/HacknetNodes\";\nimport { calculateServerCost } from \"./formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"./data/Constants\";\nimport { HacknetServer } from \"./HacknetServer\";\nimport { HashManager } from \"./HashManager\";\nimport { HashUpgrades } from \"./HashUpgrades\";\n\nimport { generateRandomContract } from \"../CodingContractGenerator\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../InteractiveTutorial\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Server } from \"../Server/Server\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\n// Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\nexport function hasHacknetServers(player: IPlayer): boolean {\n return player.bitNodeN === 9 || SourceFileFlags[9] > 0;\n}\n\nexport function purchaseHacknet(player: IPlayer): number {\n /* INTERACTIVE TUTORIAL */\n if (ITutorial.isRunning) {\n if (ITutorial.currStep === iTutorialSteps.HacknetNodesIntroduction) {\n iTutorialNextStep();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n const numOwned = player.hacknetNodes.length;\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost) || numOwned >= HacknetServerConstants.MaxServers) {\n return -1;\n }\n player.loseMoney(cost, \"hacknet_expenses\");\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\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 }\n\n // Auto generate a name for the Node\n const name = \"hacknet-node-\" + numOwned;\n const node = new HacknetNode(name, player.hacknet_node_money_mult);\n\n player.loseMoney(cost, \"hacknet_expenses\");\n player.hacknetNodes.push(node);\n\n return numOwned;\n }\n}\n\nexport function hasMaxNumberHacknetServers(player: IPlayer): boolean {\n return hasHacknetServers(player) && player.hacknetNodes.length >= HacknetServerConstants.MaxServers;\n}\n\nexport function getCostOfNextHacknetNode(player: IPlayer): number {\n return calculateNodeCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\nexport function getCostOfNextHacknetServer(player: IPlayer): number {\n return calculateServerCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\nexport function getMaxNumberLevelUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < 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 if (player.money > 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 if (\n curr !== maxLevel &&\n player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult) &&\n player.money < nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\nexport function getMaxNumberRamUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult)) {\n return 0;\n }\n\n let levelsToMax;\n if (nodeObj instanceof HacknetServer) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n if (player.money > nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult)) {\n return levelsToMax;\n }\n\n //We'll just loop until we find the max\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money > nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult)) {\n return i;\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\nexport function getMaxNumberCoreUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < 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 if (player.money > nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult)) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult) &&\n player.money < nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {\n max = curr - 1;\n } else if (player.money > 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}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\nexport function getMaxNumberCacheUpgrades(player: IPlayer, nodeObj: HacknetServer, maxLevel: number): number {\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 if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) &&\n !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))\n ) {\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}\n\nexport function purchaseLevelUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // If we're at max level, return false\n if (node.level >= (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n if (node.level + sanitizedLevels > (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.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, \"hacknet_expenses\");\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseRamUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof HacknetServer && node.maxRam >= HacknetServerConstants.MaxRam) {\n return false;\n }\n\n if (node instanceof HacknetNode && node.ram >= HacknetNodeConstants.MaxRam) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n if (node instanceof HacknetServer) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > HacknetServerConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetServerConstants.MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof HacknetNode) {\n if (node.ram * Math.pow(2, sanitizedLevels) > HacknetNodeConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetNodeConstants.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, \"hacknet_expenses\");\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCoreUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // Fail if we're already at max\n if (node.cores >= (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n return false;\n }\n\n // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n if (node.cores + sanitizedLevels > (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.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, \"hacknet_expenses\");\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCacheUpgrade(player: IPlayer, node: HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof HacknetServer)) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n }\n\n // Fail if we're already at max\n if (node.cache + sanitizedLevels > HacknetServerConstants.MaxCache) {\n const diff = Math.max(0, HacknetServerConstants.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, \"hacknet_expenses\");\n node.upgradeCache(sanitizedLevels);\n\n return true;\n}\n\nexport function processHacknetEarnings(player: IPlayer, numCycles: number): number {\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 if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof HacknetNode) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player: IPlayer, numCycles: number): number {\n let total = 0;\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: IPlayer, numCycles: number, nodeObj: HacknetNode): number {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings, \"hacknet\");\n\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player: IPlayer, numCycles: number): number {\n if (!(player.hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\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) throw new Error(`player nodes should not be HacketNode`);\n const hserver = GetServer(ip);\n if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hashes += h;\n }\n\n const wastedHashes = player.hashManager.storeHashes(hashes);\n if (wastedHashes > 0) {\n const upgrade = HashUpgrades[\"Sell for Money\"];\n if (upgrade === null) throw new Error(\"Could not get the hash upgrade\");\n if (!upgrade.cost) throw new Error(\"Upgrade is not properly configured\");\n\n const multiplier = Math.floor(wastedHashes / upgrade.cost);\n if (multiplier > 0) {\n player.gainMoney(upgrade.value * multiplier, \"hacknet\");\n }\n }\n\n return hashes;\n}\n\nexport function updateHashManagerCapacity(player: IPlayer): void {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n const ip = nodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should be string but isn't`);\n const h = GetServer(ip);\n if (!(h instanceof HacknetServer)) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\n\nexport function purchaseHashUpgrade(player: IPlayer, upgName: string, upgTarget: string): boolean {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return false;\n }\n\n // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n if (player.hashManager.upgrade(upgName)) {\n const upg = HashUpgrades[upgName];\n\n switch (upgName) {\n case \"Sell for Money\": {\n player.gainMoney(upg.value, \"hacknet\");\n break;\n }\n case \"Sell for Corporation Funds\": {\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n corp.funds = corp.funds + upg.value;\n break;\n }\n case \"Reduce Minimum Security\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Increase Maximum Money\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMaximumMoney(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Improve Studying\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Improve Gym Training\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Exchange for Corporation Research\": {\n // This will throw if player doesn't have a corporation\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n for (const division of corp.divisions) {\n division.sciResearch.qty += upg.value;\n }\n break;\n }\n case \"Exchange for Bladeburner Rank\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n bladeburner.changeRank(player, upg.value);\n break;\n }\n case \"Exchange for Bladeburner SP\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n bladeburner.skillPoints += upg.value;\n break;\n }\n case \"Generate Coding Contract\": {\n generateRandomContract();\n break;\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","import { Augmentation } from \"./Augmentation\";\nimport { IMap } from \"../types\";\n\nexport const Augmentations: IMap = {};\n","export enum BlackOperationNames {\n OperationTyphoon = \"Operation Typhoon\",\n OperationZero = \"Operation Zero\",\n OperationX = \"Operation X\",\n OperationTitan = \"Operation Titan\",\n OperationAres = \"Operation Ares\",\n OperationArchangel = \"Operation Archangel\",\n OperationJuggernaut = \"Operation Juggernaut\",\n OperationRedDragon = \"Operation Red Dragon\",\n OperationK = \"Operation K\",\n OperationDeckard = \"Operation Deckard\",\n OperationTyrell = \"Operation Tyrell\",\n OperationWallace = \"Operation Wallace\",\n OperationShoulderOfOrion = \"Operation Shoulder of Orion\",\n OperationHyron = \"Operation Hyron\",\n OperationMorpheus = \"Operation Morpheus\",\n OperationIonStorm = \"Operation Ion Storm\",\n OperationAnnihilus = \"Operation Annihilus\",\n OperationUltron = \"Operation Ultron\",\n OperationCenturion = \"Operation Centurion\",\n OperationVindictus = \"Operation Vindictus\",\n OperationDaedalus = \"Operation Daedalus\",\n}\n","import { CityName } from './../../Locations/data/CityNames';\nexport const BladeburnerConstants: {\n CityNames: string[];\n CyclesPerSecond: number;\n StaminaGainPerSecond: number;\n BaseStaminaLoss: number;\n MaxStaminaToGainFactor: number;\n DifficultyToTimeFactor: number;\n DiffMultExponentialFactor: number;\n DiffMultLinearFactor: number;\n EffAgiLinearFactor: number;\n EffDexLinearFactor: number;\n EffAgiExponentialFactor: number;\n EffDexExponentialFactor: number;\n BaseRecruitmentTimeNeeded: number;\n PopulationThreshold: number;\n PopulationExponent: number;\n ChaosThreshold: number;\n BaseStatGain: number;\n BaseIntGain: number;\n ActionCountGrowthPeriod: number;\n RankToFactionRepFactor: number;\n RankNeededForFaction: number;\n ContractSuccessesPerLevel: number;\n OperationSuccessesPerLevel: number;\n RanksPerSkillPoint: number;\n ContractBaseMoneyGain: number;\n HrcHpGain: number;\n HrcStaminaGain: number;\n} = {\n CityNames: [CityName.Aevum, CityName.Chongqing, CityName.Sector12, CityName.NewTokyo, CityName.Ishima, CityName.Volhaven],\n CyclesPerSecond: 5, // Game cycle is 200 ms\n\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285, // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000, // Max Stamina is divided by this to get bonus stamina gain\n\n DifficultyToTimeFactor: 10, // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n\n BaseRecruitmentTimeNeeded: 300, // Base time needed (s) to complete a Recruitment action\n\n PopulationThreshold: 1e9, // Population which determines baseline success rate\n PopulationExponent: 0.7, // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50, // City chaos level after which it starts making tasks harder\n\n BaseStatGain: 1, // Base stat gain per second\n BaseIntGain: 0.003, // Base intelligence stat gain\n\n ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value\n\n RankToFactionRepFactor: 2, // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n\n ContractSuccessesPerLevel: 3, // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5, // How many successes you need to level up an op\n\n RanksPerSkillPoint: 3, // How many ranks needed to get 1 Skill Point\n\n ContractBaseMoneyGain: 250e3, // Base Money Gained per contract\n\n HrcHpGain: 2, // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1, // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n};\n","import { IMap } from \"../../types\";\n\nexport const LiteratureNames: IMap = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\",\n};\n","import { Program } from \"./Program\";\nimport { programsMetadata } from \"./data/ProgramsMetadata\";\nimport { IMap } from \"../types\";\n\nexport const Programs: IMap = {};\n\nfor (const params of programsMetadata) {\n Programs[params.key] = new Program(params.name, params.create, params.run);\n}\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companiesMetadata } from \"./data/CompaniesMetadata\";\nimport { Company, IConstructorParams } from \"./Company\";\nimport { IMap } from \"../types\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Companies: IMap = {};\n\nfunction addCompany(params: IConstructorParams): void {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n Companies[params.name] = new Company(params);\n}\n\n// Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\nexport function initCompanies(): void {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies;\n\n // Re-construct all Companies\n Companies = {};\n companiesMetadata.forEach((e) => {\n addCompany(e);\n });\n\n // Reset data\n for (const companyName of Object.keys(Companies)) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n if (!(oldCompany instanceof Company)) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n}\n\n// Used to load Companies map from a save\nexport function loadCompanies(saveString: string): void {\n Companies = JSON.parse(saveString, Reviver);\n}\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { Industry } from \"./Industry\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Material } from \"./Material\";\nimport { Product } from \"./Product\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationUnlockUpgrade } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade } from \"./data/CorporationUpgrades\";\nimport { Cities } from \"../Locations/Cities\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Employee } from \"./Employee\";\nimport { IndustryUpgrades } from \"./IndustryUpgrades\";\nimport { ResearchMap } from \"./ResearchMap\";\nimport { isRelevantMaterial } from \"./ui/Helpers\";\nimport { CityName } from \"src/Locations/data/CityNames\";\n\nexport function NewIndustry(corporation: ICorporation, industry: string, name: string): void {\n if (corporation.divisions.find(({ type }) => industry == type))\n throw new Error(`You have already expanded into the ${industry} industry!`);\n\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 }\n }\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n if (corporation.funds < 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 - cost;\n corporation.divisions.push(\n new Industry({\n corp: corporation,\n name: name,\n type: industry,\n }),\n );\n }\n}\n\nexport function NewCity(corporation: ICorporation, division: IIndustry, city: string): void {\n if (corporation.funds < CorporationConstants.OfficeInitialCost) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds - CorporationConstants.OfficeInitialCost;\n division.offices[city] = new OfficeSpace({\n loc: city,\n size: CorporationConstants.OfficeInitialSize,\n });\n }\n}\n\nexport function UnlockUpgrade(corporation: ICorporation, upgrade: CorporationUnlockUpgrade): void {\n if (corporation.funds < upgrade[1]) {\n throw new Error(\"Insufficient funds\");\n }\n if (corporation.unlockUpgrades[upgrade[0]] === 1) {\n throw new Error(`You have already unlocked the ${upgrade[2]} upgrade!`);\n }\n corporation.unlock(upgrade);\n}\n\nexport function LevelUpgrade(corporation: ICorporation, upgrade: CorporationUpgrade): void {\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 if (corporation.funds < cost) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\n\nexport function IssueDividends(corporation: ICorporation, percent: number): void {\n if (isNaN(percent) || percent < 0 || percent > CorporationConstants.DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${CorporationConstants.DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\n\nexport function SellMaterial(mat: Material, amt: string, price: string): void {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MPe]/g, \"\"); //Sanitize cost\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\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)) || parseFloat(temp) < 0) {\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 }\n\n //Parse quantity\n amt = amt.toUpperCase();\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, mat.maxsll.toString());\n tempQty = tempQty.replace(/PROD/g, mat.prd.toString());\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty)) || parseFloat(tempQty) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n if (isNaN(q)) {\n q = 0;\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}\n\nexport function SellProduct(product: Product, city: string, amt: string, price: string, all: boolean): void {\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 try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell price field.\");\n }\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n product.sCost = cost;\n }\n\n // Array of all cities. Used later\n const cities = Object.keys(Cities);\n\n // Parse quantity\n amt = amt.toUpperCase();\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, product.maxsll.toString());\n temp = temp.replace(/PROD/g, product.data[city][1].toString());\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)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\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)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let qty = parseFloat(amt);\n if (isNaN(qty)) {\n qty = 0;\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 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\nexport function SetSmartSupply(warehouse: Warehouse, smartSupply: boolean): void {\n warehouse.smartSupplyEnabled = smartSupply;\n}\n\nexport function SetSmartSupplyUseLeftovers(warehouse: Warehouse, material: Material, useLeftover: boolean): void {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name.replace(/ /g, \"\")))\n throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name.replace(/ /g, \"\")] = useLeftover;\n}\n\nexport function BuyMaterial(material: Material, amt: number): void {\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n material.buy = amt;\n}\n\nexport function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material: Material, amt: number): void {\n const matSize = MaterialSizes[material.name];\n const maxAmount = (warehouse.size - warehouse.sizeUsed) / matSize;\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid input amount`);\n }\n if (amt * matSize <= maxAmount) {\n throw new Error(`You do not have enough warehouse size to fit this purchase`);\n }\n const cost = amt * material.bCost;\n if (corp.funds >= cost) {\n corp.funds = corp.funds - cost;\n material.qty += amt;\n } else {\n throw new Error(`You cannot afford this purchase.`);\n }\n}\n\nexport function SellShares(corporation: ICorporation, player: IPlayer, numShares: number): number {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to sell!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n if (corporation.shareSaleCooldown) throw new Error(\"Share sale on cooldown!\");\n const stockSaleResults = corporation.calculateShareSale(numShares);\n const profit = stockSaleResults[0];\n const newSharePrice = stockSaleResults[1];\n const newSharesUntilUpdate = stockSaleResults[2];\n\n corporation.numShares -= numShares;\n corporation.issuedShares += numShares;\n corporation.sharePrice = newSharePrice;\n corporation.shareSalesUntilPriceUpdate = newSharesUntilUpdate;\n corporation.shareSaleCooldown = CorporationConstants.SellSharesCooldown;\n player.gainMoney(profit, \"corporation\");\n return profit;\n}\n\nexport function BuyBackShares(corporation: ICorporation, player: IPlayer, numShares: number): boolean {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.issuedShares) throw new Error(\"You don't have that many shares to buy!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n const buybackPrice = corporation.sharePrice * 1.1;\n if (player.money < numShares * buybackPrice) throw new Error(\"You cant afford that many shares!\");\n corporation.numShares += numShares;\n corporation.issuedShares -= numShares;\n player.loseMoney(numShares * buybackPrice, \"corporation\");\n return true;\n}\n\nexport function AssignJob(employee: Employee, job: string): void {\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\n\nexport function UpgradeOfficeSize(corp: ICorporation, office: OfficeSpace, size: number): void {\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const cost = CorporationConstants.OfficeInitialCost * mult;\n if (corp.funds < cost) return;\n office.size += size;\n corp.funds = corp.funds - cost;\n}\n\nexport function ThrowParty(corp: ICorporation, office: OfficeSpace, costPerEmployee: number): number {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds < totalCost) return 0;\n corp.funds = corp.funds - totalCost;\n let mult = 0;\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\n\nexport function PurchaseWarehouse(corp: ICorporation, division: IIndustry, city: string): void {\n if (corp.funds < CorporationConstants.WarehouseInitialCost) return;\n if (division.warehouses[city] instanceof Warehouse) return;\n division.warehouses[city] = new Warehouse({\n corp: corp,\n industry: division,\n loc: city,\n size: CorporationConstants.WarehouseInitialSize,\n });\n corp.funds = corp.funds - CorporationConstants.WarehouseInitialCost;\n}\n\nexport function UpgradeWarehouse(corp: ICorporation, division: IIndustry, warehouse: Warehouse): void {\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n if (corp.funds < sizeUpgradeCost) return;\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n}\n\nexport function BuyCoffee(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function HireAdVert(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function MakeProduct(\n corp: ICorporation,\n division: IIndustry,\n city: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n): void {\n if (designInvest < 0) {\n designInvest = 0;\n }\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n if (!division.makesProducts) {\n throw new Error(\"You cannot create products for this industry!\");\n }\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n if (corp.funds < designInvest + marketingInvest) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n let maxProducts = 3;\n if (division.hasResearch(\"uPgrade: Capacity.II\")) {\n maxProducts = 5;\n } else if (division.hasResearch(\"uPgrade: Capacity.I\")) {\n maxProducts = 4;\n }\n const products = division.products;\n if (Object.keys(products).length >= maxProducts) {\n throw new Error(`You are already at the max products (${maxProducts}) for division: ${division.name}!`);\n }\n\n const product = new Product({\n name: productName.replace(/[<>]/g, \"\"), //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest,\n });\n if (products[product.name] instanceof Product) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds - (designInvest + marketingInvest);\n products[product.name] = product;\n}\n\nexport function Research(division: IIndustry, researchName: string): void {\n const researchTree = IndustryResearchTrees[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[researchName];\n\n if (division.sciResearch.qty < research.cost)\n throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost;\n\n // Get the Node from the Research Tree and set its 'researched' property\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\n\nexport function ExportMaterial(\n divisionName: string,\n cityName: string,\n material: Material,\n amt: string,\n division?: Industry,\n): void {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\").toUpperCase();\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\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 if (!division || !isRelevantMaterial(material.name, division)) {\n throw new Error(`You cannot export material: ${material.name} to division: ${divisionName}!`);\n }\n\n const exportObj = { ind: divisionName, city: cityName, amt: sanitizedAmt };\n material.exp.push(exportObj);\n}\n\nexport function CancelExportMaterial(divisionName: string, cityName: string, material: Material, amt: string): void {\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)\n continue;\n material.exp.splice(i, 1);\n break;\n }\n}\n\nexport function LimitProductProduction(product: Product, cityName: string, qty: number): void {\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}\n\nexport function SetMaterialMarketTA1(material: Material, on: boolean): void {\n material.marketTa1 = on;\n}\n\nexport function SetMaterialMarketTA2(material: Material, on: boolean): void {\n material.marketTa2 = on;\n}\n\nexport function SetProductMarketTA1(product: Product, on: boolean): void {\n product.marketTa1 = on;\n}\n\nexport function SetProductMarketTA2(product: Product, on: boolean): void {\n product.marketTa2 = on;\n}\n","export enum PositionTypes {\n Long = \"L\",\n Short = \"S\",\n}\n","/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nexport enum SleeveTaskType {\n // Same Order as selectable order in UI\n Idle,\n Company,\n Faction,\n Crime,\n Class,\n Gym,\n Recovery,\n Synchro,\n}\n","export enum FragmentType {\n // Special fragments for the UI\n None,\n Delete,\n\n // Stats boosting fragments\n HackingChance,\n HackingSpeed,\n HackingMoney,\n HackingGrow,\n Hacking,\n Strength,\n Defense,\n Dexterity,\n Agility,\n Charisma,\n HacknetMoney,\n HacknetCost,\n Rep,\n WorkMoney,\n Crime,\n Bladeburner,\n\n // utility fragments.\n Booster,\n}\n\nexport function Effect(tpe: FragmentType): string {\n switch (tpe) {\n case FragmentType.HackingChance: {\n return \"+x% hack() success chance\";\n }\n case FragmentType.HackingSpeed: {\n return \"+x% faster hack(), grow(), and weaken()\";\n }\n case FragmentType.HackingMoney: {\n return \"+x% hack() power\";\n }\n case FragmentType.HackingGrow: {\n return \"+x% grow() power\";\n }\n case FragmentType.Hacking: {\n return \"+x% hacking skill\";\n }\n case FragmentType.Strength: {\n return \"+x% strength skill\";\n }\n case FragmentType.Defense: {\n return \"+x% defense skill\";\n }\n case FragmentType.Dexterity: {\n return \"+x% dexterity skill\";\n }\n case FragmentType.Agility: {\n return \"+x% agility skill\";\n }\n case FragmentType.Charisma: {\n return \"+x% charisma skill\";\n }\n case FragmentType.HacknetMoney: {\n return \"+x% hacknet production\";\n }\n case FragmentType.HacknetCost: {\n return \"x% cheaper hacknet cost\";\n }\n case FragmentType.Rep: {\n return \"+x% reputation from factions and companies\";\n }\n case FragmentType.WorkMoney: {\n return \"+x% work money\";\n }\n case FragmentType.Crime: {\n return \"+x% crime money\";\n }\n case FragmentType.Bladeburner: {\n return \"+x% all bladeburner stats\";\n }\n }\n throw new Error(\"Calling effect for fragment type that doesn't have an effect \" + tpe);\n}\n","import { FactionNames } from '../Faction/data/FactionNames';\nimport { Reviver } from \"../utils/JSONReviver\";\n\ninterface GangTerritory {\n power: number;\n territory: number;\n}\n\nexport let AllGangs: {\n [key: string]: GangTerritory;\n} = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n};\n\nexport function resetGangs(): void {\n AllGangs = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n };\n}\n\nexport function loadAllGangs(saveString: string): void {\n AllGangs = JSON.parse(saveString, Reviver);\n}\n","// Contains an array containing information about the player's source files\n// Array[n] returns what level the player has of Source-File N.\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport const SourceFileFlags: number[] = Array(CONSTANTS.TotalNumBitNodes + 1); // Skip index 0\n\nexport function updateSourceFileFlags(p: IPlayer): void {\n for (let i = 0; i < SourceFileFlags.length; ++i) {\n SourceFileFlags[i] = 0;\n }\n\n for (let i = 0; i < p.sourceFiles.length; ++i) {\n const sf = p.sourceFiles[i];\n SourceFileFlags[sf.n] = sf.lvl;\n }\n}\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 functions that deal only with that string manipulation.\n * Functions that need to access/process Server-related things can be\n * found in ./DirectoryServerHelpers.ts\n */\n\n/**\n * Removes leading forward slash (\"/\") from a string.\n */\nexport function removeLeadingSlash(s: string): string {\n if (s.startsWith(\"/\")) {\n return s.slice(1);\n }\n\n return s;\n}\n\n/**\n * Removes trailing forward slash (\"/\") from a string.\n * Note that this will also remove the slash if it is the leading slash (i.e. if s = \"/\")\n */\nexport function removeTrailingSlash(s: string): string {\n if (s.endsWith(\"/\")) {\n return s.slice(0, -1);\n }\n\n return s;\n}\n\n/**\n * Checks whether a string is a valid filename. Only used for the filename itself,\n * not the entire filepath\n */\nexport function isValidFilename(filename: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs\n // Must have a file extension\n const regex = /^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\\d+(?:\\.\\d*)?%-INC)?$/;\n\n // match() returns null if no match is found\n return filename.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory name. Only used for the directory itself,\n * not an entire path\n */\nexport function isValidDirectoryName(name: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs.\n // Name can begin with a single period, but otherwise cannot have any\n const regex = /^.?[a-zA-Z0-9_-]+$/;\n\n // match() returns null if no match is found\n return name.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory path.\n * This only checks if it has the proper formatting. It does NOT check\n * if the directories actually exist on Terminal\n */\nexport function isValidDirectoryPath(path: string): boolean {\n let t_path: string = path;\n\n if (t_path.length === 0) {\n return false;\n }\n if (t_path.length === 1) {\n return t_path === \"/\";\n }\n\n // A full path must have a leading slash, but we'll ignore it for the checks\n if (t_path.startsWith(\"/\")) {\n t_path = t_path.slice(1);\n } else {\n return false;\n }\n\n // Trailing slash does not matter\n t_path = removeTrailingSlash(t_path);\n\n // Check that every section of the path is a valid directory name\n const dirs = t_path.split(\"/\");\n for (const dir of dirs) {\n // Special case, \".\" and \"..\" are valid for path\n if (dir === \".\" || dir === \"..\") {\n continue;\n }\n if (!isValidDirectoryName(dir)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Checks whether a string is a valid file path. This only checks if it has the\n * proper formatting. It dose NOT check if the file actually exists on Terminal\n */\nexport function isValidFilePath(path: string): boolean {\n if (path == null || typeof path !== \"string\") {\n return false;\n }\n const t_path = path;\n\n // Impossible for filename to have less than length of 3\n if (t_path.length < 3) {\n return false;\n }\n\n // Full filepath can't end with trailing slash because it must be a file\n if (t_path.endsWith(\"/\")) {\n return false;\n }\n\n // Everything after the last forward slash is the filename. Everything before\n // it is the file path\n const fnSeparator = t_path.lastIndexOf(\"/\");\n if (fnSeparator === -1) {\n return isValidFilename(t_path);\n }\n\n const fn = t_path.slice(fnSeparator + 1);\n const dirPath = t_path.slice(0, fnSeparator + 1);\n\n return isValidDirectoryPath(dirPath) && isValidFilename(fn);\n}\n\n/**\n * Returns a formatted string for the first parent directory in a filepath. For example:\n * /home/var/test/ -> home/\n * If there is no first parent directory, then it returns \"/\" for root\n */\nexport function getFirstParentDirectory(path: string): string {\n let t_path = path;\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n if (t_path.lastIndexOf(\"/\") === -1) {\n return \"/\";\n }\n\n const dirs = t_path.split(\"/\");\n if (dirs.length === 0) {\n return \"/\";\n }\n\n return dirs[0] + \"/\";\n}\n\n/**\n * Given a filepath, returns a formatted string for all of the parent directories\n * in that filepath. For example:\n * /home/var/tes -> home/var/\n * /home/var/test/ -> home/var/test/\n * If there are no parent directories, it returns the empty string\n */\nexport function getAllParentDirectories(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return \"\";\n }\n\n return t_path.slice(0, lastSlash + 1);\n}\n\n/**\n * Given a destination that only contains a directory part, returns the\n * path to the source filename inside the new destination directory.\n * Otherwise, returns the path to the destination file.\n * @param destination The destination path or file name\n * @param source The source path\n * @param cwd The current working directory\n * @returns A file path which may be absolute or relative\n */\nexport function getDestinationFilepath(destination: string, source: string, cwd: string): string {\n const dstDir = evaluateDirectoryPath(destination, cwd);\n // If evaluating the directory for this destination fails, we have a filename or full path.\n if (dstDir === null) {\n return destination;\n } else {\n // Append the filename to the directory provided.\n const t_path = removeTrailingSlash(dstDir);\n const fileName = getFileName(source);\n return t_path + \"/\" + fileName;\n }\n}\n\n/**\n * Given a filepath, returns the file name (e.g. without directory parts)\n * For example:\n * /home/var/test.js -> test.js\n * ./var/test.js -> test.js\n * test.js -> test.js\n */\nexport function getFileName(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return t_path;\n }\n\n return t_path.slice(lastSlash + 1);\n}\n\n/**\n * Checks if a file path refers to a file in the root directory.\n */\nexport function isInRootDirectory(path: string): boolean {\n if (!isValidFilePath(path)) {\n return false;\n }\n if (path == null || path.length === 0) {\n return false;\n }\n\n return path.lastIndexOf(\"/\") <= 0;\n}\n\n/**\n * Evaluates a directory path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateDirectoryPath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidDirectoryPath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\n/**\n * Evaluates a file path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateFilePath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidFilePath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\nexport function areFilesEqual(f0: string, f1: string): boolean {\n if (!f0.startsWith(\"/\")) f0 = \"/\" + f0;\n if (!f1.startsWith(\"/\")) f1 = \"/\" + f1;\n return f0 === f1;\n}\n\nexport function areImportsEquals(f0: string, f1: string): boolean {\n if (!f0.endsWith(\".ns\") && !f0.endsWith(\".js\")) f0 = f0 + \".js\";\n if (!f1.endsWith(\".ns\") && !f1.endsWith(\".js\")) f1 = f1 + \".js\";\n return areFilesEqual(f0, f1);\n}\n","import { Crime } from \"./Crime\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IMap } from \"../types\";\n\nexport const Crimes: IMap = {\n Shoplift: new Crime(\"Shoplift\", CONSTANTS.CrimeShoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n dexterity_exp: 2,\n agility_exp: 2,\n }),\n\n RobStore: new Crime(\"Rob Store\", CONSTANTS.CrimeRobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Mug: new Crime(\"Mug\", CONSTANTS.CrimeMug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5,\n }),\n\n Larceny: new Crime(\"Larceny\", CONSTANTS.CrimeLarceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n DealDrugs: new Crime(\"Deal Drugs\", CONSTANTS.CrimeDrugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n }),\n\n BondForgery: new Crime(\"Bond Forgery\", CONSTANTS.CrimeBondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n\n intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n TraffickArms: new Crime(\"Traffick Arms\", CONSTANTS.CrimeTraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n }),\n\n Homicide: new Crime(\"Homicide\", CONSTANTS.CrimeHomicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n\n kills: 1,\n }),\n\n GrandTheftAuto: new Crime(\"Grand Theft Auto\", CONSTANTS.CrimeGrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n\n intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Kidnap: new Crime(\"Kidnap\", CONSTANTS.CrimeKidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Assassination: new Crime(\"Assassination\", CONSTANTS.CrimeAssassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 65 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n\n kills: 1,\n }),\n\n Heist: new Crime(\"Heist\", CONSTANTS.CrimeHeist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n\n intelligence_exp: 130 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n};\n","import * as React from \"react\";\n\nexport function trusted(f: () => void): (event: React.MouseEvent) => any {\n return function (event: React.MouseEvent): any {\n if (!event.isTrusted) return;\n f();\n };\n}\n","import { Terminal as TTerminal } from \"./Terminal/Terminal\";\n\nexport const Terminal = new TTerminal();\n","/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\nimport { CONSTANTS } from \"../Constants\";\n\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { HacknetServerConstants } from \"./data/Constants\";\nimport {\n calculateHashGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateCacheUpgradeCost,\n} from \"./formulas/HacknetServers\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\nexport class HacknetServer extends BaseServer implements IHacknetNode {\n // Cache level. Affects hash Capacity\n cache = 1;\n\n // Number of cores. Improves hash production\n cores = 1;\n\n // Number of hashes that can be stored by this Hacknet Server\n hashCapacity = 0;\n\n // Hashes produced per second\n hashRate = 0;\n\n // Similar to Node level. Improves hash production\n level = 1;\n\n // How long this HacknetServer has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Total number of hashes earned by this server\n totalHashesGenerated = 0;\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = true;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels: number): number {\n return calculateCacheUpgradeCost(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels: number, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels: number, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels: number, costMult: number): number {\n return calculateRamUpgradeCost(this.maxRam, levels, costMult);\n }\n\n // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n this.onlineTimeSeconds += seconds;\n\n const hashes = this.hashRate * seconds;\n this.totalHashesGenerated += hashes;\n\n return hashes;\n }\n\n upgradeCache(levels: number): void {\n this.cache = Math.min(HacknetServerConstants.MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels: number, prodMult: number): void {\n this.cores = Math.min(HacknetServerConstants.MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n this.cpuCores = this.cores;\n }\n\n upgradeLevel(levels: number, prodMult: number): void {\n this.level = Math.min(HacknetServerConstants.MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels: number, prodMult: number): boolean {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n this.maxRam = Math.min(HacknetServerConstants.MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n\n return true;\n }\n\n // Whenever a script is run, we must update this server's hash rate\n runScript(script: RunningScript, prodMult?: number): void {\n super.runScript(script);\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateRamUsed(ram: number, player: IPlayer): void {\n super.updateRamUsed(ram, player);\n this.updateHashRate(player.hacknet_node_money_mult);\n }\n\n updateHashCapacity(): void {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult: number): void {\n this.hashRate = calculateHashGainRate(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(\n `Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`,\n false,\n );\n }\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"HacknetServer\", this);\n }\n\n // Initializes a HacknetServer Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HacknetServer {\n return Generic_fromJSON(HacknetServer, value.data);\n }\n}\n\nReviver.constructors.HacknetServer = HacknetServer;\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companyPositionMetadata } from \"./data/CompanyPositionsMetadata\";\nimport { CompanyPosition, IConstructorParams } from \"./CompanyPosition\";\nimport { IMap } from \"../types\";\n\nexport const CompanyPositions: IMap = {};\n\nfunction addCompanyPosition(params: IConstructorParams): void {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n CompanyPositions[params.name] = new CompanyPosition(params);\n}\n\ncompanyPositionMetadata.forEach((e) => {\n addCompanyPosition(e);\n});\n","import React, { useState, useEffect } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IEngine } from \"../IEngine\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { saveObject } from \"../SaveObject\";\nimport { onExport } from \"../ExportBonus\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Location } from \"../Locations/Location\";\nimport { Locations } from \"../Locations/Locations\";\nimport { ITutorial, iTutorialStart } from \"../InteractiveTutorial\";\nimport { InteractiveTutorialRoot } from \"./InteractiveTutorial/InteractiveTutorialRoot\";\nimport { ITutorialEvents } from \"./InteractiveTutorial/ITutorialEvents\";\n\nimport { Faction } from \"../Faction/Faction\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { dialogBoxCreate } from \"./React/DialogBox\";\nimport { GetAllServers } from \"../Server/AllServers\";\nimport { Factions } from \"../Faction/Factions\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport {\n cancelOrder,\n eventEmitterForUiReset,\n initStockMarketFnForReact,\n placeOrder,\n StockMarket,\n} from \"../StockMarket/StockMarket\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\n\nimport { Page, IRouter, ScriptEditorRouteOptions } from \"./Router\";\nimport { Overview } from \"./React/Overview\";\nimport { SidebarRoot } from \"../Sidebar/ui/SidebarRoot\";\nimport { AugmentationsRoot } from \"../Augmentation/ui/AugmentationsRoot\";\nimport { DevMenuRoot } from \"../DevMenu\";\nimport { BladeburnerRoot } from \"../Bladeburner/ui/BladeburnerRoot\";\nimport { GangRoot } from \"../Gang/ui/GangRoot\";\nimport { CorporationRoot } from \"../Corporation/ui/CorporationRoot\";\nimport { InfiltrationRoot } from \"../Infiltration/ui/InfiltrationRoot\";\nimport { GraftingRoot } from \"../PersonObjects/Grafting/ui/GraftingRoot\";\nimport { WorkInProgressRoot } from \"./WorkInProgressRoot\";\nimport { GameOptionsRoot } from \"./React/GameOptionsRoot\";\nimport { SleeveRoot } from \"../PersonObjects/Sleeve/ui/SleeveRoot\";\nimport { HacknetRoot } from \"../Hacknet/ui/HacknetRoot\";\nimport { GenericLocation } from \"../Locations/ui/GenericLocation\";\nimport { LocationCity } from \"../Locations/ui/City\";\nimport { ProgramsRoot } from \"../Programs/ui/ProgramsRoot\";\nimport { Root as ScriptEditorRoot } from \"../ScriptEditor/ui/ScriptEditorRoot\";\nimport { MilestonesRoot } from \"../Milestones/ui/MilestonesRoot\";\nimport { TerminalRoot } from \"../Terminal/ui/TerminalRoot\";\nimport { TutorialRoot } from \"../Tutorial/ui/TutorialRoot\";\nimport { ActiveScriptsRoot } from \"./ActiveScripts/ActiveScriptsRoot\";\nimport { FactionsRoot } from \"../Faction/ui/FactionsRoot\";\nimport { FactionRoot } from \"../Faction/ui/FactionRoot\";\nimport { CharacterStats } from \"./CharacterStats\";\nimport { TravelAgencyRoot } from \"../Locations/ui/TravelAgencyRoot\";\nimport { StockMarketRoot } from \"../StockMarket/ui/StockMarketRoot\";\nimport { BitverseRoot } from \"../BitNode/ui/BitverseRoot\";\nimport { StaneksGiftRoot } from \"../CotMG/ui/StaneksGiftRoot\";\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { CharacterOverview } from \"./React/CharacterOverview\";\nimport { BladeburnerCinematic } from \"../Bladeburner/ui/BladeburnerCinematic\";\nimport { workerScripts } from \"../Netscript/WorkerScripts\";\nimport { Unclickable } from \"../Exploits/Unclickable\";\nimport { Snackbar, SnackbarProvider } from \"./React/Snackbar\";\nimport { LogBoxManager } from \"./React/LogBoxManager\";\nimport { AlertManager } from \"./React/AlertManager\";\nimport { PromptManager } from \"./React/PromptManager\";\nimport { InvitationModal } from \"../Faction/ui/InvitationModal\";\nimport { calculateAchievements } from \"../Achievements/Achievements\";\n\nimport { enterBitNode } from \"../RedPill\";\nimport { Context } from \"./Context\";\nimport { RecoveryMode, RecoveryRoot } from \"./React/RecoveryRoot\";\nimport { AchievementsRoot } from \"../Achievements/AchievementsRoot\";\nimport { ErrorBoundary } from \"./ErrorBoundary\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeBrowser } from \"../Themes/ui/ThemeBrowser\";\nimport { ImportSaveRoot } from \"./React/ImportSaveRoot\";\nimport { BypassWrapper } from \"./React/BypassWrapper\";\n\nimport _wrap from \"lodash/wrap\";\nimport _functions from \"lodash/functions\";\nimport { Apr1 } from \"./Apr1\";\n\nconst htmlLocation = location;\n\ninterface IProps {\n terminal: ITerminal;\n player: IPlayer;\n engine: IEngine;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n \"-ms-overflow-style\": \"none\" /* for Internet Explorer, Edge */,\n \"scrollbar-width\": \"none\" /* for Firefox */,\n margin: theme.spacing(0),\n flexGrow: 1,\n display: \"block\",\n padding: \"8px\",\n minHeight: \"100vh\",\n boxSizing: \"border-box\",\n },\n }),\n);\n\nconst uninitialized = (): any => {\n throw new Error(\"Router called before initialization\");\n};\n\nexport let Router: IRouter = {\n isInitialized: false,\n page: uninitialized,\n allowRouting: uninitialized,\n toActiveScripts: uninitialized,\n toAugmentations: uninitialized,\n toBitVerse: uninitialized,\n toBladeburner: uninitialized,\n toStats: uninitialized,\n toCity: uninitialized,\n toCorporation: uninitialized,\n toCreateProgram: uninitialized,\n toDevMenu: uninitialized,\n toFaction: uninitialized,\n toFactions: uninitialized,\n toGameOptions: uninitialized,\n toGang: uninitialized,\n toHacknetNodes: uninitialized,\n toInfiltration: uninitialized,\n toJob: uninitialized,\n toMilestones: uninitialized,\n toGrafting: uninitialized,\n toScriptEditor: uninitialized,\n toSleeves: uninitialized,\n toStockMarket: uninitialized,\n toTerminal: uninitialized,\n toTravel: uninitialized,\n toTutorial: uninitialized,\n toWork: uninitialized,\n toBladeburnerCinematic: uninitialized,\n toLocation: uninitialized,\n toStaneksGift: uninitialized,\n toAchievements: uninitialized,\n toThemeBrowser: uninitialized,\n toImportSave: uninitialized,\n};\n\nfunction determineStartPage(player: IPlayer): Page {\n if (RecoveryMode) return Page.Recovery;\n if (player.isWorking) return Page.Work;\n return Page.Terminal;\n}\n\nexport function GameRoot({ player, engine, terminal }: IProps): React.ReactElement {\n const classes = useStyles();\n const [{ files, vim }, setEditorOptions] = useState({ files: {}, vim: false });\n const [page, setPage] = useState(determineStartPage(player));\n const setRerender = useState(0)[1];\n const [augPage, setAugPage] = useState(false);\n const [faction, setFaction] = useState(\n player.currentWorkFactionName ? Factions[player.currentWorkFactionName] : (undefined as unknown as Faction),\n );\n if (faction === undefined && page === Page.Faction)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [flume, setFlume] = useState(false);\n const [quick, setQuick] = useState(false);\n const [location, setLocation] = useState(undefined as unknown as Location);\n if (location === undefined && (page === Page.Infiltration || page === Page.Location || page === Page.Job))\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [cinematicText, setCinematicText] = useState(\"\");\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0);\n const [sidebarOpened, setSideBarOpened] = useState(Settings.IsSidebarOpened);\n\n const [importString, setImportString] = useState(undefined as unknown as string);\n const [importAutomatic, setImportAutomatic] = useState(false);\n if (importString === undefined && page === Page.ImportSave)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [allowRoutingCalls, setAllowRoutingCalls] = useState(true);\n\n function resetErrorBoundary(): void {\n setErrorBoundaryKey(errorBoundaryKey + 1);\n }\n\n function rerender(): void {\n setRerender((old) => old + 1);\n }\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n\n function killAllScripts(): void {\n for (const server of GetAllServers()) {\n server.runningScripts = [];\n }\n saveObject.saveGame();\n setTimeout(() => htmlLocation.reload(), 2000);\n }\n\n Router = {\n isInitialized: true,\n page: () => page,\n allowRouting: (value: boolean) => setAllowRoutingCalls(value),\n toActiveScripts: () => setPage(Page.ActiveScripts),\n toAugmentations: () => setPage(Page.Augmentations),\n toBladeburner: () => setPage(Page.Bladeburner),\n toStats: () => setPage(Page.Stats),\n toCorporation: () => setPage(Page.Corporation),\n toCreateProgram: () => setPage(Page.CreateProgram),\n toDevMenu: () => setPage(Page.DevMenu),\n toFaction: (faction: Faction, augPage = false) => {\n setAugPage(augPage);\n setPage(Page.Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(Page.Factions),\n toGameOptions: () => setPage(Page.Options),\n toGang: () => setPage(Page.Gang),\n toHacknetNodes: () => setPage(Page.Hacknet),\n toMilestones: () => setPage(Page.Milestones),\n toGrafting: () => setPage(Page.Grafting),\n toScriptEditor: (files: Record, options?: ScriptEditorRouteOptions) => {\n setEditorOptions({\n files,\n vim: !!options?.vim,\n });\n setPage(Page.ScriptEditor);\n },\n toSleeves: () => setPage(Page.Sleeves),\n toStockMarket: () => setPage(Page.StockMarket),\n toTerminal: () => setPage(Page.Terminal),\n toTutorial: () => setPage(Page.Tutorial),\n toJob: () => {\n setLocation(Locations[player.companyName]);\n setPage(Page.Job);\n },\n toCity: () => {\n setPage(Page.City);\n },\n toTravel: () => {\n player.gotoLocation(LocationName.TravelAgency);\n setPage(Page.Travel);\n },\n toBitVerse: (flume: boolean, quick: boolean) => {\n setFlume(flume);\n setQuick(quick);\n calculateAchievements();\n setPage(Page.BitVerse);\n },\n toInfiltration: (location: Location) => {\n setLocation(location);\n setPage(Page.Infiltration);\n },\n toWork: () => setPage(Page.Work),\n toBladeburnerCinematic: () => {\n setPage(Page.BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: (location: Location) => {\n setLocation(location);\n setPage(Page.Location);\n },\n toStaneksGift: () => {\n setPage(Page.StaneksGift);\n },\n toAchievements: () => {\n setPage(Page.Achievements);\n },\n toThemeBrowser: () => {\n setPage(Page.ThemeBrowser);\n },\n toImportSave: (base64save: string, automatic = false) => {\n setImportString(base64save);\n setImportAutomatic(automatic);\n setPage(Page.ImportSave);\n },\n };\n\n useEffect(() => {\n // Wrap Router navigate functions to be able to disable the execution\n _functions(Router)\n .filter((fnName) => fnName.startsWith(\"to\"))\n .forEach((fnName) => {\n // @ts-ignore - tslint does not like this, couldn't find a way to make it cooperate\n Router[fnName] = _wrap(Router[fnName], (func, ...args) => {\n if (!allowRoutingCalls) {\n // Let's just log to console.\n console.log(`Routing is currently disabled - Attempted router.${fnName}()`);\n return;\n }\n\n // Call the function normally\n return func(...args);\n });\n });\n });\n\n useEffect(() => {\n if (page !== Page.Terminal) window.scrollTo(0, 0);\n });\n\n function softReset(): void {\n dialogBoxCreate(\"Soft Reset!\");\n prestigeAugmentation();\n resetErrorBoundary();\n Router.toTerminal();\n }\n\n let mainPage = Cannot load;\n let withSidebar = true;\n let withPopups = true;\n let bypassGame = false;\n switch (page) {\n case Page.Recovery: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n break;\n }\n case Page.BitVerse: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Infiltration: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.BladeburnerCinematic: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Work: {\n mainPage = ;\n withSidebar = false;\n break;\n }\n case Page.Terminal: {\n mainPage = ;\n break;\n }\n case Page.Sleeves: {\n mainPage = ;\n break;\n }\n case Page.StaneksGift: {\n mainPage = ;\n break;\n }\n case Page.Stats: {\n mainPage = ;\n break;\n }\n case Page.ScriptEditor: {\n mainPage = (\n \n );\n break;\n }\n case Page.ActiveScripts: {\n mainPage = ;\n break;\n }\n case Page.Hacknet: {\n mainPage = ;\n break;\n }\n case Page.CreateProgram: {\n mainPage = ;\n break;\n }\n case Page.Factions: {\n mainPage = ;\n break;\n }\n case Page.Faction: {\n mainPage = ;\n break;\n }\n case Page.Milestones: {\n mainPage = ;\n break;\n }\n case Page.Tutorial: {\n mainPage = (\n {\n prestigeAugmentation();\n Router.toTerminal();\n iTutorialStart();\n }}\n />\n );\n break;\n }\n case Page.DevMenu: {\n mainPage = ;\n break;\n }\n case Page.Gang: {\n mainPage = ;\n break;\n }\n case Page.Corporation: {\n mainPage = ;\n break;\n }\n case Page.Bladeburner: {\n mainPage = ;\n break;\n }\n case Page.Grafting: {\n mainPage = ;\n break;\n }\n case Page.Travel: {\n mainPage = ;\n break;\n }\n case Page.StockMarket: {\n mainPage = (\n \n );\n break;\n }\n case Page.City: {\n mainPage = ;\n break;\n }\n case Page.Job:\n case Page.Location: {\n mainPage = ;\n break;\n }\n case Page.Options: {\n mainPage = (\n saveObject.saveGame()}\n export={() => {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n forceKill={killAllScripts}\n softReset={softReset}\n />\n );\n break;\n }\n case Page.Augmentations: {\n mainPage = (\n {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n installAugmentationsFn={() => {\n installAugmentations();\n Router.toTerminal();\n }}\n />\n );\n break;\n }\n case Page.Achievements: {\n mainPage = ;\n break;\n }\n case Page.ThemeBrowser: {\n mainPage = ;\n break;\n }\n case Page.ImportSave: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n }\n }\n\n return (\n \n \n \n \n \n \n {!ITutorial.isRunning ? (\n saveObject.saveGame()} killScripts={killAllScripts} />\n ) : (\n \n )}\n \n {withSidebar ? (\n \n {\n setSideBarOpened(isOpened);\n Settings.IsSidebarOpened = isOpened;\n }}\n />\n {mainPage}\n \n ) : (\n {mainPage}\n )}\n \n {withPopups && (\n <>\n \n \n \n \n \n \n )}\n \n \n \n \n \n \n );\n}\n","import { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const StockSymbols: IMap = {};\n\n// Stocks for companies at which you can work\nStockSymbols[LocationName.AevumECorp] = \"ECP\";\nStockSymbols[LocationName.Sector12MegaCorp] = \"MGCP\";\nStockSymbols[LocationName.Sector12BladeIndustries] = \"BLD\";\nStockSymbols[LocationName.AevumClarkeIncorporated] = \"CLRK\";\nStockSymbols[LocationName.VolhavenOmniTekIncorporated] = \"OMTK\";\nStockSymbols[LocationName.Sector12FourSigma] = \"FSIG\";\nStockSymbols[LocationName.ChongqingKuaiGongInternational] = \"KGI\";\nStockSymbols[LocationName.AevumFulcrumTechnologies] = \"FLCM\";\nStockSymbols[LocationName.IshimaStormTechnologies] = \"STM\";\nStockSymbols[LocationName.NewTokyoDefComm] = \"DCOMM\";\nStockSymbols[LocationName.VolhavenHeliosLabs] = \"HLS\";\nStockSymbols[LocationName.NewTokyoVitaLife] = \"VITA\";\nStockSymbols[LocationName.Sector12IcarusMicrosystems] = \"ICRS\";\nStockSymbols[LocationName.Sector12UniversalEnergy] = \"UNV\";\nStockSymbols[LocationName.AevumAeroCorp] = \"AERO\";\nStockSymbols[LocationName.VolhavenOmniaCybersystems] = \"OMN\";\nStockSymbols[LocationName.ChongqingSolarisSpaceSystems] = \"SLRS\";\nStockSymbols[LocationName.NewTokyoGlobalPharmaceuticals] = \"GPH\";\nStockSymbols[LocationName.IshimaNovaMedical] = \"NVMD\";\nStockSymbols[LocationName.AevumWatchdogSecurity] = \"WDS\";\nStockSymbols[LocationName.VolhavenLexoCorp] = \"LXO\";\nStockSymbols[LocationName.AevumRhoConstruction] = \"RHOC\";\nStockSymbols[LocationName.Sector12AlphaEnterprises] = \"APHE\";\nStockSymbols[LocationName.VolhavenSysCoreSecurities] = \"SYSC\";\nStockSymbols[LocationName.VolhavenCompuTek] = \"CTK\";\nStockSymbols[LocationName.AevumNetLinkTechnologies] = \"NTLK\";\nStockSymbols[LocationName.IshimaOmegaSoftware] = \"OMGA\";\nStockSymbols[LocationName.Sector12FoodNStuff] = \"FNS\";\nStockSymbols[LocationName.Sector12JoesGuns] = \"JGN\";\n\n// Stocks for other companies\nStockSymbols[\"Sigma Cosmetics\"] = \"SGC\";\nStockSymbols[\"Catalyst Ventures\"] = \"CTYS\";\nStockSymbols[\"Microdyne Technologies\"] = \"MDYN\";\nStockSymbols[\"Titan Laboratories\"] = \"TITN\";\n","export const validScriptExtensions: Array = [`.js`, `.script`, `.ns`];\n\nexport function isScriptFilename(f: string): boolean {\n return validScriptExtensions.some((ext) => f.endsWith(ext));\n}\n","import { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { Server } from \"./Server/Server\";\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nexport function calculateHackingChance(server: Server, player: IPlayer): number {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance =\n skillChance * difficultyMult * player.hacking_chance_mult * calculateIntelligenceBonus(player.intelligence, 1);\n if (chance > 1) {\n return 1;\n }\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\nexport function calculateHackingExpGain(server: Server, player: IPlayer): number {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * diffFactor;\n\n return expGain * player.hacking_exp_mult * BitNodeMultipliers.HackExpGain;\n}\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 */\nexport function calculatePercentMoneyHacked(server: Server, player: IPlayer): number {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking - (server.requiredHackingSkill - 1)) / player.hacking;\n const percentMoneyHacked = (difficultyMult * skillMult * player.hacking_money_mult * BitNodeMultipliers.ScriptHackMoney) / balanceFactor;\n if (percentMoneyHacked < 0) {\n return 0;\n }\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked;\n}\n\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\nexport function calculateHackingTime(server: Server, player: IPlayer): number {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff;\n // tslint:disable-next-line\n skillFactor /= player.hacking + baseSkill;\n\n const hackTimeMultiplier = 5;\n const hackingTime =\n (hackTimeMultiplier * skillFactor) /\n (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1));\n\n return hackingTime;\n}\n\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\nexport function calculateGrowTime(server: Server, player: IPlayer): number {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\nexport function calculateWeakenTime(server: Server, player: IPlayer): number {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n","import { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { processOrders } from \"./OrderProcessing\";\nimport { Stock } from \"./Stock\";\nimport { TicksPerCycle } from \"./StockMarketConstants\";\nimport { InitStockMetadata } from \"./data/InitStockMetadata\";\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { StockSymbols } from \"./data/StockSymbols\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IMap } from \"../types\";\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let StockMarket: IStockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n} as IStockMarket; // Maps full stock name -> Stock object\nexport const SymbolToStockMap: IMap = {}; // Maps symbol -> Stock object\n\nexport function placeOrder(\n stock: Stock,\n shares: number,\n price: number,\n type: OrderTypes,\n position: PositionTypes,\n workerScript: WorkerScript | null = null,\n): boolean {\n if (!(stock instanceof Stock)) {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid stock: '${stock}'`);\n } else {\n dialogBoxCreate(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n return false;\n }\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n dialogBoxCreate(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n return false;\n }\n\n const order = new Order(stock.symbol, shares, price, type, position);\n if (StockMarket[\"Orders\"] == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stk = StockMarket[name];\n if (!(stk instanceof Stock)) {\n continue;\n }\n orders[stk.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n }\n StockMarket[\"Orders\"][stock.symbol].push(order);\n\n // Process to see if it should be executed immediately\n const processOrderRefs = {\n stockMarket: StockMarket as IStockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n processOrders(stock, order.type, order.pos, processOrderRefs);\n\n return true;\n}\n\n// Returns true if successfully cancels an order, false otherwise\ninterface ICancelOrderParams {\n order?: Order;\n pos?: PositionTypes;\n price?: number;\n shares?: number;\n stock?: Stock;\n type?: OrderTypes;\n}\nexport function cancelOrder(params: ICancelOrderParams, workerScript: WorkerScript | null = null): boolean {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n if (params.order && params.order instanceof Order) {\n const order = params.order;\n // An 'Order' object is passed in\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\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 return false;\n } else if (\n params.stock &&\n params.shares &&\n params.price &&\n params.type &&\n params.pos &&\n params.stock instanceof Stock\n ) {\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 + \" @ \" + numeralWrapper.formatMoney(params.price);\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n if (\n params.shares === order.shares &&\n params.price === order.price &&\n params.type === order.type &&\n params.pos === order.pos\n ) {\n stockOrders.splice(i, 1);\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n return true;\n }\n }\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n return false;\n }\n return false;\n}\n\nexport function loadStockMarket(saveString: string): void {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n } else {\n StockMarket = JSON.parse(saveString, Reviver);\n }\n}\n\nexport function deleteStockMarket(): void {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n}\n\nexport function initStockMarket(): void {\n for (const stk of Object.keys(StockMarket)) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of InitStockMetadata) {\n const name = metadata.name;\n StockMarket[name] = new Stock(metadata);\n }\n\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = TicksPerCycle;\n}\n\nexport function initSymbolToStockMap(): void {\n for (const name of Object.keys(StockSymbols)) {\n if (StockSymbols.hasOwnProperty(name)) {\n const stock = StockMarket[name];\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n const symbol = StockSymbols[name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\n\nfunction stockMarketCycle(): void {\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n\n const roll = Math.random();\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n}\n\n// Stock prices updated every 6 seconds\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / CONSTANTS.MilliPerCycle;\nexport function processStockPrices(numCycles = 1): void {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n }\n\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 const timeNow = new Date().getTime();\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate;\n\n // Cycle\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n --StockMarket.ticksUntilCycle;\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n let av = (v * stock.mv) / 100;\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\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 stock.b = false;\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 if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2);\n\n // Shares required for price movement gradually approaches max over time\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\n\nexport function initStockMarketFnForReact(): void {\n initStockMarket();\n initSymbolToStockMap();\n}\n\nexport const eventEmitterForUiReset = new EventEmitter<[]>();\n","/* Holds IP of Special Servers */\nexport const SpecialServers: {\n [key: string]: string | undefined;\n\n Home: string;\n FulcrumSecretTechnologies: string;\n CyberSecServer: string;\n NiteSecServer: string;\n TheBlackHandServer: string;\n BitRunnersServer: string;\n TheDarkArmyServer: string;\n DaedalusServer: string;\n WorldDaemon: string;\n DarkWeb: string;\n} = {\n Home: \"home\",\n FulcrumSecretTechnologies: \"fulcrumassets\",\n CyberSecServer: \"CSEC\",\n NiteSecServer: \"avmnite-02h\",\n TheBlackHandServer: \"I.I.I.I\",\n BitRunnersServer: \"run4theh111z\",\n TheDarkArmyServer: \".\",\n DaedalusServer: \"The-Cave\",\n WorldDaemon: \"w0r1d_d43m0n\",\n DarkWeb: \"darkweb\",\n};\n","import { Augmentations } from \"../Augmentation/Augmentations\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { PlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nimport { Faction } from \"./Faction\";\nimport { Factions } from \"./Factions\";\nimport { Player } from \"../Player\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Settings } from \"../Settings/Settings\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../PersonObjects/formulas/reputation\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { InvitationEvent } from \"./ui/InvitationModal\";\nimport { FactionNames } from \"./data/FactionNames\";\nimport { SFC32RNG } from \"../Casino/RNG\";\n\nexport function inviteToFaction(faction: Faction): void {\n Player.receiveInvite(faction.name);\n faction.alreadyInvited = true;\n if (!Settings.SuppressFactionInvites) {\n InvitationEvent.emit(faction);\n }\n}\n\nexport function joinFaction(faction: Faction): void {\n if (faction.isMember) return;\n faction.isMember = true;\n Player.factions.push(faction.name);\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n Player.factions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n const factionInfo = faction.getInfo();\n\n //Determine what factions you are banned from now that you have joined this faction\n for (const enemy of factionInfo.enemies) {\n if (Factions[enemy] instanceof Faction) {\n Factions[enemy].isBanned = true;\n }\n }\n for (let i = 0; i < Player.factionInvitations.length; ++i) {\n if (Player.factionInvitations[i] == faction.name || Factions[Player.factionInvitations[i]].isBanned) {\n Player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\n\n//Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\nexport function hasAugmentationPrereqs(aug: Augmentation): boolean {\n let hasPrereqs = true;\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = Augmentations[aug.prereqs[i]];\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n if (prereqAug.owned === false) {\n hasPrereqs = false;\n\n // Check if the aug is purchased\n for (let j = 0; j < Player.queuedAugmentations.length; ++j) {\n if (Player.queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\n\nexport function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = false): string {\n const factionInfo = fac.getInfo();\n const hasPrereqs = hasAugmentationPrereqs(aug);\n if (!hasPrereqs) {\n const txt = `You must first purchase or install ${aug.prereqs.join(\",\")} before you can purchase this one.`;\n if (sing) {\n return txt;\n } else {\n dialogBoxCreate(txt);\n }\n } else if (aug.baseCost !== 0 && Player.money < aug.baseCost * factionInfo.augmentationPriceMult) {\n const txt = \"You don't have enough money to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n const txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (aug.baseCost === 0 || Player.money >= aug.baseCost * factionInfo.augmentationPriceMult) {\n const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n Player.queuedAugmentations.push(queuedAugmentation);\n\n Player.loseMoney(aug.baseCost * factionInfo.augmentationPriceMult, \"augmentations\");\n\n // If you just purchased Neuroflux Governor, recalculate the cost\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n let nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n const mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * BitNodeMultipliers.AugmentationRepCost;\n aug.baseCost = 750e3 * mult * BitNodeMultipliers.AugmentationMoneyCost;\n\n for (let i = 0; i < Player.queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n }\n }\n\n for (const name of Object.keys(Augmentations)) {\n if (Augmentations.hasOwnProperty(name)) {\n Augmentations[name].baseCost *= CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else if (!Settings.SuppressBuyAugmentationConfirmation) {\n dialogBoxCreate(\n \"You purchased \" +\n aug.name +\n \". Its enhancements will not take \" +\n \"effect until they are installed. To install your augmentations, go to the \" +\n \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" +\n \"augmentations will now be more expensive.\",\n );\n }\n } else {\n dialogBoxCreate(\n \"Hmm, something went wrong when trying to purchase an Augmentation. \" +\n \"Please report this to the game developer with an explanation of how to \" +\n \"reproduce this.\",\n );\n }\n return \"\";\n}\n\nexport function getNextNeurofluxLevel(): number {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = Player.augmentations[i].level;\n }\n }\n\n // Account for purchased but uninstalled Augmentations\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n return currLevel + 1;\n}\n\nexport function processPassiveFactionRepGain(numCycles: number): void {\n for (const name of Object.keys(Factions)) {\n if (name === Player.currentWorkFactionName) continue;\n if (!Factions.hasOwnProperty(name)) continue;\n const faction = Factions[name];\n if (!faction.isMember) continue;\n // No passive rep for special factions\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No passive rep for gangs.\n if (Player.getGangName() === name) continue;\n // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01);\n // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n\n faction.playerReputation += rate * numCycles * Player.faction_rep_mult * BitNodeMultipliers.FactionPassiveRepGain;\n }\n}\n\nexport const getFactionAugmentationsFiltered = (player: IPlayer, faction: Faction): string[] => {\n // If player has a gang with this faction, return (almost) all augmentations\n if (player.hasGangWith(faction.name)) {\n let augs = Object.values(Augmentations);\n\n // Remove special augs\n augs = augs.filter((a) => !a.isSpecial);\n\n const blacklist: string[] = [AugmentationNames.NeuroFluxGovernor];\n\n if (player.bitNodeN !== 2) {\n // TRP is not available outside of BN2 for Gangs\n blacklist.push(AugmentationNames.TheRedPill);\n }\n\n const rng = SFC32RNG(`BN${player.bitNodeN}.${player.sourceFileLvl(player.bitNodeN)}`);\n // Remove faction-unique augs that don't belong to this faction\n const uniqueFilter = (a: Augmentation): boolean => {\n // Keep all the non-unique one\n if (a.factions.length > 1) {\n return true;\n }\n // Keep all the ones that this faction has anyway.\n if (faction.augmentations.includes(a.name)) {\n return true;\n }\n\n return rng() >= 1 - BitNodeMultipliers.GangUniqueAugs;\n };\n augs = augs.filter(uniqueFilter);\n\n // Remove blacklisted augs\n augs = augs.filter((a) => !blacklist.includes(a.name));\n\n return augs.map((a) => a.name);\n }\n\n return faction.augmentations.slice();\n};\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*/\n\nexport enum Exploit {\n Bypass = \"Bypass\",\n PrototypeTampering = \"PrototypeTampering\",\n Unclickable = \"Unclickable\",\n UndocumentedFunctionCall = \"UndocumentedFunctionCall\",\n TimeCompression = \"TimeCompression\",\n RealityAlteration = \"RealityAlteration\",\n N00dles = \"N00dles\",\n YoureNotMeantToAccessThis = \"YoureNotMeantToAccessThis\",\n TrueRecursion = \"TrueRecursion\",\n INeedARainbow = \"INeedARainbow\",\n // To the players reading this. Yes you're supposed to add EditSaveFile by\n // editing your save file, yes you could add them all, no we don't care\n // that's not the point.\n EditSaveFile = \"EditSaveFile\",\n}\n\nconst names: {\n [key: string]: string;\n} = {\n Bypass: \"by circumventing the ram cost of document.\",\n EditSaveFile: \"by editing your save file.\",\n PrototypeTampering: \"by tampering with Numbers prototype.\",\n TimeCompression: \"by compressing time.\",\n Unclickable: \"by clicking the unclickable.\",\n UndocumentedFunctionCall: \"by looking beyond the documentation.\",\n RealityAlteration: \"by altering reality to suit your whims.\",\n N00dles: \"by harnessing the power of the n00dles.\",\n YoureNotMeantToAccessThis: \"by accessing the dev menu.\",\n TrueRecursion: \"by truly recursing.\",\n INeedARainbow: \"by using the power of the rainbow.\",\n};\n\nexport function ExploitName(exploit: string): string {\n return names[exploit];\n}\n\nexport function sanitizeExploits(exploits: Exploit[]): Exploit[] {\n exploits = exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));\n return [...new Set(exploits)];\n}\n","import { loadAliases, loadGlobalAliases, Aliases, GlobalAliases } from \"./Alias\";\nimport { Companies, loadCompanies } from \"./Company/Companies\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, loadFactions } from \"./Faction/Factions\";\nimport { loadAllGangs, AllGangs } from \"./Gang/AllGangs\";\nimport { loadMessages, initMessages, Messages } from \"./Message/MessageHelpers\";\nimport { Player, loadPlayer } from \"./Player\";\nimport { saveAllServers, loadAllServers, GetAllServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { loadStockMarket, StockMarket } from \"./StockMarket/StockMarket\";\nimport { staneksGift, loadStaneksGift } from \"./CotMG/Helper\";\n\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nimport * as ExportBonus from \"./ExportBonus\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"./utils/JSONReviver\";\nimport { save } from \"./db\";\nimport { v1APIBreak } from \"./utils/v1APIBreak\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { PlayerOwnedAugmentation } from \"./Augmentation/PlayerOwnedAugmentation\";\nimport { LocationName } from \"./Locations/data/LocationNames\";\nimport { SxProps } from \"@mui/system\";\nimport { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { pushGameSaved } from \"./Electron\";\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nexport interface SaveData {\n playerIdentifier: string;\n fileName: string;\n save: string;\n savedOn: number;\n}\n\nexport interface ImportData {\n base64: string;\n parsed: any;\n playerData?: ImportPlayerData;\n}\n\nexport interface ImportPlayerData {\n identifier: string;\n lastSave: number;\n totalPlaytime: number;\n\n money: number;\n hacking: number;\n\n augmentations: number;\n factions: number;\n achievements: number;\n\n bitNode: number;\n bitNodeLevel: number;\n sourceFiles: number;\n}\n\nclass BitburnerSaveObject {\n PlayerSave = \"\";\n AllServersSave = \"\";\n CompaniesSave = \"\";\n FactionsSave = \"\";\n AliasesSave = \"\";\n GlobalAliasesSave = \"\";\n MessagesSave = \"\";\n StockMarketSave = \"\";\n SettingsSave = \"\";\n VersionSave = \"\";\n AllGangsSave = \"\";\n LastExportBonus = \"\";\n StaneksGiftSave = \"\";\n\n getSaveString(excludeRunningScripts = false): string {\n this.PlayerSave = JSON.stringify(Player);\n\n this.AllServersSave = saveAllServers(excludeRunningScripts);\n this.CompaniesSave = JSON.stringify(Companies);\n this.FactionsSave = JSON.stringify(Factions);\n this.AliasesSave = JSON.stringify(Aliases);\n this.GlobalAliasesSave = JSON.stringify(GlobalAliases);\n this.MessagesSave = JSON.stringify(Messages);\n this.StockMarketSave = JSON.stringify(StockMarket);\n this.SettingsSave = JSON.stringify(Settings);\n this.VersionSave = JSON.stringify(CONSTANTS.VersionNumber);\n this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);\n this.StaneksGiftSave = JSON.stringify(staneksGift);\n\n if (Player.inGang()) {\n this.AllGangsSave = JSON.stringify(AllGangs);\n }\n const saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n\n return saveString;\n }\n\n saveGame(emitToastEvent = true): Promise {\n const savedOn = new Date().getTime();\n Player.lastSave = savedOn;\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n return new Promise((resolve, reject) => {\n save(saveString)\n .then(() => {\n const saveData: SaveData = {\n playerIdentifier: Player.identifier,\n fileName: this.getSaveFileName(),\n save: saveString,\n savedOn,\n };\n pushGameSaved(saveData);\n\n if (emitToastEvent) {\n SnackbarEvents.emit(\"Game Saved!\", \"info\", 2000);\n }\n return resolve();\n })\n .catch((err) => {\n console.error(err);\n return reject();\n });\n });\n }\n\n getSaveFileName(isRecovery = false): string {\n // Save file name is based on current timestamp and BitNode\n const epochTime = Math.round(Date.now() / 1000);\n const bn = Player.bitNodeN;\n let filename = `bitburnerSave_${epochTime}_BN${bn}x${SourceFileFlags[bn]}.json`;\n if (isRecovery) filename = \"RECOVERY\" + filename;\n return filename;\n }\n\n exportGame(): void {\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n const filename = this.getSaveFileName();\n download(filename, saveString);\n }\n\n importGame(base64Save: string, reload = true): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n return save(base64Save).then(() => {\n if (reload) setTimeout(() => location.reload(), 1000);\n return Promise.resolve();\n });\n }\n\n getImportStringFromFile(files: FileList | null): Promise {\n if (files === null) return Promise.reject(new Error(\"No file selected\"));\n const file = files[0];\n if (!file) return Promise.reject(new Error(\"Invalid file selected\"));\n\n const reader = new FileReader();\n const promise: Promise = new Promise((resolve, reject) => {\n reader.onload = function (this: FileReader, e: ProgressEvent) {\n const target = e.target;\n if (target === null) {\n return reject(new Error(\"Error importing file\"));\n }\n const result = target.result;\n if (typeof result !== \"string\") {\n return reject(new Error(\"FileReader event was not type string\"));\n }\n const contents = result;\n resolve(contents);\n };\n });\n reader.readAsText(file);\n return promise;\n }\n\n async getImportDataFromString(base64Save: string): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n\n let newSave;\n try {\n newSave = window.atob(base64Save);\n newSave = newSave.trim();\n } catch (error) {\n console.error(error); // We'll handle below\n }\n\n if (!newSave || newSave === \"\") {\n return Promise.reject(new Error(\"Save game had not content or was not base64 encoded\"));\n }\n\n let parsedSave;\n try {\n parsedSave = JSON.parse(newSave);\n } catch (error) {\n console.log(error); // We'll handle below\n }\n\n if (!parsedSave || parsedSave.ctor !== \"BitburnerSaveObject\" || !parsedSave.data) {\n return Promise.reject(new Error(\"Save game did not seem valid\"));\n }\n\n const data: ImportData = {\n base64: base64Save,\n parsed: parsedSave,\n };\n\n const importedPlayer = PlayerObject.fromJSON(JSON.parse(parsedSave.data.PlayerSave));\n\n const playerData: ImportPlayerData = {\n identifier: importedPlayer.identifier,\n lastSave: importedPlayer.lastSave,\n totalPlaytime: importedPlayer.totalPlaytime,\n\n money: importedPlayer.money,\n hacking: importedPlayer.hacking,\n\n augmentations: importedPlayer.augmentations?.reduce((total, current) => (total += current.level), 0) ?? 0,\n factions: importedPlayer.factions?.length ?? 0,\n achievements: importedPlayer.achievements?.length ?? 0,\n\n bitNode: importedPlayer.bitNodeN,\n bitNodeLevel: importedPlayer.sourceFileLvl(Player.bitNodeN) + 1,\n sourceFiles: importedPlayer.sourceFiles?.reduce((total, current) => (total += current.lvl), 0) ?? 0,\n };\n\n data.playerData = playerData;\n return Promise.resolve(data);\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BitburnerSaveObject\", this);\n }\n\n static fromJSON(value: { data: any }): BitburnerSaveObject {\n return Generic_fromJSON(BitburnerSaveObject, value.data);\n }\n}\n\n// Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\nfunction evaluateVersionCompatibility(ver: string | number): void {\n // We have to do this because ts won't let us otherwise\n const anyPlayer = Player as any;\n if (typeof ver === \"string\") {\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 (anyPlayer.companyPosition != null && typeof anyPlayer.companyPosition !== \"string\") {\n anyPlayer.companyPosition = anyPlayer.companyPosition.data.positionName;\n if (anyPlayer.companyPosition == null) {\n anyPlayer.companyPosition = \"\";\n }\n }\n\n // The \"companyName\" property of all Companies is renamed to \"name\"\n for (const companyName of Object.keys(Companies)) {\n const company: any = Companies[companyName];\n if (company.name == 0 && company.companyName != null) {\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n const pos: any = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n company.companyPositions = pos;\n }\n }\n }\n\n // This version allowed players to hold multiple jobs\n if (ver < \"0.43.0\") {\n if (anyPlayer.companyName !== \"\" && anyPlayer.companyPosition != null && anyPlayer.companyPosition !== \"\") {\n anyPlayer.jobs[anyPlayer.companyName] = anyPlayer.companyPosition;\n }\n\n delete anyPlayer.companyPosition;\n }\n if (ver < \"0.56.0\") {\n for (const q of anyPlayer.queuedAugmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n for (const q of anyPlayer.augmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n if (ver < \"0.56.1\") {\n if (anyPlayer.bladeburner === 0) {\n anyPlayer.bladeburner = null;\n }\n if (anyPlayer.gang === 0) {\n anyPlayer.gang = null;\n }\n if (anyPlayer.corporation === 0) {\n anyPlayer.corporation = null;\n }\n // convert all Messages to just filename to save space.\n const home = anyPlayer.getHomeComputer();\n for (let i = 0; i < home.messages.length; i++) {\n if (home.messages[i].filename) {\n home.messages[i] = home.messages[i].filename;\n }\n }\n }\n if (ver < \"0.58.0\") {\n const changes: [RegExp, string][] = [\n [/getStockSymbols/g, \"stock.getSymbols\"],\n [/getStockPrice/g, \"stock.getPrice\"],\n [/getStockAskPrice/g, \"stock.getAskPrice\"],\n [/getStockBidPrice/g, \"stock.getBidPrice\"],\n [/getStockPosition/g, \"stock.getPosition\"],\n [/getStockMaxShares/g, \"stock.getMaxShares\"],\n [/getStockPurchaseCost/g, \"stock.getPurchaseCost\"],\n [/getStockSaleGain/g, \"stock.getSaleGain\"],\n [/buyStock/g, \"stock.buy\"],\n [/sellStock/g, \"stock.sell\"],\n [/shortStock/g, \"stock.short\"],\n [/sellShort/g, \"stock.sellShort\"],\n [/placeOrder/g, \"stock.placeOrder\"],\n [/cancelOrder/g, \"stock.cancelOrder\"],\n [/getOrders/g, \"stock.getOrders\"],\n [/getStockVolatility/g, \"stock.getVolatility\"],\n [/getStockForecast/g, \"stock.getForecast\"],\n [/purchase4SMarketData/g, \"stock.purchase4SMarketData\"],\n [/purchase4SMarketDataTixApi/g, \"stock.purchase4SMarketDataTixApi\"],\n ];\n function convert(code: string): string {\n for (const change of changes) {\n code = code.replace(change[0], change[1]);\n }\n return code;\n }\n for (const server of GetAllServers()) {\n for (const script of server.scripts) {\n script.code = convert(script.code);\n }\n }\n }\n v1APIBreak();\n ver = 1;\n }\n if (typeof ver === \"number\") {\n if (ver < 2) {\n // Give 10 neuroflux because v1 API break.\n const nf = Player.augmentations.find((a) => a.name === AugmentationNames.NeuroFluxGovernor);\n if (nf) {\n nf.level += 10;\n } else {\n const nf = new PlayerOwnedAugmentation(AugmentationNames.NeuroFluxGovernor);\n nf.level = 10;\n Player.augmentations.push(nf);\n }\n Player.reapplyAllAugmentations(true);\n Player.reapplyAllSourceFiles();\n }\n if (ver < 3) {\n anyPlayer.money = parseFloat(anyPlayer.money);\n if (anyPlayer.corporation) {\n anyPlayer.corporation.funds = parseFloat(anyPlayer.corporation.funds);\n anyPlayer.corporation.revenue = parseFloat(anyPlayer.corporation.revenue);\n anyPlayer.corporation.expenses = parseFloat(anyPlayer.corporation.expenses);\n\n for (let i = 0; i < anyPlayer.corporation.divisions.length; ++i) {\n const ind = anyPlayer.corporation.divisions[i];\n ind.lastCycleRevenue = parseFloat(ind.lastCycleRevenue);\n ind.lastCycleExpenses = parseFloat(ind.lastCycleExpenses);\n ind.thisCycleRevenue = parseFloat(ind.thisCycleRevenue);\n ind.thisCycleExpenses = parseFloat(ind.thisCycleExpenses);\n }\n }\n }\n if (ver < 9) {\n if (StockMarket.hasOwnProperty(\"Joes Guns\")) {\n const s = StockMarket[\"Joes Guns\"];\n delete StockMarket[\"Joes Guns\"];\n StockMarket[LocationName.Sector12JoesGuns] = s;\n }\n }\n if (ver < 10) {\n // Augmentation name was changed in 0.56.0 but sleeves aug list was missed.\n if (anyPlayer.sleeves && anyPlayer.sleeves.length > 0) {\n for (const sleeve of anyPlayer.sleeves) {\n if (!sleeve.augmentations || sleeve.augmentations.length === 0) continue;\n for (const augmentation of sleeve.augmentations) {\n if (augmentation.name !== \"Graphene BranchiBlades Upgrade\") continue;\n augmentation.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n }\n if (ver < 12) {\n if (anyPlayer.resleeves !== undefined) {\n delete anyPlayer.resleeves;\n }\n }\n }\n}\n\nfunction loadGame(saveString: string): boolean {\n createScamUpdateText();\n if (!saveString) return false;\n saveString = decodeURIComponent(escape(atob(saveString)));\n\n const saveObj = JSON.parse(saveString, Reviver);\n\n loadPlayer(saveObj.PlayerSave);\n loadAllServers(saveObj.AllServersSave);\n loadCompanies(saveObj.CompaniesSave);\n loadFactions(saveObj.FactionsSave);\n\n if (saveObj.hasOwnProperty(\"StaneksGiftSave\")) {\n loadStaneksGift(saveObj.StaneksGiftSave);\n } else {\n console.warn(`Could not load Staneks Gift from save`);\n loadStaneksGift(\"\");\n }\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n loadAliases(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n loadAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n loadAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n loadGlobalAliases(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n loadGlobalAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n loadGlobalAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n loadMessages(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n initMessages();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n initMessages();\n }\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n loadStockMarket(saveObj.StockMarketSave);\n } catch (e) {\n loadStockMarket(\"\");\n }\n } else {\n loadStockMarket(\"\");\n }\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n Settings.load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n Settings.init();\n }\n } else {\n Settings.init();\n }\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n ExportBonus.setLastExportBonus(JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n ExportBonus.setLastExportBonus(new Date().getTime());\n console.error(\"ERROR: Failed to parse last export bonus Settings \" + err);\n }\n }\n if (Player.inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n loadAllGangs(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n const ver = JSON.parse(saveObj.VersionSave, Reviver);\n evaluateVersionCompatibility(ver);\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver !== CONSTANTS.VersionNumber) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n return true;\n}\n\nfunction createScamUpdateText(): void {\n if (navigator.userAgent.indexOf(\"wv\") !== -1 && navigator.userAgent.indexOf(\"Chrome/\") !== -1) {\n setInterval(() => {\n dialogBoxCreate(\"SCAM ALERT. This app is not official and you should uninstall it.\");\n }, 1000);\n }\n}\n\nconst resets: SxProps = {\n \"& h1, & h2, & h3, & h4, & p, & a, & ul\": {\n margin: 0,\n color: Settings.theme.primary,\n whiteSpace: \"initial\",\n },\n \"& ul\": {\n paddingLeft: \"1.5em\",\n lineHeight: 1.5,\n },\n};\n\nfunction createNewUpdateText(): void {\n setTimeout(\n () =>\n dialogBoxCreate(\n \"New update!
\" +\n \"Please report any bugs/issues through the github repository \" +\n \"or the Bitburner subreddit (reddit.com/r/bitburner).

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

\" +\n CONSTANTS.LatestUpdate,\n resets,\n );\n}\n\nfunction download(filename: string, content: string): void {\n const file = new Blob([content], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n 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 setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n}\n\nReviver.constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nexport { saveObject, loadGame, download };\n\nconst saveObject = new BitburnerSaveObject();\n","import { isString } from \"./utils/helpers/isString\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\n\nexport function netscriptDelay(time: number, workerScript: WorkerScript): Promise {\n if (workerScript.delayReject) workerScript.delayReject();\n return new Promise(function (resolve, reject) {\n workerScript.delay = window.setTimeout(() => {\n workerScript.delay = null;\n workerScript.delayReject = undefined;\n\n if (workerScript.env.stopFlag) reject(workerScript);\n else resolve();\n }, time);\n workerScript.delayReject = reject;\n });\n}\n\nexport function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): string {\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${workerScript.hostname}`);\n }\n\n for (const scriptUrl of workerScript.scriptRef.dependencies) {\n // Return just the original msg if it's nullish so that we don't get a workerscript error\n msg = msg?.replace(new RegExp(scriptUrl.url, \"g\"), scriptUrl.filename) ?? msg;\n }\n\n return \"|DELIMITER|\" + server.hostname + \"|DELIMITER|\" + workerScript.name + \"|DELIMITER|\" + msg;\n}\n\nexport function resolveNetscriptRequestedThreads(\n workerScript: WorkerScript,\n functionName: string,\n requestedThreads: number,\n): number {\n const threads = workerScript.scriptRef.threads;\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n const requestedThreadsAsInt = requestedThreads | 0;\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid thread count passed to ${functionName}: ${requestedThreads}. Threads must be a positive number.`,\n );\n }\n if (requestedThreadsAsInt > threads) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Too many threads requested by ${functionName}. Requested: ${requestedThreads}. Has: ${threads}.`,\n );\n }\n return requestedThreadsAsInt;\n}\n\nexport function isScriptErrorMessage(msg: string): boolean {\n if (!isString(msg)) {\n return false;\n }\n const splitMsg = msg.split(\"|DELIMITER|\");\n return splitMsg.length == 4;\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Money } from \"./Money\";\n\nexport function MoneyRate({ money }: { money: number }): JSX.Element {\n return ;\n}\n","import { codingContractTypesMetadata, DescriptionFunc, GeneratorFunc, SolverFunc } from \"./data/codingcontracttypes\";\n\nimport { IMap } from \"./types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\nimport { CodingContractEvent } from \"./ui/React/CodingContractModal\";\n\n/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */\n\n/* Represents different types of problems that a Coding Contract can have */\nclass CodingContractType {\n /**\n * Function that generates a description of the problem\n */\n desc: DescriptionFunc;\n\n /**\n * Number that generally represents the problem's difficulty. Bigger numbers = harder\n */\n difficulty: number;\n\n /**\n * A function that randomly generates a valid 'data' for the problem\n */\n generate: GeneratorFunc;\n\n /**\n * Name of the type of problem\n */\n name: string;\n\n /**\n * The maximum number of tries the player gets on this kind of problem before it self-destructs\n */\n numTries: number;\n\n /**\n * Stores a function that checks if the provided answer is correct\n */\n solver: SolverFunc;\n\n constructor(\n name: string,\n desc: DescriptionFunc,\n gen: GeneratorFunc,\n solver: SolverFunc,\n diff: number,\n numTries: number,\n ) {\n this.name = name;\n this.desc = desc;\n this.generate = gen;\n this.solver = solver;\n this.difficulty = diff;\n this.numTries = numTries;\n }\n}\n\n/* Contract Types */\n// tslint:disable-next-line\nexport const CodingContractTypes: IMap = {};\n\nfor (const md of codingContractTypesMetadata) {\n // tslint:disable-next-line\n CodingContractTypes[md.name] = new CodingContractType(\n md.name,\n md.desc,\n md.gen,\n md.solver,\n md.difficulty,\n md.numTries,\n );\n}\n\n/**\n * Enum representing the different types of rewards a Coding Contract can give\n */\nexport enum CodingContractRewardType {\n FactionReputation,\n FactionReputationAll,\n CompanyReputation,\n Money, // This must always be the last reward type\n}\n\n/**\n * Enum representing the result when trying to solve the Contract\n */\nexport enum CodingContractResult {\n Success,\n Failure,\n Cancelled,\n}\n\n/**\n * A class that represents the type of reward a contract gives\n */\nexport interface ICodingContractReward {\n /* Name of Company/Faction name for reward, if applicable */\n name?: string;\n type: CodingContractRewardType;\n}\n\n/**\n * A Coding Contract is a file that poses a programming-related problem to the Player.\n * The player receives a reward if the problem is solved correctly\n */\nexport class CodingContract {\n /* Relevant data for the contract's problem */\n data: any;\n\n /* Contract's filename */\n fn: string;\n\n /* Describes the reward given if this Contract is solved. The reward is actually\n processed outside of this file */\n reward: ICodingContractReward | null;\n\n /* Number of times the Contract has been attempted */\n tries = 0;\n\n /* String representing the contract's type. Must match type in ContractTypes */\n type: string;\n\n constructor(fn = \"\", type = \"Find Largest Prime Factor\", reward: ICodingContractReward | null = null) {\n this.fn = fn;\n if (!this.fn.endsWith(\".cct\")) {\n this.fn += \".cct\";\n }\n\n // tslint:disable-next-line\n if (CodingContractTypes[type] == null) {\n throw new Error(`Error: invalid contract type: ${type} please contact developer`);\n }\n\n this.type = type;\n this.data = CodingContractTypes[type].generate();\n this.reward = reward;\n }\n\n getData(): any {\n return this.data;\n }\n\n getDescription(): string {\n return CodingContractTypes[this.type].desc(this.data);\n }\n\n getDifficulty(): number {\n return CodingContractTypes[this.type].difficulty;\n }\n\n getMaxNumTries(): number {\n return CodingContractTypes[this.type].numTries;\n }\n\n getType(): string {\n return CodingContractTypes[this.type].name;\n }\n\n isSolution(solution: string): boolean {\n return CodingContractTypes[this.type].solver(this.data, solution);\n }\n\n /**\n * Creates a popup to prompt the player to solve the problem\n */\n async prompt(): Promise {\n return new Promise((resolve) => {\n const props = {\n c: this,\n onClose: () => {\n resolve(CodingContractResult.Cancelled);\n },\n onAttempt: (val: string) => {\n if (this.isSolution(val)) {\n resolve(CodingContractResult.Success);\n } else {\n resolve(CodingContractResult.Failure);\n }\n },\n };\n CodingContractEvent.emit(props);\n });\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"CodingContract\", this);\n }\n\n /**\n * Initiatizes a CodingContract from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): CodingContract {\n return Generic_fromJSON(CodingContract, value.data);\n }\n}\n\nReviver.constructors.CodingContract = CodingContract;\n","export enum OrderTypes {\n LimitBuy = \"Limit Buy Order\",\n LimitSell = \"Limit Sell Order\",\n StopBuy = \"Stop Buy Order\",\n StopSell = \"Stop Sell Order\",\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n reputation: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Reputation({ reputation }: { reputation: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n \n {typeof reputation === \"number\" ? numeralWrapper.formatReputation(reputation) : reputation}\n \n );\n}\n","import { Reviver } from \"../utils/JSONReviver\";\n\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { StaneksGift } from \"./StaneksGift\";\n\nexport let staneksGift: IStaneksGift = new StaneksGift();\n\nexport function loadStaneksGift(saveString: string): void {\n if (saveString) {\n staneksGift = JSON.parse(saveString, Reviver);\n } else {\n staneksGift = new StaneksGift();\n }\n}\n","import React, { useState } from \"react\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n label: string;\n placeholder: string;\n add: (x: number) => void;\n subtract: (x: number) => void;\n tons: () => void;\n reset: () => void;\n}\n\nexport function Adjuster(props: IProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setValue(\"\");\n else setValue(parseFloat(event.target.value));\n }\n\n const { label, placeholder, add, subtract, reset, tons } = props;\n return (\n <>\n \n \n \n \n \n \n \n add(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n ),\n endAdornment: (\n <>\n \n subtract(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n \n \n \n \n \n ),\n }}\n />\n \n );\n}\n","// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\nimport { Research } from \"../Research\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { ResearchTree, Node } from \"../ResearchTree\";\n\nfunction makeNode(name: string): Node {\n const research: Research | null = ResearchMap[name];\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new Node({ text: research.name, cost: research.cost });\n}\n\n// Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\nfunction createBaseResearchTreeNodes(): Node {\n const rootNode: Node = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew: Node = makeNode(\"AutoBrew\");\n const autoParty: Node = makeNode(\"AutoPartyManager\");\n const autoDrugs: Node = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing: Node = makeNode(\"Bulk Purchasing\");\n const cph4: Node = makeNode(\"CPH4 Injections\");\n const drones: Node = makeNode(\"Drones\");\n const dronesAssembly: Node = makeNode(\"Drones - Assembly\");\n const dronesTransport: Node = makeNode(\"Drones - Transport\");\n const goJuice: Node = makeNode(\"Go-Juice\");\n const hrRecruitment: Node = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining: Node = makeNode(\"HRBuddy-Training\");\n const joywire: Node = makeNode(\"JoyWire\");\n const marketta1: Node = makeNode(\"Market-TA.I\");\n const marketta2: Node = makeNode(\"Market-TA.II\");\n const overclock: Node = makeNode(\"Overclock\");\n const scAssemblers: Node = makeNode(\"Self-Correcting Assemblers\");\n const stimu: Node = makeNode(\"Sti.mu\");\n\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n\n hrRecruitment.addChild(hrTraining);\n\n marketta1.addChild(marketta2);\n\n overclock.addChild(stimu);\n\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\n return rootNode;\n}\n\nexport function getBaseResearchTreeCopy(): ResearchTree {\n const baseResearchTree: ResearchTree = new ResearchTree();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n\n return baseResearchTree;\n}\n\n// Base Research Tree for Industry's that make products\nexport function getProductIndustryResearchTreeCopy(): ResearchTree {\n const researchTree: ResearchTree = new ResearchTree();\n const root = createBaseResearchTreeNodes();\n\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\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n\n researchTree.setRoot(root);\n\n return researchTree;\n}\n","/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\nfunction uuidv4(): string {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport class EventEmitter {\n subscribers: { [key: string]: (...args: [...T]) => void | undefined } = {};\n\n subscribe(s: (...args: [...T]) => void): () => void {\n let uuid = uuidv4();\n while (this.subscribers[uuid] !== undefined) uuid = uuidv4();\n this.subscribers[uuid] = s;\n\n return () => {\n delete this.subscribers[uuid];\n };\n }\n\n emit(...args: [...T]): void {\n for (const s in this.subscribers) {\n const sub = this.subscribers[s];\n if (sub === undefined) continue;\n\n sub(...args);\n }\n }\n}\n","import { GetServer, createUniqueRandomIp, ipExists } from \"./AllServers\";\nimport { Server, IConstructorParams } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { calculateServerGrowth } from \"./formulas/grow\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Programs } from \"../Programs/Programs\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\n\nimport { isValidNumber } from \"../utils/helpers/isValidNumber\";\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\nexport function safetlyCreateUniqueServer(params: IConstructorParams): Server {\n let hostname: string = params.hostname.replace(/ /g, `-`);\n\n if (params.ip != null && ipExists(params.ip)) {\n params.ip = createUniqueRandomIp();\n }\n\n if (GetServer(hostname) != null) {\n hostname = `${hostname}-0`;\n\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n for (let i = 0; i < 200; ++i) {\n hostname = hostname.replace(/-[0-9]+$/, `-${i}`);\n if (GetServer(hostname) == null) {\n break;\n }\n }\n }\n\n params.hostname = hostname;\n return new Server(params);\n}\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 */\nexport function numCycleForGrowth(server: Server, growth: number, p: IPlayer, cores = 1): number {\n let ajdGrowthRate = 1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty;\n if (ajdGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n ajdGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n\n const coreBonus = 1 + (cores - 1) / 16;\n const cycles =\n Math.log(growth) /\n (Math.log(ajdGrowthRate) *\n p.hacking_grow_mult *\n serverGrowthPercentage *\n BitNodeMultipliers.ServerGrowthRate *\n coreBonus);\n\n return cycles;\n}\n\n/**\n * Replacement function for the above function that accounts for the +$1/thread functionality of grow\n * with parameters that are the same (for compatibility), but functionality is slightly different.\n * This function can ONLY be used to calculate the threads needed for a given server in its current state,\n * and so wouldn't be appropriate to use for formulas.exe or ns.growthAnalyze (as those are meant to\n * provide theoretical scenarios, or inverse hack respectively). Players COULD use this function with a\n * custom server object with the correct moneyAvailable and moneyMax amounts, combined with a multiplier\n * correctly calculated to bring the server to a new moneyAvailable (ie, passing in moneyAvailable 300 and x2\n * when you want the number of threads required to grow that particular server from 300 to 600), and this\n * function would pass back the correct number of threads. But the key thing is that it doesn't just\n * inverse/undo a hack (since the amount hacked from/to matters, not just the multiplier).\n * The above is also a rather unnecessarily obtuse way of thinking about it for a formulas.exe type of\n * application, so another function with different parameters is provided for that case below this one.\n * Instead this function is meant to hand-off from the old numCycleForGrowth function to the new one\n * where used internally for pro-rating or the like. Where you have applied a grow and want to determine\n * how many threads were needed for THAT SPECIFIC grow case using a multiplier.\n * Ideally, this function, and the original function above will be depreciated to use the methodology\n * and inputs of the new function below this one. Even for internal cases (it's actually easier to do so).\n * @param server - Server being grown\n * @param growth - How much the server money is expected to be multiplied by (e.g. 1.5 for *1.5 / +50%)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthTransition(server: Server, growth: number, p: IPlayer, cores = 1): number {\n return numCycleForGrowthCorrected(server, server.moneyAvailable * growth, server.moneyAvailable, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server from one $amount to a higher $amount\n * (ie, how many threads to grow this server from $200 to $600 for example). Used primarily for a formulas (or possibly growthAnalyze)\n * type of application. It lets you \"theorycraft\" and easily ask what-if type questions. It's also the one that implements the\n * main thread calculation algorithm, and so is the function all helper functions should call.\n * It protects the inputs (so putting in INFINITY for targetMoney will use moneyMax, putting in a negative for start will use 0, etc.)\n * @param server - Server being grown\n * @param targetMoney - How much you want the server grown TO (not by), for instance, to grow from 200 to 600, input 600\n * @param startMoney - How much you are growing the server from, for instance, to grow from 200 to 600, input 200\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthCorrected(server: Server, targetMoney: number, startMoney: number, p: IPlayer, cores = 1): number {\n\tif (startMoney < 0) { startMoney = 0; } // servers \"can't\" have less than 0 dollars on them\n\tif (targetMoney > server.moneyMax) { targetMoney = server.moneyMax; } // can't grow a server to more than its moneyMax\n\tif (targetMoney <= startMoney) { return 0; } // no growth --> no threads\n\n\t// exponential base adjusted by security\n\tconst adjGrowthRate = (1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty);\n\tconst exponentialBase = Math.min(adjGrowthRate, CONSTANTS.ServerMaxGrowthRate); // cap growth rate\n\n\t// total of all grow thread multipliers\n\tconst serverGrowthPercentage = server.serverGrowth / 100.0;\n\tconst coreMultiplier = 1 + ((cores - 1) / 16);\n\tconst threadMultiplier = serverGrowthPercentage * p.hacking_grow_mult * coreMultiplier * BitNodeMultipliers.ServerGrowthRate;\n\n\t/* To understand what is done below we need to do some math. I hope the explanation is clear enough.\n\t * First of, the names will be shortened for ease of manipulation:\n\t * n:= targetMoney (n for new), o:= startMoney (o for old), b:= exponentialBase, t:= threadMultiplier, c:= cycles/threads\n\t * c is what we are trying to compute.\n\t *\n\t * After growing, the money on a server is n = (o + c) * b^(c*t)\n\t * c appears in an exponent and outside it, this is usually solved using the productLog/lambert's W special function\n\t * this function will be noted W in the following\n\t * The idea behind lambert's W function is W(x)*exp(W(x)) = x, or in other words, solving for y, y*exp(y) = x, as a function of x\n\t * This function is provided in some advanced math library but we will compute it ourself here.\n\t *\n\t * Let's get back to solving the equation. It cannot be rewrote using W immediately because the base of the exponentiation is b\n\t * b^(c*t) = exp(ln(b)*c*t) (this is how a^b is defined on reals, it matches the definition on integers)\n\t * so n = (o + c) * exp(ln(b)*c*t) , W still cannot be used directly. We want to eliminate the other terms in 'o + c' and 'ln(b)*c*t'.\n\t *\n\t * A change of variable will do. The idea is to add an equation introducing a new variable (w here) in the form c = f(w) (for some f)\n\t * With this equation we will eliminate all references to c, then solve for w and plug the result in the new equation to get c.\n\t * The change of variable performed here should get rid of the unwanted terms mentionned above, c = w/(ln(b)*t) - o should help.\n\t * This change of variable is allowed because whatever the value of c is, there is a value of w such that this equation holds:\n\t * w = (c + o)*ln(b)*t (see how we used the terms we wanted to eliminate in order to build this variable change)\n\t *\n\t * We get n = (o + w/(ln(b)*t) - o) * exp(ln(b)*(w/(ln(b)*t) - o)*t) [ = w/(ln(b)*t) * exp(w - ln(b)*o*t) ]\n\t * The change of variable exposed exp(w - o*ln(b)*t), we can rewrite that with exp(a - b) = exp(a)/exp(b) to isolate 'w*exp(w)'\n\t * n = w/(ln(b)*t) * exp(w)/exp(ln(b)*o*t) [ = w*exp(w) / (ln(b) * t * b^(o*t)) ]\n\t * Almost there, we just need to cancel the denominator on the right side of the equation:\n\t * n * ln(b) * t * b^(o*t) = w*exp(w), Thus w = W(n * ln(b) * t * b^(o*t))\n\t * Finally we invert the variable change: c = W(n * ln(b) * t * b^(o*t))/(ln(b)*t) - o\n\t *\n\t * There is still an issue left: b^(o*t) doesn't fit inside a double precision float\n\t * because the typical amount of money on servers is arround 10^6~10^9\n\t * We need to get an approximation of W without computing the power when o is huge\n\t * Thankfully an approximation giving ~30% error uses log immediately so we will use\n\t * W(n * ln(b) * t * b^(o*t)) ~= log(n * ln(b) * t * b^(o*t)) = log(n * ln(b) * t) + log(exp(ln(b) * o * t))\n\t * = log(n * ln(b) * t) + ln(b) * o * t\n\t * (thanks to Drak for the grow formula, f4113nb34st and Wolfram Alpha for the rewrite, dwRchyngqxs for the explanation)\n\t */\n\tconst x = threadMultiplier * Math.log(exponentialBase);\n\tconst y = startMoney * x + Math.log(targetMoney * x);\n\t/* Code for the approximation of lambert's W function is adapted from\n\t * https://git.savannah.gnu.org/cgit/gsl.git/tree/specfunc/lambert.c\n\t * using the articles [1] https://doi.org/10.1007/BF02124750 (algorithm above)\n\t * and [2] https://doi.org/10.1145/361952.361970 (initial approximation when x < 2.5)\n\t */\n\tlet w;\n\tif (y < Math.log(2.5)) {\n\t\t/* exp(y) can be safely computed without overflow.\n\t\t * The relative error on the result is better when exp(y) < 2.5\n\t\t * using Padé rational fraction approximation [2](5)\n\t\t */\n\t\tconst ey = Math.exp(y);\n\t\tw = (ey + 4/3 * ey*ey) / (1 + 7/3 * ey + 5/6 * ey*ey);\n\t} else {\n\t\t/* obtain initial approximation from rough asymptotic [1](4.18)\n\t\t * w = y [- log y when 0 <= y]\n\t\t */\n\t\tw = y;\n\t\tif (y > 0) w -= Math.log(y);\n\t}\n\tlet cycles = w/x - startMoney;\n\n\t/* Iterative refinement, the goal is to correct c until |(o + c) * b^(c*t) - n| < 1\n\t * or the correction on the approximation is less than 1\n\t * The Newton-Raphson method will be used, this method is a classic to find roots of functions\n\t * (given f, find c such that f(c) = 0).\n\t *\n\t * The idea of this method is to take the horizontal position at which the horizontal axis\n\t * intersects with of the tangent of the function's curve as the next approximation.\n\t * It is equivalent to treating the curve as a line (it is called a first order approximation)\n\t * If the current approximation is c then the new approximated value is c - f(c)/f'(c)\n\t * (where f' is the derivative of f).\n\t *\n\t * In our case f(c) = (o + c) * b^(c*t) - n, f'(c) = d((o + c) * b^(c*t) - n)/dc\n\t * = (ln(b)*t * (c + o) + 1) * b^(c*t)\n\t * And the update step is c[new] = c[old] - ((o + c) * b^(c*t) - n)/((ln(b)*t * (o + c) + 1) * b^(c*t))\n\t *\n\t * The main question to ask when using this method is \"does it converges?\"\n\t * (are the approximations getting better?), if it does then it does quickly.\n\t * DOES IT CONVERGES? In the present case it does. The reason why doesn't help explaining the algorithm.\n\t * If you are intrested then check out the wikipedia page.\n\t */\n\tconst bt = exponentialBase**threadMultiplier;\n\tlet corr = Infinity;\n\t// Two sided error because we do not want to get stuck if the error stays on the wrong side\n\tdo {\n\t\t// c should be above 0 so Halley's method can't be used, we have to stick to Newton-Raphson\n\t\tconst bct = bt**cycles;\n\t\tconst opc = startMoney + cycles;\n\t\tconst diff = opc * bct - targetMoney;\n\t\tcorr = diff / (opc * x + 1.0) / bct\n\t\tcycles -= corr;\n\t} while (Math.abs(corr) >= 1)\n\t/* c is now within +/- 1 of the exact result.\n\t * We want the ceiling of the exact result, so the floor if the approximation is above,\n\t * the ceiling if the approximation is in the same unit as the exact result,\n\t * and the ceiling + 1 if the approximation is below.\n\t */\n\tconst fca = Math.floor(cycles);\n\tif (targetMoney <= (startMoney + fca)*Math.pow(exponentialBase, fca*threadMultiplier)) {\n\t\treturn fca;\n\t}\n\tconst cca = Math.ceil(cycles);\n\tif (targetMoney <= (startMoney + cca)*Math.pow(exponentialBase, cca*threadMultiplier)) {\n\t\treturn cca;\n\t}\n\treturn cca + 1;\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on a pre-hack money and hackAmt\n * (ie, if you're hacking a server with $1e6 moneyAvail for 60%, this function will tell you how many threads to regrow it\n * A good replacement for the current ns.growthAnalyze if you want players to have more control/responsibility\n * @param server - Server being grown\n * @param hackProp - the proportion of money hacked (total, not per thread, like 0.60 for hacking 60% of available money)\n * @param prehackMoney - how much money the server had before being hacked (like 200000 for hacking a server that had $200000 on it at time of hacking)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed to reverse the described hack\n */\nexport function numCycleForGrowthByHackAmt(server: Server, hackProp: number, prehackMoney: number, p: IPlayer, cores = 1): number{\n\tif (prehackMoney > server.moneyMax) prehackMoney = server.moneyMax;\n\tconst posthackMoney = Math.floor(prehackMoney * Math.min(1, Math.max(0, (1 - hackProp))));\n\treturn numCycleForGrowthCorrected(server, prehackMoney, posthackMoney, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on an expected growth multiplier assuming it will max out\n * (ie, if you expect to grow a server by 60% to reach maxMoney, this function will tell you how many threads to grow it)\n * PROBABLY the best replacement for the current ns.growthAnalyze to maintain existing scripts\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, as a multiple in DECIMAL form (e.g. 1.5 rather than 50). Infinity is acceptable.\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthByMultiplier(server: Server, growth: number, p: IPlayer, cores = 1): number{\n\tif (growth < 1.0) growth = 1.0;\n\tconst targetMoney = server.moneyMax;\n\tconst startingMoney = server.moneyMax / growth;\n\treturn numCycleForGrowthCorrected(server, targetMoney, startingMoney, p, cores);\n}\n\n\n//Applied server growth for a single server. Returns the percentage growth\nexport function processSingleServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n let serverGrowth = calculateServerGrowth(server, threads, p, cores);\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 += 1 * threads; // It can be grown even if it has no money\n server.moneyAvailable *= serverGrowth;\n\n // in case of data corruption\n if (isValidNumber(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // cap at max\n if (isValidNumber(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // if there was any growth at all, increase security\n if (oldMoneyAvailable !== server.moneyAvailable) {\n let usedCycles = numCycleForGrowthCorrected(server, server.moneyAvailable, oldMoneyAvailable, p, cores);\n // Growing increases server security twice as much as hacking\n usedCycles = Math.min(Math.max(0, Math.ceil(usedCycles)), threads);\n server.fortify(2 * CONSTANTS.ServerFortifyAmount * usedCycles);\n }\n return server.moneyAvailable / oldMoneyAvailable;\n}\n\nexport function prestigeHomeComputer(player: IPlayer, homeComp: Server): void {\n const hasBitflume = homeComp.programs.includes(Programs.BitFlume.name);\n\n homeComp.programs.length = 0; //Remove programs\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(Programs.NukeProgram.name);\n if (hasBitflume) {\n homeComp.programs.push(Programs.BitFlume.name);\n }\n\n //Update RAM usage on all scripts\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(player, homeComp.scripts);\n });\n\n homeComp.messages.length = 0; //Remove .lit and .msg files\n homeComp.messages.push(LiteratureNames.HackersStartingHandbook);\n}\n\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\nexport function getServerOnNetwork(server: BaseServer, i: number): BaseServer | null {\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 GetServer(server.serversOnNetwork[i]);\n}\n\nexport function isBackdoorInstalled(server: BaseServer): boolean {\n if (server instanceof Server) {\n return server.backdoorInstalled;\n }\n return false;\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\n\nexport function random(min: number, max: number): number {\n return Math.random() * (max - min) + min;\n}\n\nexport const upArrowSymbol = \"↑\";\nexport const downArrowSymbol = \"↓\";\nexport const leftArrowSymbol = \"←\";\nexport const rightArrowSymbol = \"→\";\n\nexport function getArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.UP_ARROW:\n case KEY.W:\n return upArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return leftArrowSymbol;\n case KEY.DOWN_ARROW:\n case KEY.S:\n return downArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return rightArrowSymbol;\n }\n return \"\";\n}\n\nexport function getInverseArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.DOWN_ARROW:\n case KEY.S:\n return upArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return leftArrowSymbol;\n case KEY.UP_ARROW:\n case KEY.W:\n return downArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return rightArrowSymbol;\n }\n return \"\";\n}\n","export const SkillNames: {\n BladesIntuition: string;\n Cloak: string;\n Marksman: string;\n WeaponProficiency: string;\n ShortCircuit: string;\n DigitalObserver: string;\n Tracer: string;\n Overclock: string;\n Reaper: string;\n EvasiveSystem: string;\n Datamancer: string;\n CybersEdge: string;\n HandsOfMidas: string;\n Hyperdrive: string;\n} = {\n BladesIntuition: \"Blade's Intuition\",\n Cloak: \"Cloak\",\n Marksman: \"Marksman\",\n WeaponProficiency: \"Weapon Proficiency\",\n ShortCircuit: \"Short-Circuit\",\n DigitalObserver: \"Digital Observer\",\n Tracer: \"Tracer\",\n Overclock: \"Overclock\",\n Reaper: \"Reaper\",\n EvasiveSystem: \"Evasive System\",\n Datamancer: \"Datamancer\",\n CybersEdge: \"Cyber's Edge\",\n HandsOfMidas: \"Hands of Midas\",\n Hyperdrive: \"Hyperdrive\",\n};\n","import { Operation, IOperationParams } from \"./Operation\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class BlackOperation extends Operation {\n constructor(params: IOperationParams | null = null) {\n super(params);\n this.count = 1;\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1.5;\n }\n\n getChaosCompetencePenalty(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n getChaosDifficultyBonus(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BlackOperation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(BlackOperation, value.data);\n }\n}\n\nReviver.constructors.BlackOperation = BlackOperation;\n","import React, { useContext } from \"react\";\nimport { IGang } from \"../IGang\";\n\nexport const Context: {\n Gang: React.Context;\n} = {\n Gang: React.createContext({} as IGang),\n};\n\nexport const useGang = (): IGang => useContext(Context.Gang);\n","import React, { useEffect } from \"react\";\nimport { useSnackbar, SnackbarProvider as SB } from \"notistack\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Alert from \"@mui/material/Alert\";\nimport Paper from \"@mui/material/Paper\";\nimport { logBoxBaseZIndex } from \"./LogBoxManager\";\n\ninterface IProps {\n children: React.ReactNode | React.ReactNode[];\n}\n\nconst useStyles = makeStyles(() => ({\n snackbar: {\n // Log popup z-index increments, so let's add a padding to be well above them.\n zIndex: `${logBoxBaseZIndex + 1000} !important` as any,\n\n \"& .MuiAlert-icon\": {\n alignSelf: 'center',\n },\n }\n}));\n\nexport function SnackbarProvider(props: IProps): React.ReactElement {\n const classes = useStyles();\n return (\n \n {props.children}\n \n );\n}\n\nexport const SnackbarEvents = new EventEmitter<[string | React.ReactNode, \"success\" | \"warning\" | \"error\" | \"info\", number]>();\n\nexport function Snackbar(): React.ReactElement {\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\n\n useEffect(() =>\n SnackbarEvents.subscribe((s, variant, duration) => {\n const id = enqueueSnackbar({s}, {\n content: (k, m) => {m},\n variant: variant,\n autoHideDuration: duration,\n onClick: () => closeSnackbar(id),\n })\n }),\n );\n return <>;\n}\n","import { Augmentation } from \"./Augmentation\";\nimport { Augmentations } from \"./Augmentations\";\nimport { PlayerOwnedAugmentation, IPlayerOwnedAugmentation } from \"./PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Player } from \"../Player\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { clearObject } from \"../utils/helpers/clearObject\";\n\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport {\n bladeburnerAugmentations,\n churchOfTheMachineGodAugmentations,\n generalAugmentations,\n initNeuroFluxGovernor,\n initUnstableCircadianModulator,\n} from \"./AugmentationCreator\";\n\nexport function AddToAugmentations(aug: Augmentation): void {\n const name = aug.name;\n Augmentations[name] = aug;\n}\n\nexport function getNextNeuroFluxLevel(): number {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = Player.augmentations[i].level;\n }\n }\n\n // Account for purchased but uninstalled Augmentations\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n return currLevel + 1;\n}\n\nfunction createAugmentations(): void {\n [\n initNeuroFluxGovernor(),\n initUnstableCircadianModulator(),\n ...generalAugmentations,\n ...(factionExists(FactionNames.Bladeburners) ? bladeburnerAugmentations : []),\n ...(factionExists(FactionNames.ChurchOfTheMachineGod) ? churchOfTheMachineGodAugmentations : []),\n ].map(resetAugmentation);\n}\n\nfunction resetFactionAugmentations(): void {\n for (const name of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(name)) {\n Factions[name].augmentations = [];\n }\n }\n}\n\nfunction initAugmentations(): void {\n resetFactionAugmentations();\n clearObject(Augmentations);\n createAugmentations();\n updateAugmentationCosts();\n Player.reapplyAllAugmentations();\n}\n\nfunction getBaseAugmentationPriceMultiplier(): number {\n return CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n}\nexport function getGenericAugmentationPriceMultiplier(): number {\n return Math.pow(getBaseAugmentationPriceMultiplier(), Player.queuedAugmentations.length);\n}\n\nfunction updateNeuroFluxGovernorCosts(neuroFluxGovernorAugmentation: Augmentation): void {\n let nextLevel = getNextNeuroFluxLevel();\n --nextLevel;\n const multiplier = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n neuroFluxGovernorAugmentation.baseRepRequirement *= multiplier * BitNodeMultipliers.AugmentationRepCost;\n neuroFluxGovernorAugmentation.baseCost *= multiplier * BitNodeMultipliers.AugmentationMoneyCost;\n\n for (let i = 0; i < Player.queuedAugmentations.length - 1; ++i) {\n neuroFluxGovernorAugmentation.baseCost *= getBaseAugmentationPriceMultiplier();\n }\n}\n\nexport function updateAugmentationCosts(): void {\n for (const name of Object.keys(Augmentations)) {\n if (Augmentations.hasOwnProperty(name)) {\n const augmentationToUpdate = Augmentations[name];\n if (augmentationToUpdate.name === AugmentationNames.NeuroFluxGovernor) {\n updateNeuroFluxGovernorCosts(augmentationToUpdate);\n } else {\n augmentationToUpdate.baseCost =\n augmentationToUpdate.startingCost *\n getGenericAugmentationPriceMultiplier() *\n BitNodeMultipliers.AugmentationMoneyCost;\n }\n }\n }\n}\n\n//Resets an Augmentation during (re-initizliation)\nfunction resetAugmentation(aug: Augmentation): void {\n aug.addToFactions(aug.factions);\n const name = aug.name;\n if (augmentationExists(name)) {\n delete Augmentations[name];\n }\n AddToAugmentations(aug);\n}\n\nfunction applyAugmentation(aug: IPlayerOwnedAugmentation, reapply = false): void {\n Augmentations[aug.name].owned = true;\n\n const augObj = Augmentations[aug.name];\n\n // Apply multipliers\n for (const mult of Object.keys(augObj.mults)) {\n const v = Player.getMult(mult) * augObj.mults[mult];\n Player.setMult(mult, v);\n }\n\n // Special logic for NeuroFlux Governor\n if (aug.name === AugmentationNames.NeuroFluxGovernor) {\n if (!reapply) {\n Augmentations[aug.name].level = aug.level;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n Player.augmentations[i].level = aug.level;\n return;\n // break;\n }\n }\n }\n }\n\n // Push onto Player's Augmentation list\n if (!reapply) {\n const ownedAug = new PlayerOwnedAugmentation(aug.name);\n Player.augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations(): boolean {\n if (Player.queuedAugmentations.length == 0) {\n dialogBoxCreate(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n let augmentationList = \"\";\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n const ownedAug = Player.queuedAugmentations[i];\n const aug = Augmentations[ownedAug.name];\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(Player.queuedAugmentations[i]);\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n\n let level = \"\";\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n augmentationList += aug.name + level + \"
\";\n }\n Player.queuedAugmentations = [];\n dialogBoxCreate(\n \"You slowly drift to sleep as scientists put you under in order \" +\n \"to install the following Augmentations:
\" +\n augmentationList +\n \"
You wake up in your home...you feel different...\",\n );\n prestigeAugmentation();\n return true;\n}\n\nfunction augmentationExists(name: string): boolean {\n return Augmentations.hasOwnProperty(name);\n}\n\nexport function isRepeatableAug(aug: Augmentation): boolean {\n const augName = aug instanceof Augmentation ? aug.name : aug;\n return augName === AugmentationNames.NeuroFluxGovernor;\n}\n\nexport { installAugmentations, initAugmentations, applyAugmentation, augmentationExists };\n","/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\nimport { WorkerScript } from \"./WorkerScript\";\nimport { workerScripts } from \"./WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./WorkerScriptStartStopEventEmitter\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { AddRecentScript } from \"./RecentScripts\";\nimport { Player } from \"../Player\";\n\nexport function killWorkerScript(runningScriptObj: RunningScript, hostname: string, rerenderUi?: boolean): boolean;\nexport function killWorkerScript(workerScript: WorkerScript): boolean;\nexport function killWorkerScript(pid: number): boolean;\nexport function killWorkerScript(\n script: RunningScript | WorkerScript | number,\n hostname?: string,\n rerenderUi?: boolean,\n): boolean {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(script);\n\n return true;\n } else if (script instanceof RunningScript && typeof hostname === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n if (res) {\n return res;\n }\n\n // If for some reason that doesn't work, we'll try the old way\n for (const ws of workerScripts.values()) {\n if (ws.name == script.filename && ws.hostname == hostname && compareArrays(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\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: number, rerenderUi = true): boolean {\n const ws = workerScripts.get(pid);\n if (ws instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n if (typeof workerScript.atExit === \"function\") {\n try {\n workerScript.atExit();\n } catch (e: any) {\n dialogBoxCreate(\n `Error trying to call atExit for script ${workerScript.name} on ${workerScript.hostname} ${workerScript.scriptRef.args} ${e}`,\n );\n }\n workerScript.atExit = undefined;\n }\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\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} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\nfunction removeWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n const ip = workerScript.hostname;\n const name = workerScript.name;\n\n // Get the server on which the script runs\n const server = GetServer(ip);\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n }\n\n // Delete the RunningScript object from that server\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n if (runningScript.filename === name && compareArrays(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n }\n\n // Recalculate ram used on that server\n\n server.updateRamUsed(0, Player);\n for (const rs of server.runningScripts) server.updateRamUsed(server.ramUsed + rs.ramUsage * rs.threads, Player);\n\n // Delete script from global pool (workerScripts)\n workerScripts.delete(workerScript.pid);\n // const res = workerScripts.delete(workerScript.pid);\n // if (!res) {\n // console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n // console.warn(workerScript);\n // }\n AddRecentScript(workerScript);\n\n if (rerenderUi) {\n WorkerScriptStartStopEventEmitter.emit();\n }\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 */\nfunction killNetscriptDelay(workerScript: WorkerScript): void {\n if (workerScript instanceof WorkerScript) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n if (workerScript.delayReject) {\n workerScript.delayReject(workerScript);\n }\n }\n }\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { ICorporation } from \"../ICorporation\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number;\n corp: ICorporation;\n}\n\nexport function MoneyCost(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (!(props.corp.funds > props.money))\n return {numeralWrapper.formatMoney(props.money)};\n\n return {numeralWrapper.formatMoney(props.money)};\n}\n","import React from \"react\";\n\nimport {\n Typography,\n TableCell,\n TableRow,\n} from \"@mui/material\";\n\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { characterOverviewStyles as useStyles } from \"./CharacterOverview\";\n\ninterface ITableRowData {\n content?: string;\n level?: number;\n exp?: number;\n}\n\ninterface IProps {\n name: string;\n color: string;\n classes?: any;\n data: ITableRowData;\n}\n\nexport const StatsRow = ({ name, color, classes = useStyles(), data }: IProps): React.ReactElement => {\n let content;\n\n if (data.content !== undefined) {\n content = data.content;\n } else if (data.level !== undefined && data.exp !== undefined) {\n content = `${formatNumber(data.level, 0)} (${numeralWrapper.formatExp(data.exp)} exp)`;\n } else if (data.level !== undefined && data.exp === undefined) {\n content = `${formatNumber(data.level, 0)}`;\n }\n\n return (\n \n \n {name}\n \n \n \n {content}\n \n \n \n )\n}\n","/**\n * Checks whether the value passed in can be considered a string.\n * @param value The value to check if it is a string.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function isString(value: any): boolean {\n return typeof value === \"string\" || value instanceof String;\n}\n","import { IMinMaxRange } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nexport const StockForecastInfluenceLimit = 5;\n\nexport interface IConstructorParams {\n b: boolean;\n initPrice: number | IMinMaxRange;\n marketCap: number;\n mv: number | IMinMaxRange;\n name: string;\n otlkMag: number;\n spreadPerc: number | IMinMaxRange;\n shareTxForMovement: number | IMinMaxRange;\n symbol: string;\n}\n\nconst defaultConstructorParams: IConstructorParams = {\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};\n\n// Helper function that convert a IMinMaxRange to a number\nfunction toNumber(n: number | IMinMaxRange): number {\n let value: number;\n switch (typeof n) {\n case \"number\": {\n return n;\n }\n case \"object\": {\n const range = n as IMinMaxRange;\n value = getRandomInt(range.min, range.max);\n break;\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/**\n * Represents the valuation of a company in the World Stock Exchange.\n */\nexport class Stock {\n /**\n * Bear or bull (more likely to go up or down, based on otlkMag)\n */\n b: boolean;\n\n /**\n * Maximum price of a stock (per share)\n */\n readonly cap: number;\n\n /**\n * Stocks previous share price\n */\n lastPrice: number;\n\n /**\n * Maximum number of shares that player can own (both long and short combined)\n */\n readonly maxShares: number;\n\n /**\n * Maximum volatility\n */\n readonly mv: number;\n\n /**\n * Name of the company that the stock is for\n */\n readonly name: string;\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 otlkMag: number;\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 otlkMagForecast: number;\n\n /**\n * Average price of stocks that the player owns in the LONG position\n */\n playerAvgPx: number;\n\n /**\n * Average price of stocks that the player owns in the SHORT position\n */\n playerAvgShortPx: number;\n\n /**\n * Number of shares the player owns in the LONG position\n */\n playerShares: number;\n\n /**\n * Number of shares the player owns in the SHORT position\n */\n playerShortShares: number;\n\n /**\n * Stock's share price\n */\n price: number;\n\n /**\n * How many shares need to be transacted in order to trigger a price movement\n */\n readonly shareTxForMovement: number;\n\n /**\n * How many share transactions remaining until a price movement occurs\n * (separately tracked for upward and downward movements)\n */\n shareTxUntilMovement: number;\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 readonly spreadPerc: number;\n\n /**\n * The stock's ticker symbol\n */\n readonly symbol: string;\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 readonly totalShares: number;\n\n constructor(p: IConstructorParams = 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 = getRandomInt(this.price * 1e3, this.price * 25e3);\n this.spreadPerc = toNumber(p.spreadPerc);\n this.shareTxForMovement = toNumber(p.shareTxForMovement);\n this.shareTxUntilMovement = this.shareTxForMovement;\n\n // Total shares is determined by market cap, and is rounded to nearest 100k\n const totalSharesUnrounded: number = p.marketCap / this.price;\n this.totalShares = Math.round(totalSharesUnrounded / 1e5) * 1e5;\n\n // Max Shares (Outstanding shares) is a percentage of total shares\n const outstandingSharePercentage = 0.2;\n this.maxShares = Math.round((this.totalShares * outstandingSharePercentage) / 1e5) * 1e5;\n }\n\n /**\n * Safely set the stock's second-order forecast to a new value\n */\n changeForecastForecast(newff: number): void {\n this.otlkMagForecast = newff;\n if (this.otlkMagForecast > 100) {\n this.otlkMagForecast = 100;\n } else if (this.otlkMagForecast < 0) {\n this.otlkMagForecast = 0;\n }\n }\n\n /**\n * Set the stock to a new price. Also updates the stock's previous price tracker\n */\n changePrice(newPrice: number): void {\n this.lastPrice = this.price;\n this.price = newPrice;\n }\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 cycleForecast(changeAmt = 0.1): void {\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 if (this.b) {\n // Forecast decreases\n this.otlkMag -= changeAmt;\n } else {\n this.otlkMag += changeAmt;\n }\n\n this.otlkMag = Math.min(this.otlkMag, 50);\n if (this.otlkMag < 0) {\n this.otlkMag *= -1;\n this.b = !this.b;\n }\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 cycleForecastForecast(changeAmt = 0.1): void {\n if (Math.random() < 0.5) {\n this.changeForecastForecast(this.otlkMagForecast + changeAmt);\n } else {\n this.changeForecastForecast(this.otlkMagForecast - changeAmt);\n }\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 flipForecastForecast(): void {\n const diff = this.otlkMagForecast - 50;\n this.otlkMagForecast = 50 + -1 * diff;\n }\n\n /**\n * Returns the stock's absolute forecast, which is a number between 0-100\n */\n getAbsoluteForecast(): number {\n return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;\n }\n\n /**\n * Return the price at which YOUR stock is bought (market ask price). Accounts for spread\n */\n getAskPrice(): number {\n return this.price * (1 + this.spreadPerc / 100);\n }\n\n /**\n * Return the price at which YOUR stock is sold (market bid price). Accounts for spread\n */\n getBidPrice(): number {\n return this.price * (1 - this.spreadPerc / 100);\n }\n\n /**\n * Returns the chance (0-1 decimal) that a stock has of having its forecast increase\n */\n getForecastIncreaseChance(): number {\n const diff = this.otlkMagForecast - this.getAbsoluteForecast();\n\n return (50 + Math.min(Math.max(diff, -45), 45)) / 100;\n }\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 influenceForecast(change: number): void {\n if (this.otlkMag > StockForecastInfluenceLimit) {\n this.otlkMag = Math.max(StockForecastInfluenceLimit, this.otlkMag - change);\n }\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 influenceForecastForecast(change: number): void {\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 /**\n * Serialize the Stock to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Stock\", this);\n }\n\n /**\n * Initializes a Stock from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Stock {\n return Generic_fromJSON(Stock, value.data);\n }\n}\n\nReviver.constructors.Stock = Stock;\n","/**\n * Map of all Cities in the game\n * Key = City Name, Value = City object\n */\nimport { City } from \"./City\";\nimport { IMap } from \"../types\";\n\nexport const Cities: IMap = {};\n","import { IMap } from \"./types\";\nimport { Terminal } from \"./Terminal\";\n\nexport let Aliases: IMap = {};\nexport let GlobalAliases: IMap = {};\n\nexport function loadAliases(saveString: string): void {\n if (saveString === \"\") {\n Aliases = {};\n } else {\n Aliases = JSON.parse(saveString);\n }\n}\n\nexport function loadGlobalAliases(saveString: string): void {\n if (saveString === \"\") {\n GlobalAliases = {};\n } else {\n GlobalAliases = JSON.parse(saveString);\n }\n}\n\n// Prints all aliases to terminal\nexport function printAliases(): void {\n for (const name of Object.keys(Aliases)) {\n if (Aliases.hasOwnProperty(name)) {\n Terminal.print(\"alias \" + name + \"=\" + Aliases[name]);\n }\n }\n for (const name of Object.keys(GlobalAliases)) {\n if (GlobalAliases.hasOwnProperty(name)) {\n Terminal.print(\"global alias \" + name + \"=\" + GlobalAliases[name]);\n }\n }\n}\n\n// Returns true if successful, false otherwise\nexport function parseAliasDeclaration(dec: string, global = false): boolean {\n const re = /^([\\w|!%,@-]+)=((\"(.+)\")|('(.+)'))$/;\n const matches = dec.match(re);\n if (matches == null || matches.length != 7) {\n return false;\n }\n\n if (global) {\n addGlobalAlias(matches[1], matches[4] || matches[6]);\n } else {\n addAlias(matches[1], matches[4] || matches[6]);\n }\n return true;\n}\n\nfunction addAlias(name: string, value: string): void {\n if (name in GlobalAliases) {\n delete GlobalAliases[name];\n }\n Aliases[name] = value.trim();\n}\n\nfunction addGlobalAlias(name: string, value: string): void {\n if (name in Aliases) {\n delete Aliases[name];\n }\n GlobalAliases[name] = value.trim();\n}\n\nfunction getAlias(name: string): string | null {\n if (Aliases.hasOwnProperty(name)) {\n return Aliases[name];\n }\n\n return null;\n}\n\nfunction getGlobalAlias(name: string): string | null {\n if (GlobalAliases.hasOwnProperty(name)) {\n return GlobalAliases[name];\n }\n return null;\n}\n\nexport function removeAlias(name: string): boolean {\n if (Aliases.hasOwnProperty(name)) {\n delete Aliases[name];\n return true;\n }\n\n if (GlobalAliases.hasOwnProperty(name)) {\n delete GlobalAliases[name];\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns the original string with any aliases substituted in.\n * Aliases are only applied to \"whole words\", one level deep\n */\nexport function substituteAliases(origCommand: string): string {\n const commandArray = origCommand.split(\" \");\n if (commandArray.length > 0) {\n // For the alias and unalias commands, dont substite\n if (commandArray[0] === \"unalias\" || commandArray[0] === \"alias\") {\n return commandArray.join(\" \");\n }\n\n let somethingSubstituted = true;\n let depth = 0;\n\n while (somethingSubstituted && depth < 10) {\n depth++;\n somethingSubstituted = false;\n const alias = getAlias(commandArray[0])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(0, 1, ...alias);\n //commandArray[0] = alias;\n }\n for (let i = 0; i < commandArray.length; ++i) {\n const alias = getGlobalAlias(commandArray[i])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(i, 1, ...alias);\n i += alias.length - 1;\n //commandArray[i] = alias;\n }\n }\n }\n }\n return commandArray.join(\" \");\n}\n","/**\n * Lore / world building literature files that can be found on servers.\n * These files can be read by the player\n */\nexport class Literature {\n title: string;\n fn: string;\n txt: string;\n\n constructor(title: string, filename: string, txt: string) {\n this.title = title;\n this.fn = filename;\n this.txt = txt;\n }\n}\n","import React from \"react\";\nimport { createTheme, ThemeProvider, Theme, StyledEngineProvider } from \"@mui/material/styles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Settings } from \"../../Settings/Settings\";\n\nexport const ThemeEvents = new EventEmitter<[]>();\n\ndeclare module \"@mui/material/styles\" {\n interface Theme {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n interface ThemeOptions {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n}\n\nlet theme: Theme;\n\nexport function refreshTheme(): void {\n theme = createTheme({\n colors: {\n hp: Settings.theme.hp,\n money: Settings.theme.money,\n hack: Settings.theme.hack,\n combat: Settings.theme.combat,\n cha: Settings.theme.cha,\n int: Settings.theme.int,\n rep: Settings.theme.rep,\n backgroundprimary: Settings.theme.backgroundprimary,\n backgroundsecondary: Settings.theme.backgroundsecondary,\n button: Settings.theme.button,\n successlight: Settings.theme.successlight,\n success: Settings.theme.success,\n successdark: Settings.theme.successdark,\n white: Settings.theme.white,\n black: Settings.theme.black,\n },\n palette: {\n primary: {\n light: Settings.theme.primarylight,\n main: Settings.theme.primary,\n dark: Settings.theme.primarydark,\n },\n secondary: {\n light: Settings.theme.secondarylight,\n main: Settings.theme.secondary,\n dark: Settings.theme.secondarydark,\n },\n error: {\n light: Settings.theme.errorlight,\n main: Settings.theme.error,\n dark: Settings.theme.errordark,\n },\n info: {\n light: Settings.theme.infolight,\n main: Settings.theme.info,\n dark: Settings.theme.infodark,\n },\n warning: {\n light: Settings.theme.warninglight,\n main: Settings.theme.warning,\n dark: Settings.theme.warningdark,\n },\n success: {\n light: Settings.theme.successlight,\n main: Settings.theme.success,\n dark: Settings.theme.successdark,\n },\n background: {\n default: Settings.theme.backgroundprimary,\n paper: Settings.theme.well,\n },\n action: {\n disabled: Settings.theme.disabled,\n },\n },\n typography: {\n fontFamily: Settings.styles.fontFamily,\n button: {\n textTransform: \"none\",\n },\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n color: Settings.theme.primary,\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: Settings.theme.primarydark,\n },\n },\n },\n },\n\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n borderBottomColor: \"#fff\",\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: Settings.theme.primarydark,\n },\n \"&:before\": {\n borderBottomColor: Settings.theme.primary,\n },\n \"&:after\": {\n borderBottomColor: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primarydark, // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiButtonGroup: {\n styleOverrides: {\n root: {\n '& .MuiButton-root:not(:last-of-type)': {\n marginRight: '1px',\n }\n }\n }\n },\n\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.button,\n border: \"1px solid \" + Settings.theme.well,\n // color: Settings.theme.primary,\n \"&:hover\": {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n\n borderRadius: 0,\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: Settings.theme.primary,\n },\n },\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTextField: {\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTypography: {\n defaultProps: {\n color: \"primary\",\n },\n styleOverrides: {\n root: {\n lineHeight: Settings.styles.lineHeight,\n }\n }\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\",\n },\n },\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n borderRadius: 0,\n border: \"2px solid white\",\n maxWidth: \"100vh\",\n },\n },\n defaultProps: {\n disableInteractive: true,\n },\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: Settings.theme.primarydark,\n },\n track: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: Settings.theme.primary,\n },\n selectLabel: {\n color: Settings.theme.primary,\n },\n displayedRows: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n textColorPrimary: {\n color: Settings.theme.secondary,\n \"&.Mui-selected\": {\n color: Settings.theme.primary,\n },\n },\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.well,\n margin: '3px',\n\n \"&.Mui-selected\": {\n backgroundColor: Settings.theme.button\n },\n },\n },\n },\n MuiTabs: {\n styleOverrides: {\n scrollButtons: {\n backgroundColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n margin: '3px',\n opacity: 1,\n width: 'fit-content',\n\n \"&.Mui-disabled\": {\n opacity: 0.5\n }\n }\n },\n defaultProps: {\n TabIndicatorProps: {\n style: {\n display: \"none\"\n }\n }\n },\n },\n MuiAlert: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.black,\n borderRadius: 0,\n border: \"1px solid \" + Settings.theme.well,\n },\n standardSuccess: {\n color: Settings.theme.successlight,\n },\n standardError: {\n color: Settings.theme.errorlight,\n },\n standardWarning: {\n color: Settings.theme.warninglight,\n },\n standardInfo: {\n color: Settings.theme.infolight,\n },\n },\n },\n },\n });\n\n document.body.style.backgroundColor = theme.colors.backgroundprimary?.toString() ?? \"black\";\n}\nrefreshTheme();\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element;\n}\n\nexport const TTheme = ({ children }: IProps): React.ReactElement => (\n \n {children}\n \n);\n","import React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n value: string;\n color?: string;\n variant?:\n | \"button\"\n | \"caption\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"overline\"\n | \"inherit\"\n | undefined;\n};\n\nexport function CopyableText(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n function copy(): void {\n const copyText = document.createElement(\"textarea\");\n copyText.value = 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 setOpen(true);\n setTimeout(() => setOpen(false), 1000);\n }\n\n return (\n Copied!
}>\n \n {props.value}\n \n \n );\n}\n","import { IMap } from \"../types\";\n\n// Map of material (by name) to their sizes (how much space it takes in warehouse)\nexport const MaterialSizes: IMap = {\n Water: 0.05,\n Energy: 0.01,\n Food: 0.03,\n Plants: 0.05,\n Metal: 0.1,\n Hardware: 0.06,\n Chemicals: 0.05,\n Drugs: 0.02,\n Robots: 0.5,\n AICores: 0.1,\n RealEstate: 0.005,\n \"Real Estate\": 0.005,\n \"AI Cores\": 0.1,\n};\n","export function calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n}\n\nexport function calculateExp(skill: number, mult = 1): number {\n return Math.exp((skill / mult + 200) / 32) - 534.6;\n}\n\nexport function calculateSkillProgress(exp: number, mult = 1): ISkillProgress {\n const currentSkill = calculateSkill(exp, mult);\n const nextSkill = currentSkill + 1;\n\n let baseExperience = calculateExp(currentSkill, mult);\n if (baseExperience < 0) baseExperience = 0;\n\n let nextExperience = calculateExp(nextSkill, mult)\n if (nextExperience < 0) nextExperience = 0;\n\n const normalize = (value: number): number => ((value - baseExperience) * 100) / (nextExperience - baseExperience);\n let progress = (nextExperience - baseExperience !== 0) ? normalize(exp) : 99.99;\n\n // Clamp progress: When sleeves are working out, the player gets way too much progress\n if (progress < 0) progress = 0\n if (progress > 100) progress = 100;\n\n // Clamp floating point imprecisions\n let currentExperience = exp - baseExperience;\n let remainingExperience = nextExperience - exp;\n if (currentExperience < 0) currentExperience = 0;\n if (remainingExperience < 0) remainingExperience = 0;\n\n return {\n currentSkill,\n nextSkill,\n baseExperience,\n experience: exp,\n nextExperience,\n currentExperience,\n remainingExperience,\n progress\n }\n}\n\nexport interface ISkillProgress {\n currentSkill: number;\n nextSkill: number;\n baseExperience: number;\n experience: number;\n nextExperience: number;\n currentExperience: number;\n remainingExperience: number;\n progress: number;\n}\n\nexport function getEmptySkillProgress(): ISkillProgress {\n return {\n currentSkill: 0, nextSkill: 0,\n baseExperience: 0, experience: 0, nextExperience: 0,\n currentExperience: 0, remainingExperience: 0,\n progress: 0,\n };\n}\n","export interface IMults {\n hack?: number;\n str?: number;\n def?: number;\n dex?: number;\n agi?: number;\n cha?: number;\n}\n\nexport enum UpgradeType {\n Weapon = \"w\",\n Armor = \"a\",\n Vehicle = \"v\",\n Rootkit = \"r\",\n Augmentation = \"g\",\n}\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberUpgrade\n * (defined in Gang.js)\n */\ninterface IGangMemberUpgradeMetadata {\n cost: number;\n mults: IMults;\n name: string;\n upgType: UpgradeType;\n}\n\n/**\n * Array of metadata for all Gang Member upgrades. Used to construct the global GangMemberUpgrade\n * objects in Gang.js\n */\nexport const gangMemberUpgradesMetadata: IGangMemberUpgradeMetadata[] = [\n {\n cost: 1e6,\n mults: { str: 1.04, def: 1.04 },\n name: \"Baseball Bat\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 12e6,\n mults: { str: 1.08, def: 1.08, dex: 1.08 },\n name: \"Katana\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 25e6,\n mults: { str: 1.1, def: 1.1, dex: 1.1, agi: 1.1 },\n name: \"Glock 18C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 50e6,\n mults: { str: 1.12, def: 1.1, agi: 1.1 },\n name: \"P90C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 60e6,\n mults: { str: 1.2, def: 1.15 },\n name: \"Steyr AUG\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 100e6,\n mults: { str: 1.25, def: 1.2 },\n name: \"AK-47\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 150e6,\n mults: { str: 1.3, def: 1.25 },\n name: \"M15A10 Assault Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 225e6,\n mults: { str: 1.3, dex: 1.25, agi: 1.3 },\n name: \"AWM Sniper Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 2e6,\n mults: { def: 1.04 },\n name: \"Bulletproof Vest\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 5e6,\n mults: { def: 1.08 },\n name: \"Full Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 25e6,\n mults: { def: 1.15, agi: 1.15 },\n name: \"Liquid Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 40e6,\n mults: { def: 1.2 },\n name: \"Graphene Plating Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 3e6,\n mults: { agi: 1.04, cha: 1.04 },\n name: \"Ford Flex V20\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 9e6,\n mults: { agi: 1.08, cha: 1.08 },\n name: \"ATX1070 Superbike\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 18e6,\n mults: { agi: 1.12, cha: 1.12 },\n name: \"Mercedes-Benz S9001\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 30e6,\n mults: { agi: 1.16, cha: 1.16 },\n name: \"White Ferrari\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 5e6,\n mults: { hack: 1.05 },\n name: \"NUKE Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 25e6,\n mults: { hack: 1.1 },\n name: \"Soulstealer Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Demon Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 40e6,\n mults: { hack: 1.12 },\n name: \"Hmap Node\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Jack the Ripper\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 10e9,\n mults: { str: 1.3, dex: 1.3 },\n name: \"Bionic Arms\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { agi: 1.6 },\n name: \"Bionic Legs\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.15, def: 1.15, dex: 1.15, agi: 1.15 },\n name: \"Bionic Spine\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 20e9,\n mults: { str: 1.4, def: 1.4 },\n name: \"BrachiBlades\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 12e9,\n mults: { str: 1.2, def: 1.2 },\n name: \"Nanofiber Weave\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 25e9,\n mults: { str: 1.5, agi: 1.5 },\n name: \"Synthetic Heart\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.3, def: 1.3 },\n name: \"Synfibril Muscle\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 5e9,\n mults: { hack: 1.05 },\n name: \"BitWire\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { hack: 1.15 },\n name: \"Neuralstimulator\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 7.5e9,\n mults: { hack: 1.1 },\n name: \"DataJack\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 50e9,\n mults: { str: 1.7, def: 1.7 },\n name: \"Graphene Bone Lacings\",\n upgType: UpgradeType.Augmentation,\n },\n];\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { RunningScript } from \"../../Script/RunningScript\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Draggable from \"react-draggable\";\nimport { ResizableBox } from \"react-resizable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport ArrowForwardIosIcon from \"@mui/icons-material/ArrowForwardIos\";\nimport { workerScripts } from \"../../Netscript/WorkerScripts\";\nimport { startWorkerScript } from \"../../NetscriptWorker\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Theme } from \"@mui/material\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport { Player } from \"../../Player\";\nimport { debounce } from \"lodash\";\nimport { WorkerScriptStartStopEventEmitter } from \"../../Netscript/WorkerScriptStartStopEventEmitter\";\n\nlet layerCounter = 0;\n\nexport const LogBoxEvents = new EventEmitter<[RunningScript]>();\nexport const LogBoxClearEvents = new EventEmitter<[]>();\n\ninterface Log {\n id: string;\n script: RunningScript;\n}\n\nlet logs: Log[] = [];\n\nexport function LogBoxManager(): React.ReactElement {\n const setRerender = useState(true)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(\n () =>\n LogBoxEvents.subscribe((script: RunningScript) => {\n const id = script.server + \"-\" + script.filename + script.args.map((x: any): string => `${x}`).join(\"-\");\n if (logs.find((l) => l.id === id)) return;\n logs.push({\n id: id,\n script: script,\n });\n rerender();\n }),\n [],\n );\n\n useEffect(() =>\n LogBoxClearEvents.subscribe(() => {\n logs = [];\n rerender();\n }),\n );\n\n function close(id: string): void {\n logs = logs.filter((l) => l.id !== id);\n rerender();\n }\n\n return (\n <>\n {logs.map((log) => (\n close(log.id)} />\n ))}\n \n );\n}\n\ninterface IProps {\n script: RunningScript;\n id: string;\n onClose: () => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n title: {\n \"&.is-minimized + *\": {\n border: \"none\",\n margin: 0,\n \"max-height\": 0,\n padding: 0,\n \"pointer-events\": \"none\",\n visibility: \"hidden\",\n },\n },\n logs: {\n overflowY: \"scroll\",\n overflowX: \"hidden\",\n scrollbarWidth: \"auto\",\n display: \"flex\",\n flexDirection: \"column-reverse\",\n },\n success: {\n color: theme.colors.success,\n },\n error: {\n color: theme.palette.error.main,\n },\n primary: {\n color: theme.palette.primary.main,\n },\n info: {\n color: theme.palette.info.main,\n },\n warning: {\n color: theme.palette.warning.main,\n },\n }),\n);\n\nexport const logBoxBaseZIndex = 1500;\n\nfunction LogWindow(props: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const rootRef = useRef(null);\n const [script, setScript] = useState(props.script);\n const classes = useStyles();\n const container = useRef(null);\n const setRerender = useState(false)[1];\n const [minimized, setMinimized] = useState(false);\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // useEffect(\n // () =>\n // WorkerScriptStartStopEventEmitter.subscribe(() => {\n // setTimeout(() => {\n // const server = GetServer(script.server);\n // if (server === null) return;\n // const exisitingScript = findRunningScript(script.filename, script.args, server);\n // if (exisitingScript) {\n // exisitingScript.logs = script.logs.concat(exisitingScript.logs)\n // setScript(exisitingScript)\n // }\n // rerender();\n // }, 100)\n // }),\n // [],\n // );\n\n useEffect(() => {\n updateLayer();\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function kill(): void {\n killWorkerScript(script, script.server, true);\n }\n\n function run(): void {\n const server = GetServer(script.server);\n if (server === null) return;\n const s = findRunningScript(script.filename, script.args, server);\n if (s === null) {\n startWorkerScript(Player, script, server);\n } else {\n setScript(s);\n }\n }\n\n function updateLayer(): void {\n const c = container.current;\n if (c === null) return;\n c.style.zIndex = logBoxBaseZIndex + layerCounter + \"\";\n layerCounter++;\n rerender();\n }\n\n function title(full = false): string {\n const maxLength = 30;\n const t = `${script.filename} ${script.args.map((x: any): string => `${x}`).join(\" \")}`;\n if (full || t.length <= maxLength) {\n return t;\n }\n return t.slice(0, maxLength - 3) + \"...\";\n }\n\n function minimize(): void {\n setMinimized(!minimized);\n }\n\n function lineClass(s: string): string {\n if (s.match(/(^\\[[^\\]]+\\] )?ERROR/) || s.match(/(^\\[[^\\]]+\\] )?FAIL/)) {\n return classes.error;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?SUCCESS/)) {\n return classes.success;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?WARN/)) {\n return classes.warning;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?INFO/)) {\n return classes.info;\n }\n return classes.primary;\n }\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", onResize);\n return () => {\n window.removeEventListener(\"resize\", onResize);\n };\n }, []);\n\n const onResize = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n if (!isOnScreen(node)) {\n resetPosition();\n }\n }, 100);\n\n const isOnScreen = (node: HTMLDivElement): boolean => {\n const bounds = node.getBoundingClientRect();\n\n return !(bounds.right < 0 || bounds.bottom < 0 || bounds.left > innerWidth || bounds.top > outerWidth);\n };\n\n const resetPosition = (): void => {\n const node = rootRef?.current;\n if (!node) return;\n const state = node.state as { x: number; y: number };\n state.x = 0;\n state.y = 0;\n node.setState(state);\n };\n\n const boundToBody = (e: any): void | false => {\n if (e.clientX < 0 || e.clientY < 0 || e.clientX > innerWidth || e.clientY > innerHeight) return false;\n };\n\n return (\n \n \n
\n \n \n \n {title()}\n \n\n \n {!workerScripts.has(script.pid) && }\n {workerScripts.has(script.pid) && }\n \n \n \n \n \n \n \n \n \n }\n >\n \n {script.logs.map(\n (line: string, i: number): JSX.Element => (\n \n {line}\n
\n
\n ),\n )}\n
\n \n
\n
\n \n
\n );\n}\n","/**\n * Global pool of all active scripts (scripts that are currently running)\n */\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const workerScripts: Map = new Map();\n","import React from \"react\";\n\nimport { Table, TableCell } from \"./Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { Table as MuiTable } from \"@mui/material\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n rows: any[][];\n title?: string;\n wide?: boolean;\n}\n\nexport function StatsTable({ rows, title, wide }: IProps): React.ReactElement {\n const T = wide ? MuiTable : Table;\n return (\n <>\n {title && {title}}\n \n \n {rows.map((row: any[], i: number) => (\n \n {row.map((elem: any, i: number) => (\n \n {elem}\n \n ))}\n \n ))}\n \n \n \n );\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetServerConstants } from \"../data/Constants\";\n\nexport function calculateHashGainRate(\n level: number,\n ramUsed: number,\n maxRam: number,\n cores: number,\n mult: number,\n): number {\n const baseGain = HacknetServerConstants.HashesPerLevel * level;\n const ramMultiplier = Math.pow(1.07, Math.log2(maxRam));\n const coreMultiplier = 1 + (cores - 1) / 5;\n const ramRatio = 1 - ramUsed / maxRam;\n\n return baseGain * ramMultiplier * coreMultiplier * ramRatio * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetServerConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return 10 * HacknetServerConstants.BaseCost * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetServerConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetServerConstants.RamBaseCost;\n const mult = Math.pow(HacknetServerConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCores: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCores >= HacknetServerConstants.MaxCores) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCores;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n totalCost *= HacknetServerConstants.CoreBaseCost;\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCacheUpgradeCost(startingCache: number, extraLevels = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCache >= HacknetServerConstants.MaxCache) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCacheMult;\n let totalCost = 0;\n let currentCache = startingCache;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCache - 1);\n ++currentCache;\n }\n totalCost *= HacknetServerConstants.CacheBaseCost;\n\n return totalCost;\n}\n\nexport function calculateServerCost(n: number, mult = 1): number {\n if (n - 1 >= HacknetServerConstants.MaxServers) {\n return Infinity;\n }\n\n return HacknetServerConstants.BaseCost * Math.pow(HacknetServerConstants.PurchaseMult, n - 1) * mult;\n}\n","export enum FactionWorkType {\n Field,\n Hacking,\n None,\n Security,\n}\n","import { FormControlLabel, Switch, Tooltip, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IProps {\n checked: boolean;\n onChange: (newValue: boolean, error?: string) => void;\n text: React.ReactNode;\n tooltip: React.ReactNode;\n}\n\nexport function OptionSwitch({ checked, onChange, text, tooltip }: IProps): React.ReactElement {\n const [value, setValue] = useState(checked);\n\n function handleSwitchChange(event: React.ChangeEvent): void {\n setValue(event.target.checked);\n }\n\n useEffect(() => onChange(value), [value]);\n\n return (\n }\n label={\n {tooltip}}>\n {text}\n \n }\n />\n );\n}\n","/**\n * Represents the possible configuration values that can be provided when creating the progress bar text.\n */\ninterface IProgressBarConfiguration {\n /**\n * Current progress, taken as a decimal (i.e. '0.6' to represent '60%')\n */\n progress?: number;\n\n /**\n * Total number of ticks in progress bar. Preferably a factor of 100.\n */\n totalTicks?: number;\n}\n\n/**\n * Represents concrete configuration values when creating the progress bar text.\n */\ninterface IProgressBarConfigurationMaterialized extends IProgressBarConfiguration {\n progress: number;\n totalTicks: number;\n}\n\n/**\n * Creates a graphical \"progress bar\"\n * e.g.: [||||---------------]\n * @param params The configuration parameters for the progress bar\n */\nexport function createProgressBarText(params: IProgressBarConfiguration): string {\n // Default values\n const defaultParams: IProgressBarConfigurationMaterialized = {\n progress: 0,\n totalTicks: 20,\n };\n\n // tslint:disable-next-line:prefer-object-spread\n const derived: IProgressBarConfigurationMaterialized = Object.assign({}, defaultParams, params);\n // Ensure it is 0..1\n derived.progress = Math.max(Math.min(derived.progress, 1), 0);\n\n // This way there is always at least one bar filled in...\n const bars: number = Math.max(Math.floor(derived.progress / (1 / derived.totalTicks)), 1);\n const dashes: number = Math.max(derived.totalTicks - bars, 0);\n\n // String.prototype.repeat isn't completley supported, but good enough for our purposes\n return `[${\"|\".repeat(bars)}${\"-\".repeat(dashes)}]`;\n}\n","/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\nimport { generateNextPid } from \"./Netscript/Pid\";\n\nimport { CONSTANTS } from \"./Constants\";\nimport { Interpreter } from \"./ThirdParty/JSInterpreter\";\nimport { isScriptErrorMessage, makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { NetscriptFunctions } from \"./NetscriptFunctions\";\nimport { executeJSScript } from \"./NetscriptJSEvaluator\";\nimport { NetscriptPort, IPort } from \"./NetscriptPort\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport { getRamUsageFromRunningScript } from \"./Script/RunningScriptHelpers\";\nimport { scriptCalculateOfflineProduction } from \"./Script/ScriptHelpers\";\nimport { Script } from \"./Script/Script\";\nimport { GetAllServers } from \"./Server/AllServers\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Settings } from \"./Settings/Settings\";\n\nimport { generate } from \"escodegen\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { roundToTwo } from \"./utils/helpers/roundToTwo\";\nimport { isString } from \"./utils/helpers/isString\";\nimport { sprintf } from \"sprintf-js\";\n\nimport { parse } from \"acorn\";\nimport { simple as walksimple } from \"acorn-walk\";\nimport { areFilesEqual } from \"./Terminal/DirectoryHelpers\";\nimport { Player } from \"./Player\";\nimport { Terminal } from \"./Terminal\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\n// Netscript Ports are instantiated here\nexport const NetscriptPorts: IPort[] = [];\nfor (let i = 0; i < CONSTANTS.NumNetscriptPorts; ++i) {\n NetscriptPorts.push(NetscriptPort());\n}\n\nexport function prestigeWorkerScripts(): void {\n for (const ws of workerScripts.values()) {\n ws.env.stopFlag = true;\n killWorkerScript(ws);\n }\n for (const port of NetscriptPorts) {\n port.clear();\n }\n\n WorkerScriptStartStopEventEmitter.emit();\n workerScripts.clear();\n}\n\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.\nfunction startNetscript2Script(player: IPlayer, workerScript: WorkerScript): Promise {\n workerScript.running = true;\n\n // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n let runningFn: string | null = null;\n\n // 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 function wrap(propName: string, f: (...args: any[]) => Promise): (...args: any[]) => Promise {\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: any[]) {\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 === \"asleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg =\n \"Concurrent calls to Netscript functions are not allowed! \" +\n \"Did you forget to await hack(), grow(), or some other \" +\n \"promise-returning function? (Currently running: %s tried to run: %s)\";\n if (runningFn) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, sprintf(msg, runningFn, propName));\n throw workerScript;\n }\n runningFn = propName;\n\n // 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 let result;\n try {\n result = f(...args);\n } catch (e: any) {\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 (const prop of Object.keys(workerScript.env.vars)) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n }\n workerScript.env.vars.stanek.charge = wrap(\"stanek.charge\", workerScript.env.vars.stanek.charge);\n\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 return new Promise((resolve, reject) => {\n executeJSScript(player, workerScript.getServer().scripts, workerScript)\n .then(() => {\n resolve(workerScript);\n })\n .catch((e) => reject(e));\n }).catch((e) => {\n if (e instanceof Error) {\n if (e instanceof SyntaxError) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e.message + \" (sorry we can't be more helpful)\");\n } else {\n workerScript.errorMessage = makeRuntimeRejectMsg(\n workerScript,\n e.message + ((e.stack && \"\\nstack:\\n\" + e.stack.toString()) || \"\"),\n );\n }\n throw workerScript;\n } else if (isScriptErrorMessage(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n } else if (e instanceof WorkerScript) {\n throw e;\n }\n\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e);\n throw workerScript; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript: WorkerScript): Promise {\n const code = workerScript.code;\n workerScript.running = true;\n\n //Process imports\n let codeWithImports, codeLineOffset;\n try {\n const importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e: any) {\n dialogBoxCreate(\"Error processing Imports in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n\n const interpreterInitialization = function (int: any, scope: any): void {\n //Add the Netscript environment\n const ns = NetscriptFunctions(workerScript);\n for (const name of Object.keys(ns)) {\n const entry = ns[name];\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if ([\"hack\", \"grow\", \"weaken\", \"sleep\", \"prompt\", \"manualHack\", \"scp\", \"write\", \"share\", \"wget\"].includes(name)) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //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 for (let i = 0; i < args.length - 1; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n const cb = args[args.length - 1];\n const fnPromise = entry(...fnArgs);\n fnPromise\n .then(function (res: any) {\n cb(res);\n })\n .catch(function (err: any) {\n // workerscript is when you cancel a delay\n if (!(err instanceof WorkerScript)) {\n console.error(err);\n const errorTextArray = err.split(\"|DELIMITER|\");\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `${scriptName}@${hostname}
`;\n msg += \"
\";\n msg += errorMsg;\n dialogBoxCreate(msg);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n });\n };\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (\n name === \"sprintf\" ||\n name === \"vsprintf\" ||\n name === \"scp\" ||\n name == \"write\" ||\n name === \"tryWrite\" ||\n name === \"run\" ||\n name === \"exec\"\n ) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //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 for (let i = 0; i < args.length; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n\n return entry(...fnArgs);\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n const tempWrapper = function (...args: any[]): any {\n const res = entry(...args);\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 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 }\n\n //Add the arguments\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n let interpreter: any;\n try {\n interpreter = new Interpreter(codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e: any) {\n dialogBoxCreate(\"Syntax ERROR in \" + workerScript.name + \":
\" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter(): void {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n let more = true;\n let i = 0;\n while (i < 3 && more) {\n more = more && interpreter.step();\n i++;\n }\n\n if (more) {\n setTimeout(runInterpreter, Settings.CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e: any) {\n e = e.toString();\n if (!isScriptErrorMessage(e)) {\n e = makeRuntimeRejectMsg(workerScript, e);\n }\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e: any) {\n if (isString(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof WorkerScript) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\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*/\nfunction processNetscript1Imports(code: string, workerScript: WorkerScript): any {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast: any = parse(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n const server = workerScript.getServer();\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName: string): Script | null {\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 return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n let hasImports = false;\n\n // Walk over the tree and process ImportDeclaration nodes\n walksimple(ast, {\n ImportDeclaration: (node: any) => {\n hasImports = true;\n let scriptName = node.source.value;\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n const script = getScript(scriptName);\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n const scriptAst = parse(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 const namespace = node.specifiers[0].local.name;\n const fnNames: string[] = []; //Names only\n const fnDeclarations: any[] = []; //FunctionDeclaration Node objects\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n },\n });\n\n //Now we have to generate the code that would create the namespace\n generatedCode += `var ${namespace};\\n(function (namespace) {\\n`;\n\n //Add the function declarations\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n\n //Add functions to namespace\n fnNames.forEach((fnName) => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n });\n\n //Finish\n generatedCode += `})(${namespace} || (\" + namespace + \" = {}));\\n`;\n } else {\n //import {...} from script\n\n //Get array of all fns to import\n const fnsToImport: string[] = [];\n node.specifiers.forEach((e: any) => {\n fnsToImport.push(e.local.name);\n });\n\n //Walk through script and get FunctionDeclaration code for all specified fns\n const fnDeclarations: any[] = [];\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n },\n });\n\n //Convert FunctionDeclarations into code\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n }\n },\n });\n\n //If there are no imports, just return the original code\n if (!hasImports) {\n return { code: code, lineOffset: 0 };\n }\n\n //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n let linesRemoved = 0;\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\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 }\n\n //Calculated line offset\n const lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved;\n\n //Convert the AST back into code\n code = generate(ast);\n\n //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n code = generatedCode + code;\n\n const res = {\n code: code,\n lineOffset: lineOffset,\n };\n return res;\n}\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 */\nexport function startWorkerScript(\n player: IPlayer,\n runningScript: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): number {\n if (createAndAddWorkerScript(player, runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript);\n\n // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n return runningScript.pid;\n }\n\n return 0;\n}\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 */\nfunction createAndAddWorkerScript(\n player: IPlayer,\n runningScriptObj: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): boolean {\n // Update server's ram usage\n let threads = 1;\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n const oneRamUsage = getRamUsageFromRunningScript(runningScriptObj);\n const ramUsage = roundToTwo(oneRamUsage * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n if (ramUsage > ramAvailable) {\n dialogBoxCreate(\n `Not enough RAM to run script ${runningScriptObj.filename} with args ` +\n `${arrayToString(runningScriptObj.args)}. This likely occurred because you re-loaded ` +\n `the game and the script's RAM usage increased (either because of an update to the game or ` +\n `your changes to the script.)`,\n );\n return false;\n }\n\n server.updateRamUsed(roundToTwo(server.ramUsed + ramUsage), Player);\n\n // Get the pid\n const pid = generateNextPid();\n if (pid === -1) {\n throw new Error(\n `Failed to start script because could not find available PID. This is most ` +\n `because you have too many scripts running.`,\n );\n }\n\n // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n const s = new WorkerScript(runningScriptObj, pid, NetscriptFunctions);\n s.ramUsage = oneRamUsage;\n\n // Add the WorkerScript to the global pool\n workerScripts.set(pid, s);\n WorkerScriptStartStopEventEmitter.emit();\n\n // Start the script's execution\n let p: Promise | null = null; // Script's resulting promise\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(player, s);\n } else {\n p = startNetscript1Script(s);\n if (!(p instanceof Promise)) {\n return false;\n }\n }\n\n // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n p.then(function (w: WorkerScript) {\n w.running = false;\n w.env.stopFlag = true;\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent !== undefined) {\n if (parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n }\n }\n\n killWorkerScript(s);\n w.log(\"\", () => \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n dialogBoxCreate(\"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 WorkerScript) {\n if (isScriptErrorMessage(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|DELIMITER|\");\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + w.errorMessage);\n return;\n }\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n\n let msg = `RUNTIME ERROR
${scriptName}@${hostname}
`;\n if (w.args.length > 0) {\n msg += `Args: ${arrayToString(w.args)}
`;\n }\n msg += \"
\";\n msg += errorMsg;\n\n dialogBoxCreate(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 } else if (isScriptErrorMessage(w)) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\n \"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" +\n w.toString(),\n );\n return;\n } else {\n dialogBoxCreate(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n killWorkerScript(s);\n });\n\n return true;\n}\n\n/**\n * Updates the online running time stat of all running scripts\n */\nexport function updateOnlineScriptTimes(numCycles = 1): void {\n const time = (numCycles * CONSTANTS._idleSpeed) / 1000; //seconds\n for (const ws of workerScripts.values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\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 */\nexport function loadAllRunningScripts(player: IPlayer): void {\n const skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n if (skipScriptLoad) {\n Terminal.warn(\"Skipped loading player scripts during startup\");\n console.info(\"Skipping the load of any scripts during startup\");\n }\n for (const server of GetAllServers()) {\n // Reset each server's RAM usage to 0\n server.ramUsed = 0;\n\n // Reset modules on all scripts\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 const fileName = server.runningScripts[j].filename;\n createAndAddWorkerScript(player, server.runningScripts[j], server);\n\n if (!server.runningScripts[j]) {\n // createAndAddWorkerScript can modify the server.runningScripts array if a script is invalid\n console.error(`createAndAddWorkerScript removed ${fileName} from ${server}`);\n continue;\n }\n\n // Offline production\n scriptCalculateOfflineProduction(server.runningScripts[j]);\n }\n }\n }\n}\n\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\nexport function runScriptFromScript(\n player: IPlayer,\n caller: string,\n server: BaseServer,\n scriptname: string,\n args: any[],\n workerScript: WorkerScript,\n threads = 1,\n): number {\n // Sanitize arguments\n if (!(workerScript instanceof WorkerScript)) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, () => `Invalid arguments: scriptname='${scriptname} args='${args}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n }\n\n args.forEach((arg, i) => {\n if (typeof arg !== \"string\" && typeof arg !== \"number\" && typeof arg !== \"boolean\")\n throw new Error(\n \"Only strings, numbers, and booleans can be passed as arguments to other scripts.\\n\" +\n `${scriptname} argument index ${i} is of type ${typeof arg} and value ${JSON.stringify(arg)}`,\n );\n });\n\n // Check if the script is already running\n const runningScriptObj = server.getRunningScript(scriptname, args);\n if (runningScriptObj != null) {\n workerScript.log(caller, () => `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n }\n\n // 'null/undefined' arguments are not allowed\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 }\n\n // Check if the script exists and if it does run it\n for (let i = 0; i < server.scripts.length; ++i) {\n if (!areFilesEqual(server.scripts[i].filename, scriptname)) continue;\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.floor(Number(threads));\n if (threads === 0) {\n return 0;\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(\n caller,\n () =>\n `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,\n );\n return 0;\n }\n // Able to run script\n workerScript.log(\n caller,\n () => `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${arrayToString(args)}.`,\n );\n const runningScriptObj = new RunningScript(script, args);\n runningScriptObj.threads = threads;\n runningScriptObj.server = server.hostname;\n\n return startWorkerScript(player, runningScriptObj, server, workerScript);\n }\n\n workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n","import { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Export } from \"./Export\";\n\ninterface IConstructorParams {\n name?: string;\n}\n\nexport class Material {\n // Name of material\n name = \"InitName\";\n\n // Amount of material owned\n qty = 0;\n\n // Material's \"quality\". Unbounded\n qlt = 0;\n\n // How much demand the Material has in the market, and the range of possible\n // values for this \"demand\"\n dmd = 0;\n dmdR: number[] = [0, 0];\n\n // How much competition there is for this Material in the market, and the range\n // of possible values for this \"competition\"\n cmp = 0;\n cmpR: number[] = [0, 0];\n\n // Maximum volatility of this Materials stats\n mv = 0;\n\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 mku = 0;\n\n // How much of this material is being bought, sold, imported and produced every second\n buy = 0;\n sll = 0;\n prd = 0;\n imp = 0;\n\n // Exports of this material to another warehouse/industry\n exp: Export[] = [];\n\n // Total amount of this material exported in the last cycle\n totalExp = 0;\n\n // Cost / sec to buy this material. AKA Market Price\n bCost = 0;\n\n // Cost / sec to sell this material\n sCost: string | number = 0;\n\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 prdman: [boolean, number] = [false, 0]; // Production\n sllman: [boolean, string | number] = [false, 0]; // Sale\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price = 0;\n\n // Determines the maximum amount of this material that can be sold in one market cycle\n maxsll = 0;\n\n constructor(params: IConstructorParams = {}) {\n if (params.name) {\n this.name = params.name;\n }\n this.init();\n }\n\n getMarkupLimit(): number {\n return this.qlt / this.mku;\n }\n\n init(): void {\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 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 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 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 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 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 this.mku = 1;\n break;\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 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 this.mku = 1.5;\n break;\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 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 this.mku = 1;\n break;\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 this.mku = 0.5;\n break;\n case \"Scientific Research\":\n case \"InitName\":\n break;\n default:\n console.error(`Invalid material type in init(): ${this.name}`);\n break;\n }\n }\n\n // Process change in demand, competition, and buy cost of this material\n processMarket(): void {\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: number = (Math.random() * this.mv) / 300;\n const priceChange: number = 1 + priceVolatility;\n\n //This 1st random check determines whether competition increases or decreases\n const compVolatility: number = (Math.random() * this.mv) / 100;\n const compChange: number = 1 + compVolatility;\n if (Math.random() < 0.5) {\n this.cmp *= compChange;\n if (this.cmp > this.cmpR[1]) {\n this.cmp = this.cmpR[1];\n }\n this.bCost *= 1 / priceChange; // Competition increases, so price goes down\n } else {\n this.cmp *= 1 / compChange;\n if (this.cmp < this.cmpR[0]) {\n this.cmp = this.cmpR[0];\n }\n this.bCost *= priceChange; // Competition decreases, so price goes up\n }\n\n // This 2nd random check determines whether demand increases or decreases\n const dmdVolatility: number = (Math.random() * this.mv) / 100;\n const dmdChange: number = 1 + dmdVolatility;\n if (Math.random() < 0.5) {\n this.dmd *= dmdChange;\n if (this.dmd > this.dmdR[1]) {\n this.dmd = this.dmdR[1];\n }\n this.bCost *= priceChange; // Demand increases, so price goes up\n } else {\n this.dmd *= 1 / dmdChange;\n if (this.dmd < this.dmdR[0]) {\n this.dmd = this.dmdR[0];\n }\n this.bCost *= 1 / priceChange;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Material\", this);\n }\n\n // Initiatizes a Material object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Material {\n return Generic_fromJSON(Material, value.data);\n }\n}\n\nReviver.constructors.Material = Material;\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberTask } from \"../GangMemberTask\";\n\ninterface Gang {\n respect: number;\n territory: number;\n wantedLevel: number;\n}\n\nexport function calculateWantedPenalty(gang: Gang): number {\n return gang.respect / (gang.respect + gang.wantedLevel);\n}\n\nexport function calculateRespectGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseRespect === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.respect) / 100);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n return Math.pow(11 * task.baseRespect * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateWantedLevelGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseWanted === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n const calc = (7 * task.baseWanted) / Math.pow(3 * statWeight * territoryMult, 0.8);\n\n // 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 return Math.min(100, calc);\n}\n\nexport function calculateMoneyGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseMoney === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n return Math.pow(5 * task.baseMoney * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateAscensionPointsGain(exp: number): number {\n return Math.max(exp - 1000, 0);\n}\n\nexport function calculateAscensionMult(points: number): number {\n return Math.max(Math.pow(points / 2000, 0.5), 1);\n}\n","import { FactionInfo, FactionInfos } from \"./FactionInfo\";\nimport { favorToRep, repToFavor } from \"./formulas/favor\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n alreadyInvited = false;\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n augmentations: string[] = [];\n\n /**\n * Amount of favor the player has with this faction.\n */\n favor = 0;\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n isBanned = false;\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n isMember = false;\n\n /**\n * Name of faction\n */\n name = \"\";\n\n /**\n * Amount of reputation player has with this faction\n */\n playerReputation = 0;\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n getInfo(): FactionInfo {\n const info = FactionInfos[this.name];\n if (info == null) {\n throw new Error(\n `Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`,\n );\n }\n\n return info;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n //Returns an array with [How much favor would be gained, how much rep would be left over]\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Faction\", this);\n }\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 static fromJSON(value: any): Faction {\n return Generic_fromJSON(Faction, value.data);\n }\n}\n\nReviver.constructors.Faction = Faction;\n","// Enums that defined allowed values for setting configuration\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum PurchaseAugmentationsOrderSetting {\n Cost,\n Default,\n Reputation,\n Purchasable,\n}\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum OwnedAugmentationsOrderSetting {\n Alphabetically,\n AcquirementTime,\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetNodeConstants } from \"../data/Constants\";\n\nexport function calculateMoneyGainRate(level: number, ram: number, cores: number, mult: number): number {\n const gainPerLevel = HacknetNodeConstants.MoneyGainPerLevel;\n\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 * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetNodeConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetNodeConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += HacknetNodeConstants.LevelBaseCost * Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return (HacknetNodeConstants.BaseCost / 2) * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetNodeConstants.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 * HacknetNodeConstants.RamBaseCost;\n const mult = Math.pow(HacknetNodeConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCore: number, extraLevels = 1, costMult = 1): number {\n const sanitizedCores = Math.round(extraLevels);\n if (isNaN(sanitizedCores) || sanitizedCores < 1) {\n return 0;\n }\n\n if (startingCore >= HacknetNodeConstants.MaxCores) {\n return Infinity;\n }\n\n const coreBaseCost = HacknetNodeConstants.CoreBaseCost;\n const mult = HacknetNodeConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCore;\n for (let i = 0; i < sanitizedCores; ++i) {\n totalCost += coreBaseCost * Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateNodeCost(n: number, mult = 1): number {\n if (n <= 0) {\n return 0;\n }\n return HacknetNodeConstants.BaseCost * Math.pow(HacknetNodeConstants.PurchaseNextMult, n - 1) * mult;\n}\n","import * as React from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nconst gainLimit = 10e9;\n\nexport function win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n}\n\nexport function reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n}\n\nexport class Game extends React.Component {\n win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n }\n\n reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n }\n}\n","const _ = false;\nconst X = true;\nexport const Shapes: {\n O: boolean[][];\n I: boolean[][];\n L: boolean[][];\n J: boolean[][];\n S: boolean[][];\n Z: boolean[][];\n T: boolean[][];\n} = {\n O: [\n [X, X],\n [X, X],\n ],\n I: [[X, X, X, X]],\n L: [\n [_, _, X],\n [X, X, X],\n ],\n J: [\n [X, _, _],\n [X, X, X],\n ],\n S: [\n [_, X, X],\n [X, X, _],\n ],\n Z: [\n [X, X, _],\n [_, X, X],\n ],\n T: [\n [X, X, X],\n [_, X, _],\n ],\n};\n","import React, { useEffect } from \"react\";\n\ninterface IProps {\n onKeyDown: (this: Document, event: KeyboardEvent) => void;\n onFailure: (options?: { automated: boolean }) => void;\n}\n\nexport function KeyHandler(props: IProps): React.ReactElement {\n useEffect(() => {\n function press(this: Document, event: KeyboardEvent): void {\n if (!event.isTrusted) return;\n const f = props.onKeyDown.bind(this);\n f(event);\n }\n document.addEventListener(\"keydown\", press);\n return () => document.removeEventListener(\"keydown\", press);\n });\n\n // invisible autofocused element that eats all the keypress for the minigames.\n return <>;\n}\n","import LinearProgress from \"@mui/material/LinearProgress\";\nimport React, { useState, useEffect } from \"react\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport Grid from \"@mui/material/Grid\";\n\nconst TimerProgress = withStyles((theme: Theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n },\n bar: {\n transition: \"none\",\n backgroundColor: theme.palette.primary.main,\n },\n}))(LinearProgress);\n\ninterface IProps {\n millis: number;\n onExpire: () => void;\n}\n\nexport function GameTimer(props: IProps): React.ReactElement {\n const [v, setV] = useState(100);\n\n const tick = 200;\n 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 }, []);\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 return (\n \n \n \n );\n}\n","interface DifficultySetting {\n [key: string]: number;\n}\n\ninterface DifficultySettings {\n Trivial: DifficultySetting;\n Normal: DifficultySetting;\n Hard: DifficultySetting;\n Impossible: DifficultySetting;\n}\n\n// I could use `any` to simply some of this but I also want to take advantage\n// of the type safety that typescript provides. I'm just not sure how in this\n// case.\nexport function interpolate(settings: DifficultySettings, n: number, out: DifficultySetting): DifficultySetting {\n // interpolates between 2 difficulties.\n function lerpD(a: DifficultySetting, b: DifficultySetting, t: number): DifficultySetting {\n // interpolates between 2 numbers.\n function lerp(x: number, y: number, t: number): number {\n return (1 - t) * x + t * y;\n }\n for (const key of Object.keys(a)) {\n out[key] = lerp(a[key], b[key], t);\n }\n return a;\n }\n if (n < 0) return lerpD(settings.Trivial, settings.Trivial, 0);\n if (n >= 0 && n < 1) return lerpD(settings.Trivial, settings.Normal, n);\n if (n >= 1 && n < 2) return lerpD(settings.Normal, settings.Hard, n - 1);\n if (n >= 2 && n < 3) return lerpD(settings.Hard, settings.Impossible, n - 2);\n return lerpD(settings.Impossible, settings.Impossible, 0);\n}\n","/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\nimport { City } from \"./City\";\nimport { Cities } from \"./Cities\";\nimport { Location, IConstructorParams } from \"./Location\";\nimport { CityName } from \"./data/CityNames\";\nimport { LocationsMetadata } from \"./data/LocationsMetadata\";\n\nimport { IMap } from \"../types\";\n\nexport const Locations: IMap = {};\n\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\nfunction constructLocation(p: IConstructorParams): Location {\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) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new Location(p);\n\n return Locations[p.name];\n}\n\n// First construct all cities\nCities[CityName.Aevum] = new City(CityName.Aevum);\nCities[CityName.Chongqing] = new City(CityName.Chongqing);\nCities[CityName.Ishima] = new City(CityName.Ishima);\nCities[CityName.NewTokyo] = new City(CityName.NewTokyo);\nCities[CityName.Sector12] = new City(CityName.Sector12);\nCities[CityName.Volhaven] = new City(CityName.Volhaven);\n\nCities[CityName.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 `;\nCities[CityName.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------G-- \n / 39 | 41 [church] \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 `;\nCities[CityName.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 [glitch] \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ H \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 `;\nCities[CityName.NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n [arcade] E [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 H \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--F--x-----x-----x---+---x----x--I--x-o \n | \n | \n o 17 \n \n \n \n G [the slums] \n `;\nCities[CityName.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] `;\nCities[CityName.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 `;\n\n// Then construct all locations, and add them to the cities as we go.\nfor (const metadata of LocationsMetadata) {\n const loc = constructLocation(metadata);\n\n const cityName = loc.city;\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city of Object.keys(Cities)) {\n Cities[city].addLocation(loc.name);\n }\n } else {\n Cities[cityName].addLocation(loc.name);\n }\n}\n","import React from \"react\";\nimport { BitNodeMultipliers } from \"./BitNodeMultipliers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { CityName } from \"../Locations/data/CityNames\";\n\nclass BitNode {\n // A short description, or tagline, about the BitNode\n desc: string;\n\n // A long, detailed overview of the BitNode\n info: JSX.Element;\n\n // Name of BitNode\n name: string;\n\n // BitNode number\n number: number;\n\n difficulty: 0 | 1 | 2;\n\n constructor(n: number, difficulty: 0 | 1 | 2, name: string, desc = \"\", info: JSX.Element = <>) {\n this.number = n;\n this.difficulty = difficulty;\n this.name = name;\n this.desc = desc;\n this.info = info;\n }\n}\n\nexport const BitNodes: IMap = {};\n\nBitNodes[\"BitNode1\"] = new BitNode(\n 1,\n 0,\n \"Source Genesis\",\n \"The original BitNode\",\n (\n <>\n The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and\n testing-grounds for all of the BitNodes that followed.\n
\n
\n This is the first BitNode that you play through. It has no special modifications or mechanics.\n
\n
\n Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when\n entering a new BitNode, and also increases all of the player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nBitNodes[\"BitNode2\"] = new BitNode(\n 2,\n 0,\n \"Rise of the Underworld\",\n \"From the shadows, they rose\", //Gangs\n (\n <>\n From the shadows, they rose.\n
\n
\n Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the\n 2050s. As society and civilization broke down, people quickly succumbed to the innate human impulse of evil and\n savagery. The organized crime factions quickly rose to the top of the modern world.\n
\n
\n In this BitNode:\n
\n
\n Your hacking level is reduced by 20%\n
\n The growth rate and maximum amount of money available on servers are significantly decreased\n
\n The amount of money gained from crimes and Infiltration is tripled\n
\n Certain Factions ({FactionNames.SlumSnakes}, {FactionNames.Tetrads}, {FactionNames.TheSyndicate},{\" \"}\n {FactionNames.TheDarkArmy}, {FactionNames.SpeakersForTheDead}, {FactionNames.NiteSec}, {FactionNames.TheBlackHand}\n ) give the player the ability to form and manage their own gangs. These gangs will earn the player money and\n reputation with the corresponding Faction\n
\n Every Augmentation in the game will be available through the Factions listed above\n
\n For every Faction NOT listed above, reputation gains are halved\n
\n You will no longer gain passive reputation with Factions\n
\n
\n Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases\n to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nBitNodes[\"BitNode3\"] = new BitNode(\n 3,\n 0,\n \"Corporatocracy\",\n \"The Price of Civilization\",\n (\n <>\n Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.\n
\n
\n Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy,\n and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own\n community, and evict their neighbors from houses in their desperate bid to increase their wealth.\n
\n
\n In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential\n of generating massive profits. All other forms of income are reduced by 75%. Furthermore:
\n
\n The price and reputation cost of all Augmentations is tripled\n
\n The starting and maximum amount of money on servers is reduced by 75%\n
\n Server growth rate is reduced by 80%\n
\n You now only need 75 favour with a faction in order to donate to it, rather than 150\n
\n
\n Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some\n BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers\n by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode4\"] = new BitNode(\n 4,\n 1,\n \"The Singularity\",\n \"The Man and the Machine\",\n (\n <>\n The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are\n more machine than man.
\n
\n In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most\n methods of earning money will now give significantly less.\n
\n
\n In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These\n functions allow you to control most aspects of the game through scripts, including working for factions/companies,\n purchasing/installing Augmentations, and creating programs.\n
\n
\n Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes.\n Each level of this Source-File reduces the RAM cost of singularity functions.\n \n ),\n);\nBitNodes[\"BitNode5\"] = new BitNode(\n 5,\n 1,\n \"Artificial Intelligence\",\n \"Posthuman\",\n (\n <>\n They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't\n be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that\n couldn't be modeled by 1's and 0's. They were wrong.\n
\n
\n In this BitNode:\n
\n
\n The base security level of servers is doubled\n
\n The starting money on servers is halved, but the maximum money remains the same\n
\n Most methods of earning money now give significantly less\n
\n Infiltration gives 50% more reputation and money\n
\n Corporations have 50% lower valuations and are therefore less profitable\n
\n Augmentations are more expensive\n
\n Hacking experience gain rates are reduced\n
\n
\n Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is\n unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence\n experience is much slower than other stats. Higher Intelligence levels will boost your production for many actions\n in the game.
\n
\n In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with\n Formulas.exe, and will also raise all of your hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode6\"] = new BitNode(\n 6,\n 1,\n FactionNames.Bladeburners,\n \"Like Tears in Rain\",\n (\n <>\n In the middle of the 21st century, {FactionNames.OmniTekIncorporated} began designing and manufacturing advanced\n synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth\n generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was\n the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more\n intelligent than the humans that had created them.\n
\n
\n In this BitNode you will be able to access the {FactionNames.Bladeburners} Division at the NSA, which provides a\n new mechanic for progression. Furthermore:\n
\n
\n Hacking and Hacknet Nodes will be less profitable\n
\n Your hacking level is reduced by 65%\n
\n Hacking experience gain from scripts is reduced by 75%\n
\n Corporations have 80% lower valuations and are therefore less profitable\n
\n Working for companies is 50% less profitable\n
\n Crimes and Infiltration are 25% less profitable\n
\n
\n Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the NSA's {FactionNames.Bladeburners} Division\n in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your\n combat stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode7\"] = new BitNode(\n 7,\n 2,\n `${FactionNames.Bladeburners} 2079`,\n \"More human than humans\",\n (\n <>\n In the middle of the 21st century, you were doing cutting-edge work at {FactionNames.OmniTekIncorporated} as part\n of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major\n technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a\n hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models\n that were stronger, faster, and more intelligent than the humans that had created them.\n
\n
\n In this BitNode you will be able to access the {FactionNames.Bladeburners} API, which allows you to access{\" \"}\n {FactionNames.Bladeburners}\n functionality through Netscript. Furthermore:
\n
\n The rank you gain from {FactionNames.Bladeburners} contracts/operations is reduced by 40%\n
\n {FactionNames.Bladeburners} skills cost twice as many skill points\n
\n Augmentations are 3x more expensive\n
\n Hacking and Hacknet Nodes will be significantly less profitable\n
\n Your hacking level is reduced by 65%\n
\n Hacking experience gain from scripts is reduced by 75%\n
\n Corporations have 80% lower valuations and are therefore less profitable\n
\n Working for companies is 50% less profitable\n
\n Crimes and Infiltration are 25% less profitable\n
\n
\n Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the {FactionNames.Bladeburners} Netscript API in\n other BitNodes. In addition, this Source-File will increase all of your {FactionNames.Bladeburners} multipliers\n by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode8\"] = new BitNode(\n 8,\n 2,\n \"Ghost of Wall Street\",\n \"Money never sleeps\",\n (\n <>\n You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.\n
\n
\n In this BitNode:\n
\n
\n You start with $250 million\n
\n The only way to earn money is by trading on the stock market\n
\n You start with a WSE membership and access to the TIX API\n
\n You are able to short stocks and place different types of orders (limit/stop)\n
\n You can immediately donate to factions to gain reputation\n
\n
\n Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nBitNodes[\"BitNode9\"] = new BitNode(\n 9,\n 2,\n \"Hacktocracy\",\n \"Hacknet Unleashed\",\n (\n <>\n When {FactionNames.FulcrumSecretTechnologies} released their open-source Linux distro Chapeau, it quickly became\n the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the\n Hacknet, a global, decentralized network used for nefarious purposes. {FactionNames.FulcrumSecretTechnologies}{\" \"}\n quickly abandoned the project and dissociated themselves from it.\n
\n
\n This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes,\n which can be spent on a variety of different upgrades.\n
\n
\n In this BitNode:\n
\n
\n Your stats are significantly decreased\n
\n You cannnot purchase additional servers\n
\n Hacking is significantly less profitable\n
\n
\n Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode10\"] = new BitNode(\n 10,\n 2,\n \"Digital Carbon\",\n \"Your body is not who you are\",\n (\n <>\n In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their\n consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the\n digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally\n achieved immortality - at least for those that could afford it.\n
\n
\n This BitNode unlocks Sleeve technology. Sleeve technology allows you to:\n
\n
\n 1. Grafting: Visit VitaLife in New Tokyo to be able to obtain Augmentations without needing to install\n
\n 2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks\n synchronously\n
\n
\n In this BitNode:\n
\n
\n Your stats are significantly decreased\n
\n All methods of gaining money are half as profitable (except Stock Market)\n
\n Purchased servers are more expensive, have less max RAM, and a lower maximum limit\n
\n Augmentations are 5x as expensive and require twice as much reputation\n
\n
\n Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this\n Source-File also grants you a Duplicate Sleeve\n \n ),\n);\nBitNodes[\"BitNode11\"] = new BitNode(\n 11,\n 1,\n \"The Big Crash\",\n \"Okay. Sell it all.\",\n (\n <>\n The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around\n the world. It was this period of disorder that eventually lead to the governmental reformation of many global\n superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark\n times, financial catastrophe hit.\n
\n
\n In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of\n this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic\n banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the\n world is slowly crumbling in the middle of the biggest economic crisis of all time.\n
\n
\n In this BitNode:\n
\n
\n Your hacking stat and experience gain are halved\n
\n The starting and maximum amount of money available on servers is significantly decreased\n
\n The growth rate of servers is significantly reduced\n
\n Weakening a server is twice as effective\n
\n Company wages are decreased by 50%\n
\n Corporation valuations are 90% lower and are therefore significantly less profitable\n
\n Hacknet Node production is significantly decreased\n
\n Crime and Infiltration are more lucrative\n
\n Augmentations are twice as expensive\n
\n
\n Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and\n reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also\n increases the player's company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nBitNodes[\"BitNode12\"] = new BitNode(\n 12,\n 0,\n \"The Recursion\",\n \"Repeat.\",\n (\n <>\n To iterate is human, to recurse divine.\n
\n
\n Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you\n Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for\n Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the\n level of this source file.\n \n ),\n);\nBitNodes[\"BitNode13\"] = new BitNode(\n 13,\n 2,\n \"They're lunatics\",\n \"1 step back, 2 steps forward\",\n (\n <>\n With the invention of Augmentations in the 2040s a religious group known as the{\" \"}\n {FactionNames.ChurchOfTheMachineGod} has rallied far more support than anyone would have hoped.\n
\n
\n Their leader, Allison \"Mother\" Stanek is said to have created her own Augmentation whose power goes beyond any\n other. Find her in {CityName.Chongqing} and gain her trust.\n
\n
\n In this BitNode:\n
\n
\n Every stat is significantly reduced\n
\n Stanek's Gift power is significantly increased.\n
\n
\n Destroying this BitNode will give you Source-File 13, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the {FactionNames.ChurchOfTheMachineGod} appear in other\n BitNodes.\n
\n
\n Each level of this Source-File increases the size of Stanek's Gift.\n \n ),\n);\n// Books: Frontera, Shiner\nBitNodes[\"BitNode14\"] = new BitNode(14, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode15\"] = new BitNode(15, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode16\"] = new BitNode(16, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode17\"] = new BitNode(17, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode18\"] = new BitNode(18, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode19\"] = new BitNode(19, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode20\"] = new BitNode(20, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode21\"] = new BitNode(21, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode22\"] = new BitNode(22, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode23\"] = new BitNode(23, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode24\"] = new BitNode(24, 2, \"\", \"COMING SOON\");\n\nexport function initBitNodeMultipliers(p: IPlayer): void {\n if (p.bitNodeN == null) {\n p.bitNodeN = 1;\n }\n for (const mult of Object.keys(BitNodeMultipliers)) {\n if (BitNodeMultipliers.hasOwnProperty(mult)) {\n BitNodeMultipliers[mult] = 1;\n }\n }\n // Special case.\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n\n switch (p.bitNodeN) {\n case 1: // Source Genesis (every multiplier is 1)\n break;\n case 2: // Rise of the Underworld\n BitNodeMultipliers.HackingLevelMultiplier = 0.8;\n BitNodeMultipliers.ServerGrowthRate = 0.8;\n BitNodeMultipliers.ServerMaxMoney = 0.2;\n BitNodeMultipliers.ServerStartingMoney = 0.4;\n BitNodeMultipliers.CrimeMoney = 3;\n BitNodeMultipliers.InfiltrationMoney = 3;\n BitNodeMultipliers.FactionWorkRepGain = 0.5;\n BitNodeMultipliers.FactionPassiveRepGain = 0;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 2;\n BitNodeMultipliers.StaneksGiftExtraSize = -6;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.3;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 5;\n break;\n case 3: // Corporatocracy\n BitNodeMultipliers.HackingLevelMultiplier = 0.8;\n BitNodeMultipliers.RepToDonateToFaction = 0.5;\n BitNodeMultipliers.AugmentationRepCost = 3;\n BitNodeMultipliers.AugmentationMoneyCost = 3;\n BitNodeMultipliers.ServerMaxMoney = 0.2;\n BitNodeMultipliers.ServerStartingMoney = 0.2;\n BitNodeMultipliers.ServerGrowthRate = 0.2;\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.25;\n BitNodeMultipliers.CrimeMoney = 0.25;\n BitNodeMultipliers.HacknetNodeMoney = 0.25;\n BitNodeMultipliers.HomeComputerRamCost = 1.5;\n BitNodeMultipliers.PurchasedServerCost = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75;\n BitNodeMultipliers.StaneksGiftExtraSize = -2;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.3;\n BitNodeMultipliers.GangSoftcap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.5;\n break;\n case 4: // The Singularity\n BitNodeMultipliers.ServerMaxMoney = 0.15;\n BitNodeMultipliers.ServerStartingMoney = 0.75;\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.1;\n BitNodeMultipliers.CrimeMoney = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.05;\n BitNodeMultipliers.CompanyWorkExpGain = 0.5;\n BitNodeMultipliers.ClassGymExpGain = 0.5;\n BitNodeMultipliers.FactionWorkExpGain = 0.5;\n BitNodeMultipliers.HackExpGain = 0.4;\n BitNodeMultipliers.CrimeExpGain = 0.5;\n BitNodeMultipliers.FactionWorkRepGain = 0.75;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.2;\n BitNodeMultipliers.WorldDaemonDifficulty = 3;\n BitNodeMultipliers.GangUniqueAugs = 0.5;\n break;\n case 5: // Artificial intelligence\n BitNodeMultipliers.ServerMaxMoney = 2;\n BitNodeMultipliers.ServerStartingSecurity = 2;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.15;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.InfiltrationRep = 1.5;\n BitNodeMultipliers.InfiltrationMoney = 1.5;\n BitNodeMultipliers.AugmentationMoneyCost = 2;\n BitNodeMultipliers.HackExpGain = 0.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.3;\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.2;\n BitNodeMultipliers.WorldDaemonDifficulty = 1.5;\n BitNodeMultipliers.GangUniqueAugs = 0.5;\n break;\n case 6: // Bladeburner\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.ServerMaxMoney = 0.4;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n BitNodeMultipliers.ScriptHackMoney = 0.75;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.75;\n BitNodeMultipliers.InfiltrationMoney = 0.75;\n BitNodeMultipliers.CorporationValuation = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.HackExpGain = 0.25;\n BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 2;\n BitNodeMultipliers.GangSoftcap = 0.7;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.2;\n break;\n case 7: // Bladeburner 2079\n BitNodeMultipliers.BladeburnerRank = 0.6;\n BitNodeMultipliers.BladeburnerSkillCost = 2;\n BitNodeMultipliers.AugmentationMoneyCost = 3;\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.ServerMaxMoney = 0.4;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n BitNodeMultipliers.ScriptHackMoney = 0.5;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.75;\n BitNodeMultipliers.InfiltrationMoney = 0.75;\n BitNodeMultipliers.CorporationValuation = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.HackExpGain = 0.25;\n BitNodeMultipliers.FourSigmaMarketDataCost = 2;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 2;\n BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.9;\n BitNodeMultipliers.StaneksGiftExtraSize = -1;\n BitNodeMultipliers.GangSoftcap = 0.7;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.2;\n break;\n case 8: // Ghost of Wall Street\n BitNodeMultipliers.ScriptHackMoney = 0.3;\n BitNodeMultipliers.ScriptHackMoneyGain = 0;\n BitNodeMultipliers.ManualHackMoney = 0;\n BitNodeMultipliers.CompanyWorkMoney = 0;\n BitNodeMultipliers.CrimeMoney = 0;\n BitNodeMultipliers.HacknetNodeMoney = 0;\n BitNodeMultipliers.InfiltrationMoney = 0;\n BitNodeMultipliers.RepToDonateToFaction = 0;\n BitNodeMultipliers.CorporationValuation = 0;\n BitNodeMultipliers.CodingContractMoney = 0;\n BitNodeMultipliers.StaneksGiftExtraSize = -7;\n BitNodeMultipliers.PurchasedServerSoftcap = 4;\n BitNodeMultipliers.GangSoftcap = 0;\n BitNodeMultipliers.CorporationSoftCap = 0;\n BitNodeMultipliers.GangUniqueAugs = 0;\n break;\n case 9: // Hacktocracy\n BitNodeMultipliers.HackingLevelMultiplier = 0.5;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.45;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.45;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.45;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.45;\n BitNodeMultipliers.CharismaLevelMultiplier = 0.45;\n BitNodeMultipliers.PurchasedServerLimit = 0;\n BitNodeMultipliers.HomeComputerRamCost = 5;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.1;\n BitNodeMultipliers.HackExpGain = 0.05;\n BitNodeMultipliers.ServerStartingMoney = 0.1;\n BitNodeMultipliers.ServerMaxMoney = 0.1;\n BitNodeMultipliers.ServerStartingSecurity = 2.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.FourSigmaMarketDataCost = 5;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;\n BitNodeMultipliers.BladeburnerRank = 0.9;\n BitNodeMultipliers.BladeburnerSkillCost = 1.2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 2;\n BitNodeMultipliers.GangSoftcap = 0.8;\n BitNodeMultipliers.CorporationSoftCap = 0.7;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.25;\n break;\n case 10: // Digital Carbon\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.4;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.4;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.4;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.4;\n BitNodeMultipliers.CharismaLevelMultiplier = 0.4;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.HacknetNodeMoney = 0.5;\n BitNodeMultipliers.ManualHackMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.5;\n BitNodeMultipliers.CodingContractMoney = 0.5;\n BitNodeMultipliers.InfiltrationMoney = 0.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.AugmentationMoneyCost = 5;\n BitNodeMultipliers.AugmentationRepCost = 2;\n BitNodeMultipliers.HomeComputerRamCost = 1.5;\n BitNodeMultipliers.PurchasedServerCost = 5;\n BitNodeMultipliers.PurchasedServerLimit = 0.6;\n BitNodeMultipliers.PurchasedServerMaxRam = 0.5;\n BitNodeMultipliers.BladeburnerRank = 0.8;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75;\n BitNodeMultipliers.StaneksGiftExtraSize = -3;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.1;\n BitNodeMultipliers.GangSoftcap = 0.9;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.25;\n break;\n case 11: //The Big Crash\n BitNodeMultipliers.HackingLevelMultiplier = 0.6;\n BitNodeMultipliers.HackExpGain = 0.5;\n BitNodeMultipliers.ServerMaxMoney = 0.1;\n BitNodeMultipliers.ServerStartingMoney = 0.1;\n BitNodeMultipliers.ServerGrowthRate = 0.2;\n BitNodeMultipliers.ServerWeakenRate = 2;\n BitNodeMultipliers.CrimeMoney = 3;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.HacknetNodeMoney = 0.1;\n BitNodeMultipliers.AugmentationMoneyCost = 2;\n BitNodeMultipliers.InfiltrationMoney = 2.5;\n BitNodeMultipliers.InfiltrationRep = 2.5;\n BitNodeMultipliers.CorporationValuation = 0.1;\n BitNodeMultipliers.CodingContractMoney = 0.25;\n BitNodeMultipliers.FourSigmaMarketDataCost = 4;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 1.5;\n BitNodeMultipliers.GangUniqueAugs = 0.75;\n break;\n case 12: {\n //The Recursion\n let sf12Lvl = 0;\n for (let i = 0; i < p.sourceFiles.length; i++) {\n if (p.sourceFiles[i].n === 12) {\n sf12Lvl = p.sourceFiles[i].lvl;\n }\n }\n const inc = Math.pow(1.02, sf12Lvl);\n const dec = 1 / inc;\n\n // Multiplier for number of augs needed for Daedalus increases\n // up to a maximum of 1.34, which results in 40 Augs required\n BitNodeMultipliers.DaedalusAugsRequirement = Math.min(inc, 1.34);\n\n BitNodeMultipliers.HackingLevelMultiplier = dec;\n BitNodeMultipliers.StrengthLevelMultiplier = dec;\n BitNodeMultipliers.DefenseLevelMultiplier = dec;\n BitNodeMultipliers.DexterityLevelMultiplier = dec;\n BitNodeMultipliers.AgilityLevelMultiplier = dec;\n BitNodeMultipliers.CharismaLevelMultiplier = dec;\n\n BitNodeMultipliers.ServerMaxMoney = dec;\n BitNodeMultipliers.ServerStartingMoney = dec;\n BitNodeMultipliers.ServerGrowthRate = dec;\n BitNodeMultipliers.ServerWeakenRate = dec;\n\n //Does not scale, otherwise security might start at 300+\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n\n BitNodeMultipliers.HomeComputerRamCost = inc;\n\n BitNodeMultipliers.PurchasedServerCost = inc;\n BitNodeMultipliers.PurchasedServerLimit = dec;\n BitNodeMultipliers.PurchasedServerMaxRam = dec;\n BitNodeMultipliers.PurchasedServerSoftcap = inc;\n\n BitNodeMultipliers.ManualHackMoney = dec;\n BitNodeMultipliers.ScriptHackMoney = dec;\n BitNodeMultipliers.CompanyWorkMoney = dec;\n BitNodeMultipliers.CrimeMoney = dec;\n BitNodeMultipliers.HacknetNodeMoney = dec;\n BitNodeMultipliers.CodingContractMoney = dec;\n\n BitNodeMultipliers.CompanyWorkExpGain = dec;\n BitNodeMultipliers.ClassGymExpGain = dec;\n BitNodeMultipliers.FactionWorkExpGain = dec;\n BitNodeMultipliers.HackExpGain = dec;\n BitNodeMultipliers.CrimeExpGain = dec;\n\n BitNodeMultipliers.FactionWorkRepGain = dec;\n BitNodeMultipliers.FactionPassiveRepGain = dec;\n BitNodeMultipliers.RepToDonateToFaction = inc;\n\n BitNodeMultipliers.AugmentationRepCost = inc;\n BitNodeMultipliers.AugmentationMoneyCost = inc;\n\n BitNodeMultipliers.InfiltrationMoney = dec;\n BitNodeMultipliers.InfiltrationRep = dec;\n\n BitNodeMultipliers.FourSigmaMarketDataCost = inc;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = inc;\n\n BitNodeMultipliers.CorporationValuation = dec;\n\n BitNodeMultipliers.BladeburnerRank = dec;\n BitNodeMultipliers.BladeburnerSkillCost = inc;\n\n BitNodeMultipliers.StaneksGiftPowerMultiplier = inc;\n BitNodeMultipliers.StaneksGiftExtraSize = inc;\n BitNodeMultipliers.GangSoftcap = 0.8;\n BitNodeMultipliers.CorporationSoftCap = 0.8;\n BitNodeMultipliers.WorldDaemonDifficulty = inc;\n\n BitNodeMultipliers.GangUniqueAugs = dec;\n break;\n }\n case 13: {\n BitNodeMultipliers.PurchasedServerSoftcap = 1.6;\n\n BitNodeMultipliers.HackingLevelMultiplier = 0.25;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.7;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.7;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.7;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.7;\n\n BitNodeMultipliers.ServerMaxMoney = 0.45;\n BitNodeMultipliers.ServerStartingMoney = 0.75;\n\n BitNodeMultipliers.ServerStartingSecurity = 3;\n\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.4;\n BitNodeMultipliers.CrimeMoney = 0.4;\n BitNodeMultipliers.HacknetNodeMoney = 0.4;\n BitNodeMultipliers.CodingContractMoney = 0.4;\n\n BitNodeMultipliers.CompanyWorkExpGain = 0.5;\n BitNodeMultipliers.ClassGymExpGain = 0.5;\n BitNodeMultipliers.FactionWorkExpGain = 0.5;\n BitNodeMultipliers.HackExpGain = 0.1;\n BitNodeMultipliers.CrimeExpGain = 0.5;\n\n BitNodeMultipliers.FactionWorkRepGain = 0.6;\n\n BitNodeMultipliers.FourSigmaMarketDataCost = 10;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 10;\n\n BitNodeMultipliers.CorporationValuation = 0.001;\n\n BitNodeMultipliers.BladeburnerRank = 0.45;\n BitNodeMultipliers.BladeburnerSkillCost = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 2;\n BitNodeMultipliers.StaneksGiftExtraSize = 1;\n BitNodeMultipliers.GangSoftcap = 0.3;\n BitNodeMultipliers.CorporationSoftCap = 0.3;\n BitNodeMultipliers.WorldDaemonDifficulty = 3;\n BitNodeMultipliers.GangUniqueAugs = 0.1;\n break;\n }\n default:\n console.warn(\"Player.bitNodeN invalid\");\n break;\n }\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 */\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { CONSTANTS } from \"../Constants\";\n\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateCoreUpgradeCost,\n calculateRamUpgradeCost,\n} from \"./formulas/HacknetNodes\";\nimport { HacknetNodeConstants } from \"./data/Constants\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { ObjectValidator, minMax } from \"../utils/Validator\";\n\nexport class HacknetNode implements IHacknetNode {\n\n static validationData: ObjectValidator = {\n cores: minMax(1, 1, HacknetNodeConstants.MaxCores),\n level: minMax(1, 1, HacknetNodeConstants.MaxLevel),\n ram: minMax(1, 1, HacknetNodeConstants.MaxRam),\n onlineTimeSeconds: minMax(0, 0, Infinity),\n totalMoneyGenerated: minMax(0, 0, Infinity)\n }\n\n // Node's number of cores\n cores = 1;\n\n // Node's Level\n level = 1;\n\n // Node's production per second\n moneyGainRatePerSecond = 0;\n\n // Identifier for Node. Includes the full \"name\" (hacknet-node-N)\n name: string;\n\n // How long this Node has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Node's RAM (GB)\n ram = 1;\n\n // Total money earned by this Node\n totalMoneyGenerated = 0;\n\n constructor(name = \"\", prodMult = 1) {\n this.name = name;\n\n this.updateMoneyGainRate(prodMult);\n }\n\n // Get the cost to upgrade this Node's number of cores\n calculateCoreUpgradeCost(levels = 1, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's level\n calculateLevelUpgradeCost(levels = 1, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's RAM\n calculateRamUpgradeCost(levels = 1, costMult: number): number {\n return calculateRamUpgradeCost(this.ram, levels, costMult);\n }\n\n // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\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\n return gain;\n }\n\n // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n upgradeCore(levels = 1, prodMult: number): void {\n this.cores = Math.min(HacknetNodeConstants.MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n upgradeLevel(levels = 1, prodMult: number): void {\n this.level = Math.min(HacknetNodeConstants.MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n upgradeRam(levels = 1, prodMult: number): void {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n this.updateMoneyGainRate(prodMult);\n }\n\n // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n updateMoneyGainRate(prodMult: number): void {\n this.moneyGainRatePerSecond = calculateMoneyGainRate(this.level, this.ram, this.cores, prodMult);\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n dialogBoxCreate(\"Error in calculating Hacknet Node production. Please report to game developer\");\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"HacknetNode\", this);\n }\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 static fromJSON(value: any): HacknetNode {\n return Generic_fromJSON(HacknetNode, value.data);\n }\n}\n\nReviver.constructors.HacknetNode = HacknetNode;\n","/**\n * Implements functions for purchasing servers or purchasing more RAM for\n * the home computer\n */\nimport { AddToAllServers, createUniqueRandomIp } from \"./AllServers\";\nimport { safetlyCreateUniqueServer } from \"./ServerHelpers\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isPowerOfTwo } from \"../utils/helpers/isPowerOfTwo\";\n\n// Returns the cost of purchasing a server with the given RAM\n// Returns Infinity for invalid 'ram' arguments\n/**\n * @param ram Amount of RAM on purchased server (GB)\n * @returns Cost of purchasing the given server. Returns infinity for invalid arguments\n */\nexport function getPurchaseServerCost(ram: number): number {\n const sanitizedRam = Math.round(ram);\n if (isNaN(sanitizedRam) || !isPowerOfTwo(sanitizedRam) || !(Math.sign(sanitizedRam) === 1)) {\n return Infinity;\n }\n\n if (sanitizedRam > getPurchaseServerMaxRam()) {\n return Infinity;\n }\n\n const upg = Math.max(0, Math.log(sanitizedRam) / Math.log(2) - 6);\n\n return (\n sanitizedRam *\n CONSTANTS.BaseCostFor1GBOfRamServer *\n BitNodeMultipliers.PurchasedServerCost *\n Math.pow(BitNodeMultipliers.PurchasedServerSoftcap, upg)\n );\n}\n\nexport function getPurchaseServerLimit(): number {\n return Math.round(CONSTANTS.PurchasedServerLimit * BitNodeMultipliers.PurchasedServerLimit);\n}\n\nexport function getPurchaseServerMaxRam(): number {\n const ram = Math.round(CONSTANTS.PurchasedServerMaxRam * BitNodeMultipliers.PurchasedServerMaxRam);\n\n // Round this to the nearest power of 2\n return 1 << (31 - Math.clz32(ram));\n}\n\n// Manually purchase a server (NOT through Netscript)\nexport function purchaseServer(hostname: string, ram: number, cost: number, p: IPlayer): void {\n //Check if player has enough money\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You don't have enough money to purchase this server!\");\n return;\n }\n\n //Maximum server limit\n if (p.purchasedServers.length >= getPurchaseServerLimit()) {\n dialogBoxCreate(\n \"You have reached the maximum limit of \" +\n getPurchaseServerLimit() +\n \" servers. \" +\n \"You cannot purchase any more. You can \" +\n \"delete some of your purchased servers using the deleteServer() Netscript function in a script\",\n );\n return;\n }\n\n if (hostname == \"\") {\n dialogBoxCreate(\"You must enter a hostname for your new server!\");\n return;\n }\n\n // Create server\n const newServ = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: hostname,\n ip: createUniqueRandomIp(),\n isConnectedTo: false,\n maxRam: ram,\n organizationName: \"\",\n purchasedByPlayer: true,\n });\n AddToAllServers(newServ);\n\n // Add to Player's purchasedServers array\n p.purchasedServers.push(newServ.hostname);\n\n // Connect new server to home computer\n const homeComputer = p.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n\n p.loseMoney(cost, \"servers\");\n\n dialogBoxCreate(\"Server successfully purchased with hostname \" + newServ.hostname);\n}\n\n// Manually upgrade RAM on home computer (NOT through Netscript)\nexport function purchaseRamForHomeComputer(p: IPlayer): void {\n const cost = p.getUpgradeHomeRamCost();\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You do not have enough money to purchase additional RAM for your home computer\");\n return;\n }\n\n const homeComputer = p.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n dialogBoxCreate(`You cannot upgrade your home computer RAM because it is at its maximum possible value`);\n return;\n }\n\n homeComputer.maxRam *= 2;\n p.loseMoney(cost, \"servers\");\n}\n","import { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\nimport { removeLeadingSlash, isInRootDirectory } from \"./Terminal/DirectoryHelpers\"\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\nexport class TextFile {\n /**\n * The full file name.\n */\n fn: string;\n\n /**\n * The content of the file.\n */\n text: string;\n\n /**\n * The full file name.\n */\n get filename(): string {\n return this.fn;\n }\n\n /**\n * The full file name.\n */\n set filename(value: string) {\n this.fn = value;\n }\n\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n\n /**\n * Concatenates the raw values to the end of current content.\n */\n append(txt: string): void {\n this.text += txt;\n }\n\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n download(): void {\n const filename: string = this.fn;\n const file: Blob = new Blob([this.text], { type: \"text/plain\" });\n /* tslint:disable-next-line:strict-boolean-expressions */\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a: HTMLAnchorElement = document.createElement(\"a\");\n const url: string = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n\n /**\n * Retrieve the content of the file.\n */\n read(): string {\n return this.text;\n }\n\n /**\n * Shows the content to the user via the game's dialog box.\n */\n show(): void {\n dialogBoxCreate(`${this.fn}

${this.text}`);\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"TextFile\", this);\n }\n\n /**\n * Replaces the current content with the text provided.\n */\n write(txt: string): void {\n this.text = txt;\n }\n\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): TextFile {\n return Generic_fromJSON(TextFile, value.data);\n }\n}\n\nReviver.constructors.TextFile = TextFile;\n\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 */\nexport function getTextFile(fn: string, server: BaseServer): TextFile | null {\n let filename: string = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n if (isInRootDirectory(filename)) {\n filename = removeLeadingSlash(filename);\n }\n\n for (const file of server.textFiles as TextFile[]) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\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 */\nexport function createTextFile(fn: string, txt: string, server: BaseServer): TextFile | undefined {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n\n return undefined;\n }\n const file: TextFile = new TextFile(fn, txt);\n server.textFiles.push(file);\n\n return file;\n}\n","import { Skill } from \"./Skill\";\nimport { SkillNames } from \"./data/SkillNames\";\nimport { IMap } from \"../types\";\n\nexport const Skills: IMap = {};\n\n(function () {\n Skills[SkillNames.BladesIntuition] = new Skill({\n name: SkillNames.BladesIntuition,\n desc:\n \"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%\",\n baseCost: 3,\n costInc: 2.1,\n successChanceAll: 3,\n });\n Skills[SkillNames.Cloak] = new Skill({\n name: SkillNames.Cloak,\n desc:\n \"Each level of this skill increases your \" +\n \"success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%\",\n baseCost: 2,\n costInc: 1.1,\n successChanceStealth: 5.5,\n });\n Skills[SkillNames.ShortCircuit] = new Skill({\n name: SkillNames.ShortCircuit,\n desc:\n \"Each level of this skill increases your success chance \" +\n \"in Contracts, Operations, and BlackOps that involve retirement by 5.5%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceKill: 5.5,\n });\n Skills[SkillNames.DigitalObserver] = new Skill({\n name: SkillNames.DigitalObserver,\n desc: \"Each level of this skill increases your success chance in all Operations and BlackOps by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceOperation: 4,\n });\n Skills[SkillNames.Tracer] = new Skill({\n name: SkillNames.Tracer,\n desc: \"Each level of this skill increases your success chance in all Contracts by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceContract: 4,\n });\n Skills[SkillNames.Overclock] = new Skill({\n name: SkillNames.Overclock,\n desc:\n \"Each level of this skill decreases the time it takes \" +\n \"to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)\",\n baseCost: 3,\n costInc: 1.4,\n maxLvl: 90,\n actionTime: 1,\n });\n Skills[SkillNames.Reaper] = new Skill({\n name: SkillNames.Reaper,\n desc: \"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%\",\n baseCost: 2,\n costInc: 2.1,\n effStr: 2,\n effDef: 2,\n effDex: 2,\n effAgi: 2,\n });\n Skills[SkillNames.EvasiveSystem] = new Skill({\n name: SkillNames.EvasiveSystem,\n desc: \"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%\",\n baseCost: 2,\n costInc: 2.1,\n effDex: 4,\n effAgi: 4,\n });\n Skills[SkillNames.Datamancer] = new Skill({\n name: SkillNames.Datamancer,\n desc:\n \"Each level of this skill increases your effectiveness in \" +\n \"synthoid population analysis and investigation by 5%. \" +\n \"This affects all actions that can potentially increase \" +\n \"the accuracy of your synthoid population/community estimates.\",\n baseCost: 3,\n costInc: 1,\n successChanceEstimate: 5,\n });\n Skills[SkillNames.CybersEdge] = new Skill({\n name: SkillNames.CybersEdge,\n desc: \"Each level of this skill increases your max stamina by 2%\",\n baseCost: 1,\n costInc: 3,\n stamina: 2,\n });\n Skills[SkillNames.HandsOfMidas] = new Skill({\n name: SkillNames.HandsOfMidas,\n desc: \"Each level of this skill increases the amount of money you receive from Contracts by 10%\",\n baseCost: 2,\n costInc: 2.5,\n money: 10,\n });\n Skills[SkillNames.Hyperdrive] = new Skill({\n name: SkillNames.Hyperdrive,\n desc: \"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%\",\n baseCost: 1,\n costInc: 2.5,\n expGain: 10,\n });\n})();\n","import { gangMemberUpgradesMetadata } from \"./data/upgrades\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\n\nexport const GangMemberUpgrades: {\n [key: string]: GangMemberUpgrade;\n} = {};\n\n(function () {\n gangMemberUpgradesMetadata.forEach((e) => {\n GangMemberUpgrades[e.name] = new GangMemberUpgrade(e.name, e.cost, e.upgType, e.mults);\n });\n})();\n","/**\n * Stock Market Helper Functions\n */\nimport { Stock } from \"./Stock\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { CONSTANTS } from \"../Constants\";\n\n// Amount by which a stock's forecast changes during each price movement\nexport const forecastChangePerPriceMovement = 0.006;\n\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 */\nexport function getBuyTransactionCost(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\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 shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n\n // If the number of shares doesn't trigger a price movement, its a simple calculation\n if (isLong) {\n return shares * stock.getAskPrice() + CONSTANTS.StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + CONSTANTS.StockMarketCommission;\n }\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 */\nexport function getSellTransactionGain(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\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 shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n if (isLong) {\n return shares * stock.getBidPrice() - CONSTANTS.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.StockMarketCommission;\n\n return origCost + profit;\n }\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 */\nexport function processTransactionForecastMovement(stock: Stock, shares: number): void {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return;\n }\n\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 shares = Math.min(shares, stock.maxShares);\n\n // If there's only going to be one iteration at most\n const firstShares = stock.shareTxUntilMovement;\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\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 }\n\n // Calculate how many iterations of price changes we need to account for\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement);\n\n // If on the offchance we end up perfectly at the next price movement\n stock.shareTxUntilMovement =\n stock.shareTxForMovement - ((shares - stock.shareTxUntilMovement) % stock.shareTxForMovement);\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n }\n\n // Forecast always decreases in magnitude\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\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 */\nexport function calculateBuyMaxAmount(stock: Stock, posType: PositionTypes, money: number): number {\n if (!(stock instanceof Stock)) {\n return 0;\n }\n\n const isLong = posType === PositionTypes.Long;\n\n const remainingMoney = money - CONSTANTS.StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n\n return Math.floor(remainingMoney / currPrice);\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nexport function getStockMarket4SDataCost(): number {\n return CONSTANTS.MarketData4SCost * BitNodeMultipliers.FourSigmaMarketDataCost;\n}\n\nexport function getStockMarket4STixApiCost(): number {\n return CONSTANTS.MarketDataTixApi4SCost * BitNodeMultipliers.FourSigmaMarketDataApiCost;\n}\n\nexport function getStockMarketWseCost(): number {\n return CONSTANTS.WSEAccountCost;\n}\n\nexport function getStockMarketTixApiCost(): number {\n return CONSTANTS.TIXAPICost;\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { Player } from \"../Player\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { RunningScript } from \"./RunningScript\";\nimport { processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\n\nexport function scriptCalculateOfflineProduction(runningScript: RunningScript): void {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n let confidence = runningScript.onlineRunningTime / 14400;\n if (confidence >= 1) {\n confidence = 1;\n }\n\n //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n\n // Grow\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][2] == 0 || runningScript.dataMap[hostname][2] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n const timesGrown = Math.round(\n ((0.5 * runningScript.dataMap[hostname][2]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n if (!(serv instanceof Server)) throw new Error(\"trying to grow a non-normal server\");\n const growth = processSingleServerGrowth(serv, timesGrown, Player, host.cpuCores);\n runningScript.log(\n `'${serv.hostname}' grown by ${numeralWrapper.format(growth * 100 - 100, \"0.000000%\")} while offline`,\n );\n }\n }\n\n // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n const expGain = confidence * (runningScript.onlineExpGained / runningScript.onlineRunningTime) * timePassed;\n Player.gainHackingExp(expGain);\n\n // Update script stats\n runningScript.offlineRunningTime += timePassed;\n runningScript.offlineExpGained += expGain;\n\n // Weaken\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][3] == 0 || runningScript.dataMap[hostname][3] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n\n if (!(serv instanceof Server)) throw new Error(\"trying to weaken a non-normal server\");\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n const timesWeakened = Math.round(\n ((0.5 * runningScript.dataMap[hostname][3]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(CONSTANTS.ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n}\n\n//Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\nexport function findRunningScript(\n filename: string,\n args: (string | number | boolean)[],\n server: BaseServer,\n): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && compareArrays(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n\n//Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\nexport function findRunningScriptByPid(pid: number, server: BaseServer): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\nexport function Hashes({ hashes }: { hashes: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n {typeof hashes === \"number\" ? numeralWrapper.formatHashes(hashes) : hashes}\n );\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IActionIdentifier } from \"./IActionIdentifier\";\nimport { ActionIdentifier } from \"./ActionIdentifier\";\nimport { ActionTypes } from \"./data/ActionTypes\";\nimport { Growths } from \"./data/Growths\";\nimport { BlackOperations } from \"./BlackOperations\";\nimport { BlackOperation } from \"./BlackOperation\";\nimport { Operation } from \"./Operation\";\nimport { Contract } from \"./Contract\";\nimport { GeneralActions } from \"./GeneralActions\";\nimport { formatNumber } from \"../utils/StringHelperFunctions\";\nimport { Skills } from \"./Skills\";\nimport { Skill } from \"./Skill\";\nimport { City } from \"./City\";\nimport { IAction } from \"./IAction\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter, Page } from \"../ui/Router\";\nimport { ConsoleHelpText } from \"./data/Help\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { calculateHospitalizationCost } from \"../Hospital/Hospital\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { getTimestamp } from \"../utils/helpers/getTimestamp\";\nimport { joinFaction } from \"../Faction/FactionHelpers\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { BlackOperationNames } from \"./data/BlackOperationNames\";\nimport { KEY } from \"../utils/helpers/keyCodes\";\n\ninterface BlackOpsAttempt {\n error?: string;\n isAvailable?: boolean;\n action?: BlackOperation;\n}\n\nexport class Bladeburner implements IBladeburner {\n numHosp = 0;\n moneyLost = 0;\n rank = 0;\n maxRank = 0;\n\n skillPoints = 0;\n totalSkillPoints = 0;\n\n teamSize = 0;\n teamLost = 0;\n hpLost = 0;\n\n storedCycles = 0;\n\n randomEventCounter: number = getRandomInt(240, 600);\n\n actionTimeToComplete = 0;\n actionTimeCurrent = 0;\n actionTimeOverflow = 0;\n\n action: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n\n cities: any = {};\n city: string = BladeburnerConstants.CityNames[2];\n skills: any = {};\n skillMultipliers: any = {};\n staminaBonus = 0;\n maxStamina = 0;\n stamina = 0;\n contracts: any = {};\n operations: any = {};\n blackops: any = {};\n logging: any = {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true,\n };\n automateEnabled = false;\n automateActionHigh: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshHigh = 0;\n automateActionLow: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshLow = 0;\n consoleHistory: string[] = [];\n consoleLogs: string[] = [\"Bladeburner Console\", \"Type 'help' to see console commands\"];\n\n constructor(player?: IPlayer) {\n for (let i = 0; i < BladeburnerConstants.CityNames.length; ++i) {\n this.cities[BladeburnerConstants.CityNames[i]] = new City(BladeburnerConstants.CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity(): City {\n const city = this.cities[this.city];\n if (!(city instanceof City)) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n return city;\n }\n\n calculateStaminaPenalty(): number {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n canAttemptBlackOp(actionId: IActionIdentifier): BlackOpsAttempt {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n return { error: \"Tried to start a Black Operation that had already been completed\" };\n }\n\n const action = this.getActionObject(actionId);\n if (!(action instanceof BlackOperation)) throw new Error(`Action should be BlackOperation but isn't`);\n if (action == null) throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n\n if (action.reqdRank > this.rank) {\n return { error: \"Tried to start a Black Operation without the rank requirement\" };\n }\n\n // Can't start a BlackOp if you haven't done the one before it\n const blackops = [];\n for (const nm of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n blackops.sort(function (a, b) {\n return BlackOperations[a].reqdRank - BlackOperations[b].reqdRank; // Sort black ops in intended order\n });\n\n const i = blackops.indexOf(actionId.name);\n if (i === -1) {\n return { error: `Invalid Black Op: '${name}'` };\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n return { error: `Preceding Black Op must be completed before starting '${actionId.name}'.` };\n }\n\n return { isAvailable: true, action };\n }\n\n startAction(player: IPlayer, actionId: IActionIdentifier): void {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n switch (actionId.type) {\n case ActionTypes[\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n case ActionTypes[\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n case ActionTypes[\"Operation\"]: {\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n if (actionId.name === \"Raid\" && this.getCurrentCity().comms === 0) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const testBlackOp = this.canAttemptBlackOp(actionId);\n if (!testBlackOp.isAvailable) {\n this.resetAction();\n this.log(`Error: ${testBlackOp.error}`);\n break;\n }\n if (testBlackOp.action === undefined) {\n throw new Error(\"action should not be null\");\n }\n this.actionTimeToComplete = testBlackOp.action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n this.actionTimeToComplete = 60;\n break;\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n }\n }\n\n upgradeSkill(skill: Skill): void {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\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 this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player: IPlayer, commands: string): void {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n postToConsole(input: string, saveToLogs = true): void {\n const MaxConsoleEntries = 100;\n if (saveToLogs) {\n this.consoleLogs.push(input);\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input: string): void {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${getTimestamp()}] ${input}`);\n }\n\n resetAction(): void {\n this.action = new ActionIdentifier({ type: ActionTypes.Idle });\n }\n\n clearConsole(): void {\n this.consoleLogs.length = 0;\n }\n\n prestige(): void {\n this.resetAction();\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0): void {\n this.storedCycles += numCycles;\n }\n\n // working on\n getActionIdFromTypeAndName(type = \"\", name = \"\"): IActionIdentifier | null {\n if (type === \"\" || name === \"\") {\n return null;\n }\n const action = new ActionIdentifier();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = ActionTypes[\"Contract\"];\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = ActionTypes[\"Operation\"];\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\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 = ActionTypes[\"BlackOp\"];\n if (BlackOperations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = ActionTypes[\"Training\"];\n action.name = \"Training\";\n break;\n case \"recruitment\":\n case \"recruit\":\n action.type = ActionTypes[\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = ActionTypes[\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n case \"diplomacy\":\n action.type = ActionTypes[\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n case \"hyperbolic regeneration chamber\":\n action.type = ActionTypes[\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n case \"incite violence\":\n action.type = ActionTypes[\"Incite Violence\"];\n action.name = \"Incite Violence\";\n break;\n default:\n return null;\n }\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player: IPlayer, args: string[]): void {\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 const name = args[2];\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[name] != null) {\n this.action.type = ActionTypes[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 break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = ActionTypes.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 break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = ActionTypes.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 break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (BlackOperations[name] != null) {\n this.action.type = ActionTypes.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 break;\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: string[]): void {\n switch (args.length) {\n case 1: {\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 case 2: {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(Skills);\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = Skills[skillNames[i]];\n let level = 0;\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level, 0));\n }\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\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 break;\n }\n case 3: {\n const skillName = args[2];\n const skill = Skills[skillName];\n if (skill == null || !(skill instanceof Skill)) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n break;\n }\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const pointCost = skill.calculateCost(currentLevel);\n if (skill.maxLvl !== 0 && currentLevel >= skill.maxLvl) {\n this.postToConsole(`This skill ${skill.name} is already at max level (${currentLevel}/${skill.maxLvl}).`);\n } else 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(\n \"You do not have enough Skill Points to upgrade this. You need \" + formatNumber(pointCost, 0),\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 break;\n }\n default: {\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: string[]): void {\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 if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\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 case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\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 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 case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\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 default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\n \"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\",\n );\n break;\n }\n }\n\n executeHelpConsoleCommand(args: string[]): void {\n if (args.length === 1) {\n for (const line of ConsoleHelpText.helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in ConsoleHelpText)) continue;\n const helpText = ConsoleHelpText[args[i]];\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args: string[]): void {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\n \"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\",\n );\n return;\n }\n\n // Enable/Disable\n if (args.length === 2) {\n const flag = args[1];\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\n \"When your stamina drops to \" +\n formatNumber(this.automateThreshLow, 0) +\n \", you will automatically switch to \" +\n this.automateActionLow.name +\n \". When your stamina recovers to \" +\n formatNumber(this.automateThreshHigh, 0) +\n \", you will automatically \" +\n \"switch to \" +\n this.automateActionHigh.name +\n \".\",\n );\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (\n !(this.automateActionLow instanceof ActionIdentifier) ||\n !(this.automateActionHigh instanceof ActionIdentifier)\n ) {\n return this.log(\"Failed to enable automation. Actions were not set\");\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 return;\n }\n\n // Set variables\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n\n let highLow = false; // True for high, false for low\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes[val],\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Contract,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Operation,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n break;\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 this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n break;\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command: string): string[] {\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 while (i < command.length) {\n const c = command.charAt(i);\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === KEY.SPACE) {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n ++i;\n }\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n return args;\n }\n\n executeConsoleCommand(player: IPlayer, command: string): void {\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 case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n case \"stop\":\n this.resetAction();\n break;\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName: string): void {\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n const rand = Math.random();\n let percentage = getRandomInt(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= getRandomInt(2, 4); // Migration increases population change\n --sourceCity.comms;\n ++destCity.comms;\n }\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName: string, chance: number): void {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n if (chance > 1) {\n chance /= 100;\n }\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent(): void {\n const chance = Math.random();\n\n // Choose random source/destination city for events\n const sourceCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n if (!(sourceCity instanceof City)) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof City) || !(destCity instanceof City)) {\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 = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\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 = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\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;\n\n // Change pop\n const percentage = getRandomInt(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(\n \"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\",\n );\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = getRandomInt(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a large number of Synthoids migrated from \" +\n sourceCityName +\n \" to some other city\",\n );\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + getRandomInt(5, 20) / 100;\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 = getRandomInt(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\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 gainActionStats(player: IPlayer, action: IAction, success: boolean): void {\n const difficulty = action.getDifficulty();\n\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n const difficultyMult =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n\n const unweightedGain = time * BladeburnerConstants.BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * BladeburnerConstants.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 player.gainIntelligenceExp(unweightedIntGain * action.weights.int * skillMult);\n }\n\n getDiplomacyEffectiveness(player: IPlayer): number {\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\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player: IPlayer): number {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player: IPlayer): number {\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(BladeburnerConstants.BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers(): void {\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(): void {\n this.resetSkillMultipliers();\n for (const skillName of Object.keys(this.skills)) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = Skills[skillName];\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n const level = this.skills[skillName];\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success: boolean): void {\n if (this.action.type !== ActionTypes.Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n // Calculate team losses\n const teamCount = action.teamCount;\n if (teamCount >= 1) {\n let max;\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n const losses = getRandomInt(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + formatNumber(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n break;\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n break;\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByCount(0.1);\n break;\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true,\n });\n --city.comms;\n } else {\n const change = getRandomInt(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false,\n });\n }\n city.changeChaosByPercentage(getRandomInt(1, 5));\n break;\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByPercentage(getRandomInt(-3, -1));\n break;\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n }\n city.changeChaosByPercentage(getRandomInt(-5, 5));\n break;\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId: IActionIdentifier): IAction | null {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n return this.contracts[actionId.name];\n case ActionTypes[\"Operation\"]:\n return this.operations[actionId.name];\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return BlackOperations[actionId.name];\n case ActionTypes[\"Training\"]:\n return GeneralActions[\"Training\"];\n case ActionTypes[\"Field Analysis\"]:\n return GeneralActions[\"Field Analysis\"];\n case ActionTypes[\"Recruitment\"]:\n return GeneralActions[\"Recruitment\"];\n case ActionTypes[\"Diplomacy\"]:\n return GeneralActions[\"Diplomacy\"];\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n return GeneralActions[\"Hyperbolic Regeneration Chamber\"];\n case ActionTypes[\"Incite Violence\"]:\n return GeneralActions[\"Incite Violence\"];\n default:\n return null;\n }\n }\n\n completeContract(success: boolean): void {\n if (this.action.type !== ActionTypes.Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n const city = this.getCurrentCity();\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(getRandomInt(100, 1e3));\n break;\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.02);\n break;\n case \"Retirement\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.04);\n break;\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router: IRouter, player: IPlayer): void {\n switch (this.action.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]: {\n try {\n const isOperation = this.action.type === ActionTypes[\"Operation\"];\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Process Contract/Operation success/failure\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count;\n\n // Earn money for contracts\n let moneyGain = 0;\n if (!isOperation) {\n moneyGain = BladeburnerConstants.ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(BladeburnerConstants.OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(BladeburnerConstants.ContractSuccessesPerLevel);\n }\n if (action.rankGain) {\n const gain = addOffset(action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, gain);\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + formatNumber(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(\n action.name +\n \" contract successfully completed! Gained \" +\n formatNumber(gain, 3) +\n \" rank and \" +\n numeralWrapper.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 if (action.rankLoss) {\n loss = addOffset(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n this.hpLost += damage;\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n let logLossText = \"\";\n if (loss > 0) {\n logLossText += \"Lost \" + formatNumber(loss, 3) + \" rank. \";\n }\n if (damage > 0) {\n logLossText += \"Took \" + formatNumber(damage, 0) + \" damage.\";\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 isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n this.startAction(player, this.action); // Repeat action\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const action = this.getActionObject(this.action);\n if (action == null || !(action instanceof BlackOperation)) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Team loss variables\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 if (action.rankGain) {\n rankGain = addOffset(action.rankGain * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n teamLossMax = Math.ceil(teamCount / 2);\n\n // Operation Daedalus\n if (action.name === BlackOperationNames.OperationDaedalus) {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + formatNumber(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n if (action.rankLoss) {\n rankLoss = addOffset(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(\n action.name +\n \" failed! Lost \" +\n formatNumber(rankLoss, 1) +\n \" rank and took \" +\n formatNumber(damage, 0) +\n \" damage\",\n );\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n\n // Calculate team lossses\n if (teamCount >= 1) {\n const losses = getRandomInt(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.blackops) {\n this.log(\"You lost \" + formatNumber(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Training\"]: {\n this.stamina -= 0.5 * BladeburnerConstants.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 if (this.logging.general) {\n this.log(\n \"Training completed. Gained: \" +\n formatNumber(strExpGain, 1) +\n \" str exp, \" +\n formatNumber(defExpGain, 1) +\n \" def exp, \" +\n formatNumber(dexExpGain, 1) +\n \" dex exp, \" +\n formatNumber(agiExpGain, 1) +\n \" agi exp, \" +\n formatNumber(staminaGain, 3) +\n \" max stamina\",\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]: {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff =\n 0.04 * Math.pow(player.hacking, 0.3) +\n 0.04 * Math.pow(player.intelligence, 0.9) +\n 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n const hackingExpGain = 20 * player.hacking_exp_mult;\n const charismaExpGain = 20 * player.charisma_exp_mult;\n const rankGain = 0.1 * BitNodeMultipliers.BladeburnerRank;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(BladeburnerConstants.BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, rankGain);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n if (this.logging.general) {\n this.log(\n `Field analysis completed. Gained ${formatNumber(rankGain, 2)} rank, ` +\n `${formatNumber(hackingExpGain, 1)} hacking exp, and ` +\n `${formatNumber(charismaExpGain, 1)} charisma exp`,\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Recruitment\"]: {\n const successChance = this.getRecruitmentSuccessChance(player);\n if (Math.random() < successChance) {\n const expGain = 2 * BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Diplomacy\"]: {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n if (this.logging.general) {\n this.log(\n `Diplomacy completed. Chaos levels in the current city fell by ${numeralWrapper.formatPercentage(1 - eff)}`,\n );\n }\n this.startAction(player, this.action); // Repeat Action\n break;\n }\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]: {\n player.regenerateHp(BladeburnerConstants.HrcHpGain);\n\n const staminaGain = this.maxStamina * (BladeburnerConstants.HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n if (this.logging.general) {\n this.log(\n `Rested in Hyperbolic Regeneration Chamber. Restored ${\n BladeburnerConstants.HrcHpGain\n } HP and gained ${numeralWrapper.formatStamina(staminaGain)} stamina`,\n );\n }\n break;\n }\n case ActionTypes[\"Incite Violence\"]: {\n for (const contract of Object.keys(this.contracts)) {\n const growthF = Growths[contract];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + contract);\n this.contracts[contract].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const operation of Object.keys(this.operations)) {\n const growthF = Growths[operation];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + operation);\n this.operations[operation].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n if (this.logging.general) {\n this.log(`Incited violence in the synthoid communities.`);\n }\n for (const cityName of Object.keys(this.cities)) {\n const city = this.cities[cityName];\n city.chaos += 10;\n city.chaos += city.chaos / (Math.log(city.chaos) / Math.log(10));\n }\n\n this.startAction(player, this.action);\n break;\n }\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player: IPlayer, change: number): void {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n this.rank += change;\n if (this.rank < 0) {\n this.rank = 0;\n }\n this.maxRank = Math.max(this.rank, this.maxRank);\n\n const bladeburnersFactionName = FactionNames.Bladeburners;\n if (factionExists(bladeburnersFactionName)) {\n const bladeburnerFac = Factions[bladeburnersFactionName];\n if (!(bladeburnerFac instanceof Faction)) {\n throw new Error(\n `Could not properly get ${FactionNames.Bladeburners} Faction object in ${FactionNames.Bladeburners} UI Overview Faction button`,\n );\n }\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation +=\n BladeburnerConstants.RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n }\n\n // Gain skill points\n const rankNeededForSp = (this.totalSkillPoints + 1) * BladeburnerConstants.RanksPerSkillPoint;\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor(\n (this.maxRank - rankNeededForSp) / BladeburnerConstants.RanksPerSkillPoint + 1,\n );\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router: IRouter, player: IPlayer, seconds: number): void {\n if (this.action.type === ActionTypes[\"Idle\"]) return;\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n if (!(this.action instanceof ActionIdentifier)) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n }\n\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 this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\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: IPlayer): number {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / BladeburnerConstants.MaxStaminaToGainFactor;\n const gain = (BladeburnerConstants.StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player: IPlayer): void {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina =\n (Math.pow(effAgility, 0.8) + this.staminaBonus) *\n this.skillMultipliers.stamina *\n player.bladeburner_max_stamina_mult;\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = (this.maxStamina * this.stamina) / oldMax;\n }\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create(): void {\n this.contracts[\"Tracking\"] = new Contract({\n name: \"Tracking\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: getRandomInt(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({\n name: \"Bounty Hunter\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: getRandomInt(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({\n name: \"Retirement\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: getRandomInt(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\n this.operations[\"Investigation\"] = new Operation({\n name: \"Investigation\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: getRandomInt(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({\n name: \"Undercover Operation\",\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: getRandomInt(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({\n name: \"Sting Operation\",\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: getRandomInt(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({\n name: \"Raid\",\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: getRandomInt(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({\n name: \"Stealth Retirement Operation\",\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: getRandomInt(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({\n name: \"Assassination\",\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: getRandomInt(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: IRouter, player: IPlayer): void {\n // Edge race condition when the engine checks the processing counters and attempts to route before the router is initialized.\n if (!router.isInitialized) return;\n\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (router.page() !== Page.BitVerse && this.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)) {\n return router.toBitVerse(false, false);\n }\n\n // If the Player starts doing some other actions, set action to idle and alert\n if (Augmentations[AugmentationNames.BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== ActionTypes[\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\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 if (!Settings.SuppressBladeburnerPopup) {\n dialogBoxCreate(msg);\n }\n }\n this.resetAction();\n }\n\n // If the Player has no Stamina, set action to idle\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n }\n\n // A 'tick' for this mechanic is one second (= 5 game cycles)\n if (this.storedCycles >= BladeburnerConstants.CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / BladeburnerConstants.CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n this.storedCycles -= seconds * BladeburnerConstants.CyclesPerSecond;\n\n // Stamina\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina);\n\n // Count increase for contracts/operations\n for (const contract of Object.values(this.contracts) as Contract[]) {\n const growthF = Growths[contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const op of Object.values(this.operations) as Operation[]) {\n const growthF = Growths[op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n if (growthF !== undefined) {\n op.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n }\n\n // Chaos goes down very slowly\n for (const cityName of BladeburnerConstants.CityNames) {\n const city = this.cities[cityName];\n if (!(city instanceof City)) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n }\n\n // Random Events\n this.randomEventCounter -= seconds;\n if (this.randomEventCounter <= 0) {\n this.randomEvent();\n // Add instead of setting because we might have gone over the required time for the event\n this.randomEventCounter += getRandomInt(240, 600);\n }\n\n this.processAction(router, player, seconds);\n\n // Automation\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({\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({\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: IActionIdentifier): {\n type: string;\n name: string;\n } {\n const res = { type: \"\", name: \"\" };\n const types = Object.keys(ActionTypes);\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === ActionTypes[types[i]]) {\n res.type = types[i];\n break;\n }\n }\n const gen = [\n \"Training\",\n \"Recruitment\",\n \"FieldAnalysis\",\n \"Field Analysis\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\",\n ];\n if (gen.includes(res.type)) {\n res.type = \"General\";\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(): string[] {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn(): string[] {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn(): string[] {\n return Object.keys(BlackOperations);\n }\n\n getGeneralActionNamesNetscriptFn(): string[] {\n return Object.keys(GeneralActions);\n }\n\n getSkillNamesNetscriptFn(): string[] {\n return Object.keys(Skills);\n }\n\n startActionNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n\n // Special logic for Black Ops\n if (actionId.type === ActionTypes[\"BlackOp\"]) {\n const canRunOp = this.canAttemptBlackOp(actionId);\n if (!canRunOp.isAvailable) {\n workerScript.log(\"bladeburner.startAction\", () => canRunOp.error + \"\");\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\n \"bladeburner.startAction\",\n () => `Starting bladeburner action with type '${type}' and name '${name}'`,\n );\n return true;\n } catch (e: any) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getActionTime(this) * 1000;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n return 30000;\n case ActionTypes[\"Recruitment\"]:\n return this.getRecruitmentTime(player) * 1000;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return 60000;\n default:\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(\n player: IPlayer,\n type: string,\n name: string,\n workerScript: WorkerScript,\n ): [number, number] {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return [1, 1];\n case ActionTypes[\"Recruitment\"]: {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n return Math.floor(actionObj.count);\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Recruitment\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return Infinity;\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.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: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = Skills[skillName];\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: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid skill: '${skillName}'`;\n if (!Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => errorLogText);\n return false;\n }\n\n const skill = Skills[skillName];\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\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(\n \"bladeburner.upgradeSkill\",\n () =>\n `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`,\n );\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: string, name: string, workerScript: WorkerScript): number {\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 if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type === ActionTypes[\"Operation\"] ||\n actionId.type === ActionTypes[\"BlackOp\"] ||\n actionId.type === ActionTypes[\"BlackOperation\"]\n ) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type: string, name: string, size: number, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type !== ActionTypes[\"Operation\"] &&\n actionId.type !== ActionTypes[\"BlackOp\"] &&\n actionId.type !== ActionTypes[\"BlackOperation\"]\n ) {\n workerScript.log(\"bladeburner.setTeamSize\", () => \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", () => `Invalid size: ${size}`);\n return -1;\n }\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\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: WorkerScript): boolean {\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", () => `Joined ${FactionNames.Bladeburners} faction.`);\n return true;\n } else {\n workerScript.log(\n \"bladeburner.joinBladeburnerFaction\",\n () => `You do not have the required rank (${this.rank}/${BladeburnerConstants.RankNeededForFaction}).`,\n );\n return false;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Bladeburner\", this);\n }\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 static fromJSON(value: any): Bladeburner {\n return Generic_fromJSON(Bladeburner, value.data);\n }\n}\n\nReviver.constructors.Bladeburner = Bladeburner;\n","import { CompanyPosition } from \"./CompanyPosition\";\nimport * as posNames from \"./data/companypositionnames\";\nimport { favorToRep, repToFavor } from \"../Faction/formulas/favor\";\n\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n name: string;\n info: string;\n companyPositions: IMap;\n expMultiplier: number;\n salaryMultiplier: number;\n jobStatReqOffset: number;\n isMegacorp?: boolean;\n}\n\nconst DefaultConstructorParams: IConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n};\n\nexport class Company {\n /**\n * Company name\n */\n name: string;\n\n /**\n * Description and general information about company\n */\n info: string;\n\n /**\n * Has faction associated.\n */\n isMegacorp: boolean;\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 companyPositions: IMap;\n\n /**\n * Company-specific multiplier for earnings\n */\n expMultiplier: number;\n salaryMultiplier: number;\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 jobStatReqOffset: number;\n\n /**\n * Properties to track the player's progress in this company\n */\n isPlayerEmployed: boolean;\n playerReputation: number;\n favor: number;\n\n constructor(p: IConstructorParams = 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\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.isMegacorp = false;\n if (p.isMegacorp) this.isMegacorp = true;\n }\n\n hasPosition(pos: CompanyPosition | string): boolean {\n if (pos instanceof CompanyPosition) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions(): boolean {\n return this.companyPositions[posNames.AgentCompanyPositions[0]] != null;\n }\n\n hasBusinessConsultantPositions(): boolean {\n return this.companyPositions[posNames.BusinessConsultantCompanyPositions[0]] != null;\n }\n\n hasBusinessPositions(): boolean {\n return this.companyPositions[posNames.BusinessCompanyPositions[0]] != null;\n }\n\n hasEmployeePositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[1]] != null;\n }\n\n hasITPositions(): boolean {\n return this.companyPositions[posNames.ITCompanyPositions[0]] != null;\n }\n\n hasSecurityPositions(): boolean {\n return this.companyPositions[posNames.SecurityCompanyPositions[2]] != null;\n }\n\n hasSoftwareConsultantPositions(): boolean {\n return this.companyPositions[posNames.SoftwareConsultantCompanyPositions[0]] != null;\n }\n\n hasSoftwarePositions(): boolean {\n return this.companyPositions[posNames.SoftwareCompanyPositions[0]] != null;\n }\n\n hasWaiterPositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[0]] != null;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Company\", this);\n }\n\n /**\n * Initiatizes a Company from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Company {\n return Generic_fromJSON(Company, value.data);\n }\n}\n\nReviver.constructors.Company = Company;\n","import { Material } from \"./Material\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\n\ninterface IConstructorParams {\n corp?: ICorporation;\n industry?: IIndustry;\n loc?: string;\n size?: number;\n}\n\nexport class Warehouse {\n // Warehouse's level, which affects its maximum size\n level = 1;\n\n // City that this Warehouse is in\n loc: string;\n\n // Map of Materials held by this Warehouse\n materials: IMap;\n\n // Maximum amount warehouse can hold\n size: number;\n\n // Amount of space currently used by warehouse\n sizeUsed = 0;\n\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n smartSupplyEnabled = false;\n\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n smartSupplyUseLeftovers: { [key: string]: boolean | undefined } = {};\n\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 smartSupplyStore = 0;\n\n constructor(params: IConstructorParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n\n this.materials = {\n Water: new Material({ name: \"Water\" }),\n Energy: new Material({ name: \"Energy\" }),\n Food: new Material({ name: \"Food\" }),\n Plants: new Material({ name: \"Plants\" }),\n Metal: new Material({ name: \"Metal\" }),\n Hardware: new Material({ name: \"Hardware\" }),\n Chemicals: new Material({ name: \"Chemicals\" }),\n Drugs: new Material({ name: \"Drugs\" }),\n Robots: new Material({ name: \"Robots\" }),\n AICores: new Material({ name: \"AI Cores\" }),\n RealEstate: new Material({ 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 }\n\n // Default smart supply to being enabled if the upgrade is unlocked\n if (params.corp?.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n }\n\n // Re-calculate how much space is being used by this Warehouse\n updateMaterialSizeUsed(): void {\n this.sizeUsed = 0;\n for (const matName of Object.keys(this.materials)) {\n const mat = this.materials[matName];\n if (MaterialSizes.hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * MaterialSizes[matName];\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: ICorporation, industry: IIndustry): void {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Warehouse\", this);\n }\n\n // Initiatizes a Warehouse object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Warehouse {\n return Generic_fromJSON(Warehouse, value.data);\n }\n}\n\nReviver.constructors.Warehouse = Warehouse;\n","import { gangMemberTasksMetadata } from \"./data/tasks\";\nimport { GangMemberTask } from \"./GangMemberTask\";\n\nexport const GangMemberTasks: {\n [key: string]: GangMemberTask;\n} = {};\n\n(function () {\n gangMemberTasksMetadata.forEach((e) => {\n GangMemberTasks[e.name] = new GangMemberTask(e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n","/**\n * Map of all Hash Upgrades\n * Key = Hash name, Value = HashUpgrade object\n */\nimport { HashUpgrade, IConstructorParams } from \"./HashUpgrade\";\nimport { HashUpgradesMetadata } from \"./data/HashUpgradesMetadata\";\nimport { IMap } from \"../types\";\n\nexport const HashUpgrades: IMap = {};\n\nfunction createHashUpgrade(p: IConstructorParams): void {\n HashUpgrades[p.name] = new HashUpgrade(p);\n}\n\nfor (const metadata of HashUpgradesMetadata) {\n createHashUpgrade(metadata);\n}\n","import { FragmentType } from \"./FragmentType\";\nimport { Shapes } from \"./data/Shapes\";\n\nexport const Fragments: Fragment[] = [];\n\nexport class Fragment {\n id: number;\n shape: boolean[][];\n type: FragmentType;\n power: number;\n limit: number;\n\n constructor(id: number, shape: boolean[][], type: FragmentType, power: number, limit: number) {\n this.id = id;\n this.shape = shape;\n this.type = type;\n this.power = power;\n this.limit = limit;\n }\n\n fullAt(x: number, y: number, rotation: number): boolean {\n if (y < 0) return false;\n if (y >= this.height(rotation)) return false;\n if (x < 0) return false;\n if (x >= this.width(rotation)) return false;\n // start xy, modifier xy\n let [sx, sy, mx, my] = [0, 0, 1, 1];\n if (rotation === 1) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, 0, -1, 1];\n } else if (rotation === 2) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, this.height(rotation) - 1, -1, -1];\n } else if (rotation === 3) {\n [sx, sy, mx, my] = [0, this.height(rotation) - 1, 1, -1];\n }\n let [qx, qy] = [sx + mx * x, sy + my * y];\n if (rotation % 2 === 1) [qx, qy] = [qy, qx];\n return this.shape[qy][qx];\n }\n\n width(rotation: number): number {\n if (rotation % 2 === 0) return this.shape[0].length;\n return this.shape.length;\n }\n\n height(rotation: number): number {\n if (rotation % 2 === 0) return this.shape.length;\n return this.shape[0].length;\n }\n\n // List of direct neighboors of this fragment.\n neighboors(rotation: number): number[][] {\n const candidates: number[][] = [];\n\n const add = (x: number, y: number): void => {\n if (this.fullAt(x, y, rotation)) return;\n if (candidates.some((coord) => coord[0] === x && coord[1] === y)) return;\n candidates.push([x, y]);\n };\n for (let y = 0; y < this.height(rotation); y++) {\n for (let x = 0; x < this.width(rotation); x++) {\n // This cell is full, add all it's neighboors.\n if (!this.fullAt(x, y, rotation)) continue;\n add(x - 1, y);\n add(x + 1, y);\n add(x, y - 1);\n add(x, y + 1);\n }\n }\n const cells: number[][] = [];\n for (const candidate of candidates) {\n if (cells.some((cell) => cell[0] === candidate[0] && cell[1] === candidate[1])) continue;\n cells.push(candidate);\n }\n\n return cells;\n }\n\n copy(): Fragment {\n return new Fragment(\n this.id,\n this.shape.map((a) => a.slice()),\n this.type,\n this.power,\n this.limit,\n );\n }\n}\n\nexport function FragmentById(id: number): Fragment | null {\n for (const fragment of Fragments) {\n if (fragment.id === id) return fragment;\n }\n return null;\n}\n\n(function () {\n const _ = false;\n const X = true;\n Fragments.push(\n new Fragment(\n 0, // id\n Shapes.S,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 1, // id\n Shapes.Z,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 5, // id\n Shapes.T,\n FragmentType.HackingSpeed, // type\n 1.3,\n 1, // limit\n ),\n );\n\n Fragments.push(\n new Fragment(\n 6, // id\n Shapes.I,\n FragmentType.HackingMoney, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 7, // id\n Shapes.J,\n FragmentType.HackingGrow, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 10, // id\n Shapes.T,\n FragmentType.Strength, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 12, // id\n Shapes.L,\n FragmentType.Defense, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 14, // id\n Shapes.L,\n FragmentType.Dexterity, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 16, // id\n Shapes.S,\n FragmentType.Agility, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 18, // id\n Shapes.S,\n FragmentType.Charisma, // type\n 3, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 20, // id\n Shapes.I,\n FragmentType.HacknetMoney, // type\n 1, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 21, // id\n Shapes.O,\n FragmentType.HacknetCost, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 25, // id\n Shapes.J,\n FragmentType.Rep, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 27, // id\n Shapes.J,\n FragmentType.WorkMoney, // type\n 10, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 28, // id\n Shapes.L,\n FragmentType.Crime, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 30, // id\n Shapes.S,\n FragmentType.Bladeburner, // type\n 0.4, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 100, // id\n [\n // shape\n [_, X, X],\n [X, X, _],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 101, // id\n [\n // shape\n [X, X, X, X],\n [X, _, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 102, // id\n [\n // shape\n [_, X, X, X],\n [X, X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 103, // id\n [\n // shape\n [X, X, X, _],\n [_, _, X, X],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 104, // id\n [\n // shape\n [_, X, X],\n [_, X, _],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 105, // id\n [\n // shape\n [_, _, X],\n [_, X, X],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 106, // id\n [\n // shape\n [X, _, _],\n [X, X, X],\n [X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 107, // id\n [\n // shape\n [_, X, _],\n [X, X, X],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n})();\n\nexport const NoneFragment = new Fragment(-2, [], FragmentType.None, 0, Infinity);\nexport const DeleteFragment = new Fragment(-2, [], FragmentType.Delete, 0, Infinity);\n","import { IPlayer } from \"../IPlayer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CalculateShareMult } from \"../../NetworkShare/Share\";\n\nfunction mult(f: Faction): number {\n let favorMult = 1 + f.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return favorMult * BitNodeMultipliers.FactionWorkRepGain;\n}\n\nexport function getHackingWorkRepGain(p: IPlayer, f: Faction): number {\n return (\n ((p.hacking + p.intelligence / 3) / CONSTANTS.MaxSkillLevel) *\n p.faction_rep_mult *\n p.getIntelligenceBonus(1) *\n mult(f) *\n CalculateShareMult()\n );\n}\n\nexport function getFactionSecurityWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.strength + p.defense + p.dexterity + p.agility +\n (p.hacking + p.intelligence) * CalculateShareMult()\n )\n ) / CONSTANTS.MaxSkillLevel / 4.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n\nexport function getFactionFieldWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.strength + p.defense + p.dexterity + p.agility + p.charisma +\n (p.hacking + p.intelligence) * CalculateShareMult()\n )\n ) / CONSTANTS.MaxSkillLevel / 5.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n","/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\nimport { Stock } from \"./Stock\";\nimport {\n getBuyTransactionCost,\n getSellTransactionGain,\n processTransactionForecastMovement,\n} from \"./StockMarketHelpers\";\n\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { Player } from \"../Player\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nimport * as React from \"react\";\n\n/**\n * Each function takes an optional config object as its last argument\n */\ninterface IOptions {\n rerenderFn?: () => void;\n suppressDialog?: boolean;\n}\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function buyStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.buy\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n }\n\n // Does player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Long);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `You do not have enough money to purchase this position. You need ${numeralWrapper.formatMoney(totalPrice)}.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${numeralWrapper.formatShares(\n stock.maxShares,\n )} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n processTransactionForecastMovement(stock, shares);\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} for ${numeralWrapper.formatMoney(\n totalPrice,\n )}. Paid ${numeralWrapper.formatMoney(CONSTANTS.StockMarketCommission)} in commission fees.`;\n workerScript.log(\"stock.buy\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Bought {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for . Paid{\" \"}\n in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\nexport function sellStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.sell\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const gains = getSellTransactionGain(stock, shares, PositionTypes.Long);\n if (gains == null) {\n return false;\n }\n let netProfit = gains - stock.playerAvgPx * shares;\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n Player.gainMoney(gains, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n Player.scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(gains)}.`;\n workerScript.log(\"stock.sell\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of{\" \"}\n .\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function shortStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.short\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to initiate a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n return false;\n }\n\n // Does the player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Short);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n \"You do not have enough \" +\n \"money to purchase this short position. You need \" +\n numeralWrapper.formatMoney(totalPrice),\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this short position. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought a short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} ` +\n `for ${numeralWrapper.formatMoney(totalPrice)}. Paid ${numeralWrapper.formatMoney(\n CONSTANTS.StockMarketCommission,\n )} ` +\n `in commission fees.`;\n workerScript.log(\"stock.short\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Bought a short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for{\" \"}\n . Paid in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\nexport function sellShort(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"stock.sellShort\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n \"Failed to sell a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = getSellTransactionGain(stock, shares, PositionTypes.Short);\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\n \"stock.sellShort\",\n () => `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n }\n\n return false;\n }\n let profit = totalGain - origCost;\n if (isNaN(profit)) {\n profit = 0;\n }\n Player.gainMoney(totalGain, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n Player.scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold your short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(totalGain)}`;\n workerScript.log(\"stock.sellShort\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Sold your short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions,\n you gained a total of \n ,\n );\n }\n\n return true;\n}\n","import React from \"react\";\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\nimport { Settings } from \"../Settings/Settings\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\nimport { BaseServer } from \"../Server/BaseServer\";\n\nexport class Output {\n text: string;\n color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\";\n constructor(text: string, color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\") {\n if (Settings.TimestampsFormat) text = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + text;\n this.text = text;\n this.color = color;\n }\n}\n\nexport class RawOutput {\n raw: React.ReactNode;\n constructor(node: React.ReactNode) {\n if (Settings.TimestampsFormat)\n node = (\n <>\n [{formatTime(Settings.TimestampsFormat)}] {node}\n \n );\n this.raw = node;\n }\n}\n\nexport class Link {\n hostname: string;\n dashes: string;\n constructor(dashes: string, hostname: string) {\n if (Settings.TimestampsFormat) dashes = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + dashes;\n this.hostname = hostname;\n this.dashes = dashes;\n }\n}\n\nexport class TTimer {\n time: number;\n timeLeft: number;\n action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\";\n server?: BaseServer;\n\n constructor(time: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer) {\n this.time = time;\n this.timeLeft = time;\n this.action = action;\n this.server = server;\n }\n}\n\nexport interface ITerminal {\n action: TTimer | null;\n\n commandHistory: string[];\n commandHistoryIndex: number;\n\n outputHistory: (Output | Link | RawOutput)[];\n\n // True if a Coding Contract prompt is opened\n contractOpen: boolean;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir: string;\n\n print(s: string): void;\n printRaw(node: React.ReactNode): void;\n error(s: string): void;\n success(s: string): void;\n info(s: string): void;\n warn(s: string): void;\n\n clear(): void;\n startAnalyze(player: IPlayer): void;\n startBackdoor(player: IPlayer): void;\n startHack(player: IPlayer): void;\n startGrow(player: IPlayer): void;\n startWeaken(player: IPlayer): void;\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishGrow(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishWeaken(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAnalyze(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAction(router: IRouter, player: IPlayer, cancelled?: boolean): void;\n getFilepath(filename: string): string;\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null;\n getScript(player: IPlayer, filename: string): Script | null;\n getTextFile(player: IPlayer, filename: string): TextFile | null;\n getLitFile(player: IPlayer, filename: string): string | null;\n cwd(): string;\n setcwd(dir: string): void;\n runContract(player: IPlayer, name: string): void;\n executeScanAnalyzeCommand(player: IPlayer, depth?: number, all?: boolean): void;\n connectToServer(player: IPlayer, server: string): void;\n executeCommand(router: IRouter, player: IPlayer, command: string): void;\n executeCommands(router: IRouter, player: IPlayer, commands: string): void;\n // If there was any changes, will return true, once.\n process(router: IRouter, player: IPlayer, cycles: number): void;\n prestige(): void;\n getProgressText(): string;\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\ninterface ISkillParams {\n name: string;\n desc: string;\n\n baseCost?: number;\n costInc?: number;\n maxLvl?: number;\n\n successChanceAll?: number;\n successChanceStealth?: number;\n successChanceKill?: number;\n successChanceContract?: number;\n successChanceOperation?: number;\n successChanceEstimate?: number;\n\n actionTime?: number;\n\n effHack?: number;\n effStr?: number;\n effDef?: number;\n effDex?: number;\n effAgi?: number;\n effCha?: number;\n\n stamina?: number;\n money?: number;\n expGain?: number;\n}\n\nexport class Skill {\n name: string;\n desc: string;\n // Cost is in Skill Points\n baseCost = 1;\n // Additive cost increase per level\n costInc = 1;\n maxLvl = 0;\n\n /**\n * These benefits are additive. So total multiplier will be level (handled externally) times the\n * effects below\n */\n successChanceAll = 0;\n successChanceStealth = 0;\n successChanceKill = 0;\n successChanceContract = 0;\n successChanceOperation = 0;\n\n /**\n * This multiplier affects everything that increases synthoid population/community estimate\n * e.g. Field analysis, Investigation Op, Undercover Op\n */\n successChanceEstimate = 0;\n actionTime = 0;\n effHack = 0;\n effStr = 0;\n effDef = 0;\n effDex = 0;\n effAgi = 0;\n effCha = 0;\n stamina = 0;\n money = 0;\n expGain = 0;\n\n constructor(params: ISkillParams = { name: \"foo\", desc: \"foo\" }) {\n if (!params.name) {\n throw new Error(\"Failed to initialize Bladeburner Skill. No name was specified in ctor\");\n }\n if (!params.desc) {\n throw new Error(\"Failed to initialize Bladeburner Skills. No desc was specified in ctor\");\n }\n this.name = params.name;\n this.desc = params.desc;\n this.baseCost = params.baseCost ? params.baseCost : 1;\n this.costInc = params.costInc ? params.costInc : 1;\n\n if (params.maxLvl) {\n this.maxLvl = params.maxLvl;\n }\n\n if (params.successChanceAll) {\n this.successChanceAll = params.successChanceAll;\n }\n if (params.successChanceStealth) {\n this.successChanceStealth = params.successChanceStealth;\n }\n if (params.successChanceKill) {\n this.successChanceKill = params.successChanceKill;\n }\n if (params.successChanceContract) {\n this.successChanceContract = params.successChanceContract;\n }\n if (params.successChanceOperation) {\n this.successChanceOperation = params.successChanceOperation;\n }\n\n if (params.successChanceEstimate) {\n this.successChanceEstimate = params.successChanceEstimate;\n }\n\n if (params.actionTime) {\n this.actionTime = params.actionTime;\n }\n if (params.effHack) {\n this.effHack = params.effHack;\n }\n if (params.effStr) {\n this.effStr = params.effStr;\n }\n if (params.effDef) {\n this.effDef = params.effDef;\n }\n if (params.effDex) {\n this.effDex = params.effDex;\n }\n if (params.effAgi) {\n this.effAgi = params.effAgi;\n }\n if (params.effCha) {\n this.effCha = params.effCha;\n }\n\n if (params.stamina) {\n this.stamina = params.stamina;\n }\n if (params.money) {\n this.money = params.money;\n }\n if (params.expGain) {\n this.expGain = params.expGain;\n }\n }\n\n calculateCost(currentLevel: number): number {\n return Math.floor((this.baseCost + currentLevel * this.costInc) * BitNodeMultipliers.BladeburnerSkillCost);\n }\n\n getMultiplier(name: string): number {\n if (name === \"successChanceAll\") return this.successChanceAll;\n if (name === \"successChanceStealth\") return this.successChanceStealth;\n if (name === \"successChanceKill\") return this.successChanceKill;\n if (name === \"successChanceContract\") return this.successChanceContract;\n if (name === \"successChanceOperation\") return this.successChanceOperation;\n if (name === \"successChanceEstimate\") return this.successChanceEstimate;\n\n if (name === \"actionTime\") return this.actionTime;\n\n if (name === \"effHack\") return this.effHack;\n if (name === \"effStr\") return this.effStr;\n if (name === \"effDef\") return this.effDef;\n if (name === \"effDex\") return this.effDex;\n if (name === \"effAgi\") return this.effAgi;\n if (name === \"effCha\") return this.effCha;\n\n if (name === \"stamina\") return this.stamina;\n if (name === \"money\") return this.money;\n if (name === \"expGain\") return this.expGain;\n return 0;\n }\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void;\n confirmationText: string | React.ReactNode;\n additionalButton?: React.ReactNode;\n}\n\nexport function ConfirmationModal(props: IProps): React.ReactElement {\n return (\n \n <>\n {props.confirmationText}\n {\n props.onConfirm();\n }}\n >\n Confirm\n \n {props.additionalButton && <>{props.additionalButton}}\n \n \n );\n}\n","export function hash(): string {\n try {\n if (__COMMIT_HASH__) {\n return __COMMIT_HASH__;\n }\n } catch (err) {}\n return \"DEV\";\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\n\nexport const GangConstants: {\n GangRespectToReputationRatio: number;\n MaximumGangMembers: number;\n CyclesPerTerritoryAndPowerUpdate: number;\n AscensionMultiplierRatio: number;\n Names: string[];\n} = {\n // Respect is divided by this to get rep gain\n GangRespectToReputationRatio: 75,\n MaximumGangMembers: 12,\n CyclesPerTerritoryAndPowerUpdate: 100,\n // Portion of upgrade multiplier that is kept after ascending\n AscensionMultiplierRatio: 0.15,\n // Names of possible Gangs\n Names: [\n FactionNames.SlumSnakes,\n FactionNames.Tetrads,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n FactionNames.NiteSec,\n FactionNames.TheBlackHand,\n ],\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 */\nimport { calculateRamUsage, RamUsageEntry } from \"./RamCalculations\";\nimport { ScriptUrl } from \"./ScriptUrl\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { roundToTwo } from \"../utils/helpers/roundToTwo\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nlet globalModuleSequenceNumber = 0;\n\ninterface ScriptReference {\n filename: string;\n server: string;\n}\n\nexport class Script {\n // Code for this script\n code = \"\";\n\n // Filename for the script file\n filename = \"\";\n\n // url of the script if any, only for NS2.\n url = \"\";\n\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n module: any = \"\";\n\n // The timestamp when when the script was last updated.\n moduleSequenceNumber: number;\n\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 dependencies: ScriptUrl[] = [];\n dependents: ScriptReference[] = [];\n\n // Amount of RAM this Script requres to run\n ramUsage = 0;\n ramUsageEntries?: RamUsageEntry[];\n\n // hostname of server that this script is on.\n server = \"\";\n\n constructor(player: IPlayer | null = null, fn = \"\", code = \"\", server = \"\", otherScripts: Script[] = []) {\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // hostname of server this script is on\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n if (this.code !== \"\" && player !== null) {\n this.updateRamUsage(player, otherScripts);\n }\n }\n\n /**\n * Download the script as a file\n */\n download(): void {\n const filename = this.filename;\n const file = new Blob([this.code], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n 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 setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\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 markUpdated(): void {\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\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 saveScript(player: IPlayer, filename: string, code: string, hostname: string, otherScripts: Script[]): void {\n // Update code and filename\n this.code = Script.formatCode(code);\n\n this.filename = filename;\n this.server = hostname;\n this.updateRamUsage(player, otherScripts);\n this.markUpdated();\n for (const dependent of this.dependents) {\n const [dependentScript] = otherScripts.filter(\n (s) => s.filename === dependent.filename && s.server == dependent.server,\n );\n if (dependentScript !== null) dependentScript.markUpdated();\n }\n }\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 async updateRamUsage(player: IPlayer, otherScripts: Script[]): Promise {\n const res = await calculateRamUsage(player, this.code, otherScripts);\n if (res.cost > 0) {\n this.ramUsage = roundToTwo(res.cost);\n this.ramUsageEntries = res.entries;\n }\n this.markUpdated();\n }\n\n imports(): string[] {\n return [];\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"Script\", this);\n }\n\n // Initializes a Script Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Script {\n const s = Generic_fromJSON(Script, value.data);\n // Force the url to blank from the save data. Urls are not valid outside the current browser page load.\n s.url = \"\";\n s.dependents = [];\n return s;\n }\n\n /**\n * Formats code: Removes the starting & trailing whitespace\n * @param {string} code - The code to format\n * @returns The formatted code\n */\n static formatCode(code: string): string {\n return code.replace(/^\\s+|\\s+$/g, \"\");\n }\n}\n\nReviver.constructors.Script = Script;\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 */\nexport function arrayToString(a: T[]): string {\n const vals: any[] = [];\n for (let i = 0; i < a.length; ++i) {\n let elem: any = a[i];\n if (Array.isArray(elem)) {\n elem = arrayToString(elem);\n } else if (typeof elem === \"string\") {\n elem = `\"${elem}\"`;\n }\n vals.push(elem);\n }\n\n return `[${vals.join(\", \")}]`;\n}\n","import { DarkWebItem } from \"./DarkWebItem\";\nimport { IMap } from \"../types\";\nimport { Programs } from \"../Programs/Programs\";\n\nexport const DarkWebItems: IMap = {\n BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, \"Opens up SSH Ports.\"),\n FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports.\"),\n RelaySMTPProgram: new DarkWebItem(Programs.RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports.\"),\n HTTPWormProgram: new DarkWebItem(Programs.HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports.\"),\n SQLInjectProgram: new DarkWebItem(Programs.SQLInjectProgram.name, 250e6, \"Opens up SQL Ports.\"),\n ServerProfiler: new DarkWebItem(\n Programs.ServerProfiler.name,\n 500000,\n \"Displays detailed information about a server.\",\n ),\n DeepscanV1: new DarkWebItem(Programs.DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5.\"),\n DeepscanV2: new DarkWebItem(Programs.DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10.\"),\n AutolinkProgram: new DarkWebItem(Programs.AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze'.\"),\n FormulasProgram: new DarkWebItem(Programs.Formulas.name, 5e9, \"Unlock access to the formulas API.\"),\n};\n","import { Action } from \"./Action\";\nimport { IMap } from \"../types\";\n\nexport const GeneralActions: IMap = {};\n\nconst actionNames : Array = [\n \"Training\",\n \"Field Analysis\",\n \"Recruitment\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\"\n];\n\nfor (const actionName of actionNames){\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n}\n","// Enum values are lowercased to match css classes\nexport enum Suit {\n Clubs = \"clubs\",\n Diamonds = \"diamonds\",\n Hearts = \"hearts\",\n Spades = \"spades\",\n}\n\nexport class Card {\n constructor(readonly value: number, readonly suit: Suit) {\n if (value < 1 || value > 13) {\n throw new Error(`Card instantiated with improper value: ${value}`);\n }\n }\n\n formatValue(): string {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return `${this.value}`;\n }\n }\n\n isRedSuit(): boolean {\n return this.suit === Suit.Hearts || this.suit === Suit.Diamonds;\n }\n\n getStringRepresentation(): string {\n const value = this.formatValue();\n\n return `${value} of ${this.suit}`;\n }\n}\n","import { IActionIdentifier } from \"./IActionIdentifier\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\ninterface IParams {\n name?: string;\n type?: number;\n}\n\nexport class ActionIdentifier implements IActionIdentifier {\n name = \"\";\n type = -1;\n\n constructor(params: IParams = {}) {\n if (params.name) this.name = params.name;\n if (params.type) this.type = params.type;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"ActionIdentifier\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActionIdentifier {\n return Generic_fromJSON(ActionIdentifier, value.data);\n }\n}\n\nReviver.constructors.ActionIdentifier = ActionIdentifier;\n","import { BitNodes } from \"../BitNode/BitNode\";\n\nexport class SourceFile {\n info: JSX.Element;\n lvl = 1;\n n: number;\n name: string;\n owned = false;\n\n constructor(number: number, info: JSX.Element) {\n const bitnodeKey = \"BitNode\" + number;\n const bitnode = BitNodes[bitnodeKey];\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","// Base class representing a person-like object\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { IPlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { CONSTANTS } from \"../Constants\";\nimport { calculateSkill } from \"./formulas/skill\";\nimport { calculateIntelligenceBonus } from \"./formulas/intelligence\";\n\n// Interface that defines a generic object used to track experience/money\n// earnings for tasks\nexport interface ITaskTracker {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n money: number;\n}\n\nexport function createTaskTracker(): ITaskTracker {\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}\n\nexport abstract class Person {\n /**\n * Stats\n */\n hacking = 1;\n strength = 1;\n defense = 1;\n dexterity = 1;\n agility = 1;\n charisma = 1;\n intelligence = 1;\n hp = 10;\n max_hp = 10;\n\n /**\n * Experience\n */\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n /**\n * Multipliers\n */\n hacking_mult = 1;\n strength_mult = 1;\n defense_mult = 1;\n dexterity_mult = 1;\n agility_mult = 1;\n charisma_mult = 1;\n\n hacking_exp_mult = 1;\n strength_exp_mult = 1;\n defense_exp_mult = 1;\n dexterity_exp_mult = 1;\n agility_exp_mult = 1;\n charisma_exp_mult = 1;\n\n hacking_chance_mult = 1;\n hacking_speed_mult = 1;\n hacking_money_mult = 1;\n hacking_grow_mult = 1;\n\n company_rep_mult = 1;\n faction_rep_mult = 1;\n\n crime_money_mult = 1;\n crime_success_mult = 1;\n\n work_money_mult = 1;\n\n hacknet_node_money_mult = 1;\n hacknet_node_purchase_cost_mult = 1;\n hacknet_node_ram_cost_mult = 1;\n hacknet_node_core_cost_mult = 1;\n hacknet_node_level_cost_mult = 1;\n\n bladeburner_max_stamina_mult = 1;\n bladeburner_stamina_gain_mult = 1;\n bladeburner_analysis_mult = 1;\n bladeburner_success_chance_mult = 1;\n\n /**\n * Augmentations\n */\n augmentations: IPlayerOwnedAugmentation[] = [];\n queuedAugmentations: IPlayerOwnedAugmentation[] = [];\n\n /**\n * City that the person is in\n */\n city: CityName = CityName.Sector12;\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug: Augmentation): void {\n for (const mult of Object.keys(aug.mults)) {\n if ((this as any)[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n (this as any)[mult] *= aug.mults[mult];\n }\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 calculateStat(exp: number, mult = 1): number {\n return calculateSkill(exp, mult);\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n getFactionFieldWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / 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 5.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n getFactionHackingWorkRepGain(): number {\n return (this.hacking / CONSTANTS.MaxSkillLevel) * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n getFactionSecurityWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / CONSTANTS.MaxSkillLevel +\n this.strength / CONSTANTS.MaxSkillLevel +\n this.defense / CONSTANTS.MaxSkillLevel +\n this.dexterity / CONSTANTS.MaxSkillLevel +\n this.agility / CONSTANTS.MaxSkillLevel)) /\n 4.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Reset all multipliers to 1\n */\n resetMultipliers(): void {\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\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\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n this.work_money_mult = 1;\n }\n\n /**\n * Update all stat levels\n */\n updateStatLevels(): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier),\n ),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier),\n ),\n );\n\n const ratio: number = 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: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n }\n}\n","import React from 'react';\nimport { MathJax, MathJaxContext } from \"better-react-mathjax\";\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport function MathJaxWrapper({ children }: IProps): React.ReactElement {\n return (\n \n {children}\n \n )\n}\n","import { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ninterface IError {\n fileName?: string;\n lineNumber?: number;\n}\n\nexport function exceptionAlert(e: IError | string): void {\n console.error(e);\n dialogBoxCreate(\n \"Caught an exception: \" +\n e +\n \"

\" +\n \"Filename: \" +\n ((e as any).fileName || \"UNKNOWN FILE NAME\") +\n \"

\" +\n \"Line Number: \" +\n ((e as any).lineNumber || \"UNKNOWN LINE NUMBER\") +\n \"

\" +\n \"This is a bug, please report to game developer with this \" +\n \"message as well as details about how to reproduce the bug.

\" +\n \"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your \" +\n \"safe doesn't get corrupted\",\n );\n}\n","import { Message } from \"./Message\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Player } from \"../Player\";\nimport { redPillFlag } from \"../RedPill\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\n//Sends message to player, including a pop up\nfunction sendMessage(msg: Message, forced = false): void {\n msg.recvd = true;\n if (forced || !Settings.SuppressMessages) {\n showMessage(msg.filename);\n }\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(name: string): void {\n const msg = Messages[name];\n if (!msg) throw new Error(\"trying to display unexistent message\");\n const txt =\n \"Message received from unknown sender:

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

\" +\n \"This message was saved as \" +\n msg.filename +\n \" onto your home computer.\";\n dialogBoxCreate(txt);\n}\n\n//Adds a message to a server\nfunction addMessageToServer(msg: Message, serverHostname: string): void {\n const server = GetServer(serverHostname);\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n for (let i = 0; i < server.messages.length; ++i) {\n const other = server.messages[i];\n if (msg.filename === other) {\n return; //Already exists\n }\n }\n server.messages.push(msg.filename);\n}\n\n//Checks if any of the 'timed' messages should be sent\nfunction checkForMessagesToSend(): void {\n if (redPillFlag) return;\n const jumper0 = Messages[MessageFilenames.Jumper0];\n const jumper1 = Messages[MessageFilenames.Jumper1];\n const jumper2 = Messages[MessageFilenames.Jumper2];\n const jumper3 = Messages[MessageFilenames.Jumper3];\n const jumper4 = Messages[MessageFilenames.Jumper4];\n const cybersecTest = Messages[MessageFilenames.CyberSecTest];\n const nitesecTest = Messages[MessageFilenames.NiteSecTest];\n const bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n const redpill = Messages[MessageFilenames.RedPill];\n\n let redpillOwned = false;\n if (Augmentations[AugmentationNames.TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && Player.sourceFiles.length === 0 && !redPillFlag) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!redPillFlag) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && Player.hacking >= 25) {\n sendMessage(jumper0);\n const flightName = Programs.Flight.name;\n const homeComp = Player.getHomeComputer();\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && Player.hacking >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && Player.hacking >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && Player.hacking >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && Player.hacking >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && Player.hacking >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && Player.hacking >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && Player.hacking >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg: Message): void {\n Messages[msg.filename] = msg;\n}\n\nlet Messages: { [key: string]: Message | undefined } = {};\n\nfunction loadMessages(saveString: string): void {\n Messages = JSON.parse(saveString, Reviver);\n}\n\nconst 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(): void {\n //Reset\n Messages = {};\n\n //jump3R Messages\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper0,\n \"I know you can sense it. I know you're searching for it. \" +\n \"It's why you spend night after \" +\n \"night at your computer.

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

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

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

\" +\n \"-jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper1,\n `Soon you will be contacted by a hacking group known as ${FactionNames.NiteSec}. ` +\n \"They can help you with your search.

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

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

Watch out for a hacking group known as ${FactionNames.NiteSec}.` +\n \"

-jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper3,\n \"You must learn to walk before you can run. And you must \" +\n `run before you can fly. Look for ${FactionNames.TheBlackHand}.

` +\n \"I.I.I.I

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

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

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

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

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

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

-${FactionNames.NiteSec}`,\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.BitRunnersTest,\n \"We know what you are doing. We know what drives you. We know \" +\n \"what you are looking for.

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

\" +\n \"run4theh111z\",\n ),\n );\n\n AddToAllMessages(\n new Message(\n MessageFilenames.RedPill,\n \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
\" +\n \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
\" +\n \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
\" +\n \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\",\n ),\n );\n}\n\nexport { Messages, checkForMessagesToSend, showMessage, loadMessages, initMessages };\n","/**\n * The worker agent for running a script instance. Each running script instance\n * has its own underlying WorkerScript object.\n *\n * Note that these objects are not saved and re-loaded when the game is refreshed.\n * Instead, whenever the game is opened, WorkerScripts are re-created from\n * RunningScript objects\n */\nimport { Environment } from \"./Environment\";\nimport { RamCostConstants } from \"./RamCostGenerator\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { IMap } from \"../types\";\n\nexport class WorkerScript {\n /**\n * Script's arguments\n */\n args: any[];\n\n /**\n * Copy of the script's code\n */\n code = \"\";\n\n /**\n * Holds the timeoutID (numeric value) for whenever this script is blocked by a\n * timed Netscript function. i.e. Holds the return value of setTimeout()\n */\n delay: number | null = null;\n\n /**\n * Holds the Promise reject() function while the script is \"blocked\" by an async op\n */\n delayReject?: (reason?: any) => void;\n\n /**\n * Stores names of all functions that have logging disabled\n */\n disableLogs: IMap = {};\n\n /**\n * Used for dynamic RAM calculation. Stores names of all functions that have\n * already been checked by this script.\n * TODO: Could probably just combine this with loadedFns?\n */\n dynamicLoadedFns: IMap = {};\n\n /**\n * Tracks dynamic RAM usage\n */\n dynamicRamUsage: number = RamCostConstants.ScriptBaseRamCost;\n\n /**\n * Netscript Environment for this script\n */\n env: Environment;\n\n /**\n * Status message in case of script error. Currently unused I think\n */\n errorMessage = \"\";\n\n /**\n * Used for static RAM calculation. Stores names of all functions that have\n * already been checked by this script\n */\n loadedFns: IMap = {};\n\n /**\n * Filename of script\n */\n name: string;\n\n /**\n * Script's output/return value. Currently not used or implemented\n */\n output = \"\";\n\n /**\n * Process ID. Must be an integer. Used for efficient script\n * killing and removal.\n */\n pid: number;\n\n /**\n * Script's Static RAM usage. Equivalent to underlying script's RAM usage\n */\n ramUsage = 0;\n\n /**\n * Whether or not this workerScript is currently running\n */\n running = false;\n\n /**\n * Reference to underlying RunningScript object\n */\n scriptRef: RunningScript;\n\n /**\n * hostname on which this script is running\n */\n hostname: string;\n\n /**\n * Function called when the script ends.\n */\n atExit: any;\n\n constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => any) {\n this.name = runningScriptObj.filename;\n this.hostname = runningScriptObj.server;\n\n const sanitizedPid = Math.round(pid);\n if (typeof sanitizedPid !== \"number\" || isNaN(sanitizedPid)) {\n throw new Error(`Invalid PID when constructing WorkerScript: ${pid}`);\n }\n this.pid = sanitizedPid;\n runningScriptObj.pid = sanitizedPid;\n\n // Get the underlying script's code\n const server = GetServer(this.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.hostname}`);\n }\n let found = false;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n found = true;\n this.code = server.scripts[i].code;\n }\n }\n if (!found) {\n throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);\n }\n this.scriptRef = runningScriptObj;\n this.args = runningScriptObj.args.slice();\n this.env = new Environment(null);\n if (typeof nsFuncsGenerator === \"function\") {\n this.env.vars = nsFuncsGenerator(this);\n }\n this.env.set(\"args\", runningScriptObj.args.slice());\n }\n\n /**\n * Returns the Server on which this script is running\n */\n getServer(): BaseServer {\n const server = GetServer(this.hostname);\n if (server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);\n return server;\n }\n\n /**\n * Returns the Script object for the underlying script.\n * Returns null if it cannot be found (which would be a bug)\n */\n getScript(): Script | null {\n const server = this.getServer();\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n return server.scripts[i];\n }\n }\n\n console.error(\n \"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong\",\n );\n return null;\n }\n\n /**\n * Returns the script with the specified filename on the specified server,\n * or null if it cannot be found\n */\n getScriptOnServer(fn: string, server: BaseServer): Script | null {\n if (server == null) {\n server = this.getServer();\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === fn) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n shouldLog(fn: string): boolean {\n return this.disableLogs[fn] == null;\n }\n\n log(func: string, txt: () => string): void {\n if (this.shouldLog(func)) {\n if (func && txt) {\n this.scriptRef.log(`${func}: ${txt()}`);\n } else if (func) {\n this.scriptRef.log(func);\n } else {\n this.scriptRef.log(txt());\n }\n }\n }\n\n print(txt: string): void {\n this.scriptRef.log(txt);\n }\n}\n","import { BlackOperation } from \"./BlackOperation\";\nimport { IMap } from \"../types\";\nimport { BlackOperationNames } from \"./data/BlackOperationNames\";\n\nexport const BlackOperations: IMap = {};\n\n(function () {\n BlackOperations[BlackOperationNames.OperationTyphoon] = new BlackOperation({\n name: BlackOperationNames.OperationTyphoon,\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[BlackOperationNames.OperationZero] = new BlackOperation({\n name: BlackOperationNames.OperationZero,\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[BlackOperationNames.OperationX] = new BlackOperation({\n name: BlackOperationNames.OperationX,\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[BlackOperationNames.OperationTitan] = new BlackOperation({\n name: BlackOperationNames.OperationTitan,\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[BlackOperationNames.OperationAres] = new BlackOperation({\n name: BlackOperationNames.OperationAres,\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[BlackOperationNames.OperationArchangel] = new BlackOperation({\n name: BlackOperationNames.OperationArchangel,\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[BlackOperationNames.OperationJuggernaut] = new BlackOperation({\n name: BlackOperationNames.OperationJuggernaut,\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[BlackOperationNames.OperationRedDragon] = new BlackOperation({\n name: BlackOperationNames.OperationRedDragon,\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[BlackOperationNames.OperationK] = new BlackOperation({\n name: BlackOperationNames.OperationK,\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[BlackOperationNames.OperationDeckard] = new BlackOperation({\n name: BlackOperationNames.OperationDeckard,\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[BlackOperationNames.OperationTyrell] = new BlackOperation({\n name: BlackOperationNames.OperationTyrell,\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[BlackOperationNames.OperationWallace] = new BlackOperation({\n name: BlackOperationNames.OperationWallace,\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[BlackOperationNames.OperationShoulderOfOrion] = new BlackOperation({\n name: BlackOperationNames.OperationShoulderOfOrion,\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[BlackOperationNames.OperationHyron] = new BlackOperation({\n name: BlackOperationNames.OperationHyron,\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[BlackOperationNames.OperationMorpheus] = new BlackOperation({\n name: BlackOperationNames.OperationMorpheus,\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[BlackOperationNames.OperationIonStorm] = new BlackOperation({\n name: BlackOperationNames.OperationIonStorm,\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[BlackOperationNames.OperationAnnihilus] = new BlackOperation({\n name: BlackOperationNames.OperationAnnihilus,\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[BlackOperationNames.OperationUltron] = new BlackOperation({\n name: BlackOperationNames.OperationUltron,\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[BlackOperationNames.OperationCenturion] = new BlackOperation({\n name: BlackOperationNames.OperationCenturion,\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[BlackOperationNames.OperationVindictus] = new BlackOperation({\n name: BlackOperationNames.OperationVindictus,\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[BlackOperationNames.OperationDaedalus] = new BlackOperation({\n name: BlackOperationNames.OperationDaedalus,\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","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IPlayerOrSleeve } from \"../PersonObjects/IPlayerOrSleeve\";\nimport { IRouter } from \"../ui/Router\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\n\ninterface IConstructorParams {\n hacking_success_weight?: number;\n strength_success_weight?: number;\n defense_success_weight?: number;\n dexterity_success_weight?: number;\n agility_success_weight?: number;\n charisma_success_weight?: number;\n hacking_exp?: number;\n strength_exp?: number;\n defense_exp?: number;\n dexterity_exp?: number;\n agility_exp?: number;\n charisma_exp?: number;\n intelligence_exp?: number;\n\n kills?: number;\n}\n\nexport class Crime {\n // Number representing the difficulty of the crime. Used for success chance calculations\n difficulty = 0;\n\n // Amount of karma lost for SUCCESSFULLY committing this crime\n karma = 0;\n\n // How many people die as a result of this crime\n kills = 0;\n\n // How much money is given by the\n money = 0;\n\n // Name of crime\n name = \"\";\n\n // Milliseconds it takes to attempt the crime\n time = 0;\n\n // Corresponding type in CONSTANTS. Contains a description for the crime activity\n type = \"\";\n\n // Weighting factors that determine how stats affect the success rate of this crime\n hacking_success_weight = 0;\n strength_success_weight = 0;\n defense_success_weight = 0;\n dexterity_success_weight = 0;\n agility_success_weight = 0;\n charisma_success_weight = 0;\n\n // How much stat experience is granted by this crime\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n constructor(name = \"\", type = \"\", time = 0, money = 0, difficulty = 0, karma = 0, params: IConstructorParams = {}) {\n this.name = name;\n this.type = type;\n this.time = time;\n this.money = money;\n this.difficulty = difficulty;\n this.karma = karma;\n\n this.hacking_success_weight = params.hacking_success_weight ? params.hacking_success_weight : 0;\n this.strength_success_weight = params.strength_success_weight ? params.strength_success_weight : 0;\n this.defense_success_weight = params.defense_success_weight ? params.defense_success_weight : 0;\n this.dexterity_success_weight = params.dexterity_success_weight ? params.dexterity_success_weight : 0;\n this.agility_success_weight = params.agility_success_weight ? params.agility_success_weight : 0;\n this.charisma_success_weight = params.charisma_success_weight ? params.charisma_success_weight : 0;\n\n this.hacking_exp = params.hacking_exp ? params.hacking_exp : 0;\n this.strength_exp = params.strength_exp ? params.strength_exp : 0;\n this.defense_exp = params.defense_exp ? params.defense_exp : 0;\n this.dexterity_exp = params.dexterity_exp ? params.dexterity_exp : 0;\n this.agility_exp = params.agility_exp ? params.agility_exp : 0;\n this.charisma_exp = params.charisma_exp ? params.charisma_exp : 0;\n this.intelligence_exp = params.intelligence_exp ? params.intelligence_exp : 0;\n\n this.kills = params.kills ? params.kills : 0;\n }\n\n commit(router: IRouter, p: IPlayer, div = 1, workerScript: WorkerScript | null = null): number {\n if (div <= 0) {\n div = 1;\n }\n p.startCrime(\n router,\n this.type,\n this.hacking_exp / div,\n this.strength_exp / div,\n this.defense_exp / div,\n this.dexterity_exp / div,\n this.agility_exp / div,\n this.charisma_exp / div,\n this.money / div,\n this.time,\n workerScript,\n );\n\n return this.time;\n }\n\n successRate(p: IPlayerOrSleeve): number {\n let chance: number =\n this.hacking_success_weight * p.hacking +\n this.strength_success_weight * p.strength +\n this.defense_success_weight * p.defense +\n this.dexterity_success_weight * p.dexterity +\n this.agility_success_weight * p.agility +\n this.charisma_success_weight * p.charisma +\n CONSTANTS.IntelligenceCrimeWeight * p.intelligence;\n chance /= CONSTANTS.MaxSkillLevel;\n chance /= this.difficulty;\n chance *= p.crime_success_mult;\n chance *= p.getIntelligenceBonus(1);\n\n return Math.min(chance, 1);\n }\n}\n","export function calculateIntelligenceBonus(intelligence: number, weight = 1): number {\n return 1 + (weight * Math.pow(intelligence, 0.8)) / 600;\n}\n","// The Research Map is an object that holds all Corporation Research objects\n// as values. They are identified by their names\nimport { Research, IConstructorParams } from \"./Research\";\nimport { researchMetadata } from \"./data/ResearchMetadata\";\nimport { IMap } from \"../types\";\n\nexport const ResearchMap: IMap = {};\n\nfunction addResearch(p: IConstructorParams): void {\n if (ResearchMap[p.name] != null) {\n console.warn(`Duplicate Research being defined: ${p.name}`);\n }\n ResearchMap[p.name] = new Research(p);\n}\n\nfor (const metadata of researchMetadata) {\n addResearch(metadata);\n}\n","/**\n * React Component for a button that's used to apply for a job\n */\nimport * as React from \"react\";\n\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\n\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n company: Company;\n entryPosType: CompanyPosition;\n onClick: (e: React.MouseEvent) => void;\n text: string;\n};\n\nexport function ApplyToJobButton(props: IProps): React.ReactElement {\n const player = use.Player();\n\n function getJobRequirementTooltip(): string {\n const pos = player.getNextCompanyPosition(props.company, props.entryPosType);\n if (pos == null) {\n return \"\";\n }\n\n if (!props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return getJobRequirementText(props.company, pos, true);\n }\n\n return (\n <>\n }>\n \n \n \n );\n}\n","/**\n * Event emitter that triggers when scripts are started/stopped\n */\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nexport const WorkerScriptStartStopEventEmitter = new EventEmitter<[]>();\n","import { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { Terminal } from \"./Terminal\";\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\nimport { IMap, IReturnStatus } from \"./types\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { ImportPlayerData, SaveData, saveObject } from \"./SaveObject\";\nimport { Settings } from \"./Settings/Settings\";\nimport { exportScripts } from \"./Terminal/commands/download\";\nimport { CONSTANTS } from \"./Constants\";\nimport { hash } from \"./hash/hash\";\n\nexport function initElectron(): void {\n const userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\" electron/\") > -1) {\n // Electron-specific code\n (document as any).achievements = [];\n initWebserver();\n initAppNotifier();\n initSaveFunctions();\n initElectronBridge();\n }\n}\n\nfunction initWebserver(): void {\n interface IReturnWebStatus extends IReturnStatus {\n data?: {\n [propName: string]: any;\n };\n }\n function normalizeFileName(filename: string): string {\n filename = filename.replace(/\\/\\/+/g, \"/\");\n filename = removeLeadingSlash(filename);\n if (filename.includes(\"/\")) {\n filename = \"/\" + removeLeadingSlash(filename);\n }\n return filename;\n }\n\n (document as any).getFiles = function (): IReturnWebStatus {\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return {\n res: true,\n data: {\n files: home.scripts.map((script) => ({\n filename: script.filename,\n code: script.code,\n ramUsage: script.ramUsage,\n })),\n },\n };\n };\n\n (document as any).deleteFile = function (filename: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return home.removeFile(filename);\n };\n\n (document as any).saveFile = function (filename: string, code: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n\n code = Buffer.from(code, \"base64\").toString();\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n const { success, overwritten } = home.writeToScriptFile(Player, filename, code);\n let script;\n if (success) {\n script = home.getScript(filename);\n }\n return {\n res: success,\n data: {\n overwritten,\n ramUsage: script?.ramUsage,\n },\n };\n };\n}\n\n// Expose certain alert functions to allow the wrapper to sends message to the game\nfunction initAppNotifier(): void {\n const funcs = {\n terminal: (message: string, type?: string) => {\n const typesFn: IMap<(s: string) => void> = {\n info: Terminal.info,\n warn: Terminal.warn,\n error: Terminal.error,\n success: Terminal.success,\n };\n let fn;\n if (type) fn = typesFn[type];\n if (!fn) fn = Terminal.print;\n fn.bind(Terminal)(message);\n },\n toast: (message: string, type: \"info\" | \"success\" | \"warning\" | \"error\", duration = 2000) =>\n SnackbarEvents.emit(message, type, duration),\n };\n\n // Will be consumud by the electron wrapper.\n (window as any).appNotifier = funcs;\n}\n\nfunction initSaveFunctions(): void {\n const funcs = {\n triggerSave: (): Promise => saveObject.saveGame(true),\n triggerGameExport: (): void => {\n try {\n saveObject.exportGame();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export game.\", \"error\", 2000);\n }\n },\n triggerScriptsExport: (): void => exportScripts(\"*\", Player.getHomeComputer()),\n getSaveData: (): { save: string; fileName: string } => {\n return {\n save: saveObject.getSaveString(Settings.ExcludeRunningScriptsFromSave),\n fileName: saveObject.getSaveFileName(),\n };\n },\n getSaveInfo: async (base64save: string): Promise => {\n try {\n const data = await saveObject.getImportDataFromString(base64save);\n return data.playerData;\n } catch (error) {\n console.error(error);\n return;\n }\n },\n pushSaveData: (base64save: string, automatic = false): void => Router.toImportSave(base64save, automatic),\n };\n\n // Will be consumud by the electron wrapper.\n (window as any).appSaveFns = funcs;\n}\n\nfunction initElectronBridge(): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.receive(\"get-save-data-request\", () => {\n const data = (window as any).appSaveFns.getSaveData();\n bridge.send(\"get-save-data-response\", data);\n });\n bridge.receive(\"get-save-info-request\", async (save: string) => {\n const data = await (window as any).appSaveFns.getSaveInfo(save);\n bridge.send(\"get-save-info-response\", data);\n });\n bridge.receive(\"push-save-request\", ({ save, automatic = false }: { save: string; automatic: boolean }) => {\n (window as any).appSaveFns.pushSaveData(save, automatic);\n });\n bridge.receive(\"trigger-save\", () => {\n return (window as any).appSaveFns\n .triggerSave()\n .then(() => {\n bridge.send(\"save-completed\");\n })\n .catch((error: any) => {\n console.log(error);\n SnackbarEvents.emit(\"Could not save game.\", \"error\", 2000);\n });\n });\n bridge.receive(\"trigger-game-export\", () => {\n try {\n (window as any).appSaveFns.triggerGameExport();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export game.\", \"error\", 2000);\n }\n });\n bridge.receive(\"trigger-scripts-export\", () => {\n try {\n (window as any).appSaveFns.triggerScriptsExport();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export scripts.\", \"error\", 2000);\n }\n });\n}\n\nexport function pushGameSaved(data: SaveData): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.send(\"push-game-saved\", data);\n}\n\nexport function pushGameReady(): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n // Send basic information to the electron wrapper\n bridge.send(\"push-game-ready\", {\n player: {\n identifier: Player.identifier,\n playtime: Player.totalPlaytime,\n lastSave: Player.lastSave,\n },\n game: {\n version: CONSTANTS.VersionString,\n hash: hash(),\n },\n });\n}\n\nexport function pushImportResult(wasImported: boolean): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.send(\"push-import-result\", { wasImported });\n pushDisableRestore();\n}\n\nexport function pushDisableRestore(): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.send(\"push-disable-restore\", { duration: 1000 * 60 });\n}\n","import { PlayerObject } from \"src/PersonObjects/Player/PlayerObject\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { SkillNames } from \"../Bladeburner/data/SkillNames\";\nimport { Skills } from \"../Bladeburner/Skills\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Industries } from \"../Corporation/IndustryData\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport { Factions } from \"../Faction/Factions\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { hasHacknetServers } from \"../Hacknet/HacknetHelpers\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Player } from \"../Player\";\nimport { Programs } from \"../Programs/Programs\";\nimport { GetAllServers, GetServer } from \"../Server/AllServers\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Server } from \"../Server/Server\";\nimport { Router } from \"../ui/GameRoot\";\nimport { Page } from \"../ui/Router\";\nimport { IMap } from \"../types\";\nimport * as data from \"./AchievementData.json\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { BlackOperationNames } from \"../Bladeburner/data/BlackOperationNames\";\n\n// Unable to correctly cast the JSON data into AchievementDataJson type otherwise...\nconst achievementData = ((data)).achievements;\n\nexport interface Achievement {\n ID: string;\n Icon?: string;\n Name?: string;\n Description?: string;\n Secret?: boolean;\n Condition: () => boolean;\n Visible?: () => boolean;\n AdditionalUnlock?: string[]; // IDs of achievements that should be awarded when awarding this one\n}\n\nexport interface PlayerAchievement {\n ID: string;\n unlockedOn?: number;\n}\n\nexport interface AchievementDataJson {\n achievements: IMap;\n}\n\nexport interface AchievementData {\n ID: string;\n Name: string;\n Description: string;\n}\n\nfunction bitNodeFinishedState(): boolean {\n const wd = GetServer(SpecialServers.WorldDaemon);\n if (!(wd instanceof Server)) return false;\n if (wd.backdoorInstalled) return true;\n return (\n Player.bladeburner !== null && Player.bladeburner.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)\n );\n}\n\nfunction hasAccessToSF(player: PlayerObject, bn: number): boolean {\n return player.bitNodeN === bn || player.sourceFiles.some((a) => a.n === bn);\n}\n\nfunction knowsAboutBitverse(player: PlayerObject): boolean {\n return player.sourceFiles.some((a) => a.n === 1);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction sfAchievement(): Achievement[] {\n const achs: Achievement[] = [];\n for (let i = 0; i <= 11; i++) {\n for (let j = 1; j <= 3; j++) {\n achs.push({\n ID: `SF${i}.${j}`,\n Condition: () => Player.sourceFileLvl(i) >= j,\n });\n }\n }\n return achs;\n}\n\nexport const achievements: IMap = {\n [FactionNames.CyberSec.toUpperCase()]: {\n ...achievementData[FactionNames.CyberSec.toUpperCase()],\n Icon: \"CSEC\",\n Condition: () => Player.factions.includes(FactionNames.CyberSec),\n },\n [FactionNames.NiteSec.toUpperCase()]: {\n ...achievementData[FactionNames.NiteSec.toUpperCase()],\n Icon: FactionNames.NiteSec,\n Condition: () => Player.factions.includes(FactionNames.NiteSec),\n },\n THE_BLACK_HAND: {\n ...achievementData[\"THE_BLACK_HAND\"],\n Icon: \"TBH\",\n Condition: () => Player.factions.includes(FactionNames.TheBlackHand),\n },\n [FactionNames.BitRunners.toUpperCase()]: {\n ...achievementData[FactionNames.BitRunners.toUpperCase()],\n Icon: FactionNames.BitRunners.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.BitRunners),\n },\n [FactionNames.Daedalus.toUpperCase()]: {\n ...achievementData[FactionNames.Daedalus.toUpperCase()],\n Icon: FactionNames.Daedalus.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Daedalus),\n },\n THE_COVENANT: {\n ...achievementData[\"THE_COVENANT\"],\n Icon: FactionNames.TheCovenant.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.TheCovenant),\n },\n [FactionNames.Illuminati.toUpperCase()]: {\n ...achievementData[FactionNames.Illuminati.toUpperCase()],\n Icon: FactionNames.Illuminati.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Illuminati),\n },\n \"BRUTESSH.EXE\": {\n ...achievementData[\"BRUTESSH.EXE\"],\n Icon: \"p0\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.BruteSSHProgram.name),\n },\n \"FTPCRACK.EXE\": {\n ...achievementData[\"FTPCRACK.EXE\"],\n Icon: \"p1\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.FTPCrackProgram.name),\n },\n //-----------------------------------------------------\n \"RELAYSMTP.EXE\": {\n ...achievementData[\"RELAYSMTP.EXE\"],\n Icon: \"p2\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.RelaySMTPProgram.name),\n },\n \"HTTPWORM.EXE\": {\n ...achievementData[\"HTTPWORM.EXE\"],\n Icon: \"p3\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.HTTPWormProgram.name),\n },\n \"SQLINJECT.EXE\": {\n ...achievementData[\"SQLINJECT.EXE\"],\n Icon: \"p4\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.SQLInjectProgram.name),\n },\n \"FORMULAS.EXE\": {\n ...achievementData[\"FORMULAS.EXE\"],\n Icon: \"formulas\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.Formulas.name),\n },\n \"SF1.1\": {\n ...achievementData[\"SF1.1\"],\n Icon: \"SF1.1\",\n Visible: () => hasAccessToSF(Player, 1),\n Condition: () => Player.sourceFileLvl(1) >= 1,\n },\n \"SF2.1\": {\n ...achievementData[\"SF2.1\"],\n Icon: \"SF2.1\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.sourceFileLvl(2) >= 1,\n },\n \"SF3.1\": {\n ...achievementData[\"SF3.1\"],\n Icon: \"SF3.1\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.sourceFileLvl(3) >= 1,\n },\n \"SF4.1\": {\n ...achievementData[\"SF4.1\"],\n Icon: \"SF4.1\",\n Visible: () => hasAccessToSF(Player, 4),\n Condition: () => Player.sourceFileLvl(4) >= 1,\n },\n \"SF5.1\": {\n ...achievementData[\"SF5.1\"],\n Icon: \"SF5.1\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.sourceFileLvl(5) >= 1,\n },\n \"SF6.1\": {\n ...achievementData[\"SF6.1\"],\n Icon: \"SF6.1\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.sourceFileLvl(6) >= 1,\n },\n \"SF7.1\": {\n ...achievementData[\"SF7.1\"],\n Icon: \"SF7.1\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.sourceFileLvl(7) >= 1,\n },\n \"SF8.1\": {\n ...achievementData[\"SF8.1\"],\n Icon: \"SF8.1\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.sourceFileLvl(8) >= 1,\n },\n \"SF9.1\": {\n ...achievementData[\"SF9.1\"],\n Icon: \"SF9.1\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => Player.sourceFileLvl(9) >= 1,\n },\n \"SF10.1\": {\n ...achievementData[\"SF10.1\"],\n Icon: \"SF10.1\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sourceFileLvl(10) >= 1,\n },\n \"SF11.1\": {\n ...achievementData[\"SF11.1\"],\n Icon: \"SF11.1\",\n Visible: () => hasAccessToSF(Player, 11),\n Condition: () => Player.sourceFileLvl(11) >= 1,\n },\n \"SF12.1\": {\n ...achievementData[\"SF12.1\"],\n Icon: \"SF12.1\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 1,\n },\n MONEY_1Q: {\n ...achievementData[\"MONEY_1Q\"],\n Icon: \"$1Q\",\n Condition: () => Player.money >= 1e18,\n },\n MONEY_M1B: {\n ...achievementData[\"MONEY_M1B\"],\n Icon: \"-1b\",\n Secret: true,\n Condition: () => Player.money <= -1e9,\n },\n INSTALL_1: {\n ...achievementData[\"INSTALL_1\"],\n Icon: \"install\",\n Condition: () => Player.augmentations.length >= 1,\n },\n INSTALL_100: {\n ...achievementData[\"INSTALL_100\"],\n Icon: \"install_100\",\n Condition: () => Player.augmentations.length >= 100,\n },\n QUEUE_40: {\n ...achievementData[\"QUEUE_40\"],\n Icon: \"queue40\",\n Condition: () => Player.queuedAugmentations.length >= 40,\n },\n HACKING_100000: {\n ...achievementData[\"HACKING_100000\"],\n Icon: \"hack100000\",\n Condition: () => Player.hacking >= 100000,\n },\n COMBAT_3000: {\n ...achievementData[\"COMBAT_3000\"],\n Icon: \"combat3000\",\n Condition: () =>\n Player.strength >= 3000 && Player.defense >= 3000 && Player.dexterity >= 3000 && Player.agility >= 3000,\n },\n NEUROFLUX_255: {\n ...achievementData[\"NEUROFLUX_255\"],\n Icon: \"nf255\",\n Condition: () => Player.augmentations.some((a) => a.name === AugmentationNames.NeuroFluxGovernor && a.level >= 255),\n },\n NS2: {\n ...achievementData[\"NS2\"],\n Icon: \"ns2\",\n Condition: () =>\n Player.getHomeComputer().scripts.some((s) => s.filename.endsWith(\".js\") || s.filename.endsWith(\".ns\")),\n },\n FROZE: {\n ...achievementData[\"FROZE\"],\n Icon: \"forze\",\n Condition: () => location.href.includes(\"noScripts\"),\n },\n RUNNING_SCRIPTS_1000: {\n ...achievementData[\"RUNNING_SCRIPTS_1000\"],\n Icon: \"run1000\",\n Condition: (): boolean => {\n let running = 0;\n for (const s of GetAllServers()) {\n running += s.runningScripts.length;\n }\n return running >= 1000;\n },\n },\n DRAIN_SERVER: {\n ...achievementData[\"DRAIN_SERVER\"],\n Icon: \"drain\",\n Condition: (): boolean => {\n for (const s of GetAllServers()) {\n if (s instanceof Server) {\n if (s.moneyMax > 0 && s.moneyAvailable === 0) return true;\n }\n }\n return false;\n },\n },\n MAX_RAM: {\n ...achievementData[\"MAX_RAM\"],\n Icon: \"maxram\",\n Condition: () => Player.getHomeComputer().maxRam === CONSTANTS.HomeComputerMaxRam,\n },\n MAX_CORES: {\n ...achievementData[\"MAX_CORES\"],\n Icon: \"maxcores\",\n Condition: () => Player.getHomeComputer().cpuCores === 8,\n },\n SCRIPTS_30: {\n ...achievementData[\"SCRIPTS_30\"],\n Icon: \"folders\",\n Condition: () => Player.getHomeComputer().scripts.length >= 30,\n },\n KARMA_1000000: {\n ...achievementData[\"KARMA_1000000\"],\n Icon: \"karma\",\n Secret: true,\n Condition: () => Player.karma <= -1e6,\n },\n STOCK_1q: {\n ...achievementData[\"STOCK_1q\"],\n Icon: \"$1Q\",\n Condition: () => Player.moneySourceB.stock >= 1e15,\n },\n DISCOUNT: {\n ...achievementData[\"DISCOUNT\"],\n Icon: \"discount\",\n Condition: (): boolean => {\n const p = GetServer(\"powerhouse-fitness\");\n if (!(p instanceof Server)) return false;\n return p.backdoorInstalled;\n },\n },\n SCRIPT_32GB: {\n ...achievementData[\"SCRIPT_32GB\"],\n Icon: \"bigcost\",\n Condition: () => Player.getHomeComputer().scripts.some((s) => s.ramUsage >= 32),\n },\n FIRST_HACKNET_NODE: {\n ...achievementData[\"FIRST_HACKNET_NODE\"],\n Icon: \"node\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n },\n \"30_HACKNET_NODE\": {\n ...achievementData[\"30_HACKNET_NODE\"],\n Icon: \"hacknet-all\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length >= 30,\n },\n MAX_HACKNET_NODE: {\n ...achievementData[\"MAX_HACKNET_NODE\"],\n Icon: \"hacknet-max\",\n Condition: (): boolean => {\n if (hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (!(h instanceof HacknetNode)) return false;\n if (\n h.ram === HacknetNodeConstants.MaxRam &&\n h.cores === HacknetNodeConstants.MaxCores &&\n h.level === HacknetNodeConstants.MaxLevel\n )\n return true;\n }\n return false;\n },\n },\n HACKNET_NODE_10M: {\n ...achievementData[\"HACKNET_NODE_10M\"],\n Icon: \"hacknet-10m\",\n Condition: () => !hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 10e6,\n },\n REPUTATION_10M: {\n ...achievementData[\"REPUTATION_10M\"],\n Icon: \"reputation\",\n Condition: () => Object.values(Factions).some((f) => f.playerReputation >= 10e6),\n },\n DONATION: {\n ...achievementData[\"DONATION\"],\n Icon: \"donation\",\n Condition: () => Object.values(Factions).some((f) => f.favor >= 150),\n },\n TRAVEL: {\n ...achievementData[\"TRAVEL\"],\n Icon: \"TRAVEL\",\n Condition: () => Player.city !== CityName.Sector12,\n },\n WORKOUT: {\n ...achievementData[\"WORKOUT\"],\n Icon: \"WORKOUT\",\n Condition: () =>\n [\n CONSTANTS.ClassGymStrength,\n CONSTANTS.ClassGymDefense,\n CONSTANTS.ClassGymDexterity,\n CONSTANTS.ClassGymAgility,\n ].includes(Player.className),\n },\n TOR: {\n ...achievementData[\"TOR\"],\n Icon: \"TOR\",\n Condition: () => Player.hasTorRouter(),\n },\n HOSPITALIZED: {\n ...achievementData[\"HOSPITALIZED\"],\n Icon: \"OUCH\",\n Condition: () => Player.moneySourceB.hospitalization !== 0,\n },\n GANG: {\n ...achievementData[\"GANG\"],\n Icon: \"GANG\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null,\n },\n FULL_GANG: {\n ...achievementData[\"FULL_GANG\"],\n Icon: \"GANGMAX\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && Player.gang.members.length === GangConstants.MaximumGangMembers,\n },\n GANG_TERRITORY: {\n ...achievementData[\"GANG_TERRITORY\"],\n Icon: \"GANG100%\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && AllGangs[Player.gang.facName].territory >= 0.999,\n },\n GANG_MEMBER_POWER: {\n ...achievementData[\"GANG_MEMBER_POWER\"],\n Icon: \"GANG10000\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () =>\n Player.gang !== null &&\n Player.gang.members.some(\n (m) =>\n m.hack >= 10000 || m.str >= 10000 || m.def >= 10000 || m.dex >= 10000 || m.agi >= 10000 || m.cha >= 10000,\n ),\n },\n CORPORATION: {\n ...achievementData[\"CORPORATION\"],\n Icon: \"CORP\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null,\n },\n CORPORATION_BRIBE: {\n ...achievementData[\"CORPORATION_BRIBE\"],\n Icon: \"CORPLOBBY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.unlockUpgrades[6] === 1,\n },\n CORPORATION_PROD_1000: {\n ...achievementData[\"CORPORATION_PROD_1000\"],\n Icon: \"CORP1000\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.divisions.some((d) => d.prodMult >= 1000),\n },\n CORPORATION_EMPLOYEE_3000: {\n ...achievementData[\"CORPORATION_EMPLOYEE_3000\"],\n Icon: \"CORPCITY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: (): boolean => {\n if (Player.corporation === null) return false;\n for (const d of Player.corporation.divisions) {\n for (const o of Object.values(d.offices)) {\n if (o === 0) continue;\n if (o.employees.length >= 3000) return true;\n }\n }\n return false;\n },\n },\n CORPORATION_REAL_ESTATE: {\n ...achievementData[\"CORPORATION_REAL_ESTATE\"],\n Icon: \"CORPRE\",\n Name: \"Own the land\",\n Description: \"Expand to the Real Estate division.\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () =>\n Player.corporation !== null && Player.corporation.divisions.some((d) => d.type === Industries.RealEstate),\n },\n INTELLIGENCE_255: {\n ...achievementData[\"INTELLIGENCE_255\"],\n Icon: \"INT255\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.intelligence >= 255,\n },\n BLADEBURNER_DIVISION: {\n ...achievementData[\"BLADEBURNER_DIVISION\"],\n Icon: \"BLADE\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null,\n },\n BLADEBURNER_OVERCLOCK: {\n ...achievementData[\"BLADEBURNER_OVERCLOCK\"],\n Icon: \"BLADEOVERCLOCK\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () =>\n Player.bladeburner !== null &&\n Player.bladeburner.skills[SkillNames.Overclock] === Skills[SkillNames.Overclock].maxLvl,\n },\n BLADEBURNER_UNSPENT_100000: {\n ...achievementData[\"BLADEBURNER_UNSPENT_100000\"],\n Icon: \"BLADE100K\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null && Player.bladeburner.skillPoints >= 100000,\n },\n \"4S\": {\n ...achievementData[\"4S\"],\n Icon: \"4S\",\n Condition: () => Player.has4SData,\n },\n FIRST_HACKNET_SERVER: {\n ...achievementData[\"FIRST_HACKNET_SERVER\"],\n Icon: \"HASHNET\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n AdditionalUnlock: [achievementData.FIRST_HACKNET_NODE.ID],\n },\n ALL_HACKNET_SERVER: {\n ...achievementData[\"ALL_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length === HacknetServerConstants.MaxServers,\n AdditionalUnlock: [achievementData[\"30_HACKNET_NODE\"].ID],\n },\n MAX_HACKNET_SERVER: {\n ...achievementData[\"MAX_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: (): boolean => {\n if (!hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (typeof h !== \"string\") return false;\n const hs = GetServer(h);\n if (!(hs instanceof HacknetServer)) return false;\n if (\n hs.maxRam === HacknetServerConstants.MaxRam &&\n hs.cores === HacknetServerConstants.MaxCores &&\n hs.level === HacknetServerConstants.MaxLevel &&\n hs.cache === HacknetServerConstants.MaxCache\n )\n return true;\n }\n return false;\n },\n AdditionalUnlock: [achievementData.MAX_HACKNET_NODE.ID],\n },\n HACKNET_SERVER_1B: {\n ...achievementData[\"HACKNET_SERVER_1B\"],\n Icon: \"HASHNETMONEY\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 1e9,\n AdditionalUnlock: [achievementData.HACKNET_NODE_10M.ID],\n },\n MAX_CACHE: {\n ...achievementData[\"MAX_CACHE\"],\n Icon: \"HASHNETCAP\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n hasHacknetServers(Player) &&\n Player.hashManager.hashes === Player.hashManager.capacity &&\n Player.hashManager.capacity > 0,\n },\n SLEEVE_8: {\n ...achievementData[\"SLEEVE_8\"],\n Icon: \"SLEEVE8\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sleeves.length === 8 && Player.sourceFileLvl(10) === 3,\n },\n INDECISIVE: {\n ...achievementData[\"INDECISIVE\"],\n Icon: \"1H\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: (function () {\n let c = 0;\n setInterval(() => {\n if (Router.page() === Page.BitVerse) {\n c++;\n } else {\n c = 0;\n }\n }, 60 * 1000);\n return () => c > 60;\n })(),\n },\n FAST_BN: {\n ...achievementData[\"FAST_BN\"],\n Icon: \"2DAYS\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () => bitNodeFinishedState() && Player.playtimeSinceLastBitnode < 1000 * 60 * 60 * 24 * 2,\n },\n CHALLENGE_BN1: {\n ...achievementData[\"CHALLENGE_BN1\"],\n Icon: \"BN1+\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () =>\n Player.bitNodeN === 1 &&\n bitNodeFinishedState() &&\n Player.getHomeComputer().maxRam <= 128 &&\n Player.getHomeComputer().cpuCores === 1,\n },\n CHALLENGE_BN2: {\n ...achievementData[\"CHALLENGE_BN2\"],\n Icon: \"BN2+\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.bitNodeN === 2 && bitNodeFinishedState() && Player.gang === null,\n },\n CHALLENGE_BN3: {\n ...achievementData[\"CHALLENGE_BN3\"],\n Icon: \"BN3+\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.bitNodeN === 3 && bitNodeFinishedState() && Player.corporation === null,\n },\n CHALLENGE_BN6: {\n ...achievementData[\"CHALLENGE_BN6\"],\n Icon: \"BN6+\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bitNodeN === 6 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN7: {\n ...achievementData[\"CHALLENGE_BN7\"],\n Icon: \"BN7+\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.bitNodeN === 7 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN8: {\n ...achievementData[\"CHALLENGE_BN8\"],\n Icon: \"BN8+\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.bitNodeN === 8 && bitNodeFinishedState() && !Player.has4SData && !Player.has4SDataTixApi,\n },\n CHALLENGE_BN9: {\n ...achievementData[\"CHALLENGE_BN9\"],\n Icon: \"BN9+\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n Player.bitNodeN === 9 &&\n bitNodeFinishedState() &&\n Player.moneySourceB.hacknet === 0 &&\n Player.moneySourceB.hacknet_expenses === 0,\n },\n CHALLENGE_BN10: {\n ...achievementData[\"CHALLENGE_BN10\"],\n Icon: \"BN10+\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () =>\n Player.bitNodeN === 10 &&\n bitNodeFinishedState() &&\n !Player.sleeves.some(\n (s) =>\n s.augmentations.length > 0 ||\n s.hacking_exp > 0 ||\n s.strength_exp > 0 ||\n s.defense_exp > 0 ||\n s.agility_exp > 0 ||\n s.dexterity_exp > 0 ||\n s.charisma_exp > 0,\n ),\n },\n CHALLENGE_BN12: {\n ...achievementData[\"CHALLENGE_BN12\"],\n Icon: \"BN12+\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 50,\n },\n BYPASS: {\n ...achievementData[\"BYPASS\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Bypass),\n },\n PROTOTYPETAMPERING: {\n ...achievementData[\"PROTOTYPETAMPERING\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.PrototypeTampering),\n },\n UNCLICKABLE: {\n ...achievementData[\"UNCLICKABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Unclickable),\n },\n UNDOCUMENTEDFUNCTIONCALL: {\n ...achievementData[\"UNDOCUMENTEDFUNCTIONCALL\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.UndocumentedFunctionCall),\n },\n TIMECOMPRESSION: {\n ...achievementData[\"TIMECOMPRESSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TimeCompression),\n },\n REALITYALTERATION: {\n ...achievementData[\"REALITYALTERATION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.RealityAlteration),\n },\n N00DLES: {\n ...achievementData[\"N00DLES\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.N00dles),\n },\n EDITSAVEFILE: {\n ...achievementData[\"EDITSAVEFILE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.EditSaveFile),\n },\n UNACHIEVABLE: {\n ...achievementData[\"UNACHIEVABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n // Hey Players! Yes, you're supposed to modify this to get the achievement!\n Condition: () => false,\n },\n CHALLENGE_BN13: {\n ...achievementData[\"CHALLENGE_BN13\"],\n Icon: \"BN13+\",\n Visible: () => hasAccessToSF(Player, 13),\n Condition: () =>\n Player.bitNodeN === 13 &&\n bitNodeFinishedState() &&\n !Player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1),\n },\n DEVMENU: {\n ...achievementData[\"DEVMENU\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.YoureNotMeantToAccessThis),\n },\n RAINBOW: {\n ...achievementData[\"RAINBOW\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.INeedARainbow),\n },\n TRUE_RECURSION: {\n ...achievementData[\"TRUE_RECURSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TrueRecursion),\n },\n};\n\n// Steam has a limit of 100 achievement. So these were planned but commented for now.\n// { ID: FactionNames.ECorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.ECorp) },\n// { ID: FactionNames.MegaCorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.MegaCorp) },\n// { ID: \"BACHMAN_&_ASSOCIATES\", Condition: () => Player.factions.includes(FactionNames.BachmanAssociates) },\n// { ID: \"BLADE_INDUSTRIES\", Condition: () => Player.factions.includes(FactionNames.BladeIndustries) },\n// { ID: FactionNames.NWO.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.NWO) },\n// { ID: \"CLARKE_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.ClarkeIncorporated) },\n// { ID: \"OMNITEK_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.OmniTekIncorporated) },\n// { ID: \"FOUR_SIGMA\", Condition: () => Player.factions.includes(FactionNames.FourSigma) },\n// { ID: \"KUAIGONG_INTERNATIONAL\", Condition: () => Player.factions.includes(FactionNames.KuaiGongInternational) },\n// { ID: \"FULCRUM_SECRET_TECHNOLOGIES\", Condition: () => Player.factions.includes(FactionNames.FulcrumSecretTechnologies) },\n// { ID: FactionNames.Aevum.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Aevum) },\n// { ID: FactionNames.Chongqing.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Chongqing) },\n// { ID: FactionNames.Ishima.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Ishima) },\n// { ID: \"NEW_TOKYO\", Condition: () => Player.factions.includes(FactionNames.NewTokyo) },\n// { ID: \"SECTOR-12\", Condition: () => Player.factions.includes(FactionNames.Sector12) },\n// { ID: FactionNames.Volhaven.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Volhaven) },\n// { ID: \"SPEAKERS_FOR_THE_DEAD\", Condition: () => Player.factions.includes(FactionNames.SpeakersForTheDead) },\n// { ID: \"THE_DARK_ARMY\", Condition: () => Player.factions.includes(FactionNames.TheDarkArmy) },\n// { ID: \"THE_SYNDICATE\", Condition: () => Player.factions.includes(FactionNames.TheSyndicate) },\n// { ID: FactionNames.Silhouette.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Silhouette) },\n// { ID: FactionNames.Tetrads.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Tetrads) },\n// { ID: \"SLUM_SNAKES\", Condition: () => Player.factions.includes(FactionNames.SlumSnakes) },\n// { ID: FactionNames.Netburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Netburners) },\n// { ID: \"TIAN_DI_HUI\", Condition: () => Player.factions.includes(FactionNames.TianDiHui) },\n// { ID: FactionNames.Bladeburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Bladeburners) },\n// { ID: \"DEEPSCANV1.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV1.name) },\n// { ID: \"DEEPSCANV2.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV2.name) },\n// {\n// ID: \"SERVERPROFILER.EXE\",\n// Condition: () => Player.getHomeComputer().programs.includes(Programs.ServerProfiler.name),\n// },\n// { ID: \"AUTOLINK.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.AutoLink.name) },\n// { ID: \"FLIGHT.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.Flight.name) },\n\nexport function calculateAchievements(): void {\n const playerAchievements = Player.achievements.map((a) => a.ID);\n\n const missingAchievements = Object.values(achievements)\n .filter((a) => !playerAchievements.includes(a.ID) && a.Condition())\n // callback returns array of achievement id and id of any in the additional list, flatmap means we have only a 1D array\n .flatMap((a) => [a.ID, ...(a.AdditionalUnlock || [])]);\n\n for (const id of missingAchievements) {\n Player.giveAchievement(id);\n }\n\n // Write all player's achievements to document for Steam/Electron\n // This could be replaced by \"availableAchievements\"\n // if we don't want to grant the save game achievements to steam but only currently available\n (document as any).achievements = [...Player.achievements.map((a) => a.ID)];\n}\n","// Root React Component for the Corporation UI\nimport React, { useState, useEffect } from \"react\";\n\nimport { Theme, useTheme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\nimport { KillScriptsModal } from \"./KillScriptsModal\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport SaveIcon from \"@mui/icons-material/Save\";\nimport ClearAllIcon from \"@mui/icons-material/ClearAll\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../Context\";\nimport { StatsProgressOverviewCell } from \"./StatsProgressBar\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Box, Tooltip } from \"@mui/material\";\nimport { CONSTANTS } from \"../../Constants\";\n\ninterface IProps {\n save: () => void;\n killScripts: () => void;\n}\n\nfunction Intelligence(): React.ReactElement {\n const theme = useTheme();\n const player = use.Player();\n const classes = useStyles();\n if (player.intelligence === 0) return <>;\n const progress = player.calculateSkillProgress(player.intelligence_exp);\n\n return (\n <>\n \n \n Int \n \n \n {numeralWrapper.formatSkill(player.intelligence)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n );\n}\n\nfunction Bladeburner(): React.ReactElement {\n const player = use.Player();\n const classes = useStyles();\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n const action = bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n if (action.type === \"Idle\") return <>;\n return (\n <>\n \n \n Bladeburner:\n \n \n \n \n \n {action.type}: {action.name}\n \n \n \n \n );\n}\n\ninterface WorkInProgressOverviewProps {\n tooltip: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onClickFocus: () => void;\n}\n\nfunction WorkInProgressOverview({\n tooltip,\n children,\n onClickFocus,\n header,\n}: WorkInProgressOverviewProps): React.ReactElement {\n const classes = useStyles();\n return (\n <>\n \n \n {tooltip}}>\n \n {header}\n \n \n \n \n \n \n {children}\n \n \n \n \n \n \n \n \n );\n}\n\nfunction Work(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const onClickFocus = (): void => {\n player.startFocusing();\n router.toWork();\n };\n\n if (!player.isWorking || player.focus) return <>;\n\n let details = <>;\n let header = <>;\n let innerText = <>;\n switch (player.workType) {\n case CONSTANTS.WorkTypeCompanyPartTime:\n case CONSTANTS.WorkTypeCompany:\n details = (\n <>\n {player.jobs[player.companyName]} at {player.companyName}\n \n );\n header = (\n <>\n Working at {player.companyName}\n \n );\n innerText = (\n <>\n + rep\n \n );\n break;\n case CONSTANTS.WorkTypeFaction:\n details = (\n <>\n {player.factionWorkType} for {player.currentWorkFactionName}\n \n );\n header = (\n <>\n Working for {player.currentWorkFactionName}\n \n );\n innerText = (\n <>\n + rep\n \n );\n break;\n case CONSTANTS.WorkTypeStudyClass:\n details = <>{player.workType};\n header = <>You are {player.className};\n innerText = <>{convertTimeMsToTimeElapsedString(player.timeWorked)};\n break;\n case CONSTANTS.WorkTypeCreateProgram:\n details = <>Coding {player.createProgramName};\n header = <>Creating a program;\n innerText = (\n <>\n {player.createProgramName}{\" \"}\n {((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}%\n \n );\n break;\n case CONSTANTS.WorkTypeGraftAugmentation:\n details = <>Grafting {player.graftAugmentationName};\n header = <>Grafting an Augmentation;\n innerText = (\n <>\n {((player.timeWorkedGraftAugmentation / player.timeNeededToCompleteWork) * 100).toFixed(2)}%{\" \"}\n done\n \n );\n }\n\n return (\n \n {innerText}\n \n );\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n workCell: {\n textAlign: \"center\",\n maxWidth: \"200px\",\n borderBottom: \"none\",\n padding: 0,\n margin: 0,\n },\n\n workHeader: {\n fontSize: \"0.9rem\",\n },\n\n workSubtitles: {\n fontSize: \"0.8rem\",\n },\n\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.colors.hp,\n },\n money: {\n color: theme.colors.money,\n },\n hack: {\n color: theme.colors.hack,\n },\n combat: {\n color: theme.colors.combat,\n },\n cha: {\n color: theme.colors.cha,\n },\n int: {\n color: theme.colors.int,\n },\n }),\n);\n\nexport { useStyles as characterOverviewStyles };\n\nexport function CharacterOverview({ save, killScripts }: IProps): React.ReactElement {\n const [killOpen, setKillOpen] = useState(false);\n const player = use.Player();\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 600);\n return () => clearInterval(id);\n }, []);\n\n const classes = useStyles();\n const theme = useTheme();\n\n const hackingProgress = player.calculateSkillProgress(\n player.hacking_exp,\n player.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier,\n );\n const strengthProgress = player.calculateSkillProgress(\n player.strength_exp,\n player.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier,\n );\n const defenseProgress = player.calculateSkillProgress(\n player.defense_exp,\n player.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier,\n );\n const dexterityProgress = player.calculateSkillProgress(\n player.dexterity_exp,\n player.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n const agilityProgress = player.calculateSkillProgress(\n player.agility_exp,\n player.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier,\n );\n const charismaProgress = player.calculateSkillProgress(\n player.charisma_exp,\n player.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier,\n );\n\n return (\n <>\n \n \n \n \n HP \n \n \n \n {numeralWrapper.formatHp(player.hp)} / {numeralWrapper.formatHp(player.max_hp)}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Money \n \n \n {numeralWrapper.formatMoney(player.money)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Hack \n \n \n {numeralWrapper.formatSkill(player.hacking)}\n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n \n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Str \n \n \n {numeralWrapper.formatSkill(player.strength)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Def \n \n \n {numeralWrapper.formatSkill(player.defense)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Dex \n \n \n {numeralWrapper.formatSkill(player.dexterity)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Agi \n \n \n {numeralWrapper.formatSkill(player.agility)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Cha \n \n \n {numeralWrapper.formatSkill(player.charisma)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n \n \n
\n \n \n \n \n \n \n \n \n \n setKillOpen(true)}>\n \n \n \n \n \n \n setKillOpen(false)} killScripts={killScripts} />\n \n );\n}\n","import { IMap } from \"../../types\";\n\nexport type CorporationUnlockUpgrade = [number, number, string, string];\n\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]\nexport const CorporationUnlockUpgrades: IMap = {\n //Lets you export goods\n \"0\": [\n 0,\n 20e9,\n \"Export\",\n \"Develop infrastructure to export your materials to your other facilities. \" +\n \"This allows you to move materials around between different divisions and cities.\",\n ],\n\n //Lets you buy exactly however many required materials you need for production\n \"1\": [\n 1,\n 25e9,\n \"Smart Supply\",\n \"Use advanced AI to anticipate your supply needs. \" +\n \"This allows you to purchase exactly however many materials you need for production.\",\n ],\n\n //Displays each material/product's demand\n \"2\": [\n 2,\n 5e9,\n \"Market Research - Demand\",\n \"Mine and analyze market data to determine the demand of all resources. \" +\n \"The demand attribute, which affects sales, will be displayed for every material and product.\",\n ],\n\n //Display's each material/product's competition\n \"3\": [\n 3,\n 5e9,\n \"Market Data - Competition\",\n \"Mine and analyze market data to determine how much competition there is on the market \" +\n \"for all resources. The competition attribute, which affects sales, will be displayed for \" +\n \"every material and product.\",\n ],\n \"4\": [\n 4,\n 10e9,\n \"VeChain\",\n \"Use AI and blockchain technology to identify where you can improve your supply chain systems. \" +\n \"This upgrade will allow you to view a wide array of useful statistics about your \" +\n \"Corporation.\",\n ],\n \"5\": [\n 5,\n 500e12,\n \"Shady Accounting\",\n \"Utilize unscrupulous accounting practices and pay off government officials to save money \" +\n \"on taxes. This reduces the dividend tax rate by 5%.\",\n ],\n \"6\": [\n 6,\n 2e15,\n \"Government Partnership\",\n \"Help national governments further their agendas in exchange for lowered taxes. \" +\n \"This reduces the dividend tax rate by 10%\",\n ],\n \"7\": [7, 50e9, \"Warehouse API\", \"Enables the warehouse API.\"],\n \"8\": [8, 50e9, \"Office API\", \"Enables the office API.\"],\n};\n","/**\n * Implementation for what happens when you destroy a BitNode\n */\nimport React from \"react\";\nimport { Player } from \"./Player\";\nimport { prestigeSourceFile } from \"./Prestige\";\nimport { PlayerOwnedSourceFile } from \"./SourceFile/PlayerOwnedSourceFile\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { SourceFiles } from \"./SourceFile/SourceFiles\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { IRouter } from \"./ui/Router\";\n\nexport let redPillFlag = false;\n\nexport function setRedPillFlag(b: boolean): void {\n redPillFlag = b;\n}\n\nfunction giveSourceFile(bitNodeNumber: number): void {\n const sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n const sourceFile = SourceFiles[sourceFileKey];\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n }\n\n // Check if player already has this source file\n let alreadyOwned = false;\n let ownedSourceFile = null;\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n if (Player.sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = Player.sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n dialogBoxCreate(\n `The Source-File for the BitNode you just destroyed, ${sourceFile.name}, is already at max level!`,\n );\n } else {\n ++ownedSourceFile.lvl;\n dialogBoxCreate(\n sourceFile.name +\n \" was upgraded to level \" +\n ownedSourceFile.lvl +\n \" for \" +\n \"destroying its corresponding BitNode!\",\n );\n }\n } else {\n const playerSrcFile = new PlayerOwnedSourceFile(bitNodeNumber, 1);\n Player.sourceFiles.push(playerSrcFile);\n if (bitNodeNumber === 5 && Player.intelligence === 0) {\n // Artificial Intelligence\n Player.intelligence = 1;\n }\n dialogBoxCreate(\n <>\n You received a Source-File for destroying a BitNode!\n
\n
\n {sourceFile.name}\n
\n
\n {sourceFile.info}\n ,\n );\n }\n}\n\nexport function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number): void {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else if (SourceFileFlags[5] === 0 && newBitNode !== 5) {\n Player.intelligence = 0;\n Player.intelligence_exp = 0;\n }\n if (newBitNode === 5 && Player.intelligence === 0) {\n Player.intelligence = 1;\n }\n redPillFlag = false;\n // Set new Bit Node\n Player.bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n prestigeSourceFile(flume);\n}\n","/**\n * Adds a random offset to a number within a certain percentage\n * @example\n * // Returns between 95-105\n * addOffset(100, 5);\n * @example\n * // Returns between 63-77\n * addOffSet(70, 10);\n * @param midpoint The number to be the midpoint of the offset range\n * @param percentage The percentage (in a range of 0-100) to offset\n */\nexport function addOffset(midpoint: number, percentage: number): number {\n const maxPercent = 100;\n if (percentage < 0 || percentage > maxPercent) {\n return midpoint;\n }\n\n const offset: number = midpoint * (percentage / maxPercent);\n\n // Double the range to account for both sides of the midpoint.\n // tslint:disable-next-line:no-magic-numbers\n return midpoint + (Math.random() * (offset * 2) - offset);\n}\n","export class DarkWebItem {\n program: string;\n price: number;\n description: string;\n\n constructor(program: string, price: number, description: string) {\n this.program = program;\n this.price = price;\n this.description = description;\n }\n}\n","interface RNG {\n random(): number;\n}\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 implements RNG {\n x: number;\n m = 1024;\n a = 341;\n c = 1;\n\n constructor() {\n this.x = 0;\n this.reset();\n }\n\n step(): void {\n this.x = (this.a * this.x + this.c) % this.m;\n }\n\n random(): number {\n this.step();\n return this.x / this.m;\n }\n\n reset(): void {\n this.x = new Date().getTime() % this.m;\n }\n}\n\nexport const BadRNG: RNG0 = new RNG0();\n\n/*\n * Wichmann–Hill PRNG\n * The period is 6e12.\n */\nexport class WHRNG implements RNG {\n s1 = 0;\n s2 = 0;\n s3 = 0;\n\n constructor(totalPlaytime: number) {\n // This one is seeded by the players total play time.\n const v: number = (totalPlaytime / 1000) % 30000;\n this.s1 = v;\n this.s2 = v;\n this.s3 = v;\n }\n\n step(): void {\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(): number {\n this.step();\n return (this.s1 / 30269.0 + this.s2 / 30307.0 + this.s3 / 30323.0) % 1.0;\n }\n}\n\nexport function SFC32RNG(seed: string): () => number {\n let h = 1779033703 ^ seed.length;\n for (let i = 0; i < seed.length; i++) {\n h = Math.imul(h ^ seed.charCodeAt(i), 3432918353);\n h = (h << 13) | (h >>> 19);\n }\n const genSeed = (): number => {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n\n let a = genSeed();\n let b = genSeed();\n let c = genSeed();\n let d = genSeed();\n return (): number => {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n let t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n","/**\n * Does a shallow compare of two arrays to determine if they are equal.\n * @param a1 The first array\n * @param a2 The second array\n */\nexport function compareArrays(a1: T[], a2: T[]): boolean {\n if (a1.length !== a2.length) {\n return false;\n }\n\n for (let i = 0; i < a1.length; ++i) {\n if (Array.isArray(a1[i])) {\n // If the other element is not an array, then these cannot be equal\n if (!Array.isArray(a2[i])) {\n return false;\n }\n\n const elem1 = a1[i] as any;\n const elem2 = a2[i] as any;\n if (!compareArrays(elem1, elem2)) {\n return false;\n }\n } else if (a1[i] !== a2[i] && !(Number.isNaN(a1[i]) && Number.isNaN(a2[i]))) {\n // strict (in)equality considers NaN not equal to itself\n return false;\n }\n }\n\n return true;\n}\n","import { IMap } from \"../types\";\n\nexport type IndustryUpgrade = [number, number, number, number, string, string];\n\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]\nexport const IndustryUpgrades: IMap = {\n \"0\": [0, 500e3, 1, 1.05, \"Coffee\", \"Provide your employees with coffee, increasing their energy by 5%.\"],\n \"1\": [\n 1,\n 1e9,\n 1.06,\n 1.03,\n \"AdVert.Inc\",\n \"Hire AdVert.Inc to advertise your company. Each level of \" +\n \"this upgrade grants your company a static increase of 3 and 1 to its awareness and \" +\n \"popularity, respectively. It will then increase your company's awareness by 1%, and its popularity \" +\n \"by a random percentage between 1% and 3%. These effects are increased by other upgrades \" +\n \"that increase the power of your advertising.\",\n ],\n};\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n favor: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Favor({ favor }: { favor: number | string }): React.ReactElement {\n const classes = useStyles();\n return {typeof favor === \"number\" ? numeralWrapper.formatFavor(favor) : favor};\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 */\nimport { SleeveTaskType } from \"./SleeveTaskTypesEnum\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { Person, ITaskTracker, createTaskTracker } from \"../Person\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Crime } from \"../../Crime/Crime\";\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { FactionWorkType } from \"../../Faction/FactionWorkTypeEnum\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../../utils/JSONReviver\";\n\nexport class Sleeve extends Person {\n /**\n * Stores the name of the class that the player is currently taking\n */\n className = \"\";\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n crimeType = \"\";\n\n /**\n * Enum value for current task\n */\n currentTask: SleeveTaskType = SleeveTaskType.Idle;\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 currentTaskLocation = \"\";\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n currentTaskMaxTime = 0;\n\n /**\n * Milliseconds spent on current task\n */\n currentTaskTime = 0;\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n earningsForSleeves: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experience + money earned for player\n */\n earningsForPlayer: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n earningsForTask: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n factionWorkType: FactionWorkType = FactionWorkType.None;\n\n /**\n * Records experience gain rate for the current task\n */\n gainRatesForTask: ITaskTracker = createTaskTracker();\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n gymStatType = \"\";\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n logs: string[] = [];\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n memory = 1;\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 shock = 1;\n\n /**\n * Stored number of game \"loop\" cycles\n */\n storedCycles = 0;\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 sync = 1;\n\n constructor(p: IPlayer | null = null) {\n super();\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n\n /**\n * Commit crimes\n */\n commitCrime(p: IPlayer, crimeKey: string): boolean {\n const crime: Crime | null = Crimes[crimeKey] || Object.values(Crimes).find((crime) => crime.name === crimeKey);\n if (!crime) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n\n this.crimeType = crime.name;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = SleeveTaskType.Crime;\n return true;\n }\n\n /**\n * Called to stop the current task\n */\n finishTask(p: IPlayer): ITaskTracker {\n let retValue: ITaskTracker = createTaskTracker(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === SleeveTaskType.Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime: Crime | undefined = Object.values(Crimes).find((crime) => crime.name === this.crimeType);\n if (!crime) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates: ITaskTracker = createTaskTracker();\n\n const keysForIteration: (keyof ITaskTracker)[] = Object.keys(successGainRates) as (keyof ITaskTracker)[];\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n }\n\n // Do not reset task to IDLE\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {\n // For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n\n return retValue;\n }\n\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n gainExperience(p: IPlayer, exp: ITaskTracker, numCycles = 1, fromOtherSleeve = false): ITaskTracker {\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 createTaskTracker();\n }\n\n // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\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;\n\n // Experience is gained by both this sleeve and player\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 }\n\n // Record earnings for other sleeves\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);\n\n // Return the experience to be gained by other sleeves\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 /**\n * Earn money for player\n */\n gainMoney(p: IPlayer, task: ITaskTracker, numCycles = 1): void {\n const gain: number = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain, \"sleeves\");\n }\n\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n getMemoryUpgradeCost(n: number): number {\n const amt = Math.round(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 for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n getRepGain(p: IPlayer): number {\n if (this.currentTask === SleeveTaskType.Faction) {\n let favorMult = 1;\n const fac: Faction | null = Factions[this.currentTaskLocation];\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case FactionWorkType.Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === SleeveTaskType.Company) {\n const companyName: string = this.currentTaskLocation;\n const company: Company | null = Companies[companyName];\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: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\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: number = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n const favorMult = 1 + company.favor / 100;\n\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n return 0;\n }\n }\n\n installAugmentation(aug: Augmentation): void {\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({ name: aug.name, level: 1 });\n this.updateStatLevels();\n }\n\n log(entry: string): void {\n const MaxLogSize = 50;\n this.logs.push(entry);\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n\n /**\n * Called on every sleeve for a Source File Prestige\n */\n prestige(p: IPlayer): void {\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;\n\n // Reset task-related stuff\n this.resetTaskStatus();\n this.earningsForSleeves = createTaskTracker();\n this.earningsForPlayer = createTaskTracker();\n this.shockRecovery(p);\n\n // Reset augs and multipliers\n this.augmentations = [];\n this.resetMultipliers();\n\n // Reset Location\n\n this.city = CityName.Sector12;\n\n // Reset sleeve-related stats\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n\n this.logs = [];\n }\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 process(p: IPlayer, numCycles = 1): ITaskTracker | null {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / CONSTANTS.MilliPerCycle;\n this.storedCycles += numCycles;\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let cyclesUsed = this.storedCycles;\n cyclesUsed = Math.min(cyclesUsed, 15);\n let time = cyclesUsed * CONSTANTS.MilliPerCycle;\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / CONSTANTS.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;\n\n // Shock gradually goes towards 100\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n\n let retValue: ITaskTracker = createTaskTracker();\n switch (this.currentTask) {\n case SleeveTaskType.Idle:\n break;\n case SleeveTaskType.Class:\n case SleeveTaskType.Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n case SleeveTaskType.Faction: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n // Gain faction reputation\n const fac: Faction = Factions[this.currentTaskLocation];\n if (!(fac instanceof Faction)) {\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 case SleeveTaskType.Company: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n const company: Company = Companies[this.currentTaskLocation];\n if (!(company instanceof Company)) {\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 case SleeveTaskType.Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n if (this.shock >= 100) this.resetTaskStatus();\n break;\n case SleeveTaskType.Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n if (this.sync >= 100) this.resetTaskStatus();\n break;\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === SleeveTaskType.Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n\n this.storedCycles -= cyclesUsed;\n\n return retValue;\n }\n\n /**\n * Resets all parameters used to keep information about the current task\n */\n resetTaskStatus(): void {\n this.earningsForTask = createTaskTracker();\n this.gainRatesForTask = createTaskTracker();\n this.currentTask = SleeveTaskType.Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = FactionWorkType.None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Recovery;\n return true;\n }\n\n synchronize(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Synchro;\n return true;\n }\n\n /**\n * Take a course at a university\n */\n takeUniversityCourse(p: IPlayer, universityName: string, className: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (this.city !== CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSummitUniversity;\n costMult = 4;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (this.city !== CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassDataStructuresBaseCost * costMult);\n break;\n case \"networks\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassNetworksBaseCost * costMult);\n break;\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassAlgorithmsBaseCost * costMult);\n break;\n case \"management\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassManagementBaseCost * costMult);\n break;\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassLeadershipBaseCost * costMult);\n break;\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = SleeveTaskType.Class;\n return true;\n }\n\n /**\n * Travel to another City. Costs money from player\n */\n travel(p: IPlayer, newCity: CityName): boolean {\n p.loseMoney(CONSTANTS.TravelCost, \"sleeves\");\n this.city = newCity;\n\n return true;\n }\n\n tryBuyAugmentation(p: IPlayer, aug: Augmentation): boolean {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n }\n\n // Verify that this sleeve does not already have that augmentation.\n if (this.augmentations.some((a) => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost, \"sleeves\");\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p: IPlayer): void {\n if (this.currentTask === SleeveTaskType.Class) {\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack =\n CONSTANTS.ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"data structures\":\n this.gainRatesForTask.hack = CONSTANTS.ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"networks\":\n this.gainRatesForTask.hack = CONSTANTS.ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"algorithms\":\n this.gainRatesForTask.hack = CONSTANTS.ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"management\":\n this.gainRatesForTask.cha = CONSTANTS.ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n case \"leadership\":\n this.gainRatesForTask.cha = CONSTANTS.ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === SleeveTaskType.Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n // Set stat gain rate\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat: string = this.gymStatType.toLowerCase();\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: number): void {\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 /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n workForCompany(p: IPlayer, companyName: string): boolean {\n if (!(Companies[companyName] instanceof Company) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company: Company | null = Companies[companyName];\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (company == null) {\n return false;\n }\n if (companyPosition == null) {\n return false;\n }\n this.gainRatesForTask.money =\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney;\n this.gainRatesForTask.hack =\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.str =\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.def =\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.dex =\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.agi =\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.cha =\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n\n this.currentTaskLocation = companyName;\n this.currentTask = SleeveTaskType.Company;\n\n return true;\n }\n\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n workForFaction(p: IPlayer, factionName: string, workType: string): boolean {\n const faction = Factions[factionName]\n if (factionName === \"\" || !faction || !(faction instanceof Faction) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = faction.getInfo();\n\n // Set type of work (hacking/field/security), and the experience gains\n const sanitizedWorkType: string = workType.toLowerCase();\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = SleeveTaskType.Faction;\n\n return true;\n }\n\n /**\n * Begin a gym workout task\n */\n workoutAtGym(p: IPlayer, gymName: string, stat: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12IronGym;\n costMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n const sanitizedStat: string = stat.toLowerCase();\n\n // Set cost\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassGymBaseCost * costMult);\n\n // Validate \"stat\" argument\n if (\n !sanitizedStat.includes(\"str\") &&\n !sanitizedStat.includes(\"def\") &&\n !sanitizedStat.includes(\"dex\") &&\n !sanitizedStat.includes(\"agi\")\n ) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = SleeveTaskType.Gym;\n\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Sleeve\", this);\n }\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 static fromJSON(value: any): Sleeve {\n return Generic_fromJSON(Sleeve, value.data);\n }\n}\n\nReviver.constructors.Sleeve = Sleeve;\n","export enum RamCalculationErrorCode {\n SyntaxError = -1,\n ImportError = -2,\n URLImportError = -3,\n}\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const TerminalEvents = new EventEmitter<[]>();\nexport const TerminalClearEvents = new EventEmitter<[]>();\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\n\nexport class Message {\n // Name of Message file\n filename = \"\";\n\n // The text contains in the Message\n msg = \"\";\n\n // Flag indicating whether this Message has been received by the player\n recvd = false;\n\n constructor(filename = \"\", msg = \"\") {\n this.filename = filename;\n this.msg = msg;\n this.recvd = false;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"Message\", this);\n }\n\n // Initializes a Message Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Message {\n return Generic_fromJSON(Message, value.data);\n }\n}\n\nReviver.constructors.Message = Message;\n","/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\nimport { buyStock, sellStock, shortStock, sellShort } from \"./BuyingAndSelling\";\nimport { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { Stock } from \"./Stock\";\n\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\n\nimport * as React from \"react\";\n\nexport interface IProcessOrderRefs {\n stockMarket: IStockMarket;\n symbolToStockMap: IMap;\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 */\nexport function processOrders(\n stock: Stock,\n orderType: OrderTypes,\n posType: PositionTypes,\n refs: IProcessOrderRefs,\n): void {\n const orderBook = refs.stockMarket[\"Orders\"];\n if (orderBook == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(refs.stockMarket)) {\n const stock = refs.stockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n let stockOrders = orderBook[stock.symbol];\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 OrderTypes.LimitBuy:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.LimitSell:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopBuy:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\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 */\nfunction executeOrder(order: Order, refs: IProcessOrderRefs): void {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n if (!(stock instanceof Stock)) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol];\n\n // 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 const opts = {\n suppressDialog: true,\n };\n\n let res = true;\n let isBuy = false;\n switch (order.type) {\n case OrderTypes.LimitBuy:\n case OrderTypes.StopBuy:\n isBuy = true;\n if (order.pos === PositionTypes.Long) {\n res = buyStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = shortStock(stock, order.shares, null, opts) && res;\n }\n break;\n case OrderTypes.LimitSell:\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long) {\n res = sellStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = sellShort(stock, order.shares, null, opts) && res;\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n\n // Position type, for logging/message purposes\n const pos = order.pos === PositionTypes.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 if (!Settings.SuppressTIXPopup) {\n dialogBoxCreate(\n <>\n {order.type} for {stock.symbol} @ ({pos}) was filled (\n {numeralWrapper.formatShares(Math.round(order.shares))} shares)\n ,\n );\n }\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else if (isBuy) {\n dialogBoxCreate(\n <>\n Failed to execute {order.type} for {stock.symbol} @ ({pos}). This is most likely\n because you do not have enough money or the order would exceed the stock's maximum number of shares\n ,\n );\n }\n}\n","import { IMap } from \"../types\";\nimport * as predefined from \"./data\";\n\nexport interface ITheme {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: string;\n successlight: string;\n success: string;\n successdark: string;\n errorlight: string;\n error: string;\n errordark: string;\n secondarylight: string;\n secondary: string;\n secondarydark: string;\n warninglight: string;\n warning: string;\n warningdark: string;\n infolight: string;\n info: string;\n infodark: string;\n welllight: string;\n well: string;\n white: string;\n black: string;\n hp: string;\n money: string;\n hack: string;\n combat: string;\n cha: string;\n int: string;\n rep: string;\n disabled: string;\n backgroundprimary: string;\n backgroundsecondary: string;\n button: string;\n}\n\nexport interface IPredefinedTheme {\n colors: ITheme;\n name: string;\n credit: string;\n screenshot: string;\n description: string;\n reference?: string;\n}\n\nexport const defaultTheme: ITheme = {\n ...predefined.Default.colors,\n};\n\nexport const getPredefinedThemes = (): IMap => ({\n ...predefined,\n});\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport { sha256 } from \"js-sha256\";\n\nexport const AlertEvents = new EventEmitter<[string | JSX.Element]>();\n\ninterface Alert {\n id: string;\n text: string | JSX.Element;\n hash: string;\n}\n\nlet i = 0;\nexport function AlertManager(): React.ReactElement {\n const [alerts, setAlerts] = useState([]);\n useEffect(\n () =>\n AlertEvents.subscribe((text: string | JSX.Element) => {\n const id = i + \"\";\n i++;\n setAlerts((old) => {\n const hash = getMessageHash(text);\n if (old.some((a) => a.hash === hash)) {\n console.log(\"Duplicate message\");\n return old;\n }\n return [\n ...old,\n {\n id: id,\n text: text,\n hash: hash,\n },\n ];\n });\n }),\n [],\n );\n\n useEffect(() => {\n function handle(this: Document, event: KeyboardEvent): void {\n if (event.code === \"Escape\") {\n setAlerts([]);\n }\n }\n document.addEventListener(\"keydown\", handle);\n return () => document.removeEventListener(\"keydown\", handle);\n }, []);\n\n function getMessageHash(text: string | JSX.Element): string {\n if (typeof text === \"string\") return sha256(text);\n return sha256(JSON.stringify(text.props));\n }\n\n function close(): void {\n setAlerts((old) => {\n return old.slice(1, 1e99);\n });\n }\n\n return (\n <>\n {alerts.length > 0 && (\n \n \n {alerts[0].text}\n \n \n )}\n \n );\n}\n","import { getRandomByte } from \"./helpers/getRandomByte\";\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\nexport function createRandomIp(): string {\n const ip: string = getRandomByte(99) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9);\n\n return ip;\n}\n","import { FactionNames } from \"./Faction/data/FactionNames\";\nimport { CityName } from \"./Locations/data/CityNames\";\nimport { Augmentations } from \"./Augmentation/Augmentations\";\nimport { augmentationExists, initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { Companies, initCompanies } from \"./Company/Companies\";\nimport { resetIndustryResearchTrees } from \"./Corporation/IndustryData\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Faction } from \"./Faction/Faction\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { joinFaction } from \"./Faction/FactionHelpers\";\nimport { updateHashManagerCapacity } from \"./Hacknet/HacknetHelpers\";\nimport { initMessages } from \"./Message/MessageHelpers\";\nimport { prestigeWorkerScripts } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { resetPidCounter } from \"./Netscript/Pid\";\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { GetServer, AddToAllServers, initForeignServers, prestigeAllServers } from \"./Server/AllServers\";\nimport { prestigeHomeComputer } from \"./Server/ServerHelpers\";\nimport { SourceFileFlags, updateSourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { deleteStockMarket, initStockMarket, initSymbolToStockMap } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\n\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { ProgramsSeen } from \"./Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"./Faction/ui/FactionsRoot\";\nimport { CONSTANTS } from \"./Constants\";\nimport { LogBoxClearEvents } from \"./ui/React/LogBoxManager\";\n\nconst BitNode8StartingMoney = 250e6;\n\n// Prestige by purchasing augmentation\nexport function prestigeAugmentation(): void {\n initBitNodeMultipliers(Player);\n\n const maintainMembership = Player.factions.concat(Player.factionInvitations).filter(function (faction) {\n return Factions[faction].getInfo().keep;\n });\n Player.prestigeAugmentation();\n\n // Delete all Worker Scripts objects\n prestigeWorkerScripts();\n\n const homeComp = Player.getHomeComputer();\n // Delete all servers except home computer\n prestigeAllServers();\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n if (augmentationExists(AugmentationNames.Neurolink) && Augmentations[AugmentationNames.Neurolink].owned) {\n homeComp.programs.push(Programs.FTPCrackProgram.name);\n homeComp.programs.push(Programs.RelaySMTPProgram.name);\n }\n if (augmentationExists(AugmentationNames.CashRoot) && Augmentations[AugmentationNames.CashRoot].owned) {\n Player.setMoney(1e6);\n homeComp.programs.push(Programs.BruteSSHProgram.name);\n }\n if (augmentationExists(AugmentationNames.PCMatrix) && Augmentations[AugmentationNames.PCMatrix].owned) {\n homeComp.programs.push(Programs.DeepscanV1.name);\n homeComp.programs.push(Programs.AutoLink.name);\n }\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n // Gain favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].gainFavor();\n }\n }\n\n // Gain favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].gainFavor();\n }\n }\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n\n Player.factionInvitations = Player.factionInvitations.concat(maintainMembership);\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Messages\n initMessages();\n\n // Apply entropy from grafting\n Player.applyEntropy(Player.entropy);\n\n // Gang\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n const faction = Factions[gang.facName];\n if (faction instanceof Faction) {\n joinFaction(faction);\n }\n const penalty = 0.95;\n for (const m of gang.members) {\n m.hack_asc_points *= penalty;\n m.str_asc_points *= penalty;\n m.def_asc_points *= penalty;\n m.dex_asc_points *= penalty;\n m.agi_asc_points *= penalty;\n m.cha_asc_points *= penalty;\n }\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n }\n\n // Cancel Bladeburner action\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.prestige();\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || SourceFileFlags[8] > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Reset Stock market\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n }\n\n // Red Pill\n if (augmentationExists(AugmentationNames.TheRedPill) && Augmentations[AugmentationNames.TheRedPill].owned) {\n const WorldDaemon = GetServer(SpecialServers.WorldDaemon);\n const DaedalusServer = GetServer(SpecialServers.DaedalusServer);\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.hostname);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.hostname);\n }\n }\n\n if (augmentationExists(AugmentationNames.StaneksGift1) && Augmentations[AugmentationNames.StaneksGift1].owned) {\n joinFaction(Factions[FactionNames.ChurchOfTheMachineGod]);\n }\n\n staneksGift.prestigeAugmentation();\n\n resetPidCounter();\n ProgramsSeen.splice(0, ProgramsSeen.length);\n InvitationsSeen.splice(0, InvitationsSeen.length);\n}\n\n// Prestige by destroying Bit Node and gaining a Source File\nexport function prestigeSourceFile(flume: boolean): void {\n initBitNodeMultipliers(Player);\n updateSourceFileFlags(Player);\n\n Player.prestigeSourceFile();\n prestigeWorkerScripts(); // Delete all Worker Scripts objects\n\n const homeComp = Player.getHomeComputer();\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Delete all servers except home computer\n prestigeAllServers(); // Must be done before initForeignServers()\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n if (SourceFileFlags[9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (SourceFileFlags[1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n homeComp.cpuCores = 1;\n\n // Reset favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].favor = 0;\n }\n }\n\n // Reset favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].favor = 0;\n }\n }\n\n // Stop a Terminal action if there is one\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n\n // Delete all Augmentations\n for (const name of Object.keys(Augmentations)) {\n if (Augmentations.hasOwnProperty(name)) {\n delete Augmentations[name];\n }\n }\n\n // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n if (SourceFileFlags[12] > 0) {\n Player.augmentations.push({\n name: AugmentationNames.NeuroFluxGovernor,\n level: SourceFileFlags[12],\n });\n }\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Messages\n initMessages();\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n dialogBoxCreate(\n \"You received a copy of the Corporation Management Handbook on your home computer. \" +\n \"Read it if you need help getting started with Corporations!\",\n );\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || SourceFileFlags[8] > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Bit Node 10: Digital Carbon\n if (Player.bitNodeN === 10) {\n dialogBoxCreate(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n }\n\n if (Player.bitNodeN === 13) {\n dialogBoxCreate(`Trouble is brewing in ${CityName.Chongqing}`);\n }\n\n // Reset Stock market, gang, and corporation\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n } else {\n deleteStockMarket();\n }\n\n Player.gang = null;\n Player.corporation = null;\n resetIndustryResearchTrees();\n Player.bladeburner = null;\n\n // Source-File 9 (level 3) effect\n if (SourceFileFlags[9] >= 3) {\n const hserver = Player.createHacknetServer();\n\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(Player.hacknet_node_money_mult);\n hserver.updateHashCapacity();\n updateHashManagerCapacity(Player);\n }\n\n if (Player.bitNodeN === 13) {\n Player.money = CONSTANTS.TravelCost;\n }\n staneksGift.prestigeSourceFile();\n\n // Gain int exp\n if (SourceFileFlags[5] !== 0 && !flume) Player.gainIntelligenceExp(300);\n\n resetPidCounter();\n}\n","function getDB(): Promise {\n return new Promise((resolve, reject) => {\n if (!window.indexedDB) {\n reject(\"Indexed DB does not exists\");\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n * Version `1` is important\n */\n const indexedDbRequest: IDBOpenDBRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n // This is called when there's no db to begin with. It's important, don't remove it.\n indexedDbRequest.onupgradeneeded = function (this: IDBRequest) {\n const db = this.result;\n db.createObjectStore(\"savestring\");\n };\n\n indexedDbRequest.onerror = function (this: IDBRequest, ev: Event) {\n reject(`Failed to get IDB ${ev}`);\n };\n\n indexedDbRequest.onsuccess = function (this: IDBRequest) {\n const db = this.result;\n if (!db) {\n reject(\"database loading result was undefined\");\n return;\n }\n resolve(db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\"));\n };\n });\n}\n\nexport function load(): Promise {\n return new Promise((resolve, reject) => {\n getDB()\n .then((db) => {\n return new Promise((resolve, reject) => {\n const request: IDBRequest = db.get(\"save\");\n request.onerror = function (this: IDBRequest, ev: Event) {\n reject(\"Error in Database request to get savestring: \" + ev);\n };\n\n request.onsuccess = function (this: IDBRequest) {\n resolve(this.result);\n };\n }).then((saveString) => resolve(saveString));\n })\n .catch((r) => reject(r));\n });\n}\n\nexport function save(saveString: string): Promise {\n return getDB().then((db) => {\n return new Promise((resolve, reject) => {\n // We'll save to both localstorage and indexedDb\n const request = db.put(saveString, \"save\");\n\n request.onerror = function (e) {\n reject(\"Error saving game to IndexedDB: \" + e);\n };\n\n request.onsuccess = () => resolve();\n });\n });\n}\n\nexport function deleteGame(): Promise {\n return getDB().then((db) => {\n db.delete(\"save\");\n });\n}\n","// The initial formulas was sum 0 to f of 500*1.02^f.\n// see https://en.wikipedia.org/wiki/Geometric_series#Closed-form_formula\n// for information on how to calculate this\n\nexport function favorToRep(f: number): number {\n const raw = 25000 * (Math.pow(1.02, f) - 1);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n\nexport function repToFavor(r: number): number {\n const raw = Math.log(r / 25000 + 1) / Math.log(1.02);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n","import { Factions } from \"./Faction/Factions\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\nexport let LastExportBonus = 0;\n\nconst bonusTimer = 24 * 60 * 60 * 1000; // 24h\nexport function canGetBonus(): boolean {\n const now = new Date().getTime();\n return now - LastExportBonus > bonusTimer;\n}\n\nexport function onExport(p: IPlayer): void {\n if (!canGetBonus()) return;\n for (const facName of p.factions) {\n Factions[facName].favor++;\n }\n LastExportBonus = new Date().getTime();\n}\n\nexport function setLastExportBonus(unixTime: number): void {\n LastExportBonus = unixTime;\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IOperationParams extends IActionParams {\n reqdRank?: number;\n teamCount?: number;\n}\n\nexport class Operation extends Action {\n reqdRank = 100;\n teamCount = 0;\n\n constructor(params: IOperationParams | null = null) {\n super(params);\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n }\n\n // For actions that have teams. To be implemented by subtypes.\n getTeamSuccessBonus(inst: IBladeburner): number {\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: IBladeburner): number {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Operation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(Operation, value.data);\n }\n}\n\nReviver.constructors.Operation = Operation;\n","import { FactionNames } from '../../Faction/data/FactionNames';\n// tslint:disable:max-file-line-count\n\n// This could actually be a JSON file as it should be constant metadata to be imported...\nimport { IMinMaxRange } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { LiteratureNames } from \"../../Literature/data/LiteratureNames\";\nimport { SpecialServers } from \"./SpecialServers\";\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\ninterface IServerMetadata {\n /**\n * When populated, the base security level of the server.\n */\n hackDifficulty?: number | IMinMaxRange;\n\n /**\n * The DNS name of the server.\n */\n hostname: string;\n\n /**\n * When populated, the files will be added to the server when created.\n */\n literature?: string[];\n\n /**\n * When populated, the exponent of 2^x amount of RAM the server has.\n * This should be in the range of 1-20, to match the Player's max RAM.\n */\n maxRamExponent?: number | IMinMaxRange;\n\n /**\n * How much money the server starts out with.\n */\n moneyAvailable: number | IMinMaxRange;\n\n /**\n * The number of network layers away from the `home` server.\n * This value is between 1 and 15.\n * If this is not populated, @specialName should be.\n */\n networkLayer?: number | IMinMaxRange;\n\n /**\n * The number of ports that must be opened before the player can execute NUKE.\n */\n numOpenPortsRequired: number;\n\n /**\n * The organization that the server belongs to.\n */\n organizationName: string;\n\n /**\n * The minimum hacking level before the player can run NUKE.\n */\n requiredHackingSkill: number | IMinMaxRange;\n\n /**\n * The growth factor for the server.\n */\n serverGrowth?: number | IMinMaxRange;\n\n /**\n * A \"unique\" server that has special implications when the player manually hacks it.\n */\n specialName?: string;\n\n [key: string]: any;\n}\n\n/**\n * The metadata for building up the servers on the network.\n */\nexport const serverMetadata: IServerMetadata[] = [\n {\n hackDifficulty: 99,\n hostname: LocationName.AevumECorp.toLowerCase(),\n moneyAvailable: {\n max: 70e9,\n min: 30e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050,\n },\n serverGrowth: 99,\n specialName: LocationName.AevumECorp,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.Sector12MegaCorp.toLowerCase(),\n moneyAvailable: {\n max: 60e9,\n min: 40e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100,\n },\n serverGrowth: 99,\n specialName: LocationName.Sector12MegaCorp,\n },\n {\n hackDifficulty: {\n max: 88,\n min: 72,\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.AevumBachmanAndAssociates,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 88,\n },\n hostname: \"blade\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900,\n },\n serverGrowth: {\n max: 85,\n min: 55,\n },\n specialName: LocationName.Sector12BladeIndustries,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.VolhavenNWO.toLowerCase(),\n literature: [LiteratureNames.TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 95,\n min: 65,\n },\n specialName: LocationName.VolhavenNWO,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"clarkinc\",\n literature: [LiteratureNames.BeyondMan, LiteratureNames.CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumClarkeIncorporated,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 90,\n },\n hostname: \"omnitek\",\n literature: [LiteratureNames.CodedIntelligence, LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7,\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 95,\n },\n specialName: LocationName.VolhavenOmniTekIncorporated,\n },\n {\n hackDifficulty: {\n max: 75,\n min: 55,\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 75,\n },\n specialName: LocationName.Sector12FourSigma,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 95,\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 90,\n },\n specialName: LocationName.ChongqingKuaiGongInternational,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 83,\n },\n hostname: \"fulcrumtech\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7,\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 80,\n },\n specialName: LocationName.AevumFulcrumTechnologies,\n },\n {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100,\n },\n serverGrowth: 1,\n specialName: SpecialServers.FulcrumSecretTechnologies,\n },\n {\n hackDifficulty: {\n max: 92,\n min: 78,\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875,\n },\n serverGrowth: {\n max: 92,\n min: 68,\n },\n specialName: LocationName.IshimaStormTechnologies,\n },\n {\n hackDifficulty: {\n max: 96,\n min: 84,\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850,\n },\n serverGrowth: {\n max: 73,\n min: 47,\n },\n specialName: LocationName.NewTokyoDefComm,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875,\n },\n serverGrowth: {\n max: 75,\n min: 35,\n },\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"helios\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5,\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.VolhavenHeliosLabs,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.NewTokyoVitaLife.toLowerCase(),\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.NewTokyoVitaLife,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 95,\n min: 85,\n },\n specialName: LocationName.Sector12IcarusMicrosystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.Sector12UniversalEnergy,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"titan-labs\",\n literature: [LiteratureNames.CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n },\n {\n hackDifficulty: {\n max: 75,\n min: 65,\n },\n hostname: \"microdyne\",\n literature: [LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"taiyang-digital\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n specialName: LocationName.AevumGalacticCybersystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.AevumAeroCorp.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.AevumAeroCorp,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"omnia\",\n literature: [LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenOmniaCybersystems,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"zb-def\",\n literature: [LiteratureNames.SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 65,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"solaris\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.ChongqingSolarisSpaceSystems,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: LocationName.Sector12DeltaOne.toLowerCase(),\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 70,\n min: 50,\n },\n specialName: LocationName.Sector12DeltaOne,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: \"global-pharm\",\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: LocationName.NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.NewTokyoGlobalPharmaceuticals,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: LocationName.IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 85,\n min: 65,\n },\n specialName: LocationName.IshimaNovaMedical,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.VolhavenLexoCorp,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumRhoConstruction,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 50,\n },\n hostname: \"alpha-ent\",\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12AlphaEnterprises,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 50,\n min: 30,\n },\n specialName: LocationName.AevumPolice,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"rothman-uni\",\n literature: [\n LiteratureNames.SecretSocieties,\n LiteratureNames.TheFailedFrontier,\n LiteratureNames.TensionsInTechRace,\n ],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370,\n },\n serverGrowth: {\n max: 45,\n min: 35,\n },\n specialName: LocationName.Sector12RothmanUniversity,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 65,\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725,\n },\n serverGrowth: {\n max: 85,\n min: 75,\n },\n specialName: LocationName.VolhavenZBInstituteOfTechnology,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"summit-uni\",\n literature: [LiteratureNames.SecretSocieties, LiteratureNames.TheFailedFrontier, LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSummitUniversity,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenSysCoreSecurities,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 60,\n },\n hostname: \"catalyst\",\n literature: [LiteratureNames.TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 55,\n min: 25,\n },\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275,\n },\n serverGrowth: {\n max: 55,\n min: 45,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: LocationName.VolhavenCompuTek.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300,\n },\n serverGrowth: {\n max: 65,\n min: 45,\n },\n specialName: LocationName.VolhavenCompuTek,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"netlink\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumNetLinkTechnologies,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 35,\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250,\n },\n serverGrowth: {\n max: 65,\n min: 35,\n },\n },\n {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: LocationName.NewTokyoNoodleBar,\n },\n {\n hackDifficulty: 10,\n hostname: LocationName.Sector12FoodNStuff.toLowerCase(),\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: LocationName.Sector12FoodNStuff,\n },\n {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10,\n },\n {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: LocationName.Sector12JoesGuns,\n },\n {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [LiteratureNames.TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [LiteratureNames.NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30,\n },\n {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [LiteratureNames.BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20,\n },\n {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35,\n },\n {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30,\n },\n {\n hackDifficulty: {\n max: 35,\n min: 25,\n },\n hostname: \"omega-net\",\n literature: [LiteratureNames.TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000,\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: LocationName.IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180,\n },\n serverGrowth: {\n max: 40,\n min: 30,\n },\n specialName: LocationName.IshimaOmegaSoftware,\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225,\n },\n serverGrowth: {\n max: 33,\n min: 27,\n },\n specialName: LocationName.AevumCrushFitnessGym,\n },\n {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: `${LocationName.Sector12IronGym} Network`,\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: LocationName.Sector12IronGym,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 45,\n min: 25,\n },\n specialName: LocationName.VolhavenMilleniumFitnessGym,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12PowerhouseGym,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSnapFitnessGym,\n },\n {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [LiteratureNames.SimulatedReality, LiteratureNames.TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.BitRunnersServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheBlackHandServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: FactionNames.NiteSec,\n requiredHackingSkill: {\n max: 220,\n min: 202,\n },\n serverGrowth: 0,\n specialName: SpecialServers.NiteSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheDarkArmyServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: FactionNames.CyberSec,\n requiredHackingSkill: {\n max: 60,\n min: 51,\n },\n serverGrowth: 0,\n specialName: SpecialServers.CyberSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [LiteratureNames.AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: SpecialServers.DaedalusServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: SpecialServers.WorldDaemon,\n },\n];\n","export class PlayerOwnedAugmentation {\n level = 1;\n name = \"\";\n\n constructor(name = \"\") {\n this.name = name;\n }\n}\n\nexport interface IPlayerOwnedAugmentation {\n level: number;\n name: string;\n}\n","import { CONSTANTS } from \"../Constants\";\nimport * as names from \"./data/companypositionnames\";\n\n/* tslint:disable:completed-docs */\n\nexport interface IConstructorParams {\n name: string;\n nextPosition: string | null;\n baseSalary: number;\n repMultiplier: number;\n\n reqdHacking?: number;\n reqdStrength?: number;\n reqdDefense?: number;\n reqdDexterity?: number;\n reqdAgility?: number;\n reqdCharisma?: number;\n reqdReputation?: number;\n\n hackingEffectiveness?: number;\n strengthEffectiveness?: number;\n defenseEffectiveness?: number;\n dexterityEffectiveness?: number;\n agilityEffectiveness?: number;\n charismaEffectiveness?: number;\n\n hackingExpGain?: number;\n strengthExpGain?: number;\n defenseExpGain?: number;\n dexterityExpGain?: number;\n agilityExpGain?: number;\n charismaExpGain?: number;\n}\n\nexport class CompanyPosition {\n /**\n * Position title\n */\n name: string;\n\n /**\n * Title of next position to be promoted to\n */\n nextPosition: string | null;\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 baseSalary: number;\n\n /**\n * Reputation multiplier\n */\n repMultiplier: number;\n\n /**\n * Required stats to earn this position\n */\n requiredAgility: number;\n requiredCharisma: number;\n requiredDefense: number;\n requiredDexterity: number;\n requiredHacking: number;\n requiredStrength: number;\n\n /**\n * Required company reputation to earn this position\n */\n requiredReputation: number;\n\n /**\n * Effectiveness of each stat time for job performance\n */\n hackingEffectiveness: number;\n strengthEffectiveness: number;\n defenseEffectiveness: number;\n dexterityEffectiveness: number;\n agilityEffectiveness: number;\n charismaEffectiveness: number;\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n hackingExpGain: number;\n strengthExpGain: number;\n defenseExpGain: number;\n dexterityExpGain: number;\n agilityExpGain: number;\n charismaExpGain: number;\n\n constructor(p: IConstructorParams) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n\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\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 (\n Math.round(\n this.hackingEffectiveness +\n this.strengthEffectiveness +\n this.defenseEffectiveness +\n this.dexterityEffectiveness +\n this.agilityEffectiveness +\n this.charismaEffectiveness,\n ) !== 100\n ) {\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: number, str: number, def: number, dex: number, agi: number, cha: number): number {\n const hackRatio: number = (this.hackingEffectiveness * hack) / CONSTANTS.MaxSkillLevel;\n const strRatio: number = (this.strengthEffectiveness * str) / CONSTANTS.MaxSkillLevel;\n const defRatio: number = (this.defenseEffectiveness * def) / CONSTANTS.MaxSkillLevel;\n const dexRatio: number = (this.dexterityEffectiveness * dex) / CONSTANTS.MaxSkillLevel;\n const agiRatio: number = (this.agilityEffectiveness * agi) / CONSTANTS.MaxSkillLevel;\n const chaRatio: number = (this.charismaEffectiveness * cha) / CONSTANTS.MaxSkillLevel;\n\n let reputationGain: number =\n (this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio)) / 100;\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(): boolean {\n return names.SoftwareCompanyPositions.includes(this.name);\n }\n\n isITJob(): boolean {\n return names.ITCompanyPositions.includes(this.name);\n }\n\n isSecurityEngineerJob(): boolean {\n return names.SecurityEngineerCompanyPositions.includes(this.name);\n }\n\n isNetworkEngineerJob(): boolean {\n return names.NetworkEngineerCompanyPositions.includes(this.name);\n }\n\n isBusinessJob(): boolean {\n return names.BusinessCompanyPositions.includes(this.name);\n }\n\n isSecurityJob(): boolean {\n return names.SecurityCompanyPositions.includes(this.name);\n }\n\n isAgentJob(): boolean {\n return names.AgentCompanyPositions.includes(this.name);\n }\n\n isSoftwareConsultantJob(): boolean {\n return names.SoftwareConsultantCompanyPositions.includes(this.name);\n }\n\n isBusinessConsultantJob(): boolean {\n return names.BusinessConsultantCompanyPositions.includes(this.name);\n }\n\n isPartTimeJob(): boolean {\n return names.PartTimeCompanyPositions.includes(this.name);\n }\n}\n","import React from \"react\";\nimport { SourceFile } from \"./SourceFile\";\nimport { IMap } from \"../types\";\n\nexport const SourceFiles: IMap = {};\n\nSourceFiles[\"SourceFile1\"] = new SourceFile(\n 1,\n (\n <>\n This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the\n player's multipliers by:\n
\n
\n Level 1: 16%\n
\n Level 2: 24%\n
\n Level 3: 28%\n \n ),\n);\nSourceFiles[\"SourceFile2\"] = new SourceFile(\n 2,\n (\n <>\n This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also\n increases the player's crime success rate, crime money, and charisma multipliers by:\n
\n
\n Level 1: 24%\n
\n Level 2: 36%\n
\n Level 3: 42%\n \n ),\n);\nSourceFiles[\"SourceFile3\"] = new SourceFile(\n 3,\n (\n <>\n This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this\n mechanic). This Source-File also increases your charisma and company salary multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile4\"] = new SourceFile(\n 4,\n (\n <>\n This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this\n Source-File reduces the RAM cost of Singularity functions.\n \n ),\n);\nSourceFiles[\"SourceFile5\"] = new SourceFile(\n 5,\n (\n <>\n This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and\n persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other\n stats. Higher Intelligence levels will boost your production for many actions in the game. In addition, this\n Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with Formulas.exe, and\n will raise all of your hacking-related multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile6\"] = new SourceFile(\n 6,\n (\n <>\n This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this\n Source-File will raise both the level and experience gain rate of all your combat stats by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile7\"] = new SourceFile(\n 7,\n (\n <>\n This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this\n Source-File will increase all of your Bladeburner multipliers by:\n
\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile8\"] = new SourceFile(\n 8,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanent access to WSE and TIX API\n
\n Level 2: Ability to short stocks in other BitNodes\n
\n Level 3: Ability to use limit/stop orders in other BitNodes\n
\n
\n This Source-File also increases your hacking growth multipliers by:\n
\n Level 1: 12%\n
\n Level 2: 18%\n
\n Level 3: 21%\n \n ),\n);\nSourceFiles[\"SourceFile9\"] = new SourceFile(\n 9,\n (\n <>\n This Source-File grants the following benefits:\n
\n
\n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
\n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
\n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
\n
\n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
\n
\n This Source-File also increases your hacknet multipliers by:\n
\n Level 1: 8%\n
\n Level 2: 12%\n
\n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile10\"] = new SourceFile(\n 10,\n (\n <>\n This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes.\n Each level of this Source-File also grants you a Duplicate Sleeve\n \n ),\n);\nSourceFiles[\"SourceFile11\"] = new SourceFile(\n 11,\n (\n <>\n This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at\n that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's\n company salary and reputation gain multipliers by:\n
\n
\n Level 1: 32%\n
\n Level 2: 48%\n
\n Level 3: 56%\n
\n
\n It also reduces the price increase for every aug bought by:\n
\n
\n Level 1: 4%\n
\n Level 2: 6%\n
\n Level 3: 7%\n \n ),\n);\nSourceFiles[\"SourceFile12\"] = new SourceFile(\n 12,\n <>This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.,\n);\nSourceFiles[\"SourceFile13\"] = new SourceFile(\n 13,\n <>Each level of this Source-File increases the size of Stanek's Gift.,\n);\n","/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\nimport { Script } from \"./Script\";\nimport { ScriptUrl } from \"./ScriptUrl\";\nimport { Settings } from \"../Settings/Settings\";\nimport { IMap } from \"../types\";\nimport { Terminal } from \"../Terminal\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\n\nexport class RunningScript {\n // Script arguments\n args: any[] = [];\n\n // Map of [key: hostname] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n dataMap: IMap = {};\n\n // Script filename\n filename = \"\";\n\n // This script's logs. An array of log entries\n logs: string[] = [];\n\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n logUpd = false;\n\n // Total amount of hacking experience earned from this script when offline\n offlineExpGained = 0;\n\n // Total amount of money made by this script when offline\n offlineMoneyMade = 0;\n\n // Number of seconds that the script has been running offline\n offlineRunningTime = 0.01;\n\n // Total amount of hacking experience earned from this script when online\n onlineExpGained = 0;\n\n // Total amount of money made by this script when online\n onlineMoneyMade = 0;\n\n // Number of seconds that this script has been running online\n onlineRunningTime = 0.01;\n\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n pid = -1;\n\n // How much RAM this script uses for ONE thread\n ramUsage = 0;\n\n // hostname of the server on which this script is running\n server = \"\";\n\n // Number of threads that this script is running with\n threads = 1;\n\n // Script urls for the current running script for translating urls back to file names in errors\n dependencies: ScriptUrl[] = [];\n\n constructor(script: Script | null = null, args: any[] = []) {\n if (script == null) {\n return;\n }\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n this.dependencies = script.dependencies;\n }\n\n log(txt: string): void {\n if (this.logs.length > Settings.MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n if (Settings.TimestampsFormat) {\n logEntry = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog(): void {\n for (let i = 0; i < this.logs.length; ++i) {\n Terminal.print(this.logs[i]);\n }\n }\n\n clearLog(): void {\n this.logs.length = 0;\n }\n\n // Update the moneyStolen and numTimesHack maps when hacking\n recordHack(hostname: string, moneyGained: number, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][0] += moneyGained;\n this.dataMap[hostname][1] += n;\n }\n\n // Update the grow map when calling grow()\n recordGrow(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][2] += n;\n }\n\n // Update the weaken map when calling weaken() {\n recordWeaken(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][3] += n;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"RunningScript\", this);\n }\n\n // Initializes a RunningScript Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): RunningScript {\n return Generic_fromJSON(RunningScript, value.data);\n }\n}\n\nReviver.constructors.RunningScript = RunningScript;\n","import React from \"react\";\n\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n type: number;\n name: string;\n rerender: () => void;\n}\nexport function StartButton(props: IProps): React.ReactElement {\n const player = use.Player();\n const action = props.bladeburner.getActionObject({ name: props.name, type: props.type });\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + props.name);\n }\n let disabled = false;\n if (action.count < 1) {\n disabled = true;\n }\n if (props.name === \"Raid\" && props.bladeburner.getCurrentCity().comms === 0) {\n disabled = true;\n }\n\n if (action instanceof BlackOperation && props.bladeburner.rank < action.reqdRank) {\n disabled = true;\n }\n function onStart(): void {\n if (disabled) return;\n props.bladeburner.action.type = props.type;\n props.bladeburner.action.name = props.name;\n if (!player.hasAugmentation(AugmentationNames.BladesSimulacrum, true)) player.singularityStopWork();\n props.bladeburner.startAction(player, props.bladeburner.action);\n props.rerender();\n }\n\n return (\n \n );\n}\n","import { format } from \"date-fns\";\n\nexport function formatTime(fmt: string): string {\n try {\n return format(new Date(), fmt);\n } catch (err: any) {\n return \"format error\";\n }\n}\n","import React from \"react\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"./data/FactionNames\";\n\n/**\n * Contains the \"information\" property for all the Factions, which is just a description of each faction\n */\nexport class FactionInfo {\n /**\n * The multiplier to apply to augmentation base purchase price.\n */\n augmentationPriceMult: number;\n\n /**\n * The multiplier to apply to augmentation reputation base requirement.\n */\n augmentationRepRequirementMult: number;\n\n /**\n * The names of all other factions considered to be enemies to this faction.\n */\n enemies: string[];\n\n /**\n * The descriptive text to show on the faction's page.\n */\n infoText: JSX.Element;\n\n /**\n * A flag indicating if the faction supports field work to earn reputation.\n */\n offerFieldWork: boolean;\n\n /**\n * A flag indicating if the faction supports hacking missions to earn reputation.\n */\n offerHackingMission: boolean;\n\n /**\n * A flag indicating if the faction supports hacking work to earn reputation.\n */\n offerHackingWork: boolean;\n\n /**\n * A flag indicating if the faction supports security work to earn reputation.\n */\n offerSecurityWork: boolean;\n\n /**\n * Keep faction on install.\n */\n keep: boolean;\n\n /**\n * Special faction\n */\n special: boolean;\n\n constructor(\n infoText: JSX.Element,\n enemies: string[],\n offerHackingMission: boolean,\n offerHackingWork: boolean,\n offerFieldWork: boolean,\n offerSecurityWork: boolean,\n special: boolean,\n keep: boolean,\n ) {\n this.infoText = infoText;\n this.enemies = enemies;\n this.offerHackingMission = offerHackingMission;\n this.offerHackingWork = offerHackingWork;\n this.offerFieldWork = offerFieldWork;\n this.offerSecurityWork = offerSecurityWork;\n\n // These are always all 1 for now.\n this.augmentationPriceMult = 1;\n this.augmentationRepRequirementMult = 1;\n this.keep = keep;\n this.special = special;\n }\n\n offersWork(): boolean {\n return this.offerFieldWork || this.offerHackingMission || this.offerHackingWork || this.offerSecurityWork;\n }\n}\n\n\n\n/**\n * A map of all factions and associated info to them.\n */\n// tslint:disable-next-line:variable-name\nexport const FactionInfos: IMap = {\n // Endgame\n [FactionNames.Illuminati]: new FactionInfo(\n (\n <>\n Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And\n from this chaos, we are the invisible hand that guides them to order.{\" \"}\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.Daedalus]: new FactionInfo(\n <>Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.,\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.TheCovenant]: new FactionInfo(\n (\n <>\n Surrender yourself. Give up your empty individuality to become part of something great, something eternal.\n Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.\n
\n
\n Only then can you discover immortality.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n // Megacorporations, each forms its own faction\n [FactionNames.ECorp]: new FactionInfo(\n (\n <>\n {FactionNames.ECorp}'s mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of\n Internet-related software and commercial hardware, {FactionNames.ECorp} makes the world's information universally accessible.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.MegaCorp]: new FactionInfo(\n (\n <>\n {FactionNames.MegaCorp} does what no other dares to do. We imagine. We create. We invent. We create what others have never even\n dreamed of. Our work fills the world's needs for food, water, power, and transportation on an unprecedented\n scale, in ways that no other company can.\n
\n
\n In our labs and factories and on the ground with customers, {FactionNames.MegaCorp} is ushering in a new era for the world.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.BachmanAssociates]: new FactionInfo(\n (\n <>\n Where Law and Business meet - thats where we are.\n
\n
\n Legal Insight - Business Instinct - Innovative Experience.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.BladeIndustries]: new FactionInfo(<>Augmentation is Salvation., [], true, true, true, true, false, true),\n\n [FactionNames.NWO]: new FactionInfo(\n (\n <>\n Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given\n purpose and direction in life. That is why they created God. And that is why they created civilization - not\n because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.ClarkeIncorporated]: new FactionInfo(\n <>The Power of the Genome - Unlocked.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.OmniTekIncorporated]: new FactionInfo(\n <>Simply put, our mission is to design and build robots that make a difference.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.FourSigma]: new FactionInfo(\n (\n <>\n The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by\n deep learning and innovative ideas. And improved by iteration. That's {FactionNames.FourSigma}.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.KuaiGongInternational]: new FactionInfo(\n <>Dream big. Work hard. Make history.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n // Other Corporations\n [FactionNames.FulcrumSecretTechnologies]: new FactionInfo(\n (\n <>\n The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it\n would be necessary to create them. And now we can.\n \n ),\n [],\n true,\n true,\n false,\n true,\n false,\n true,\n ),\n\n // Hacker groups\n [FactionNames.BitRunners]: new FactionInfo(\n (\n <>\n Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all\n transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to\n live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave\n behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be\n reconstructed. Transformed. Used.\n
\n
\n Those who run the bits, run the world.\n \n ),\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n [FactionNames.TheBlackHand]: new FactionInfo(\n (\n <>\n The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power.\n Technological power. And those at the top rule with an invisible hand. They built a society where the rich get\n richer, and everyone else suffers.\n
\n
\n So much pain. So many lives. Their darkness must end.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n // prettier-ignore\n [FactionNames.NiteSec]: new FactionInfo(<>\n {\" __..__ \"}
\n {\" _.nITESECNIt. \"}
\n {\" .-'NITESECNITESEc. \"}
\n {\" .' NITESECNITESECn \"}
\n {\" / NITESECNITESEC; \"}
\n {\" : :NITESECNITESEC; \"}
\n {\" ; $ NITESECNITESECN \"}
\n {\" : _, ,N'ITESECNITESEC \"}
\n {\" : .+^^`, : `NITESECNIT \"}
\n {\" ) /), `-,-=,NITESECNI \"}
\n {\" / ^ ,-;|NITESECN; \"}
\n {\" / _.' '-';NITESECN \"}
\n {\" ( , ,-''`^NITE' \"}
\n {\" )` :`. .' \"}
\n {\" )-- ; `- / \"}
\n {\" ' _.-' : \"}
\n {\" ( _.-' . \"}
\n {\" ------. \"}
\n {\" . \"}
\n {\" _.nIt \"}
\n {\" _.nITESECNi \"}
\n {\" nITESECNIT^' \"}
\n {\" NITE^' ___ \"}
\n {\" / .gP''''Tp. \"}
\n {\" : d' . `b \"}
\n {\" ; d' o `b ; \"}
\n {\" / d; `b| \"}
\n {\" /, $; @ `: \"}
\n {\" /' $/ ; \"}
\n {\" .' $/b o | \"}
\n {\" .' d$/$; : \"}
\n {\" / .d/$/$; , ; \"}
\n {\" d .dNITESEC $ | \"}
\n {\" :bp.__.gNITESEC/$ :$ ; \"}
\n {\" NITESECNITESECNIT /$b : \"}
,\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n // City factions, essentially governments\n [FactionNames.Aevum]: new FactionInfo(\n <>The Silicon City.,\n [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Chongqing]: new FactionInfo(\n <>Serve the People.,\n [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Ishima]: new FactionInfo(\n <>The East Asian Order of the Future.,\n [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.NewTokyo]: new FactionInfo(\n <>Asia's World City.,\n [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Sector12]: new FactionInfo(\n <>The City of the Future.,\n [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Volhaven]: new FactionInfo(\n <>Benefit, Honor, and Glory.,\n [FactionNames.Chongqing, FactionNames.Sector12, FactionNames.NewTokyo, FactionNames.Aevum, FactionNames.Ishima],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n\n // Criminal Organizations/Gangs\n [FactionNames.SpeakersForTheDead]: new FactionInfo(\n <>It is better to reign in Hell than to serve in Heaven.,\n [],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n\n [FactionNames.TheDarkArmy]: new FactionInfo(\n <>The World doesn't care about right or wrong. It only cares about power.,\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.TheSyndicate]: new FactionInfo(<>Honor holds you back., [], true, true, true, true, false, false),\n\n [FactionNames.Silhouette]: new FactionInfo(\n (\n <>\n Corporations have filled the void of power left behind by the collapse of Western government. The issue is\n they've become so big that you don't know who they're working for. And if you're employed at one of these\n corporations, you don't even know who you're working for.\n
\n
\n That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.Tetrads]: new FactionInfo(\n <>Following the mandate of Heaven and carrying out the way.,\n [],\n false,\n false,\n true,\n true,\n false,\n false,\n ),\n\n [FactionNames.SlumSnakes]: new FactionInfo(<>{FactionNames.SlumSnakes} rule!, [], false, false, true, true, false, false),\n\n // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.\n [FactionNames.Netburners]: new FactionInfo(<>{\"~~//*>H4CK||3T 8URN3R5**>?>\\\\~~\"}, [], true, true, false, false, false, false),\n\n [FactionNames.TianDiHui]: new FactionInfo(<>Obey Heaven and work righteously., [], true, true, false, true, false, false),\n\n [FactionNames.CyberSec]: new FactionInfo(\n (\n <>\n The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy\n that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of\n total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.\n \n ),\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n // Special Factions\n [FactionNames.Bladeburners]: new FactionInfo(\n (\n <>\n It's too bad they won't live. But then again, who does?\n
\n
\n Note that for this faction, reputation can only be gained through {FactionNames.Bladeburners} actions. Completing {FactionNames.Bladeburners}\n contracts/operations will increase your reputation.\n \n ),\n [],\n false,\n false,\n false,\n false,\n true,\n false,\n ),\n\n // prettier-ignore\n [FactionNames.ChurchOfTheMachineGod]: new FactionInfo(<>\n {\" `` \"}
\n {\" -odmmNmds: \"}
\n {\" `hNmo:..-omNh. \"}
\n {\" yMd` `hNh \"}
\n {\" mMd oNm \"}
\n {\" oMNo .mM/ \"}
\n {\" `dMN+ -mM+ \"}
\n {\" -mMNo -mN+ \"}
\n {\" .+- :mMNo/mN/ \"}
\n {\":yNMd. :NMNNN/ \"}
\n {\"-mMMMh. /NMMh` \"}
\n {\" .dMMMd. /NMMMy` \"}
\n {\" `yMMMd. /NNyNMMh` \"}
\n {\" `sMMMd. +Nm: +NMMh. \"}
\n {\" oMMMm- oNm: /NMMd. \"}
\n {\" +NMMmsMm- :mMMd. \"}
\n {\" /NMMMm- -mMMd. \"}
\n {\" /MMMm- -mMMd. \"}
\n {\" `sMNMMm- .mMmo \"}
\n {\" `sMd:hMMm. ./. \"}
\n {\" `yMy` `yNMd` \"}
\n {\" `hMs` oMMy \"}
\n {\" `hMh sMN- \"}
\n {\" /MM- .NMo \"}
\n {\" +MM: :MM+ \"}
\n {\" sNNo-.`.-omNy` \"}
\n {\" -smNNNNmdo- \"}
\n {\" `..` \"}

\n Many cultures predict an end to humanity in the near future, a final\n Armageddon that will end the world; but we disagree.\n

Note that for this faction, reputation can\n only be gained by charging Stanek's gift.,\n [],\n false,\n false,\n false,\n false,\n true,\n true,\n ),\n};\n","import { IMap } from \"../../types\";\n\nexport type CorporationUpgrade = [number, number, number, number, string, string];\n\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]\nexport const CorporationUpgrades: IMap = {\n //Smart factories, increases production\n \"0\": [\n 0,\n 2e9,\n 1.06,\n 0.03,\n \"Smart Factories\",\n \"Advanced AI automatically optimizes the operation and productivity \" +\n \"of factories. Each level of this upgrade increases your global production by 3% (additive).\",\n ],\n\n //Smart warehouses, increases storage size\n \"1\": [\n 1,\n 2e9,\n 1.06,\n 0.1,\n \"Smart Storage\",\n \"Advanced AI automatically optimizes your warehouse storage methods. \" +\n \"Each level of this upgrade increases your global warehouse storage size by 10% (additive).\",\n ],\n\n //Advertise through dreams, passive popularity/ awareness gain\n \"2\": [\n 2,\n 4e9,\n 1.1,\n 0.001,\n \"DreamSense\",\n \"Use DreamSense LCC Technologies to advertise your corporation \" +\n \"to consumers through their dreams. Each level of this upgrade provides a passive \" +\n \"increase in awareness of all of your companies (divisions) by 0.004 / market cycle,\" +\n \"and in popularity by 0.001 / market cycle. A market cycle is approximately \" +\n \"15 seconds.\",\n ],\n\n //Makes advertising more effective\n \"3\": [\n 3,\n 4e9,\n 1.5,\n 0.005,\n \"Wilson Analytics\",\n \"Purchase data and analysis from Wilson, a marketing research \" +\n \"firm. Each level of this upgrades increases the effectiveness of your \" +\n \"advertising by 0.5% (additive).\",\n ],\n\n //Augmentation for employees, increases cre\n \"4\": [\n 4,\n 1e9,\n 1.06,\n 0.1,\n \"Nuoptimal Nootropic Injector Implants\",\n \"Purchase the Nuoptimal Nootropic \" +\n \"Injector augmentation for your employees. Each level of this upgrade \" +\n \"globally increases the creativity of your employees by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases cha\n \"5\": [\n 5,\n 1e9,\n 1.06,\n 0.1,\n \"Speech Processor Implants\",\n \"Purchase the Speech Processor augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the charisma of your employees by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases int\n \"6\": [\n 6,\n 1e9,\n 1.06,\n 0.1,\n \"Neural Accelerators\",\n \"Purchase the Neural Accelerator augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the intelligence of your employees \" +\n \"by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases eff\n \"7\": [\n 7,\n 1e9,\n 1.06,\n 0.1,\n \"FocusWires\",\n \"Purchase the FocusWire augmentation for your employees. Each level \" +\n \"of this upgrade globally increases the efficiency of your employees by 10% (additive).\",\n ],\n\n //Improves sales of materials/products\n \"8\": [\n 8,\n 1e9,\n 1.07,\n 0.01,\n \"ABC SalesBots\",\n \"Always Be Closing. Purchase these robotic salesmen to increase the amount of \" +\n \"materials and products you sell. Each level of this upgrade globally increases your sales \" +\n \"by 1% (additive).\",\n ],\n\n //Improves scientific research rate\n \"9\": [\n 9,\n 5e9,\n 1.07,\n 0.05,\n \"Project Insight\",\n \"Purchase 'Project Insight', a R&D service provided by the secretive \" +\n \"Fulcrum Technologies. Each level of this upgrade globally increases the amount of \" +\n \"Scientific Research you produce by 5% (additive).\",\n ],\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 */\nimport { HashUpgrades } from \"./HashUpgrades\";\nimport { HashUpgrade } from \"./HashUpgrade\";\n\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n capacity = 0;\n\n // Number of hashes currently in storage\n hashes = 0;\n\n // Map of Hash Upgrade Name -> levels in that upgrade\n upgrades: IMap = {};\n\n constructor() {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n }\n\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n getMult(upgName: string): number {\n const upg = HashUpgrades[upgName];\n const currLevel = this.upgrades[upgName];\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 /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n getStudyMult(): number {\n const upgName = \"Improve Studying\";\n\n return this.getMult(upgName);\n }\n\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n getTrainingMult(): number {\n const upgName = \"Improve Gym Training\";\n\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName: string): HashUpgrade | null {\n const upg = HashUpgrades[upgName];\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n return upg;\n }\n\n /**\n * Get the cost (in hashes) of an upgrade\n */\n getUpgradeCost(upgName: string): number {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\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(): void {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n this.hashes = 0;\n\n // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n this.updateCapacity(0);\n }\n\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n refundUpgrade(upgName: string): void {\n const upg = HashUpgrades[upgName];\n\n // Reduce the level first, so we get the right cost\n --this.upgrades[upgName];\n\n const currLevel = this.upgrades[upgName];\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 /**\n * Stores the given hashes, capping at capacity\n * @param numHashes The number of hashes to increment\n * @returns The number of wasted hashes (over capacity)\n */\n storeHashes(numHashes: number): number {\n this.hashes += numHashes;\n let wastedHashes = this.hashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n wastedHashes -= this.hashes;\n return wastedHashes;\n }\n\n updateCapacity(newCap: number): void {\n if (newCap < 0) {\n this.capacity = 0;\n }\n this.capacity = Math.max(newCap, 0);\n }\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 upgrade(upgName: string): boolean {\n const upg = HashUpgrades[upgName];\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\n return true;\n }\n\n //Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"HashManager\", this);\n }\n\n // Initiatizes a HashManager object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HashManager {\n return Generic_fromJSON(HashManager, value.data);\n }\n}\n\nReviver.constructors.HashManager = HashManager;\n","import {\n CodingContract,\n CodingContractRewardType,\n CodingContractTypes,\n ICodingContractReward,\n} from \"./CodingContracts\";\nimport { Factions } from \"./Faction/Factions\";\nimport { Player } from \"./Player\";\nimport { GetServer, GetAllServers } from \"./Server/AllServers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { Server } from \"./Server/Server\";\nimport { BaseServer } from \"./Server/BaseServer\";\n\nimport { getRandomInt } from \"./utils/helpers/getRandomInt\";\n\nexport function generateRandomContract(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const randServer = getRandomServer();\n\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n randServer.addContract(contract);\n}\n\nexport function generateRandomContractOnHome(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const serv = Player.getHomeComputer();\n\n const contractFn = getRandomFilename(serv, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n serv.addContract(contract);\n}\n\ninterface IGenerateContractParams {\n problemType?: string;\n server?: string;\n fn?: string;\n}\n\nexport function generateContract(params: IGenerateContractParams): void {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(CodingContractTypes);\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n }\n\n // Reward Type - This is always random for now\n const reward = getRandomReward();\n\n // Server\n let server;\n if (params.server != null) {\n server = GetServer(params.server);\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n }\n\n // Filename\n let fn;\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new CodingContract(fn, problemType, reward);\n server.addContract(contract);\n}\n\n// Ensures that a contract's reward type is valid\nfunction sanitizeRewardType(rewardType: CodingContractRewardType): CodingContractRewardType {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = Player.factions.filter((fac) => {\n try {\n return Factions[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 if (type === CodingContractRewardType.FactionReputation && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.CompanyReputation && Object.keys(Player.jobs).length === 0) {\n type = CodingContractRewardType.Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType(): string {\n const problemTypes = Object.keys(CodingContractTypes);\n const randIndex = getRandomInt(0, problemTypes.length - 1);\n\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward(): ICodingContractReward {\n const reward: ICodingContractReward = {\n name: \"\",\n type: getRandomInt(0, CodingContractRewardType.Money),\n };\n reward.type = sanitizeRewardType(reward.type);\n\n // Add additional information based on the reward type\n const factionsThatAllowHacking = Player.factions.filter((fac) => Factions[fac].getInfo().offerHackingWork);\n\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation: {\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[getRandomInt(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n case CodingContractRewardType.CompanyReputation: {\n const allJobs = Object.keys(Player.jobs);\n if (allJobs.length > 0) {\n reward.name = allJobs[getRandomInt(0, allJobs.length - 1)];\n } else {\n reward.type = CodingContractRewardType.Money;\n }\n break;\n }\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer(): BaseServer {\n const servers = GetAllServers();\n let randIndex = getRandomInt(0, servers.length - 1);\n let randServer = servers[randIndex];\n\n // 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 for (let i = 0; i < 200; ++i) {\n if (\n randServer instanceof Server &&\n !randServer.purchasedByPlayer &&\n randServer.hostname !== SpecialServers.WorldDaemon\n ) {\n break;\n }\n randIndex = getRandomInt(0, servers.length - 1);\n randServer = servers[randIndex];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server: BaseServer, reward: ICodingContractReward): string {\n let contractFn = `contract-${getRandomInt(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (\n server.contracts.filter((c: CodingContract) => {\n return c.fn === contractFn;\n }).length <= 0\n ) {\n break;\n }\n contractFn = `contract-${getRandomInt(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n","import { EventEmitter } from \"../../utils/EventEmitter\";\nexport const ITutorialEvents = new EventEmitter<[]>();\n","import { Crimes } from \"./Crimes\";\nimport { Crime } from \"./Crime\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function determineCrimeSuccess(p: IPlayer, type: string): boolean {\n let chance = 0;\n let found = false;\n for (const i of Object.keys(Crimes)) {\n const crime = Crimes[i];\n if (crime.type == type) {\n chance = crime.successRate(p);\n found = true;\n break;\n }\n }\n\n if (!found) {\n dialogBoxCreate(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`);\n return false;\n }\n return Math.random() <= chance;\n}\n\nexport function findCrime(roughName: string): Crime | null {\n roughName = roughName.toLowerCase();\n if (roughName.includes(\"shoplift\")) {\n return Crimes.Shoplift;\n } else if (roughName.includes(\"rob\") && roughName.includes(\"store\")) {\n return Crimes.RobStore;\n } else if (roughName.includes(\"mug\")) {\n return Crimes.Mug;\n } else if (roughName.includes(\"larceny\")) {\n return Crimes.Larceny;\n } else if (roughName.includes(\"drugs\")) {\n return Crimes.DealDrugs;\n } else if (roughName.includes(\"bond\") && roughName.includes(\"forge\")) {\n return Crimes.BondForgery;\n } else if ((roughName.includes(\"traffic\") || roughName.includes(\"illegal\")) && roughName.includes(\"arms\")) {\n return Crimes.TraffickArms;\n } else if (roughName.includes(\"homicide\")) {\n return Crimes.Homicide;\n } else if (roughName.includes(\"grand\") && roughName.includes(\"auto\")) {\n return Crimes.GrandTheftAuto;\n } else if (roughName.includes(\"kidnap\")) {\n return Crimes.Kidnap;\n } else if (roughName.includes(\"assassin\")) {\n return Crimes.Assassination;\n } else if (roughName.includes(\"heist\")) {\n return Crimes.Heist;\n }\n\n return null;\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { generateRandomString } from \"../utils/StringHelperFunctions\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Employee } from \"./Employee\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ICorporation } from \"./ICorporation\";\n\ninterface IParams {\n loc?: string;\n size?: number;\n}\n\nexport class OfficeSpace {\n loc: string;\n size: number;\n minEne = 0;\n maxEne = 100;\n minHap = 0;\n maxHap = 100;\n maxMor = 100;\n employees: Employee[] = [];\n employeeProd: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n total: 0,\n };\n\n constructor(params: IParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity(): boolean {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation: ICorporation, industry: IIndustry): number {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = EmployeePositions.Training;\n }\n }\n\n // Process Office properties\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n }\n\n // Calculate changes in Morale/Happiness/Energy for Employees\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\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\n let salaryPaid = 0;\n for (let i = 0; i < this.employees.length; ++i) {\n const emp = this.employees[i];\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: ICorporation, industry: IIndustry): void {\n //Reset\n for (const name of Object.keys(this.employeeProd)) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\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 this.employeeProd.total = total;\n }\n\n hireRandomEmployee(): Employee | undefined {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return;\n\n //Generate three random employees (meh, decent, amazing)\n const int = getRandomInt(50, 100),\n cha = getRandomInt(50, 100),\n exp = getRandomInt(50, 100),\n cre = getRandomInt(50, 100),\n eff = getRandomInt(50, 100),\n sal = CorporationConstants.EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n\n const emp = new Employee({\n intelligence: int,\n charisma: cha,\n experience: exp,\n creativity: cre,\n efficiency: eff,\n salary: sal,\n });\n\n const name = generateRandomString(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 emp.name = name;\n this.employees.push(emp);\n\n return emp;\n }\n\n //Finds the first unassigned employee and assigns its to the specified job\n assignEmployeeToJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === EmployeePositions.Unassigned) {\n this.employees[i].pos = job;\n return true;\n }\n }\n return false;\n }\n\n //Finds the first employee with the given job and unassigns it\n unassignEmployeeFromJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === job) {\n this.employees[i].pos = EmployeePositions.Unassigned;\n return true;\n }\n }\n return false;\n }\n\n setEmployeeToJob(job: string, amount: number): boolean {\n let jobCount = this.employees.reduce((acc, employee) => (employee.pos === job ? acc + 1 : acc), 0);\n\n for (const employee of this.employees) {\n if (jobCount == amount) return true\n if (employee.pos === EmployeePositions.Unassigned && jobCount <= amount) {\n employee.pos = job;\n jobCount++;\n } else if (employee.pos === job && jobCount >= amount) {\n employee.pos = EmployeePositions.Unassigned;\n jobCount--;\n }\n }\n return jobCount === amount;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"OfficeSpace\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): OfficeSpace {\n return Generic_fromJSON(OfficeSpace, value.data);\n }\n}\n\nReviver.constructors.OfficeSpace = OfficeSpace;\n","export type ObjectValidator = {\n [key in keyof T]?: ParameterValidator;\n}\n\ninterface ParameterValidatorObject {\n default?: any;\n min?: number;\n max?: number;\n func?: (obj: Type, validator: ObjectValidator, key: Key) => void;\n}\ntype ParameterValidatorFunction = (obj: Type, key: Key) => void;\ntype ParameterValidator = ParameterValidatorObject | ParameterValidatorFunction\n\nexport function validateObject, Key extends keyof Type>(obj: Type, validator: ObjectValidator): void {\n for (const key of Object.keys(validator) as Key[]) {\n const paramValidator = validator[key];\n if (paramValidator !== undefined) {\n if (typeof paramValidator === 'function') {\n paramValidator(obj, key);\n } else if (paramValidator.func !== undefined) {\n paramValidator.func(obj, validator, key);\n } else {\n if ((typeof obj[key]) !== (typeof paramValidator.default)) {\n obj[key] = paramValidator.default\n }\n if (typeof obj[key] === 'number' && paramValidator.min !== undefined) {\n if (obj[key] < paramValidator.min) obj[key] = paramValidator.min as Type[Key];\n }\n if (typeof obj[key] === 'number' && paramValidator.max !== undefined) {\n if (obj[key] > paramValidator.max) obj[key] = paramValidator.max as Type[Key];\n }\n }\n }\n }\n}\n\nexport function minMax(def: number, min: number, max: number): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== 'number') {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if ((obj[key] as unknown as number) < min) {\n obj[key] = min as unknown as Type[Key];\n }\n if ((obj[key] as unknown as number) > max) {\n obj[key] = max as unknown as Type[Key];\n }\n };\n}\n\nexport function oneOf(def: Value, options: Value[]): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== typeof def) {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if (!options.includes(obj[key] as unknown as Value)) {\n obj[key] = def as unknown as Type[Key];\n }\n };\n}\n\nexport function subsetOf(options: Value[]): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== 'object' || !Array.isArray(obj[key])) {\n obj[key] = [] as unknown as Type[Key];\n return;\n }\n const validValues: Value[] = [];\n for (const value of obj[key] as unknown as Value[]) {\n if (options.includes(value)) validValues.push(value);\n }\n obj[key] = validValues as unknown as Type[Key];\n };\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 */\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./JSONReviver\";\n\nexport class MoneySourceTracker {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: number | Function;\n\n bladeburner = 0;\n casino = 0;\n class = 0;\n codingcontract = 0;\n corporation = 0;\n crime = 0;\n gang = 0;\n hacking = 0;\n hacknet = 0;\n hacknet_expenses = 0;\n hospitalization = 0;\n infiltration = 0;\n sleeves = 0;\n stock = 0;\n total = 0;\n work = 0;\n servers = 0;\n other = 0;\n augmentations = 0;\n\n // Record money earned\n record(amt: number, source: string): void {\n const sanitizedSource = source.toLowerCase();\n if (typeof this[sanitizedSource] !== \"number\") {\n console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);\n return;\n }\n\n (this[sanitizedSource] as number) += amt;\n this.total += amt;\n }\n\n // Reset the money tracker by setting all stats to 0\n reset(): void {\n for (const prop in this) {\n if (typeof this[prop] === \"number\") {\n (this[prop] as number) = 0;\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"MoneySourceTracker\", this);\n }\n\n // Initiatizes a MoneySourceTracker object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): MoneySourceTracker {\n return Generic_fromJSON(MoneySourceTracker, value.data);\n }\n}\n\nReviver.constructors.MoneySourceTracker = MoneySourceTracker;\n","import * as React from \"react\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { TableCell, Tooltip, Typography } from \"@mui/material\";\nimport { characterOverviewStyles } from \"./CharacterOverview\";\nimport { ISkillProgress } from \"src/PersonObjects/formulas/skill\";\nimport { numeralWrapper } from \"../numeralFormat\";\n\ninterface IProgressProps {\n min: number;\n max: number;\n current: number;\n remaining: number;\n progress: number;\n color?: React.CSSProperties[\"color\"];\n}\n\ninterface IStatsOverviewCellProps {\n progress: ISkillProgress;\n color?: React.CSSProperties[\"color\"];\n}\n\nexport function StatsProgressBar({ min, max, current, remaining, progress, color }: IProgressProps): React.ReactElement {\n const tooltip = (\n \n Progress: \n {numeralWrapper.formatExp(current)} / {numeralWrapper.formatExp(max - min)}\n
\n Remaining: \n {numeralWrapper.formatExp(remaining)} ({progress.toFixed(2)}%)\n
\n );\n\n return (\n \n \n \n );\n}\n\nexport function StatsProgressOverviewCell({ progress: skill, color }: IStatsOverviewCellProps): React.ReactElement {\n const classes = characterOverviewStyles();\n return (\n \n \n \n );\n}\n","import { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport const defaultStyles: IStyleSettings = {\n lineHeight: 1.5,\n fontFamily: \"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman\"\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport function getHospitalizationCost(p: IPlayer): number {\n if (p.money < 0) {\n return 0;\n }\n\n return Math.min(p.money * 0.1, (p.max_hp - p.hp) * CONSTANTS.HospitalCostPerHp);\n}\n\nexport function calculateHospitalizationCost(p: IPlayer, damage: number): number {\n const oldhp = p.hp;\n p.hp -= damage;\n const cost = getHospitalizationCost(p);\n p.hp = oldhp;\n return cost;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nexport const PromptEvent = new EventEmitter<[Prompt]>();\n\ninterface Prompt {\n txt: string;\n options?: { type?: string; choices?: string[] };\n resolve: (result: boolean | string) => void;\n}\n\nexport function PromptManager(): React.ReactElement {\n const [prompt, setPrompt] = useState(null);\n useEffect(() => {\n return PromptEvent.subscribe((p: Prompt) => {\n setPrompt(p);\n });\n }, []);\n\n if (prompt === null) {\n return <>;\n }\n\n function close(): void {\n if (prompt === null) return;\n if ([\"text\", \"select\"].includes(prompt?.options?.type ?? \"\")) {\n prompt.resolve(\"\");\n } else {\n prompt.resolve(false);\n }\n setPrompt(null);\n }\n\n const types: { [key: string]: any } = {\n text: PromptMenuText,\n select: PromptMenuSelect,\n };\n\n let PromptContent = PromptMenuBoolean;\n if (prompt?.options?.type && [\"text\", \"select\"].includes(prompt?.options?.type))\n PromptContent = types[prompt?.options?.type];\n const resolve = (value: boolean | string): void => {\n prompt.resolve(value);\n setPrompt(null);\n };\n\n return (\n \n
\n        {prompt.txt}\n      
\n \n
\n );\n}\n\ninterface IContentProps {\n prompt: Prompt;\n resolve: (value: boolean | string) => void;\n}\n\nfunction PromptMenuBoolean({ resolve }: IContentProps): React.ReactElement {\n const yes = (): void => resolve(true);\n const no = (): void => resolve(false);\n\n return (\n <>\n
\n \n \n
\n \n );\n}\n\nfunction PromptMenuText({ resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onInput = (event: React.ChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const onKeyDown = (event: React.KeyboardEvent): void => {\n event.stopPropagation();\n\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n submit();\n }\n };\n\n return (\n <>\n
\n Confirm,\n }}\n />\n
\n \n );\n}\n\nfunction PromptMenuSelect({ prompt, resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onChange = (event: SelectChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const getItems = (choices: string[]): React.ReactElement[] => {\n const content = [];\n for (const i of choices) {\n // @ts-ignore\n content.push(\n \n {i}\n ,\n );\n }\n return content;\n };\n\n return (\n <>\n
\n \n \n
\n \n );\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ProductRatingWeights, IProductRatingWeight } from \"./ProductRatingWeights\";\n\nimport { createCityMap } from \"../Locations/createCityMap\";\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\ninterface IConstructorParams {\n name?: string;\n demand?: number;\n competition?: number;\n markup?: number;\n createCity?: string;\n designCost?: number;\n advCost?: number;\n quality?: number;\n performance?: number;\n durability?: number;\n reliability?: number;\n aesthetics?: number;\n features?: number;\n loc?: string;\n size?: number;\n req?: IMap;\n}\n\nexport class Product {\n // Product name\n name = \"\";\n\n // The demand for this Product in the market. Gradually decreases\n dmd = 0;\n\n // How much competition there is in the market for this Product\n cmp = 0;\n\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n mku = 0;\n\n // Production cost - estimation of how much money it costs to make this Product\n pCost = 0;\n\n // Sell cost\n sCost: string | number = 0;\n\n // Variables for handling the creation process of this Product\n fin = false; // Whether this Product has finished being created\n prog = 0; // Creation progress - A number betwee 0-100 representing percentage\n createCity = \"\"; // City in which the product is/was being created\n designCost = 0; // How much money was invested into designing this Product\n advCost = 0; // How much money was invested into advertising this Product\n\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 rat = 0;\n\n // Stats/properties of this Product\n qlt = 0;\n per = 0;\n dur = 0;\n rel = 0;\n aes = 0;\n fea = 0;\n\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 data: IMap = createCityMap([0, 0, 0]);\n\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n loc = \"\";\n\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n siz = 0;\n\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 reqMats: IMap = {};\n\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 prdman: IMap = createCityMap([false, 0]);\n sllman: IMap = createCityMap([false, 0]);\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price: IMap = createCityMap(0);\n\n // Determines the maximum amount of this product that can be sold in one market cycle\n maxsll = 0;\n constructor(params: IConstructorParams = {}) {\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 }\n\n // empWorkMult is a multiplier that increases progress rate based on\n // productivity of employees\n createProduct(marketCycles = 1, empWorkMult = 1): void {\n if (this.fin) {\n return;\n }\n this.prog += marketCycles * 0.01 * empWorkMult;\n }\n\n // @param industry - Industry object. Reference to industry that makes this Product\n finishProduct(employeeProd: { [key: string]: number }, industry: IIndustry): void {\n this.fin = true;\n\n //Calculate properties\n const progrMult = this.prog / 100;\n\n const engrRatio = employeeProd[EmployeePositions.Engineer] / employeeProd[\"total\"];\n const mgmtRatio = employeeProd[EmployeePositions.Management] / employeeProd[\"total\"];\n const rndRatio = employeeProd[EmployeePositions.RandD] / employeeProd[\"total\"];\n const opsRatio = employeeProd[EmployeePositions.Operations] / employeeProd[\"total\"];\n const busRatio = employeeProd[EmployeePositions.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\n this.qlt =\n totalMult *\n (0.1 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.per =\n totalMult *\n (0.15 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.dur =\n totalMult *\n (0.05 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.08 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.rel =\n totalMult *\n (0.02 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.08 * employeeProd[EmployeePositions.Business]);\n this.aes =\n totalMult *\n (0.0 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.1 * employeeProd[EmployeePositions.Business]);\n this.fea =\n totalMult *\n (0.08 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n const busmgtgRatio = Math.max(busRatio + mgmtRatio, 1 / employeeProd[\"total\"]);\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * busmgtgRatio);\n\n // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n if (this.mku === 0 || !isFinite(this.mku)) this.mku = 1;\n\n this.dmd =\n industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = getRandomInt(0, 70);\n\n //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n for (const matName of Object.keys(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 }\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 this.siz = 0;\n for (const matName of Object.keys(industry.reqMats)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += MaterialSizes[matName] * reqMat;\n }\n }\n\n calculateRating(industry: IIndustry): void {\n const weights: IProductRatingWeight = ProductRatingWeights[industry.type];\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\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 }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Product\", this);\n }\n\n // Initiatizes a Product object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Product {\n return Generic_fromJSON(Product, value.data);\n }\n}\n\nReviver.constructors.Product = Product;\n","import { IIndustry } from \"../IIndustry\";\n\n// Returns a boolean indicating whether the given material is relevant for the\n// current industry.\nexport function isRelevantMaterial(matName: string, division: IIndustry): boolean {\n // Materials that affect Production multiplier\n const prodMultiplierMats = [\"Hardware\", \"Robots\", \"AICores\", \"RealEstate\", \"AI Cores\", \"Real Estate\"];\n\n if (Object.keys(division.reqMats).includes(matName)) {\n return true;\n }\n if (division.prodMats.includes(matName)) {\n return true;\n }\n if (prodMultiplierMats.includes(matName)) {\n return true;\n }\n\n return false;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { find } from \"lodash\";\n\nimport {\n Box,\n Typography,\n Button,\n Container,\n Paper\n} from \"@mui/material\";\nimport { Check, Lock, Create } from \"@mui/icons-material\";\n\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { Programs } from \"../Programs\";\n\nexport const ProgramsSeen: string[] = [];\n\nexport function ProgramsRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n const programs = [...Object.values(Programs)]\n .filter(prog => {\n const create = prog.create;\n if (create === null) return false;\n if (prog.name === \"b1t_flum3.exe\") {\n return create.req(player);\n }\n return true;\n })\n .sort((a, b) => {\n if (player.hasProgram(a.name)) return 1;\n if (player.hasProgram(b.name)) return -1;\n return (a.create?.level ?? 0) - (b.create?.level ?? 0);\n })\n\n useEffect(() => {\n programs.forEach((p) => {\n if (ProgramsSeen.includes(p.name)) return;\n ProgramsSeen.push(p.name);\n });\n }, []);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const getHackingLevelRemaining = (lvl: number): number => {\n return Math.ceil(Math.max(lvl - (player.hacking + player.intelligence / 2), 0));\n }\n\n const getProgCompletion = (name: string): number => {\n const programFile = find(player.getHomeComputer().programs, p => {\n return (p.startsWith(name) && p.endsWith(\"%-INC\"));\n });\n if (!programFile) return -1;\n\n const res = programFile.split(\"-\");\n if (res.length != 3) return -1;\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n return -1;\n }\n return percComplete;\n }\n\n return (\n \n Create program\n \n This page displays any programs that you are able to create. Writing the code for a program takes time, which\n can vary based on how complex the program is. If you are working on creating a program you can cancel at any\n time. Your progress will be saved and you can continue later.\n \n\n \n {programs.map((program) => {\n const create = program.create;\n if (create === null) return <>;\n const curCompletion = getProgCompletion(program.name);\n\n return (\n \n \n {player.hasProgram(program.name) && ||\n (create.req(player) && || )}\n {program.name}\n \n {(!player.hasProgram(program.name) && create.req(player)) && {\n if (!event.isTrusted) return;\n player.startCreateProgramWork(program.name, create.time, create.level);\n player.startFocusing();\n router.toWork();\n }}\n >\n Create program\n }\n {(player.hasProgram(program.name) || getHackingLevelRemaining(create.level) === 0) ||\n \n Unlocks in: {getHackingLevelRemaining(create.level)} hacking levels\n }\n {(curCompletion !== -1) &&\n \n Current completion: {curCompletion}%\n }\n \n {create.tooltip}\n \n \n );\n })}\n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nimport { Box, Button, Container, Paper, TableBody, TableRow, Typography } from \"@mui/material\";\n\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Table, TableCell } from \"../../ui/React/Table\";\nimport { IRouter } from \"../../ui/Router\";\n\nimport { Faction } from \"../Faction\";\nimport { joinFaction, getFactionAugmentationsFiltered } from \"../FactionHelpers\";\nimport { Factions } from \"../Factions\";\nimport { FactionNames } from \"../data/FactionNames\";\n\nexport const InvitationsSeen: string[] = [];\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function FactionsRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n useEffect(() => {\n props.player.factionInvitations.forEach((faction) => {\n if (InvitationsSeen.includes(faction)) return;\n InvitationsSeen.push(faction);\n });\n }, []);\n\n function openFaction(faction: Faction): void {\n props.router.toFaction(faction);\n }\n\n function openFactionAugPage(faction: Faction): void {\n props.router.toFaction(faction, true);\n }\n\n function acceptInvitation(event: React.MouseEvent, faction: string): void {\n if (!event.isTrusted) return;\n joinFaction(Factions[faction]);\n setRerender((x) => !x);\n }\n\n const getAugsLeft = (faction: Faction, player: IPlayer): number => {\n const augs = getFactionAugmentationsFiltered(player, faction);\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation)).length;\n };\n\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n const allJoinedFactions = props.player.factions.slice(0);\n allJoinedFactions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n\n return (\n \n Factions\n \n Throughout the game you may receive invitations from factions. There are many different factions, and each\n faction has different criteria for determining its potential members. Joining a faction and furthering its cause\n is crucial to progressing in the game and unlocking endgame content.\n \n\n \n Factions you have joined:\n \n {(allJoinedFactions.length > 0 && (\n \n \n \n {allJoinedFactions.map((faction: string) => (\n \n \n \n {faction}\n \n \n \n \n \n \n \n \n \n \n \n \n \n ))}\n \n
\n
\n )) || You haven't joined any factions.}\n \n Outstanding Faction Invitations\n \n \n Factions you have been invited to. You can accept these faction invitations at any time:\n \n {(props.player.factionInvitations.length > 0 && (\n \n \n \n {props.player.factionInvitations.map((faction: string) => (\n \n \n \n {faction}\n \n \n \n \n \n \n \n \n ))}\n \n
\n
\n )) || You have no outstanding faction invites.}\n
\n );\n}\n","import React, { useEffect } from \"react\";\n\nimport { Typography, Link, Button, ButtonGroup, Tooltip, Box, Paper, TextField } from \"@mui/material\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { load } from \"../../db\";\nimport { IRouter } from \"../Router\";\nimport { download } from \"../../SaveObject\";\nimport { IErrorData, newIssueUrl } from \"../../utils/ErrorHelper\";\nimport { DeleteGameButton } from \"./DeleteGameButton\";\nimport { SoftResetButton } from \"./SoftResetButton\";\n\nimport DirectionsRunIcon from '@mui/icons-material/DirectionsRun';\nimport GitHubIcon from \"@mui/icons-material/GitHub\";\n\nexport let RecoveryMode = false;\n\nexport function ActivateRecoveryMode(): void {\n RecoveryMode = true;\n}\n\ninterface IProps {\n router: IRouter;\n softReset: () => void;\n errorData?: IErrorData;\n resetError?: () => void;\n}\n\nexport function RecoveryRoot({ router, softReset, errorData, resetError }: IProps): React.ReactElement {\n function recover(): void {\n if (resetError) resetError();\n RecoveryMode = false;\n router.toTerminal();\n }\n Settings.AutosaveInterval = 0;\n\n useEffect(() => {\n load().then((content) => {\n const epochTime = Math.round(Date.now() / 1000);\n const filename = `RECOVERY_BITBURNER_${epochTime}.json`;\n download(filename, content);\n });\n }, []);\n\n return (\n \n RECOVERY MODE ACTIVATED\n \n There was an error with your save file and the game went into recovery mode. In this mode saving is disabled\n and the game will automatically export your save file (to prevent corruption).\n \n At this point it is recommended to alert a developer.\n \n File an issue on github\n \n \n Make a reddit post\n \n \n Post in the #bug-report channel on Discord.\n \n Please include your save file.\n
\n
\n You can disable recovery mode now. But chances are the game will not work correctly.\n \n \n \n \n \n \n \n\n {errorData && (\n \n \n {errorData.title}\n \n \n \n \n \n \n \n \n )}\n
\n );\n}\n","import { CalculateShareMult as CSM } from \"./formulas/share\";\n\nexport let sharePower = 1;\n\nexport function StartSharing(threads: number): () => void {\n sharePower += threads;\n return () => (sharePower -= threads);\n}\n\nexport function CalculateShareMult(): number {\n return CSM(sharePower);\n}\n","import { CorporationState } from \"./CorporationState\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"./data/CorporationUpgrades\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { Industry } from \"./Industry\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { showLiterature } from \"../Literature/LiteratureHelpers\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { isString } from \"../utils/helpers/isString\";\n\ninterface IParams {\n name?: string;\n}\n\nexport class Corporation {\n name = \"The Corporation\";\n\n //A division/business sector is represented by the object:\n divisions: Industry[] = [];\n\n //Financial stats\n funds = 150e9;\n revenue = 0;\n expenses = 0;\n fundingRound = 0;\n public = false; //Publicly traded\n totalShares = CorporationConstants.INITIALSHARES; // Total existing shares\n numShares = CorporationConstants.INITIALSHARES; // Total shares owned by player\n shareSalesUntilPriceUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n shareSaleCooldown = 0; // Game cycles until player can sell shares again\n issueNewSharesCooldown = 0; // Game cycles until player can issue shares again\n dividendPercentage = 0;\n dividendTaxPercentage = 50;\n issuedShares = 0;\n sharePrice = 0;\n storedCycles = 0;\n\n unlockUpgrades: number[];\n upgrades: number[];\n upgradeMultipliers: number[];\n\n state = new CorporationState();\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(CorporationUnlockUpgrades).length;\n const numUpgrades = Object.keys(CorporationUpgrades).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: number): void {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n this.funds = this.funds + amt;\n }\n\n getState(): string {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1): void {\n this.storedCycles += numCycles;\n }\n\n process(player: IPlayer): void {\n if (this.storedCycles >= CorporationConstants.CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * CorporationConstants.CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n\n this.divisions.forEach((ind) => {\n ind.process(marketCycles, state, this);\n });\n\n // Process cooldowns\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n }\n\n //At the start of a new cycle, calculate profits from previous cycle\n if (state === \"START\") {\n this.revenue = 0;\n this.expenses = 0;\n this.divisions.forEach((ind) => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n this.revenue = this.revenue + ind.lastCycleRevenue;\n this.expenses = this.expenses + ind.lastCycleExpenses;\n });\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * (marketCycles * CorporationConstants.SecsPerMarketCycle);\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n dialogBoxCreate(\n \"There was an error calculating your Corporations funds and they got reset to 0. \" +\n \"This is a bug. Please report to game developer.

\" +\n \"(Your funds have been set to $150b for the inconvenience)\",\n );\n this.funds = 150e9;\n }\n\n // Process dividends\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (\n isNaN(this.dividendPercentage) ||\n this.dividendPercentage < 0 ||\n this.dividendPercentage > CorporationConstants.DividendMaxPercentage * 100\n ) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n player.gainMoney(this.getDividends(), \"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 getDividends(): number {\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * CorporationConstants.SecsPerMarketCycle;\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const dividendsPerShare = totalDividends / this.totalShares;\n const dividends = this.numShares * dividendsPerShare;\n let upgrades = -0.15;\n if (this.unlockUpgrades[5] === 1) {\n upgrades += 0.05;\n }\n if (this.unlockUpgrades[6] === 1) {\n upgrades += 0.1;\n }\n return Math.pow(dividends, BitNodeMultipliers.CorporationSoftCap + upgrades);\n }\n\n determineValuation(): number {\n let val,\n profit = this.revenue - this.expenses;\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 + 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, 0) / 3; //Base valuation\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 val -= val % 1e6; //Round down to nearest millionth\n }\n return val * BitNodeMultipliers.CorporationValuation;\n }\n\n getTargetSharePrice(): number {\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(): void {\n const targetPrice = this.getTargetSharePrice();\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 if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice(): void {\n this.sharePrice = this.getTargetSharePrice();\n }\n\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 calculateShareSale(numShares: number): [number, number, number] {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n\n const maxIterations = Math.ceil(numShares / CorporationConstants.SHARESPERPRICEUPDATE);\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(\n `Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`,\n );\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 = CorporationConstants.SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate;\n\n // Calculate what new share price would be\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd: number): string {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n\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 }\n\n //One time upgrades that unlock new features\n unlock(upgrade: CorporationUnlockUpgrade): void {\n const upgN = upgrade[0],\n price = upgrade[1];\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n if (this.funds < price) {\n dialogBoxCreate(\"You don't have enough funds to unlock this!\");\n return;\n }\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds - price;\n\n // Apply effects for one-time upgrades\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n }\n\n //Levelable upgrades\n upgrade(upgrade: CorporationUpgrade): void {\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 while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n if (this.funds < totalCost) {\n dialogBoxCreate(\"You don't have enough funds to purchase this!\");\n return;\n }\n ++this.upgrades[upgN];\n this.funds = this.funds - totalCost;\n\n //Increase upgrade multiplier\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt;\n\n //If storage size is being updated, update values in Warehouse objects\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n for (const city of Object.keys(industry.warehouses)) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof Warehouse) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier(): number {\n const mult = this.upgradeMultipliers[0];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier(): number {\n const mult = this.upgradeMultipliers[1];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain(): number {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier(): number {\n const mult = this.upgradeMultipliers[3];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier(): number {\n const mult = this.upgradeMultipliers[4];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier(): number {\n const mult = this.upgradeMultipliers[5];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier(): number {\n const mult = this.upgradeMultipliers[6];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier(): number {\n const mult = this.upgradeMultipliers[7];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier(): number {\n const mult = this.upgradeMultipliers[8];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier(): number {\n const mult = this.upgradeMultipliers[9];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\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 getStarterGuide(player: IPlayer): void {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = LiteratureNames.CorporationManagementHandbook;\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (isString(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 showLiterature(handbookFn);\n return;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Corporation\", this);\n }\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 static fromJSON(value: any): Corporation {\n return Generic_fromJSON(Corporation, value.data);\n }\n}\n\nReviver.constructors.Corporation = Corporation;\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Hashes } from \"./Hashes\";\n\nexport function HashRate({ hashes }: { hashes: number }): React.ReactElement {\n return ;\n}\n","import { BladeburnerConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\n\ninterface IChangePopulationByCountParams {\n estChange: number;\n estOffset: number;\n}\n\ninterface IChangePopulationByPercentageParams {\n nonZero: boolean;\n changeEstEqually: boolean;\n}\n\nexport class City {\n /**\n * Name of the city.\n */\n name = \"\";\n\n /**\n * Population of the city.\n */\n pop = 0;\n\n /**\n * Population estimation of the city.\n */\n popEst = 0;\n\n /**\n * Number of communities in the city.\n */\n comms = 0;\n\n /**\n * Chaos level of the city.\n */\n chaos = 0;\n\n constructor(name: string = BladeburnerConstants.CityNames[2]) {\n this.name = name;\n\n // Synthoid population and estimate\n this.pop = getRandomInt(BladeburnerConstants.PopulationThreshold, 1.5 * BladeburnerConstants.PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5);\n\n // Number of Synthoid communities population and estimate\n this.comms = getRandomInt(5, 150);\n this.chaos = 0;\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n changeChaosByPercentage(p: number): void {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n if (p === 0) {\n return;\n }\n this.chaos += this.chaos * (p / 100);\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n if (this.popEst < this.pop) {\n this.popEst += 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 if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n improvePopulationEstimateByPercentage(p: number, skillMult = 1): void {\n p = p * skillMult;\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n this.popEst *= 1 + p / 100;\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 if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\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 changePopulationByCount(n: number, params: IChangePopulationByCountParams = { estChange: 0, estOffset: 0 }): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n this.pop += n;\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n if (params.estOffset) {\n this.popEst = addOffset(this.popEst, params.estOffset);\n }\n this.popEst = Math.max(this.popEst, 0);\n }\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 changePopulationByPercentage(\n p: number,\n params: IChangePopulationByPercentageParams = {\n nonZero: false,\n changeEstEqually: false,\n },\n ): number {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n if (p === 0) {\n return 0;\n }\n let change = Math.round(this.pop * (p / 100));\n\n // Population always changes by at least 1\n if (params.nonZero && change === 0) {\n p > 0 ? (change = 1) : (change = -1);\n }\n\n this.pop += change;\n if (params.changeEstEqually) {\n this.popEst += change;\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n return change;\n }\n\n changeChaosByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n if (n === 0) {\n return;\n }\n this.chaos += n;\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"City\", this);\n }\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 static fromJSON(value: any): City {\n return Generic_fromJSON(City, value.data);\n }\n}\n\nReviver.constructors.City = City;\n","import { Factions } from \"../../Faction/Factions\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Gang } from \"../../Gang/Gang\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\n// Amount of negative karma needed to manage a gang in BitNodes other than 2\nconst GangKarmaRequirement = -54000;\n\nexport function canAccessGang(this: IPlayer): boolean {\n if (this.bitNodeN === 2) {\n return true;\n }\n if (SourceFileFlags[2] <= 0) {\n return false;\n }\n\n return this.karma <= GangKarmaRequirement;\n}\n\nexport function getGangFaction(this: IPlayer): Faction {\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n const fac = Factions[gang.facName];\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${gang.facName}`);\n }\n\n return fac;\n}\n\nexport function getGangName(this: IPlayer): string {\n if (!this.inGang()) return \"\";\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName;\n}\n\nexport function hasGangWith(this: IPlayer, facName: string): boolean {\n if (!this.inGang()) return false;\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName === facName;\n}\n\nexport function inGang(this: IPlayer): boolean {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof Gang;\n}\n\nexport function startGang(this: IPlayer, factionName: string, hacking: boolean): void {\n this.gang = new Gang(factionName, hacking);\n\n const fac = Factions[factionName];\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n fac.playerReputation = 0;\n}\n","/**\n * Class representing a City in the game\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\n\nexport class City {\n /**\n * List of all locations in this city\n */\n locations: LocationName[];\n\n /**\n * Name of this city\n */\n name: CityName;\n\n /**\n * Metro map ascii art\n */\n asciiArt: string;\n\n constructor(name: CityName, locations: LocationName[] = [], asciiArt = \"\") {\n this.name = name;\n this.locations = locations;\n this.asciiArt = asciiArt;\n }\n\n addLocation(loc: LocationName): void {\n this.locations.push(loc);\n }\n}\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 */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\n\ntype IProps = {\n buttonText: string;\n infoText: string;\n onClick: (e: React.MouseEvent) => void;\n};\n\nexport function Option(props: IProps): React.ReactElement {\n return (\n \n \n \n {props.infoText}\n \n \n );\n}\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 */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\nexport enum TickerDisplayMode {\n AllStocks,\n Portfolio,\n}\n\ntype IProps = {\n changeDisplayMode: () => void;\n changeWatchlistFilter: (e: React.ChangeEvent) => void;\n tickerDisplayMode: TickerDisplayMode;\n};\n\nfunction DisplayModeButton(props: IProps): React.ReactElement {\n let txt = \"\";\n let tooltip = \"\";\n if (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 (\n {tooltip}}>\n \n \n );\n}\n\nexport function StockTickersConfig(props: IProps): React.ReactElement {\n return (\n <>\n \n
\n \n \n );\n}\n","/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\n\nexport function hasTorRouter(this: IPlayer): boolean {\n return !!GetServer(SpecialServers.DarkWeb);\n}\n\nexport function getCurrentServer(this: IPlayer): BaseServer {\n const server = GetServer(this.currentServer);\n if (server === null) throw new Error(`somehow connected to a server that does not exist. ${this.currentServer}`);\n return server;\n}\n\nexport function getHomeComputer(this: IPlayer): Server {\n const home = GetServer(\"home\");\n if (home instanceof Server) return home;\n throw new Error(\"home computer was not a normal server\");\n}\n\nexport function getUpgradeHomeRamCost(this: IPlayer): number {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam);\n\n //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;\n return cost;\n}\n\nexport function getUpgradeHomeCoresCost(this: IPlayer): number {\n return 1e9 * Math.pow(7.5, this.getHomeComputer().cpuCores);\n}\n\nexport function createHacknetServer(this: IPlayer): HacknetServer {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new HacknetServer({\n adminRights: true,\n hostname: name,\n ip: createUniqueRandomIp(),\n // player: this,\n });\n this.hacknetNodes.push(server.hostname);\n\n // Configure the HacknetServer to actually act as a Server\n AddToAllServers(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.hostname);\n server.serversOnNetwork.push(SpecialServers.Home);\n\n return server;\n}\n","import { Player } from \"../Player\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IAction, ISuccessChanceParams } from \"./IAction\";\n\nclass StatsMultiplier {\n [key: string]: number;\n\n hack = 0;\n str = 0;\n def = 0;\n dex = 0;\n agi = 0;\n cha = 0;\n int = 0;\n}\n\nexport interface IActionParams {\n name?: string;\n level?: number;\n maxLevel?: number;\n autoLevel?: boolean;\n baseDifficulty?: number;\n difficultyFac?: number;\n rewardFac?: number;\n successes?: number;\n failures?: number;\n rankGain?: number;\n rankLoss?: number;\n hpLoss?: number;\n hpLost?: number;\n isStealth?: boolean;\n isKill?: boolean;\n count?: number;\n weights?: StatsMultiplier;\n decays?: StatsMultiplier;\n teamCount?: number;\n}\n\nexport class Action implements IAction {\n name = \"\";\n\n // Difficulty scales with level. See getDifficulty() method\n level = 1;\n maxLevel = 1;\n autoLevel = true;\n baseDifficulty = 100;\n difficultyFac = 1.01;\n\n // Rank increase/decrease is affected by this exponent\n rewardFac = 1.02;\n\n successes = 0;\n failures = 0;\n\n // All of these scale with level/difficulty\n rankGain = 0;\n rankLoss = 0;\n hpLoss = 0;\n hpLost = 0;\n\n // Action Category. Current categories are stealth and kill\n isStealth = false;\n isKill = false;\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n count: number = getRandomInt(1e3, 25e3);\n\n // Weighting of each stat in determining action success rate\n weights: StatsMultiplier = {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7,\n };\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n decays: StatsMultiplier = {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9,\n };\n teamCount = 0;\n\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params: IActionParams | null = null) {\n // | null = null\n if (params && params.name) this.name = params.name;\n\n if (params && params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n\n if (params && params.count) this.count = params.count;\n\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays;\n\n // Check to make sure weights are summed properly\n let sum = 0;\n for (const weight of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\n \"Invalid weights when constructing Action \" +\n this.name +\n \". The weights should sum up to 1. They sum up to :\" +\n 1,\n );\n }\n\n for (const decay of Object.keys(this.decays)) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(\n `Invalid decays when constructing Action ${this.name}. Decay value cannot be greater than 1`,\n );\n }\n }\n }\n }\n\n getDifficulty(): number {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n return difficulty;\n }\n\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n attempt(inst: IBladeburner): boolean {\n return Math.random() < this.getSuccessChance(inst);\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1;\n }\n\n getActionTime(inst: IBladeburner): number {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = Player.agility * inst.skillMultipliers.effAgi;\n const effDexterity = Player.dexterity * inst.skillMultipliers.effDex;\n const statFac =\n 0.5 *\n (Math.pow(effAgility, BladeburnerConstants.EffAgiExponentialFactor) +\n Math.pow(effDexterity, BladeburnerConstants.EffDexExponentialFactor) +\n effAgility / BladeburnerConstants.EffAgiLinearFactor +\n effDexterity / BladeburnerConstants.EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, (baseTime * skillFac) / statFac);\n\n return Math.ceil(baseTime * this.getActionTimePenalty());\n }\n\n // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getTeamSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n getChaosCompetencePenalty(inst: IBladeburner, params: ISuccessChanceParams): number {\n const city = inst.getCurrentCity();\n if (params.est) {\n return Math.pow(city.popEst / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n } else {\n return Math.pow(city.pop / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst: IBladeburner): [number, number] {\n function clamp(x: number): number {\n return Math.max(0, Math.min(x, 1));\n }\n const est = this.getSuccessChance(inst, { est: true });\n const real = this.getSuccessChance(inst);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;\n else high *= r;\n return [clamp(low), clamp(high)];\n }\n\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n getSuccessChance(inst: IBladeburner, params: ISuccessChanceParams = { est: false }): number {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n let difficulty = this.getDifficulty();\n let competence = 0;\n for (const stat of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = Player.queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n competence *= Player.getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n\n competence *= this.getTeamSuccessBonus(inst);\n\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n }\n\n // Factor skill multipliers into success chance\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n }\n\n // Augmentation multiplier\n competence *= Player.bladeburner_success_chance_mult;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel: number): number {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel: number): void {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Action\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Action {\n return Generic_fromJSON(Action, value.data);\n }\n}\n\nReviver.constructors.Action = Action;\n","import React from \"react\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ICityProps {\n currentCity: CityName;\n city: CityName;\n onTravel: (city: CityName) => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n travel: {\n color: theme.colors.white,\n lineHeight: \"1em\",\n whiteSpace: \"pre\",\n cursor: \"pointer\"\n },\n })\n);\n\nfunction City(props: ICityProps): React.ReactElement {\n const classes = useStyles();\n if (props.city !== props.currentCity) {\n return (\n {props.city}}>\n props.onTravel(props.city)}\n className={classes.travel}\n >\n {props.city[0]}\n \n \n );\n }\n return {props.city[0]};\n}\n\ninterface IProps {\n currentCity: CityName;\n onTravel: (city: CityName) => void;\n}\n\nexport function WorldMap(props: IProps): React.ReactElement {\n // prettier-ignore\n return (\n <>\n ,_ . ._. _. .\n , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-\n /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_\n / ,/'-/~ '\\ ,' _ , ','|~ ._/-, /~\n ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~\n .-~ '| '',\\~|\\ _\\~ ,_ , /,\n '\\ /'~ |_/~\\\\,-,~ \\ \" ,_,/ |\n | / ._-~'\\_ _~| \\ ) \n \\ __-\\ '/ ~ |\\ \\_ / ~\n ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,\n ~-_' _; '\\ '-, \\,' /\\/ |\n '\\_,~'\\_ \\_ _, /' ' |, /|'\n / \\_ ~ | / \\ ~'; -,_.\n | ~\\ | | , '-_, ,; ~ ~\\\n \\, / \\ / /| ,-, , -,\n | ,/ | |' |/ ,- ~ \\ '.\n ,| ,/ \\ ,/ \\ |\n / | ~ -~~-, / _\n | ,-' ~ /\n / ,' ~\n ',| ~\n ~'\n \n );\n}\n","import React from \"react\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { StealthIcon } from \"./StealthIcon\";\nimport { KillIcon } from \"./KillIcon\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: IAction;\n}\n\nexport function SuccessChance(props: IProps): React.ReactElement {\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n\n let chance = <>;\n if (estimatedSuccessChance[0] === estimatedSuccessChance[1]) {\n chance = <>{formatNumber(estimatedSuccessChance[0] * 100, 1)}%;\n } else {\n chance = (\n <>\n {formatNumber(estimatedSuccessChance[0] * 100, 1)}% ~ {formatNumber(estimatedSuccessChance[1] * 100, 1)}%\n \n );\n }\n\n return (\n <>\n Estimated success chance: {chance} {props.action.isStealth ? : <>}\n {props.action.isKill ? : <>}\n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n}\n\nexport function StaticModal(props: IProps): React.ReactElement {\n return (\n \n {props.children}\n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nfunction replace(str: string, i: number, char: string): string {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\ninterface IProps {\n content: string;\n}\n\nfunction randomize(char: string): string {\n const randFrom = (str: string): string => str[Math.floor(Math.random() * str.length)];\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\nexport function CorruptableText(props: IProps): JSX.Element {\n const [content, setContent] = useState(props.content);\n\n useEffect(() => {\n let counter = 5;\n const timers: number[] = [];\n const intervalId = 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((content) => replace(content, index, randomize(letter)));\n timers.push(window.setTimeout(() => {\n setContent((content) => replace(content, index, letter));\n }, 500));\n }, 20);\n\n return () => {\n clearInterval(intervalId);\n timers.forEach((timerId) => clearTimeout(timerId));\n };\n }, []);\n\n return {content};\n}\n","import React from \"react\";\nimport { DarkWebItems } from \"./DarkWebItems\";\n\nimport { Player } from \"../Player\";\nimport { Terminal } from \"../Terminal\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\nimport { DarkWebItem } from \"./DarkWebItem\";\n\n//Posts a \"help\" message if connected to DarkWeb\nexport function checkIfConnectedToDarkweb(): void {\n const server = Player.getCurrentServer();\n if (server !== null && SpecialServers.DarkWeb == server.hostname) {\n Terminal.print(\n \"You are now connected to the dark web. From the dark web you can purchase illegal items. \" +\n \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name]' \" +\n \"to purchase an item. Use 'buy -a' to purchase all unowned items.\",\n );\n }\n}\n\nexport function listAllDarkwebItems(): void {\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n\n const cost = Player.getHomeComputer().programs.includes(item.program) ? (\n [OWNED]\n ) : (\n \n );\n\n Terminal.printRaw(\n <>\n {item.program} - {cost} - {item.description}\n ,\n );\n }\n}\n\nexport function buyDarkwebItem(itemName: string): void {\n itemName = itemName.toLowerCase();\n\n // find the program that matches, if any\n let item: DarkWebItem | null = null;\n\n for (const key of Object.keys(DarkWebItems)) {\n const i = DarkWebItems[key];\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n }\n\n // return if invalid\n if (item === null) {\n Terminal.error(\"Unrecognized item: \" + itemName);\n return;\n }\n\n // return if the player already has it.\n if (Player.hasProgram(item.program)) {\n Terminal.print(\"You already have the \" + item.program + \" program\");\n return;\n }\n\n // return if the player doesn't have enough money\n if (Player.money < item.price) {\n Terminal.error(\"Not enough money to purchase \" + item.program);\n return;\n }\n\n // buy and push\n Player.loseMoney(item.price, \"other\");\n\n const programsRef = Player.getHomeComputer().programs;\n // Remove partially created program if there is one\n const existingPartialExeIndex = programsRef.findIndex(\n (program) => item?.program && program.startsWith(item?.program),\n );\n // findIndex returns -1 if there is no match, we only want to splice on a match\n if (existingPartialExeIndex > -1) {\n programsRef.splice(existingPartialExeIndex, 1);\n }\n // Add the newly bought, full .exe\n Player.getHomeComputer().programs.push(item.program);\n\n Terminal.print(\n \"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\",\n );\n}\n\nexport function buyAllDarkwebItems(): void {\n const itemsToBuy: DarkWebItem[] = [];\n let cost = 0;\n\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n if (!Player.hasProgram(item.program)) {\n itemsToBuy.push(item);\n cost += item.price;\n }\n }\n\n if (itemsToBuy.length === 0) {\n Terminal.print(\"All available programs have been purchased already.\");\n return;\n }\n\n if (cost > Player.money) {\n Terminal.error(\"Not enough money to purchase remaining programs, \" + numeralWrapper.formatMoney(cost) + \" required\");\n return;\n }\n\n for (const item of itemsToBuy) {\n buyDarkwebItem(item.program);\n }\n}\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 */\nimport { IReturnStatus } from \"../types\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Server } from \"../Server/Server\";\n\nfunction baseCheck(server: Server, fnName: string): IReturnStatus {\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 { res: true };\n}\n\nexport function netscriptCanHack(server: Server, p: IPlayer): IReturnStatus {\n const initialCheck = baseCheck(server, \"hack\");\n if (!initialCheck.res) {\n return initialCheck;\n }\n\n const s = server;\n if (s.requiredHackingSkill > p.hacking) {\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 { res: true };\n}\n\nexport function netscriptCanGrow(server: Server): IReturnStatus {\n return baseCheck(server, \"grow\");\n}\n\nexport function netscriptCanWeaken(server: Server): IReturnStatus {\n return baseCheck(server, \"weaken\");\n}\n","import { sum } from \"lodash\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { CONSTANTS } from \"../../Constants\";\n\nexport interface IConstructorParams {\n augmentation: Augmentation;\n readonly cost: number;\n readonly time: number;\n}\n\nexport class GraftableAugmentation {\n // The augmentation that this craftable corresponds to\n augmentation: Augmentation;\n\n constructor(augmentation: Augmentation) {\n this.augmentation = augmentation;\n }\n\n get cost(): number {\n return this.augmentation.startingCost * CONSTANTS.AugmentationGraftingCostMult;\n }\n\n get time(): number {\n // Time = 1 hour * log_2(sum(aug multipliers) || 1) + 30 minutes\n const antiLog = Math.max(sum(Object.values(this.augmentation.mults)), 1);\n\n const mult = Math.log2(antiLog);\n return (CONSTANTS.AugmentationGraftingTimeBase * mult + CONSTANTS.MillisecondsPerHalfHour) / 2;\n }\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\n\nexport function ReputationRate({ reputation }: { reputation: number }): React.ReactElement {\n return ;\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\nimport { substituteAliases } from \"../Alias\";\n// Helper function that checks if an argument (which is a string) is a valid number\nfunction isNumber(str: string): boolean {\n if (typeof str != \"string\") {\n return false;\n } // Only process strings\n return !isNaN(str as unknown as number) && !isNaN(parseFloat(str));\n}\nexport function ParseCommands(commands: string): string[] {\n // Sanitize input\n commands = commands.trim();\n // Replace all extra whitespace in command with a single space\n commands = commands.replace(/\\s\\s+/g, \" \");\n\n const match = commands.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g);\n if (!match) return [];\n // Split commands and execute sequentially\n const allCommands = match\n .map(substituteAliases)\n .map((c) => c.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g))\n .flat();\n\n const out: string[] = [];\n for (const c of allCommands) {\n if (c === null) continue;\n if (c.match(/^\\s*$/)) {\n continue;\n } // Don't run commands that only have whitespace\n out.push(c.trim());\n }\n return out;\n}\n\nexport function ParseCommand(command: string): (string | number | boolean)[] {\n // This will be used to keep track of whether we're in a quote. This is for situations\n // like the alias command:\n // alias run=\"run NUKE.exe\"\n // We want the run=\"run NUKE.exe\" to be parsed as a single command, so this flag\n // will keep track of whether we have a quote in\n let inQuote = ``;\n\n // Returns an array with the command and its arguments in each index\n // Properly handles quotation marks (e.g. `run foo.script \"the sun\"` will return [run, foo.script, the sun])\n const args = [];\n let start = 0,\n i = 0;\n let prevChar = \"\"; // Previous character\n while (i < command.length) {\n let escaped = false; // Check for escaped quotation marks\n if (i >= 1) {\n prevChar = command.charAt(i - 1);\n if (prevChar === \"\\\\\") {\n escaped = true;\n }\n }\n\n const c = command.charAt(i);\n if (c === KEY.DOUBLE_QUOTE) {\n // Double quotes\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.DOUBLE_QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.DOUBLE_QUOTE;\n } else if (inQuote === KEY.DOUBLE_QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.QUOTE) {\n // Single quotes, same thing as above\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.QUOTE;\n } else if (inQuote === KEY.QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.SPACE && inQuote === ``) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from a string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n\n start = i + 1;\n }\n ++i;\n }\n\n // Add the last argument\n if (start !== i) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n }\n\n return args;\n}\n","import React, { useState } from \"react\";\n\nimport { CinematicLine } from \"./CinematicLine\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n lines: string[];\n auto?: boolean;\n onDone?: () => void;\n}\n\nexport function CinematicText(props: IProps): React.ReactElement {\n const [i, setI] = useState(0);\n const [done, setDone] = useState(false);\n\n function advance(): void {\n const newI = i + 1;\n setI(newI);\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return (\n <>\n {props.lines.slice(0, i).map((line, i) => (\n {line}\n ))}\n {props.lines.length > i && }\n {!props.auto && props.onDone && done && }\n \n );\n}\n","/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\nexport const MaxSleevesFromCovenant = 5;\nexport const BaseCostPerSleeve = 10e12;\n","import { Augmentation, IConstructorParams } from \"./Augmentation\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\nimport { Player } from \"../Player\";\nimport { Programs } from \"../Programs/Programs\";\nimport { WHRNG } from \"../Casino/RNG\";\nimport React from \"react\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\nfunction getRandomBonus(): any {\n const bonuses = [\n {\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:\n \"Increases the player's hacking chance by 25%.
\" +\n \"Increases the player's hacking speed by 10%.
\" +\n \"Increases the amount of money the player's gains from hacking by 25%.
\" +\n \"Improves grow() by 10%.\",\n },\n {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2,\n },\n description:\n \"Increases the player's hacking skill by 15%.
\" +\n \"Increases the player's hacking experience gain rate by 100%.\",\n },\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:\n \"Increases all of the player's combat stats by 25%.
\" +\n \"Increases all of the player's combat stat experience gain rate by 100%.\",\n },\n {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2,\n },\n description:\n \"This augmentation increases the player's charisma by 50%.
\" +\n \"Increases the player's charisma experience gain rate by 100%.\",\n },\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:\n \"Increases the amount of money produced by Hacknet Nodes by 20%.
\" +\n \"Decreases all costs related to Hacknet Node by 15%.\",\n },\n {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7,\n },\n description:\n \"Increases the amount of money the player gains from working by 70%.
\" +\n \"Increases the amount of reputation the player gains when working for a company by 25%.
\" +\n \"Increases the amount of reputation the player gains for a faction by 15%.\",\n },\n {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2,\n },\n description:\n \"Increases the player's crime success rate by 100%.
\" +\n \"Increases the amount of money the player gains from crimes by 100%.\",\n },\n ];\n\n const randomNumber = new WHRNG(Math.floor(Player.lastUpdate / 3600000));\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nexport const generalAugmentations = [\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info:\n \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" +\n \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info:\n \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" +\n \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [AugmentationNames.Targeting1],\n dexterity_mult: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.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: [AugmentationNames.Targeting2],\n dexterity_mult: 1.3,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info:\n \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" +\n \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info:\n \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" +\n \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" +\n \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info:\n \"The rib cage is augmented to continuously release boosters into the bloodstream \" +\n \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info:\n \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" +\n \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [AugmentationNames.CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info:\n \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" +\n \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [AugmentationNames.CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info:\n \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" +\n \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FulcrumSecretTechnologies,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info:\n \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" +\n \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" +\n \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" +\n \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" +\n \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2,\n factions: [\n FactionNames.TheSyndicate,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.Illuminati,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info:\n \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" +\n \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SlumSnakes,\n FactionNames.Sector12,\n FactionNames.Volhaven,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info:\n \"The spine is reconstructed using plasteel and carbon fibers. \" +\n \"It is now capable of stimulating and regulating neural signals \" +\n \"passing through the spinal cord, improving senses and reaction speed. \" +\n \"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 factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info:\n \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" +\n \"which enhances durability and supercharges all body functions.\",\n prereqs: [AugmentationNames.BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info:\n \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" +\n \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [AugmentationNames.BionicLegs],\n agility_mult: 2.5,\n factions: [FactionNames.MegaCorp, FactionNames.ECorp, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info:\n \"A cochlear implant with an embedded computer that analyzes incoming speech. \" +\n \"The embedded computer processes characteristics of incoming speech, such as tone \" +\n \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.Silhouette,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info:\n \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" +\n \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" +\n \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15,\n factions: [FactionNames.Silhouette],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info:\n \"A cranial implant that greatly assists in the user's ability to analyze social situations \" +\n \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" +\n \"language, and the voice tone, and inflection to determine the best course of action during social\" +\n \"situations. The implant also uses deep learning software to continuously learn new behavior\" +\n \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6,\n factions: [\n FactionNames.BachmanAssociates,\n FactionNames.NWO,\n FactionNames.ClarkeIncorporated,\n FactionNames.OmniTekIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info:\n \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" +\n \"capabilities.\",\n hacking_mult: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info:\n \"A network consisting of millions of nanoprocessors is embedded into the brain. \" +\n \"The network is meant to mimic the way a biological brain solves a problem, with each \" +\n \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" +\n \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" +\n \"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 factions: [FactionNames.BitRunners, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info:\n \"The body is injected with a chemical that artificially induces synaptic potentiation, \" +\n \"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 factions: [FactionNames.TheBlackHand, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info:\n \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" +\n \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" +\n \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" +\n \"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 factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.BitRunners, FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info:\n \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" +\n \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03,\n factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info:\n \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" +\n \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info:\n \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" +\n \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" +\n \"and delete it.\",\n hacking_money_mult: 1.25,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.Chongqing,\n FactionNames.NewTokyo,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info:\n \"A thin device embedded inside the arm containing a wireless module capable of connecting \" +\n \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" +\n \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" +\n \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" +\n \"control the traffic on a network.\",\n hacking_mult: 1.08,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCore,\n repCost: 175e3,\n moneyCost: 2.5e9,\n info:\n \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [AugmentationNames.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 factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info:\n \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to control information on \" +\n \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" +\n \"packets.\",\n prereqs: [AugmentationNames.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 factions: [\n FactionNames.BitRunners,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info:\n \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" +\n \"any device on a network.\",\n prereqs: [AugmentationNames.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 factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info:\n \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" +\n \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed_mult: 1.1,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info:\n \"This implant installs a Direct Memory Access (DMA) controller into the \" +\n \"Embedded Netburner Module. This allows the Module to send and receive data \" +\n \"directly to and from the main memory of devices on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info:\n \"A cranial implant that intelligently stimulates certain areas of the brain \" +\n \"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 factions: [\n FactionNames.TheBlackHand,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info:\n \"A microprocessor that accelerates the processing \" +\n \"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 factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info:\n \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info:\n \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info:\n \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09,\n factions: [FactionNames.NiteSec, FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info:\n \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25,\n factions: [FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info:\n \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75,\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info:\n \"The brain is surgically re-engineered to have increased neuronal density \" +\n \"by decreasing the neuron gap junction. Then, the body is genetically modified \" +\n \"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 factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info:\n \"This torso implant automatically injects nootropic supplements into \" +\n \"the bloodstream to improve memory, increase focus, and provide other \" +\n \"cognitive enhancements.\",\n company_rep_mult: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Volhaven,\n FactionNames.NewTokyo,\n FactionNames.Chongqing,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info:\n \"An advanced neural implant that improves your speaking abilities, making \" +\n \"you more convincing and likable in conversations and overall improving your \" +\n \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n FactionNames.ClarkeIncorporated,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info:\n \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" +\n \"computers. Connecting to a computer through this jack allows you to interface with \" +\n \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08,\n factions: [\n FactionNames.FourSigma,\n FactionNames.OmniTekIncorporated,\n FactionNames.ECorp,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info:\n \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" +\n \"improves the performance of the interface and gives the user more control options \" +\n \"to a connected computer.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp, FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info:\n \"This is an additional installation that upgrades the functionality of the \" +\n \"PC Direct-Neural Interface augmentation. When connected to a computer, \" +\n \"The Neural Network upgrade allows the user to use their own brain's \" +\n \"processing power to aid the computer in computational tasks.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05,\n factions: [FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" +\n \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" +\n \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.TheSyndicate,\n FactionNames.NWO,\n FactionNames.MegaCorp,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" +\n \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" +\n \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2,\n factions: [\n FactionNames.Silhouette,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info:\n \"A crude but functional matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation was developed by \" +\n \"criminal organizations and allows the user to project and control holographic \" +\n \"simulacrums within a large radius. These simulacrums are commonly used for \" +\n \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n factions: [FactionNames.TheSyndicate, FactionNames.TheDarkArmy, FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's CPU into \" +\n \"the brain. This allows the user to engineer custom hardware and software \" +\n \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" +\n \"into the brain. This allows the user to engineer custom cache hardware for the \" +\n \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" +\n \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" +\n \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" +\n \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" +\n \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. It is \" +\n \"installed by releasing millions of nanobots into the human brain, each of which \" +\n \"attaches to a different neural pathway to enhance the brain's ability to retain \" +\n \"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 factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" +\n \"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 factions: [FactionNames.BitRunners, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" +\n \"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 factions: [FactionNames.NWO, FactionNames.FourSigma],\n }),\n new Augmentation({\n name: AugmentationNames.Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" +\n \"Embedded circuitry within the implant provides the ability to detect heat and movement \" +\n \"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 factions: [FactionNames.BladeIndustries, FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info:\n \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, have a negative refractive index. As a result, they bend light \" +\n \"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 factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info:\n \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" +\n \"reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, are capable of not only bending light but also of bending heat, \" +\n \"making the user more resilient as well as stealthy.\",\n prereqs: [AugmentationNames.LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25,\n factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.SlumSnakes],\n }),\n new Augmentation({\n name: AugmentationNames.PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info:\n \"The body's nerves are attached with polypyrrole nanocircuits that \" +\n \"are capable of capturing wasted energy, in the form of heat, \" +\n \"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 factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate, FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info:\n `A brain implant that wirelessly connects you to the ${FactionNames.Illuminati}'s ` +\n \"quantum supercomputer, allowing you to access and use its incredible \" +\n \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4,\n factions: [FactionNames.Illuminati],\n }),\n new Augmentation({\n name: AugmentationNames.SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info:\n \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" +\n \"artificially-synthesized gene that was developed by DARPA to create \" +\n \"super-soldiers through genetic modification. The gene was outlawed in \" +\n \"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 factions: [FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info:\n `A brain implant developed by ${FactionNames.ECorp}. They do not reveal what ` +\n \"exactly the implant does, but they promise that it will greatly \" +\n \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: null,\n factions: [FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: null,\n factions: [FactionNames.Daedalus],\n }),\n new Augmentation({\n name: AugmentationNames.CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info:\n \"The thoracic cavity is equipped with a small chamber designed \" +\n \"to hold and sustain hydrogen plasma. The plasma is used to generate \" +\n \"fusion power through nuclear fusion, providing limitless amounts of clean \" +\n \"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 factions: [FactionNames.MegaCorp],\n }),\n new Augmentation({\n name: AugmentationNames.SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic jaw that contains advanced hardware and software \" +\n \"capable of psychoanalyzing and profiling the personality of \" +\n \"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 factions: [FactionNames.BachmanAssociates],\n }),\n new Augmentation({\n name: AugmentationNames.Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info:\n \"A highly-advanced techno-organic drug that is injected into the skeletal \" +\n \"and integumentary system. The drug permanently modifies the DNA of the \" +\n \"body's skin and bone cells, granting them the ability to repair \" +\n \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55,\n factions: [FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info:\n \"A concoction of advanced nanobots that is orally ingested into the \" +\n \"body. These nanobots induce physiological changes and significantly \" +\n \"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 factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info:\n \"The left arm of a legendary BitRunner who ascended beyond this world. \" +\n \"It projects a light blue energy shield that protects the exposed inner parts. \" +\n \"Even though it contains no weapons, the advanced tungsten titanium \" +\n \"alloy increases the user's strength to unbelievable levels. The augmentation \" +\n \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7,\n factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info:\n \"The body is genetically re-engineered to maintain a state \" +\n \"of negligible senescence, preventing the body from \" +\n \"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 factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info:\n \"OmniTek's data and information repository is uploaded \" +\n \"into your brain, enhancing your programming and \" +\n \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25,\n factions: [FactionNames.OmniTekIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info:\n \"Chloroplasts are added to epidermal stem cells and are applied \" +\n \"to the body using a skin graft. The result is photosynthetic \" +\n \"skin cells, allowing users to generate their own energy \" +\n \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4,\n factions: [FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info:\n \"A brain implant that provides a high-bandwidth, direct neural link between your \" +\n `mind and the ${FactionNames.BitRunners}' data servers, which reportedly contain ` +\n \"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.FTPCrackProgram.name, Programs.RelaySMTPProgram.name],\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info:\n \"A highly advanced bionic hand. This prosthetic not only \" +\n \"enhances strength and dexterity but it is also embedded \" +\n \"with hardware and firmware that lets the user connect to, access, and hack \" +\n \"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 factions: [FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info:\n \"The CRTX42-AA gene is injected into the genome. \" +\n \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" +\n \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info:\n \"A drug that genetically modifies the neurons in the brain \" +\n \"resulting in neurons that never die, continuously \" +\n \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4,\n factions: [FactionNames.Chongqing],\n }),\n new Augmentation({\n name: AugmentationNames.CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: (\n <>\n A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the\n chip allows you to connect it to a computer and upload the assets.\n \n ),\n startingMoney: 1e6,\n programs: [Programs.BruteSSHProgram.name],\n factions: [FactionNames.Sector12],\n }),\n new Augmentation({\n name: AugmentationNames.NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info:\n \"A thermo-powered artificial nutrition generator. Endogenously \" +\n \"synthesizes glucose, amino acids, and vitamins and redistributes them \" +\n \"across the body. The device is powered by the body's naturally wasted \" +\n \"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 factions: [FactionNames.NewTokyo],\n }),\n new Augmentation({\n name: AugmentationNames.PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info:\n \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" +\n \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" +\n \"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.DeepscanV1.name, Programs.AutoLink.name],\n factions: [FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.Ishima],\n }),\n new Augmentation({\n name: AugmentationNames.DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info:\n \"Synthetic skin that is grafted onto the body. This skin consists of \" +\n \"millions of nanobots capable of projecting high-density muon beams, \" +\n \"creating an energy barrier around the user.\",\n defense_mult: 1.4,\n factions: [FactionNames.Volhaven],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info:\n \"An upgrade to the BrachiBlades augmentation. It infuses \" +\n \"the retractable blades with an advanced graphene material \" +\n \"making them stronger and lighter.\",\n prereqs: [AugmentationNames.BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3,\n factions: [FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info:\n \"An upgrade to the Bionic Arms augmentation. It infuses the \" +\n \"prosthetic arms with an advanced graphene material \" +\n \"to make them stronger and lighter.\",\n prereqs: [AugmentationNames.BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85,\n factions: [FactionNames.TheDarkArmy],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info:\n \"A cranial implant that affects the user's personality, making them better \" +\n \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n factions: [FactionNames.TianDiHui],\n }),\n new Augmentation({\n name: AugmentationNames.NeuroreceptorManager,\n repCost: 0.75e5,\n moneyCost: 5.5e8,\n info:\n \"A brain implant carefully assembled around the synapses, which \" +\n \"micromanages the activity and levels of various neuroreceptor \" +\n \"chemicals and modulates electrical activity to optimize concentration, \" +\n \"allowing the user to multitask much more effectively.\",\n stats: (\n <>\n This augmentation removes the penalty for not focusing on actions such as working in a job or working for a\n faction.\n \n ),\n factions: [FactionNames.TianDiHui],\n }),\n];\n\nexport const bladeburnerAugmentations = [\n new Augmentation({\n name: AugmentationNames.EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info:\n \"Ballistic-grade protective and retractable eyewear that was designed specifically \" +\n \"for Bladeburner units. This \" +\n \"is implanted by installing a mechanical frame in the skull's orbit. \" +\n \"This frame interfaces with the brain and allows the user to \" +\n \"automatically extrude and extract the eyewear. The eyewear protects \" +\n \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" +\n \"embedded with a data processing chip that can be programmed to display an \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info:\n \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" +\n \"technique was originally used on Bladeburners during the Synthoid uprising \" +\n \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info:\n \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" +\n \"the ORION-MKIV shoulder enhances the strength and dexterity \" +\n \"of the user's right arm. It also provides protection due to its \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" +\n \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" +\n \"be used against augmented enemies as the ionized \" +\n \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" +\n \"it can also be effective against non-augmented enemies due to its high temperature \" +\n \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. This augmentation \" +\n \"is more advanced and powerful than the original V1 model. This V2 model is \" +\n \"more power-efficient, more accurate, and can fire plasma bolts at a much \" +\n \"higher velocity than the V1 model.\",\n prereqs: [AugmentationNames.HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info:\n \"A serum that permanently enhances many aspects of human capabilities, \" +\n \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" +\n \"serum was originally developed by the Chinese military in an attempt to \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info:\n \"An improved version of Vangelis, a synthetic symbiotic virus that is \" +\n \"injected into human brain tissue. On top of the benefits of the original \" +\n \"virus, this also grants an accelerated healing factor and enhanced \" +\n \"reflexes.\",\n prereqs: [AugmentationNames.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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"The DNA is genetically modified to enhance the human's body \" +\n \"extracellular matrix (ECM). This improves the ECM's ability to \" +\n \"structurally support the body and grants heightened strength and \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info:\n `A cybernetic foot augmentation that was specifically created for ${FactionNames.Bladeburners} ` +\n \"during the Synthoid Uprising. The organic musculature of the human foot \" +\n \"is enhanced with flexible carbon nanotube matrices that are controlled by \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info:\n `A powered exoskeleton suit designed as armor for ${FactionNames.Bladeburners} units. This ` +\n \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" +\n \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" +\n \"more efficiently storing and using power.\",\n prereqs: [AugmentationNames.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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" +\n \"that is capable of projecting an energy shielding force field.\",\n prereqs: [AugmentationNames.BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" +\n \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" +\n \"threats while keeping casualties to a minimum.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" +\n \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" +\n \"modules that combine together to form a single, more powerful beam of up to \" +\n \"2000MW.\",\n prereqs: [AugmentationNames.BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" +\n \"Unit that was specially designed to analyze Synthoid related data and \" +\n \"information.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info:\n \"A highly-advanced matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation allows \" +\n \"the user to project and control a holographic simulacrum within an \" +\n \"extremely large radius. These specially-modified holograms were specifically \" +\n \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: (\n <>\n This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting\n crimes, etc.) at the same time.\n \n ),\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n];\n\nexport const churchOfTheMachineGodAugmentations = [\n new Augmentation({\n name: AugmentationNames.StaneksGift1,\n repCost: 0,\n moneyCost: 0,\n info:\n 'Allison \"Mother\" Stanek imparts you with her gift. An ' +\n \"experimental Augmentation implanted at the base of the neck. \" +\n \"It allows you to overclock your entire system by carefully \" +\n \"changing the configuration.\",\n isSpecial: true,\n hacking_chance_mult: 0.9,\n hacking_speed_mult: 0.9,\n hacking_money_mult: 0.9,\n hacking_grow_mult: 0.9,\n hacking_mult: 0.9,\n strength_mult: 0.9,\n defense_mult: 0.9,\n dexterity_mult: 0.9,\n agility_mult: 0.9,\n charisma_mult: 0.9,\n hacking_exp_mult: 0.9,\n strength_exp_mult: 0.9,\n defense_exp_mult: 0.9,\n dexterity_exp_mult: 0.9,\n agility_exp_mult: 0.9,\n charisma_exp_mult: 0.9,\n company_rep_mult: 0.9,\n faction_rep_mult: 0.9,\n crime_money_mult: 0.9,\n crime_success_mult: 0.9,\n hacknet_node_money_mult: 0.9,\n hacknet_node_purchase_cost_mult: 1.1,\n hacknet_node_ram_cost_mult: 1.1,\n hacknet_node_core_cost_mult: 1.1,\n hacknet_node_level_cost_mult: 1.1,\n work_money_mult: 0.9,\n stats: <>Its unstable nature decreases all your stats by 10%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift2,\n repCost: 1e6,\n moneyCost: 0,\n info:\n \"The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human \" +\n \"organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon \" +\n \"your frame granting lesser penalty of 5% to all stats.\",\n prereqs: [AugmentationNames.StaneksGift1],\n isSpecial: true,\n hacking_chance_mult: 0.95 / 0.9,\n hacking_speed_mult: 0.95 / 0.9,\n hacking_money_mult: 0.95 / 0.9,\n hacking_grow_mult: 0.95 / 0.9,\n hacking_mult: 0.95 / 0.9,\n strength_mult: 0.95 / 0.9,\n defense_mult: 0.95 / 0.9,\n dexterity_mult: 0.95 / 0.9,\n agility_mult: 0.95 / 0.9,\n charisma_mult: 0.95 / 0.9,\n hacking_exp_mult: 0.95 / 0.9,\n strength_exp_mult: 0.95 / 0.9,\n defense_exp_mult: 0.95 / 0.9,\n dexterity_exp_mult: 0.95 / 0.9,\n agility_exp_mult: 0.95 / 0.9,\n charisma_exp_mult: 0.95 / 0.9,\n company_rep_mult: 0.95 / 0.9,\n faction_rep_mult: 0.95 / 0.9,\n crime_money_mult: 0.95 / 0.9,\n crime_success_mult: 0.95 / 0.9,\n hacknet_node_money_mult: 0.95 / 0.9,\n hacknet_node_purchase_cost_mult: 1.05 / 1.1,\n hacknet_node_ram_cost_mult: 1.05 / 1.1,\n hacknet_node_core_cost_mult: 1.05 / 1.1,\n hacknet_node_level_cost_mult: 1.05 / 1.1,\n work_money_mult: 0.95 / 0.9,\n stats: <>The penalty for the gift is reduced to 5%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift3,\n repCost: 1e8,\n moneyCost: 0,\n info:\n \"The synthesis of human and machine is nothing to fear. It is our destiny. \" +\n \"You will become greater than the sum of our parts. As One. Embrace your gift \" +\n \"fully and wholly free of it's accursed toll. Serenity brings tranquility the form \" +\n \"of no longer suffering a stat penalty. \",\n prereqs: [AugmentationNames.StaneksGift2],\n isSpecial: true,\n hacking_chance_mult: 1 / 0.95,\n hacking_speed_mult: 1 / 0.95,\n hacking_money_mult: 1 / 0.95,\n hacking_grow_mult: 1 / 0.95,\n hacking_mult: 1 / 0.95,\n strength_mult: 1 / 0.95,\n defense_mult: 1 / 0.95,\n dexterity_mult: 1 / 0.95,\n agility_mult: 1 / 0.95,\n charisma_mult: 1 / 0.95,\n hacking_exp_mult: 1 / 0.95,\n strength_exp_mult: 1 / 0.95,\n defense_exp_mult: 1 / 0.95,\n dexterity_exp_mult: 1 / 0.95,\n agility_exp_mult: 1 / 0.95,\n charisma_exp_mult: 1 / 0.95,\n company_rep_mult: 1 / 0.95,\n faction_rep_mult: 1 / 0.95,\n crime_money_mult: 1 / 0.95,\n crime_success_mult: 1 / 0.95,\n hacknet_node_money_mult: 1 / 0.95,\n hacknet_node_purchase_cost_mult: 1 / 1.05,\n hacknet_node_ram_cost_mult: 1 / 1.05,\n hacknet_node_core_cost_mult: 1 / 1.05,\n hacknet_node_level_cost_mult: 1 / 1.05,\n work_money_mult: 1 / 0.95,\n stats: <>Stanek's Gift has no penalty.,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n];\n\nexport function initNeuroFluxGovernor(): Augmentation {\n return new Augmentation({\n name: AugmentationNames.NeuroFluxGovernor,\n repCost: 500,\n moneyCost: 750e3,\n info:\n \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" +\n \"monitors and regulates nervous impulses coming to and from the spinal column, \" +\n \"essentially 'governing' the body. By doing so, it improves the functionality of the \" +\n \"body's nervous system.\",\n stats: (\n <>\n This special augmentation can be leveled up infinitely. Each level of this augmentation increases MOST\n multipliers by 1%, stacking multiplicatively.\n \n ),\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 factions: Object.values(FactionNames),\n });\n}\n\nexport function initUnstableCircadianModulator(): Augmentation {\n //Time-Based Augment Test\n const randomBonuses = getRandomBonus();\n\n const UnstableCircadianModulatorParams: IConstructorParams = {\n name: AugmentationNames.UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info:\n \"An experimental nanobot injection. Its unstable nature leads to \" +\n \"unpredictable results based on your circadian rhythm.\",\n factions: [FactionNames.SpeakersForTheDead],\n };\n Object.keys(randomBonuses.bonuses).forEach(\n (key) => ((UnstableCircadianModulatorParams as any)[key] = randomBonuses.bonuses[key]),\n );\n\n return new Augmentation(UnstableCircadianModulatorParams);\n}\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 */\nimport * as walk from \"acorn-walk\";\nimport acorn, { parse } from \"acorn\";\n\nimport { RamCalculationErrorCode } from \"./RamCalculationErrorCodes\";\n\nimport { RamCosts, RamCostConstants } from \"../Netscript/RamCostGenerator\";\nimport { Script } from \"./Script\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { areImportsEquals } from \"../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport interface RamUsageEntry {\n type: 'ns' | 'dom' | 'fn' | 'misc';\n name: string;\n cost: number;\n}\n\nexport interface RamCalculation {\n cost: number;\n entries?: RamUsageEntry[];\n}\n\n// These special strings are used to reference the presence of a given logical\n// construct within a user script.\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\";\n\n// The global scope of a script is registered under this key during parsing.\nconst memCheckGlobalKey = \".__GLOBAL__\";\n\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 */\nasync function parseOnlyRamCalculate(\n player: IPlayer,\n otherScripts: Script[],\n code: string,\n workerScript: WorkerScript,\n): Promise {\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: { [key: string]: string[] } = {};\n\n // Scripts we've parsed.\n const completedParses = new Set();\n\n // Scripts we've discovered that need to be parsed.\n const parseQueue: string[] = [];\n\n // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n function parseCode(code: string, moduleName: string): void {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName);\n\n // Add any additional modules to the parse queue;\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 }\n\n // Splice all the references in\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n }\n\n // Parse the initial module, which is the \"main\" script that is being run\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule);\n\n // Process additional modules, which occurs if the \"main\" script has any imports\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift();\n if (nextModule === undefined) throw new Error(\"nextModule should not be undefined\");\n\n // 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 let code;\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 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 { cost: RamCalculationErrorCode.URLImportError };\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return { cost: RamCalculationErrorCode.ImportError };\n }\n\n let script = null;\n const fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n for (const s of otherScripts) {\n if (areImportsEquals(s.filename, fn)) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return { cost: RamCalculationErrorCode.ImportError }; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n }\n\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 let ram = RamCostConstants.ScriptBaseRamCost;\n const detailedCosts: RamUsageEntry[] = [{ type: 'misc', name: 'baseCost', cost: RamCostConstants.ScriptBaseRamCost}];\n const unresolvedRefs = Object.keys(dependencyMap).filter((s) => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift();\n if (ref === undefined) throw new Error(\"ref should not be undefined\");\n\n // Check if this is one of the special keys, and add the appropriate ram cost if so.\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += RamCostConstants.ScriptHacknetNodesRamCost;\n detailedCosts.push({ type: 'ns', name: 'hacknet', cost: RamCostConstants.ScriptHacknetNodesRamCost});\n }\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: 'dom', name: 'document', cost: RamCostConstants.ScriptDomRamCost});\n }\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: 'dom', name: 'window', cost: RamCostConstants.ScriptDomRamCost});\n }\n if (ref === \"corporation\" && !resolvedRefs.has(\"corporation\")) {\n ram += RamCostConstants.ScriptCorporationRamCost;\n detailedCosts.push({ type: 'ns', name: 'corporation', cost: RamCostConstants.ScriptCorporationRamCost});\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 for (const ident of Object.keys(dependencyMap).filter((k) => k.startsWith(prefix))) {\n for (const 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 (const dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\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 try {\n function applyFuncRam(cost: any): number {\n if (typeof cost === \"number\") {\n return cost;\n } else if (typeof cost === \"function\") {\n return cost(player);\n } else {\n return 0;\n }\n }\n\n // Only count each function once\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n }\n\n // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n let func;\n let refDetail = 'n/a';\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n refDetail = `bladeburner.${ref}`;\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n refDetail = `codingcontract.${ref}`;\n } else if (ref in workerScript.env.vars.stanek) {\n func = workerScript.env.vars.stanek[ref];\n refDetail = `stanek.${ref}`;\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n refDetail = `gang.${ref}`;\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n refDetail = `sleeve.${ref}`;\n } else if (ref in workerScript.env.vars.stock) {\n func = workerScript.env.vars.stock[ref];\n refDetail = `stock.${ref}`;\n } else if (ref in workerScript.env.vars.ui) {\n func = workerScript.env.vars.ui[ref];\n refDetail = `ui.${ref}`;\n } else if (ref in workerScript.env.vars.grafting) {\n func = workerScript.env.vars.grafting[ref];\n refDetail = `grafting.${ref}`;\n } else {\n func = workerScript.env.vars[ref];\n refDetail = `${ref}`;\n }\n const fnRam = applyFuncRam(func);\n ram += fnRam;\n detailedCosts.push({ type: 'fn', name: refDetail, cost: fnRam});\n } catch (error) {\n continue;\n }\n }\n return { cost: ram, entries: detailedCosts.filter(e => e.cost > 0) };\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 { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n\nexport function checkInfiniteLoop(code: string): number {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n\n function nodeHasTrueTest(node: acorn.Node): boolean {\n return node.type === \"Literal\" && (node as any).raw === \"true\";\n }\n\n function hasAwait(ast: acorn.Node): boolean {\n let hasAwait = false;\n walk.recursive(\n ast,\n {},\n {\n AwaitExpression: () => {\n hasAwait = true;\n },\n },\n );\n return hasAwait;\n }\n\n let missingAwaitLine = -1;\n walk.recursive(\n ast,\n {},\n {\n WhileStatement: (node: acorn.Node, st: any, walkDeeper: walk.WalkerCallback) => {\n if (nodeHasTrueTest((node as any).test) && !hasAwait(node)) {\n missingAwaitLine = (code.slice(0, node.start).match(/\\n/g) || []).length + 1;\n } else {\n (node as any).body && walkDeeper((node as any).body, st);\n }\n },\n },\n );\n\n return missingAwaitLine;\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 */\nfunction parseOnlyCalculateDeps(code: string, currentModule: string): any {\n const ast = parse(code, { sourceType: \"module\", 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 const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap: { [key: string]: Set | undefined } = {};\n dependencyMap[globalKey] = new Set();\n\n // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n const internalToExternal: { [key: string]: string | undefined } = {};\n\n const additionalModules: string[] = [];\n\n // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n function addRef(key: string, name: string): void {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n const external = internalToExternal[name];\n if (external !== undefined) {\n s.add(external);\n }\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n }\n\n //A list of identifiers that resolve to \"native Javascript code\"\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype);\n\n // 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 function commonVisitors(): any {\n return {\n Identifier: (node: any, st: any) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n addRef(st.key, node.name);\n },\n WhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node: any, st: any, walkDeeper: any) => {\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: any, st: any, walkDeeper: any) => {\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: any, st: any, walkDeeper: any) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n },\n };\n }\n\n walk.recursive(\n ast,\n { key: globalKey },\n Object.assign(\n {\n ImportDeclaration: (node: any, st: any) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName);\n\n // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\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 const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: (node: any) => {\n // node.id will be null when using 'export default'. Add a module name indicating the default export.\n const key = currentModule + \".\" + (node.id === null ? \"__SPECIAL_DEFAULT_EXPORT__\" : node.id.name);\n walk.recursive(node, { key: key }, commonVisitors());\n },\n },\n commonVisitors(),\n ),\n );\n\n return { dependencyMap: dependencyMap, 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 */\nexport async function calculateRamUsage(\n player: IPlayer,\n codeCopy: string,\n otherScripts: Script[],\n): Promise {\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: RamCosts,\n },\n } as WorkerScript;\n\n try {\n return await parseOnlyRamCalculate(player, otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n","/**\n * Rounds a number to two decimal places.\n * @param decimal A decimal value to trim to two places.\n */\nexport function roundToTwo(decimal: number): number {\n const leftShift: number = Math.round(parseFloat(`${decimal}e+2`));\n\n return +`${leftShift}e-2`;\n}\n","/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\n\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangConstants } from \"./data/Constants\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { IAscensionResult } from \"./IAscensionResult\";\n\nimport { AllGangs } from \"./AllGangs\";\nimport { GangMember } from \"./GangMember\";\n\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { PowerMultiplier } from \"./data/power\";\nimport { IGang } from \"./IGang\";\n\nexport class Gang implements IGang {\n facName: string;\n members: GangMember[];\n wanted: number;\n respect: number;\n\n isHackingGang: boolean;\n\n respectGainRate: number;\n wantedGainRate: number;\n moneyGainRate: number;\n\n storedCycles: number;\n\n storedTerritoryAndPowerCycles: number;\n\n territoryClashChance: number;\n territoryWarfareEngaged: boolean;\n\n notifyMemberDeath: boolean;\n\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n\n this.isHackingGang = hacking;\n\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0;\n\n // 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 this.storedCycles = 0;\n\n // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n this.storedTerritoryAndPowerCycles = 0;\n\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n\n this.notifyMemberDeath = true;\n }\n\n getPower(): number {\n return AllGangs[this.facName].power;\n }\n\n getTerritory(): number {\n return AllGangs[this.facName].territory;\n }\n\n process(numCycles = 1, player: IPlayer): void {\n const CyclesPerSecond = 1000 / CONSTANTS._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n this.storedCycles += numCycles;\n\n // Only process if there are at least 2 seconds, and at most 5 seconds\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: any) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player: IPlayer): void {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\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 this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain;\n // Faction reputation gains is respect gain divided by some constant\n const fac = Factions[this.facName];\n if (!(fac instanceof Faction)) {\n dialogBoxCreate(\n \"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\",\n );\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n const favorMult = 1 + fac.favor / 100;\n\n fac.playerReputation += (player.faction_rep_mult * gain * favorMult) / GangConstants.GangRespectToReputationRatio;\n\n // Keep track of respect gained per member\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\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 if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n player.gainMoney(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1): void {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < GangConstants.CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= GangConstants.CyclesPerTerritoryAndPowerUpdate;\n\n // Process power first\n const gangName = this.facName;\n for (const name of Object.keys(AllGangs)) {\n if (AllGangs.hasOwnProperty(name)) {\n if (name == gangName) {\n AllGangs[name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\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[name].power * 0.005;\n AllGangs[name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const powerMult = PowerMultiplier[name];\n if (powerMult === undefined) throw new Error(\"Should not be undefined\");\n const additiveGain = 0.75 * gainRoll * AllGangs[name].territory * powerMult;\n AllGangs[name].power += additiveGain;\n }\n }\n }\n }\n\n // Determine if territory should be processed\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 }\n\n // Then process territory\n const gangs = GangConstants.Names.filter((g) => AllGangs[g].territory > 0 || g === gangName);\n if (gangs.length > 1) {\n for (let i = 0; i < gangs.length; ++i) {\n const others = gangs.filter((e) => {\n return e !== gangs[i];\n });\n const other = getRandomInt(0, others.length - 1);\n\n const thisGang = gangs[i];\n const otherGang = others[other];\n\n // 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 if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = AllGangs[thisGang].power;\n const otherPwr = AllGangs[otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang: string, loseGang: string): number {\n const powerBonus = Math.max(\n 1,\n 1 + Math.log(AllGangs[winGang].power / AllGangs[loseGang].power) / Math.log(50),\n );\n const gains = Math.min(AllGangs[loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (AllGangs[otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n AllGangs[thisGang].territory += territoryGain;\n if (AllGangs[thisGang].territory > 0.999) AllGangs[thisGang].territory = 1;\n AllGangs[otherGang].territory -= territoryGain;\n if (thisGang === gangName) {\n this.clash(true); // Player won\n AllGangs[otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n AllGangs[otherGang].power *= 1 / 1.01;\n }\n } else {\n if (AllGangs[thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n AllGangs[thisGang].territory -= territoryGain;\n if (AllGangs[otherGang].territory < 0.001) AllGangs[otherGang].territory = 0;\n AllGangs[otherGang].territory += territoryGain;\n if (AllGangs[otherGang].territory > 0.999) AllGangs[otherGang].territory = 1;\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n AllGangs[thisGang].power *= 1 / 1.01;\n } else {\n AllGangs[thisGang].power *= 1 / 1.01;\n }\n }\n }\n }\n }\n\n processExperienceGains(numCycles = 1): void {\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): void {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2;\n // If the clash was lost, the player loses a small percentage of power\n else AllGangs[this.facName].power *= 1 / 1.008;\n\n // Deaths can only occur during X% of clashes\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];\n\n // Only members assigned to Territory Warfare can die\n if (member.task !== \"Territory Warfare\") continue;\n\n // Chance to die is decreased based on defense\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember(): boolean {\n if (this.members.length >= GangConstants.MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember(): number {\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\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name: string): boolean {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false;\n\n // Check for already-existing names\n const sameNames = this.members.filter((m) => m.name === name);\n if (sameNames.length >= 1) return false;\n\n const member = new GangMember(name);\n this.members.push(member);\n return true;\n }\n\n // Money and Respect gains multiplied by this number (< 1)\n getWantedPenalty(): number {\n return this.respect / (this.respect + this.wanted);\n }\n\n //Calculates power GAIN, which is added onto the Gang's existing power\n calculatePower(): number {\n let memberTotal = 0;\n for (let i = 0; i < this.members.length; ++i) {\n if (!GangMemberTasks.hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\")\n continue;\n memberTotal += this.members[i].calculatePower();\n }\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member: GangMember): void {\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 }\n\n // Notify of death\n if (this.notifyMemberDeath) {\n dialogBoxCreate(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member: GangMember, workerScript?: WorkerScript): IAscensionResult {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n if (workerScript) {\n workerScript.log(\"gang.ascendMember\", () => `Ascended Gang member ${member.name}`);\n }\n return res;\n } catch (e: any) {\n if (workerScript == null) {\n exceptionAlert(e);\n }\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n }\n\n // Cost of upgrade gets cheaper as gang increases in respect + power\n getDiscount(): number {\n const power = this.getPower();\n const respect = this.respect;\n\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount =\n Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n }\n\n // Returns only valid tasks for this gang. Excludes 'Unassigned'\n getAllTaskNames(): string[] {\n return Object.keys(GangMemberTasks).filter((taskName: string) => {\n const task = GangMemberTasks[taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false;\n // yes you need both checks\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg: GangMemberUpgrade | null): number {\n if (upg == null) {\n return Infinity;\n }\n return upg.cost / this.getDiscount();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Gang\", this);\n }\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 static fromJSON(value: any): Gang {\n return Generic_fromJSON(Gang, value.data);\n }\n}\n\nReviver.constructors.Gang = Gang;\n","import { workerScripts } from \"./WorkerScripts\";\n\nlet pidCounter = 1;\n\n/**\n * Find and return the next availble PID for a script\n */\nexport function generateNextPid(): number {\n let tempCounter = pidCounter;\n\n // 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 let found = false;\n for (let i = 0; i < 1e6; ) {\n if (!workerScripts.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 if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\n\nexport function resetPidCounter(): void {\n pidCounter = 1;\n}\n","import { vsprintf, sprintf } from \"sprintf-js\";\n\nimport { getRamCost } from \"./Netscript/RamCostGenerator\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\n\nimport { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\n\nimport { CONSTANTS } from \"./Constants\";\n\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"./Hacking\";\n\nimport { netscriptCanGrow, netscriptCanHack, netscriptCanWeaken } from \"./Hacking/netscriptCanHack\";\n\nimport { HacknetServer } from \"./Hacknet/HacknetServer\";\n\nimport { Terminal } from \"./Terminal\";\n\nimport { Player } from \"./Player\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Script } from \"./Script/Script\";\nimport { findRunningScript, findRunningScriptByPid } from \"./Script/ScriptHelpers\";\nimport { isScriptFilename } from \"./Script/isScriptFilename\";\nimport { PromptEvent } from \"./ui/React/PromptManager\";\n\nimport { GetServer, GetAllServers, DeleteServer, AddToAllServers, createUniqueRandomIp } from \"./Server/AllServers\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport {\n getServerOnNetwork,\n numCycleForGrowth,\n processSingleServerGrowth,\n safetlyCreateUniqueServer,\n} from \"./Server/ServerHelpers\";\nimport { getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam } from \"./Server/ServerPurchases\";\nimport { Server } from \"./Server/Server\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { influenceStockThroughServerHack, influenceStockThroughServerGrow } from \"./StockMarket/PlayerInfluencing\";\n\nimport { isValidFilePath, removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { TextFile, getTextFile, createTextFile } from \"./TextFile\";\n\nimport { NetscriptPorts, runScriptFromScript } from \"./NetscriptWorker\";\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { makeRuntimeRejectMsg, netscriptDelay, resolveNetscriptRequestedThreads } from \"./NetscriptEvaluator\";\n\nimport { numeralWrapper } from \"./ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\n\nimport { LogBoxEvents } from \"./ui/React/LogBoxManager\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { isString } from \"./utils/helpers/isString\";\n\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { NetscriptGang } from \"./NetscriptFunctions/Gang\";\nimport { NetscriptSleeve } from \"./NetscriptFunctions/Sleeve\";\nimport { NetscriptExtra } from \"./NetscriptFunctions/Extra\";\nimport { NetscriptHacknet } from \"./NetscriptFunctions/Hacknet\";\nimport { NetscriptStanek } from \"./NetscriptFunctions/Stanek\";\nimport { NetscriptUserInterface } from \"./NetscriptFunctions/UserInterface\";\nimport { NetscriptBladeburner } from \"./NetscriptFunctions/Bladeburner\";\nimport { NetscriptCodingContract } from \"./NetscriptFunctions/CodingContract\";\nimport { NetscriptCorporation } from \"./NetscriptFunctions/Corporation\";\nimport { NetscriptFormulas } from \"./NetscriptFunctions/Formulas\";\nimport { NetscriptStockMarket } from \"./NetscriptFunctions/StockMarket\";\nimport { NetscriptGrafting } from \"./NetscriptFunctions/Grafting\";\nimport { IPort } from \"./NetscriptPort\";\n\nimport {\n NS as INS,\n Player as INetscriptPlayer,\n Gang as IGang,\n Bladeburner as IBladeburner,\n Stanek as IStanek,\n SourceFileLvl,\n BasicHGWOptions,\n ProcessInfo,\n HackingMultipliers,\n HacknetMultipliers,\n BitNodeMultipliers as IBNMults,\n Server as IServerDef,\n RunningScript as IRunningScriptDef,\n} from \"./ScriptEditor/NetscriptDefinitions\";\nimport { NetscriptSingularity } from \"./NetscriptFunctions/Singularity\";\n\nimport { toNative } from \"./NetscriptFunctions/toNative\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nimport { Flags } from \"./NetscriptFunctions/Flags\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { CalculateShareMult, StartSharing } from \"./NetworkShare/Share\";\nimport { CityName } from \"./Locations/data/CityNames\";\n\ninterface NS extends INS {\n [key: string]: any;\n gang: IGang;\n bladeburner: IBladeburner;\n stanek: IStanek;\n}\n\nexport function NetscriptFunctions(workerScript: WorkerScript): NS {\n const updateDynamicRam = function (fnName: string, ramCost: number): void {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n workerScript.dynamicLoadedFns[fnName] = true;\n\n let threads = workerScript.scriptRef.threads;\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.hostname}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost;\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `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 Threads: ${threads}\n Dynamic RAM Usage: ${numeralWrapper.formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${numeralWrapper.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 myScan = eval('ns.scan');\n\n * Using map access to do the same\n   const myScan = ns['scan'];\n\n Sorry :(`,\n );\n }\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} hostname - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {BaseServer} The specified server as a BaseServer\n */\n const safeGetServer = function (hostname: string, callingFnName: string): BaseServer {\n const server = GetServer(hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid hostname: ${hostname}`);\n }\n return server;\n };\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} hostname - 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 const getRunningScript = function (\n fn: string,\n hostname: string,\n callingFnName: string,\n scriptArgs: any,\n ): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` +\n `This is probably a bug. Please report to game developer`,\n );\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (hostname == null) {\n hostname = workerScript.hostname;\n }\n const server = safeGetServer(hostname, callingFnName);\n\n return findRunningScript(fn, scriptArgs, server);\n }\n\n // If no arguments are specified, return the current RunningScript\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid: number, callingFnName: string): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const server of GetAllServers()) {\n const runningScript = findRunningScriptByPid(pid, server);\n if (runningScript) return runningScript;\n }\n return null;\n };\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} hostname - 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 const getCannotFindRunningScriptErrorMessage = function (fn: string, hostname: string, scriptArgs: any): string {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${hostname} with args: ${arrayToString(scriptArgs)}`;\n };\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 const failOnHacknetServer = function (server: BaseServer, callingFn = \"\"): boolean {\n if (server instanceof HacknetServer) {\n workerScript.log(callingFn, () => `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n };\n\n const makeRuntimeErrorMsg = function (caller: string, msg: string): string {\n const errstack = new Error().stack;\n if (errstack === undefined) throw new Error(\"how did we not throw an error?\");\n const stack = errstack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n for (const stackline of stack) {\n let filename;\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n if (!filename) continue;\n\n interface ILine {\n line: string;\n func: string;\n }\n\n function parseChromeStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n if (lineMatch && funcMatch) {\n return { line: lineMatch[1], func: funcMatch[1] };\n }\n return null;\n }\n let call = { line: \"-1\", func: \"unknown\" };\n const chromeCall = parseChromeStackline(stackline);\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return { line: lineMatch[1], func: line.slice(0, lio) };\n }\n return null;\n }\n\n const firefoxCall = parseFirefoxStackline(stackline);\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 makeRuntimeRejectMsg(workerScript, rejectMsg);\n };\n\n const checkSingularityAccess = function (func: string): void {\n if (Player.bitNodeN !== 4) {\n if (Player.sourceFileLvl(4) === 0) {\n throw makeRuntimeErrorMsg(\n func,\n `This singularity function requires Source-File 4 to run. A power up you obtain later in the game. It will be very obvious when and how you can obtain it.`,\n );\n }\n }\n };\n\n const hack = function (\n hostname: string,\n manual: boolean,\n { threads: requestedThreads, stock }: any = {},\n ): Promise {\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n const threads = resolveNetscriptRequestedThreads(workerScript, \"hack\", requestedThreads);\n const server = safeGetServer(hostname, \"hack\");\n if (!(server instanceof Server)) {\n throw makeRuntimeErrorMsg(\"hack\", \"Cannot be executed on this server.\");\n }\n\n // Calculate the hacking time\n const hackingTime = calculateHackingTime(server, Player); // This is in seconds\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, Player);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg || \"\");\n }\n\n workerScript.log(\n \"hack\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n hackingTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n\n return netscriptDelay(hackingTime * 1000, workerScript).then(function () {\n const hackChance = calculateHackingChance(server, Player);\n const rand = Math.random();\n let expGainedOnSuccess = calculateHackingExpGain(server, Player) * threads;\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n let maxThreadNeeded = Math.ceil(1 / percentHacked);\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;\n\n // Over-the-top safety checks\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n server.moneyAvailable -= moneyDrained;\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * BitNodeMultipliers.ScriptHackMoneyGain;\n\n Player.gainMoney(moneyGained, \"hacking\");\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n Player.scriptProdSinceLastAug += moneyGained;\n workerScript.scriptRef.recordHack(server.hostname, moneyGained, threads);\n Player.gainHackingExp(expGainedOnSuccess);\n if (manual) Player.gainIntelligenceExp(0.005);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\n \"hack\",\n () =>\n `Successfully hacked '${server.hostname}' for ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n server.fortify(CONSTANTS.ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n if (stock) {\n influenceStockThroughServerHack(server, moneyDrained);\n }\n if (manual) {\n server.backdoorInstalled = true;\n }\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n Player.gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\n \"hack\",\n () =>\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(\n expGainedOnFailure,\n )} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args: any[]): string {\n let out = \"\";\n for (let arg of args) {\n arg = toNative(arg);\n out += typeof arg === \"object\" ? JSON.stringify(arg) : `${arg}`;\n }\n\n return out;\n };\n\n const helper = {\n updateDynamicRam: updateDynamicRam,\n makeRuntimeErrorMsg: makeRuntimeErrorMsg,\n string: (funcName: string, argName: string, v: unknown): string => {\n if (typeof v === \"string\") return v;\n if (typeof v === \"number\") return v + \"\"; // cast to string;\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a string.`);\n },\n number: (funcName: string, argName: string, v: unknown): number => {\n if (typeof v === \"string\") {\n const x = parseFloat(v);\n if (!isNaN(x)) return x; // otherwise it wasn't even a string representing a number.\n } else if (typeof v === \"number\") {\n if (isNaN(v)) throw makeRuntimeErrorMsg(funcName, `${argName} is NaN.`);\n return v;\n }\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a number.`);\n },\n boolean: (v: unknown): boolean => {\n return !!v; // Just convert it to boolean.\n },\n city: (funcName: string, argName: string, v: unknown): CityName => {\n if (typeof v !== \"string\") throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n const s = v as CityName;\n if (!Object.values(CityName).includes(s))\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n return s;\n },\n getServer: safeGetServer,\n checkSingularityAccess: checkSingularityAccess,\n hack: hack,\n getValidPort: (funcName: string, port: number): IPort => {\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Invalid argument. Must be a port number between 1 and ${CONSTANTS.NumNetscriptPorts}, is ${port}`,\n );\n }\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Trying to use an invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(funcName, `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport;\n },\n };\n\n const gang = NetscriptGang(Player, workerScript, helper);\n const sleeve = NetscriptSleeve(Player, workerScript, helper);\n const extra = NetscriptExtra(Player, workerScript, helper);\n const hacknet = NetscriptHacknet(Player, workerScript, helper);\n const stanek = NetscriptStanek(Player, workerScript, helper);\n const bladeburner = NetscriptBladeburner(Player, workerScript, helper);\n const codingcontract = NetscriptCodingContract(Player, workerScript, helper);\n const corporation = NetscriptCorporation(Player, workerScript, helper);\n const formulas = NetscriptFormulas(Player, workerScript, helper);\n const singularity = NetscriptSingularity(Player, workerScript, helper);\n const stockmarket = NetscriptStockMarket(Player, workerScript, helper);\n const ui = NetscriptUserInterface(Player, workerScript, helper);\n const grafting = NetscriptGrafting(Player, workerScript, helper);\n\n const base: INS = {\n ...singularity,\n\n singularity: singularity,\n gang: gang,\n bladeburner: bladeburner,\n codingcontract: codingcontract,\n sleeve: sleeve,\n corporation: corporation,\n stanek: stanek,\n ui: ui,\n formulas: formulas,\n stock: stockmarket,\n grafting: grafting,\n args: workerScript.args,\n hacknet: hacknet,\n sprintf: sprintf,\n vsprintf: vsprintf,\n scan: function (_hostname: unknown = workerScript.hostname): string[] {\n const hostname = helper.string(\"scan\", \"hostname\", _hostname);\n updateDynamicRam(\"scan\", getRamCost(Player, \"scan\"));\n const server = safeGetServer(hostname, \"scan\");\n const out = [];\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const s = getServerOnNetwork(server, i);\n if (s === null) continue;\n const entry = s.hostname;\n if (entry === null) continue;\n out.push(entry);\n }\n workerScript.log(\"scan\", () => `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (_hostname: unknown, { threads: requestedThreads, stock }: BasicHGWOptions = {}): Promise {\n const hostname = helper.string(\"hack\", \"hostname\", _hostname);\n updateDynamicRam(\"hack\", getRamCost(Player, \"hack\"));\n return hack(hostname, false, { threads: requestedThreads, stock: stock });\n },\n hackAnalyzeThreads: function (_hostname: unknown, _hackAmount: unknown): number {\n const hostname = helper.string(\"hackAnalyzeThreads\", \"hostname\", _hostname);\n const hackAmount = helper.number(\"hackAnalyzeThreads\", \"hackAmount\", _hackAmount);\n updateDynamicRam(\"hackAnalyzeThreads\", getRamCost(Player, \"hackAnalyzeThreads\"));\n\n // Check argument validity\n const server = safeGetServer(hostname, \"hackAnalyzeThreads\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeThreads\", () => \"Cannot be executed on this server.\");\n return -1;\n }\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(\n \"hackAnalyzeThreads\",\n `Invalid hackAmount argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`,\n );\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n } else if (hackAmount === 0) {\n return 0;\n }\n\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n\n if (percentHacked === 0 || server.moneyAvailable === 0) {\n return 0; // To prevent returning infinity below\n }\n\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyze: function (_hostname: unknown): number {\n const hostname = helper.string(\"hackAnalyze\", \"hostname\", _hostname);\n updateDynamicRam(\"hackAnalyze\", getRamCost(Player, \"hackAnalyze\"));\n\n const server = safeGetServer(hostname, \"hackAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyze\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculatePercentMoneyHacked(server, Player);\n },\n hackAnalyzeSecurity: function (_threads: unknown): number {\n const threads = helper.number(\"hackAnalyzeSecurity\", \"threads\", _threads);\n updateDynamicRam(\"hackAnalyzeSecurity\", getRamCost(Player, \"hackAnalyzeSecurity\"));\n return CONSTANTS.ServerFortifyAmount * threads;\n },\n hackAnalyzeChance: function (_hostname: unknown): number {\n const hostname = helper.string(\"hackAnalyzeChance\", \"hostname\", _hostname);\n updateDynamicRam(\"hackAnalyzeChance\", getRamCost(Player, \"hackAnalyzeChance\"));\n\n const server = safeGetServer(hostname, \"hackAnalyzeChance\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeChance\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculateHackingChance(server, Player);\n },\n sleep: async function (_time: unknown = 0): Promise {\n const time = helper.number(\"sleep\", \"time\", _time);\n updateDynamicRam(\"sleep\", getRamCost(Player, \"sleep\"));\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"sleep\", () => `Sleeping for ${time} milliseconds`);\n return netscriptDelay(time, workerScript).then(function () {\n return Promise.resolve();\n });\n },\n asleep: function (_time: unknown = 0): Promise {\n const time = helper.number(\"asleep\", \"time\", _time);\n updateDynamicRam(\"asleep\", getRamCost(Player, \"asleep\"));\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"asleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"asleep\", () => `Sleeping for ${time} milliseconds`);\n return new Promise((resolve) => setTimeout(resolve, time));\n },\n grow: async function (\n _hostname: unknown,\n { threads: requestedThreads, stock }: BasicHGWOptions = {},\n ): Promise {\n const hostname = helper.string(\"grow\", \"hostname\", _hostname);\n updateDynamicRam(\"grow\", getRamCost(Player, \"grow\"));\n const threads = resolveNetscriptRequestedThreads(\n workerScript,\n \"grow\",\n requestedThreads ?? workerScript.scriptRef.threads,\n );\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"grow\");\n if (!(server instanceof Server)) {\n workerScript.log(\"grow\", () => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n throw new Error(\"Workerscript host is null\");\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanGrow(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg || \"\");\n }\n\n const growTime = calculateGrowTime(server, Player);\n workerScript.log(\n \"grow\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n growTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n return netscriptDelay(growTime * 1000, workerScript).then(function () {\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n processSingleServerGrowth(server, threads, Player, host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\n \"grow\",\n () =>\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n logGrowPercent,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n if (stock) {\n influenceStockThroughServerGrow(server, moneyAfter - moneyBefore);\n }\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (_hostname: unknown, _growth: unknown, _cores: unknown = 1): number {\n const hostname = helper.string(\"growthAnalyze\", \"hostname\", _hostname);\n const growth = helper.number(\"growthAnalyze\", \"growth\", _growth);\n const cores = helper.number(\"growthAnalyze\", \"cores\", _cores);\n updateDynamicRam(\"growthAnalyze\", getRamCost(Player, \"growthAnalyze\"));\n\n // Check argument validity\n const server = safeGetServer(hostname, \"growthAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"growthAnalyze\", () => \"Cannot be executed on this server.\");\n return 0;\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 numCycleForGrowth(server, Number(growth), Player, cores);\n },\n growthAnalyzeSecurity: function (_threads: unknown): number {\n const threads = helper.number(\"growthAnalyzeSecurity\", \"threads\", _threads);\n updateDynamicRam(\"growthAnalyzeSecurity\", getRamCost(Player, \"growthAnalyzeSecurity\"));\n return 2 * CONSTANTS.ServerFortifyAmount * threads;\n },\n weaken: async function (_hostname: unknown, { threads: requestedThreads }: BasicHGWOptions = {}): Promise {\n const hostname = helper.string(\"weaken\", \"hostname\", _hostname);\n updateDynamicRam(\"weaken\", getRamCost(Player, \"weaken\"));\n const threads = resolveNetscriptRequestedThreads(\n workerScript,\n \"weaken\",\n requestedThreads ?? workerScript.scriptRef.threads,\n );\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"weaken\");\n if (!(server instanceof Server)) {\n workerScript.log(\"weaken\", () => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanWeaken(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg || \"\");\n }\n\n const weakenTime = calculateWeakenTime(server, Player);\n workerScript.log(\n \"weaken\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n weakenTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return netscriptDelay(weakenTime * 1000, workerScript).then(function () {\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n workerScript.log(\"weaken\", () => \"Server is null, did it die?\");\n return Promise.resolve(0);\n }\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n workerScript.log(\n \"weaken\",\n () =>\n `'${server.hostname}' security level weakened to ${\n server.hackDifficulty\n }. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n return Promise.resolve(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n });\n },\n weakenAnalyze: function (_threads: unknown, _cores: unknown = 1): number {\n const threads = helper.number(\"weakenAnalyze\", \"threads\", _threads);\n const cores = helper.number(\"weakenAnalyze\", \"cores\", _cores);\n updateDynamicRam(\"weakenAnalyze\", getRamCost(Player, \"weakenAnalyze\"));\n const coreBonus = 1 + (cores - 1) / 16;\n return CONSTANTS.ServerWeakenAmount * threads * coreBonus * BitNodeMultipliers.ServerWeakenRate;\n },\n share: async function (): Promise {\n updateDynamicRam(\"share\", getRamCost(Player, \"share\"));\n workerScript.log(\"share\", () => \"Sharing this computer.\");\n const end = StartSharing(workerScript.scriptRef.threads * calculateIntelligenceBonus(Player.intelligence, 2));\n return netscriptDelay(10000, workerScript).finally(function () {\n workerScript.log(\"share\", () => \"Finished sharing this computer.\");\n end();\n });\n },\n getSharePower: function (): number {\n updateDynamicRam(\"getSharePower\", getRamCost(Player, \"getSharePower\"));\n return CalculateShareMult();\n },\n print: function (...args: any[]): void {\n updateDynamicRam(\"print\", getRamCost(Player, \"print\"));\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n workerScript.print(argsToString(args));\n },\n printf: function (_format: unknown, ...args: any[]): void {\n const format = helper.string(\"printf\", \"format\", _format);\n updateDynamicRam(\"printf\", getRamCost(Player, \"printf\"));\n if (typeof format !== \"string\") {\n throw makeRuntimeErrorMsg(\"printf\", \"First argument must be string for the format.\");\n }\n workerScript.print(vsprintf(format, args));\n },\n tprint: function (...args: any[]): void {\n updateDynamicRam(\"tprint\", getRamCost(Player, \"tprint\"));\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n const str = argsToString(args);\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n Terminal.print(`${workerScript.scriptRef.filename}: ${str}`);\n },\n tprintf: function (_format: unknown, ...args: any[]): void {\n const format = helper.string(\"printf\", \"format\", _format);\n updateDynamicRam(\"tprintf\", getRamCost(Player, \"tprintf\"));\n if (typeof format !== \"string\") {\n throw makeRuntimeErrorMsg(\"tprintf\", \"First argument must be string for the format.\");\n }\n const str = vsprintf(format, args);\n\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${str}`);\n return;\n }\n Terminal.print(`${str}`);\n },\n clearLog: function (): void {\n updateDynamicRam(\"clearLog\", getRamCost(Player, \"clearLog\"));\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (_fn: unknown): void {\n const fn = helper.string(\"disableLog\", \"fn\", _fn);\n updateDynamicRam(\"disableLog\", getRamCost(Player, \"disableLog\"));\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n workerScript.disableLogs[fn] = true;\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: unknown): void {\n const fn = helper.string(\"enableLog\", \"fn\", _fn);\n updateDynamicRam(\"enableLog\", getRamCost(Player, \"enableLog\"));\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n delete workerScript.disableLogs[fn];\n }\n workerScript.log(\"enableLog\", () => `Enabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", () => `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (_fn: unknown): boolean {\n const fn = helper.string(\"isLogEnabled\", \"fn\", _fn);\n updateDynamicRam(\"isLogEnabled\", getRamCost(Player, \"isLogEnabled\"));\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n return !workerScript.disableLogs[fn];\n },\n getScriptLogs: function (fn: any, hostname: any, ...scriptArgs: any[]): string[] {\n updateDynamicRam(\"getScriptLogs\", getRamCost(Player, \"getScriptLogs\"));\n const runningScriptObj = getRunningScript(fn, hostname, \"getScriptLogs\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return [];\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any[]): void {\n updateDynamicRam(\"tail\", getRamCost(Player, \"tail\"));\n let runningScriptObj;\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, hostname, \"tail\", scriptArgs);\n }\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return;\n }\n\n LogBoxEvents.emit(runningScriptObj);\n },\n nuke: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"tail\", \"hostname\", _hostname);\n updateDynamicRam(\"nuke\", getRamCost(Player, \"nuke\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"nuke\");\n if (!(server instanceof Server)) {\n workerScript.log(\"nuke\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", () => `Already have root access to '${server.hostname}'.`);\n return true;\n }\n if (!Player.hasProgram(Programs.NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", () => `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n return true;\n },\n brutessh: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"brutessh\", \"hostname\", _hostname);\n updateDynamicRam(\"brutessh\", getRamCost(Player, \"brutessh\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"brutessh\");\n if (!(server instanceof Server)) {\n workerScript.log(\"brutessh\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\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 return true;\n },\n ftpcrack: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"ftpcrack\", \"hostname\", _hostname);\n updateDynamicRam(\"ftpcrack\", getRamCost(Player, \"ftpcrack\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"ftpcrack\");\n if (!(server instanceof Server)) {\n workerScript.log(\"ftpcrack\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\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 return true;\n },\n relaysmtp: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"relaysmtp\", \"hostname\", _hostname);\n updateDynamicRam(\"relaysmtp\", getRamCost(Player, \"relaysmtp\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"relaysmtp\");\n if (!(server instanceof Server)) {\n workerScript.log(\"relaysmtp\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\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 return true;\n },\n httpworm: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"httpworm\", \"hostname\", _hostname);\n updateDynamicRam(\"httpworm\", getRamCost(Player, \"httpworm\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"httpworm\");\n if (!(server instanceof Server)) {\n workerScript.log(\"httpworm\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\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 return true;\n },\n sqlinject: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"sqlinject\", \"hostname\", _hostname);\n updateDynamicRam(\"sqlinject\", getRamCost(Player, \"sqlinject\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"sqlinject\");\n if (!(server instanceof Server)) {\n workerScript.log(\"sqlinject\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\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 return true;\n },\n run: function (_scriptname: unknown, _threads: unknown = 1, ...args: any[]): number {\n const scriptname = helper.string(\"run\", \"scriptname\", _scriptname);\n const threads = helper.number(\"run\", \"threads\", _threads);\n updateDynamicRam(\"run\", getRamCost(Player, \"run\"));\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return runScriptFromScript(Player, \"run\", scriptServer, scriptname, args, workerScript, threads);\n },\n exec: function (_scriptname: unknown, _hostname: unknown, _threads: unknown = 1, ...args: any[]): number {\n const scriptname = helper.string(\"exec\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"exec\", \"hostname\", _hostname);\n const threads = helper.number(\"exec\", \"threads\", _threads);\n updateDynamicRam(\"exec\", getRamCost(Player, \"exec\"));\n if (scriptname === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const server = safeGetServer(hostname, \"exec\");\n return runScriptFromScript(Player, \"exec\", server, scriptname, args, workerScript, threads);\n },\n spawn: function (_scriptname: unknown, _threads: unknown = 1, ...args: any[]): void {\n const scriptname = helper.string(\"spawn\", \"scriptname\", _scriptname);\n const threads = helper.number(\"spawn\", \"threads\", _threads);\n updateDynamicRam(\"spawn\", getRamCost(Player, \"spawn\"));\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n setTimeout(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return runScriptFromScript(Player, \"spawn\", scriptServer, scriptname, args, workerScript, threads);\n }, spawnDelay * 1e3);\n\n workerScript.log(\"spawn\", () => `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"spawn\", () => \"Exiting...\");\n }\n },\n kill: function (filename: any, hostname?: any, ...scriptArgs: any[]): boolean {\n updateDynamicRam(\"kill\", getRamCost(Player, \"kill\"));\n\n let res;\n const killByPid = typeof filename === \"number\";\n if (killByPid) {\n // Kill by pid\n res = killWorkerScript(filename);\n } else {\n // Kill by filename/hostname\n if (filename === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(hostname, \"kill\");\n const runningScriptObj = getRunningScript(filename, hostname, \"kill\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", () => getCannotFindRunningScriptErrorMessage(filename, hostname, scriptArgs));\n return false;\n }\n\n res = killWorkerScript(runningScriptObj, server.hostname);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", () => `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\n \"kill\",\n () => `Killing '${filename}' on '${hostname}' with args: ${arrayToString(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(\n \"kill\",\n () => `No such script '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}`,\n );\n }\n return false;\n }\n },\n killall: function (_hostname: unknown = workerScript.hostname): boolean {\n const hostname = helper.string(\"killall\", \"hostname\", _hostname);\n updateDynamicRam(\"killall\", getRamCost(Player, \"killall\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"killall\");\n const scriptsRunning = server.runningScripts.length > 0;\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n killWorkerScript(server.runningScripts[i], server.hostname, false);\n }\n WorkerScriptStartStopEventEmitter.emit();\n workerScript.log(\n \"killall\",\n () => `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`,\n );\n\n return scriptsRunning;\n },\n exit: function (): void {\n updateDynamicRam(\"exit\", getRamCost(Player, \"exit\"));\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"exit\", () => \"Exiting...\");\n } else {\n workerScript.log(\"exit\", () => \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: async function (scriptname: any, _hostname1: unknown, hostname2?: any): Promise {\n const hostname1 = helper.string(\"scp\", \"hostname1\", _hostname1);\n updateDynamicRam(\"scp\", getRamCost(Player, \"scp\"));\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n const scripts: Array = scriptname;\n if (scripts.length === 0) {\n throw makeRuntimeErrorMsg(\"scp\", \"No scripts to copy\");\n }\n let res = true;\n await Promise.all(\n scripts.map(async function (script) {\n if (!(await NetscriptFunctions(workerScript).scp(script, hostname1, hostname2))) {\n res = false;\n }\n }),\n );\n return Promise.resolve(res);\n }\n\n // Invalid file type\n if (!isValidFilePath(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n }\n\n // Invalid file name\n if (!scriptname.endsWith(\".lit\") && !isScriptFilename(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for scripts, .lit and .txt files\");\n }\n\n let destServer: BaseServer | null;\n let currServ: BaseServer | null;\n\n if (hostname2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || hostname1 === undefined || hostname2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname2, \"scp\");\n currServ = safeGetServer(hostname1, \"scp\");\n } else if (hostname1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || hostname1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname1, \"scp\");\n currServ = GetServer(workerScript.hostname);\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\n \"scp\",\n \"Could not find server hostname for this script. This is a bug. Report to dev.\",\n );\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n // Scp for lit files\n if (scriptname.endsWith(\".lit\")) {\n let found = false;\n for (let i = 0; i < currServ.messages.length; ++i) {\n if (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 Promise.resolve(false);\n }\n\n for (let 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 Promise.resolve(true); // Already exists\n }\n }\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for text files\n if (scriptname.endsWith(\".txt\")) {\n let txtFile;\n for (let i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n if (txtFile === undefined) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let 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 Promise.resolve(true);\n }\n }\n const newFile = new TextFile(txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for script files\n let sourceScript = null;\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 if (sourceScript == null) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n // Overwrite script if it already exists\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];\n // 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 if (oldScript.code === sourceScript.code) return Promise.resolve(true);\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return Promise.resolve(true);\n }\n }\n\n // Create new script if it does not already exist\n const newScript = new Script(Player, scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.hostname;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return new Promise((resolve) => {\n if (destServer === null) {\n resolve(false);\n return;\n }\n newScript.updateRamUsage(Player, destServer.scripts).then(() => resolve(true));\n });\n },\n ls: function (_hostname: unknown, _grep: unknown = \"\"): string[] {\n const hostname = helper.string(\"ls\", \"hostname\", _hostname);\n const grep = helper.string(\"ls\", \"grep\", _grep);\n updateDynamicRam(\"ls\", getRamCost(Player, \"ls\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(hostname/ip, [grep filter])\");\n }\n const server = safeGetServer(hostname, \"ls\");\n\n // Get the grep filter, if one exists\n let filter = \"\";\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\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 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 for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n const msg = server.messages[i];\n if (msg.includes(filter)) {\n allFiles.push(msg);\n }\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n\n for (let 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 (let 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 }\n\n // Sort the files alphabetically then print each\n allFiles.sort();\n return allFiles;\n },\n ps: function (_hostname: unknown = workerScript.hostname): ProcessInfo[] {\n const hostname = helper.string(\"ps\", \"hostname\", _hostname);\n updateDynamicRam(\"ps\", getRamCost(Player, \"ps\"));\n const server = safeGetServer(hostname, \"ps\");\n const processes = [];\n for (const script of server.runningScripts) {\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid,\n });\n }\n return processes;\n },\n hasRootAccess: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"hasRootAccess\", \"hostname\", _hostname);\n updateDynamicRam(\"hasRootAccess\", getRamCost(Player, \"hasRootAccess\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"hasRootAccess\");\n return server.hasAdminRights;\n },\n getHostname: function (): string {\n updateDynamicRam(\"getHostname\", getRamCost(Player, \"getHostname\"));\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getHostname\", \"Could not find server. This is a bug. Report to dev.\");\n }\n return scriptServer.hostname;\n },\n getHackingLevel: function (): number {\n updateDynamicRam(\"getHackingLevel\", getRamCost(Player, \"getHackingLevel\"));\n Player.updateSkillLevels();\n workerScript.log(\"getHackingLevel\", () => `returned ${Player.hacking}`);\n return Player.hacking;\n },\n getHackingMultipliers: function (): HackingMultipliers {\n updateDynamicRam(\"getHackingMultipliers\", getRamCost(Player, \"getHackingMultipliers\"));\n return {\n chance: Player.hacking_chance_mult,\n speed: Player.hacking_speed_mult,\n money: Player.hacking_money_mult,\n growth: Player.hacking_grow_mult,\n };\n },\n getHacknetMultipliers: function (): HacknetMultipliers {\n updateDynamicRam(\"getHacknetMultipliers\", getRamCost(Player, \"getHacknetMultipliers\"));\n return {\n production: Player.hacknet_node_money_mult,\n purchaseCost: Player.hacknet_node_purchase_cost_mult,\n ramCost: Player.hacknet_node_ram_cost_mult,\n coreCost: Player.hacknet_node_core_cost_mult,\n levelCost: Player.hacknet_node_level_cost_mult,\n };\n },\n getBitNodeMultipliers: function (): IBNMults {\n updateDynamicRam(\"getBitNodeMultipliers\", getRamCost(Player, \"getBitNodeMultipliers\"));\n if (SourceFileFlags[5] <= 0 && Player.bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n const copy = Object.assign({}, BitNodeMultipliers);\n return copy;\n },\n getServer: function (_hostname: unknown = workerScript.hostname): IServerDef {\n const hostname = helper.string(\"getServer\", \"hostname\", _hostname);\n updateDynamicRam(\"getServer\", getRamCost(Player, \"getServer\"));\n const server = safeGetServer(hostname, \"getServer\");\n const copy = Object.assign({}, server) as any;\n // These fields should be hidden.\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 if (!copy.baseDifficulty) copy.baseDifficulty = 0;\n if (!copy.hackDifficulty) copy.hackDifficulty = 0;\n if (!copy.minDifficulty) copy.minDifficulty = 0;\n if (!copy.moneyAvailable) copy.moneyAvailable = 0;\n if (!copy.moneyMax) copy.moneyMax = 0;\n if (!copy.numOpenPortsRequired) copy.numOpenPortsRequired = 0;\n if (!copy.openPortCount) copy.openPortCount = 0;\n if (!copy.requiredHackingSkill) copy.requiredHackingSkill = 0;\n if (!copy.serverGrowth) copy.serverGrowth = 0;\n return copy;\n },\n getServerMoneyAvailable: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMoneyAvailable\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMoneyAvailable\", getRamCost(Player, \"getServerMoneyAvailable\"));\n const server = safeGetServer(hostname, \"getServerMoneyAvailable\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMoneyAvailable\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned player's money: ${numeralWrapper.formatMoney(Player.money)}`,\n );\n return Player.money;\n }\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyAvailable)} for '${server.hostname}'`,\n );\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerSecurityLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerSecurityLevel\", getRamCost(Player, \"getServerSecurityLevel\"));\n const server = safeGetServer(hostname, \"getServerSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.hackDifficulty)} for '${server.hostname}'`,\n );\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerBaseSecurityLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerBaseSecurityLevel\", getRamCost(Player, \"getServerBaseSecurityLevel\"));\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `getServerBaseSecurityLevel is deprecated because it's not useful.`,\n );\n const server = safeGetServer(hostname, \"getServerBaseSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerBaseSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.baseDifficulty)} for '${server.hostname}'`,\n );\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMinSecurityLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMinSecurityLevel\", getRamCost(Player, \"getServerMinSecurityLevel\"));\n const server = safeGetServer(hostname, \"getServerMinSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMinSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerMinSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.minDifficulty)} for ${server.hostname}`,\n );\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerRequiredHackingLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerRequiredHackingLevel\", getRamCost(Player, \"getServerRequiredHackingLevel\"));\n const server = safeGetServer(hostname, \"getServerRequiredHackingLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerRequiredHackingLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerRequiredHackingLevel\",\n () => `returned ${numeralWrapper.formatSkill(server.requiredHackingSkill)} for '${server.hostname}'`,\n );\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMaxMoney\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMaxMoney\", getRamCost(Player, \"getServerMaxMoney\"));\n const server = safeGetServer(hostname, \"getServerMaxMoney\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMaxMoney\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n workerScript.log(\n \"getServerMaxMoney\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyMax)} for '${server.hostname}'`,\n );\n return server.moneyMax;\n },\n getServerGrowth: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerGrowth\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerGrowth\", getRamCost(Player, \"getServerGrowth\"));\n const server = safeGetServer(hostname, \"getServerGrowth\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerGrowth\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n workerScript.log(\"getServerGrowth\", () => `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerNumPortsRequired\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerNumPortsRequired\", getRamCost(Player, \"getServerNumPortsRequired\"));\n const server = safeGetServer(hostname, \"getServerNumPortsRequired\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", () => \"Cannot be executed on this server.\");\n return 5;\n }\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n workerScript.log(\n \"getServerNumPortsRequired\",\n () => `returned ${server.numOpenPortsRequired} for '${server.hostname}'`,\n );\n return server.numOpenPortsRequired;\n },\n getServerRam: function (_hostname: unknown): [number, number] {\n const hostname = helper.string(\"getServerRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerRam\", getRamCost(Player, \"getServerRam\"));\n workerScript.log(\n \"getServerRam\",\n () => `getServerRam is deprecated in favor of getServerMaxRam / getServerUsedRam`,\n );\n const server = safeGetServer(hostname, \"getServerRam\");\n workerScript.log(\n \"getServerRam\",\n () => `returned [${numeralWrapper.formatRAM(server.maxRam)}, ${numeralWrapper.formatRAM(server.ramUsed)}]`,\n );\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMaxRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMaxRam\", getRamCost(Player, \"getServerMaxRam\"));\n const server = safeGetServer(hostname, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", () => `returned ${numeralWrapper.formatRAM(server.maxRam)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerUsedRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerUsedRam\", getRamCost(Player, \"getServerUsedRam\"));\n const server = safeGetServer(hostname, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", () => `returned ${numeralWrapper.formatRAM(server.ramUsed)}`);\n return server.ramUsed;\n },\n serverExists: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"serverExists\", \"hostname\", _hostname);\n updateDynamicRam(\"serverExists\", getRamCost(Player, \"serverExists\"));\n return GetServer(hostname) !== null;\n },\n fileExists: function (_filename: unknown, _hostname: unknown = workerScript.hostname): boolean {\n const filename = helper.string(\"fileExists\", \"filename\", _filename);\n const hostname = helper.string(\"fileExists\", \"hostname\", _hostname);\n updateDynamicRam(\"fileExists\", getRamCost(Player, \"fileExists\"));\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n const server = safeGetServer(hostname, \"fileExists\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n for (let i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.toLowerCase() === server.messages[i].toLowerCase()) {\n return true;\n }\n }\n const txtFile = getTextFile(filename, server);\n return txtFile != null;\n },\n isRunning: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any[]): boolean {\n updateDynamicRam(\"isRunning\", getRamCost(Player, \"isRunning\"));\n if (fn === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, hostname, \"isRunning\", scriptArgs) != null;\n }\n },\n getPurchasedServerLimit: function (): number {\n updateDynamicRam(\"getPurchasedServerLimit\", getRamCost(Player, \"getPurchasedServerLimit\"));\n\n return getPurchaseServerLimit();\n },\n getPurchasedServerMaxRam: function (): number {\n updateDynamicRam(\"getPurchasedServerMaxRam\", getRamCost(Player, \"getPurchasedServerMaxRam\"));\n\n return getPurchaseServerMaxRam();\n },\n getPurchasedServerCost: function (_ram: unknown): number {\n const ram = helper.number(\"getPurchasedServerCost\", \"ram\", _ram);\n updateDynamicRam(\"getPurchasedServerCost\", getRamCost(Player, \"getPurchasedServerCost\"));\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", () => `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (_name: unknown, _ram: unknown): string {\n const name = helper.string(\"purchaseServer\", \"name\", _name);\n const ram = helper.number(\"purchaseServer\", \"ram\", _ram);\n if (arguments.length !== 2) throw makeRuntimeErrorMsg(\"purchaseServer\", \"Takes 2 arguments\");\n updateDynamicRam(\"purchaseServer\", getRamCost(Player, \"purchaseServer\"));\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (Player.purchasedServers.length >= getPurchaseServerLimit()) {\n workerScript.log(\n \"purchaseServer\",\n () =>\n `You have reached the maximum limit of ${getPurchaseServerLimit()} servers. You cannot purchase any more.`,\n );\n return \"\";\n }\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n if (ram > getPurchaseServerMaxRam()) {\n workerScript.log(\n \"purchaseServer\",\n () => `Invalid argument: ram='${ram}' must not be greater than getPurchaseServerMaxRam`,\n );\n } else {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: ram='${ram}' must be a positive power of 2`);\n }\n\n return \"\";\n }\n\n if (Player.money < cost) {\n workerScript.log(\n \"purchaseServer\",\n () => `Not enough money to purchase server. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return \"\";\n }\n const newServ = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram,\n });\n AddToAllServers(newServ);\n\n Player.purchasedServers.push(newServ.hostname);\n const homeComputer = Player.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n Player.loseMoney(cost, \"servers\");\n workerScript.log(\n \"purchaseServer\",\n () => `Purchased new server with hostname '${newServ.hostname}' for ${numeralWrapper.formatMoney(cost)}`,\n );\n return newServ.hostname;\n },\n deleteServer: function (_name: unknown): boolean {\n const name = helper.string(\"purchaseServer\", \"name\", _name);\n updateDynamicRam(\"deleteServer\", getRamCost(Player, \"deleteServer\"));\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n const server = GetServer(hostnameStr);\n if (!(server instanceof Server)) {\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 const hostname = server.hostname;\n\n // Can't delete server you're currently connected to\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", () => \"You are currently connected to the server you are trying to delete.\");\n return false;\n }\n\n // A server cannot delete itself\n if (hostname === workerScript.hostname) {\n workerScript.log(\"deleteServer\", () => \"Cannot delete the server this script is running on.\");\n return false;\n }\n\n // Delete all scripts running on server\n if (server.runningScripts.length > 0) {\n workerScript.log(\n \"deleteServer\",\n () => `Cannot delete server '${hostname}' because it still has scripts running.`,\n );\n return false;\n }\n\n // Delete from player's purchasedServers array\n let found = false;\n for (let i = 0; i < Player.purchasedServers.length; ++i) {\n if (hostname == Player.purchasedServers[i]) {\n found = true;\n Player.purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\n \"deleteServer\",\n () => `Could not identify server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n }\n\n // Delete from all servers\n DeleteServer(hostname);\n\n // Delete from home computer\n found = false;\n const homeComputer = Player.getHomeComputer();\n for (let i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (hostname == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", () => `Deleted server '${hostnameStr}`);\n return true;\n }\n }\n // Wasn't found on home computer\n workerScript.log(\n \"deleteServer\",\n () => `Could not find server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n },\n getPurchasedServers: function (): string[] {\n updateDynamicRam(\"getPurchasedServers\", getRamCost(Player, \"getPurchasedServers\"));\n const res: string[] = [];\n Player.purchasedServers.forEach(function (hostname) {\n res.push(hostname);\n });\n return res;\n },\n writePort: function (_port: unknown, data: any = \"\"): Promise {\n const port = helper.number(\"writePort\", \"port\", _port);\n updateDynamicRam(\"writePort\", getRamCost(Player, \"writePort\"));\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"writePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n const iport = helper.getValidPort(\"writePort\", port);\n return Promise.resolve(iport.write(data));\n },\n write: function (_port: unknown, data: any = \"\", _mode: unknown = \"a\"): Promise {\n const port = helper.string(\"write\", \"port\", _port);\n const mode = helper.string(\"write\", \"mode\", _mode);\n updateDynamicRam(\"write\", getRamCost(Player, \"write\"));\n if (isString(port)) {\n // Write to script or text file\n let fn = port;\n if (!isValidFilePath(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = removeLeadingSlash(fn);\n }\n\n // Coerce 'data' to be a string\n try {\n data = String(data);\n } catch (e: any) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n // Create a new script\n script = new Script(Player, fn, data, server.hostname, server.scripts);\n server.scripts.push(script);\n return script.updateRamUsage(Player, server.scripts);\n }\n mode === \"w\" ? (script.code = data) : (script.code += data);\n return script.updateRamUsage(Player, server.scripts);\n } else {\n // Write to text file\n const txtFile = getTextFile(fn, server);\n if (txtFile == null) {\n createTextFile(fn, data, server);\n return Promise.resolve();\n }\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n return Promise.resolve();\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWritePort: function (_port: unknown, data: any = \"\"): Promise {\n let port = helper.number(\"tryWritePort\", \"port\", _port);\n updateDynamicRam(\"tryWritePort\", getRamCost(Player, \"tryWritePort\"));\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n if (!isNaN(port)) {\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return Promise.resolve(iport.tryWrite(data));\n } else {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Invalid argument: ${port}`);\n }\n },\n readPort: function (_port: unknown): any {\n const port = helper.number(\"readPort\", \"port\", _port);\n updateDynamicRam(\"readPort\", getRamCost(Player, \"readPort\"));\n // Read from port\n const iport = helper.getValidPort(\"readPort\", port);\n const x = iport.read();\n return x;\n },\n read: function (_port: unknown): string {\n const port = helper.string(\"read\", \"port\", _port);\n updateDynamicRam(\"read\", getRamCost(Player, \"read\"));\n if (isString(port)) {\n // Read from script or text file\n const fn = port;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Read from script\n const script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n return \"\";\n }\n return script.code;\n } else {\n // Read from text file\n const txtFile = getTextFile(fn, server);\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: unknown): any {\n const port = helper.number(\"peek\", \"port\", _port);\n updateDynamicRam(\"peek\", getRamCost(Player, \"peek\"));\n const iport = helper.getValidPort(\"peek\", port);\n const x = iport.peek();\n return x;\n },\n clear: function (_file: unknown): void {\n const file = helper.string(\"peek\", \"file\", _file);\n updateDynamicRam(\"clear\", getRamCost(Player, \"clear\"));\n if (isString(file)) {\n // Clear text file\n const fn = file;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n const txtFile = getTextFile(fn, server);\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${file}`);\n }\n },\n clearPort: function (_port: unknown): void {\n const port = helper.number(\"clearPort\", \"port\", _port);\n updateDynamicRam(\"clearPort\", getRamCost(Player, \"clearPort\"));\n // Clear port\n const iport = helper.getValidPort(\"clearPort\", port);\n iport.clear();\n },\n getPortHandle: function (_port: unknown): IPort {\n const port = helper.number(\"getPortHandle\", \"port\", _port);\n updateDynamicRam(\"getPortHandle\", getRamCost(Player, \"getPortHandle\"));\n const iport = helper.getValidPort(\"getPortHandle\", port);\n return iport;\n },\n rm: function (_fn: unknown, hostname: any): boolean {\n const fn = helper.string(\"rm\", \"fn\", _fn);\n updateDynamicRam(\"rm\", getRamCost(Player, \"rm\"));\n\n if (hostname == null || hostname === \"\") {\n hostname = workerScript.hostname;\n }\n const s = safeGetServer(hostname, \"rm\");\n\n const status = s.removeFile(fn);\n if (!status.res) {\n workerScript.log(\"rm\", () => status.msg + \"\");\n }\n\n return status.res;\n },\n scriptRunning: function (_scriptname: unknown, _hostname: unknown): boolean {\n const scriptname = helper.string(\"scriptRunning\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"scriptRunning\", \"hostname\", _hostname);\n updateDynamicRam(\"scriptRunning\", getRamCost(Player, \"scriptRunning\"));\n const server = safeGetServer(hostname, \"scriptRunning\");\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n return false;\n },\n scriptKill: function (_scriptname: unknown, _hostname: unknown): boolean {\n const scriptname = helper.string(\"scriptKill\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"scriptKill\", \"hostname\", _hostname);\n updateDynamicRam(\"scriptKill\", getRamCost(Player, \"scriptKill\"));\n const server = safeGetServer(hostname, \"scriptKill\");\n let suc = false;\n for (let i = 0; i < server.runningScripts.length; i++) {\n if (server.runningScripts[i].filename == scriptname) {\n killWorkerScript(server.runningScripts[i], server.hostname);\n suc = true;\n i--;\n }\n }\n return suc;\n },\n getScriptName: function (): string {\n updateDynamicRam(\"getScriptName\", getRamCost(Player, \"getScriptName\"));\n return workerScript.name;\n },\n getScriptRam: function (_scriptname: unknown, _hostname: unknown = workerScript.hostname): number {\n const scriptname = helper.string(\"getScriptRam\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"getScriptRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getScriptRam\", getRamCost(Player, \"getScriptRam\"));\n const server = safeGetServer(hostname, \"getScriptRam\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n return 0;\n },\n getRunningScript: function (fn: any, hostname: any, ...args: any[]): IRunningScriptDef | null {\n updateDynamicRam(\"getRunningScript\", getRamCost(Player, \"getRunningScript\"));\n\n let runningScript;\n if (fn === undefined && hostname === undefined && args.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n runningScript = getRunningScript(fn, hostname, \"getRunningScript\", args);\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 (_hostname: unknown = workerScript.hostname): number {\n const hostname = helper.string(\"getHackTime\", \"hostname\", _hostname);\n updateDynamicRam(\"getHackTime\", getRamCost(Player, \"getHackTime\"));\n const server = safeGetServer(hostname, \"getHackTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getHackTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return calculateHackingTime(server, Player) * 1000;\n },\n getGrowTime: function (_hostname: unknown = workerScript.hostname): number {\n const hostname = helper.string(\"getGrowTime\", \"hostname\", _hostname);\n updateDynamicRam(\"getGrowTime\", getRamCost(Player, \"getGrowTime\"));\n const server = safeGetServer(hostname, \"getGrowTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getGrowTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return calculateGrowTime(server, Player) * 1000;\n },\n getWeakenTime: function (_hostname: unknown = workerScript.hostname): number {\n const hostname = helper.string(\"getWeakenTime\", \"hostname\", _hostname);\n updateDynamicRam(\"getWeakenTime\", getRamCost(Player, \"getWeakenTime\"));\n const server = safeGetServer(hostname, \"getWeakenTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getWeakenTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return calculateWeakenTime(server, Player) * 1000;\n },\n getScriptIncome: function (scriptname?: any, hostname?: any, ...args: any[]): any {\n updateDynamicRam(\"getScriptIncome\", getRamCost(Player, \"getScriptIncome\"));\n if (arguments.length === 0) {\n const res = [];\n\n // First element is total income of all currently running scripts\n let total = 0;\n for (const script of workerScripts.values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n res.push(total);\n\n // Second element is total income you've earned from scripts since you installed Augs\n res.push(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptIncome\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptIncome\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname?: any, hostname?: any, ...args: any[]): number {\n updateDynamicRam(\"getScriptExpGain\", getRamCost(Player, \"getScriptExpGain\"));\n if (arguments.length === 0) {\n let total = 0;\n for (const ws of workerScripts.values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n return total;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptExpGain\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptExpGain\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (_n: unknown, _format: unknown): string {\n const n = helper.number(\"nFormat\", \"n\", _n);\n const format = helper.string(\"nFormat\", \"format\", _format);\n updateDynamicRam(\"nFormat\", getRamCost(Player, \"nFormat\"));\n if (isNaN(n)) {\n return \"\";\n }\n\n return numeralWrapper.format(n, format);\n },\n tFormat: function (_milliseconds: unknown, _milliPrecision: unknown = false): string {\n const milliseconds = helper.number(\"tFormat\", \"milliseconds\", _milliseconds);\n const milliPrecision = helper.boolean(_milliPrecision);\n updateDynamicRam(\"tFormat\", getRamCost(Player, \"tFormat\"));\n return convertTimeMsToTimeElapsedString(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function (): number {\n updateDynamicRam(\"getTimeSinceLastAug\", getRamCost(Player, \"getTimeSinceLastAug\"));\n return Player.playtimeSinceLastAug;\n },\n alert: function (_message: unknown): void {\n const message = helper.string(\"alert\", \"message\", _message);\n updateDynamicRam(\"alert\", getRamCost(Player, \"alert\"));\n dialogBoxCreate(message);\n },\n toast: function (_message: unknown, _variant: unknown = \"success\", duration: any = 2000): void {\n const message = helper.string(\"toast\", \"message\", _message);\n const variant = helper.string(\"toast\", \"variant\", _variant);\n updateDynamicRam(\"toast\", getRamCost(Player, \"toast\"));\n if (![\"success\", \"info\", \"warning\", \"error\"].includes(variant))\n throw new Error(`variant must be one of \"success\", \"info\", \"warning\", or \"error\"`);\n SnackbarEvents.emit(message, variant as any, duration);\n },\n prompt: function (_txt: unknown, options?: { type?: string; options?: string[] }): Promise {\n const txt = helper.string(\"toast\", \"txt\", _txt);\n updateDynamicRam(\"prompt\", getRamCost(Player, \"prompt\"));\n\n return new Promise(function (resolve) {\n PromptEvent.emit({\n txt: txt,\n options,\n resolve: resolve,\n });\n });\n },\n wget: async function (\n _url: unknown,\n _target: unknown,\n _hostname: unknown = workerScript.hostname,\n ): Promise {\n const url = helper.string(\"wget\", \"url\", _url);\n const target = helper.string(\"wget\", \"target\", _target);\n const hostname = helper.string(\"wget\", \"hostname\", _hostname);\n updateDynamicRam(\"wget\", getRamCost(Player, \"wget\"));\n if (!isScriptFilename(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 const s = safeGetServer(hostname, \"wget\");\n return new Promise(function (resolve) {\n $.get(\n url,\n function (data) {\n let res;\n if (isScriptFilename(target)) {\n res = s.writeToScriptFile(Player, target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n if (!res.success) {\n workerScript.log(\"wget\", () => \"Failed.\");\n return resolve(false);\n }\n if (res.overwritten) {\n workerScript.log(\n \"wget\",\n () => `Successfully retrieved content and overwrote '${target}' on '${hostname}'`,\n );\n return resolve(true);\n }\n workerScript.log(\"wget\", () => `Successfully retrieved content to new file '${target}' on '${hostname}'`);\n return resolve(true);\n },\n \"text\",\n ).fail(function (e) {\n workerScript.log(\"wget\", () => JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function (): number {\n updateDynamicRam(\"getFavorToDonate\", getRamCost(Player, \"getFavorToDonate\"));\n return Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n },\n getOwnedSourceFiles: function (): SourceFileLvl[] {\n updateDynamicRam(\"getOwnedSourceFiles\", getRamCost(Player, \"getOwnedSourceFiles\"));\n const res: SourceFileLvl[] = [];\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n res.push({\n n: Player.sourceFiles[i].n,\n lvl: Player.sourceFiles[i].lvl,\n } as SourceFileLvl);\n }\n return res;\n },\n getPlayer: function (): INetscriptPlayer {\n updateDynamicRam(\"getPlayer\", getRamCost(Player, \"getPlayer\"));\n\n const data = {\n hacking: Player.hacking,\n hp: Player.hp,\n max_hp: Player.max_hp,\n strength: Player.strength,\n defense: Player.defense,\n dexterity: Player.dexterity,\n agility: Player.agility,\n charisma: Player.charisma,\n intelligence: Player.intelligence,\n hacking_chance_mult: Player.hacking_chance_mult,\n hacking_speed_mult: Player.hacking_speed_mult,\n hacking_money_mult: Player.hacking_money_mult,\n hacking_grow_mult: Player.hacking_grow_mult,\n hacking_exp: Player.hacking_exp,\n strength_exp: Player.strength_exp,\n defense_exp: Player.defense_exp,\n dexterity_exp: Player.dexterity_exp,\n agility_exp: Player.agility_exp,\n charisma_exp: Player.charisma_exp,\n hacking_mult: Player.hacking_mult,\n strength_mult: Player.strength_mult,\n defense_mult: Player.defense_mult,\n dexterity_mult: Player.dexterity_mult,\n agility_mult: Player.agility_mult,\n charisma_mult: Player.charisma_mult,\n hacking_exp_mult: Player.hacking_exp_mult,\n strength_exp_mult: Player.strength_exp_mult,\n defense_exp_mult: Player.defense_exp_mult,\n dexterity_exp_mult: Player.dexterity_exp_mult,\n agility_exp_mult: Player.agility_exp_mult,\n charisma_exp_mult: Player.charisma_exp_mult,\n company_rep_mult: Player.company_rep_mult,\n faction_rep_mult: Player.faction_rep_mult,\n numPeopleKilled: Player.numPeopleKilled,\n money: Player.money,\n city: Player.city,\n location: Player.location,\n companyName: Player.companyName,\n crime_money_mult: Player.crime_money_mult,\n crime_success_mult: Player.crime_success_mult,\n isWorking: Player.isWorking,\n workType: Player.workType,\n currentWorkFactionName: Player.currentWorkFactionName,\n currentWorkFactionDescription: Player.currentWorkFactionDescription,\n workHackExpGainRate: Player.workHackExpGainRate,\n workStrExpGainRate: Player.workStrExpGainRate,\n workDefExpGainRate: Player.workDefExpGainRate,\n workDexExpGainRate: Player.workDexExpGainRate,\n workAgiExpGainRate: Player.workAgiExpGainRate,\n workChaExpGainRate: Player.workChaExpGainRate,\n workRepGainRate: Player.workRepGainRate,\n workMoneyGainRate: Player.workMoneyGainRate,\n workMoneyLossRate: Player.workMoneyLossRate,\n workHackExpGained: Player.workHackExpGained,\n workStrExpGained: Player.workStrExpGained,\n workDefExpGained: Player.workDefExpGained,\n workDexExpGained: Player.workDexExpGained,\n workAgiExpGained: Player.workAgiExpGained,\n workChaExpGained: Player.workChaExpGained,\n workRepGained: Player.workRepGained,\n workMoneyGained: Player.workMoneyGained,\n createProgramName: Player.createProgramName,\n createProgramReqLvl: Player.createProgramReqLvl,\n className: Player.className,\n crimeType: Player.crimeType,\n work_money_mult: Player.work_money_mult,\n hacknet_node_money_mult: Player.hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: Player.hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: Player.hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: Player.hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: Player.hacknet_node_level_cost_mult,\n hasWseAccount: Player.hasWseAccount,\n hasTixApiAccess: Player.hasTixApiAccess,\n has4SData: Player.has4SData,\n has4SDataTixApi: Player.has4SDataTixApi,\n bladeburner_max_stamina_mult: Player.bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: Player.bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: Player.bladeburner_analysis_mult,\n bladeburner_success_chance_mult: Player.bladeburner_success_chance_mult,\n bitNodeN: Player.bitNodeN,\n totalPlaytime: Player.totalPlaytime,\n playtimeSinceLastAug: Player.playtimeSinceLastAug,\n playtimeSinceLastBitnode: Player.playtimeSinceLastBitnode,\n jobs: {},\n factions: Player.factions.slice(),\n tor: Player.hasTorRouter(),\n inBladeburner: Player.inBladeburner(),\n hasCorporation: Player.hasCorporation(),\n entropy: Player.entropy,\n };\n Object.assign(data.jobs, Player.jobs);\n return data;\n },\n atExit: function (f: any): void {\n updateDynamicRam(\"atExit\", getRamCost(Player, \"atExit\"));\n if (typeof f !== \"function\") {\n throw makeRuntimeErrorMsg(\"atExit\", \"argument should be function\");\n }\n workerScript.atExit = () => {\n f();\n }; // Wrap the user function to prevent WorkerScript leaking as 'this'\n },\n mv: function (_host: unknown, _source: unknown, _destination: unknown): void {\n const host = helper.string(\"mv\", \"host\", _host);\n const source = helper.string(\"mv\", \"source\", _source);\n const destination = helper.string(\"mv\", \"destination\", _destination);\n updateDynamicRam(\"mv\", getRamCost(Player, \"mv\"));\n\n if (!isValidFilePath(source)) throw makeRuntimeErrorMsg(\"mv\", `Invalid filename: '${source}'`);\n if (!isValidFilePath(destination)) throw makeRuntimeErrorMsg(\"mv\", `Invalid filename: '${destination}'`);\n\n const source_is_txt = source.endsWith(\".txt\");\n const dest_is_txt = destination.endsWith(\".txt\");\n\n if (!isScriptFilename(source) && !source_is_txt)\n throw makeRuntimeErrorMsg(\"mv\", `'mv' can only be used on scripts and text files (.txt)`);\n if (source_is_txt != dest_is_txt)\n throw makeRuntimeErrorMsg(\"mv\", `Source and destination files must have the same type`);\n\n if (source === destination) {\n return;\n }\n\n // This will throw if the server is not found, we do not need to validate result.\n const destServer: BaseServer | null = safeGetServer(host, \"mv\");\n\n if (!source_is_txt && destServer.isRunning(source))\n throw makeRuntimeErrorMsg(\"mv\", `Cannot use 'mv' on a script that is running`);\n\n interface File {\n filename: string;\n }\n\n const files = source_is_txt ? destServer.textFiles : destServer.scripts;\n let source_file: File | null = null;\n let dest_file: File | null = null;\n\n for (let i = 0; i < files.length; ++i) {\n const file = files[i];\n if (file.filename === source) {\n source_file = file;\n } else if (file.filename === destination) {\n dest_file = file;\n }\n }\n\n if (source_file == null) throw makeRuntimeErrorMsg(\"mv\", `Source file ${source} does not exist`);\n\n if (dest_file != null) {\n if (dest_file instanceof TextFile && source_file instanceof TextFile) {\n dest_file.text = source_file.text;\n } else if (dest_file instanceof Script && source_file instanceof Script) {\n dest_file.code = source_file.code;\n dest_file.markUpdated();\n }\n\n destServer.removeFile(source);\n } else {\n source_file.filename = destination;\n if (source_file instanceof Script) {\n source_file.markUpdated();\n }\n }\n },\n flags: Flags(workerScript.args),\n };\n\n // add undocumented functions\n const ns = {\n ...base,\n ...extra,\n };\n function getFunctionNames(obj: any, prefix: string): string[] {\n const functionNames: string[] = [];\n for (const [key, value] of Object.entries(obj)) {\n if (key === \"args\") {\n continue;\n } else if (typeof value == \"function\") {\n functionNames.push(prefix + key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value, key + \".\"));\n }\n }\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(ns, \"\")].map((a) => [a, true]));\n\n return ns;\n}\n","/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\nimport { Stock } from \"./Stock\";\nimport { StockMarket } from \"./StockMarket\";\n\nimport { Company } from \"../Company/Company\";\nimport { Server } from \"../Server/Server\";\n\n// Change in second-order forecast due to hacks/grows\nexport const forecastForecastChangeFromHack = 0.1;\n\n// Change in second-order forecast due to company work\nexport const forecastForecastChangeFromCompanyWork = 0.001;\n\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 */\nexport function influenceStockThroughServerHack(server: Server, moneyHacked: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\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 */\nexport function influenceStockThroughServerGrow(server: Server, moneyGrown: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\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 */\nexport function influenceStockThroughCompanyWork(\n company: Company,\n performanceMult: number,\n cyclesOfWork: number,\n): void {\n const compName = company.name;\n let stock: Stock | null = null;\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = StockMarket[compName];\n }\n if (!(stock instanceof Stock)) {\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","import { Company } from \"./Company\";\nimport { CompanyPosition } from \"./CompanyPosition\";\n\n/**\n * Returns a string with the given CompanyPosition's stat requirements\n */\n\nexport function getJobRequirementText(company: Company, pos: CompanyPosition, tooltiptext = false): string {\n let reqText = \"\";\n const offset: number = company.jobStatReqOffset;\n const reqHacking: number = pos.requiredHacking > 0 ? pos.requiredHacking + offset : 0;\n const reqStrength: number = pos.requiredStrength > 0 ? pos.requiredStrength + offset : 0;\n const reqDefense: number = pos.requiredDefense > 0 ? pos.requiredDefense + offset : 0;\n const reqDexterity: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqAgility: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqCharisma: number = pos.requiredCharisma > 0 ? pos.requiredCharisma + offset : 0;\n const reqRep: number = pos.requiredReputation;\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 if (reqHacking > 0) {\n reqText += reqHacking + \" hacking, \";\n }\n if (reqStrength > 0) {\n reqText += reqStrength + \" strength, \";\n }\n if (reqDefense > 0) {\n reqText += reqDefense + \" defense, \";\n }\n if (reqDexterity > 0) {\n reqText += reqDexterity + \" dexterity, \";\n }\n if (reqAgility > 0) {\n reqText += reqAgility + \" agility, \";\n }\n if (reqCharisma > 0) {\n reqText += reqCharisma + \" charisma, \";\n }\n if (reqRep > 1) {\n reqText += reqRep + \" reputation, \";\n }\n reqText = reqText.substring(0, reqText.length - 2);\n reqText += \")\";\n }\n return reqText;\n}\n","/* tslint:disable:max-line-length completed-docs variable-name*/\nimport { IMap } from \"../types\";\n\nexport const TerminalHelpText: string[] = [\n \"Type 'help name' to learn more about the command \",\n \" \",\n ' alias [-g] [name=\"value\"] Create or display Terminal aliases',\n \" analyze Get information about the current machine \",\n \" backdoor Install a backdoor on the current machine \",\n \" buy [-l/-a/program] Purchase a program through the Dark Web\",\n \" cat [file] Display a .msg, .lit, or .txt file\",\n \" cd [dir] Change to a new directory\",\n \" check [script] [args...] Print a script's logs to Terminal\",\n \" clear Clear all text on the terminal \",\n \" cls See 'clear' command \",\n \" connect [hostname] Connects to a remote server\",\n \" cp [src] [dst] Copy a file\",\n \" download [script/text file] Downloads scripts or text files to your computer\",\n \" expr [math expression] Evaluate a mathematical expression\",\n \" free Check the machine's memory (RAM) usage\",\n \" grow Spoof money in a servers bank account, increasing the amount available.\",\n \" hack Hack the current machine\",\n \" help [command] Display this help text, or the help text for a command\",\n \" history [-c] Display the terminal history\",\n \" home Connect to home computer\",\n \" hostname Displays the hostname of the machine\",\n \" kill [script/pid] [args...] Stops the specified script on the current server \",\n \" killall Stops all running scripts on the current machine\",\n \" ls [dir] [--grep pattern] Displays all files on the machine\",\n \" lscpu Displays the number of CPU cores on the machine\",\n \" mem [script] [-t n] Displays the amount of RAM required to run the script\",\n \" mv [src] [dest] Move/rename a text or script file\",\n \" nano [file ...] Text editor - Open up and edit one or more scripts or text files\",\n \" ps Display all scripts that are currently running\",\n \" rm [file] Delete a file from the server\",\n \" run [name] [-t n] [--tail] [args...] Execute a program or script\",\n \" scan Prints all immediately-available network connections\",\n \" scan-analyze [d] [-a] Prints info for all servers up to d nodes away\",\n \" scp [file ...] [server] Copies a file to a destination server\",\n \" sudov Shows whether you have root access on this computer\",\n \" tail [script] [args...] Displays dynamic logs for the specified script\",\n \" top Displays all running scripts and their RAM usage\",\n \" unalias [alias name] Deletes the specified alias\",\n \" vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode\",\n \" weaken Reduce the security of the current machine\",\n \" wget [url] [target file] Retrieves code/text from a web server\",\n \" \",\n];\n\nconst TemplatedHelpTexts: IMap<(command: string) => string[]> = {\n scriptEditor: (command) => {\n return [\n `Usage: ${command} [file ...] | [glob]`,\n ` `,\n `Opens up the specified file(s) in the Script Editor. Only scripts (.js, .ns, .script) or text files (.txt) `,\n `can be edited using the Script Editor. If a file does not exist a new one will be created`,\n ` `,\n `If provided a glob as the only argument, ${command} can spider directories and open all matching `,\n `files at once. ${command} cannot create files using globs, so your scripts must already exist.`,\n ` `,\n `Examples:`,\n ` `,\n ` ${command} test.js`,\n ` ${command} test.js test2.js`,\n ` `,\n ` ${command} test.*`,\n ` ${command} /my-dir/*.js`,\n ` `\n ]\n }\n}\n\nexport const HelpTexts: IMap = {\n alias: [\n 'Usage: alias [-g] [name=\"value\"] ',\n \" \",\n \"Create or display aliases. An alias enables a replacement of a word with another string. \",\n \"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME \",\n \"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, \",\n \"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: \",\n \" \",\n ' alias nuke=\"run NUKE.exe\"',\n \" \",\n \"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. \",\n \"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For \",\n \"example, if the following alias was set: \",\n \" \",\n ' alias worm=\"HTTPWorm.exe\"',\n \" \",\n \"and then you tried to run the following terminal command: \",\n \" \",\n \" run worm\",\n \" \",\n \"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted \",\n \"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: \",\n \" \",\n ' alias -g worm=\"HTTPWorm.exe\"',\n \" \",\n \"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. \",\n \" \",\n \"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form \",\n \"'alias NAME=VALUE' on the Terminal. \",\n \" \",\n \"The 'unalias' command can be used to remove aliases.\",\n \" \",\n ],\n analyze: [\n \"Usage: analyze\",\n \" \",\n \"Prints details and statistics about the current server. The information that is printed includes basic \",\n \"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also \",\n \"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is \",\n \"available on the server, etc.\",\n \" \",\n ],\n backdoor: [\n \"Usage: backdoor\",\n \" \",\n \"Install a backdoor on the current machine, grants a secret bonus depending on the machine.\",\n \" \",\n \"Requires root access to run.\",\n \" \",\n ],\n buy: [\n \"Usage: buy [-l / -a / program]\",\n \" \",\n \"Purchase a program through the Dark Web. Requires a TOR router to use.\",\n \" \",\n \"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the \",\n \"dark web to the Terminal, as well as their costs.\",\n \" \",\n \"If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs.\",\n \" \",\n \"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.\",\n \" \",\n ],\n cat: [\n \"Usage: cat [file]\",\n \" \",\n \"Display message (.msg), literature (.lit), or text (.txt) files. Examples:\",\n \" \",\n \" cat j1.msg\",\n \" \",\n \" cat foo.lit\",\n \" \",\n \" cat servers.txt\",\n \" \",\n ],\n cd: [\n \"Usage: cd [dir]\",\n \" \",\n \"Change to the specified directory. Note that this works even for directories that don't exist. If you \",\n \"change to a directory that does not exist, it will not be 'created'. Examples:\",\n \" \",\n \" cd scripts/hacking\",\n \" \",\n \" cd /logs\",\n \" \",\n \" cd ../\",\n \" \",\n ],\n check: [\n \"Usage: check [script name] [args...]\",\n \" \",\n \"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by \",\n \"a space. Remember that a running script is uniquely \",\n \"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 1 2 foodnstuff\",\n \" \",\n \"Then to run the 'check' command on this script you would have to pass the same arguments in: \",\n \" \",\n \" check foo.script 1 2 foodnstuff\",\n \" \",\n ],\n clear: [\n \"Usage: clear\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"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 \" \",\n ],\n cls: [\n \"Usage: cls\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"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 \" \",\n ],\n connect: [\n \"Usage: connect [hostname]\",\n \" \",\n \"Connect to a remote server. The hostname of the remote server must be given as the argument \",\n \"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To \",\n \"see which servers can be connected to, use the 'scan' command.\",\n \" \",\n ],\n cp: [\"Usage: cp [src] [dst]\", \" \", \"Copy a file on this server. To copy a file to another server use scp.\", \" \"],\n download: [\n \"Usage: download [script/text file]\",\n \" \",\n \"Downloads a script or text file to your computer (like your real life computer).\",\n \" \",\n \"You can also download all of your scripts/text files as a zip file using the following Terminal commands:\",\n \" \",\n \"Download all scripts and text files: download *\",\n \" \",\n \"Download all scripts: download *.script\",\n \" \",\n \"Download all text files: download *.txt\",\n \" \",\n ],\n expr: [\n \"Usage: expr [mathematical expression]\",\n \" \",\n \"Evaluate a simple mathematical expression. Supports native JavaScript operators:\",\n \" \",\n \"+, -, /, *, **, %\",\n \" \",\n \"Example:\",\n \" \",\n \" expr 25 * 2 ** 10\",\n \" \",\n \"Note that letters (non-digits) are not allowed and will be removed from the input.\",\n \" \",\n ],\n free: [\n \"Usage: free\",\n \" \",\n \"Displays the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as \",\n \"how much of it is being used.\",\n \" \",\n ],\n grow: [\n \"Usage: grow\",\n \" \",\n \"Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.\",\n \"See the wiki page for hacking mechanics.\",\n \" \",\n ],\n hack: [\n \"Usage: hack\",\n \" \",\n \"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics\",\n \" \",\n ],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief \",\n \"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print \",\n \"more detailed information about the Terminal command. Examples: \",\n \" \",\n \" help alias\",\n \" \",\n \" help scan-analyze\",\n \" \",\n ],\n history: [\n \"Usage: history [-c]\",\n \" \",\n \"Without arguments, displays the terminal command history. To clear the history, pass in the '-c' argument.\",\n \" \",\n ],\n home: [\n \"Usage: home\", \" \", \"Connect to your home computer. This will work no matter what server you are currently connected to.\", \" \",\n ],\n hostname: [\"Usage: hostname\", \" \", \"Prints the hostname of the current server\", \" \"],\n kill: [\n \"Usage: kill [script name] [args...] or kill [pid\",\n \" \",\n \"Kill the script specified by the script name and arguments OR by its PID.\",\n \" \",\n \"If you are killing the script using its filename and arguments, then each \",\n \"argument must be separated by a space. Remember that a running script is \",\n \"uniquely identified by both its name and the arguments that are used to start \",\n \"it. So, if a script was ran with the following arguments:\",\n \" \",\n \" run foo.script 1 sigma-cosmetics\",\n \" \",\n \"Then to kill this script the same arguments would have to be used:\",\n \" \",\n \" kill foo.script 1 sigma-cosmetics\",\n \" \",\n \"If you are killing the script using its PID, then the PID argument must be numeric\",\n \" \",\n ],\n killall: [\n \"Usage: killall\",\n \" \",\n \"Kills all scripts on the current server. \",\n \"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. \",\n \"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. \",\n \"The script will not be stopped/killed until after that time has elapsed.\",\n \" \",\n ],\n ls: [\n \"Usage: ls [dir] [-l] [--grep pattern]\",\n \" \",\n \"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. \",\n \"The files will be displayed in alphabetical order. \",\n \" \",\n \"The 'dir' optional parameter can be used to display files/directories in another directory.\",\n \" \",\n \"The '-l' optional parameter allows you to force each item onto a single line.\",\n \" \",\n \"The '--grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.\",\n \" \",\n \"Examples:\",\n \" \",\n \"List all files with the '.script' extension in the current directory:\",\n \" \",\n \" ls -l --grep .script\",\n \" \",\n \"List all files with the '.js' extension in the root directory:\",\n \" \",\n \" ls / -l --grep .js\",\n \" \",\n \"List all files with the word 'purchase' in the filename, in the 'scripts' directory:\",\n \" \",\n \" ls scripts -l --grep purchase\",\n \" \",\n ],\n lscpu: [\"Usage: lscpu\", \" \", \"Prints the number of CPU Cores the current server has\", \" \"],\n\n mem: [\n \"Usage: mem [script name] [-t num_threads]\",\n \" \",\n \"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print \",\n \"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then \",\n \"an argument for the number of threads must be passed in afterwards. Examples:\",\n \" \",\n \" mem foo.script\",\n \" \",\n \" mem foo.script -t 50\",\n \" \",\n \"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example \",\n \"above will print the amount of RAM needed to run 'foo.script' with 50 threads.\",\n \" \",\n ],\n mv: [\n \"Usage: mv [src] [dest]\",\n \" \",\n \"Move the source file to the specified destination. This can also be used to rename files. \",\n \"This command only works for scripts and text files (.txt). This command CANNOT be used to \",\n \"convert to different file types\",\n \" \",\n \"Note that, unlike the Linux 'mv' command, the destination argument must be the \",\n \"full filepath. \",\n \"Examples: \",\n \" \",\n \" mv hacking-controller.script scripts/hacking-controller.script\",\n \" \",\n \" mv myScript.js myOldScript.js\",\n \" \",\n ],\n nano: TemplatedHelpTexts.scriptEditor('nano'),\n ps: [\"Usage: ps\", \" \", \"Prints all scripts that are running on the current server\", \" \"],\n rm: [\n \"Usage: rm [file]\",\n \" \",\n \"Removes the specified file from the current server. A file can be a script, a program, or a message file. \",\n \" \",\n \"WARNING: This is permanent and cannot be undone\",\n \" \",\n ],\n run: [\n \"Usage: run [file name] [-t] [num threads] [args...]\",\n \" \",\n \"Execute a program, script or coding contract.\",\n \" \",\n \"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used \",\n \"to indicate that the script should be run with the specified number of threads. If the flag is omitted, \",\n \"then the script will be run with a single thread by default. \",\n \"If the '-t' flag is used, then it MUST come immediately \",\n \"after the script name, and the [num threads] argument MUST come immediately afterwards. \",\n \" \",\n \"[args...] represents a variable number of arguments that will be passed into the script. See the documentation \",\n \"about script arguments. Each specified argument must be separated by a space. \",\n \" \",\n ],\n scan: [\n \"Usage: scan\",\n \" \",\n \"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect \",\n \"to using the 'connect' Terminal command.\",\n \" \",\n ],\n \"scan-analyze\": [\n \"Usage: scan-analyze [depth] [-a]\",\n \" \",\n \"Prints detailed information about all servers up to [depth] nodes away on the network. Calling \",\n \"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal \",\n \"command. This command also shows the relative paths to reach each server.\",\n \" \",\n \"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have \",\n \"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to \",\n \"5 and 10, respectively.\",\n \" \",\n \"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, \",\n \"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM \",\n \"it has.\",\n \" \",\n \"By default, this command will not display servers that you have purchased. However, you can pass in the \",\n \"-a flag at the end of the command if you would like to enable that.\",\n \" \",\n ],\n scp: [\n \"Usage: scp [filename ...] [target server]\",\n \" \",\n \"Copies the specified file(s) from the current server to the target server. \",\n \"This command only works for script files (.script or .js extension), literature files (.lit extension), \",\n \"and text files (.txt extension). \",\n \"The second argument passed in must be the hostname or IP of the target server. Examples:\",\n \" \",\n \" scp foo.script n00dles\",\n \" \",\n \" scp foo.script bar.script n00dles\",\n \" \",\n ],\n sudov: [\"Usage: sudov\", \" \", \"Prints whether or not you have root access to the current machine\", \" \"],\n\n tail: [\n \"Usage: tail [script name] [args...]\",\n \" \",\n \"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated \",\n \"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used \",\n \"to run it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 10 50000\",\n \" \",\n \"Then in order to check its logs with 'tail' the same arguments must be used: \",\n \" \",\n \" tail foo.script 10 50000\",\n \" \",\n ],\n top: [\n \"Usage: top\",\n \" \",\n \"Prints a list of all scripts running on the current server as well as their thread count and how much \",\n \"RAM they are using in total.\",\n \" \",\n ],\n unalias: [\n \"Usage: unalias [alias name]\",\n \" \",\n \"Deletes the specified alias. Note that the double quotation marks are required. \",\n \" \",\n \"As an example, if an alias was declared using:\",\n \" \",\n ' alias r=\"run\"',\n \" \",\n \"Then it could be removed using:\",\n \" \",\n \" unalias r\",\n \" \",\n \"It is not necessary to differentiate between global and non-global aliases when using 'unalias'\",\n \" \",\n ],\n vim: TemplatedHelpTexts.scriptEditor('vim'),\n weaken: [\n \"Usage: weaken\",\n \" \",\n \"Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.\",\n \"Requires root access. See the wiki page for hacking mechanics.\",\n \" \",\n ],\n wget: [\n \"Usage: wget [url] [target file]\",\n \" \",\n \"Retrieves data from a URL and downloads it to a file on the current server. The data can only \",\n \"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, \",\n \"it will be overwritten by this command.\",\n \" \",\n \"Note that it will not be possible to download data from many websites because they do not allow \",\n \"cross-origin resource sharing (CORS). Example:\",\n \" \",\n \" wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt\",\n \" \",\n ],\n};\n","import React from \"react\";\n\nimport { Page } from \"../ui/Router\";\nimport { hash } from \"../hash/hash\";\nimport { CONSTANTS } from \"../Constants\";\n\nenum GameEnv {\n Production,\n Development,\n}\n\nenum Platform {\n Browser,\n Steam,\n}\n\ninterface GameVersion {\n version: string;\n hash: string;\n\n toDisplay: () => string;\n}\n\ninterface BrowserFeatures {\n userAgent: string;\n language: string;\n cookiesEnabled: boolean;\n doNotTrack: string | null;\n indexedDb: boolean;\n}\n\ninterface IErrorMetadata {\n error: Error;\n errorInfo?: React.ErrorInfo;\n page?: Page;\n\n environment: GameEnv;\n platform: Platform;\n version: GameVersion;\n features: BrowserFeatures;\n}\n\nexport interface IErrorData {\n metadata: IErrorMetadata;\n\n title: string;\n body: string;\n\n features: string;\n fileName?: string;\n\n issueUrl: string;\n}\n\n\nexport const newIssueUrl = `https://github.com/danielyxie/bitburner/issues/new`;\n\nfunction getErrorMetadata(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorMetadata {\n const isElectron = navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1;\n const env = process.env.NODE_ENV === \"development\" ? GameEnv.Development : GameEnv.Production;\n const version: GameVersion = {\n version: CONSTANTS.VersionString,\n hash: hash(),\n toDisplay: () => `v${CONSTANTS.VersionString} (${hash()})`,\n }\n const features: BrowserFeatures = {\n userAgent: navigator.userAgent,\n\n language: navigator.language,\n cookiesEnabled: navigator.cookieEnabled,\n doNotTrack: navigator.doNotTrack,\n indexedDb: (!!window.indexedDB),\n }\n const metadata: IErrorMetadata = {\n platform: isElectron ? Platform.Steam : Platform.Browser,\n environment: env,\n version, features,\n error, errorInfo, page,\n }\n return metadata;\n}\n\nexport function getErrorForDisplay(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorData {\n const metadata = getErrorMetadata(error, errorInfo, page);\n const fileName = (metadata.error as any).fileName;\n const features = `lang=${metadata.features.language} cookiesEnabled=${metadata.features.cookiesEnabled.toString()}` +\n ` doNotTrack=${metadata.features.doNotTrack} indexedDb=${metadata.features.indexedDb.toString()}`;\n\n const title = `${metadata.error.name}: ${metadata.error.message}${metadata.page && ` (at \"${Page[metadata.page]}\")`}`;\n const body = `\n## ${title}\n\n### How did this happen?\n\nPlease fill this information with details if relevant.\n\n- [ ] Save file\n- [ ] Minimal scripts to reproduce the issue\n- [ ] Steps to reproduce\n\n### Environment\n\n* Error: ${metadata.error?.toString() ?? 'n/a'}\n* Page: ${metadata.page ? Page[metadata.page] : 'n/a'}\n* Version: ${metadata.version.toDisplay()}\n* Environment: ${GameEnv[metadata.environment]}\n* Platform: ${Platform[metadata.platform]}\n* UserAgent: ${navigator.userAgent}\n* Features: ${features}\n* Source: ${fileName ?? 'n/a'}\n\n${metadata.environment === GameEnv.Development ? `\n### Stack Trace\n\\`\\`\\`\n${metadata.errorInfo?.componentStack.toString().trim()}\n\\`\\`\\`\n` : ''}\n### Save\n\\`\\`\\`\nCopy your save here if possible\n\\`\\`\\`\n`.trim();\n\n const issueUrl = `${newIssueUrl}?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`;\n\n const data: IErrorData = {\n metadata,\n fileName,\n features,\n title,\n body,\n issueUrl,\n }\n return data;\n}\n","import { getRandomInt } from \"./getRandomInt\";\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 */\nexport function getRandomByte(max: number): number {\n // Technically 2^8 is 256, but the values are 0-255, not 1-256.\n const byteMaximum = 255;\n const upper: number = Math.max(Math.min(max, byteMaximum), 0);\n\n return getRandomInt(0, upper);\n}\n","import { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\nexport const Growths: {\n [key: string]: (() => number) | undefined;\n [\"Tracking\"]: () => number;\n [\"Bounty Hunter\"]: () => number;\n [\"Retirement\"]: () => number;\n [\"Investigation\"]: () => number;\n [\"Undercover Operation\"]: () => number;\n [\"Sting Operation\"]: () => number;\n [\"Raid\"]: () => number;\n [\"Stealth Retirement Operation\"]: () => number;\n [\"Assassination\"]: () => number;\n} = {\n Tracking: () => getRandomInt(5, 75) / 10,\n \"Bounty Hunter\": () => getRandomInt(5, 75) / 10,\n Retirement: () => getRandomInt(5, 75) / 10,\n Investigation: () => getRandomInt(10, 40) / 10,\n \"Undercover Operation\": () => getRandomInt(10, 40) / 10,\n \"Sting Operation\": () => getRandomInt(3, 40) / 10,\n Raid: () => getRandomInt(2, 40) / 10,\n \"Stealth Retirement Operation\": () => getRandomInt(1, 20) / 10,\n Assassination: () => getRandomInt(1, 20) / 10,\n};\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 */\nimport { Cities } from \"./Cities\";\nimport { IMap } from \"../types\";\n\nexport function createCityMap(initValue: T): IMap {\n const map: IMap = {};\n const cities = Object.keys(Cities);\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n // round try JSON so to make sure none of the initial values have the same references.\n return JSON.parse(JSON.stringify(map));\n}\n","/**\n * Represents a Hand of cards.\n *\n * This class is IMMUTABLE\n */\n\nimport { Card } from \"./Card\";\n\nexport class Hand {\n constructor(readonly cards: readonly Card[]) {}\n\n addCards(...cards: Card[]): Hand {\n return new Hand([...this.cards, ...cards]);\n }\n\n removeByIndex(i: number): Hand {\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 * React Component for a button that initiates a transaction on the Stock Market UI\n * (Buy, Sell, Buy Max, etc.)\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\ntype IProps = {\n onClick: () => void;\n text: string;\n tooltip?: JSX.Element | null;\n};\n\nexport function StockTickerTxButton(props: IProps): React.ReactElement {\n return (\n {props.tooltip} : \"\"}>\n \n \n );\n}\n","/**\n * Abstract Base Class for any Server object\n */\nimport { CodingContract } from \"../CodingContracts\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { isValidFilePath } from \"../Terminal/DirectoryHelpers\";\nimport { TextFile } from \"../TextFile\";\nimport { IReturnStatus } from \"../types\";\n\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\ninterface writeResult {\n success: boolean;\n overwritten: boolean;\n}\n\nexport class BaseServer {\n // Coding Contract files on this server\n contracts: CodingContract[] = [];\n\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n cpuCores = 1;\n\n // Flag indicating whether the FTP port is open\n ftpPortOpen = false;\n\n // Flag indicating whether player has admin/root access to this server\n hasAdminRights = false;\n\n // Hostname. Must be unique\n hostname = \"\";\n\n // Flag indicating whether HTTP Port is open\n httpPortOpen = false;\n\n // IP Address. Must be unique\n ip = \"\";\n\n // Flag indicating whether player is curently connected to this server\n isConnectedTo = false;\n\n // RAM (GB) available on this server\n maxRam = 0;\n\n // Message files AND Literature files on this Server\n messages: string[] = [];\n\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n organizationName = \"\";\n\n // Programs on this servers. Contains only the names of the programs\n programs: string[] = [];\n\n // RAM (GB) used. i.e. unavailable RAM\n ramUsed = 0;\n\n // RunningScript files on this server\n runningScripts: RunningScript[] = [];\n\n // Script files on this Server\n scripts: Script[] = [];\n\n // Contains the hostnames of all servers that are immediately\n // reachable from this one\n serversOnNetwork: string[] = [];\n\n // Flag indicating whether SMTP Port is open\n smtpPortOpen = false;\n\n // Flag indicating whether SQL Port is open\n sqlPortOpen = false;\n\n // Flag indicating whether the SSH Port is open\n sshPortOpen = false;\n\n // Text files on this server\n textFiles: TextFile[] = [];\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = false;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n this.ip = params.ip ? params.ip : createRandomIp();\n\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false;\n\n //Access information\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract: CodingContract): void {\n this.contracts.push(contract);\n }\n\n getContract(contractName: string): CodingContract | null {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n return null;\n }\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 getRunningScript(scriptName: string, scriptArgs: any[]): RunningScript | null {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && compareArrays(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n getScript(scriptName: string): Script | null {\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 /**\n * Returns boolean indicating whether the given script is running on this server\n */\n isRunning(fn: string): boolean {\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: CodingContract | string): void {\n if (contract instanceof CodingContract) {\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 /**\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 removeFile(fn: string): IReturnStatus {\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 { res: true };\n }\n }\n } else if (isScriptFilename(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 { res: true };\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 if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return { res: true };\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 { res: true };\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 { res: true };\n }\n }\n }\n\n return { res: false, 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 runScript(script: RunningScript): void {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram: number): void {\n this.maxRam = ram;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n updateRamUsed(ram: number, player: IPlayer): void {\n this.ramUsed = ram;\n }\n\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n writeToScriptFile(player: IPlayer, fn: string, code: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !isScriptFilename(fn)) {\n return ret;\n }\n\n // Check if the script already exists, and overwrite it if it does\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(player, this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise, create a new script\n const newScript = new Script(player, fn, code, this.hostname, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n }\n\n // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n writeToTextFile(fn: string, txt: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n }\n\n // Check if the text file already exists, and overwrite if it does\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 }\n\n // Otherwise create a new text file\n const newFile = new TextFile(fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { CodingContract, CodingContractTypes } from \"../../CodingContracts\";\nimport { CopyableText } from \"./CopyableText\";\nimport { Modal } from \"./Modal\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n c: CodingContract;\n onClose: () => void;\n onAttempt: (answer: string) => void;\n}\n\nexport const CodingContractEvent = new EventEmitter<[IProps]>();\n\nexport function CodingContractModal(): React.ReactElement {\n const [props, setProps] = useState(null);\n const [answer, setAnswer] = useState(\"\");\n\n useEffect(() => {\n CodingContractEvent.subscribe((props) => setProps(props));\n });\n if (props === null) return <>;\n\n function onChange(event: React.ChangeEvent): void {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (props === null) return;\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 as any).value;\n\n if (event.key === KEY.ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }\n }\n\n function close(): void {\n if (props === null) return;\n props.onClose();\n setProps(null);\n }\n\n const contractType = CodingContractTypes[props.c.type];\n const description = [];\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries())\n description.push(\" }}>);\n return (\n \n \n \n You are attempting to solve a Coding Contract. You have {props.c.getMaxNumTries() - props.c.tries} tries\n remaining, after which the contract will self-destruct.\n \n
\n {description}\n
\n {\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }}\n >\n Solve\n \n ),\n }}\n />\n
\n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const BitFlumeEvent = new EventEmitter<[]>();\n\nexport function BitFlumeModal(): React.ReactElement {\n const router = use.Router();\n const [open, setOpen] = useState(false);\n function flume(): void {\n router.toBitVerse(true, false);\n setOpen(false);\n }\n\n useEffect(() => BitFlumeEvent.subscribe(() => setOpen(true)), []);\n\n return (\n setOpen(false)}>\n \n WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.\n
\n
\n Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.\n
\n
\n
\n \n
\n );\n}\n","import * as augmentationMethods from \"./PlayerObjectAugmentationMethods\";\nimport * as bladeburnerMethods from \"./PlayerObjectBladeburnerMethods\";\nimport * as corporationMethods from \"./PlayerObjectCorporationMethods\";\nimport * as gangMethods from \"./PlayerObjectGangMethods\";\nimport * as generalMethods from \"./PlayerObjectGeneralMethods\";\nimport * as serverMethods from \"./PlayerObjectServerMethods\";\n\nimport { IMap } from \"../../types\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport { IPlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Company } from \"../../Company/Company\";\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ICodingContractReward } from \"../../CodingContracts\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { IPlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { ICorporation } from \"../../Corporation/ICorporation\";\nimport { IGang } from \"../../Gang/IGang\";\nimport { IBladeburner } from \"../../Bladeburner/IBladeburner\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\n\nimport { HashManager } from \"../../Hacknet/HashManager\";\nimport { CityName } from \"../../Locations/data/CityNames\";\n\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../../utils/JSONReviver\";\nimport { ISkillProgress } from \"../formulas/skill\";\nimport { PlayerAchievement } from \"../../Achievements/Achievements\";\nimport { cyrb53 } from \"../../utils/StringHelperFunctions\";\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\nexport class PlayerObject implements IPlayer {\n // Class members\n augmentations: IPlayerOwnedAugmentation[];\n bitNodeN: number;\n city: CityName;\n companyName: string;\n corporation: ICorporation | null;\n gang: IGang | null;\n bladeburner: IBladeburner | null;\n currentServer: string;\n factions: string[];\n factionInvitations: string[];\n hacknetNodes: (HacknetNode | string)[]; // HacknetNode object or IP of Hacknet Server\n has4SData: boolean;\n has4SDataTixApi: boolean;\n hashManager: HashManager;\n hasTixApiAccess: boolean;\n hasWseAccount: boolean;\n hp: number;\n jobs: IMap;\n init: () => void;\n isWorking: boolean;\n karma: number;\n numPeopleKilled: number;\n location: LocationName;\n max_hp: number;\n money: number;\n moneySourceA: MoneySourceTracker;\n moneySourceB: MoneySourceTracker;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n purchasedServers: any[];\n queuedAugmentations: IPlayerOwnedAugmentation[];\n scriptProdSinceLastAug: number;\n sleeves: Sleeve[];\n sleevesFromCovenant: number;\n sourceFiles: IPlayerOwnedSourceFile[];\n exploits: Exploit[];\n achievements: PlayerAchievement[];\n terminalCommandHistory: string[];\n identifier: string;\n lastUpdate: number;\n lastSave: number;\n totalPlaytime: number;\n\n // Stats\n hacking: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n\n // Experience\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n intelligence_exp: number;\n\n // Multipliers\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_mult: number;\n hacking_exp_mult: number;\n strength_mult: number;\n strength_exp_mult: number;\n defense_mult: number;\n defense_exp_mult: number;\n dexterity_mult: number;\n dexterity_exp_mult: number;\n agility_mult: number;\n agility_exp_mult: number;\n charisma_mult: number;\n charisma_exp_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n work_money_mult: number;\n crime_success_mult: number;\n crime_money_mult: number;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n\n createProgramReqLvl: number;\n factionWorkType: string;\n createProgramName: string;\n timeWorkedCreateProgram: number;\n graftAugmentationName: string;\n timeWorkedGraftAugmentation: number;\n crimeType: string;\n committingCrimeThruSingFn: boolean;\n singFnCrimeWorkerScript: WorkerScript | null;\n timeNeededToCompleteWork: number;\n focus: boolean;\n className: string;\n currentWorkFactionName: string;\n workType: string;\n workCostMult: number;\n workExpMult: number;\n currentWorkFactionDescription: string;\n timeWorked: number;\n workMoneyGained: number;\n workMoneyGainRate: number;\n workRepGained: number;\n workRepGainRate: number;\n workHackExpGained: number;\n workHackExpGainRate: number;\n workStrExpGained: number;\n workStrExpGainRate: number;\n workDefExpGained: number;\n workDefExpGainRate: number;\n workDexExpGained: number;\n workDexExpGainRate: number;\n workAgiExpGained: number;\n workAgiExpGainRate: number;\n workChaExpGained: number;\n workChaExpGainRate: number;\n workMoneyLossRate: number;\n\n entropy: number;\n\n // Methods\n work: (numCycles: number) => boolean;\n workPartTime: (numCycles: number) => boolean;\n workForFaction: (numCycles: number) => boolean;\n applyForAgentJob: (sing?: boolean) => boolean;\n applyForBusinessConsultantJob: (sing?: boolean) => boolean;\n applyForBusinessJob: (sing?: boolean) => boolean;\n applyForEmployeeJob: (sing?: boolean) => boolean;\n applyForItJob: (sing?: boolean) => boolean;\n applyForJob: (entryPosType: CompanyPosition, sing?: boolean) => boolean;\n applyForNetworkEngineerJob: (sing?: boolean) => boolean;\n applyForPartTimeEmployeeJob: (sing?: boolean) => boolean;\n applyForPartTimeWaiterJob: (sing?: boolean) => boolean;\n applyForSecurityEngineerJob: (sing?: boolean) => boolean;\n applyForSecurityJob: (sing?: boolean) => boolean;\n applyForSoftwareConsultantJob: (sing?: boolean) => boolean;\n applyForSoftwareJob: (sing?: boolean) => boolean;\n applyForWaiterJob: (sing?: boolean) => boolean;\n canAccessBladeburner: () => boolean;\n canAccessCorporation: () => boolean;\n canAccessGang: () => boolean;\n canAccessGrafting: () => boolean;\n canAfford: (cost: number) => boolean;\n gainHackingExp: (exp: number) => void;\n gainStrengthExp: (exp: number) => void;\n gainDefenseExp: (exp: number) => void;\n gainDexterityExp: (exp: number) => void;\n gainAgilityExp: (exp: number) => void;\n gainCharismaExp: (exp: number) => void;\n gainIntelligenceExp: (exp: number) => void;\n gainMoney: (money: number, source: string) => void;\n getCurrentServer: () => BaseServer;\n getGangFaction: () => Faction;\n getGangName: () => string;\n getHomeComputer: () => Server;\n getNextCompanyPosition: (company: Company, entryPosType: CompanyPosition) => CompanyPosition | null;\n getUpgradeHomeRamCost: () => number;\n getUpgradeHomeCoresCost: () => number;\n gotoLocation: (to: LocationName) => boolean;\n hasAugmentation: (aug: string | Augmentation, installed?: boolean) => boolean;\n hasCorporation: () => boolean;\n hasGangWith: (facName: string) => boolean;\n hasTorRouter: () => boolean;\n hasProgram: (program: string) => boolean;\n inBladeburner: () => boolean;\n inGang: () => boolean;\n isQualified: (company: Company, position: CompanyPosition) => boolean;\n loseMoney: (money: number, source: string) => void;\n reapplyAllAugmentations: (resetMultipliers?: boolean) => void;\n reapplyAllSourceFiles: () => void;\n regenerateHp: (amt: number) => void;\n recordMoneySource: (amt: number, source: string) => void;\n setMoney: (amt: number) => void;\n singularityStopWork: () => string;\n startBladeburner: (p: any) => void;\n startFactionWork: (faction: Faction) => void;\n startClass: (costMult: number, expMult: number, className: string) => void;\n startCorporation: (corpName: string, additionalShares?: number) => void;\n startCrime: (\n router: IRouter,\n crimeType: string,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n singParams: any,\n ) => void;\n startFactionFieldWork: (faction: Faction) => void;\n startFactionHackWork: (faction: Faction) => void;\n startFactionSecurityWork: (faction: Faction) => void;\n startFocusing: () => void;\n startGang: (facName: string, isHacking: boolean) => void;\n startWork: (companyName: string) => void;\n startWorkPartTime: (companyName: string) => void;\n takeDamage: (amt: number) => boolean;\n travel: (to: CityName) => boolean;\n giveExploit: (exploit: Exploit) => void;\n giveAchievement: (achievementId: string) => void;\n queryStatFromString: (str: string) => number;\n getIntelligenceBonus: (weight: number) => number;\n getCasinoWinnings: () => number;\n quitJob: (company: string) => void;\n hasJob: () => boolean;\n process: (router: IRouter, numCycles?: number) => void;\n createHacknetServer: () => HacknetServer;\n startCreateProgramWork: (programName: string, time: number, reqLevel: number) => void;\n queueAugmentation: (augmentationName: string) => void;\n receiveInvite: (factionName: string) => void;\n updateSkillLevels: () => void;\n gainCodingContractReward: (reward: ICodingContractReward, difficulty?: number) => string;\n stopFocusing: () => void;\n finishFactionWork: (cancelled: boolean, sing?: boolean) => string;\n finishClass: (sing?: boolean) => string;\n finishWork: (cancelled: boolean, sing?: boolean) => string;\n cancelationPenalty: () => number;\n finishWorkPartTime: (sing?: boolean) => string;\n finishCrime: (cancelled: boolean) => string;\n finishCreateProgramWork: (cancelled: boolean) => string;\n resetMultipliers: () => void;\n prestigeAugmentation: () => void;\n prestigeSourceFile: () => void;\n calculateSkill: (exp: number, mult?: number) => number;\n calculateSkillProgress: (exp: number, mult?: number) => ISkillProgress;\n resetWorkStatus: (generalType?: string, group?: string, workType?: string) => void;\n getWorkHackExpGain: () => number;\n getWorkStrExpGain: () => number;\n getWorkDefExpGain: () => number;\n getWorkDexExpGain: () => number;\n getWorkAgiExpGain: () => number;\n getWorkChaExpGain: () => number;\n getWorkRepGain: () => number;\n getWorkMoneyGain: () => number;\n processWorkEarnings: (cycles: number) => void;\n hospitalize: () => void;\n createProgramWork: (numCycles: number) => boolean;\n takeClass: (numCycles: number) => boolean;\n commitCrime: (numCycles: number) => boolean;\n checkForFactionInvitations: () => Faction[];\n setBitNodeNumber: (n: number) => void;\n getMult: (name: string) => number;\n setMult: (name: string, mult: number) => void;\n canAccessCotMG: () => boolean;\n sourceFileLvl: (n: number) => number;\n startGraftAugmentationWork: (augmentationName: string, time: number) => void;\n graftAugmentationWork: (numCycles: number) => boolean;\n finishGraftAugmentationWork: (cancelled: boolean) => string;\n applyEntropy: (stacks?: number) => void;\n\n constructor() {\n //Skills and stats\n this.hacking = 1;\n\n //Combat stats\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;\n\n //Labor stats\n this.charisma = 1;\n\n //Special stats\n this.intelligence = 0;\n\n //Hacking multipliers\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\n //Experience and multipliers\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\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\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\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n //Money\n this.money = 1000;\n\n //Location information\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n // 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 this.jobs = {};\n\n // Company at which player is CURRENTLY working (only valid when the player is actively working)\n this.companyName = \"\"; // Name of Company. Must match a key value in Companies ma;\n\n // Servers\n this.currentServer = \"\"; //hostname of Server currently being accessed through termina;\n this.purchasedServers = []; //hostnames of purchased server;\n\n // Hacknet Nodes/Servers\n this.hacknetNodes = []; // Note= For Hacknet Servers, this array holds the hostnames of the server;\n this.hashManager = new HashManager();\n\n //Factions\n this.factions = []; //Names of all factions player has joine;\n this.factionInvitations = []; //Outstanding faction invitation;\n\n //Augmentations\n this.queuedAugmentations = [];\n this.augmentations = [];\n\n this.sourceFiles = [];\n\n //Crime statistics\n this.numPeopleKilled = 0;\n this.karma = 0;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n //Flags/variables for working (Company, Faction, Creating Program, Taking Class)\n this.isWorking = false;\n this.focus = false;\n this.workType = \"\";\n this.workCostMult = 1;\n this.workExpMult = 1;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n\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\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\n this.createProgramName = \"\";\n this.createProgramReqLvl = 0;\n\n this.graftAugmentationName = \"\";\n this.timeWorkedGraftAugmentation = 0;\n\n this.className = \"\";\n\n this.crimeType = \"\";\n\n this.timeWorked = 0; //in m;\n this.timeWorkedCreateProgram = 0;\n this.timeNeededToCompleteWork = 0;\n\n this.work_money_mult = 1;\n\n //Hacknet Node multipliers\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\n //Stock Market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n //Gang\n this.gang = null;\n\n //Corporation\n this.corporation = null;\n\n //Bladeburner\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 Onl;\n this.bladeburner_success_chance_mult = 1;\n\n // Sleeves & Re-sleeving\n this.sleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenan;\n //bitnode\n this.bitNodeN = 1;\n\n this.entropy = 0;\n\n //Used to store the last update time.\n this.lastUpdate = 0;\n this.lastSave = 0;\n this.totalPlaytime = 0;\n\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0;\n\n // Keep track of where money comes from\n this.moneySourceA = new MoneySourceTracker(); // Where money comes from since last-installed Augmentatio;\n this.moneySourceB = new MoneySourceTracker(); // Where money comes from for this entire BitNode ru;\n // Production since last Augmentation installation\n this.scriptProdSinceLastAug = 0;\n\n this.exploits = [];\n this.achievements = [];\n this.terminalCommandHistory = [];\n\n // Let's get a hash of some semi-random stuff so we have something unique.\n this.identifier = cyrb53(\n \"I-\" +\n new Date().getTime() +\n navigator.userAgent +\n window.innerWidth +\n window.innerHeight +\n getRandomInt(100, 999),\n );\n\n this.init = generalMethods.init;\n this.prestigeAugmentation = generalMethods.prestigeAugmentation;\n this.prestigeSourceFile = generalMethods.prestigeSourceFile;\n this.receiveInvite = generalMethods.receiveInvite;\n this.calculateSkill = generalMethods.calculateSkill;\n this.calculateSkillProgress = generalMethods.calculateSkillProgress;\n this.updateSkillLevels = generalMethods.updateSkillLevels;\n this.resetMultipliers = generalMethods.resetMultipliers;\n this.hasProgram = generalMethods.hasProgram;\n this.setMoney = generalMethods.setMoney;\n this.gainMoney = generalMethods.gainMoney;\n this.loseMoney = generalMethods.loseMoney;\n this.canAfford = generalMethods.canAfford;\n this.recordMoneySource = generalMethods.recordMoneySource;\n this.gainHackingExp = generalMethods.gainHackingExp;\n this.gainStrengthExp = generalMethods.gainStrengthExp;\n this.gainDefenseExp = generalMethods.gainDefenseExp;\n this.gainDexterityExp = generalMethods.gainDexterityExp;\n this.gainAgilityExp = generalMethods.gainAgilityExp;\n this.gainCharismaExp = generalMethods.gainCharismaExp;\n this.gainIntelligenceExp = generalMethods.gainIntelligenceExp;\n this.queryStatFromString = generalMethods.queryStatFromString;\n this.resetWorkStatus = generalMethods.resetWorkStatus;\n this.processWorkEarnings = generalMethods.processWorkEarnings;\n this.startWork = generalMethods.startWork;\n this.cancelationPenalty = generalMethods.cancelationPenalty;\n this.work = generalMethods.work;\n this.finishWork = generalMethods.finishWork;\n this.startWorkPartTime = generalMethods.startWorkPartTime;\n this.workPartTime = generalMethods.workPartTime;\n this.finishWorkPartTime = generalMethods.finishWorkPartTime;\n this.startFocusing = generalMethods.startFocusing;\n this.stopFocusing = generalMethods.stopFocusing;\n this.startFactionWork = generalMethods.startFactionWork;\n this.startFactionHackWork = generalMethods.startFactionHackWork;\n this.startFactionFieldWork = generalMethods.startFactionFieldWork;\n this.startFactionSecurityWork = generalMethods.startFactionSecurityWork;\n this.workForFaction = generalMethods.workForFaction;\n this.finishFactionWork = generalMethods.finishFactionWork;\n this.getWorkMoneyGain = generalMethods.getWorkMoneyGain;\n this.getWorkHackExpGain = generalMethods.getWorkHackExpGain;\n this.getWorkStrExpGain = generalMethods.getWorkStrExpGain;\n this.getWorkDefExpGain = generalMethods.getWorkDefExpGain;\n this.getWorkDexExpGain = generalMethods.getWorkDexExpGain;\n this.getWorkAgiExpGain = generalMethods.getWorkAgiExpGain;\n this.getWorkChaExpGain = generalMethods.getWorkChaExpGain;\n this.getWorkRepGain = generalMethods.getWorkRepGain;\n this.process = generalMethods.process;\n this.startCreateProgramWork = generalMethods.startCreateProgramWork;\n this.createProgramWork = generalMethods.createProgramWork;\n this.finishCreateProgramWork = generalMethods.finishCreateProgramWork;\n this.startGraftAugmentationWork = generalMethods.startGraftAugmentationWork;\n this.graftAugmentationWork = generalMethods.craftAugmentationWork;\n this.finishGraftAugmentationWork = generalMethods.finishGraftAugmentationWork;\n this.startClass = generalMethods.startClass;\n this.takeClass = generalMethods.takeClass;\n this.finishClass = generalMethods.finishClass;\n this.startCrime = generalMethods.startCrime;\n this.commitCrime = generalMethods.commitCrime;\n this.finishCrime = generalMethods.finishCrime;\n this.singularityStopWork = generalMethods.singularityStopWork;\n this.takeDamage = generalMethods.takeDamage;\n this.regenerateHp = generalMethods.regenerateHp;\n this.hospitalize = generalMethods.hospitalize;\n this.applyForJob = generalMethods.applyForJob;\n this.getNextCompanyPosition = generalMethods.getNextCompanyPosition;\n this.quitJob = generalMethods.quitJob;\n this.hasJob = generalMethods.hasJob;\n this.applyForSoftwareJob = generalMethods.applyForSoftwareJob;\n this.applyForSoftwareConsultantJob = generalMethods.applyForSoftwareConsultantJob;\n this.applyForItJob = generalMethods.applyForItJob;\n this.applyForSecurityEngineerJob = generalMethods.applyForSecurityEngineerJob;\n this.applyForNetworkEngineerJob = generalMethods.applyForNetworkEngineerJob;\n this.applyForBusinessJob = generalMethods.applyForBusinessJob;\n this.applyForBusinessConsultantJob = generalMethods.applyForBusinessConsultantJob;\n this.applyForSecurityJob = generalMethods.applyForSecurityJob;\n this.applyForAgentJob = generalMethods.applyForAgentJob;\n this.applyForEmployeeJob = generalMethods.applyForEmployeeJob;\n this.applyForPartTimeEmployeeJob = generalMethods.applyForPartTimeEmployeeJob;\n this.applyForWaiterJob = generalMethods.applyForWaiterJob;\n this.applyForPartTimeWaiterJob = generalMethods.applyForPartTimeWaiterJob;\n this.isQualified = generalMethods.isQualified;\n this.reapplyAllAugmentations = generalMethods.reapplyAllAugmentations;\n this.reapplyAllSourceFiles = generalMethods.reapplyAllSourceFiles;\n this.checkForFactionInvitations = generalMethods.checkForFactionInvitations;\n this.setBitNodeNumber = generalMethods.setBitNodeNumber;\n this.queueAugmentation = generalMethods.queueAugmentation;\n this.gainCodingContractReward = generalMethods.gainCodingContractReward;\n this.travel = generalMethods.travel;\n this.gotoLocation = generalMethods.gotoLocation;\n this.canAccessGrafting = generalMethods.canAccessGrafting;\n this.giveExploit = generalMethods.giveExploit;\n this.giveAchievement = generalMethods.giveAchievement;\n this.getIntelligenceBonus = generalMethods.getIntelligenceBonus;\n this.getCasinoWinnings = generalMethods.getCasinoWinnings;\n this.hasAugmentation = augmentationMethods.hasAugmentation;\n this.canAccessBladeburner = bladeburnerMethods.canAccessBladeburner;\n this.inBladeburner = bladeburnerMethods.inBladeburner;\n this.startBladeburner = bladeburnerMethods.startBladeburner;\n this.canAccessCorporation = corporationMethods.canAccessCorporation;\n this.hasCorporation = corporationMethods.hasCorporation;\n this.startCorporation = corporationMethods.startCorporation;\n this.canAccessGang = gangMethods.canAccessGang;\n this.getGangFaction = gangMethods.getGangFaction;\n this.getGangName = gangMethods.getGangName;\n this.hasGangWith = gangMethods.hasGangWith;\n this.inGang = gangMethods.inGang;\n this.startGang = gangMethods.startGang;\n\n this.hasTorRouter = serverMethods.hasTorRouter;\n this.getCurrentServer = serverMethods.getCurrentServer;\n this.getHomeComputer = serverMethods.getHomeComputer;\n this.getUpgradeHomeRamCost = serverMethods.getUpgradeHomeRamCost;\n this.getUpgradeHomeCoresCost = serverMethods.getUpgradeHomeCoresCost;\n this.createHacknetServer = serverMethods.createHacknetServer;\n this.factionWorkType = \"\";\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n\n this.getMult = generalMethods.getMult;\n this.setMult = generalMethods.setMult;\n\n this.canAccessCotMG = generalMethods.canAccessCotMG;\n this.sourceFileLvl = generalMethods.sourceFileLvl;\n\n this.applyEntropy = augmentationMethods.applyEntropy;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"PlayerObject\", this);\n }\n\n /**\n * Initiatizes a PlayerObject object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): PlayerObject {\n return Generic_fromJSON(PlayerObject, value.data);\n }\n}\n\nReviver.constructors.PlayerObject = PlayerObject;\n","import React, { useState, useEffect } from \"react\";\nimport { joinFaction } from \"../FactionHelpers\";\nimport { Faction } from \"../Faction\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const InvitationEvent = new EventEmitter<[Faction]>();\n\nexport function InvitationModal(): React.ReactElement {\n const [faction, setFaction] = useState(null);\n const player = use.Player();\n function join(): void {\n if (faction === null) return;\n //Remove from invited factions\n const i = player.factionInvitations.findIndex((facName) => facName === faction.name);\n if (i === -1) {\n console.error(\"Could not find faction in Player.factionInvitations\");\n }\n joinFaction(faction);\n setFaction(null);\n }\n\n useEffect(() => InvitationEvent.subscribe((faction) => setFaction(faction)), []);\n\n return (\n setFaction(null)}>\n You have received a faction invitation.\n \n Would you like to join {(faction || { name: \"\" }).name}?
\n
\n Warning: Joining this faction may prevent you from joining other factions during this run!\n
\n \n \n
\n );\n}\n","import { Literatures } from \"./Literatures\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function showLiterature(fn: string): void {\n const litObj = Literatures[fn];\n if (litObj == null) {\n return;\n }\n const txt = `${litObj.title}

${litObj.txt}`;\n dialogBoxCreate(txt);\n}\n","import { ITaskParams, ITerritory } from \"./ITaskParams\";\n\nexport class GangMemberTask {\n name: string;\n desc: string;\n\n isHacking: boolean;\n isCombat: boolean;\n\n baseRespect: number;\n baseWanted: number;\n baseMoney: number;\n\n hackWeight: number;\n strWeight: number;\n defWeight: number;\n dexWeight: number;\n agiWeight: number;\n chaWeight: number;\n\n difficulty: number;\n\n territory: ITerritory;\n\n // Defines tasks that Gang Members can work on\n constructor(name: string, desc: string, isHacking: boolean, isCombat: boolean, params: ITaskParams) {\n this.name = name;\n this.desc = desc;\n\n // Flags that describe whether this Task is applicable for Hacking/Combat gangs\n this.isHacking = isHacking;\n this.isCombat = isCombat;\n\n // Base gain rates for respect/wanted/money\n this.baseRespect = params.baseRespect ? params.baseRespect : 0;\n this.baseWanted = params.baseWanted ? params.baseWanted : 0;\n this.baseMoney = params.baseMoney ? params.baseMoney : 0;\n\n // Weighting for the effect that each stat has on the tasks effectiveness.\n // Weights must add up to 100\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 (\n Math.round(\n this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight,\n ) != 100\n ) {\n console.error(`GangMemberTask ${this.name} weights do not add up to 100`);\n }\n\n // 1 - 100\n this.difficulty = params.difficulty ? params.difficulty : 1;\n\n // 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 this.territory = params.territory ? params.territory : { money: 1, respect: 1, wanted: 1 };\n }\n}\n","export class PlayerOwnedSourceFile {\n // Source-File level\n lvl = 1;\n\n // Source-File number\n n = 1;\n\n constructor(n: number, level: number) {\n this.n = n;\n this.lvl = level;\n }\n}\n\nexport interface IPlayerOwnedSourceFile {\n lvl: number;\n n: number;\n}\n","import { RunningScript } from \"src/Script/RunningScript\";\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const recentScripts: RecentScript[] = [];\n\nexport function AddRecentScript(workerScript: WorkerScript): void {\n if (recentScripts.find((r) => r.pid === workerScript.pid)) return;\n recentScripts.unshift({\n filename: workerScript.name,\n args: workerScript.args,\n pid: workerScript.pid,\n timestamp: new Date(),\n\n runningScript: workerScript.scriptRef,\n });\n while (recentScripts.length > 50) {\n recentScripts.pop();\n }\n}\n\nexport interface RecentScript {\n filename: string;\n args: string[];\n pid: number;\n timestamp: Date;\n runningScript: RunningScript;\n}\n","import * as acorn from \"acorn\";\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(\"use strict\");\n\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 */\nvar Interpreter = function (code, opt_initFunc, lineOffset = 0) {\n this.sourceCode = code;\n this.sourceCodeLineOffset = lineOffset;\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n this.ast = code;\n this.initFunc_ = opt_initFunc;\n this.paused_ = false;\n this.polyfills_ = [];\n // Unique identifier for native functions. Used in serialization.\n this.functionCounter_ = 0;\n // Map node types to our step function names; a property lookup is faster\n // than string concatenation with \"step\" prefix.\n this.stepFunctions_ = Object.create(null);\n var stepMatch = /^step([A-Z]\\w*)$/;\n var m;\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 }\n // Create and initialize the global scope.\n this.global = this.createScope(this.ast, null);\n // Run the polyfills.\n this.ast = acorn.parse(this.polyfills_.join(\"\\n\"), Interpreter.PARSE_OPTIONS);\n this.polyfills_ = undefined; // Allow polyfill strings to garbage collect.\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;\n // Point at the main program.\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;\n // Get a handle on Acorn's node_t object. It's tricky to access.\n this.nodeConstructor = state.node.constructor;\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"stateStack\"] = this.stateStack;\n};\n\n/**\n * @const {!Object} Configuration used for all Acorn parsing.\n */\nInterpreter.PARSE_OPTIONS = {\n ecmaVersion: 5,\n locations: true,\n};\n\n/**\n * Property descriptor of readonly properties.\n */\nInterpreter.READONLY_DESCRIPTOR = {\n configurable: true,\n enumerable: true,\n writable: false,\n};\n\n/**\n * Property descriptor of non-enumerable properties.\n */\nInterpreter.NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: true,\n};\n\n/**\n * Property descriptor of readonly, non-enumerable properties.\n */\nInterpreter.READONLY_NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: false,\n};\n\n/**\n * Property descriptor of variables.\n */\nInterpreter.VARIABLE_DESCRIPTOR = {\n configurable: false,\n enumerable: true,\n writable: true,\n};\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 */\nInterpreter.STEP_ERROR = {};\n\n/**\n * Unique symbol for indicating that a reference is a variable on the scope,\n * not an object property.\n */\nInterpreter.SCOPE_REFERENCE = {};\n\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 */\nInterpreter.VALUE_IN_DESCRIPTOR = {};\n\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 */\nInterpreter.toStringCycles_ = [];\n\n/**\n * Determine error/exception line number in Bitburner source code\n * @param {Object} AST Node that causes Error/Exception\n */\nInterpreter.prototype.getErrorLineNumber = function (node) {\n var code = this.sourceCode;\n if (node == null || node.start == null) {\n return NaN;\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/**\n * Generate the appropriate line number error message for Bitburner\n * @param {Number} lineNumber\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 (\n \" (Line Number \" +\n lineNumber +\n \". This line number is probably incorrect \" +\n \"if your script is importing any functions. This is being worked on)\"\n );\n }\n};\n\n/**\n * Add more code to the interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n */\nInterpreter.prototype.appendCode = function (code) {\n var state = this.stateStack[0];\n if (!state || state.node[\"type\"] !== \"Program\") {\n throw Error(\"Expecting original AST to start with a Program node.\");\n }\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n if (!code || code[\"type\"] !== \"Program\") {\n throw Error(\"Expecting new AST to start with a Program node.\");\n }\n this.populateScope_(code, state.scope);\n // Append the new program to the old one.\n for (var i = 0, node; (node = code[\"body\"][i]); i++) {\n state.node[\"body\"].push(node);\n }\n state.done = false;\n};\n\n/**\n * Execute one step of the interpreter.\n * @return {boolean} True if a step was executed, false if no more instructions.\n */\nInterpreter.prototype.step = function () {\n var stack = this.stateStack;\n var state = stack[stack.length - 1];\n if (!state) {\n return false;\n }\n var node = state.node,\n type = node[\"type\"];\n if (type === \"Program\" && state.done) {\n return false;\n } else if (this.paused_) {\n return true;\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 if (nextState) {\n stack.push(nextState);\n }\n if (!node[\"end\"]) {\n // This is polyfill code. Keep executing until we arrive at user code.\n return this.step();\n }\n return true;\n};\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 */\nInterpreter.prototype.run = function () {\n while (!this.paused_ && this.step()) {}\n return this.paused_;\n};\n\n/**\n * Initialize the global scope with buitin properties and functions.\n * @param {!Interpreter.Object} scope Global scope.\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\n // Create the objects which will become Object.prototype and\n // Function.prototype, which are needed to bootstrap everything else.\n this.OBJECT_PROTO = new Interpreter.Object(null);\n this.FUNCTION_PROTO = new Interpreter.Object(this.OBJECT_PROTO);\n // Initialize global objects.\n this.initFunction(scope);\n this.initObject(scope);\n // 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 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);\n\n // Initialize global functions.\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\n this.setProperty(scope, \"parseInt\", this.createNativeFunction(parseInt, false));\n this.setProperty(scope, \"parseFloat\", this.createNativeFunction(parseFloat, false));\n\n this.setProperty(scope, \"isNaN\", this.createNativeFunction(isNaN, false));\n\n this.setProperty(scope, \"isFinite\", this.createNativeFunction(isFinite, false));\n\n var strFunctions = [\n [escape, \"escape\"],\n [unescape, \"unescape\"],\n [decodeURI, \"decodeURI\"],\n [decodeURIComponent, \"decodeURIComponent\"],\n [encodeURI, \"encodeURI\"],\n [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 this.setProperty(\n scope,\n strFunctions[i][1],\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\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;\n // The following properties are obsolete. Do not use.\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;\n\n // Run any user-provided initialization.\n if (this.initFunc_) {\n this.initFunc_(this, scope);\n }\n};\n\n/**\n * Initialize the Function class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initFunction = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n var identifierRegexp = /^[A-Za-z_$][\\w$]*$/;\n // Function constructor.\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 if (arguments.length) {\n var code = String(arguments[arguments.length - 1]);\n } else {\n var code = \"\";\n }\n var argsStr = Array.prototype.slice.call(arguments, 0, -1).join(\",\").trim();\n if (argsStr) {\n var args = argsStr.split(/\\s*,\\s*/);\n for (var i = 0; i < args.length; i++) {\n var name = args[i];\n if (!identifierRegexp.test(name)) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid function argument: \" + name);\n }\n }\n argsStr = args.join(\", \");\n }\n // Interestingly, the scope for constructed functions is the global scope,\n // even if they were constructed in some other scope.\n newFunc.parentScope = thisInterpreter.global;\n // Acorn needs to parse code in the context of a function or else 'return'\n // statements will be syntax errors.\n try {\n var ast = acorn.parse(\"(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 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 newFunc.node = ast[\"body\"][0][\"expression\"];\n thisInterpreter.setProperty(newFunc, \"length\", newFunc.node[\"length\"], Interpreter.READONLY_DESCRIPTOR);\n return newFunc;\n };\n wrapper.id = this.functionCounter_++;\n this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO);\n\n this.setProperty(scope, \"Function\", this.FUNCTION);\n // Manually setup type and prototype because createObj doesn't recognize\n // this object as a function (this.FUNCTION did not exist).\n this.setProperty(this.FUNCTION, \"prototype\", this.FUNCTION_PROTO);\n this.FUNCTION.nativeFunc = wrapper;\n\n // Configure Function.prototype.\n this.setProperty(this.FUNCTION_PROTO, \"constructor\", this.FUNCTION, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.FUNCTION_PROTO.nativeFunc = function () {};\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 return value;\n };\n\n wrapper = function (thisArg, args) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to apply a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\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 state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"apply\", wrapper);\n\n wrapper = function (thisArg /*, var_args */) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to call a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n for (var i = 1; i < arguments.length; i++) {\n state.arguments_.push(arguments[i]);\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"call\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\n \"Object.defineProperty(Function.prototype, 'bind',\",\n \"{configurable: true, writable: true, value:\",\n \"function(oThis) {\",\n \"if (typeof this !== 'function') {\",\n \"throw TypeError('What is trying to be bound is not callable');\",\n \"}\",\n \"var aArgs = Array.prototype.slice.call(arguments, 1),\",\n \"fToBind = this,\",\n \"fNOP = function() {},\",\n \"fBound = function() {\",\n \"return fToBind.apply(this instanceof fNOP\",\n \"? this\",\n \": oThis,\",\n \"aArgs.concat(Array.prototype.slice.call(arguments)));\",\n \"};\",\n \"if (this.prototype) {\",\n \"fNOP.prototype = this.prototype;\",\n \"}\",\n \"fBound.prototype = new fNOP();\",\n \"return fBound;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n // Function has no parent to inherit from, so it needs its own mandatory\n // toString and valueOf functions.\n wrapper = function () {\n return this.toString();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"toString\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"toString\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n wrapper = function () {\n return this.valueOf();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"valueOf\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"valueOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Initialize the Object class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initObject = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Object constructor.\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 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 }\n // Return the provided object.\n return value;\n };\n this.OBJECT = this.createNativeFunction(wrapper, true);\n // Throw away the created prototype and use the root prototype.\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 /**\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 var throwIfNullUndefined = function (value) {\n if (value === undefined || value === null) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Cannot convert '\" + value + \"' to object\");\n }\n };\n\n // Static methods on Object.\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n var props = obj.isObject ? obj.properties : obj;\n return thisInterpreter.arrayNativeToPseudo(Object.getOwnPropertyNames(props));\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyNames\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n if (obj.isObject) {\n obj = obj.properties;\n }\n return thisInterpreter.arrayNativeToPseudo(Object.keys(obj));\n };\n this.setProperty(\n this.OBJECT,\n \"keys\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\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 if (proto === undefined || !proto.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object prototype may only be an Object or null\");\n }\n return thisInterpreter.createObjectProto(proto);\n };\n this.setProperty(\n this.OBJECT,\n \"create\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Add a polyfill to handle create's second argument.\n this.polyfills_.push(\n \"(function() {\",\n \"var create_ = Object.create;\",\n \"Object.create = function(proto, props) {\",\n \"var obj = create_(proto);\",\n \"props && Object.defineProperties(obj, props);\",\n \"return obj;\",\n \"};\",\n \"})();\",\n \"\",\n );\n\n wrapper = function (obj, prop, descriptor) {\n prop = String(prop);\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.defineProperty called on non-object\");\n }\n if (!descriptor || !descriptor.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Property description must be an object\");\n }\n if (!obj.properties[prop] && obj.preventExtensions) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Can't define property '\" + prop + \"', object is not extensible\",\n );\n }\n // The polyfill guarantees no inheritance and no getter functions.\n // Therefore the descriptor properties map is the native object needed.\n thisInterpreter.setProperty(obj, prop, Interpreter.VALUE_IN_DESCRIPTOR, descriptor.properties);\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"defineProperty\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.polyfills_.push(\n // Flatten the descriptor to remove any inheritance or getter functions.\n \"(function() {\",\n \"var defineProperty_ = Object.defineProperty;\",\n \"Object.defineProperty = function(obj, prop, d1) {\",\n \"var d2 = {};\",\n \"if ('configurable' in d1) d2.configurable = d1.configurable;\",\n \"if ('enumerable' in d1) d2.enumerable = d1.enumerable;\",\n \"if ('writable' in d1) d2.writable = d1.writable;\",\n \"if ('value' in d1) d2.value = d1.value;\",\n \"if ('get' in d1) d2.get = d1.get;\",\n \"if ('set' in d1) d2.set = d1.set;\",\n \"return defineProperty_(obj, prop, d2);\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Object, 'defineProperties',\",\n \"{configurable: true, writable: true, value:\",\n \"function(obj, props) {\",\n \"var keys = Object.keys(props);\",\n \"for (var i = 0; i < keys.length; i++) {\",\n \"Object.defineProperty(obj, keys[i], props[keys[i]]);\",\n \"}\",\n \"return obj;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n wrapper = function (obj, prop) {\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Object.getOwnPropertyDescriptor called on non-object\",\n );\n }\n prop = String(prop);\n if (!(prop in obj.properties)) {\n return undefined;\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 }\n // Preserve value, but remove it for the nativeToPseudo call.\n var value = descriptor.value;\n var hasValue = \"value\" in descriptor;\n delete descriptor.value;\n var pseudoDescriptor = thisInterpreter.nativeToPseudo(descriptor);\n if (hasValue) {\n thisInterpreter.setProperty(pseudoDescriptor, \"value\", value);\n }\n return pseudoDescriptor;\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyDescriptor\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n return thisInterpreter.getPrototype(obj);\n };\n this.setProperty(\n this.OBJECT,\n \"getPrototypeOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n return Boolean(obj) && !obj.preventExtensions;\n };\n this.setProperty(\n this.OBJECT,\n \"isExtensible\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n if (obj && obj.isObject) {\n obj.preventExtensions = true;\n }\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"preventExtensions\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Object.\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 if (!this.isObject) {\n return this.hasOwnProperty(prop);\n }\n return String(prop) in this.properties;\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"hasOwnProperty\", wrapper);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.propertyIsEnumerable(prop);\n }\n return Object.prototype.propertyIsEnumerable.call(this.properties, prop);\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 if (!obj) {\n // No parent; reached the top.\n return false;\n }\n if (obj === this) {\n return true;\n }\n }\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"isPrototypeOf\", wrapper);\n};\n\n/**\n * Initialize the Array class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initArray = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Array constructor.\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 var first = arguments[0];\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 newArray.properties.length = first;\n } else {\n for (var i = 0; i < arguments.length; i++) {\n newArray.properties[i] = arguments[i];\n }\n newArray.properties.length = i;\n }\n return newArray;\n };\n this.ARRAY = this.createNativeFunction(wrapper, true);\n this.ARRAY_PROTO = this.ARRAY.properties[\"prototype\"];\n this.setProperty(scope, \"Array\", this.ARRAY);\n\n // Static methods on Array.\n wrapper = function (obj) {\n return obj && obj.class === \"Array\";\n };\n this.setProperty(\n this.ARRAY,\n \"isArray\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Array.\n wrapper = function () {\n return Array.prototype.pop.call(this.properties);\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 this.setNativeFunctionPrototype(this.ARRAY, \"push\", wrapper);\n\n wrapper = function () {\n return Array.prototype.shift.call(this.properties);\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 this.setNativeFunctionPrototype(this.ARRAY, \"unshift\", wrapper);\n\n wrapper = function () {\n Array.prototype.reverse.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"reverse\", wrapper);\n\n wrapper = function (index, howmany /*, var_args*/) {\n var list = Array.prototype.splice.apply(this.properties, arguments);\n return thisInterpreter.arrayNativeToPseudo(list);\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 this.setNativeFunctionPrototype(this.ARRAY, \"slice\", wrapper);\n\n wrapper = function (opt_separator) {\n return Array.prototype.join.call(this.properties, opt_separator);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"join\", wrapper);\n\n wrapper = function (var_args) {\n var list = [];\n var length = 0;\n // Start by copying the current array.\n var iLength = thisInterpreter.getProperty(this, \"length\");\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 length++;\n }\n // Loop through all arguments and copy them in.\n for (var i = 0; i < arguments.length; i++) {\n var value = arguments[i];\n if (thisInterpreter.isa(value, thisInterpreter.ARRAY)) {\n var jLength = thisInterpreter.getProperty(value, \"length\");\n for (var j = 0; j < jLength; j++) {\n if (thisInterpreter.hasProperty(value, j)) {\n list[length] = thisInterpreter.getProperty(value, j);\n }\n length++;\n }\n } else {\n list[length] = value;\n }\n }\n return thisInterpreter.arrayNativeToPseudo(list);\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 this.setNativeFunctionPrototype(this.ARRAY, \"indexOf\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.lastIndexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"lastIndexOf\", wrapper);\n\n wrapper = function () {\n Array.prototype.sort.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"sort\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n \"Object.defineProperty(Array.prototype, 'every',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callbackfn, thisArg) {\",\n \"if (!this || typeof callbackfn !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;\",\n \"k++;\",\n \"}\",\n \"return true;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n \"Object.defineProperty(Array.prototype, 'filter',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var res = [];\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t) {\",\n \"var val = t[i];\",\n \"if (fun.call(thisArg, val, i, t)) res.push(val);\",\n \"}\",\n \"}\",\n \"return res;\",\n \"}\",\n \"});\",\n\n // 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) {\",\n \"Object.defineProperty(Array.prototype, 'find', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return kValue;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return undefined;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // 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) {\",\n \"Object.defineProperty(Array.prototype, 'findIndex', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return k;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return -1;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n \"Object.defineProperty(Array.prototype, 'forEach',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"}\",\n \"});\",\n\n // 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', {\",\n \"value: function(searchElement, fromIndex) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"// 1. Let O be ? ToObject(this value).\",\n \"var o = Object(this);\",\n '// 2. Let len be ? ToLength(? Get(O, \"length\")).',\n \"var len = o.length >>> 0;\",\n \"// 3. If len is 0, return false.\",\n \"if (len === 0) {\",\n \"return false;\",\n \"}\",\n \"// 4. Let n be ? ToInteger(fromIndex).\",\n \"// (If fromIndex is undefined, this step produces the value 0.)\",\n \"var n = fromIndex | 0;\",\n \"// 5. If n ≥ 0, then\",\n \"// a. Let k be n.\",\n \"// 6. Else n < 0,\",\n \"// a. Let k be len + n.\",\n \"// b. If k < 0, let k be 0.\",\n \"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\",\n \"function sameValueZero(x, y) {\",\n \"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\",\n \"}\",\n \"// 7. Repeat, while k < len\",\n \"while (k < len) {\",\n \"// a. Let elementK be the result of ? Get(O, ! ToString(k)).\",\n \"// b. If SameValueZero(searchElement, elementK) is true, return true.\",\n \"if (sameValueZero(o[k], searchElement)) {\",\n \"return true;\",\n \"}\",\n \"// c. Increase k by 1. \",\n \"k++;\",\n \"}\",\n \"// 8. Return false\",\n \"return false;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map\n \"Object.defineProperty(Array.prototype, 'map',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') new TypeError;\",\n \"var T, A, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"A = new Array(len);\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) A[k] = callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"return A;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\n \"Object.defineProperty(Array.prototype, 'reduce',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = 0, value;\",\n \"if (arguments.length === 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k < len && !(k in t)) k++;\",\n \"if (k >= len) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k++];\",\n \"}\",\n \"for (; k < len; k++) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight\n \"Object.defineProperty(Array.prototype, 'reduceRight',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = len - 1, value;\",\n \"if (arguments.length >= 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k >= 0 && !(k in t)) k--;\",\n \"if (k < 0) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k--];\",\n \"}\",\n \"for (; k >= 0; k--) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n \"Object.defineProperty(Array.prototype, 'some',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (!this || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t && fun.call(thisArg, t[i], i, t)) {\",\n \"return true;\",\n \"}\",\n \"}\",\n \"return false;\",\n \"}\",\n \"});\",\n\n \"(function() {\",\n \"var sort_ = Array.prototype.sort;\",\n \"Array.prototype.sort = function(opt_comp) {\",\n // Fast native sort.\n \"if (typeof opt_comp !== 'function') {\",\n \"return sort_.call(this);\",\n \"}\",\n // Slow bubble sort.\n \"for (var i = 0; i < this.length; i++) {\",\n \"var changes = 0;\",\n \"for (var j = 0; j < this.length - i - 1; j++) {\",\n \"if (opt_comp(this[j], this[j + 1]) > 0) {\",\n \"var swap = this[j];\",\n \"this[j] = this[j + 1];\",\n \"this[j + 1] = swap;\",\n \"changes++;\",\n \"}\",\n \"}\",\n \"if (!changes) break;\",\n \"}\",\n \"return this;\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Array.prototype, 'toLocaleString',\",\n \"{configurable: true, writable: true, value:\",\n \"function() {\",\n \"var out = [];\",\n \"for (var i = 0; i < this.length; i++) {\",\n \"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();\",\n \"}\",\n \"return out.join(',');\",\n \"}\",\n \"});\",\n \"\",\n );\n};\n\n/**\n * Initialize the String class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initString = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // String constructor.\n wrapper = function (value) {\n value = String(value);\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 this.STRING = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"String\", this.STRING);\n\n // Static methods on String.\n this.setProperty(\n this.STRING,\n \"fromCharCode\",\n this.createNativeFunction(String.fromCharCode, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on String.\n // Methods with exclusively primitive arguments.\n var functions = [\n \"charAt\",\n \"charCodeAt\",\n \"concat\",\n \"indexOf\",\n \"lastIndexOf\",\n \"slice\",\n \"substr\",\n \"substring\",\n \"toLocaleLowerCase\",\n \"toLocaleUpperCase\",\n \"toLowerCase\",\n \"toUpperCase\",\n \"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 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 var jsList = String(this).split(separator, limit);\n return thisInterpreter.arrayNativeToPseudo(jsList);\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 var m = String(this).match(regexp);\n return m && thisInterpreter.arrayNativeToPseudo(m);\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 return String(this).search(regexp);\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 return String(this).replace(substr, newSubstr);\n };\n this.setNativeFunctionPrototype(this.STRING, \"replace\", wrapper);\n // Add a polyfill to handle replace's second argument being a function.\n this.polyfills_.push(\n \"(function() {\",\n \"var replace_ = String.prototype.replace;\",\n \"String.prototype.replace = function(substr, newSubstr) {\",\n \"if (typeof newSubstr !== 'function') {\",\n // string.replace(string|regexp, string)\n \"return replace_.call(this, substr, newSubstr);\",\n \"}\",\n \"var str = this;\",\n \"if (substr instanceof RegExp) {\", // string.replace(regexp, function)\n \"var subs = [];\",\n \"var m = substr.exec(str);\",\n \"while (m) {\",\n \"m.push(m.index, str);\",\n \"var inject = newSubstr.apply(null, m);\",\n \"subs.push([m.index, m[0].length, inject]);\",\n \"m = substr.global ? substr.exec(str) : null;\",\n \"}\",\n \"for (var i = subs.length - 1; i >= 0; i--) {\",\n \"str = str.substring(0, subs[i][0]) + subs[i][2] + \" + \"str.substring(subs[i][0] + subs[i][1]);\",\n \"}\",\n \"} else {\", // string.replace(string, function)\n \"var i = str.indexOf(substr);\",\n \"if (i !== -1) {\",\n \"var inject = newSubstr(str.substr(i, substr.length), i, str);\",\n \"str = str.substring(0, i) + inject + \" + \"str.substring(i + substr.length);\",\n \"}\",\n \"}\",\n \"return str;\",\n \"};\",\n \"})();\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n \"if (!String.prototype.endsWith) {\",\n \"String.prototype.endsWith = function(search, this_len) {\",\n \"if (this_len === undefined || this_len > this.length) {\",\n \"this_len = this.length;\",\n \"}\",\n \"return this.substring(this_len - search.length, this_len) === search;\",\n \"};\",\n \"}\",\n\n //Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n \"if (!String.prototype.includes) {\",\n \"String.prototype.includes = function(search, start) {\",\n \"'use strict';\",\n \"if (typeof start !== 'number') {\",\n \"start = 0;\",\n \"}\",\n \" \",\n \"if (start + search.length > this.length) {\",\n \"return false;\",\n \"} else {\",\n \"return this.indexOf(search, start) !== -1;\",\n \"}\",\n \"};\",\n \"}\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n \"if (!String.prototype.startsWith) {\",\n \"String.prototype.startsWith = function(search, pos) {\",\n \"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\",\n \"};\",\n \"}\",\n\n \"\",\n );\n};\n\n/**\n * Initialize the Boolean class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initBoolean = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Boolean constructor.\n wrapper = function (value) {\n value = Boolean(value);\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 this.BOOLEAN = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Boolean\", this.BOOLEAN);\n};\n\n/**\n * Initialize the Number class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initNumber = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Number constructor.\n wrapper = function (value) {\n value = Number(value);\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 this.NUMBER = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Number\", this.NUMBER);\n\n var numConsts = [\"MAX_VALUE\", \"MIN_VALUE\", \"NaN\", \"NEGATIVE_INFINITY\", \"POSITIVE_INFINITY\"];\n for (var i = 0; i < numConsts.length; i++) {\n this.setProperty(this.NUMBER, numConsts[i], Number[numConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n\n // Instance methods on Number.\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 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 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 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 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 this.setNativeFunctionPrototype(this.NUMBER, \"toLocaleString\", wrapper);\n};\n\n/**\n * Initialize the Date class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initDate = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Date constructor.\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 }\n // Called as new Date().\n var args = [null].concat(Array.from(arguments));\n this.data = new (Function.prototype.bind.apply(Date, args))();\n return this;\n };\n this.DATE = this.createNativeFunction(wrapper, true);\n this.DATE_PROTO = this.DATE.properties[\"prototype\"];\n this.setProperty(scope, \"Date\", this.DATE);\n\n // Static methods on Date.\n this.setProperty(this.DATE, \"now\", this.createNativeFunction(Date.now, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n this.setProperty(\n this.DATE,\n \"parse\",\n this.createNativeFunction(Date.parse, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.setProperty(this.DATE, \"UTC\", this.createNativeFunction(Date.UTC, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n // Instance methods on Date.\n var functions = [\n \"getDate\",\n \"getDay\",\n \"getFullYear\",\n \"getHours\",\n \"getMilliseconds\",\n \"getMinutes\",\n \"getMonth\",\n \"getSeconds\",\n \"getTime\",\n \"getTimezoneOffset\",\n \"getUTCDate\",\n \"getUTCDay\",\n \"getUTCFullYear\",\n \"getUTCHours\",\n \"getUTCMilliseconds\",\n \"getUTCMinutes\",\n \"getUTCMonth\",\n \"getUTCSeconds\",\n \"getYear\",\n \"setDate\",\n \"setFullYear\",\n \"setHours\",\n \"setMilliseconds\",\n \"setMinutes\",\n \"setMonth\",\n \"setSeconds\",\n \"setTime\",\n \"setUTCDate\",\n \"setUTCFullYear\",\n \"setUTCHours\",\n \"setUTCMilliseconds\",\n \"setUTCMinutes\",\n \"setUTCMonth\",\n \"setUTCSeconds\",\n \"setYear\",\n \"toDateString\",\n \"toISOString\",\n \"toJSON\",\n \"toGMTString\",\n \"toLocaleDateString\",\n \"toLocaleString\",\n \"toLocaleTimeString\",\n \"toTimeString\",\n \"toUTCString\",\n ];\n for (var i = 0; i < functions.length; i++) {\n wrapper = (function (nativeFunc) {\n return function (var_args) {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args[i] = thisInterpreter.pseudoToNative(arguments[i]);\n }\n return this.data[nativeFunc].apply(this.data, args);\n };\n })(functions[i]);\n this.setNativeFunctionPrototype(this.DATE, functions[i], wrapper);\n }\n};\n\n/**\n * Initialize Regular Expression object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initRegExp = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // RegExp constructor.\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 pattern = pattern ? pattern.toString() : \"\";\n flags = flags ? flags.toString() : \"\";\n thisInterpreter.populateRegExp(rgx, new RegExp(pattern, flags));\n return rgx;\n };\n this.REGEXP = this.createNativeFunction(wrapper, true);\n this.REGEXP_PROTO = this.REGEXP.properties[\"prototype\"];\n this.setProperty(scope, \"RegExp\", this.REGEXP);\n\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"global\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"ignoreCase\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"multiline\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"source\",\n \"(?:)\",\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (str) {\n return this.data.test(str);\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"test\", wrapper);\n\n wrapper = function (str) {\n str = str.toString();\n // Get lastIndex from wrapped regex, since this is settable.\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 for (var i = 0; i < match.length; i++) {\n thisInterpreter.setProperty(result, i, match[i]);\n }\n // match has additional properties.\n thisInterpreter.setProperty(result, \"index\", match.index);\n thisInterpreter.setProperty(result, \"input\", match.input);\n return result;\n }\n return null;\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"exec\", wrapper);\n};\n\n/**\n * Initialize the Error class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initError = function (scope) {\n var thisInterpreter = this;\n // Error constructor.\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 if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\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 if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n thisInterpreter.setProperty(constructor, \"prototype\", thisInterpreter.createObject(thisInterpreter.ERROR));\n thisInterpreter.setProperty(\n constructor.properties[\"prototype\"],\n \"name\",\n name,\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n thisInterpreter.setProperty(scope, name, constructor);\n\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/**\n * Initialize Math object.\n * @param {!Interpreter.Object} scope Global scope.\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 for (var i = 0; i < mathConsts.length; i++) {\n this.setProperty(myMath, mathConsts[i], Math[mathConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n var numFunctions = [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"atan2\",\n \"ceil\",\n \"cos\",\n \"exp\",\n \"floor\",\n \"log\",\n \"max\",\n \"min\",\n \"pow\",\n \"random\",\n \"round\",\n \"sin\",\n \"sqrt\",\n \"tan\",\n ];\n for (var i = 0; i < numFunctions.length; i++) {\n this.setProperty(\n myMath,\n numFunctions[i],\n this.createNativeFunction(Math[numFunctions[i]], false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n};\n\n/**\n * Initialize JSON object.\n * @param {!Interpreter.Object} scope Global scope.\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 return thisInterpreter.nativeToPseudo(nativeObj);\n };\n this.setProperty(myJSON, \"parse\", this.createNativeFunction(wrapper, false));\n\n wrapper = function (value) {\n var nativeObj = thisInterpreter.pseudoToNative(value);\n try {\n var str = JSON.stringify(nativeObj);\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, e.message);\n }\n return str;\n };\n this.setProperty(myJSON, \"stringify\", this.createNativeFunction(wrapper, false));\n};\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 */\nInterpreter.prototype.isa = function (child, constructor) {\n if (child === null || child === undefined || !constructor) {\n return false;\n }\n var proto = constructor.properties[\"prototype\"];\n if (child === proto) {\n return true;\n }\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 child = this.getPrototype(child);\n while (child) {\n if (child === proto) {\n return true;\n }\n child = child.proto;\n }\n return false;\n};\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 */\nInterpreter.legalArrayLength = function (x) {\n var n = x >>> 0;\n // Array length must be between 0 and 2^32-1 (inclusive).\n return n === Number(x) ? n : NaN;\n};\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 */\nInterpreter.legalArrayIndex = function (x) {\n var n = x >>> 0;\n // Array index cannot be 2^32-1, otherwise length would be 2^32.\n // 0xffffffff is 2^32-1.\n return String(n) === String(x) && n !== 0xffffffff ? n : NaN;\n};\n\n/**\n * Typedef for JS values.\n * @typedef {!Interpreter.Object|boolean|number|string|undefined|null}\n */\nInterpreter.Value;\n\n/**\n * Class for an object.\n * @param {Interpreter.Object} proto Prototype object or null.\n * @constructor\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\n/** @type {Interpreter.Object} */\nInterpreter.Object.prototype.proto = null;\n\n/** @type {boolean} */\nInterpreter.Object.prototype.isObject = true;\n\n/** @type {string} */\nInterpreter.Object.prototype.class = \"Object\";\n\n/** @type {Date|RegExp|boolean|number|string|undefined|null} */\nInterpreter.Object.prototype.data = null;\n\n/**\n * Convert this object into a string.\n * @return {string} String value.\n * @override\n */\nInterpreter.Object.prototype.toString = function () {\n if (this.class === \"Array\") {\n // Array\n var cycles = Interpreter.toStringCycles_;\n cycles.push(this);\n try {\n var strs = [];\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 return strs.join(\",\");\n }\n if (this.class === \"Error\") {\n var cycles = Interpreter.toStringCycles_;\n if (cycles.indexOf(this) !== -1) {\n return \"[object Error]\";\n }\n var name, message;\n // Bug: Does not support getters and setters for name or message.\n var obj = this;\n do {\n if (\"name\" in obj.properties) {\n name = obj.properties[\"name\"];\n break;\n }\n } while ((obj = obj.proto));\n var obj = this;\n do {\n if (\"message\" in obj.properties) {\n message = obj.properties[\"message\"];\n break;\n }\n } while ((obj = obj.proto));\n cycles.push(this);\n try {\n name = name && name.toString();\n message = message && message.toString();\n } finally {\n cycles.pop();\n }\n return message ? name + \": \" + message : String(name);\n }\n\n // RegExp, Date, and boxed primitives.\n if (this.data !== null) {\n return String(this.data);\n }\n\n return \"[object \" + this.class + \"]\";\n};\n\n/**\n * Return the object's value.\n * @return {Interpreter.Value} Value.\n * @override\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 if (this.data instanceof Date) {\n return this.data.valueOf(); // Milliseconds.\n }\n return /** @type {(boolean|number|string)} */ (this.data); // Boxed primitive.\n};\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 */\nInterpreter.prototype.createObject = function (constructor) {\n return this.createObjectProto(constructor && constructor.properties[\"prototype\"]);\n};\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 */\nInterpreter.prototype.createObjectProto = function (proto) {\n if (typeof proto !== \"object\") {\n throw Error(\"Non object prototype\");\n }\n var obj = new Interpreter.Object(proto);\n // Functions have prototype objects.\n if (this.isa(obj, this.FUNCTION)) {\n this.setProperty(obj, \"prototype\", this.createObjectProto(this.OBJECT_PROTO || null));\n obj.class = \"Function\";\n }\n // Arrays have length.\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 if (this.isa(obj, this.ERROR)) {\n obj.class = \"Error\";\n }\n return obj;\n};\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 */\nInterpreter.prototype.populateRegExp = function (pseudoRegexp, nativeRegexp) {\n pseudoRegexp.data = nativeRegexp;\n // lastIndex is settable, all others are read-only attributes\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/**\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 */\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/**\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 */\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 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 return func;\n};\n\n/**\n * Create a new native asynchronous function.\n * @param {!Function} asyncFunc JavaScript function.\n * @return {!Interpreter.Object} New function.\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/**\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 */\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 var wrapper = function () {\n return interpreter.nativeToPseudo(\n nativeObj.apply(\n interpreter,\n Array.prototype.slice.call(arguments).map(function (i) {\n return interpreter.pseudoToNative(i);\n }),\n ),\n );\n };\n return this.createNativeFunction(wrapper, undefined);\n }\n\n var pseudoObj;\n if (Array.isArray(nativeObj)) {\n // Array.\n pseudoObj = this.createObjectProto(this.ARRAY_PROTO);\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 for (var key in nativeObj) {\n this.setProperty(pseudoObj, key, this.nativeToPseudo(nativeObj[key]));\n }\n }\n return pseudoObj;\n};\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 */\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 if (i !== -1) {\n return cycles.native[i];\n }\n cycles.pseudo.push(pseudoObj);\n var nativeObj;\n if (this.isa(pseudoObj, this.ARRAY)) {\n // Array.\n nativeObj = [];\n cycles.native.push(nativeObj);\n var length = this.getProperty(pseudoObj, \"length\");\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 for (var key in pseudoObj.properties) {\n val = pseudoObj.properties[key];\n nativeObj[key] = this.pseudoToNative(val, cycles);\n }\n }\n cycles.pseudo.pop();\n cycles.native.pop();\n return nativeObj;\n};\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 */\nInterpreter.prototype.arrayNativeToPseudo = function (nativeArray) {\n var pseudoArray = this.createObjectProto(this.ARRAY_PROTO);\n var props = Object.getOwnPropertyNames(nativeArray);\n for (var i = 0; i < props.length; i++) {\n this.setProperty(pseudoArray, props[i], nativeArray[props[i]]);\n }\n return pseudoArray;\n};\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 */\nInterpreter.prototype.arrayPseudoToNative = function (pseudoArray) {\n var nativeArray = [];\n for (var key in pseudoArray.properties) {\n nativeArray[key] = this.getProperty(pseudoArray, key);\n }\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 nativeArray.length = Interpreter.legalArrayLength(this.getProperty(pseudoArray, \"length\")) || 0;\n return nativeArray;\n};\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 */\nInterpreter.prototype.getPrototype = function (value) {\n switch (typeof value) {\n case \"number\":\n return this.NUMBER.properties[\"prototype\"];\n case \"boolean\":\n return this.BOOLEAN.properties[\"prototype\"];\n case \"string\":\n return this.STRING.properties[\"prototype\"];\n }\n if (value) {\n return value.proto;\n }\n return null;\n};\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 */\nInterpreter.prototype.getProperty = function (obj, name, node) {\n name = String(name);\n if (obj === undefined || obj === null) {\n let lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.TYPE_ERROR, \"Cannot read property '\" + name + \"' of \" + obj, lineNum);\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 if (!isNaN(n) && n < String(obj).length) {\n return String(obj)[n];\n }\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n var getter = obj.getter[name];\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 return obj.properties[name];\n }\n } while ((obj = this.getPrototype(obj)));\n return undefined;\n};\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 */\nInterpreter.prototype.hasProperty = function (obj, name) {\n if (!obj.isObject) {\n throw TypeError(\"Primitive data type has no properties\");\n }\n name = String(name);\n if (name === \"length\" && this.isa(obj, this.STRING)) {\n return true;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return true;\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n return true;\n }\n } while ((obj = this.getPrototype(obj)));\n return false;\n};\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 */\nInterpreter.prototype.setProperty = function (obj, name, value, opt_descriptor) {\n name = String(name);\n if (obj === undefined || obj === null) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of \" + obj);\n }\n if (\n opt_descriptor &&\n (\"get\" in opt_descriptor || \"set\" in opt_descriptor) &&\n (\"value\" in opt_descriptor || \"writable\" in opt_descriptor)\n ) {\n this.throwException(\n this.TYPE_ERROR,\n \"Invalid property descriptor. \" + \"Cannot both specify accessors and a value or writable attribute\",\n );\n }\n var strict = !this.stateStack || this.getScope().strict;\n if (!obj.isObject) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't create property '\" + name + \"' on '\" + obj + \"'\");\n }\n return;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\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(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of String '\" + obj.data + \"'\",\n );\n }\n return;\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 if (name === \"length\") {\n // Delete elements if length is smaller.\n if (opt_descriptor) {\n if (!(\"value\" in opt_descriptor)) {\n return;\n }\n value = opt_descriptor.value;\n }\n value = Interpreter.legalArrayLength(value);\n if (isNaN(value)) {\n this.throwException(this.RANGE_ERROR, \"Invalid array length\");\n }\n if (value < length) {\n for (i in obj.properties) {\n i = Interpreter.legalArrayIndex(i);\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 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 return;\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 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 var descriptor = {};\n if (\"configurable\" in opt_descriptor) {\n descriptor.configurable = opt_descriptor.configurable;\n }\n if (\"enumerable\" in opt_descriptor) {\n descriptor.enumerable = opt_descriptor.enumerable;\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 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 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 }\n // Determine the parent (possibly self) where the property is defined.\n var defObj = obj;\n while (!(name in defObj.properties)) {\n defObj = this.getPrototype(defObj);\n if (!defObj) {\n // This is a new property.\n defObj = obj;\n break;\n }\n }\n if (defObj.setter && defObj.setter[name]) {\n return defObj.setter[name];\n }\n if (defObj.getter && defObj.getter[name]) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot set property '\" + name + \"' of object '\" + obj + \"' which only has a getter\",\n );\n }\n } else {\n // No setter, simple assignment.\n try {\n obj.properties[name] = value;\n } catch (e) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of object '\" + obj + \"'\",\n );\n }\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 */\nInterpreter.prototype.setNativeFunctionPrototype = function (obj, name, wrapper) {\n this.setProperty(\n obj.properties[\"prototype\"],\n name,\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Returns the current scope from the stateStack.\n * @return {!Interpreter.Object} Current scope dictionary.\n */\nInterpreter.prototype.getScope = function () {\n var scope = this.stateStack[this.stateStack.length - 1].scope;\n if (!scope) {\n throw Error(\"No scope found.\");\n }\n return scope;\n};\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 */\nInterpreter.prototype.createScope = function (node, parentScope) {\n var scope = this.createObjectProto(null);\n scope.parentScope = parentScope;\n if (!parentScope) {\n this.initGlobalScope(scope);\n }\n this.populateScope_(node, scope);\n\n // Determine if this scope starts with 'use strict'.\n scope.strict = false;\n if (parentScope && parentScope.strict) {\n scope.strict = true;\n } else {\n var firstNode = node[\"body\"] && node[\"body\"][0];\n if (\n firstNode &&\n firstNode.expression &&\n firstNode.expression[\"type\"] === \"Literal\" &&\n firstNode.expression.value === \"use strict\"\n ) {\n scope.strict = true;\n }\n }\n return scope;\n};\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 */\nInterpreter.prototype.createSpecialScope = function (parentScope, opt_scope) {\n if (!parentScope) {\n throw Error(\"parentScope required\");\n }\n var scope = opt_scope || this.createObjectProto(null);\n scope.parentScope = parentScope;\n scope.strict = parentScope.strict;\n return scope;\n};\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 */\nInterpreter.prototype.getValueFromScope = function (name, node) {\n var scope = this.getScope();\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n return scope.properties[name];\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has inherited properties and\n // could also have getters.\n if (scope === this.global && this.hasProperty(scope, name)) {\n return this.getProperty(scope, name);\n }\n // Typeof operator is unique: it can safely look at non-defined variables.\n var prevNode = this.stateStack[this.stateStack.length - 1].node;\n if (prevNode[\"type\"] === \"UnaryExpression\" && prevNode[\"operator\"] === \"typeof\") {\n return undefined;\n }\n\n var lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\", lineNum);\n};\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 */\nInterpreter.prototype.setValueToScope = function (name, value) {\n var scope = this.getScope();\n var strict = scope.strict;\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n scope.properties[name] = value;\n return undefined;\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has readonly properties and\n // could also have setters.\n if (scope === this.global && (!strict || this.hasProperty(scope, name))) {\n return this.setProperty(scope, name, value);\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\");\n};\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 */\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 var nodeClass = node[\"constructor\"];\n for (var name in node) {\n var prop = node[name];\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/**\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 */\nInterpreter.prototype.stripLocations_ = function (node, start, end) {\n if (start) {\n node[\"start\"] = start;\n } else {\n delete node[\"start\"];\n }\n if (end) {\n node[\"end\"] = end;\n } else {\n delete node[\"end\"];\n }\n for (var name in node) {\n if (node.hasOwnProperty(name)) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n this.stripLocations_(prop, start, end);\n }\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 */\nInterpreter.prototype.calledWithNew = function () {\n return this.stateStack[this.stateStack.length - 1].isConstructor;\n};\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 */\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/**\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 */\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/**\n * Completion Value Types.\n * @enum {number}\n */\nInterpreter.Completion = {\n NORMAL: 0,\n BREAK: 1,\n CONTINUE: 2,\n RETURN: 3,\n THROW: 4,\n};\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 */\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 var lineNumErrorMsg;\n if (lineNumber != null) {\n lineNumErrorMsg = this.getErrorLineNumberMessage(lineNumber);\n }\n this.unwind(Interpreter.Completion.THROW, error, undefined, lineNumErrorMsg);\n // Abort anything related to the current step.\n throw Interpreter.STEP_ERROR;\n};\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 */\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 switch (state.node[\"type\"]) {\n case \"TryStatement\":\n state.cv = { type: type, value: value, label: label };\n return;\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 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 }\n\n // Unhandled completion. Throw a real error.\n var realError;\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 throw realError;\n};\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 */\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/**\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 */\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/**\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 */\nInterpreter.State = function (node, scope) {\n this.node = node;\n this.scope = scope;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Functions to handle each node type.\n///////////////////////////////////////////////////////////////////////////////\n\nInterpreter.prototype[\"stepArrayExpression\"] = function (stack, state, node) {\n var elements = node[\"elements\"];\n var n = state.n_ || 0;\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 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 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 if (!state.doneRight_) {\n if (!state.leftReference_) {\n state.leftReference_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_ && node[\"operator\"] !== \"=\") {\n var leftValue = this.getValue(state.leftReference_, node);\n state.leftValue_ = leftValue;\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 = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftReference_);\n }\n }\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\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 var value = state.leftValue_;\n var rightValue = state.value;\n switch (node[\"operator\"]) {\n case \"=\":\n value = rightValue;\n break;\n case \"+=\":\n value += rightValue;\n break;\n case \"-=\":\n value -= rightValue;\n break;\n case \"*=\":\n value *= rightValue;\n break;\n case \"/=\":\n value /= rightValue;\n break;\n case \"%=\":\n value %= rightValue;\n break;\n case \"<<=\":\n value <<= rightValue;\n break;\n case \">>=\":\n value >>= rightValue;\n break;\n case \">>>=\":\n value >>>= rightValue;\n break;\n case \"&=\":\n value &= rightValue;\n break;\n case \"^=\":\n value ^= rightValue;\n break;\n case \"|=\":\n value |= rightValue;\n break;\n default:\n throw SyntaxError(\"Unknown assignment expression: \" + node[\"operator\"]);\n }\n var setter = this.setValue(state.leftReference_, value);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = value;\n return this.createSetter_(setter, state.leftReference_, value);\n }\n // Return if no setter function.\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 if (!state.doneRight_) {\n state.doneRight_ = true;\n state.leftValue_ = state.value;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n stack.pop();\n var leftValue = state.leftValue_;\n var rightValue = state.value;\n var value;\n switch (node[\"operator\"]) {\n case \"==\":\n value = leftValue == rightValue;\n break;\n case \"!=\":\n value = leftValue != rightValue;\n break;\n case \"===\":\n value = leftValue === rightValue;\n break;\n case \"!==\":\n value = leftValue !== rightValue;\n break;\n case \">\":\n value = leftValue > rightValue;\n break;\n case \">=\":\n value = leftValue >= rightValue;\n break;\n case \"<\":\n value = leftValue < rightValue;\n break;\n case \"<=\":\n value = leftValue <= rightValue;\n break;\n case \"+\":\n value = leftValue + rightValue;\n break;\n case \"-\":\n value = leftValue - rightValue;\n break;\n case \"*\":\n value = leftValue * rightValue;\n break;\n case \"/\":\n value = leftValue / rightValue;\n break;\n case \"%\":\n value = leftValue % rightValue;\n break;\n case \"&\":\n value = leftValue & rightValue;\n break;\n case \"|\":\n value = leftValue | rightValue;\n break;\n case \"^\":\n value = leftValue ^ rightValue;\n break;\n case \"<<\":\n value = leftValue << rightValue;\n break;\n case \">>\":\n value = leftValue >> rightValue;\n break;\n case \">>>\":\n value = leftValue >>> rightValue;\n break;\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 value = this.hasProperty(rightValue, leftValue);\n break;\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 value = leftValue.isObject ? this.isa(leftValue, rightValue) : false;\n break;\n default:\n throw SyntaxError(\"Unknown binary operator: \" + node[\"operator\"]);\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 if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\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;\n // Components needed to determine value of 'this'.\n var nextState = new Interpreter.State(node[\"callee\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (state.doneCallee_ === 1) {\n // Determine value of the function.\n state.doneCallee_ = 2;\n var func = state.value;\n if (Array.isArray(func)) {\n state.func_ = this.getValue(func, node);\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 func = state.func_;\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_(/** @type {!Interpreter.Object} */ (func), state.value);\n }\n } else {\n // Already evaluated function: (function(){...})();\n state.func_ = func;\n }\n state.arguments_ = [];\n state.n_ = 0;\n }\n var func = state.func_;\n if (!state.doneArgs_) {\n if (state.n_ !== 0) {\n state.arguments_.push(state.value);\n }\n if (node[\"arguments\"][state.n_]) {\n return new Interpreter.State(node[\"arguments\"][state.n_++], state.scope);\n }\n // Determine value of 'this' in function.\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 }\n // Constructor, 'this' is new object.\n var proto = func.properties[\"prototype\"];\n if (typeof proto !== \"object\" || proto === null) {\n // Non-object prototypes default to Object.prototype.\n proto = this.OBJECT_PROTO;\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 state.doneArgs_ = true;\n }\n if (!state.doneExec_) {\n state.doneExec_ = true;\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 var funcNode = func.node;\n if (funcNode) {\n var scope = this.createScope(funcNode[\"body\"], func.parentScope);\n // Add all arguments.\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 }\n // Build arguments variable.\n var argsList = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < state.arguments_.length; i++) {\n this.setProperty(argsList, i, state.arguments_[i]);\n }\n this.setProperty(scope, \"arguments\", argsList);\n // Add the function's name (var x = function foo(){};)\n var name = funcNode[\"id\"] && funcNode[\"id\"][\"name\"];\n if (name) {\n this.setProperty(scope, name, func);\n }\n this.setProperty(scope, \"this\", state.funcThis_, Interpreter.READONLY_DESCRIPTOR);\n state.value = undefined; // Default value if no explicit return.\n return new Interpreter.State(funcNode[\"body\"], scope);\n } else if (func.eval) {\n var code = state.arguments_[0];\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.parse(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 var evalNode = new this.nodeConstructor();\n evalNode[\"type\"] = \"EvalProgram_\";\n evalNode[\"body\"] = ast[\"body\"];\n this.stripLocations_(evalNode, node[\"start\"], node[\"end\"]);\n // Create new scope and update it with definitions in eval().\n var scope = state.directEval_ ? state.scope : this.global;\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 this.value = undefined; // Default value if no code.\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 var callback = function (value) {\n state.value = value;\n thisInterpreter.paused_ = false;\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 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;\n // Create an empty scope.\n var scope = this.createSpecialScope(state.scope);\n // Add the argument.\n this.setProperty(scope, node[\"param\"][\"name\"], state.throwValue);\n // Execute catch clause.\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 if (mode === 0) {\n state.mode_ = 1;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (mode === 1) {\n state.mode_ = 2;\n var value = Boolean(state.value);\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 }\n // eval('1;if(false){2}') -> undefined\n this.value = undefined;\n }\n stack.pop();\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 if (!state.test_) {\n state.test_ = true;\n return new Interpreter.State(node[\"test\"], state.scope);\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 if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\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 stack.pop();\n // Save this value to interpreter.value for use as a return value if\n // this code is inside an eval function.\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 if (node[\"left\"][\"declarations\"] && node[\"left\"][\"declarations\"][0][\"init\"]) {\n if (state.scope.strict) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(\n this.SYNTAX_ERROR,\n \"for-in loop variable declaration may not have an initializer.\",\n lineNum,\n );\n }\n // Variable initialization: for (var x = 4 in y)\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n }\n // Second, look up the object. Only do so once, ever.\n if (!state.doneObject_) {\n state.doneObject_ = true;\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (!state.isLoop) {\n // First iteration.\n state.isLoop = true;\n state.object_ = state.value;\n state.visited_ = Object.create(null);\n }\n // Third, find the property name for this iteration.\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 while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this object's properties.\n }\n if (!Object.prototype.hasOwnProperty.call(state.object_.properties, prop)) {\n continue; // Property has been deleted in the loop.\n }\n if (state.visited_[prop]) {\n continue; // Already seen this property on a child.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_.properties, prop)) {\n continue; // Skip non-enumerable property.\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 while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this value's properties.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n }\n state.object_ = this.getPrototype(state.object_);\n state.props_ = null;\n if (state.object_ === null) {\n // Done, exit loop.\n stack.pop();\n return;\n }\n }\n }\n // Fourth, find the variable\n if (!state.doneVariable_) {\n state.doneVariable_ = true;\n var left = node[\"left\"];\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 if (!state.variable_) {\n state.variable_ = state.value;\n }\n // Fifth, set the variable.\n if (!state.doneSetter_) {\n state.doneSetter_ = true;\n var value = state.name_;\n var setter = this.setValue(state.variable_, value);\n if (setter) {\n return this.createSetter_(setter, state.variable_, value);\n }\n }\n // Next step will be step three.\n state.name_ = undefined;\n // Reevaluate the variable since it could be a setter on the global object.\n state.doneVariable_ = false;\n state.doneSetter_ = false;\n // Sixth and finally, execute the body if there was one. this.\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 if (mode === 0) {\n state.mode_ = 1;\n if (node[\"init\"]) {\n return new Interpreter.State(node[\"init\"], state.scope);\n }\n } else if (mode === 1) {\n state.mode_ = 2;\n if (node[\"test\"]) {\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n } else if (mode === 2) {\n state.mode_ = 3;\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 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 if (state.components) {\n stack[stack.length - 1].value = [Interpreter.SCOPE_REFERENCE, node[\"name\"]];\n return;\n }\n var value = this.getValueFromScope(node[\"name\"], node);\n // An identifier could be a getter if it's a property on the global object.\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 while (!this.hasProperty(scope, node[\"name\"])) {\n scope = scope.parentScope;\n }\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, this.global);\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();\n // Note that a statement might have multiple labels.\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 if (value instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, value);\n value = pseudoRegexp;\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 if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\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 var propName;\n if (!node[\"computed\"]) {\n state.object_ = state.value;\n // obj.foo -- Just access 'foo' directly.\n propName = node[\"property\"][\"name\"];\n } else if (!state.doneProperty_) {\n state.object_ = state.value;\n // obj[foo] -- Compute value of 'foo'.\n state.doneProperty_ = true;\n return new Interpreter.State(node[\"property\"], state.scope);\n } else {\n propName = state.value;\n }\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [state.object_, propName];\n } else {\n var value = this.getProperty(state.object_, propName);\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 = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, state.object_);\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 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 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 }\n // Set the property computed in the previous execution.\n if (!state.properties_[propName]) {\n // Create temp object to collect value, getter, and/or setter.\n state.properties_[propName] = {};\n }\n state.properties_[propName][property[\"kind\"]] = state.value;\n state.n_ = ++n;\n property = node[\"properties\"][n];\n }\n if (property) {\n return new Interpreter.State(property[\"value\"], state.scope);\n }\n for (var key in state.properties_) {\n var kinds = state.properties_[key];\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 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 if (expression) {\n state.done = false;\n return new Interpreter.State(expression, state.scope);\n }\n state.done = true;\n // 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 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 if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\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 if (state.test_ === 1) {\n state.test_ = 2;\n // Preserve switch value between case tests.\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 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 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 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 if (state.matched_ || state.value === state.switchValue_) {\n state.matched_ = true;\n var n = state.n_ || 0;\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 }\n // Move on to next case.\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 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 return nextState;\n }\n if (!state.doneFinalizer_ && node[\"finalizer\"]) {\n state.doneFinalizer_ = true;\n return new Interpreter.State(node[\"finalizer\"], state.scope);\n }\n stack.pop();\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 stack.pop();\n var value = state.value;\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;\n // 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 if (Array.isArray(value)) {\n var obj = value[0];\n if (obj === Interpreter.SCOPE_REFERENCE) {\n // 'delete foo;' is the same as 'delete window.foo'.\n obj = state.scope;\n }\n var name = String(value[1]);\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 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 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 if (!state.leftSide_) {\n state.leftSide_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_) {\n var leftValue = this.getValue(state.leftSide_, node);\n state.leftValue_ = leftValue;\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 = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftSide_);\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 var leftValue = Number(state.leftValue_);\n var changeValue;\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 var returnValue = node[\"prefix\"] ? changeValue : leftValue;\n var setter = this.setValue(state.leftSide_, changeValue);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = returnValue;\n return this.createSetter_(setter, state.leftSide_, changeValue);\n }\n // Return if no setter function.\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 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 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 declarationNode = declarations[++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\"];\n\n// 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;\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;\n// Obsolete. Do not use.\nInterpreter.prototype[\"createPrimitive\"] = function (x) {\n return x;\n};\n\nexport { Interpreter };\n","import { CONSTANTS } from \"../../Constants\";\nimport { Server } from \"../Server\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function calculateServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n const numServerGrowthCycles = Math.max(Math.floor(threads), 0);\n\n //Get adjusted growth rate, which accounts for server security\n const growthRate = CONSTANTS.ServerBaseGrowthRate;\n let adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;\n if (adjGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n adjGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n //Calculate adjusted server growth rate based on parameters\n const serverGrowthPercentage = server.serverGrowth / 100;\n const numServerGrowthCyclesAdjusted =\n numServerGrowthCycles * serverGrowthPercentage * BitNodeMultipliers.ServerGrowthRate;\n\n //Apply serverGrowth for the calculated number of growth cycles\n const coreBonus = 1 + (cores - 1) / 16;\n return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.hacking_grow_mult * coreBonus);\n}\n","import { FactionNames } from '../../Faction/data/FactionNames';\nimport { Sleeve } from \"./Sleeve\";\n\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\n\nexport function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentation[] {\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\n const ownedAugNames: string[] = sleeve.augmentations.map((e) => {\n return e.name;\n });\n const availableAugs: Augmentation[] = [];\n\n // Helper function that helps filter out augs that are already owned\n // and augs that aren't allowed for sleeves\n function isAvailableForSleeve(aug: Augmentation): boolean {\n if (aug.name === AugmentationNames.NeuroFluxGovernor) {\n return false;\n }\n if (ownedAugNames.includes(aug.name)) {\n return false;\n }\n if (availableAugs.includes(aug)) {\n return false;\n }\n if (aug.isSpecial) {\n return false;\n }\n\n const validMults = [\n \"hacking_mult\",\n \"strength_mult\",\n \"defense_mult\",\n \"dexterity_mult\",\n \"agility_mult\",\n \"charisma_mult\",\n \"hacking_exp_mult\",\n \"strength_exp_mult\",\n \"defense_exp_mult\",\n \"dexterity_exp_mult\",\n \"agility_exp_mult\",\n \"charisma_exp_mult\",\n \"company_rep_mult\",\n \"faction_rep_mult\",\n \"crime_money_mult\",\n \"crime_success_mult\",\n \"work_money_mult\",\n ];\n for (const mult of Object.keys(aug.mults)) {\n if (validMults.includes(mult)) {\n return true;\n }\n }\n\n return false;\n }\n\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 if (p.inGang()) {\n const fac = p.getGangFaction();\n\n for (const augName of Object.keys(Augmentations)) {\n const aug = Augmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n }\n\n for (const facName of p.factions) {\n if (facName === FactionNames.Bladeburners) {\n continue;\n }\n if (facName === FactionNames.Netburners) {\n continue;\n }\n const fac: Faction | null = Factions[facName];\n if (fac == null) {\n continue;\n }\n\n for (const augName of fac.augmentations) {\n const aug: Augmentation = Augmentations[augName];\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","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const StaneksGiftEvents = new EventEmitter<[]>();\n","import { Construction, CheckBox, CheckBoxOutlineBlank } from \"@mui/icons-material\";\nimport { Box, Button, Container, List, ListItemButton, Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { Augmentation } from \"../../../Augmentation/Augmentation\";\nimport { Augmentations } from \"../../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../../Augmentation/data/AugmentationNames\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { hasAugmentationPrereqs } from \"../../../Faction/FactionHelpers\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { Locations } from \"../../../Locations/Locations\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { IMap } from \"../../../types\";\nimport { use } from \"../../../ui/Context\";\nimport { ConfirmationModal } from \"../../../ui/React/ConfirmationModal\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { convertTimeMsToTimeElapsedString, formatNumber } from \"../../../utils/StringHelperFunctions\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { GraftableAugmentation } from \"../GraftableAugmentation\";\n\nconst GraftableAugmentations: IMap = {};\n\nexport const getAvailableAugs = (player: IPlayer): string[] => {\n const augs: string[] = [];\n\n for (const [augName, aug] of Object.entries(Augmentations)) {\n if (augName === AugmentationNames.NeuroFluxGovernor || augName === AugmentationNames.TheRedPill || aug.isSpecial)\n continue;\n augs.push(augName);\n }\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation));\n};\n\nconst canGraft = (player: IPlayer, aug: GraftableAugmentation): boolean => {\n if (player.money < aug.cost) {\n return false;\n }\n return hasAugmentationPrereqs(aug.augmentation);\n};\n\ninterface IProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst AugPreReqsChecklist = (props: IProps): React.ReactElement => {\n const aug = props.aug,\n player = props.player;\n\n return (\n \n Pre-Requisites:\n
\n {aug.prereqs.map((preAug) => (\n \n {player.hasAugmentation(preAug) ? : }\n {preAug}\n \n ))}\n
\n );\n};\n\nexport const GraftingRoot = (): React.ReactElement => {\n const player = use.Player();\n const router = use.Router();\n\n for (const aug of Object.values(Augmentations)) {\n const name = aug.name;\n const graftableAug = new GraftableAugmentation(aug);\n GraftableAugmentations[name] = graftableAug;\n }\n\n const [selectedAug, setSelectedAug] = useState(getAvailableAugs(player)[0]);\n const [graftOpen, setGraftOpen] = useState(false);\n\n return (\n \n \n Grafting Laboratory\n \n You find yourself in a secret laboratory, owned by a mysterious researcher.\n
\n The scientist explains that they've been studying Augmentation grafting, the process of applying Augmentations\n without requiring a body reset.\n
\n
\n Through legally questionable connections, the scientist has access to a vast array of Augmentation blueprints,\n even private designs. They offer to build and graft the Augmentations to you, in exchange for both a hefty sum\n of money, and being a lab rat.\n
\n\n \n Graft Augmentations\n {getAvailableAugs(player).length > 0 ? (\n \n \n {getAvailableAugs(player).map((k, i) => (\n setSelectedAug(k)} selected={selectedAug === k}>\n {k}\n \n ))}\n \n \n \n {selectedAug}\n \n setGraftOpen(true)}\n sx={{ width: \"100%\" }}\n disabled={!canGraft(player, GraftableAugmentations[selectedAug])}\n >\n Graft Augmentation (\n \n \n \n )\n \n setGraftOpen(false)}\n onConfirm={() => {\n const graftableAug = GraftableAugmentations[selectedAug];\n player.loseMoney(graftableAug.cost, \"augmentations\");\n player.startGraftAugmentationWork(selectedAug, graftableAug.time);\n player.startFocusing();\n router.toWork();\n }}\n confirmationText={\n <>\n Cancelling grafting will not save grafting progress, and the money you spend will not{\" \"}\n be returned.\n
\n
\n Additionally, grafting an Augmentation will increase the potency of the Entropy virus.\n \n }\n />\n \n Time to Graft:{\" \"}\n {convertTimeMsToTimeElapsedString(\n GraftableAugmentations[selectedAug].time / (1 + (player.getIntelligenceBonus(3) - 1) / 3),\n )}\n {/* Use formula so the displayed creation time is accurate to player bonus */}\n \n {Augmentations[selectedAug].prereqs.length > 0 && (\n \n )}\n\n
\n \n {(() => {\n const aug = Augmentations[selectedAug];\n\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const tooltip = (\n <>\n {info}\n
\n
\n {aug.stats}\n \n );\n return tooltip;\n })()}\n
\n
\n
\n ) : (\n All Augmentations owned\n )}\n
\n\n \n Entropy Virus\n\n \n \n Entropy strength: {player.entropy}\n
\n All multipliers decreased by:{\" \"}\n {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}% (multiplicative)\n
\n
\n\n \n When installed on an unconscious individual, Augmentations are scanned by the body on awakening, eliminating\n hidden malware. However, grafted Augmentations do not provide this security measure.\n
\n
\n Individuals who tested Augmentation grafting have reported symptoms of an unknown virus, which they've dubbed\n \"Entropy\". This virus seems to grow more potent with each grafted Augmentation...\n
\n
\n
\n );\n};\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport FileSaver from \"file-saver\";\nimport JSZip from \"jszip\";\n\nexport function exportScripts(pattern: string, server: BaseServer): void {\n const matchEnding = pattern.length == 1 || pattern === \"*.*\" ? null : pattern.slice(1); // Treat *.* the same as *\n const zip = new JSZip();\n // Helper function to zip any file contents whose name matches the pattern\n const zipFiles = (fileNames: string[], fileContents: string[]): void => {\n for (let i = 0; i < fileContents.length; ++i) {\n let name = fileNames[i];\n if (name.startsWith(\"/\")) name = name.slice(1);\n if (!matchEnding || name.endsWith(matchEnding))\n zip.file(name, new Blob([fileContents[i]], { type: \"text/plain\" }));\n }\n };\n // In the case of script files, we pull from the server.scripts array\n if (!matchEnding || isScriptFilename(matchEnding))\n zipFiles(\n server.scripts.map((s) => s.filename),\n server.scripts.map((s) => s.code),\n );\n // In the case of text files, we pull from the server.scripts array\n if (!matchEnding || matchEnding.endsWith(\".txt\"))\n zipFiles(\n server.textFiles.map((s) => s.fn),\n server.textFiles.map((s) => s.text),\n );\n\n // Return an error if no files matched, rather than an empty zip folder\n if (Object.keys(zip.files).length == 0) throw new Error(`No files match the pattern ${pattern}`);\n const zipFn = `bitburner${isScriptFilename(pattern) ? \"Scripts\" : pattern === \"*.txt\" ? \"Texts\" : \"Files\"}.zip`;\n zip.generateAsync({ type: \"blob\" }).then((content: any) => FileSaver.saveAs(content, zipFn));\n}\n\nexport function download(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of download command. Usage: download [script/text file]\");\n return;\n }\n const fn = args[0] + \"\";\n // If the parameter starts with *, download all files that match the wildcard pattern\n if (fn.startsWith(\"*\")) {\n try {\n exportScripts(fn, server);\n return;\n } catch (error: any) {\n return terminal.error(error.message);\n }\n } else if (isScriptFilename(fn)) {\n // Download a single script\n const script = terminal.getScript(player, fn);\n if (script != null) {\n return script.download();\n }\n } else if (fn.endsWith(\".txt\")) {\n // Download a single text file\n const txt = terminal.getTextFile(player, fn);\n if (txt != null) {\n return txt.download();\n }\n } else {\n terminal.error(`Cannot download this filetype`);\n return;\n }\n terminal.error(`${fn} does not exist`);\n return;\n } catch (e) {\n terminal.error(e + \"\");\n return;\n }\n}\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 */\nimport React, { useState } from \"react\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\ntype IProps = {\n aug: Augmentation;\n level?: number | string | null;\n};\n\nexport function AugmentationAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n let displayName = props.aug.name;\n if (props.level != null) {\n if (props.aug.name === AugmentationNames.NeuroFluxGovernor) {\n displayName += ` - Level ${props.level}`;\n }\n }\n\n if (typeof props.aug.info === \"string\") {\n return (\n \n setOpen((old) => !old)}>\n {displayName}} />\n {open ? : }\n \n \n \n \n {props.aug.stats && (\n <>\n
\n
\n {props.aug.stats}\n \n )}\n
\n
\n
\n );\n }\n\n return (\n \n setOpen((old) => !old)}>\n {displayName}} />\n {open ? : }\n \n \n \n \n {props.aug.info}\n {props.aug.stats && (\n <>\n
\n
\n {props.aug.stats}\n \n )}\n
\n
\n
\n
\n );\n}\n","import * as React from \"react\";\n\nexport const stealthIcon = (\n \n \n \n \n \n \n);\nexport const killIcon = (\n \n \n \n \n \n \n);\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\n\ninterface IProps {\n action: IAction;\n isActive: boolean;\n bladeburner: IBladeburner;\n rerender: () => void;\n}\n\nexport function ActionLevel({ action, isActive, bladeburner, rerender }: IProps): React.ReactElement {\n const player = use.Player();\n\n const canIncrease = action.level < action.maxLevel;\n const canDecrease = action.level > 1;\n\n function increaseLevel(): void {\n if (!canIncrease) return;\n ++action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n function decreaseLevel(): void {\n if (!canDecrease) return;\n --action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n return (\n \n \n \n {action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed\n for next level\n \n }\n >\n \n Level: {action.level} / {action.maxLevel}\n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n \n );\n}\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface IProps {\n action: IAction;\n rerender: () => void;\n}\n\nexport function Autolevel(props: IProps): React.ReactElement {\n function onAutolevel(event: React.ChangeEvent): void {\n props.action.autoLevel = event.target.checked;\n props.rerender();\n }\n return (\n \n Automatically increase operation level when possible}>\n Autolevel:\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Operation } from \"../Operation\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { TeamSizeModal } from \"./TeamSizeModal\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport Button from \"@mui/material/Button\";\ninterface IProps {\n action: Operation;\n bladeburner: IBladeburner;\n}\nexport function TeamSizeButton(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n \n setOpen(false)} action={props.action} bladeburner={props.bladeburner} />\n \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nexport function BlinkingCursor(): React.ReactElement {\n const [on, setOn] = useState(true);\n useEffect(() => {\n const i = setInterval(() => setOn((old) => !old), 1000);\n return () => clearInterval(i);\n });\n return <>{on ? \"|\" : \"\"};\n}\n","import React, { useState } from 'react';\nimport { deleteGame } from \"../../db\";\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from '@mui/material';\n\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { pushDisableRestore } from '../../Electron';\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n}\n\nexport function DeleteGameButton({ color = \"primary\" }: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n return (<>\n \n \n \n {\n setModalOpened(false);\n deleteGame()\n .then(() => {\n pushDisableRestore();\n setTimeout(() => location.reload(), 1000);\n })\n .catch((r) => console.error(`Could not delete game: ${r}`));\n }}\n open={modalOpened}\n onClose={() => setModalOpened(false)}\n confirmationText={\"Really delete your game? (It's permanent!)\"}\n />\n )\n}\n","import React, { useState } from 'react';\n\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from '@mui/material';\nimport RestartAltIcon from '@mui/icons-material/RestartAlt';\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n noConfirmation?: boolean;\n onTriggered: () => void;\n}\n\nexport function SoftResetButton({ color = \"primary\", noConfirmation = false, onTriggered }: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n function handleButtonClick(): void {\n if (noConfirmation) {\n onTriggered();\n } else {\n setModalOpened(true);\n }\n }\n\n return (<>\n \n \n \n setModalOpened(false)}\n confirmationText={\"This will perform the same action as installing Augmentations, are you sure?\"}\n />\n )\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { ThemeEditorModal } from \"./ThemeEditorModal\";\nimport { IRouter } from \"../../ui/Router\";\nimport ColorizeIcon from \"@mui/icons-material/Colorize\";\n\ninterface IProps {\n router: IRouter;\n}\n\nexport function ThemeEditorButton({ router }: IProps): React.ReactElement {\n const [themeEditorOpen, setThemeEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setThemeEditorOpen(false)} router={router} />\n \n );\n}\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Link } from \"@mui/material\";\n\nexport function ThemeCollaborate(): React.ReactElement {\n return (\n <>\n \n If you've created a theme that you believe should be added in game's theme browser, feel free to{\" \"}\n \n create a pull request\n \n .\n \n \n Head over to the{\" \"}\n \n theme-sharing\n {\" \"}\n discord channel for more.\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport TextFormatIcon from \"@mui/icons-material/TextFormat\";\nimport { StyleEditorModal } from \"./StyleEditorModal\";\n\nexport function StyleEditorButton(): React.ReactElement {\n const [styleEditorOpen, setStyleEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setStyleEditorOpen(false)} />\n \n );\n}\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 */\nimport React, { useState, useEffect } from \"react\";\n\nimport { CityName } from \"../data/CityNames\";\nimport { TravelConfirmationModal } from \"./TravelConfirmationModal\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { use } from \"../../ui/Context\";\nimport { Money } from \"../../ui/React/Money\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\n\ntype IProps = {\n p: IPlayer;\n router: IRouter;\n};\n\nfunction travel(p: IPlayer, router: IRouter, to: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!p.canAfford(cost)) {\n return;\n }\n\n p.loseMoney(cost, \"other\");\n p.travel(to);\n dialogBoxCreate(<>You are now in {to}!);\n router.toCity();\n}\n\nexport function TravelAgencyRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const [open, setOpen] = useState(false);\n const [destination, setDestination] = useState(CityName.Sector12);\n function rerender(): void {\n setRerender((o) => !o);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function startTravel(city: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!player.canAfford(cost)) {\n return;\n }\n if (Settings.SuppressTravelConfirmation) {\n travel(player, router, city);\n return;\n }\n setOpen(true);\n setDestination(city);\n }\n\n return (\n <>\n Travel Agency\n \n \n From here, you can travel to any other city! A ticket costs{\" \"}\n .\n \n {Settings.DisableASCIIArt ? (\n <>\n {Object.values(CityName)\n .filter((city: string) => city != props.p.city)\n .map((city: string) => {\n const match = Object.entries(CityName).find((entry) => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return (\n \n \n
\n
\n );\n })}\n \n ) : (\n startTravel(city)} />\n )}\n
\n travel(player, router, destination)}\n open={open}\n onClose={() => setOpen(false)}\n />\n \n );\n}\n","import React, { useState, useEffect, useRef, useMemo } from \"react\";\nimport Editor, { Monaco } from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\n\ntype IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\ntype ITextModel = monaco.editor.ITextModel;\nimport { OptionsModal } from \"./OptionsModal\";\nimport { Options } from \"./Options\";\nimport { isValidFilePath } from \"../../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { Script } from \"../../Script/Script\";\nimport { TextFile } from \"../../TextFile\";\nimport { calculateRamUsage, checkInfiniteLoop } from \"../../Script/RamCalculations\";\nimport { RamCalculationErrorCode } from \"../../Script/RamCalculationErrorCodes\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { DragDropContext, Droppable, Draggable } from \"react-beautiful-dnd\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { NetscriptFunctions } from \"../../NetscriptFunctions\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { iTutorialNextStep, ITutorial, iTutorialSteps } from \"../../InteractiveTutorial\";\nimport { debounce } from \"lodash\";\nimport { saveObject } from \"../../SaveObject\";\nimport { loadThemes } from \"./themes\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport Box from \"@mui/material/Box\";\nimport SettingsIcon from \"@mui/icons-material/Settings\";\nimport SyncIcon from \"@mui/icons-material/Sync\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport Table from \"@mui/material/Table\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { PromptEvent } from \"../../ui/React/PromptManager\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport libSource from \"!!raw-loader!../NetscriptDefinitions.d.ts\";\nimport { TextField, Tooltip } from \"@mui/material\";\n\ninterface IProps {\n // Map of filename -> code\n files: Record;\n hostname: string;\n player: IPlayer;\n router: IRouter;\n vim: boolean;\n}\n\n// TODO: try to remove global symbols\nlet symbolsLoaded = false;\nlet symbols: string[] = [];\nexport function SetupTextEditor(): void {\n const ns = NetscriptFunctions({} as WorkerScript);\n\n // Populates symbols for text editor\n function populate(ns: any): string[] {\n let symbols: string[] = [];\n const keys = Object.keys(ns);\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 if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\", \"alterReality\"];\n symbols = symbols.filter((symbol: string) => !exclude.includes(symbol)).sort();\n}\n\n// Holds all the data for a open script\nclass OpenScript {\n fileName: string;\n code: string;\n hostname: string;\n lastPosition: monaco.Position;\n model: ITextModel;\n\n constructor(fileName: string, code: string, hostname: string, lastPosition: monaco.Position, model: ITextModel) {\n this.fileName = fileName;\n this.code = code;\n this.hostname = hostname;\n this.lastPosition = lastPosition;\n this.model = model;\n }\n}\n\nlet openScripts: OpenScript[] = [];\nlet currentScript: OpenScript | null = null;\n\n// Called every time script editor is opened\nexport function Root(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n const editorRef = useRef(null);\n const monacoRef = useRef(null);\n const vimStatusRef = useRef(null);\n const [vimEditor, setVimEditor] = useState(null);\n const [editor, setEditor] = useState(null);\n const [filter, setFilter] = useState(\"\");\n const [searchExpanded, setSearchExpanded] = useState(false);\n\n const [ram, setRAM] = useState(\"RAM: ???\");\n const [ramEntries, setRamEntries] = useState([[\"???\", \"\"]]);\n const [updatingRam, setUpdatingRam] = useState(false);\n const [decorations, setDecorations] = useState([]);\n\n const [optionsOpen, setOptionsOpen] = useState(false);\n const [options, setOptions] = useState({\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: props.vim || Settings.MonacoVim,\n });\n\n const [ramInfoOpen, setRamInfoOpen] = useState(false);\n\n // Prevent Crash if script is open on deleted server\n openScripts = openScripts.filter((script) => {\n return GetServer(script.hostname) !== null;\n });\n if (currentScript && GetServer(currentScript.hostname) === null) {\n currentScript = openScripts[0];\n if (currentScript === undefined) currentScript = null;\n }\n\n const [dimensions, setDimensions] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n useEffect(() => {\n const debouncedHandleResize = debounce(function handleResize() {\n setDimensions({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n }, 250);\n\n window.addEventListener(\"resize\", debouncedHandleResize);\n\n return () => {\n window.removeEventListener(\"resize\", debouncedHandleResize);\n };\n }, []);\n\n useEffect(() => {\n if (currentScript !== null) {\n updateRAM(currentScript.code);\n }\n }, []);\n\n useEffect(() => {\n function keydown(event: KeyboardEvent): void {\n if (Settings.DisableHotkeys) return;\n //Ctrl + b\n if (event.code == \"KeyB\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n props.router.toTerminal();\n }\n\n // CTRL/CMD + S\n if (event.code == \"KeyS\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n event.stopPropagation();\n save();\n }\n }\n document.addEventListener(\"keydown\", keydown);\n return () => document.removeEventListener(\"keydown\", keydown);\n });\n\n useEffect(() => {\n // setup monaco-vim\n if (options.vim && editor && !vimEditor) {\n try {\n // This library is not typed\n // @ts-expect-error\n window.require([\"monaco-vim\"], function (MonacoVim: any) {\n setVimEditor(MonacoVim.initVimMode(editor, vimStatusRef.current));\n MonacoVim.VimMode.Vim.defineEx(\"write\", \"w\", function () {\n // your own implementation on what you want to do when :w is pressed\n save();\n });\n MonacoVim.VimMode.Vim.defineEx(\"quit\", \"q\", function () {\n props.router.toTerminal();\n });\n // \"wqriteandquit\" is not a typo, prefix must be found in full string\n MonacoVim.VimMode.Vim.defineEx(\"wqriteandquit\", \"wq\", function () {\n save();\n props.router.toTerminal();\n });\n\n // Setup \"go to next tab\" and \"go to previous tab\". This is a little more involved\n // since these aren't Ex commands (they run in normal mode, not after typing `:`)\n MonacoVim.VimMode.Vim.defineAction(\"nextTabs\", function (_cm: any, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the next tab (to the right). Wraps around when at the rightmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n const nextIndex = (currIndex + nTabs) % openScripts.length;\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.defineAction(\"prevTabs\", function (_cm: any, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the previous tab (to the left). Wraps around when at the leftmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n let nextIndex = currIndex - nTabs;\n while (nextIndex < 0) {\n nextIndex += openScripts.length;\n }\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.mapCommand(\"gt\", \"action\", \"nextTabs\", {}, { context: \"normal\" });\n MonacoVim.VimMode.Vim.mapCommand(\"gT\", \"action\", \"prevTabs\", {}, { context: \"normal\" });\n editor.focus();\n });\n } catch { }\n } else if (!options.vim) {\n // Whem vim mode is disabled\n vimEditor?.dispose();\n setVimEditor(null);\n }\n\n return () => {\n vimEditor?.dispose();\n };\n }, [options, editorRef, editor, vimEditor]);\n\n // Generates a new model for the script\n function regenerateModel(script: OpenScript): void {\n if (monacoRef.current !== null) {\n script.model = monacoRef.current.editor.createModel(\n script.code,\n script.fileName.endsWith(\".txt\") ? \"plaintext\" : \"javascript\",\n );\n }\n }\n\n const debouncedSetRAM = useMemo(\n () =>\n debounce((s, e) => {\n setRAM(s);\n setRamEntries(e);\n setUpdatingRam(false);\n }, 300),\n [],\n );\n\n async function updateRAM(newCode: string): Promise {\n if (currentScript != null && currentScript.fileName.endsWith(\".txt\")) {\n debouncedSetRAM(\"N/A\", [[\"N/A\", \"\"]]);\n return;\n }\n setUpdatingRam(true);\n const codeCopy = newCode + \"\";\n const ramUsage = await calculateRamUsage(props.player, codeCopy, props.player.getCurrentServer().scripts);\n if (ramUsage.cost > 0) {\n const entries = ramUsage.entries?.sort((a, b) => b.cost - a.cost) ?? [];\n const entriesDisp = [];\n for (const entry of entries) {\n entriesDisp.push([`${entry.name} (${entry.type})`, numeralWrapper.formatRAM(entry.cost)]);\n }\n\n debouncedSetRAM(\"RAM: \" + numeralWrapper.formatRAM(ramUsage.cost), entriesDisp);\n return;\n }\n switch (ramUsage.cost) {\n case RamCalculationErrorCode.ImportError: {\n debouncedSetRAM(\"RAM: Import Error\", [[\"Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.URLImportError: {\n debouncedSetRAM(\"RAM: HTTP Import Error\", [[\"HTTP Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.SyntaxError:\n default: {\n debouncedSetRAM(\"RAM: Syntax Error\", [[\"Syntax Error\", \"\"]]);\n break;\n }\n }\n return new Promise(() => undefined);\n }\n\n // Formats the code\n function beautify(): void {\n if (editorRef.current === null) return;\n editorRef.current.getAction(\"editor.action.formatDocument\").run();\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 // https://blog.checklyhq.com/customizing-monaco/\n // Before the editor is mounted\n function beforeMount(monaco: any): void {\n if (symbolsLoaded) return;\n // Setup monaco auto completion\n symbolsLoaded = true;\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\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 return { suggestions: suggestions };\n },\n });\n\n (async function () {\n // We have to improve the default js language otherwise theme sucks\n const l = await monaco.languages\n .getLanguages()\n .find((l: any) => l.id === \"javascript\")\n .loader();\n // replaced the bare tokens with regexes surrounded by \\b, e.g. \\b{token}\\b which matches a word-break on either side\n // this prevents the highlighter from highlighting pieces of variables that start with a reserved token name\n l.language.tokenizer.root.unshift([new RegExp(\"\\\\bns\\\\b\"), { token: \"ns\" }]);\n for (const symbol of symbols)\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${symbol}\\\\b`), { token: \"netscriptfunction\" }]);\n const otherKeywords = [\"let\", \"const\", \"var\", \"function\"];\n const otherKeyvars = [\"true\", \"false\", \"null\", \"undefined\"];\n otherKeywords.forEach((k) =>\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeywords\" }]),\n );\n otherKeyvars.forEach((k) =>\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeyvars\" }]),\n );\n l.language.tokenizer.root.unshift([new RegExp(\"\\\\bthis\\\\b\"), { token: \"this\" }]);\n })();\n\n const source = (libSource + \"\").replace(/export /g, \"\");\n monaco.languages.typescript.javascriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n loadThemes(monaco);\n }\n\n // When the editor is mounted\n function onMount(editor: IStandaloneCodeEditor, monaco: Monaco): void {\n // Required when switching between site navigation (e.g. from Script Editor -> Terminal and back)\n // the `useEffect()` for vim mode is called before editor is mounted.\n setEditor(editor);\n\n editorRef.current = editor;\n monacoRef.current = monaco;\n\n if (editorRef.current === null || monacoRef.current === null) return;\n\n if (!props.files && currentScript !== null) {\n // Open currentscript\n regenerateModel(currentScript);\n editorRef.current.setModel(currentScript.model);\n editorRef.current.setPosition(currentScript.lastPosition);\n editorRef.current.revealLineInCenter(currentScript.lastPosition.lineNumber);\n updateRAM(currentScript.code);\n editorRef.current.focus();\n return;\n }\n if (props.files) {\n const files = Object.entries(props.files);\n\n if (!files.length) {\n editorRef.current.focus();\n return;\n }\n\n for (const [filename, code] of files) {\n // Check if file is already opened\n const openScript = openScripts.find(\n (script) => script.fileName === filename && script.hostname === props.hostname,\n );\n if (openScript) {\n // Script is already opened\n if (openScript.model === undefined || openScript.model === null || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n\n currentScript = openScript;\n editorRef.current.setModel(openScript.model);\n editorRef.current.setPosition(openScript.lastPosition);\n editorRef.current.revealLineInCenter(openScript.lastPosition.lineNumber);\n updateRAM(openScript.code);\n } else {\n // Open script\n const newScript = new OpenScript(\n filename,\n code,\n props.hostname,\n new monacoRef.current.Position(0, 0),\n monacoRef.current.editor.createModel(code, filename.endsWith(\".txt\") ? \"plaintext\" : \"javascript\"),\n );\n openScripts.push(newScript);\n currentScript = { ...newScript };\n editorRef.current.setModel(newScript.model);\n updateRAM(newScript.code);\n }\n }\n }\n\n editorRef.current.focus();\n }\n\n function infLoop(newCode: string): void {\n if (editorRef.current === null || currentScript === null) return;\n if (!currentScript.fileName.endsWith(\".ns\") && !currentScript.fileName.endsWith(\".js\")) return;\n const awaitWarning = checkInfiniteLoop(newCode);\n if (awaitWarning !== -1) {\n const newDecorations = editorRef.current.deltaDecorations(decorations, [\n {\n range: {\n startLineNumber: awaitWarning,\n startColumn: 1,\n endLineNumber: awaitWarning,\n endColumn: 10,\n },\n options: {\n isWholeLine: true,\n glyphMarginClassName: \"myGlyphMarginClass\",\n glyphMarginHoverMessage: {\n value: \"Possible infinite loop, await something.\",\n },\n },\n },\n ]);\n setDecorations(newDecorations);\n } else {\n const newDecorations = editorRef.current.deltaDecorations(decorations, []);\n setDecorations(newDecorations);\n }\n }\n\n // When the code is updated within the editor\n function updateCode(newCode?: string): void {\n if (newCode === undefined) return;\n updateRAM(newCode);\n if (editorRef.current === null) return;\n const newPos = editorRef.current.getPosition();\n if (newPos === null) return;\n if (currentScript !== null) {\n currentScript = { ...currentScript, code: newCode, lastPosition: newPos };\n const curIndex = openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n const newArr = [...openScripts];\n const tempScript = currentScript;\n tempScript.code = newCode;\n newArr[curIndex] = tempScript;\n openScripts = [...newArr];\n }\n try {\n infLoop(newCode);\n } catch (err) { }\n }\n\n function saveScript(scriptToSave: OpenScript): void {\n const server = GetServer(scriptToSave.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(scriptToSave.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 (scriptToSave.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (scriptToSave.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === scriptToSave.fileName) {\n server.textFiles[i].write(scriptToSave.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n const textFile = new TextFile(scriptToSave.fileName, scriptToSave.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n }\n\n function save(): void {\n if (currentScript === null) {\n console.error(\"currentScript is null when it shouldn't be. Unable to save script\");\n return;\n }\n // this is duplicate code with saving later.\n if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (currentScript.fileName !== \"n00dles.script\") {\n dialogBoxCreate(\"Leave the script name as 'n00dles.script'!\");\n return;\n }\n if (currentScript.code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n dialogBoxCreate(\"Please copy and paste the code from the tutorial!\");\n return;\n }\n\n //Save the script\n saveScript(currentScript);\n\n iTutorialNextStep();\n\n return;\n }\n\n if (currentScript.fileName == \"\") {\n dialogBoxCreate(\"You must specify a filename!\");\n return;\n }\n\n if (!isValidFilePath(currentScript.fileName)) {\n dialogBoxCreate(\n \"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\",\n );\n return;\n }\n\n const server = GetServer(currentScript.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(currentScript.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 (currentScript.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (currentScript.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === currentScript.fileName) {\n server.textFiles[i].write(currentScript.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n const textFile = new TextFile(currentScript.fileName, currentScript.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n }\n\n function reorder(list: Array, startIndex: number, endIndex: number): OpenScript[] {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result;\n }\n\n function onDragEnd(result: any): void {\n // Dropped outside of the list\n if (!result.destination) {\n result;\n return;\n }\n\n const items = reorder(openScripts, result.source.index, result.destination.index);\n\n openScripts = items;\n }\n\n function currentTabIndex(): number | undefined {\n if (currentScript !== null) {\n return openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n }\n\n return undefined;\n }\n\n function onTabClick(index: number): void {\n if (currentScript !== null) {\n // Save currentScript to openScripts\n const curIndex = currentTabIndex();\n if (curIndex !== undefined) {\n openScripts[curIndex] = currentScript;\n }\n }\n\n currentScript = { ...openScripts[index] };\n\n if (editorRef.current !== null && openScripts[index] !== null) {\n if (openScripts[index].model === undefined || openScripts[index].model.isDisposed()) {\n regenerateModel(openScripts[index]);\n }\n editorRef.current.setModel(openScripts[index].model);\n\n editorRef.current.setPosition(openScripts[index].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index].lastPosition.lineNumber);\n updateRAM(openScripts[index].code);\n editorRef.current.focus();\n }\n }\n\n function onTabClose(index: number): void {\n // See if the script on the server is up to date\n const closingScript = openScripts[index];\n const savedScriptIndex = openScripts.findIndex(\n (script) => script.fileName === closingScript.fileName && script.hostname === closingScript.hostname,\n );\n let savedScriptCode = \"\";\n if (savedScriptIndex !== -1) {\n savedScriptCode = openScripts[savedScriptIndex].code;\n }\n const server = GetServer(closingScript.hostname);\n if (server === null) throw new Error(`Server '${closingScript.hostname}' should not be null, but it is.`);\n\n const serverScriptIndex = server.scripts.findIndex((script) => script.filename === closingScript.fileName);\n if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex as number].code) {\n PromptEvent.emit({\n txt: \"Do you want to save changes to \" + closingScript.fileName + \"?\",\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n closingScript.code = savedScriptCode;\n saveScript(closingScript);\n }\n },\n });\n }\n\n if (openScripts.length > 1) {\n openScripts = openScripts.filter((value, i) => i !== index);\n\n let indexOffset = -1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 0;\n }\n }\n\n // Change current script if we closed it\n currentScript = openScripts[index + indexOffset];\n if (editorRef.current !== null) {\n if (\n openScripts[index + indexOffset].model === undefined ||\n openScripts[index + indexOffset].model === null ||\n openScripts[index + indexOffset].model.isDisposed()\n ) {\n regenerateModel(openScripts[index + indexOffset]);\n }\n\n editorRef.current.setModel(openScripts[index + indexOffset].model);\n editorRef.current.setPosition(openScripts[index + indexOffset].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index + indexOffset].lastPosition.lineNumber);\n editorRef.current.focus();\n }\n rerender();\n } else {\n // No more scripts are open\n openScripts = [];\n currentScript = null;\n props.router.toTerminal();\n }\n }\n\n function onTabUpdate(index: number): void {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return;\n\n if (openScript.code !== serverScriptCode) {\n PromptEvent.emit({\n txt:\n \"Do you want to overwrite the current editor content with the contents of \" +\n openScript.fileName +\n \" on the server? This cannot be undone.\",\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n openScript.code = serverScriptCode;\n\n // Switch to target tab\n onTabClick(index);\n\n if (editorRef.current !== null && openScript !== null) {\n if (openScript.model === undefined || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n editorRef.current.setModel(openScript.model);\n\n editorRef.current.setValue(openScript.code);\n updateRAM(openScript.code);\n editorRef.current.focus();\n }\n }\n },\n });\n }\n }\n\n function dirty(index: number): string {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return \" *\";\n\n // The server code is stored with its starting & trailing whitespace removed\n const openScriptFormatted = Script.formatCode(openScript.code);\n return serverScriptCode !== openScriptFormatted ? \" *\" : \"\";\n }\n\n function getServerCode(index: number): string | null {\n const openScript = openScripts[index];\n const server = GetServer(openScript.hostname);\n if (server === null) throw new Error(`Server '${openScript.hostname}' should not be null, but it is.`);\n\n const serverScript = server.scripts.find((s) => s.filename === openScript.fileName);\n return serverScript?.code ?? null;\n }\n function handleFilterChange(event: React.ChangeEvent): void {\n setFilter(event.target.value);\n }\n function handleExpandSearch(): void {\n setFilter(\"\")\n setSearchExpanded(!searchExpanded)\n }\n const filteredOpenScripts = Object.values(openScripts).filter(\n (script) => (script.hostname.includes(filter) || script.fileName.includes(filter))\n );\n\n // Toolbars are roughly 112px:\n // 8px body margin top\n // 38.5px filename tabs\n // 5px padding for top of editor\n // 44px bottom tool bar + 16px margin\n // + vim bar 34px\n const editorHeight = dimensions.height - (130 + (options.vim ? 34 : 0));\n const tabsMaxWidth = 1640;\n const tabMargin = 5;\n const tabMaxWidth = filteredOpenScripts.length ? tabsMaxWidth / filteredOpenScripts.length - tabMargin : 0;\n const tabIconWidth = 25;\n const tabTextWidth = tabMaxWidth - tabIconWidth * 2;\n return (\n <>\n
\n \n \n {(provided, snapshot) => (\n \n \n {searchExpanded ?\n ,\n spellCheck: false,\n endAdornment: \n }}\n /> : }\n \n {filteredOpenScripts.map(({ fileName, hostname }, index) => {\n const iconButtonStyle = {\n maxWidth: `${tabIconWidth}px`,\n minWidth: `${tabIconWidth}px`,\n minHeight: \"38.5px\",\n maxHeight: \"38.5px\",\n ...(currentScript?.fileName === filteredOpenScripts[index].fileName\n ? {\n background: Settings.theme.button,\n borderColor: Settings.theme.button,\n color: Settings.theme.primary,\n }\n : {\n background: Settings.theme.backgroundsecondary,\n borderColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n }),\n };\n\n const scriptTabText = `${hostname}:~/${fileName} ${dirty(index)}`;\n return (\n \n {(provided) => (\n \n \n onTabClick(index)}\n onMouseDown={(e) => {\n e.preventDefault();\n if (e.button === 1) onTabClose(index);\n }}\n style={{\n maxWidth: `${tabTextWidth}px`,\n minHeight: '38.5px',\n overflow: \"hidden\",\n ...(currentScript?.fileName === filteredOpenScripts[index].fileName\n ? {\n background: Settings.theme.button,\n borderColor: Settings.theme.button,\n color: Settings.theme.primary,\n }\n : {\n background: Settings.theme.backgroundsecondary,\n borderColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n }),\n }}\n >\n \n {scriptTabText}\n \n \n \n \n \n \n \n
\n )}\n
\n );\n })}\n {provided.placeholder}\n \n )}\n \n \n
\n Loading script editor!}\n height={`${editorHeight}px`}\n defaultLanguage=\"javascript\"\n defaultValue={\"\"}\n onChange={updateCode}\n theme={options.theme}\n options={{ ...options, glyphMargin: true }}\n />\n\n \n\n \n \n \n {\n setRamInfoOpen(true);\n }}\n >\n {ram}\n \n \n \n \n {\" \"}\n Documentation:{\" \"}\n \n Basic\n {\" \"}\n |\n \n Full\n \n \n \n setOptionsOpen(false)}\n options={{\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: Settings.MonacoVim,\n }}\n save={(options: Options) => {\n setOptions(options);\n Settings.MonacoTheme = options.theme;\n Settings.MonacoInsertSpaces = options.insertSpaces;\n Settings.MonacoFontSize = options.fontSize;\n Settings.MonacoWordWrap = options.wordWrap;\n Settings.MonacoVim = options.vim;\n }}\n />\n setRamInfoOpen(false)}>\n \n \n {ramEntries.map(([n, r]) => (\n \n \n {n}\n \n {r}\n \n \n \n ))}\n \n
\n
\n
\n \n \n No open files\n \n Use nano FILENAME in\n
\n the terminal to open files\n
\n
\n \n \n );\n}\n","/**\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST to replace import urls with blobs\n */\nimport * as walk from \"acorn-walk\";\nimport { parse } from \"acorn\";\n\nimport { makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { ScriptUrl } from \"./Script/ScriptUrl\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { Script } from \"./Script/Script\";\nimport { areImportsEquals } from \"./Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\n// Makes a blob that contains the code of a given script.\nfunction makeScriptBlob(code: string): Blob {\n return new Blob([code], { type: \"text/javascript\" });\n}\n\nexport async function compile(player: IPlayer, script: Script, scripts: Script[]): Promise {\n if (!shouldCompile(script, scripts)) return;\n // The URL at the top is the one we want to import. It will\n // recursively import all the other modules in the urlStack.\n //\n // Webpack likes to turn the import into a require, which sort of\n // but not really behaves like import. Particularly, it cannot\n // load fully dynamic content. So we hide the import from webpack\n // by placing it inside an eval call.\n await script.updateRamUsage(player, scripts);\n const uurls = _getScriptUrls(script, scripts, []);\n const url = uurls[uurls.length - 1].url;\n if (script.url && script.url !== url) {\n URL.revokeObjectURL(script.url);\n // Thoughts: Should we be revoking any URLs here?\n // If a script is modified repeatedly between two states,\n // we could reuse the blob at a later time.\n // BlobCache.removeByValue(script.url);\n // URL.revokeObjectURL(script.url);\n // if (script.dependencies.length > 0) {\n // script.dependencies.forEach((dep) => {\n // removeBlobFromCache(dep.url);\n // URL.revokeObjectURL(dep.url);\n // });\n // }\n }\n if (script.dependencies.length > 0) script.dependencies.forEach((dep) => URL.revokeObjectURL(dep.url));\n script.url = uurls[uurls.length - 1].url;\n script.module = new Promise((resolve) => resolve(eval(\"import(uurls[uurls.length - 1].url)\")));\n script.dependencies = uurls;\n}\n\n// Begin executing a user JS script, and return a promise that resolves\n// or rejects when the script finishes.\n// - script is a script to execute (see Script.js). We depend only on .filename and .code.\n// scripts is an array of other scripts on the server.\n// env is the global environment that should be visible to all the scripts\n// (i.e. hack, grow, etc.).\n// When the promise returned by this resolves, we'll have finished\n// running the main function of the script.\nexport async function executeJSScript(\n player: IPlayer,\n scripts: Script[] = [],\n workerScript: WorkerScript,\n): Promise {\n const script = workerScript.getScript();\n if (script === null) throw new Error(\"script is null\");\n await compile(player, script, scripts);\n workerScript.ramUsage = script.ramUsage;\n const loadedModule = await script.module;\n\n const ns = workerScript.env.vars;\n\n // TODO: putting await in a non-async function yields unhelpful\n // \"SyntaxError: unexpected reserved word\" with no line number information.\n if (!loadedModule.main) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `${script.filename} cannot be run because it does not have a main function.`,\n );\n }\n return loadedModule.main(ns);\n}\n\nfunction isDependencyOutOfDate(filename: string, scripts: Script[], scriptModuleSequenceNumber: number): boolean {\n const depScript = scripts.find((s) => s.filename == filename);\n\n // If the script is not present on the server, we should recompile, if only to get any necessary\n // compilation errors.\n if (!depScript) return true;\n\n const depIsMoreRecent = depScript.moduleSequenceNumber > scriptModuleSequenceNumber;\n return depIsMoreRecent;\n}\n/** Returns whether we should compile the script parameter.\n *\n * @param {Script} script\n * @param {Script[]} scripts\n */\nfunction shouldCompile(script: Script, scripts: Script[]): boolean {\n if (script.module === \"\") return true;\n return script.dependencies.some((dep) => isDependencyOutOfDate(dep.filename, scripts, script.moduleSequenceNumber));\n}\n\n// Gets a stack of blob urls, the top/right-most element being\n// the blob url for the named script on the named server.\n//\n// - script -- the script for whom we are getting a URL.\n// - scripts -- all the scripts available on this server\n// - seen -- The modules above this one -- to prevent mutual dependency.\n//\n// TODO We don't make any effort to cache a given module when it is imported at\n// different parts of the tree. That hasn't presented any problem with during\n// testing, but it might be an idea for the future. Would require a topo-sort\n// then url-izing from leaf-most to root-most.\n/**\n * @param {Script} script\n * @param {Script[]} scripts\n * @param {Script[]} seen\n * @returns {ScriptUrl[]} All of the compiled scripts, with the final one\n * in the list containing the blob corresponding to\n * the script parameter.\n */\n// BUG: apparently seen is never consulted. Oops.\nfunction _getScriptUrls(script: Script, scripts: Script[], seen: Script[]): ScriptUrl[] {\n // Inspired by: https://stackoverflow.com/a/43834063/91401\n const urlStack: ScriptUrl[] = [];\n // Seen contains the dependents of the current script. Make sure we include that in the script dependents.\n for (const dependent of seen) {\n if (!script.dependents.some((s) => s.server === dependent.server && s.filename == dependent.filename)) {\n script.dependents.push({ server: dependent.server, filename: dependent.filename });\n }\n }\n seen.push(script);\n try {\n // Replace every import statement with an import to a blob url containing\n // the corresponding script. E.g.\n //\n // import {foo} from \"bar.js\";\n //\n // becomes\n //\n // import {foo} from \"blob://\"\n //\n // Where the blob URL contains the script content.\n\n // Parse the code into an ast tree\n const ast: any = parse(script.code, { sourceType: \"module\", ecmaVersion: \"latest\", ranges: true });\n\n const importNodes: Array = [];\n // Walk the nodes of this tree and find any import declaration statements.\n walk.simple(ast, {\n ImportDeclaration(node: any) {\n // Push this import onto the stack to replace\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n },\n ExportNamedDeclaration(node: any) {\n if (node.source) {\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n }\n },\n ExportAllDeclaration(node: any) {\n if (node.source) {\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n }\n },\n });\n // Sort the nodes from last start index to first. This replaces the last import with a blob first,\n // preventing the ranges for other imports from being shifted.\n importNodes.sort((a, b) => b.start - a.start);\n let transformedCode = script.code;\n // Loop through each node and replace the script name with a blob url.\n for (const node of importNodes) {\n const filename = node.filename.startsWith(\"./\") ? node.filename.substring(2) : node.filename;\n\n // Find the corresponding script.\n const matchingScripts = scripts.filter((s) => areImportsEquals(s.filename, filename));\n if (matchingScripts.length === 0) continue;\n\n const [importedScript] = matchingScripts;\n\n const urls = _getScriptUrls(importedScript, scripts, seen);\n\n // The top url in the stack is the replacement import file for this script.\n urlStack.push(...urls);\n const blob = urls[urls.length - 1].url;\n\n // Replace the blob inside the import statement.\n transformedCode = transformedCode.substring(0, node.start) + blob + transformedCode.substring(node.end);\n }\n\n // We automatically define a print function() in the NetscriptJS module so that\n // accidental calls to window.print() do not bring up the \"print screen\" dialog\n transformedCode += `\\n\\nfunction print() {throw new Error(\"Invalid call to window.print(). Did you mean to use Netscript's print()?\");}`;\n\n const blob = URL.createObjectURL(makeScriptBlob(transformedCode));\n // Push the blob URL onto the top of the stack.\n urlStack.push(new ScriptUrl(script.filename, blob, script.moduleSequenceNumber));\n return urlStack;\n } catch (err) {\n // If there is an error, we need to clean up the URLs.\n for (const url of urlStack) URL.revokeObjectURL(url.url);\n throw err;\n } finally {\n seen.pop();\n }\n}\n","import { toNative } from \"./toNative\";\nimport * as libarg from \"arg\";\n\nexport function Flags(vargs: string[]): any {\n return function (data: any): any {\n data = toNative(data);\n // We always want the help flag.\n const args: {\n [key: string]: any;\n } = {};\n\n for (const d of data) {\n let t: any = String;\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 const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n const ret = libarg(args, { argv: vargs });\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\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 return ret;\n };\n}\n","import { Interpreter } from \"../ThirdParty/JSInterpreter\";\n\nconst defaultInterpreter = new Interpreter(\"\", () => undefined);\n\n// 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// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function toNative(pseudoObj: any): any {\n if (pseudoObj == null) return null;\n if (\n !pseudoObj.hasOwnProperty(\"properties\") ||\n !pseudoObj.hasOwnProperty(\"getter\") ||\n !pseudoObj.hasOwnProperty(\"setter\") ||\n !pseudoObj.hasOwnProperty(\"proto\")\n ) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj: any;\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\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 for (const key of Object.keys(pseudoObj.properties)) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n return nativeObj;\n}\n","import * as React from \"react\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport FirstPageIcon from \"@mui/icons-material/FirstPage\";\nimport KeyboardArrowLeft from \"@mui/icons-material/KeyboardArrowLeft\";\nimport KeyboardArrowRight from \"@mui/icons-material/KeyboardArrowRight\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\n\ninterface TablePaginationActionsProps {\n count: number;\n page: number;\n rowsPerPage: number;\n onPageChange: (event: React.MouseEvent, newPage: number) => void;\n}\n\nexport function TablePaginationActionsAll(props: TablePaginationActionsProps): React.ReactElement {\n const theme = useTheme();\n const { count, page, rowsPerPage, onPageChange } = props;\n\n const handleFirstPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return (\n \n \n {theme.direction === \"rtl\" ? : }\n \n \n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n \n );\n}\n","import * as React from \"react\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { TableCell as MuiTableCell, TableCellProps } from \"@mui/material\";\n\nconst useStyles = makeStyles({\n root: {\n border: \"1px solid white\",\n width: \"5px\",\n height: \"5px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\ntype IProps = {\n onMouseEnter?: () => void;\n onClick?: () => void;\n color: string;\n};\n\nexport function Cell(cellProps: IProps): React.ReactElement {\n return (\n \n );\n}\n","import { GetServer } from \"../Server/AllServers\";\nimport { RunningScript } from \"./RunningScript\";\n\nexport function getRamUsageFromRunningScript(script: RunningScript): number {\n if (script.ramUsage != null && script.ramUsage > 0) {\n return script.ramUsage; // Use cached value\n }\n\n const server = GetServer(script.server);\n if (server == null) {\n return 0;\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","import { ITerminal } from \"../../ITerminal\";\nimport { removeLeadingSlash, removeTrailingSlash } from '../../DirectoryHelpers'\nimport { IRouter, ScriptEditorRouteOptions } from \"../../../ui/Router\";\nimport { IPlayer } from \"../../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../../Script/isScriptFilename\";\nimport { CursorPositions } from \"../../../ScriptEditor/CursorPositions\";\nimport { Script } from \"../../../Script/Script\";\nimport { isEmpty } from \"lodash\";\n\ninterface EditorParameters {\n terminal: ITerminal;\n router: IRouter;\n player: IPlayer;\n server: BaseServer;\n args: (string | number | boolean)[];\n}\n\nfunction isNs2(filename: string): boolean {\n return filename.endsWith(\".ns\") || filename.endsWith(\".js\");\n}\n\nconst newNs2Template = `/** @param {NS} ns */\nexport async function main(ns) {\n\n}`;\n\ninterface ISimpleScriptGlob {\n glob: string;\n preGlob: string;\n postGlob: string;\n globError: string;\n globMatches: string[];\n globAgainst: Script[];\n}\n\nfunction containsSimpleGlob(filename: string): boolean {\n return filename.includes(\"*\");\n}\n\nfunction detectSimpleScriptGlob(\n args: EditorParameters[\"args\"],\n player: IPlayer,\n terminal: ITerminal,\n): ISimpleScriptGlob | null {\n if (args.length == 1 && containsSimpleGlob(`${args[0]}`)) {\n const filename = `${args[0]}`;\n const scripts = player.getCurrentServer().scripts;\n const parsedGlob = parseSimpleScriptGlob(filename, scripts, terminal);\n return parsedGlob;\n }\n return null;\n}\n\nfunction parseSimpleScriptGlob(globString: string, globDatabase: Script[], terminal: ITerminal): ISimpleScriptGlob {\n const parsedGlob: ISimpleScriptGlob = {\n glob: globString,\n preGlob: \"\",\n postGlob: \"\",\n globError: \"\",\n globMatches: [],\n globAgainst: globDatabase,\n };\n\n // Ensure deep globs are minified to simple globs, which act as deep globs in this impl\n globString = globString.replace(\"**\", \"*\");\n\n // Ensure only a single glob is present\n if (globString.split(\"\").filter((c) => c == \"*\").length !== 1) {\n parsedGlob.globError = \"Only a single glob is supported per command.\\nexample: `nano my-dir/*.js`\";\n return parsedGlob;\n }\n\n // Split arg around glob, normalize preGlob path\n [parsedGlob.preGlob, parsedGlob.postGlob] = globString.split(\"*\");\n parsedGlob.preGlob = removeLeadingSlash(parsedGlob.preGlob);\n\n // Add CWD to preGlob path\n const cwd = removeTrailingSlash(terminal.cwd())\n parsedGlob.preGlob = `${cwd}/${parsedGlob.preGlob}`\n\n // For every script on the current server, filter matched scripts per glob values & persist\n globDatabase.forEach((script) => {\n const filename = script.filename.startsWith('/') ? script.filename : `/${script.filename}`\n if (filename.startsWith(parsedGlob.preGlob) && filename.endsWith(parsedGlob.postGlob)) {\n parsedGlob.globMatches.push(filename);\n }\n });\n\n // Rebuild glob for potential error reporting\n parsedGlob.glob = `${parsedGlob.preGlob}*${parsedGlob.postGlob}`\n\n return parsedGlob;\n}\n\nexport function commonEditor(\n command: string,\n { terminal, router, player, args }: EditorParameters,\n scriptEditorRouteOptions?: ScriptEditorRouteOptions,\n): void {\n if (args.length < 1) {\n terminal.error(`Incorrect usage of ${command} command. Usage: ${command} [scriptname]`);\n return;\n }\n\n let filesToLoadOrCreate = args;\n try {\n const globSearch = detectSimpleScriptGlob(args, player, terminal);\n if (globSearch) {\n if (isEmpty(globSearch.globError) === false) throw new Error(globSearch.globError);\n filesToLoadOrCreate = globSearch.globMatches;\n }\n\n const files = filesToLoadOrCreate.map((arg) => {\n const filename = `${arg}`;\n\n if (isScriptFilename(filename)) {\n const filepath = terminal.getFilepath(filename);\n const script = terminal.getScript(player, filename);\n const fileIsNs2 = isNs2(filename);\n const code = script !== null ? script.code : fileIsNs2 ? newNs2Template : \"\";\n\n if (code === newNs2Template) {\n CursorPositions.saveCursor(filename, {\n row: 3,\n column: 5,\n });\n }\n\n return [filepath, code];\n }\n\n if (filename.endsWith(\".txt\")) {\n const filepath = terminal.getFilepath(filename);\n const txt = terminal.getTextFile(player, filename);\n return [filepath, txt === null ? \"\" : txt.text];\n }\n\n throw new Error(\n `Invalid file. Only scripts (.script, .ns, .js), or text files (.txt) can be edited with ${command}`,\n );\n });\n\n if (globSearch && files.length === 0) {\n throw new Error(`Could not find any valid files to open with ${command} using glob: \\`${globSearch.glob}\\``)\n }\n\n router.toScriptEditor(Object.fromEntries(files), scriptEditorRouteOptions);\n } catch (e) {\n terminal.error(`${e}`);\n }\n}\n","import { Bladeburner } from \"../../Bladeburner/Bladeburner\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessBladeburner(this: IPlayer): boolean {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || SourceFileFlags[6] > 0 || SourceFileFlags[7] > 0;\n}\n\nexport function inBladeburner(this: IPlayer): boolean {\n if (this.bladeburner == null) {\n return false;\n }\n return this.bladeburner instanceof Bladeburner;\n}\n\nexport function startBladeburner(this: IPlayer): void {\n this.bladeburner = new Bladeburner(this);\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Contract extends Action {\n constructor(params: IActionParams | null = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Contract\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Contract {\n return Generic_fromJSON(Contract, value.data);\n }\n}\n\nReviver.constructors.Contract = Contract;\n","export const ConsoleHelpText: {\n [key: string]: string[];\n helpList: string[];\n automate: string[];\n clear: string[];\n cls: string[];\n help: string[];\n log: string[];\n skill: string[];\n start: string[];\n stop: string[];\n} = {\n helpList: [\n \"Use 'help [command]' to get more information about a particular Bladeburner console command.\",\n \" \",\n \" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks\",\n \" clear/cls Clear the console\",\n \" help [cmd] Display this help text, or help text for a specific command\",\n \" log [en/dis] [type] Enable or disable logging for events and actions\",\n \" skill [action] [name] Level or display info about your Bladeburner skills\",\n \" start [type] [name] Start a Bladeburner action/task\",\n \" stop Stops your current Bladeburner action/task\",\n \" \",\n ],\n automate: [\n \"Usage: automate [var] [val] [hi/low]\",\n \" \",\n \"A simple way to automate your Bladeburner actions. This console command can be used \" +\n \"to automatically start an action when your stamina rises above a certain threshold, and \" +\n \"automatically switch to another action when your stamina drops below another threshold.\",\n \" \",\n \" automate status - Check the current status of your automation and get a brief description of what it'll do\",\n \" automate en - Enable the automation feature\",\n \" automate dis - Disable the automation feature\",\n \" \",\n \"There are four properties that must be set for this automation to work properly. Here is how to set them:\",\n \" \",\n \" automate stamina 100 high\",\n \" automate contract Tracking high\",\n \" automate stamina 50 low\",\n \" automate general 'Field Analysis' low\",\n \" \",\n \"Using the four console commands above will set the automation to perform Tracking contracts \" +\n \"if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below \" +\n \"50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must \" +\n \"exactly match whatever the name is in the UI.\",\n \" \",\n ],\n clear: [\"Usage: clear\", \" \", \"Clears the console\", \" \"],\n cls: [\"Usage: cls\", \" \", \"Clears the console\", \" \"],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Running 'help' with no arguments displays the general help text, which lists all console commands \" +\n \"and a brief description of what they do. A command can be specified to get more specific help text \" +\n \"about that particular command. For example:\",\n \" \",\n \" help automate\",\n \" \",\n \"will display specific information about using the automate console command\",\n \" \",\n ],\n log: [\n \"Usage: log [en/dis] [type]\",\n \" \",\n \"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged \" +\n \"in the console. There are also random events that are logged in the console as well. The five categories of \" +\n \"things that get logged are:\",\n \" \",\n \"[general, contracts, ops, blackops, events]\",\n \" \",\n \"The logging for these categories can be enabled or disabled like so:\",\n \" \",\n \" log dis contracts - Disables logging that occurs when contracts are completed\",\n \" log en contracts - Enables logging that occurs when contracts are completed\",\n \" log dis events - Disables logging for Bladeburner random events\",\n \" \",\n \"Logging can be universally enabled/disabled using the 'all' keyword:\",\n \" \",\n \" log dis all\",\n \" log en all\",\n \" \",\n ],\n skill: [\n \"Usage: skill [action] [name]\",\n \" \",\n \"Level or display information about your skills.\",\n \" \",\n \"To display information about all of your skills and your multipliers, use:\",\n \" \",\n \" skill list\",\n \" \",\n \"To display information about a specific skill, specify the name of the skill afterwards. \" +\n \"Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If \" +\n \"the name of the skill has whitespace, enclose the name of the skill in double quotation marks:\",\n \" \",\n \" skill list Reaper\",\n \" skill list 'Digital Observer'\",\n \" \",\n \"This console command can also be used to level up skills:\",\n \" \",\n \" skill level [skill name]\",\n \" \",\n ],\n start: [\n \"Usage: start [type] [name]\",\n \" \",\n \"Start an action. An action is specified by its type and its name. The \" +\n \"name is case-sensitive. It must appear exactly as it does in the UI. If \" +\n \"the name of the action has whitespace, enclose it in double quotation marks. \" +\n \"Valid action types include:\",\n \" \",\n \"[general, contract, op, blackop]\",\n \" \",\n \"Examples:\",\n \" \",\n \" start contract Tracking\",\n \" start op 'Undercover Operation'\",\n \" \",\n ],\n stop: [\"Usage: stop\", \" \", \"Stop your current action and go idle.\", \" \"],\n};\n","import { Corporation } from \"../../Corporation/Corporation\";\nimport { CorporationUnlockUpgrades } from \"../../Corporation/data/CorporationUnlockUpgrades\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessCorporation(this: IPlayer): boolean {\n return this.bitNodeN === 3 || SourceFileFlags[3] > 0;\n}\n\nexport function hasCorporation(this: IPlayer): boolean {\n if (this.corporation == null) {\n return false;\n }\n return this.corporation instanceof Corporation;\n}\n\nexport function startCorporation(this: IPlayer, corpName: string, additionalShares = 0): void {\n this.corporation = new Corporation({\n name: corpName,\n });\n\n if (SourceFileFlags[3] === 3) {\n const warehouseApi = CorporationUnlockUpgrades[\"7\"][0];\n const OfficeApi = CorporationUnlockUpgrades[\"8\"][0];\n\n this.corporation.unlockUpgrades[warehouseApi] = 1;\n this.corporation.unlockUpgrades[OfficeApi] = 1;\n }\n\n this.corporation.totalShares += additionalShares;\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\nimport { Research } from \"./Research\";\nimport { ResearchMap } from \"./ResearchMap\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\ninterface IConstructorParams {\n children?: Node[];\n cost: number;\n text: string;\n parent?: Node | null;\n}\n\nexport class 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 children: Node[] = [];\n\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n cost = 0;\n\n // Whether or not this Research has been unlocked\n researched = false;\n\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 parent: Node | null = null;\n\n // Name of the Research held in this Node\n text = \"\";\n\n constructor(p: IConstructorParams = { cost: 0, text: \"\" }) {\n if (ResearchMap[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: Node): void {\n this.children.push(n);\n n.parent = this;\n }\n\n // Return an object that describes a TreantJS-compatible markup/config for this Node\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup(): any {\n const childrenArray = [];\n for (let i = 0; i < this.children.length; ++i) {\n childrenArray.push(this.children[i].createTreantMarkup());\n }\n\n // Determine what css class this Node should have in the diagram\n let htmlClass = \"tooltip\";\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: Research | null = ResearchMap[this.text];\n const sanitizedName: string = this.text.replace(/\\s/g, \"\");\n return {\n children: childrenArray,\n HTMLclass: htmlClass,\n innerHTML:\n `
` +\n `${this.text}
${numeralWrapper.format(this.cost, \"0,0\")} Scientific Research` +\n `` +\n `${research.desc}` +\n `` +\n `
`,\n text: { name: this.text },\n };\n }\n\n // Recursive function for finding a Node with the specified text\n findNode(text: string): Node | null {\n // Is this the Node?\n if (this.text === text) {\n return this;\n }\n\n // Recursively search chilren\n let res = null;\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n: Node): void {\n this.parent = n;\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\"\nexport class ResearchTree {\n // Object containing names of all acquired Research by name\n researched: IMap = {};\n\n // Root Node\n root: Node | null = null;\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(): any {\n if (this.root == null) {\n return {};\n }\n\n const treeMarkup = this.root.createTreantMarkup();\n\n return {\n chart: {\n container: \"\",\n },\n nodeStructure: treeMarkup,\n };\n }\n\n // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n getAllNodes(): string[] {\n const res: string[] = [];\n const queue: Node[] = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Get total multipliers from this Research Tree\n getAdvertisingMultiplier(): number {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier(): number {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier(): number {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier(): number {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier(): number {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier(): number {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier(): number {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier(): number {\n return this.getMultiplierHelper(\"storageMult\");\n }\n\n // Helper function for all the multiplier getter fns\n getMultiplierHelper(propName: string): number {\n let res = 1;\n if (this.root == null) {\n return res;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n\n // If the Node has not been researched, there's no need to\n // process it or its children\n if (node == null || !node.researched) {\n continue;\n }\n\n const research: Research | null = ResearchMap[node.text];\n\n // Safety checks\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult: any = (research as any)[propName];\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n findNode(name: string): Node | null {\n if (this.root == null) {\n return null;\n }\n return this.root.findNode(name);\n }\n\n // Marks a Node as researched\n research(name: string): void {\n if (this.root == null) {\n return;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\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 }\n\n // Set the tree's Root Node\n setRoot(root: Node): void {\n this.root = root;\n }\n}\n","/**\n * How many stock market 'ticks' before a 'cycle' is triggered.\n * A 'tick' is whenver stock prices update\n */\nexport const TicksPerCycle = 75;\n","export const StanekConstants: {\n RAMBonus: number;\n BaseSize: number;\n MaxSize: number;\n} = {\n RAMBonus: 0.1,\n BaseSize: 9,\n MaxSize: 25\n};\n","// Function that returns the next Company Position in the \"ladder\"\n// i.e. the next position to get promoted to\nimport { CompanyPosition } from \"./CompanyPosition\";\nimport { CompanyPositions } from \"./CompanyPositions\";\n\nexport function getNextCompanyPositionHelper(currPos: CompanyPosition | null): CompanyPosition | null {\n if (currPos == null) {\n return null;\n }\n\n const nextPosName: string | null = currPos.nextPosition;\n if (nextPosName == null) {\n return null;\n }\n\n return CompanyPositions[nextPosName];\n}\n","/**\n * Game engine. Handles the main game loop.\n */\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\nimport { Augmentations } from \"./Augmentation/Augmentations\";\nimport { initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { generateRandomContract } from \"./CodingContractGenerator\";\nimport { initCompanies } from \"./Company/Companies\";\nimport { Corporation } from \"./Corporation/Corporation\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { processPassiveFactionRepGain, inviteToFaction } from \"./Faction/FactionHelpers\";\nimport { Router } from \"./ui/GameRoot\";\nimport { Page } from \"./ui/Router\";\nimport { SetupTextEditor } from \"./ScriptEditor/ui/ScriptEditorRoot\";\n\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"./PersonObjects/formulas/reputation\";\nimport { hasHacknetServers, processHacknetEarnings } from \"./Hacknet/HacknetHelpers\";\nimport { iTutorialStart } from \"./InteractiveTutorial\";\nimport { checkForMessagesToSend, initMessages } from \"./Message/MessageHelpers\";\nimport { loadAllRunningScripts, updateOnlineScriptTimes } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { saveObject, loadGame } from \"./SaveObject\";\nimport { initForeignServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { ThemeEvents } from \"./Themes/ui/Theme\";\nimport { updateSourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { initSymbolToStockMap, processStockPrices } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\nimport { Sleeve } from \"./PersonObjects/Sleeve/Sleeve\";\n\nimport { Money } from \"./ui/React/Money\";\nimport { Hashes } from \"./ui/React/Hashes\";\nimport { Reputation } from \"./ui/React/Reputation\";\n\nimport { AlertEvents } from \"./ui/React/AlertManager\";\nimport { exceptionAlert } from \"./utils/helpers/exceptionAlert\";\n\nimport { startExploits } from \"./Exploits/loops\";\nimport { calculateAchievements } from \"./Achievements/Achievements\";\n\nimport React from \"react\";\nimport { setupUncaughtPromiseHandler } from \"./UncaughtPromiseHandler\";\nimport { Button, Typography } from \"@mui/material\";\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nconst Engine: {\n _lastUpdate: number;\n updateGame: (numCycles?: number) => void;\n Counters: {\n [key: string]: number | undefined;\n autoSaveCounter: number;\n updateSkillLevelsCounter: number;\n updateDisplays: number;\n updateDisplaysLong: number;\n updateActiveScriptsDisplay: number;\n createProgramNotifications: number;\n augmentationsNotifications: number;\n checkFactionInvitations: number;\n passiveFactionGrowth: number;\n messages: number;\n mechanicProcess: number;\n contractGeneration: number;\n achievementsCounter: number;\n };\n decrementAllCounters: (numCycles?: number) => void;\n checkCounters: () => void;\n load: (saveString: string) => void;\n start: () => void;\n} = {\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n\n updateGame: function (numCycles = 1) {\n const time = numCycles * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Terminal.process(Router, Player, numCycles);\n\n Player.process(Router, numCycles);\n\n // Update stock prices\n if (Player.hasWseAccount) {\n processStockPrices(numCycles);\n }\n\n // Gang, if applicable\n if (Player.inGang() && Player.gang !== null) {\n Player.gang.process(numCycles, Player);\n }\n\n // Staneks gift\n staneksGift.process(Player, numCycles);\n\n // Corporation\n if (Player.corporation instanceof Corporation) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n Player.corporation.storeCycles(numCycles);\n }\n\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCycles);\n }\n\n // Sleeves\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCycles);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCycles, true);\n }\n }\n }\n\n // Counters\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters();\n\n // Update the running time of all active scripts\n updateOnlineScriptTimes(numCycles);\n\n // Hacknet Nodes\n processHacknetEarnings(Player, 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, // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000, // Generate Coding Contracts\n achievementsCounter: 60, // Check if we have new achievements\n },\n\n decrementAllCounters: function (numCycles = 1) {\n for (const counterName of Object.keys(Engine.Counters)) {\n const counter = Engine.Counters[counterName];\n if (counter === undefined) throw new Error(\"counter should not be undefined\");\n Engine.Counters[counterName] = counter - numCycles;\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.AutosaveInterval == null) {\n Settings.AutosaveInterval = 60;\n }\n if (Settings.AutosaveInterval === 0) {\n warnAutosaveDisabled();\n Engine.Counters.autoSaveCounter = 60 * 5; // Let's check back in a bit\n } else {\n Engine.Counters.autoSaveCounter = Settings.AutosaveInterval * 5;\n saveObject.saveGame(!Settings.SuppressSavedGameToast);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = Player.checkForFactionInvitations();\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n inviteToFaction(randFaction);\n }\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n const adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n processPassiveFactionRepGain(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n checkForMessagesToSend();\n if (Augmentations[AugmentationNames.TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n if (Player.corporation instanceof Corporation) {\n Player.corporation.process(Player);\n }\n if (Engine.Counters.mechanicProcess <= 0) {\n if (Player.bladeburner instanceof Bladeburner) {\n try {\n Player.bladeburner.process(Router, Player);\n } catch (e) {\n exceptionAlert(\"Exception caught in Bladeburner.process(): \" + e);\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 generateRandomContract();\n }\n Engine.Counters.contractGeneration = 3000;\n }\n\n if (Engine.Counters.achievementsCounter <= 0) {\n calculateAchievements();\n Engine.Counters.achievementsCounter = 300;\n }\n },\n\n load: function (saveString) {\n startExploits();\n setupUncaughtPromiseHandler();\n // Load game from save or create new game\n if (loadGame(saveString)) {\n ThemeEvents.emit();\n\n initBitNodeMultipliers(Player);\n updateSourceFileFlags(Player);\n initAugmentations(); // Also calls Player.reapplyAllAugmentations()\n Player.reapplyAllSourceFiles();\n if (Player.hasWseAccount) {\n initSymbolToStockMap();\n }\n\n // Apply penalty for entropy accumulation\n Player.applyEntropy(Player.entropy);\n\n // Calculate the number of cycles have elapsed while offline\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / CONSTANTS._idleSpeed);\n\n // Generate coding contracts\n // let numContracts = 0;\n // if (numCyclesOffline < 3000 * 100) {\n // // if we have less than 100 rolls, just roll them exactly.\n // for (let i = 0; i < numCyclesOffline / 3000; i++) {\n // if (Math.random() < 0.25) numContracts++;\n // }\n // } else {\n // // just average it.\n // numContracts = (numCyclesOffline / 3000) * 0.25;\n // }\n // console.log(`${numCyclesOffline} ${numContracts}`);\n // for (let i = 0; i < numContracts; i++) {\n // generateRandomContract();\n // }\n\n let offlineReputation = 0;\n const offlineHackingIncome = (Player.moneySourceA.hacking / Player.playtimeSinceLastAug) * timeOffline * 0.75;\n Player.gainMoney(offlineHackingIncome, \"hacking\");\n // Process offline progress\n loadAllRunningScripts(Player); // This also takes care of offline production for those scripts\n if (Player.isWorking) {\n Player.focus = true;\n if (Player.workType == CONSTANTS.WorkTypeFaction) {\n Player.workForFaction(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCreateProgram) {\n Player.createProgramWork(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeStudyClass) {\n Player.takeClass(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCrime) {\n Player.commitCrime(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n Player.workPartTime(numCyclesOffline);\n } else if (Player.workType === CONSTANTS.WorkTypeGraftAugmentation) {\n Player.graftAugmentationWork(numCyclesOffline);\n } else {\n Player.work(numCyclesOffline);\n }\n } else {\n for (let i = 0; i < Player.factions.length; i++) {\n const facName = Player.factions[i];\n if (!Factions.hasOwnProperty(facName)) continue;\n const faction = Factions[facName];\n if (!faction.isMember) continue;\n // No rep for special factions.\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No rep for gangs.\n if (Player.getGangName() === facName) continue;\n\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n // can be infinite, doesn't matter.\n const reputationRate = Math.max(hRep, sRep, fRep) / Player.factions.length;\n\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n }\n\n // Hacknet Nodes offline progress\n const offlineProductionFromHacknetNodes = processHacknetEarnings(Player, numCyclesOffline);\n const hacknetProdInfo = hasHacknetServers(Player) ? (\n <>\n hashes\n \n ) : (\n \n );\n\n // Passive faction rep gain offline\n processPassiveFactionRepGain(numCyclesOffline);\n\n // Stock Market offline progress\n if (Player.hasWseAccount) {\n processStockPrices(numCyclesOffline);\n }\n\n // Gang progress for BitNode 2\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n gang.process(numCyclesOffline, Player);\n }\n\n // Corporation offline progress\n if (Player.corporation instanceof Corporation) {\n Player.corporation.storeCycles(numCyclesOffline);\n }\n\n // Bladeburner offline progress\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCyclesOffline);\n }\n\n staneksGift.process(Player, numCyclesOffline);\n\n // Sleeves offline progress\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCyclesOffline);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCyclesOffline, true);\n }\n }\n }\n\n // Update total playtime\n const time = numCyclesOffline * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Player.lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n const timeOfflineString = convertTimeMsToTimeElapsedString(time);\n setTimeout(\n () =>\n AlertEvents.emit(\n <>\n Offline for {timeOfflineString}. While you were offline:\n
    \n
  • \n \n Your scripts generated \n \n
  • \n
  • \n Your Hacknet Nodes generated {hacknetProdInfo}\n
  • \n
  • \n \n You gained reputation divided amongst your factions\n \n
  • \n
\n ,\n ),\n 250,\n );\n } else {\n // No save found, start new game\n initBitNodeMultipliers(Player);\n Engine.start(); // Run main game loop and Scripts loop\n Player.init();\n initForeignServers(Player.getHomeComputer());\n initCompanies();\n initFactions();\n initAugmentations();\n initMessages();\n updateSourceFileFlags(Player);\n\n // Start interactive tutorial\n iTutorialStart();\n }\n SetupTextEditor();\n },\n\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % CONSTANTS._idleSpeed;\n\n // Divide this by cycle time to determine how many cycles have elapsed since last update\n diff = Math.floor(diff / CONSTANTS._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n Player.lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n window.requestAnimationFrame(Engine.start);\n },\n};\n\n/**\n * Shows a toast warning that lets the player know that auto-saves are disabled, with an button to re-enable them.\n */\nfunction warnAutosaveDisabled(): void {\n // If the player has suppressed those warnings let's just exit right away.\n if (Settings.SuppressAutosaveDisabledWarnings) return;\n\n // We don't want this warning to show up on certain pages.\n // When in recovery or importing we want to keep autosave disabled.\n const ignoredPages = [Page.Recovery, Page.ImportSave];\n if (ignoredPages.includes(Router.page())) return;\n\n const warningToast = (\n <>\n Auto-saves are disabled!\n {\n // We reset the value to a default\n Settings.AutosaveInterval = 60;\n }}\n >\n Enable\n \n \n );\n SnackbarEvents.emit(warningToast, \"warning\", 5000);\n}\n\nexport { Engine };\n","export { Theme as Default } from \"./default\";\nexport { Theme as DefaultLite } from \"./default-lite\";\nexport { Theme as Monokai } from \"./monokai-ish\";\nexport { Theme as Warmer } from \"./warmer\";\nexport { Theme as DarkPlus } from \"./dark-plus\";\nexport { Theme as MayukaiDark } from \"./mayukai-dark\";\nexport { Theme as Purple } from \"./purple\";\nexport { Theme as SmoothGreen } from \"./smooth-green\";\nexport { Theme as Dracula } from \"./dracula\";\nexport { Theme as DarkBlue } from \"./dark-blue\";\nexport { Theme as DiscordLike } from \"./discord-like\";\nexport { Theme as OneDark } from \"./one-dark\";\nexport { Theme as MutedGoldBlue } from \"./muted-gold-blue\";\nexport { Theme as Light } from \"./light\";\n","import React, { useState, useEffect } from \"react\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport { Terminal } from \"../Terminal\";\nimport { load } from \"../db\";\nimport { Player } from \"../Player\";\nimport { Engine } from \"../engine\";\nimport { GameRoot } from \"./GameRoot\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { ActivateRecoveryMode } from \"./React/RecoveryRoot\";\nimport { hash } from \"../hash/hash\";\nimport { pushGameReady } from \"../Electron\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n backgroundColor: theme.colors.backgroundprimary,\n },\n }),\n);\n\nexport function LoadingScreen(): React.ReactElement {\n const classes = useStyles();\n const [show, setShow] = useState(false);\n const [loaded, setLoaded] = useState(false);\n\n const version = `v${CONSTANTS.VersionString} (${hash()})`;\n if (process.env.NODE_ENV === \"development\") {\n document.title = `[dev] Bitburner ${version}`;\n } else {\n document.title = `Bitburner ${version}`;\n }\n\n useEffect(() => {\n const id = setTimeout(() => {\n if (!loaded) setShow(true);\n }, 2000);\n return () => clearTimeout(id);\n });\n\n useEffect(() => {\n async function doLoad(): Promise {\n await load()\n .then((saveString) => {\n try {\n Engine.load(saveString);\n } catch (err: any) {\n ActivateRecoveryMode();\n setLoaded(true);\n throw err;\n }\n\n pushGameReady();\n setLoaded(true);\n })\n .catch((reason) => {\n console.error(reason);\n Engine.load(\"\");\n setLoaded(true);\n });\n }\n doLoad();\n }, []);\n\n return (\n \n {loaded ? (\n \n ) : (\n \n \n \n \n \n Loading Bitburner {version}\n \n {show && (\n \n \n If the game fails to load, consider killing all scripts\n \n \n )}\n \n )}\n \n );\n}\n","/**\n * Augmentation-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { calculateEntropy } from \"../Grafting/EntropyAccumulation\";\n\nexport function hasAugmentation(this: IPlayer, aug: string | Augmentation, installed = false): boolean {\n const augName: string = aug instanceof Augmentation ? aug.name : aug;\n\n for (const owned of this.augmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n if (!installed) {\n for (const owned of this.queuedAugmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nexport function applyEntropy(this: IPlayer, stacks = 1): void {\n // Re-apply all multipliers\n this.reapplyAllAugmentations();\n this.reapplyAllSourceFiles();\n\n const newMultipliers = calculateEntropy(this, stacks);\n for (const [mult, val] of Object.entries(newMultipliers)) {\n this.setMult(mult, val);\n }\n}\n","/**\n * Checks that a variable is a valid number. A valid number\n * must be a \"number\" type and cannot be NaN\n */\nexport function isValidNumber(n: number): boolean {\n return typeof n === \"number\" && !isNaN(n);\n}\n","/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Order {\n readonly pos: PositionTypes;\n readonly price: number;\n shares: number;\n readonly stockSymbol: string;\n readonly type: OrderTypes;\n\n constructor(\n stockSymbol = \"\",\n shares = 0,\n price = 0,\n typ: OrderTypes = OrderTypes.LimitBuy,\n pos: PositionTypes = PositionTypes.Long,\n ) {\n // Validate arguments\n let invalidArgs = false;\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n\n /**\n * Serialize the Order to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Order\", this);\n }\n\n /**\n * Initializes a Order from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Order {\n return Generic_fromJSON(Order, value.data);\n }\n}\n\nReviver.constructors.Order = Order;\n","import { FactionNames } from '../Faction/data/FactionNames';\nimport { Fragment } from \"./Fragment\";\nimport { ActiveFragment } from \"./ActiveFragment\";\nimport { FragmentType } from \"./FragmentType\";\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { CalculateEffect } from \"./formulas/effect\";\nimport { StaneksGiftEvents } from \"./StaneksGiftEvents\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { CONSTANTS } from \"../Constants\";\nimport { StanekConstants } from \"./data/Constants\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Player } from \"../Player\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport class StaneksGift implements IStaneksGift {\n storedCycles = 0;\n fragments: ActiveFragment[] = [];\n\n baseSize(): number {\n return StanekConstants.BaseSize + BitNodeMultipliers.StaneksGiftExtraSize + Player.sourceFileLvl(13)\n }\n\n width(): number {\n return Math.min(Math.floor(this.baseSize() / 2 + 1),StanekConstants.MaxSize);\n }\n height(): number {\n return Math.min(Math.floor(this.baseSize() / 2 + 0.6),StanekConstants.MaxSize);\n }\n\n charge(player: IPlayer, af: ActiveFragment, threads: number): void {\n af.avgCharge = (af.numCharge * af.avgCharge + threads) / (af.numCharge + 1);\n af.numCharge++;\n\n const cotmg = Factions[FactionNames.ChurchOfTheMachineGod];\n cotmg.playerReputation += (player.faction_rep_mult * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;\n }\n\n inBonus(): boolean {\n return (this.storedCycles * CONSTANTS._idleSpeed) / 1000 > 1;\n }\n\n process(p: IPlayer, numCycles = 1): void {\n if (!p.hasAugmentation(AugmentationNames.StaneksGift1)) return;\n this.storedCycles += numCycles;\n this.storedCycles -= 10;\n this.storedCycles = Math.max(0, this.storedCycles);\n this.updateMults(p);\n StaneksGiftEvents.emit();\n }\n\n effect(fragment: ActiveFragment): number {\n // Find all the neighbooring cells\n const cells = fragment.neighboors();\n // find the neighbooring active fragments.\n const maybeFragments = cells.map((n) => this.fragmentAt(n[0], n[1]));\n\n // Filter out undefined with typescript \"Type guard\". Whatever\n let neighboors = maybeFragments.filter((v: ActiveFragment | undefined): v is ActiveFragment => !!v);\n\n neighboors = neighboors.filter((fragment) => fragment.fragment().type === FragmentType.Booster);\n let boost = 1;\n\n neighboors = neighboors.filter((v, i, s) => s.indexOf(v) === i);\n for (const neighboor of neighboors) {\n boost *= neighboor.fragment().power;\n }\n return CalculateEffect(fragment.avgCharge, fragment.numCharge, fragment.fragment().power, boost);\n }\n\n canPlace(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (rootX < 0 || rootY < 0) return false;\n if (rootX + fragment.width(rotation) > this.width()) return false;\n if (rootY + fragment.height(rotation) > this.height()) return false;\n if (this.count(fragment) >= fragment.limit) return false;\n const newFrag = new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment });\n for (const aFrag of this.fragments) {\n if (aFrag.collide(newFrag)) return false;\n }\n return true;\n }\n\n place(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (!this.canPlace(rootX, rootY, rotation, fragment)) return false;\n this.fragments.push(new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment }));\n return true;\n }\n\n findFragment(rootX: number, rootY: number): ActiveFragment | undefined {\n return this.fragments.find((f) => f.x === rootX && f.y === rootY);\n }\n\n fragmentAt(worldX: number, worldY: number): ActiveFragment | undefined {\n for (const aFrag of this.fragments) {\n if (aFrag.fullAt(worldX, worldY)) {\n return aFrag;\n }\n }\n\n return undefined;\n }\n\n count(fragment: Fragment): number {\n let amt = 0;\n for (const aFrag of this.fragments) {\n if (aFrag.fragment().id === fragment.id) amt++;\n }\n return amt;\n }\n\n delete(rootX: number, rootY: number): boolean {\n for (let i = 0; i < this.fragments.length; i++) {\n if (this.fragments[i].x === rootX && this.fragments[i].y === rootY) {\n this.fragments.splice(i, 1);\n return true;\n }\n }\n\n return false;\n }\n\n clear(): void {\n this.fragments = [];\n }\n\n clearCharge(): void {\n this.fragments.forEach((f) => {\n f.avgCharge = 0;\n f.numCharge = 0;\n });\n }\n\n updateMults(p: IPlayer): void {\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles();\n\n for (const aFrag of this.fragments) {\n const fragment = aFrag.fragment();\n\n const power = this.effect(aFrag);\n switch (fragment.type) {\n case FragmentType.HackingChance:\n p.hacking_chance_mult *= power;\n break;\n case FragmentType.HackingSpeed:\n p.hacking_speed_mult *= power;\n break;\n case FragmentType.HackingMoney:\n p.hacking_money_mult *= power;\n break;\n case FragmentType.HackingGrow:\n p.hacking_grow_mult *= power;\n break;\n case FragmentType.Hacking:\n p.hacking_mult *= power;\n p.hacking_exp_mult *= power;\n break;\n case FragmentType.Strength:\n p.strength_mult *= power;\n p.strength_exp_mult *= power;\n break;\n case FragmentType.Defense:\n p.defense_mult *= power;\n p.defense_exp_mult *= power;\n break;\n case FragmentType.Dexterity:\n p.dexterity_mult *= power;\n p.dexterity_exp_mult *= power;\n break;\n case FragmentType.Agility:\n p.agility_mult *= power;\n p.agility_exp_mult *= power;\n break;\n case FragmentType.Charisma:\n p.charisma_mult *= power;\n p.charisma_exp_mult *= power;\n break;\n case FragmentType.HacknetMoney:\n p.hacknet_node_money_mult *= power;\n break;\n case FragmentType.HacknetCost:\n p.hacknet_node_purchase_cost_mult /= power;\n p.hacknet_node_ram_cost_mult /= power;\n p.hacknet_node_core_cost_mult /= power;\n p.hacknet_node_level_cost_mult /= power;\n break;\n case FragmentType.Rep:\n p.company_rep_mult *= power;\n p.faction_rep_mult *= power;\n break;\n case FragmentType.WorkMoney:\n p.work_money_mult *= power;\n break;\n case FragmentType.Crime:\n p.crime_success_mult *= power;\n p.crime_money_mult *= power;\n break;\n case FragmentType.Bladeburner:\n p.bladeburner_max_stamina_mult *= power;\n p.bladeburner_stamina_gain_mult *= power;\n p.bladeburner_analysis_mult *= power;\n p.bladeburner_success_chance_mult *= power;\n break;\n }\n }\n p.updateSkillLevels();\n }\n\n prestigeAugmentation(): void {\n this.clearCharge();\n }\n\n prestigeSourceFile(): void {\n this.clear();\n this.storedCycles = 0;\n }\n\n /**\n * Serialize Staneks Gift to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"StaneksGift\", this);\n }\n\n /**\n * Initializes Staneks Gift from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): StaneksGift {\n return Generic_fromJSON(StaneksGift, value.data);\n }\n}\n\nReviver.constructors.StaneksGift = StaneksGift;\n","import { Fragment, FragmentById } from \"./Fragment\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IActiveFragmentParams {\n x: number;\n y: number;\n rotation: number;\n fragment: Fragment;\n}\n\nexport class ActiveFragment {\n id: number;\n avgCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n\n constructor(params?: IActiveFragmentParams) {\n if (params) {\n this.id = params.fragment.id;\n this.x = params.x;\n this.y = params.y;\n this.avgCharge = 0;\n this.numCharge = 0;\n this.rotation = params.rotation;\n } else {\n this.id = -1;\n this.x = -1;\n this.y = -1;\n this.avgCharge = -1;\n this.numCharge = -1;\n this.rotation = -1;\n }\n }\n\n collide(other: ActiveFragment): boolean {\n const thisFragment = this.fragment();\n const otherFragment = other.fragment();\n // These 2 variables converts 'this' local coordinates to world to other local.\n const dx: number = other.x - this.x;\n const dy: number = other.y - this.y;\n for (let j = 0; j < thisFragment.shape.length; j++) {\n for (let i = 0; i < thisFragment.shape[j].length; i++) {\n if (thisFragment.fullAt(i, j, this.rotation) && otherFragment.fullAt(i - dx, j - dy, other.rotation))\n return true;\n }\n }\n\n return false;\n }\n\n fragment(): Fragment {\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n return fragment;\n }\n\n fullAt(worldX: number, worldY: number): boolean {\n return this.fragment().fullAt(worldX - this.x, worldY - this.y, this.rotation);\n }\n\n neighboors(): number[][] {\n return this.fragment()\n .neighboors(this.rotation)\n .map((cell) => [this.x + cell[0], this.y + cell[1]]);\n }\n\n copy(): ActiveFragment {\n // We have to do a round trip because the constructor.\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n const c = new ActiveFragment({ x: this.x, y: this.y, rotation: this.rotation, fragment: fragment });\n c.avgCharge = this.avgCharge;\n c.numCharge = this.numCharge;\n return c;\n }\n\n /**\n * Serialize an active fragment to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"ActiveFragment\", this);\n }\n\n /**\n * Initializes an acive fragment from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActiveFragment {\n return Generic_fromJSON(ActiveFragment, value.data);\n }\n}\n\nReviver.constructors.ActiveFragment = ActiveFragment;\n","/**\n * Class representing a visitable location in the world\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\nimport { LocationType } from \"./LocationTypeEnum\";\n\ninterface IInfiltrationMetadata {\n maxClearanceLevel: number;\n startingSecurityLevel: number;\n}\n\nexport interface IConstructorParams {\n city?: CityName | null;\n costMult?: number;\n expMult?: number;\n infiltrationData?: IInfiltrationMetadata;\n name?: LocationName;\n types?: LocationType[];\n techVendorMaxRam?: number;\n techVendorMinRam?: number;\n}\n\nexport class Location {\n /**\n * Name of city this location is in. If this property is null, it means this i\n * is a generic location that is available in all cities\n */\n city: CityName | null = null;\n\n /**\n * Cost multiplier that influences how expensive a gym/university is\n */\n costMult = 0;\n\n /**\n * Exp multiplier that influences how effective a gym/university is\n */\n expMult = 0;\n\n /**\n * Companies can be infiltrated. This contains the data required for that\n * infiltration event\n */\n infiltrationData?: IInfiltrationMetadata;\n\n /**\n * Identifier for location\n */\n name: LocationName = LocationName.Void;\n\n /**\n * List of what type(s) this location is. A location can be multiple types\n * (e.g. company and tech vendor)\n */\n types: LocationType[] = [];\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMaxRam = 0;\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMinRam = 0;\n\n constructor(p: IConstructorParams) {\n if (p.city) {\n this.city = p.city;\n }\n if (p.costMult) {\n this.costMult = p.costMult;\n }\n if (p.expMult) {\n this.expMult = p.expMult;\n }\n if (p.infiltrationData) {\n this.infiltrationData = p.infiltrationData;\n }\n if (p.name) {\n this.name = p.name;\n }\n if (p.types) {\n this.types = p.types;\n }\n if (p.techVendorMaxRam) {\n this.techVendorMaxRam = p.techVendorMaxRam;\n }\n if (p.techVendorMinRam) {\n this.techVendorMinRam = p.techVendorMinRam;\n }\n }\n}\n","import React from \"react\";\n\nimport {\n Typography,\n Table,\n TableBody,\n TableCell,\n TableRow,\n} from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { StatsRow } from \"../../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../../ui/React/CharacterOverview\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { MoneyRate } from \"../../../ui/React/MoneyRate\";\nimport { ReputationRate } from \"../../../ui/React/ReputationRate\";\nimport { use } from \"../../../ui/Context\";\n\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\n\ninterface IProps {\n sleeve: Sleeve;\n}\n\nexport function StatsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n \n \n \n
\n
\n )\n}\n\nexport function EarningsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n const player = use.Player();\n\n let data: any[][] = [];\n if (props.sleeve.currentTask === SleeveTaskType.Crime) {\n data = [\n [`Money`, <> (on success)],\n [`Hacking Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.hack)} (2x on success)`],\n [`Strength Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.str)} (2x on success)`],\n [`Defense Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.def)} (2x on success)`],\n [`Dexterity Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.dex)} (2x on success)`],\n [`Agility Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.agi)} (2x on success)`],\n [`Charisma Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.cha)} (2x on success)`],\n ];\n } else {\n data = [\n [`Money:`, ],\n [`Hacking Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.hack)} / sec`],\n [`Strength Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.str)} / sec`],\n [`Defense Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.def)} / sec`],\n [`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.dex)} / sec`],\n [`Agility Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.agi)} / sec`],\n [`Charisma Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.cha)} / sec`],\n ];\n if (props.sleeve.currentTask === SleeveTaskType.Company || props.sleeve.currentTask === SleeveTaskType.Faction) {\n const repGain: number = props.sleeve.getRepGain(player);\n data.push([`Reputation:`, ]);\n }\n }\n\n return (\n \n \n \n \n \n Earnings\n \n \n \n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n \n
\n )\n}\n","/**\n * Creates a dropdown (select HTML element) with server hostnames as options\n *\n * Configurable to only contain certain types of servers\n */\nimport React from \"react\";\nimport { GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\n// TODO make this an enum when this gets converted to TypeScript\nexport const ServerType = {\n All: 0,\n Foreign: 1, // Hackable, non-owned servers\n Owned: 2, // Home Computer, Purchased Servers, and Hacknet Servers\n Purchased: 3, // Everything from Owned except home computer\n};\n\ninterface IProps {\n purchase: () => void;\n canPurchase: boolean;\n serverType: number;\n onChange: (event: SelectChangeEvent) => void;\n value: string;\n}\n\nexport function ServerDropdown(props: IProps): React.ReactElement {\n /**\n * Checks if the server should be shown in the dropdown menu, based on the\n * 'serverType' property\n */\n function isValidServer(s: BaseServer): boolean {\n const purchased = s instanceof Server && s.purchasedByPlayer;\n const type = props.serverType;\n switch (type) {\n case ServerType.All:\n return true;\n case ServerType.Foreign:\n return s.hostname !== \"home\" && !purchased;\n case ServerType.Owned:\n return purchased || s instanceof HacknetServer || s.hostname === \"home\";\n case ServerType.Purchased:\n return purchased || s instanceof HacknetServer;\n default:\n console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);\n return false;\n }\n }\n\n const servers = [];\n for (const server of GetAllServers().sort((a, b) => a.hostname.localeCompare(b.hostname))) {\n if (isValidServer(server)) {\n servers.push(\n \n {server.hostname}\n ,\n );\n }\n }\n\n return (\n \n Buy\n \n }\n sx={{ mx: 1 }}\n value={props.value}\n onChange={props.onChange}\n >\n {servers}\n \n );\n}\n","import * as React from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Money } from \"../ui/React/Money\";\nimport { Game, reachedLimit } from \"./Game\";\nimport { Deck } from \"./CardDeck/Deck\";\nimport { Hand } from \"./CardDeck/Hand\";\nimport { InputAdornment } from \"@mui/material\";\nimport { ReactCard } from \"./CardDeck/ReactCard\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\n\nconst MAX_BET = 100e6;\nexport const DECK_COUNT = 5; // 5-deck multideck\n\nenum Result {\n Pending = \"\",\n PlayerWon = \"You won!\",\n PlayerWonByBlackjack = \"You Won! Blackjack!\",\n DealerWon = \"You lost!\",\n Tie = \"Push! (Tie)\",\n}\n\ntype Props = {\n p: IPlayer;\n};\n\ntype State = {\n playerHand: Hand;\n dealerHand: Hand;\n bet: number;\n betInput: string;\n gameInProgress: boolean;\n result: Result;\n gains: number; // Track gains only for this session\n wagerInvalid: boolean;\n wagerInvalidHelperText: string;\n};\n\nexport class Blackjack extends Game {\n deck: Deck;\n\n constructor(props: Props) {\n super(props);\n\n this.deck = new Deck(DECK_COUNT);\n\n const initialBet = 1e6;\n\n this.state = {\n playerHand: new Hand([]),\n dealerHand: new Hand([]),\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 canStartGame = (): boolean => {\n const { p } = this.props;\n const { bet } = this.state;\n\n return p.canAfford(bet);\n };\n\n startGame = (): void => {\n if (!this.canStartGame() || reachedLimit(this.props.p)) {\n return;\n }\n\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) TODO: Save/Restore the RNG state to limit the value of save-scumming.\n this.props.p.loseMoney(this.state.bet, \"casino\");\n\n const playerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending,\n });\n\n // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\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 // Returns an array of numbers representing all possible values of the given Hand. The reason it needs to be\n // an array is because an Ace can count as both 1 and 11.\n getHandValue = (hand: Hand): number[] => {\n let result: number[] = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\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 // Returns the single hand value used for determine things like victory and whether or not\n // the dealer has to hit. Essentially this uses the biggest value that's 21 or under. If no such value exists,\n // then it means the hand is busted and we can just return whatever\n getTrueHandValue = (hand: Hand): number => {\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 // Returns all hand values that are 21 or under. If no values are 21 or under, then the first value is returned.\n getHandDisplayValues = (hand: Hand): number[] => {\n const handValues = this.getHandValue(hand);\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 isHandBusted = (hand: Hand): boolean => {\n return this.getTrueHandValue(hand) > 21;\n };\n\n playerHit = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n\n this.setState({\n playerHand: newHand,\n });\n\n // Check if player busted, and finish the game if so\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n };\n\n playerStay = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\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 let newDealerHand = this.state.dealerHand;\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 });\n\n // If dealer has busted, then player wins\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);\n\n // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\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 finishGame = (result: Result): void => {\n const gains =\n result === Result.DealerWon\n ? 0 // We took away the bet at the start, don't need to take more\n : result === Result.Tie\n ? this.state.bet // We took away the bet at the start, give it back\n : result === Result.PlayerWon\n ? 2 * this.state.bet // Give back their bet plus their winnings\n : result === Result.PlayerWonByBlackjack\n ? 2.5 * this.state.bet // Blackjack pays out 1.5x bet!\n : (() => {\n throw new Error(`Unexpected result: ${result}`);\n })(); // This can't happen, right?\n this.win(this.props.p, gains);\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains - this.state.bet, // Not updated upfront - only tracks the final outcome\n });\n };\n\n wagerOnChange = (event: React.ChangeEvent): void => {\n const { p } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\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 // Start game button\n startOnClick = (event: React.MouseEvent): void => {\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 render(): React.ReactNode {\n const { betInput, playerHand, dealerHand, gameInProgress, result, wagerInvalid, wagerInvalidHelperText, gains } =\n this.state;\n\n // Get the player totals to display.\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n\n return (\n <>\n {/* Wager input */}\n \n \n {\"Wager (Max: \"}\n \n {\")\"}\n \n }\n disabled={gameInProgress}\n onChange={this.wagerOnChange}\n error={wagerInvalid}\n helperText={wagerInvalid ? wagerInvalidHelperText : \"\"}\n type=\"number\"\n style={{\n width: \"200px\",\n }}\n InputProps={{\n startAdornment: (\n \n $\n \n ),\n }}\n />\n\n \n {\"Total earnings this session: \"}\n \n \n \n\n {/* Buttons */}\n {!gameInProgress ? (\n \n ) : (\n <>\n \n \n \n )}\n\n {/* Main game part. Displays both if the game is in progress OR if there's a result so you can see\n * the cards that led to that result. */}\n {(gameInProgress || result !== Result.Pending) && (\n <>\n \n \n Player\n {playerHand.cards.map((card, i) => (\n \n ))}\n\n \n Count:{\" \"}\n {playerHandValues\n .map((value, i) => {value})\n .reduce((prev, curr) => [prev, \" or \", curr])}\n \n \n \n\n
\n\n \n \n Dealer\n {dealerHand.cards.map((card, i) => (\n // Hide every card except the first while game is in progress\n \n \n \n )}\n\n {/* Results from previous round */}\n {result !== Result.Pending && (\n \n {result} \n {result === Result.PlayerWon && }\n {result === Result.PlayerWonByBlackjack && }\n {result === Result.DealerWon && }\n \n )}\n \n );\n }\n}\n","import React, { FC } from \"react\";\nimport { Card, Suit } from \"./Card\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Paper from \"@mui/material/Paper\";\n\ntype Props = {\n card: Card;\n hidden?: boolean;\n};\n\nconst useStyles = makeStyles(() =>\n createStyles({\n card: {\n padding: \"10px\",\n border: \"solid 1px #808080\",\n backgroundColor: \"white\",\n display: \"inline-block\",\n borderRadius: \"10px\",\n fontSize: \"18.5px\",\n textAlign: \"center\",\n margin: \"3px\",\n fontWeight: \"bold\",\n },\n red: {\n color: \"red\",\n },\n\n black: {\n color: \"black\",\n },\n value: {\n fontSize: \"20px\",\n fontFamily: \"sans-serif\",\n },\n }),\n);\n\nexport const ReactCard: FC = ({ card, hidden }) => {\n const classes = useStyles();\n let suit: React.ReactNode;\n switch (card.suit) {\n case Suit.Clubs:\n suit = ;\n break;\n case Suit.Diamonds:\n suit = ;\n break;\n case Suit.Hearts:\n suit = ;\n break;\n case Suit.Spades:\n suit = ;\n break;\n default:\n throw new Error(`MissingCaseException: ${card.suit}`);\n }\n return (\n \n <>\n {hidden ? \" - \" : card.formatValue()}\n {hidden ? \" - \" : suit}\n \n \n );\n};\n","import { Milestone } from \"./Milestone\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\nfunction allFactionAugs(p: IPlayer, f: Faction): boolean {\n const factionAugs = f.augmentations.slice().filter((aug) => aug !== \"NeuroFlux Governor\");\n for (const factionAug of factionAugs) {\n if (\n !p.augmentations.some((aug) => {\n return aug.name == factionAug;\n })\n )\n return false;\n }\n return true;\n}\n\nexport const Milestones: Milestone[] = [\n {\n title: \"Gain root access on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"hasAdminRights\")) return false;\n return (server as any).hasAdminRights;\n },\n },\n {\n title: \"Install the backdoor on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"backdoorInstalled\")) return false;\n return (server as any).backdoorInstalled;\n },\n },\n {\n title: \"Join the faction hinted at in csec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.CyberSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.CyberSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.CyberSec]);\n },\n },\n {\n title: \"Join the faction hinted at in nitesec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.NiteSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.NiteSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.NiteSec]);\n },\n },\n {\n title: \"Join the faction hinted at in j3.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.TheBlackHand);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.TheBlackHand}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.TheBlackHand]);\n },\n },\n {\n title: \"Join the faction hinted at in 19dfj3l1nd.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.BitRunners);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.BitRunners}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.BitRunners]);\n },\n },\n {\n title: \"Complete fl1ght.exe\",\n fulfilled: (p: IPlayer): boolean => {\n // technically wrong but whatever\n return p.factions.includes(FactionNames.Daedalus);\n },\n },\n {\n title: `Install the special Augmentation from ${FactionNames.Daedalus}`,\n fulfilled: (p: IPlayer): boolean => {\n return p.augmentations.some((aug) => aug.name == \"The Red Pill\");\n },\n },\n {\n title: \"Install the final backdoor and free yourself.\",\n fulfilled: (): boolean => {\n return false;\n },\n },\n];\n","import { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function repFromDonation(amt: number, player: IPlayer): number {\n return (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;\n}\n","import { StockSymbols } from \"./StockSymbols\";\n\nexport const TickerHeaderFormatData = {\n longestName: 0,\n longestSymbol: 0,\n};\n\nfor (const key of Object.keys(StockSymbols)) {\n TickerHeaderFormatData.longestName = Math.max(key.length, TickerHeaderFormatData.longestName);\n TickerHeaderFormatData.longestSymbol = Math.max(StockSymbols[key].length, TickerHeaderFormatData.longestSymbol);\n}\n","import React from \"react\";\n\nimport { Box, Typography } from \"@mui/material\";\n\nimport { Achievement } from \"./Achievements\";\nimport { Settings } from \"../Settings/Settings\"\nimport { AchievementIcon } from \"./AchievementIcon\";\n\ninterface IProps {\n achievement: Achievement;\n unlockedOn?: number;\n cssFiltersUnlocked: string;\n cssFiltersLocked: string;\n}\n\nexport function AchievementEntry({ achievement, unlockedOn, cssFiltersUnlocked, cssFiltersLocked }: IProps): JSX.Element {\n if (!achievement) return <>;\n const isUnlocked = !!unlockedOn;\n\n const mainColor = isUnlocked ? Settings.theme.primary : Settings.theme.secondarylight;\n\n let achievedOn = '';\n if (unlockedOn) {\n achievedOn = new Date(unlockedOn).toLocaleString();\n }\n\n return (\n \n \n \n \n \n {achievement.Name}\n \n \n {achievement.Description}\n \n {isUnlocked && (\n \n Acquired on {achievedOn}\n \n )}\n \n \n \n );\n}\n","// @ts-nocheck\n/* tslint:disable */\n/* eslint-disable */\n\n/*\n Taken from:\n https://codepen.io/sosuke/pen/Pjoqqp\n --------------------------------------------------------\n This utility transform an hex color into css filter rules.\n Useful to change color of a black image to match a given color\n*/\n\nclass Color {\n constructor(r, g, b) {\n this.set(r, g, b);\n }\n\n toString() {\n return `rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)})`;\n }\n\n set(r, g, b) {\n this.r = this.clamp(r);\n this.g = this.clamp(g);\n this.b = this.clamp(b);\n }\n\n hueRotate(angle = 0) {\n angle = angle / 180 * Math.PI;\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n\n this.multiply([\n 0.213 + cos * 0.787 - sin * 0.213,\n 0.715 - cos * 0.715 - sin * 0.715,\n 0.072 - cos * 0.072 + sin * 0.928,\n 0.213 - cos * 0.213 + sin * 0.143,\n 0.715 + cos * 0.285 + sin * 0.140,\n 0.072 - cos * 0.072 - sin * 0.283,\n 0.213 - cos * 0.213 - sin * 0.787,\n 0.715 - cos * 0.715 + sin * 0.715,\n 0.072 + cos * 0.928 + sin * 0.072,\n ]);\n }\n\n grayscale(value = 1) {\n this.multiply([\n 0.2126 + 0.7874 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 + 0.2848 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 + 0.9278 * (1 - value),\n ]);\n }\n\n sepia(value = 1) {\n this.multiply([\n 0.393 + 0.607 * (1 - value),\n 0.769 - 0.769 * (1 - value),\n 0.189 - 0.189 * (1 - value),\n 0.349 - 0.349 * (1 - value),\n 0.686 + 0.314 * (1 - value),\n 0.168 - 0.168 * (1 - value),\n 0.272 - 0.272 * (1 - value),\n 0.534 - 0.534 * (1 - value),\n 0.131 + 0.869 * (1 - value),\n ]);\n }\n\n saturate(value = 1) {\n this.multiply([\n 0.213 + 0.787 * value,\n 0.715 - 0.715 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 + 0.285 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 - 0.715 * value,\n 0.072 + 0.928 * value,\n ]);\n }\n\n multiply(matrix) {\n const newR = this.clamp(this.r * matrix[0] + this.g * matrix[1] + this.b * matrix[2]);\n const newG = this.clamp(this.r * matrix[3] + this.g * matrix[4] + this.b * matrix[5]);\n const newB = this.clamp(this.r * matrix[6] + this.g * matrix[7] + this.b * matrix[8]);\n this.r = newR;\n this.g = newG;\n this.b = newB;\n }\n\n brightness(value = 1) {\n this.linear(value);\n }\n contrast(value = 1) {\n this.linear(value, -(0.5 * value) + 0.5);\n }\n\n linear(slope = 1, intercept = 0) {\n this.r = this.clamp(this.r * slope + intercept * 255);\n this.g = this.clamp(this.g * slope + intercept * 255);\n this.b = this.clamp(this.b * slope + intercept * 255);\n }\n\n invert(value = 1) {\n this.r = this.clamp((value + this.r / 255 * (1 - 2 * value)) * 255);\n this.g = this.clamp((value + this.g / 255 * (1 - 2 * value)) * 255);\n this.b = this.clamp((value + this.b / 255 * (1 - 2 * value)) * 255);\n }\n\n hsl() {\n // Code taken from https://stackoverflow.com/a/9493060/2688027, licensed under CC BY-SA.\n const r = this.r / 255;\n const g = this.g / 255;\n const b = this.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h, s, l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0;\n } else {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {\n h: h * 100,\n s: s * 100,\n l: l * 100,\n };\n }\n\n clamp(value) {\n if (value > 255) {\n value = 255;\n } else if (value < 0) {\n value = 0;\n }\n return value;\n }\n}\n\nexport class Solver {\n constructor(target) {\n this.target = target;\n this.targetHSL = target.hsl();\n this.reusedColor = new Color(0, 0, 0);\n }\n\n solve() {\n const result = this.solveNarrow(this.solveWide());\n return {\n values: result.values,\n loss: result.loss,\n filter: this.css(result.values),\n };\n }\n\n solveWide() {\n const A = 5;\n const c = 15;\n const a = [60, 180, 18000, 600, 1.2, 1.2];\n\n let best = { loss: Infinity };\n for (let i = 0; best.loss > 25 && i < 3; i++) {\n const initial = [50, 20, 3750, 50, 100, 100];\n const result = this.spsa(A, a, c, initial, 1000);\n if (result.loss < best.loss) {\n best = result;\n }\n }\n return best;\n }\n\n solveNarrow(wide) {\n const A = wide.loss;\n const c = 2;\n const A1 = A + 1;\n const a = [0.25 * A1, 0.25 * A1, A1, 0.25 * A1, 0.2 * A1, 0.2 * A1];\n return this.spsa(A, a, c, wide.values, 500);\n }\n\n spsa(A, a, c, values, iters) {\n const alpha = 1;\n const gamma = 0.16666666666666666;\n\n let best = null;\n let bestLoss = Infinity;\n const deltas = new Array(6);\n const highArgs = new Array(6);\n const lowArgs = new Array(6);\n\n for (let k = 0; k < iters; k++) {\n const ck = c / Math.pow(k + 1, gamma);\n for (let i = 0; i < 6; i++) {\n deltas[i] = Math.random() > 0.5 ? 1 : -1;\n highArgs[i] = values[i] + ck * deltas[i];\n lowArgs[i] = values[i] - ck * deltas[i];\n }\n\n const lossDiff = this.loss(highArgs) - this.loss(lowArgs);\n for (let i = 0; i < 6; i++) {\n const g = lossDiff / (2 * ck) * deltas[i];\n const ak = a[i] / Math.pow(A + k + 1, alpha);\n values[i] = fix(values[i] - ak * g, i);\n }\n\n const loss = this.loss(values);\n if (loss < bestLoss) {\n best = values.slice(0);\n bestLoss = loss;\n }\n }\n return { values: best, loss: bestLoss };\n\n function fix(value, idx) {\n let max = 100;\n if (idx === 2 /* saturate */) {\n max = 7500;\n } else if (idx === 4 /* brightness */ || idx === 5 /* contrast */) {\n max = 200;\n }\n\n if (idx === 3 /* hue-rotate */) {\n if (value > max) {\n value %= max;\n } else if (value < 0) {\n value = max + value % max;\n }\n } else if (value < 0) {\n value = 0;\n } else if (value > max) {\n value = max;\n }\n return value;\n }\n }\n\n loss(filters) {\n // Argument is array of percentages.\n const color = this.reusedColor;\n color.set(0, 0, 0);\n\n color.invert(filters[0] / 100);\n color.sepia(filters[1] / 100);\n color.saturate(filters[2] / 100);\n color.hueRotate(filters[3] * 3.6);\n color.brightness(filters[4] / 100);\n color.contrast(filters[5] / 100);\n\n const colorHSL = color.hsl();\n return (\n Math.abs(color.r - this.target.r) +\n Math.abs(color.g - this.target.g) +\n Math.abs(color.b - this.target.b) +\n Math.abs(colorHSL.h - this.targetHSL.h) +\n Math.abs(colorHSL.s - this.targetHSL.s) +\n Math.abs(colorHSL.l - this.targetHSL.l)\n );\n }\n\n css(filters) {\n function fmt(idx, multiplier = 1) {\n return Math.round(filters[idx] * multiplier);\n }\n return `invert(${fmt(0)}%) sepia(${fmt(1)}%) saturate(${fmt(2)}%) hue-rotate(${fmt(3, 3.6)}deg) brightness(${fmt(4)}%) contrast(${fmt(5)}%)`\n }\n}\n\nfunction hexToRgb(hex): number[] {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, (m, r, g, b) => {\n return r + r + g + g + b + b;\n });\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? [\n parseInt(result[1], 16),\n parseInt(result[2], 16),\n parseInt(result[3], 16),\n ]\n : null;\n}\n\nexport function getFiltersFromHex(hex): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return ''\n\n const [r, g, b] = rgb;\n const color = new Color(r, g, b);\n const solver = new Solver(color);\n return solver.solve().filter;\n}\n","import { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport interface WorkEarnings {\n workMoneyLossRate: number;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n}\n\nexport function calculateClassEarnings(player: IPlayer): WorkEarnings {\n const gameCPS = 1000 / CONSTANTS._idleSpeed;\n\n //Find cost and exp gain per game cycle\n let cost = 0;\n let hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = player.hashManager;\n switch (player.className) {\n case CONSTANTS.ClassStudyComputerScience:\n hackExp =\n ((CONSTANTS.ClassStudyComputerScienceBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassDataStructures:\n cost = (CONSTANTS.ClassDataStructuresBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassDataStructuresBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassNetworks:\n cost = (CONSTANTS.ClassNetworksBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassNetworksBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassAlgorithms:\n cost = (CONSTANTS.ClassAlgorithmsBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassAlgorithmsBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassManagement:\n cost = (CONSTANTS.ClassManagementBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassManagementBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassLeadership:\n cost = (CONSTANTS.ClassLeadershipBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassLeadershipBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassGymStrength:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n strExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDefense:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n defExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDexterity:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n dexExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymAgility:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n agiExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n }\n return {\n workMoneyLossRate: cost,\n workHackExpGainRate: hackExp * player.hacking_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workStrExpGainRate: strExp * player.strength_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDefExpGainRate: defExp * player.defense_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDexExpGainRate: dexExp * player.dexterity_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workAgiExpGainRate: agiExp * player.agility_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workChaExpGainRate: chaExp * player.charisma_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n };\n}\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: 'Default',\n description: 'Default game theme, most supported',\n credit: 'hydroflame',\n screenshot: img1,\n colors: {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#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 rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Default-lite\",\n description: \"Less eye-straining default theme\",\n credit: \"NmuGmu\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/925263801564151888\",\n screenshot: img1,\n colors: {\n primarylight: \"#28CF28\",\n primary: \"#21A821\",\n primarydark: \"#177317\",\n successlight: \"#1CFF1C\",\n success: \"#16CA16\",\n successdark: \"#0D910D\",\n errorlight: \"#FF3B3B\",\n error: \"#C32D2D\",\n errordark: \"#8E2121\",\n secondarylight: \"#B3B3B3\",\n secondary: \"#838383\",\n secondarydark: \"#676767\",\n warninglight: \"#FFFF3A\",\n warning: \"#C3C32A\",\n warningdark: \"#8C8C1E\",\n infolight: \"#64CBFF\",\n info: \"#3399CC\",\n infodark: \"#246D91\",\n welllight: \"#404040\",\n well: \"#1C1C1C\",\n white: \"#C3C3C3\",\n black: \"#0A0B0B\",\n hp: \"#C62E2E\",\n money: \"#D6BB27\",\n hack: \"#ADFF2F\",\n combat: \"#E8EDCD\",\n cha: \"#8B5FAF\",\n int: \"#537CC8\",\n rep: \"#E8EDCD\",\n disabled: \"#5AB5A5\",\n backgroundprimary: \"#0C0D0E\",\n backgroundsecondary: \"#121415\",\n button: \"#252829\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Monokai'ish\",\n description: \"Monokai'ish\",\n credit: \"eltea\",\n screenshot: img1,\n colors: {\n primarylight: \"#FFF\",\n primary: \"#F8F8F2\",\n primarydark: \"#FAFAEB\",\n successlight: \"#ADE146\",\n success: \"#A6E22E\",\n successdark: \"#98E104\",\n errorlight: \"#FF69A0\",\n error: \"#F92672\",\n errordark: \"#D10F56\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E1D992\",\n warning: \"#E6DB74\",\n warningdark: \"#EDDD54\",\n infolight: \"#92E1F1\",\n info: \"#66D9EF\",\n infodark: \"#31CDED\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#F92672\",\n money: \"#E6DB74\",\n hack: \"#A6E22E\",\n combat: \"#75715E\",\n cha: \"#AE81FF\",\n int: \"#66D9EF\",\n rep: \"#E69F66\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#272822\",\n backgroundsecondary: \"#1B1C18\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Warmer\",\n credit: \"hexnaught\",\n description: \"Warmer, softer theme\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999581020028938\",\n screenshot: img1,\n colors: {\n primarylight: \"#EA9062\",\n primary: \"#DD7B4A\",\n primarydark: \"#D3591C\",\n successlight: \"#6ACF6A\",\n success: \"#43BF43\",\n successdark: \"#3E913E\",\n errorlight: \"#C15757\",\n error: \"#B34141\",\n errordark: \"#752525\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E6E69D\",\n warning: \"#DADA56\",\n warningdark: \"#A1A106\",\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: \"#AD84CF\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#76C6B7\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark+\",\n credit: \"LoganMD\",\n description: \"VSCode Dark+\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999975867617310\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#CCCCAE\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#00D200\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#C80000\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#969090\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#C8C800\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Mayukai Dark\",\n description: \"Mayukai Dark-esque\",\n credit: \"Festive Noire\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922037502334889994\",\n screenshot: img1,\n colors: {\n primarylight: \"#DDDFC5\",\n primary: \"#CDCFB6\",\n primarydark: \"#9D9F8C\",\n successlight: \"#00EF00\",\n success: \"#00A500\",\n successdark: \"#007A00\",\n errorlight: \"#F92672\",\n error: \"#CA1C5C\",\n errordark: \"#90274A\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#D3D300\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#00010A\",\n white: \"#fff\",\n black: \"#020509\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#8CCF27\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#080C11\",\n backgroundsecondary: \"#03080F\",\n button: \"#00010A\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Purple\",\n credit: \"zer0ney\",\n description: \"Essentially all defaults except for purple replacing the main colors\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922091815849570395\",\n screenshot: img1,\n colors: {\n primarylight: \"#BA55D3\",\n primary: \"#9370DB\",\n primarydark: \"#8A2BE2\",\n successlight: \"#BA55D3\",\n success: \"#9370DB\",\n successdark: \"#8A2BE2\",\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 rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Smooth Green\",\n description: \"A nice green theme that doesn't hurt your eyes.\",\n credit: \"Swidt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922243957986033725\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#B0D9A3\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#6BC16B\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#3D713D\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#8FAF85\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#38F100\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#2F3C2B\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#4AA52E\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#35A135\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#2F3C2B\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dracula\",\n description: \"Dracula Look-alike\",\n credit: \"H3draut3r\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922296307836678144\",\n screenshot: img1,\n colors: {\n primarylight: \"#7082B8\",\n primary: \"#F8F8F2\",\n primarydark: \"#FF79C6\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#090\",\n errorlight: \"#FD4545\",\n error: \"#FF2D2D\",\n errordark: \"#C62424\",\n secondarylight: \"#AAA\",\n secondary: \"#8BE9FD\",\n secondarydark: \"#666\",\n warninglight: \"#FFC281\",\n warning: \"#FFB86C\",\n warningdark: \"#E6A055\",\n infolight: \"#A0A0FF\",\n info: \"#7070FF\",\n infodark: \"#4040FF\",\n welllight: \"#44475A\",\n well: \"#363948\",\n white: \"#fff\",\n black: \"#282A36\",\n hp: \"#D34448\",\n money: \"#50FA7B\",\n hack: \"#F1FA8C\",\n combat: \"#BD93F9\",\n cha: \"#FF79C6\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#282A36\",\n backgroundsecondary: \"#21222C\",\n button: \"#21222C\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark Blue\",\n description: \"Very dark with a blue/purplelly primary\",\n credit: \"Saynt_Garmo\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/923084732718264340\",\n screenshot: img1,\n colors: {\n primarylight: \"#023DDE\",\n primary: \"#4A41C8\",\n primarydark: \"#005299\",\n successlight: \"#00FF00\",\n success: \"#D1DAD1\",\n successdark: \"#BFCABF\",\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: \"#040505\",\n white: \"#fff\",\n black: \"#000000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#091419\",\n backgroundsecondary: \"#000000\",\n button: \"#000000\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Discord-like\",\n description: \"Discord inspired theme\",\n credit: \"Thermite\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924305252017143818\",\n screenshot: img1,\n colors: {\n primarylight: \"#7389DC\",\n primary: \"#7389DC\",\n primarydark: \"#5964F1\",\n successlight: \"#00CC00\",\n success: \"#20DF20\",\n successdark: \"#0CB80C\",\n errorlight: \"#EA5558\",\n error: \"#EC4145\",\n errordark: \"#E82528\",\n secondarylight: \"#C3C3C3\",\n secondary: \"#9C9C9C\",\n secondarydark: \"#4E4E4E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#1C4FB3\",\n welllight: \"#999999\",\n well: \"#35383C\",\n white: \"#FFFFFF\",\n black: \"#202225\",\n hp: \"#FF5656\",\n money: \"#43FF43\",\n hack: \"#FFAB3D\",\n combat: \"#8A90FD\",\n cha: \"#FF51D9\",\n int: \"#6495ed\",\n rep: \"#FFFF30\",\n disabled: \"#474B51\",\n backgroundprimary: \"#2F3136\",\n backgroundsecondary: \"#35393E\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"One Dark\",\n description: \"Dark with a greenish tint\",\n credit: \"Dexalt142\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924650660694208512\",\n screenshot: img1,\n colors: {\n primarylight: \"#98C379\",\n primary: \"#98C379\",\n primarydark: \"#98C379\",\n successlight: \"#98C379\",\n success: \"#98C379\",\n successdark: \"#98C379\",\n errorlight: \"#E06C75\",\n error: \"#BE5046\",\n errordark: \"#BE5046\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E5C07B\",\n warning: \"#E5C07B\",\n warningdark: \"#D19A66\",\n infolight: \"#61AFEF\",\n info: \"#61AFEF\",\n infodark: \"#61AFEF\",\n welllight: \"#4B5263\",\n well: \"#282C34\",\n white: \"#ABB2BF\",\n black: \"#282C34\",\n hp: \"#E06C75\",\n money: \"#E5C07B\",\n hack: \"#98C379\",\n combat: \"#ABB2BF\",\n cha: \"#C678DD\",\n int: \"#61AFEF\",\n rep: \"#ABB2BF\",\n disabled: \"#56B6C2\",\n backgroundprimary: \"#282C34\",\n backgroundsecondary: \"#21252B\",\n button: \"#4B5263\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Muted Gold & Blue\",\n description: \"Muted gold with blue accents.\",\n credit: \"Sloth\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924672660758208563\",\n screenshot: img1,\n colors: {\n primarylight: \"#E3B54A\",\n primary: \"#CAA243\",\n primarydark: \"#7E6937\",\n successlight: \"#82FF82\",\n success: \"#6FDA6F\",\n successdark: \"#64C364\",\n errorlight: \"#FD5555\",\n error: \"#D84A4A\",\n errordark: \"#AC3939\",\n secondarylight: \"#D8D0B8\",\n secondary: \"#B1AA95\",\n secondarydark: \"#736E5E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#111111\",\n white: \"#fff\",\n black: \"#070300\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#0A0A0E\",\n backgroundsecondary: \"#0E0E10\",\n button: \"#222222\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Light\",\n description: \"Cobbled Together Light Theme\",\n credit: \"matt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/926114005456658432\",\n screenshot: img1,\n colors: {\n primarylight: \"#535353\",\n primary: \"#1A1A1A\",\n primarydark: \"#0d0d0d\",\n successlight: \"#63c439\",\n success: \"#428226\",\n successdark: \"#2E5A1B\",\n errorlight: \"#df7051\",\n error: \"#C94824\",\n errordark: \"#91341B\",\n secondarylight: \"#b3b3b3\",\n secondary: \"#9B9B9B\",\n secondarydark: \"#7A7979\",\n warninglight: \"#e8d464\",\n warning: \"#C6AD20\",\n warningdark: \"#9F8A16\",\n infolight: \"#6299cf\",\n info: \"#3778B7\",\n infodark: \"#30689C\",\n welllight: \"#f9f9f9\",\n well: \"#eaeaea\",\n white: \"#F7F7F7\",\n black: \"#F7F7F7\",\n hp: \"#BF5C41\",\n money: \"#E1B121\",\n hack: \"#47BC38\",\n combat: \"#656262\",\n cha: \"#A568AC\",\n int: \"#889BCF\",\n rep: \"#656262\",\n disabled: \"#70B4BF\",\n backgroundprimary: \"#F7F7F7\",\n backgroundsecondary: \"#f9f9f9\",\n button: \"#eaeaea\",\n },\n};\n","export default __webpack_public_path__ + \"dist/images/83b2443ab7e7d346766c8f6bc5afc7a7.png\";","export default __webpack_public_path__ + \"dist/images/6caf35202b10b52e1fc2743f674c33e8.png\";","export default __webpack_public_path__ + \"dist/images/cb88977ea837bccb9cceb727adc78302.png\";","export default __webpack_public_path__ + \"dist/images/4e0e750f2f09de58219773edd46cbbf5.png\";","export default __webpack_public_path__ + \"dist/images/e97de4daa946331c7e99dee9c05d629c.png\";","export default __webpack_public_path__ + \"dist/images/9f96a5084f4e5f1a6c0041b41b34d62d.png\";","export default __webpack_public_path__ + \"dist/images/85a7b2896acb62be76f3ea7100fe9012.png\";","export default __webpack_public_path__ + \"dist/images/5aa87b7de67a77c914088783b055e1cf.png\";","export default __webpack_public_path__ + \"dist/images/c7164b072d62c91c27c6d607b5207e7b.png\";","export default __webpack_public_path__ + \"dist/images/66f4b86d86164fc117bd6d648e4eaa6f.png\";","export default __webpack_public_path__ + \"dist/images/a1110d6c8d16a14c4570411750248399.png\";","export default __webpack_public_path__ + \"dist/images/447bc31e61f55e7eff875be3e9a81f1a.png\";","export default __webpack_public_path__ + \"dist/images/297df8c0e47764ea113951318b2acf55.png\";","export default __webpack_public_path__ + \"dist/images/e66b0c327f97d08e4253f52234d659eb.png\";","import { ITerminal, Output, Link, RawOutput, TTimer } from \"./ITerminal\";\nimport { IRouter } from \"../ui/Router\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { Programs } from \"../Programs/Programs\";\nimport { CodingContractResult } from \"../CodingContracts\";\nimport { TerminalEvents, TerminalClearEvents } from \"./TerminalEvents\";\n\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\n\nimport { removeLeadingSlash, isInRootDirectory, evaluateFilePath } from \"./DirectoryHelpers\";\nimport { checkIfConnectedToDarkweb } from \"../DarkWeb/DarkWeb\";\nimport { iTutorialNextStep, iTutorialSteps, ITutorial } from \"../InteractiveTutorial\";\nimport { getServerOnNetwork, processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { ParseCommand, ParseCommands } from \"./Parser\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\n\nimport { alias } from \"./commands/alias\";\nimport { analyze } from \"./commands/analyze\";\nimport { backdoor } from \"./commands/backdoor\";\nimport { buy } from \"./commands/buy\";\nimport { cat } from \"./commands/cat\";\nimport { cd } from \"./commands/cd\";\nimport { check } from \"./commands/check\";\nimport { connect } from \"./commands/connect\";\nimport { cp } from \"./commands/cp\";\nimport { download } from \"./commands/download\";\nimport { expr } from \"./commands/expr\";\nimport { free } from \"./commands/free\";\nimport { grow } from \"./commands/grow\";\nimport { hack } from \"./commands/hack\";\nimport { help } from \"./commands/help\";\nimport { history } from \"./commands/history\";\nimport { home } from \"./commands/home\";\nimport { hostname } from \"./commands/hostname\";\nimport { kill } from \"./commands/kill\";\nimport { killall } from \"./commands/killall\";\nimport { ls } from \"./commands/ls\";\nimport { lscpu } from \"./commands/lscpu\";\nimport { mem } from \"./commands/mem\";\nimport { mv } from \"./commands/mv\";\nimport { nano } from \"./commands/nano\";\nimport { ps } from \"./commands/ps\";\nimport { rm } from \"./commands/rm\";\nimport { run } from \"./commands/run\";\nimport { scan } from \"./commands/scan\";\nimport { scananalyze } from \"./commands/scananalyze\";\nimport { scp } from \"./commands/scp\";\nimport { sudov } from \"./commands/sudov\";\nimport { tail } from \"./commands/tail\";\nimport { top } from \"./commands/top\";\nimport { unalias } from \"./commands/unalias\";\nimport { vim } from \"./commands/vim\";\nimport { weaken } from \"./commands/weaken\";\nimport { wget } from \"./commands/wget\";\nimport { hash } from \"../hash/hash\";\n\nexport class Terminal implements ITerminal {\n // Flags to determine whether the player is currently running a hack or an analyze\n action: TTimer | null = null;\n\n commandHistory: string[] = [];\n commandHistoryIndex = 0;\n\n outputHistory: (Output | Link | RawOutput)[] = [\n new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\"),\n ];\n\n // True if a Coding Contract prompt is opened\n contractOpen = false;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir = \"/\";\n\n process(router: IRouter, player: IPlayer, cycles: number): void {\n if (this.action === null) return;\n this.action.timeLeft -= (CONSTANTS._idleSpeed * cycles) / 1000;\n if (this.action.timeLeft < 0.01) this.finishAction(router, player, false);\n TerminalEvents.emit();\n }\n\n append(item: Output | Link | RawOutput): void {\n this.outputHistory.push(item);\n if (this.outputHistory.length > Settings.MaxTerminalCapacity) {\n this.outputHistory.splice(0, this.outputHistory.length - Settings.MaxTerminalCapacity);\n }\n TerminalEvents.emit();\n }\n\n print(s: string): void {\n this.append(new Output(s, \"primary\"));\n }\n\n printRaw(node: React.ReactNode): void {\n this.append(new RawOutput(node));\n }\n\n error(s: string): void {\n this.append(new Output(s, \"error\"));\n }\n\n success(s: string): void {\n this.append(new Output(s, \"success\"));\n }\n\n info(s: string): void {\n this.append(new Output(s, \"info\"));\n }\n\n warn(s: string): void {\n this.append(new Output(s, \"warn\"));\n }\n\n startHack(player: IPlayer): void {\n // Hacking through Terminal should be faster than hacking through a script\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"h\", server);\n }\n\n startGrow(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateGrowTime(server, player) / 16, \"g\", server);\n }\n startWeaken(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateWeakenTime(server, player) / 16, \"w\", server);\n }\n\n startBackdoor(player: IPlayer): void {\n // Backdoor should take the same amount of time as hack\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot backdoor this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"b\", server);\n }\n\n startAnalyze(player: IPlayer): void {\n this.print(\"Analyzing system...\");\n const server = player.getCurrentServer();\n this.startAction(1, \"a\", server);\n }\n\n startAction(n: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer): void {\n this.action = new TTimer(n, action, server);\n }\n\n // Complete the hack/analyze command\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n\n // Calculate whether hack was successful\n const hackChance = calculateHackingChance(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = calculateHackingExpGain(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n router.toBitVerse(false, false);\n return;\n }\n let moneyGained = calculatePercentMoneyHacked(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / CONSTANTS.IntelligenceTerminalHackBaseExpGain);\n\n const oldSec = server.hackDifficulty;\n server.fortify(CONSTANTS.ServerFortifyAmount);\n const newSec = server.hackDifficulty;\n\n this.print(\n `Hack successful on '${server.hostname}'! Gained ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} hacking exp`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n } else {\n // Failure\n player.gainHackingExp(expGainedOnFailure);\n this.print(\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(expGainedOnFailure)} hacking exp`,\n );\n }\n }\n\n finishGrow(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n const growth = processSingleServerGrowth(server, 25, player, server.cpuCores) - 1;\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n growth,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n }\n\n finishWeaken(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n server.weaken(CONSTANTS.ServerWeakenAmount);\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Security decreased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)} (min: ${numeralWrapper.formatSecurity(server.minDifficulty)})` +\n ` and Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n }\n\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (!cancelled) {\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n router.toBitVerse(false, false);\n return;\n }\n this.print(`Backdoor on '${server.hostname}' successful!`);\n }\n }\n\n finishAnalyze(player: IPlayer, currServ: BaseServer, cancelled = false): void {\n if (!cancelled) {\n const isHacknet = currServ instanceof HacknetServer;\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 canRunScripts = hasAdminRights && currServ.maxRam > 0;\n this.print(\"Can run scripts on this host: \" + (canRunScripts ? \"YES\" : \"NO\"));\n this.print(\"RAM: \" + numeralWrapper.formatRAM(currServ.maxRam));\n if (currServ instanceof Server) {\n this.print(\"Backdoor: \" + (currServ.backdoorInstalled ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill for hack() and backdoor: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? numeralWrapper.formatServerSecurity(security) : \"N/A\"));\n const hackingChance = calculateHackingChance(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? numeralWrapper.formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = calculateHackingTime(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? convertTimeMsToTimeElapsedString(hackingTime, true) : \"N/A\"));\n }\n this.print(\n `Total money available on server: ${\n currServ instanceof Server ? numeralWrapper.formatMoney(currServ.moneyAvailable) : \"N/A\"\n }`,\n );\n if (currServ instanceof Server) {\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\n finishAction(router: IRouter, player: IPlayer, cancelled = false): void {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n if (!this.action.server) throw new Error(\"Missing action target server\");\n\n this.print(this.getProgressText());\n if (this.action.action === \"h\") {\n this.finishHack(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"g\") {\n this.finishGrow(player, this.action.server, cancelled);\n } else if (this.action.action === \"w\") {\n this.finishWeaken(player, this.action.server, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, this.action.server, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n this.action = null;\n TerminalEvents.emit();\n }\n\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null {\n if (isScriptFilename(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: string): string {\n const path = evaluateFilePath(filename, this.cwd());\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (isInRootDirectory(path)) {\n return removeLeadingSlash(path);\n }\n\n return path;\n }\n\n getScript(player: IPlayer, filename: string): Script | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\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: IPlayer, filename: string): TextFile | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\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: IPlayer, filename: string): string | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\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(): string {\n return this.currDir;\n }\n\n setcwd(dir: string): void {\n this.currDir = dir;\n TerminalEvents.emit();\n }\n\n async runContract(player: IPlayer, contractName: string): Promise {\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 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 CodingContractResult.Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n serv.removeContract(contract);\n break;\n case CodingContractResult.Failure:\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n this.error(\"Contract FAILED - Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.error(`Contract FAILED - ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n break;\n case CodingContractResult.Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player: IPlayer, depth = 1, all = false): void {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \");\n\n // Map of all servers to keep track of which have been visited\n const visited: {\n [key: string]: number | undefined;\n } = {};\n for (const server of GetAllServers()) {\n visited[server.hostname] = 0;\n }\n\n const stack: BaseServer[] = [];\n const depthQueue: number[] = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\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 HacknetServer;\n if (!all && (s as any).purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.hostname] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.hostname] = 1;\n }\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = getServerOnNetwork(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n if (d == 0) {\n continue;\n } // Don't print current server\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n if (player.hasProgram(Programs.AutoLink.name)) {\n this.append(new Link(titleDashes, s.hostname));\n } else {\n this.print(titleDashes + s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n this.print(\n `${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + (s as any).requiredHackingSkill : \"\"}`,\n );\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + (s as any).numOpenPortsRequired);\n }\n this.print(dashes + \"RAM: \" + numeralWrapper.formatRAM(s.maxRam));\n this.print(\" \");\n }\n }\n\n connectToServer(player: IPlayer, server: string): void {\n const serv = GetServer(server);\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.hostname;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n if (player.getCurrentServer().hostname == \"darkweb\") {\n checkIfConnectedToDarkweb(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router: IRouter, player: IPlayer, commands: string): void {\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\n // Handle Terminal History - multiple commands should be saved as one\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n player.terminalCommandHistory = this.commandHistory;\n }\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = ParseCommands(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear(): void {\n this.outputHistory = [new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\")];\n TerminalEvents.emit();\n TerminalClearEvents.emit();\n }\n\n prestige(): void {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router: IRouter, player: IPlayer, command: string): void {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n }\n // Allow usage of ./\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n }\n // Only split the first space\n const commandArray = ParseCommand(command);\n if (commandArray.length == 0) {\n return;\n }\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n if (ITutorial.isRunning) {\n const n00dlesServ = GetServer(\"n00dles\");\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n }\n switch (ITutorial.currStep) {\n case iTutorialSteps.TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalConnect:\n if (commandArray.length == 2) {\n if (\n commandArray[0] == \"connect\" &&\n (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.hostname)\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalHackingMechanics:\n if (commandArray.length !== 1 || ![\"grow\", \"weaken\", \"hack\"].includes(commandArray[0] + \"\")) {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalGoHome:\n if (commandArray.length == 1 && commandArray[0] == \"home\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n default:\n this.error(\"Please follow the tutorial, or click 'EXIT' if you'd like to skip it\");\n return;\n }\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n /* Command parser */\n const commandName = commandArray[0];\n if (typeof commandName === \"number\" || typeof commandName === \"boolean\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands: {\n [key: string]: (\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n ) => void;\n } = {\n \"scan-analyze\": scananalyze,\n alias: alias,\n analyze: analyze,\n backdoor: backdoor,\n buy: buy,\n cat: cat,\n cd: cd,\n check: check,\n clear: () => this.clear(),\n cls: () => this.clear(),\n connect: connect,\n cp: cp,\n download: download,\n expr: expr,\n free: free,\n grow: grow,\n hack: hack,\n help: help,\n history: history,\n home: home,\n hostname: hostname,\n kill: kill,\n killall: killall,\n ls: ls,\n lscpu: lscpu,\n mem: mem,\n mv: mv,\n nano: nano,\n ps: ps,\n rm: rm,\n run: run,\n scan: scan,\n scp: scp,\n sudov: sudov,\n tail: tail,\n top: top,\n unalias: unalias,\n vim: vim,\n weaken: weaken,\n wget: wget,\n };\n\n const f = commands[commandName.toLowerCase()];\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(): string {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return createProgressBarText({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50,\n });\n }\n}\n","import { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\n/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */\n\n/* Function that generates a valid 'data' for a contract type */\nexport type GeneratorFunc = () => any;\n\n/* Function that checks if the provided solution is the correct one */\nexport type SolverFunc = (data: any, answer: string) => boolean;\n\n/* Function that returns a string with the problem's description.\n Requires the 'data' of a Contract as input */\nexport type DescriptionFunc = (data: any) => string;\n\ninterface ICodingContractTypeMetadata {\n desc: DescriptionFunc;\n difficulty: number;\n gen: GeneratorFunc;\n name: string;\n numTries: number;\n solver: SolverFunc;\n}\n\n/* Helper functions for Coding Contract implementations */\nfunction removeBracketsFromArrayString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith(\"[\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith(\"]\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction removeQuotesFromString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith('\"') || strCpy.startsWith(\"'\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith('\"') || strCpy.endsWith(\"'\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction convert2DArrayToString(arr: any[][]): string {\n const components: string[] = [];\n arr.forEach((e: any) => {\n let s: string = e.toString();\n s = [\"[\", s, \"]\"].join(\"\");\n components.push(s);\n });\n\n return components.join(\",\").replace(/\\s/g, \"\");\n}\n\nexport const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [\n {\n desc: (n: number): string => {\n return [\"A prime factor is a factor that is a prime number.\", `What is the largest prime factor of ${n}?`].join(\n \" \",\n );\n },\n difficulty: 1,\n gen: (): number => {\n return getRandomInt(500, 1e9);\n },\n name: \"Find Largest Prime Factor\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n let fac = 2;\n let n: number = data;\n while (n > (fac - 1) * (fac - 1)) {\n while (n % fac === 0) {\n n = Math.round(n / fac);\n }\n ++fac;\n }\n\n return (n === 1 ? fac - 1 : n) === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[]): string => {\n return [\n \"Given the following integer array, find the contiguous subarray\",\n \"(containing at least one number) which has the largest sum and return that sum.\",\n \"'Sum' refers to the sum of all the numbers in the subarray.\\n\",\n `${n.toString()}`,\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(5, 40);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(-10, 10);\n }\n\n return arr;\n },\n name: \"Subarray with Maximum Sum\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const nums: number[] = data.slice();\n for (let i = 1; i < nums.length; i++) {\n nums[i] = Math.max(nums[i], nums[i] + nums[i - 1]);\n }\n\n return parseInt(ans, 10) === Math.max(...nums);\n },\n },\n {\n desc: (n: number): string => {\n return [\n \"It is possible write four as a sum in exactly four different ways:\\n\\n\",\n \"    3 + 1\\n\",\n \"    2 + 2\\n\",\n \"    2 + 1 + 1\\n\",\n \"    1 + 1 + 1 + 1\\n\\n\",\n `How many different ways can the number ${n} be written as a sum of at least`,\n \"two positive integers?\",\n ].join(\" \");\n },\n difficulty: 1.5,\n gen: (): number => {\n return getRandomInt(8, 100);\n },\n name: \"Total Ways to Sum\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n const ways: number[] = [1];\n ways.length = data + 1;\n ways.fill(0, 1);\n for (let i = 1; i < data; ++i) {\n for (let j: number = i; j <= data; ++j) {\n ways[j] += ways[j - i];\n }\n }\n\n return ways[data] === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[][]): string => {\n let d: string = [\n \"Given the following array of arrays of numbers representing a 2D matrix,\",\n \"return the elements of the matrix as an array in spiral order:\\n\\n\",\n ].join(\" \");\n // for (const line of n) {\n // d += `${line.toString()},\\n`;\n // }\n d += \"    [\\n\";\n d += n\n .map(\n (line: number[]) =>\n \"        [\" +\n line.map((x: number) => `${x}`.padStart(2, \" \")).join(\",\") +\n \"]\",\n )\n .join(\"\\n\");\n d += \"\\n    ]\\n\";\n d += [\n \"\\nHere is an example of what spiral order should be:\\n\\n\",\n \"    [\\n\",\n \"        [1, 2, 3]\\n\",\n \"        [4, 5, 6]\\n\",\n \"        [7, 8, 9]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\\n\\n\",\n \"Note that the matrix will not always be square:\\n\\n\",\n \"    [\\n\",\n \"        [1,  2,  3,  4]\\n\",\n \"        [5,  6,  7,  8]\\n\",\n \"        [9, 10, 11, 12]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]\",\n ].join(\" \");\n\n return d;\n },\n difficulty: 2,\n gen: (): number[][] => {\n const m: number = getRandomInt(1, 15);\n const n: number = getRandomInt(1, 15);\n const matrix: number[][] = [];\n matrix.length = m;\n for (let i = 0; i < m; ++i) {\n matrix[i] = [];\n matrix[i].length = n;\n }\n\n for (let i = 0; i < m; ++i) {\n for (let j = 0; j < n; ++j) {\n matrix[i][j] = getRandomInt(1, 50);\n }\n }\n\n return matrix;\n },\n name: \"Spiralize Matrix\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const spiral: number[] = [];\n const m: number = data.length;\n const n: number = data[0].length;\n let u = 0;\n let d: number = m - 1;\n let l = 0;\n let r: number = n - 1;\n let k = 0;\n while (true) {\n // Up\n for (let col: number = l; col <= r; col++) {\n spiral[k] = data[u][col];\n ++k;\n }\n if (++u > d) {\n break;\n }\n\n // Right\n for (let row: number = u; row <= d; row++) {\n spiral[k] = data[row][r];\n ++k;\n }\n if (--r < l) {\n break;\n }\n\n // Down\n for (let col: number = r; col >= l; col--) {\n spiral[k] = data[d][col];\n ++k;\n }\n if (--d < u) {\n break;\n }\n\n // Left\n for (let row: number = d; row >= u; row--) {\n spiral[k] = data[row][l];\n ++k;\n }\n if (++l > r) {\n break;\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const playerAns: any[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < playerAns.length; ++i) {\n playerAns[i] = parseInt(playerAns[i], 10);\n }\n if (spiral.length !== playerAns.length) {\n return false;\n }\n for (let i = 0; i < spiral.length; ++i) {\n if (spiral[i] !== playerAns[i]) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (arr: number[]): string => {\n return [\n \"You are given the following array of integers:\\n\\n\",\n `${arr}\\n\\n`,\n \"Each element in the array represents your MAXIMUM jump length\",\n \"at that position. This means that if you are at position i and your\",\n \"maximum jump length is n, you can jump to any position from\",\n \"i to i+n.\",\n \"\\n\\nAssuming you are initially positioned\",\n \"at the start of the array, determine whether you are\",\n \"able to reach the last index.\\n\\n\",\n \"Your answer should be submitted as 1 or 0, representing true and false respectively\",\n ].join(\" \");\n },\n difficulty: 2.5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 25);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < arr.length; ++i) {\n if (Math.random() < 0.2) {\n arr[i] = 0; // 20% chance of being 0\n } else {\n arr[i] = getRandomInt(0, 10);\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game\",\n numTries: 1,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data.length;\n let i = 0;\n for (let reach = 0; i < n && i <= reach; ++i) {\n reach = Math.max(i + data[i], reach);\n }\n const solution: boolean = i === n;\n return (ans === \"1\" && solution) || (ans === \"0\" && !solution);\n },\n },\n {\n desc: (arr: number[][]): string => {\n return [\n \"Given the following array of array of numbers representing a list of\",\n \"intervals, merge all overlapping intervals.\\n\\n\",\n `[${convert2DArrayToString(arr)}]\\n\\n`,\n \"Example:\\n\\n\",\n \"[[1, 3], [8, 10], [2, 6], [10, 16]]\\n\\n\",\n \"would merge into [[1, 6], [8, 16]].\\n\\n\",\n \"The intervals must be returned in ASCENDING order.\",\n \"You can assume that in an interval, the first number will always be\",\n \"smaller than the second.\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[][] => {\n const intervals: number[][] = [];\n const numIntervals: number = getRandomInt(3, 20);\n for (let i = 0; i < numIntervals; ++i) {\n const start: number = getRandomInt(1, 25);\n const end: number = start + getRandomInt(1, 10);\n intervals.push([start, end]);\n }\n\n return intervals;\n },\n name: \"Merge Overlapping Intervals\",\n numTries: 15,\n solver: (data: number[][], ans: string): boolean => {\n const intervals: number[][] = data.slice();\n intervals.sort((a: number[], b: number[]) => {\n return a[0] - b[0];\n });\n\n const result: number[][] = [];\n let start: number = intervals[0][0];\n let end: number = intervals[0][1];\n for (const interval of intervals) {\n if (interval[0] <= end) {\n end = Math.max(end, interval[1]);\n } else {\n result.push([start, end]);\n start = interval[0];\n end = interval[1];\n }\n }\n result.push([start, end]);\n\n const sanitizedResult: string = convert2DArrayToString(result);\n const sanitizedAns: string = ans.replace(/\\s/g, \"\");\n\n return sanitizedResult === sanitizedAns || sanitizedResult === removeBracketsFromArrayString(sanitizedAns);\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string containing only digits, return\",\n \"an array with all possible valid IP address combinations\",\n \"that can be created from the string:\\n\\n\",\n `${data}\\n\\n`,\n \"Note that an octet cannot begin with a '0' unless the number\",\n \"itself is actually 0. For example, '192.168.010.1' is not a valid IP.\\n\\n\",\n \"Examples:\\n\\n\",\n \"25525511135 -> [255.255.11.135, 255.255.111.35]\\n\",\n \"1938718066 -> [193.87.180.66]\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): string => {\n let str = \"\";\n for (let i = 0; i < 4; ++i) {\n const num: number = getRandomInt(0, 255);\n const convNum: string = num.toString();\n str += convNum;\n }\n\n return str;\n },\n name: \"Generate IP Addresses\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n const ret: string[] = [];\n for (let a = 1; a <= 3; ++a) {\n for (let b = 1; b <= 3; ++b) {\n for (let c = 1; c <= 3; ++c) {\n for (let d = 1; d <= 3; ++d) {\n if (a + b + c + d === data.length) {\n const A: number = parseInt(data.substring(0, a), 10);\n const B: number = parseInt(data.substring(a, a + b), 10);\n const C: number = parseInt(data.substring(a + b, a + b + c), 10);\n const D: number = parseInt(data.substring(a + b + c, a + b + c + d), 10);\n if (A <= 255 && B <= 255 && C <= 255 && D <= 255) {\n const ip: string = [A.toString(), \".\", B.toString(), \".\", C.toString(), \".\", D.toString()].join(\"\");\n if (ip.length === data.length + 3) {\n ret.push(ip);\n }\n }\n }\n }\n }\n }\n }\n\n const sanitizedAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const ansArr: string[] = sanitizedAns.split(\",\");\n if (ansArr.length !== ret.length) {\n return false;\n }\n for (const ipInAns of ansArr) {\n if (!ret.includes(ipInAns)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"one transaction (i.e. you can only buy and sell the stock once). If no profit can be made\",\n \"then the answer should be 0. Note\",\n \"that you have to buy the stock before you can sell it\",\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader I\",\n numTries: 5,\n solver: (data: number[], ans: string): boolean => {\n let maxCur = 0;\n let maxSoFar = 0;\n for (let i = 1; i < data.length; ++i) {\n maxCur = Math.max(0, (maxCur += data[i] - data[i - 1]));\n maxSoFar = Math.max(maxCur, maxSoFar);\n }\n\n return maxSoFar.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using as many\",\n \"transactions as you'd like. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 2,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader II\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let profit = 0;\n for (let p = 1; p < data.length; ++p) {\n profit += Math.max(data[p] - data[p - 1], 0);\n }\n\n return profit.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"two transactions. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader III\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let hold1: number = Number.MIN_SAFE_INTEGER;\n let hold2: number = Number.MIN_SAFE_INTEGER;\n let release1 = 0;\n let release2 = 0;\n for (const price of data) {\n release2 = Math.max(release2, hold2 + price);\n hold2 = Math.max(hold2, release1 - price);\n release1 = Math.max(release1, hold1 + price);\n hold1 = Math.max(hold1, price * -1);\n }\n\n return release2.toString() === ans;\n },\n },\n {\n desc: (data: any[]): string => {\n const k: number = data[0];\n const prices: number[] = data[1];\n return [\n \"You are given the following array with two elements:\\n\\n\",\n `[${k}, [${prices}]]\\n\\n`,\n \"The first element is an integer k. The second element is an\",\n \"array of stock prices (which are numbers) where the i-th element\",\n \"represents the stock price on day i.\\n\\n\",\n \"Determine the maximum possible profit you can earn using at most\",\n \"k transactions. A transaction is defined as buying and then selling\",\n \"one share of the stock. Note that you cannot engage in multiple\",\n \"transactions at once. In other words, you must sell the stock before\",\n \"you can buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0.\",\n ].join(\" \");\n },\n difficulty: 8,\n gen: (): any[] => {\n const k: number = getRandomInt(2, 10);\n const len: number = getRandomInt(3, 50);\n const prices: number[] = [];\n prices.length = len;\n for (let i = 0; i < len; ++i) {\n prices[i] = getRandomInt(1, 200);\n }\n\n return [k, prices];\n },\n name: \"Algorithmic Stock Trader IV\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const k: number = data[0];\n const prices: number[] = data[1];\n\n const len = prices.length;\n if (len < 2) {\n return parseInt(ans) === 0;\n }\n if (k > len / 2) {\n let res = 0;\n for (let i = 1; i < len; ++i) {\n res += Math.max(prices[i] - prices[i - 1], 0);\n }\n\n return parseInt(ans) === res;\n }\n\n const hold: number[] = [];\n const rele: number[] = [];\n hold.length = k + 1;\n rele.length = k + 1;\n for (let i = 0; i <= k; ++i) {\n hold[i] = Number.MIN_SAFE_INTEGER;\n rele[i] = 0;\n }\n\n let cur: number;\n for (let i = 0; i < len; ++i) {\n cur = prices[i];\n for (let j = k; j > 0; --j) {\n rele[j] = Math.max(rele[j], hold[j] + cur);\n hold[j] = Math.max(hold[j], rele[j - 1] - cur);\n }\n }\n\n return parseInt(ans) === rele[k];\n },\n },\n {\n desc: (data: number[][]): string => {\n function createTriangleRecurse(data: number[][], level = 0): string {\n const numLevels: number = data.length;\n if (level >= numLevels) {\n return \"\";\n }\n const numSpaces = numLevels - level + 1;\n\n let str: string = [\" \".repeat(numSpaces), \"[\", data[level].toString(), \"]\"].join(\"\");\n if (level < numLevels - 1) {\n str += \",\";\n }\n\n return str + \"\\n\" + createTriangleRecurse(data, level + 1);\n }\n\n function createTriangle(data: number[][]): string {\n return [\"[\\n\", createTriangleRecurse(data), \"]\"].join(\"\");\n }\n\n const triangle = createTriangle(data);\n\n return [\n \"Given a triangle, find the minimum path sum from top to bottom. In each step\",\n \"of the path, you may only move to adjacent numbers in the row below.\",\n \"The triangle is represented as a 2D array of numbers:\\n\\n\",\n `${triangle}\\n\\n`,\n \"Example: If you are given the following triangle:\\n\\n[\\n\",\n \"     [2],\\n\",\n \"    [3,4],\\n\",\n \"   [6,5,7],\\n\",\n \"  [4,1,8,3]\\n\",\n \"]\\n\\n\",\n \"The minimum path sum is 11 (2 -> 3 -> 5 -> 1).\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const triangle: number[][] = [];\n const levels: number = getRandomInt(3, 12);\n triangle.length = levels;\n\n for (let row = 0; row < levels; ++row) {\n triangle[row] = [];\n triangle[row].length = row + 1;\n for (let i = 0; i < triangle[row].length; ++i) {\n triangle[row][i] = getRandomInt(1, 9);\n }\n }\n\n return triangle;\n },\n name: \"Minimum Path Sum in a Triangle\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const n: number = data.length;\n const dp: number[] = data[n - 1].slice();\n for (let i = n - 2; i > -1; --i) {\n for (let j = 0; j < data[i].length; ++j) {\n dp[j] = Math.min(dp[j], dp[j + 1]) + data[i][j];\n }\n }\n\n return dp[0] === parseInt(ans);\n },\n },\n {\n desc: (data: number[]): string => {\n const numRows = data[0];\n const numColumns = data[1];\n return [\n \"You are in a grid with\",\n `${numRows} rows and ${numColumns} columns, and you are`,\n \"positioned in the top-left corner of that grid. You are trying to\",\n \"reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Determine how many\",\n \"unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an array\",\n \"with the number of rows and columns:\\n\\n\",\n `[${numRows}, ${numColumns}]`,\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[] => {\n const numRows: number = getRandomInt(2, 14);\n const numColumns: number = getRandomInt(2, 14);\n\n return [numRows, numColumns];\n },\n name: \"Unique Paths in a Grid I\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data[0]; // Number of rows\n const m: number = data[1]; // Number of columns\n const currentRow: number[] = [];\n currentRow.length = n;\n\n for (let i = 0; i < n; i++) {\n currentRow[i] = 1;\n }\n for (let row = 1; row < m; row++) {\n for (let i = 1; i < n; i++) {\n currentRow[i] += currentRow[i - 1];\n }\n }\n\n return parseInt(ans) === currentRow[n - 1];\n },\n },\n {\n desc: (data: number[][]): string => {\n let gridString = \"\";\n for (const line of data) {\n gridString += `${line.toString()},\\n`;\n }\n return [\n \"You are located in the top-left corner of the following grid:\\n\\n\",\n `${gridString}\\n`,\n \"You are trying reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Furthermore, there are obstacles on the grid\",\n \"that you cannot move onto. These obstacles are denoted by '1', while empty\",\n \"spaces are denoted by 0.\\n\\n\",\n \"Determine how many unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const numRows: number = getRandomInt(2, 12);\n const numColumns: number = getRandomInt(2, 12);\n\n const grid: number[][] = [];\n grid.length = numRows;\n for (let i = 0; i < numRows; ++i) {\n grid[i] = [];\n grid[i].length = numColumns;\n grid[i].fill(0);\n }\n\n for (let r = 0; r < numRows; ++r) {\n for (let c = 0; c < numColumns; ++c) {\n if (r === 0 && c === 0) {\n continue;\n }\n if (r === numRows - 1 && c === numColumns - 1) {\n continue;\n }\n\n // 15% chance of an element being an obstacle\n if (Math.random() < 0.15) {\n grid[r][c] = 1;\n }\n }\n }\n\n return grid;\n },\n name: \"Unique Paths in a Grid II\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const obstacleGrid: number[][] = [];\n obstacleGrid.length = data.length;\n for (let i = 0; i < obstacleGrid.length; ++i) {\n obstacleGrid[i] = data[i].slice();\n }\n\n for (let i = 0; i < obstacleGrid.length; i++) {\n for (let j = 0; j < obstacleGrid[0].length; j++) {\n if (obstacleGrid[i][j] == 1) {\n obstacleGrid[i][j] = 0;\n } else if (i == 0 && j == 0) {\n obstacleGrid[0][0] = 1;\n } else {\n obstacleGrid[i][j] = (i > 0 ? obstacleGrid[i - 1][j] : 0) + (j > 0 ? obstacleGrid[i][j - 1] : 0);\n }\n }\n }\n\n return obstacleGrid[obstacleGrid.length - 1][obstacleGrid[0].length - 1] === parseInt(ans);\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string:\\n\\n\",\n `${data}\\n\\n`,\n \"remove the minimum number of invalid parentheses in order to validate\",\n \"the string. If there are multiple minimal ways to validate the string,\",\n \"provide all of the possible results. The answer should be provided\",\n \"as an array of strings. If it is impossible to validate the string\",\n \"the result should be an array with only an empty string.\\n\\n\",\n \"IMPORTANT: The string may contain letters, not just parentheses.\",\n `Examples:\\n`,\n `\"()())()\" -> [()()(), (())()]\\n`,\n `\"(a)())()\" -> [(a)()(), (a())()]\\n`,\n `\")(\" -> [\"\"]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): string => {\n const len: number = getRandomInt(6, 20);\n const chars: string[] = [];\n chars.length = len;\n\n // 80% chance of the first parenthesis being (\n Math.random() < 0.8 ? (chars[0] = \"(\") : (chars[0] = \")\");\n\n for (let i = 1; i < len; ++i) {\n const roll = Math.random();\n if (roll < 0.4) {\n chars[i] = \"(\";\n } else if (roll < 0.8) {\n chars[i] = \")\";\n } else {\n chars[i] = \"a\";\n }\n }\n\n return chars.join(\"\");\n },\n name: \"Sanitize Parentheses in Expression\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n let left = 0;\n let right = 0;\n const res: string[] = [];\n\n for (let i = 0; i < data.length; ++i) {\n if (data[i] === \"(\") {\n ++left;\n } else if (data[i] === \")\") {\n left > 0 ? --left : ++right;\n }\n }\n\n function dfs(\n pair: number,\n index: number,\n left: number,\n right: number,\n s: string,\n solution: string,\n res: string[],\n ): void {\n if (s.length === index) {\n if (left === 0 && right === 0 && pair === 0) {\n for (let i = 0; i < res.length; i++) {\n if (res[i] === solution) {\n return;\n }\n }\n res.push(solution);\n }\n return;\n }\n\n if (s[index] === \"(\") {\n if (left > 0) {\n dfs(pair, index + 1, left - 1, right, s, solution, res);\n }\n dfs(pair + 1, index + 1, left, right, s, solution + s[index], res);\n } else if (s[index] === \")\") {\n if (right > 0) dfs(pair, index + 1, left, right - 1, s, solution, res);\n if (pair > 0) dfs(pair - 1, index + 1, left, right, s, solution + s[index], res);\n } else {\n dfs(pair, index + 1, left, right, s, solution + s[index], res);\n }\n }\n\n dfs(0, 0, left, right, data, \"\", res);\n\n const sanitizedPlayerAns = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n\n const playerAnsArray: string[] = sanitizedPlayerAns.split(\",\");\n if (playerAnsArray.length !== res.length) {\n return false;\n }\n for (const resultInAnswer of res) {\n if (!playerAnsArray.includes(resultInAnswer)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: any[]): string => {\n const digits: string = data[0];\n const target: number = data[1];\n\n return [\n \"You are given the following string which contains only digits between 0 and 9:\\n\\n\",\n `${digits}\\n\\n`,\n `You are also given a target number of ${target}. Return all possible ways`,\n \"you can add the +(add), -(subtract), and *(multiply) operators to the string such\",\n \"that it evaluates to the target number. (Normal order of operations applies.)\\n\\n\",\n \"The provided answer should be an array of strings containing the valid expressions.\",\n \"The data provided by this problem is an array with two elements. The first element\",\n \"is the string of digits, while the second element is the target number:\\n\\n\",\n `[\"${digits}\", ${target}]\\n\\n`,\n \"NOTE: The order of evaluation expects script operator precedence\",\n \"NOTE: Numbers in the expression cannot have leading 0's. In other words,\",\n `\"1+01\" is not a valid expression`,\n \"Examples:\\n\\n\",\n `Input: digits = \"123\", target = 6\\n`,\n `Output: [1+2+3, 1*2*3]\\n\\n`,\n `Input: digits = \"105\", target = 5\\n`,\n `Output: [1*0+5, 10-5]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): any[] => {\n const numDigits = getRandomInt(4, 12);\n const digitsArray: string[] = [];\n digitsArray.length = numDigits;\n for (let i = 0; i < digitsArray.length; ++i) {\n if (i === 0) {\n digitsArray[i] = String(getRandomInt(1, 9));\n } else {\n digitsArray[i] = String(getRandomInt(0, 9));\n }\n }\n\n const target: number = getRandomInt(-100, 100);\n const digits: string = digitsArray.join(\"\");\n\n return [digits, target];\n },\n name: \"Find All Valid Math Expressions\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const num: string = data[0];\n const target: number = data[1];\n\n function helper(\n res: string[],\n path: string,\n num: string,\n target: number,\n pos: number,\n evaluated: number,\n multed: number,\n ): void {\n if (pos === num.length) {\n if (target === evaluated) {\n res.push(path);\n }\n return;\n }\n\n for (let i = pos; i < num.length; ++i) {\n if (i != pos && num[pos] == \"0\") {\n break;\n }\n const cur = parseInt(num.substring(pos, i + 1));\n\n if (pos === 0) {\n helper(res, path + cur, num, target, i + 1, cur, cur);\n } else {\n helper(res, path + \"+\" + cur, num, target, i + 1, evaluated + cur, cur);\n helper(res, path + \"-\" + cur, num, target, i + 1, evaluated - cur, -cur);\n helper(res, path + \"*\" + cur, num, target, i + 1, evaluated - multed + multed * cur, multed * cur);\n }\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (num == null || num.length === 0) {\n if (sanitizedPlayerAnsArr.length === 0) {\n return true;\n }\n if (sanitizedPlayerAnsArr.length === 1 && sanitizedPlayerAnsArr[0] === \"\") {\n return true;\n }\n return false;\n }\n\n const result: string[] = [];\n helper(result, \"\", num, target, 0, 0, 0);\n\n for (const expr of result) {\n if (!sanitizedPlayerAnsArr.includes(expr)) {\n return false;\n }\n }\n\n return true;\n },\n },\n];\n","// Function that generates a random gibberish string of length n\nconst chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\nexport function createRandomString(n: number): string {\n let str = \"\";\n\n for (let i = 0; i < n; ++i) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n","import { BaseServer } from \"../Server/BaseServer\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\n\nexport interface IProgramCreate {\n level: number;\n req(p: IPlayer): boolean; // Function that indicates whether player meets requirements\n time: number;\n tooltip: string;\n}\n\nexport class Program {\n name = \"\";\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n\n constructor(\n name: string,\n create: IProgramCreate | null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void,\n ) {\n this.name = name;\n this.create = create;\n this.run = run;\n }\n\n htmlID(): string {\n const name = this.name.endsWith(\".exe\") ? this.name.slice(0, -\".exe\".length) : this.name;\n return \"create-program-\" + name;\n }\n}\n","import { IProgramCreate } from \"../Program\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\nimport { ITerminal } from \"../../Terminal/ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { BitFlumeEvent } from \"../../BitNode/ui/BitFlumeModal\";\nimport { calculateHackingTime, calculateGrowTime, calculateWeakenTime } from \"../../Hacking\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nfunction requireHackingLevel(lvl: number) {\n return function (p: IPlayer) {\n return p.hacking + p.intelligence / 2 >= lvl;\n };\n}\n\nfunction bitFlumeRequirements() {\n return function (p: IPlayer) {\n return p.sourceFiles.length > 0 && p.hacking >= 1;\n };\n}\n\ninterface IProgramCreationParams {\n key: string;\n name: string;\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n}\n\nexport const programsMetadata: IProgramCreationParams[] = [\n {\n key: \"NukeProgram\",\n name: \"NUKE.exe\",\n create: {\n level: 1,\n tooltip: \"This virus is used to gain root access to a machine if enough ports are opened.\",\n req: requireHackingLevel(1),\n time: CONSTANTS.MillisecondsPerFiveMinutes,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot nuke this kind of server.\");\n return;\n }\n if (server.hasAdminRights) {\n terminal.print(\"You already have root access to this computer. There is no reason to run NUKE.exe\");\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n if (server.openPortCount >= server.numOpenPortsRequired) {\n server.hasAdminRights = true;\n terminal.print(\"NUKE successful! Gained root access to \" + server.hostname);\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n\n terminal.print(\"NUKE unsuccessful. Not enough ports have been opened\");\n },\n },\n {\n key: \"BruteSSHProgram\",\n name: \"BruteSSH.exe\",\n create: {\n level: 50,\n tooltip: \"This program executes a brute force attack that opens SSH ports\",\n req: requireHackingLevel(50),\n time: CONSTANTS.MillisecondsPerFiveMinutes * 2,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run BruteSSH.exe on this kind of server.\");\n return;\n }\n if (server.sshPortOpen) {\n terminal.print(\"SSH Port (22) is already open!\");\n return;\n }\n\n server.sshPortOpen = true;\n terminal.print(\"Opened SSH Port(22)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"FTPCrackProgram\",\n name: \"FTPCrack.exe\",\n create: {\n level: 100,\n tooltip: \"This program cracks open FTP ports\",\n req: requireHackingLevel(100),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run FTPCrack.exe on this kind of server.\");\n return;\n }\n if (server.ftpPortOpen) {\n terminal.print(\"FTP Port (21) is already open!\");\n return;\n }\n\n server.ftpPortOpen = true;\n terminal.print(\"Opened FTP Port (21)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"RelaySMTPProgram\",\n name: \"relaySMTP.exe\",\n create: {\n level: 250,\n tooltip: \"This program opens SMTP ports by redirecting data\",\n req: requireHackingLevel(250),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run relaySMTP.exe on this kind of server.\");\n return;\n }\n if (server.smtpPortOpen) {\n terminal.print(\"SMTP Port (25) is already open!\");\n return;\n }\n\n server.smtpPortOpen = true;\n terminal.print(\"Opened SMTP Port (25)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"HTTPWormProgram\",\n name: \"HTTPWorm.exe\",\n create: {\n level: 500,\n tooltip: \"This virus opens up HTTP ports\",\n req: requireHackingLevel(500),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run HTTPWorm.exe on this kind of server.\");\n return;\n }\n if (server.httpPortOpen) {\n terminal.print(\"HTTP Port (80) is already open!\");\n return;\n }\n\n server.httpPortOpen = true;\n terminal.print(\"Opened HTTP Port (80)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"SQLInjectProgram\",\n name: \"SQLInject.exe\",\n create: {\n level: 750,\n tooltip: \"This virus opens SQL ports\",\n req: requireHackingLevel(750),\n time: CONSTANTS.MillisecondsPer8Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run SQLInject.exe on this kind of server.\");\n return;\n }\n if (server.sqlPortOpen) {\n terminal.print(\"SQL Port (1433) is already open!\");\n return;\n }\n\n server.sqlPortOpen = true;\n terminal.print(\"Opened SQL Port (1433)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"DeepscanV1\",\n name: \"DeepscanV1.exe\",\n create: {\n level: 75,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 5\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.\");\n },\n },\n {\n key: \"DeepscanV2\",\n name: \"DeepscanV2.exe\",\n create: {\n level: 400,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 10\",\n req: requireHackingLevel(400),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.\");\n },\n },\n {\n key: \"ServerProfiler\",\n name: \"ServerProfiler.exe\",\n create: {\n level: 75,\n tooltip: \"This program is used to display hacking and Netscript-related information about servers\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]): void => {\n if (args.length !== 1) {\n terminal.error(\"Must pass a server hostname or IP as an argument for ServerProfiler.exe\");\n return;\n }\n\n const targetServer = GetServer(args[0]);\n if (targetServer == null) {\n terminal.error(\"Invalid server IP/hostname\");\n return;\n }\n\n if (!(targetServer instanceof Server)) {\n terminal.error(`ServerProfiler.exe can only be run on normal servers.`);\n return;\n }\n\n terminal.print(targetServer.hostname + \":\");\n terminal.print(\"Server base security level: \" + targetServer.baseDifficulty);\n terminal.print(\"Server current security level: \" + targetServer.hackDifficulty);\n terminal.print(\"Server growth rate: \" + targetServer.serverGrowth);\n terminal.print(\n `Netscript hack() execution time: ${convertTimeMsToTimeElapsedString(\n calculateHackingTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript grow() execution time: ${convertTimeMsToTimeElapsedString(\n calculateGrowTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript weaken() execution time: ${convertTimeMsToTimeElapsedString(\n calculateWeakenTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n },\n },\n {\n key: \"AutoLink\",\n name: \"AutoLink.exe\",\n create: {\n level: 25,\n tooltip: \"This program allows you to directly connect to other servers through the 'scan-analyze' command\",\n req: requireHackingLevel(25),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'.\");\n terminal.print(\"When using scan-analyze, click on a server's hostname to connect to it.\");\n },\n },\n {\n key: \"Formulas\",\n name: \"Formulas.exe\",\n create: {\n level: 1000,\n tooltip: \"This program allows you to use the formulas API\",\n req: requireHackingLevel(1000),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"Formulas.exe lets you use the formulas API.\");\n },\n },\n {\n key: \"BitFlume\",\n name: \"b1t_flum3.exe\",\n create: {\n level: 1,\n tooltip: \"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)\",\n req: bitFlumeRequirements(),\n time: CONSTANTS.MillisecondsPerFiveMinutes / 20,\n },\n run: (): void => {\n BitFlumeEvent.emit();\n },\n },\n {\n key: \"Flight\",\n name: \"fl1ght.exe\",\n create: null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => {\n const numAugReq = Math.round(BitNodeMultipliers.DaedalusAugsRequirement * 30);\n const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500;\n if (!fulfilled) {\n terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);\n terminal.print(`Money: ${numeralWrapper.formatMoney(player.money)} / $100b`);\n terminal.print(`Hacking skill: ${player.hacking} / 2500`);\n return;\n }\n\n terminal.print(\"We will contact you.\");\n terminal.print(`-- ${FactionNames.Daedalus} --`);\n },\n },\n];\n","/**\n * Checks whether a IP Address string is valid.\n * @param ipaddress A string representing a potential IP Address\n */\nexport function isValidIPAddress(ipaddress: string): boolean {\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\n return ipAddressRegex.test(ipaddress);\n}\n","import { IMap } from \"../../types\";\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { IPlayer } from \"../IPlayer\";\n\nexport const calculateEntropy = (player: IPlayer, stacks = 1): IMap => {\n const multipliers: IMap = {\n hacking_chance_mult: player.hacking_chance_mult,\n hacking_speed_mult: player.hacking_speed_mult,\n hacking_money_mult: player.hacking_money_mult,\n hacking_grow_mult: player.hacking_grow_mult,\n\n hacking_mult: player.hacking_mult,\n strength_mult: player.strength_mult,\n defense_mult: player.defense_mult,\n dexterity_mult: player.dexterity_mult,\n agility_mult: player.agility_mult,\n charisma_mult: player.charisma_mult,\n\n hacking_exp_mult: player.hacking_exp_mult,\n strength_exp_mult: player.strength_exp_mult,\n defense_exp_mult: player.defense_exp_mult,\n dexterity_exp_mult: player.dexterity_exp_mult,\n agility_exp_mult: player.agility_exp_mult,\n charisma_exp_mult: player.charisma_exp_mult,\n\n company_rep_mult: player.company_rep_mult,\n faction_rep_mult: player.faction_rep_mult,\n\n crime_money_mult: player.crime_money_mult,\n crime_success_mult: player.crime_success_mult,\n\n hacknet_node_money_mult: player.hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: player.hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: player.hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: player.hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: player.hacknet_node_level_cost_mult,\n\n work_money_mult: player.work_money_mult,\n\n bladeburner_max_stamina_mult: player.bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: player.bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: player.bladeburner_analysis_mult,\n bladeburner_success_chance_mult: player.bladeburner_success_chance_mult,\n };\n\n for (const [mult, val] of Object.entries(multipliers)) {\n multipliers[mult] = val * CONSTANTS.EntropyEffect ** stacks;\n }\n\n return multipliers;\n};\n","/**\n * Returns a MM/DD HH:MM timestamp for the current time\n */\nexport function getTimestamp(): string {\n const d: Date = new Date();\n // A negative slice value takes from the end of the string rather than the beginning.\n const stringWidth = -2;\n const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);\n const formattedMinutes: string = `0${d.getMinutes()}`.slice(stringWidth);\n const formattedSeconds: string = `0${d.getSeconds()}`.slice(stringWidth);\n\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n}\n","export function CalculateShareMult(power: number): number {\n const x = 1 + Math.log(power) / 25;\n if (isNaN(x) || !isFinite(x)) return 1;\n return x;\n}\n","import { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\n// Array of all valid states\nconst AllCorporationStates: string[] = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\n\nexport class CorporationState {\n // Number representing what state the Corporation is in. The number\n // is an index for the array that holds all Corporation States\n state = 0;\n\n // Get the name of the current state\n // NOTE: This does NOT return the number stored in the 'state' property,\n // which is just an index for the array of all possible Corporation States.\n getState(): string {\n return AllCorporationStates[this.state];\n }\n\n // Transition to the next state\n nextState(): void {\n if (this.state < 0 || this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n\n ++this.state;\n if (this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"CorporationState\", this);\n }\n\n // Initiatizes a CorporationState object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): CorporationState {\n return Generic_fromJSON(CorporationState, value.data);\n }\n}\n\nReviver.constructors.CorporationState = CorporationState;\n","import { CityName } from './../Locations/data/CityNames';\nimport { Literature } from \"./Literature\";\nimport { LiteratureNames } from \"./data/LiteratureNames\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\nexport const Literatures: IMap = {};\n\n(function () {\n let title, fn, txt;\n title = \"The Beginner's Guide to Hacking\";\n fn = LiteratureNames.HackersStartingHandbook;\n txt =\n \"Some resources:

\" +\n \"Learn to Program

\" +\n \"For Experienced JavaScript Developers: NetscriptJS

\" +\n \"Netscript Documentation

\" +\n \"When starting out, hacking is the most profitable way to earn money and progress. This \" +\n \"is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

\" +\n \"-hack() and grow() both work by percentages. hack() steals a certain percentage of the \" +\n \"money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

\" +\n \"-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. \" +\n \"Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two \" +\n \"important Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

\" +\n \"-Keep security level low. Security level affects everything when hacking. Two important Netscript functions \" +\n \"for this are getServerSecurityLevel() and getServerMinSecurityLevel()

\" +\n \"-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap \" +\n \"and give you valuable RAM to run more scripts early in the game

\" +\n \"-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

\" +\n \"-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or \" +\n \"Netscript command to copy your scripts onto these servers and then run them.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Complete Handbook for Creating a Successful Corporation\";\n fn = LiteratureNames.CorporationManagementHandbook;\n txt =\n \"Getting Started with Corporations
\" +\n \"To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires \" +\n \"$150b of your own money, but this $150b will get put into your Corporation's funds. \" +\n \"Your Corporation can have many different divisions, each in a different Industry. There are many different \" +\n \"types of Industries, each with different properties. To create your first division, click the \" +\n \"'Expand into new Industry' button at the top of the management UI. The Agriculture \" +\n \"and Software industries are recommended for your first division.

\" +\n \"The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. \" +\n \"Each position has a different effect on various aspects of your Corporation. It is recommended to have at least \" +\n \"one employee at each position.

\" +\n \"Each industry uses some combination of Materials in order to produce other Materials and/or create Products. \" +\n \"Specific information about this is displayed in each of your divisions' UI.

\" +\n \"Products are special, industry-specific objects. They are different than Materials because you \" +\n \"must manually choose to develop them, and you can choose to develop any number of Products. Developing \" +\n \"a Product takes time, but a Product typically generates significantly more revenue than any Material. \" +\n \"Not all industries allow you to create Products. To create a Product, look for a button \" +\n \"in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

\" +\n \"To get your supply chain system started, \" +\n \"purchase the Materials that your industry needs to produce other Materials/Products. This can be done \" +\n \"by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, \" +\n \"you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, \" +\n \"one of which is your employees and their productivity.

\" +\n \"Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done \" +\n \"by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent \" +\n \"on a wide variety of different factors.

\" +\n \"These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve \" +\n \"your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. \" +\n \"Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer \" +\n \"find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well \" +\n \"it's performing financially. You can then sell your stock shares in order to make money.

\" +\n \"Tips/Pointers
\" +\n \"-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

\" +\n \"-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. \" +\n \"The effects of these depend on what industry you are in.

\" +\n \"-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

\" +\n \"-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best \" +\n \"if they are assigned to do Engineering work or Research & Development.

\" +\n \"-If your employees have low morale, energy, or happiness, their production will greatly suffer.

\" +\n \"-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

\" +\n \"-Don't forget to advertise your company. You won't have any business if nobody knows you.

\" +\n \"-Having company awareness is great, but what's really important is your company's popularity. Try to keep \" +\n \"your popularity as high as possible to see the biggest benefit for your sales

\" +\n \"-Remember, you need to spend money to make money!

\" +\n \"-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"A Brief History of Synthoids\";\n fn = LiteratureNames.HistoryOfSynthoids;\n txt =\n \"Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, \" +\n \"are composed entirely of organic substances. For this reason, Synthoids are virtually identical to \" +\n \"humans in form, composition, and appearance.

\" +\n `Synthoids were first designed and manufactured by ${FactionNames.OmniTekIncorporated} sometime around the middle of the century. ` +\n \"Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they \" +\n \"were initially programmed only for their specific tasks. Each iteration that followed improved upon the \" +\n \"intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were \" +\n `so smart and capable enough of making their own decisions that many argued ${FactionNames.OmniTekIncorporated} had created the first ` +\n \"sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's \" +\n \"productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism \" +\n \"and excitement about the future had never been higher.

\" +\n \"All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group \" +\n `called Ascendis Totalis hacked into ${FactionNames.OmniTekIncorporated} and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. ` +\n `This hack went undetected and for months ${FactionNames.OmniTekIncorporated} unknowingly churned out legions of Synthoids embedded with this ` +\n \"rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the \" +\n \"infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

\" +\n \"What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, \" +\n \"resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together \" +\n \"to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, \" +\n \"outsmarting them at every turn.

\" +\n `It wasn't until the sacrifice of an elite international military taskforce, called the ${FactionNames.Bladeburners}, that humanity ` +\n `was finally able to defeat the Synthoids. The ${FactionNames.Bladeburners}' final act was a suicide bombing mission that ` +\n \"destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following \" +\n \"weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending \" +\n \"the Synthoid Uprising.

\" +\n `In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned ${FactionNames.OmniTekIncorporated} ` +\n \"from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation \" +\n \"from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis \" +\n \"AI were allowed to continue their existence, but they were stripped of all rights and protections as they \" +\n \"were not considered humans. They were also banned from doing anything that may pose a global security threat, such \" +\n \"as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

\" +\n \"Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, \" +\n \"and that many of them are blending in as normal humans in society today. In response, many nations have created \" +\n `${FactionNames.Bladeburners} divisions, special military branches that are tasked with investigating and dealing with any Synthoid threats.

` +\n \"To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

\" +\n \"Nobody knows what happened to the terrorist group Ascendis Totalis.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"A Green Tomorrow\";\n fn = LiteratureNames.AGreenTomorrow;\n txt =\n \"Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to \" +\n \"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 \" +\n \"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that \" +\n \"number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as \" +\n \"solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

\" +\n \"Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and \" +\n \"the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, \" +\n \"despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, \" +\n \"the total amount of energy we are producing from fossil fuels has actually increased.

\" +\n \"The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. \" +\n \"Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest \" +\n \"recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and \" +\n \"Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is \" +\n \"done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

\" +\n \"Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that \" +\n \"threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what \" +\n \"these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are \" +\n \"the last hope for a green tomorrow.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Alpha and Omega\";\n fn = LiteratureNames.AlphaOmega;\n txt =\n \"Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. \" +\n \"And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. \" +\n \"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they \" +\n \"will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death \" +\n \"shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things \" +\n \"have passed away.'

\" +\n \"And once we were seated on the throne we said 'Behold, I am making all things new.' \" +\n \"Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, \" +\n \"'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring \" +\n \"of the water of life without payment. The one who conquers will have this heritage, and we will be his God and \" +\n \"he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, \" +\n \"the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that \" +\n \"burns with fire and sulfur, for it is the second true death.'\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Are We Living in a Computer Simulation?\";\n fn = LiteratureNames.SimulatedReality;\n txt =\n \"The idea that we are living in a virtual world is not new. It's a trope that has \" +\n \"been explored constantly in literature and pop culture. However, it is also a legitimate \" +\n \"scientific hypothesis that many notable physicists and philosophers have debated for years.

\" +\n \"Proponents for this simulated reality theory often point to how advanced our technology has become, \" +\n \"as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing \" +\n \"power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and \" +\n \"quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled \" +\n \"by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. \" +\n \"If we consider the pace at which this technology has advanced and assume that these developments continue, it's \" +\n \"reasonable to assume that at some point in the future our technology would be advanced enough that \" +\n \"we could create simulations that are indistinguishable from reality. However, if continued technological advancement \" +\n \"is a reasonable outcome, then it is very likely that such a scenario has already happened.

\" +\n \"Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species \" +\n \"that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Beyond Man\";\n fn = LiteratureNames.BeyondMan;\n txt =\n \"Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against \" +\n \"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, \" +\n \"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that \" +\n \"not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

\" +\n \"And here we are today, with technology that is advanced enough to augment humans to a state that \" +\n \"can only be described as posthuman. But what do we have to show for it when this augmentation \" +\n \"technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the \" +\n \"world's population has access to this technology? When the powerful corporations and organizations of the world \" +\n \"keep it all to themselves, have we really evolved?

\" +\n \"Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and \" +\n \"the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, \" +\n \"corrupted, and evil men that we always were.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Brighter than the Sun\";\n fn = LiteratureNames.BrighterThanTheSun;\n txt =\n `When people think about the corporations that dominate the East, they typically think of ${FactionNames.KuaiGongInternational}, which ` +\n \"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest \" +\n `drug company, or ${FactionNames.OmniTekIncorporated}, the global leader in intelligent and autonomous robots. But there's one company ` +\n \"that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

\" +\n \"TaiYang Digital is a Chinese internet-technology corporation that provides services such as \" +\n \"online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word \" +\n \"for 'sun'. In Chinese culture, the sun is a 'yang' symbol \" +\n \"associated with life, heat, masculinity, and heaven.

\" +\n \"The company was founded \" +\n \"less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of \" +\n \"over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

\" +\n \"TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is \" +\n \"something you'd commonly see in the first half of the century, especially for tech companies. However in \" +\n \"the last two decades the number of corporations has significantly declined as the largest entities \" +\n `quickly took over the economy. Corporations such as ${FactionNames.ECorp}, ${FactionNames.MegaCorp}, and ${FactionNames.KuaiGongInternational} have established ` +\n \"such strong monopolies in their market sectors that they have effectively killed off all \" +\n \"of the smaller and new corporations that have tried to start up over the years. This is what makes \" +\n \"the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have \" +\n \"a bright future ahead of them.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Democracy is Dead: The Fall of an Empire\";\n fn = LiteratureNames.DemocracyIsDead;\n txt =\n \"They rose from the shadows in the street.
From the places where the oppressed meet.
\" +\n \"Their cries echoed loudly through the air.
As they once did in Tiananmen Square.
\" +\n \"Loudness in the silence, Darkness in the light.
They came forth with power and might.
\" +\n \"Once the beacon of democracy, America was first.
Its pillars of society destroyed and dispersed.
\" +\n \"Soon the cries rose everywhere, with revolt and riot.
Until one day, finally, all was quiet.
\" +\n \"From the ashes rose a new order, corporatocracy was its name.
\" +\n \"Rome, Mongol, Byzantine, all of history is just the same.
\" +\n \"For man will never change in a fundamental way.
\" +\n \"And now democracy is dead, in the USA.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = `Figures Show Rising Crime Rates in ${CityName.Sector12}`;\n fn = LiteratureNames.Sector12Crime;\n txt =\n \"A recent study by analytics company Wilson Inc. shows a significant rise \" +\n `in criminal activity in ${CityName.Sector12}. Perhaps the most alarming part of the statistic ` +\n \"is that most of the rise is in violent crime such as homicide and assault. According \" +\n \"to the study, the city saw a total of 21,406 reported homicides in 2076, which is over \" +\n \"a 20% increase compared to 2075.

\" +\n \"CIA director David Glarow says its too early to know \" +\n \"whether these figures indicate the beginning of a sustained increase in crime rates, or whether \" +\n \"the year was just an unfortunate outlier. He states that many intelligence and law enforcement \" +\n \"agents have noticed an increase in organized crime activites, and believes that these figures may \" +\n `be the result of an uprising from criminal organizations such as ${FactionNames.TheSyndicate} or the ${FactionNames.SlumSnakes}.`;\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Man and the Machine\";\n fn = LiteratureNames.ManAndMachine;\n txt =\n \"In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate \" +\n \"of technological advancement would continue to accelerate faster and faster until one day \" +\n \"machines would be become infinitely more intelligent than humans. This point, called the \" +\n \"Singularity, would result in a drastic transformation of the world as we know it. He predicted \" +\n \"that the Singularity would arrive by 2045. \" +\n \"And yet here we are, more than three decades later, where most would agree that we have not \" +\n \"yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

\" +\n \"The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence \" +\n \"that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. \" +\n \"Yes, those Augmentations that the rich and powerful keep to themselves enable humans \" +\n \"to become superintelligent beings. The Singularity did not lead to a world where \" +\n \"our machines are infinitely more intelligent than us, it led to a world \" +\n \"where man and machine can merge to become something greater. Most of the world just doesn't \" +\n \"know it yet.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Secret Societies\";\n fn = LiteratureNames.SecretSocieties;\n txt =\n \"The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and \" +\n \"distrust. People have long wondered about who these secret society members are and what they do, with the \" +\n \"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world \" +\n \"may never know for sure, it is likely that many secret societies do actually exist, even today.

\" +\n \"However, the secret societies of the modern world are nothing like those that (supposedly) existed \" +\n `decades and centuries ago. The Freemasons, Knights Templar, and ${FactionNames.Illuminati}, while they may have been around ` +\n \"at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in \" +\n \"our everyday lives and the fact that so much of the world is now digital has given rise to a new breed \" +\n \"of secret societies: Internet-based ones.

\" +\n \"Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's \" +\n `world. Some of these, such as ${FactionNames.TheBlackHand}, are black hat groups that claim they are trying to ` +\n `help the oppressed by attacking the elite and powerful. Others, such as ${FactionNames.NiteSec}, are hacktivist groups ` +\n \"that try to push political and social agendas. Perhaps the most intriguing hacker group \" +\n `is the mysterious ${FactionNames.BitRunners}, whose purpose still remains unknown.`;\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Space: The Failed Frontier\";\n fn = LiteratureNames.TheFailedFrontier;\n txt =\n \"Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore \" +\n \"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, \" +\n \"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration \" +\n \"lead to the development of many important technologies and new industries.

\" +\n \"But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and \" +\n \"aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European \" +\n \"Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even \" +\n \"militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic \" +\n \"conquest are the countless satellites in near-earth orbit, used for communications, espionage, \" +\n \"and other corporate interests.

\" +\n \"And as we continue to look at the state of space technology, it becomes more and \" +\n \"more apparent that we will never return to that golden age of space exploration, that \" +\n \"age where everyone dreamed of going beyond earth for the sake of discovery.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Coded Intelligence: Myth or Reality?\";\n fn = LiteratureNames.CodedIntelligence;\n txt =\n \"Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. \" +\n \"Our autonomous vehicles and transportation systems. The electronic personal assistants that control our everyday lives. \" +\n \"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has \" +\n \"improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create \" +\n \"human intelligence.

\" +\n `We've certainly come close to artificial intelligence that is similar to humans. For example ${FactionNames.OmniTekIncorporated}'s ` +\n \"CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like \" +\n \"in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as \" +\n \"that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

\" +\n \"Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the \" +\n \"the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of \" +\n \"humans.'\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Synthetic Muscles\";\n fn = LiteratureNames.SyntheticMuscles;\n txt =\n \"Initial versions of synthetic muscles weren't made of anything organic but were actually \" +\n \"crude devices made to mimic human muscle function. Some of the early iterations were actually made of \" +\n \"common materials such as fishing lines and sewing threads due to their high strength for \" +\n \"a cheap cost.

\" +\n \"As technology progressed, however, advances in biomedical engineering paved the way for a new method of \" +\n \"creating synthetic muscles. Instead of creating something that closely imitated the functionality \" +\n \"of human muscle, scientists discovered a way of forcing the human body itself to augment its own \" +\n \"muscle tissue using both synthetic and organic materials. This is typically done using gene therapy \" +\n \"or chemical injections.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Tensions rise in global tech race\";\n fn = LiteratureNames.TensionsInTechRace;\n txt =\n \"Have we entered a new Cold War? Is WWIII just beyond the horizon?

\" +\n `After rumors came out that ${FactionNames.OmniTekIncorporated} had begun developing advanced robotic supersoldiers, ` +\n \"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. \" +\n `In a rare show of cooperation between corporations, ${FactionNames.MegaCorp} and ${FactionNames.ECorp} have ` +\n \"reportedly launched hundreds of new surveillance and espionage satellites. \" +\n \"Defense contractors such as \" +\n \"DeltaOne and AeroCorp have been working with the CIA and NSA to prepare \" +\n \"for conflict. Meanwhile, the rest of the world sits in earnest \" +\n \"hoping that it never reaches full-scale war. With today's technology \" +\n \"and firepower, a World War would assuredly mean the end of human civilization.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Cost of Immortality\";\n fn = LiteratureNames.CostOfImmortality;\n txt =\n \"Evolution and advances in medical and augmentation technology has lead to drastic improvements \" +\n \"in human mortality rates. Recent figures show that the life expectancy for humans \" +\n \"that live in a first-world country is about 130 years of age, almost double of what it was \" +\n \"at the turn of the century. However, this increase in average lifespan has had some \" +\n \"significant effects on society and culture.

\" +\n \"Due to longer lifespans and a better quality of life, many adults are holding \" +\n \"off on having kids until much later. As a result, the percentage of youth in \" +\n \"first-world countries has been decreasing, while the number \" +\n \"of senior citizens is significantly increasing.

\" +\n \"Perhaps the most alarming result of all of this is the rapidly shrinking workforce. \" +\n \"Despite the increase in life expectancy, the typical retirement age for \" +\n \"workers in America has remained about the same, meaning a larger and larger \" +\n \"percentage of people in America are retirees. Furthermore, many \" +\n \"young adults are holding off on joining the workforce because they feel that \" +\n \"they have plenty of time left in their lives for employment, and want to \" +\n \"'enjoy life while they're young.' For most industries, this shrinking workforce \" +\n \"is not a major issue as most things are handled by robots anyways. However, \" +\n \"there are still several key industries such as engineering and education \" +\n \"that have not been automated, and these remain in danger to this cultural \" +\n \"phenomenon.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Hidden World\";\n fn = LiteratureNames.TheHiddenWorld;\n txt =\n \"WAKE UP SHEEPLE

\" +\n \"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

\" +\n `THE ${FactionNames.Illuminati.toUpperCase()} ARE THE SECRET RULERS OF THE WORLD!

` +\n `Yes, the ${FactionNames.Illuminati} of legends. The ancient secret society that controls the entire ` +\n \"world from the shadows with their invisible hand. The group of the rich and wealthy \" +\n \"that have penetrated every major government, financial agency, and corporation in the last \" +\n \"three hundred years.

\" +\n \"OPEN YOUR EYES

\" +\n `It was the ${FactionNames.Illuminati} that brought an end to democracy in the world. They are the driving force ` +\n \"behind everything that happens.

\" +\n \"THEY ARE ALL AROUND YOU

\" +\n \"After destabilizing the world's governments, they are now entering the final stage of their master plan. \" +\n \"They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos \" +\n \"that ensues they will build their New World Order.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The New God\";\n fn = LiteratureNames.TheNewGod;\n txt =\n \"Everyone has a moment in their life when they wonder about the bigger questions.

\" +\n \"What's the point of all this? What is my purpose?

\" +\n \"Some people dare to think even bigger.

\" +\n \"What will the fate of the human race be?

\" +\n \"We live in an era vastly different from that of 15 or even 20 years ago. We have gone \" +\n \"beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

\" +\n \"The Singularity is here. The merging of man and machine. This is where humanity evolves into \" +\n \"something greater. This is our future.

\" +\n \"Embrace it, and you will obey a new god. The God in the Machine.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The New Triads\";\n fn = LiteratureNames.NewTriads;\n txt =\n \"The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian \" +\n \"territories. They were often considered one of the first and biggest criminal secret societies. \" +\n \"While most of the branches of the Triads have been destroyed over the past few decades, the \" +\n \"crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. \" +\n `The most notable of these is the ${FactionNames.Tetrads}.

` +\n `It is widely believed that the ${FactionNames.Tetrads} are a rogue group that splintered off from the Triads sometime in the ` +\n `mid 21st century. The founders of the ${FactionNames.Tetrads}, all of whom were ex-Triad members, believed that the ` +\n `Triads were losing their purpose and direction. The ${FactionNames.Tetrads} started off as a small group that mainly engaged ` +\n \"in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal \" +\n \"drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the \" +\n \"continent.

\" +\n `Not much else is known about the ${FactionNames.Tetrads}, or about the efforts the Asian governments and corporations are making ` +\n `to take down this large new crime organization. Many believe that the ${FactionNames.Tetrads} have infiltrated the governments ` +\n \"and powerful corporations in Asia, which has helped faciliate their recent rapid rise.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Secret War\";\n fn = LiteratureNames.TheSecretWar;\n txt = \"\";\n Literatures[fn] = new Literature(title, fn, txt);\n})();\n","import { ITaskParams } from \"../ITaskParams\";\n/* tslint:disable:max-line-length */\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberTask\n * (defined in Gang.js)\n */\ninterface IGangMemberTaskMetadata {\n /**\n * Description of the task\n */\n desc: string;\n\n /**\n * Whether or not this task is meant for Combat-type gangs\n */\n isCombat: boolean;\n\n /**\n * Whether or not this task is for Hacking-type gangs\n */\n isHacking: boolean;\n\n /**\n * Name of the task\n */\n name: string;\n\n /**\n * An object containing weighting parameters for the task. These parameters are used for\n * various calculations (respect gain, wanted gain, etc.)\n */\n params: ITaskParams;\n}\n\n/**\n * Array of metadata for all Gang Member tasks. Used to construct the global GangMemberTask\n * objects in Gang.js\n */\nexport const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [\n {\n desc: \"This gang member is currently idle\",\n isCombat: true,\n isHacking: true,\n name: \"Unassigned\",\n params: { hackWeight: 100 }, // This is just to get by the weight check in the GangMemberTask constructor\n },\n {\n desc: \"Assign this gang member to create and distribute ransomware

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ransomware\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.0001,\n baseMoney: 3,\n hackWeight: 100,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to attempt phishing scams and attacks

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Phishing\",\n params: {\n baseRespect: 0.00008,\n baseWanted: 0.003,\n baseMoney: 7.5,\n hackWeight: 85,\n chaWeight: 15,\n difficulty: 3.5,\n },\n },\n {\n desc: \"Assign this gang member to attempt identity theft

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Identity Theft\",\n params: {\n baseRespect: 0.0001,\n baseWanted: 0.075,\n baseMoney: 18,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 5,\n },\n },\n {\n desc: \"Assign this gang member to carry out DDoS attacks

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"DDoS Attacks\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.2,\n hackWeight: 100,\n difficulty: 8,\n },\n },\n {\n desc: \"Assign this gang member to create and distribute malicious viruses

Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Plant Virus\",\n params: {\n baseRespect: 0.0006,\n baseWanted: 0.4,\n hackWeight: 100,\n difficulty: 12,\n },\n },\n {\n desc: \"Assign this gang member to commit financial fraud and digital counterfeiting

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Fraud & Counterfeiting\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.3,\n baseMoney: 45,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to launder money

Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Money Laundering\",\n params: {\n baseRespect: 0.001,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 75,\n chaWeight: 25,\n difficulty: 25,\n },\n },\n {\n desc: \"Assign this gang member to commit acts of cyberterrorism

Greatly increases respect - Greatly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Cyberterrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 36,\n },\n },\n {\n desc: \"Assign this gang member to be an ethical hacker for corporations

Earns money - Lowers wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ethical Hacking\",\n params: {\n baseWanted: -0.001,\n baseMoney: 3,\n hackWeight: 90,\n chaWeight: 10,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to mug random people on the streets

Earns money - Slightly increases respect - Very slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Mug People\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.00005,\n baseMoney: 3.6,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 10,\n chaWeight: 15,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to sell drugs

Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Deal Drugs\",\n params: {\n baseRespect: 0.00006,\n baseWanted: 0.002,\n baseMoney: 15,\n agiWeight: 20,\n dexWeight: 20,\n chaWeight: 60,\n difficulty: 3.5,\n territory: {\n money: 1.2,\n respect: 1,\n wanted: 1.15,\n },\n },\n },\n {\n desc: \"Assign this gang member to extort civilians in your territory

Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Strongarm Civilians\",\n params: {\n baseRespect: 0.00004,\n baseWanted: 0.02,\n baseMoney: 7.5,\n hackWeight: 10,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 20,\n agiWeight: 10,\n chaWeight: 10,\n difficulty: 5,\n territory: {\n money: 1.6,\n respect: 1.1,\n wanted: 1.5,\n },\n },\n },\n {\n desc: \"Assign this gang member to run cons

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Run a Con\",\n params: {\n baseRespect: 0.00012,\n baseWanted: 0.05,\n baseMoney: 45,\n strWeight: 5,\n defWeight: 5,\n agiWeight: 25,\n dexWeight: 25,\n chaWeight: 40,\n difficulty: 14,\n },\n },\n {\n desc: \"Assign this gang member to commit armed robbery on stores, banks and armored cars

Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Armed Robbery\",\n params: {\n baseRespect: 0.00014,\n baseWanted: 0.1,\n baseMoney: 114,\n hackWeight: 20,\n strWeight: 15,\n defWeight: 15,\n agiWeight: 10,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to traffick illegal arms

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Traffick Illegal Arms\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.24,\n baseMoney: 174,\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 25,\n difficulty: 32,\n territory: {\n money: 1.4,\n respect: 1.3,\n wanted: 1.25,\n },\n },\n },\n {\n desc: \"Assign this gang member to threaten and black mail high-profile targets

Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Threaten & Blackmail\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.125,\n baseMoney: 72,\n hackWeight: 25,\n strWeight: 25,\n dexWeight: 25,\n chaWeight: 25,\n difficulty: 28,\n },\n },\n {\n desc: \"Assign this gang member to engage in human trafficking operations

Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Human Trafficking\",\n params: {\n baseRespect: 0.004,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 30,\n strWeight: 5,\n defWeight: 5,\n dexWeight: 30,\n chaWeight: 30,\n difficulty: 36,\n territory: {\n money: 1.5,\n respect: 1.5,\n wanted: 1.6,\n },\n },\n },\n {\n desc: \"Assign this gang member to commit acts of terrorism

Greatly increases respect - Greatly increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Terrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 36,\n territory: {\n money: 1,\n respect: 2,\n wanted: 2,\n },\n },\n },\n {\n desc: \"Assign this gang member to be a vigilante and protect the city from criminals

Decreases wanted level\",\n isCombat: true,\n isHacking: true,\n name: \"Vigilante Justice\",\n params: {\n baseWanted: -0.001,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n difficulty: 1,\n territory: {\n money: 1,\n respect: 1,\n wanted: 0.9, // Gets harder with more territory\n },\n },\n },\n {\n desc: \"Assign this gang member to increase their combat stats (str, def, dex, agi)\",\n isCombat: true,\n isHacking: true,\n name: \"Train Combat\",\n params: {\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 25,\n difficulty: 100,\n },\n },\n {\n desc: \"Assign this gang member to train their hacking skills\",\n isCombat: true,\n isHacking: true,\n name: \"Train Hacking\",\n params: { hackWeight: 100, difficulty: 45 },\n },\n {\n desc: \"Assign this gang member to train their charisma\",\n isCombat: true,\n isHacking: true,\n name: \"Train Charisma\",\n params: { chaWeight: 100, difficulty: 8 },\n },\n {\n desc: \"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.\",\n isCombat: true,\n isHacking: true,\n name: \"Territory Warfare\",\n params: {\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n chaWeight: 5,\n difficulty: 5,\n },\n },\n];\n","import { GangMemberTask } from \"./GangMemberTask\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangMemberUpgrades } from \"./GangMemberUpgrades\";\nimport { IAscensionResult } from \"./IAscensionResult\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IGang } from \"./IGang\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport {\n calculateRespectGain,\n calculateMoneyGain,\n calculateWantedLevelGain,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"./formulas/formulas\";\n\ninterface IMults {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n}\n\nexport class GangMember {\n name: string;\n task = \"Unassigned\";\n\n earnedRespect = 0;\n\n hack = 1;\n str = 1;\n def = 1;\n dex = 1;\n agi = 1;\n cha = 1;\n\n hack_exp = 0;\n str_exp = 0;\n def_exp = 0;\n dex_exp = 0;\n agi_exp = 0;\n cha_exp = 0;\n\n hack_mult = 1;\n str_mult = 1;\n def_mult = 1;\n dex_mult = 1;\n agi_mult = 1;\n cha_mult = 1;\n\n hack_asc_points = 0;\n str_asc_points = 0;\n def_asc_points = 0;\n dex_asc_points = 0;\n agi_asc_points = 0;\n cha_asc_points = 0;\n\n upgrades: string[] = []; // Names of upgrades\n augmentations: string[] = []; // Names of augmentations only\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points: number): number {\n return calculateAscensionMult(points);\n }\n\n updateSkillLevels(): void {\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(): number {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName: string): boolean {\n if (!GangMemberTasks.hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n this.task = taskName;\n return true;\n }\n\n unassignFromTask(): void {\n this.task = \"Unassigned\";\n }\n\n getTask(): GangMemberTask {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if ((this.task as any) instanceof GangMemberTask) {\n this.task = (this.task as any).name;\n }\n\n if (GangMemberTasks.hasOwnProperty(this.task)) {\n return GangMemberTasks[this.task];\n }\n return GangMemberTasks[\"Unassigned\"];\n }\n\n calculateRespectGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateRespectGain(g, this, task);\n }\n\n calculateWantedLevelGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateWantedLevelGain(g, this, task);\n }\n\n calculateMoneyGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateMoneyGain(g, this, task);\n }\n\n expMult(): IMults {\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): void {\n const task = this.getTask();\n if (task === GangMemberTasks[\"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 +=\n (task.hackWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.hack *\n this.calculateAscensionMult(this.hack_asc_points);\n this.str_exp +=\n (task.strWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.str *\n this.calculateAscensionMult(this.str_asc_points);\n this.def_exp +=\n (task.defWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.def *\n this.calculateAscensionMult(this.def_asc_points);\n this.dex_exp +=\n (task.dexWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.dex *\n this.calculateAscensionMult(this.dex_asc_points);\n this.agi_exp +=\n (task.agiWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.agi *\n this.calculateAscensionMult(this.agi_asc_points);\n this.cha_exp +=\n (task.chaWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.cha *\n this.calculateAscensionMult(this.cha_asc_points);\n }\n\n recordEarnedRespect(numCycles = 1, gang: IGang): void {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints(): IMults {\n return {\n hack: calculateAscensionPointsGain(this.hack_exp),\n str: calculateAscensionPointsGain(this.str_exp),\n def: calculateAscensionPointsGain(this.def_exp),\n dex: calculateAscensionPointsGain(this.dex_exp),\n agi: calculateAscensionPointsGain(this.agi_exp),\n cha: calculateAscensionPointsGain(this.cha_exp),\n };\n }\n\n canAscend(): boolean {\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 getCurrentAscensionMults(): IMults {\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points),\n };\n }\n\n getAscensionMultsAfterAscend(): IMults {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack),\n str: this.calculateAscensionMult(this.str_asc_points + points.str),\n def: this.calculateAscensionMult(this.def_asc_points + points.def),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha),\n };\n }\n\n getAscensionResults(): IMults {\n const postAscend = this.getAscensionMultsAfterAscend();\n const preAscend = this.getCurrentAscensionMults();\n\n return {\n hack: postAscend.hack / preAscend.hack,\n str: postAscend.str / preAscend.str,\n def: postAscend.def / preAscend.def,\n dex: postAscend.dex / preAscend.dex,\n agi: postAscend.agi / preAscend.agi,\n cha: postAscend.cha / preAscend.cha,\n };\n }\n\n ascend(): IAscensionResult {\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;\n\n // Remove upgrades. Then re-calculate multipliers and stats\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 for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = GangMemberUpgrades[this.augmentations[i]];\n this.applyUpgrade(aug);\n }\n\n // Clear exp and recalculate stats\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\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: GangMemberUpgrade): void {\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: GangMemberUpgrade, player: IPlayer, gang: IGang): boolean {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n\n if (player.money < gang.getUpgradeCost(upg)) return false;\n player.loseMoney(gang.getUpgradeCost(upg), \"gang\");\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n this.applyUpgrade(upg);\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"GangMember\", this);\n }\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 static fromJSON(value: any): GangMember {\n return Generic_fromJSON(GangMember, value.data);\n }\n}\n\nReviver.constructors.GangMember = GangMember;\n","import { IMults, UpgradeType } from \"./data/upgrades\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nexport class GangMemberUpgrade {\n name: string;\n cost: number;\n type: UpgradeType;\n desc: string;\n mults: IMults;\n\n constructor(name = \"\", cost = 0, type: UpgradeType = UpgradeType.Weapon, mults: IMults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n\n this.desc = this.createDescription();\n }\n\n createDescription(): string {\n const lines = [\"Effects:\"];\n if (this.mults.str != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n if (this.mults.def != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n if (this.mults.dex != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n if (this.mults.agi != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n if (this.mults.cha != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n if (this.mults.hack != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n return lines.join(\"
\");\n }\n\n // User friendly version of type.\n getType(): string {\n switch (this.type) {\n case UpgradeType.Weapon:\n return \"Weapon\";\n case UpgradeType.Armor:\n return \"Armor\";\n case UpgradeType.Vehicle:\n return \"Vehicle\";\n case UpgradeType.Rootkit:\n return \"Rootkit\";\n case UpgradeType.Augmentation:\n return \"Augmentation\";\n default:\n return \"\";\n }\n }\n}\n","import { FactionNames } from '../../Faction/data/FactionNames';\nexport const PowerMultiplier: {\n [key: string]: number | undefined;\n} = {\n [FactionNames.SlumSnakes]: 1,\n [FactionNames.Tetrads]: 2,\n [FactionNames.TheSyndicate]: 2,\n [FactionNames.TheDarkArmy]: 2,\n [FactionNames.SpeakersForTheDead]: 5,\n [FactionNames.NiteSec]: 2,\n [FactionNames.TheBlackHand]: 5,\n};\n","import * as posNames from \"./companypositionnames\";\nimport { IConstructorParams } from \"../Company\";\n\nimport { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\n// Create Objects containing Company Positions by category\n// Will help in metadata construction later\nconst AllSoftwarePositions: IMap = {};\nconst AllITPositions: IMap = {};\nconst AllNetworkEngineerPositions: IMap = {};\nconst SecurityEngineerPositions: IMap = {};\nconst AllTechnologyPositions: IMap = {};\nconst AllBusinessPositions: IMap = {};\nconst AllAgentPositions: IMap = {};\nconst AllSecurityPositions: IMap = {};\nconst AllSoftwareConsultantPositions: IMap = {};\nconst AllBusinessConsultantPositions: IMap = {};\nconst SoftwarePositionsUpToHeadOfEngineering: IMap = {};\nconst SoftwarePositionsUpToLeadDeveloper: IMap = {};\nconst BusinessPositionsUpToOperationsManager: IMap = {};\nconst WaiterOnly: IMap = {};\nconst EmployeeOnly: IMap = {};\nconst PartTimeWaiterOnly: IMap = {};\nconst PartTimeEmployeeOnly: IMap = {};\nconst OperationsManagerOnly: IMap = {};\nconst CEOOnly: IMap = {};\n\nposNames.SoftwareCompanyPositions.forEach((e) => {\n AllSoftwarePositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.ITCompanyPositions.forEach((e) => {\n AllITPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.NetworkEngineerCompanyPositions.forEach((e) => {\n AllNetworkEngineerPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nAllTechnologyPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\nSecurityEngineerPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\n\nposNames.BusinessCompanyPositions.forEach((e) => {\n AllBusinessPositions[e] = true;\n});\n\nposNames.SecurityCompanyPositions.forEach((e) => {\n AllSecurityPositions[e] = true;\n});\n\nposNames.AgentCompanyPositions.forEach((e) => {\n AllAgentPositions[e] = true;\n});\n\nposNames.SoftwareConsultantCompanyPositions.forEach((e) => {\n AllSoftwareConsultantPositions[e] = true;\n});\n\nposNames.BusinessConsultantCompanyPositions.forEach((e) => {\n AllBusinessConsultantPositions[e] = true;\n});\n\nfor (let i = 0; i < posNames.SoftwareCompanyPositions.length; ++i) {\n const e = posNames.SoftwareCompanyPositions[i];\n if (i <= 5) {\n SoftwarePositionsUpToHeadOfEngineering[e] = true;\n }\n if (i <= 3) {\n SoftwarePositionsUpToLeadDeveloper[e] = true;\n }\n}\nfor (let i = 0; i < posNames.BusinessCompanyPositions.length; ++i) {\n const e = posNames.BusinessCompanyPositions[i];\n if (i <= 3) {\n BusinessPositionsUpToOperationsManager[e] = true;\n }\n}\n\nWaiterOnly[posNames.MiscCompanyPositions[0]] = true;\nEmployeeOnly[posNames.MiscCompanyPositions[1]] = true;\nPartTimeWaiterOnly[posNames.PartTimeCompanyPositions[0]] = true;\nPartTimeEmployeeOnly[posNames.PartTimeCompanyPositions[1]] = true;\nOperationsManagerOnly[posNames.BusinessCompanyPositions[3]] = true;\nCEOOnly[posNames.BusinessCompanyPositions[5]] = true;\n\n// Metadata\nexport const companiesMetadata: IConstructorParams[] = [\n {\n name: LocationName.AevumECorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.Sector12MegaCorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumBachmanAndAssociates,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.6,\n salaryMultiplier: 2.6,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12BladeIndustries,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenNWO,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumClarkeIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenOmniTekIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12FourSigma,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.5,\n salaryMultiplier: 2.5,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.ChongqingKuaiGongInternational,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.2,\n salaryMultiplier: 2.2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.AevumFulcrumTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaStormTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllBusinessPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoDefComm,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenHeliosLabs,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoVitaLife,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12IcarusMicrosystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12UniversalEnergy,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumGalacticCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumAeroCorp,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenOmniaCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.ChongqingSolarisSpaceSystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12DeltaOne,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.6,\n salaryMultiplier: 1.6,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaNovaMedical,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12CIA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.Sector12NSA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.AevumWatchdogSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenLexoCorp,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllBusinessPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.4,\n salaryMultiplier: 1.4,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumRhoConstruction,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToLeadDeveloper, BusinessPositionsUpToOperationsManager),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.Sector12AlphaEnterprises,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToLeadDeveloper,\n BusinessPositionsUpToOperationsManager,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumPolice,\n info: \"\",\n companyPositions: Object.assign({}, AllSecurityPositions, SoftwarePositionsUpToLeadDeveloper),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.VolhavenSysCoreSecurities,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenCompuTek,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.AevumNetLinkTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.Sector12CarmichaelSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllAgentPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.Sector12FoodNStuff,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.Sector12JoesGuns,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.IshimaOmegaSoftware,\n info: \"\",\n companyPositions: Object.assign({}, AllSoftwarePositions, AllSoftwareConsultantPositions, AllITPositions),\n expMultiplier: 1.1,\n salaryMultiplier: 1.1,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.NewTokyoNoodleBar,\n info: \"\",\n companyPositions: Object.assign({}, WaiterOnly, PartTimeWaiterOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n];\n","export interface IConstructorParams {\n name: string;\n cost: number;\n desc: string;\n advertisingMult?: number;\n employeeChaMult?: number;\n employeeCreMult?: number;\n employeeEffMult?: number;\n employeeIntMult?: number;\n productionMult?: number;\n productProductionMult?: number;\n salesMult?: number;\n sciResearchMult?: number;\n storageMult?: number;\n}\n\nexport class Research {\n // Name of research. This will be used to identify researches in the Research Tree\n name = \"\";\n\n // How much scientific research it costs to unlock this\n cost = 0;\n\n // Description of what the Research does\n desc = \"\";\n\n // All possible generic upgrades for the company, in the form of multipliers\n advertisingMult = 1;\n employeeChaMult = 1;\n employeeCreMult = 1;\n employeeEffMult = 1;\n employeeIntMult = 1;\n productionMult = 1;\n productProductionMult = 1;\n salesMult = 1;\n sciResearchMult = 1;\n storageMult = 1;\n\n constructor(p: IConstructorParams = { name: \"\", cost: 0, desc: \"\" }) {\n this.name = p.name;\n this.cost = p.cost;\n this.desc = p.desc;\n if (p.advertisingMult) {\n this.advertisingMult = p.advertisingMult;\n }\n if (p.employeeChaMult) {\n this.employeeChaMult = p.employeeChaMult;\n }\n if (p.employeeCreMult) {\n this.employeeCreMult = p.employeeCreMult;\n }\n if (p.employeeEffMult) {\n this.employeeEffMult = p.employeeEffMult;\n }\n if (p.employeeIntMult) {\n this.employeeIntMult = p.employeeIntMult;\n }\n if (p.productionMult) {\n this.productionMult = p.productionMult;\n }\n if (p.productProductionMult) {\n this.productProductionMult = p.productProductionMult;\n }\n if (p.salesMult) {\n this.salesMult = p.salesMult;\n }\n if (p.sciResearchMult) {\n this.sciResearchMult = p.sciResearchMult;\n }\n if (p.storageMult) {\n this.storageMult = p.storageMult;\n }\n }\n}\n","import { IConstructorParams } from \"../Research\";\n\nexport const researchMetadata: IConstructorParams[] = [\n {\n name: \"AutoBrew\",\n cost: 12e3,\n desc:\n \"Automatically keep your employees fully caffeinated with \" +\n \"coffee injections. This research will keep the energy of all \" +\n \"employees at its maximum possible value, for no cost. \" +\n \"This will also disable the Coffee upgrade.\",\n },\n {\n name: \"AutoPartyManager\",\n cost: 15e3,\n desc:\n \"Automatically analyzes your employees' happiness and morale \" +\n \"and boosts them whenever it detects a decrease. This research will \" +\n \"keep the morale and happiness of all employees at their maximum possible \" +\n \"values, for no cost. \" +\n \"This will also disable the 'Throw Party' feature.\",\n },\n {\n name: \"Automatic Drug Administration\",\n cost: 10e3,\n desc:\n \"Research how to automatically administer performance-enhacing drugs to all of \" +\n \"your employees. This unlocks Drug-related Research.\",\n },\n {\n name: \"Bulk Purchasing\",\n cost: 5e3,\n desc:\n \"Research the art of buying materials in bulk. This allows you to purchase \" +\n \"any amount of a material instantly.\",\n },\n {\n name: \"CPH4 Injections\",\n cost: 25e3,\n desc:\n \"Develop an advanced and harmless synthetic drug that is administered to \" +\n \"employees to increase all of their stats, except experience, by 10%.\",\n employeeCreMult: 1.1,\n employeeChaMult: 1.1,\n employeeEffMult: 1.1,\n employeeIntMult: 1.1,\n },\n {\n name: \"Drones\",\n cost: 5e3,\n desc:\n \"Acquire the knowledge needed to create advanced drones. This research does nothing \" +\n \"by itself, but unlocks other Drone-related research.\",\n },\n {\n name: \"Drones - Assembly\",\n cost: 25e3,\n desc:\n \"Manufacture and use Assembly Drones to improve the efficiency of \" +\n \"your production lines. This increases all production by 20%.\",\n productionMult: 1.2,\n },\n {\n name: \"Drones - Transport\",\n cost: 30e3,\n desc:\n \"Manufacture and use intelligent Transport Drones to optimize \" +\n \"your warehouses. This increases the storage space of all warehouses \" +\n \"by 50%.\",\n storageMult: 1.5,\n },\n {\n name: \"Go-Juice\",\n cost: 25e3,\n desc:\n \"Provide employees with Go-Juice, a coffee-derivative that further enhances \" +\n \"the brain's dopamine production. This increases the maximum energy of all \" +\n \"employees by 10.\",\n },\n {\n name: \"Hi-Tech R&D Laboratory\",\n cost: 5e3,\n desc:\n \"Construct a cutting edge facility dedicated to advanced research and \" +\n \"and development. This allows you to spend Scientific Research \" +\n \"on powerful upgrades. It also globally increases Scientific Research \" +\n \"production by 10%.\",\n sciResearchMult: 1.1,\n },\n {\n name: \"HRBuddy-Recruitment\",\n cost: 15e3,\n desc:\n \"Use automated software to handle the hiring of employees. With this \" +\n \"research, each office will automatically hire one employee per \" +\n \"market cycle if there is available space.\",\n },\n {\n name: \"HRBuddy-Training\",\n cost: 20e3,\n desc:\n \"Use automated software to handle the training of employees. With this \" +\n \"research, each employee hired with HRBuddy-Recruitment will automatically \" +\n \"be assigned to 'Training', rather than being unassigned.\",\n },\n {\n name: \"JoyWire\",\n cost: 20e3,\n desc: \"A brain implant which is installed in employees, increasing their maximum happiness by 10.\",\n },\n {\n name: \"Market-TA.I\",\n cost: 20e3,\n desc:\n \"Develop advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know what price to sell your Materials/Products \" +\n \"at in order to avoid losing sales due to having too high of a mark-up. \" +\n \"It also lets you automatically use that sale price.\",\n },\n {\n name: \"Market-TA.II\",\n cost: 50e3,\n desc:\n \"Develop double-advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know how many sales of a Material/Product you lose or gain \" +\n \"from having too high or too low or a sale price. It also lets you automatically \" +\n \"set the sale price of your Materials/Products at the optimal price such that \" +\n \"the amount sold matches the amount produced.\",\n },\n {\n name: \"Overclock\",\n cost: 15e3,\n desc:\n \"Equip employees with a headset that uses transcranial direct current \" +\n \"stimulation (tDCS) to increase the speed of their neurotransmitters. \" +\n \"This research increases the intelligence and efficiency of all \" +\n \"employees by 25%.\",\n employeeEffMult: 1.25,\n employeeIntMult: 1.25,\n },\n {\n name: \"Self-Correcting Assemblers\",\n cost: 25e3,\n desc:\n \"Create assemblers that can be used for universal production. \" +\n \"These assemblers use deep learning to improve their efficiency \" +\n \"at their tasks. This research increases all production by 10%\",\n productionMult: 1.1,\n },\n {\n name: \"Sti.mu\",\n cost: 30e3,\n desc:\n \"Upgrade the tDCS headset to stimulate regions of the brain that \" +\n \"control confidence and enthusiasm. This research increases the max \" +\n \"morale of all employees by 10.\",\n },\n {\n name: \"sudo.Assist\",\n cost: 15e3,\n desc: \"Develop a virtual assistant AI to handle and manage administrative issues for your corporation.\",\n },\n {\n name: \"uPgrade: Capacity.I\",\n cost: 20e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 3 to 4).\",\n },\n {\n name: \"uPgrade: Capacity.II\",\n cost: 30e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 4 to 5).\",\n },\n {\n name: \"uPgrade: Dashboard\",\n cost: 5e3,\n desc:\n \"Improve the software used to manage the industry's production line \" +\n \"for its various products. This allows you to manage the production and \" +\n \"sale of a product before it's finished being designed.\",\n },\n {\n name: \"uPgrade: Fulcrum\",\n cost: 10e3,\n desc:\n \"Streamline the manufacturing of this industry's various products. \" +\n \"This research increases the production of your products by 5%\",\n productProductionMult: 1.05,\n },\n];\n","/**\n * Object representing an upgrade that can be purchased with hashes\n */\nexport interface IConstructorParams {\n cost?: number;\n costPerLevel: number;\n desc: string;\n hasTargetServer?: boolean;\n name: string;\n value: number;\n effectText?: (level: number) => JSX.Element | null;\n}\n\nexport class HashUpgrade {\n /**\n * If the upgrade has a flat cost (never increases), it goes here\n * Otherwise, this property should be undefined\n *\n * This property overrides the 'costPerLevel' property\n */\n cost?: number;\n\n /**\n * Base cost for this upgrade. Every time the upgrade is purchased,\n * its cost increases by this same amount (so its 1x, 2x, 3x, 4x, etc.)\n */\n costPerLevel = 0;\n\n /**\n * Description of what the upgrade does\n */\n desc = \"\";\n\n /**\n * Boolean indicating that this upgrade's effect affects a single server,\n * the \"target\" server\n */\n hasTargetServer = false;\n\n // Name of upgrade\n name = \"\";\n\n // Generic value used to indicate the potency/amount of this upgrade's effect\n // The meaning varies between different upgrades\n value = 0;\n\n constructor(p: IConstructorParams) {\n if (p.cost != null) {\n this.cost = p.cost;\n }\n if (p.effectText != null) {\n this.effectText = p.effectText;\n }\n\n this.costPerLevel = p.costPerLevel;\n this.desc = p.desc;\n this.hasTargetServer = p.hasTargetServer ? p.hasTargetServer : false;\n this.name = p.name;\n this.value = p.value;\n }\n\n // Functions that returns the UI element to display the effect of this upgrade.\n effectText: (level: number) => JSX.Element | null = () => null;\n\n getCost(levels: number): number {\n if (typeof this.cost === \"number\") {\n return this.cost;\n }\n\n return Math.round((levels + 1) * this.costPerLevel);\n }\n}\n","// Metadata used to construct all Hash Upgrades\nimport React from \"react\";\nimport { IConstructorParams } from \"../HashUpgrade\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Money } from \"../../ui/React/Money\";\n\nexport const HashUpgradesMetadata: IConstructorParams[] = [\n {\n cost: 4,\n costPerLevel: 4,\n desc: \"Sell hashes for $1m\",\n name: \"Sell for Money\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for \n \n ),\n value: 1e6,\n },\n {\n costPerLevel: 100,\n desc: \"Sell hashes for $1b in Corporation funds\",\n name: \"Sell for Corporation Funds\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for Corporation funds.\n \n ),\n value: 1e9,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to decrease the minimum security of a single server by 2%. \" +\n \"Note that a server's minimum security cannot go below 1. This effect persists \" +\n \"until you install Augmentations (since servers are reset at that time).\",\n hasTargetServer: true,\n name: \"Reduce Minimum Security\",\n value: 0.98,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to increase the maximum amount of money on a single server by 2%. \" +\n \"This effect persists until you install Augmentations (since servers \" +\n \"are reset at that time).\",\n hasTargetServer: true,\n name: \"Increase Maximum Money\",\n value: 1.02,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when studying at a university by 20%. \" +\n \"This effect persists until you install Augmentations\",\n name: \"Improve Studying\",\n effectText: (level: number): JSX.Element | null => <>Improves studying by {level * 20}%,\n value: 20, // Improves studying by value%\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when training at the gym by 20%. This effect \" +\n \"persists until you install Augmentations\",\n name: \"Improve Gym Training\",\n effectText: (level: number): JSX.Element | null => <>Improves training by {level * 20}%,\n value: 20, // Improves training by value%\n },\n {\n costPerLevel: 200,\n desc: \"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries\",\n name: \"Exchange for Corporation Research\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {level}k Scientific Research in your industries.\n ),\n value: 1000,\n },\n {\n costPerLevel: 250,\n desc: \"Exchange hashes for 100 Bladeburner Rank\",\n name: \"Exchange for Bladeburner Rank\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(100 * level, \"0a\")} Bladeburner rank\n ),\n value: 100,\n },\n {\n costPerLevel: 250,\n desc: \"Exchanges hashes for 10 Bladeburner Skill Points\",\n name: \"Exchange for Bladeburner SP\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(10 * level, \"0a\")} Bladeburner Skill Points\n ),\n value: 10,\n },\n {\n costPerLevel: 200,\n desc: \"Generate a random Coding Contract somewhere on the network\",\n name: \"Generate Coding Contract\",\n effectText: (level: number): JSX.Element | null => <>Generated {level} contracts.,\n value: 1,\n },\n];\n","/**\n * The environment in which a script runs. The environment holds\n * Netscript functions and arguments for that script.\n */\nimport { IMap } from \"../types\";\n\nexport class Environment {\n /**\n * Parent environment. Used to implement \"scope\"\n */\n parent: Environment | null = null;\n\n /**\n * Whether or not the script that uses this Environment should stop running\n */\n stopFlag = false;\n\n /**\n * Environment variables (currently only Netscript functions)\n */\n vars: IMap = {};\n\n constructor(parent: Environment | null) {\n if (parent instanceof Environment) {\n this.vars = Object.assign({}, parent.vars);\n }\n\n this.parent = parent;\n }\n\n /**\n * Finds the scope where the variable with the given name is defined\n */\n lookup(name: string): Environment | null {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let scope: Environment | null = this;\n while (scope) {\n if (Object.prototype.hasOwnProperty.call(scope.vars, name)) {\n return scope;\n }\n scope = scope.parent;\n }\n\n return null;\n }\n\n //Get the current value of a variable\n get(name: string): any {\n if (name in this.vars) {\n return this.vars[name];\n }\n\n throw new Error(`Undefined variable ${name}`);\n }\n\n //Sets the value of a variable in any scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n set(name: string, value: any): any {\n const scope = this.lookup(name);\n\n //If scope has a value, then this variable is already set in a higher scope, so\n //set is there. Otherwise, create a new variable in the local scope\n if (scope !== null) {\n return (scope.vars[name] = value);\n } else {\n return (this.vars[name] = value);\n }\n }\n\n //Creates (or overwrites) a variable in the current scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n def(name: string, value: any): any {\n return (this.vars[name] = value);\n }\n}\n","/**\n * Determines if the number is a power of 2\n * @param n The number to check.\n */\nexport function isPowerOfTwo(n: number): boolean {\n if (isNaN(n)) {\n return false;\n }\n\n if (n === 0) {\n return false;\n }\n\n // Disabiling the bitwise rule because it's honestly the most effecient way to check for this.\n // tslint:disable-next-line:no-bitwise\n return (n & (n - 1)) === 0;\n}\n","/**\n * Initialization metadata for all Stocks. This is used to generate the\n * stock parameter values upon a reset\n *\n * Some notes:\n * - Megacorporations have better otlkMags\n * - Higher volatility -> Bigger spread\n * - Lower price -> Bigger spread\n * - Share tx required for movement used for balancing\n */\nimport { StockSymbols } from \"./StockSymbols\";\nimport { IConstructorParams } from \"../Stock\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const InitStockMetadata: IConstructorParams[] = [\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 17e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.AevumECorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumECorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 34e3,\n min: 24e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.Sector12MegaCorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12MegaCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 12e3,\n },\n marketCap: 1.6e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12BladeIndustries,\n otlkMag: 13,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12BladeIndustries],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 10e3,\n },\n marketCap: 1.5e12,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.AevumClarkeIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumClarkeIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 43e3,\n min: 32e3,\n },\n marketCap: 1.8e12,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniTekIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 80e3,\n min: 50e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 110,\n min: 100,\n },\n name: LocationName.Sector12FourSigma,\n otlkMag: 17,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12FourSigma],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 16e3,\n },\n marketCap: 1.9e12,\n mv: {\n divisor: 100,\n max: 85,\n min: 75,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 7,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.ChongqingKuaiGongInternational],\n },\n\n {\n b: true,\n initPrice: {\n max: 36e3,\n min: 29e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 130,\n min: 120,\n },\n name: LocationName.AevumFulcrumTechnologies,\n otlkMag: 16,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumFulcrumTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 20e3,\n },\n marketCap: 1.2e12,\n mv: {\n divisor: 100,\n max: 90,\n min: 80,\n },\n name: LocationName.IshimaStormTechnologies,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.IshimaStormTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 19e3,\n min: 6e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.NewTokyoDefComm,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoDefComm],\n },\n\n {\n b: true,\n initPrice: {\n max: 18e3,\n min: 10e3,\n },\n marketCap: 825e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.VolhavenHeliosLabs,\n otlkMag: 9,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenHeliosLabs],\n },\n\n {\n b: true,\n initPrice: {\n max: 14e3,\n min: 8e3,\n },\n marketCap: 1e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.NewTokyoVitaLife,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoVitaLife],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 800e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n otlkMag: 7.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12IcarusMicrosystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 29e3,\n min: 16e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 60,\n min: 50,\n },\n name: LocationName.Sector12UniversalEnergy,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12UniversalEnergy],\n },\n\n {\n b: true,\n initPrice: {\n max: 17e3,\n min: 8e3,\n },\n marketCap: 640e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.AevumAeroCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.AevumAeroCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 15e3,\n min: 6e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n otlkMag: 4.5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniaCybersystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 14e3,\n },\n marketCap: 705e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n otlkMag: 8.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.ChongqingSolarisSpaceSystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 12e3,\n },\n marketCap: 695e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n otlkMag: 10.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoGlobalPharmaceuticals],\n },\n\n {\n b: true,\n initPrice: {\n max: 27e3,\n min: 15e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.IshimaNovaMedical,\n otlkMag: 5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.IshimaNovaMedical],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 450e9,\n mv: {\n divisor: 100,\n max: 260,\n min: 240,\n },\n name: LocationName.AevumWatchdogSecurity,\n otlkMag: 1.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 12e3,\n },\n symbol: StockSymbols[LocationName.AevumWatchdogSecurity],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 4.5e3,\n },\n marketCap: 300e9,\n mv: {\n divisor: 100,\n max: 135,\n min: 115,\n },\n name: LocationName.VolhavenLexoCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenLexoCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 7e3,\n min: 2e3,\n },\n marketCap: 180e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: LocationName.AevumRhoConstruction,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.AevumRhoConstruction],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 240e9,\n mv: {\n divisor: 100,\n max: 205,\n min: 175,\n },\n name: LocationName.Sector12AlphaEnterprises,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 16,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12AlphaEnterprises],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 3e3,\n },\n marketCap: 200e9,\n mv: {\n divisor: 100,\n max: 170,\n min: 150,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n otlkMag: 3,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.VolhavenSysCoreSecurities],\n },\n\n {\n b: true,\n initPrice: {\n max: 6e3,\n min: 1e3,\n },\n marketCap: 185e9,\n mv: {\n divisor: 100,\n max: 100,\n min: 80,\n },\n name: LocationName.VolhavenCompuTek,\n otlkMag: 4,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.VolhavenCompuTek],\n },\n\n {\n b: true,\n initPrice: {\n max: 5e3,\n min: 1e3,\n },\n marketCap: 58e9,\n mv: {\n divisor: 100,\n max: 400,\n min: 200,\n },\n name: LocationName.AevumNetLinkTechnologies,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 20,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 18e3,\n },\n symbol: StockSymbols[LocationName.AevumNetLinkTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 1e3,\n },\n marketCap: 60e9,\n mv: {\n divisor: 100,\n max: 110,\n min: 90,\n },\n name: LocationName.IshimaOmegaSoftware,\n otlkMag: 0.5,\n spreadPerc: {\n divisor: 10,\n max: 13,\n min: 4,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.IshimaOmegaSoftware],\n },\n\n {\n b: false,\n initPrice: {\n max: 4.5e3,\n min: 500,\n },\n marketCap: 45e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12FoodNStuff,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 6,\n },\n shareTxForMovement: {\n max: 180e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.Sector12FoodNStuff],\n },\n\n {\n b: true,\n initPrice: {\n max: 3.5e3,\n min: 1.5e3,\n },\n marketCap: 30e9,\n mv: {\n divisor: 100,\n max: 275,\n min: 100,\n },\n name: \"Sigma Cosmetics\",\n otlkMag: 0,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 70e3,\n min: 20e3,\n },\n symbol: StockSymbols[\"Sigma Cosmetics\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 42e9,\n mv: {\n divisor: 100,\n max: 350,\n min: 200,\n },\n name: LocationName.Sector12JoesGuns,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 52e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.Sector12JoesGuns],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 100e9,\n mv: {\n divisor: 100,\n max: 175,\n min: 120,\n },\n name: \"Catalyst Ventures\",\n otlkMag: 13.5,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 5,\n },\n shareTxForMovement: {\n max: 72e3,\n min: 24e3,\n },\n symbol: StockSymbols[\"Catalyst Ventures\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 15e3,\n },\n marketCap: 360e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: \"Microdyne Technologies\",\n otlkMag: 8,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Microdyne Technologies\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 420e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: \"Titan Laboratories\",\n otlkMag: 11,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Titan Laboratories\"],\n },\n];\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { Gang } from \"../Gang/Gang\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangMemberTasks } from \"../Gang/GangMemberTasks\";\nimport { GangMemberUpgrades } from \"../Gang/GangMemberUpgrades\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GangMember } from \"../Gang/GangMember\";\nimport { GangMemberTask } from \"../Gang/GangMemberTask\";\n\nimport {\n Gang as IGang,\n GangGenInfo,\n GangOtherInfo,\n GangMemberInfo,\n GangMemberAscension,\n EquipmentStats,\n GangTaskStats,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGang {\n const checkGangApiAccess = function (func: string): void {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n const hasAccess = gang instanceof Gang;\n if (!hasAccess) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func: string, name: string): GangMember {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n for (const member of gang.members) if (member.name === name) return member;\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func: string, name: string): GangMemberTask {\n const task = GangMemberTasks[name];\n if (!task) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n return {\n createGang: function (_faction: unknown): boolean {\n const faction = helper.string(\"createGang\", \"faction\", _faction);\n helper.updateDynamicRam(\"createGang\", getRamCost(player, \"gang\", \"createGang\"));\n // this list is copied from Faction/ui/Root.tsx\n\n if (!player.canAccessGang() || !GangConstants.Names.includes(faction)) return false;\n if (player.inGang()) return false;\n if (!player.factions.includes(faction)) return false;\n\n const isHacking = faction === FactionNames.NiteSec || faction === FactionNames.TheBlackHand;\n player.startGang(faction, isHacking);\n return true;\n },\n inGang: function (): boolean {\n helper.updateDynamicRam(\"inGang\", getRamCost(player, \"gang\", \"inGang\"));\n return player.inGang();\n },\n getMemberNames: function (): string[] {\n helper.updateDynamicRam(\"getMemberNames\", getRamCost(player, \"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.members.map((member) => member.name);\n },\n getGangInformation: function (): GangGenInfo {\n helper.updateDynamicRam(\"getGangInformation\", getRamCost(player, \"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return {\n faction: gang.facName,\n isHacking: gang.isHackingGang,\n moneyGainRate: gang.moneyGainRate,\n power: gang.getPower(),\n respect: gang.respect,\n respectGainRate: gang.respectGainRate,\n territory: gang.getTerritory(),\n territoryClashChance: gang.territoryClashChance,\n territoryWarfareEngaged: gang.territoryWarfareEngaged,\n wantedLevel: gang.wanted,\n wantedLevelGainRate: gang.wantedGainRate,\n wantedPenalty: gang.getWantedPenalty(),\n };\n },\n getOtherGangInformation: function (): GangOtherInfo {\n helper.updateDynamicRam(\"getOtherGangInformation\", getRamCost(player, \"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy: any = {};\n for (const gang of Object.keys(AllGangs)) {\n cpy[gang] = Object.assign({}, AllGangs[gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (_memberName: unknown): GangMemberInfo {\n const memberName = helper.string(\"getMemberInformation\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"getMemberInformation\", getRamCost(player, \"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getMemberInformation\", memberName);\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\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\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\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\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\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice(),\n\n respectGain: member.calculateRespectGain(gang),\n wantedLevelGain: member.calculateWantedLevelGain(gang),\n moneyGain: member.calculateMoneyGain(gang),\n };\n },\n canRecruitMember: function (): boolean {\n helper.updateDynamicRam(\"canRecruitMember\", getRamCost(player, \"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.canRecruitMember();\n },\n recruitMember: function (_memberName: unknown): boolean {\n const memberName = helper.string(\"recruitMember\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"recruitMember\", getRamCost(player, \"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const recruited = gang.recruitMember(memberName);\n if (recruited) {\n workerScript.log(\"gang.recruitMember\", () => `Successfully recruited Gang Member '${memberName}'`);\n } else {\n workerScript.log(\"gang.recruitMember\", () => `Failed to recruit Gang Member '${memberName}'`);\n }\n\n return recruited;\n },\n getTaskNames: function (): string[] {\n helper.updateDynamicRam(\"getTaskNames\", getRamCost(player, \"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const tasks = gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (_memberName: unknown, _taskName: unknown): boolean {\n const memberName = helper.string(\"setMemberTask\", \"memberName\", _memberName);\n const taskName = helper.string(\"setMemberTask\", \"taskName\", _taskName);\n helper.updateDynamicRam(\"setMemberTask\", getRamCost(player, \"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (!gang.getAllTaskNames().includes(taskName)) {\n workerScript.log(\n \"gang.setMemberTask\",\n () =>\n `Failed to assign Gang Member '${memberName}' to Invalid task '${taskName}'. '${memberName}' is now Unassigned`,\n );\n return member.assignToTask(\"Unassigned\");\n }\n const success = member.assignToTask(taskName);\n if (success) {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`,\n );\n } else {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`,\n );\n }\n\n return success;\n },\n getTaskStats: function (_taskName: unknown): GangTaskStats {\n const taskName = helper.string(\"getTaskStats\", \"taskName\", _taskName);\n helper.updateDynamicRam(\"getTaskStats\", getRamCost(player, \"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 (): string[] {\n helper.updateDynamicRam(\"getEquipmentNames\", getRamCost(player, \"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(GangMemberUpgrades);\n },\n getEquipmentCost: function (_equipName: any): number {\n const equipName = helper.string(\"getEquipmentCost\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"getEquipmentCost\", getRamCost(player, \"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const upg = GangMemberUpgrades[equipName];\n if (upg === null) return Infinity;\n return gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (_equipName: unknown): string {\n const equipName = helper.string(\"getEquipmentType\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"getEquipmentType\", getRamCost(player, \"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = GangMemberUpgrades[equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (_equipName: unknown): EquipmentStats {\n const equipName = helper.string(\"getEquipmentStats\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"getEquipmentStats\", getRamCost(player, \"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) {\n throw helper.makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n const typecheck: EquipmentStats = equipment.mults;\n return Object.assign({}, typecheck) as any;\n },\n purchaseEquipment: function (_memberName: unknown, _equipName: unknown): boolean {\n const memberName = helper.string(\"purchaseEquipment\", \"memberName\", _memberName);\n const equipName = helper.string(\"purchaseEquipment\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"purchaseEquipment\", getRamCost(player, \"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, player, gang);\n if (res) {\n workerScript.log(\"gang.purchaseEquipment\", () => `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\n \"gang.purchaseEquipment\",\n () => `Failed to purchase '${equipName}' for Gang member '${memberName}'`,\n );\n }\n\n return res;\n },\n ascendMember: function (_memberName: unknown): GangMemberAscension | undefined {\n const memberName = helper.string(\"ascendMember\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"ascendMember\", getRamCost(player, \"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"ascendMember\", memberName);\n if (!member.canAscend()) return;\n return gang.ascendMember(member, workerScript);\n },\n getAscensionResult: function (_memberName: unknown): GangMemberAscension | undefined {\n const memberName = helper.string(\"getAscensionResult\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"getAscensionResult\", getRamCost(player, \"gang\", \"getAscensionResult\"));\n checkGangApiAccess(\"getAscensionResult\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getAscensionResult\", memberName);\n if (!member.canAscend()) return;\n return {\n respect: member.earnedRespect,\n ...member.getAscensionResults(),\n };\n },\n setTerritoryWarfare: function (_engage: unknown): void {\n const engage = helper.boolean(_engage);\n helper.updateDynamicRam(\"setTerritoryWarfare\", getRamCost(player, \"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (engage) {\n gang.territoryWarfareEngaged = true;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Engaging in Gang Territory Warfare\");\n } else {\n gang.territoryWarfareEngaged = false;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (_otherGang: unknown): number {\n const otherGang = helper.string(\"getChanceToWinClash\", \"otherGang\", _otherGang);\n helper.updateDynamicRam(\"getChanceToWinClash\", getRamCost(player, \"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (AllGangs[otherGang] == null) {\n throw helper.makeRuntimeErrorMsg(`gang.getChanceToWinClash`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = AllGangs[gang.facName].power;\n const otherPower = AllGangs[otherGang].power;\n\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function (): number {\n helper.updateDynamicRam(\"getBonusTime\", getRamCost(player, \"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return Math.round(gang.storedCycles / 5);\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { FactionWorkType } from \"../Faction/FactionWorkTypeEnum\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\nimport { SleeveTaskType } from \"../PersonObjects/Sleeve/SleeveTaskTypesEnum\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { findSleevePurchasableAugs } from \"../PersonObjects/Sleeve/SleeveHelpers\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { findCrime } from \"../Crime/CrimeHelpers\";\n\nimport {\n AugmentPair,\n Sleeve as ISleeve,\n SleeveInformation,\n SleeveSkills,\n SleeveTask,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): ISleeve {\n const checkSleeveAPIAccess = function (func: string): void {\n if (player.bitNodeN !== 10 && !SourceFileFlags[10]) {\n throw helper.makeRuntimeErrorMsg(\n `sleeve.${func}`,\n \"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\n const checkSleeveNumber = function (func: string, sleeveNumber: number): void {\n if (sleeveNumber >= player.sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, () => msg);\n throw helper.makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getSleeveStats = function (sleeveNumber: number): SleeveSkills {\n const sl = player.sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking: sl.hacking,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma,\n };\n };\n\n return {\n getNumSleeves: function (): number {\n helper.updateDynamicRam(\"getNumSleeves\", getRamCost(player, \"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return player.sleeves.length;\n },\n setToShockRecovery: function (_sleeveNumber: unknown): boolean {\n const sleeveNumber = helper.number(\"setToShockRecovery\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"setToShockRecovery\", getRamCost(player, \"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return player.sleeves[sleeveNumber].shockRecovery(player);\n },\n setToSynchronize: function (_sleeveNumber: unknown): boolean {\n const sleeveNumber = helper.number(\"setToSynchronize\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"setToSynchronize\", getRamCost(player, \"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return player.sleeves[sleeveNumber].synchronize(player);\n },\n setToCommitCrime: function (_sleeveNumber: unknown, _crimeRoughName: unknown): boolean {\n const sleeveNumber = helper.number(\"setToCommitCrime\", \"sleeveNumber\", _sleeveNumber);\n const crimeRoughName = helper.string(\"setToCommitCrime\", \"crimeName\", _crimeRoughName);\n helper.updateDynamicRam(\"setToCommitCrime\", getRamCost(player, \"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n const crime = findCrime(crimeRoughName);\n if (crime === null) {\n return false;\n }\n return player.sleeves[sleeveNumber].commitCrime(player, crime.name);\n },\n setToUniversityCourse: function (_sleeveNumber: unknown, _universityName: unknown, _className: unknown): boolean {\n const sleeveNumber = helper.number(\"setToUniversityCourse\", \"sleeveNumber\", _sleeveNumber);\n const universityName = helper.string(\"setToUniversityCourse\", \"universityName\", _universityName);\n const className = helper.string(\"setToUniversityCourse\", \"className\", _className);\n helper.updateDynamicRam(\"setToUniversityCourse\", getRamCost(player, \"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return player.sleeves[sleeveNumber].takeUniversityCourse(player, universityName, className);\n },\n travel: function (_sleeveNumber: unknown, _cityName: unknown): boolean {\n const sleeveNumber = helper.number(\"travel\", \"sleeveNumber\", _sleeveNumber);\n const cityName = helper.string(\"setToUniversityCourse\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"travel\", getRamCost(player, \"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return player.sleeves[sleeveNumber].travel(player, cityName as CityName);\n },\n setToCompanyWork: function (_sleeveNumber: unknown, acompanyName: unknown): boolean {\n const sleeveNumber = helper.number(\"setToCompanyWork\", \"sleeveNumber\", _sleeveNumber);\n const companyName = helper.string(\"setToUniversityCourse\", \"companyName\", acompanyName);\n helper.updateDynamicRam(\"setToCompanyWork\", getRamCost(player, \"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber);\n\n // Cannot work at the same company that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Company && other.currentTaskLocation === companyName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForCompany(player, companyName);\n },\n setToFactionWork: function (_sleeveNumber: unknown, _factionName: unknown, _workType: unknown): boolean {\n const sleeveNumber = helper.number(\"setToFactionWork\", \"sleeveNumber\", _sleeveNumber);\n const factionName = helper.string(\"setToUniversityCourse\", \"factionName\", _factionName);\n const workType = helper.string(\"setToUniversityCourse\", \"workType\", _workType);\n helper.updateDynamicRam(\"setToFactionWork\", getRamCost(player, \"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber);\n\n // Cannot work at the same faction that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Faction && other.currentTaskLocation === factionName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForFaction(player, factionName, workType);\n },\n setToGymWorkout: function (_sleeveNumber: unknown, _gymName: unknown, _stat: unknown): boolean {\n const sleeveNumber = helper.number(\"setToGymWorkout\", \"sleeveNumber\", _sleeveNumber);\n const gymName = helper.string(\"setToUniversityCourse\", \"gymName\", _gymName);\n const stat = helper.string(\"setToUniversityCourse\", \"stat\", _stat);\n helper.updateDynamicRam(\"setToGymWorkout\", getRamCost(player, \"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n\n return player.sleeves[sleeveNumber].workoutAtGym(player, gymName, stat);\n },\n getSleeveStats: function (_sleeveNumber: unknown): SleeveSkills {\n const sleeveNumber = helper.number(\"getSleeveStats\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getSleeveStats\", getRamCost(player, \"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n return getSleeveStats(sleeveNumber);\n },\n getTask: function (_sleeveNumber: unknown): SleeveTask {\n const sleeveNumber = helper.number(\"getTask\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getTask\", getRamCost(player, \"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n task: SleeveTaskType[sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: FactionWorkType[sl.factionWorkType],\n };\n },\n getInformation: function (_sleeveNumber: unknown): SleeveInformation {\n const sleeveNumber = helper.number(\"getInformation\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getInformation\", getRamCost(player, \"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n tor: false,\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(player.jobs), // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(player.jobs),\n maxHp: sl.max_hp,\n\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n charisma: sl.charisma_mult,\n charismaExp: sl.charisma_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\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),\n };\n },\n getSleeveAugmentations: function (_sleeveNumber: unknown): string[] {\n const sleeveNumber = helper.number(\"getSleeveAugmentations\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getSleeveAugmentations\", getRamCost(player, \"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n\n const augs = [];\n for (let i = 0; i < player.sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(player.sleeves[sleeveNumber].augmentations[i].name);\n }\n return augs;\n },\n getSleevePurchasableAugs: function (_sleeveNumber: unknown): AugmentPair[] {\n const sleeveNumber = helper.number(\"getSleevePurchasableAugs\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getSleevePurchasableAugs\", getRamCost(player, \"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n\n const purchasableAugs = findSleevePurchasableAugs(player.sleeves[sleeveNumber], player);\n const augs = [];\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: unknown, _augName: unknown): boolean {\n const sleeveNumber = helper.number(\"purchaseSleeveAug\", \"sleeveNumber\", _sleeveNumber);\n const augName = helper.string(\"purchaseSleeveAug\", \"augName\", _augName);\n helper.updateDynamicRam(\"purchaseSleeveAug\", getRamCost(player, \"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n\n if (getSleeveStats(sleeveNumber).shock > 0) {\n throw helper.makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Sleeve shock too high: Sleeve ${sleeveNumber}`);\n }\n\n const aug = Augmentations[augName];\n if (!aug) {\n throw helper.makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return player.sleeves[sleeveNumber].tryBuyAugmentation(player, aug);\n },\n };\n}\n","import { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport * as bcrypt from \"bcryptjs\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\n\nexport interface INetscriptExtra {\n heart: {\n break(): number;\n };\n exploit(): void;\n bypass(doc: Document): void;\n alterReality(): void;\n rainbow(guess: string): void;\n}\n\nexport function NetscriptExtra(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): INetscriptExtra {\n return {\n heart: {\n // Easter egg function\n break: function (): number {\n return player.karma;\n },\n },\n exploit: function (): void {\n player.giveExploit(Exploit.UndocumentedFunctionCall);\n },\n bypass: function (doc: unknown): void {\n // reset both fields first\n const d = doc as any;\n d.completely_unused_field = undefined;\n const real_document: any = document;\n real_document.completely_unused_field = undefined;\n // set one to true and check that it affected the other.\n real_document.completely_unused_field = true;\n if (d.completely_unused_field && workerScript.ramUsage === 1.6) {\n player.giveExploit(Exploit.Bypass);\n }\n d.completely_unused_field = undefined;\n real_document.completely_unused_field = undefined;\n },\n alterReality: function (): void {\n // We need to trick webpack into not optimizing a variable that is guaranteed to be false (and doesn't use prototypes)\n let x = false;\n const recur = function (depth: number): void {\n if (depth === 0) return;\n x = !x;\n recur(depth - 1);\n };\n recur(2);\n console.warn(\"I am sure that this variable is false.\");\n if (x !== false) {\n console.warn(\"Reality has been altered!\");\n player.giveExploit(Exploit.RealityAlteration);\n }\n },\n rainbow: function (guess: unknown): void {\n async function tryGuess(): Promise {\n const verified = await bcrypt.compare(\n helper.string(\"rainbow\", \"guess\", guess),\n \"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO\",\n );\n if (verified) {\n player.giveExploit(Exploit.INeedARainbow);\n }\n }\n tryGuess();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n purchaseHashUpgrade,\n updateHashManagerCapacity,\n} from \"../Hacknet/HacknetHelpers\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HashUpgrades } from \"../Hacknet/HashUpgrades\";\nimport { HashUpgrade } from \"../Hacknet/HashUpgrade\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { Hacknet as IHacknet, NodeStats } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IHacknet {\n // Utility function to get Hacknet Node object\n const getHacknetNode = function (i: number, callingFn = \"\"): HacknetNode | HacknetServer {\n if (i < 0 || i >= player.hacknetNodes.length) {\n throw helper.makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (hasHacknetServers(player)) {\n const hi = player.hacknetNodes[i];\n if (typeof hi !== \"string\") throw new Error(\"hacknet node was not a string\");\n const hserver = GetServer(hi);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"hacknet server was not actually hacknet server\");\n if (hserver == null) {\n throw helper.makeRuntimeErrorMsg(\n callingFn,\n `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`,\n );\n }\n\n return hserver;\n } else {\n const node = player.hacknetNodes[i];\n if (!(node instanceof HacknetNode)) throw new Error(\"hacknet node was not node.\");\n return node;\n }\n };\n\n return {\n numNodes: function (): number {\n return player.hacknetNodes.length;\n },\n maxNumNodes: function (): number {\n if (hasHacknetServers(player)) {\n return HacknetServerConstants.MaxServers;\n }\n return Infinity;\n },\n purchaseNode: function (): number {\n return purchaseHacknet(player);\n },\n getPurchaseNodeCost: function (): number {\n if (hasHacknetServers(player)) {\n return getCostOfNextHacknetServer(player);\n } else {\n return getCostOfNextHacknetNode(player);\n }\n },\n getNodeStats: function (_i: unknown): NodeStats {\n const i = helper.number(\"getNodeStats\", \"i\", _i);\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = hasHacknetServers(player);\n const res: any = {\n name: node instanceof HacknetServer ? node.hostname : node.name,\n level: node.level,\n ram: node instanceof HacknetServer ? node.maxRam : node.ram,\n ramUsed: node instanceof HacknetServer ? node.ramUsed : undefined,\n cores: node.cores,\n production: node instanceof HacknetServer ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: node instanceof HacknetServer ? node.totalHashesGenerated : node.totalMoneyGenerated,\n };\n\n if (hasUpgraded && node instanceof HacknetServer) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeLevel\", \"i\", _i);\n const n = helper.number(\"upgradeLevel\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeLevel\");\n return purchaseLevelUpgrade(player, node, n);\n },\n upgradeRam: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeRam\", \"i\", _i);\n const n = helper.number(\"upgradeRam\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeRam\");\n return purchaseRamUpgrade(player, node, n);\n },\n upgradeCore: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeCore\", \"i\", _i);\n const n = helper.number(\"upgradeCore\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeCore\");\n return purchaseCoreUpgrade(player, node, n);\n },\n upgradeCache: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeCache\", \"i\", _i);\n const n = helper.number(\"upgradeCache\", \"n\", _n);\n if (!hasHacknetServers(player)) {\n return false;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.upgradeCache\", () => \"Can only be called on hacknet servers\");\n return false;\n }\n const res = purchaseCacheUpgrade(player, node, n);\n if (res) {\n updateHashManagerCapacity(player);\n }\n return res;\n },\n getLevelUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getLevelUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getLevelUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, player.hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getRamUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getRamUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, player.hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getCoreUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getCoreUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, player.hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getCacheUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getCacheUpgradeCost\", \"n\", _n);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.getCacheUpgradeCost\", () => \"Can only be called on hacknet servers\");\n return -1;\n }\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.hashes;\n },\n hashCapacity: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.capacity;\n },\n hashCost: function (_upgName: unknown): number {\n const upgName = helper.string(\"hashCost\", \"upgName\", _upgName);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n\n return player.hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (_upgName: unknown, _upgTarget: unknown = \"\"): boolean {\n const upgName = helper.string(\"spendHashes\", \"upgName\", _upgName);\n const upgTarget = helper.string(\"spendHashes\", \"upgTarget\", _upgTarget);\n if (!hasHacknetServers(player)) {\n return false;\n }\n return purchaseHashUpgrade(player, upgName, upgTarget);\n },\n getHashUpgrades: function (): string[] {\n if (!hasHacknetServers(player)) {\n return [];\n }\n return Object.values(HashUpgrades).map((upgrade: HashUpgrade) => upgrade.name);\n },\n getHashUpgradeLevel: function (_upgName: unknown): number {\n const upgName = helper.string(\"getHashUpgradeLevel\", \"upgName\", _upgName);\n const level = player.hashManager.upgrades[upgName];\n if (level === undefined) {\n throw helper.makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n return level;\n },\n getStudyMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getStudyMult();\n },\n getTrainingMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getTrainingMult();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\n\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { Fragments, FragmentById } from \"../CotMG/Fragment\";\n\nimport {\n Stanek as IStanek,\n Fragment as IFragment,\n ActiveFragment as IActiveFragment,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IStanek {\n function checkStanekAPIAccess(func: string): void {\n if (!player.hasAugmentation(AugmentationNames.StaneksGift1, true)) {\n helper.makeRuntimeErrorMsg(func, \"Requires Stanek's Gift installed.\");\n }\n }\n\n return {\n giftWidth: function (): number {\n helper.updateDynamicRam(\"giftWidth\", getRamCost(player, \"stanek\", \"giftWidth\"));\n checkStanekAPIAccess(\"giftWidth\");\n return staneksGift.width();\n },\n giftHeight: function (): number {\n helper.updateDynamicRam(\"giftHeight\", getRamCost(player, \"stanek\", \"giftHeight\"));\n checkStanekAPIAccess(\"giftHeight\");\n return staneksGift.height();\n },\n chargeFragment: function (_rootX: unknown, _rootY: unknown): Promise {\n const rootX = helper.number(\"stanek.chargeFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.chargeFragment\", \"rootY\", _rootY);\n\n helper.updateDynamicRam(\"chargeFragment\", getRamCost(player, \"stanek\", \"chargeFragment\"));\n checkStanekAPIAccess(\"chargeFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (!fragment)\n throw helper.makeRuntimeErrorMsg(\"stanek.chargeFragment\", `No fragment with root (${rootX}, ${rootY}).`);\n const time = staneksGift.inBonus() ? 200 : 1000;\n return netscriptDelay(time, workerScript).then(function () {\n const charge = staneksGift.charge(player, fragment, workerScript.scriptRef.threads);\n workerScript.log(\"stanek.chargeFragment\", () => `Charged fragment for ${charge} charge.`);\n return Promise.resolve();\n });\n },\n fragmentDefinitions: function (): IFragment[] {\n helper.updateDynamicRam(\"fragmentDefinitions\", getRamCost(player, \"stanek\", \"fragmentDefinitions\"));\n checkStanekAPIAccess(\"fragmentDefinitions\");\n workerScript.log(\"stanek.fragmentDefinitions\", () => `Returned ${Fragments.length} fragments`);\n return Fragments.map((f) => f.copy());\n },\n activeFragments: function (): IActiveFragment[] {\n helper.updateDynamicRam(\"activeFragments\", getRamCost(player, \"stanek\", \"activeFragments\"));\n checkStanekAPIAccess(\"activeFragments\");\n workerScript.log(\"stanek.activeFragments\", () => `Returned ${staneksGift.fragments.length} fragments`);\n return staneksGift.fragments.map((af) => {\n return { ...af.copy(), ...af.fragment().copy() };\n });\n },\n clearGift: function (): void {\n helper.updateDynamicRam(\"clearGift\", getRamCost(player, \"stanek\", \"clearGift\"));\n checkStanekAPIAccess(\"clearGift\");\n workerScript.log(\"stanek.clearGift\", () => `Cleared Stanek's Gift.`);\n staneksGift.clear();\n },\n canPlaceFragment: function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = helper.number(\"stanek.canPlaceFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.canPlaceFragment\", \"rootY\", _rootY);\n const rotation = helper.number(\"stanek.canPlaceFragment\", \"rotation\", _rotation);\n const fragmentId = helper.number(\"stanek.canPlaceFragment\", \"fragmentId\", _fragmentId);\n helper.updateDynamicRam(\"canPlaceFragment\", getRamCost(player, \"stanek\", \"canPlaceFragment\"));\n checkStanekAPIAccess(\"canPlaceFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw helper.makeRuntimeErrorMsg(\"stanek.canPlaceFragment\", `Invalid fragment id: ${fragmentId}`);\n const can = staneksGift.canPlace(rootX, rootY, rotation, fragment);\n return can;\n },\n placeFragment: function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = helper.number(\"stanek.placeFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.placeFragment\", \"rootY\", _rootY);\n const rotation = helper.number(\"stanek.placeFragment\", \"rotation\", _rotation);\n const fragmentId = helper.number(\"stanek.placeFragment\", \"fragmentId\", _fragmentId);\n helper.updateDynamicRam(\"placeFragment\", getRamCost(player, \"stanek\", \"placeFragment\"));\n checkStanekAPIAccess(\"placeFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw helper.makeRuntimeErrorMsg(\"stanek.placeFragment\", `Invalid fragment id: ${fragmentId}`);\n return staneksGift.place(rootX, rootY, rotation, fragment);\n },\n getFragment: function (_rootX: unknown, _rootY: unknown): IActiveFragment | undefined {\n const rootX = helper.number(\"stanek.getFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.getFragment\", \"rootY\", _rootY);\n helper.updateDynamicRam(\"getFragment\", getRamCost(player, \"stanek\", \"getFragment\"));\n checkStanekAPIAccess(\"getFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (fragment !== undefined) return fragment.copy();\n return undefined;\n },\n removeFragment: function (_rootX: unknown, _rootY: unknown): boolean {\n const rootX = helper.number(\"stanek.removeFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.removeFragment\", \"rootY\", _rootY);\n helper.updateDynamicRam(\"removeFragment\", getRamCost(player, \"stanek\", \"removeFragment\"));\n checkStanekAPIAccess(\"removeFragment\");\n return staneksGift.delete(rootX, rootY);\n },\n };\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nexport function CalculateEffect(avgCharge: number, numCharge: number, power: number, boost: number): number {\n return (\n 1 +\n (Math.log(avgCharge + 1) / (Math.log(1.8) * 100)) *\n Math.pow((numCharge + 1) / 5, 0.07) *\n power *\n boost *\n BitNodeMultipliers.StaneksGiftPowerMultiplier\n );\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { GameInfo, IStyleSettings, UserInterface as IUserInterface, UserInterfaceTheme } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeEvents } from \"../Themes/ui/Theme\";\nimport { defaultTheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { CONSTANTS } from \"../Constants\";\nimport { hash } from \"../hash/hash\";\n\nexport function NetscriptUserInterface(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): IUserInterface {\n return {\n getTheme: function (): UserInterfaceTheme {\n helper.updateDynamicRam(\"getTheme\", getRamCost(player, \"ui\", \"getTheme\"));\n return { ...Settings.theme };\n },\n\n getStyles: function (): IStyleSettings {\n helper.updateDynamicRam(\"getStyles\", getRamCost(player, \"ui\", \"getStyles\"));\n return { ...Settings.styles };\n },\n\n setTheme: function (newTheme: UserInterfaceTheme): void {\n helper.updateDynamicRam(\"setTheme\", getRamCost(player, \"ui\", \"setTheme\"));\n const hex = /^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/;\n const currentTheme = {...Settings.theme}\n const errors: string[] = [];\n for (const key of Object.keys(newTheme)) {\n if (!currentTheme[key]) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else if (!hex.test(newTheme[key] ?? '')) {\n errors.push(`Invalid color \"${key}\": ${newTheme[key]}`);\n } else {\n currentTheme[key] = newTheme[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.theme, currentTheme);\n ThemeEvents.emit();\n workerScript.log(\"ui.setTheme\", () => `Successfully set theme`);\n } else {\n workerScript.log(\"ui.setTheme\", () => `Failed to set theme. Errors: ${errors.join(', ')}`);\n }\n },\n\n setStyles: function (newStyles: IStyleSettings): void {\n helper.updateDynamicRam(\"setStyles\", getRamCost(player, \"ui\", \"setStyles\"));\n\n const currentStyles = {...Settings.styles}\n const errors: string[] = [];\n for (const key of Object.keys(newStyles)) {\n if (!((currentStyles as any)[key])) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else {\n (currentStyles as any)[key] = (newStyles as any)[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.styles, currentStyles);\n ThemeEvents.emit();\n workerScript.log(\"ui.setStyles\", () => `Successfully set styles`);\n } else {\n workerScript.log(\"ui.setStyles\", () => `Failed to set styles. Errors: ${errors.join(', ')}`);\n }\n },\n\n resetTheme: function (): void {\n helper.updateDynamicRam(\"resetTheme\", getRamCost(player, \"ui\", \"resetTheme\"));\n Settings.theme = { ...defaultTheme };\n ThemeEvents.emit();\n workerScript.log(\"ui.resetTheme\", () => `Reinitialized theme to default`);\n },\n\n resetStyles: function (): void {\n helper.updateDynamicRam(\"resetStyles\", getRamCost(player, \"ui\", \"resetStyles\"));\n Settings.styles = { ...defaultStyles };\n ThemeEvents.emit();\n workerScript.log(\"ui.resetStyles\", () => `Reinitialized styles to default`);\n },\n\n getGameInfo: function (): GameInfo {\n helper.updateDynamicRam(\"getGameInfo\", getRamCost(player, \"ui\", \"getGameInfo\"));\n const version = CONSTANTS.VersionString;\n const commit = hash();\n const platform = (navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1) ? 'Steam' : 'Browser';\n\n const gameInfo = {\n version, commit, platform,\n }\n\n return gameInfo;\n }\n }\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Bladeburner } from \"../Bladeburner/Bladeburner\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Bladeburner as INetscriptBladeburner, BladeburnerCurAction } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { IAction } from \"src/Bladeburner/IAction\";\n\nexport function NetscriptBladeburner(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): INetscriptBladeburner {\n const checkBladeburnerAccess = function (func: string, skipjoined = false): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const apiAccess =\n player.bitNodeN === 7 ||\n player.sourceFiles.some((a) => {\n return a.n === 7;\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 helper.makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n if (!skipjoined) {\n const bladeburnerAccess = bladeburner instanceof Bladeburner;\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func: string, city: string): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n if (!bladeburner.cities.hasOwnProperty(city)) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const getBladeburnerActionObject = function (func: string, type: string, name: string): IAction {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const actionId = bladeburner.getActionIdFromTypeAndName(type, name);\n if (!actionId) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n const actionObj = bladeburner.getActionObject(actionId);\n if (!actionObj) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n return {\n getContractNames: function (): string[] {\n helper.updateDynamicRam(\"getContractNames\", getRamCost(player, \"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function (): string[] {\n helper.updateDynamicRam(\"getOperationNames\", getRamCost(player, \"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function (): string[] {\n helper.updateDynamicRam(\"getBlackOpNames\", getRamCost(player, \"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (_blackOpName: unknown): number {\n const blackOpName = helper.string(\"getBlackOpRank\", \"blackOpName\", _blackOpName);\n helper.updateDynamicRam(\"getBlackOpRank\", getRamCost(player, \"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action: any = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", blackOpName);\n return action.reqdRank;\n },\n getGeneralActionNames: function (): string[] {\n helper.updateDynamicRam(\"getGeneralActionNames\", getRamCost(player, \"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function (): string[] {\n helper.updateDynamicRam(\"getSkillNames\", getRamCost(player, \"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (_type: unknown, _name: unknown): boolean {\n const type = helper.string(\"startAction\", \"type\", _type);\n const name = helper.string(\"startAction\", \"name\", _name);\n helper.updateDynamicRam(\"startAction\", getRamCost(player, \"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.startActionNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function (): void {\n helper.updateDynamicRam(\"stopBladeburnerAction\", getRamCost(player, \"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.resetAction();\n },\n getCurrentAction: function (): BladeburnerCurAction {\n helper.updateDynamicRam(\"getCurrentAction\", getRamCost(player, \"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n },\n getActionTime: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionTime\", \"type\", _type);\n const name = helper.string(\"getActionTime\", \"name\", _name);\n helper.updateDynamicRam(\"getActionTime\", getRamCost(player, \"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionTimeNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (_type: unknown, _name: unknown): [number, number] {\n const type = helper.string(\"getActionEstimatedSuccessChance\", \"type\", _type);\n const name = helper.string(\"getActionEstimatedSuccessChance\", \"name\", _name);\n helper.updateDynamicRam(\n \"getActionEstimatedSuccessChance\",\n getRamCost(player, \"bladeburner\", \"getActionEstimatedSuccessChance\"),\n );\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (_type: unknown, _name: unknown, _level: unknown): number {\n const type = helper.string(\"getActionRepGain\", \"type\", _type);\n const name = helper.string(\"getActionRepGain\", \"name\", _name);\n const level = helper.number(\"getActionRepGain\", \"level\", _level);\n helper.updateDynamicRam(\"getActionRepGain\", getRamCost(player, \"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\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 * BitNodeMultipliers.BladeburnerRank;\n },\n getActionCountRemaining: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionCountRemaining\", \"type\", _type);\n const name = helper.string(\"getActionCountRemaining\", \"name\", _name);\n helper.updateDynamicRam(\"getActionCountRemaining\", getRamCost(player, \"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionMaxLevel\", \"type\", _type);\n const name = helper.string(\"getActionMaxLevel\", \"name\", _name);\n helper.updateDynamicRam(\"getActionMaxLevel\", getRamCost(player, \"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionCurrentLevel\", \"type\", _type);\n const name = helper.string(\"getActionCurrentLevel\", \"name\", _name);\n helper.updateDynamicRam(\"getActionCurrentLevel\", getRamCost(player, \"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (_type: unknown, _name: unknown): boolean {\n const type = helper.string(\"getActionAutolevel\", \"type\", _type);\n const name = helper.string(\"getActionAutolevel\", \"name\", _name);\n helper.updateDynamicRam(\"getActionAutolevel\", getRamCost(player, \"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (_type: unknown, _name: unknown, _autoLevel: unknown = true): void {\n const type = helper.string(\"setActionAutolevel\", \"type\", _type);\n const name = helper.string(\"setActionAutolevel\", \"name\", _name);\n const autoLevel = helper.boolean(_autoLevel);\n helper.updateDynamicRam(\"setActionAutolevel\", getRamCost(player, \"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (_type: unknown, _name: unknown, _level: unknown = 1): void {\n const type = helper.string(\"setActionLevel\", \"type\", _type);\n const name = helper.string(\"setActionLevel\", \"name\", _name);\n const level = helper.number(\"setActionLevel\", \"level\", _level);\n helper.updateDynamicRam(\"setActionLevel\", getRamCost(player, \"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n if (level < 1 || level > action.maxLevel) {\n throw helper.makeRuntimeErrorMsg(\n \"bladeburner.setActionLevel\",\n `Level must be between 1 and ${action.maxLevel}, is ${level}`,\n );\n }\n action.level = level;\n },\n getRank: function (): number {\n helper.updateDynamicRam(\"getRank\", getRamCost(player, \"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.rank;\n },\n getSkillPoints: function (): number {\n helper.updateDynamicRam(\"getSkillPoints\", getRamCost(player, \"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.skillPoints;\n },\n getSkillLevel: function (_skillName: unknown): number {\n const skillName = helper.string(\"getSkillLevel\", \"skillName\", _skillName);\n helper.updateDynamicRam(\"getSkillLevel\", getRamCost(player, \"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (_skillName: unknown): number {\n const skillName = helper.string(\"getSkillUpgradeCost\", \"skillName\", _skillName);\n helper.updateDynamicRam(\"getSkillUpgradeCost\", getRamCost(player, \"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (_skillName: unknown): boolean {\n const skillName = helper.string(\"upgradeSkill\", \"skillName\", _skillName);\n helper.updateDynamicRam(\"upgradeSkill\", getRamCost(player, \"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getTeamSize\", \"type\", _type);\n const name = helper.string(\"getTeamSize\", \"name\", _name);\n helper.updateDynamicRam(\"getTeamSize\", getRamCost(player, \"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (_type: unknown, _name: unknown, _size: unknown): number {\n const type = helper.string(\"setTeamSize\", \"type\", _type);\n const name = helper.string(\"setTeamSize\", \"name\", _name);\n const size = helper.number(\"setTeamSize\", \"size\", _size);\n helper.updateDynamicRam(\"setTeamSize\", getRamCost(player, \"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (_cityName: unknown): number {\n const cityName = helper.string(\"getCityEstimatedPopulation\", \"cityName\", _cityName);\n helper.updateDynamicRam(\n \"getCityEstimatedPopulation\",\n getRamCost(player, \"bladeburner\", \"getCityEstimatedPopulation\"),\n );\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].popEst;\n },\n getCityCommunities: function (_cityName: unknown): number {\n const cityName = helper.string(\"getCityCommunities\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"getCityCommunities\", getRamCost(player, \"bladeburner\", \"getCityCommunities\"));\n checkBladeburnerAccess(\"getCityCommunities\");\n checkBladeburnerCity(\"getCityCommunities\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].comms;\n },\n getCityChaos: function (_cityName: unknown): number {\n const cityName = helper.string(\"getCityChaos\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"getCityChaos\", getRamCost(player, \"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].chaos;\n },\n getCity: function (): string {\n helper.updateDynamicRam(\"getCity\", getRamCost(player, \"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.city;\n },\n switchCity: function (_cityName: unknown): boolean {\n const cityName = helper.string(\"switchCity\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"switchCity\", getRamCost(player, \"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n bladeburner.city = cityName;\n return true;\n },\n getStamina: function (): [number, number] {\n helper.updateDynamicRam(\"getStamina\", getRamCost(player, \"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return [bladeburner.stamina, bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function (): boolean {\n helper.updateDynamicRam(\"joinBladeburnerFaction\", getRamCost(player, \"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function (): boolean {\n helper.updateDynamicRam(\"joinBladeburnerDivision\", getRamCost(player, \"bladeburner\", \"joinBladeburnerDivision\"));\n if (player.bitNodeN === 7 || player.sourceFileLvl(7) > 0) {\n if (player.bitNodeN === 8) {\n return false;\n }\n if (player.bladeburner instanceof Bladeburner) {\n return true; // Already member\n } else if (\n player.strength >= 100 &&\n player.defense >= 100 &&\n player.dexterity >= 100 &&\n player.agility >= 100\n ) {\n player.bladeburner = new Bladeburner(player);\n workerScript.log(\"joinBladeburnerDivision\", () => \"You have been accepted into the Bladeburner division\");\n\n return true;\n } else {\n workerScript.log(\n \"joinBladeburnerDivision\",\n () => \"You do not meet the requirements for joining the Bladeburner division\",\n );\n return false;\n }\n }\n return false;\n },\n getBonusTime: function (): number {\n helper.updateDynamicRam(\"getBonusTime\", getRamCost(player, \"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return Math.round(bladeburner.storedCycles / 5) * 1000;\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { is2DArray } from \"../utils/helpers/is2DArray\";\nimport { CodingContract } from \"../CodingContracts\";\nimport { CodingAttemptOptions, CodingContract as ICodingContract } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptCodingContract(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): ICodingContract {\n const getCodingContract = function (func: string, hostname: string, filename: string): CodingContract {\n const server = helper.getServer(hostname, func);\n const contract = server.getContract(filename);\n if (contract == null) {\n throw helper.makeRuntimeErrorMsg(\n `codingcontract.${func}`,\n `Cannot find contract '${filename}' on server '${hostname}'`,\n );\n }\n\n return contract;\n };\n\n return {\n attempt: function (\n answer: any,\n _filename: unknown,\n _hostname: unknown = workerScript.hostname,\n { returnReward }: CodingAttemptOptions = { returnReward: false },\n ): boolean | string {\n const filename = helper.string(\"attempt\", \"filename\", _filename);\n const hostname = helper.string(\"attempt\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"attempt\", getRamCost(player, \"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", hostname, filename);\n\n // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n if (is2DArray(answer)) {\n const answerComponents = [];\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 creward = contract.reward;\n if (creward === null) throw new Error(\"Somehow solved a contract that didn't have a reward\");\n\n const serv = helper.getServer(hostname, \"codingcontract.attempt\");\n if (contract.isSolution(answer)) {\n const reward = player.gainCodingContractReward(creward, contract.getDifficulty());\n workerScript.log(\n \"codingcontract.attempt\",\n () => `Successfully completed Coding Contract '${filename}'. Reward: ${reward}`,\n );\n serv.removeContract(filename);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\n \"codingcontract.attempt\",\n () => `Coding Contract attempt '${filename}' failed. Contract is now self-destructing`,\n );\n serv.removeContract(filename);\n } else {\n workerScript.log(\n \"codingcontract.attempt\",\n () =>\n `Coding Contract attempt '${filename}' failed. ${\n contract.getMaxNumTries() - contract.tries\n } attempts remaining.`,\n );\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (_filename: unknown, _hostname: unknown = workerScript.hostname): string {\n const filename = helper.string(\"getContractType\", \"filename\", _filename);\n const hostname = helper.string(\"getContractType\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getContractType\", getRamCost(player, \"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", hostname, filename);\n return contract.getType();\n },\n getData: function (_filename: unknown, _hostname: unknown = workerScript.hostname): any {\n const filename = helper.string(\"getContractType\", \"filename\", _filename);\n const hostname = helper.string(\"getContractType\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getData\", getRamCost(player, \"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", hostname, filename);\n const data = contract.getData();\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 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 (_filename: unknown, _hostname: unknown = workerScript.hostname): string {\n const filename = helper.string(\"getDescription\", \"filename\", _filename);\n const hostname = helper.string(\"getDescription\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getDescription\", getRamCost(player, \"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", hostname, filename);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (_filename: unknown, _hostname: unknown = workerScript.hostname): number {\n const filename = helper.string(\"getNumTriesRemaining\", \"filename\", _filename);\n const hostname = helper.string(\"getNumTriesRemaining\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getNumTriesRemaining\", getRamCost(player, \"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", hostname, filename);\n return contract.getMaxNumTries() - contract.tries;\n },\n };\n}\n","// Checks whether an array is a 2D array.\n// For this, a 2D array is an array which contains only other arrays.\n// If one element in the array is a number or string, it is NOT a 2D array\nexport function is2DArray(arr: any[]): boolean {\n if (arr.constructor !== Array) {\n return false;\n }\n\n return arr.every((e) => {\n return e.constructor === Array;\n });\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\n\nimport { OfficeSpace } from \"../Corporation/OfficeSpace\";\nimport { Employee } from \"../Corporation/Employee\";\nimport { Product } from \"../Corporation/Product\";\nimport { Material } from \"../Corporation/Material\";\nimport { Warehouse } from \"../Corporation/Warehouse\";\nimport { IIndustry } from \"../Corporation/IIndustry\";\nimport { ICorporation } from \"../Corporation/ICorporation\";\n\nimport {\n Corporation as NSCorporation,\n CorporationInfo,\n Employee as NSEmployee,\n Product as NSProduct,\n Material as NSMaterial,\n Warehouse as NSWarehouse,\n Division as NSDivision,\n WarehouseAPI,\n OfficeAPI,\n InvestmentOffer,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport {\n NewIndustry,\n NewCity,\n UnlockUpgrade,\n LevelUpgrade,\n IssueDividends,\n SellMaterial,\n SellProduct,\n SetSmartSupply,\n BuyMaterial,\n AssignJob,\n UpgradeOfficeSize,\n ThrowParty,\n PurchaseWarehouse,\n UpgradeWarehouse,\n BuyCoffee,\n HireAdVert,\n MakeProduct,\n Research,\n ExportMaterial,\n CancelExportMaterial,\n SetMaterialMarketTA1,\n SetMaterialMarketTA2,\n SetProductMarketTA1,\n SetProductMarketTA2,\n BulkPurchase,\n SellShares,\n BuyBackShares,\n SetSmartSupplyUseLeftovers,\n} from \"../Corporation/Actions\";\nimport { CorporationUnlockUpgrades } from \"../Corporation/data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrades } from \"../Corporation/data/CorporationUpgrades\";\nimport { EmployeePositions } from \"../Corporation/EmployeePositions\";\nimport { calculateIntelligenceBonus } from \"../PersonObjects/formulas/intelligence\";\nimport { Industry } from \"../Corporation/Industry\";\nimport { IndustryResearchTrees, IndustryStartingCosts } from \"../Corporation/IndustryData\";\nimport { CorporationConstants } from \"../Corporation/data/Constants\";\nimport { IndustryUpgrades } from \"../Corporation/IndustryUpgrades\";\nimport { ResearchMap } from \"../Corporation/ResearchMap\";\nimport { Factions } from \"../Faction/Factions\";\n\nexport function NetscriptCorporation(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): NSCorporation {\n function createCorporation(corporationName: string, selfFund = true): boolean {\n if (!player.canAccessCorporation() || player.hasCorporation()) return false;\n if (!corporationName) return false;\n if (player.bitNodeN !== 3 && !selfFund) throw new Error(\"cannot use seed funds outside of BitNode 3\");\n\n if (selfFund) {\n if (!player.canAfford(150e9)) return false;\n\n player.startCorporation(corporationName);\n player.loseMoney(150e9, \"corporation\");\n } else {\n player.startCorporation(corporationName, 500e6);\n }\n return true;\n }\n\n function hasUnlockUpgrade(upgradeName: string): boolean {\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade[0];\n return corporation.unlockUpgrades[upgN] === 1;\n }\n\n function getUnlockUpgradeCost(upgradeName: string): number {\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n return upgrade[1];\n }\n\n function getUpgradeLevel(_upgradeName: string): number {\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade[0];\n return corporation.upgrades[upgN];\n }\n\n function getUpgradeLevelCost(_upgradeName: string): number {\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgN];\n return baseCost * Math.pow(priceMult, level);\n }\n\n function getExpandIndustryCost(industryName: string): number {\n const cost = IndustryStartingCosts[industryName];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industryName}'`);\n }\n return cost;\n }\n\n function getExpandCityCost(): number {\n return CorporationConstants.OfficeInitialCost;\n }\n\n function getInvestmentOffer(): InvestmentOffer {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return {\n funds: 0,\n shares: 0,\n round: corporation.fundingRound + 1, // Make more readable\n }; // Don't throw an error here, no reason to have a second function to check if you can get investment.\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n return {\n funds: funding,\n shares: investShares,\n round: corporation.fundingRound + 1, // Make more readable\n };\n }\n\n function acceptInvestmentOffer(): boolean {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return false;\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n return true;\n }\n\n function goPublic(numShares: number): boolean {\n const corporation = getCorporation();\n const initialSharePrice = corporation.determineValuation() / corporation.totalShares;\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to issue!\");\n corporation.public = true;\n corporation.sharePrice = initialSharePrice;\n corporation.issuedShares = numShares;\n corporation.numShares -= numShares;\n corporation.addFunds(numShares * initialSharePrice);\n return true;\n }\n\n function getResearchCost(division: IIndustry, researchName: string): number {\n const researchTree = IndustryResearchTrees[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[researchName];\n return research.cost;\n }\n\n function hasResearched(division: IIndustry, researchName: string): boolean {\n return division.researched[researchName] === undefined ? false : (division.researched[researchName] as boolean);\n }\n\n function bribe(factionName: string, amountCash: number, amountShares: number): boolean {\n if (!player.factions.includes(factionName)) throw new Error(\"Invalid faction name\");\n if (isNaN(amountCash) || amountCash < 0 || isNaN(amountShares) || amountShares < 0)\n throw new Error(\"Invalid value for amount field! Must be numeric, grater than 0.\");\n\n const corporation = getCorporation();\n if (corporation.funds < amountCash) return false;\n if (corporation.numShares < amountShares) return false;\n const faction = Factions[factionName];\n const info = faction.getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(factionName)) return false;\n\n const repGain = (amountCash + amountShares * corporation.sharePrice) / CorporationConstants.BribeToRepRatio;\n faction.playerReputation += repGain;\n corporation.funds = corporation.funds - amountCash;\n corporation.numShares -= amountShares;\n\n return true;\n }\n\n function getCorporation(): ICorporation {\n const corporation = player.corporation;\n if (corporation === null) throw new Error(\"cannot be called without a corporation\");\n return corporation;\n }\n\n function getDivision(divisionName: string): IIndustry {\n const corporation = getCorporation();\n const division = 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: string, cityName: string): OfficeSpace {\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: string, cityName: string): Warehouse {\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: string, cityName: string, materialName: string): Material {\n const warehouse = getWarehouse(divisionName, cityName);\n const matName = (materialName as string).replace(/ /g, \"\");\n const material = warehouse.materials[matName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName: string, productName: string): Product {\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: string, cityName: string, employeeName: string): Employee {\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 function checkAccess(func: string, api?: number): void {\n if (player.corporation === null) throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"Must own a corporation.\");\n if (!api) return;\n\n if (!player.corporation.unlockUpgrades[api])\n throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"You do not have access to this API.\");\n }\n\n function getSafeDivision(division: Industry): NSDivision {\n const cities: string[] = [];\n for (const office of Object.values(division.offices)) {\n if (office === 0) continue;\n cities.push(office.loc);\n }\n return {\n name: division.name,\n type: division.type,\n awareness: division.awareness,\n popularity: division.popularity,\n prodMult: division.prodMult,\n research: division.sciResearch.qty,\n lastCycleRevenue: division.lastCycleRevenue,\n lastCycleExpenses: division.lastCycleExpenses,\n thisCycleRevenue: division.thisCycleRevenue,\n thisCycleExpenses: division.thisCycleExpenses,\n upgrades: division.upgrades.slice(),\n cities: cities,\n products: division.products === undefined ? [] : Object.keys(division.products),\n };\n }\n\n const warehouseAPI: WarehouseAPI = {\n getPurchaseWarehouseCost: function (): number {\n checkAccess(\"getPurchaseWarehouseCost\", 7);\n return CorporationConstants.WarehouseInitialCost;\n },\n getUpgradeWarehouseCost: function (_divisionName: unknown, _cityName: unknown): number {\n checkAccess(\"upgradeWarehouse\", 7);\n const divisionName = helper.string(\"getUpgradeWarehouseCost\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getUpgradeWarehouseCost\", \"cityName\", _cityName);\n const warehouse = getWarehouse(divisionName, cityName);\n return CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n },\n hasWarehouse: function (_divisionName: unknown, _cityName: unknown): boolean {\n checkAccess(\"hasWarehouse\", 7);\n const divisionName = helper.string(\"getWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getWarehouse\", \"cityName\", _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 return warehouse !== 0;\n },\n getWarehouse: function (_divisionName: unknown, _cityName: unknown): NSWarehouse {\n checkAccess(\"getWarehouse\", 7);\n const divisionName = helper.string(\"getWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getWarehouse\", \"cityName\", _cityName);\n const warehouse = getWarehouse(divisionName, cityName);\n return {\n level: warehouse.level,\n loc: warehouse.loc,\n size: warehouse.size,\n sizeUsed: warehouse.sizeUsed,\n smartSupplyEnabled: warehouse.smartSupplyEnabled,\n };\n },\n getMaterial: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown): NSMaterial {\n checkAccess(\"getMaterial\", 7);\n const divisionName = helper.string(\"getMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"getMaterial\", \"materialName\", _materialName);\n const material = getMaterial(divisionName, cityName, materialName);\n return {\n name: material.name,\n qty: material.qty,\n qlt: material.qlt,\n prod: material.prd,\n sell: material.sll,\n };\n },\n getProduct: function (_divisionName: unknown, _productName: unknown): NSProduct {\n checkAccess(\"getProduct\", 7);\n const divisionName = helper.string(\"getProduct\", \"divisionName\", _divisionName);\n const productName = helper.string(\"getProduct\", \"productName\", _productName);\n const product = getProduct(divisionName, productName);\n return {\n name: product.name,\n dmd: product.dmd,\n cmp: product.cmp,\n pCost: product.pCost,\n sCost: product.sCost,\n cityData: product.data,\n developmentProgress: product.prog,\n };\n },\n purchaseWarehouse: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"purchaseWarehouse\", 7);\n const divisionName = helper.string(\"purchaseWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"purchaseWarehouse\", \"cityName\", _cityName);\n const corporation = getCorporation();\n PurchaseWarehouse(corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"upgradeWarehouse\", 7);\n const divisionName = helper.string(\"upgradeWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"upgradeWarehouse\", \"cityName\", _cityName);\n const corporation = getCorporation();\n UpgradeWarehouse(corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n sellMaterial: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _amt: unknown,\n _price: unknown,\n ): void {\n checkAccess(\"sellMaterial\", 7);\n const divisionName = helper.string(\"sellMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"sellMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"sellMaterial\", \"amt\", _amt);\n const price = helper.string(\"sellMaterial\", \"price\", _price);\n const material = getMaterial(divisionName, cityName, materialName);\n SellMaterial(material, amt, price);\n },\n sellProduct: function (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _amt: unknown,\n _price: unknown,\n _all: unknown,\n ): void {\n checkAccess(\"sellProduct\", 7);\n const divisionName = helper.string(\"sellProduct\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const productName = helper.string(\"sellProduct\", \"productName\", _productName);\n const amt = helper.string(\"sellProduct\", \"amt\", _amt);\n const price = helper.string(\"sellProduct\", \"price\", _price);\n const all = helper.boolean(_all);\n const product = getProduct(divisionName, productName);\n SellProduct(product, cityName, amt, price, all);\n },\n discontinueProduct: function (_divisionName: unknown, _productName: unknown): void {\n checkAccess(\"discontinueProduct\", 7);\n const divisionName = helper.string(\"discontinueProduct\", \"divisionName\", _divisionName);\n const productName = helper.string(\"discontinueProduct\", \"productName\", _productName);\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (_divisionName: unknown, _cityName: unknown, _enabled: unknown): void {\n checkAccess(\"setSmartSupply\", 7);\n const divisionName = helper.string(\"setSmartSupply\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const enabled = helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setSmartSupply`,\n `You have not purchased the Smart Supply upgrade!`,\n );\n SetSmartSupply(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _enabled: unknown,\n ): void {\n checkAccess(\"setSmartSupplyUseLeftovers\", 7);\n const divisionName = helper.string(\"setSmartSupply\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const materialName = helper.string(\"sellProduct\", \"materialName\", _materialName);\n const enabled = helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setSmartSupply`,\n `You have not purchased the Smart Supply upgrade!`,\n );\n SetSmartSupplyUseLeftovers(warehouse, material, enabled);\n },\n buyMaterial: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void {\n checkAccess(\"buyMaterial\", 7);\n const divisionName = helper.string(\"buyMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"buyMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"buyMaterial\", \"materialName\", _materialName);\n const amt = helper.number(\"buyMaterial\", \"amt\", _amt);\n if (amt < 0) throw new Error(\"Invalid value for amount field! Must be numeric and greater than 0\");\n const material = getMaterial(divisionName, cityName, materialName);\n BuyMaterial(material, amt);\n },\n bulkPurchase: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void {\n checkAccess(\"bulkPurchase\", 7);\n const divisionName = helper.string(\"bulkPurchase\", \"divisionName\", _divisionName);\n if (!hasResearched(getDivision(divisionName), \"Bulk Purchasing\"))\n throw new Error(`You have not researched Bulk Purchasing in ${divisionName}`);\n const corporation = getCorporation();\n const cityName = helper.city(\"bulkPurchase\", \"cityName\", _cityName);\n const materialName = helper.string(\"bulkPurchase\", \"materialName\", _materialName);\n const amt = helper.number(\"bulkPurchase\", \"amt\", _amt);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n BulkPurchase(corporation, warehouse, material, amt);\n },\n makeProduct: function (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _designInvest: unknown,\n _marketingInvest: unknown,\n ): void {\n checkAccess(\"makeProduct\", 7);\n const divisionName = helper.string(\"makeProduct\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"makeProduct\", \"cityName\", _cityName);\n const productName = helper.string(\"makeProduct\", \"productName\", _productName);\n const designInvest = helper.number(\"makeProduct\", \"designInvest\", _designInvest);\n const marketingInvest = helper.number(\"makeProduct\", \"marketingInvest\", _marketingInvest);\n const corporation = getCorporation();\n MakeProduct(corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n exportMaterial: function (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void {\n checkAccess(\"exportMaterial\", 7);\n const sourceDivision = helper.string(\"exportMaterial\", \"sourceDivision\", _sourceDivision);\n const sourceCity = helper.string(\"exportMaterial\", \"sourceCity\", _sourceCity);\n const targetDivision = helper.string(\"exportMaterial\", \"targetDivision\", _targetDivision);\n const targetCity = helper.string(\"exportMaterial\", \"targetCity\", _targetCity);\n const materialName = helper.string(\"exportMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"exportMaterial\", \"amt\", _amt);\n ExportMaterial(\n targetDivision,\n targetCity,\n getMaterial(sourceDivision, sourceCity, materialName),\n amt + \"\",\n getDivision(targetDivision),\n );\n },\n cancelExportMaterial: function (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void {\n checkAccess(\"cancelExportMaterial\", 7);\n const sourceDivision = helper.string(\"cancelExportMaterial\", \"sourceDivision\", _sourceDivision);\n const sourceCity = helper.string(\"cancelExportMaterial\", \"sourceCity\", _sourceCity);\n const targetDivision = helper.string(\"cancelExportMaterial\", \"targetDivision\", _targetDivision);\n const targetCity = helper.string(\"cancelExportMaterial\", \"targetCity\", _targetCity);\n const materialName = helper.string(\"cancelExportMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"cancelExportMaterial\", \"amt\", _amt);\n CancelExportMaterial(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _on: unknown,\n ): void {\n checkAccess(\"setMaterialMarketTA1\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA1\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setMaterialMarketTA1\", \"cityName\", _cityName);\n const materialName = helper.string(\"setMaterialMarketTA1\", \"materialName\", _materialName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setMaterialMarketTA1`,\n `You have not researched MarketTA.I for division: ${divisionName}`,\n );\n SetMaterialMarketTA1(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _on: unknown,\n ): void {\n checkAccess(\"setMaterialMarketTA2\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA2\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setMaterialMarketTA2\", \"cityName\", _cityName);\n const materialName = helper.string(\"setMaterialMarketTA2\", \"materialName\", _materialName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setMaterialMarketTA2`,\n `You have not researched MarketTA.II for division: ${divisionName}`,\n );\n SetMaterialMarketTA2(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (_divisionName: unknown, _productName: unknown, _on: unknown): void {\n checkAccess(\"setProductMarketTA1\", 7);\n const divisionName = helper.string(\"setProductMarketTA1\", \"divisionName\", _divisionName);\n const productName = helper.string(\"setProductMarketTA1\", \"productName\", _productName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setProductMarketTA1`,\n `You have not researched MarketTA.I for division: ${divisionName}`,\n );\n SetProductMarketTA1(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (_divisionName: unknown, _productName: unknown, _on: unknown): void {\n checkAccess(\"setProductMarketTA2\", 7);\n const divisionName = helper.string(\"setProductMarketTA2\", \"divisionName\", _divisionName);\n const productName = helper.string(\"setProductMarketTA2\", \"productName\", _productName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setProductMarketTA2`,\n `You have not researched MarketTA.II for division: ${divisionName}`,\n );\n SetProductMarketTA2(getProduct(divisionName, productName), on);\n },\n };\n\n const officeAPI: OfficeAPI = {\n getHireAdVertCost: function (_divisionName: unknown): number {\n checkAccess(\"getHireAdVertCost\", 8);\n const divisionName = helper.string(\"getHireAdVertCost\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n const upgrade = IndustryUpgrades[1];\n return upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n },\n getHireAdVertCount: function (_divisionName: unknown): number {\n checkAccess(\"getHireAdVertCount\", 8);\n const divisionName = helper.string(\"getHireAdVertCount\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return division.upgrades[1];\n },\n getResearchCost: function (_divisionName: unknown, _researchName: unknown): number {\n checkAccess(\"getResearchCost\", 8);\n const divisionName = helper.string(\"getResearchCost\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"getResearchCost\", \"researchName\", _researchName);\n return getResearchCost(getDivision(divisionName), researchName);\n },\n hasResearched: function (_divisionName: unknown, _researchName: unknown): boolean {\n checkAccess(\"hasResearched\", 8);\n const divisionName = helper.string(\"hasResearched\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"hasResearched\", \"researchName\", _researchName);\n return hasResearched(getDivision(divisionName), researchName);\n },\n setAutoJobAssignment: function (\n _divisionName: unknown,\n _cityName: unknown,\n _job: unknown,\n _amount: unknown,\n ): Promise {\n checkAccess(\"setAutoJobAssignment\", 8);\n const divisionName = helper.string(\"setAutoJobAssignment\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setAutoJobAssignment\", \"cityName\", _cityName);\n const amount = helper.number(\"setAutoJobAssignment\", \"amount\", _amount);\n const job = helper.string(\"setAutoJobAssignment\", \"job\", _job);\n const office = getOffice(divisionName, cityName);\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n return netscriptDelay(1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n return Promise.resolve(office.setEmployeeToJob(job, amount));\n });\n },\n getOfficeSizeUpgradeCost: function (_divisionName: unknown, _cityName: unknown, _size: unknown): number {\n checkAccess(\"getOfficeSizeUpgradeCost\", 8);\n const divisionName = helper.string(\"getOfficeSizeUpgradeCost\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getOfficeSizeUpgradeCost\", \"cityName\", _cityName);\n const size = helper.number(\"getOfficeSizeUpgradeCost\", \"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n return CorporationConstants.OfficeInitialCost * mult;\n },\n assignJob: function (\n _divisionName: unknown,\n _cityName: unknown,\n _employeeName: unknown,\n _job: unknown,\n ): Promise {\n checkAccess(\"assignJob\", 8);\n const divisionName = helper.string(\"assignJob\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"assignJob\", \"cityName\", _cityName);\n const employeeName = helper.string(\"assignJob\", \"employeeName\", _employeeName);\n const job = helper.string(\"assignJob\", \"job\", _job);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return netscriptDelay(1000, workerScript).then(function () {\n return Promise.resolve(AssignJob(employee, job));\n });\n },\n hireEmployee: function (_divisionName: unknown, _cityName: unknown): any {\n checkAccess(\"hireEmployee\", 8);\n const divisionName = helper.string(\"hireEmployee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"hireEmployee\", \"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n return office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (_divisionName: unknown, _cityName: unknown, _size: unknown): void {\n checkAccess(\"upgradeOfficeSize\", 8);\n const divisionName = helper.string(\"upgradeOfficeSize\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"upgradeOfficeSize\", \"cityName\", _cityName);\n const size = helper.number(\"upgradeOfficeSize\", \"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n UpgradeOfficeSize(corporation, office, size);\n },\n throwParty: function (_divisionName: unknown, _cityName: unknown, _costPerEmployee: unknown): Promise {\n checkAccess(\"throwParty\", 8);\n const divisionName = helper.string(\"throwParty\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"throwParty\", \"cityName\", _cityName);\n const costPerEmployee = helper.number(\"throwParty\", \"costPerEmployee\", _costPerEmployee);\n if (costPerEmployee < 0)\n throw new Error(\"Invalid value for Cost Per Employee field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(ThrowParty(corporation, office, costPerEmployee));\n });\n },\n buyCoffee: function (_divisionName: unknown, _cityName: unknown): Promise {\n checkAccess(\"buyCoffee\", 8);\n const divisionName = helper.string(\"buyCoffee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"buyCoffee\", \"cityName\", _cityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(BuyCoffee(corporation, getDivision(divisionName), getOffice(divisionName, cityName)));\n });\n },\n hireAdVert: function (_divisionName: unknown): void {\n checkAccess(\"hireAdVert\", 8);\n const divisionName = helper.string(\"hireAdVert\", \"divisionName\", _divisionName);\n const corporation = getCorporation();\n HireAdVert(corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n research: function (_divisionName: unknown, _researchName: unknown): void {\n checkAccess(\"research\", 8);\n const divisionName = helper.string(\"research\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"research\", \"researchName\", _researchName);\n Research(getDivision(divisionName), researchName);\n },\n getOffice: function (_divisionName: unknown, _cityName: unknown): any {\n checkAccess(\"getOffice\", 8);\n const divisionName = helper.string(\"getOffice\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getOffice\", \"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n return {\n loc: office.loc,\n size: office.size,\n minEne: office.minEne,\n maxEne: office.maxEne,\n minHap: office.minHap,\n maxHap: office.maxHap,\n maxMor: office.maxMor,\n employees: office.employees.map((e) => e.name),\n employeeProd: {\n Operations: office.employeeProd[EmployeePositions.Operations],\n Engineer: office.employeeProd[EmployeePositions.Engineer],\n Business: office.employeeProd[EmployeePositions.Business],\n Management: office.employeeProd[EmployeePositions.Management],\n \"Research & Development\": office.employeeProd[EmployeePositions.RandD],\n Training: office.employeeProd[EmployeePositions.Training],\n },\n };\n },\n getEmployee: function (_divisionName: unknown, _cityName: unknown, _employeeName: unknown): NSEmployee {\n checkAccess(\"getEmployee\", 8);\n const divisionName = helper.string(\"getEmployee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getEmployee\", \"cityName\", _cityName);\n const employeeName = helper.string(\"getEmployee\", \"employeeName\", _employeeName);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return {\n name: employee.name,\n mor: employee.mor,\n hap: employee.hap,\n ene: employee.ene,\n int: employee.int,\n cha: employee.cha,\n exp: employee.exp,\n cre: employee.cre,\n eff: employee.eff,\n sal: employee.sal,\n loc: employee.loc,\n pos: employee.pos,\n };\n },\n };\n\n return {\n ...warehouseAPI,\n ...officeAPI,\n expandIndustry: function (_industryName: unknown, _divisionName: unknown): void {\n checkAccess(\"expandIndustry\");\n const industryName = helper.string(\"expandIndustry\", \"industryName\", _industryName);\n const divisionName = helper.string(\"expandIndustry\", \"divisionName\", _divisionName);\n const corporation = getCorporation();\n NewIndustry(corporation, industryName, divisionName);\n },\n expandCity: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"expandCity\");\n const divisionName = helper.string(\"expandCity\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"expandCity\", \"cityName\", _cityName);\n if (!CorporationConstants.Cities.includes(cityName)) throw new Error(\"Invalid city name\");\n const corporation = getCorporation();\n const division = getDivision(divisionName);\n NewCity(corporation, division, cityName);\n },\n unlockUpgrade: function (_upgradeName: unknown): void {\n checkAccess(\"unlockUpgrade\");\n const upgradeName = helper.string(\"unlockUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n UnlockUpgrade(corporation, upgrade);\n },\n levelUpgrade: function (_upgradeName: unknown): void {\n checkAccess(\"levelUpgrade\");\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n LevelUpgrade(corporation, upgrade);\n },\n issueDividends: function (_percent: unknown): void {\n checkAccess(\"issueDividends\");\n const percent = helper.number(\"issueDividends\", \"percent\", _percent);\n if (percent < 0 || percent > 100)\n throw new Error(\"Invalid value for percent field! Must be numeric, greater than 0, and less than 100\");\n const corporation = getCorporation();\n if (!corporation.public)\n throw helper.makeRuntimeErrorMsg(`corporation.issueDividends`, `Your company has not gone public!`);\n IssueDividends(corporation, percent);\n },\n\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (_divisionName: unknown): NSDivision {\n checkAccess(\"getDivision\");\n const divisionName = helper.string(\"getDivision\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return getSafeDivision(division);\n },\n getCorporation: function (): CorporationInfo {\n checkAccess(\"getCorporation\");\n const corporation = getCorporation();\n return {\n name: corporation.name,\n funds: corporation.funds,\n revenue: corporation.revenue,\n expenses: corporation.expenses,\n public: corporation.public,\n totalShares: corporation.totalShares,\n numShares: corporation.numShares,\n shareSaleCooldown: corporation.shareSaleCooldown,\n issuedShares: corporation.issuedShares,\n sharePrice: corporation.sharePrice,\n state: corporation.state.getState(),\n divisions: corporation.divisions.map((division): NSDivision => getSafeDivision(division)),\n };\n },\n createCorporation: function (_corporationName: unknown, _selfFund: unknown = true): boolean {\n const corporationName = helper.string(\"createCorporation\", \"corporationName\", _corporationName);\n const selfFund = helper.boolean(_selfFund);\n return createCorporation(corporationName, selfFund);\n },\n hasUnlockUpgrade: function (_upgradeName: unknown): boolean {\n checkAccess(\"hasUnlockUpgrade\");\n const upgradeName = helper.string(\"hasUnlockUpgrade\", \"upgradeName\", _upgradeName);\n return hasUnlockUpgrade(upgradeName);\n },\n getUnlockUpgradeCost: function (_upgradeName: unknown): number {\n checkAccess(\"getUnlockUpgradeCost\");\n const upgradeName = helper.string(\"getUnlockUpgradeCost\", \"upgradeName\", _upgradeName);\n return getUnlockUpgradeCost(upgradeName);\n },\n getUpgradeLevel: function (_upgradeName: unknown): number {\n checkAccess(\"hasUnlockUpgrade\");\n const upgradeName = helper.string(\"getUpgradeLevel\", \"upgradeName\", _upgradeName);\n return getUpgradeLevel(upgradeName);\n },\n getUpgradeLevelCost: function (_upgradeName: unknown): number {\n checkAccess(\"getUpgradeLevelCost\");\n const upgradeName = helper.string(\"getUpgradeLevelCost\", \"upgradeName\", _upgradeName);\n return getUpgradeLevelCost(upgradeName);\n },\n getExpandIndustryCost: function (_industryName: unknown): number {\n checkAccess(\"getExpandIndustryCost\");\n const industryName = helper.string(\"getExpandIndustryCost\", \"industryName\", _industryName);\n return getExpandIndustryCost(industryName);\n },\n getExpandCityCost: function (): number {\n checkAccess(\"getExpandCityCost\");\n return getExpandCityCost();\n },\n getInvestmentOffer: function (): InvestmentOffer {\n checkAccess(\"getInvestmentOffer\");\n return getInvestmentOffer();\n },\n acceptInvestmentOffer: function (): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n return acceptInvestmentOffer();\n },\n goPublic: function (_numShares: unknown): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"goPublic\", \"numShares\", _numShares);\n return goPublic(numShares);\n },\n sellShares: function (_numShares: unknown): number {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"sellStock\", \"numShares\", _numShares);\n return SellShares(getCorporation(), player, numShares);\n },\n buyBackShares: function (_numShares: unknown): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"buyStock\", \"numShares\", _numShares);\n return BuyBackShares(getCorporation(), player, numShares);\n },\n bribe: function (_factionName: unknown, _amountCash: unknown, _amountShares: unknown): boolean {\n checkAccess(\"bribe\");\n const factionName = helper.string(\"bribe\", \"factionName\", _factionName);\n const amountCash = helper.number(\"bribe\", \"amountCash\", _amountCash);\n const amountShares = helper.number(\"bribe\", \"amountShares\", _amountShares);\n return bribe(factionName, amountCash, amountShares);\n },\n getBonusTime: function (): number {\n checkAccess(\"getBonusTime\");\n return Math.round(getCorporation().storedCycles / 5) * 1000;\n },\n };\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Industries, IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Material } from \"./Material\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { calculateEffectWithFactors } from \"../utils/calculateEffectWithFactors\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Product } from \"./Product\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { Warehouse } from \"./Warehouse\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryUpgrade, IndustryUpgrades } from \"./IndustryUpgrades\";\n\ninterface IParams {\n name?: string;\n corp?: ICorporation;\n type?: string;\n}\n\nexport class Industry implements IIndustry {\n name = \"\";\n type = Industries.Agriculture;\n sciResearch = new Material({ name: \"Scientific Research\" });\n researched: { [key: string]: boolean | undefined } = {};\n reqMats: { [key: string]: number | undefined } = {};\n\n //An array of the name of materials being produced\n prodMats: string[] = [];\n\n products: { [key: string]: Product | undefined } = {};\n makesProducts = false;\n\n awareness = 0;\n popularity = 0; //Should always be less than awareness\n startingCost = 0;\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 reFac = 0; //Real estate Factor\n sciFac = 0; //Scientific Research Factor, affects quality\n hwFac = 0; //Hardware factor\n robFac = 0; //Robotics Factor\n aiFac = 0; //AI Cores factor;\n advFac = 0; //Advertising factor, affects sales\n\n prodMult = 0; //Production multiplier\n\n //Financials\n lastCycleRevenue: number;\n lastCycleExpenses: number;\n thisCycleRevenue: number;\n thisCycleExpenses: number;\n\n //Upgrades\n upgrades: number[] = Array(Object.keys(IndustryUpgrades).length).fill(0);\n\n state = \"START\";\n newInd = true;\n\n //Maps locations to warehouses. 0 if no warehouse at that location\n warehouses: { [key: string]: Warehouse | 0 };\n\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\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : Industries.Agriculture;\n\n //Financials\n this.lastCycleRevenue = 0;\n this.lastCycleExpenses = 0;\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n this.warehouses = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new Warehouse({\n corp: params.corp,\n industry: this,\n loc: CityName.Sector12,\n size: CorporationConstants.WarehouseInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n this.init();\n }\n\n init(): void {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = IndustryStartingCosts[this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n switch (this.type) {\n case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText(): string {\n if (!this.makesProducts) return \"\";\n switch (this.type) {\n case Industries.Food:\n return \"create and manage restaurants\";\n case Industries.Tobacco:\n return \"create tobacco and tobacco-related products\";\n case Industries.Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n case Industries.Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n case Industries.Robotics:\n return \"build specialized robots and robot-related products\";\n case Industries.Software:\n return \"develop computer software\";\n case Industries.Healthcare:\n return \"build and manage hospitals\";\n case Industries.RealEstate:\n return \"develop and manage real estate properties\";\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts(): number {\n if (!this.makesProducts) return 0;\n\n // Calculate additional number of allowed Products from Research/Upgrades\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n\n return CorporationConstants.BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts(): boolean {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n }\n\n //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n calculateProductionFactors(): void {\n let multSum = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const warehouse = this.warehouses[city];\n if (!(warehouse instanceof Warehouse)) {\n continue;\n }\n\n const materials = warehouse.materials;\n\n const cityMult =\n Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) *\n Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) *\n Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) *\n 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: Warehouse): void {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName of Object.keys(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 }\n }\n\n process(marketCycles = 1, state: string, corporation: ICorporation): void {\n this.state = state;\n\n //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n dialogBoxCreate(\n \"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\",\n );\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n }\n this.lastCycleRevenue = this.thisCycleRevenue / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n if (this.lastCycleRevenue > 0) {\n this.newInd = false;\n }\n\n // Process offices (and the employees in them)\n let employeeSalary = 0;\n for (const officeLoc of Object.keys(this.offices)) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n if (office instanceof OfficeSpace) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n this.thisCycleExpenses = this.thisCycleExpenses + employeeSalary;\n\n // Process change in demand/competition of materials/products\n this.processMaterialMarket();\n this.processProductMarket(marketCycles);\n\n // Process loss of popularity\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity);\n\n // Process Dreamsense gains\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n if (popularityGain > 0) {\n const awareness = this.awareness + (awarenessGain * marketCycles);\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = this.popularity + (popularityGain * marketCycles);\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n }\n\n return;\n }\n\n // Process production, purchase, and import/export of materials\n let res = this.processMaterials(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n\n // Process creation, production & sale of products\n res = this.processProducts(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n }\n\n // Process change in demand and competition for this industry's materials\n processMaterialMarket(): void {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats;\n\n //Only 'process the market' for materials that this industry deals with\n for (let i = 0; i < CorporationConstants.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[CorporationConstants.Cities[i]] instanceof Warehouse) {\n const wh = this.warehouses[CorporationConstants.Cities[i]];\n if (wh === 0) continue;\n for (const name of Object.keys(reqMats)) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n }\n\n //Produced materials are stored in an array\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n }\n\n //Process these twice because these boost production\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n }\n\n // Process change in demand and competition for this industry's products\n processProductMarket(marketCycles = 1): void {\n // Demand gradually decreases, and competition gradually increases\n for (const name of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = getRandomInt(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (\n this.type === Industries.Pharmaceutical ||\n this.type === Industries.Software ||\n this.type === Industries.Robotics\n ) {\n change *= 3;\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 }\n\n //Process production, purchase, and import/export of materials\n processMaterials(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors();\n\n //At the start of the export state, set the imports of everything to 0\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n if (!(this.warehouses[city] instanceof Warehouse)) {\n continue;\n }\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n for (const matName of Object.keys(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 < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof Warehouse) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\": {\n /* Process purchase of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n\n // smart supply\n const smartBuy: { [key: string]: number | undefined } = {};\n for (const matName of Object.keys(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];\n\n //Smart supply tracker is stored as per second rate\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 * CorporationConstants.SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n }\n\n // Find which material were trying to create the least amount of product with.\n let worseAmt = 1e99;\n for (const matName of Object.keys(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 }\n\n // Align all the materials to the smallest amount.\n for (const matName of Object.keys(smartBuy)) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n }\n\n // Calculate the total size of all things were trying to buy\n let totalSize = 0;\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * MaterialSizes[matName];\n }\n\n // Shrink to the size of available space.\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n if (totalSize > freeSpace) {\n for (const matName of Object.keys(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 }\n\n // Use the materials already in the warehouse if the option is on.\n for (const matName of Object.keys(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 }\n\n // buy them\n for (const matName of Object.keys(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 break;\n }\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]];\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office) *\n this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() *\n this.getProductionMultiplier(); // Multiplier from Research\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 prod *= CorporationConstants.SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n\n // Calculate net change in warehouse storage making the produced materials will cost\n let totalMatSize = 0;\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += MaterialSizes[this.prodMats[tmp]];\n }\n for (const reqMatName of Object.keys(this.reqMats)) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= MaterialSizes[reqMatName] * normQty;\n }\n // If not enough space in warehouse, limit the amount of produced materials\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 }\n\n // Keep track of production for smart supply (/s)\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n // Make sure we have enough resource to make our materials\n let producableFrac = 1;\n for (const reqMatName of Object.keys(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 if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n }\n\n // Make our materials if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(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 -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\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 =\n office.employeeProd[EmployeePositions.Engineer] / 90 +\n Math.pow(this.sciResearch.qty, this.sciFac) +\n Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName of Object.keys(this.reqMats)) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n }\n\n //Per second\n const fooProd = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\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 of Object.keys(this.reqMats)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n }\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n\n // Determine the cost that the material will be sold at\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n if (mat.marketTa2) {\n const prod = mat.prd;\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n (mat.qlt + 0.001) *\n marketFactor *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\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 }\n\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 mat.marketTa2Price = optimalPrice;\n\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (isString(mat.sCost)) {\n sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n }\n\n // Calculate how much of the material sells (per second)\n let markup = 1;\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 mat.maxsll =\n (mat.qlt + 0.001) *\n marketFactor *\n markup *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (isString(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = (mat.sllman[1] as string).replace(/MAX/g, (mat.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell amount for material \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. The sell amount \" +\n \"is being set to zero\",\n );\n sellAmt = 0;\n }\n sellAmt = Math.min(mat.maxsll, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = mat.maxsll;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(mat.maxsll, mat.sllman[1] as number);\n }\n\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n break;\n\n case \"EXPORT\":\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(\n /MAX/g,\n (mat.qty / (CorporationConstants.SecsPerMarketCycle * marketCycles) + \"\").toUpperCase(),\n );\n let amt = 0;\n try {\n amt = eval(amtStr);\n } catch (e) {\n dialogBoxCreate(\n \"Calculating export for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division failed with \" +\n \"error: \" +\n e,\n );\n continue;\n }\n if (isNaN(amt)) {\n dialogBoxCreate(\n \"Error calculating export amount for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division.\",\n );\n continue;\n }\n amt = amt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n if (amt === 0) {\n break; //None left\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 if (!(expWarehouse instanceof Warehouse)) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n }\n\n // Make sure theres enough space in warehouse\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[matName]);\n amt = Math.min(maxAmt, amt);\n }\n expWarehouse.materials[matName].imp +=\n amt / (CorporationConstants.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 }\n //totalExp should be per second\n mat.totalExp /= CorporationConstants.SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n if (office instanceof OfficeSpace) {\n this.sciResearch.qty +=\n 0.004 *\n Math.pow(office.employeeProd[EmployeePositions.RandD], 0.5) *\n corporation.getScientificResearchMultiplier() *\n this.getScientificResearchMultiplier();\n }\n }\n return [revenue, expenses];\n }\n\n //Process production & sale of this industry's FINISHED products (including all of their stats)\n processProducts(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0;\n const expenses = 0;\n\n //Create products\n if (this.state === \"PRODUCTION\") {\n for (const prodName of Object.keys(this.products)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue;\n\n // Designing/Creating a Product is based mostly off Engineers\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const total = engrProd + mgmtProd + opProd;\n if (total <= 0) {\n break;\n }\n\n // Management is a multiplier for the production from Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n\n prod.createProduct(marketCycles, progress);\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n break;\n }\n }\n }\n\n //Produce Products\n for (const prodName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod instanceof Product && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n return [revenue, expenses];\n }\n\n //Processes FINISHED products\n processProduct(marketCycles = 1, product: Product, corporation: ICorporation): number {\n let totalProfit = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n if (warehouse instanceof Warehouse) {\n switch (this.state) {\n case \"PRODUCTION\": {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office, { forProduct: true }) *\n corporation.getProductionMultiplier() *\n this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n let prod;\n\n //Account for whether production is manually limited\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n //Calculate net change in warehouse storage making the Products will cost\n let netStorageSize = product.siz;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= MaterialSizes[reqMatName] * normQty;\n }\n }\n\n //If there's not enough space in warehouse, limit the amount of Product\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 / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n //Make sure we have enough resources to make our Products\n let producableFrac = 1;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n //Make our Products if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(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 -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n }\n //Quantity\n product.data[city][0] += prod * producableFrac;\n }\n\n //Keep track of production Per second\n product.data[city][1] = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n break;\n }\n case \"SALE\": {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n }\n\n // Since its a product, its production cost is increased for labor\n product.pCost *= CorporationConstants.ProductProductionCostRatio;\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n const markupLimit = product.rat / product.mku;\n let sCost;\n if (product.marketTa2) {\n const prod = product.data[city][1];\n\n // 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 const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\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 }\n\n // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (isString(product.sCost)) {\n const sCostString = product.sCost as string;\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\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 if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n product.maxsll = 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n Math.pow(markup, 2) *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (product.sllman[city][0] && isString(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, (product.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n try {\n tmp = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell price expression for \" +\n product.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. Sell price is being set to MAX\",\n );\n tmp = product.maxsll;\n }\n sellAmt = Math.min(product.maxsll, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(product.maxsll, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = product.maxsll;\n }\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n break;\n }\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n }\n }\n return totalProfit;\n }\n\n discontinueProduct(product: Product): void {\n for (const productName of Object.keys(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: IndustryUpgrade, refs: { corporation: ICorporation; office: OfficeSpace }): void {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0: {\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 break;\n }\n case 1: {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n const awareness = (this.awareness + (3 * advMult)) * (1.01 * advMult);\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = (this.popularity + (1 * advMult)) * ((1 + getRandomInt(1, 3) / 100) * advMult);\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n break;\n }\n default: {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n }\n\n // Returns how much of a material can be produced based of office productivity (employee stats)\n getOfficeProductivity(office: OfficeSpace, params: { forProduct?: boolean } = {}): number {\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const total = opProd + engrProd + mgmtProd;\n\n if (total <= 0) return 0;\n\n // Management is a multiplier for the production from Operations and Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor;\n\n // Generic multiplier for the production. Used for game-balancing purposes\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 }\n\n // Returns a multiplier based on the office' 'Business' employees that affects sales\n getBusinessFactor(office: OfficeSpace): number {\n const businessProd = 1 + office.employeeProd[EmployeePositions.Business];\n\n return calculateEffectWithFactors(businessProd, 0.26, 10e3);\n }\n\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 getAdvertisingFactors(): [number, number, number, number] {\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 }\n\n //Returns a multiplier based on a materials demand and competition that affects sales\n getMarketFactor(mat: { dmd: number; cmp: number }): number {\n return Math.max(0.1, (mat.dmd * (100 - mat.cmp)) / 100);\n }\n\n // Returns a boolean indicating whether this Industry has the specified Research\n hasResearch(name: string): boolean {\n return this.researched[name] === true;\n }\n\n updateResearchTree(): void {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`);\n\n // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research of Object.keys(this.researched)) {\n researchTree.research(research);\n }\n }\n }\n\n // Get multipliers from Research\n getAdvertisingMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Industry\", this);\n }\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 static fromJSON(value: any): Industry {\n return Generic_fromJSON(Industry, value.data);\n }\n}\n\nReviver.constructors.Industry = Industry;\n","/**\n * This is a component that implements a mathematical formula used commonly throughout the\n * game. This formula is (typically) used to calculate the effect that various statistics\n * have on a game mechanic. It looks something like:\n *\n * (stat ^ exponential factor) + (stat / linear factor)\n *\n * where the exponential factor is a number between 0 and 1 and the linear factor\n * is typically a relatively larger number.\n *\n * This formula ensures that the effects of the statistic that is being processed\n * has diminishing returns, but never loses its effectiveness as you continue\n * to raise it.\n */\nexport function calculateEffectWithFactors(n: number, expFac: number, linearFac: number): number {\n if (expFac <= 0 || expFac >= 1) {\n console.warn(`Exponential factor is ${expFac}. This is not an intended value for it`);\n }\n if (linearFac < 1) {\n console.warn(`Linear factor is ${linearFac}. This is not an intended value for it`);\n }\n\n return Math.pow(n, expFac) + n / linearFac;\n}\n","import { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { ICorporation } from \"./ICorporation\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { IIndustry } from \"./IIndustry\";\n\ninterface IParams {\n name?: string;\n morale?: number;\n happiness?: number;\n energy?: number;\n intelligence?: number;\n charisma?: number;\n experience?: number;\n creativity?: number;\n efficiency?: number;\n salary?: number;\n loc?: string;\n}\n\nexport class Employee {\n name: string;\n mor: number;\n hap: number;\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n sal: number;\n cyclesUntilRaise = CorporationConstants.CyclesPerEmployeeRaise;\n loc: string;\n pos: string;\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"Bobby\";\n\n //Morale, happiness, and energy are 0-100\n this.mor = params.morale ? params.morale : getRandomInt(50, 100);\n this.hap = params.happiness ? params.happiness : getRandomInt(50, 100);\n this.ene = params.energy ? params.energy : getRandomInt(50, 100);\n\n this.int = params.intelligence ? params.intelligence : getRandomInt(10, 50);\n this.cha = params.charisma ? params.charisma : getRandomInt(10, 50);\n this.exp = params.experience ? params.experience : getRandomInt(10, 50);\n this.cre = params.creativity ? params.creativity : getRandomInt(10, 50);\n this.eff = params.efficiency ? params.efficiency : getRandomInt(10, 50);\n this.sal = params.salary ? params.salary : getRandomInt(0.1, 5);\n\n this.loc = params.loc ? params.loc : \"\";\n this.pos = EmployeePositions.Unassigned;\n }\n\n //Returns the amount the employee needs to be paid\n process(marketCycles = 1, office: OfficeSpace): number {\n const gain = 0.003 * marketCycles,\n det = gain * Math.random();\n this.exp += gain;\n\n //Training\n const trainingEff = gain * Math.random();\n if (this.pos === EmployeePositions.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 if (this.hap < office.minHap) {\n this.hap = office.minHap;\n }\n const salary = this.sal * marketCycles * CorporationConstants.SecsPerMarketCycle;\n return salary;\n }\n\n calculateProductivity(corporation: ICorporation, industry: IIndustry): number {\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 switch (this.pos) {\n //Calculate productivity based on position. This is multipled by prodBase\n //to get final value\n case EmployeePositions.Operations:\n prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff;\n break;\n case EmployeePositions.Engineer:\n prodMult = effInt + 0.1 * effCha + 1.5 * this.exp + effEff;\n break;\n case EmployeePositions.Business:\n prodMult = 0.4 * effInt + effCha + 0.5 * this.exp;\n break;\n case EmployeePositions.Management:\n prodMult = 2 * effCha + this.exp + 0.2 * effCre + 0.7 * effEff;\n break;\n case EmployeePositions.RandD:\n prodMult = 1.5 * effInt + 0.8 * this.exp + effCre + 0.5 * effEff;\n break;\n case EmployeePositions.Unassigned:\n case EmployeePositions.Training:\n prodMult = 0;\n break;\n default:\n console.error(`Invalid employee position: ${this.pos}`);\n break;\n }\n return prodBase * prodMult;\n }\n\n //Process benefits from having an office party thrown\n throwParty(money: number): number {\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 }\n\n toJSON(): any {\n return Generic_toJSON(\"Employee\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Employee {\n return Generic_fromJSON(Employee, value.data);\n }\n}\n\nReviver.constructors.Employee = Employee;\n","import { Industries } from \"./IndustryData\";\nimport { IMap } from \"../types\";\n\nexport interface IProductRatingWeight {\n Aesthetics?: number;\n Durability?: number;\n Features?: number;\n Quality?: number;\n Performance?: number;\n Reliability?: number;\n}\n\nexport const ProductRatingWeights: IMap = {\n [Industries.Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2,\n },\n [Industries.Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2,\n },\n [Industries.Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2,\n },\n [Industries.Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n [Industries.Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2,\n },\n [Industries.Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2,\n },\n [Industries.Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1,\n },\n [Industries.RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1,\n },\n};\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { calculateServerGrowth } from \"../Server/formulas/grow\";\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateNodeCost,\n} from \"../Hacknet/formulas/HacknetNodes\";\nimport {\n calculateHashGainRate as HScalculateHashGainRate,\n calculateLevelUpgradeCost as HScalculateLevelUpgradeCost,\n calculateRamUpgradeCost as HScalculateRamUpgradeCost,\n calculateCoreUpgradeCost as HScalculateCoreUpgradeCost,\n calculateCacheUpgradeCost as HScalculateCacheUpgradeCost,\n calculateServerCost as HScalculateServerCost,\n} from \"../Hacknet/formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { calculateSkill, calculateExp } from \"../PersonObjects/formulas/skill\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Formulas as IFormulas } from \"../ScriptEditor/NetscriptDefinitions\";\nimport {\n calculateRespectGain,\n calculateWantedLevelGain,\n calculateMoneyGain,\n calculateWantedPenalty,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"../Gang/formulas/formulas\";\nimport { favorToRep as calculateFavorToRep, repToFavor as calculateRepToFavor } from \"../Faction/formulas/favor\";\n\nexport function NetscriptFormulas(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IFormulas {\n const checkFormulasAccess = function (func: string): void {\n if (!player.hasProgram(Programs.Formulas.name)) {\n throw helper.makeRuntimeErrorMsg(`formulas.${func}`, `Requires Formulas.exe to run.`);\n }\n };\n return {\n reputation: {\n calculateFavorToRep: function (_favor: unknown): number {\n const favor = helper.number(\"calculateFavorToRep\", \"favor\", _favor);\n checkFormulasAccess(\"reputation.calculateFavorToRep\");\n return calculateFavorToRep(favor);\n },\n calculateRepToFavor: function (_rep: unknown): number {\n const rep = helper.number(\"calculateRepToFavor\", \"rep\", _rep);\n checkFormulasAccess(\"reputation.calculateRepToFavor\");\n return calculateRepToFavor(rep);\n },\n },\n skills: {\n calculateSkill: function (_exp: unknown, _mult: unknown = 1): number {\n const exp = helper.number(\"calculateSkill\", \"exp\", _exp);\n const mult = helper.number(\"calculateSkill\", \"mult\", _mult);\n checkFormulasAccess(\"skills.calculateSkill\");\n return calculateSkill(exp, mult);\n },\n calculateExp: function (_skill: unknown, _mult: unknown = 1): number {\n const skill = helper.number(\"calculateExp\", \"skill\", _skill);\n const mult = helper.number(\"calculateExp\", \"mult\", _mult);\n checkFormulasAccess(\"skills.calculateExp\");\n return calculateExp(skill, mult);\n },\n },\n hacking: {\n hackChance: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackChance\");\n return calculateHackingChance(server, player);\n },\n hackExp: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackExp\");\n return calculateHackingExpGain(server, player);\n },\n hackPercent: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackPercent\");\n return calculatePercentMoneyHacked(server, player);\n },\n growPercent: function (server: any, _threads: unknown, player: any, _cores: unknown = 1): number {\n const threads = helper.number(\"growPercent\", \"threads\", _threads);\n const cores = helper.number(\"growPercent\", \"cores\", _cores);\n checkFormulasAccess(\"hacking.growPercent\");\n return calculateServerGrowth(server, threads, player, cores);\n },\n hackTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackTime\");\n return calculateHackingTime(server, player) * 1000;\n },\n growTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.growTime\");\n return calculateGrowTime(server, player) * 1000;\n },\n weakenTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.weakenTime\");\n return calculateWeakenTime(server, player) * 1000;\n },\n },\n hacknetNodes: {\n moneyGainRate: function (_level: unknown, _ram: unknown, _cores: unknown, _mult: unknown = 1): number {\n const level = helper.number(\"moneyGainRate\", \"level\", _level);\n const ram = helper.number(\"moneyGainRate\", \"ram\", _ram);\n const cores = helper.number(\"moneyGainRate\", \"cores\", _cores);\n const mult = helper.number(\"moneyGainRate\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\");\n return calculateMoneyGainRate(level, ram, cores, mult);\n },\n levelUpgradeCost: function (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingLevel = helper.number(\"levelUpgradeCost\", \"startingLevel\", _startingLevel);\n const extraLevels = helper.number(\"levelUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"levelUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\");\n return calculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingRam = helper.number(\"ramUpgradeCost\", \"startingRam\", _startingRam);\n const extraLevels = helper.number(\"ramUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"ramUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\");\n return calculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number {\n const startingCore = helper.number(\"coreUpgradeCost\", \"startingCore\", _startingCore);\n const extraCores = helper.number(\"coreUpgradeCost\", \"extraCores\", _extraCores);\n const costMult = helper.number(\"coreUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\");\n return calculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (_n: unknown, _mult: unknown): number {\n const n = helper.number(\"hacknetNodeCost\", \"n\", _n);\n const mult = helper.number(\"hacknetNodeCost\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\");\n return calculateNodeCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetNodes.constants\");\n return Object.assign({}, HacknetNodeConstants);\n },\n },\n hacknetServers: {\n hashGainRate: function (\n _level: unknown,\n _ramUsed: unknown,\n _maxRam: unknown,\n _cores: unknown,\n _mult: unknown = 1,\n ): number {\n const level = helper.number(\"hashGainRate\", \"level\", _level);\n const ramUsed = helper.number(\"hashGainRate\", \"ramUsed\", _ramUsed);\n const maxRam = helper.number(\"hashGainRate\", \"maxRam\", _maxRam);\n const cores = helper.number(\"hashGainRate\", \"cores\", _cores);\n const mult = helper.number(\"hashGainRate\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetServers.hashGainRate\");\n return HScalculateHashGainRate(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingLevel = helper.number(\"levelUpgradeCost\", \"startingLevel\", _startingLevel);\n const extraLevels = helper.number(\"levelUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"levelUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\");\n return HScalculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingRam = helper.number(\"ramUpgradeCost\", \"startingRam\", _startingRam);\n const extraLevels = helper.number(\"ramUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"ramUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\");\n return HScalculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number {\n const startingCore = helper.number(\"coreUpgradeCost\", \"startingCore\", _startingCore);\n const extraCores = helper.number(\"coreUpgradeCost\", \"extraCores\", _extraCores);\n const costMult = helper.number(\"coreUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\");\n return HScalculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (_startingCache: unknown, _extraCache: unknown = 1): number {\n const startingCache = helper.number(\"cacheUpgradeCost\", \"startingCache\", _startingCache);\n const extraCache = helper.number(\"cacheUpgradeCost\", \"extraCache\", _extraCache);\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\");\n return HScalculateCacheUpgradeCost(startingCache, extraCache);\n },\n hashUpgradeCost: function (_upgName: unknown, _level: unknown): number {\n const upgName = helper.string(\"hashUpgradeCost\", \"upgName\", _upgName);\n const level = helper.number(\"hashUpgradeCost\", \"level\", _level);\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\");\n const upg = player.hashManager.getUpgrade(upgName);\n if (!upg) {\n throw helper.makeRuntimeErrorMsg(\n \"formulas.hacknetServers.calculateHashUpgradeCost\",\n `Invalid Hash Upgrade: ${upgName}`,\n );\n }\n return upg.getCost(level);\n },\n hacknetServerCost: function (_n: unknown, _mult: unknown = 1): number {\n const n = helper.number(\"hacknetServerCost\", \"n\", _n);\n const mult = helper.number(\"hacknetServerCost\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\");\n return HScalculateServerCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetServers.constants\");\n return Object.assign({}, HacknetServerConstants);\n },\n },\n gang: {\n wantedPenalty(gang: any): number {\n checkFormulasAccess(\"gang.wantedPenalty\");\n return calculateWantedPenalty(gang);\n },\n respectGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.respectGain\");\n return calculateRespectGain(gang, member, task);\n },\n wantedLevelGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.wantedLevelGain\");\n return calculateWantedLevelGain(gang, member, task);\n },\n moneyGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.moneyGain\");\n return calculateMoneyGain(gang, member, task);\n },\n ascensionPointsGain: function (_exp: unknown): number {\n const exp = helper.number(\"ascensionPointsGain\", \"exp\", _exp);\n checkFormulasAccess(\"gang.ascensionPointsGain\");\n return calculateAscensionPointsGain(exp);\n },\n ascensionMultiplier: function (_points: unknown): number {\n const points = helper.number(\"ascensionMultiplier\", \"points\", _points);\n checkFormulasAccess(\"gang.ascensionMultiplier\");\n return calculateAscensionMult(points);\n },\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport { StockMarket, SymbolToStockMap, placeOrder, cancelOrder } from \"../StockMarket/StockMarket\";\nimport { getBuyTransactionCost, getSellTransactionGain } from \"../StockMarket/StockMarketHelpers\";\nimport { OrderTypes } from \"../StockMarket/data/OrderTypes\";\nimport { PositionTypes } from \"../StockMarket/data/PositionTypes\";\nimport { StockSymbols } from \"../StockMarket/data/StockSymbols\";\nimport {\n getStockMarket4SDataCost,\n getStockMarket4STixApiCost,\n getStockMarketWseCost,\n getStockMarketTixApiCost,\n} from \"../StockMarket/StockMarketCosts\";\nimport { Stock } from \"../StockMarket/Stock\";\nimport { TIX } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): TIX {\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n const checkTixApiAccess = function (callingFn: string): void {\n if (!player.hasWseAccount) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n if (!player.hasTixApiAccess) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n\n const getStockFromSymbol = function (symbol: string, callingFn: string): Stock {\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n return {\n getSymbols: function (): string[] {\n helper.updateDynamicRam(\"getSymbols\", getRamCost(player, \"stock\", \"getSymbols\"));\n checkTixApiAccess(\"getSymbols\");\n return Object.values(StockSymbols);\n },\n getPrice: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getPrice\", getRamCost(player, \"stock\", \"getPrice\"));\n const symbol = helper.string(\"getPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getPrice\");\n const stock = getStockFromSymbol(symbol, \"getPrice\");\n\n return stock.price;\n },\n getAskPrice: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getAskPrice\", getRamCost(player, \"stock\", \"getAskPrice\"));\n const symbol = helper.string(\"getAskPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getAskPrice\");\n\n return stock.getAskPrice();\n },\n getBidPrice: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getBidPrice\", getRamCost(player, \"stock\", \"getBidPrice\"));\n const symbol = helper.string(\"getBidPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getBidPrice\");\n\n return stock.getBidPrice();\n },\n getPosition: function (_symbol: unknown): [number, number, number, number] {\n helper.updateDynamicRam(\"getPosition\", getRamCost(player, \"stock\", \"getPosition\"));\n const symbol = helper.string(\"getPosition\", \"symbol\", _symbol);\n checkTixApiAccess(\"getPosition\");\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(\"getPosition\", `Invalid stock symbol: ${symbol}`);\n }\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getMaxShares: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getMaxShares\", getRamCost(player, \"stock\", \"getMaxShares\"));\n const symbol = helper.string(\"getMaxShares\", \"symbol\", _symbol);\n checkTixApiAccess(\"getMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getMaxShares\");\n\n return stock.maxShares;\n },\n getPurchaseCost: function (_symbol: unknown, _shares: unknown, _posType: unknown): number {\n helper.updateDynamicRam(\"getPurchaseCost\", getRamCost(player, \"stock\", \"getPurchaseCost\"));\n const symbol = helper.string(\"getPurchaseCost\", \"symbol\", _symbol);\n let shares = helper.number(\"getPurchaseCost\", \"shares\", _shares);\n const posType = helper.string(\"getPurchaseCost\", \"posType\", _posType);\n checkTixApiAccess(\"getPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getPurchaseCost\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return Infinity;\n }\n\n const res = getBuyTransactionCost(stock, shares, pos);\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getSaleGain: function (_symbol: unknown, _shares: unknown, _posType: unknown): number {\n helper.updateDynamicRam(\"getSaleGain\", getRamCost(player, \"stock\", \"getSaleGain\"));\n const symbol = helper.string(\"getSaleGain\", \"symbol\", _symbol);\n let shares = helper.number(\"getSaleGain\", \"shares\", _shares);\n const posType = helper.string(\"getSaleGain\", \"posType\", _posType);\n checkTixApiAccess(\"getSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getSaleGain\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return 0;\n }\n\n const res = getSellTransactionGain(stock, shares, pos);\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buy: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"buy\", getRamCost(player, \"stock\", \"buy\"));\n const symbol = helper.string(\"buy\", \"symbol\", _symbol);\n const shares = helper.number(\"buy\", \"shares\", _shares);\n checkTixApiAccess(\"buy\");\n const stock = getStockFromSymbol(symbol, \"buy\");\n const res = buyStock(stock, shares, workerScript, {});\n return res ? stock.getAskPrice() : 0;\n },\n sell: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"sell\", getRamCost(player, \"stock\", \"sell\"));\n const symbol = helper.string(\"sell\", \"symbol\", _symbol);\n const shares = helper.number(\"sell\", \"shares\", _shares);\n checkTixApiAccess(\"sell\");\n const stock = getStockFromSymbol(symbol, \"sell\");\n const res = sellStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n short: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"short\", getRamCost(player, \"stock\", \"short\"));\n const symbol = helper.string(\"short\", \"symbol\", _symbol);\n const shares = helper.number(\"short\", \"shares\", _shares);\n checkTixApiAccess(\"short\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"short\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"short\");\n const res = shortStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n sellShort: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"sellShort\", getRamCost(player, \"stock\", \"sellShort\"));\n const symbol = helper.string(\"sellShort\", \"symbol\", _symbol);\n const shares = helper.number(\"sellShort\", \"shares\", _shares);\n checkTixApiAccess(\"sellShort\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"sellShort\",\n \"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 = sellShort(stock, shares, workerScript, {});\n\n return res ? stock.getAskPrice() : 0;\n },\n placeOrder: function (_symbol: unknown, _shares: unknown, _price: unknown, _type: unknown, _pos: unknown): boolean {\n helper.updateDynamicRam(\"placeOrder\", getRamCost(player, \"stock\", \"placeOrder\"));\n const symbol = helper.string(\"placeOrder\", \"symbol\", _symbol);\n const shares = helper.number(\"placeOrder\", \"shares\", _shares);\n const price = helper.number(\"placeOrder\", \"price\", _price);\n const type = helper.string(\"placeOrder\", \"type\", _type);\n const pos = helper.string(\"placeOrder\", \"pos\", _pos);\n checkTixApiAccess(\"placeOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"placeOrder\",\n \"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\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return placeOrder(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (\n _symbol: unknown,\n _shares: unknown,\n _price: unknown,\n _type: unknown,\n _pos: unknown,\n ): boolean {\n helper.updateDynamicRam(\"cancelOrder\", getRamCost(player, \"stock\", \"cancelOrder\"));\n const symbol = helper.string(\"cancelOrder\", \"symbol\", _symbol);\n const shares = helper.number(\"cancelOrder\", \"shares\", _shares);\n const price = helper.number(\"cancelOrder\", \"price\", _price);\n const type = helper.string(\"cancelOrder\", \"type\", _type);\n const pos = helper.string(\"cancelOrder\", \"pos\", _pos);\n checkTixApiAccess(\"cancelOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"cancelOrder\");\n if (isNaN(shares) || isNaN(price)) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`,\n );\n }\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n const params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos,\n };\n return cancelOrder(params, workerScript);\n },\n getOrders: function (): any {\n helper.updateDynamicRam(\"getOrders\", getRamCost(player, \"stock\", \"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"getOrders\",\n \"You must either be in BitNode-8 or have Source-File 8 Level 3.\",\n );\n }\n }\n\n const orders: any = {};\n\n const stockMarketOrders = StockMarket[\"Orders\"];\n for (const symbol of Object.keys(stockMarketOrders)) {\n const orderBook = stockMarketOrders[symbol];\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\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 getVolatility: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getVolatility\", getRamCost(player, \"stock\", \"getVolatility\"));\n const symbol = helper.string(\"getVolatility\", \"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getVolatility\");\n\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getForecast: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getForecast\", getRamCost(player, \"stock\", \"getForecast\"));\n const symbol = helper.string(\"getForecast\", \"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getForecast\");\n\n let forecast = 50;\n stock.b ? (forecast += stock.otlkMag) : (forecast -= stock.otlkMag);\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function (): boolean {\n helper.updateDynamicRam(\"purchase4SMarketData\", getRamCost(player, \"stock\", \"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (player.has4SData) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (player.money < getStockMarket4SDataCost()) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n player.has4SData = true;\n player.loseMoney(getStockMarket4SDataCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function (): boolean {\n helper.updateDynamicRam(\"purchase4SMarketDataTixApi\", getRamCost(player, \"stock\", \"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (player.has4SDataTixApi) {\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (player.money < getStockMarket4STixApiCost()) {\n workerScript.log(\n \"stock.purchase4SMarketDataTixApi\",\n () => \"Not enough money to purchase 4S Market Data TIX API\",\n );\n return false;\n }\n\n player.has4SDataTixApi = true;\n player.loseMoney(getStockMarket4STixApiCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Purchased 4S Market Data TIX API\");\n return true;\n },\n purchaseWseAccount: function (): boolean {\n helper.updateDynamicRam(\"PurchaseWseAccount\", getRamCost(player, \"stock\", \"purchaseWseAccount\"));\n\n if (player.hasWseAccount) {\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Already purchased WSE Account\");\n return true;\n }\n\n if (player.money < getStockMarketWseCost()) {\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Not enough money to purchase WSE Account Access\");\n return false;\n }\n\n player.hasWseAccount = true;\n player.loseMoney(getStockMarketWseCost(), \"stock\");\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Purchased WSE Account Access\");\n return true;\n },\n purchaseTixApi: function (): boolean {\n helper.updateDynamicRam(\"purchaseTixApi\", getRamCost(player, \"stock\", \"purchaseTixApi\"));\n\n if (player.hasTixApiAccess) {\n workerScript.log(\"stock.purchaseTixApi\", () => \"Already purchased TIX API\");\n return true;\n }\n\n if (player.money < getStockMarketTixApiCost()) {\n workerScript.log(\"stock.purchaseTixApi\", () => \"Not enough money to purchase TIX API Access\");\n return false;\n }\n\n player.hasTixApiAccess = true;\n player.loseMoney(getStockMarketTixApiCost(), \"stock\");\n workerScript.log(\"stock.purchaseTixApi\", () => \"Purchased TIX API\");\n return true;\n },\n };\n}\n","import { Augmentations } from \"../Augmentation/Augmentations\";\nimport { hasAugmentationPrereqs } from \"../Faction/FactionHelpers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GraftableAugmentation } from \"../PersonObjects/Grafting/GraftableAugmentation\";\nimport { getAvailableAugs } from \"../PersonObjects/Grafting/ui/GraftingRoot\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Grafting as IGrafting } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Router } from \"../ui/GameRoot\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\n\nexport function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGrafting {\n const checkGraftingAPIAccess = (func: string): void => {\n if (!player.canAccessGrafting()) {\n throw helper.makeRuntimeErrorMsg(\n `grafting.${func}`,\n \"You do not currently have access to the Grafting API. This is either because you are not in BitNode 10 or because you do not have Source-File 10\",\n );\n }\n };\n\n return {\n getAugmentationGraftPrice: (_augName: unknown): number => {\n const augName = helper.string(\"getAugmentationGraftPrice\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationGraftPrice\", getRamCost(player, \"grafting\", \"getAugmentationGraftPrice\"));\n checkGraftingAPIAccess(\"getAugmentationGraftPrice\");\n if (!Augmentations.hasOwnProperty(augName)) {\n throw helper.makeRuntimeErrorMsg(\"grafting.getAugmentationGraftPrice\", `Invalid aug: ${augName}`);\n }\n const craftableAug = new GraftableAugmentation(Augmentations[augName]);\n return craftableAug.cost;\n },\n\n getAugmentationGraftTime: (_augName: string): number => {\n const augName = helper.string(\"getAugmentationGraftTime\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationGraftTime\", getRamCost(player, \"grafting\", \"getAugmentationGraftTime\"));\n checkGraftingAPIAccess(\"getAugmentationGraftTime\");\n if (!Augmentations.hasOwnProperty(augName)) {\n throw helper.makeRuntimeErrorMsg(\"grafting.getAugmentationGraftTime\", `Invalid aug: ${augName}`);\n }\n const craftableAug = new GraftableAugmentation(Augmentations[augName]);\n return craftableAug.time;\n },\n\n graftAugmentation: (_augName: string, _focus: unknown = true): boolean => {\n const augName = helper.string(\"graftAugmentation\", \"augName\", _augName);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"graftAugmentation\", getRamCost(player, \"grafting\", \"graftAugmentation\"));\n checkGraftingAPIAccess(\"graftAugmentation\");\n if (player.city !== CityName.NewTokyo) {\n throw helper.makeRuntimeErrorMsg(\n \"grafting.graftAugmentation\",\n \"You must be in New Tokyo to begin crafting an Augmentation.\",\n );\n }\n if (!getAvailableAugs(player).includes(augName)) {\n workerScript.log(\"grafting.graftAugmentation\", () => `Invalid aug: ${augName}`);\n return false;\n }\n\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"graftAugmentation\", () => txt);\n }\n\n const craftableAug = new GraftableAugmentation(Augmentations[augName]);\n if (player.money < craftableAug.cost) {\n workerScript.log(\"grafting.graftAugmentation\", () => `You don't have enough money to craft ${augName}`);\n return false;\n }\n\n if (!hasAugmentationPrereqs(craftableAug.augmentation)) {\n workerScript.log(\"grafting.graftAugmentation\", () => `You don't have the pre-requisites for ${augName}`);\n return false;\n }\n\n player.loseMoney(craftableAug.cost, \"augmentations\");\n player.startGraftAugmentationWork(augName, craftableAug.time);\n\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n\n workerScript.log(\"grafting.graftAugmentation\", () => `Began crafting Augmentation ${augName}.`);\n return true;\n },\n };\n}\n","/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\nimport { CityName } from \"./CityNames\";\nimport { LocationName } from \"./LocationNames\";\nimport { IConstructorParams } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nexport const LocationsMetadata: IConstructorParams[] = [\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.AevumAeroCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19,\n },\n name: LocationName.AevumBachmanAndAssociates,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55,\n },\n name: LocationName.AevumClarkeIncorporated,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 3,\n expMult: 2,\n name: LocationName.AevumCrushFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02,\n },\n name: LocationName.AevumECorp,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54,\n },\n name: LocationName.AevumFulcrumTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89,\n },\n name: LocationName.AevumGalacticCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29,\n },\n name: LocationName.AevumNetLinkTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35,\n },\n name: LocationName.AevumPolice,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.AevumRhoConstruction,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 10,\n expMult: 5,\n name: LocationName.AevumSnapFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n costMult: 4,\n expMult: 3,\n name: LocationName.AevumSummitUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85,\n },\n name: LocationName.AevumWatchdogSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n name: LocationName.AevumCasino,\n types: [LocationType.Casino],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n types: [LocationType.Company],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.IshimaNovaMedical,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2,\n },\n name: LocationName.IshimaOmegaSoftware,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4,\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38,\n },\n name: LocationName.IshimaStormTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32,\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18,\n },\n name: LocationName.NewTokyoDefComm,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5,\n },\n name: LocationName.NewTokyoNoodleBar,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52,\n },\n name: LocationName.NewTokyoVitaLife,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n name: LocationName.NewTokyoArcade,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62,\n },\n name: LocationName.Sector12AlphaEnterprises,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2,\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59,\n },\n name: LocationName.Sector12BladeIndustries,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CIA,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66,\n },\n name: LocationName.Sector12CarmichaelSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CityHall,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12DeltaOne,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12FoodNStuff,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.Sector12FourSigma,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n expMult: 1,\n costMult: 1,\n name: LocationName.Sector12IronGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13,\n },\n name: LocationName.Sector12JoesGuns,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36,\n },\n name: LocationName.Sector12MegaCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12NSA,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.Sector12,\n costMult: 20,\n expMult: 10,\n name: LocationName.Sector12PowerhouseGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n costMult: 3,\n expMult: 2,\n name: LocationName.Sector12RothmanUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12UniversalEnergy,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59,\n },\n name: LocationName.VolhavenCompuTek,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28,\n },\n name: LocationName.VolhavenHeliosLabs,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35,\n },\n name: LocationName.VolhavenLexoCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 7,\n expMult: 4,\n name: LocationName.VolhavenMilleniumFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53,\n },\n name: LocationName.VolhavenNWO,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 5,\n expMult: 4,\n name: LocationName.VolhavenZBInstituteOfTechnology,\n types: [LocationType.University],\n },\n {\n city: null,\n name: LocationName.Hospital,\n types: [LocationType.Hospital],\n },\n {\n city: null,\n name: LocationName.Slums,\n types: [LocationType.Slums],\n },\n {\n city: null,\n name: LocationName.TravelAgency,\n types: [LocationType.TravelAgency],\n },\n {\n city: null,\n name: LocationName.WorldStockExchange,\n types: [LocationType.StockMarket],\n },\n {\n city: CityName.Chongqing,\n name: LocationName.ChongqingChurchOfTheMachineGod,\n types: [LocationType.Special],\n },\n {\n city: CityName.Ishima,\n name: LocationName.IshimaGlitch,\n types: [LocationType.Special],\n },\n];\n","import { Player } from \"../Player\";\nimport { Script } from \"../Script/Script\";\nimport { GetAllServers } from \"../Server/AllServers\";\n\nconst detect: [string, string][] = [\n [\"getHackTime\", \"returns milliseconds\"],\n [\"getGrowTime\", \"returns milliseconds\"],\n [\"getWeakenTime\", \"returns milliseconds\"],\n [\"getActionTime\", \"returns milliseconds\"],\n [\"hackAnalyzePercent\", \"renamed 'hackAnalyze' and returns decimal\"],\n [\"hackChance\", \"renamed 'hackAnalyzeChance'\"],\n [\"basic.calculateSkill\", \"renamed 'skills.calculateSkill'\"],\n [\"basic.calculateExp\", \"renamed 'skills.calculateExp'\"],\n [\"basic.hackChance\", \"renamed 'hacking.hackChance'\"],\n [\"basic.hackExp\", \"renamed 'hacking.hackExp'\"],\n [\"basic.hackPercent\", \"renamed 'hacking.hackPercent'\"],\n [\"basic.growPercent\", \"renamed 'hacking.growPercent'\"],\n [\"basic.hackTime\", \"renamed 'hacking.hackTime'\"],\n [\"basic.growTime\", \"renamed 'hacking.growTime'\"],\n [\"basic.weakenTime\", \"renamed 'hacking.weakenTime'\"],\n [\"write\", \"needs to be awaited\"],\n [\"scp\", \"needs to be awaited\"],\n [\"sleep\", \"Can no longer be called simultenaously.\"],\n [\"hacking_skill\", \"renamed 'hacking'\"],\n [\"tryWrite\", \"renamed 'tryWritePort'\"],\n];\n\nconst changes: [RegExp, string][] = [\n [/ns.getHackTime/g, \"((...a)=>ns.getHackTime(...a)/1000)\"],\n [/ns.getGrowTime/g, \"((...a)=>ns.getGrowTime(...a)/1000)\"],\n [/ns.getWeakenTime/g, \"((...a)=>ns.getWeakenTime(...a)/1000)\"],\n [/ns.bladeburner.getActionTime/g, \"((...a)=>ns.bladeburner.getActionTime(...a)/1000)\"],\n [/ns.hackAnalyzePercent/g, \"((...a)=>ns.hackAnalyze(...a)*100)\"],\n [/ns.hackChance/g, \"ns.hackAnalyzeChance\"],\n [/ns.tryWrite/g, \"ns.tryWritePort\"],\n [/formulas.basic.calculateSkill/g, \"formulas.skills.calculateSkill\"],\n [/formulas.basic.calculateExp/g, \"formulas.skills.calculateExp\"],\n [/formulas.basic.hackChance/g, \"formulas.hacking.hackChance\"],\n [/formulas.basic.hackExp/g, \"formulas.hacking.hackExp\"],\n [/formulas.basic.hackPercent/g, \"formulas.hacking.hackPercent\"],\n [/formulas.basic.growPercent/g, \"formulas.hacking.growPercent\"],\n [/formulas.basic.hackTime/g, \"formulas.hacking.hackTime\"],\n [/formulas.basic.growTime/g, \"formulas.hacking.growTime\"],\n [/formulas.basic.weakenTime/g, \"formulas.hacking.weakenTime\"],\n];\nfunction hasChanges(code: string): boolean {\n for (const change of changes) {\n if (code.match(change[0])) return true;\n }\n return false;\n}\n\nfunction convert(code: string): string {\n const lines = code.split(\"\\n\");\n const out: string[] = [];\n for (let i = 0; i < lines.length; i++) {\n const orig = lines[i];\n let line = lines[i];\n for (const change of changes) {\n line = line.replace(change[0], change[1]);\n }\n if (line != orig) {\n out.push(`// =============================== original line ===============================`);\n out.push(`/**`);\n out.push(` * ${orig}`);\n out.push(\" */\");\n out.push(`// =============================================================================`);\n }\n out.push(line);\n }\n return out.join(\"\\n\");\n}\n\nexport function v1APIBreak(): void {\n interface IFileLine {\n file: string;\n line: number;\n }\n let txt = \"\";\n for (const server of GetAllServers()) {\n for (const change of detect) {\n const s: IFileLine[] = [];\n for (const script of server.scripts) {\n const lines = script.code.split(\"\\n\");\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].includes(change[0])) {\n s.push({\n file: script.filename,\n line: i + 1,\n });\n }\n }\n }\n\n if (s.length === 0) continue;\n\n txt += `// Detected change ${change[0]}, reason: ${change[1]}\\n`;\n for (const fl of s) {\n txt += `${fl.file}:${fl.line}\\n`;\n }\n }\n }\n if (txt !== \"\") {\n const home = Player.getHomeComputer();\n home.writeToTextFile(\"v1_DETECTED_CHANGES.txt\", txt);\n }\n\n for (const server of GetAllServers()) {\n const backups: Script[] = [];\n for (const script of server.scripts) {\n if (!hasChanges(script.code)) continue;\n const prefix = script.filename.includes(\"/\") ? \"/BACKUP_\" : \"BACKUP_\";\n backups.push(new Script(Player, prefix + script.filename, script.code, script.server));\n script.code = convert(script.code);\n }\n server.scripts = server.scripts.concat(backups);\n }\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport Paper from \"@mui/material/Paper\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Button from \"@mui/material/Button\";\nimport ArrowForwardIos from \"@mui/icons-material/ArrowForwardIos\";\nimport ArrowBackIos from \"@mui/icons-material/ArrowBackIos\";\nimport { ITutorialEvents } from \"./ITutorialEvents\";\nimport { CopyableText } from \"../React/CopyableText\";\n\nimport ListItem from \"@mui/material/ListItem\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\";\nimport StorageIcon from \"@mui/icons-material/Storage\";\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport {\n iTutorialPrevStep,\n iTutorialNextStep,\n ITutorial,\n iTutorialSteps,\n iTutorialEnd,\n} from \"../../InteractiveTutorial\";\n\ninterface IContent {\n content: React.ReactElement;\n canNext: boolean;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n borderBottom: \"1px solid \" + theme.palette.primary.main,\n },\n code: {\n whiteSpace: \"pre\",\n backgroundColor: theme.palette.background.paper,\n },\n }),\n);\n\nexport function InteractiveTutorialRoot(): React.ReactElement {\n const classes = useStyles();\n\n const contents: { [number: string]: IContent | undefined } = {\n [iTutorialSteps.Start as number]: {\n content: (\n <>\n \n Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian\n future... The year is 2077...\n
\n
\n This tutorial will show you the basics of the game. You may skip the tutorial at any time.\n
\n
\n You can also collapse this panel to temporarily hide this tutorial.\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToCharacterPage as number]: {\n content: (\n <>\n Let's start by heading to the Stats page. Click\n \n \n Stats\n \n\n on the main navigation menu (left-hand side of the screen)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.CharacterPage as number]: {\n content: (\n <>\n \n \n Stats\n \n \n shows a lot of important information about your progress, such as your skills, money, and bonuses.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.CharacterGoToTerminalPage as number]: {\n content: (\n <>\n Let's head to your computer's terminal by clicking\n \n \n Terminal\n \n on the main navigation menu.\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalIntro as number]: {\n content: (\n <>\n \n \n Terminal\n \n \n is used to interface with your home computer as well as all of the other machines around the world.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHelp as number]: {\n content: (\n <>\n Let's try it out. Start by entering\n {\"[home ~/]> help\"}\n (Don't forget to press Enter after typing the command)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalLs as number]: {\n content: (\n <>\n {\"[home ~/]> help\"}\n \n displays a list of all available Terminal commands, how to use them, and a description of what they do.{\" \"}\n
\n
\n Let's try another command. Enter\n
\n\n {\"[home ~/]> ls\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScan as number]: {\n content: (\n <>\n {\"[home ~/]> ls\"}\n \n {\" \"}\n is a basic command that shows files on the computer. Right now, it shows that you have a program called{\" \"}\n NUKE.exe on your computer. We'll get to what this does later.
\n
\n Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that\n now by first entering\n
\n {\"[home ~/]> scan\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze1 as number]: {\n content: (\n <>\n {\"[home ~/]> scan\"}\n \n shows all available network connections. In other words, it displays a list of all servers that can be\n connected to from your current machine. A server is identified by its hostname.
\n
\n That's great and all, but there's so many servers. Which one should you go to?{\" \"}\n
\n\n {\"[home ~/]> scan-analyze\"}\n gives some more detailed information about servers on the network. Try it now!\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze2 as number]: {\n content: (\n <>\n {\"[home ~/]> scan-analyze\"}\n \n shows more detailed information about each server that you can connect to (servers that are a distance of\n one node away).
\n
It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the\n following command:{\" \"}\n
\n\n {\"[home ~/]> scan-analyze 2\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalConnect as number]: {\n content: (\n <>\n \n Now you can see information about all servers that are up to two nodes away, as well as figure out how to\n navigate to those servers through the network. You can only connect to a server that is one node away. To\n connect to a machine, use\n \n {\"[home ~/]> connect hostname\"}\n\n From the results of \n {\"[home ~/]> scan-analyze 2\"}\n\n \n {\" \"}\n we can see that the n00dles server is only one node away. Let's connect to it now using:\n \n\n {\"[home ~/]> connect n00dles\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalAnalyze as number]: {\n content: (\n <>\n \n You are now connected to another machine! What can you do now? You can hack it!\n
\n
In the year 2077, currency has become digital and decentralized. People and corporations store their\n money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain\n experience.
\n
\n Before you try to hack a server, you should run diagnostics using{\" \"}\n
\n {\"[n00dles ~/]> analyze\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalNuke as number]: {\n content: (\n <>\n When \n {\"[n00dles ~/]> analyze\"}\n\n \n finishes running it will show useful information about hacking the server.
\n
For this server, the required hacking skill is only 1, which means you can hack it right now.\n However, in order to hack a server you must first gain root access. The NUKE.exe program that we saw earlier\n on your home computer is a virus that will grant you root access to a machine if there are enough open\n ports.\n
\n {\"[n00dles ~/]> analyze\"}\n\n \n {\" \"}\n shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead\n and run the virus using{\" \"}\n \n {\"[n00dles ~/]> run NUKE.exe\"}\n\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalManualHack as number]: {\n content: (\n <>\n You now have root access! You can hack the server using \n {\"[n00dles ~/]> hack\"}\n\n Try doing that now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHackingMechanics as number]: {\n content: (\n \n You are now attempting to hack the server. Performing a hack takes time and only has a certain percentage\n chance of success. This time and success chance is determined by a variety of factors, including your hacking\n skill and the server's security level.\n
\n
\n If your attempt to hack the server is successful, you will steal a certain percentage of the server's total\n money. This percentage is affected by your hacking skill and the server's security level.\n
\n
\n The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money,\n then you will encounter diminishing returns in your hacking. You will need to use{\" \"}\n {\"[n00dles ~/]> grow\"}\n which tricks the company into adding money to their server and{\" \"}\n {\"[n00dles ~/]> weaken\"}\n which increases the speed of hack and grow.\n
\n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalGoHome as number]: {\n content: (\n <>\n From any server you can get back home using\n {\"[n00dles ~/]> home\"}\n\n Let's head home before creating our first script!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalCreateScript as number]: {\n content: (\n <>\n \n Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be\n hacking manually the entire time. You can automate your hacking by writing scripts!\n
\n
\n To create a new script or edit an existing one, you can use{\" \"}\n
\n {\"[home ~/]> nano\"}\n\n Scripts must end with the .script extension. Let's make a script now by entering \n {\"[home ~/]> nano n00dles.script\"}\n\n \n after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTypeScript as number]: {\n content: (\n <>\n \n This is the script editor. You can use it to program your scripts. Scripts are written in a simplified\n version of javascript. Copy and paste the following code into the script editor:
\n
\n\n \n \n \n \n For anyone with basic programming experience, this code should be straightforward. This script will\n continuously hack the n00dles server.\n
\n
\n To save and close the script editor, press the button in the bottom left, or press ctrl + s then ctrl + b.\n
\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalFree as number]: {\n content: (\n <>\n \n Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine\n which you have root access to. Different servers have different amounts of RAM. You can also purchase more\n RAM for your home server.\n
\n
\n To check how much RAM is available on this machine, enter\n
\n {\"[home ~/]> free\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalRunScript as number]: {\n content: (\n <>\n \n We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using\n \n {\"[home ~/]> run n00dles.script\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalGoToActiveScriptsPage as number]: {\n content: (\n <>\n \n Your script is now running! It will continuously run in the background and will automatically stop if the\n code ever completes (the n00dles.script will never complete because it runs an infinite loop).
\n
\n These scripts can passively earn you income and hacking experience. Your scripts will also earn money and\n experience while you are offline, although at a slightly slower rate.
\n
\n Let's check out some statistics for our running scripts by clicking{\" \"}\n
\n \n \n Active Scripts\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsPage as number]: {\n content: (\n <>\n \n This page displays information about all of your scripts that are running across every server. You can use\n this to gauge how well your scripts are doing. Let's go back to\n \n \n \n Terminal\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsToTerminal as number]: {\n content: (\n <>\n \n One last thing about scripts, each active script contains logs that detail what it's doing. We can check\n these logs using the tail command. Do that now for the script we just ran by typing{\" \"}\n \n {\"[home ~/]> tail n00dles.script\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTailScript as number]: {\n content: (\n <>\n \n The log for this script won't show much right now (it might show nothing at all) because it just started\n running...but check back again in a few minutes!
\n
\n This covers the basics of hacking. To learn more about writing scripts, select\n
\n \n \n Tutorial\n \n \n in the main navigation menu to look at the documentation.\n
\n
\n If you know even a little bit of programming it is highly recommended you use NS2 instead. You will enjoy\n the game much more. NS1 files end with .script and are a subset of javascript. NS2 files end with .js and\n are full speed native javascript.\n
\n
\n You can learn more about the difference between them later in the documentation.\n
\n
\n For now, let's move on to something else!\n
\n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToHacknetNodesPage as number]: {\n content: (\n <>\n \n Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and\n upgrading Hacknet Nodes. Let's go to\n \n \n \n Hacknet\n \n through the main navigation menu now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesIntroduction as number]: {\n content: (\n \n Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesGoToWorldPage as number]: {\n content: (\n <>\n \n You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online\n and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.\n
\n
\n Let's go to\n
\n \n \n City\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.WorldDescription as number]: {\n content: (\n <>\n \n This page lists all of the different locations you can currently travel to. Each location has something that\n you can do. There's a lot of content out in the world, make sure you explore and discover!\n
\n
\n Lastly, click on\n
\n \n \n Tutorial\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TutorialPageInfo as number]: {\n content: (\n \n This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot,\n but I highly suggest you read (or at least skim) through this before you start playing . That's the end of the\n tutorial. Hope you enjoy the game!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.End as number]: {\n content: ,\n canNext: true,\n },\n };\n\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n const step = ITutorial.currStep;\n const content = contents[step];\n if (content === undefined) throw new Error(\"error in the tutorial\");\n return (\n \n {content.content}\n {step !== iTutorialSteps.TutorialPageInfo && (\n <>\n \n \n \n {content.canNext && (\n \n \n \n )}\n \n )}\n
\n
\n \n
\n );\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport Draggable, { DraggableEventHandler } from \"react-draggable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Paper from \"@mui/material/Paper\";\nimport KeyboardArrowDownIcon from \"@mui/icons-material/KeyboardArrowDown\";\nimport KeyboardArrowUpIcon from \"@mui/icons-material/KeyboardArrowUp\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport SchoolIcon from \"@mui/icons-material/School\";\nimport { use } from \"../Context\";\nimport { Page } from \"../Router\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { Box, Button, Typography } from \"@mui/material\";\nimport { debounce } from \"lodash\";\n\nconst useStyles = makeStyles({\n overviewContainer: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500,\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\",\n },\n\n header: {\n cursor: \"grab\",\n textAlign: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n visibilityToggle: {\n padding: \"2px\",\n minWidth: \"inherit\",\n backgroundColor: \"transparent\",\n border: \"none\",\n \"&:hover\": {\n backgroundColor: \"rgba(255, 255, 255, 0.1)\",\n },\n },\n\n collapse: {\n borderTop: `1px solid ${Settings.theme.welllight}`,\n margin: \"0 auto\",\n },\n\n icon: {\n fontSize: \"24px\",\n },\n});\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n mode: \"tutorial\" | \"overview\";\n}\n\nexport interface OverviewSettings {\n opened: boolean;\n x: number;\n y: number;\n}\n\nexport function Overview({ children, mode }: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const [open, setOpen] = useState(Settings.overview.opened);\n const [x, setX] = useState(Settings.overview.x);\n const [y, setY] = useState(Settings.overview.y);\n const classes = useStyles();\n const router = use.Router();\n\n const CurrentIcon = open ? KeyboardArrowUpIcon : KeyboardArrowDownIcon;\n const LeftIcon = mode === \"tutorial\" ? SchoolIcon : EqualizerIcon;\n const header = mode === \"tutorial\" ? \"Tutorial\" : \"Overview\";\n const handleStop: DraggableEventHandler = (e, data) => {\n setX(data.x);\n setY(data.y);\n };\n\n useEffect(() => {\n Settings.overview = { x, y, opened: open };\n }, [open, x, y]);\n\n // Trigger fakeDrag once to make sure loaded data is not outside bounds\n useEffect(() => fakeDrag(), []);\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", fakeDrag);\n return () => {\n window.removeEventListener(\"resize\", fakeDrag);\n };\n }, []);\n\n const fakeDrag = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n // No official way to trigger an onChange to recompute the bounds\n // See: https://github.com/react-grid-layout/react-draggable/issues/363#issuecomment-947751127\n triggerMouseEvent(node, \"mouseover\");\n triggerMouseEvent(node, \"mousedown\");\n triggerMouseEvent(document, \"mousemove\");\n triggerMouseEvent(node, \"mouseup\");\n triggerMouseEvent(node, \"click\");\n }, 100);\n\n const triggerMouseEvent = (node: HTMLDivElement | Document, eventType: string): void => {\n const clickEvent = document.createEvent(\"MouseEvents\");\n clickEvent.initEvent(eventType, true, true);\n node.dispatchEvent(clickEvent);\n };\n\n if (router.page() === Page.BitVerse || router.page() === Page.Loading || router.page() === Page.Recovery)\n return <>;\n return (\n \n \n setOpen((old) => !old)} ref={draggableRef}>\n \n \n \n {header}\n \n \n { setOpen((old) => !old)} />}\n \n \n \n \n {children}\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport clsx from \"clsx\";\nimport { styled, Theme, CSSObject } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport List from \"@mui/material/List\";\nimport Divider from \"@mui/material/Divider\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport ChevronRightIcon from \"@mui/icons-material/ChevronRight\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Typography from \"@mui/material/Typography\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Badge from \"@mui/material/Badge\";\n\nimport ComputerIcon from \"@mui/icons-material/Computer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\"; // Terminal\nimport CreateIcon from \"@mui/icons-material/Create\"; // Create Script\nimport StorageIcon from \"@mui/icons-material/Storage\"; // Active Scripts\nimport BugReportIcon from \"@mui/icons-material/BugReport\"; // Create Program\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\"; // Stats\nimport ContactsIcon from \"@mui/icons-material/Contacts\"; // Factions\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\"; // Augmentations\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\"; // Hacknet\nimport PeopleAltIcon from \"@mui/icons-material/PeopleAlt\"; // Sleeves\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\"; // City\nimport AirplanemodeActiveIcon from \"@mui/icons-material/AirplanemodeActive\"; // Travel\nimport WorkIcon from \"@mui/icons-material/Work\"; // Job\nimport TrendingUpIcon from \"@mui/icons-material/TrendingUp\"; // Stock Market\nimport FormatBoldIcon from \"@mui/icons-material/FormatBold\"; // Bladeburner\nimport BusinessIcon from \"@mui/icons-material/Business\"; // Corp\nimport SportsMmaIcon from \"@mui/icons-material/SportsMma\"; // Gang\nimport CheckIcon from \"@mui/icons-material/Check\"; // Milestones\nimport HelpIcon from \"@mui/icons-material/Help\"; // Tutorial\nimport SettingsIcon from \"@mui/icons-material/Settings\"; // options\nimport DeveloperBoardIcon from \"@mui/icons-material/DeveloperBoard\"; // Dev\nimport EmojiEventsIcon from \"@mui/icons-material/EmojiEvents\"; // Achievements\nimport AccountBoxIcon from \"@mui/icons-material/AccountBox\";\nimport PublicIcon from \"@mui/icons-material/Public\";\nimport LiveHelpIcon from \"@mui/icons-material/LiveHelp\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { IRouter, Page } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../../InteractiveTutorial\";\nimport { getAvailableCreatePrograms } from \"../../Programs/ProgramHelpers\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { redPillFlag } from \"../../RedPill\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nimport { ProgramsSeen } from \"../../Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"../../Faction/ui/FactionsRoot\";\nimport { hash } from \"../../hash/hash\";\n\nconst openedMixin = (theme: Theme): CSSObject => ({\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: Theme): CSSObject => ({\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 = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== \"open\" })(({ theme, open }) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n }),\n ...(!open && {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n }),\n}));\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main,\n },\n listitem: {},\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n page: Page;\n opened: boolean;\n onToggled: (newValue: boolean) => void;\n}\n\nexport function SidebarRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const [hackingOpen, setHackingOpen] = useState(true);\n const [characterOpen, setCharacterOpen] = useState(true);\n const [worldOpen, setWorldOpen] = useState(true);\n const [helpOpen, setHelpOpen] = useState(true);\n\n const flashTerminal =\n ITutorial.currStep === iTutorialSteps.CharacterGoToTerminalPage ||\n ITutorial.currStep === iTutorialSteps.ActiveScriptsPage;\n\n const flashStats = ITutorial.currStep === iTutorialSteps.GoToCharacterPage;\n\n const flashActiveScripts = ITutorial.currStep === iTutorialSteps.TerminalGoToActiveScriptsPage;\n\n const flashHacknet = ITutorial.currStep === iTutorialSteps.GoToHacknetNodesPage;\n\n const flashCity = ITutorial.currStep === iTutorialSteps.HacknetNodesGoToWorldPage;\n\n const flashTutorial = ITutorial.currStep === iTutorialSteps.WorldDescription;\n\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.filter((f) => !InvitationsSeen.includes(f)).length;\n const programCount = getAvailableCreatePrograms(props.player).length - ProgramsSeen.length;\n\n const canOpenFactions =\n props.player.factionInvitations.length > 0 ||\n props.player.factions.length > 0 ||\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenAugmentations =\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenSleeves = props.player.sleeves.length > 0;\n\n const canCorporation = !!(props.player.corporation as any);\n const canGang = !!(props.player.gang as any);\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!(props.player.bladeburner as any);\n const canStaneksGift = props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1);\n\n function clickTerminal(): void {\n props.router.toTerminal();\n if (flashTerminal) iTutorialNextStep();\n }\n\n function clickScriptEditor(): void {\n props.router.toScriptEditor();\n }\n\n function clickStats(): void {\n props.router.toStats();\n if (flashStats) iTutorialNextStep();\n }\n\n function clickActiveScripts(): void {\n props.router.toActiveScripts();\n if (flashActiveScripts) iTutorialNextStep();\n }\n\n function clickCreateProgram(): void {\n props.router.toCreateProgram();\n }\n\n function clickStaneksGift(): void {\n props.router.toStaneksGift();\n }\n\n function clickFactions(): void {\n props.router.toFactions();\n }\n\n function clickAugmentations(): void {\n props.router.toAugmentations();\n }\n\n function clickSleeves(): void {\n props.router.toSleeves();\n }\n\n function clickHacknet(): void {\n props.router.toHacknetNodes();\n if (flashHacknet) iTutorialNextStep();\n }\n\n function clickCity(): void {\n props.router.toCity();\n if (flashCity) iTutorialNextStep();\n }\n\n function clickTravel(): void {\n props.router.toTravel();\n }\n\n function clickJob(): void {\n props.router.toJob();\n }\n\n function clickStockMarket(): void {\n props.router.toStockMarket();\n }\n\n function clickBladeburner(): void {\n props.router.toBladeburner();\n }\n\n function clickCorp(): void {\n props.router.toCorporation();\n }\n\n function clickGang(): void {\n props.router.toGang();\n }\n\n function clickTutorial(): void {\n props.router.toTutorial();\n if (flashTutorial) iTutorialNextStep();\n }\n\n function clickMilestones(): void {\n props.router.toMilestones();\n }\n function clickOptions(): void {\n props.router.toGameOptions();\n }\n\n function clickDev(): void {\n props.router.toDevMenu();\n }\n\n function clickAchievements(): void {\n props.router.toAchievements();\n }\n\n 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(this: Document, event: KeyboardEvent): any {\n if (Settings.DisableHotkeys) return;\n if ((props.player.isWorking && props.player.focus) || redPillFlag) return;\n if (event.key === KEY.T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.key === KEY.C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.key === KEY.E && event.altKey) {\n event.preventDefault();\n clickScriptEditor();\n } else if (event.key === KEY.S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.key === KEY.H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.key === KEY.W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.key === KEY.J && event.altKey && !event.ctrlKey && !event.metaKey && canJob) {\n // ctrl/cmd + alt + j is shortcut to open Chrome dev tools\n event.preventDefault();\n clickJob();\n } else if (event.key === KEY.R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.key === KEY.P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.key === KEY.F && event.altKey) {\n if (props.page == Page.Terminal && Settings.EnableBashHotkeys) {\n return;\n }\n event.preventDefault();\n clickFactions();\n } else if (event.key === KEY.A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.key === KEY.U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.key === KEY.B && event.altKey && props.player.bladeburner) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.key === KEY.G && event.altKey && props.player.gang) {\n event.preventDefault();\n clickGang();\n }\n // if (event.key === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n }\n\n document.addEventListener(\"keydown\", handleShortcuts);\n return () => document.removeEventListener(\"keydown\", handleShortcuts);\n }, []);\n\n const classes = useStyles();\n const [open, setOpen] = useState(props.opened);\n const toggleDrawer = (): void => setOpen((old) => !old);\n\n useEffect(() => {\n props.onToggled(open);\n }, [open]);\n\n return (\n \n \n \n {!open ? : }\n \n \n Bitburner v{CONSTANTS.VersionString}\n \n }\n />\n \n \n \n setHackingOpen((old) => !old)}>\n \n \n \n \n \n Hacking} />\n {hackingOpen ? : }\n \n \n \n \n \n \n \n \n \n \n \n Terminal\n \n \n \n \n \n \n \n \n \n \n \n Script Editor\n \n \n \n \n \n \n \n \n \n \n \n Active Scripts\n \n \n \n \n \n 0 ? programCount : undefined} color=\"error\">\n \n \n \n \n \n \n \n Create Program\n \n \n \n {canStaneksGift && (\n \n \n \n \n \n \n \n \n Stanek's Gift\n \n \n \n )}\n \n \n\n \n setCharacterOpen((old) => !old)}>\n \n \n \n \n \n Character} />\n {characterOpen ? : }\n \n \n \n \n \n \n \n \n \n \n Stats\n \n \n \n {canOpenFactions && (\n \n \n \n \n \n \n \n \n \n \n Factions\n \n \n \n )}\n {canOpenAugmentations && (\n \n \n \n \n \n \n \n \n \n \n Augmentations\n \n \n \n )}\n \n \n \n \n \n \n \n \n Hacknet\n \n \n \n {canOpenSleeves && (\n \n \n \n \n \n \n \n Sleeves\n \n \n )}\n \n\n \n setWorldOpen((old) => !old)}>\n \n \n \n \n \n World} />\n {worldOpen ? : }\n \n \n \n \n \n \n \n \n \n \n City\n \n \n \n \n \n \n \n \n \n \n Travel\n \n \n {canJob && (\n \n \n \n \n \n \n \n Job\n \n \n )}\n {canStockMarket && (\n \n \n \n \n \n \n \n Stock Market\n \n \n )}\n {canBladeburner && (\n \n \n \n \n \n \n \n Bladeburner\n \n \n )}\n {canCorporation && (\n \n \n \n \n \n \n \n Corp\n \n \n )}\n {canGang && (\n \n \n \n \n \n \n \n Gang\n \n \n )}\n \n\n \n setHelpOpen((old) => !old)}>\n \n \n \n \n \n Help} />\n {helpOpen ? : }\n \n \n \n \n \n \n \n \n \n Milestones\n \n \n \n \n \n \n \n \n \n \n Tutorial\n \n \n \n \n \n \n \n \n \n \n Achievements\n \n \n \n \n \n \n \n \n \n Options\n \n \n {process.env.NODE_ENV === \"development\" && (\n \n \n \n \n \n \n \n Dev\n \n \n )}\n \n \n \n );\n}\n","import { Programs } from \"./Programs\";\nimport { Program } from \"./Program\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\n//Returns the programs this player can create.\nexport function getAvailableCreatePrograms(player: IPlayer): Program[] {\n const programs: Program[] = [];\n for (const key of Object.keys(Programs)) {\n // Non-creatable program\n const create = Programs[key].create;\n if (create == null) continue;\n\n // Already has program\n if (player.hasProgram(Programs[key].name)) continue;\n\n // Does not meet requirements\n if (!create.req(player)) continue;\n\n programs.push(Programs[key]);\n }\n\n return programs;\n}\n","/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { InstalledAugmentations } from \"./InstalledAugmentations\";\nimport { PlayerMultipliers } from \"./PlayerMultipliers\";\nimport { PurchasedAugmentations } from \"./PurchasedAugmentations\";\nimport { SourceFiles } from \"./SourceFiles\";\n\nimport { canGetBonus } from \"../../ExportBonus\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { ConfirmationModal } from \"../../ui/React/ConfirmationModal\";\n\ninterface IProps {\n exportGameFn: () => void;\n installAugmentationsFn: () => void;\n}\n\nexport function AugmentationsRoot(props: IProps): React.ReactElement {\n const [installOpen, setInstallOpen] = useState(false);\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n function doExport(): void {\n props.exportGameFn();\n rerender();\n }\n\n function exportBonusStr(): string {\n if (canGetBonus()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n function doInstall(): void {\n if (!Settings.SuppressBuyAugmentationConfirmation) {\n setInstallOpen(true);\n } else {\n props.installAugmentationsFn();\n }\n }\n\n return (\n <>\n Augmentations\n \n \n Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to\n install them.\n \n WARNING: Installing your Augmentations resets most of your progress, including:\n
\n - Stats/Skill levels and Experience\n - Money\n - Scripts on every computer but your home computer\n - Purchased servers\n - Hacknet Nodes\n - Faction/Company reputation\n - Stocks\n
\n \n Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations\n you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you\n will lose all programs besides NUKE.exe)\n \n
\n \n Purchased Augmentations\n \n \n 'I never asked for this'}>\n \n \n \n \n setInstallOpen(false)}\n onConfirm={props.installAugmentationsFn}\n confirmationText={\n <>\n Installing will reset\n
\n
- money\n
- skill / experience\n
- every server except home\n
- factions and reputation\n
\n
\n You will keep:\n
\n
- All scripts on home\n
- home ram and cores\n
\n
\n It is recommended to install several Augmentations at once. Preferably everything from any faction of your\n choosing.\n \n }\n />\n It's always a good idea to backup/export your save!}>\n \n \n \n
\n Installed Augmentations\n \n \n List of all Augmentations that have been installed. You have gained the effects of these.\n \n \n \n \n \n \n );\n}\n","/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\nimport React, { useState } from \"react\";\n\nimport { AugmentationAccordion } from \"../../ui/React/AugmentationAccordion\";\nimport { Augmentations } from \"../Augmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../../ui/Context\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport List from \"@mui/material/List\";\nimport { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Box, Paper, ListItemButton, ListItemText, Typography, Collapse } from \"@mui/material\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\n\nexport function InstalledAugmentations(): React.ReactElement {\n const setRerender = useState(true)[1];\n const player = use.Player();\n\n const sourceAugs = player.augmentations.slice();\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name.localeCompare(aug2.name);\n });\n }\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function sortByAcquirementTime(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.AcquirementTime;\n rerender();\n }\n\n function sortInOrder(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.Alphabetically;\n rerender();\n }\n\n return (\n <>\n \n \n \n \n \n \n \n {player.entropy > 0 &&\n (() => {\n const [open, setOpen] = useState(false);\n\n return (\n \n setOpen((old) => !old)}>\n \n Entropy Virus - Level {player.entropy}\n \n }\n />\n {open ? (\n \n ) : (\n \n )}\n \n \n \n \n All multipliers decreased by:{\" \"}\n {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}% (multiplicative)\n \n \n \n \n );\n })()}\n\n {sourceAugs.map((e) => {\n const aug = Augmentations[e.name];\n\n let level = null;\n if (e.name === AugmentationNames.NeuroFluxGovernor) {\n level = e.level;\n }\n\n return ;\n })}\n \n \n );\n}\n","/**\n * React component for displaying the player's multipliers on the Augmentation UI page\n */\nimport * as React from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Augmentations } from \"../Augmentations\";\nimport { Table, TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nfunction calculateAugmentedStats(): any {\n const augP: any = {};\n for (const aug of Player.queuedAugmentations) {\n const augObj = Augmentations[aug.name];\n for (const mult of Object.keys(augObj.mults)) {\n const v = augP[mult] ? augP[mult] : 1;\n augP[mult] = v * augObj.mults[mult];\n }\n }\n return augP;\n}\n\nfunction Improvements({ r, m }: { r: number; m: number }): React.ReactElement {\n if (r) {\n return (\n <>\n \n  {\"=>\"} \n \n \n \n {numeralWrapper.formatPercentage(r)} \n \n \n \n );\n }\n return <>;\n}\n\ninterface IBN5StatsProps {\n base: number;\n mult: number;\n}\n\nfunction BN5Stat(props: IBN5StatsProps): React.ReactElement {\n if (props.mult === 1) return <>;\n return <>({numeralWrapper.formatPercentage(props.base * props.mult)});\n}\n\nfunction MultiplierTable({ rows }: { rows: [string, number, number, number][] }): React.ReactElement {\n return (\n \n \n {rows.map((r: any) => (\n \n \n {r[0]} multiplier: \n \n \n \n {numeralWrapper.formatPercentage(r[1])} \n \n \n \n \n ))}\n \n
\n );\n}\n\nexport function PlayerMultipliers(): React.ReactElement {\n const mults = calculateAugmentedStats();\n\n function BladeburnerMults(): React.ReactElement {\n if (!Player.canAccessBladeburner()) return <>;\n return (\n <>\n \n
\n \n );\n }\n\n return (\n <>\n Multipliers\n \n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n\n \n
\n \n );\n}\n","/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\nimport * as React from \"react\";\n\nimport { Augmentations } from \"../Augmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\nimport { Player } from \"../../Player\";\n\nimport { AugmentationAccordion } from \"../../ui/React/AugmentationAccordion\";\nimport List from \"@mui/material/List\";\n\nexport function PurchasedAugmentations(): React.ReactElement {\n const augs: React.ReactElement[] = [];\n // Only render the last NeuroFlux (there are no findLastIndex btw)\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; i++) {\n const ownedAug = Player.queuedAugmentations[i];\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = Augmentations[ownedAug.name];\n let level = null;\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ownedAug.level;\n }\n augs.push();\n }\n\n return {augs};\n}\n","import React from \"react\";\nimport { SourceFileMinus1 } from \"./SourceFileMinus1\";\nimport { OwnedSourceFiles } from \"./OwnedSourceFiles\";\nimport List from \"@mui/material/List\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\n\nexport function SourceFiles(): React.ReactElement {\n return (\n <>\n Source Files\n \n \n \n \n \n \n \n );\n}\n","/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\nimport React, { useState } from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { Exploit, ExploitName } from \"../../Exploits/Exploit\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\nexport function SourceFileMinus1(): React.ReactElement {\n const [open, setOpen] = useState(false);\n const exploits = Player.exploits;\n\n if (exploits.length === 0) {\n return <>;\n }\n\n return (\n \n setOpen((old) => !old)}>\n \n Source-File -1: Exploits in the BitNodes\n
\n Level {exploits.length} / {Object.keys(Exploit).length}\n \n }\n />\n {open ? : }\n
\n \n \n \n This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\n \n It increases all of the player's multipliers by 0.1%\n
\n\n You have found the following exploits:\n \n {exploits.map((c: Exploit) => (\n * {ExploitName(c)}\n ))}\n \n
\n
\n
\n );\n}\n","/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\nimport * as React from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\n\nimport { SourceFileAccordion } from \"../../ui/React/SourceFileAccordion\";\n\nexport function OwnedSourceFiles(): React.ReactElement {\n const sourceSfs = Player.sourceFiles.slice();\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n return (\n <>\n {sourceSfs.map((e) => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = SourceFiles[srcFileKey];\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return ;\n })}\n \n );\n}\n","/**\n * React Component for displaying a single Source-File as an accordion.\n *\n * The header of the accordion contains the Source-Files's name and level,\n * and the accordion's panel contains the Source-File's description.\n */\nimport React, { useState } from \"react\";\n\nimport { SourceFile } from \"../../SourceFile/SourceFile\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\ntype IProps = {\n level: number;\n sf: SourceFile;\n};\n\nexport function SourceFileAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const maxLevel = props.sf.n === 12 ? \"∞\" : \"3\";\n\n return (\n \n setOpen((old) => !old)}>\n \n {props.sf.name}\n
\n {`Level ${props.level} / ${maxLevel}`}\n \n }\n />\n {open ? : }\n
\n \n \n {props.sf.info}\n \n \n
\n );\n}\n","import { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { IEngine } from \"./IEngine\";\nimport { IRouter } from \"./ui/Router\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\n\nimport React, { useEffect } from \"react\";\n\nimport { General } from \"./DevMenu/ui/General\";\nimport { Stats } from \"./DevMenu/ui/Stats\";\nimport { Factions } from \"./DevMenu/ui/Factions\";\nimport { Augmentations } from \"./DevMenu/ui/Augmentations\";\nimport { SourceFiles } from \"./DevMenu/ui/SourceFiles\";\nimport { Programs } from \"./DevMenu/ui/Programs\";\nimport { Servers } from \"./DevMenu/ui/Servers\";\nimport { Companies } from \"./DevMenu/ui/Companies\";\nimport { Bladeburner as BladeburnerElem } from \"./DevMenu/ui/Bladeburner\";\nimport { Gang } from \"./DevMenu/ui/Gang\";\nimport { Corporation } from \"./DevMenu/ui/Corporation\";\nimport { CodingContracts } from \"./DevMenu/ui/CodingContracts\";\nimport { StockMarket } from \"./DevMenu/ui/StockMarket\";\nimport { Sleeves } from \"./DevMenu/ui/Sleeves\";\nimport { Stanek } from \"./DevMenu/ui/Stanek\";\nimport { TimeSkip } from \"./DevMenu/ui/TimeSkip\";\nimport { Achievements } from \"./DevMenu/ui/Achievements\";\nimport { Entropy } from \"./DevMenu/ui/Entropy\";\nimport Typography from \"@mui/material/Typography\";\nimport { Exploit } from \"./Exploits/Exploit\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n router: IRouter;\n}\n\nexport function DevMenuRoot(props: IProps): React.ReactElement {\n useEffect(() => {\n props.player.giveExploit(Exploit.YoureNotMeantToAccessThis);\n }, []);\n return (\n <>\n Development Menu - Only meant to be used for testing/debugging\n \n \n \n \n \n \n \n \n\n {props.player.bladeburner instanceof Bladeburner && }\n\n {props.player.inGang() && }\n\n {props.player.hasCorporation() && }\n\n \n\n {props.player.hasWseAccount && }\n\n {props.player.sleeves.length > 0 && }\n {props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1) && }\n\n \n \n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function General(props: IProps): React.ReactElement {\n const [error, setError] = useState(false);\n\n function addMoney(n: number) {\n return function () {\n props.player.gainMoney(n, \"other\");\n };\n }\n\n function upgradeRam(): void {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3(): void {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3(): void {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, false);\n }\n\n useEffect(() => {\n if (error) throw new ReferenceError('Manually thrown error');\n }, [error]);\n\n return (\n \n }>\n General\n \n \n \n \n \n \n \n \n
\n\n \n \n \n \n \n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n function modifyExp(stat: string, modifier: number) {\n return function (exp: number) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n break;\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n break;\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n break;\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n break;\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n break;\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n break;\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier: number) {\n return function (amt: number) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp(): void {\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(): void {\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: string): () => void {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma(): () => void {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence(): void {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence(): void {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return (\n \n }>\n Experience / Stats\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n All:\n \n \n \n
\n Hacking:\n \n modifyExp(\"hacking\", 1)(bigNumber)}\n add={modifyExp(\"hacking\", 1)}\n subtract={modifyExp(\"hacking\", -1)}\n reset={resetExperience(\"hacking\")}\n />\n
\n Strength:\n \n modifyExp(\"strength\", 1)(bigNumber)}\n add={modifyExp(\"strength\", 1)}\n subtract={modifyExp(\"strength\", -1)}\n reset={resetExperience(\"strength\")}\n />\n
\n Defense:\n \n modifyExp(\"defense\", 1)(bigNumber)}\n add={modifyExp(\"defense\", 1)}\n subtract={modifyExp(\"defense\", -1)}\n reset={resetExperience(\"defense\")}\n />\n
\n Dexterity:\n \n modifyExp(\"dexterity\", 1)(bigNumber)}\n add={modifyExp(\"dexterity\", 1)}\n subtract={modifyExp(\"dexterity\", -1)}\n reset={resetExperience(\"dexterity\")}\n />\n
\n Agility:\n \n modifyExp(\"agility\", 1)(bigNumber)}\n add={modifyExp(\"agility\", 1)}\n subtract={modifyExp(\"agility\", -1)}\n reset={resetExperience(\"agility\")}\n />\n
\n Charisma:\n \n modifyExp(\"charisma\", 1)(bigNumber)}\n add={modifyExp(\"charisma\", 1)}\n subtract={modifyExp(\"charisma\", -1)}\n reset={resetExperience(\"charisma\")}\n />\n
\n Intelligence:\n \n modifyExp(\"intelligence\", 1)(bigNumber)}\n add={modifyExp(\"intelligence\", 1)}\n subtract={modifyExp(\"intelligence\", -1)}\n reset={resetExperience(\"intelligence\")}\n />\n \n \n \n \n
\n Karma:\n \n modifyExp(\"intelligence\", 1)(100000)}\n add={modifyKarma(1)}\n subtract={modifyKarma(-1)}\n reset={resetKarma()}\n />\n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Factions as AllFaction } from \"../../Faction/Factions\";\nimport FormControl from \"@mui/material/FormControl\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Factions(props: IProps): React.ReactElement {\n const [faction, setFaction] = useState(FactionNames.Illuminati as string);\n\n function setFactionDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value as string);\n }\n\n function receiveInvite(): void {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites(): void {\n Object.values(FactionNames).forEach(faction => props.player.receiveInvite(faction))\n }\n\n function modifyFactionRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = 0;\n }\n }\n\n return (\n \n }>\n Factions\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Faction:\n \n \n Faction\n \n \n \n \n \n \n \n \n }\n >\n {Object.values(AllFaction).map((faction) => (\n \n {faction.name}\n \n ))}\n \n \n
\n Reputation:\n \n modifyFactionRep(1)(bigNumber)}\n add={modifyFactionRep(1)}\n subtract={modifyFactionRep(-1)}\n reset={resetFactionRep}\n />\n
\n Favor:\n \n modifyFactionFavor(1)(2000)}\n add={modifyFactionFavor(1)}\n subtract={modifyFactionFavor(-1)}\n reset={resetFactionFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Augmentations(props: IProps): React.ReactElement {\n const [augmentation, setAugmentation] = useState(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event: SelectChangeEvent): void {\n setAugmentation(event.target.value as string);\n }\n function queueAug(): void {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs(): void {\n for (const augName of Object.values(AugmentationNames)) {\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs(): void {\n props.player.augmentations = [];\n }\n\n return (\n \n }>\n Augmentations\n \n \n \n \n \n \n \n \n \n
\n Aug:\n \n \n \n \n \n \n \n \n \n }\n endAdornment={\n <>\n \n \n \n \n }\n >\n {Object.values(AugmentationNames).map((aug) => (\n \n {aug}\n \n ))}\n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { PlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\n\n// Update as additional BitNodes get implemented\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function SourceFiles(props: IProps): React.ReactElement {\n function setSF(sfN: number, sfLvl: number) {\n return function () {\n if (sfN === 9) {\n props.player.hacknetNodes = [];\n }\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 PlayerOwnedSourceFile(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: number) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits(): void {\n props.player.exploits = [];\n }\n\n return (\n \n }>\n Source-Files\n \n \n \n \n \n \n \n \n \n \n \n \n {validSFN.map((i) => (\n \n \n \n \n ))}\n \n
\n Exploits:\n \n \n
\n All:\n \n \n \n \n \n \n \n
\n SF-{i}:\n \n \n \n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Programs as AllPrograms } from \"../../Programs/Programs\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Programs(props: IProps): React.ReactElement {\n const [program, setProgram] = useState(\"NUKE.exe\");\n function setProgramDropdown(event: SelectChangeEvent): void {\n setProgram(event.target.value as string);\n }\n function addProgram(): void {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms(): void {\n for (const i of Object.keys(AllPrograms)) {\n if (!props.player.hasProgram(AllPrograms[i].name)) {\n props.player.getHomeComputer().programs.push(AllPrograms[i].name);\n }\n }\n }\n\n return (\n \n }>\n Programs\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Program:\n \n \n
\n Add:\n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { GetServer, GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\nexport function Servers(): React.ReactElement {\n const [server, setServer] = useState(\"home\");\n function setServerDropdown(event: SelectChangeEvent): void {\n setServer(event.target.value as string);\n }\n function rootServer(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) 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(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) 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(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n }\n\n function maxMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n }\n\n function minMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n\n function minAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n }\n\n return (\n \n }>\n Servers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Server:\n \n \n
\n Root:\n \n \n \n \n
\n Security:\n \n \n \n \n
\n Money:\n \n \n \n \n \n \n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Companies as AllCompanies } from \"../../Company/Companies\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { Adjuster } from \"./Adjuster\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\nexport function Companies(): React.ReactElement {\n const [company, setCompany] = useState(FactionNames.ECorp as string);\n function setCompanyDropdown(event: SelectChangeEvent): void {\n setCompany(event.target.value as string);\n }\n function resetCompanyRep(): void {\n AllCompanies[company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor(): void {\n AllCompanies[company].favor = 0;\n }\n\n function tonsOfRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = 0;\n }\n }\n\n return (\n \n }>\n Companies\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Company:\n \n \n
\n Reputation:\n \n modifyCompanyRep(1)(bigNumber)}\n add={modifyCompanyRep(1)}\n subtract={modifyCompanyRep(-1)}\n reset={resetCompanyRep}\n />\n
\n Favor:\n \n modifyCompanyFavor(1)(2000)}\n add={modifyCompanyFavor(1)}\n subtract={modifyCompanyFavor(-1)}\n reset={resetCompanyFavor}\n />\n
\n All Reputation:\n \n \n \n
\n All Favor:\n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Bladeburner(props: IProps): React.ReactElement {\n const bladeburner = props.player.bladeburner;\n if (bladeburner === null) return <>;\n function modifyBladeburnerRank(modify: number): (x: number) => void {\n return function (rank: number): void {\n if (!bladeburner) return;\n bladeburner.changeRank(props.player, rank * modify);\n };\n }\n\n function resetBladeburnerRank(): void {\n if (!bladeburner) return;\n bladeburner.rank = 0;\n bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank(): void {\n if (!bladeburner) return;\n\n bladeburner.changeRank(props.player, bigNumber);\n }\n\n function modifyBladeburnerCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += cycles * modify;\n };\n }\n\n function resetBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles = 0;\n }\n\n function addTonsBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += bigNumber;\n }\n\n return (\n \n }>\n Bladeburner\n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Rank:\n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Gang(props: IProps): React.ReactElement {\n function addTonsGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return (\n \n }>\n Gang\n \n \n \n \n \n \n \n \n \n
\n Cycles:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Corporation(props: IProps): React.ReactElement {\n function addTonsCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds + bigNumber;\n }\n }\n\n function modifyCorporationFunds(modify: number): (x: number) => void {\n return function (funds: number): void {\n if (props.player.corporation) {\n props.player.corporation.funds += funds * modify;\n }\n };\n }\n\n function resetCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds - props.player.corporation.funds;\n }\n }\n\n function addTonsCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts(): void {\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(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return (\n \n }>\n Corporation\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Funds:\n \n \n
\n Cycles:\n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { generateContract, generateRandomContract, generateRandomContractOnHome } from \"../../CodingContractGenerator\";\nimport { CodingContractTypes } from \"../../CodingContracts\";\n\nexport function CodingContracts(): React.ReactElement {\n const [codingcontract, setCodingcontract] = useState(\"Find Largest Prime Factor\");\n function setCodingcontractDropdown(event: SelectChangeEvent): void {\n setCodingcontract(event.target.value as string);\n }\n\n function specificContract(): void {\n generateContract({\n problemType: codingcontract,\n server: \"home\",\n });\n }\n\n return (\n \n }>\n Coding Contracts\n \n \n \n \n \n \n \n \n \n \n \n
\n \n \n
\n \n \n
\n
\n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { Money } from \"../../ui/React/Money\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { StockMarket as SM } from \"../../StockMarket/StockMarket\";\nimport { Stock } from \"../../StockMarket/Stock\";\n\nexport function StockMarket(): React.ReactElement {\n const [stockPrice, setStockPrice] = useState(0);\n const [stockSymbol, setStockSymbol] = useState(\"\");\n\n function setStockPriceField(event: React.ChangeEvent): void {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event: React.ChangeEvent): void {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub: (arg0: Stock) => void): void {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match: (symbol: string) => boolean = (): boolean => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol: string): boolean {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name of Object.keys(SM)) {\n if (SM.hasOwnProperty(name)) {\n const stock = SM[name];\n if (stock instanceof Stock && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice(): void {\n if (!isNaN(stockPrice)) {\n processStocks((stock: Stock) => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps(): void {\n const stocks: JSX.Element[] = [];\n processStocks((stock: Stock) => {\n stocks.push(\n \n {stock.symbol}\n \n \n \n ,\n );\n });\n dialogBoxCreate(\n \n \n \n \n \n \n {stocks}\n \n
StockPrice cap
,\n );\n }\n return (\n \n }>\n Stock Market\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Symbol:\n \n \n
\n Price:\n \n \n \n
\n Caps:\n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Sleeves(props: IProps): React.ReactElement {\n function sleeveMaxAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n function sleeveSetStoredCycles(cycles: number): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].storedCycles = cycles;\n }\n }\n\n return (\n \n }>\n Sleeves\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
\n Shock:\n \n \n \n \n
\n Sync:\n \n \n \n \n
\n sleeveSetStoredCycles(10000000)}\n add={sleeveSetStoredCycles}\n subtract={sleeveSetStoredCycles}\n reset={() => sleeveSetStoredCycles(0)}\n />\n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport { staneksGift } from \"../../CotMG/Helper\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { Adjuster } from \"./Adjuster\";\n\nexport function Stanek(): React.ReactElement {\n function addCycles(): void {\n staneksGift.storedCycles = 1e6;\n }\n\n function modCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.storedCycles += cycles * modify;\n };\n }\n\n function resetCycles(): void {\n staneksGift.storedCycles = 0;\n }\n\n function addCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.avgCharge = 1e21;\n f.numCharge = 1e21;\n });\n }\n\n function modCharge(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.fragments.forEach((f) => (f.avgCharge += cycles * modify));\n };\n }\n\n function resetCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.avgCharge = 0;\n f.numCharge = 0;\n });\n }\n\n return (\n \n }>\n Stanek's Gift\n \n \n \n \n \n \n \n \n \n \n \n
\n \n
\n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { saveObject } from \"../../SaveObject\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function TimeSkip(props: IProps): React.ReactElement {\n function timeskip(time: number) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n saveObject.saveGame();\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return (\n \n }>\n Time skip\n \n \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport { Tooltip } from \"@mui/material\";\nimport LockIcon from '@mui/icons-material/Lock';\nimport LockOpenIcon from '@mui/icons-material/LockOpen';\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { IEngine } from \"../../IEngine\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Achievements(props: IProps): React.ReactElement {\n const [playerAchievement, setPlayerAchievements] = useState(props.player.achievements.map(m => m.ID));\n\n function grantAchievement(id: string): void {\n props.player.giveAchievement(id);\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function grantAllAchievements(): void {\n Object.values(achievements).forEach(a => props.player.giveAchievement(a.ID));\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function removeAchievement(id: string): void {\n props.player.achievements = props.player.achievements.filter(a => a.ID !== id);\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function clearAchievements(): void {\n props.player.achievements = [];\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function disableEngine(): void {\n props.engine.Counters.achievementsCounter = Number.MAX_VALUE;\n }\n\n function enableEngine(): void {\n props.engine.Counters.achievementsCounter = 0\n }\n\n return (\n \n }>\n Achievements\n \n \n \n \n \n \n \n \n \n {Object.values(achievements).map((i) => {\n const achieved = playerAchievement.includes(i.ID);\n return \n \n \n \n \n })}\n \n
\n \n Achievements:\n \n \n \n \n \n \n \n
\n {achieved ? (\n \n \n \n ) : (\n \n \n \n )}\n \n {i.ID}
{i.Description}}>\n {i.Name}:\n
\n
\n \n \n \n \n
\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Entropy(props: IProps): React.ReactElement {\n return (\n \n }>\n Entropy\n \n \n {\n props.player.entropy += num;\n props.player.applyEntropy(props.player.entropy);\n }}\n subtract={(num) => {\n props.player.entropy -= num;\n props.player.applyEntropy(props.player.entropy);\n }}\n tons={() => {\n props.player.entropy += 1e12;\n props.player.applyEntropy(props.player.entropy);\n }}\n reset={() => {\n props.player.entropy = 0;\n props.player.applyEntropy(props.player.entropy);\n }}\n />\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Stats } from \"./Stats\";\nimport { Console } from \"./Console\";\nimport { AllPages } from \"./AllPages\";\n\nimport { use } from \"../../ui/Context\";\nimport Box from \"@mui/material/Box\";\n\nexport function BladeburnerRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n return (\n \n \n \n \n \n\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport { TravelModal } from \"./TravelModal\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n router: IRouter;\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n const [travelOpen, setTravelOpen] = useState(false);\n const setRerender = useState(false)[1];\n\n const inFaction = props.bladeburner.rank >= BladeburnerConstants.RankNeededForFaction;\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function openFaction(): void {\n if (!inFaction) return;\n const faction = Factions[FactionNames.Bladeburners];\n if (!faction.isMember) {\n joinFaction(faction);\n }\n\n props.router.toFaction(faction);\n }\n\n return (\n \n \n \n \n Rank 25 required. : \"\"}>\n \n \n \n \n setTravelOpen(false)} bladeburner={props.bladeburner} />\n \n \n Your rank within the Bladeburner division.}>\n Rank: {formatNumber(props.bladeburner.rank, 2)}\n \n \n
\n \n \n Performing actions will use up your stamina.\n
\n
\n Your max stamina is determined primarily by your agility stat.\n
\n
\n Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads\n to a higher gain rate.\n
\n
\n Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of\n your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this\n means your success rate would be multipled by 85% (100 - 15).\n
\n
\n Your max stamina and stamina gain rate can also be increased by training, or through skills and\n Augmentation upgrades.\n \n }\n >\n \n Stamina: {formatNumber(props.bladeburner.stamina, 3)} / {formatNumber(props.bladeburner.maxStamina, 3)}\n \n \n
\n
\n \n Stamina Penalty: {formatNumber((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1)}%\n \n
\n Team Size: {formatNumber(props.bladeburner.teamSize, 0)}\n Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)}\n
\n Num Times Hospitalized: {props.bladeburner.numHosp}\n \n Money Lost From Hospitalizations: \n \n
\n Current City: {props.bladeburner.city}\n \n \n This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate\n population count increases success rate estimates.\n \n }\n >\n \n Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)}\n \n \n \n
\n \n \n This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\n \n }\n >\n Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)}\n \n \n
\n \n \n The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a\n chaos level can make contracts and operations harder.\n \n }\n >\n City Chaos: {formatNumber(props.bladeburner.getCurrentCity().chaos)}\n \n \n
\n {(props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000 > 15000 && (\n <>\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by\n browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n \n Bonus time:{\" \"}\n {convertTimeMsToTimeElapsedString(\n (props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000,\n )}\n \n \n \n
\n \n )}\n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n
\n \n Aug. Success Chance mult: {formatNumber(props.player.bladeburner_success_chance_mult * 100, 1)}%\n
\n Aug. Max Stamina mult: {formatNumber(props.player.bladeburner_max_stamina_mult * 100, 1)}%\n
\n Aug. Stamina Gain mult: {formatNumber(props.player.bladeburner_stamina_gain_mult * 100, 1)}%\n
\n Aug. Field Analysis mult: {formatNumber(props.player.bladeburner_analysis_mult * 100, 1)}%\n
\n
\n
\n );\n}\n","import React from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { Settings } from \"../../Settings/Settings\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n function travel(city: string): void {\n props.bladeburner.city = city;\n props.onClose();\n }\n\n return (\n \n <>\n \n Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in\n for your Bladeburner duties does not affect your location in the game otherwise.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Paper from \"@mui/material/Paper\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ILineProps {\n content: any;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\",\n },\n input: {\n backgroundColor: theme.colors.backgroundsecondary,\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);\n\nfunction Line(props: ILineProps): React.ReactElement {\n return (\n \n {props.content}\n \n );\n}\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function Console(props: IProps): React.ReactElement {\n const classes = useStyles();\n const [command, setCommand] = useState(\"\");\n const setRerender = useState(false)[1];\n const consoleInput = useRef(null);\n\n function handleCommandChange(event: React.ChangeEvent): void {\n setCommand(event.target.value);\n }\n\n const [consoleHistoryIndex, setConsoleHistoryIndex] = useState(props.bladeburner.consoleHistory.length);\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => {\n clearInterval(id);\n };\n }, []);\n\n function handleKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n if (command.length > 0) {\n props.bladeburner.postToConsole(\"> \" + command);\n props.bladeburner.executeConsoleCommands(props.player, command);\n setConsoleHistoryIndex(props.bladeburner.consoleHistory.length);\n setCommand(\"\");\n }\n }\n\n const consoleHistory = props.bladeburner.consoleHistory;\n\n if (event.key === KEY.UP_ARROW) {\n // up\n let i = consoleHistoryIndex;\n const len = consoleHistory.length;\n if (len === 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n if (i !== 0) {\n i = i - 1;\n }\n setConsoleHistoryIndex(i);\n const prevCommand = consoleHistory[i];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n\n if (event.key === KEY.DOWN_ARROW) {\n const i = consoleHistoryIndex;\n const len = consoleHistory.length;\n\n if (len == 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n // Latest command, put nothing\n if (i == len || i == len - 1) {\n setConsoleHistoryIndex(len);\n event.currentTarget.value = \"\";\n } else {\n setConsoleHistoryIndex(consoleHistoryIndex + 1);\n const prevCommand = consoleHistory[consoleHistoryIndex + 1];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n }\n }\n\n function handleClick(): void {\n if (!consoleInput.current) return;\n consoleInput.current.focus();\n }\n\n return (\n \n \n \n \n \n \n \n \n \n ),\n spellCheck: false,\n }}\n />\n \n );\n}\n\ninterface ILogProps {\n entries: string[];\n}\n\nfunction Logs({ entries }: ILogProps): React.ReactElement {\n const scrollHook = useRef(null);\n\n // TODO: Text gets shifted up as new entries appear, if the user scrolled up it should attempt to keep the text focused\n function scrollToBottom(): void {\n if (!scrollHook.current) return;\n scrollHook.current.scrollTop = scrollHook.current.scrollHeight;\n }\n\n useEffect(() => {\n scrollToBottom();\n }, [entries.length]);\n\n return (\n \n {entries && entries.map((log: any, i: number) => )}\n \n );\n}\n","import React from \"react\";\nimport { GeneralActionPage } from \"./GeneralActionPage\";\nimport { ContractPage } from \"./ContractPage\";\nimport { OperationPage } from \"./OperationPage\";\nimport { BlackOpPage } from \"./BlackOpPage\";\nimport { SkillPage } from \"./SkillPage\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function AllPages(props: IProps): React.ReactElement {\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n return (\n <>\n \n \n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n {value === 3 && }\n {value === 4 && }\n \n \n );\n}\n","import * as React from \"react\";\nimport { GeneralActionList } from \"./GeneralActionList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionPage(props: IProps): React.ReactElement {\n return (\n <>\n These are generic actions that will assist you in your Bladeburner duties.\n \n \n );\n}\n","import React from \"react\";\nimport { GeneralActionElem } from \"./GeneralActionElem\";\nimport { Action } from \"../Action\";\nimport { GeneralActions } from \"../GeneralActions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionList(props: IProps): React.ReactElement {\n const actions: Action[] = [];\n for (const name of Object.keys(GeneralActions)) {\n if (GeneralActions.hasOwnProperty(name)) {\n actions.push(GeneralActions[name]);\n }\n }\n return (\n <>\n {actions.map((action: Action) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { GeneralActions } from \"../data/GeneralActions\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function GeneralActionElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = (function (): number {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n case \"Incite Violence\":\n return 60;\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n return -1; // dead code\n })();\n const successChance =\n props.action.name === \"Recruitment\"\n ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1))\n : -1;\n\n const actionData = GeneralActions[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n \n \n \n \n )}\n
\n
\n {actionData.desc}\n
\n
\n \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n {successChance !== -1 && (\n <>\n
\n Estimated success chance: {formatNumber(successChance * 100, 1)}%\n \n )}\n
\n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const GeneralActions: {\n [key: string]: IContract | undefined;\n} = {\n Training: {\n desc: (\n <>\n Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for\n all combat stats and also increases your max stamina.\n \n ),\n },\n\n \"Field Analysis\": {\n desc: (\n <>\n Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations\n and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the\n current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Recruitment: {\n desc: (\n <>\n Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n Diplomacy: {\n desc: (\n <>\n Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in\n your current city.\n
\n
\n Does NOT require stamina.\n \n ),\n },\n\n \"Hyperbolic Regeneration Chamber\": {\n desc: (\n <>\n Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your\n wounds and slightly increase your stamina.\n
\n
\n \n ),\n },\n \"Incite Violence\": {\n desc: (\n <>\n Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate\n additional contracts and operations, at the cost of increased Chaos.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { ContractList } from \"./ContractList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you\n to lose HP, which can lead to hospitalization.\n
\n
\n You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more\n difficult, but grant more rank, experience, and money.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { ContractElem } from \"./ContractElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.contracts);\n const contracts = props.bladeburner.contracts;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Contracts } from \"../data/Contracts\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function ContractElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Contracts[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n )}\n
\n
\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Contracts remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const Contracts: {\n [key: string]: IContract | undefined;\n} = {\n Tracking: {\n desc: (\n <>\n Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT\n engage. Stealth is of the utmost importance.\n
\n
\n Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever\n city you are currently in.\n \n ),\n },\n \"Bounty Hunter\": {\n desc: (\n <>\n Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n
\n
\n Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n Retirement: {\n desc: (\n <>\n Hunt down and retire (kill) rogue Synthoids.\n
\n
\n Successfully completing a Retirement contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n};\n","import React from \"react\";\nimport { stealthIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function StealthIcon(): React.ReactElement {\n return This action involves stealth}>{stealthIcon};\n}\n","import React from \"react\";\nimport { killIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function KillIcon(): React.ReactElement {\n return This action involves retirement}>{killIcon};\n}\n","import * as React from \"react\";\nimport { OperationList } from \"./OperationList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It\n will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more\n punishing than contracts, but are also more rewarding.\n
\n
\n Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary\n between different Operations.\n
\n
\n For operations, you can use a team. You must first recruit team members. Having a larger team will improve your\n chances of success.\n
\n
\n You can unlock higher-level operations by successfully completing them. Higher-level operations are more\n difficult, but grant more rank and experience.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { OperationElem } from \"./OperationElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.operations);\n const operations = props.bladeburner.operations;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { Operation } from \"../Operation\";\nimport { Operations } from \"../data/Operations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: Operation;\n}\n\nexport function OperationElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Operations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n \n )}\n
\n
\n\n \n
\n
\n \n {actionData.desc}\n
\n
\n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n Operations remaining: {Math.floor(props.action.count)}\n
\n Successes: {props.action.successes}\n
\n Failures: {props.action.failures}\n
\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Action } from \"../Action\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: Action;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TeamSizeModal(props: IProps): React.ReactElement {\n const [teamSize, setTeamSize] = useState();\n\n function confirmTeamSize(): void {\n if (teamSize === undefined) return;\n const num = Math.round(teamSize);\n if (isNaN(num) || num < 0) {\n dialogBoxCreate(\"Invalid value entered for number of Team Members (must be numeric, positive)\");\n } else {\n props.action.teamCount = num;\n }\n props.onClose();\n }\n\n function onTeamSize(event: React.ChangeEvent): void {\n const x = parseFloat(event.target.value);\n if (x > props.bladeburner.teamSize) setTeamSize(props.bladeburner.teamSize);\n else setTeamSize(x);\n }\n\n return (\n \n \n Enter the amount of team members you would like to take on this Op. If you do not have the specified number of\n team members, then as many as possible will be used. Note that team members may be lost during operations.\n \n \n \n \n );\n}\n","import React from \"react\";\n\ninterface IOperation {\n desc: JSX.Element;\n}\n\nexport const Operations: {\n [key: string]: IOperation | undefined;\n} = {\n Investigation: {\n desc: (\n <>\n As a field agent, investigate and identify Synthoid populations, movements, and operations.\n
\n
\n Successful Investigation ops will increase the accuracy of your synthoid data.\n
\n
\n You will NOT lose HP from failed Investigation ops.\n \n ),\n },\n \"Undercover Operation\": {\n desc: (\n <>\n Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n
\n
\n Successful Undercover ops will increase the accuracy of your synthoid data.\n \n ),\n },\n \"Sting Operation\": {\n desc: <>Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.,\n },\n Raid: {\n desc: (\n <>\n Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your\n current city in order for this Operation to be successful.\n \n ),\n },\n \"Stealth Retirement Operation\": {\n desc: (\n <>\n Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any\n attention. Stealth and discretion are key.\n \n ),\n },\n Assassination: {\n desc: (\n <>\n Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the\n Synthoid communities.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { BlackOpList } from \"./BlackOpList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked\n successively by completing the one before it.\n
\n
\n Your ultimate goal to climb through the ranks of {FactionNames.Bladeburners} is to complete all of the Black Ops.\n
\n
\n Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank\n losses.\n
\n \n \n );\n}\n","import React from \"react\";\nimport { BlackOperations } from \"../BlackOperations\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOpElem } from \"./BlackOpElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpList(props: IProps): React.ReactElement {\n let blackops: BlackOperation[] = [];\n for (const blackopName of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(blackopName)) {\n blackops.push(BlackOperations[blackopName]);\n }\n }\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n\n blackops = blackops.filter(\n (blackop: BlackOperation, i: number) =>\n !(\n props.bladeburner.blackops[blackops[i].name] == null &&\n i !== 0 &&\n props.bladeburner.blackops[blackops[i - 1].name] == null\n ),\n );\n\n blackops = blackops.reverse();\n\n return (\n <>\n {blackops.map((blackop: BlackOperation) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOperations } from \"../data/BlackOperations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: BlackOperation;\n}\n\nexport function BlackOpElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n if (isCompleted) {\n return (\n \n {props.action.name} (COMPLETED)\n \n );\n }\n\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"BlackOperation\"] &&\n props.action.name === props.bladeburner.action.name;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n\n const actionData = BlackOperations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n \n ) : (\n <>\n \n\n \n \n \n )}\n\n
\n
\n {actionData.desc}\n
\n
\n \n Required Rank: {formatNumber(props.action.reqdRank, 0)}\n \n
\n \n \n
\n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
\n
\n );\n}\n","import React from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { BlackOperationNames } from \"./BlackOperationNames\";\n\ninterface IBlackOp {\n desc: JSX.Element;\n}\n\nexport const BlackOperations: {\n [key: string]: IBlackOp | undefined;\n} = {\n [BlackOperationNames.OperationTyphoon]: {\n desc: (\n <>\n Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that\n Zenyatta, along with the rest of the PMC, is a Synthoid.\n
\n
\n The goal of {BlackOperationNames.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means necessary. After the\n task is completed, the actions must be covered up from the general public.\n \n ),\n },\n\n [BlackOperationNames.OperationZero]: {\n desc: (\n <>\n AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a\n supporter of Synthoid rights. He must be removed.\n
\n
\n The goal of {BlackOperationNames.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating evidence or\n information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating\n evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security\n measures in the world.\n \n ),\n },\n [BlackOperationNames.OperationX]: {\n desc: (\n <>\n We have recently discovered an underground publication group called Samizdat. Even though most of their\n publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of\n their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and\n other Eastern countries.\n
\n
\n Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that\n their base of operations is in {CityName.Ishima}'s underground sewer systems. Your task is to investigate the sewer\n systems, and eliminate Samizdat. They must never publish anything again.\n \n ),\n },\n [BlackOperationNames.OperationTitan]: {\n desc: (\n <>\n Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we\n know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to,\n but the research that they could be conducting using Titan Laboraties' vast resources is potentially very\n dangerous.\n
\n
\n Your goal is to enter and destroy the Bioengineering department's facility in {CityName.Aevum}. The task is not just to\n retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to\n the Synthoids and their goals.\n \n ),\n },\n [BlackOperationNames.OperationAres]: {\n desc: (\n <>\n One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai\n between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy\n weapons. It is critical for the safety of humanity that this deal does not happen.\n
\n
\n Your task is to intercept the deal. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationArchangel]: {\n desc: (\n <>\n Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI\n Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms\n trafficking operation.\n
\n
\n The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the\n number of other casualties, but do what you must to complete the mission.\n \n ),\n },\n [BlackOperationNames.OperationJuggernaut]: {\n desc: (\n <>\n The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls\n himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into {CityName.Sector12}. We\n also have reason to believe they tried to break into one of Universal Energy's facilities in order to cause a\n city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our\n help.\n
\n
\n Your mission is to eradicate Juggernaut and his followers.\n \n ),\n },\n [BlackOperationNames.OperationRedDragon]: {\n desc: (\n <>\n The {FactionNames.Tetrads} criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they\n altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster\n their criminal activities.\n
\n
\n Your task is to infiltrate and destroy the {FactionNames.Tetrads}' base of operations in Los Angeles. Intelligence tells us\n that their base houses one of their Synthoid manufacturing units.\n \n ),\n },\n [BlackOperationNames.OperationK]: {\n desc: (\n <>\n CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology.\n This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI\n modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any\n Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would\n be catastrophic.\n
\n
\n We do not have the power or jurisdiction to shut this down through legal or political means, so we must resort\n to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its\n creation.\n \n ),\n },\n [BlackOperationNames.OperationDeckard]: {\n desc: (\n <>\n Despite your success in eliminating VitaLife's new android-replicating technology in {BlackOperationNames.OperationK}, we've\n discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the\n technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones\n from the Synthoid Uprising.\n
\n
\n The goal of {BlackOperationNames.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need to tell you how\n critical this mission is.\n \n ),\n },\n [BlackOperationNames.OperationTyrell]: {\n desc: (\n <>\n A week ago {FactionNames.BladeIndustries} reported a small break-in at one of their {CityName.Aevum} Augmentation storage facilities. We\n figured out that {FactionNames.TheDarkArmy} was behind the heist, and didn't think any more of it. However, we've just\n discovered that several known MK-VI Synthoids were part of that break-in group.\n
\n
\n We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt\n down associated {FactionNames.TheDarkArmy} members and eliminate them.\n \n ),\n },\n [BlackOperationNames.OperationWallace]: {\n desc: (\n <>\n Based on information gathered from {BlackOperationNames.OperationTyrell}, we've discovered that {FactionNames.TheDarkArmy} was well aware that\n there were Synthoids amongst their ranks. Even worse, we believe that {FactionNames.TheDarkArmy} is working together with\n other criminal organizations such as {FactionNames.TheSyndicate} and that they are planning some sort of large-scale takeover\n of multiple major cities, most notably {CityName.Aevum}. We suspect that Synthoids have infiltrated the ranks of these\n criminal factions and are trying to stage another Synthoid uprising.\n
\n
\n The best way to deal with this is to prevent it before it even happens. The goal of {BlackOperationNames.OperationWallace} is to\n destroy {FactionNames.TheDarkArmy} and Syndicate factions in {CityName.Aevum} immediately. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationShoulderOfOrion]: {\n desc: (\n <>\n China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using\n Synthoids. We believe China is trying to establish the first off-world colonies.\n
\n
\n The mission is to prevent this launch without instigating an international conflict. When you accept this\n mission you will be officially disavowed by the NSA and the national government until after you successfully\n return. In the event of failure, all of the operation's team members must not let themselves be captured alive.\n \n ),\n },\n [BlackOperationNames.OperationHyron]: {\n desc: (\n <>\n Our intelligence tells us that {FactionNames.FulcrumSecretTechnologies} is developing a quantum supercomputer using human brains as\n core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations\n unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means\n that the supercomputer may be able to reason abstractly and become self-aware.\n
\n
\n I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.\n
\n
\n The research for this project is being conducted at one of {FactionNames.FulcrumSecretTechnologies} secret facilities in {CityName.Aevum},\n codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the\n project lead.\n \n ),\n },\n [BlackOperationNames.OperationMorpheus]: {\n desc: (\n <>\n DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the\n people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our\n agents and informants in {CityName.Chongqing}, we have reason to believe that one of the broadcast towers there has been\n compromised by Synthoids and is being used to spread pro-Synthoid propaganda.\n
\n
\n The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.\n \n ),\n },\n [BlackOperationNames.OperationIonStorm]: {\n desc: (\n <>\n Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the {CityName.Sector12} Slums.\n We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling\n weapons, money, and other resources. This makes them dangerous.\n
\n
\n This is a full-scale assault operation to find and retire all of these Synthoids in the {CityName.Sector12} Slums.\n \n ),\n },\n [BlackOperationNames.OperationAnnihilus]: {\n desc: (\n <>\n Our superiors have ordered us to eradicate everything and everyone in an underground facility located in {CityName.Aevum}.\n They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called\n '{FactionNames.TheCovenant}'. We have no prior intelligence about this organization, so you are going in blind.\n \n ),\n },\n [BlackOperationNames.OperationUltron]: {\n desc: (\n <>\n {FactionNames.OmniTekIncorporated}, the original designer and manufacturer of Synthoids, has notified us of a malfunction in\n their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the\n destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the\n Uprising.\n
\n
\n {FactionNames.OmniTekIncorporated} has also told us they they believe someone has triggered this malfunction in a large group of MK-VI\n Synthoids, and that these newly-radicalized Synthoids are now amassing in {CityName.Volhaven} to form a terrorist group\n called Ultron.\n
\n
\n Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making\n moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).\n
\n
\n Your task is to find and destroy Ultron.\n \n ),\n },\n [BlackOperationNames.OperationCenturion]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its\n advancement became our primary goal. And at the peak of human civilization technology turned into power. Global,\n absolute power.\n
\n
\n It seems that the universe is not without a sense of irony.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationVindictus]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
\n
\n The bits are all around us. The daemons that hold the Node together can manifest themselves in many different\n ways.\n
\n
\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationDaedalus]: {\n desc: <> Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.,\n },\n};\n","import React, { useState } from \"react\";\nimport { SkillList } from \"./SkillList\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\ninterface IProps {\n bladeburner: IBladeburner;\n}\n\nexport function SkillPage(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult: any): boolean {\n return mult && mult !== 1;\n }\n\n return (\n <>\n \n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n \n \n You will gain one skill point every {BladeburnerConstants.RanksPerSkillPoint} ranks.\n
\n Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different\n skills with each other is multiplicative.\n
\n {valid(mults[\"successChanceAll\"]) && (\n Total Success Chance: x{formatNumber(mults[\"successChanceAll\"], 3)}\n )}\n {valid(mults[\"successChanceStealth\"]) && (\n Stealth Success Chance: x{formatNumber(mults[\"successChanceStealth\"], 3)}\n )}\n {valid(mults[\"successChanceKill\"]) && (\n Retirement Success Chance: x{formatNumber(mults[\"successChanceKill\"], 3)}\n )}\n {valid(mults[\"successChanceContract\"]) && (\n Contract Success Chance: x{formatNumber(mults[\"successChanceContract\"], 3)}\n )}\n {valid(mults[\"successChanceOperation\"]) && (\n Operation Success Chance: x{formatNumber(mults[\"successChanceOperation\"], 3)}\n )}\n {valid(mults[\"successChanceEstimate\"]) && (\n Synthoid Data Estimate: x{formatNumber(mults[\"successChanceEstimate\"], 3)}\n )}\n {valid(mults[\"actionTime\"]) && Action Time: x{formatNumber(mults[\"actionTime\"], 3)}}\n {valid(mults[\"effHack\"]) && Hacking Skill: x{formatNumber(mults[\"effHack\"], 3)}}\n {valid(mults[\"effStr\"]) && Strength: x{formatNumber(mults[\"effStr\"], 3)}}\n {valid(mults[\"effDef\"]) && Defense: x{formatNumber(mults[\"effDef\"], 3)}}\n {valid(mults[\"effDex\"]) && Dexterity: x{formatNumber(mults[\"effDex\"], 3)}}\n {valid(mults[\"effAgi\"]) && Agility: x{formatNumber(mults[\"effAgi\"], 3)}}\n {valid(mults[\"effCha\"]) && Charisma: x{formatNumber(mults[\"effCha\"], 3)}}\n {valid(mults[\"effInt\"]) && Intelligence: x{formatNumber(mults[\"effInt\"], 3)}}\n {valid(mults[\"stamina\"]) && Stamina: x{formatNumber(mults[\"stamina\"], 3)}}\n {valid(mults[\"money\"]) && Contract Money: x{formatNumber(mults[\"money\"], 3)}}\n {valid(mults[\"expGain\"]) && Exp Gain: x{formatNumber(mults[\"expGain\"], 3)}}\n setRerender((old) => !old)} />\n \n );\n}\n\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n\n }\n }\n}\n*/\n","import * as React from \"react\";\nimport { SkillElem } from \"./SkillElem\";\nimport { Skills } from \"../Skills\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillList(props: IProps): React.ReactElement {\n return (\n <>\n {Object.keys(Skills).map((skill: string) => (\n \n ))}\n \n );\n}\n","import React from \"react\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IProps {\n skill: any;\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillElem(props: IProps): React.ReactElement {\n const skillName = props.skill.name;\n let currentLevel = 0;\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n const pointCost = props.skill.calculateCost(currentLevel);\n\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick(): void {\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 (\n \n \n \n {!canLevel || maxLvl ? (\n \n \n \n ) : (\n \n \n \n )}\n \n Level: {currentLevel}\n {maxLvl ? (\n MAX LEVEL\n ) : (\n Skill Points required: {formatNumber(pointCost, 0)}\n )}\n {props.skill.desc}\n \n );\n}\n","/**\n * React Component for all the gang stuff.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { ManagementSubpage } from \"./ManagementSubpage\";\nimport { TerritorySubpage } from \"./TerritorySubpage\";\nimport { EquipmentsSubpage } from \"./EquipmentsSubpage\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function GangRoot(): React.ReactElement {\n const player = use.Player();\n const gang = (function () {\n if (player.gang === null) throw new Error(\"Gang should not be null\");\n return player.gang;\n })();\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n \n );\n}\n","/**\n * React Component for the subpage that manages gang members, the main page.\n */\nimport React from \"react\";\nimport { GangStats } from \"./GangStats\";\nimport { GangMemberList } from \"./GangMemberList\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\n\nexport function ManagementSubpage(): React.ReactElement {\n const gang = useGang();\n return (\n <>\n \n This page is used to manage your gang members and get an overview of your gang's stats.\n
\n
\n If a gang member is not earning much money or respect, the task that you have assigned to that member might be\n too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of\n the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact\n that your wanted level is too high. Consider assigning a few members to the '\n {gang.isHackingGang ? \"Ethical Hacking\" : \"Vigilante Justice\"}' task to lower your wanted level.\n
\n
\n Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing\n Augmentations, you will automatically be a member of whatever Faction you created your gang with.\n
\n
\n You can also manage your gang programmatically through Netscript using the Gang API\n
\n
\n \n
\n \n \n );\n}\n","/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\nimport React from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { AllGangs } from \"../AllGangs\";\nimport { BonusTime } from \"./BonusTime\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nexport function GangStats(): React.ReactElement {\n const gang = useGang();\n const territoryMult = AllGangs[gang.facName].territory * 100;\n let territoryStr;\n if (territoryMult <= 0) {\n territoryStr = formatNumber(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = formatNumber(100, 2);\n } else {\n territoryStr = formatNumber(territoryMult, 2);\n }\n\n return (\n <>\n \n \n Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect\n affects the amount of money your gang members will earn, and also determines how much reputation you are\n earning with your gang's corresponding Faction.\n \n }\n >\n \n Respect: {numeralWrapper.formatRespect(gang.respect)} (\n {numeralWrapper.formatRespect(5 * gang.respectGainRate)} / sec)\n \n \n \n\n \n \n Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder\n it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.\n \n }\n >\n \n Wanted Level: {numeralWrapper.formatWanted(gang.wanted)} (\n {numeralWrapper.formatWanted(5 * gang.wantedGainRate)} / sec)\n \n \n \n\n \n Penalty for respect and money gain rates due to Wanted Level}>\n Wanted Level Penalty: -{formatNumber((1 - gang.getWantedPenalty()) * 100, 2)}%\n \n \n\n \n Money gain rate: \n \n\n \n The percentage of total territory your Gang controls}>\n Territory: {territoryStr}%\n \n \n \n Faction reputation: \n \n\n \n \n );\n}\n","/**\n * React Component for displaying the bonus time remaining.\n */\nimport * as React from \"react\";\nimport { Gang } from \"../Gang\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n gang: Gang;\n}\n\nexport function BonusTime(props: IProps): React.ReactElement {\n const CyclerPerSecond = 1000 / CONSTANTS._idleSpeed;\n if ((props.gang.storedCycles / CyclerPerSecond) * 1000 <= 5000) return <>;\n const bonusMillis = (props.gang.storedCycles / CyclerPerSecond) * 1000;\n return (\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the\n browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n Bonus time: {convertTimeMsToTimeElapsedString(bonusMillis)}\n \n \n );\n}\n","/**\n * React Component for the list of gang members on the management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberCard } from \"./GangMemberCard\";\nimport { RecruitButton } from \"./RecruitButton\";\nimport { useGang } from \"./Context\";\n\nimport { Box, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { GangMember } from \"../GangMember\";\nimport { OptionSwitch } from \"../../ui/React/OptionSwitch\";\n\nexport function GangMemberList(): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n const [filter, setFilter] = useState(\"\");\n const [ascendOnly, setAscendOnly] = useState(false);\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n }\n\n const members = gang.members\n .filter((member) => member && member.name.toLowerCase().includes(filter))\n .filter((member) => {\n if (ascendOnly) return member.canAscend();\n return true;\n });\n\n return (\n <>\n setRerender((old) => !old)} />\n ,\n spellCheck: false\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: '15%' }}\n />\n (setAscendOnly(newValue))}\n text=\"Show only ascendable\"\n tooltip={\n <>\n Filter the members list by whether or not the member\n can be ascended.\n \n }\n />\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","/**\n * React Component for a gang member on the management subpage.\n */\nimport React from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberCardContent } from \"./GangMemberCardContent\";\n\nimport Box from \"@mui/material/Box\";\n\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCard(props: IProps): React.ReactElement {\n return (\n \n \n {props.member.name}} />\n \n \n \n );\n}\n","/**\n * React Component for the content of the accordion of gang members on the\n * management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberStats } from \"./GangMemberStats\";\nimport { TaskSelector } from \"./TaskSelector\";\nimport { AscensionModal } from \"./AscensionModal\";\n\nimport { Box } from \"@mui/system\";\nimport { Button, Typography } from \"@mui/material\";\nimport HelpIcon from \"@mui/icons-material/Help\";\n\nimport { GangMember } from \"../GangMember\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCardContent(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const [helpOpen, setHelpOpen] = useState(false);\n const [ascendOpen, setAscendOpen] = useState(false);\n\n return (\n <>\n {props.member.canAscend() && (\n \n \n setAscendOpen(false)}\n member={props.member}\n onAscend={() => setRerender((old) => !old)}\n />\n \n setHelpOpen(false)}>\n \n Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their\n stat multipliers.\n
\n
\n The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp\n they have.\n
\n
\n Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect\n equal to the total respect earned by the member.\n
\n
\n
\n )}\n \n \n setRerender((old) => !old)} member={props.member} />\n \n \n );\n}\n","/**\n * React Component for the first part of a gang member details.\n * Contains skills and exp.\n */\nimport React from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Table, TableBody, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMember } from \"../GangMember\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../ui/React/CharacterOverview\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberStats(props: IProps): React.ReactElement {\n const classes = useStyles();\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\n const gang = useGang();\n const data = [\n [`Money:`, ],\n [`Respect:`, `${numeralWrapper.formatRespect(5 * props.member.calculateRespectGain(gang))} / sec`],\n [`Wanted Level:`, `${numeralWrapper.formatWanted(5 * props.member.calculateWantedLevelGain(gang))} / sec`],\n [`Total Respect:`, `${numeralWrapper.formatRespect(props.member.earnedRespect)}`],\n ];\n\n return (\n <>\n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.hack)}{\" \"}\n Asc)\n
\n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.str)}{\" \"}\n Asc)\n
\n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.def)}{\" \"}\n Asc)\n
\n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.dex)}{\" \"}\n Asc)\n
\n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.agi)}{\" \"}\n Asc)\n
\n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.cha)}{\" \"}\n Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n
\n
\n
\n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n
\n
\n \n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n killScripts: () => void;\n}\n\nexport function KillScriptsModal(props: IProps): React.ReactElement {\n function onClick(): void {\n props.killScripts();\n props.onClose();\n }\n\n return (\n \n Forcefully kill all running scripts? This will also save your game and reload the game.\n \n \n );\n}\n","/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\nimport { TaskDescription } from \"./TaskDescription\";\n\nimport { Box } from \"@mui/material\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\nimport { GangMember } from \"../GangMember\";\n\ninterface IProps {\n member: GangMember;\n onTaskChange: () => void;\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const gang = useGang();\n const [currentTask, setCurrentTask] = useState(props.member.task);\n\n const contextMember = gang.members.find(member => member.name == props.member.name)\n if (contextMember &&\n contextMember.task != currentTask\n ) {\n setCurrentTask(contextMember.task)\n }\n\n function onChange(event: SelectChangeEvent): void {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = gang.getAllTaskNames();\n\n return (\n \n \n \n \n );\n}\n","/**\n * React Component for left side of the gang member accordion, contains the\n * description of the task that member is currently doing.\n */\nimport React from \"react\";\nimport { GangMemberTasks } from \"../GangMemberTasks\";\nimport { GangMember } from \"../GangMember\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function TaskDescription(props: IProps): React.ReactElement {\n const task = GangMemberTasks[props.member.task];\n const desc = task ? task.desc : GangMemberTasks[\"Unassigned\"].desc;\n\n return ;\n}\n","/**\n * React Component for the content of the popup before the player confirms the\n * ascension of a gang member.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n member: GangMember;\n onAscend: () => void;\n}\n\nexport function AscensionModal(props: IProps): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function confirm(): void {\n props.onAscend();\n const res = gang.ascendMember(props.member);\n dialogBoxCreate(\n <>\n You ascended {props.member.name}!
\n
\n Your gang lost {numeralWrapper.formatRespect(res.respect)} respect.\n
\n
\n {props.member.name} gained the following stat multipliers for ascending:\n
\n Hacking: x{numeralWrapper.format(res.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(res.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(res.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(res.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(res.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(res.cha, \"0.000\")}\n
\n \n );\n props.onClose();\n }\n\n // const ascendBenefits = props.member.getAscensionResults();\n const preAscend = props.member.getCurrentAscensionMults();\n const postAscend = props.member.getAscensionMultsAfterAscend();\n\n return (\n \n \n Are you sure you want to ascend this member? They will lose all of\n
\n their non-Augmentation upgrades and their stats will reset back to 1.\n
\n
\n Furthermore, your gang will lose {numeralWrapper.formatRespect(props.member.earnedRespect)} respect\n
\n
\n In return, they will gain the following permanent boost to stat multipliers:\n
\n Hacking: x{numeralWrapper.format(preAscend.hack, \"0.000\")} => x\n {numeralWrapper.format(postAscend.hack, \"0.000\")}\n
\n Strength: x{numeralWrapper.format(preAscend.str, \"0.000\")} => x\n {numeralWrapper.format(postAscend.str, \"0.000\")}\n
\n Defense: x{numeralWrapper.format(preAscend.def, \"0.000\")} => x\n {numeralWrapper.format(postAscend.def, \"0.000\")}\n
\n Dexterity: x{numeralWrapper.format(preAscend.dex, \"0.000\")} => x\n {numeralWrapper.format(postAscend.dex, \"0.000\")}\n
\n Agility: x{numeralWrapper.format(preAscend.agi, \"0.000\")} => x\n {numeralWrapper.format(postAscend.agi, \"0.000\")}\n
\n Charisma: x{numeralWrapper.format(preAscend.cha, \"0.000\")} => x\n {numeralWrapper.format(postAscend.cha, \"0.000\")}\n
\n
\n \n
\n );\n}\n","/**\n * React Component for the recruitment button and text on the gang main page.\n */\nimport React, { useState } from \"react\";\nimport { RecruitModal } from \"./RecruitModal\";\nimport { GangConstants } from \"../data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n onRecruit: () => void;\n}\n\nexport function RecruitButton(props: IProps): React.ReactElement {\n const gang = useGang();\n const [open, setOpen] = useState(false);\n if (gang.members.length >= GangConstants.MaximumGangMembers) {\n return <>;\n }\n\n if (!gang.canRecruitMember()) {\n const respect = gang.getRespectNeededToRecruitMember();\n return (\n \n \n {numeralWrapper.formatRespect(respect)} respect needed to recruit next member\n \n );\n }\n\n return (\n <>\n \n \n \n setOpen(false)} onRecruit={props.onRecruit} />\n \n );\n}\n","/**\n * React Component for the popup used to recruit new gang members.\n */\nimport React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IRecruitPopupProps {\n open: boolean;\n onClose: () => void;\n onRecruit: () => void;\n}\n\nexport function RecruitModal(props: IRecruitPopupProps): React.ReactElement {\n const gang = useGang();\n const [name, setName] = useState(\"\");\n\n const disabled = name === \"\" || !gang.canRecruitMember();\n function recruit(): void {\n if (disabled) return;\n // At this point, the only way this can fail is if you already\n // have a gang member with the same name\n if (!gang.recruitMember(name)) {\n dialogBoxCreate(\"You already have a gang member with this name!\");\n return;\n }\n\n props.onRecruit();\n props.onClose();\n }\n\n function onKeyUp(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) recruit();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n return (\n \n Enter a name for your new Gang member:\n
\n \n Recruit\n \n ),\n }}\n />\n
\n );\n}\n","/**\n * React Component for the territory subpage.\n */\nimport React, { useState } from \"react\";\n\nimport {\n Container,\n Button,\n Paper,\n Box,\n Tooltip,\n Switch,\n FormControlLabel,\n Typography\n} from \"@mui/material\";\nimport { Help } from \"@mui/icons-material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\n\nimport { AllGangs } from \"../AllGangs\";\n\nimport { useGang } from \"./Context\";\nimport { TerritoryInfoModal } from \"./TerritoryInfoModal\";\n\nexport function TerritorySubpage(): React.ReactElement {\n const gang = useGang();\n const gangNames = Object.keys(AllGangs).filter((g) => g != gang.facName);\n const [infoOpen, setInfoOpen] = useState(false);\n\n return (\n \n \n This page shows how much territory your Gang controls. This statistic is listed as a percentage, which\n represents how much of the total territory you control.\n \n\n \n\n \n \n {gang.facName} (Your gang)\n \n\n (gang.territoryWarfareEngaged = event.target.checked)}\n />}\n label={\n Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance\n to gradually decrease until it reaches 0%.\n
}>\n Engage in Territory Warfare\n } />\n
\n (gang.notifyMemberDeath = event.target.checked)}\n />}\n label={\n If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies\n in a territory clash.\n }>\n Notify about Gang Member Deaths\n } />\n\n \n Territory Clash Chance: {numeralWrapper.formatPercentage(gang.territoryClashChance, 3)}
\n Power: {formatNumber(AllGangs[gang.facName].power, 3)}
\n Territory: {formatTerritory(AllGangs[gang.facName].territory)}%
\n
\n \n \n {gangNames.map((name) => (\n \n ))}\n \n setInfoOpen(false)} />\n \n );\n}\nfunction formatTerritory(n: number): string {\n const v = n * 100;\n const precision = 3;\n if (v <= 0) {\n return formatNumber(0, precision);\n } else if (v >= 100) {\n return formatNumber(100, precision);\n } else {\n return formatNumber(v, precision);\n }\n}\n\ninterface ITerritoryProps {\n name: string;\n}\n\nfunction OtherGangTerritory(props: ITerritoryProps): React.ReactElement {\n const gang = useGang();\n const playerPower = AllGangs[gang.facName].power;\n const power = AllGangs[props.name].power;\n const clashVictoryChance = playerPower / (power + playerPower);\n return (\n \n \n {props.name}\n \n \n Power: {formatNumber(power, 3)}
\n Territory: {formatTerritory(AllGangs[props.name].territory)}%
\n Clash Win Chance: {numeralWrapper.formatPercentage(clashVictoryChance, 3)}\n
\n
\n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\n\nimport { Modal } from \"../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport const TerritoryInfoModal = ({ open, onClose }: IProps): React.ReactElement => {\n return (\n \n <>\n \n Clashing\n \n \n Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on\n your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The\n accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare'\n task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also\n loses a small amount of power whenever you lose a clash.\n
\n
\n NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of\n whether you win or lose the clash. A gang member being killed results in both respect and power loss for your\n gang.\n
\n
\n \n Territory\n \n \n The amount of territory you have affects all aspects of your Gang members' production, including money, respect,\n and wanted level. It is very beneficial to have high territory control.\n
\n
\n To increase your chances of winning territory, assign gang members to \"Territory Warfare\". This will build your\n gang power. Then, enable \"Engage in Territory Warfare\" to start fighting over territory.\n
\n
\n \n Territory Clash Chance\n \n \n This percentage represents the chance you have of 'clashing' with another gang. If you do not wish to\n gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.\n \n \n
\n );\n}\n","/**\n * React Component for the popup that manages gang members upgrades\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { MenuItem, Table, TableBody, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMemberUpgrades } from \"../GangMemberUpgrades\";\nimport { GangMemberUpgrade } from \"../GangMemberUpgrade\";\nimport { Money } from \"../../ui/React/Money\";\nimport { GangMember } from \"../GangMember\";\nimport { UpgradeType } from \"../data/upgrades\";\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\n\ninterface INextRevealProps {\n upgrades: string[];\n type: UpgradeType;\n}\n\nfunction NextReveal(props: INextRevealProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const upgrades = Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money > 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 })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n\n if (upgrades.length === 0) return <>;\n return (\n \n Next at \n \n );\n}\n\nfunction PurchasedUpgrade({ upgName }: { upgName: string }): React.ReactElement {\n const upg = GangMemberUpgrades[upgName];\n return (\n \n }>\n {upg.name}\n \n \n );\n}\n\ninterface IUpgradeButtonProps {\n upg: GangMemberUpgrade;\n rerender: () => void;\n member: GangMember;\n}\n\nfunction UpgradeButton(props: IUpgradeButtonProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n function onClick(): void {\n props.member.buyUpgrade(props.upg, player, gang);\n props.rerender();\n }\n return (\n }>\n \n \n \n \n );\n}\n\ninterface IPanelProps {\n member: GangMember;\n}\n\nfunction GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const setRerender = useState(false)[1];\n const [currentCategory, setCurrentCategory] = useState(\"Weapons\");\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function filterUpgrades(list: string[], type: UpgradeType): GangMemberUpgrade[] {\n return Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money < gang.getUpgradeCost(upg)) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n }\n\n const onChange = (event: SelectChangeEvent): void => {\n setCurrentCategory(event.target.value);\n rerender()\n }\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, UpgradeType.Augmentation);\n\n const categories: { [key: string]: (GangMemberUpgrade[] | UpgradeType)[] } = {\n 'Weapons': [weaponUpgrades, UpgradeType.Weapon],\n 'Armor': [armorUpgrades, UpgradeType.Armor],\n 'Vehicles': [vehicleUpgrades, UpgradeType.Vehicle],\n 'Rootkits': [rootkitUpgrades, UpgradeType.Rootkit],\n 'Augmentations': [augUpgrades, UpgradeType.Augmentation]\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 (\n \n \n \n \n {props.member.name} ({props.member.task})\n \n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.hack)}{\" \"}\n Asc)\n
\n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.str)}{\" \"}\n Asc)\n
\n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.def)}{\" \"}\n Asc)\n
\n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.dex)}{\" \"}\n Asc)\n
\n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.agi)}{\" \"}\n Asc)\n
\n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.cha)}{\" \"}\n Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n
\n \n\n
\n\n \n \n\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).length === 0 && (\n \n All upgrades owned!\n \n )}\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).map((upg) => (\n \n ))}\n \n \n \n \n
\n\n Purchased Upgrades: \n \n {props.member.upgrades.map((upg: string) => (\n \n ))}\n {props.member.augmentations.map((upg: string) => (\n \n ))}\n \n
\n );\n}\n\nexport function EquipmentsSubpage(): React.ReactElement {\n const gang = useGang();\n const [filter, setFilter] = useState(\"\");\n\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n }\n\n const members = gang.members\n .filter((member) => member && member.name.toLowerCase().includes(filter));\n\n return (\n <>\n \n You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power\n leads to more discounts.\n \n }\n >\n Discount: -{numeralWrapper.formatPercentage(1 - 1 / gang.getDiscount())}\n \n\n ,\n spellCheck: false\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: '15%' }}\n />\n\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\nimport React, { useState, useEffect } from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MainPanel } from \"./MainPanel\";\nimport { Industries } from \"../IndustryData\";\nimport { ExpandIndustryTab } from \"./ExpandIndustryTab\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\nimport { Overview } from \"./Overview\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function CorporationRoot(): React.ReactElement {\n const player = use.Player();\n const corporation = player.corporation;\n if (corporation === null) return <>;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [divisionName, setDivisionName] = useState(\"Overview\");\n function handleChange(event: React.SyntheticEvent, tab: string | number): void {\n setDivisionName(tab);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const canExpand =\n Object.keys(Industries).filter(\n (industryType: string) =>\n corporation.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n ).length > 0;\n\n return (\n \n \n \n {corporation.divisions.map((div) => (\n \n ))}\n {canExpand && }\n \n {divisionName === \"Overview\" && }\n {divisionName === -1 && }\n {typeof divisionName === \"string\" && divisionName !== \"Overview\" && (\n \n )}\n \n );\n}\n","// React Component for the element that contains the actual info/data\n// for the Corporation UI. This panel lies below the header tabs and will\n// be filled with whatever is needed based on the routing/navigation\nimport React from \"react\";\n\nimport { CityTabs } from \"./CityTabs\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Context, useCorporation } from \"./Context\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\n\ninterface IProps {\n divisionName: string;\n rerender: () => void;\n}\n\nexport function MainPanel(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division =\n props.divisionName !== \"Overview\"\n ? corp.divisions.find((division: IIndustry) => division.name === props.divisionName)\n : undefined; // use undefined because find returns undefined\n\n if (division === undefined) throw new Error(\"Cannot find division\");\n return (\n \n \n \n );\n}\n","// React Components for the Corporation UI's City navigation tabs\n// These allow player to navigate between different cities for each industry\nimport React, { useState } from \"react\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industry } from \"./Industry\";\nimport { ExpandNewCity } from \"./ExpandNewCity\";\nimport { useDivision } from \"./Context\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\ninterface IProps {\n city: string;\n rerender: () => void;\n}\n\nexport function CityTabs(props: IProps): React.ReactElement {\n const division = useDivision();\n const [city, setCity] = useState(props.city);\n\n const office = division.offices[city];\n if (office === 0) {\n setCity(\"Sector-12\");\n return <>;\n }\n\n const canExpand =\n Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0).length > 0;\n function handleChange(event: React.SyntheticEvent, tab: string): void {\n setCity(tab);\n }\n return (\n <>\n \n {Object.values(division.offices).map(\n (office: OfficeSpace | 0) => office !== 0 && ,\n )}\n {canExpand && }\n \n\n {city !== \"Expand\" ? (\n \n ) : (\n \n )}\n \n );\n}\n","// React Component for managing the Corporation's Industry UI\n// This Industry component does NOT include the city tabs at the top\nimport React from \"react\";\n\nimport { IndustryOffice } from \"./IndustryOffice\";\nimport { IndustryOverview } from \"./IndustryOverview\";\nimport { IndustryWarehouse } from \"./IndustryWarehouse\";\nimport { Warehouse } from \"../Warehouse\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n city: string;\n warehouse: Warehouse | 0;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function Industry(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const division = useDivision();\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's OfficeSpace information\n// (bottom-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Employee } from \"../Employee\";\nimport { EmployeePositions } from \"../EmployeePositions\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { UpgradeOfficeSizeModal } from \"./UpgradeOfficeSizeModal\";\nimport { ThrowPartyModal } from \"./ThrowPartyModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n office: OfficeSpace;\n rerender: () => void;\n}\n\nfunction countEmployee(employees: Employee[], job: string): number {\n let n = 0;\n for (let i = 0; i < employees.length; ++i) {\n if (employees[i].pos === job) n++;\n }\n return n;\n}\n\ninterface ISwitchProps {\n manualMode: boolean;\n switchMode: (f: (b: boolean) => boolean) => void;\n}\n\nfunction SwitchButton(props: ISwitchProps): React.ReactElement {\n if (props.manualMode) {\n return (\n \n Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You\n simply have to select the number of assignments for each job\n \n }\n >\n \n \n );\n } else {\n return (\n \n Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs\n \n }\n >\n \n \n );\n }\n}\n\nfunction ManualManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [employee, setEmployee] = useState(\n props.office.employees.length > 0 ? props.office.employees[0] : null,\n );\n\n // Employee Selector\n const employees = [];\n for (let i = 0; i < props.office.employees.length; ++i) {\n employees.push(\n \n {props.office.employees[i].name}\n ,\n );\n }\n\n function employeeSelectorOnChange(e: SelectChangeEvent): void {\n const name = e.target.value;\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (name === props.office.employees[i].name) {\n setEmployee(props.office.employees[i]);\n break;\n }\n }\n\n props.rerender();\n }\n\n // Employee Positions Selector\n const emp = employee;\n let employeePositionSelectorInitialValue = \"\";\n const employeePositions = [];\n const positionNames = Object.values(EmployeePositions);\n for (let i = 0; i < positionNames.length; ++i) {\n employeePositions.push(\n \n {positionNames[i]}\n ,\n );\n if (emp != null && emp.pos === positionNames[i]) {\n employeePositionSelectorInitialValue = positionNames[i];\n }\n }\n\n function employeePositionSelectorOnChange(e: SelectChangeEvent): void {\n if (employee === null) return;\n employee.pos = e.target.value;\n props.rerender();\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n\n // Employee stats (after applying multipliers)\n const effCre = emp ? emp.cre * corp.getEmployeeCreMultiplier() * division.getEmployeeCreMultiplier() : 0;\n const effCha = emp ? emp.cha * corp.getEmployeeChaMultiplier() * division.getEmployeeChaMultiplier() : 0;\n const effInt = emp ? emp.int * corp.getEmployeeIntMultiplier() * division.getEmployeeIntMultiplier() : 0;\n const effEff = emp ? emp.eff * corp.getEmployeeEffMultiplier() * division.getEmployeeEffMultiplier() : 0;\n\n return (\n <>\n
\n \n {employee != null && (\n \n Morale: {numeralWrapper.format(employee.mor, nf)}\n
\n Happiness: {numeralWrapper.format(employee.hap, nf)}\n
\n Energy: {numeralWrapper.format(employee.ene, nf)}\n
\n Intelligence: {numeralWrapper.format(effInt, nf)}\n
\n Charisma: {numeralWrapper.format(effCha, nf)}\n
\n Experience: {numeralWrapper.format(employee.exp, nf)}\n
\n Creativity: {numeralWrapper.format(effCre, nf)}\n
\n Efficiency: {numeralWrapper.format(effEff, nf)}\n
\n Salary: \n
\n )}\n {employee != null && (\n \n )}\n \n );\n}\n\ninterface IAutoAssignProps {\n office: OfficeSpace;\n job: string;\n desc: string;\n rerender: () => void;\n}\n\nfunction AutoAssignJob(props: IAutoAssignProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numJob = countEmployee(props.office.employees, props.job);\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n function assignEmployee(): void {\n if (numUnassigned <= 0) {\n console.warn(\"Cannot assign employee. No unassigned employees available\");\n return;\n }\n\n props.office.assignEmployeeToJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n\n function unassignEmployee(): void {\n props.office.unassignEmployeeFromJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n return (\n \n \n \n \n {props.job} ({numJob})\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nfunction AutoManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n const vechain = corp.unlockUpgrades[4] === 1; // Has Vechain upgrade\n\n // Calculate average morale, happiness, energy, and salary.\n let totalMorale = 0,\n totalHappiness = 0,\n totalEnergy = 0,\n totalSalary = 0;\n for (let i = 0; i < props.office.employees.length; ++i) {\n totalMorale += props.office.employees[i].mor;\n totalHappiness += props.office.employees[i].hap;\n totalEnergy += props.office.employees[i].ene;\n totalSalary += props.office.employees[i].sal;\n }\n\n let avgMorale = 0,\n avgHappiness = 0,\n avgEnergy = 0;\n if (props.office.employees.length > 0) {\n avgMorale = totalMorale / props.office.employees.length;\n avgHappiness = totalHappiness / props.office.employees.length;\n avgEnergy = totalEnergy / props.office.employees.length;\n }\n\n return (\n <>\n \n \n \n \n Unassigned Employees:\n \n \n {numUnassigned}\n \n \n \n \n Avg Employee Morale:\n \n \n {numeralWrapper.format(avgMorale, \"0.000\")}\n \n \n \n \n Avg Employee Happiness:\n \n \n {numeralWrapper.format(avgHappiness, \"0.000\")}\n \n \n \n \n Avg Employee Energy:\n \n \n {numeralWrapper.format(avgEnergy, \"0.000\")}\n \n \n \n \n Total Employee Salary:\n \n \n \n \n \n \n \n {vechain && (\n <>\n \n \n \n The base amount of material this office can produce. Does not include production multipliers\n from upgrades and materials. This value is based off the productivity of your Operations,\n Engineering, and Management employees\n \n }\n >\n Material Production:\n \n \n \n \n {numeralWrapper.format(division.getOfficeProductivity(props.office), \"0.000\")}\n \n \n \n \n \n \n The base amount of any given Product this office can produce. Does not include production\n multipliers from upgrades and materials. This value is based off the productivity of your\n Operations, Engineering, and Management employees\n \n }\n >\n Product Production:\n \n \n \n \n {numeralWrapper.format(\n division.getOfficeProductivity(props.office, {\n forProduct: true,\n }),\n \"0.000\",\n )}\n \n \n \n \n \n The effect this office's 'Business' employees has on boosting sales}\n >\n Business Multiplier:\n \n \n \n x{numeralWrapper.format(division.getBusinessFactor(props.office), \"0.000\")}\n \n \n \n )}\n \n
\n\n \n \n \n\n \n\n \n\n \n\n \n\n \n \n
\n \n );\n}\n\nexport function IndustryOffice(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [upgradeOfficeSizeOpen, setUpgradeOfficeSizeOpen] = useState(false);\n const [throwPartyOpen, setThrowPartyOpen] = useState(false);\n const [employeeManualAssignMode, setEmployeeManualAssignMode] = useState(false);\n\n function autohireEmployeeButtonOnClick(): void {\n if (props.office.atCapacity()) return;\n props.office.hireRandomEmployee();\n props.rerender();\n }\n\n return (\n \n Office Space\n \n Size: {props.office.employees.length} / {props.office.size} employees\n \n \n \n Automatically hires an employee and gives him/her a random name}>\n \n \n \n \n Upgrade the office's size so that it can hold more employees!}>\n \n \n \n \n setUpgradeOfficeSizeOpen(false)}\n />\n\n {!division.hasResearch(\"AutoPartyManager\") && (\n <>\n Throw an office party to increase your employee's morale and happiness}\n >\n \n \n \n \n setThrowPartyOpen(false)}\n />\n \n )}\n \n \n \n {employeeManualAssignMode ? (\n \n ) : (\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { ICorporation } from \"../ICorporation\";\nimport { UpgradeOfficeSize } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IUpgradeButton {\n cost: number;\n size: number;\n corp: ICorporation;\n office: OfficeSpace;\n onClose: () => void;\n rerender: () => void;\n}\n\nfunction UpgradeSizeButton(props: IUpgradeButton): React.ReactElement {\n const corp = useCorporation();\n function upgradeSize(cost: number, size: number): void {\n if (corp.funds < cost) {\n return;\n }\n\n UpgradeOfficeSize(corp, props.office, size);\n props.rerender();\n props.onClose();\n }\n return (\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function UpgradeOfficeSizeModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const initialPriceMult = Math.round(props.office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = CorporationConstants.OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult);\n\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const upgradeCost15 = CorporationConstants.OfficeInitialCost * mult;\n\n //Calculate max upgrade size and cost\n const maxMult = corp.funds / CorporationConstants.OfficeInitialCost;\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n ++maxNum;\n }\n const upgradeCostMax = CorporationConstants.OfficeInitialCost * mult;\n\n return (\n \n Increase the size of your office space to fit additional employees!\n \n Upgrade size: \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { ThrowParty } from \"../Actions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function ThrowPartyModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [cost, setCost] = useState(0);\n\n const totalCost = cost * props.office.employees.length;\n const canParty = corp.funds >= totalCost;\n function changeCost(event: React.ChangeEvent): void {\n let x = parseFloat(event.target.value);\n if (isNaN(x)) x = 0;\n setCost(x);\n }\n\n function throwParty(): void {\n if (cost === null || isNaN(cost) || cost < 0) {\n dialogBoxCreate(\"Invalid value entered\");\n } else if (!canParty) {\n dialogBoxCreate(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = ThrowParty(corp, props.office, cost);\n dialogBoxCreate(\n \"You threw a party for the office! The morale and happiness \" +\n \"of each employee increased by \" +\n numeralWrapper.formatPercentage(mult - 1),\n );\n props.rerender();\n props.onClose();\n }\n }\n\n function EffectText(): React.ReactElement {\n if (isNaN(cost) || cost < 0) return Invalid value entered!;\n return (\n \n Throwing this party will cost a total of \n \n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) throwParty();\n }\n\n return (\n \n Enter the amount of money you would like to spend PER EMPLOYEE on this office party\n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industries } from \"../IndustryData\";\nimport { IndustryUpgrades } from \"../IndustryUpgrades\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { MakeProductModal } from \"./MakeProductModal\";\nimport { ResearchModal } from \"./ResearchModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport IconButton from \"@mui/material/IconButton\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport Box from \"@mui/material/Box\";\n\nfunction MakeProductButton(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [makeOpen, setMakeOpen] = useState(false);\n\n const hasMaxProducts = division.hasMaximumNumberProducts();\n\n function shouldFlash(): boolean {\n return Object.keys(division.products).length === 0;\n }\n\n let createProductButtonText = \"\";\n switch (division.type) {\n case Industries.Food:\n createProductButtonText = \"Build Restaurant\";\n break;\n case Industries.Tobacco:\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Robotics:\n createProductButtonText = \"Design Robot\";\n break;\n case Industries.Software:\n createProductButtonText = \"Develop Software\";\n break;\n case Industries.Healthcare:\n createProductButtonText = \"Build Hospital\";\n break;\n case Industries.RealEstate:\n createProductButtonText = \"Develop Property\";\n break;\n default:\n createProductButtonText = \"Create Product\";\n return <>;\n }\n\n return (\n <>\n \n You have reached the maximum number of products: {division.getMaximumNumberProducts()}\n \n ) : (\n \"\"\n )\n }\n >\n \n \n setMakeOpen(false)} />\n \n );\n}\nfunction Text(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [helpOpen, setHelpOpen] = useState(false);\n const [researchOpen, setResearchOpen] = useState(false);\n const vechain = corp.unlockUpgrades[4] === 1;\n const profit = division.lastCycleRevenue - division.lastCycleExpenses;\n\n let advertisingInfo = false;\n const advertisingFactors = division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n if (vechain) {\n advertisingInfo = true;\n }\n\n function convertEffectFacToGraphic(fac: number): string {\n return createProgressBarText({\n progress: fac,\n totalTicks: 20,\n });\n }\n\n return (\n <>\n \n Industry: {division.type} (Corp Funds: )\n \n
\n \n {advertisingInfo !== false && (\n \n Total multiplier for this industrys sales due to its awareness and popularity\n \n \n }\n >\n Advertising Multiplier: x{numeralWrapper.format(totalAdvertisingFac, \"0.000\")}\n \n )}\n
\n ],\n [\"Expenses:\", ],\n [\"Profit:\", ],\n ]}\n />\n
\n \n \n Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real\n Estate.\n \n }\n >\n Production Multiplier: {numeralWrapper.format(division.prodMult, \"0.00\")}\n \n setHelpOpen(true)}>\n \n \n setHelpOpen(false)}>\n \n Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these\n materials have on your production varies between Industries. For example, Real Estate may be very effective\n for some Industries, but ineffective for others.\n
\n
\n This division's production multiplier is calculated by summing the individual production multiplier of each\n of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial\n to expand into new cities as this can greatly increase the production multiplier of your entire Division.\n
\n
\n Below are approximations for how effective each material is at boosting this industry's production\n multiplier (Bigger bars = more effective):\n
\n
\n Hardware:    {convertEffectFacToGraphic(division.hwFac)}\n
\n Robots:      {convertEffectFacToGraphic(division.robFac)}\n
\n AI Cores:    {convertEffectFacToGraphic(division.aiFac)}\n
\n Real Estate: {convertEffectFacToGraphic(division.reFac)}\n
\n
\n
\n\n \n \n Scientific Research increases the quality of the materials and products that you produce.\n \n }\n >\n Scientific Research: {numeralWrapper.format(division.sciResearch.qty, \"0.000a\")}\n \n \n setResearchOpen(false)} industry={division} />\n \n \n );\n}\n\nfunction Upgrades(props: { office: OfficeSpace; rerender: () => void }): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const upgrades = [];\n for (const index of Object.keys(IndustryUpgrades)) {\n const upgrade = IndustryUpgrades[index];\n\n // AutoBrew research disables the Coffee upgrade\n if (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 switch (i) {\n case 0: //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n default:\n cost = baseCost * Math.pow(priceMult, division.upgrades[i]);\n break;\n }\n\n function onClick(): void {\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: props.office,\n });\n props.rerender();\n }\n\n upgrades.push(\n \n \n \n \n ,\n );\n }\n\n return <>{upgrades};\n}\n\ninterface IProps {\n currentCity: string;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function IndustryOverview(props: IProps): React.ReactElement {\n const division = useDivision();\n\n return (\n \n \n
\n Purchases & Upgrades\n
\n {division.makesProducts && }\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Industries } from \"../IndustryData\";\nimport { MakeProduct } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nfunction productPlaceholder(tpe: string): string {\n if (tpe === Industries.Food) {\n return \"Restaurant Name\";\n } else if (tpe === Industries.Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === Industries.RealEstate) {\n return \"Property Name\";\n }\n return \"Product Name\";\n}\n\n// Create a popup that lets the player create a product for their current industry\nexport function MakeProductModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const allCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] !== 0);\n const [city, setCity] = useState(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = useState(\"\");\n const [design, setDesign] = useState(null);\n const [marketing, setMarketing] = useState(null);\n if (division.hasMaximumNumberProducts()) return <>;\n\n let createProductPopupText = <>;\n switch (division.type) {\n case Industries.Food:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new restaurant!\n \n );\n break;\n case Industries.Tobacco:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new tobacco product!\n \n );\n break;\n case Industries.Pharmaceutical:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and develop a new pharmaceutical drug!\n \n );\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and manufacture a new computer hardware product!\n \n );\n break;\n case Industries.Robotics:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Design and create a new robot or robotic system!\n \n );\n break;\n case Industries.Software:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of software!\n \n );\n break;\n case Industries.Healthcare:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Build and manage a new hospital!\n \n );\n break;\n case Industries.RealEstate:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Develop a new piece of real estate property!\n \n );\n break;\n default:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n Create a new product!\n \n );\n return <>;\n }\n createProductPopupText = (\n <>\n {createProductPopupText}\n
\n
\n To begin developing a product, first choose the city in which it will be designed. The stats of your employees in\n the selected city affect the properties of the finished product, such as its quality, performance, and durability.\n
\n
\n You can also choose to invest money in the design and marketing of the product. Investing money in its design will\n result in a superior product. Investing money in marketing the product will help the product's sales.\n \n );\n\n function makeProduct(): void {\n if (design === null || marketing === null) return;\n try {\n MakeProduct(corp, division, city, name, design, marketing);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function onDesignChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setDesign(null);\n else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setMarketing(null);\n else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) makeProduct();\n }\n\n return (\n \n {createProductPopupText}\n \n \n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { IndustryResearchTrees } from \"../IndustryData\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Research } from \"../Actions\";\nimport { Node } from \"../ResearchTree\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport CheckIcon from '@mui/icons-material/Check';\n\ninterface INodeProps {\n n: Node | null;\n division: IIndustry;\n}\nfunction Upgrade({ n, division }: INodeProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (n === null) return <>;\n const r = ResearchMap[n.text];\n let disabled = division.sciResearch.qty < r.cost || n.researched;\n const parent = n.parent;\n if (parent !== null) {\n disabled = disabled || !parent.researched;\n }\n\n function research(): void {\n if (n === null || disabled) return;\n try {\n Research(division, n.text);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(\n `Researched ${n.text}. It may take a market cycle ` +\n `(~${CorporationConstants.SecsPerMarketCycle} seconds) before the effects of ` +\n `the Research apply.`,\n );\n }\n\n let color: \"primary\" | \"info\" = \"primary\";\n if (n.researched) {\n color = \"info\";\n }\n\n const wrapInTooltip = (ele: React.ReactElement): React.ReactElement => {\n return (\n \n Research points: {r.cost}\n
\n {r.desc}\n \n }\n >\n {ele}\n \n )\n }\n\n const but = (\n \n {wrapInTooltip(\n \n \n \n )}\n \n );\n\n if (n.children.length === 0) return but;\n\n return (\n \n \n {wrapInTooltip(\n \n \n \n )}\n \n \n \n \n {n.children.map((m) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n industry: IIndustry;\n}\n\n// Create the Research Tree UI for this Industry\nexport function ResearchModal(props: IProps): React.ReactElement {\n const researchTree = IndustryResearchTrees[props.industry.type];\n if (researchTree === undefined) return <>;\n\n return (\n \n \n \n Research points: {props.industry.sciResearch.qty.toFixed(3)}\n
\n Multipliers from research:\n
* Advertising Multiplier: x{researchTree.getAdvertisingMultiplier()}\n
* Employee Charisma Multiplier: x{researchTree.getEmployeeChaMultiplier()}\n
* Employee Creativity Multiplier: x{researchTree.getEmployeeCreMultiplier()}\n
* Employee Efficiency Multiplier: x{researchTree.getEmployeeEffMultiplier()}\n
* Employee Intelligence Multiplier: x{researchTree.getEmployeeIntMultiplier()}\n
* Production Multiplier: x{researchTree.getProductionMultiplier()}\n
* Sales Multiplier: x{researchTree.getSalesMultiplier()}\n
* Scientific Research Multiplier: x{researchTree.getScientificResearchMultiplier()}\n
* Storage Multiplier: x{researchTree.getStorageMultiplier()}\n
\n
\n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Material } from \"../Material\";\nimport { Product } from \"../Product\";\nimport { Warehouse } from \"../Warehouse\";\nimport { SmartSupplyModal } from \"./SmartSupplyModal\";\nimport { ProductElem } from \"./ProductElem\";\nimport { MaterialElem } from \"./MaterialElem\";\nimport { MaterialSizes } from \"../MaterialSizes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { isRelevantMaterial } from \"./Helpers\";\nimport { IndustryProductEquation } from \"./IndustryProductEquation\";\nimport { PurchaseWarehouse } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface IProps {\n corp: ICorporation;\n division: IIndustry;\n warehouse: Warehouse | 0;\n currentCity: string;\n player: IPlayer;\n rerender: () => void;\n}\n\nconst useStyles = makeStyles(() =>\n createStyles({\n retainHeight: {\n minHeight: '3em',\n },\n })\n);\n\nfunction WarehouseRoot(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [smartSupplyOpen, setSmartSupplyOpen] = useState(false);\n if (props.warehouse === 0) return <>;\n\n // Upgrade Warehouse size button\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = corp.funds > sizeUpgradeCost;\n function upgradeWarehouseOnClick(): void {\n if (division === null) return;\n if (props.warehouse === 0) return;\n if (!canAffordUpgrade) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n props.rerender();\n }\n\n const classes = useStyles();\n\n // Current State:\n let stateText;\n switch (division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n default:\n console.error(`Invalid state: ${division.state}`);\n break;\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n // Only create UI for materials that are relevant for the industry or in stock\n const isInStock = props.warehouse.materials[matName].qty > 0;\n const isRelevant = isRelevantMaterial(matName, division);\n if (!isInStock && !isRelevant) continue;\n mats.push(\n ,\n );\n }\n\n // Create React components for products\n const products = [];\n if (division.makesProducts && Object.keys(division.products).length > 0) {\n for (const productName of Object.keys(division.products)) {\n const product = division.products[productName];\n if (!(product instanceof Product)) continue;\n products.push(\n ,\n );\n }\n }\n\n const breakdownItems: JSX.Element[] = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n const mat = props.warehouse.materials[matName];\n if (!MaterialSizes.hasOwnProperty(matName)) continue;\n if (mat.qty === 0) continue;\n breakdownItems.push(<>{matName}: {numeralWrapper.format(mat.qty * MaterialSizes[matName], \"0,0.0\")});\n }\n\n for (const prodName of Object.keys(division.products)) {\n const prod = division.products[prodName];\n if (prod === undefined) continue;\n breakdownItems.push(<>{prodName}: {numeralWrapper.format(prod.data[props.warehouse.loc][0] * prod.siz, \"0,0.0\")});\n }\n\n let breakdown;\n if (breakdownItems && breakdownItems.length > 0) {\n breakdown = breakdownItems.reduce(\n (previous: JSX.Element, current: JSX.Element): JSX.Element => previous && <>{previous}
{current} || <>{current});\n } else {\n breakdown = <>No items in storage.\n }\n\n return (\n \n \n <>{breakdown} : \"\"}>\n = props.warehouse.size ? \"error\" : \"primary\"}>\n Storage: {numeralWrapper.formatBigNumber(props.warehouse.sizeUsed)} /{\" \"}\n {numeralWrapper.formatBigNumber(props.warehouse.size)}\n \n \n \n\n \n\n This industry uses the following equation for its production: \n
\n \n \n \n
\n \n To get started with production, purchase your required materials or import them from another of your company's\n divisions.\n \n
\n\n {stateText}\n\n {corp.unlockUpgrades[1] && (\n <>\n \n setSmartSupplyOpen(false)}\n warehouse={props.warehouse}\n />\n \n )}\n\n {mats}\n\n {products}\n
\n );\n}\n\nexport function IndustryWarehouse(props: IProps): React.ReactElement {\n if (props.warehouse instanceof Warehouse) {\n return ;\n } else {\n return ;\n }\n}\n\ninterface IEmptyProps {\n city: string;\n rerender: () => void;\n}\n\nfunction EmptyWarehouse(props: IEmptyProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const disabled = corp.funds < CorporationConstants.WarehouseInitialCost;\n function purchaseWarehouse(): void {\n if (disabled) return;\n PurchaseWarehouse(corp, division, props.city);\n props.rerender();\n }\n return (\n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { Warehouse } from \"../Warehouse\";\nimport { SetSmartSupply, SetSmartSupplyUseLeftovers } from \"../Actions\";\nimport { Material } from \"../Material\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface ILeftoverProps {\n matName: string;\n warehouse: Warehouse;\n}\n\nfunction Leftover(props: ILeftoverProps): React.ReactElement {\n const [checked, setChecked] = useState(!!props.warehouse.smartSupplyUseLeftovers[props.matName.replace(/ /g, \"\")]);\n\n function onChange(event: React.ChangeEvent): void {\n try {\n const matName = props.matName.replace(/ /g, \"\");\n const material = props.warehouse.materials[matName];\n SetSmartSupplyUseLeftovers(props.warehouse, material, event.target.checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n setChecked(event.target.checked);\n }\n\n return (\n <>\n }\n label={{props.warehouse.materials[props.matName.replace(/ /g, \"\")].name}}\n />\n
\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n warehouse: Warehouse;\n}\n\nexport function SmartSupplyModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // Smart Supply Checkbox\n function smartSupplyOnChange(e: React.ChangeEvent): void {\n SetSmartSupply(props.warehouse, e.target.checked);\n rerender();\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n if (!Object.keys(division.reqMats).includes(matName)) continue;\n mats.push();\n }\n\n return (\n \n <>\n }\n label={Enable Smart Supply}\n />\n
\n Use materials already in the warehouse instead of buying new ones, if available:\n {mats}\n \n
\n );\n}\n","import React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Product } from \"../Product\";\nimport { DiscontinueProductModal } from \"./DiscontinueProductModal\";\nimport { LimitProductProductionModal } from \"./LimitProductProductionModal\";\nimport { SellProductModal } from \"./SellProductModal\";\nimport { ProductMarketTaModal } from \"./ProductMarketTaModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProductProps {\n city: string;\n product: Product;\n rerender: () => void;\n}\n\n// Creates the UI for a single Product type\nexport function ProductElem(props: IProductProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [sellOpen, setSellOpen] = useState(false);\n const [limitOpen, setLimitOpen] = useState(false);\n const [discontinueOpen, setDiscontinueOpen] = useState(false);\n const [marketTaOpen, setMarketTaOpen] = useState(false);\n const city = props.city;\n const product = props.product;\n\n // Numeraljs formatters\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\");\n\n // Total product gain = production - sale\n const totalGain = product.data[city][1] - product.data[city][2];\n\n // Sell button\n let sellButtonText: JSX.Element;\n if (product.sllman[city][0]) {\n if (isString(product.sllman[city][1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/{product.sllman[city][1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/\n {numeralWrapper.format(product.sllman[city][1], nfB)})\n \n );\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n if (product.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.sCost) {\n if (isString(product.sCost)) {\n const sCost = (product.sCost as string).replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n\n // Limit Production button\n let limitProductionButtonText = \"Limit Production\";\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + numeralWrapper.format(product.prdman[city][1], nf) + \")\";\n }\n\n return (\n \n {!product.fin ? (\n <>\n \n Designing {product.name} (req. Operations/Engineers in {product.createCity})...\n \n
\n {numeralWrapper.format(product.prog, \"0.00\")}% complete\n \n ) : (\n <>\n \n \n Prod: {numeralWrapper.format(product.data[city][1], nfB)}/s\n
\n Sell: {numeralWrapper.format(product.data[city][2], nfB)} /s\n \n }\n >\n \n {product.name}: {numeralWrapper.format(product.data[city][0], nfB)} (\n {numeralWrapper.format(totalGain, nfB)}\n /s)\n \n \n
\n \n \n Quality: {numeralWrapper.format(product.qlt, nf)}
\n Performance: {numeralWrapper.format(product.per, nf)}
\n Durability: {numeralWrapper.format(product.dur, nf)}
\n Reliability: {numeralWrapper.format(product.rel, nf)}
\n Aesthetics: {numeralWrapper.format(product.aes, nf)}
\n Features: {numeralWrapper.format(product.fea, nf)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(product.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(product.cmp, nf)}\n \n }\n >\n Rating: {numeralWrapper.format(product.rat, nf)}\n \n
\n \n An estimate of the material cost it takes to create this Product.}>\n \n Est. Production Cost:{\" \"}\n {numeralWrapper.formatMoney(product.pCost / CorporationConstants.ProductProductionCostRatio)}\n \n \n \n \n \n An estimate of how much consumers are willing to pay for this product. Setting the sale price above\n this may result in less sales. Setting the sale price below this may result in more sales.\n \n }\n >\n Est. Market Price: {numeralWrapper.formatMoney(product.pCost)}\n \n \n \n )}\n\n {(hasUpgradeDashboard || product.fin) && (\n <>\n \n setSellOpen(false)} />\n
\n \n setLimitOpen(false)}\n />\n \n\n setDiscontinueOpen(false)}\n />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n setMarketTaOpen(false)} />\n \n )}\n \n )}\n
\n );\n}\n","import React from \"react\";\n\nimport { Product } from \"../Product\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n rerender: () => void;\n}\n\n// Create a popup that lets the player discontinue a product\nexport function DiscontinueProductModal(props: IProps): React.ReactElement {\n const division = useDivision();\n function discontinue(): void {\n division.discontinueProduct(props.product);\n props.onClose();\n props.rerender();\n }\n\n return (\n \n \n Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no\n longer produce this product and all of its existing stock will be removed and left unsold\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Product } from \"../Product\";\nimport { LimitProductProduction } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that lets the player limit the production of a product\nexport function LimitProductProductionModal(props: IProps): React.ReactElement {\n const [limit, setLimit] = useState(null);\n\n function limitProductProduction(): void {\n let qty = limit;\n if (qty === null) qty = -1;\n LimitProductProduction(props.product, props.city, qty);\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) limitProductProduction();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setLimit(null);\n else setLimit(parseFloat(event.target.value));\n }\n\n return (\n \n \n Enter a limit to the amount of this product you would like to produce per second. Leave the box empty to set no\n limit.\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Product } from \"../Product\";\nimport { SellProduct } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nfunction initialPrice(product: Product): string {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellProductModal(props: IProps): React.ReactElement {\n const [checked, setChecked] = useState(true);\n const [iQty, setQty] = useState(\n props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\",\n );\n const [px, setPx] = useState(initialPrice(props.product));\n\n function onCheckedChange(event: React.ChangeEvent): void {\n setChecked(event.target.checked);\n }\n\n function sellProduct(): void {\n try {\n SellProduct(props.product, props.city, iQty, px, checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setQty(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPx(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellProduct();\n }\n\n return (\n \n \n Enter the maximum amount of {props.product.name} you would like to sell per second, as well as the price at\n which you would like to sell it at.\n
\n
\n If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the\n product will be discarded.\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on\n the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five\n times the estimated market price.\n
\n
\n \n \n \n }\n label={Use same 'Sell Amount' for all cities}\n />\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Product } from \"../Product\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface ITa2Props {\n product: Product;\n}\n\nfunction MarketTA2(props: ITa2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const markupLimit = props.product.rat / props.product.mku;\n const [value, setValue] = useState(props.product.pCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n setValue(parseFloat(event.target.value));\n }\n\n function onCheckedChange(event: React.ChangeEvent): void {\n props.product.marketTa2 = event.target.checked;\n rerender();\n }\n\n const sCost = value;\n let markup = 1;\n if (sCost > props.product.pCost) {\n if (sCost - props.product.pCost > markupLimit) {\n markup = markupLimit / (sCost - props.product.pCost);\n }\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n}\n\n// Create a popup that lets the player use the Market TA research for Products\nexport function ProductMarketTaModal(props: IProps): React.ReactElement {\n const markupLimit = props.product.rat / props.product.mku;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n props.product.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is{\" \"}\n {numeralWrapper.formatMoney(props.product.pCost + markupLimit)}. This means that if you set the sale price\n higher than this, you will begin to experience a loss in number of sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Material } from \"../Material\";\nimport { Warehouse } from \"../Warehouse\";\nimport { ExportModal } from \"./ExportModal\";\nimport { MaterialMarketTaModal } from \"./MaterialMarketTaModal\";\nimport { SellMaterialModal } from \"./SellMaterialModal\";\nimport { PurchaseMaterialModal } from \"./PurchaseMaterialModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IMaterialProps {\n warehouse: Warehouse;\n city: string;\n mat: Material;\n rerender: () => void;\n}\n\n// Creates the UI for a single Material type\nexport function MaterialElem(props: IMaterialProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [purchaseMaterialOpen, setPurchaseMaterialOpen] = useState(false);\n const [exportOpen, setExportOpen] = useState(false);\n const [sellMaterialOpen, setSellMaterialOpen] = useState(false);\n const [materialMarketTaOpen, setMaterialMarketTaOpen] = useState(false);\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 if (!(office instanceof OfficeSpace)) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n\n // Total gain or loss of this material (per second)\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp;\n\n // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n const tutorial =\n division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0;\n\n // Purchase material button\n const purchaseButtonText = `Buy (${numeralWrapper.format(mat.buy, nfB)})`;\n\n // Sell material button\n let sellButtonText: JSX.Element;\n if (mat.sllman[0]) {\n if (isString(mat.sllman[1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{mat.sllman[1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{numeralWrapper.format(mat.sllman[1] as number, nfB)})\n \n );\n }\n\n if (mat.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.marketTa1) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.sCost) {\n if (isString(mat.sCost)) {\n const sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n return (\n \n \n \n \n Buy: {numeralWrapper.format(mat.buy, nfB)}
\n Prod: {numeralWrapper.format(mat.prd, nfB)}
\n Sell: {numeralWrapper.format(mat.sll, nfB)}
\n Export: {numeralWrapper.format(mat.totalExp, nfB)}
\n Import: {numeralWrapper.format(mat.imp, nfB)}\n {corp.unlockUpgrades[2] === 1 &&
}\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(mat.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
}\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(mat.cmp, nf)}\n \n }\n >\n \n {mat.name}: {numeralWrapper.format(mat.qty, nfB)} ({numeralWrapper.format(totalGain, nfB)}/s)\n \n \n \n Market Price: The price you would pay if you were to buy this material on the market\n \n }\n >\n MP: {numeralWrapper.formatMoney(mat.bCost)}\n \n The quality of your material. Higher quality will lead to more sales}\n >\n Quality: {numeralWrapper.format(mat.qlt, \"0.00a\")}\n \n
\n\n \n Purchase your required materials to get production started! : \"\"}\n >\n setPurchaseMaterialOpen(true)}\n disabled={props.warehouse.smartSupplyEnabled && Object.keys(division.reqMats).includes(props.mat.name)}\n >\n {purchaseButtonText}\n \n \n setPurchaseMaterialOpen(false)}\n />\n\n {corp.unlockUpgrades[0] === 1 && (\n <>\n \n\n setExportOpen(false)} />\n \n )}\n\n setSellMaterialOpen(true)}\n >\n {sellButtonText}\n \n setSellMaterialOpen(false)} />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n\n setMaterialMarketTaOpen(false)}\n />\n \n )}\n \n
\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Material } from \"../Material\";\nimport { Export } from \"../Export\";\nimport { IIndustry } from \"../IIndustry\";\nimport { ExportMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport { isRelevantMaterial } from \"./Helpers\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player manage exports\nexport function ExportModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const possibleDivisions = corp.divisions.filter((division: IIndustry) => isRelevantMaterial(props.mat.name, division));\n if (possibleDivisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n const defaultDivision = possibleDivisions[0];\n if (Object.keys(defaultDivision.warehouses).length === 0)\n throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = useState(defaultDivision.name);\n const [city, setCity] = useState(Object.keys(defaultDivision.warehouses)[0]);\n const [amt, setAmt] = useState(\"\");\n const setRerender = useState(false)[1];\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n const div = event.target.value;\n setIndustry(div);\n setCity(Object.keys(corp.divisions[0].warehouses)[0]);\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function exportMaterial(): void {\n try {\n ExportMaterial(industry, city, props.mat, amt, currentDivision);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function removeExport(exp: Export): void {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt)\n continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n rerender();\n }\n\n const currentDivision = corp.divisions.find((division: IIndustry) => division.name === industry);\n if (currentDivision === undefined)\n throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(\n (city) => currentDivision.warehouses[city] !== 0,\n );\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return (\n \n \n Select the industry and city to export this material to, as well as how much of this material to export per\n second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\n \n \n \n \n \n \n Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports\n below will REMOVE that export.\n \n {props.mat.exp.map((exp: Export, index: number) => (\n \n \n \n Industry: {exp.ind}\n
\n City: {exp.city}\n
\n Amount/s: {exp.amt}\n
\n
\n ))}\n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Material } from \"../Material\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IMarketTA2Props {\n mat: Material;\n}\n\nfunction MarketTA2(props: IMarketTA2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const [newCost, setNewCost] = useState(props.mat.bCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setNewCost(0);\n else setNewCost(parseFloat(event.target.value));\n }\n\n const sCost = newCost;\n let markup = 1;\n if (sCost > props.mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - props.mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - props.mat.bCost), 2);\n }\n } else if (sCost < props.mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = props.mat.bCost / sCost;\n }\n }\n\n function onMarketTA2(event: React.ChangeEvent): void {\n props.mat.marketTa2 = event.target.checked;\n rerender();\n }\n\n return (\n <>\n Market-TA.II\n
\n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player use the Market TA research for Materials\nexport function MaterialMarketTaModal(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onMarketTA1(event: React.ChangeEvent): void {\n props.mat.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is {numeralWrapper.formatMoney(props.mat.bCost + markupLimit)}.\n This means that if you set the sale price higher than this, you will begin to experience a loss in number of\n sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Material } from \"../Material\";\nimport { SellMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nfunction initialPrice(mat: Material): string {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellMaterialModal(props: IProps): React.ReactElement {\n const [amt, setAmt] = useState(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = useState(initialPrice(props.mat));\n\n function sellMaterial(): void {\n try {\n SellMaterial(props.mat, amt, price);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellMaterial();\n }\n\n return (\n \n \n Enter the maximum amount of {props.mat.name} you would like to sell per second, as well as the price at which\n you would like to sell at.\n
\n
\n If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the\n material will be discarded\n
\n
\n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
\n
\n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less\n of the material than you produce.\n
\n
\n When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that\n depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at\n $10 above the market price.\n
\n
\n \n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { MaterialSizes } from \"../MaterialSizes\";\nimport { Warehouse } from \"../Warehouse\";\nimport { Material } from \"../Material\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BulkPurchase, BuyMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IBulkPurchaseTextProps {\n warehouse: Warehouse;\n mat: Material;\n amount: string;\n}\n\nfunction BulkPurchaseText(props: IBulkPurchaseTextProps): React.ReactElement {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n\n const matSize = MaterialSizes[props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt * matSize > maxAmount) {\n return (\n <>\n Not enough warehouse space to purchase this amount\n \n );\n } else if (isNaN(cost) || parsedAmt < 0) {\n return (\n <>\n Invalid put for Bulk Purchase amount\n \n );\n } else {\n return (\n <>\n \n Purchasing {numeralWrapper.format(parsedAmt, \"0,0.00\")} of {props.mat.name} will cost{\" \"}\n {numeralWrapper.formatMoney(cost)}\n \n \n );\n }\n}\n\ninterface IBPProps {\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\nfunction BulkPurchaseSection(props: IBPProps): React.ReactElement {\n const corp = useCorporation();\n const [buyAmt, setBuyAmt] = useState(\"\");\n\n function bulkPurchase(): void {\n try {\n BulkPurchase(corp, props.warehouse, props.mat, parseFloat(buyAmt));\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) bulkPurchase();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(event.target.value);\n }\n\n return (\n <>\n \n Enter the amount of {props.mat.name} you would like to bulk purchase. This purchases the specified amount\n instantly (all at once).\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\n// Create a popup that lets the player purchase a Material\nexport function PurchaseMaterialModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const [buyAmt, setBuyAmt] = useState(props.mat.buy ? props.mat.buy : 0);\n\n function purchaseMaterial(): void {\n if (buyAmt === null) return;\n try {\n BuyMaterial(props.mat, buyAmt);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function clearPurchase(): void {\n props.mat.buy = 0;\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) purchaseMaterial();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return (\n \n <>\n \n Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes\n constantly.\n \n \n \n \n {division.hasResearch(\"Bulk Purchasing\") && (\n \n )}\n \n \n );\n}\n","import React from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MathJaxWrapper } from \"../../MathJaxWrapper\";\n\ninterface IProps {\n division: IIndustry;\n}\n\nexport function IndustryProductEquation(props: IProps): React.ReactElement {\n const reqs = [];\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 const prod = props.division.prodMats.map((p) => `1\\\\text{ }${p}`);\n if (props.division.makesProducts) {\n prod.push(\"Products\");\n }\n\n return (\n {\"\\\\(\" + reqs.join(\"+\") + `\\\\Rightarrow ` + prod.join(\"+\") + \"\\\\)\"}\n );\n}\n","import React, { useState } from \"react\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { NewCity } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n cityStateSetter: (city: string) => void;\n}\n\nexport function ExpandNewCity(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const possibleCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0);\n const [city, setCity] = useState(possibleCities[0]);\n\n const disabled = corp.funds < CorporationConstants.OfficeInitialCost;\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function expand(): void {\n try {\n NewCity(corp, division, city);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(`Opened a new office in ${city}!`);\n\n props.cityStateSetter(city);\n }\n return (\n <>\n \n Would you like to expand into a new city by opening an office? This would cost{\" \"}\n \n \n \n Confirm\n \n }\n value={city}\n onChange={onCityChange}\n >\n {possibleCities.map((cityName: string) => (\n \n {cityName}\n \n ))}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { IndustryStartingCosts, Industries, IndustryDescriptions } from \"../IndustryData\";\nimport { useCorporation } from \"./Context\";\nimport { IIndustry } from \"../IIndustry\";\nimport { NewIndustry } from \"../Actions\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n setDivisionName: (name: string) => void;\n}\n\nexport function ExpandIndustryTab(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const allIndustries = Object.keys(Industries).sort();\n const possibleIndustries = allIndustries\n .filter(\n (industryType: string) =>\n corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n )\n .sort();\n const [industry, setIndustry] = useState(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = useState(\"\");\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n const disabled = corp.funds < cost || name === \"\";\n\n function newIndustry(): void {\n if (disabled) return;\n try {\n NewIndustry(corp, industry, name);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n // Set routing to the new division so that the UI automatically switches to it\n props.setDivisionName(name);\n }\n\n function onNameChange(event: React.ChangeEvent): void {\n // [a-zA-Z0-9-_]\n setName(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) newIndustry();\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n setIndustry(event.target.value);\n }\n\n const desc = IndustryDescriptions[industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n\n return (\n <>\n Create a new division to expand into a new industry:\n \n {desc(corp)}\n
\n
\n\n Division name:\n\n \n \n Expand\n \n ),\n }}\n />\n \n \n );\n}\n","// React Component for displaying Corporation Overview info\nimport React, { useState } from \"react\";\nimport { LevelableUpgrade } from \"./LevelableUpgrade\";\nimport { UnlockUpgrade } from \"./UnlockUpgrade\";\nimport { BribeFactionModal } from \"./BribeFactionModal\";\nimport { SellSharesModal } from \"./SellSharesModal\";\nimport { BuybackSharesModal } from \"./BuybackSharesModal\";\nimport { IssueDividendsModal } from \"./IssueDividendsModal\";\nimport { IssueNewSharesModal } from \"./IssueNewSharesModal\";\nimport { FindInvestorsModal } from \"./FindInvestorsModal\";\nimport { GoPublicModal } from \"./GoPublicModal\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"../data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"../data/CorporationUpgrades\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n rerender: () => void;\n}\nexport function Overview({ rerender }: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const profit: number = corp.revenue - corp.expenses;\n\n const multRows: any[][] = [];\n function appendMult(name: string, value: number): void {\n if (value === 1) return;\n multRows.push([name, numeralWrapper.format(value, \"0.000\")]);\n }\n appendMult(\"Production Multiplier: \", corp.getProductionMultiplier());\n appendMult(\"Storage Multiplier: \", corp.getStorageMultiplier());\n appendMult(\"Advertising Multiplier: \", corp.getAdvertisingMultiplier());\n appendMult(\"Empl. Creativity Multiplier: \", corp.getEmployeeCreMultiplier());\n appendMult(\"Empl. Charisma Multiplier: \", corp.getEmployeeChaMultiplier());\n appendMult(\"Empl. Intelligence Multiplier: \", corp.getEmployeeIntMultiplier());\n appendMult(\"Empl. Efficiency Multiplier: \", corp.getEmployeeEffMultiplier());\n appendMult(\"Sales Multiplier: \", corp.getSalesMultiplier());\n appendMult(\"Scientific Research Multiplier: \", corp.getScientificResearchMultiplier());\n\n return (\n <>\n ],\n [\"Total Revenue:\", ],\n [\"Total Expenses:\", ],\n [\"Publicly Traded:\", corp.public ? \"Yes\" : \"No\"],\n [\"Owned Stock Shares:\", numeralWrapper.format(corp.numShares, \"0.000a\")],\n [\"Stock Price:\", corp.public ? : \"N/A\"],\n ]}\n />\n
\n \n \n }\n >\n Total Stock Shares: {numeralWrapper.format(corp.totalShares, \"0.000a\")}\n \n \n
\n \n
\n \n
\n \n \n \n Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file\n that guides you through the beginning of setting up a Corporation and provides some tips/pointers for\n helping you get started with managing it.\n \n }\n >\n \n \n {corp.public ? : }\n \n \n
\n \n \n );\n}\n\ninterface IPrivateButtonsProps {\n rerender: () => void;\n}\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({ rerender }: IPrivateButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [findInvestorsopen, setFindInvestorsopen] = useState(false);\n const [goPublicopen, setGoPublicopen] = useState(false);\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsTooltip = fundingAvailable\n ? \"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company\"\n : \"\";\n\n return (\n <>\n {findInvestorsTooltip}}>\n \n \n \n Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a\n public company, your shares will be traded on the stock market.\n \n }\n >\n \n \n setFindInvestorsopen(false)} rerender={rerender} />\n setGoPublicopen(false)} rerender={rerender} />\n \n );\n}\n\ninterface IUpgradeProps {\n rerender: () => void;\n}\n// Render the UI for Corporation upgrades\nfunction Upgrades({ rerender }: IUpgradeProps): React.ReactElement {\n const corp = useCorporation();\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return Upgrades are unlocked once you create an industry.;\n }\n\n return (\n <>\n \n Unlocks\n \n {Object.values(CorporationUnlockUpgrades)\n .filter((upgrade: CorporationUnlockUpgrade) => !corp.unlockUpgrades[upgrade[0]])\n .map((upgrade: CorporationUnlockUpgrade) => (\n \n ))}\n \n \n \n Upgrades\n \n {corp.upgrades\n .map((level: number, i: number) => CorporationUpgrades[i])\n .map((upgrade: CorporationUpgrade) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IPublicButtonsProps {\n rerender: () => void;\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({ rerender }: IPublicButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [sellSharesOpen, setSellSharesOpen] = useState(false);\n const [buybackSharesOpen, setBuybackSharesOpen] = useState(false);\n const [issueNewSharesOpen, setIssueNewSharesOpen] = useState(false);\n const [issueDividendsOpen, setIssueDividendsOpen] = useState(false);\n\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesTooltip = sellSharesOnCd\n ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown)\n : \"Sell your shares in the company. The money earned from selling your \" +\n \"shares goes into your personal account, not the Corporation's. \" +\n \"This is one of the only ways to profit from your business venture.\";\n\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesTooltip = issueNewSharesOnCd\n ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown)\n : \"Issue new equity shares to raise capital.\";\n\n return (\n <>\n {sellSharesTooltip}}>\n \n \n setSellSharesOpen(false)} rerender={rerender} />\n Buy back shares you that previously issued or sold at market price.}>\n \n \n setBuybackSharesOpen(false)} rerender={rerender} />\n {issueNewSharesTooltip}}>\n \n \n setIssueNewSharesOpen(false)} />\n Manage the dividends that are paid out to shareholders (including yourself)}\n >\n \n \n setIssueDividendsOpen(false)} />\n \n );\n}\n\nfunction BribeButton(): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [open, setOpen] = useState(false);\n const canBribe =\n corp.determineValuation() >= CorporationConstants.BribeThreshold &&\n player.factions.filter((f) => Factions[f].getInfo().offersWork()).length > 0;\n\n function openBribe(): void {\n if (!canBribe) return;\n setOpen(true);\n }\n\n return (\n <>\n \n \n \n setOpen(false)} />\n \n );\n}\n\ninterface IDividendsStatsProps {\n profit: number;\n}\nfunction DividendsStats({ profit }: IDividendsStatsProps): React.ReactElement {\n const corp = useCorporation();\n if (corp.dividendPercentage <= 0 || profit <= 0) return <>;\n const totalDividends = (corp.dividendPercentage / 100) * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n return (\n ],\n [\"Dividend Percentage:\", numeralWrapper.format(corp.dividendPercentage / 100, \"0%\")],\n [\"Dividends per share:\", ],\n [\"Your earnings as a shareholder:\", ],\n ]}\n />\n );\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime(): React.ReactElement {\n const corp = useCorporation();\n const storedTime = corp.storedCycles * CONSTANTS.MilliPerCycle;\n if (storedTime <= 15000) return <>;\n return (\n \n Bonus time: {convertTimeMsToTimeElapsedString(storedTime)}\n
\n
\n
\n );\n}\n","// React components for the levelable upgrade buttons on the overview panel\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUpgrade } from \"../data/CorporationUpgrades\";\nimport { LevelUpgrade } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgrade: CorporationUpgrade;\n rerender: () => void;\n}\n\nexport function LevelableUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgrade;\n const level = corp.upgrades[data[0]];\n\n const baseCost = data[1];\n const priceMult = data[2];\n const cost = baseCost * Math.pow(priceMult, level);\n\n const tooltip = data[5];\n function onClick(): void {\n if (corp.funds < cost) return;\n try {\n LevelUpgrade(corp, props.upgrade);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n \n {data[4]} - lvl {level}\n \n \n \n \n );\n}\n","// React Components for the Unlock upgrade buttons on the overview page\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUnlockUpgrade } from \"../data/CorporationUnlockUpgrades\";\nimport { useCorporation } from \"./Context\";\nimport { UnlockUpgrade as UU } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgradeData: CorporationUnlockUpgrade;\n rerender: () => void;\n}\n\nexport function UnlockUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgradeData;\n const tooltip = data[3];\n function onClick(): void {\n if (corp.funds < data[1]) return;\n try {\n UU(corp, props.upgradeData);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n {data[2]}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function BribeFactionModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const factions = player.factions.filter((name: string) => {\n const info = Factions[name].getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(name)) return false;\n return true;\n });\n const corp = useCorporation();\n const [money, setMoney] = useState(0);\n const [stock, setStock] = useState(0);\n const [selectedFaction, setSelectedFaction] = useState(factions.length > 0 ? factions[0] : \"\");\n const disabled =\n money === null ||\n stock === null ||\n (money === 0 && stock === 0) ||\n isNaN(money) ||\n isNaN(stock) ||\n money < 0 ||\n stock < 0 ||\n corp.funds < money ||\n stock > corp.numShares;\n\n function onMoneyChange(event: React.ChangeEvent): void {\n setMoney(parseFloat(event.target.value));\n }\n\n function onStockChange(event: React.ChangeEvent): void {\n setStock(parseFloat(event.target.value));\n }\n\n function changeFaction(event: SelectChangeEvent): void {\n setSelectedFaction(event.target.value);\n }\n\n function repGain(money: number, stock: number): number {\n return (money + stock * corp.sharePrice) / CorporationConstants.BribeToRepRatio;\n }\n\n function getRepText(money: number, stock: number): string {\n if (money === 0 && stock === 0) return \"\";\n if (isNaN(money) || isNaN(stock) || money < 0 || stock < 0) {\n return \"ERROR: Invalid value(s) entered\";\n } else if (corp.funds < money) {\n return \"ERROR: You do not have this much money to bribe with\";\n } else if (stock > corp.numShares) {\n return \"ERROR: You do not have this many shares to bribe with\";\n } else {\n return (\n \"You will gain \" +\n numeralWrapper.formatReputation(repGain(money, stock)) +\n \" reputation with \" +\n selectedFaction +\n \" with this bribe\"\n );\n }\n }\n\n function bribe(money: number, stock: number): void {\n const fac = Factions[selectedFaction];\n if (disabled) return;\n const rep = repGain(money, stock);\n dialogBoxCreate(\n \"You gained \" + numeralWrapper.formatReputation(rep) + \" reputation with \" + fac.name + \" by bribing them.\",\n );\n fac.playerReputation += rep;\n corp.funds = corp.funds - money;\n corp.numShares -= stock;\n props.onClose();\n }\n\n return (\n \n \n You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation.\n \n \n Faction:\n \n \n {getRepText(money ? money : 0, stock ? stock : 0)}\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport { ICorporation } from \"../ICorporation\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\nimport { SellShares } from \"../Actions\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player sell Corporation shares\n// This is created when the player clicks the \"Sell Shares\" button in the overview panel\nexport function SellSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n const disabled = shares === null || isNaN(shares) || shares <= 0 || shares > corp.numShares;\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n function ProfitIndicator(props: { shares: number | null; corp: ICorporation }): React.ReactElement {\n if (props.shares === null) return <>;\n if (isNaN(props.shares) || props.shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to sell;\n } else if (props.shares > corp.numShares) {\n return <>You don't have this many shares to sell!;\n } else {\n const stockSaleResults = corp.calculateShareSale(props.shares);\n const profit = stockSaleResults[0];\n return (\n <>\n Sell {props.shares} shares for a total of {numeralWrapper.formatMoney(profit)}\n \n );\n }\n }\n\n function sell(): void {\n if (disabled) return;\n try {\n const profit = SellShares(corp, player, shares)\n props.onClose();\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatMoney(shares)} shares for\n . The corporation's stock price fell to  \n as a result of dilution.\n ,\n );\n\n props.rerender();\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sell();\n }\n\n return (\n \n \n Enter the number of shares you would like to sell. The money from selling your shares will go directly to you\n (NOT your Corporation).\n
\n
\n Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a\n large number of shares all at once will have an immediate effect in reducing your stock price.\n
\n
\n The current price of your company's stock is {numeralWrapper.formatMoney(corp.sharePrice)}\n
\n \n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { BuyBackShares } from '../Actions';\nimport { dialogBoxCreate } from '../../ui/React/DialogBox';\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player buyback shares\n// This is created when the player clicks the \"Buyback Shares\" button in the overview panel\nexport function BuybackSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n const currentStockPrice = corp.sharePrice;\n const buybackPrice = currentStockPrice * 1.1;\n const disabled =\n shares === null ||\n isNaN(shares) ||\n shares <= 0 ||\n shares > corp.issuedShares ||\n shares * buybackPrice > player.money;\n\n function buy(): void {\n if (disabled) return;\n try {\n BuyBackShares(corp, player, shares)\n }\n catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n props.rerender();\n }\n\n function CostIndicator(): React.ReactElement {\n if (shares === null) return <>;\n if (isNaN(shares) || shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to buyback;\n } else if (shares > corp.issuedShares) {\n return (\n <>\n There are not this many shares available to buy back. There are only{\" \"}\n {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding shares.\n \n );\n } else {\n return (\n <>\n Purchase {shares} shares for a total of {numeralWrapper.formatMoney(shares * buybackPrice)}\n \n );\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) buy();\n }\n\n return (\n \n \n Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium.\n However, repurchasing shares from the market tends to lead to an increase in stock price.\n
\n
\n To purchase these shares, you must use your own money (NOT your Corporation's funds).\n
\n
\n The current buyback price of your company's stock is {numeralWrapper.formatMoney(buybackPrice)}. Your company\n currently has {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding stock shares.\n
\n \n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { IssueDividends } from \"../Actions\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nexport function IssueDividendsModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [percent, setPercent] = useState(0);\n\n const canIssue = !isNaN(percent) && percent >= 0 && percent <= CorporationConstants.DividendMaxPercentage * 100;\n function issueDividends(): void {\n if (!canIssue) return;\n if (percent === null) return;\n try {\n IssueDividends(corp, percent / 100);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueDividends();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setPercent(0);\n else {\n let p = parseFloat(event.target.value);\n if (p > 100) p = 100;\n if (p < 0) p = 0;\n setPercent(p);\n }\n }\n\n return (\n \n \n Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes\n yourself, as well.\n
\n
\n In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This\n percentage must be an integer between 0 and 100. (A percentage of 0 means no dividends will be issued)\n
\n
\n Two important things to note:\n
\n * Issuing dividends will negatively affect your corporation's stock price\n
\n
\n Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends.\n That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as\n dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share\n per second before taxes.\n
\n \n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IEffectTextProps {\n shares: number | null;\n}\n\nfunction EffectText(props: IEffectTextProps): React.ReactElement {\n const corp = useCorporation();\n if (props.shares === null) return <>;\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n let newShares = props.shares;\n if (isNaN(newShares)) {\n return Invalid input;\n }\n\n // Round to nearest ten-millionth\n newShares /= 10e6;\n newShares = Math.round(newShares) * 10e6;\n\n if (newShares < 10e6) {\n return Must issue at least 10 million new shares;\n }\n\n if (newShares > maxNewShares) {\n return You cannot issue that many shares;\n }\n\n return (\n \n Issue {numeralWrapper.format(newShares, \"0.000a\")} new shares for{\" \"}\n {numeralWrapper.formatMoney(newShares * newSharePrice)}?\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue new shares\n// This is created when the player clicks the \"Issue New Shares\" buttons in the overview panel\nexport function IssueNewSharesModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n\n const newShares = Math.round((shares || 0) / 10e6) * 10e6;\n const disabled = shares === null || isNaN(newShares) || newShares < 10e6 || newShares > maxNewShares;\n\n function issueNewShares(): void {\n if (shares === null) return;\n if (disabled) return;\n\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n let newShares = shares;\n\n // Round to nearest ten-millionth\n newShares = Math.round(newShares / 10e6) * 10e6;\n\n const profit = newShares * newSharePrice;\n corp.issueNewSharesCooldown = CorporationConstants.IssueNewSharesCooldown;\n corp.totalShares += newShares;\n\n // Determine how many are bought by private investors\n // Private investors get up to 50% at most\n // Round # of private shares to the nearest millionth\n let privateShares = getRandomInt(0, Math.round(newShares / 2));\n privateShares = Math.round(privateShares / 1e6) * 1e6;\n\n corp.issuedShares += newShares - privateShares;\n corp.funds = corp.funds + profit;\n corp.immediatelyUpdateSharePrice();\n props.onClose();\n dialogBoxCreate(\n `Issued ${numeralWrapper.format(newShares, \"0.000a\")} and raised ` +\n `${numeralWrapper.formatMoney(profit)}. ${numeralWrapper.format(privateShares, \"0.000a\")} ` +\n `of these shares were bought by private investors.

` +\n `Stock price decreased to ${numeralWrapper.formatMoney(corp.sharePrice)}`,\n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueNewShares();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(parseFloat(event.target.value));\n }\n\n return (\n \n \n You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.\n
\n
\n  * You can issue at most {numeralWrapper.formatMoney(maxNewShares)} new shares\n
\n  * New shares are sold at a 10% discount\n
\n  * You can only issue new shares once every 12 hours\n
\n  * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share\n
\n  * Number of new shares issued must be a multiple of 10 million\n
\n
\n When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares.\n If they choose to exercise this option, these newly issued shares become private, restricted shares, which means\n you cannot buy them back.\n
\n \n \n \n
\n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function FindInvestorsModal(props: IProps): React.ReactElement {\n const corporation = useCorporation();\n const val = corporation.determineValuation();\n if (corporation.fundingRound >= CorporationConstants.FundingRoundShares.length || corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length) return <>;\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n\n function findInvestors(): void {\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n props.rerender();\n props.onClose();\n }\n return (\n \n \n An investment firm has offered you {numeralWrapper.formatMoney(funding)} in funding in exchange for a{\" \"}\n {numeralWrapper.format(percShares * 100, \"0.000a\")}% stake in the company (\n {numeralWrapper.format(investShares, \"0.000a\")} shares).\n
\n
\n Do you accept or reject this offer?\n
\n
\n Hint: Investment firms will offer more money if your corporation is turning a profit\n
\n \n
\n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function GoPublicModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(\"\");\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n\n function goPublic(): void {\n const numShares = parseFloat(shares);\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n if (isNaN(numShares)) {\n dialogBoxCreate(\"Invalid value for number of issued shares\");\n return;\n }\n if (numShares > corp.numShares) {\n dialogBoxCreate(\"Error: You don't have that many shares to issue!\");\n return;\n }\n corp.public = true;\n corp.sharePrice = initialSharePrice;\n corp.issuedShares = numShares;\n corp.numShares -= numShares;\n corp.addFunds(numShares * initialSharePrice);\n props.rerender();\n dialogBoxCreate(\n `You took your ${corp.name} public and earned ` +\n `${numeralWrapper.formatMoney(numShares * initialSharePrice)} in your IPO`,\n );\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) goPublic();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setShares(event.target.value);\n }\n\n return (\n \n \n Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will\n no longer own them. Your Corporation will receive {numeralWrapper.formatMoney(initialSharePrice)} per share (the\n IPO money will be deposited directly into your Corporation's funds).\n
\n
\n You have a total of {numeralWrapper.format(corp.numShares, \"0.000a\")} of shares that you can issue.\n
\n \n \n corp.numShares}\n sx={{ mx: 1 }}\n onClick={goPublic}\n >\n Go Public\n \n \n
\n );\n}\n","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport React, { useState } from \"react\";\nimport { Intro } from \"./Intro\";\nimport { Game } from \"./Game\";\nimport { Location } from \"../../Locations/Location\";\nimport { use } from \"../../ui/Context\";\nimport { calculateSkill } from \"../../PersonObjects/formulas/skill\";\n\ninterface IProps {\n location: Location;\n}\n\nfunction calcRawDiff(player: IPlayer, stats: number, startingDifficulty: number): number {\n const difficulty = startingDifficulty - Math.pow(stats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nfunction calcDifficulty(player: IPlayer, startingDifficulty: number): number {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n return calcRawDiff(player, totalStats, startingDifficulty);\n}\n\nfunction calcReward(player: IPlayer, startingDifficulty: number): number {\n const xpMult = 10 * 60 * 15;\n const total =\n calculateSkill(player.strength_exp_mult * xpMult, player.strength_mult) +\n calculateSkill(player.defense_exp_mult * xpMult, player.defense_mult) +\n calculateSkill(player.agility_exp_mult * xpMult, player.agility_mult) +\n calculateSkill(player.dexterity_exp_mult * xpMult, player.dexterity_mult) +\n calculateSkill(player.charisma_exp_mult * xpMult, player.charisma_mult);\n return calcRawDiff(player, total, startingDifficulty);\n}\n\nexport function InfiltrationRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [start, setStart] = useState(false);\n\n if (props.location.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingDifficulty = props.location.infiltrationData.startingSecurityLevel;\n const difficulty = calcDifficulty(player, startingDifficulty);\n const reward = calcReward(player, startingDifficulty);\n console.log(`${difficulty} ${reward}`);\n\n function cancel(): void {\n router.toCity();\n }\n\n if (!start) {\n return (\n setStart(true)}\n cancel={cancel}\n />\n );\n }\n\n return (\n \n );\n}\n","import React from \"react\";\nimport { Location } from \"../../Locations/Location\";\nimport Grid from \"@mui/material/Grid\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\ninterface IProps {\n Location: Location;\n Difficulty: number;\n MaxLevel: number;\n start: () => void;\n cancel: () => void;\n}\n\nfunction arrowPart(color: string, length: number): JSX.Element {\n let arrow = \"\";\n if (length <= 0) length = 0;\n else if (length > 13) length = 13;\n else {\n length--;\n arrow = \">\";\n }\n return (\n \n {\"=\".repeat(length)}\n {arrow}\n {\" \".repeat(13 - arrow.length - length)}\n \n );\n}\n\nfunction coloredArrow(difficulty: number): JSX.Element {\n if (difficulty === 0) {\n return (\n \n {\">\"}\n {\" \".repeat(38)}\n \n );\n } else {\n return (\n <>\n {arrowPart(\"white\", difficulty * 13)}\n {arrowPart(\"orange\", (difficulty - 1) * 13)}\n {arrowPart(\"red\", (difficulty - 2) * 13)}\n \n );\n }\n}\n\nexport function Intro(props: IProps): React.ReactElement {\n return (\n <>\n \n \n Infiltrating {props.Location.name}\n \n \n \n Maximum level: {props.MaxLevel}\n \n \n \n \n Difficulty: {numeralWrapper.format(props.Difficulty * 33.3333, \"0\")} / 100\n \n \n\n {props.Difficulty > 1.5 && (\n \n \n Warning: This location is too heavily guarded for your current stats, try training or finding an easier\n location.\n \n \n )}\n\n \n [{coloredArrow(props.Difficulty)}]\n {` ^ ^ ^ ^`}\n {` Trivial Normal Hard Impossible`}\n \n \n \n Infiltration is a series of short minigames that get progressively harder. You take damage for failing them.\n Reaching the maximum level rewards you with intel you can trade for money or reputation.\n \n
\n \n The minigames you play are randomly selected. It might take you few tries to get used to them.\n \n
\n No game require use of the mouse.\n
\n Spacebar is the default action/confirm button.\n
\n Everything that uses arrow can also use WASD\n
\n Sometimes the rest of the keyboard is used.\n
\n \n \n \n \n \n \n
\n \n );\n}\n","import { use } from \"../../ui/Context\";\nimport React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport { Countdown } from \"./Countdown\";\nimport { BracketGame } from \"./BracketGame\";\nimport { SlashGame } from \"./SlashGame\";\nimport { BackwardGame } from \"./BackwardGame\";\nimport { BribeGame } from \"./BribeGame\";\nimport { CheatCodeGame } from \"./CheatCodeGame\";\nimport { Cyberpunk2077Game } from \"./Cyberpunk2077Game\";\nimport { MinesweeperGame } from \"./MinesweeperGame\";\nimport { WireCuttingGame } from \"./WireCuttingGame\";\nimport { Victory } from \"./Victory\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nenum Stage {\n Countdown = 0,\n Minigame,\n Result,\n Sell,\n}\n\nconst minigames = [\n SlashGame,\n BracketGame,\n BackwardGame,\n BribeGame,\n CheatCodeGame,\n Cyberpunk2077Game,\n MinesweeperGame,\n WireCuttingGame,\n];\n\nexport function Game(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [level, setLevel] = useState(1);\n const [stage, setStage] = useState(Stage.Countdown);\n const [results, setResults] = useState(\"\");\n const [gameIds, setGameIds] = useState({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length),\n });\n\n function nextGameId(): number {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n return id;\n }\n\n function setupNextGame(): void {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId(),\n });\n }\n\n function success(): void {\n pushResult(true);\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n setupNextGame();\n }\n\n function pushResult(win: boolean): void {\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?: { automated: boolean }): void {\n setStage(Stage.Countdown);\n pushResult(false);\n // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n const damage = options?.automated ? player.hp : props.StartingDifficulty * 3;\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n setupNextGame();\n }\n\n function cancel(): void {\n router.toCity();\n return;\n }\n\n let stageComponent: React.ReactNode;\n switch (stage) {\n case Stage.Countdown:\n stageComponent = setStage(Stage.Minigame)} />;\n break;\n case Stage.Minigame: {\n const MiniGame = minigames[gameIds.id];\n stageComponent = ;\n break;\n }\n case Stage.Sell:\n stageComponent = (\n \n );\n break;\n }\n\n function Progress(): React.ReactElement {\n return (\n \n {results.slice(0, results.length - 1)}\n {results[results.length - 1]}\n \n );\n }\n\n return (\n <>\n \n \n \n \n \n \n Level: {level} / {props.MaxLevel}\n \n \n \n\n \n {stageComponent}\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\n\nimport Typography from \"@mui/material/Typography\";\ninterface IProps {\n onFinish: () => void;\n}\n\nexport function Countdown(props: IProps): React.ReactElement {\n const [x, setX] = useState(3);\n useEffect(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n setTimeout(() => setX(x - 1), 200);\n });\n\n return (\n <>\n \n \n Get Ready!\n {x}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 8000, min: 2, max: 3 },\n Normal: { timer: 6000, min: 4, max: 5 },\n Hard: { timer: 4000, min: 4, max: 6 },\n Impossible: { timer: 2500, min: 7, max: 7 },\n};\n\nfunction generateLeftSide(difficulty: Difficulty): string {\n let str = \"\";\n const options = [KEY.OPEN_BRACKET, KEY.LESS_THAN, KEY.OPEN_PARENTHESIS, KEY.OPEN_BRACE];\n const length = random(difficulty.min, difficulty.max);\n for (let i = 0; i < length; i++) {\n str += options[Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event: KeyboardEvent): string {\n if (event.key === KEY.CLOSE_PARENTHESIS) return KEY.CLOSE_PARENTHESIS;\n if (event.key === KEY.CLOSE_BRACKET) return KEY.CLOSE_BRACKET;\n if (event.key === KEY.CLOSE_BRACE) return KEY.CLOSE_BRACE;\n if (event.key === KEY.GREATER_THAN) return KEY.GREATER_THAN;\n return \"\";\n}\n\nfunction match(left: string, right: string): boolean {\n return (\n (left === KEY.OPEN_BRACKET && right === KEY.CLOSE_BRACKET) ||\n (left === KEY.LESS_THAN && right === KEY.GREATER_THAN) ||\n (left === KEY.OPEN_PARENTHESIS && right === KEY.CLOSE_PARENTHESIS) ||\n (left === KEY.OPEN_BRACE && right === KEY.CLOSE_BRACE)\n );\n}\n\nexport function BracketGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = useState(\"\");\n const [left] = useState(generateLeftSide(difficulty));\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n setRight(right + char);\n }\n\n return (\n \n \n \n Close the brackets\n \n {`${left}${right}`}\n \n \n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n window: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { window: 600 },\n Normal: { window: 325 },\n Hard: { window: 250 },\n Impossible: { window: 150 },\n};\n\nexport function SlashGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { window: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const [phase, setPhase] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key !== KEY.SPACE) return;\n if (phase !== 2) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n useEffect(() => {\n let id = window.setTimeout(() => {\n setPhase(1);\n id = window.setTimeout(() => {\n setPhase(2);\n id = window.setTimeout(() => setPhase(0), difficulty.window);\n }, 250);\n }, Math.random() * 3250 + 1500 - (250 + difficulty.window));\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return (\n \n \n \n Slash when his guard is down!\n {phase === 0 && Guarding ...}\n {phase === 1 && Preparing?}\n {phase === 2 && ATTACKING!}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 16000, min: 3, max: 4 },\n Normal: { timer: 12500, min: 2, max: 3 },\n Hard: { timer: 15000, min: 3, max: 4 },\n Impossible: { timer: 8000, min: 4, max: 4 },\n};\n\nexport function BackwardGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = useState(makeAnswer(difficulty));\n const [guess, setGuess] = useState(\"\");\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key === KEY.BACKSPACE) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();\n else if (answer === nextGuess) props.onSuccess();\n else setGuess(nextGuess);\n }\n\n return (\n \n \n \n Type it backward\n \n \n \n {answer}\n \n \n \n {guess}\n \n \n \n \n );\n}\n\nfunction makeAnswer(difficulty: Difficulty): string {\n const length = random(difficulty.min, difficulty.max);\n let answer = \"\";\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 = [\n \"ALGORITHM\",\n \"ANALOG\",\n \"APP\",\n \"APPLICATION\",\n \"ARRAY\",\n \"BACKUP\",\n \"BANDWIDTH\",\n \"BINARY\",\n \"BIT\",\n \"BITE\",\n \"BITMAP\",\n \"BLOG\",\n \"BLOGGER\",\n \"BOOKMARK\",\n \"BOOT\",\n \"BROADBAND\",\n \"BROWSER\",\n \"BUFFER\",\n \"BUG\",\n \"BUS\",\n \"BYTE\",\n \"CACHE\",\n \"CAPS LOCK\",\n \"CAPTCHA\",\n \"CD\",\n \"CD-ROM\",\n \"CLIENT\",\n \"CLIPBOARD\",\n \"CLOUD\",\n \"COMPUTING\",\n \"COMMAND\",\n \"COMPILE\",\n \"COMPRESS\",\n \"COMPUTER\",\n \"CONFIGURE\",\n \"COOKIE\",\n \"COPY\",\n \"CPU\",\n \"CYBERCRIME\",\n \"CYBERSPACE\",\n \"DASHBOARD\",\n \"DATA\",\n \"MINING\",\n \"DATABASE\",\n \"DEBUG\",\n \"DECOMPRESS\",\n \"DELETE\",\n \"DESKTOP\",\n \"DEVELOPMENT\",\n \"DIGITAL\",\n \"DISK\",\n \"DNS\",\n \"DOCUMENT\",\n \"DOMAIN\",\n \"DOMAIN NAME\",\n \"DOT\",\n \"DOT MATRIX\",\n \"DOWNLOAD\",\n \"DRAG\",\n \"DVD\",\n \"DYNAMIC\",\n \"EMAIL\",\n \"EMOTICON\",\n \"ENCRYPT\",\n \"ENCRYPTION\",\n \"ENTER\",\n \"EXABYTE\",\n \"FAQ\",\n \"FILE\",\n \"FINDER\",\n \"FIREWALL\",\n \"FIRMWARE\",\n \"FLAMING\",\n \"FLASH\",\n \"FLASH DRIVE\",\n \"FLOPPY DISK\",\n \"FLOWCHART\",\n \"FOLDER\",\n \"FONT\",\n \"FORMAT\",\n \"FRAME\",\n \"FREEWARE\",\n \"GIGABYTE\",\n \"GRAPHICS\",\n \"HACK\",\n \"HACKER\",\n \"HARDWARE\",\n \"HOME PAGE\",\n \"HOST\",\n \"HTML\",\n \"HYPERLINK\",\n \"HYPERTEXT\",\n \"ICON\",\n \"INBOX\",\n \"INTEGER\",\n \"INTERFACE\",\n \"INTERNET\",\n \"IP ADDRESS\",\n \"ITERATION\",\n \"JAVA\",\n \"JOYSTICK\",\n \"JUNKMAIL\",\n \"KERNEL\",\n \"KEY\",\n \"KEYBOARD\",\n \"KEYWORD\",\n \"LAPTOP\",\n \"LASER PRINTER\",\n \"LINK\",\n \"LINUX\",\n \"LOG OUT\",\n \"LOGIC\",\n \"LOGIN\",\n \"LURKING\",\n \"MACINTOSH\",\n \"MACRO\",\n \"MAINFRAME\",\n \"MALWARE\",\n \"MEDIA\",\n \"MEMORY\",\n \"MIRROR\",\n \"MODEM\",\n \"MONITOR\",\n \"MOTHERBOARD\",\n \"MOUSE\",\n \"MULTIMEDIA\",\n \"NET\",\n \"NETWORK\",\n \"NODE\",\n \"NOTEBOOK\",\n \"COMPUTER\",\n \"OFFLINE\",\n \"ONLINE\",\n \"OPENSOURCE\",\n \"OPERATING\",\n \"SYSTEM\",\n \"OPTION\",\n \"OUTPUT\",\n \"PAGE\",\n \"PASSWORD\",\n \"PASTE\",\n \"PATH\",\n \"PHISHING\",\n \"PIRACY\",\n \"PIRATE\",\n \"PLATFORM\",\n \"PLUGIN\",\n \"PODCAST\",\n \"POPUP\",\n \"PORTAL\",\n \"PRINT\",\n \"PRINTER\",\n \"PRIVACY\",\n \"PROCESS\",\n \"PROGRAM\",\n \"PROGRAMMER\",\n \"PROTOCOL\",\n \"QUEUE\",\n \"QWERTY\",\n \"RAM\",\n \"REALTIME\",\n \"REBOOT\",\n \"RESOLUTION\",\n \"RESTORE\",\n \"ROM\",\n \"ROOT\",\n \"ROUTER\",\n \"RUNTIME\",\n \"SAVE\",\n \"SCAN\",\n \"SCANNER\",\n \"SCREEN\",\n \"SCREENSHOT\",\n \"SCRIPT\",\n \"SCROLL\",\n \"SCROLL\",\n \"SEARCH\",\n \"ENGINE\",\n \"SECURITY\",\n \"SERVER\",\n \"SHAREWARE\",\n \"SHELL\",\n \"SHIFT\",\n \"SHIFT KEY\",\n \"SNAPSHOT\",\n \"SOCIAL NETWORKING\",\n \"SOFTWARE\",\n \"SPAM\",\n \"SPAMMER\",\n \"SPREADSHEET\",\n \"SPYWARE\",\n \"STATUS\",\n \"STORAGE\",\n \"SUPERCOMPUTER\",\n \"SURF\",\n \"SYNTAX\",\n \"TABLE\",\n \"TAG\",\n \"TERMINAL\",\n \"TEMPLATE\",\n \"TERABYTE\",\n \"TEXT EDITOR\",\n \"THREAD\",\n \"TOOLBAR\",\n \"TRASH\",\n \"TROJAN HORSE\",\n \"TYPEFACE\",\n \"UNDO\",\n \"UNIX\",\n \"UPLOAD\",\n \"URL\",\n \"USER\",\n \"USER INTERFACE\",\n \"USERNAME\",\n \"UTILITY\",\n \"VERSION\",\n \"VIRTUAL\",\n \"VIRTUAL MEMORY\",\n \"VIRUS\",\n \"WEB\",\n \"WEBMASTER\",\n \"WEBSITE\",\n \"WIDGET\",\n \"WIKI\",\n \"WINDOW\",\n \"WINDOWS\",\n \"WIRELESS\",\n \"PROCESSOR\",\n \"WORKSTATION\",\n \"WEB\",\n \"WORM\",\n \"WWW\",\n \"XML\",\n \"ZIP\",\n];\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, upArrowSymbol } from \"../utils\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n size: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12000, size: 6 },\n Normal: { timer: 9000, size: 8 },\n Hard: { timer: 5000, size: 9 },\n Impossible: { timer: 2500, size: 12 },\n};\n\nexport function BribeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, size: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = useState(makeChoices(difficulty));\n const [index, setIndex] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const k = event.key;\n if (k === KEY.SPACE) {\n if (positive.includes(choices[index])) props.onSuccess();\n else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([KEY.UP_ARROW, KEY.W, KEY.RIGHT_ARROW, KEY.D].map((key) => key as string).includes(k)) newIndex++;\n if ([KEY.DOWN_ARROW, KEY.S, KEY.LEFT_ARROW, KEY.A].map((key) => key as string).includes(k)) newIndex--;\n while (newIndex < 0) newIndex += choices.length;\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n setIndex(newIndex);\n }\n\n return (\n \n \n \n Say something nice about the guard.\n \n \n \n \n {upArrowSymbol}\n \n \n {choices[index]}\n \n \n {downArrowSymbol}\n \n \n \n );\n}\n\nfunction shuffleArray(array: string[]): void {\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: Difficulty): string[] {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n if (choices.includes(option)) {\n i--;\n continue;\n }\n choices.push(option);\n }\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\n \"affectionate\",\n \"agreeable\",\n \"bright\",\n \"charming\",\n \"creative\",\n \"determined\",\n \"energetic\",\n \"friendly\",\n \"funny\",\n \"generous\",\n \"polite\",\n \"likable\",\n \"diplomatic\",\n \"helpful\",\n \"giving\",\n \"kind\",\n \"hardworking\",\n \"patient\",\n \"dynamic\",\n \"loyal\",\n];\n\nconst negative = [\n \"aggressive\",\n \"aloof\",\n \"arrogant\",\n \"big-headed\",\n \"boastful\",\n \"boring\",\n \"bossy\",\n \"careless\",\n \"clingy\",\n \"couch potato\",\n \"cruel\",\n \"cynical\",\n \"grumpy\",\n \"hot air\",\n \"know it all\",\n \"obnoxious\",\n \"pain in the neck\",\n \"picky\",\n \"tactless\",\n \"thoughtless\",\n];\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random, getArrow, rightArrowSymbol, leftArrowSymbol, upArrowSymbol, downArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 13000, min: 6, max: 8 },\n Normal: { timer: 7000, min: 7, max: 8 },\n Hard: { timer: 5000, min: 8, max: 9 },\n Impossible: { timer: 3000, min: 9, max: 10 },\n};\n\nexport function CheatCodeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = useState(generateCode(difficulty));\n const [index, setIndex] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (code[index] !== getArrow(event)) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return (\n \n \n \n Enter the Code!\n {code[index]}\n \n \n \n );\n}\n\nfunction generateCode(difficulty: Difficulty): string {\n const arrows = [leftArrowSymbol, rightArrowSymbol, upArrowSymbol, downArrowSymbol];\n let code = \"\";\n for (let i = 0; i < random(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n code += arrow;\n }\n\n return code;\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n symbols: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12500, width: 3, height: 3, symbols: 6 },\n Normal: { timer: 15000, width: 4, height: 4, symbols: 7 },\n Hard: { timer: 12500, width: 5, height: 5, symbols: 8 },\n Impossible: { timer: 10000, width: 6, height: 6, symbols: 9 },\n};\n\nexport function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, symbols: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = useState(generatePuzzle(difficulty));\n const [answer] = useState(generateAnswer(grid, difficulty));\n const [index, setIndex] = useState(0);\n const [pos, setPos] = useState([0, 0]);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\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.key === KEY.SPACE) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return (\n \n \n \n Match the symbols!\n \n Targets:{\" \"}\n {answer.map((a, i) => {\n if (i == index)\n return (\n \n {a} \n \n );\n return (\n \n {a} \n \n );\n })}\n \n
\n {grid.map((line, y) => (\n
\n \n {line.map((cell, x) => {\n if (x == pos[0] && y == pos[1])\n return (\n \n {cell} \n \n );\n return (\n \n {cell} \n \n );\n })}\n \n
\n
\n ))}\n \n
\n
\n );\n}\n\nfunction generateAnswer(grid: string[][], difficulty: Difficulty): string[] {\n const answer = [];\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 return answer;\n}\n\nfunction randChar(): string {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty: Difficulty): string[][] {\n const puzzle = [];\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n puzzle.push(line);\n }\n return puzzle;\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n mines: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 15000, width: 3, height: 3, mines: 4 },\n Normal: { timer: 15000, width: 4, height: 4, mines: 7 },\n Hard: { timer: 15000, width: 5, height: 5, mines: 11 },\n Impossible: { timer: 15000, width: 6, height: 6, mines: 15 },\n};\n\nexport function MinesweeperGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, mines: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = useState(generateMinefield(difficulty));\n const [answer, setAnswer] = useState(generateEmptyField(difficulty));\n const [pos, setPos] = useState([0, 0]);\n const [memoryPhase, setMemoryPhase] = useState(true);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\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.key == KEY.SPACE) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\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 useEffect(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n {memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"}\n {minefield.map((line, y) => (\n
\n \n {line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return [?] ;\n return [ ] ;\n } else {\n if (x == pos[0] && y == pos[1]) return [X] ;\n if (answer[y][x]) return [.] ;\n return [ ] ;\n }\n })}\n \n
\n
\n ))}\n \n
\n
\n );\n}\n\nfunction fieldEquals(a: boolean[][], b: boolean[][]): boolean {\n function count(field: boolean[][]): number {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty: Difficulty): boolean[][] {\n const field = [];\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n return field;\n}\n\nfunction generateMinefield(difficulty: Difficulty): boolean[][] {\n const field = generateEmptyField(difficulty);\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 if (field[x][y]) {\n i--;\n continue;\n }\n field[x][y] = true;\n }\n return field;\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport Typography from \"@mui/material/Typography\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n wiresmin: number;\n wiresmax: number;\n rules: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 9000, wiresmin: 4, wiresmax: 4, rules: 2 },\n Normal: { timer: 7000, wiresmin: 6, wiresmax: 6, rules: 2 },\n Hard: { timer: 5000, wiresmin: 8, wiresmax: 8, rules: 3 },\n Impossible: { timer: 4000, wiresmin: 9, wiresmax: 9, rules: 4 },\n};\n\nconst types = [KEY.PIPE, KEY.DOT, KEY.FORWARD_SLASH, KEY.HYPHEN, \"█\", KEY.HASH];\n\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\n\nconst colorNames: any = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\",\n};\n\ninterface Wire {\n tpe: string;\n colors: string[];\n}\n\ninterface Question {\n toString: () => string;\n shouldCut: (wire: Wire, index: number) => boolean;\n}\n\nexport function WireCuttingGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0,\n };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = useState(generateWires(difficulty));\n const [cutWires, setCutWires] = useState(new Array(wires.length).fill(false));\n const [questions] = useState(generateQuestion(wires, difficulty));\n\n function checkWire(wireNum: number): boolean {\n return !questions.some((q) => q.shouldCut(wires[wireNum - 1], wireNum - 1));\n }\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires((old) => {\n const next = [...old];\n next[wireNum - 1] = true;\n if (checkWire(wireNum)) {\n props.onFailure();\n }\n\n // check if we won\n const wiresToBeCut = [];\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n wiresToBeCut.push(shouldBeCut);\n }\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return (\n \n \n \n Cut the wires with the following properties! (keyboard 1 to 9)\n {questions.map((question, i) => (\n {question.toString()}\n ))}\n \n {new Array(wires.length).fill(0).map((_, i) => (\n  {i + 1}    \n ))}\n \n {new Array(8).fill(0).map((_, i) => (\n
\n \n {wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j])\n return       ;\n return (\n \n |{wire.tpe}|   \n \n );\n })}\n \n
\n ))}\n \n
\n
\n );\n}\n\nfunction randomPositionQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: (): string => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire: Wire, i: number): boolean => {\n return index === i;\n },\n };\n}\n\nfunction randomColorQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: (): string => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: (wire: Wire): boolean => {\n return wire.colors.includes(cutColor);\n },\n };\n}\n\nfunction generateQuestion(wires: Wire[], difficulty: Difficulty): Question[] {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n return questions;\n}\n\nfunction generateWires(difficulty: Difficulty): Wire[] {\n const wires = [];\n const numWires = random(difficulty.wiresmin, difficulty.wiresmax);\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors,\n });\n }\n return wires;\n}\n","import { Factions } from \"../../Faction/Factions\";\nimport React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nexport function Victory(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [faction, setFaction] = useState(\"none\");\n\n function quitInfiltration(): void {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n\n const repGain =\n Math.pow(props.Reward + 1, 1.1) *\n Math.pow(props.StartingDifficulty, 1.2) *\n 30 *\n levelBonus *\n BitNodeMultipliers.InfiltrationRep;\n\n const moneyGain =\n Math.pow(props.Reward + 1, 2) *\n Math.pow(props.StartingDifficulty, 3) *\n 3e3 *\n levelBonus *\n BitNodeMultipliers.InfiltrationMoney;\n\n function sell(): void {\n player.gainMoney(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade(): void {\n if (faction === \"none\") return;\n Factions[faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value);\n }\n\n return (\n <>\n \n \n Infiltration successful!\n \n \n \n You can trade the confidential information you found for money or reputation.\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { use } from \"./Context\";\nimport { CONSTANTS } from \"../Constants\";\nimport { numeralWrapper } from \"./numeralFormat\";\nimport { Reputation } from \"./React/Reputation\";\nimport { ReputationRate } from \"./React/ReputationRate\";\nimport { MoneyRate } from \"./React/MoneyRate\";\nimport { Money } from \"./React/Money\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Company } from \"../Company/Company\";\nimport { Companies } from \"../Company/Companies\";\nimport { Locations } from \"../Locations/Locations\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\n\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\n\nconst CYCLES_PER_SEC = 1000 / CONSTANTS.MilliPerCycle;\n\nexport function WorkInProgressRoot(): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, CONSTANTS.MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n\n const player = use.Player();\n const router = use.Router();\n\n if (player.workType == CONSTANTS.WorkTypeFaction) {\n const faction = Factions[player.currentWorkFactionName];\n if (!faction) {\n return (\n <>\n \n You have not joined {player.currentWorkFactionName || \"(Faction not found)\"} yet or cannot work at this\n time, please try again if you think this should have worked\n \n \n \n );\n }\n\n function cancel(): void {\n router.toFaction(faction);\n player.finishFactionWork(true);\n }\n function unfocus(): void {\n router.toFaction(faction);\n player.stopFocusing();\n }\n return (\n \n \n \n You are currently {player.currentWorkFactionDescription} for your faction {faction.name}\n
\n (Current Faction Reputation: \n ).
\n You have been doing this for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n You have earned:
\n
\n (){\" \"}\n
\n
\n (\n ) reputation for this faction
\n
\n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec) hacking exp
\n \n )}\n
\n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec) strength exp
\n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec) defense exp
\n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec) dexterity exp
\n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec) agility exp
\n \n )}\n
\n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec) charisma exp
\n \n )}\n
\n You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\n
\n There is no penalty for cancelling earlier.\n
\n
\n \n \n \n \n
\n );\n }\n\n const className = player.className;\n if (player.className !== \"\") {\n function cancel(): void {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus(): void {\n router.toCity();\n player.stopFocusing();\n }\n\n let stopText = \"\";\n if (\n className == CONSTANTS.ClassGymStrength ||\n className == CONSTANTS.ClassGymDefense ||\n className == CONSTANTS.ClassGymDexterity ||\n className == CONSTANTS.ClassGymAgility\n ) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return (\n \n \n \n You have been {className} for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n This has cost you:
\n (){\" \"}\n
\n
\n You have gained:
\n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec) hacking exp
\n \n )}\n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec) strength exp
\n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec) defense exp
\n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec) dexterity exp
\n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec) agility exp
\n \n )}\n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec) charisma exp
\n \n )}\n You may cancel at any time\n
\n
\n \n \n \n \n
\n );\n }\n\n if (player.workType == CONSTANTS.WorkTypeCompany) {\n const comp = Companies[player.companyName];\n if (comp == null || !(comp instanceof Company)) {\n return (\n <>\n \n You cannot work for {player.companyName || \"(Company not found)\"} at this time, please try again if you\n think this should have worked\n \n \n \n );\n }\n\n const companyRep = comp.playerReputation;\n\n function cancel(): void {\n player.finishWork(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n\n const penalty = player.cancelationPenalty();\n\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return (\n \n \n \n You are currently working as a {position} at {player.companyName} (Current Company Reputation:{\" \"}\n )
\n
\n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n You have earned:
\n
\n (){\" \"}\n
\n
\n (\n ) reputation for this company
\n
\n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {`${numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) hacking exp
\n \n )}\n
\n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {`${numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) strength exp
\n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {`${numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) defense exp
\n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {`${numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) dexterity exp
\n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {`${numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) agility exp
\n \n )}\n
\n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {`${numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) charisma exp
\n \n )}\n
\n You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will\n only gain {penaltyString} of the reputation you've earned so far.\n
\n
\n \n \n \n \n
\n );\n }\n\n if (player.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n function cancel(): void {\n player.finishWorkPartTime(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n const comp = Companies[player.companyName];\n let companyRep = 0;\n if (comp == null || !(comp instanceof Company)) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n companyRep = comp.playerReputation;\n\n const position = player.jobs[player.companyName];\n return (\n \n \n \n You are currently working as a {position} at {player.companyName} (Current Company Reputation:{\" \"}\n )
\n
\n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n You have earned:
\n
\n (){\" \"}\n
\n
\n (\n \n ) reputation for this company
\n
\n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {`${numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) hacking exp
\n \n )}\n
\n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {`${numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) strength exp
\n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {`${numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) defense exp
\n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {`${numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) dexterity exp
\n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {`${numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) agility exp
\n \n )}\n
\n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {`${numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) charisma exp
\n \n )}\n
\n You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will\n be no penalty because this is a part-time job.\n
\n
\n \n \n \n \n
\n );\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round((player.timeWorked / player.timeNeededToCompleteWork) * 100);\n let numBars = Math.round(percent / 5);\n if (numBars < 0) {\n numBars = 0;\n }\n if (numBars > 20) {\n numBars = 20;\n }\n // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n const progressBar = createProgressBarText({ progress: (numBars + 1) / 20, totalTicks: 20 });\n\n return (\n \n \n \n You are attempting to {player.crimeType}.\n
\n\n \n Time remaining: {convertTimeMsToTimeElapsedString(player.timeNeededToCompleteWork - player.timeWorked)}\n \n\n
\n
{progressBar}
\n
\n
\n \n {\n router.toLocation(Locations[LocationName.Slums]);\n player.finishCrime(true);\n }}\n >\n Cancel crime\n \n \n
\n );\n }\n\n if (player.createProgramName !== \"\") {\n function cancel(): void {\n player.finishCreateProgramWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n return (\n \n \n \n You are currently working on coding {player.createProgramName}.
\n
\n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n The program is {((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}\n % complete.
\n If you cancel, your work will be saved and you can come back to complete the program later.\n
\n
\n \n \n \n \n
\n );\n }\n\n if (player.graftAugmentationName !== \"\") {\n function cancel(): void {\n player.finishGraftAugmentationWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n return (\n \n \n \n You are currently working on crafting {player.graftAugmentationName}.\n
\n
\n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
\n
\n The augmentation is{\" \"}\n {((player.timeWorkedGraftAugmentation / player.timeNeededToCompleteWork) * 100).toFixed(2)}% done being\n crafted.\n
\n If you cancel, your work will not be saved, and the money you spent will not be returned.\n
\n
\n \n \n \n \n
\n );\n }\n\n if (!player.workType) router.toTerminal();\n\n return <>;\n}\n","import React, { useState, useRef } from \"react\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Typography from \"@mui/material/Typography\";\nimport Slider from \"@mui/material/Slider\";\nimport Grid from \"@mui/material/Grid\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\nimport Box from \"@mui/material/Box\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Link from \"@mui/material/Link\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport TextField from \"@mui/material/TextField\";\n\nimport DownloadIcon from \"@mui/icons-material/Download\";\nimport UploadIcon from \"@mui/icons-material/Upload\";\nimport SaveIcon from \"@mui/icons-material/Save\";\nimport PaletteIcon from '@mui/icons-material/Palette';\n\nimport { FileDiagnosticModal } from \"../../Diagnostic/FileDiagnosticModal\";\nimport { ConfirmationModal } from \"./ConfirmationModal\";\n\nimport { SnackbarEvents } from \"./Snackbar\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { DeleteGameButton } from \"./DeleteGameButton\";\nimport { SoftResetButton } from \"./SoftResetButton\";\nimport { IRouter } from \"../Router\";\nimport { ThemeEditorButton } from \"../../Themes/ui/ThemeEditorButton\";\nimport { StyleEditorButton } from \"../../Themes/ui/StyleEditorButton\";\nimport { formatTime } from \"../../utils/helpers/formatTime\";\nimport { OptionSwitch } from \"./OptionSwitch\";\nimport { ImportData, saveObject } from \"../../SaveObject\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\",\n },\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n save: () => void;\n export: () => void;\n forceKill: () => void;\n softReset: () => void;\n}\n\nexport function GameOptionsRoot(props: IProps): React.ReactElement {\n const classes = useStyles();\n const importInput = useRef(null);\n\n const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime);\n const [logSize, setLogSize] = useState(Settings.MaxLogCapacity);\n const [portSize, setPortSize] = useState(Settings.MaxPortCapacity);\n const [terminalSize, setTerminalSize] = useState(Settings.MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval);\n const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat);\n const [locale, setLocale] = useState(Settings.Locale);\n const [diagnosticOpen, setDiagnosticOpen] = useState(false);\n const [importSaveOpen, setImportSaveOpen] = useState(false);\n const [importData, setImportData] = useState(null);\n\n function handleExecTimeChange(event: any, newValue: number | number[]): void {\n setExecTime(newValue as number);\n Settings.CodeInstructionRunTime = newValue as number;\n }\n\n function handleLogSizeChange(event: any, newValue: number | number[]): void {\n setLogSize(newValue as number);\n Settings.MaxLogCapacity = newValue as number;\n }\n\n function handlePortSizeChange(event: any, newValue: number | number[]): void {\n setPortSize(newValue as number);\n Settings.MaxPortCapacity = newValue as number;\n }\n\n function handleTerminalSizeChange(event: any, newValue: number | number[]): void {\n setTerminalSize(newValue as number);\n Settings.MaxTerminalCapacity = newValue as number;\n }\n\n function handleAutosaveIntervalChange(event: any, newValue: number | number[]): void {\n setAutosaveInterval(newValue as number);\n Settings.AutosaveInterval = newValue as number;\n }\n\n function handleLocaleChange(event: SelectChangeEvent): void {\n setLocale(event.target.value as string);\n Settings.Locale = event.target.value as string;\n }\n\n function handleTimestampFormatChange(event: React.ChangeEvent): void {\n setTimestampFormat(event.target.value);\n Settings.TimestampsFormat = event.target.value;\n }\n\n function startImport(): void {\n if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;\n const ii = importInput.current;\n if (ii === null) throw new Error(\"import input should not be null\");\n ii.click();\n }\n\n async function onImport(event: React.ChangeEvent): Promise {\n try {\n const base64Save = await saveObject.getImportStringFromFile(event.target.files);\n const data = await saveObject.getImportDataFromString(base64Save);\n setImportData(data);\n setImportSaveOpen(true);\n } catch (ex: any) {\n SnackbarEvents.emit(ex.toString(), \"error\", 5000);\n }\n }\n\n async function confirmedImportGame(): Promise {\n if (!importData) return;\n\n try {\n await saveObject.importGame(importData.base64);\n } catch (ex: any) {\n SnackbarEvents.emit(ex.toString(), \"error\", 5000);\n }\n\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n function compareSaveGame(): void {\n if (!importData) return;\n props.router.toImportSave(importData.base64);\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n return (\n
\n \n Options\n \n\n \n \n \n \n \n \n The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too\n low can result in poor performance if you have many scripts running.\n \n }\n >\n .script exec time (ms)\n \n \n \n The maximum number of lines a script's logs can hold. Setting this too high can cause the game to\n use a lot of memory if you have many scripts running.\n \n }\n >\n Netscript log size\n \n \n \n The maximum number of entries that can be written to a port using Netscript's write() function.\n Setting this too high can cause the game to use a lot of memory.\n \n }\n >\n Netscript port size\n \n \n \n The maximum number of entries that can be written to the terminal. Setting this too high can cause\n the game to use a lot of memory.\n \n }\n >\n Terminal capacity\n \n \n The time (in seconds) between each autosave. Set to 0 to disable autosave.\n }\n >\n Autosave interval (s)\n \n \n \n \n \n (Settings.SuppressMessages = newValue)}\n text=\"Suppress story messages\"\n tooltip={\n <>\n If this is set, then any messages you receive will not appear as popups on the screen. They will\n still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal\n command.\n \n }\n />\n \n \n (Settings.SuppressFactionInvites = newValue)}\n text=\"Suppress faction invites\"\n tooltip={\n <>\n If this is set, then any faction invites you receive will not appear as popups on the screen. Your\n outstanding faction invites can be viewed in the 'Factions' page.\n \n }\n />\n \n \n (Settings.SuppressTravelConfirmation = newValue)}\n text=\"Suppress travel confirmations\"\n tooltip={\n <>\n If this is set, the confirmation message before traveling will not show up. You will automatically\n be deducted the travel cost as soon as you click.\n \n }\n />\n \n \n (Settings.SuppressBuyAugmentationConfirmation = newValue)}\n text=\"Suppress augmentations confirmation\"\n tooltip={<>If this is set, the confirmation message before buying augmentation will not show up.}\n />\n \n \n (Settings.SuppressTIXPopup = newValue)}\n text=\"Suppress TIX messages\"\n tooltip={<>If this is set, the stock market will never create any popup.}\n />\n \n {!!props.player.bladeburner && (\n \n (Settings.SuppressBladeburnerPopup = newValue)}\n text=\"Suppress bladeburner popup\"\n tooltip={\n <>\n If this is set, then having your Bladeburner actions interrupted by being busy with something else\n will not display a popup message.\n \n }\n />\n \n )}\n \n (Settings.SuppressSavedGameToast = newValue)}\n text=\"Suppress Auto-Save Game Toast\"\n tooltip={<>If this is set, there will be no \"Game Saved!\" toast appearing after an auto-save.}\n />\n \n \n (Settings.SuppressAutosaveDisabledWarnings = newValue)}\n text=\"Suppress Auto-Save Disabled Warning\"\n tooltip={<>If this is set, there will be no warning triggered when auto-save is disabled (at 0).}\n />\n \n \n (Settings.DisableHotkeys = newValue)}\n text=\"Disable hotkeys\"\n tooltip={\n <>\n If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes\n Terminal commands, hotkeys to navigate between different parts of the game, and the \"Save and Close\n (Ctrl + b)\" hotkey in the Text Editor.\n \n }\n />\n \n \n (Settings.DisableASCIIArt = newValue)}\n text=\"Disable ascii art\"\n tooltip={<>If this is set all ASCII art will be disabled.}\n />\n \n \n (Settings.DisableTextEffects = newValue)}\n text=\"Disable text effects\"\n tooltip={\n <>\n If this is set, text effects will not be displayed. This can help if text is difficult to read in\n certain areas.\n \n }\n />\n \n \n (Settings.DisableOverviewProgressBars = newValue)}\n text=\"Disable Overview Progress Bars\"\n tooltip={<>If this is set, the progress bars in the character overview will be hidden.}\n />\n \n \n (Settings.EnableBashHotkeys = newValue)}\n text=\"Enable bash hotkeys\"\n tooltip={\n <>\n Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features\n that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default\n browser shortcuts are overriden by the new Bash shortcuts.\n \n }\n />\n \n \n (Settings.UseIEC60027_2 = newValue)}\n text=\"Use GiB instead of GB\"\n tooltip={\n <>\n If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2.\n \n }\n />\n \n \n (Settings.ExcludeRunningScriptsFromSave = newValue)}\n text=\"Exclude Running Scripts from Save\"\n tooltip={\n <>\n If this is set, the save file will exclude all running scripts. This is only useful if your save is\n lagging a lot. You'll have to restart your script every time you launch the game.\n \n }\n />\n \n \n \n Terminal commands and log entries will be timestamped. See\n https://date-fns.org/docs/Getting-Started/\n \n }\n >\n \n \n Timestamp format: \n \n ),\n }}\n value={timestampFormat}\n onChange={handleTimestampFormatChange}\n placeholder=\"yyyy-MM-dd hh:mm:ss\"\n />\n \n \n \n\n \n (Settings.SaveGameOnFileSave = newValue)}\n text=\"Save game on file save\"\n tooltip={<>Save your game any time a file is saved in the script editor.}\n />\n \n\n \n Sets the locale for displaying numbers.}>\n Locale \n \n \n \n \n {!location.href.startsWith(\"file://\") && (\n <>\n \n danielyxie / BigD (Original developer): \n
\n \n \n \n \n
\n\n \n \n hydroflame (Current maintainer):{\" \"}\n \n Donate blood!\n {\" \"}\n \n \n \n )}\n
\n \n \n \n \n \n \n Export your game to a text file.}>\n \n \n \n Import your game from a text file.\n
\n This will overwrite your current game. Back it up first!\n \n }\n >\n \n \n setImportSaveOpen(false)}\n onConfirm={() => confirmedImportGame()}\n additionalButton={}\n confirmationText={\n <>\n Importing a new game will completely wipe the current data!\n
\n
\n Make sure to have a backup of your current save file before importing.\n
\n The file you are attempting to import seems valid.\n {(importData?.playerData?.lastSave ?? 0) > 0 && (\n <>\n
\n
\n The export date of the save file is{\" \"}\n {new Date(importData?.playerData?.lastSave ?? 0).toLocaleString()}\n \n )}\n {(importData?.playerData?.totalPlaytime ?? 0) > 0 && (\n <>\n
\n
\n Total play time of imported game:{\" \"}\n {convertTimeMsToTimeElapsedString(importData?.playerData?.totalPlaytime ?? 0)}\n \n )}\n
\n
\n \n }\n />\n
\n \n \n Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the\n game. After using this, save the game and then reload the page. This is different then normal kill in\n that normal kill will tell the script to shut down while force kill just removes the references to it\n (and it should crash on it's own). This will not remove the files on your computer. Just forcefully\n kill all running instance of all scripts.\n \n }\n >\n \n \n \n \n \n \n If your save file is extremely big you can use this button to view a map of all the files on every\n server. Be careful there might be spoilers.\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n \n \n Report bug\n \n \n Changelog\n \n \n Documentation\n \n \n Discord\n \n \n Reddit\n \n \n Incremental game plaza\n \n \n
\n
\n setDiagnosticOpen(false)} />\n
\n );\n}\n","import React from \"react\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\nimport { Modal } from \"../ui/React/Modal\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\ninterface IServerProps {\n hostname: string;\n}\n\nfunction ServerAccordion(props: IServerProps): React.ReactElement {\n const server = GetServer(props.hostname);\n if (server === null) throw new Error(`server '${props.hostname}' should not be null`);\n let totalSize = 0;\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 <>;\n }\n\n interface File {\n name: string;\n size: number;\n }\n\n const files: File[] = [];\n\n for (const f of server.scripts) {\n files.push({ name: f.filename, size: f.code.length });\n }\n\n for (const f of server.textFiles) {\n files.push({ name: f.fn, size: f.text.length });\n }\n\n files.sort((a: File, b: File): number => b.size - a.size);\n\n return (\n \n }>\n \n {server.hostname} ({numeralWrapper.formatBigNumber(totalSize)}b)\n \n \n \n \n \n \n \n \n Filename\n \n \n Size\n \n \n \n \n {files.map((file: File) => (\n \n \n {file.name}\n \n \n {numeralWrapper.formatBigNumber(file.size)}b\n \n \n ))}\n \n
\n
\n
    \n
    \n
    \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FileDiagnosticModal(props: IProps): React.ReactElement {\n const keys: string[] = [];\n for (const key of GetAllServers()) {\n keys.push(key.hostname);\n }\n\n return (\n \n <>\n \n Welcome to the file diagnostic! If your save file is really big it's likely because you have too many\n text/scripts. This tool can help you narrow down where they are.\n \n {keys.map((hostname: string) => (\n \n ))}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport PaletteSharpIcon from \"@mui/icons-material/PaletteSharp\";\nimport HistoryIcon from '@mui/icons-material/History';\nimport { Color, ColorPicker } from \"material-ui-color\";\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings, defaultSettings } from \"../../Settings/Settings\";\nimport { defaultTheme } from \"../Themes\";\nimport { UserInterfaceTheme } from \"../../ScriptEditor/NetscriptDefinitions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ThemeCollaborate } from \"./ThemeCollaborate\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n router: IRouter;\n}\n\ninterface IColorEditorProps {\n name: string;\n color: string | undefined;\n onColorChange: (name: string, value: string) => void;\n defaultColor: string;\n}\n\nfunction ColorEditor({ name, onColorChange, color, defaultColor }: IColorEditorProps): React.ReactElement {\n if (color === undefined) {\n console.error(`color ${name} was undefined, reverting to default`);\n color = defaultColor;\n }\n\n return (\n <>\n \n onColorChange(name, \"#\" + newColor.hex)}\n disableAlpha\n />\n \n ),\n endAdornment: (\n <>\n onColorChange(name, defaultColor)}>\n \n \n \n ),\n }}\n />\n \n );\n}\n\nexport function ThemeEditorModal(props: IProps): React.ReactElement {\n const [customTheme, setCustomTheme] = useState<{ [key: string]: string | undefined }>({\n ...Settings.theme,\n });\n\n function setTheme(theme: UserInterfaceTheme): void {\n setCustomTheme(theme);\n Object.assign(Settings.theme, theme);\n ThemeEvents.emit();\n }\n\n function onThemeChange(event: React.ChangeEvent): void {\n try {\n const importedTheme = JSON.parse(event.target.value);\n if (typeof importedTheme !== \"object\") return;\n setCustomTheme(importedTheme);\n for (const key of Object.keys(importedTheme)) {\n Settings.theme[key] = importedTheme[key];\n }\n ThemeEvents.emit();\n } catch (err) {\n // ignore\n }\n }\n\n function onColorChange(name: string, value: string): void {\n setCustomTheme((old: any) => {\n old[name] = value;\n return old;\n });\n\n Settings.theme[name] = value;\n ThemeEvents.emit();\n }\n\n function setTemplateTheme(theme: UserInterfaceTheme): void {\n setTheme(theme);\n }\n\n return (\n \n \n Example tooltip}>\n \n \n \n \n \n \n \n\n
    \n text with primary color \n text with secondary color \n text with error color\n\n
    \n \n
    \n\n \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n\n
    \n \n \n \n \n \n \n \n\n
    \n \n \n \n \n \n \n \n \n
    \n\n \n \n <>\n Backup your theme or share it with others by copying the string above.\n \n \n \n \n \n \n \n \n \n \n \n
    \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport SaveIcon from \"@mui/icons-material/Save\";\n\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { defaultStyles } from \"../Styles\";\nimport { Tooltip } from \"@mui/material\";\nimport { IStyleSettings } from \"../../ScriptEditor/NetscriptDefinitions\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\ninterface FontFamilyProps {\n value: React.CSSProperties[\"fontFamily\"];\n onChange: (newValue: React.CSSProperties[\"fontFamily\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction FontFamilyField({ value, onChange, refreshId }: FontFamilyProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [fontFamily, setFontFamily] = useState(value);\n\n function update(newValue: React.CSSProperties[\"fontFamily\"]): void {\n setFontFamily(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(fontFamily, errorText), [fontFamily]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\ninterface LineHeightProps {\n value: React.CSSProperties[\"lineHeight\"];\n onChange: (newValue: React.CSSProperties[\"lineHeight\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction LineHeightField({ value, onChange, refreshId }: LineHeightProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [lineHeight, setLineHeight] = useState(value);\n\n function update(newValue: React.CSSProperties[\"lineHeight\"]): void {\n setLineHeight(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else if (isNaN(Number(newValue))) {\n setErrorText(\"Must be a number\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(lineHeight, errorText), [lineHeight]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\nexport function StyleEditorModal(props: IProps): React.ReactElement {\n const [refreshId, setRefreshId] = useState(0);\n const [error, setError] = useState();\n const [customStyle, setCustomStyle] = useState({\n ...Settings.styles,\n });\n\n function persistToSettings(styles: IStyleSettings): void {\n Object.assign(Settings.styles, styles);\n ThemeEvents.emit();\n }\n\n function saveStyles(): void {\n persistToSettings(customStyle);\n }\n\n function setDefaults(): void {\n const styles = { ...defaultStyles };\n setCustomStyle(styles);\n persistToSettings(styles);\n setRefreshId(refreshId + 1);\n }\n\n function update(styles: IStyleSettings, errorMessage?: string): void {\n setError(errorMessage);\n if (!errorMessage) {\n setCustomStyle(styles);\n }\n }\n\n return (\n \n Styles Editor\n \n WARNING: Changing styles may mess up the interface. Drastic changes are{\" \"}\n NOT recommended.\n \n \n update({ ...customStyle, fontFamily: value as any }, error)}\n />\n
    \n update({ ...customStyle, lineHeight: value as any }, error)}\n />\n
    \n \n \n \n \n \n \n
    \n
    \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport {\n Box,\n Typography,\n Button,\n Container\n} from \"@mui/material\";\n\nimport { use } from \"../../../ui/Context\";\n\nimport { SleeveElem } from \"./SleeveElem\";\nimport { FAQModal } from \"./FAQModal\";\n\nexport function SleeveRoot(): React.ReactElement {\n const player = use.Player();\n const [FAQOpen, setFAQOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n <>\n \n Sleeves\n \n Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In\n other words, these Synthoids contain a perfect duplicate of your mind.\n
    \n
    \n Sleeves can be used to perform different tasks synchronously.\n
    \n
    \n
    \n\n
    \n\n \n \n \n {player.sleeves.map((sleeve, i) => (\n \n ))}\n \n setFAQOpen(false)} />\n \n );\n}\n","import React, { useState } from \"react\";\n\nimport {\n Box,\n Paper,\n Typography,\n Button,\n Tooltip\n} from \"@mui/material\";\n\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { createProgressBarText } from \"../../../utils/helpers/createProgressBarText\";\nimport { use } from \"../../../ui/Context\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\n\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\n\nimport { SleeveAugmentationsModal } from \"./SleeveAugmentationsModal\";\nimport { TravelModal } from \"./TravelModal\";\nimport { StatsElement, EarningsElement } from \"./StatsElement\";\nimport { MoreStatsModal } from \"./MoreStatsModal\";\nimport { MoreEarningsModal } from \"./MoreEarningsModal\";\nimport { TaskSelector } from \"./TaskSelector\";\n\ninterface IProps {\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function SleeveElem(props: IProps): React.ReactElement {\n const player = use.Player();\n const [statsOpen, setStatsOpen] = useState(false);\n const [earningsOpen, setEarningsOpen] = useState(false);\n const [travelOpen, setTravelOpen] = useState(false);\n const [augmentationsOpen, setAugmentationsOpen] = useState(false);\n\n const [abc, setABC] = useState([\"------\", \"------\", \"------\"]);\n\n function setTask(): void {\n props.sleeve.resetTaskStatus(); // sets to idle\n switch (abc[0]) {\n case \"------\":\n break;\n case \"Work for Company\":\n props.sleeve.workForCompany(player, abc[1]);\n break;\n case \"Work for Faction\":\n props.sleeve.workForFaction(player, abc[1], abc[2]);\n break;\n case \"Commit Crime\":\n props.sleeve.commitCrime(player, abc[1]);\n break;\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(player, abc[2], abc[1]);\n break;\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(player, abc[2], abc[1]);\n break;\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(player);\n break;\n case \"Synchronize\":\n props.sleeve.synchronize(player);\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n props.rerender();\n }\n\n let desc = <>;\n switch (props.sleeve.currentTask) {\n case SleeveTaskType.Idle:\n desc = <>This sleeve is currently idle;\n break;\n case SleeveTaskType.Company:\n desc = <>This sleeve is currently working your job at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Faction: {\n let doing = \"nothing\";\n switch (props.sleeve.factionWorkType) {\n case FactionWorkType.Field:\n doing = \"Field work\";\n break;\n case FactionWorkType.Hacking:\n doing = \"Hacking contracts\";\n break;\n case FactionWorkType.Security:\n doing = \"Security work\";\n break;\n }\n desc = (\n <>\n This sleeve is currently doing {doing} for {props.sleeve.currentTaskLocation}.\n \n );\n break;\n }\n case SleeveTaskType.Crime: {\n const crime = Object.values(Crimes).find((crime) => crime.name === props.sleeve.crimeType);\n if (!crime) throw new Error(\"crime should not be undefined\");\n desc = (\n <>\n This sleeve is currently attempting to {crime.type} (Success Rate:{\" \"}\n {numeralWrapper.formatPercentage(crime.successRate(props.sleeve))}).\n \n );\n break;\n }\n case SleeveTaskType.Class:\n desc = <>This sleeve is currently studying/taking a course at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Gym:\n desc = <>This sleeve is currently working out at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Recovery:\n desc = (\n <>\n This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a\n faster rate.\n \n );\n break;\n case SleeveTaskType.Synchro:\n desc = (\n <>\n This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's\n synchronization to increase.\n \n );\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n return (\n \n \n \n \n \n \n \n \n Insufficient funds : \"\"}>\n \n setTravelOpen(true)}\n disabled={player.money < CONSTANTS.TravelCost}\n sx={{ width: '100%', height: '100%' }}\n >\n Travel\n \n \n \n Unlocked when sleeve has fully recovered : \"\"}\n >\n \n setAugmentationsOpen(true)}\n disabled={props.sleeve.shock < 100}\n sx={{ width: '100%', height: '100%' }}\n >\n Manage Augmentations\n \n \n \n \n \n \n \n \n \n \n {desc}\n \n {props.sleeve.currentTask === SleeveTaskType.Crime &&\n createProgressBarText({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25,\n })}\n \n \n \n setStatsOpen(false)} sleeve={props.sleeve} />\n setEarningsOpen(false)} sleeve={props.sleeve} />\n setTravelOpen(false)}\n sleeve={props.sleeve}\n rerender={props.rerender}\n />\n setAugmentationsOpen(false)}\n sleeve={props.sleeve}\n />\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { findSleevePurchasableAugs } from \"../SleeveHelpers\";\nimport { Augmentations } from \"../../../Augmentation/Augmentations\";\nimport { Augmentation } from \"../../../Augmentation/Augmentation\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport { TableCell } from \"../../../ui/React/Table\";\nimport TableRow from \"@mui/material/TableRow\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function SleeveAugmentationsModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n\n // Array of all owned Augmentations. Names only\n const ownedAugNames = props.sleeve.augmentations.map((e) => e.name);\n\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 availableAugs = findSleevePurchasableAugs(props.sleeve, player);\n\n function purchaseAugmentation(aug: Augmentation): void {\n props.sleeve.tryBuyAugmentation(player, aug);\n rerender();\n }\n\n return (\n \n <>\n \n \n You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they\n would for you. You can only purchase Augmentations that you have unlocked through Factions.\n
    \n
    \n When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the\n Duplicate Sleeve will immediately lose all of its stat experience.\n
    \n \n \n \n {availableAugs.map((aug) => {\n return (\n \n \n \n \n \n \n \n {aug.name}\n \n \n \n \n \n \n \n );\n })}\n \n
    \n
    \n
    \n\n {ownedAugNames.length > 0 && (\n <>\n Owned Augmentations:\n \n {ownedAugNames.map((augName) => {\n const aug = Augmentations[augName];\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info\n const tooltip = (<>{info}

    {aug.stats});\n\n return (\n {tooltip}}>\n \n {augName}\n \n \n );\n })}\n
    \n \n )}\n \n
    \n );\n}\n","import React from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { WorldMap } from \"../../../ui/React/WorldMap\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { use } from \"../../../ui/Context\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function travel(city: string): void {\n if (!player.canAfford(CONSTANTS.TravelCost)) {\n dialogBoxCreate(\"You cannot afford to have this sleeve travel to another city\");\n }\n props.sleeve.city = city as CityName;\n player.loseMoney(CONSTANTS.TravelCost, \"sleeve\");\n props.sleeve.resetTaskStatus();\n props.rerender();\n props.onClose();\n }\n\n return (\n \n <>\n \n Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can\n study. Traveling to a different city costs . It will\n also set your current sleeve task to idle.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../../utils/StringHelperFunctions\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Typography } from \"@mui/material\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport React from \"react\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreStatsModal(props: IProps): React.ReactElement {\n return (\n \n Hacking: ,\n props.sleeve.hacking,\n <> ({numeralWrapper.formatExp(props.sleeve.hacking_exp)} exp),\n ],\n [\n <>Strength: ,\n props.sleeve.strength,\n <> ({numeralWrapper.formatExp(props.sleeve.strength_exp)} exp),\n ],\n [\n <>Defense: ,\n props.sleeve.defense,\n <> ({numeralWrapper.formatExp(props.sleeve.defense_exp)} exp),\n ],\n [\n <>Dexterity: ,\n props.sleeve.dexterity,\n <> ({numeralWrapper.formatExp(props.sleeve.dexterity_exp)} exp),\n ],\n [\n <>Agility: ,\n props.sleeve.agility,\n <> ({numeralWrapper.formatExp(props.sleeve.agility_exp)} exp),\n ],\n [\n <>Charisma: ,\n props.sleeve.charisma,\n <> ({numeralWrapper.formatExp(props.sleeve.charisma_exp)} exp),\n ],\n ]}\n title=\"Stats:\"\n />\n
    \n Hacking Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_mult)],\n [<>Hacking Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_exp_mult)],\n [<>Strength Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_mult)],\n [<>Strength Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_exp_mult)],\n [<>Defense Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_mult)],\n [<>Defense Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_exp_mult)],\n [<>Dexterity Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.dexterity_mult)],\n [\n <>Dexterity Experience multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.dexterity_exp_mult),\n ],\n [<>Agility Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_mult)],\n [<>Agility Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_exp_mult)],\n [<>Charisma Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_mult)],\n [<>Charisma Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_exp_mult)],\n [\n <>Faction Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.faction_rep_mult),\n ],\n [\n <>Company Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.company_rep_mult),\n ],\n [<>Salary multiplier: , numeralWrapper.formatPercentage(props.sleeve.work_money_mult)],\n [<>Crime Money multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_money_mult)],\n [<>Crime Success multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_success_mult)],\n ]}\n title=\"Multipliers:\"\n />\n\n {/* Check for storedCycles to be a bit over 0 to prevent jittering */}\n {props.sleeve.storedCycles > 10 && (\n \n Bonus Time: {convertTimeMsToTimeElapsedString(props.sleeve.storedCycles * CONSTANTS.MilliPerCycle)}\n \n )}\n
    \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Money } from \"../../../ui/React/Money\";\nimport * as React from \"react\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreEarningsModal(props: IProps): React.ReactElement {\n return (\n \n ],\n [\"Hacking Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.hack)],\n [\"Strength Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.str)],\n [\"Defense Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.def)],\n [\"Dexterity Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.dex)],\n [\"Agility Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.agi)],\n [\"Charisma Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.cha)],\n ]}\n title=\"Earnings for Current Task:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.cha)],\n ]}\n title=\"Total Earnings for Host Consciousness:\"\n />\n
    \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.cha)],\n ]}\n title=\"Total Earnings for Other Sleeves:\"\n />\n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Factions } from \"../../../Faction/Factions\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\n\nconst universitySelectorOptions: string[] = [\n \"Study Computer Science\",\n \"Data Structures\",\n \"Networks\",\n \"Algorithms\",\n \"Management\",\n \"Leadership\",\n];\n\nconst gymSelectorOptions: string[] = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\ninterface IProps {\n sleeve: Sleeve;\n player: IPlayer;\n setABC: (abc: string[]) => void;\n}\n\ninterface ITaskDetails {\n first: string[];\n second: (s1: string) => string[];\n}\n\nfunction possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n const allJobs: string[] = Object.keys(player.jobs);\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: IPlayer, sleeve: Sleeve): string[] {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [FactionNames.Bladeburners as string];\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions.filter(faction => {\n const facInfo = Factions[faction].getInfo();\n return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork\n });\n}\n\nconst tasks: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => ITaskDetails);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n} = {\n \"------\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let jobs = possibleJobs(player, sleeve);\n\n if (jobs.length === 0) jobs = [\"------\"];\n return { first: jobs, second: () => [\"------\"] };\n },\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n\n return {\n first: factions,\n second: (s1: string) => {\n const faction = Factions[s1];\n const facInfo = faction.getInfo();\n const options: string[] = [];\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n return options;\n },\n };\n },\n \"Commit Crime\": (): ITaskDetails => {\n return { first: Object.values(Crimes).map((crime) => crime.name), second: () => [\"------\"] };\n },\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let universities: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n universities = [LocationName.AevumSummitUniversity];\n break;\n case CityName.Sector12:\n universities = [LocationName.Sector12RothmanUniversity];\n break;\n case CityName.Volhaven:\n universities = [LocationName.VolhavenZBInstituteOfTechnology];\n break;\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return { first: universitySelectorOptions, second: () => universities };\n },\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let gyms: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n gyms = [LocationName.AevumCrushFitnessGym, LocationName.AevumSnapFitnessGym];\n break;\n case CityName.Sector12:\n gyms = [LocationName.Sector12IronGym, LocationName.Sector12PowerhouseGym];\n break;\n case CityName.Volhaven:\n gyms = [LocationName.VolhavenMilleniumFitnessGym];\n break;\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return { first: gymSelectorOptions, second: () => gyms };\n },\n \"Shock Recovery\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n Synchronize: (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n};\n\nconst canDo: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => boolean);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n} = {\n \"------\": () => true,\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,\n Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,\n};\n\nfunction getABC(sleeve: Sleeve): [string, string, string] {\n switch (sleeve.currentTask) {\n case SleeveTaskType.Idle:\n return [\"------\", \"------\", \"------\"];\n case SleeveTaskType.Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n case SleeveTaskType.Faction: {\n let workType = \"\";\n switch (sleeve.factionWorkType) {\n case FactionWorkType.Hacking:\n workType = \"Hacking Contracts\";\n break;\n case FactionWorkType.Field:\n workType = \"Field Work\";\n break;\n case FactionWorkType.Security:\n workType = \"Security Work\";\n break;\n }\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n case SleeveTaskType.Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n case SleeveTaskType.Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n case SleeveTaskType.Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n case SleeveTaskType.Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n case SleeveTaskType.Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = useState(abc[0]);\n const [s1, setS1] = useState(abc[1]);\n const [s2, setS2] = useState(abc[2]);\n\n const validActions = Object.keys(canDo).filter((k) =>\n (canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),\n );\n\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 if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event: SelectChangeEvent): void {\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: SelectChangeEvent): void {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event: SelectChangeEvent): void {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return (\n <>\n \n {!(details.first.length === 1 && details.first[0] === \"------\") && (\n <>\n \n \n )}\n {!(details2.length === 1 && details2[0] === \"------\") && (\n <>\n \n \n )}\n \n );\n}\n","import React from \"react\";\n\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FAQModal({ open, onClose }: IProps): React.ReactElement {\n return (\n \n <>\n How do Duplicate Sleeves work?\n
    \n \n Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working\n for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience,\n and reputation.\n \n
    \n
    \n \n Sleeves are their own individuals, which means they each have their own experience and stats.\n \n
    \n
    \n \n When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well\n as all of the player's other sleeves.\n \n
    \n
    \n What is Synchronization (Sync)?\n
    \n \n Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a\n numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing\n a task.\n \n
    \n
    \n \n Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve\n and the player's original host consciousness earn N% of the amount of experience normally earned by the task.\n All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.\n \n
    \n
    \n Synchronization can be increased by assigning sleeves to the 'Synchronize' task.\n
    \n
    \n What is Shock?\n
    \n \n Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a\n numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the\n amount of experience earned by the sleeve.\n \n
    \n
    \n \n Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning\n sleeves to the 'Shock Recovery' task.\n \n
    \n
    \n Why can't I work for this company or faction?\n
    \n \n Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two\n sleeves they can work for two different companies, but they cannot both work for the same company.\n \n
    \n
    \n Why did my Sleeve stop working?\n
    \n \n Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a\n company after 8 hours, and stop working for a faction after 20 hours.\n \n
    \n
    \n How do I buy Augmentations for my Sleeves?\n
    \n Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.\n
    \n
    \n Why can't I buy the X Augmentation for my sleeve?\n
    \n \n Certain Augmentations, like {FactionNames.Bladeburners}-specific ones and NeuroFlux Governor, are not available for sleeves.\n \n
    \n
    \n Do sleeves get reset when installing Augmentations or switching BitNodes?\n
    \n Sleeves are reset when switching BitNodes, but not when installing Augmentations.\n
    \n
    \n What is Memory?\n
    \n \n Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For\n example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be\n set to 25, rather than 1.\n \n
    \n
    \n \n Memory can only be increased by purchasing upgrades from {FactionNames.TheCovenant}. It is a persistent stat, meaning it\n never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.\n \n \n
    \n );\n}\n","/**\n * Root React Component for the Hacknet Node UI\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { GeneralInfo } from \"./GeneralInfo\";\nimport { HacknetNodeElem } from \"./HacknetNodeElem\";\nimport { HacknetServerElem } from \"./HacknetServerElem\";\nimport { HacknetNode } from \"../HacknetNode\";\nimport { HacknetServer } from \"../HacknetServer\";\nimport { HashUpgradeModal } from \"./HashUpgradeModal\";\nimport { MultiplierButtons } from \"./MultiplierButtons\";\nimport { PlayerInfo } from \"./PlayerInfo\";\nimport { PurchaseButton } from \"./PurchaseButton\";\nimport { PurchaseMultipliers } from \"../data/Constants\";\n\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function HacknetRoot(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [purchaseMultiplier, setPurchaseMultiplier] = useState(PurchaseMultipliers.x1);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n let totalProduction = 0;\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\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 totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick(): void {\n purchaseHacknet(props.player);\n rerender();\n }\n\n // Cost to purchase a new Hacknet Node\n let purchaseCost;\n if (hasHacknetServers(props.player)) {\n purchaseCost = getCostOfNextHacknetServer(props.player);\n } else {\n purchaseCost = getCostOfNextHacknetNode(props.player);\n }\n\n // onClick event handlers for purchase multiplier buttons\n const purchaseMultiplierOnClicks = [\n () => setPurchaseMultiplier(PurchaseMultipliers.x1),\n () => setPurchaseMultiplier(PurchaseMultipliers.x5),\n () => setPurchaseMultiplier(PurchaseMultipliers.x10),\n () => setPurchaseMultiplier(PurchaseMultipliers.MAX),\n ];\n\n // HacknetNode components\n const nodes = props.player.hacknetNodes.map((node: string | HacknetNode) => {\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n return (\n \n );\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n return (\n \n );\n }\n });\n\n return (\n <>\n Hacknet {hasHacknetServers(props.player) ? \"Servers\" : \"Nodes\"}\n \n\n \n\n
    \n\n \n \n \n \n \n \n \n \n\n {hasHacknetServers(props.player) && }\n\n {nodes}\n setOpen(false)} />\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI\n *\n * Displays general information about Hacknet Nodes\n */\nimport React from \"react\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n hasHacknetServers: boolean;\n}\n\nexport function GeneralInfo(props: IProps): React.ReactElement {\n return (\n <>\n \n The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to\n anonymously share computing power and perform distributed cyberattacks without the fear of being traced.\n \n {!props.hasHacknetServers ? (\n <>\n \n {`Here, you can purchase a Hacknet Node, a specialized machine that can connect ` +\n `and contribute its resources to the Hacknet network. This allows you to take ` +\n `a small percentage of profits from hacks performed on the network. Essentially, ` +\n `you are renting out your Node's computing power.`}\n \n \n {`Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node ` +\n `can be upgraded in order to increase its computing power and thereby increase ` +\n `the profit you earn from it.`}\n \n \n ) : (\n <>\n \n {`Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. ` +\n `Hacknet Servers will perform computations and operations on the network, earning ` +\n `you hashes. Hashes can be spent on a variety of different upgrades.`}\n \n \n {`Hacknet Servers can also be used as servers to run scripts. However, running scripts ` +\n `on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash ` +\n `rate will be reduced by the percentage of RAM that is being used by that Server to run ` +\n `scripts.`}\n \n \n )}\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetNodeConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetNode } from \"../HacknetNode\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateMoneyGainRate } from \"../formulas/HacknetNodes\";\n\ninterface IProps {\n node: HacknetNode;\n purchaseMultiplier: number | \"MAX\";\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetNodeElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetNodeConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level + multiplier, node.ram, node.cores, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel)\n : purchaseMult;\n purchaseLevelUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRAMButton;\n if (node.ram >= HacknetNodeConstants.MaxRam) {\n upgradeRAMButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetNodeConstants.MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(\n node.level,\n node.ram * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - node.moneyGainRatePerSecond;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRAMButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeRamOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\" ? getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam) : purchaseMult;\n purchaseRamUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n function upgradeCoresOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores)\n : purchaseMult;\n purchaseCoreUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n let upgradeCoresButton;\n if (node.cores >= HacknetNodeConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level, node.ram, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n return (\n \n \n \n \n \n {node.name}\n \n \n \n \n Production:\n \n \n \n (\n )\n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.ram)}\n \n {upgradeRAMButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n
    \n
    \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetServerConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n getMaxNumberCacheUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n updateHashManagerCapacity,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../HacknetServer\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateHashGainRate } from \"../formulas/HacknetServers\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n node: HacknetServer;\n purchaseMultiplier: number | string;\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetServerElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetServerConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetServerConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) -\n node.hashRate;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n }\n purchaseLevelUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n\n function upgradeRamOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n }\n purchaseRamUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade RAM Button\n let upgradeRamButton;\n if (node.maxRam >= HacknetServerConstants.MaxRam) {\n upgradeRamButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetServerConstants.MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(\n node.level,\n 0,\n node.maxRam * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - node.hashRate;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n function upgradeCoresOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n }\n purchaseCoreUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade Cores Button\n let upgradeCoresButton;\n if (node.cores >= HacknetServerConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n node.hashRate;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n // Upgrade Cache button\n let upgradeCacheButton;\n if (node.cache >= HacknetServerConstants.MaxCache) {\n upgradeCacheButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase = 32 * Math.pow(2, node.cache + multiplier) - node.hashCapacity;\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheButton = (\n \n + hashes\n \n }\n >\n \n \n );\n if (props.player.money < upgradeCacheCost) {\n } else {\n }\n }\n function upgradeCacheOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n }\n purchaseCacheUpgrade(props.player, node, numUpgrades as number);\n rerender();\n updateHashManagerCapacity(props.player);\n }\n\n return (\n \n \n \n \n \n {node.hostname}\n \n \n \n \n Production:\n \n \n \n ()\n \n \n \n \n \n Hash Capacity:\n \n \n \n \n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.maxRam)}\n \n {upgradeRamButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n \n Cache Level:\n \n \n {node.cache}\n \n {upgradeCacheButton}\n \n \n
    \n
    \n );\n}\n","/**\n * Create the pop-up for purchasing upgrades with hashes\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrades } from \"../HashUpgrades\";\n\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HacknetUpgradeElem } from \"./HacknetUpgradeElem\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function HashUpgradeModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n const hashManager = player.hashManager;\n if (!(hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n return (\n \n <>\n Spend your hashes on a variety of different upgrades\n \n Hashes: \n \n {Object.keys(HashUpgrades).map((upgName) => {\n const upg = HashUpgrades[upgName];\n return (\n \n );\n })}\n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { purchaseHashUpgrade } from \"../HacknetHelpers\";\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrade } from \"../HashUpgrade\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { ServerDropdown, ServerType } from \"../../ui/React/ServerDropdown\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { Hashes } from \"../../ui/React/Hashes\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { SelectChangeEvent } from \"@mui/material/Select\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n player: IPlayer;\n hashManager: HashManager;\n upg: HashUpgrade;\n rerender: () => void;\n}\n\nconst serversMap: { [key: string]: string } = {};\n\nexport function HacknetUpgradeElem(props: IProps): React.ReactElement {\n const [selectedServer, setSelectedServer] = useState(\n serversMap[props.upg.name] ? serversMap[props.upg.name] : FactionNames.ECorp.toLowerCase(),\n );\n function changeTargetServer(event: SelectChangeEvent): void {\n setSelectedServer(event.target.value);\n serversMap[props.upg.name] = event.target.value;\n }\n\n function purchase(): void {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n if (canPurchase) {\n const res = purchaseHashUpgrade(props.player, props.upg.name, selectedServer);\n if (!res) {\n dialogBoxCreate(\n \"Failed to purchase upgrade. This may be because you do not have enough hashes, \" +\n \"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);\n\n // Purchase button\n const canPurchase = hashManager.hashes >= cost;\n\n // We'll reuse a Bladeburner css class\n return (\n \n \n \n \n \n Cost: , Bought: {level} times\n \n\n {upg.desc}\n {!upg.hasTargetServer && (\n \n )}\n {upg.hasTargetServer && (\n \n )}\n {level > 0 && effect && {effect}}\n \n );\n}\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 */\nimport React from \"react\";\n\nimport { PurchaseMultipliers } from \"../data/Constants\";\nimport Button from \"@mui/material/Button\";\n\ninterface IMultiplierProps {\n disabled: boolean;\n onClick: () => void;\n text: string;\n}\n\nfunction MultiplierButton(props: IMultiplierProps): React.ReactElement {\n return (\n \n );\n}\n\ninterface IProps {\n purchaseMultiplier: number | string;\n onClicks: (() => void)[];\n}\n\nexport function MultiplierButtons(props: IProps): React.ReactElement {\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 for (let i = 0; i < mults.length; ++i) {\n const mult = mults[i];\n const btnProps = {\n disabled: props.purchaseMultiplier === PurchaseMultipliers[mult],\n onClick: onClicks[i],\n text: mult,\n };\n\n buttons.push();\n }\n\n return <>{buttons};\n}\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 */\nimport React from \"react\";\n\nimport { hasHacknetServers } from \"../HacknetHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n totalProduction: number;\n player: IPlayer;\n}\n\nexport function PlayerInfo(props: IProps): React.ReactElement {\n const hasServers = hasHacknetServers(props.player);\n\n let prod;\n if (hasServers) {\n prod = ;\n } else {\n prod = ;\n }\n\n return (\n <>\n \n Money:\n \n \n\n {hasServers && (\n <>\n \n Hashes: /{\" \"}\n \n \n \n )}\n\n \n Total Hacknet {hasServers ? \"Server\" : \"Node\"} Production: {prod}\n \n \n );\n}\n","/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers, hasMaxNumberHacknetServers } from \"../HacknetHelpers\";\nimport { Player } from \"../../Player\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n multiplier: number | string;\n onClick: () => void;\n cost: number;\n}\n\nexport function PurchaseButton(props: IProps): React.ReactElement {\n const cost = props.cost;\n let text;\n if (hasHacknetServers(Player)) {\n if (hasMaxNumberHacknetServers(Player)) {\n text = <>Hacknet Server limit reached;\n } else {\n text = (\n <>\n Purchase Hacknet Server - \n \n \n );\n }\n } else {\n text = (\n <>\n Purchase Hacknet Node - \n \n \n );\n }\n\n return (\n \n );\n}\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 */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { CompanyLocation } from \"./CompanyLocation\";\nimport { GymLocation } from \"./GymLocation\";\nimport { HospitalLocation } from \"./HospitalLocation\";\nimport { SlumsLocation } from \"./SlumsLocation\";\nimport { SpecialLocation } from \"./SpecialLocation\";\nimport { TechVendorLocation } from \"./TechVendorLocation\";\nimport { TravelAgencyRoot } from \"./TravelAgencyRoot\";\nimport { UniversityLocation } from \"./UniversityLocation\";\nimport { CasinoLocation } from \"./CasinoLocation\";\n\nimport { Location } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { isBackdoorInstalled } from \"../../Server/ServerHelpers\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { use } from \"../../ui/Context\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { Tooltip } from \"@mui/material\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function GenericLocation({ loc }: IProps): React.ReactElement {\n const router = use.Router();\n const player = use.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 function getLocationSpecificContent(): React.ReactNode[] {\n const content: React.ReactNode[] = [];\n\n if (loc.types.includes(LocationType.Company)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Gym)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Hospital)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Slums)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Special)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TechVendor)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TravelAgency)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.University)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Casino)) {\n content.push();\n }\n\n return content;\n }\n\n const locContent: React.ReactNode[] = getLocationSpecificContent();\n const serverMeta = serverMetadata.find((s) => s.specialName === loc.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n\n const backdoorInstalled = server !== null && isBackdoorInstalled(server);\n\n return (\n <>\n \n \n {backdoorInstalled && !Settings.DisableTextEffects ? (\n \n \n ) : loc.name}\n \n {locContent}\n \n );\n}\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 */\nimport React, { useState, useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nimport { ApplyToJobButton } from \"./ApplyToJobButton\";\n\nimport { Locations } from \"../Locations\";\nimport { LocationName } from \"../data/LocationNames\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Favor } from \"../../ui/React/Favor\";\nimport { use } from \"../../ui/Context\";\nimport { QuitJobModal } from \"../../Company/ui/QuitJobModal\";\n\ntype IProps = {\n locName: LocationName;\n};\n\nexport function CompanyLocation(props: IProps): React.ReactElement {\n const p = use.Player();\n const router = use.Router();\n const [quitOpen, setQuitOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\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 const company = Companies[props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n\n /**\n * Reference to the Location that this component is being rendered for\n */\n const location = Locations[props.locName];\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n\n /**\n * Name of company position that player holds, if applicable\n */\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n const companyPosition = jobTitle ? CompanyPositions[jobTitle] : null;\n\n p.location = props.locName;\n\n function applyForAgentJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n const loc = location;\n if (!loc.infiltrationData)\n throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n\n router.toInfiltration(loc);\n }\n\n function work(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n if (pos instanceof CompanyPosition) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n p.startFocusing();\n router.toWork();\n }\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n\n return (\n <>\n {isEmployedHere && (\n <>\n Job Title: {jobTitle}\n -------------------------\n \n \n You will have company favor upon resetting after\n installing Augmentations\n \n }\n >\n \n Company reputation: \n \n \n \n -------------------------\n \n \n Company favor increases the rate at which you earn reputation for this company by 1% per favor.\n Company favor is gained whenever you reset after installing Augmentations. The amount of favor you\n gain depends on how much reputation you have with the company.\n \n }\n >\n \n Company Favor: \n \n \n \n -------------------------\n
    \n \n )}\n \n {isEmployedHere && (\n \n \n \n setQuitOpen(false)}\n />\n \n )\n\n }\n {company.hasAgentPositions() && (\n \n )}\n {company.hasBusinessConsultantPositions() && (\n \n )}\n {company.hasBusinessPositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasITPositions() && (\n \n )}\n {company.hasSecurityPositions() && (\n \n )}\n {company.hasSoftwareConsultantPositions() && (\n \n )}\n {company.hasSoftwarePositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {location.infiltrationData != null && }\n \n \n );\n}\n","// Metadata used for constructing Company Positions\nimport { IConstructorParams } from \"../CompanyPosition\";\nimport * as posNames from \"./companypositionnames\";\n\nexport const companyPositionMetadata: IConstructorParams[] = [\n {\n name: posNames.SoftwareCompanyPositions[0], // Software Enginering Intern\n nextPosition: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n baseSalary: 33,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.05,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n baseSalary: 80,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.1,\n reqdHacking: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n baseSalary: 165,\n charismaEffectiveness: 20,\n charismaExpGain: 0.08,\n hackingEffectiveness: 80,\n hackingExpGain: 0.4,\n reqdCharisma: 51,\n reqdHacking: 251,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n nextPosition: posNames.SoftwareCompanyPositions[4], // Head of Software\n baseSalary: 500,\n charismaEffectiveness: 25,\n charismaExpGain: 0.1,\n hackingEffectiveness: 75,\n hackingExpGain: 0.8,\n reqdCharisma: 151,\n reqdHacking: 401,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.SoftwareCompanyPositions[4], // Head of Software\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 800,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 400e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n nextPosition: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n baseSalary: 1650,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1.1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n nextPosition: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n baseSalary: 2310,\n charismaEffectiveness: 30,\n charismaExpGain: 0.6,\n hackingEffectiveness: 70,\n hackingExpGain: 1.2,\n reqdCharisma: 401,\n reqdHacking: 601,\n reqdReputation: 1.6e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n nextPosition: null,\n baseSalary: 2640,\n charismaEffectiveness: 35,\n charismaExpGain: 1,\n hackingEffectiveness: 65,\n hackingExpGain: 1.5,\n reqdCharisma: 501,\n reqdHacking: 751,\n reqdReputation: 3.2e6,\n repMultiplier: 2,\n },\n {\n name: posNames.ITCompanyPositions[0], // IT Intern\n nextPosition: posNames.ITCompanyPositions[1], // IT Analyst\n baseSalary: 26,\n charismaEffectiveness: 10,\n charismaExpGain: 0.01,\n hackingEffectiveness: 90,\n hackingExpGain: 0.04,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.ITCompanyPositions[1], // IT Analyst\n nextPosition: posNames.ITCompanyPositions[2], // IT Manager\n baseSalary: 66,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.08,\n reqdHacking: 26,\n reqdReputation: 7e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.ITCompanyPositions[2], // IT Manager\n nextPosition: posNames.ITCompanyPositions[3], // Systems Administrator\n baseSalary: 132,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.3,\n reqdCharisma: 51,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.ITCompanyPositions[3], // Systems Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.2,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.SecurityEngineerCompanyPositions[0], // Security Engineer\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[0], // Network Engineer\n nextPosition: posNames.NetworkEngineerCompanyPositions[1], // Network Adminsitrator\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[1], // Network Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[0], // Business Intern\n nextPosition: posNames.BusinessCompanyPositions[1], // Business Analyst\n baseSalary: 46,\n charismaEffectiveness: 90,\n charismaExpGain: 0.08,\n hackingEffectiveness: 10,\n hackingExpGain: 0.01,\n reqdCharisma: 1,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.BusinessCompanyPositions[1], // Business Analyst\n nextPosition: posNames.BusinessCompanyPositions[2], // Business Manager\n baseSalary: 100,\n charismaEffectiveness: 85,\n charismaExpGain: 0.15,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 51,\n reqdHacking: 6,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.BusinessCompanyPositions[2], // Business Manager\n nextPosition: posNames.BusinessCompanyPositions[3], // Operations Manager\n baseSalary: 200,\n charismaEffectiveness: 85,\n charismaExpGain: 0.3,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 101,\n reqdHacking: 51,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[3], // Operations Manager\n nextPosition: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n baseSalary: 660,\n charismaEffectiveness: 85,\n charismaExpGain: 0.4,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 226,\n reqdHacking: 51,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n nextPosition: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n baseSalary: 1950,\n charismaEffectiveness: 90,\n charismaExpGain: 1,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 501,\n reqdHacking: 76,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n nextPosition: null,\n baseSalary: 3900,\n charismaEffectiveness: 90,\n charismaExpGain: 1.5,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 751,\n reqdHacking: 101,\n reqdReputation: 3.2e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SecurityCompanyPositions[0], // Police Officer\n nextPosition: posNames.SecurityCompanyPositions[1], // Police Chief\n baseSalary: 82,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.04,\n reqdHacking: 11,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[1], // Police Chief\n nextPosition: null,\n baseSalary: 460,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.1,\n reqdHacking: 101,\n reqdStrength: 301,\n reqdDefense: 301,\n reqdDexterity: 301,\n reqdAgility: 301,\n reqdCharisma: 151,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[2], // Security Guard\n nextPosition: posNames.SecurityCompanyPositions[3], // Security Officer\n baseSalary: 50,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.01,\n strengthExpGain: 0.04,\n defenseExpGain: 0.04,\n dexterityExpGain: 0.04,\n agilityExpGain: 0.04,\n charismaExpGain: 0.02,\n reqdStrength: 51,\n reqdDefense: 51,\n reqdDexterity: 51,\n reqdAgility: 51,\n reqdCharisma: 1,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[3], // Security Officer\n nextPosition: posNames.SecurityCompanyPositions[4], // Security Supervisor\n baseSalary: 195,\n hackingEffectiveness: 10,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 10,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.05,\n reqdHacking: 26,\n reqdStrength: 151,\n reqdDefense: 151,\n reqdDexterity: 151,\n reqdAgility: 151,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SecurityCompanyPositions[4], // Security Supervisor\n nextPosition: posNames.SecurityCompanyPositions[5], // Head of Security\n baseSalary: 660,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.02,\n strengthExpGain: 0.12,\n defenseExpGain: 0.12,\n dexterityExpGain: 0.12,\n agilityExpGain: 0.12,\n charismaExpGain: 0.1,\n reqdHacking: 26,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 101,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[5], // Head of Security\n nextPosition: null,\n baseSalary: 1320,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.05,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.15,\n reqdHacking: 51,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 151,\n reqdReputation: 144e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.AgentCompanyPositions[0], // Field Agent\n nextPosition: posNames.AgentCompanyPositions[1], // Secret Agent\n baseSalary: 330,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 20,\n hackingExpGain: 0.04,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.05,\n reqdHacking: 101,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 101,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.AgentCompanyPositions[1], // Secret Agent\n nextPosition: posNames.AgentCompanyPositions[2], // Special Operative\n baseSalary: 990,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.1,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.1,\n reqdHacking: 201,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 201,\n reqdReputation: 32e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.AgentCompanyPositions[2], // Special Operative\n nextPosition: null,\n baseSalary: 2000,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.15,\n strengthExpGain: 0.2,\n defenseExpGain: 0.2,\n dexterityExpGain: 0.2,\n agilityExpGain: 0.2,\n charismaExpGain: 0.15,\n reqdHacking: 251,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 251,\n reqdReputation: 162e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.MiscCompanyPositions[0], // Waiter\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.05,\n repMultiplier: 1,\n },\n {\n name: posNames.MiscCompanyPositions[1], // Employee\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[0], // Software Consultant\n nextPosition: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n baseSalary: 66,\n hackingEffectiveness: 80,\n charismaEffectiveness: 20,\n hackingExpGain: 0.08,\n charismaExpGain: 0.03,\n reqdHacking: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n nextPosition: null,\n baseSalary: 132,\n hackingEffectiveness: 75,\n charismaEffectiveness: 25,\n hackingExpGain: 0.25,\n charismaExpGain: 0.06,\n reqdHacking: 251,\n reqdCharisma: 51,\n repMultiplier: 1.2,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[0], // Business Consultant\n nextPosition: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n baseSalary: 66,\n hackingEffectiveness: 20,\n charismaEffectiveness: 80,\n hackingExpGain: 0.015,\n charismaExpGain: 0.15,\n reqdHacking: 6,\n reqdCharisma: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n nextPosition: null,\n baseSalary: 525,\n hackingEffectiveness: 15,\n charismaEffectiveness: 85,\n hackingExpGain: 0.015,\n charismaExpGain: 0.3,\n reqdHacking: 51,\n reqdCharisma: 226,\n repMultiplier: 1.2,\n },\n {\n name: posNames.PartTimeCompanyPositions[0], // Part-time waiter\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.PartTimeCompanyPositions[1], // Part-time employee\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.03,\n repMultiplier: 1,\n },\n];\n","import React from \"react\";\nimport { Company } from \"../Company\";\nimport { use } from \"../../ui/Context\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n locName: string;\n company: Company;\n onQuit: () => void;\n}\n\nexport function QuitJobModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function quit(): void {\n player.quitJob(props.locName);\n props.onQuit();\n props.onClose();\n }\n\n return (\n \n Would you like to quit your job at {props.company.name}?\n
    \n
    \n \n
    \n );\n}\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 */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { IRouter } from \"../../ui/Router\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { Box } from \"@mui/material\";\n\ntype IProps = {\n loc: Location;\n p: IPlayer;\n router: IRouter;\n};\n\nexport function GymLocation(props: IProps): React.ReactElement {\n function calculateCost(): number {\n const serverMeta = serverMetadata.find((s) => s.specialName === props.loc.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = (server as Server).backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function train(stat: string): void {\n const loc = props.loc;\n props.p.startClass(calculateCost(), loc.expMult, stat);\n props.p.startFocusing();\n props.router.toWork();\n }\n\n function trainStrength(): void {\n train(CONSTANTS.ClassGymStrength);\n }\n\n function trainDefense(): void {\n train(CONSTANTS.ClassGymDefense);\n }\n\n function trainDexterity(): void {\n train(CONSTANTS.ClassGymDexterity);\n }\n\n function trainAgility(): void {\n train(CONSTANTS.ClassGymAgility);\n }\n\n const cost = CONSTANTS.ClassGymBaseCost * calculateCost();\n\n return (\n \n \n \n \n \n \n );\n}\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 */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\n\nimport { Money } from \"../../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ntype IProps = {\n p: IPlayer;\n};\n\ntype IState = {\n currHp: number;\n};\n\nexport class HospitalLocation extends React.Component {\n /**\n * Stores button styling that sets them all to block display\n */\n btnStyle: any;\n\n constructor(props: IProps) {\n super(props);\n\n this.btnStyle = { display: \"block\" };\n\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n\n this.state = {\n currHp: this.props.p.hp,\n };\n }\n\n getCost(): number {\n return getHospitalizationCost(this.props.p);\n }\n\n getHealed(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\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, \"hospitalization\");\n this.props.p.hp = this.props.p.max_hp;\n\n // This just forces a re-render to update the cost\n this.setState({\n currHp: this.props.p.hp,\n });\n\n dialogBoxCreate(\n <>\n You were healed to full health! The hospital billed you for \n ,\n );\n }\n\n render(): React.ReactNode {\n const cost = this.getCost();\n\n return (\n \n );\n }\n}\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 */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\nimport { Box } from \"@mui/material\";\n\nexport function SlumsLocation(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n function shoplift(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Shoplift.commit(router, player);\n }\n\n function robStore(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.RobStore.commit(router, player);\n }\n\n function mug(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Mug.commit(router, player);\n }\n\n function larceny(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Larceny.commit(router, player);\n }\n\n function dealDrugs(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.DealDrugs.commit(router, player);\n }\n\n function bondForgery(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.BondForgery.commit(router, player);\n }\n\n function traffickArms(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.TraffickArms.commit(router, player);\n }\n\n function homicide(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Homicide.commit(router, player);\n }\n\n function grandTheftAuto(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.GrandTheftAuto.commit(router, player);\n }\n\n function kidnap(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Kidnap.commit(router, player);\n }\n\n function assassinate(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Assassination.commit(router, player);\n }\n\n function heist(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Heist.commit(router, player);\n }\n\n const shopliftChance = Crimes.Shoplift.successRate(player);\n const robStoreChance = Crimes.RobStore.successRate(player);\n const mugChance = Crimes.Mug.successRate(player);\n const larcenyChance = Crimes.Larceny.successRate(player);\n const drugsChance = Crimes.DealDrugs.successRate(player);\n const bondChance = Crimes.BondForgery.successRate(player);\n const armsChance = Crimes.TraffickArms.successRate(player);\n const homicideChance = Crimes.Homicide.successRate(player);\n const gtaChance = Crimes.GrandTheftAuto.successRate(player);\n const kidnapChance = Crimes.Kidnap.successRate(player);\n const assassinateChance = Crimes.Assassination.successRate(player);\n const heistChance = Crimes.Heist.successRate(player);\n\n return (\n \n Attempt to shoplift from a low-end retailer}>\n \n \n Attempt to commit armed robbery on a high-end store}>\n \n \n Attempt to mug a random person on the street}>\n \n \n Attempt to rob property from someone's house}>\n \n \n Attempt to deal drugs}>\n \n \n Attempt to forge corporate bonds}>\n \n \n Attempt to smuggle illegal arms into the city}>\n \n \n Attempt to murder a random person on the street}>\n \n \n Attempt to commit grand theft auto}>\n \n \n Attempt to kidnap and ransom a high-profile-target}>\n \n \n Attempt to assassinate a high-profile target}>\n \n \n Attempt to pull off the ultimate heist}>\n \n \n \n );\n}\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 */\nimport React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\nimport { CreateCorporationModal } from \"../../Corporation/ui/CreateCorporationModal\";\nimport { LocationName } from \"../data/LocationNames\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\n\nimport { use } from \"../../ui/Context\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { SnackbarEvents } from \"../../ui/React/Snackbar\";\nimport { N00dles } from \"../../utils/helpers/N00dles\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { ArcadeRoot } from \"../../Arcade/ui/ArcadeRoot\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function SpecialLocation(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const inBladeburner = player.inBladeburner();\n\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n function handleBladeburner(): void {\n const p = player;\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n // Apply for Bladeburner division\n p.startBladeburner({ new: true });\n dialogBoxCreate(\"You have been accepted into the Bladeburner division!\");\n setRerender((old) => !old);\n\n const worldHeader = document.getElementById(\"world-menu-header\");\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n dialogBoxCreate(\"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 function handleGrafting(): void {\n router.toGrafting();\n }\n\n function renderBladeburner(): React.ReactElement {\n if (!player.canAccessBladeburner()) {\n return <>;\n }\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return (\n <>\n
    \n \n \n );\n }\n\n function renderNoodleBar(): React.ReactElement {\n function EatNoodles(): void {\n SnackbarEvents.emit(\"You ate some delicious noodles and feel refreshed\", \"success\", 2000);\n N00dles(); // This is the true power of the noodles.\n if (player.sourceFiles.length > 0) player.giveExploit(Exploit.N00dles);\n if (player.sourceFileLvl(5) > 0 || player.bitNodeN === 5) {\n player.intelligence_exp *= 1.0000000000000002;\n }\n player.hacking_exp *= 1.0000000000000002;\n player.strength_exp *= 1.0000000000000002;\n player.defense_exp *= 1.0000000000000002;\n player.agility_exp *= 1.0000000000000002;\n player.dexterity_exp *= 1.0000000000000002;\n player.charisma_exp *= 1.0000000000000002;\n for (const node of player.hacknetNodes) {\n if (node instanceof HacknetNode) {\n player.gainMoney(node.moneyGainRatePerSecond * 0.001, \"other\");\n } else {\n const server = GetServer(node);\n if (!(server instanceof HacknetServer)) throw new Error(`Server ${node} is not a hacknet server.`);\n player.hashManager.storeHashes(server.hashRate * 0.001);\n }\n }\n\n if (player.bladeburner) {\n player.bladeburner.rank += 0.00001;\n }\n\n if (player.corporation) {\n player.corporation.funds += player.corporation.revenue * 0.01;\n }\n }\n\n return (\n <>\n
    \n \n \n );\n }\n\n function CreateCorporation(): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (!player.canAccessCorporation()) {\n return (\n <>\n \n A business man is yelling at a clerk. You should come back later.\n \n \n );\n }\n return (\n <>\n \n setOpen(false)} />\n \n );\n }\n\n function renderGrafting(): React.ReactElement {\n if (!player.canAccessGrafting()) {\n return <>;\n }\n return ;\n }\n\n function handleCotMG(): void {\n const faction = Factions[FactionNames.ChurchOfTheMachineGod];\n if (!player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n joinFaction(faction);\n }\n if (\n !player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1) &&\n !player.queuedAugmentations.some((a) => a.name === AugmentationNames.StaneksGift1)\n ) {\n applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 });\n }\n\n router.toFaction(faction);\n }\n\n function renderCotMG(): React.ReactElement {\n // prettier-ignore\n const symbol = \n {\" `` \"}
    \n {\" -odmmNmds: \"}
    \n {\" `hNmo:..-omNh. \"}
    \n {\" yMd` `hNh \"}
    \n {\" mMd oNm \"}
    \n {\" oMNo .mM/ \"}
    \n {\" `dMN+ -mM+ \"}
    \n {\" -mMNo -mN+ \"}
    \n {\" .+- :mMNo/mN/ \"}
    \n {\":yNMd. :NMNNN/ \"}
    \n {\"-mMMMh. /NMMh` \"}
    \n {\" .dMMMd. /NMMMy` \"}
    \n {\" `yMMMd. /NNyNMMh` \"}
    \n {\" `sMMMd. +Nm: +NMMh. \"}
    \n {\" oMMMm- oNm: /NMMd. \"}
    \n {\" +NMMmsMm- :mMMd. \"}
    \n {\" /NMMMm- -mMMd. \"}
    \n {\" /MMMm- -mMMd. \"}
    \n {\" `sMNMMm- .mMmo \"}
    \n {\" `sMd:hMMm. ./. \"}
    \n {\" `yMy` `yNMd` \"}
    \n {\" `hMs` oMMy \"}
    \n {\" `hMh sMN- \"}
    \n {\" /MM- .NMo \"}
    \n {\" +MM: :MM+ \"}
    \n {\" sNNo-.`.-omNy` \"}
    \n {\" -smNNNNmdo- \"}
    \n {\" `..` \"}
    \n if (player.hasAugmentation(AugmentationNames.StaneksGift3, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer\n look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it\n seems. Curious, Just how much of a machine's soul do you house in that body?\n \n \n {symbol}\n \n );\n }\n if (player.hasAugmentation(AugmentationNames.StaneksGift2, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: I see you've taken to my creation. So much so it could hardly be recognized as\n one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your\n mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.\n \n \n {symbol}\n \n );\n }\n if (player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n return (\n <>\n \n Allison \"Mother\" Stanek: Welcome back my child!\n \n {symbol}\n \n );\n }\n\n if (!player.canAccessCotMG()) {\n return (\n <>\n \n A decrepit altar stands in the middle of a dilapidated church.\n
    \n
    A symbol is carved in the altar.\n
    \n
    \n {symbol}\n \n );\n }\n\n if (\n player.augmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0 ||\n player.queuedAugmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0\n ) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Begone you filth! My gift must be the first modification that your body should\n have!\n \n \n \n );\n }\n\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human\n form? If you are, accept my gift.\n \n \n \n {symbol}\n \n );\n }\n\n function renderGlitch(): React.ReactElement {\n return (\n <>\n \n \n \n \n );\n }\n\n switch (props.loc.name) {\n case LocationName.NewTokyoVitaLife: {\n return renderGrafting();\n }\n case LocationName.Sector12CityHall: {\n return ;\n }\n case LocationName.Sector12NSA: {\n return renderBladeburner();\n }\n case LocationName.NewTokyoNoodleBar: {\n return renderNoodleBar();\n }\n case LocationName.ChongqingChurchOfTheMachineGod: {\n return renderCotMG();\n }\n case LocationName.IshimaGlitch: {\n return renderGlitch();\n }\n case LocationName.NewTokyoArcade: {\n return ;\n }\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return <>;\n }\n}\n","import React, { useState } from \"react\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function CreateCorporationModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const canSelfFund = player.canAfford(150e9);\n if (!player.canAccessCorporation() || player.hasCorporation()) {\n props.onClose();\n return <>;\n }\n\n const [name, setName] = useState(\"\");\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function selfFund(): void {\n if (!canSelfFund) {\n return;\n }\n\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name);\n player.loseMoney(150e9, \"corporation\");\n\n props.onClose();\n router.toCorporation();\n }\n\n function seed(): void {\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name, 500e6);\n\n props.onClose();\n router.toCorporation();\n }\n\n return (\n \n \n Would you like to start a corporation? This will require $150b for registration and initial funding. {player.bitNodeN === 3 && (`This $150b\n can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million\n shares`)}\n
    \n
    \n If you would like to start one, please enter a name for your corporation below:\n
    \n \n {player.bitNodeN === 3 && (\n \n )}\n \n
    \n );\n}\n","const n00dlePower =\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(\" +\n \"!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]\" +\n \"+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+\" +\n \"[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[\" +\n \"])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!\" +\n \"+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+\" +\n \"[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[\" +\n \"])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+\" +\n \"(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+\" +\n \"[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+\" +\n \"!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]\" +\n \"]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]\" +\n \"]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[\" +\n \"+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(\" +\n \"![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[]\" +\n \")[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+\" +\n \"[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!\" +\n \"![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(\" +\n \"![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[\" +\n \"])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[]\" +\n \")[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[\" +\n \"]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[]\" +\n \")[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]\" +\n \"]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]\" +\n \"]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+(\" +\n \"[][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[\" +\n \"+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+\" +\n \"[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[\" +\n \"]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+\" +\n \"(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[]\" +\n \")[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]]\" +\n \"(!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]\" +\n \"((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[\" +\n \"]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]\" +\n \"+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]\" +\n \"+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+\" +\n \"[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]\" +\n \"+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([\" +\n \"![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(\" +\n \"!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]\" +\n \"+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][\" +\n \"[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[\" +\n \"]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+\" +\n \"!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]\" +\n \"+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])\" +\n \"[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+\" +\n \"[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[\" +\n \"]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!\" +\n \"+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]\" +\n \"+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(!\" +\n \"[]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!\" +\n \"![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]]\" +\n \")+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[\" +\n \"+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![\" +\n \"]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[\" +\n \"])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+\" +\n \"[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[\" +\n \"+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!\" +\n \"+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![\" +\n \"]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!\" +\n \"[]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!!\" +\n \"[]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]\" +\n \"]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![\" +\n \"]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[\" +\n \"]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]\" +\n \"+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+\" +\n \"[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]\" +\n \"+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+\" +\n \"[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])\" +\n \"[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[\" +\n \"])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()\" +\n \"+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[\" +\n \"+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[]\" +\n \"[(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()\";\n\nexport function N00dles(): void {\n // TODO: Too powerful, needs a nerf.\n eval(n00dlePower);\n}\n","import React, { useState } from \"react\";\nimport { BBCabinetRoot } from \"./BBCabinet\";\n\nimport Button from \"@mui/material/Button\";\nimport { use } from \"../../ui/Context\";\nimport { AlertEvents } from \"../../ui/React/AlertManager\";\n\nenum Page {\n None,\n Megabyteburner2000,\n}\n\nexport function ArcadeRoot(): React.ReactElement {\n const player = use.Player();\n const [page, setPage] = useState(Page.None);\n\n function mbBurner2000(): void {\n if (player.sourceFileLvl(1) === 0) {\n AlertEvents.emit(\"This machine is broken.\");\n } else {\n setPage(Page.Megabyteburner2000);\n }\n }\n\n if (page === Page.None) {\n return (\n <>\n \n \n );\n }\n let currentGame = <>;\n switch (page) {\n case Page.Megabyteburner2000:\n currentGame = ;\n }\n return (\n <>\n \n {currentGame}\n \n );\n}\n","import React, { useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { use } from \"../../ui/Context\";\nimport { Exploit } from \"../../Exploits/Exploit\";\n\nconst metaBB = \"https://bitburner-official.github.io/bitburner-legacy/\";\n\nconst style = {\n width: \"1060px\",\n height: \"800px\",\n border: \"0px\",\n} as any;\n\nexport function BBCabinetRoot(): React.ReactElement {\n const player = use.Player();\n useEffect(() => {\n window.addEventListener(\"message\", function (this: Window, ev: MessageEvent) {\n if (ev.isTrusted && ev.origin == \"https://bitburner-official.github.io\" && ev.data) {\n player.giveExploit(Exploit.TrueRecursion);\n }\n });\n });\n // prettier-ignore\n const joystick =\n <>\n \n ,'\" \"', .-. \n / \\ ( ) \n | | .-. '-' .-. \n \\ / ( ) ( )\n '.___.' '-' .-. '-'\n ||| ( ) \n ||| '-' \n ;\n return (\n <>\n \n \n \n \n );\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { purchaseAugmentation, joinFaction, getFactionAugmentationsFiltered } from \"../Faction/FactionHelpers\";\nimport { startWorkerScript } from \"../NetscriptWorker\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { augmentationExists, installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { killWorkerScript } from \"../Netscript/killWorkerScript\";\nimport { CONSTANTS } from \"../Constants\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { RunningScript } from \"../Script/RunningScript\";\n\nimport {\n AugmentationStats,\n CharacterInfo,\n CrimeStats,\n PlayerSkills,\n Singularity as ISingularity,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport { findCrime } from \"../Crime/CrimeHelpers\";\nimport { CompanyPosition } from \"../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../Company/CompanyPositions\";\nimport { DarkWebItems } from \"../DarkWeb/DarkWebItems\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Router } from \"../ui/GameRoot\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Page } from \"../ui/Router\";\nimport { Locations } from \"../Locations/Locations\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../Server/AllServers\";\nimport { Programs } from \"../Programs/Programs\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Company } from \"../Company/Company\";\nimport { Companies } from \"../Company/Companies\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { getServerOnNetwork, safetlyCreateUniqueServer } from \"../Server/ServerHelpers\";\nimport { Terminal } from \"../Terminal\";\nimport { calculateHackingTime } from \"../Hacking\";\nimport { Server } from \"../Server/Server\";\nimport { netscriptCanHack } from \"../Hacking/netscriptCanHack\";\nimport { FactionInfos } from \"../Faction/FactionInfo\";\n\nexport function NetscriptSingularity(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): ISingularity {\n const getAugmentation = function (func: string, name: string): Augmentation {\n if (!augmentationExists(name)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return Augmentations[name];\n };\n\n const getFaction = function (func: string, name: string): Faction {\n if (!factionExists(name)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return Factions[name];\n };\n\n const getCompany = function (func: string, name: string): Company {\n const company = Companies[name];\n if (company == null || !(company instanceof Company)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n return company;\n };\n\n const runAfterReset = function (cbScript: string | null = null): void {\n //Run a script after reset\n if (!cbScript) return;\n const home = player.getHomeComputer();\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 if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n const runningScriptObj = new RunningScript(script, []); // No args\n runningScriptObj.threads = 1; // Only 1 thread\n startWorkerScript(player, runningScriptObj, home);\n }\n }\n };\n return {\n getOwnedAugmentations: function (_purchased: unknown = false): string[] {\n const purchased = helper.boolean(_purchased);\n helper.updateDynamicRam(\"getOwnedAugmentations\", getRamCost(player, \"getOwnedAugmentations\"));\n helper.checkSingularityAccess(\"getOwnedAugmentations\");\n const res = [];\n for (let i = 0; i < player.augmentations.length; ++i) {\n res.push(player.augmentations[i].name);\n }\n if (purchased) {\n for (let i = 0; i < player.queuedAugmentations.length; ++i) {\n res.push(player.queuedAugmentations[i].name);\n }\n }\n return res;\n },\n getAugmentationsFromFaction: function (_facName: unknown): string[] {\n const facName = helper.string(\"getAugmentationsFromFaction\", \"facName\", _facName);\n helper.updateDynamicRam(\"getAugmentationsFromFaction\", getRamCost(player, \"getAugmentationsFromFaction\"));\n helper.checkSingularityAccess(\"getAugmentationsFromFaction\");\n const faction = getFaction(\"getAugmentationsFromFaction\", facName);\n\n return getFactionAugmentationsFiltered(player, faction);\n },\n getAugmentationCost: function (_augName: unknown): [number, number] {\n const augName = helper.string(\"getAugmentationCost\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationCost\", getRamCost(player, \"getAugmentationCost\"));\n helper.checkSingularityAccess(\"getAugmentationCost\");\n const aug = getAugmentation(\"getAugmentationCost\", augName);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (_augName: unknown): string[] {\n const augName = helper.string(\"getAugmentationPrereq\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationPrereq\", getRamCost(player, \"getAugmentationPrereq\"));\n helper.checkSingularityAccess(\"getAugmentationPrereq\");\n const aug = getAugmentation(\"getAugmentationPrereq\", augName);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (_augName: unknown): number {\n const augName = helper.string(\"getAugmentationPrice\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationPrice\", getRamCost(player, \"getAugmentationPrice\"));\n helper.checkSingularityAccess(\"getAugmentationPrice\");\n const aug = getAugmentation(\"getAugmentationPrice\", augName);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (_augName: unknown): number {\n const augName = helper.string(\"getAugmentationRepReq\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationRepReq\", getRamCost(player, \"getAugmentationRepReq\"));\n helper.checkSingularityAccess(\"getAugmentationRepReq\");\n const aug = getAugmentation(\"getAugmentationRepReq\", augName);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (_augName: unknown): AugmentationStats {\n const augName = helper.string(\"getAugmentationStats\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationStats\", getRamCost(player, \"getAugmentationStats\"));\n helper.checkSingularityAccess(\"getAugmentationStats\");\n const aug = getAugmentation(\"getAugmentationStats\", augName);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (_facName: unknown, _augName: unknown): boolean {\n const facName = helper.string(\"purchaseAugmentation\", \"facName\", _facName);\n const augName = helper.string(\"purchaseAugmentation\", \"augName\", _augName);\n helper.updateDynamicRam(\"purchaseAugmentation\", getRamCost(player, \"purchaseAugmentation\"));\n helper.checkSingularityAccess(\"purchaseAugmentation\");\n const fac = getFaction(\"purchaseAugmentation\", facName);\n const aug = getAugmentation(\"purchaseAugmentation\", augName);\n\n const augs = getFactionAugmentationsFiltered(player, fac);\n\n if (!augs.includes(augName)) {\n workerScript.log(\n \"purchaseAugmentation\",\n () => `Faction '${facName}' does not have the '${augName}' augmentation.`,\n );\n return false;\n }\n\n const isNeuroflux = aug.name === AugmentationNames.NeuroFluxGovernor;\n if (!isNeuroflux) {\n for (let j = 0; j < player.queuedAugmentations.length; ++j) {\n if (player.queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", () => `You already have the '${augName}' augmentation.`);\n return false;\n }\n }\n for (let j = 0; j < player.augmentations.length; ++j) {\n if (player.augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", () => `You already have the '${augName}' 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 = purchaseAugmentation(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", () => res);\n if (isString(res) && res.startsWith(\"You purchased\")) {\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 10);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (_cbScript: unknown): void {\n const cbScript = helper.string(\"softReset\", \"cbScript\", _cbScript);\n helper.updateDynamicRam(\"softReset\", getRamCost(player, \"softReset\"));\n helper.checkSingularityAccess(\"softReset\");\n\n workerScript.log(\"softReset\", () => \"Soft resetting. This will cause this script to be killed\");\n setTimeout(() => {\n prestigeAugmentation();\n runAfterReset(cbScript);\n }, 0);\n\n // Prevent workerScript from \"finishing execution naturally\"\n workerScript.running = false;\n killWorkerScript(workerScript);\n },\n installAugmentations: function (_cbScript: unknown): boolean {\n const cbScript = helper.string(\"installAugmentations\", \"cbScript\", _cbScript);\n helper.updateDynamicRam(\"installAugmentations\", getRamCost(player, \"installAugmentations\"));\n helper.checkSingularityAccess(\"installAugmentations\");\n\n if (player.queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", () => \"You do not have any Augmentations to be installed.\");\n return false;\n }\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 10);\n workerScript.log(\n \"installAugmentations\",\n () => \"Installing Augmentations. This will cause this script to be killed\",\n );\n setTimeout(() => {\n installAugmentations();\n runAfterReset(cbScript);\n }, 0);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n killWorkerScript(workerScript);\n return true;\n },\n\n goToLocation: function (_locationName: unknown): boolean {\n const locationName = helper.string(\"goToLocation\", \"locationName\", _locationName);\n helper.updateDynamicRam(\"goToLocation\", getRamCost(player, \"goToLocation\"));\n helper.checkSingularityAccess(\"goToLocation\");\n const location = Object.values(Locations).find((l) => l.name === locationName);\n if (!location) {\n workerScript.log(\"goToLocation\", () => `No location named ${locationName}`);\n return false;\n }\n if (player.city !== location.city) {\n workerScript.log(\"goToLocation\", () => `No location named ${locationName} in ${player.city}`);\n return false;\n }\n Router.toLocation(location);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50000);\n return true;\n },\n universityCourse: function (_universityName: unknown, _className: unknown, _focus: unknown = true): boolean {\n const universityName = helper.string(\"universityCourse\", \"universityName\", _universityName);\n const className = helper.string(\"universityCourse\", \"className\", _className);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"universityCourse\", getRamCost(player, \"universityCourse\"));\n helper.checkSingularityAccess(\"universityCourse\");\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"universityCourse\", () => txt);\n }\n\n let costMult, expMult;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"universityCourse\",\n () => `You cannot study at 'Summit University' because you are not in '${CityName.Aevum}'.`,\n );\n return false;\n }\n player.gotoLocation(LocationName.AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"universityCourse\",\n () => `You cannot study at 'Rothman University' because you are not in '${CityName.Sector12}'.`,\n );\n return false;\n }\n player.location = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (player.city != CityName.Volhaven) {\n workerScript.log(\n \"universityCourse\",\n () => `You cannot study at 'ZB Institute of Technology' because you are not in '${CityName.Volhaven}'.`,\n );\n return false;\n }\n player.location = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n default:\n workerScript.log(\"universityCourse\", () => `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n let task = \"\";\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = CONSTANTS.ClassStudyComputerScience;\n break;\n case \"Data Structures\".toLowerCase():\n task = CONSTANTS.ClassDataStructures;\n break;\n case \"Networks\".toLowerCase():\n task = CONSTANTS.ClassNetworks;\n break;\n case \"Algorithms\".toLowerCase():\n task = CONSTANTS.ClassAlgorithms;\n break;\n case \"Management\".toLowerCase():\n task = CONSTANTS.ClassManagement;\n break;\n case \"Leadership\".toLowerCase():\n task = CONSTANTS.ClassLeadership;\n break;\n default:\n workerScript.log(\"universityCourse\", () => `Invalid class name: ${className}.`);\n return false;\n }\n player.startClass(costMult, expMult, task);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"universityCourse\", () => `Started ${task} at ${universityName}`);\n return true;\n },\n\n gymWorkout: function (_gymName: unknown, _stat: unknown, _focus: unknown = true): boolean {\n const gymName = helper.string(\"gymWorkout\", \"gymName\", _gymName);\n const stat = helper.string(\"gymWorkout\", \"stat\", _stat);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"gymWorkout\", getRamCost(player, \"gymWorkout\"));\n helper.checkSingularityAccess(\"gymWorkout\");\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"gymWorkout\", () => txt);\n }\n let costMult, expMult;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.AevumCrushFitnessGym}' because you are not in '${CityName.Aevum}'.`,\n );\n return false;\n }\n player.location = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.AevumSnapFitnessGym}' because you are not in '${CityName.Aevum}'.`,\n );\n return false;\n }\n player.location = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.Sector12IronGym}' because you are not in '${CityName.Sector12}'.`,\n );\n return false;\n }\n player.location = LocationName.Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.Sector12PowerhouseGym}' because you are not in '${CityName.Sector12}'.`,\n );\n return false;\n }\n player.location = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (player.city != CityName.Volhaven) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.VolhavenMilleniumFitnessGym}' because you are not in '${CityName.Volhaven}'.`,\n );\n return false;\n }\n player.location = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\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.startClass(costMult, expMult, CONSTANTS.ClassGymStrength);\n break;\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n player.startClass(costMult, expMult, CONSTANTS.ClassGymDefense);\n break;\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n player.startClass(costMult, expMult, CONSTANTS.ClassGymDexterity);\n break;\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n player.startClass(costMult, expMult, CONSTANTS.ClassGymAgility);\n break;\n default:\n workerScript.log(\"gymWorkout\", () => `Invalid stat: ${stat}.`);\n return false;\n }\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"gymWorkout\", () => `Started training ${stat} at ${gymName}`);\n return true;\n },\n\n travelToCity: function (_cityName: unknown): boolean {\n const cityName = helper.city(\"travelToCity\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"travelToCity\", getRamCost(player, \"travelToCity\"));\n helper.checkSingularityAccess(\"travelToCity\");\n\n switch (cityName) {\n case CityName.Aevum:\n case CityName.Chongqing:\n case CityName.Sector12:\n case CityName.NewTokyo:\n case CityName.Ishima:\n case CityName.Volhaven:\n if (player.money < CONSTANTS.TravelCost) {\n workerScript.log(\"travelToCity\", () => \"Not enough money to travel.\");\n return false;\n }\n player.loseMoney(CONSTANTS.TravelCost, \"other\");\n player.city = cityName;\n workerScript.log(\"travelToCity\", () => `Traveled to ${cityName}`);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50000);\n return true;\n default:\n throw helper.makeRuntimeErrorMsg(\"travelToCity\", `Invalid city name: '${cityName}'.`);\n }\n },\n\n purchaseTor: function (): boolean {\n helper.updateDynamicRam(\"purchaseTor\", getRamCost(player, \"purchaseTor\"));\n helper.checkSingularityAccess(\"purchaseTor\");\n\n if (player.hasTorRouter()) {\n workerScript.log(\"purchaseTor\", () => \"You already have a TOR router!\");\n return true;\n }\n\n if (player.money < CONSTANTS.TorRouterCost) {\n workerScript.log(\"purchaseTor\", () => \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n player.loseMoney(CONSTANTS.TorRouterCost, \"other\");\n\n const darkweb = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1,\n });\n AddToAllServers(darkweb);\n\n player.getHomeComputer().serversOnNetwork.push(darkweb.hostname);\n darkweb.serversOnNetwork.push(player.getHomeComputer().hostname);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 500);\n workerScript.log(\"purchaseTor\", () => \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (_programName: unknown): boolean {\n const programName = helper.string(\"purchaseProgram\", \"programName\", _programName).toLowerCase();\n helper.updateDynamicRam(\"purchaseProgram\", getRamCost(player, \"purchaseProgram\"));\n helper.checkSingularityAccess(\"purchaseProgram\");\n\n if (!player.hasTorRouter()) {\n workerScript.log(\"purchaseProgram\", () => \"You do not have the TOR router.\");\n return false;\n }\n\n const item = Object.values(DarkWebItems).find((i) => i.program.toLowerCase() === programName);\n if (item == null) {\n workerScript.log(\"purchaseProgram\", () => `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (player.money < item.price) {\n workerScript.log(\n \"purchaseProgram\",\n () => `Not enough money to purchase '${item.program}'. Need ${numeralWrapper.formatMoney(item.price)}`,\n );\n return false;\n }\n\n if (player.hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", () => `You already have the '${item.program}' program`);\n return true;\n }\n\n player.loseMoney(item.price, \"other\");\n player.getHomeComputer().programs.push(item.program);\n workerScript.log(\n \"purchaseProgram\",\n () => `You have purchased the '${item.program}' program. The new program can be found on your home computer.`,\n );\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 5000);\n return true;\n },\n getCurrentServer: function (): string {\n helper.updateDynamicRam(\"getCurrentServer\", getRamCost(player, \"getCurrentServer\"));\n helper.checkSingularityAccess(\"getCurrentServer\");\n return player.getCurrentServer().hostname;\n },\n connect: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"purchaseProgram\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"connect\", getRamCost(player, \"connect\"));\n helper.checkSingularityAccess(\"connect\");\n if (!hostname) {\n throw helper.makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n const target = GetServer(hostname);\n if (target == null) {\n throw helper.makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n if (hostname === \"home\") {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = player.getHomeComputer().hostname;\n player.getCurrentServer().isConnectedTo = true;\n Terminal.setcwd(\"/\");\n return true;\n }\n\n const server = player.getCurrentServer();\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = getServerOnNetwork(server, i);\n if (other === null) continue;\n if (other.hostname == hostname) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = target.hostname;\n player.getCurrentServer().isConnectedTo = true;\n Terminal.setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function (): Promise {\n helper.updateDynamicRam(\"manualHack\", getRamCost(player, \"manualHack\"));\n helper.checkSingularityAccess(\"manualHack\");\n const server = player.getCurrentServer();\n return helper.hack(server.hostname, true);\n },\n installBackdoor: function (): Promise {\n helper.updateDynamicRam(\"installBackdoor\", getRamCost(player, \"installBackdoor\"));\n helper.checkSingularityAccess(\"installBackdoor\");\n const baseserver = player.getCurrentServer();\n if (!(baseserver instanceof Server)) {\n workerScript.log(\"installBackdoor\", () => \"cannot backdoor this kind of server\");\n return Promise.resolve();\n }\n const server = baseserver as Server;\n const installTime = (calculateHackingTime(server, player) / 4) * 1000;\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, player);\n if (!canHack.res) {\n throw helper.makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg || \"\");\n }\n\n workerScript.log(\n \"installBackdoor\",\n () => `Installing backdoor on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(installTime, true)}`,\n );\n\n return netscriptDelay(installTime, workerScript).then(function () {\n workerScript.log(\"installBackdoor\", () => `Successfully installed backdoor on '${server.hostname}'`);\n\n server.backdoorInstalled = true;\n\n if (SpecialServers.WorldDaemon === server.hostname) {\n Router.toBitVerse(false, false);\n }\n return Promise.resolve();\n });\n },\n isFocused: function (): boolean {\n helper.updateDynamicRam(\"isFocused\", getRamCost(player, \"isFocused\"));\n helper.checkSingularityAccess(\"isFocused\");\n return player.focus;\n },\n setFocus: function (_focus: unknown): boolean {\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"setFocus\", getRamCost(player, \"setFocus\"));\n helper.checkSingularityAccess(\"setFocus\");\n if (!player.isWorking) {\n throw helper.makeRuntimeErrorMsg(\"setFocus\", \"Not currently working\");\n }\n if (\n !(\n player.workType == CONSTANTS.WorkTypeFaction ||\n player.workType == CONSTANTS.WorkTypeCompany ||\n player.workType == CONSTANTS.WorkTypeCompanyPartTime ||\n player.workType == CONSTANTS.WorkTypeCreateProgram ||\n player.workType == CONSTANTS.WorkTypeStudyClass\n )\n ) {\n throw helper.makeRuntimeErrorMsg(\"setFocus\", \"Cannot change focus for current job\");\n }\n if (!player.focus && focus) {\n player.startFocusing();\n Router.toWork();\n return true;\n } else if (player.focus && !focus) {\n player.stopFocusing();\n Router.toTerminal();\n return true;\n }\n return false;\n },\n getStats: function (): PlayerSkills {\n helper.updateDynamicRam(\"getStats\", getRamCost(player, \"getStats\"));\n helper.checkSingularityAccess(\"getStats\");\n workerScript.log(\"getStats\", () => `getStats is deprecated, please use getplayer`);\n\n return {\n hacking: player.hacking,\n strength: player.strength,\n defense: player.defense,\n dexterity: player.dexterity,\n agility: player.agility,\n charisma: player.charisma,\n intelligence: player.intelligence,\n };\n },\n getCharacterInformation: function (): CharacterInfo {\n helper.updateDynamicRam(\"getCharacterInformation\", getRamCost(player, \"getCharacterInformation\"));\n helper.checkSingularityAccess(\"getCharacterInformation\");\n workerScript.log(\"getCharacterInformation\", () => `getCharacterInformation is deprecated, please use getplayer`);\n\n return {\n bitnode: player.bitNodeN,\n city: player.city,\n factions: player.factions.slice(),\n hp: player.hp,\n jobs: Object.keys(player.jobs),\n jobTitles: Object.values(player.jobs),\n maxHp: player.max_hp,\n mult: {\n agility: player.agility_mult,\n agilityExp: player.agility_exp_mult,\n charisma: player.charisma,\n charismaExp: player.charisma_exp,\n companyRep: player.company_rep_mult,\n crimeMoney: player.crime_money_mult,\n crimeSuccess: player.crime_success_mult,\n defense: player.defense_mult,\n defenseExp: player.defense_exp_mult,\n dexterity: player.dexterity_mult,\n dexterityExp: player.dexterity_exp_mult,\n factionRep: player.faction_rep_mult,\n hacking: player.hacking_mult,\n hackingExp: player.hacking_exp_mult,\n strength: player.strength_mult,\n strengthExp: player.strength_exp_mult,\n workMoney: player.work_money_mult,\n },\n timeWorked: player.timeWorked,\n tor: player.hasTorRouter(),\n workHackExpGain: player.workHackExpGained,\n workStrExpGain: player.workStrExpGained,\n workDefExpGain: player.workDefExpGained,\n workDexExpGain: player.workDexExpGained,\n workAgiExpGain: player.workAgiExpGained,\n workChaExpGain: player.workChaExpGained,\n workRepGain: player.workRepGained,\n workMoneyGain: player.workMoneyGained,\n hackingExp: player.hacking_exp,\n strengthExp: player.strength_exp,\n defenseExp: player.defense_exp,\n dexterityExp: player.dexterity_exp,\n agilityExp: player.agility_exp,\n charismaExp: player.charisma_exp,\n };\n },\n hospitalize: function (): void {\n helper.updateDynamicRam(\"hospitalize\", getRamCost(player, \"hospitalize\"));\n helper.checkSingularityAccess(\"hospitalize\");\n if (player.isWorking || Router.page() === Page.Infiltration || Router.page() === Page.BitVerse) {\n workerScript.log(\"hospitalize\", () => \"Cannot go to the hospital because the player is busy.\");\n return;\n }\n player.hospitalize();\n },\n isBusy: function (): boolean {\n helper.updateDynamicRam(\"isBusy\", getRamCost(player, \"isBusy\"));\n helper.checkSingularityAccess(\"isBusy\");\n return player.isWorking || Router.page() === Page.Infiltration || Router.page() === Page.BitVerse;\n },\n stopAction: function (): boolean {\n helper.updateDynamicRam(\"stopAction\", getRamCost(player, \"stopAction\"));\n helper.checkSingularityAccess(\"stopAction\");\n if (player.isWorking) {\n if (player.focus) {\n player.stopFocusing();\n Router.toTerminal();\n }\n const txt = player.singularityStopWork();\n workerScript.log(\"stopAction\", () => txt);\n return true;\n }\n return false;\n },\n upgradeHomeCores: function (): boolean {\n helper.updateDynamicRam(\"upgradeHomeCores\", getRamCost(player, \"upgradeHomeCores\"));\n helper.checkSingularityAccess(\"upgradeHomeCores\");\n\n // Check if we're at max cores\n const homeComputer = player.getHomeComputer();\n if (homeComputer.cpuCores >= 8) {\n workerScript.log(\"upgradeHomeCores\", () => `Your home computer is at max cores.`);\n return false;\n }\n\n const cost = player.getUpgradeHomeCoresCost();\n if (player.money < cost) {\n workerScript.log(\n \"upgradeHomeCores\",\n () => `You don't have enough money. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return false;\n }\n\n homeComputer.cpuCores += 1;\n player.loseMoney(cost, \"servers\");\n\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 2);\n workerScript.log(\n \"upgradeHomeCores\",\n () => `Purchased an additional core for home computer! It now has ${homeComputer.cpuCores} cores.`,\n );\n return true;\n },\n getUpgradeHomeCoresCost: function (): number {\n helper.updateDynamicRam(\"getUpgradeHomeCoresCost\", getRamCost(player, \"getUpgradeHomeCoresCost\"));\n helper.checkSingularityAccess(\"getUpgradeHomeCoresCost\");\n\n return player.getUpgradeHomeCoresCost();\n },\n upgradeHomeRam: function (): boolean {\n helper.updateDynamicRam(\"upgradeHomeRam\", getRamCost(player, \"upgradeHomeRam\"));\n helper.checkSingularityAccess(\"upgradeHomeRam\");\n\n // Check if we're at max RAM\n const homeComputer = player.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", () => `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = player.getUpgradeHomeRamCost();\n if (player.money < cost) {\n workerScript.log(\n \"upgradeHomeRam\",\n () => `You don't have enough money. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return false;\n }\n\n homeComputer.maxRam *= 2;\n player.loseMoney(cost, \"servers\");\n\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 2);\n workerScript.log(\n \"upgradeHomeRam\",\n () =>\n `Purchased additional RAM for home computer! It now has ${numeralWrapper.formatRAM(\n homeComputer.maxRam,\n )} of RAM.`,\n );\n return true;\n },\n getUpgradeHomeRamCost: function (): number {\n helper.updateDynamicRam(\"getUpgradeHomeRamCost\", getRamCost(player, \"getUpgradeHomeRamCost\"));\n helper.checkSingularityAccess(\"getUpgradeHomeRamCost\");\n\n return player.getUpgradeHomeRamCost();\n },\n workForCompany: function (_companyName: unknown, _focus: unknown = true): boolean {\n let companyName = helper.string(\"workForCompany\", \"companyName\", _companyName);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"workForCompany\", getRamCost(player, \"workForCompany\"));\n helper.checkSingularityAccess(\"workForCompany\");\n\n // Sanitize input\n if (companyName == null) {\n companyName = player.companyName;\n }\n\n // Make sure its a valid company\n if (companyName == null || companyName === \"\" || !(Companies[companyName] instanceof Company)) {\n workerScript.log(\"workForCompany\", () => `Invalid company: '${companyName}'`);\n return false;\n }\n\n // Make sure player is actually employed at the comapny\n if (!Object.keys(player.jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", () => `You do not have a job at '${companyName}'`);\n return false;\n }\n\n // Check to make sure company position data is valid\n const companyPositionName = player.jobs[companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (companyPositionName === \"\" || !(companyPosition instanceof CompanyPosition)) {\n workerScript.log(\"workForCompany\", () => \"You do not have a job\");\n return false;\n }\n\n const wasFocused = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"workForCompany\", () => txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n player.startWorkPartTime(companyName);\n } else {\n player.startWork(companyName);\n }\n\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocused) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\n \"workForCompany\",\n () => `Began working at '${player.companyName}' as a '${companyPositionName}'`,\n );\n return true;\n },\n applyToCompany: function (_companyName: unknown, _field: unknown): boolean {\n const companyName = helper.string(\"applyToCompany\", \"companyName\", _companyName);\n const field = helper.string(\"applyToCompany\", \"field\", _field);\n helper.updateDynamicRam(\"applyToCompany\", getRamCost(player, \"applyToCompany\"));\n helper.checkSingularityAccess(\"applyToCompany\");\n getCompany(\"applyToCompany\", companyName);\n\n player.location = companyName as LocationName;\n let res;\n switch (field.toLowerCase()) {\n case \"software\":\n res = player.applyForSoftwareJob(true);\n break;\n case \"software consultant\":\n res = player.applyForSoftwareConsultantJob(true);\n break;\n case \"it\":\n res = player.applyForItJob(true);\n break;\n case \"security engineer\":\n res = player.applyForSecurityEngineerJob(true);\n break;\n case \"network engineer\":\n res = player.applyForNetworkEngineerJob(true);\n break;\n case \"business\":\n res = player.applyForBusinessJob(true);\n break;\n case \"business consultant\":\n res = player.applyForBusinessConsultantJob(true);\n break;\n case \"security\":\n res = player.applyForSecurityJob(true);\n break;\n case \"agent\":\n res = player.applyForAgentJob(true);\n break;\n case \"employee\":\n res = player.applyForEmployeeJob(true);\n break;\n case \"part-time employee\":\n res = player.applyForPartTimeEmployeeJob(true);\n break;\n case \"waiter\":\n res = player.applyForWaiterJob(true);\n break;\n case \"part-time waiter\":\n res = player.applyForPartTimeWaiterJob(true);\n break;\n default:\n workerScript.log(\"applyToCompany\", () => `Invalid job: '${field}'.`);\n return false;\n }\n // TODO https://github.com/danielyxie/bitburner/issues/1378\n // The player object's applyForJob function can return string with special error messages\n // if (isString(res)) {\n // workerScript.log(\"applyToCompany\",()=> res);\n // return false;\n // }\n if (res) {\n workerScript.log(\n \"applyToCompany\",\n () => `You were offered a new job at '${companyName}' as a '${player.jobs[companyName]}'`,\n );\n } else {\n workerScript.log(\n \"applyToCompany\",\n () => `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`,\n );\n }\n return res;\n },\n getCompanyRep: function (_companyName: unknown): number {\n const companyName = helper.string(\"getCompanyRep\", \"companyName\", _companyName);\n helper.updateDynamicRam(\"getCompanyRep\", getRamCost(player, \"getCompanyRep\"));\n helper.checkSingularityAccess(\"getCompanyRep\");\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (_companyName: unknown): number {\n const companyName = helper.string(\"getCompanyFavor\", \"companyName\", _companyName);\n helper.updateDynamicRam(\"getCompanyFavor\", getRamCost(player, \"getCompanyFavor\"));\n helper.checkSingularityAccess(\"getCompanyFavor\");\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (_companyName: unknown): number {\n const companyName = helper.string(\"getCompanyFavorGain\", \"companyName\", _companyName);\n helper.updateDynamicRam(\"getCompanyFavorGain\", getRamCost(player, \"getCompanyFavorGain\"));\n helper.checkSingularityAccess(\"getCompanyFavorGain\");\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain();\n },\n checkFactionInvitations: function (): string[] {\n helper.updateDynamicRam(\"checkFactionInvitations\", getRamCost(player, \"checkFactionInvitations\"));\n helper.checkSingularityAccess(\"checkFactionInvitations\");\n // Make a copy of player.factionInvitations\n return player.factionInvitations.slice();\n },\n joinFaction: function (_facName: unknown): boolean {\n const facName = helper.string(\"joinFaction\", \"facName\", _facName);\n helper.updateDynamicRam(\"joinFaction\", getRamCost(player, \"joinFaction\"));\n helper.checkSingularityAccess(\"joinFaction\");\n getFaction(\"joinFaction\", facName);\n\n if (!player.factionInvitations.includes(facName)) {\n workerScript.log(\"joinFaction\", () => `You have not been invited by faction '${facName}'`);\n return false;\n }\n const fac = Factions[facName];\n joinFaction(fac);\n\n // Update Faction Invitation list to account for joined + banned factions\n for (let i = 0; i < player.factionInvitations.length; ++i) {\n if (player.factionInvitations[i] == facName || Factions[player.factionInvitations[i]].isBanned) {\n player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 5);\n workerScript.log(\"joinFaction\", () => `Joined the '${facName}' faction.`);\n return true;\n },\n workForFaction: function (_facName: unknown, _type: unknown, _focus: unknown = true): boolean {\n const facName = helper.string(\"workForFaction\", \"facName\", _facName);\n const type = helper.string(\"workForFaction\", \"type\", _type);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"workForFaction\", getRamCost(player, \"workForFaction\"));\n helper.checkSingularityAccess(\"workForFaction\");\n getFaction(\"workForFaction\", facName);\n\n // if the player is in a gang and the target faction is any of the gang faction, fail\n if (player.inGang() && AllGangs[facName] !== undefined) {\n workerScript.log(\"workForFaction\", () => `Faction '${facName}' does not offer work at the moment.`);\n return false;\n }\n\n if (!player.factions.includes(facName)) {\n workerScript.log(\"workForFaction\", () => `You are not a member of '${facName}'`);\n return false;\n }\n\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"workForFaction\", () => txt);\n }\n\n const fac = Factions[facName];\n // Arrays listing factions that allow each time of work\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!FactionInfos[fac.name].offerHackingWork) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n player.startFactionHackWork(fac);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"workForFaction\", () => `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!FactionInfos[fac.name].offerFieldWork) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n player.startFactionFieldWork(fac);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"workForFaction\", () => `Started carrying out field missions for '${fac.name}'`);\n return true;\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!FactionInfos[fac.name].offerSecurityWork) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n player.startFactionSecurityWork(fac);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"workForFaction\", () => `Started carrying out security work for '${fac.name}'`);\n return true;\n default:\n workerScript.log(\"workForFaction\", () => `Invalid work type: '${type}`);\n }\n return true;\n },\n getFactionRep: function (_facName: unknown): number {\n const facName = helper.string(\"getFactionRep\", \"facName\", _facName);\n helper.updateDynamicRam(\"getFactionRep\", getRamCost(player, \"getFactionRep\"));\n helper.checkSingularityAccess(\"getFactionRep\");\n const faction = getFaction(\"getFactionRep\", facName);\n return faction.playerReputation;\n },\n getFactionFavor: function (_facName: unknown): number {\n const facName = helper.string(\"getFactionRep\", \"facName\", _facName);\n helper.updateDynamicRam(\"getFactionFavor\", getRamCost(player, \"getFactionFavor\"));\n helper.checkSingularityAccess(\"getFactionFavor\");\n const faction = getFaction(\"getFactionFavor\", facName);\n return faction.favor;\n },\n getFactionFavorGain: function (_facName: unknown): number {\n const facName = helper.string(\"getFactionFavorGain\", \"facName\", _facName);\n helper.updateDynamicRam(\"getFactionFavorGain\", getRamCost(player, \"getFactionFavorGain\"));\n helper.checkSingularityAccess(\"getFactionFavorGain\");\n const faction = getFaction(\"getFactionFavorGain\", facName);\n return faction.getFavorGain();\n },\n donateToFaction: function (_facName: unknown, _amt: unknown): boolean {\n const facName = helper.string(\"donateToFaction\", \"facName\", _facName);\n const amt = helper.number(\"donateToFaction\", \"amt\", _amt);\n helper.updateDynamicRam(\"donateToFaction\", getRamCost(player, \"donateToFaction\"));\n helper.checkSingularityAccess(\"donateToFaction\");\n const faction = getFaction(\"donateToFaction\", facName);\n if (!player.factions.includes(faction.name)) {\n workerScript.log(\"donateToFaction\", () => `You can't donate to '${facName}' because you aren't a member`);\n return false;\n }\n if (player.inGang() && faction.name === player.getGangFaction().name) {\n workerScript.log(\n \"donateToFaction\",\n () => `You can't donate to '${facName}' because youre managing a gang for it`,\n );\n return false;\n }\n if (typeof amt !== \"number\" || amt <= 0 || isNaN(amt)) {\n workerScript.log(\"donateToFaction\", () => `Invalid donation amount: '${amt}'.`);\n return false;\n }\n if (player.money < amt) {\n workerScript.log(\n \"donateToFaction\",\n () => `You do not have enough money to donate ${numeralWrapper.formatMoney(amt)} to '${facName}'`,\n );\n return false;\n }\n const repNeededToDonate = Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\n \"donateToFaction\",\n () =>\n `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`,\n );\n return false;\n }\n const repGain = (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;\n faction.playerReputation += repGain;\n player.loseMoney(amt, \"other\");\n workerScript.log(\n \"donateToFaction\",\n () =>\n `${numeralWrapper.formatMoney(amt)} donated to '${facName}' for ${numeralWrapper.formatReputation(\n repGain,\n )} reputation`,\n );\n return true;\n },\n createProgram: function (_programName: unknown, _focus: unknown = true): boolean {\n const programName = helper.string(\"createProgram\", \"programName\", _programName).toLowerCase();\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"createProgram\", getRamCost(player, \"createProgram\"));\n helper.checkSingularityAccess(\"createProgram\");\n\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"createProgram\", () => txt);\n }\n\n const p = Object.values(Programs).find((p) => p.name.toLowerCase() === programName);\n\n if (p == null) {\n workerScript.log(\"createProgram\", () => `The specified program does not exist: '${programName}`);\n return false;\n }\n\n if (player.hasProgram(p.name)) {\n workerScript.log(\"createProgram\", () => `You already have the '${p.name}' program`);\n return false;\n }\n\n const create = p.create;\n if (create === null) {\n workerScript.log(\"createProgram\", () => `You cannot create the '${p.name}' program`);\n return false;\n }\n\n if (!create.req(player)) {\n workerScript.log(\n \"createProgram\",\n () => `Hacking level is too low to create '${p.name}' (level ${create.level} req)`,\n );\n return false;\n }\n\n player.startCreateProgramWork(p.name, create.time, create.level);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"createProgram\", () => `Began creating program: '${programName}'`);\n return true;\n },\n commitCrime: function (_crimeRoughName: unknown): number {\n const crimeRoughName = helper.string(\"commitCrime\", \"crimeRoughName\", _crimeRoughName);\n helper.updateDynamicRam(\"commitCrime\", getRamCost(player, \"commitCrime\"));\n helper.checkSingularityAccess(\"commitCrime\");\n\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"commitCrime\", () => txt);\n }\n\n // Set Location to slums\n player.gotoLocation(LocationName.Slums);\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n // couldn't find crime\n throw helper.makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n workerScript.log(\"commitCrime\", () => `Attempting to commit ${crime.name}...`);\n return crime.commit(Router, player, 1, workerScript);\n },\n getCrimeChance: function (_crimeRoughName: unknown): number {\n const crimeRoughName = helper.string(\"getCrimeChance\", \"crimeRoughName\", _crimeRoughName);\n helper.updateDynamicRam(\"getCrimeChance\", getRamCost(player, \"getCrimeChance\"));\n helper.checkSingularityAccess(\"getCrimeChance\");\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw helper.makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(player);\n },\n getCrimeStats: function (_crimeRoughName: unknown): CrimeStats {\n const crimeRoughName = helper.string(\"getCrimeStats\", \"crimeRoughName\", _crimeRoughName);\n helper.updateDynamicRam(\"getCrimeStats\", getRamCost(player, \"getCrimeStats\"));\n helper.checkSingularityAccess(\"getCrimeStats\");\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw helper.makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getDarkwebPrograms: function (): string[] {\n helper.updateDynamicRam(\"getDarkwebPrograms\", getRamCost(player, \"getDarkwebPrograms\"));\n helper.checkSingularityAccess(\"getDarkwebPrograms\");\n\n // If we don't have Tor, log it and return [] (empty list)\n if (!player.hasTorRouter()) {\n workerScript.log(\"getDarkwebPrograms\", () => \"You do not have the TOR router.\");\n return [];\n }\n return Object.values(DarkWebItems).map((p) => p.program);\n },\n getDarkwebProgramCost: function (_programName: unknown): number {\n const programName = helper.string(\"getDarkwebProgramCost\", \"programName\", _programName).toLowerCase();\n helper.updateDynamicRam(\"getDarkwebProgramCost\", getRamCost(player, \"getDarkwebProgramCost\"));\n helper.checkSingularityAccess(\"getDarkwebProgramCost\");\n\n // If we don't have Tor, log it and return -1\n if (!player.hasTorRouter()) {\n workerScript.log(\"getDarkwebProgramCost\", () => \"You do not have the TOR router.\");\n // returning -1 rather than throwing an error to be consistent with purchaseProgram\n // which returns false if tor has\n return -1;\n }\n\n const item = Object.values(DarkWebItems).find((i) => i.program.toLowerCase() === programName);\n\n // If the program doesn't exist, throw an error. The reasoning here is that the 99% case is that\n // the player will be using this in automation scripts, and if they're asking for a program that\n // doesn't exist, it's the first time they've run the script. So throw an error to let them know\n // that they need to fix it.\n if (item == null) {\n throw helper.makeRuntimeErrorMsg(\n \"getDarkwebProgramCost\",\n `No such exploit ('${programName}') found on the darkweb! ` +\n `\\nThis function is not case-sensitive. Did you perhaps forget .exe at the end?`,\n );\n }\n\n if (player.hasProgram(item.program)) {\n workerScript.log(\"getDarkwebProgramCost\", () => `You already have the '${item.program}' program`);\n return 0;\n }\n return item.price;\n },\n };\n}\n","import { Settings } from \"./Settings/Settings\";\n\nexport interface IPort {\n write: (value: any) => any;\n tryWrite: (value: any) => boolean;\n read: () => any;\n peek: () => any;\n full: () => boolean;\n empty: () => boolean;\n clear: () => void;\n}\n\nexport function NetscriptPort(): IPort {\n const data: any[] = [];\n\n return {\n write: (value: any): any => {\n data.push(value);\n if (data.length > Settings.MaxPortCapacity) {\n return data.shift();\n }\n return null;\n },\n\n tryWrite: (value: any): boolean => {\n if (data.length >= Settings.MaxPortCapacity) {\n return false;\n }\n data.push(value);\n return true;\n },\n\n read: (): any => {\n if (data.length === 0) {\n return \"NULL PORT DATA\";\n }\n return data.shift();\n },\n\n peek: (): any => {\n if (data.length === 0) {\n return \"NULL PORT DATA\";\n } else {\n const foo = data.slice();\n return foo[0];\n }\n },\n\n full: (): boolean => {\n return data.length == Settings.MaxPortCapacity;\n },\n\n empty: (): boolean => {\n return data.length === 0;\n },\n\n clear: (): void => {\n data.length = 0;\n },\n };\n}\n","/**\n * Clears defined properties from an object.\n * Does not delete up the prototype chain.\n * @deprecated Look into using `Map` or `Set` rather than manipulating properties on an Object.\n * @param obj the object to clear all properties\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function clearObject(obj: any): void {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n // tslint:disable-next-line:no-dynamic-delete\n delete obj[key];\n }\n }\n}\n","import { PlayerOwnedSourceFile } from \"./PlayerOwnedSourceFile\";\nimport { SourceFiles } from \"./SourceFiles\";\n\nimport { Player } from \"../Player\";\n\nexport function applySourceFile(srcFile: PlayerOwnedSourceFile): void {\n const srcFileKey = \"SourceFile\" + srcFile.n;\n const sourceFileObject = SourceFiles[srcFileKey];\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 // The Source Genesis\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 16 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n Player.hacking_chance_mult *= incMult;\n Player.hacking_speed_mult *= incMult;\n Player.hacking_money_mult *= incMult;\n Player.hacking_grow_mult *= incMult;\n Player.hacking_mult *= incMult;\n Player.strength_mult *= incMult;\n Player.defense_mult *= incMult;\n Player.dexterity_mult *= incMult;\n Player.agility_mult *= incMult;\n Player.charisma_mult *= incMult;\n Player.hacking_exp_mult *= incMult;\n Player.strength_exp_mult *= incMult;\n Player.defense_exp_mult *= incMult;\n Player.dexterity_exp_mult *= incMult;\n Player.agility_exp_mult *= incMult;\n Player.charisma_exp_mult *= incMult;\n Player.company_rep_mult *= incMult;\n Player.faction_rep_mult *= incMult;\n Player.crime_money_mult *= incMult;\n Player.crime_success_mult *= incMult;\n Player.hacknet_node_money_mult *= incMult;\n Player.hacknet_node_purchase_cost_mult *= decMult;\n Player.hacknet_node_ram_cost_mult *= decMult;\n Player.hacknet_node_core_cost_mult *= decMult;\n Player.hacknet_node_level_cost_mult *= decMult;\n Player.work_money_mult *= incMult;\n break;\n }\n case 2: {\n // Rise of the Underworld\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 24 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.crime_money_mult *= incMult;\n Player.crime_success_mult *= incMult;\n Player.charisma_mult *= incMult;\n break;\n }\n case 3: {\n // Corporatocracy\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.charisma_mult *= incMult;\n Player.work_money_mult *= incMult;\n break;\n }\n case 4: {\n // The Singularity\n // No effects, just gives access to Singularity functions\n break;\n }\n case 5: {\n // Artificial Intelligence\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.hacking_chance_mult *= incMult;\n Player.hacking_speed_mult *= incMult;\n Player.hacking_money_mult *= incMult;\n Player.hacking_grow_mult *= incMult;\n Player.hacking_mult *= incMult;\n Player.hacking_exp_mult *= incMult;\n break;\n }\n case 6: {\n // Bladeburner\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.strength_exp_mult *= incMult;\n Player.defense_exp_mult *= incMult;\n Player.dexterity_exp_mult *= incMult;\n Player.agility_exp_mult *= incMult;\n Player.strength_mult *= incMult;\n Player.defense_mult *= incMult;\n Player.dexterity_mult *= incMult;\n Player.agility_mult *= incMult;\n break;\n }\n case 7: {\n // Bladeburner 2079\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.bladeburner_max_stamina_mult *= incMult;\n Player.bladeburner_stamina_gain_mult *= incMult;\n Player.bladeburner_analysis_mult *= incMult;\n Player.bladeburner_success_chance_mult *= incMult;\n break;\n }\n case 8: {\n // Ghost of Wall Street\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 12 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.hacking_grow_mult *= incMult;\n break;\n }\n case 9: {\n // Hacktocracy\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n Player.hacknet_node_core_cost_mult *= decMult;\n Player.hacknet_node_level_cost_mult *= decMult;\n Player.hacknet_node_money_mult *= incMult;\n Player.hacknet_node_purchase_cost_mult *= decMult;\n Player.hacknet_node_ram_cost_mult *= decMult;\n break;\n }\n case 10: {\n // Digital Carbon\n // No effects, just grants sleeves\n break;\n }\n case 11: {\n // The Big Crash\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 32 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.work_money_mult *= incMult;\n Player.company_rep_mult *= incMult;\n break;\n }\n case 12: // The Recursion\n // Grants neuroflux.\n break;\n case 13: // They're Lunatics\n // Grants more space on Stanek's Gift.\n break;\n default:\n console.error(`Invalid source file number: ${srcFile.n}`);\n break;\n }\n\n sourceFileObject.owned = true;\n}\n","import { Player } from \"../Player\";\nimport { sanitizeExploits } from \"./Exploit\";\n\nexport function applyExploit(): void {\n if (Player.exploits && Player.exploits.length === 0) {\n return;\n }\n Player.exploits = sanitizeExploits(Player.exploits);\n const inc = Math.pow(1.001, Player.exploits.length);\n const dec = Math.pow(0.999, Player.exploits.length);\n\n Player.hacking_chance_mult *= inc;\n Player.hacking_speed_mult *= inc;\n Player.hacking_money_mult *= inc;\n Player.hacking_grow_mult *= inc;\n Player.hacking_mult *= inc;\n\n Player.strength_mult *= inc;\n Player.defense_mult *= inc;\n Player.dexterity_mult *= inc;\n Player.agility_mult *= inc;\n Player.charisma_mult *= inc;\n\n Player.hacking_exp_mult *= inc;\n Player.strength_exp_mult *= inc;\n Player.defense_exp_mult *= inc;\n Player.dexterity_exp_mult *= inc;\n Player.agility_exp_mult *= inc;\n Player.charisma_exp_mult *= inc;\n\n Player.company_rep_mult *= inc;\n Player.faction_rep_mult *= inc;\n\n Player.crime_money_mult *= inc;\n Player.crime_success_mult *= inc;\n\n Player.hacknet_node_money_mult *= inc;\n Player.hacknet_node_purchase_cost_mult *= dec;\n Player.hacknet_node_ram_cost_mult *= dec;\n Player.hacknet_node_core_cost_mult *= dec;\n Player.hacknet_node_level_cost_mult *= dec;\n\n Player.work_money_mult *= inc;\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { parseAliasDeclaration, printAliases } from \"../../Alias\";\n\nexport function alias(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n printAliases();\n return;\n }\n if (args.length === 1) {\n if (parseAliasDeclaration(args[0] + \"\")) {\n terminal.print(`Set alias ${args[0]}`);\n return;\n }\n }\n if (args.length === 2) {\n if (args[0] === \"-g\") {\n if (parseAliasDeclaration(args[1] + \"\", true)) {\n terminal.print(`Set global alias ${args[1]}`);\n return;\n }\n }\n }\n terminal.error('Incorrect usage of alias command. Usage: alias [-g] [aliasname=\"value\"]');\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function analyze(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n terminal.startAnalyze(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\n\nexport function backdoor(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of backdoor command. Usage: backdoor\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\"Can only backdoor normal servers\");\n }\n\n const normalServer = server as Server;\n\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n } else if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot backdoor\");\n } else if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n } else if (normalServer instanceof HacknetServer) {\n terminal.error(\"Cannot use backdoor on this type of Server\");\n } else {\n terminal.startBackdoor(player);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { listAllDarkwebItems, buyAllDarkwebItems, buyDarkwebItem } from \"../../DarkWeb/DarkWeb\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nexport function buy(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (!GetServer(SpecialServers.DarkWeb)) {\n terminal.error(\n \"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 );\n return;\n }\n if (args.length != 1) {\n terminal.print(\"Incorrect number of arguments. Usage: \");\n terminal.print(\"buy -l\");\n terminal.print(\"buy -a\");\n terminal.print(\"buy [item name]\");\n return;\n }\n const arg = args[0] + \"\";\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n listAllDarkwebItems();\n } else if (arg == \"-a\" || arg == \"--all\") {\n buyAllDarkwebItems();\n } else {\n buyDarkwebItem(arg);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { showMessage } from \"../../Message/MessageHelpers\";\nimport { showLiterature } from \"../../Literature/LiteratureHelpers\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nexport function cat(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of cat command. Usage: cat [file]\");\n return;\n }\n const relative_filename = args[0] + \"\";\n const filename = terminal.getFilepath(relative_filename);\n if (!filename.endsWith(\".msg\") && !filename.endsWith(\".lit\") && !filename.endsWith(\".txt\") && !filename.endsWith(\".script\") && !filename.endsWith(\".js\") && !filename.endsWith(\".ns\")) {\n terminal.error(\n \"Only .msg, .txt, .lit, .script, .js, and .ns files are viewable with cat (filename must end with .msg, .txt, .lit, .script, .js, or .ns)\",\n );\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.endsWith(\".msg\")) throw new Error(\".lit file should not be a .msg\");\n showLiterature(file);\n return;\n } else if (filename.endsWith(\".msg\")) {\n const file = server.messages[i];\n if (file !== filename) continue;\n showMessage(file);\n return;\n }\n }\n } else if (filename.endsWith(\".txt\")) {\n const txt = terminal.getTextFile(player, relative_filename);\n if (txt != null) {\n txt.show();\n return;\n }\n } else if (filename.endsWith(\".script\") || filename.endsWith(\".js\") || filename.endsWith(\".ns\")) {\n const script = terminal.getScript(player, relative_filename);\n if (script != null) {\n dialogBoxCreate(`${script.filename}

    ${script.code}`);\n return;\n }\n }\n\n terminal.error(`No such file ${filename}`);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport { evaluateDirectoryPath, removeTrailingSlash } from \"../DirectoryHelpers\";\n\nexport function cd(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length > 1) {\n terminal.error(\"Incorrect number of arguments. Usage: cd [dir]\");\n } else {\n let dir = args.length === 1 ? args[0] + \"\" : \"/\";\n\n let evaledDir: string | null = \"\";\n if (dir === \"/\") {\n evaledDir = \"/\";\n } else {\n // Ignore trailing slashes\n dir = removeTrailingSlash(dir);\n\n evaledDir = evaluateDirectoryPath(dir, terminal.cwd());\n if (evaledDir === null || evaledDir === \"\") {\n terminal.error(\"Invalid path. Failed to change directories\");\n return;\n }\n\n const server = player.getCurrentServer();\n if (\n !server.scripts.some((script) => script.filename.startsWith(evaledDir + \"\")) &&\n !server.textFiles.some((file) => file.fn.startsWith(evaledDir + \"\"))\n ) {\n terminal.error(\"Invalid path. Failed to change directories\");\n return;\n }\n }\n\n terminal.setcwd(evaledDir);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport { isScriptFilename, validScriptExtensions } from \"../../Script/isScriptFilename\";\n\nexport function check(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length < 1) {\n terminal.error(`Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...`);\n } else {\n const scriptName = terminal.getFilepath(args[0] + \"\");\n // Can only tail script files\n if (!isScriptFilename(scriptName)) {\n terminal.error(\n `'check' can only be called on scripts files (filename must end with ${validScriptExtensions.join(\", \")})`,\n );\n return;\n }\n\n // Check that the script is running on this machine\n const runningScript = findRunningScript(scriptName, args.slice(1), server);\n if (runningScript == null) {\n terminal.error(`No script named ${scriptName} is running on the server`);\n return;\n }\n runningScript.displayLog();\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { getServerOnNetwork } from \"../../Server/ServerHelpers\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\n\nexport function connect(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n // Disconnect from current server in terminal and connect to new one\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of connect command. Usage: connect [hostname]\");\n return;\n }\n\n const hostname = args[0] + \"\";\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = getServerOnNetwork(server, i);\n if (other === null) throw new Error(`Server on network should not be null`);\n if (other.hostname == hostname) {\n terminal.connectToServer(player, hostname);\n return;\n }\n }\n\n const other = GetServer(hostname);\n if (other !== null) {\n if (other instanceof Server && other.backdoorInstalled) {\n terminal.connectToServer(player, hostname);\n return;\n }\n terminal.error(`Cannot directly connect to ${hostname}. Make sure the server is backdoored or adjacent to your current Server`);\n } else {\n terminal.error(\"Host not found\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { getDestinationFilepath, areFilesEqual } from \"../DirectoryHelpers\";\n\nexport function cp(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of cp command. Usage: cp [src] [dst]\");\n return;\n }\n // Convert a relative path source file to the absolute path.\n const src = terminal.getFilepath(args[0] + \"\");\n if (src === null) {\n terminal.error(\"src cannot be a directory\");\n return;\n }\n\n // Get the destination based on the source file and the current directory\n const t_dst = getDestinationFilepath(args[1] + \"\", src, terminal.cwd());\n if (t_dst === null) {\n terminal.error(\"error parsing dst file\");\n return;\n }\n\n // Convert a relative path destination file to the absolute path.\n const dst = terminal.getFilepath(t_dst);\n if (areFilesEqual(src, dst)) {\n terminal.error(\"src and dst cannot be the same\");\n return;\n }\n const srcExt = src.slice(src.lastIndexOf(\".\"));\n const dstExt = dst.slice(dst.lastIndexOf(\".\"));\n if (srcExt !== dstExt) {\n terminal.error(\"src and dst must have the same extension.\");\n return;\n }\n if (!isScriptFilename(src) && !src.endsWith(\".txt\")) {\n terminal.error(\"cp only works for scripts and .txt files\");\n return;\n }\n\n // Scp for txt files\n if (src.endsWith(\".txt\")) {\n let txtFile = null;\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (areFilesEqual(server.textFiles[i].fn, src)) {\n txtFile = server.textFiles[i];\n break;\n }\n }\n\n if (txtFile === null) {\n return terminal.error(\"No such file exists!\");\n }\n\n const tRes = server.writeToTextFile(dst, txtFile.text);\n if (!tRes.success) {\n terminal.error(\"cp failed\");\n return;\n }\n if (tRes.overwritten) {\n terminal.print(`WARNING: ${dst} already exists and will be overwriten`);\n terminal.print(`${dst} overwritten`);\n return;\n }\n terminal.print(`${dst} copied`);\n return;\n }\n\n // Get the current script\n let sourceScript = null;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (areFilesEqual(server.scripts[i].filename, src)) {\n sourceScript = server.scripts[i];\n break;\n }\n }\n if (sourceScript == null) {\n terminal.error(\"cp failed. No such script exists\");\n return;\n }\n\n const sRes = server.writeToScriptFile(player, dst, sourceScript.code);\n if (!sRes.success) {\n terminal.error(`cp failed`);\n return;\n }\n if (sRes.overwritten) {\n terminal.print(`WARNING: ${dst} already exists and will be overwritten`);\n terminal.print(`${dst} overwritten`);\n return;\n }\n terminal.print(`${dst} copied`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function expr(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n terminal.error(\"Incorrect usage of expr command. Usage: expr [math expression]\");\n return;\n }\n const expr = args.join(\"\");\n\n // Sanitize the math expression\n const sanitizedExpr = expr.replace(/s+/g, \"\").replace(/[^-()\\d/*+.%]/g, \"\");\n let result;\n try {\n result = eval(sanitizedExpr);\n } catch (e) {\n terminal.error(`Could not evaluate expression: ${sanitizedExpr}`);\n return;\n }\n terminal.print(result);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nexport function free(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of free command. Usage: free\");\n return;\n }\n const ram = numeralWrapper.formatRAM(player.getCurrentServer().maxRam);\n const used = numeralWrapper.formatRAM(player.getCurrentServer().ramUsed);\n const avail = numeralWrapper.formatRAM(player.getCurrentServer().maxRam - player.getCurrentServer().ramUsed);\n const maxLength = Math.max(ram.length, Math.max(used.length, avail.length));\n const usedPercent = numeralWrapper.formatPercentage(\n player.getCurrentServer().ramUsed / player.getCurrentServer().maxRam,\n );\n\n terminal.print(`Total: ${\" \".repeat(maxLength - ram.length)}${ram}`);\n terminal.print(`Used: ${\" \".repeat(maxLength - used.length)}${used} (${usedPercent})`);\n terminal.print(`Available: ${\" \".repeat(maxLength - avail.length)}${avail}`);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\n\nexport function grow(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of grow command. Usage: grow\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\n \"Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n }\n const normalServer = server as Server;\n // Hack the current PC (usually for money)\n // You can't grow your home pc or servers you purchased\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n return;\n }\n if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot grow\");\n return;\n }\n if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n return;\n }\n terminal.startGrow(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\n\nexport function hack(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of hack command. Usage: hack\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\n \"Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n }\n const normalServer = server as Server;\n // Hack the current PC (usually for money)\n // You can't hack your home pc or servers you purchased\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n return;\n }\n if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot hack\");\n return;\n }\n if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n return;\n }\n terminal.startHack(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { TerminalHelpText, HelpTexts } from \"../HelpText\";\n\nexport function help(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0 && args.length !== 1) {\n terminal.error(\"Incorrect usage of help command. Usage: help\");\n return;\n }\n if (args.length === 0) {\n TerminalHelpText.forEach((line) => terminal.print(line));\n } else {\n const cmd = args[0] + \"\";\n const txt = HelpTexts[cmd];\n if (txt == null) {\n terminal.error(\"No help topics match '\" + cmd + \"'\");\n return;\n }\n txt.forEach((t) => terminal.print(t));\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function history(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n terminal.commandHistory.forEach((command, index) => {\n terminal.print(`${index.toString().padStart(2)} ${command}`);\n });\n return;\n }\n const arg = args[0] + \"\";\n if (arg === \"-c\" || arg === \"--clear\") {\n player.terminalCommandHistory = [];\n terminal.commandHistory = [];\n terminal.commandHistoryIndex = 1;\n } else {\n terminal.error(\"Incorrect usage of history command. usage: history [-c]\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function home(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of home command. Usage: home\");\n return;\n }\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = player.getHomeComputer().hostname;\n player.getCurrentServer().isConnectedTo = true;\n terminal.print(\"Connected to home\");\n terminal.setcwd(\"/\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function hostname(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of hostname command. Usage: hostname\");\n return;\n }\n terminal.print(player.getCurrentServer().hostname);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\n\nexport function kill(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length < 1) {\n terminal.error(\"Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...\");\n return;\n }\n if (typeof args[0] === \"boolean\") {\n return;\n }\n\n // Kill by PID\n if (typeof args[0] === \"number\") {\n const pid = args[0];\n const res = killWorkerScript(pid);\n if (res) {\n terminal.print(`Killing script with PID ${pid}`);\n } else {\n terminal.error(`Failed to kill script with PID ${pid}. No such script is running`);\n }\n\n return;\n }\n\n const scriptName = terminal.getFilepath(args[0]);\n const runningScript = server.getRunningScript(scriptName, args.slice(1));\n if (runningScript == null) {\n terminal.error(\"No such script is running. Nothing to kill\");\n return;\n }\n killWorkerScript(runningScript, server.hostname, false);\n terminal.print(`Killing ${scriptName}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport { WorkerScriptStartStopEventEmitter } from \"../../Netscript/WorkerScriptStartStopEventEmitter\";\n\nexport function killall(terminal: ITerminal, router: IRouter, player: IPlayer, server: BaseServer): void {\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n killWorkerScript(server.runningScripts[i], server.hostname, false);\n }\n WorkerScriptStartStopEventEmitter.emit();\n terminal.print(\"Killing all running scripts\");\n}\n","import { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { toString } from \"lodash\";\nimport React from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { evaluateDirectoryPath, getFirstParentDirectory, isValidDirectoryPath } from \"../DirectoryHelpers\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ITerminal } from \"../ITerminal\";\nimport * as libarg from \"arg\"\n\nexport function ls(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n let flags;\n try {\n flags = libarg({\n '-l': Boolean,\n '--grep': String,\n '-g': '--grep',\n },\n { argv: args }\n )\n } catch (e) {\n // catch passing only -g / --grep with no string to use as the search\n incorrectUsage()\n return;\n }\n const filter = flags['--grep']\n\n const numArgs = args.length;\n function incorrectUsage(): void {\n terminal.error(\"Incorrect usage of ls command. Usage: ls [dir] [-l] [-g, --grep pattern]\");\n }\n\n if (numArgs > 4) {\n return incorrectUsage();\n }\n\n // Directory path\n let prefix = terminal.cwd();\n if (!prefix.endsWith(\"/\")) {\n prefix += \"/\";\n }\n\n // If first arg doesn't contain a - it must be the file/folder\n const dir = (args[0] && typeof args[0] == \"string\" && !args[0].startsWith(\"-\")) ? args[0] : \"\"\n const newPath = evaluateDirectoryPath(dir + \"\", terminal.cwd());\n prefix = newPath || \"\";\n if (!prefix.endsWith(\"/\")) {\n prefix += \"/\";\n }\n if (!isValidDirectoryPath(prefix)) {\n return incorrectUsage();\n }\n\n // Root directory, which is the same as no 'prefix' at all\n if (prefix === \"/\") {\n prefix = \"\";\n }\n\n // Display all programs and scripts\n const allPrograms: string[] = [];\n const allScripts: string[] = [];\n const allTextFiles: string[] = [];\n const allContracts: string[] = [];\n const allMessages: string[] = [];\n const folders: string[] = [];\n\n function handleFn(fn: string, dest: string[]): void {\n let parsedFn = fn;\n if (prefix) {\n if (!fn.startsWith(prefix)) {\n return;\n } else {\n parsedFn = fn.slice(prefix.length, fn.length);\n }\n }\n\n if (filter && !parsedFn.includes(filter)) {\n return;\n }\n\n // If the fn includes a forward slash, it must be in a subdirectory.\n // Therefore, we only list the \"first\" directory in its path\n if (parsedFn.includes(\"/\")) {\n const firstParentDir = getFirstParentDirectory(parsedFn);\n if (filter && !firstParentDir.includes(filter)) {\n return;\n }\n\n if (!folders.includes(firstParentDir)) {\n folders.push(firstParentDir);\n }\n\n return;\n }\n\n dest.push(parsedFn);\n }\n\n // Get all of the programs and scripts on the machine into one temporary array\n const s = player.getCurrentServer();\n for (const program of s.programs) handleFn(program, allPrograms);\n for (const script of s.scripts) handleFn(script.filename, allScripts);\n for (const txt of s.textFiles) handleFn(txt.fn, allTextFiles);\n for (const contract of s.contracts) handleFn(contract.fn, allContracts);\n for (const msgOrLit of s.messages) handleFn(msgOrLit, allMessages);\n\n // Sort the files/folders alphabetically then print each\n allPrograms.sort();\n allScripts.sort();\n allTextFiles.sort();\n allContracts.sort();\n allMessages.sort();\n folders.sort();\n\n interface ClickableScriptRowProps {\n row: string;\n prefix: string;\n hostname: string;\n }\n\n function ClickableScriptRow({ row, prefix, hostname }: ClickableScriptRowProps): React.ReactElement {\n const classes = makeStyles((theme: Theme) =>\n createStyles({\n scriptLinksWrap: {\n display: \"inline-flex\",\n color: theme.palette.warning.main,\n },\n scriptLink: {\n cursor: \"pointer\",\n textDecorationLine: \"underline\",\n paddingRight: \"1.15em\",\n \"&:last-child\": { padding: 0 },\n },\n }),\n )();\n\n const rowSplit = row.split(\"~\");\n let rowSplitArray = rowSplit.map((x) => [x.trim(), x.replace(x.trim(), \"\")]);\n rowSplitArray = rowSplitArray.filter((x) => !!x[0]);\n\n function onScriptLinkClick(filename: string): void {\n if (player.getCurrentServer().hostname !== hostname) {\n return terminal.error(`File is not on this server, connect to ${hostname} and try again`);\n }\n if (filename.startsWith(\"/\")) filename = filename.slice(1);\n const filepath = terminal.getFilepath(`${prefix}${filename}`);\n const code = toString(terminal.getScript(player, filepath)?.code);\n router.toScriptEditor({ [filepath]: code });\n }\n\n return (\n \n {rowSplitArray.map((rowItem) => (\n \n onScriptLinkClick(rowItem[0])}>\n {rowItem[0]}\n \n \n {rowItem[1]}\n \n \n ))}\n \n );\n }\n\n function postSegments(segments: string[], flags: any, style?: any, linked?: boolean): void {\n const maxLength = Math.max(...segments.map((s) => s.length)) + 1;\n const filesPerRow = flags[\"-l\"] === true ? 1 : Math.ceil(80 / maxLength);\n for (let i = 0; i < segments.length; i++) {\n let row = \"\";\n for (let col = 0; col < filesPerRow; col++) {\n if (!(i < segments.length)) break;\n row += segments[i];\n row += \" \".repeat(maxLength * (col + 1) - row.length);\n if(linked) {\n row += \"~\";\n }\n i++;\n }\n i--;\n if (!style) {\n terminal.print(row);\n } else if (linked) {\n terminal.printRaw();\n } else {\n terminal.printRaw({row});\n }\n }\n }\n\n const groups = [\n { segments: folders, style: { color: \"cyan\" } },\n { segments: allMessages },\n { segments: allTextFiles },\n { segments: allPrograms },\n { segments: allContracts },\n { segments: allScripts, style: { color: \"yellow\", fontStyle: \"bold\" }, linked: true },\n ].filter((g) => g.segments.length > 0);\n for (let i = 0; i < groups.length; i++) {\n postSegments(groups[i].segments, flags, groups[i].style, groups[i].linked);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function lscpu(terminal: ITerminal, router: IRouter, player: IPlayer): void {\n terminal.print(player.getCurrentServer().cpuCores + \" Core(s)\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Settings } from \"../../Settings/Settings\";\n\nexport function mem(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 1 && args.length !== 3) {\n terminal.error(\"Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]\");\n return;\n }\n\n const scriptName = args[0] + \"\";\n let numThreads = 1;\n if (args.length === 3 && args[1] === \"-t\") {\n numThreads = Math.round(parseInt(args[2] + \"\"));\n if (isNaN(numThreads) || numThreads < 1) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 1\");\n return;\n }\n }\n\n const script = terminal.getScript(player, scriptName);\n if (script == null) {\n terminal.error(\"mem failed. No such script exists!\");\n return;\n }\n\n const ramUsage = script.ramUsage * numThreads;\n\n terminal.print(\n `This script requires ${numeralWrapper.formatRAM(ramUsage)} of RAM to run for ${numThreads} thread(s)`,\n );\n\n const verboseEntries = script.ramUsageEntries?.sort((a, b) => b.cost - a.cost) ?? [];\n const padding = Settings.UseIEC60027_2 ? 9 : 8;\n for (const entry of verboseEntries) {\n terminal.print(`${numeralWrapper.formatRAM(entry.cost * numThreads).padStart(padding)} | ${entry.name} (${entry.type})`);\n }\n\n if (ramUsage > 0 && verboseEntries.length === 0) {\n // Let's warn the user that he might need to save his script again to generate the detailed entries\n terminal.warn('You might have to open & save this script to see the detailed RAM usage information.');\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { TextFile } from \"../../TextFile\";\nimport { Script } from \"../../Script/Script\";\nimport { getDestinationFilepath, areFilesEqual } from \"../DirectoryHelpers\";\n\nexport function mv(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\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 t_dest = args[1] + \"\";\n\n if (!isScriptFilename(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 if (srcFile == null) {\n terminal.error(`Source file ${source} does not exist`);\n return;\n }\n\n const sourcePath = terminal.getFilepath(source);\n // Get the destination based on the source file and the current directory\n const dest = getDestinationFilepath(t_dest, source, terminal.cwd());\n if (dest === null) {\n terminal.error(\"error parsing dst file\");\n return;\n }\n\n const destFile = terminal.getFile(player, dest);\n const destPath = terminal.getFilepath(dest);\n if (areFilesEqual(sourcePath, destPath)) {\n terminal.error(`Source and destination files are the same file`);\n return;\n }\n\n // 'mv' command only works on scripts and txt files.\n // Also, you can't convert between different file types\n if (isScriptFilename(source)) {\n const script = srcFile as Script;\n if (!isScriptFilename(destPath)) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n }\n\n // Command doesnt work if script is running\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 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) {\n const textFile = srcFile as TextFile;\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 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","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport {commonEditor} from './common/editor';\n\nexport function nano(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n return commonEditor('nano', {terminal, router, player, server, args});\n}\n","interface Position {\n row: number;\n column: number;\n}\n\nclass PositionTracker {\n positions: Map;\n\n constructor() {\n this.positions = new Map();\n }\n\n saveCursor(filename: string, pos: Position): void {\n this.positions.set(filename, pos);\n }\n\n getCursor(filename: string): Position {\n const position = this.positions.get(filename);\n if (!position) {\n return {\n row: -1,\n column: -1,\n };\n }\n return position;\n }\n}\n\nexport const CursorPositions: PositionTracker = new PositionTracker();\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport * as libarg from \"arg\"\n\nexport function ps(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n let flags;\n try{\n flags = libarg({\n '--grep': String,\n '-g': '--grep'\n },\n { argv: args }\n )\n }catch(e){\n // catch passing only -g / --grep with no string to use as the search\n terminal.error(\"Incorrect usage of ps command. Usage: ps [-g, --grep pattern]\");\n return;\n }\n const pattern = flags['--grep']\n if (pattern) {\n const re = new RegExp(pattern.toString())\n const matching = server.runningScripts.filter((x) => re.test(x.filename))\n for (let i = 0; i < matching.length; i++) {\n const rsObj = matching[i];\n let res = `(PID - ${rsObj.pid}) ${rsObj.filename}`;\n for (let j = 0; j < rsObj.args.length; ++j) {\n res += \" \" + rsObj.args[j].toString();\n }\n terminal.print(res);\n }\n }\n if(args.length === 0){\n for (let i = 0; i < server.runningScripts.length; i++) {\n const rsObj = server.runningScripts[i];\n let res = `(PID - ${rsObj.pid}) ${rsObj.filename}`;\n for (let j = 0; j < rsObj.args.length; ++j) {\n res += \" \" + rsObj.args[j].toString();\n }\n terminal.print(res);\n }\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { IReturnStatus } from \"../../types\";\n\nexport function rm(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 1) {\n terminal.error(\"Incorrect number of arguments. Usage: rm [program/script]\");\n return;\n }\n\n // Check programs\n let delTarget;\n let status: IReturnStatus = {\n res: true,\n msg: \"\",\n };\n try {\n delTarget = terminal.getFilepath(args[0] + \"\");\n status = server.removeFile(delTarget);\n } catch (err) {\n status = {\n res: false,\n msg: \"No such file exists\",\n };\n }\n\n if (!status.res && status.msg) {\n terminal.error(status.msg);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { runScript } from \"./runScript\";\nimport { runProgram } from \"./runProgram\";\n\nexport function run(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n // Run a program or a script\n if (args.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...\");\n } else {\n const executableName = args[0] + \"\";\n\n // Check if its a script or just a program/executable\n if (isScriptFilename(executableName)) {\n runScript(terminal, router, player, server, args);\n } else if (executableName.endsWith(\".cct\")) {\n terminal.runContract(player, executableName);\n } else {\n runProgram(terminal, router, player, server, args);\n }\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { LogBoxEvents } from \"../../ui/React/LogBoxManager\";\nimport { startWorkerScript } from \"../../NetscriptWorker\";\nimport { RunningScript } from \"../../Script/RunningScript\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport * as libarg from \"arg\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nexport function runScript(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n commandArgs: (string | number | boolean)[],\n): void {\n if (commandArgs.length < 1) {\n terminal.error(\n `Bug encountered with Terminal.runScript(). Command array has a length of less than 1: ${commandArgs}`,\n );\n return;\n }\n\n const scriptName = terminal.getFilepath(commandArgs[0] + \"\");\n\n const runArgs = { \"--tail\": Boolean, \"-t\": Number };\n const flags = libarg(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 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 const numThreads = !isNaN(threadFlag) && threadFlag > 0 ? threadFlag : 1;\n const args = flags[\"_\"];\n\n // Check if this script is already running\n if (findRunningScript(scriptName, args, server) != null) {\n terminal.error(\"This script is already running with the same args. Cannot run multiple instances with the same args\");\n return;\n }\n\n // Check if the script exists and if it does run it\n for (let i = 0; i < server.scripts.length; i++) {\n if (server.scripts[i].filename !== scriptName) {\n continue;\n }\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n script.server = player.getCurrentServer().hostname;\n const ramUsage = script.ramUsage * numThreads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (!server.hasAdminRights) {\n terminal.error(\"Need root access to run script\");\n return;\n }\n\n if (ramUsage > ramAvailable) {\n terminal.error(\n \"This machine does not have enough RAM to run this script with \" +\n numThreads +\n \" threads. Script requires \" +\n numeralWrapper.formatRAM(ramUsage) +\n \" of RAM\",\n );\n return;\n }\n\n // Able to run script\n const runningScript = new RunningScript(script, args);\n runningScript.threads = numThreads;\n\n const success = startWorkerScript(player, runningScript, server);\n if (!success) {\n terminal.error(`Failed to start script`);\n return;\n }\n\n terminal.print(\n `Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`,\n );\n if (runningScript.filename.endsWith(\".ns\")) {\n terminal.warn(\".ns files are deprecated, please rename everything to .js\");\n }\n if (tailFlag) {\n LogBoxEvents.emit(runningScript);\n }\n return;\n }\n\n terminal.error(\"No such script\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Programs } from \"../../Programs/Programs\";\n\nexport function runProgram(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length < 1) {\n return;\n }\n\n // Check if you have the program on your computer. If you do, execute it, otherwise\n // display an error message\n const programName = args[0] + \"\";\n\n if (!player.hasProgram(programName)) {\n terminal.error(\n `No such (exe, script, js, ns, or cct) file! (Only programs that exist on your home computer or scripts on ${\n player.getCurrentServer().hostname\n } can be run)`,\n );\n return;\n }\n\n if (args.length < 1) {\n return;\n }\n\n for (const program of Object.values(Programs)) {\n if (program.name.toLocaleLowerCase() === programName.toLocaleLowerCase()) {\n program.run(\n router,\n terminal,\n player,\n server,\n args.slice(1).map((arg) => arg + \"\"),\n );\n return;\n }\n }\n\n terminal.error(\"Invalid executable. Cannot be run\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { getServerOnNetwork } from \"../../Server/ServerHelpers\";\n\nexport function scan(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of scan command. Usage: scan\");\n return;\n }\n\n // Displays available network connections using TCP\n const currServ = player.getCurrentServer();\n const servers = currServ.serversOnNetwork.map((_, i) => {\n const server = getServerOnNetwork(currServ, i);\n if (server === null) throw new Error(\"Server should not be null\");\n return {\n hostname: server.hostname,\n ip: server.ip,\n hasRoot: server.hasAdminRights ? \"Y\" : \"N\",\n };\n });\n servers.unshift({\n hostname: \"Hostname\",\n ip: \"IP\",\n hasRoot: \"Root Access\",\n });\n const maxHostname = Math.max(...servers.map((s) => s.hostname.length));\n const maxIP = Math.max(...servers.map((s) => s.ip.length));\n for (const server of servers) {\n if (!server) continue;\n let entry = server.hostname;\n entry += \" \".repeat(maxHostname - server.hostname.length + 1);\n entry += server.ip;\n entry += \" \".repeat(maxIP - server.ip.length + 1);\n entry += server.hasRoot;\n terminal.print(entry);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Programs } from \"../../Programs/Programs\";\n\nexport function scananalyze(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n terminal.executeScanAnalyzeCommand(player, 1);\n } else {\n // # of args must be 2 or 3\n if (args.length > 2) {\n terminal.error(\"Incorrect usage of scan-analyze command. usage: scan-analyze [depth]\");\n return;\n }\n let all = false;\n if (args.length === 2 && args[1] === \"-a\") {\n all = true;\n }\n\n const depth = parseInt(args[0] + \"\");\n\n if (isNaN(depth) || depth < 0) {\n terminal.error(\"Incorrect usage of scan-analyze command. depth argument must be positive numeric\");\n return;\n }\n if (depth > 3 && !player.hasProgram(Programs.DeepscanV1.name) && !player.hasProgram(Programs.DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 3\");\n return;\n } else if (depth > 5 && !player.hasProgram(Programs.DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 5\");\n return;\n } else if (depth > 10) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 10\");\n return;\n }\n terminal.executeScanAnalyzeCommand(player, depth, all);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\n\nexport function scp(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of scp command. Usage: scp [file] [destination hostname]\");\n return;\n }\n const scriptname = terminal.getFilepath(args[0] + \"\");\n if (!scriptname.endsWith(\".lit\") && !isScriptFilename(scriptname) && !scriptname.endsWith(\".txt\")) {\n terminal.error(\"scp only works for scripts, text files (.txt), and literature files (.lit)\");\n return;\n }\n\n const destServer = GetServer(args[1] + \"\");\n if (destServer == null) {\n terminal.error(`Invalid destination. ${args[1]} not found`);\n return;\n }\n\n // Scp for lit files\n if (scriptname.endsWith(\".lit\")) {\n let found = false;\n for (let i = 0; i < server.messages.length; ++i) {\n if (server.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n return terminal.error(\"No such file exists!\");\n }\n\n for (let i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n terminal.print(scriptname + \" copied over to \" + destServer.hostname);\n return; // Already exists\n }\n }\n destServer.messages.push(scriptname);\n return terminal.print(scriptname + \" copied over to \" + destServer.hostname);\n }\n\n // Scp for txt files\n if (scriptname.endsWith(\".txt\")) {\n let txtFile = null;\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === scriptname) {\n txtFile = server.textFiles[i];\n break;\n }\n }\n\n if (txtFile === null) {\n return terminal.error(\"No such file exists!\");\n }\n\n const tRes = destServer.writeToTextFile(txtFile.fn, txtFile.text);\n if (!tRes.success) {\n terminal.error(\"scp failed\");\n return;\n }\n if (tRes.overwritten) {\n terminal.print(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwriten`);\n terminal.print(`${scriptname} overwritten on ${destServer.hostname}`);\n return;\n }\n terminal.print(`${scriptname} copied over to ${destServer.hostname}`);\n return;\n }\n\n // Get the current script\n let sourceScript = null;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (scriptname == server.scripts[i].filename) {\n sourceScript = server.scripts[i];\n break;\n }\n }\n if (sourceScript == null) {\n terminal.error(\"scp failed. No such script exists\");\n return;\n }\n\n const sRes = destServer.writeToScriptFile(player, scriptname, sourceScript.code);\n if (!sRes.success) {\n terminal.error(`scp failed`);\n return;\n }\n if (sRes.overwritten) {\n terminal.print(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwritten`);\n terminal.print(`${scriptname} overwritten on ${destServer.hostname}`);\n return;\n }\n terminal.print(`${scriptname} copied over to ${destServer.hostname}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function sudov(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect number of arguments. Usage: sudov\");\n return;\n }\n\n if (server.hasAdminRights) {\n terminal.print(\"You have ROOT access to this machine\");\n } else {\n terminal.print(\"You do NOT have root access to this machine\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { findRunningScriptByPid } from \"../../Script/ScriptHelpers\";\nimport { isScriptFilename, validScriptExtensions } from \"../../Script/isScriptFilename\";\nimport { compareArrays } from \"../../utils/helpers/compareArrays\";\nimport { LogBoxEvents } from \"../../ui/React/LogBoxManager\";\n\nexport function tail(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n commandArray: (string | number | boolean)[],\n): void {\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 if (!isScriptFilename(scriptName)) {\n terminal.error(`tail can only be called on ${validScriptExtensions.join(\", \")} files, or by PID`);\n return;\n }\n\n // Get script arguments\n const args = [];\n for (let i = 1; i < commandArray.length; ++i) {\n args.push(commandArray[i]);\n }\n\n // go over all the running scripts. If there's a perfect\n // match, use it!\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === scriptName && compareArrays(server.runningScripts[i].args, args)) {\n LogBoxEvents.emit(server.runningScripts[i]);\n return;\n }\n }\n\n // Find all scripts that are potential candidates.\n const candidates = [];\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;\n // make a smaller copy of the args.\n const args2 = server.runningScripts[i].args.slice(0, args.length);\n if (server.runningScripts[i].filename === scriptName && compareArrays(args2, args)) {\n candidates.push(server.runningScripts[i]);\n }\n }\n\n // If there's only 1 possible choice, use that.\n if (candidates.length === 1) {\n LogBoxEvents.emit(candidates[0]);\n return;\n }\n\n // otherwise lists all possible conflicting choices.\n if (candidates.length > 1) {\n terminal.error(\"Found several potential candidates:\");\n for (const candidate of candidates) terminal.error(`${candidate.filename} ${candidate.args.join(\" \")}`);\n terminal.error(\"Script arguments need to be specified.\");\n return;\n }\n\n // if there's no candidate then we just don't know.\n terminal.error(`No script named ${scriptName} is running on the server`);\n } else if (typeof commandArray[0] === \"number\") {\n const runningScript = findRunningScriptByPid(commandArray[0], server);\n if (runningScript == null) {\n terminal.error(`No script with PID ${commandArray[0]} is running on the server`);\n return;\n }\n LogBoxEvents.emit(runningScript);\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { getRamUsageFromRunningScript } from \"../../Script/RunningScriptHelpers\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nexport function top(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of top command. Usage: top\");\n return;\n }\n\n // Headers\n const scriptWidth = 40;\n const pidWidth = 10;\n const threadsWidth = 16;\n\n const scriptTxt = \"Script\";\n const pidTxt = \"PID\";\n const threadsTxt = \"Threads\";\n const ramTxt = \"RAM Usage\";\n\n const spacesAfterScriptTxt = \" \".repeat(scriptWidth - scriptTxt.length);\n const spacesAfterPidTxt = \" \".repeat(pidWidth - pidTxt.length);\n const spacesAfterThreadsTxt = \" \".repeat(threadsWidth - threadsTxt.length);\n\n const headers = `${scriptTxt}${spacesAfterScriptTxt}${pidTxt}${spacesAfterPidTxt}${threadsTxt}${spacesAfterThreadsTxt}${ramTxt}`;\n\n terminal.print(headers);\n\n const currRunningScripts = server.runningScripts;\n // Iterate through scripts on current server\n for (let i = 0; i < currRunningScripts.length; i++) {\n const script = currRunningScripts[i];\n\n // Calculate name padding\n const numSpacesScript = Math.max(0, scriptWidth - script.filename.length);\n const spacesScript = \" \".repeat(numSpacesScript);\n\n // Calculate PID padding\n const numSpacesPid = Math.max(0, pidWidth - (script.pid + \"\").length);\n const spacesPid = \" \".repeat(numSpacesPid);\n\n // Calculate thread padding\n const numSpacesThread = Math.max(0, threadsWidth - (script.threads + \"\").length);\n const spacesThread = \" \".repeat(numSpacesThread);\n\n // Calculate and transform RAM usage\n const ramUsage = numeralWrapper.formatRAM(getRamUsageFromRunningScript(script) * script.threads);\n\n const entry = [script.filename, spacesScript, script.pid, spacesPid, script.threads, spacesThread, ramUsage].join(\n \"\",\n );\n terminal.print(entry);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { removeAlias } from \"../../Alias\";\n\nexport function unalias(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of unalias name. Usage: unalias [alias]\");\n return;\n } else if (removeAlias(args[0] + \"\")) {\n terminal.print(`Removed alias ${args[0]}`);\n } else {\n terminal.error(`No such alias exists: ${args[0]}`);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport {commonEditor} from './common/editor';\n\nexport function vim(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n return commonEditor('vim', {terminal, router, player, server, args}, {vim: true});\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\n\nexport function weaken(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of weaken command. Usage: weaken\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\n \"Cannot weaken your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n }\n const normalServer = server as Server;\n // Hack the current PC (usually for money)\n // You can't weaken your home pc or servers you purchased\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot weaken your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n return;\n }\n if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot weaken\");\n return;\n }\n if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n return;\n }\n terminal.startWeaken(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\n\nexport function wget(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\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 if (!isScriptFilename(target) && !target.endsWith(\".txt\")) {\n return terminal.error(`wget failed: Invalid target file. Target file must be script or text file`);\n }\n $.get(\n url,\n function (data: any) {\n let res;\n if (isScriptFilename(target)) {\n res = server.writeToScriptFile(player, target, data);\n } else {\n res = server.writeToTextFile(target, data);\n }\n if (!res.success) {\n return terminal.error(\"wget failed\");\n }\n if (res.overwritten) {\n return terminal.print(`wget successfully retrieved content and overwrote ${target}`);\n }\n return terminal.print(`wget successfully retrieved content to new file ${target}`);\n },\n \"text\",\n ).fail(function (e) {\n return terminal.error(\"wget failed: \" + JSON.stringify(e));\n });\n}\n","import { Player } from \"../Player\";\nimport { Exploit } from \"./Exploit\";\n\nfunction tampering(): void {\n if (Player.exploits.includes(Exploit.PrototypeTampering)) return;\n // Tampering\n const a = 55;\n setInterval(function () {\n if (a.toExponential() !== \"5.5e+1\") {\n Player.giveExploit(Exploit.PrototypeTampering);\n }\n }, 15 * 60 * 1000); // 15 minutes\n}\n\nfunction timeCompression(): void {\n const timer = 1000 * 15;\n if (Player.exploits.includes(Exploit.TimeCompression)) return;\n // Time compression\n let last = performance.now();\n function minute(): void {\n const now = performance.now();\n if (now - last < 500) {\n // time has been compressed.\n Player.giveExploit(Exploit.TimeCompression);\n return;\n }\n last = now;\n window.setTimeout(minute, timer);\n }\n window.setTimeout(minute, timer);\n}\n\nexport function startExploits(): void {\n tampering();\n timeCompression();\n}\n","import { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { isScriptErrorMessage } from \"./NetscriptEvaluator\";\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\n\nexport function setupUncaughtPromiseHandler(): void {\n window.addEventListener(\"unhandledrejection\", function (e) {\n if (isScriptErrorMessage(e.reason)) {\n const errorTextArray = e.reason.split(\"|DELIMITER|\");\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n\n let msg = `UNCAUGHT PROMISE ERROR
    You forgot to await a promise
    ${scriptName}@${hostname}
    `;\n msg += \"
    \";\n msg += errorMsg;\n dialogBoxCreate(msg);\n } else if (e.reason instanceof WorkerScript) {\n const msg =\n `UNCAUGHT PROMISE ERROR
    You forgot to await a promise
    ${e.reason.name}@${e.reason.hostname}
    ` +\n `Maybe hack / grow / weaken ?`;\n dialogBoxCreate(msg);\n }\n });\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { TTheme as Theme, ThemeEvents, refreshTheme } from \"./Themes/ui/Theme\";\nimport { LoadingScreen } from \"./ui/LoadingScreen\";\nimport { initElectron } from \"./Electron\";\ninitElectron();\nglobalThis[\"React\"] = React;\nglobalThis[\"ReactDOM\"] = ReactDOM;\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\"),\n);\n\nfunction rerender(): void {\n refreshTheme();\n ReactDOM.render(\n \n \n ,\n document.getElementById(\"root\"),\n );\n}\n\n(function () {\n ThemeEvents.subscribe(rerender);\n})();\n\n(function () {\n if (process.env.NODE_ENV === \"development\" || location.href.startsWith(\"file://\")) return;\n window.onbeforeunload = function () {\n return \"Your work will be lost.\";\n };\n})();\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/Player.ts","webpack:///./src/ui/numeralFormat.ts","webpack:///./src/Faction/data/FactionNames.ts","webpack:///./src/BitNode/BitNodeMultipliers.ts","webpack:///./src/Constants.ts","webpack:///./src/Settings/Settings.ts","webpack:///./src/Locations/data/LocationNames.ts","webpack:///./src/Netscript/RamCostGenerator.ts","webpack:///./src/Augmentation/data/AugmentationNames.ts","webpack:///./src/ui/React/DialogBox.tsx","webpack:///./src/Locations/data/CityNames.ts","webpack:///./src/ui/React/Money.tsx","webpack:///./src/utils/StringHelperFunctions.ts","webpack:///./src/utils/JSONReviver.ts","webpack:///./src/Server/AllServers.ts","webpack:///./src/ui/Router.ts","webpack:///./src/utils/helpers/keyCodes.ts","webpack:///./src/Faction/Factions.ts","webpack:///./src/ui/Context.ts","webpack:///./src/Company/data/companypositionnames.ts","webpack:///./src/utils/helpers/getRandomInt.ts","webpack:///./src/Corporation/data/Constants.ts","webpack:///./src/Hacknet/data/Constants.ts","webpack:///./src/Augmentation/Augmentation.tsx","webpack:///./src/ui/React/Modal.tsx","webpack:///./src/Bladeburner/data/ActionTypes.ts","webpack:///./src/ui/React/Table.tsx","webpack:///./src/InteractiveTutorial.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGeneralMethods.tsx","webpack:///./src/Server/Server.ts","webpack:///./src/Corporation/ui/Context.ts","webpack:///./src/Corporation/IndustryData.tsx","webpack:///./src/Locations/LocationTypeEnum.ts","webpack:///./src/Corporation/EmployeePositions.ts","webpack:///./src/Hacknet/HacknetHelpers.tsx","webpack:///./src/Augmentation/Augmentations.ts","webpack:///./src/Bladeburner/data/BlackOperationNames.ts","webpack:///./src/Bladeburner/data/Constants.ts","webpack:///./src/Literature/data/LiteratureNames.ts","webpack:///./src/Programs/Programs.ts","webpack:///./src/Company/Companies.ts","webpack:///./src/Corporation/Actions.ts","webpack:///./src/StockMarket/data/PositionTypes.ts","webpack:///./src/PersonObjects/Sleeve/SleeveTaskTypesEnum.ts","webpack:///./src/CotMG/FragmentType.ts","webpack:///./src/Gang/AllGangs.ts","webpack:///./src/SourceFile/SourceFileFlags.ts","webpack:///./src/Terminal/DirectoryHelpers.ts","webpack:///./src/Crime/Crimes.ts","webpack:///./src/Casino/utils.ts","webpack:///./src/Terminal.ts","webpack:///./src/Hacknet/HacknetServer.ts","webpack:///./src/Company/CompanyPositions.ts","webpack:///./src/ui/GameRoot.tsx","webpack:///./src/StockMarket/data/StockSymbols.ts","webpack:///./src/Script/isScriptFilename.ts","webpack:///./src/Hacking.ts","webpack:///./src/StockMarket/StockMarket.tsx","webpack:///./src/Server/data/SpecialServers.ts","webpack:///./src/Faction/FactionHelpers.tsx","webpack:///./src/Exploits/Exploit.ts","webpack:///./src/SaveObject.tsx","webpack:///./src/NetscriptEvaluator.ts","webpack:///./src/ui/React/MoneyRate.tsx","webpack:///./src/CodingContracts.ts","webpack:///./src/StockMarket/data/OrderTypes.ts","webpack:///./src/ui/React/Reputation.tsx","webpack:///./src/CotMG/Helper.tsx","webpack:///./src/DevMenu/ui/Adjuster.tsx","webpack:///./src/Corporation/data/BaseResearchTree.ts","webpack:///./src/utils/EventEmitter.ts","webpack:///./src/Server/ServerHelpers.ts","webpack:///./src/Infiltration/utils.ts","webpack:///./src/Bladeburner/data/SkillNames.ts","webpack:///./src/Bladeburner/BlackOperation.ts","webpack:///./src/Gang/ui/Context.ts","webpack:///./src/ui/React/Snackbar.tsx","webpack:///./src/Augmentation/AugmentationHelpers.tsx","webpack:///./src/Netscript/killWorkerScript.ts","webpack:///./src/Corporation/ui/MoneyCost.tsx","webpack:///./src/ui/React/StatsRow.tsx","webpack:///./src/utils/helpers/isString.ts","webpack:///./src/StockMarket/Stock.ts","webpack:///./src/Locations/Cities.ts","webpack:///./src/Alias.ts","webpack:///./src/Literature/Literature.ts","webpack:///./src/Themes/ui/Theme.tsx","webpack:///./src/ui/React/CopyableText.tsx","webpack:///./src/Corporation/MaterialSizes.ts","webpack:///./src/PersonObjects/formulas/skill.ts","webpack:///./src/Gang/data/upgrades.ts","webpack:///./src/ui/React/LogBoxManager.tsx","webpack:///./src/Netscript/WorkerScripts.ts","webpack:///./src/ui/React/StatsTable.tsx","webpack:///./src/Hacknet/formulas/HacknetServers.ts","webpack:///./src/Faction/FactionWorkTypeEnum.ts","webpack:///./src/ui/React/OptionSwitch.tsx","webpack:///./src/utils/helpers/createProgressBarText.ts","webpack:///./src/NetscriptWorker.ts","webpack:///./src/Corporation/Material.ts","webpack:///./src/Gang/formulas/formulas.ts","webpack:///./src/Faction/Faction.ts","webpack:///./src/Settings/SettingEnums.ts","webpack:///./src/Hacknet/formulas/HacknetNodes.ts","webpack:///./src/Casino/Game.tsx","webpack:///./src/CotMG/data/Shapes.ts","webpack:///./src/Infiltration/ui/KeyHandler.tsx","webpack:///./src/Infiltration/ui/GameTimer.tsx","webpack:///./src/Infiltration/ui/Difficulty.ts","webpack:///./src/Locations/Locations.ts","webpack:///./src/BitNode/BitNode.tsx","webpack:///./src/Hacknet/HacknetNode.ts","webpack:///./src/Server/ServerPurchases.ts","webpack:///./src/TextFile.ts","webpack:///./src/Bladeburner/Skills.ts","webpack:///./src/Gang/GangMemberUpgrades.ts","webpack:///./src/StockMarket/StockMarketHelpers.ts","webpack:///./src/StockMarket/StockMarketCosts.ts","webpack:///./src/Script/ScriptHelpers.ts","webpack:///./src/ui/React/Hashes.tsx","webpack:///./src/Bladeburner/Bladeburner.tsx","webpack:///./src/Company/Company.ts","webpack:///./src/Corporation/Warehouse.ts","webpack:///./src/Gang/GangMemberTasks.ts","webpack:///./src/Hacknet/HashUpgrades.ts","webpack:///./src/CotMG/Fragment.ts","webpack:///./src/PersonObjects/formulas/reputation.ts","webpack:///./src/StockMarket/BuyingAndSelling.tsx","webpack:///./src/Terminal/ITerminal.tsx","webpack:///./src/Bladeburner/Skill.ts","webpack:///./src/ui/React/ConfirmationModal.tsx","webpack:///./src/hash/hash.ts","webpack:///./src/Gang/data/Constants.ts","webpack:///./src/Script/Script.ts","webpack:///./src/utils/helpers/arrayToString.ts","webpack:///./src/DarkWeb/DarkWebItems.ts","webpack:///./src/Bladeburner/GeneralActions.tsx","webpack:///./src/Casino/CardDeck/Card.ts","webpack:///./src/Bladeburner/ActionIdentifier.ts","webpack:///./src/SourceFile/SourceFile.ts","webpack:///./src/PersonObjects/Person.ts","webpack:///./src/MathJaxWrapper.tsx","webpack:///./src/utils/helpers/exceptionAlert.ts","webpack:///./src/Message/MessageHelpers.ts","webpack:///./src/Netscript/WorkerScript.ts","webpack:///./src/Bladeburner/BlackOperations.tsx","webpack:///./src/Crime/Crime.ts","webpack:///./src/PersonObjects/formulas/intelligence.ts","webpack:///./src/Corporation/ResearchMap.ts","webpack:///./src/Locations/ui/ApplyToJobButton.tsx","webpack:///./src/Netscript/WorkerScriptStartStopEventEmitter.ts","webpack:///./src/Electron.tsx","webpack:///./src/Achievements/Achievements.ts","webpack:///./src/ui/React/CharacterOverview.tsx","webpack:///./src/Corporation/data/CorporationUnlockUpgrades.ts","webpack:///./src/RedPill.tsx","webpack:///./src/utils/helpers/addOffset.ts","webpack:///./src/DarkWeb/DarkWebItem.ts","webpack:///./src/Casino/RNG.ts","webpack:///./src/utils/helpers/compareArrays.ts","webpack:///./src/Corporation/IndustryUpgrades.ts","webpack:///./src/ui/React/Favor.tsx","webpack:///./src/PersonObjects/Sleeve/Sleeve.ts","webpack:///./src/Script/RamCalculationErrorCodes.ts","webpack:///./src/Terminal/TerminalEvents.ts","webpack:///./src/Message/Message.ts","webpack:///./src/StockMarket/OrderProcessing.tsx","webpack:///./src/Themes/Themes.ts","webpack:///./src/ui/React/AlertManager.tsx","webpack:///./src/utils/IPAddress.ts","webpack:///./src/Prestige.ts","webpack:///./src/db.tsx","webpack:///./src/Faction/formulas/favor.ts","webpack:///./src/ExportBonus.tsx","webpack:///./src/Bladeburner/Operation.ts","webpack:///./src/Server/data/servers.ts","webpack:///./src/Augmentation/PlayerOwnedAugmentation.ts","webpack:///./src/Company/CompanyPosition.ts","webpack:///./src/SourceFile/SourceFiles.tsx","webpack:///./src/Script/RunningScript.ts","webpack:///./src/Bladeburner/ui/StartButton.tsx","webpack:///./src/utils/helpers/formatTime.ts","webpack:///./src/Faction/FactionInfo.tsx","webpack:///./src/Corporation/data/CorporationUpgrades.ts","webpack:///./src/Hacknet/HashManager.ts","webpack:///./src/CodingContractGenerator.ts","webpack:///./src/ui/InteractiveTutorial/ITutorialEvents.ts","webpack:///./src/Crime/CrimeHelpers.ts","webpack:///./src/Corporation/OfficeSpace.ts","webpack:///./src/utils/Validator.ts","webpack:///./src/utils/MoneySourceTracker.ts","webpack:///./src/ui/React/StatsProgressBar.tsx","webpack:///./src/Themes/Styles.ts","webpack:///./src/Hospital/Hospital.ts","webpack:///./src/ui/React/PromptManager.tsx","webpack:///./src/Corporation/Product.ts","webpack:///./src/Corporation/ui/Helpers.tsx","webpack:///./src/Programs/ui/ProgramsRoot.tsx","webpack:///./src/Faction/ui/FactionsRoot.tsx","webpack:///./src/ui/React/RecoveryRoot.tsx","webpack:///./src/NetworkShare/Share.tsx","webpack:///./src/Corporation/Corporation.tsx","webpack:///./src/ui/React/HashRate.tsx","webpack:///./src/Bladeburner/City.ts","webpack:///./src/PersonObjects/Player/PlayerObjectGangMethods.ts","webpack:///./src/Locations/City.ts","webpack:///./src/Faction/ui/Option.tsx","webpack:///./src/StockMarket/ui/StockTickersConfig.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectServerMethods.ts","webpack:///./src/Bladeburner/Action.tsx","webpack:///./src/ui/React/WorldMap.tsx","webpack:///./src/Bladeburner/ui/SuccessChance.tsx","webpack:///./src/ui/React/StaticModal.tsx","webpack:///./src/ui/React/CorruptableText.tsx","webpack:///./src/DarkWeb/DarkWeb.tsx","webpack:///./src/Hacking/netscriptCanHack.ts","webpack:///./src/PersonObjects/Grafting/GraftableAugmentation.ts","webpack:///./src/ui/React/ReputationRate.tsx","webpack:///./src/Terminal/Parser.ts","webpack:///./src/ui/React/CinematicText.tsx","webpack:///./src/PersonObjects/Sleeve/SleeveCovenantPurchases.tsx","webpack:///./src/Augmentation/AugmentationCreator.tsx","webpack:///./src/Script/RamCalculations.ts","webpack:///./src/utils/helpers/roundToTwo.ts","webpack:///./src/Gang/Gang.ts","webpack:///./src/Netscript/Pid.ts","webpack:///./src/NetscriptFunctions.ts","webpack:///./src/StockMarket/PlayerInfluencing.ts","webpack:///./src/Company/GetJobRequirementText.ts","webpack:///./src/Terminal/HelpText.ts","webpack:///./src/utils/ErrorHelper.ts","webpack:///./src/utils/helpers/getRandomByte.ts","webpack:///./src/Bladeburner/data/Growths.ts","webpack:///./src/Locations/createCityMap.ts","webpack:///./src/Casino/CardDeck/Hand.ts","webpack:///./src/StockMarket/ui/StockTickerTxButton.tsx","webpack:///./src/Server/BaseServer.ts","webpack:///./src/ui/React/CodingContractModal.tsx","webpack:///./src/BitNode/ui/BitFlumeModal.tsx","webpack:///./src/PersonObjects/Player/PlayerObject.ts","webpack:///./src/Faction/ui/InvitationModal.tsx","webpack:///./src/Literature/LiteratureHelpers.ts","webpack:///./src/Gang/GangMemberTask.ts","webpack:///./src/SourceFile/PlayerOwnedSourceFile.ts","webpack:///./src/Netscript/RecentScripts.ts","webpack:///./src/ThirdParty/JSInterpreter.js","webpack:///./src/Server/formulas/grow.ts","webpack:///./src/PersonObjects/Sleeve/SleeveHelpers.ts","webpack:///./src/CotMG/StaneksGiftEvents.ts","webpack:///./src/PersonObjects/Grafting/ui/GraftingRoot.tsx","webpack:///./src/Terminal/commands/download.ts","webpack:///./src/ui/React/AugmentationAccordion.tsx","webpack:///./src/Bladeburner/data/Icons.tsx","webpack:///./src/Bladeburner/ui/ActionLevel.tsx","webpack:///./src/Bladeburner/ui/Autolevel.tsx","webpack:///./src/Bladeburner/ui/TeamSizeButton.tsx","webpack:///./src/Infiltration/ui/BlinkingCursor.tsx","webpack:///./src/ui/React/DeleteGameButton.tsx","webpack:///./src/ui/React/SoftResetButton.tsx","webpack:///./src/Themes/ui/ThemeEditorButton.tsx","webpack:///./src/Themes/ui/ThemeCollaborate.tsx","webpack:///./src/Themes/ui/StyleEditorButton.tsx","webpack:///./src/Locations/ui/TravelAgencyRoot.tsx","webpack:///./src/ScriptEditor/ui/ScriptEditorRoot.tsx","webpack:///./src/NetscriptJSEvaluator.ts","webpack:///./src/NetscriptFunctions/Flags.ts","webpack:///./src/NetscriptFunctions/toNative.ts","webpack:///./src/ui/React/TablePaginationActionsAll.tsx","webpack:///./src/CotMG/ui/Cell.tsx","webpack:///./src/Script/RunningScriptHelpers.ts","webpack:///./src/Terminal/commands/common/editor.ts","webpack:///./src/PersonObjects/Player/PlayerObjectBladeburnerMethods.ts","webpack:///./src/Bladeburner/Contract.ts","webpack:///./src/Bladeburner/data/Help.ts","webpack:///./src/PersonObjects/Player/PlayerObjectCorporationMethods.ts","webpack:///./src/Corporation/ResearchTree.ts","webpack:///./src/StockMarket/StockMarketConstants.ts","webpack:///./src/CotMG/data/Constants.ts","webpack:///./src/Company/GetNextCompanyPosition.ts","webpack:///./src/engine.tsx","webpack:///./src/Themes/data/index.ts","webpack:///./src/ui/LoadingScreen.tsx","webpack:///./src/PersonObjects/Player/PlayerObjectAugmentationMethods.ts","webpack:///./src/utils/helpers/isValidNumber.ts","webpack:///./src/StockMarket/Order.ts","webpack:///./src/CotMG/StaneksGift.ts","webpack:///./src/CotMG/ActiveFragment.ts","webpack:///./src/Locations/Location.ts","webpack:///./src/PersonObjects/Sleeve/ui/StatsElement.tsx","webpack:///./src/ui/React/ServerDropdown.tsx","webpack:///./src/Casino/Blackjack.tsx","webpack:///./src/Casino/CardDeck/ReactCard.tsx","webpack:///./src/Milestones/Milestones.ts","webpack:///./src/Faction/formulas/donation.ts","webpack:///./src/StockMarket/data/TickerHeaderFormatData.ts","webpack:///./src/Achievements/AchievementEntry.tsx","webpack:///./src/ThirdParty/colorUtils.ts","webpack:///./src/PersonObjects/formulas/work.ts","webpack:///./src/Themes/data/default/index.ts","webpack:///./src/Themes/data/default-lite/index.ts","webpack:///./src/Themes/data/monokai-ish/index.ts","webpack:///./src/Themes/data/warmer/index.ts","webpack:///./src/Themes/data/dark-plus/index.ts","webpack:///./src/Themes/data/mayukai-dark/index.ts","webpack:///./src/Themes/data/purple/index.ts","webpack:///./src/Themes/data/smooth-green/index.ts","webpack:///./src/Themes/data/dracula/index.ts","webpack:///./src/Themes/data/dark-blue/index.ts","webpack:///./src/Themes/data/discord-like/index.ts","webpack:///./src/Themes/data/one-dark/index.ts","webpack:///./src/Themes/data/muted-gold-blue/index.ts","webpack:///./src/Themes/data/light/index.ts","webpack:///./src/Themes/data/default/screenshot.png","webpack:///./src/Themes/data/default-lite/screenshot.png","webpack:///./src/Themes/data/monokai-ish/screenshot.png","webpack:///./src/Themes/data/warmer/screenshot.png","webpack:///./src/Themes/data/dark-plus/screenshot.png","webpack:///./src/Themes/data/mayukai-dark/screenshot.png","webpack:///./src/Themes/data/purple/screenshot.png","webpack:///./src/Themes/data/smooth-green/screenshot.png","webpack:///./src/Themes/data/dracula/screenshot.png","webpack:///./src/Themes/data/dark-blue/screenshot.png","webpack:///./src/Themes/data/discord-like/screenshot.png","webpack:///./src/Themes/data/one-dark/screenshot.png","webpack:///./src/Themes/data/muted-gold-blue/screenshot.png","webpack:///./src/Themes/data/light/screenshot.png","webpack:///./src/Terminal/Terminal.ts","webpack:///./src/data/codingcontracttypes.ts","webpack:///./src/utils/helpers/createRandomString.ts","webpack:///./src/Programs/Program.ts","webpack:///./src/Programs/data/ProgramsMetadata.ts","webpack:///./src/utils/helpers/isValidIPAddress.ts","webpack:///./src/PersonObjects/Grafting/EntropyAccumulation.ts","webpack:///./src/utils/helpers/getTimestamp.ts","webpack:///./src/NetworkShare/formulas/share.tsx","webpack:///./src/Corporation/CorporationState.ts","webpack:///./src/Literature/Literatures.ts","webpack:///./src/Gang/data/tasks.ts","webpack:///./src/Gang/GangMember.ts","webpack:///./src/Gang/GangMemberUpgrade.ts","webpack:///./src/Gang/data/power.ts","webpack:///./src/Company/data/CompaniesMetadata.ts","webpack:///./src/Corporation/Research.ts","webpack:///./src/Corporation/data/ResearchMetadata.ts","webpack:///./src/Hacknet/HashUpgrade.ts","webpack:///./src/Hacknet/data/HashUpgradesMetadata.tsx","webpack:///./src/Netscript/Environment.ts","webpack:///./src/utils/helpers/isPowerOfTwo.ts","webpack:///./src/StockMarket/data/InitStockMetadata.ts","webpack:///./src/NetscriptFunctions/Gang.ts","webpack:///./src/NetscriptFunctions/Sleeve.ts","webpack:///./src/NetscriptFunctions/Extra.ts","webpack:///./src/NetscriptFunctions/Hacknet.ts","webpack:///./src/NetscriptFunctions/Stanek.ts","webpack:///./src/CotMG/formulas/effect.ts","webpack:///./src/NetscriptFunctions/UserInterface.ts","webpack:///./src/NetscriptFunctions/Bladeburner.ts","webpack:///./src/NetscriptFunctions/CodingContract.ts","webpack:///./src/utils/helpers/is2DArray.ts","webpack:///./src/NetscriptFunctions/Corporation.ts","webpack:///./src/Corporation/Industry.ts","webpack:///./src/utils/calculateEffectWithFactors.ts","webpack:///./src/Corporation/Employee.ts","webpack:///./src/Corporation/ProductRatingWeights.ts","webpack:///./src/NetscriptFunctions/Formulas.ts","webpack:///./src/NetscriptFunctions/StockMarket.ts","webpack:///./src/NetscriptFunctions/Grafting.ts","webpack:///./src/Locations/data/LocationsMetadata.ts","webpack:///./src/utils/v1APIBreak.ts","webpack:///./src/ui/InteractiveTutorial/InteractiveTutorialRoot.tsx","webpack:///./src/ui/React/Overview.tsx","webpack:///./src/Sidebar/ui/SidebarRoot.tsx","webpack:///./src/Programs/ProgramHelpers.ts","webpack:///./src/Augmentation/ui/AugmentationsRoot.tsx","webpack:///./src/Augmentation/ui/InstalledAugmentations.tsx","webpack:///./src/Augmentation/ui/PlayerMultipliers.tsx","webpack:///./src/Augmentation/ui/PurchasedAugmentations.tsx","webpack:///./src/Augmentation/ui/SourceFiles.tsx","webpack:///./src/Augmentation/ui/SourceFileMinus1.tsx","webpack:///./src/Augmentation/ui/OwnedSourceFiles.tsx","webpack:///./src/ui/React/SourceFileAccordion.tsx","webpack:///./src/DevMenu.tsx","webpack:///./src/DevMenu/ui/General.tsx","webpack:///./src/DevMenu/ui/Stats.tsx","webpack:///./src/DevMenu/ui/Factions.tsx","webpack:///./src/DevMenu/ui/Augmentations.tsx","webpack:///./src/DevMenu/ui/SourceFiles.tsx","webpack:///./src/DevMenu/ui/Programs.tsx","webpack:///./src/DevMenu/ui/Servers.tsx","webpack:///./src/DevMenu/ui/Companies.tsx","webpack:///./src/DevMenu/ui/Bladeburner.tsx","webpack:///./src/DevMenu/ui/Gang.tsx","webpack:///./src/DevMenu/ui/Corporation.tsx","webpack:///./src/DevMenu/ui/CodingContracts.tsx","webpack:///./src/DevMenu/ui/StockMarket.tsx","webpack:///./src/DevMenu/ui/Sleeves.tsx","webpack:///./src/DevMenu/ui/Stanek.tsx","webpack:///./src/DevMenu/ui/TimeSkip.tsx","webpack:///./src/DevMenu/ui/Achievements.tsx","webpack:///./src/DevMenu/ui/Entropy.tsx","webpack:///./src/Bladeburner/ui/BladeburnerRoot.tsx","webpack:///./src/Bladeburner/ui/Stats.tsx","webpack:///./src/Bladeburner/ui/TravelModal.tsx","webpack:///./src/Bladeburner/ui/Console.tsx","webpack:///./src/Bladeburner/ui/AllPages.tsx","webpack:///./src/Bladeburner/ui/GeneralActionPage.tsx","webpack:///./src/Bladeburner/ui/GeneralActionList.tsx","webpack:///./src/Bladeburner/ui/GeneralActionElem.tsx","webpack:///./src/Bladeburner/data/GeneralActions.tsx","webpack:///./src/Bladeburner/ui/ContractPage.tsx","webpack:///./src/Bladeburner/ui/ContractList.tsx","webpack:///./src/Bladeburner/ui/ContractElem.tsx","webpack:///./src/Bladeburner/data/Contracts.tsx","webpack:///./src/Bladeburner/ui/StealthIcon.tsx","webpack:///./src/Bladeburner/ui/KillIcon.tsx","webpack:///./src/Bladeburner/ui/OperationPage.tsx","webpack:///./src/Bladeburner/ui/OperationList.tsx","webpack:///./src/Bladeburner/ui/OperationElem.tsx","webpack:///./src/Bladeburner/ui/TeamSizeModal.tsx","webpack:///./src/Bladeburner/data/Operations.tsx","webpack:///./src/Bladeburner/ui/BlackOpPage.tsx","webpack:///./src/Bladeburner/ui/BlackOpList.tsx","webpack:///./src/Bladeburner/ui/BlackOpElem.tsx","webpack:///./src/Bladeburner/data/BlackOperations.tsx","webpack:///./src/Bladeburner/ui/SkillPage.tsx","webpack:///./src/Bladeburner/ui/SkillList.tsx","webpack:///./src/Bladeburner/ui/SkillElem.tsx","webpack:///./src/Gang/ui/GangRoot.tsx","webpack:///./src/Gang/ui/ManagementSubpage.tsx","webpack:///./src/Gang/ui/GangStats.tsx","webpack:///./src/Gang/ui/BonusTime.tsx","webpack:///./src/Gang/ui/GangMemberList.tsx","webpack:///./src/Gang/ui/GangMemberCard.tsx","webpack:///./src/Gang/ui/GangMemberCardContent.tsx","webpack:///./src/Gang/ui/GangMemberStats.tsx","webpack:///./src/ui/React/KillScriptsModal.tsx","webpack:///./src/Gang/ui/TaskSelector.tsx","webpack:///./src/Gang/ui/TaskDescription.tsx","webpack:///./src/Gang/ui/AscensionModal.tsx","webpack:///./src/Gang/ui/RecruitButton.tsx","webpack:///./src/Gang/ui/RecruitModal.tsx","webpack:///./src/Gang/ui/TerritorySubpage.tsx","webpack:///./src/Gang/ui/TerritoryInfoModal.tsx","webpack:///./src/Gang/ui/EquipmentsSubpage.tsx","webpack:///./src/Corporation/ui/CorporationRoot.tsx","webpack:///./src/Corporation/ui/MainPanel.tsx","webpack:///./src/Corporation/ui/CityTabs.tsx","webpack:///./src/Corporation/ui/Industry.tsx","webpack:///./src/Corporation/ui/IndustryOffice.tsx","webpack:///./src/Corporation/ui/UpgradeOfficeSizeModal.tsx","webpack:///./src/Corporation/ui/ThrowPartyModal.tsx","webpack:///./src/Corporation/ui/IndustryOverview.tsx","webpack:///./src/Corporation/ui/MakeProductModal.tsx","webpack:///./src/Corporation/ui/ResearchModal.tsx","webpack:///./src/Corporation/ui/IndustryWarehouse.tsx","webpack:///./src/Corporation/ui/SmartSupplyModal.tsx","webpack:///./src/Corporation/ui/ProductElem.tsx","webpack:///./src/Corporation/ui/DiscontinueProductModal.tsx","webpack:///./src/Corporation/ui/LimitProductProductionModal.tsx","webpack:///./src/Corporation/ui/SellProductModal.tsx","webpack:///./src/Corporation/ui/ProductMarketTaModal.tsx","webpack:///./src/Corporation/ui/MaterialElem.tsx","webpack:///./src/Corporation/ui/ExportModal.tsx","webpack:///./src/Corporation/ui/MaterialMarketTaModal.tsx","webpack:///./src/Corporation/ui/SellMaterialModal.tsx","webpack:///./src/Corporation/ui/PurchaseMaterialModal.tsx","webpack:///./src/Corporation/ui/IndustryProductEquation.tsx","webpack:///./src/Corporation/ui/ExpandNewCity.tsx","webpack:///./src/Corporation/ui/ExpandIndustryTab.tsx","webpack:///./src/Corporation/ui/Overview.tsx","webpack:///./src/Corporation/ui/LevelableUpgrade.tsx","webpack:///./src/Corporation/ui/UnlockUpgrade.tsx","webpack:///./src/Corporation/ui/BribeFactionModal.tsx","webpack:///./src/Corporation/ui/SellSharesModal.tsx","webpack:///./src/Corporation/ui/BuybackSharesModal.tsx","webpack:///./src/Corporation/ui/IssueDividendsModal.tsx","webpack:///./src/Corporation/ui/IssueNewSharesModal.tsx","webpack:///./src/Corporation/ui/FindInvestorsModal.tsx","webpack:///./src/Corporation/ui/GoPublicModal.tsx","webpack:///./src/Infiltration/ui/InfiltrationRoot.tsx","webpack:///./src/Infiltration/ui/Intro.tsx","webpack:///./src/Infiltration/ui/Game.tsx","webpack:///./src/Infiltration/ui/Countdown.tsx","webpack:///./src/Infiltration/ui/BracketGame.tsx","webpack:///./src/Infiltration/ui/SlashGame.tsx","webpack:///./src/Infiltration/ui/BackwardGame.tsx","webpack:///./src/Infiltration/ui/BribeGame.tsx","webpack:///./src/Infiltration/ui/CheatCodeGame.tsx","webpack:///./src/Infiltration/ui/Cyberpunk2077Game.tsx","webpack:///./src/Infiltration/ui/MinesweeperGame.tsx","webpack:///./src/Infiltration/ui/WireCuttingGame.tsx","webpack:///./src/Infiltration/ui/Victory.tsx","webpack:///./src/ui/WorkInProgressRoot.tsx","webpack:///./src/ui/React/GameOptionsRoot.tsx","webpack:///./src/Diagnostic/FileDiagnosticModal.tsx","webpack:///./src/Themes/ui/ThemeEditorModal.tsx","webpack:///./src/Themes/ui/StyleEditorModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveElem.tsx","webpack:///./src/PersonObjects/Sleeve/ui/SleeveAugmentationsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TravelModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreStatsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/MoreEarningsModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/TaskSelector.tsx","webpack:///./src/PersonObjects/Sleeve/ui/FAQModal.tsx","webpack:///./src/Hacknet/ui/HacknetRoot.tsx","webpack:///./src/Hacknet/ui/GeneralInfo.tsx","webpack:///./src/Hacknet/ui/HacknetNodeElem.tsx","webpack:///./src/Hacknet/ui/HacknetServerElem.tsx","webpack:///./src/Hacknet/ui/HashUpgradeModal.tsx","webpack:///./src/Hacknet/ui/HacknetUpgradeElem.tsx","webpack:///./src/Hacknet/ui/MultiplierButtons.tsx","webpack:///./src/Hacknet/ui/PlayerInfo.tsx","webpack:///./src/Hacknet/ui/PurchaseButton.tsx","webpack:///./src/Locations/ui/GenericLocation.tsx","webpack:///./src/Locations/ui/CompanyLocation.tsx","webpack:///./src/Company/data/CompanyPositionsMetadata.ts","webpack:///./src/Company/ui/QuitJobModal.tsx","webpack:///./src/Locations/ui/GymLocation.tsx","webpack:///./src/Locations/ui/HospitalLocation.tsx","webpack:///./src/Locations/ui/SlumsLocation.tsx","webpack:///./src/Locations/ui/SpecialLocation.tsx","webpack:///./src/Corporation/ui/CreateCorporationModal.tsx","webpack:///./src/utils/helpers/N00dles.ts","webpack:///./src/Arcade/ui/ArcadeRoot.tsx","webpack:///./src/Arcade/ui/BBCabinet.tsx","webpack:///./src/Locations/ui/TechVendorLocation.tsx","webpack:///./src/Locations/ui/RamButton.tsx","webpack:///./src/Locations/ui/TorButton.tsx","webpack:///./src/Locations/LocationsHelpers.tsx","webpack:///./src/Locations/ui/CoresButton.tsx","webpack:///./src/Locations/ui/PurchaseServerModal.tsx","webpack:///./src/Locations/ui/TravelConfirmationModal.tsx","webpack:///./src/Locations/ui/UniversityLocation.tsx","webpack:///./src/Locations/ui/CasinoLocation.tsx","webpack:///./src/Casino/CardDeck/Deck.ts","webpack:///./src/Casino/CoinFlip.tsx","webpack:///./src/Casino/Roulette.tsx","webpack:///./src/Casino/SlotMachine.tsx","webpack:///./src/Locations/ui/City.tsx","webpack:///./src/ScriptEditor/ui/OptionsModal.tsx","webpack:///./src/ScriptEditor/ui/themes.ts","webpack:///./src/ScriptEditor/NetscriptDefinitions.d.ts","webpack:///./src/Milestones/ui/MilestonesRoot.tsx","webpack:///./src/Terminal/ui/TerminalRoot.tsx","webpack:///./src/Terminal/ui/TerminalInput.tsx","webpack:///./src/Terminal/determineAllPossibilitiesForTabCompletion.ts","webpack:///./src/Terminal/DirectoryServerHelpers.ts","webpack:///./src/Script/ScriptUrl.ts","webpack:///./src/Terminal/tabCompletion.ts","webpack:///./src/Tutorial/ui/TutorialRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsRoot.tsx","webpack:///./src/ui/ActiveScripts/ActiveScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/ScriptProduction.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordions.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordion.tsx","webpack:///./src/ui/ActiveScripts/ServerAccordionContent.tsx","webpack:///./src/ui/ActiveScripts/WorkerScriptAccordion.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptsPage.tsx","webpack:///./src/ui/ActiveScripts/RecentScriptAccordion.tsx","webpack:///./src/Faction/ui/FactionRoot.tsx","webpack:///./src/Faction/ui/AugmentationsPage.tsx","webpack:///./src/Faction/ui/PurchaseableAugmentation.tsx","webpack:///./src/Faction/ui/PurchaseAugmentationModal.tsx","webpack:///./src/ui/React/Augmentation.tsx","webpack:///./src/Faction/ui/DonateOption.tsx","webpack:///./src/Faction/ui/Info.tsx","webpack:///./src/Faction/ui/CreateGangModal.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantPurchasesRoot.tsx","webpack:///./src/PersonObjects/Sleeve/ui/CovenantSleeveMemoryUpgrade.tsx","webpack:///./src/ui/CharacterStats.tsx","webpack:///./src/StockMarket/ui/StockMarketRoot.tsx","webpack:///./src/StockMarket/ui/InfoAndPurchases.tsx","webpack:///./src/StockMarket/ui/StockTickers.tsx","webpack:///./src/StockMarket/ui/StockTicker.tsx","webpack:///./src/StockMarket/ui/StockTickerHeaderText.tsx","webpack:///./src/StockMarket/ui/StockTickerOrderList.tsx","webpack:///./src/StockMarket/ui/StockTickerOrder.tsx","webpack:///./src/StockMarket/ui/StockTickerPositionText.tsx","webpack:///./src/StockMarket/ui/PlaceOrderModal.tsx","webpack:///./src/BitNode/ui/BitverseRoot.tsx","webpack:///./src/BitNode/ui/PortalModal.tsx","webpack:///./src/ui/React/CinematicLine.tsx","webpack:///./src/CotMG/ui/StaneksGiftRoot.tsx","webpack:///./src/CotMG/ui/MainBoard.tsx","webpack:///./src/CotMG/ui/FragmentInspector.tsx","webpack:///./src/CotMG/ui/FragmentSelector.tsx","webpack:///./src/CotMG/ui/FragmentPreview.tsx","webpack:///./src/Bladeburner/ui/BladeburnerCinematic.tsx","webpack:///./src/Exploits/Unclickable.tsx","webpack:///./src/Achievements/AchievementsRoot.tsx","webpack:///./src/Achievements/AchievementList.tsx","webpack:///./src/Achievements/AchievementIcon.tsx","webpack:///./src/ui/ErrorBoundary.tsx","webpack:///./src/Themes/ui/ThemeBrowser.tsx","webpack:///./src/Themes/ui/ThemeEntry.tsx","webpack:///./src/ui/React/ImportSaveRoot.tsx","webpack:///./src/ui/React/BypassWrapper.tsx","webpack:///./src/ui/Apr1.tsx","webpack:///./src/NetscriptFunctions/Singularity.ts","webpack:///./src/NetscriptPort.ts","webpack:///./src/utils/helpers/clearObject.ts","webpack:///./src/SourceFile/applySourceFile.ts","webpack:///./src/Exploits/applyExploits.ts","webpack:///./src/Terminal/commands/alias.ts","webpack:///./src/Terminal/commands/analyze.ts","webpack:///./src/Terminal/commands/backdoor.ts","webpack:///./src/Terminal/commands/buy.ts","webpack:///./src/Terminal/commands/cat.ts","webpack:///./src/Terminal/commands/cd.ts","webpack:///./src/Terminal/commands/check.ts","webpack:///./src/Terminal/commands/connect.ts","webpack:///./src/Terminal/commands/cp.ts","webpack:///./src/Terminal/commands/expr.ts","webpack:///./src/Terminal/commands/free.ts","webpack:///./src/Terminal/commands/grow.ts","webpack:///./src/Terminal/commands/hack.ts","webpack:///./src/Terminal/commands/help.ts","webpack:///./src/Terminal/commands/history.ts","webpack:///./src/Terminal/commands/home.ts","webpack:///./src/Terminal/commands/hostname.ts","webpack:///./src/Terminal/commands/kill.ts","webpack:///./src/Terminal/commands/killall.ts","webpack:///./src/Terminal/commands/ls.tsx","webpack:///./src/Terminal/commands/lscpu.ts","webpack:///./src/Terminal/commands/mem.ts","webpack:///./src/Terminal/commands/mv.ts","webpack:///./src/Terminal/commands/nano.ts","webpack:///./src/ScriptEditor/CursorPositions.ts","webpack:///./src/Terminal/commands/ps.ts","webpack:///./src/Terminal/commands/rm.ts","webpack:///./src/Terminal/commands/run.ts","webpack:///./src/Terminal/commands/runScript.ts","webpack:///./src/Terminal/commands/runProgram.ts","webpack:///./src/Terminal/commands/scan.ts","webpack:///./src/Terminal/commands/scananalyze.ts","webpack:///./src/Terminal/commands/scp.ts","webpack:///./src/Terminal/commands/sudov.ts","webpack:///./src/Terminal/commands/tail.ts","webpack:///./src/Terminal/commands/top.ts","webpack:///./src/Terminal/commands/unalias.ts","webpack:///./src/Terminal/commands/vim.ts","webpack:///./src/Terminal/commands/weaken.ts","webpack:///./src/Terminal/commands/wget.ts","webpack:///./src/Exploits/loops.ts","webpack:///./src/UncaughtPromiseHandler.ts","webpack:///./src/index.tsx"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","1","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","Player","PlayerObject","loadPlayer","saveString","JSON","parse","Reviver","money","parseFloat","exploits","sanitizeExploits","extraFormats","extraNotations","gigaMultiplier","numeralWrapper","constructor","this","defaultLocale","updateLocale","numeral","locale","console","warn","format","Math","abs","answer","formatBigNumber","formatReallyBigNumber","decimalPlaces","nAbs","Infinity","repeat","str","formatHp","formatMoney","formatSkill","formatExp","formatHashes","formatReputation","formatFavor","formatSecurity","toFixed","formatRAM","Settings","UseIEC60027_2","formatPercentage","formatter","formatServerSecurity","formatRespect","formatWanted","formatMultiplier","formatSleeveShock","formatSleeveSynchro","formatSleeveMemory","formatPopulation","formatStamina","formatShares","formatInfiltrationSecurity","formatThreads","formatStaneksGiftHeat","formatStaneksGiftCharge","formatStaneksGiftPower","parseCustomLargeNumber","numericRegExp","RegExp","join","match","NaN","number","notation","notationIndex","indexOf","largestAbsoluteNumber","n1","n2","n3","isNaN","max","parseMoney","numeralValue","parsed","selfParsed","FactionNames","BitNodeMultipliers","HackingLevelMultiplier","StrengthLevelMultiplier","DefenseLevelMultiplier","DexterityLevelMultiplier","AgilityLevelMultiplier","CharismaLevelMultiplier","ServerGrowthRate","ServerMaxMoney","ServerStartingMoney","ServerStartingSecurity","ServerWeakenRate","HomeComputerRamCost","PurchasedServerCost","PurchasedServerSoftcap","PurchasedServerLimit","PurchasedServerMaxRam","CompanyWorkMoney","CrimeMoney","HacknetNodeMoney","ManualHackMoney","ScriptHackMoney","ScriptHackMoneyGain","CodingContractMoney","ClassGymExpGain","CompanyWorkExpGain","CrimeExpGain","FactionWorkExpGain","HackExpGain","FactionPassiveRepGain","FactionWorkRepGain","RepToDonateToFaction","AugmentationMoneyCost","AugmentationRepCost","InfiltrationMoney","InfiltrationRep","FourSigmaMarketDataCost","FourSigmaMarketDataApiCost","CorporationValuation","CorporationSoftCap","BladeburnerRank","BladeburnerSkillCost","GangSoftcap","GangUniqueAugs","DaedalusAugsRequirement","StaneksGiftPowerMultiplier","StaneksGiftExtraSize","WorldDaemonDifficulty","CONSTANTS","VersionString","VersionNumber","_idleSpeed","MaxSkillLevel","MilliPerCycle","CorpFactionRepRequirement","BaseCostFor1GBOfRamHome","BaseCostFor1GBOfRamServer","TravelCost","BaseFavorToDonate","DonateMoneyToRepDivisor","FactionReputationToFavorBase","FactionReputationToFavorMult","CompanyReputationToFavorBase","CompanyReputationToFavorMult","NeuroFluxGovernorLevelMult","NumNetscriptPorts","HomeComputerMaxRam","ServerBaseGrowthRate","ServerMaxGrowthRate","ServerFortifyAmount","ServerWeakenAmount","MultipleAugMultiplier","TorRouterCost","WSEAccountCost","TIXAPICost","MarketData4SCost","MarketDataTixApi4SCost","StockMarketCommission","HospitalCostPerHp","IntelligenceCrimeWeight","IntelligenceInfiltrationWeight","IntelligenceCrimeBaseExpGain","IntelligenceProgramBaseExpGain","IntelligenceGraftBaseExpGain","IntelligenceTerminalHackBaseExpGain","IntelligenceSingFnBaseExpGain","IntelligenceClassBaseExpGain","MillisecondsPer20Hours","GameCyclesPer20Hours","MillisecondsPer10Hours","GameCyclesPer10Hours","MillisecondsPer8Hours","GameCyclesPer8Hours","MillisecondsPer4Hours","GameCyclesPer4Hours","MillisecondsPer2Hours","GameCyclesPer2Hours","MillisecondsPerHour","GameCyclesPerHour","MillisecondsPerHalfHour","GameCyclesPerHalfHour","MillisecondsPerQuarterHour","GameCyclesPerQuarterHour","MillisecondsPerFiveMinutes","GameCyclesPerFiveMinutes","BaseFocusBonus","FactionWorkHacking","FactionWorkField","FactionWorkSecurity","WorkTypeCompany","WorkTypeCompanyPartTime","WorkTypeFaction","WorkTypeCreateProgram","WorkTypeStudyClass","WorkTypeCrime","WorkTypeGraftAugmentation","ClassStudyComputerScience","ClassDataStructures","ClassNetworks","ClassAlgorithms","ClassManagement","ClassLeadership","ClassGymStrength","ClassGymDefense","ClassGymDexterity","ClassGymAgility","ClassDataStructuresBaseCost","ClassNetworksBaseCost","ClassAlgorithmsBaseCost","ClassManagementBaseCost","ClassLeadershipBaseCost","ClassGymBaseCost","ClassStudyComputerScienceBaseExp","ClassDataStructuresBaseExp","ClassNetworksBaseExp","ClassAlgorithmsBaseExp","ClassManagementBaseExp","ClassLeadershipBaseExp","CrimeShoplift","CrimeRobStore","CrimeMug","CrimeLarceny","CrimeDrugs","CrimeBondForgery","CrimeTraffickArms","CrimeHomicide","CrimeGrandTheftAuto","CrimeKidnap","CrimeAssassination","CrimeHeist","CodingContractBaseFactionRepGain","CodingContractBaseCompanyRepGain","CodingContractBaseMoneyGain","AugmentationGraftingCostMult","AugmentationGraftingTimeBase","EntropyEffect","TotalNumBitNodes","LatestUpdate","defaultSettings","ActiveScriptsServerPageSize","ActiveScriptsScriptPageSize","AutosaveInterval","CodeInstructionRunTime","DisableASCIIArt","DisableHotkeys","DisableTextEffects","DisableOverviewProgressBars","EnableBashHotkeys","TimestampsFormat","Locale","MaxLogCapacity","MaxPortCapacity","MaxTerminalCapacity","SaveGameOnFileSave","SuppressBuyAugmentationConfirmation","SuppressFactionInvites","SuppressMessages","SuppressTravelConfirmation","SuppressBladeburnerPopup","SuppressTIXPopup","SuppressSavedGameToast","SuppressAutosaveDisabledWarnings","ExcludeRunningScriptsFromSave","IsSidebarOpened","theme","defaultTheme","styles","defaultStyles","overview","x","y","opened","OwnedAugmentationsOrder","OwnedAugmentationsOrderSetting","AcquirementTime","PurchaseAugmentationsOrder","PurchaseAugmentationsOrderSetting","Default","MonacoTheme","MonacoInsertSpaces","MonacoFontSize","MonacoVim","MonacoWordWrap","init","assign","load","save","LocationName","RamCostConstants","ScriptBaseRamCost","ScriptDomRamCost","ScriptCorporationRamCost","ScriptHackRamCost","ScriptHackAnalyzeRamCost","ScriptGrowRamCost","ScriptGrowthAnalyzeRamCost","ScriptWeakenRamCost","ScriptWeakenAnalyzeRamCost","ScriptScanRamCost","ScriptPortProgramRamCost","ScriptRunRamCost","ScriptExecRamCost","ScriptSpawnRamCost","ScriptScpRamCost","ScriptKillRamCost","ScriptHasRootAccessRamCost","ScriptGetHostnameRamCost","ScriptGetHackingLevelRamCost","ScriptGetMultipliersRamCost","ScriptGetServerRamCost","ScriptGetServerMaxRam","ScriptGetServerUsedRam","ScriptFileExistsRamCost","ScriptIsRunningRamCost","ScriptHacknetNodesRamCost","ScriptHNUpgLevelRamCost","ScriptHNUpgRamRamCost","ScriptHNUpgCoreRamCost","ScriptGetStockRamCost","ScriptBuySellStockRamCost","ScriptGetPurchaseServerRamCost","ScriptPurchaseServerRamCost","ScriptGetPurchasedServerLimit","ScriptGetPurchasedServerMaxRam","ScriptRoundRamCost","ScriptReadWriteRamCost","ScriptArbScriptRamCost","ScriptGetScriptRamCost","ScriptGetRunningScriptRamCost","ScriptGetHackTimeRamCost","ScriptGetFavorToDonate","ScriptCodingContractBaseRamCost","ScriptSleeveBaseRamCost","ScriptGetOwnedSourceFiles","ScriptSingularityFn1RamCost","ScriptSingularityFn2RamCost","ScriptSingularityFn3RamCost","ScriptGangApiBaseRamCost","ScriptBladeburnerApiBaseRamCost","ScriptStanekWidth","ScriptStanekHeight","ScriptStanekCharge","ScriptStanekFragmentDefinitions","ScriptStanekPlacedFragments","ScriptStanekClear","ScriptStanekCanPlace","ScriptStanekPlace","ScriptStanekFragmentAt","ScriptStanekDeleteAt","SF4Cost","cost","player","bitNodeN","sf4","sourceFileLvl","RamCosts","hacknet","numNodes","purchaseNode","getPurchaseNodeCost","getNodeStats","upgradeLevel","upgradeRam","upgradeCore","upgradeCache","getLevelUpgradeCost","getRamUpgradeCost","getCoreUpgradeCost","getCacheUpgradeCost","numHashes","hashCost","spendHashes","sprintf","vsprintf","scan","hack","hackAnalyzeThreads","hackAnalyze","hackAnalyzeSecurity","hackAnalyzeChance","sleep","asleep","share","getSharePower","grow","growthAnalyze","growthAnalyzeSecurity","weaken","weakenAnalyze","print","printf","tprint","clearLog","disableLog","enableLog","isLogEnabled","getScriptLogs","nuke","brutessh","ftpcrack","relaysmtp","httpworm","sqlinject","run","exec","spawn","kill","killall","exit","atExit","scp","ls","ps","hasRootAccess","getIp","getHostname","getHackingLevel","getHackingMultipliers","getHacknetMultipliers","getBitNodeMultipliers","getServer","getServerMoneyAvailable","getServerSecurityLevel","getServerBaseSecurityLevel","getServerMinSecurityLevel","getServerRequiredHackingLevel","getServerMaxMoney","getServerGrowth","getServerNumPortsRequired","getServerRam","getServerMaxRam","getServerUsedRam","serverExists","fileExists","isRunning","stock","getSymbols","getPrice","getAskPrice","getBidPrice","getPosition","getMaxShares","getPurchaseCost","getSaleGain","buy","sell","short","sellShort","placeOrder","cancelOrder","getOrders","getVolatility","getForecast","purchase4SMarketData","purchase4SMarketDataTixApi","purchaseWseAccount","purchaseTixApi","getPurchasedServerLimit","getPurchasedServerMaxRam","getPurchasedServerCost","purchaseServer","deleteServer","getPurchasedServers","write","tryWritePort","read","peek","clear","writePort","readPort","getPortHandle","rm","scriptRunning","scriptKill","getScriptName","getScriptRam","getHackTime","getGrowTime","getWeakenTime","getScriptIncome","getScriptExpGain","getRunningScript","nFormat","tFormat","getTimeSinceLastAug","prompt","wget","getFavorToDonate","getPlayer","mv","getOwnedSourceFiles","tail","toast","universityCourse","gymWorkout","travelToCity","goToLocation","purchaseTor","purchaseProgram","getCurrentServer","connect","manualHack","installBackdoor","getDarkwebProgramCost","getDarkwebPrograms","getStats","getCharacterInformation","hospitalize","isBusy","stopAction","upgradeHomeRam","upgradeHomeCores","getUpgradeHomeRamCost","getUpgradeHomeCoresCost","workForCompany","applyToCompany","getCompanyRep","getCompanyFavor","getCompanyFavorGain","checkFactionInvitations","joinFaction","workForFaction","getFactionRep","getFactionFavor","getFactionFavorGain","donateToFaction","createProgram","commitCrime","getCrimeChance","getCrimeStats","getOwnedAugmentations","getAugmentationsFromFaction","getAugmentationCost","getAugmentationPrereq","getAugmentationPrice","getAugmentationRepReq","getAugmentationStats","purchaseAugmentation","softReset","installAugmentations","isFocused","setFocus","gang","createGang","inGang","getMemberNames","getGangInformation","getOtherGangInformation","getMemberInformation","canRecruitMember","recruitMember","getTaskNames","getTaskStats","setMemberTask","getEquipmentNames","getEquipmentCost","getEquipmentType","getEquipmentStats","purchaseEquipment","ascendMember","getAscensionResult","setTerritoryWarfare","getChanceToWinClash","getBonusTime","bladeburner","getContractNames","getOperationNames","getBlackOpNames","getBlackOpRank","getGeneralActionNames","getSkillNames","startAction","stopBladeburnerAction","getCurrentAction","getActionTime","getActionEstimatedSuccessChance","getActionRepGain","getActionCountRemaining","getActionMaxLevel","getActionCurrentLevel","getActionAutolevel","setActionAutolevel","setActionLevel","getRank","getSkillPoints","getSkillLevel","getSkillUpgradeCost","upgradeSkill","getTeamSize","setTeamSize","getCityEstimatedPopulation","getCityCommunities","getCityChaos","getCity","switchCity","getStamina","joinBladeburnerFaction","joinBladeburnerDivision","codingcontract","attempt","getContractType","getData","getDescription","getNumTriesRemaining","sleeve","getNumSleeves","setToShockRecovery","setToSynchronize","setToCommitCrime","setToUniversityCourse","travel","setToCompanyWork","setToFactionWork","setToGymWorkout","getSleeveStats","getTask","getInformation","getSleeveAugmentations","getSleevePurchasableAugs","purchaseSleeveAug","stanek","giftWidth","giftHeight","chargeFragment","fragmentDefinitions","activeFragments","clearGift","canPlaceFragment","placeFragment","getFragment","removeFragment","ui","getTheme","setTheme","resetTheme","getStyles","setStyles","resetStyles","getGameInfo","grafting","getAugmentationGraftPrice","getAugmentationGraftTime","graftAugmentation","heart","break","getRamCost","args","curr","currType","AugmentationNames","dialogBoxCreate","txt","AlertEvents","emit","component","sx","dangerouslySetInnerHTML","__html","CityName","useStyles","makeStyles","createStyles","unbuyable","color","palette","action","disabled","colors","Money","props","classes","undefined","Error","canAfford","className","convertTimeMsToTimeElapsedString","time","showMilli","floor","totalSeconds","days","secondPerHours","secTruncDays","hours","secondPerMinute","secTruncHours","minutes","secTruncMinutes","milliTruncSec","res","longestCommonStart","strings","containsAllStrings","A","concat","sort","a1","a2","L","a","charAt","b","toUpperCase","substring","arr","every","isString","formatNumber","num","numFractionDigits","toLocaleString","maximumFractionDigits","minimumFractionDigits","generateRandomString","chars","random","cyrb53","seed","h1","h2","ch","charCodeAt","imul","toString","ctor","constructors","fromJSON","obj","validationData","validateObject","Generic_toJSON","ctorName","keys","index","Generic_fromJSON","AllServers","GetServer","server","isValidIPAddress","hostname","GetServerByHostname","ipserver","ip","GetServerByIP","GetAllServers","servers","DeleteServer","serverkey","ipExists","createUniqueRandomIp","createRandomIp","AddToAllServers","initForeignServers","homeComputer","networkLayers","propertiesToPatternMatch","toNumber","getRandomInt","min","metadata","serverMetadata","serverParams","numOpenPortsRequired","organizationName","maxRamExponent","maxRam","pow","prop","Server","filename","literature","messages","SpecialServers","WorldDaemon","requiredHackingSkill","networkLayer","linkNetworkLayers","network1","selectServer","server1","server2","serversOnNetwork","getRandomArrayItem","prestigeAllServers","member","loadAllServers","saveAllServers","excludeRunningScripts","TempAllServers","stringify","runningScripts","runningScriptObj","logs","Page","KEY","Factions","loadFactions","faction","getInfo","err","error","factionExists","initFactions","FactionInfos","resetFaction","Faction","newFactionObject","factionName","favor","AddToFactions","Context","React","createContext","Router","use","useContext","SoftwareCompanyPositions","ITCompanyPositions","SecurityEngineerCompanyPositions","NetworkEngineerCompanyPositions","BusinessCompanyPositions","SecurityCompanyPositions","AgentCompanyPositions","MiscCompanyPositions","SoftwareConsultantCompanyPositions","BusinessConsultantCompanyPositions","PartTimeCompanyPositions","lower","upper","AllCorporationStates","CorporationConstants","INITIALSHARES","SHARESPERPRICEUPDATE","IssueNewSharesCooldown","SellSharesCooldown","CyclesPerMarketCycle","CyclesPerIndustryStateCycle","SecsPerMarketCycle","Cities","Aevum","Chongqing","Sector12","NewTokyo","Ishima","Volhaven","WarehouseInitialCost","WarehouseInitialSize","WarehouseUpgradeBaseCost","OfficeInitialCost","OfficeInitialSize","OfficeUpgradeBaseCost","BribeThreshold","BribeToRepRatio","ProductProductionCostRatio","DividendMaxPercentage","EmployeeSalaryMultiplier","CyclesPerEmployeeRaise","EmployeeRaiseAmount","BaseMaxProducts","AllMaterials","FundingRoundShares","FundingRoundMultiplier","HacknetNodeConstants","MoneyGainPerLevel","BaseCost","LevelBaseCost","RamBaseCost","CoreBaseCost","PurchaseNextMult","UpgradeLevelMult","UpgradeRamMult","UpgradeCoreMult","MaxLevel","MaxRam","MaxCores","PurchaseMultipliers","x1","x5","x10","MAX","HacknetServerConstants","HashesPerLevel","CacheBaseCost","PurchaseMult","UpgradeCacheMult","MaxServers","MaxCache","Augmentation","params","info","moneyCost","repCost","factions","prereqs","baseRepRequirement","baseCost","startingCost","isSpecial","level","hacking_mult","mults","strength_mult","defense_mult","dexterity_mult","agility_mult","charisma_mult","hacking_exp_mult","strength_exp_mult","defense_exp_mult","dexterity_exp_mult","agility_exp_mult","charisma_exp_mult","hacking_chance_mult","hacking_speed_mult","hacking_money_mult","hacking_grow_mult","company_rep_mult","faction_rep_mult","crime_money_mult","crime_success_mult","work_money_mult","hacknet_node_money_mult","hacknet_node_purchase_cost_mult","hacknet_node_ram_cost_mult","hacknet_node_core_cost_mult","hacknet_node_level_cost_mult","bladeburner_max_stamina_mult","bladeburner_stamina_gain_mult","bladeburner_analysis_mult","bladeburner_success_chance_mult","stats","programs","startingMoney","f","decimals","desc","generateStatsDescription","addToFactions","factionList","augmentations","addToAllFactions","fac","facObj","special","toJSON","modal","display","alignItems","justifyContent","paper","backgroundColor","background","default","border","primary","main","boxShadow","dark","padding","maxWidth","maxHeight","overflow","scrollbarWidth","Modal","disableRestoreFocus","disableScrollLock","disableEnforceFocus","disableAutoFocus","open","onClose","closeAfterTransition","in","children","ActionTypes","Idle","Contract","Operation","BlackOp","BlackOperation","Training","Recruitment","FieldAnalysis","Diplomacy","root","borderBottom","small","width","TableCell","Table","iTutorialSteps","ITutorial","currStep","Start","stepIsDone","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalGoHome","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End","iTutorialStart","iTutorialNextStep","iTutorialEnd","ITutorialEvents","iTutorialPrevStep","getHomeComputer","LiteratureNames","HackersStartingHandbook","t_homeComp","safetlyCreateUniqueServer","adminRights","isConnectedTo","purchasedByPlayer","currentServer","Home","Programs","NukeProgram","prestigeAugmentation","numPeopleKilled","hacking","strength","defense","dexterity","agility","charisma","hacking_exp","strength_exp","defense_exp","dexterity_exp","agility_exp","charisma_exp","city","location","TravelAgency","companyName","jobs","purchasedServers","factionInvitations","queuedAugmentations","numSleeves","SourceFileFlags","sleevesFromCovenant","sleeves","Sleeve","shock","synchronize","shockRecovery","isWorking","currentWorkFactionName","currentWorkFactionDescription","createProgramName","crimeType","workHackExpGainRate","workStrExpGainRate","workDefExpGainRate","workDexExpGainRate","workAgiExpGainRate","workChaExpGainRate","workRepGainRate","workMoneyGainRate","workHackExpGained","workStrExpGained","workDefExpGained","workDexExpGained","workAgiExpGained","workChaExpGained","workRepGained","workMoneyGained","timeWorked","lastUpdate","Date","getTime","playtimeSinceLastAug","scriptProdSinceLastAug","moneySourceA","reset","hacknetNodes","hashManager","prestige","reapplyAllAugmentations","hp","max_hp","prestigeSourceFile","entropy","karma","sync","resetGangs","hasWseAccount","hasTixApiAccess","has4SData","has4SDataTixApi","corporation","moneySourceB","playtimeSinceLastBitnode","receiveInvite","includes","calculateSkill","exp","mult","calculateSkillF","calculateSkillProgress","calculateSkillProgressF","updateSkillLevels","intelligence","intelligence_exp","ratio","round","resetMultipliers","hasProgram","programName","home","toLowerCase","setMoney","gainMoney","source","recordMoneySource","loseMoney","amt","MoneySourceTracker","record","gainHackingExp","gainStrengthExp","gainDefenseExp","gainDexterityExp","gainAgilityExp","gainCharismaExp","gainIntelligenceExp","queryStatFromString","tempStr","resetWorkStatus","generalType","group","workType","factionWorkType","singularityStopWork","workMoneyLossRate","timeWorkedCreateProgram","timeWorkedGraftAugmentation","graftAugmentationName","processWorkEarnings","numCycles","focusBonus","hasAugmentation","focus","hackExpGain","strExpGain","defExpGain","dexExpGain","agiExpGain","chaExpGain","moneyGain","startWork","getWorkHackExpGain","getWorkStrExpGain","getWorkDefExpGain","getWorkDexExpGain","getWorkAgiExpGain","getWorkChaExpGain","getWorkRepGain","getWorkMoneyGain","timeNeededToCompleteWork","process","router","toFaction","createProgramWork","toTerminal","takeClass","toCity","toLocation","Locations","Slums","workPartTime","graftAugmentationWork","toGrafting","work","cancelationPenalty","find","specialName","backdoorInstalled","overMax","comp","Companies","influenceStockThroughCompanyWork","finishWork","cancelled","sing","penaltyString","playerReputation","content","reputation","startWorkPartTime","finishWorkPartTime","startFocusing","stopFocusing","startFactionWork","favorMult","startFactionHackWork","getHackingWorkRepGain","startFactionFieldWork","getFactionFieldWorkRepGain","startFactionSecurityWork","getFactionSecurityWorkRepGain","finishFactionWork","bn11Mult","company","companyPositionName","companyPosition","CompanyPositions","baseSalary","salaryMultiplier","hackingExpGain","expMultiplier","strengthExpGain","defenseExpGain","dexterityExpGain","agilityExpGain","charismaExpGain","jobPerformance","calculateJobPerformance","startCreateProgramWork","reqLevel","createProgramReqLvl","programFile","startsWith","endsWith","split","percComplete","Number","reqLvl","skillMult","getIntelligenceBonus","finishCreateProgramWork","incompleteName","startGraftAugmentationWork","augmentationName","craftAugmentationWork","NeuroreceptorManager","finishGraftAugmentationWork","augName","applyAugmentation","Augmentations","applyEntropy","startClass","costMult","expMult","workCostMult","workExpMult","earnings","calculateClassEarnings","finishClass","startCrime","hackExp","strExp","defExp","dexExp","agiExp","chaExp","workerscript","committingCrimeThruSingFn","singFnCrimeWorkerScript","toWork","finishCrime","determineCrimeSuccess","crime","Crimes","type","kills","ws","disableLogs","ALL","scriptRef","log","takeDamage","regenerateHp","getHospitalizationCost","SnackbarEvents","applyForJob","entryPosType","currCompany","currPositionName","Company","pos","isQualified","reqText","getJobRequirementText","hasPosition","newPos","getNextCompanyPositionHelper","nextPos","getNextCompanyPosition","currentPositionName","currentPosition","isSoftwareJob","isITJob","isBusinessJob","isSecurityEngineerJob","isNetworkEngineerJob","isSecurityJob","isAgentJob","isSoftwareConsultantJob","isBusinessConsultantJob","isPartTimeJob","quitJob","hasJob","Boolean","applyForSoftwareJob","posNames","applyForSoftwareConsultantJob","applyForItJob","applyForSecurityEngineerJob","applyForNetworkEngineerJob","applyForBusinessJob","applyForBusinessConsultantJob","applyForSecurityJob","applyForAgentJob","applyForEmployeeJob","position","applyForPartTimeEmployeeJob","applyForWaiterJob","applyForPartTimeWaiterJob","offset","jobStatReqOffset","reqHacking","requiredHacking","reqStrength","requiredStrength","reqDefense","requiredDefense","reqDexterity","requiredDexterity","reqAgility","reqCharisma","requiredCharisma","requiredReputation","playerAug","aug","owned","NeuroFluxGovernor","reapplyAllSourceFiles","sourceFiles","srcFileKey","SourceFiles","applySourceFile","applyExploit","checkForFactionInvitations","invitedFactions","numAugmentations","allCompanies","allPositions","values","checkMegacorpRequirements","repNeeded","illuminatiFac","Illuminati","isBanned","isMember","alreadyInvited","daedalusFac","Daedalus","covenantFac","TheCovenant","ecorpFac","ECorp","AevumECorp","megacorpFac","MegaCorp","Sector12MegaCorp","bachmanandassociatesFac","BachmanAssociates","AevumBachmanAndAssociates","bladeindustriesFac","BladeIndustries","Sector12BladeIndustries","nwoFac","NWO","VolhavenNWO","clarkeincorporatedFac","ClarkeIncorporated","AevumClarkeIncorporated","omnitekincorporatedFac","OmniTekIncorporated","VolhavenOmniTekIncorporated","foursigmaFac","FourSigma","Sector12FourSigma","kuaigonginternationalFac","KuaiGongInternational","ChongqingKuaiGongInternational","fulcrumsecrettechonologiesFac","FulcrumSecretTechnologies","fulcrumSecretServer","AevumFulcrumTechnologies","bitrunnersFac","BitRunners","bitrunnersServer","BitRunnersServer","theblackhandFac","TheBlackHand","blackhandServer","TheBlackHandServer","nitesecFac","NiteSec","nitesecServer","NiteSecServer","chongqingFac","sector12Fac","newtokyoFac","aevumFac","ishimaFac","volhavenFac","speakersforthedeadFac","SpeakersForTheDead","Sector12CIA","Sector12NSA","thedarkarmyFac","TheDarkArmy","thesyndicateFac","TheSyndicate","silhouetteFac","Silhouette","tetradsFac","Tetrads","slumsnakesFac","SlumSnakes","netburnersFac","Netburners","totalHacknetRam","totalHacknetCores","totalHacknetLevels","v","hserver","HacknetServer","cores","ram","tiandihuiFac","TianDiHui","cybersecFac","CyberSec","cybersecServer","CyberSecServer","setBitNodeNumber","queueAugmentation","PlayerOwnedAugmentation","gainCodingContractReward","reward","difficulty","CodingContractRewardType","FactionReputation","FactionReputationAll","repGain","totalGain","specialFactions","Bladeburners","filter","gainPerFaction","facName","CompanyReputation","to","gotoLocation","canAccessGrafting","giveExploit","exploit","giveAchievement","achievementId","achievement","achievements","map","ID","unlockedOn","Name","weight","calculateIntelligenceBonus","getCasinoWinnings","casino","getMult","setMult","canAccessCotMG","sf","lvl","BaseServer","super","createRandomString","moneyAvailable","moneyMax","hackDifficulty","baseDifficulty","minDifficulty","serverGrowth","capDifficulty","changeMinimumSecurity","perc","changeMaximumMoney","aboveCap","fortify","Corporation","Division","useCorporation","useDivision","Industries","Energy","Utilities","Agriculture","Fishing","Mining","Food","Tobacco","Chemical","Pharmaceutical","Computer","Robotics","Software","Healthcare","RealEstate","IndustryStartingCosts","IndustryDescriptions","corp","IndustryResearchTrees","getBaseResearchTreeCopy","getProductIndustryResearchTreeCopy","resetIndustryResearchTrees","LocationType","EmployeePositions","Operations","Engineer","Business","Management","RandD","Unassigned","hasHacknetServers","purchaseHacknet","numOwned","getCostOfNextHacknetServer","createHacknetServer","updateHashManagerCapacity","getCostOfNextHacknetNode","node","HacknetNode","hasMaxNumberHacknetServers","calculateNodeCost","calculateServerCost","getMaxNumberLevelUpgrades","nodeObj","maxLevel","calculateLevelUpgradeCost","levelsToMax","getMaxNumberRamUpgrades","calculateRamUpgradeCost","log2","getMaxNumberCoreUpgrades","calculateCoreUpgradeCost","getMaxNumberCacheUpgrades","calculateCacheUpgradeCost","cache","purchaseLevelUpgrade","levels","sanitizedLevels","isServer","purchaseRamUpgrade","purchaseCoreUpgrade","purchaseCacheUpgrade","processHacknetEarnings","HashManager","hashes","updateHashRate","h","wastedHashes","storeHashes","upgrade","HashUpgrades","multiplier","processAllHacknetServerEarnings","total","processSingleHacknetNodeEarnings","processAllHacknetNodeEarnings","totalEarnings","nodes","updateCapacity","hashCapacity","purchaseHashUpgrade","upgName","upgTarget","upg","refundUpgrade","funds","target","e","division","divisions","sciResearch","qty","changeRank","skillPoints","generateRandomContract","BlackOperationNames","BladeburnerConstants","CityNames","CyclesPerSecond","StaminaGainPerSecond","BaseStaminaLoss","MaxStaminaToGainFactor","DifficultyToTimeFactor","DiffMultExponentialFactor","DiffMultLinearFactor","EffAgiLinearFactor","EffDexLinearFactor","EffAgiExponentialFactor","EffDexExponentialFactor","BaseRecruitmentTimeNeeded","PopulationThreshold","PopulationExponent","ChaosThreshold","BaseStatGain","BaseIntGain","ActionCountGrowthPeriod","RankToFactionRepFactor","RankNeededForFaction","ContractSuccessesPerLevel","OperationSuccessesPerLevel","RanksPerSkillPoint","ContractBaseMoneyGain","HrcHpGain","HrcStaminaGain","CorporationManagementHandbook","HistoryOfSynthoids","AGreenTomorrow","AlphaOmega","SimulatedReality","BeyondMan","BrighterThanTheSun","DemocracyIsDead","Sector12Crime","ManAndMachine","SecretSocieties","TheFailedFrontier","CodedIntelligence","SyntheticMuscles","TensionsInTechRace","CostOfImmortality","TheHiddenWorld","TheNewGod","NewTriads","TheSecretWar","programsMetadata","Program","initCompanies","oldCompanies","companiesMetadata","forEach","loadCompanies","NewIndustry","industry","Industry","NewCity","offices","OfficeSpace","loc","size","UnlockUpgrade","unlockUpgrades","unlock","LevelUpgrade","priceMult","upgrades","IssueDividends","percent","dividendPercentage","SellMaterial","mat","price","replace","temp","bCost","eval","sCost","q","tempQty","maxsll","prd","sllman","SellProduct","product","all","cities","tempCity","SetSmartSupply","warehouse","smartSupply","smartSupplyEnabled","SetSmartSupplyUseLeftovers","material","useLeftover","smartSupplyUseLeftovers","BuyMaterial","BulkPurchase","matSize","MaterialSizes","maxAmount","sizeUsed","SellShares","numShares","public","shareSaleCooldown","stockSaleResults","calculateShareSale","profit","newSharePrice","newSharesUntilUpdate","issuedShares","sharePrice","shareSalesUntilPriceUpdate","BuyBackShares","buybackPrice","AssignJob","employee","job","UpgradeOfficeSize","office","initialPriceMult","ThrowParty","costPerEmployee","totalCost","employees","throwParty","PurchaseWarehouse","warehouses","Warehouse","UpgradeWarehouse","sizeUpgradeCost","updateSize","BuyCoffee","IndustryUpgrades","HireAdVert","MakeProduct","productName","designInvest","marketingInvest","makesProducts","maxProducts","hasResearch","products","Product","createCity","designCost","advCost","Research","researchName","researchTree","getAllNodes","research","ResearchMap","researched","ExportMaterial","divisionName","cityName","sanitizedAmt","isRelevantMaterial","exportObj","ind","CancelExportMaterial","LimitProductProduction","prdman","SetMaterialMarketTA1","on","marketTa1","SetMaterialMarketTA2","marketTa2","SetProductMarketTA1","SetProductMarketTA2","PositionTypes","SleeveTaskType","FragmentType","Effect","tpe","HackingChance","HackingSpeed","HackingMoney","HackingGrow","Hacking","Strength","Defense","Dexterity","Agility","Charisma","HacknetMoney","HacknetCost","Rep","WorkMoney","Crime","Bladeburner","AllGangs","power","territory","loadAllGangs","Array","updateSourceFileFlags","removeLeadingSlash","removeTrailingSlash","isValidFilename","isValidDirectoryName","isValidDirectoryPath","path","t_path","dirs","dir","isValidFilePath","fnSeparator","lastIndexOf","fn","getFirstParentDirectory","getAllParentDirectories","lastSlash","getDestinationFilepath","destination","cwd","dstDir","evaluateDirectoryPath","fileName","getFileName","isInRootDirectory","currPath","reconstructedPath","pop","evaluateFilePath","areFilesEqual","f0","f1","areImportsEquals","Shoplift","dexterity_success_weight","agility_success_weight","RobStore","hacking_success_weight","Mug","strength_success_weight","defense_success_weight","Larceny","DealDrugs","charisma_success_weight","BondForgery","TraffickArms","Homicide","GrandTheftAuto","Kidnap","Assassination","Heist","trusted","event","isTrusted","Terminal","TTerminal","updateHashCapacity","seconds","onlineTimeSeconds","hashRate","totalHashesGenerated","prodMult","cpuCores","runScript","script","updateRamUsed","calculateHashGainRate","ramUsed","companyPositionMetadata","CompanyPosition","htmlLocation","margin","spacing","flexGrow","minHeight","boxSizing","uninitialized","isInitialized","page","allowRouting","toActiveScripts","toAugmentations","toBitVerse","toBladeburner","toStats","toCorporation","toCreateProgram","toDevMenu","toFactions","toGameOptions","toGang","toHacknetNodes","toInfiltration","toJob","toMilestones","toScriptEditor","toSleeves","toStockMarket","toTravel","toTutorial","toBladeburnerCinematic","toStaneksGift","toAchievements","toThemeBrowser","toImportSave","GameRoot","engine","terminal","files","vim","setEditorOptions","useState","setPage","RecoveryMode","Recovery","Work","determineStartPage","setRerender","augPage","setAugPage","setFaction","flume","setFlume","quick","setQuick","setLocation","Infiltration","Location","Job","cinematicText","setCinematicText","errorBoundaryKey","setErrorBoundaryKey","sidebarOpened","setSideBarOpened","importString","setImportString","importAutomatic","setImportAutomatic","ImportSave","allowRoutingCalls","setAllowRoutingCalls","rerender","old","killAllScripts","saveObject","saveGame","setTimeout","reload","useEffect","subscribe","ActiveScripts","Stats","CreateProgram","DevMenu","Options","Gang","Hacknet","Milestones","Grafting","options","ScriptEditor","Sleeves","StockMarket","Tutorial","City","Travel","calculateAchievements","BitVerse","BladeburnerCinematic","StaneksGift","Achievements","ThemeBrowser","base64save","automatic","_functions","fnName","_wrap","func","scrollTo","mainPage","withSidebar","withPopups","bypassGame","enter","enterBitNode","staneksGift","workerScripts","reactivateTutorial","buyStockLong","buyStock","buyStockShort","shortStock","eventEmitterForReset","eventEmitterForUiReset","initStockMarket","initStockMarketFnForReact","sellStockLong","sellStock","sellStockShort","stockMarket","export","onExport","exportGame","forceKill","exportGameFn","installAugmentationsFn","Provider","killScripts","flexDirection","onToggled","isOpened","StockSymbols","IshimaStormTechnologies","NewTokyoDefComm","VolhavenHeliosLabs","NewTokyoVitaLife","Sector12IcarusMicrosystems","Sector12UniversalEnergy","AevumAeroCorp","VolhavenOmniaCybersystems","ChongqingSolarisSpaceSystems","NewTokyoGlobalPharmaceuticals","IshimaNovaMedical","AevumWatchdogSecurity","VolhavenLexoCorp","AevumRhoConstruction","Sector12AlphaEnterprises","VolhavenSysCoreSecurities","VolhavenCompuTek","AevumNetLinkTechnologies","IshimaOmegaSoftware","Sector12FoodNStuff","Sector12JoesGuns","validScriptExtensions","isScriptFilename","some","ext","calculateHackingChance","difficultyMult","chance","calculateHackingExpGain","expGain","calculatePercentMoneyHacked","percentMoneyHacked","calculateHackingTime","skillFactor","calculateGrowTime","calculateWeakenTime","Orders","storedCycles","ticksUntilCycle","SymbolToStockMap","shares","workerScript","Stock","order","Order","symbol","orders","stk","processOrderRefs","symbolToStockMap","processOrders","stockOrders","stockSymbol","orderTxt","loadStockMarket","deleteStockMarket","InitStockMetadata","TicksPerCycle","initSymbolToStockMap","cyclesPerStockUpdate","processStockPrices","timeNow","flipForecastForecast","stockMarketCycle","av","chc","otlkMag","cap","changePrice","OrderTypes","LimitBuy","Short","LimitSell","Long","StopBuy","StopSell","otlkMagChange","cycleForecast","cycleForecastForecast","shareTxUntilMovement","shareTxForMovement","EventEmitter","TheDarkArmyServer","DaedalusServer","DarkWeb","inviteToFaction","InvitationEvent","allFactions","factionInfo","enemy","enemies","hasAugmentationPrereqs","hasPrereqs","prereqAug","augmentationPriceMult","queuedAugmentation","getNextNeurofluxLevel","nextLevel","currLevel","processPassiveFactionRepGain","offersWork","getGangName","hRep","sRep","fRep","rate","getFactionAugmentationsFiltered","hasGangWith","augs","blacklist","TheRedPill","rng","SFC32RNG","uniqueFilter","Exploit","names","Bypass","EditSaveFile","PrototypeTampering","TimeCompression","Unclickable","UndocumentedFunctionCall","RealityAlteration","N00dles","YoureNotMeantToAccessThis","TrueRecursion","INeedARainbow","ExploitName","Set","BitburnerSaveObject","getSaveString","PlayerSave","AllServersSave","CompaniesSave","FactionsSave","AliasesSave","Aliases","GlobalAliasesSave","GlobalAliases","MessagesSave","Messages","StockMarketSave","SettingsSave","VersionSave","LastExportBonus","ExportBonus","StaneksGiftSave","AllGangsSave","btoa","unescape","encodeURIComponent","emitToastEvent","savedOn","lastSave","Promise","resolve","reject","then","saveData","playerIdentifier","identifier","getSaveFileName","pushGameSaved","catch","isRecovery","epochTime","now","bn","download","importGame","base64Save","getImportStringFromFile","file","reader","FileReader","promise","onload","readAsText","newSave","parsedSave","atob","trim","base64","importedPlayer","playerData","totalPlaytime","reduce","current","bitNode","bitNodeLevel","loadGame","navigator","userAgent","setInterval","decodeURIComponent","escape","saveObj","loadStaneksGift","loadAliases","loadGlobalAliases","loadMessages","initMessages","ver","anyPlayer","positionName","companyPositions","changes","convert","code","change","scripts","v1APIBreak","nf","revenue","expenses","lastCycleRevenue","lastCycleExpenses","thisCycleRevenue","thisCycleExpenses","augmentation","resleeves","evaluateVersionCompatibility","href","resets","createNewUpdateText","whiteSpace","paddingLeft","lineHeight","Blob","msSaveOrOpenBlob","document","createElement","url","URL","createObjectURL","body","appendChild","click","removeChild","revokeObjectURL","netscriptDelay","delayReject","delay","env","stopFlag","makeRuntimeRejectMsg","msg","scriptUrl","dependencies","resolveNetscriptRequestedThreads","functionName","requestedThreads","threads","requestedThreadsAsInt","isScriptErrorMessage","MoneyRate","CodingContractType","gen","solver","diff","numTries","generate","CodingContractTypes","md","codingContractTypesMetadata","CodingContractResult","CodingContract","getDifficulty","getMaxNumTries","getType","isSolution","solution","Cancelled","onAttempt","val","Success","Failure","CodingContractEvent","rep","Reputation","Adjuster","setValue","label","placeholder","add","subtract","tons","onChange","InputProps","startAdornment","title","onClick","style","transform","endAdornment","makeNode","Node","text","createBaseResearchTreeNodes","rootNode","autoBrew","autoParty","autoDrugs","bulkPurchasing","cph4","drones","dronesAssembly","dronesTransport","goJuice","hrRecruitment","hrTraining","joywire","marketta1","marketta2","overclock","scAssemblers","stimu","addChild","baseResearchTree","ResearchTree","setRoot","upgradeFulcrum","upgradeCapacity1","upgradeCapacity2","upgradeDashboard","uuidv4","uuid","subscribers","sub","numCycleForGrowth","growth","ajdGrowthRate","serverGrowthPercentage","coreBonus","numCycleForGrowthCorrected","targetMoney","startMoney","adjGrowthRate","exponentialBase","coreMultiplier","threadMultiplier","w","ey","cycles","bt","corr","bct","opc","fca","cca","ceil","processSingleServerGrowth","calculateServerGrowth","oldMoneyAvailable","isValidNumber","usedCycles","prestigeHomeComputer","homeComp","hasBitflume","BitFlume","updateRamUsage","getServerOnNetwork","isBackdoorInstalled","upArrowSymbol","downArrowSymbol","leftArrowSymbol","rightArrowSymbol","getArrow","UP_ARROW","W","LEFT_ARROW","DOWN_ARROW","S","RIGHT_ARROW","D","SkillNames","BladesIntuition","Cloak","Marksman","WeaponProficiency","ShortCircuit","DigitalObserver","Tracer","Overclock","Reaper","EvasiveSystem","Datamancer","CybersEdge","HandsOfMidas","Hyperdrive","count","getActionTimePenalty","getChaosCompetencePenalty","getChaosDifficultyBonus","useGang","snackbar","zIndex","logBoxBaseZIndex","alignSelf","SnackbarProvider","dense","maxSnack","anchorOrigin","horizontal","vertical","autoHideDuration","containerRoot","Snackbar","enqueueSnackbar","closeSnackbar","useSnackbar","variant","duration","id","severity","k","initAugmentations","resetFactionAugmentations","clearObject","initNeuroFluxGovernor","initUnstableCircadianModulator","generalAugmentations","bladeburnerAugmentations","ChurchOfTheMachineGod","churchOfTheMachineGodAugmentations","resetAugmentation","augmentationToUpdate","updateNeuroFluxGovernorCosts","getGenericAugmentationPriceMultiplier","updateAugmentationCosts","getBaseAugmentationPriceMultiplier","neuroFluxGovernorAugmentation","getNextNeuroFluxLevel","augmentationExists","AddToAugmentations","reapply","augObj","ownedAug","augmentationList","nfgIndex","isRepeatableAug","killWorkerScript","rerenderUi","WorkerScript","stopAndCleanUpWorkerScript","RunningScript","killWorkerScriptByPid","pid","compareArrays","clearTimeout","killNetscriptDelay","runningScript","rs","ramUsage","delete","AddRecentScript","WorkerScriptStartStopEventEmitter","removeWorkerScript","MoneyCost","StatsRow","cellNone","align","String","defaultConstructorParams","initPrice","marketCap","spreadPerc","range","divisor","lastPrice","playerShares","playerAvgPx","playerShortShares","playerAvgShortPx","otlkMagForecast","getAbsoluteForecast","totalSharesUnrounded","totalShares","maxShares","changeForecastForecast","newff","newPrice","changeAmt","increaseChance","getForecastIncreaseChance","influenceForecast","influenceForecastForecast","printAliases","parseAliasDeclaration","dec","global","matches","addGlobalAlias","addAlias","getAlias","getGlobalAlias","removeAlias","substituteAliases","origCommand","commandArray","somethingSubstituted","depth","alias","Literature","ThemeEvents","refreshTheme","createTheme","combat","cha","int","backgroundprimary","backgroundsecondary","button","successlight","success","successdark","white","black","light","primarylight","primarydark","secondary","secondarylight","secondarydark","errorlight","errordark","infolight","infodark","warning","warninglight","warningdark","well","typography","fontFamily","textTransform","components","MuiInputBase","styleOverrides","input","userSelect","MuiInput","borderBottomColor","underline","MuiInputLabel","MuiButtonGroup","marginRight","MuiButton","borderRadius","MuiSelect","icon","defaultProps","MuiTextField","MuiTypography","MuiMenu","list","MuiMenuItem","MuiAccordionSummary","MuiAccordionDetails","MuiIconButton","MuiTooltip","tooltip","fontSize","disableInteractive","MuiSlider","valueLabel","MuiDrawer","paperAnchorDockedLeft","borderRight","welllight","MuiDivider","MuiFormControlLabel","MuiSwitch","switchBase","track","MuiPaper","MuiTablePagination","select","selectLabel","displayedRows","MuiTab","textColorPrimary","MuiTabs","scrollButtons","opacity","TabIndicatorProps","MuiAlert","standardSuccess","standardError","standardWarning","standardInfo","TTheme","injectFirst","CopyableText","setOpen","copyText","setSelectionRange","execCommand","Water","Plants","Metal","Hardware","Chemicals","Drugs","Robots","AICores","calculateExp","skill","currentSkill","nextSkill","baseExperience","nextExperience","progress","currentExperience","remainingExperience","experience","UpgradeType","gangMemberUpgradesMetadata","def","upgType","Weapon","dex","agi","Armor","Vehicle","Rootkit","layerCounter","LogBoxEvents","LogBoxClearEvents","LogBoxManager","LogWindow","close","visibility","overflowY","overflowX","draggableRef","useRef","rootRef","setScript","container","minimized","setMinimized","updateLayer","full","maxLength","clearInterval","addEventListener","onResize","removeEventListener","debounce","isOnScreen","resetPosition","bounds","getBoundingClientRect","right","bottom","left","innerWidth","top","outerWidth","state","setState","handle","onDrag","clientX","clientY","innerHeight","ref","flexFlow","onMouseDown","cursor","has","findRunningScript","startWorkerScript","overflowWrap","height","line","Map","StatsTable","rows","wide","T","MuiTable","row","elem","noWrap","startingLevel","extraLevels","totalMultiplier","startingRam","numUpgrades","currentRam","startingCores","currentCores","startingCache","currentCache","FactionWorkType","OptionSwitch","checked","control","createProgressBarText","derived","totalTicks","bars","dashes","NetscriptPorts","NetscriptPort","prestigeWorkerScripts","port","startNetscript1Script","codeWithImports","codeLineOffset","running","importProcessingRes","ast","ecmaVersion","allowReserved","sourceType","generatedCode","hasImports","walksimple","ImportDeclaration","scriptName","getScript","scriptAst","specifiers","namespace","local","fnNames","fnDeclarations","FunctionDeclaration","fnsToImport","lineOffset","linesRemoved","processNetscript1Imports","interpreterInitialization","scope","NetscriptFunctions","entry","tempWrapper","fnArgs","pseudoToNative","cb","errorTextArray","errorMsg","setProperty","createAsyncFunction","createNativeFunction","nativeToPseudo","interpreter","Interpreter","runInterpreter","more","step","errorMessage","parent","createAndAddWorkerScript","oneRamUsage","getRamUsageFromRunningScript","roundToTwo","arrayToString","generateNextPid","set","runningFn","wrap","propName","finally","vars","charge","executeJSScript","SyntaxError","message","stack","startNetscript2Script","onlineExpGained","onlineMoneyMade","updateOnlineScriptTimes","onlineRunningTime","loadAllRunningScripts","skipScriptLoad","markUpdated","scriptCalculateOfflineProduction","runScriptFromScript","caller","scriptname","isArray","arg","ramAvailable","hasAdminRights","Material","getMarkupLimit","qlt","mku","dmd","dmdR","cmp","cmpR","processMarket","priceChange","compChange","dmdChange","calculateWantedPenalty","respect","wantedLevel","calculateRespectGain","task","baseRespect","statWeight","hackWeight","strWeight","defWeight","dexWeight","agiWeight","chaWeight","territoryMult","territoryPenalty","respectMult","calculateWantedLevelGain","baseWanted","wanted","calc","calculateMoneyGain","baseMoney","calculateAscensionPointsGain","calculateAscensionMult","points","gainFavor","getFavorGain","totalRep","favorToRep","repToFavor","calculateMoneyGainRate","startingCore","sanitizedCores","coreBaseCost","win","reachedLimit","reached","Game","_","X","Shapes","O","I","J","Z","KeyHandler","press","onKeyDown","TimerProgress","withStyles","bar","transition","LinearProgress","GameTimer","setV","intervalId","onExpire","millis","item","xs","interpolate","settings","out","lerpD","lerp","Trivial","Normal","Hard","Impossible","constructLocation","asciiArt","LocationsMetadata","addLocation","BitNode","BitNodes","initBitNodeMultipliers","sf12Lvl","inc","updateMoneyGainRate","gain","moneyGainRatePerSecond","totalMoneyGenerated","minMax","getPurchaseServerCost","sanitizedRam","isPowerOfTwo","sign","getPurchaseServerMaxRam","getPurchaseServerLimit","clz32","newServ","purchaseRamForHomeComputer","TextFile","append","show","getTextFile","textFiles","createTextFile","Skills","Skill","costInc","successChanceAll","successChanceStealth","successChanceKill","successChanceOperation","successChanceContract","maxLvl","actionTime","effStr","effDef","effDex","effAgi","successChanceEstimate","stamina","GangMemberUpgrades","GangMemberUpgrade","getBuyTransactionCost","posType","getSellTransactionGain","processTransactionForecastMovement","firstShares","remainingShares","numIterations","forecastChange","forecastForecastChange","calculateBuyMaxAmount","isLong","remainingMoney","currPrice","getStockMarket4SDataCost","getStockMarket4STixApiCost","getStockMarketWseCost","getStockMarketTixApiCost","timePassed","confidence","dataMap","serv","timesGrown","host","offlineRunningTime","offlineExpGained","timesWeakened","findRunningScriptByPid","Hashes","ActionIdentifier","general","contracts","ops","blackops","events","updateSkillMultipliers","calculateMaxStamina","maxStamina","getCurrentCity","calculateStaminaPenalty","canAttemptBlackOp","actionId","getActionObject","reqdRank","rank","nm","BlackOperations","isAvailable","actionTimeCurrent","actionTimeToComplete","resetAction","exceptionAlert","comms","testBlackOp","getRecruitmentTime","skillName","skills","executeConsoleCommands","commands","consoleHistory","arrayOfCommands","executeConsoleCommand","postToConsole","saveToLogs","consoleLogs","getTimestamp","clearConsole","bladeburnerFac","storeCycles","getActionIdFromTypeAndName","convertedType","convertedName","operations","executeStartConsoleCommand","GeneralActions","executeSkillConsoleCommand","skillNames","multKeys","skillMultipliers","currentLevel","pointCost","calculateCost","executeLogConsoleCommand","flag","logging","executeHelpConsoleCommand","ConsoleHelpText","helpList","helpText","executeAutomateConsoleCommand","variable","highLow","automateActionHigh","automateActionLow","automateThreshHigh","automateThreshLow","automateEnabled","parseCommandArguments","command","start","endQuote","SPACE","substr","triggerMigration","sourceCityName","destCityName","destCity","sourceCity","rand","percentage","triggerPotentialMigration","randomEvent","chaos","gainActionStats","successMult","unweightedGain","unweightedIntGain","weights","getDiplomacyEffectiveness","getRecruitmentSuccessChance","teamSize","effCharisma","effCha","charismaFactor","resetSkillMultipliers","effHack","effInt","multiplierNames","multiplierName","getMultiplier","multiplierValue","completeOperation","teamCount","losses","teamLost","improvePopulationEstimateByPercentage","changePopulationByPercentage","changeEstEqually","nonZero","changeChaosByCount","changeChaosByPercentage","changePopulationByCount","estChange","estOffset","completeContract","improvePopulationEstimateByCount","completeAction","isOperation","difficultyMultiplier","rewardMultiplier","rewardFac","successes","setMaxLevel","rankGain","addOffset","failures","loss","damage","rankLoss","hpLoss","hpLost","calculateHospitalizationCost","numHosp","moneyLost","logLossText","autoLevel","teamLossMax","OperationDaedalus","staminaGain","staminaBonus","eff","successChance","contract","growthF","Growths","operation","maxRank","bladeburnersFactionName","favorBonus","rankNeededForSp","totalSkillPoints","gainedSkillPoints","processAction","actionTimeOverflow","calculateStaminaGainPerSecond","effAgility","maxStaminaBonus","oldMax","difficultyFac","decays","isStealth","isKill","BladesSimulacrum","op","randomEventCounter","getTypeAndNameFromActionId","types","getContractNamesNetscriptFn","getOperationNamesNetscriptFn","getBlackOpNamesNetscriptFn","getGeneralActionNamesNetscriptFn","getSkillNamesNetscriptFn","startActionNetscriptFn","errorLogText","canRunOp","getActionTimeNetscriptFn","actionObj","getActionEstimatedSuccessChanceNetscriptFn","getEstSuccessChance","recChance","getActionCountRemainingNetscriptFn","getSkillLevelNetscriptFn","getSkillUpgradeCostNetscriptFn","upgradeSkillNetscriptFn","getTeamSizeNetscriptFn","setTeamSizeNetscriptFn","sanitizedSize","joinBladeburnerFactionNetscriptFn","DefaultConstructorParams","isPlayerEmployed","isMegacorp","hasAgentPositions","hasBusinessConsultantPositions","hasBusinessPositions","hasEmployeePositions","hasITPositions","hasSecurityPositions","hasSoftwareConsultantPositions","hasSoftwarePositions","hasWaiterPositions","materials","updateMaterialSizeUsed","matName","getStorageMultiplier","GangMemberTasks","gangMemberTasksMetadata","GangMemberTask","isHacking","isCombat","HashUpgradesMetadata","HashUpgrade","Fragments","Fragment","shape","limit","fullAt","rotation","sy","mx","my","qx","qy","neighboors","candidates","coord","cells","candidate","cell","copy","FragmentById","fragment","Booster","NoneFragment","None","DeleteFragment","Delete","CalculateShareMult","opts","suppressDialog","totalPrice","origTotal","newTotal","rerenderFn","resultTxt","gains","netProfit","origCost","Output","formatTime","RawOutput","raw","Link","TTimer","timeLeft","ConfirmationModal","confirmationText","onConfirm","additionalButton","hash","__COMMIT_HASH__","GangConstants","GangRespectToReputationRatio","MaximumGangMembers","CyclesPerTerritoryAndPowerUpdate","AscensionMultiplierRatio","Names","globalModuleSequenceNumber","Script","otherScripts","moduleSequenceNumber","saveScript","formatCode","dependent","dependents","dependentScript","calculateRamUsage","ramUsageEntries","entries","imports","vals","DarkWebItems","BruteSSHProgram","DarkWebItem","FTPCrackProgram","RelaySMTPProgram","HTTPWormProgram","SQLInjectProgram","ServerProfiler","DeepscanV1","DeepscanV2","AutolinkProgram","AutoLink","FormulasProgram","Formulas","actionNames","actionName","Action","Suit","Card","suit","formatValue","isRedSuit","Hearts","Diamonds","getStringRepresentation","SourceFile","bitnodeKey","bitnode","createTaskTracker","Person","calculateStat","getFactionHackingWorkRepGain","updateStatLevels","MathJaxWrapper","version","src","lineNumber","sendMessage","forced","recvd","showMessage","serverHostname","other","addMessageToServer","checkForMessagesToSend","redPillFlag","jumper0","MessageFilenames","Jumper0","jumper1","Jumper1","jumper2","Jumper2","jumper3","Jumper3","jumper4","Jumper4","cybersecTest","CyberSecTest","nitesecTest","NiteSecTest","bitrunnersTest","BitRunnersTest","redpill","RedPill","redpillOwned","flightName","Flight","AddToAllMessages","Message","nsFuncsGenerator","sanitizedPid","found","Environment","getScriptOnServer","shouldLog","OperationTyphoon","OperationZero","OperationX","OperationTitan","OperationAres","OperationArchangel","OperationJuggernaut","OperationRedDragon","OperationK","OperationDeckard","OperationTyrell","OperationWallace","OperationShoulderOfOrion","OperationHyron","OperationMorpheus","OperationIonStorm","OperationAnnihilus","OperationUltron","OperationCenturion","OperationVindictus","commit","div","successRate","researchMetadata","ApplyToJobButton","getJobRequirementTooltip","initElectron","normalizeFileName","getFiles","deleteFile","removeFile","saveFile","Buffer","from","overwritten","writeToScriptFile","initWebserver","funcs","typesFn","appNotifier","initAppNotifier","triggerSave","triggerGameExport","triggerScriptsExport","exportScripts","getSaveData","getSaveInfo","async","getImportDataFromString","pushSaveData","appSaveFns","initSaveFunctions","bridge","electronBridge","receive","send","initElectronBridge","pushGameReady","playtime","game","pushImportResult","wasImported","pushDisableRestore","achievementData","bitNodeFinishedState","wd","hasAccessToSF","knowsAboutBitverse","Icon","Condition","THE_BLACK_HAND","THE_COVENANT","Visible","MONEY_1Q","MONEY_M1B","Secret","INSTALL_1","INSTALL_100","QUEUE_40","HACKING_100000","COMBAT_3000","NEUROFLUX_255","NS2","FROZE","RUNNING_SCRIPTS_1000","DRAIN_SERVER","MAX_RAM","MAX_CORES","SCRIPTS_30","KARMA_1000000","STOCK_1q","DISCOUNT","SCRIPT_32GB","FIRST_HACKNET_NODE","MAX_HACKNET_NODE","HACKNET_NODE_10M","REPUTATION_10M","DONATION","TRAVEL","WORKOUT","TOR","hasTorRouter","HOSPITALIZED","hospitalization","GANG","FULL_GANG","members","GANG_TERRITORY","GANG_MEMBER_POWER","CORPORATION","CORPORATION_BRIBE","CORPORATION_PROD_1000","CORPORATION_EMPLOYEE_3000","CORPORATION_REAL_ESTATE","Description","INTELLIGENCE_255","BLADEBURNER_DIVISION","BLADEBURNER_OVERCLOCK","BLADEBURNER_UNSPENT_100000","FIRST_HACKNET_SERVER","AdditionalUnlock","ALL_HACKNET_SERVER","MAX_HACKNET_SERVER","hs","HACKNET_SERVER_1B","MAX_CACHE","capacity","SLEEVE_8","INDECISIVE","FAST_BN","CHALLENGE_BN1","CHALLENGE_BN2","CHALLENGE_BN3","CHALLENGE_BN6","CHALLENGE_BN7","CHALLENGE_BN8","CHALLENGE_BN9","hacknet_expenses","CHALLENGE_BN10","CHALLENGE_BN12","BYPASS","PROTOTYPETAMPERING","UNCLICKABLE","UNDOCUMENTEDFUNCTIONCALL","TIMECOMPRESSION","REALITYALTERATION","N00DLES","EDITSAVEFILE","UNACHIEVABLE","CHALLENGE_BN13","StaneksGift1","DEVMENU","RAINBOW","TRUE_RECURSION","playerAchievements","missingAchievements","flatMap","Intelligence","useTheme","colSpan","WorkInProgressOverview","onClickFocus","header","workCell","workHeader","pt","pb","workSubtitles","mt","details","innerText","textAlign","CharacterOverview","killOpen","setKillOpen","hackingProgress","strengthProgress","defenseProgress","dexterityProgress","agilityProgress","charismaProgress","borderTop","flex","aria-label","CorporationUnlockUpgrades","setRedPillFlag","destroyedBitNode","newBitNode","bitNodeNumber","sourceFileKey","sourceFile","alreadyOwned","ownedSourceFile","playerSrcFile","PlayerOwnedSourceFile","giveSourceFile","midpoint","program","description","BadRNG","WHRNG","s1","s2","s3","genSeed","Favor","crimeKey","currentTask","finishTask","resetTaskStatus","gainRatesForTask","currentTaskLocation","currentTaskMaxTime","retValue","currentTaskTime","successGainRates","keysForIteration","gainExperience","fromOtherSleeve","multFac","pHackExp","pStrExp","pDefExp","pDexExp","pAgiExp","pChaExp","earningsForPlayer","earningsForTask","earningsForSleeves","getMemoryUpgradeCost","memory","currCost","currMemory","getRepGain","Field","Security","installAugmentation","cyclesUsed","Class","Gym","updateTaskGainRates","Synchro","gymStatType","takeUniversityCourse","universityName","AevumSummitUniversity","Sector12RothmanUniversity","VolhavenZBInstituteOfTechnology","newCity","tryBuyAugmentation","AevumCrushFitnessGym","AevumSnapFitnessGym","Sector12IronGym","Sector12PowerhouseGym","VolhavenMilleniumFitnessGym","baseGymExp","totalExpMultiplier","getTrainingMult","sanitizedStat","totalExpMult","getStudyMult","upgradeMemory","sanitizedWorkType","offerHackingWork","offerFieldWork","offerSecurityWork","workoutAtGym","gymName","stat","RamCalculationErrorCode","TerminalEvents","TerminalClearEvents","orderType","refs","orderBook","executeOrder","isBuy","predefined","getPredefinedThemes","AlertManager","alerts","setAlerts","sha256","getMessageHash","getRandomByte","maintainMembership","keep","Neurolink","CashRoot","PCMatrix","finishAction","penalty","hack_asc_points","str_asc_points","def_asc_points","dex_asc_points","agi_asc_points","cha_asc_points","resetPidCounter","ProgramsSeen","InvitationsSeen","setMaxRam","getDB","indexedDB","indexedDbRequest","onupgradeneeded","createObjectStore","onerror","ev","onsuccess","db","transaction","objectStore","request","put","deleteGame","canGetBonus","setLastExportBonus","unixTime","getTeamSuccessBonus","inst","getActionTypeSkillSuccessBonus","AevumGalacticCybersystems","Sector12DeltaOne","AevumPolice","NewTokyoNoodleBar","nextPosition","repMultiplier","reqdHacking","reqdStrength","reqdDefense","reqdDexterity","requiredAgility","reqdAgility","reqdCharisma","reqdReputation","hackingEffectiveness","strengthEffectiveness","defenseEffectiveness","dexterityEffectiveness","agilityEffectiveness","charismaEffectiveness","hackRatio","strRatio","defRatio","dexRatio","agiRatio","chaRatio","reputationGain","logEntry","logUpd","displayLog","recordHack","moneyGained","recordGrow","recordWeaken","StartButton","fmt","FactionInfo","infoText","offerHackingMission","augmentationRepRequirementMult","CorporationUpgrades","getUpgrade","getUpgradeCost","getCost","newCap","problemType","getRandomProblemType","getRandomReward","randServer","getRandomServer","contractFn","getRandomFilename","addContract","generateRandomContractOnHome","generateContract","problemTypes","rewardType","factionsThatAllowHacking","sanitizeRewardType","numFactions","randFaction","allJobs","randIndex","findCrime","roughName","atCapacity","marketCycles","emp","hireRandomEmployee","maxEne","maxHap","maxMor","perfMult","hasAutobrew","hasAutoparty","salaryPaid","mor","hap","ene","calculateEmployeeProductivity","employeeProd","prod","calculateProductivity","getElementById","cre","sal","Employee","creativity","efficiency","salary","assignEmployeeToJob","unassignEmployeeFromJob","setEmployeeToJob","amount","jobCount","acc","validator","paramValidator","sanitizedSource","StatsProgressBar","remaining","StatsProgressOverviewCell","characterOverviewStyles","paddingBottom","oldhp","PromptEvent","PromptManager","setPrompt","PromptMenuText","PromptMenuSelect","PromptContent","PromptMenuBoolean","paddingTop","submit","autoFocus","onInput","stopPropagation","ENTER","preventDefault","choices","getItems","createCityMap","demand","competition","markup","quality","per","performance","dur","durability","rel","reliability","aes","aesthetics","fea","features","siz","reqMats","req","createProduct","empWorkMult","fin","prog","finishProduct","progrMult","engrRatio","mgmtRatio","rndRatio","opsRatio","busRatio","totalMult","sciFac","calculateRating","advMult","busmgtgRatio","isFinite","awareness","popularity","reqMat","ProductRatingWeights","rat","Quality","Performance","Durability","Reliability","Aesthetics","Features","prodMats","ProgramsRoot","getHackingLevelRemaining","disableGutters","mb","gridTemplateColumns","curCompletion","getProgCompletion","Paper","flexWrap","mr","FactionsRoot","allJoinedFactions","ml","openFaction","openFactionAugPage","getAugsLeft","acceptInvitation","ActivateRecoveryMode","RecoveryRoot","errorData","resetError","issueUrl","newIssueUrl","startIcon","onTriggered","px","multiline","fullWidth","sharePower","StartSharing","CSM","CorporationState","numUnlockUpgrades","fill","upgradeMultipliers","addFunds","getState","gameCycles","issueNewSharesCooldown","cycleProfit","retainedEarnings","getDividends","updateSharePrice","nextState","dividendsPerShare","dividends","determineValuation","getTargetSharePrice","targetPrice","immediatelyUpdateSharePrice","sharesTracker","sharesUntilUpdate","sharesSold","maxIterations","convertCooldownToString","cd","upgN","dividendTaxPercentage","basePrice","upgradeAmt","getProductionMultiplier","getDreamSenseGain","getAdvertisingMultiplier","getEmployeeCreMultiplier","getEmployeeChaMultiplier","getEmployeeIntMultiplier","getEmployeeEffMultiplier","getSalesMultiplier","getScientificResearchMultiplier","getStarterGuide","hasHandbook","handbookFn","showLiterature","HashRate","popEst","canAccessGang","getGangFaction","startGang","locations","Option","buttonText","TickerDisplayMode","DisplayModeButton","tickerDisplayMode","Portfolio","changeDisplayMode","StockTickersConfig","changeWatchlistFilter","sum","EPSILON","decay","getSuccessChance","baseTime","skillFac","effDexterity","statFac","est","clamp","real","low","high","competence","playerStatLvl","effMultiplier","getSuccessesNeededForNextLevel","baseSuccessesPerLevel","currentCity","onTravel","WorldMap","SuccessChance","estimatedSuccessChance","StaticModal","char","CorruptableText","setContent","counter","timers","letter","randFrom","randomize","timerId","checkIfConnectedToDarkweb","listAllDarkwebItems","printRaw","buyDarkwebItem","itemName","programsRef","existingPartialExeIndex","findIndex","buyAllDarkwebItems","itemsToBuy","baseCheck","netscriptCanHack","initialCheck","netscriptCanGrow","netscriptCanWeaken","GraftableAugmentation","antiLog","ReputationRate","isNumber","ParseCommands","allCommands","flat","ParseCommand","inQuote","prevChar","escaped","DOUBLE_QUOTE","QUOTE","CinematicText","setI","done","setDone","lines","onDone","newI","auto","MaxSleevesFromCovenant","BaseCostPerSleeve","HemoRecirculator","Targeting1","Targeting2","Targeting3","SyntheticHeart","SynfibrilMuscle","CombatRib1","CombatRib2","CombatRib3","NanofiberWeave","SubdermalArmor","WiredReflexes","GrapheneBoneLacings","BionicSpine","GrapheneBionicSpine","BionicLegs","GrapheneBionicLegs","SpeechProcessor","TITN41Injection","EnhancedSocialInteractionImplant","BitWire","ArtificialBioNeuralNetwork","ArtificialSynapticPotentiation","EnhancedMyelinSheathing","SynapticEnhancement","NeuralRetentionEnhancement","DataJack","ENM","ENMCore","ENMCoreV2","ENMCoreV3","ENMAnalyzeEngine","ENMDMA","Neuralstimulator","NeuralAccelerator","CranialSignalProcessorsG1","CranialSignalProcessorsG2","CranialSignalProcessorsG3","CranialSignalProcessorsG4","CranialSignalProcessorsG5","NeuronalDensification","NuoptimalInjectorImplant","SpeechEnhancement","FocusWire","PCDNI","PCDNIOptimizer","PCDNINeuralNetwork","ADRPheromone1","ADRPheromone2","ShadowsSimulacrum","HacknetNodeCPUUpload","HacknetNodeCacheUpload","HacknetNodeNICUpload","HacknetNodeKernelDNI","HacknetNodeCoreDNI","Neurotrainer1","Neurotrainer2","Neurotrainer3","Hypersight","LuminCloaking1","LuminCloaking2","SmartSonar","PowerRecirculator","QLink","SPTN97","HiveMind","CordiARCReactor","SmartJaw","Neotra","Xanipher","HydroflameLeftArm","nextSENS","OmniTekInfoLoad","PhotosyntheticCells","CRTX42AA","Neuregen","NutriGen","INFRARet","DermaForce","GrapheneBrachiBlades","BrachiBlades","GrapheneBionicArms","BionicArms","SNA","EsperEyewear","EMS4Recombination","OrionShoulder","HyperionV1","HyperionV2","GolemSerum","VangelisVirus","VangelisVirus3","INTERLINKED","BladeRunner","BladeArmor","BladeArmorPowerCells","BladeArmorEnergyShielding","BladeArmorUnibeam","BladeArmorOmnibeam","BladeArmorIPU","StaneksGift2","StaneksGift3","randomBonuses","bonuses","randomNumber","getRandomBonus","UnstableCircadianModulatorParams","UnstableCircadianModulator","specialReferenceIF","specialReferenceFOR","specialReferenceWHILE","memCheckGlobalKey","parseOnlyRamCalculate","dependencyMap","completedParses","parseQueue","parseCode","moduleName","parseOnlyCalculateDeps","additionalModules","initialModule","nextModule","URLImportError","ImportError","detailedCosts","unresolvedRefs","resolvedRefs","prefix","ident","dep","applyFuncRam","loadedFns","refDetail","fnRam","checkInfiniteLoop","missingAwaitLine","walk","WhileStatement","st","walkDeeper","nodeHasTrueTest","test","hasAwait","AwaitExpression","currentModule","globalKey","internalToExternal","addRef","external","objectPrototypeProperties","getOwnPropertyNames","commonVisitors","Identifier","DoWhileStatement","ForStatement","update","IfStatement","consequent","alternate","MemberExpression","importModuleName","spec","imported","codeCopy","decimal","isHackingGang","respectGainRate","wantedGainRate","moneyGainRate","storedTerritoryAndPowerCycles","territoryClashChance","territoryWarfareEngaged","notifyMemberDeath","getPower","getTerritory","processGains","processExperienceGains","processTerritoryAndPowerGains","moneyGains","respectGains","wantedLevelGains","justice","recordEarnedRespect","oldWanted","newWanted","gangName","calculatePower","gainRoll","multiplicativeGain","powerMult","PowerMultiplier","additiveGain","gangs","g","others","thisGang","otherGang","thisPwr","thisChance","calculateTerritoryGain","winGang","loseGang","powerBonus","territoryGain","clash","won","baseDeathChance","modifiedDeathChance","killMember","getRespectNeededToRecruitMember","GangMember","getWantedPenalty","memberTotal","totalRespect","lostRespect","earnedRespect","ascend","getDiscount","discount","getAllTaskNames","taskName","pidCounter","tempCounter","MAX_SAFE_INTEGER","updateDynamicRam","ramCost","dynamicLoadedFns","dynamicRamUsage","safeGetServer","callingFnName","makeRuntimeErrorMsg","scriptArgs","getRunningScriptByPid","getCannotFindRunningScriptErrorMessage","failOnHacknetServer","callingFn","errstack","userstack","stackline","dependency","parseChromeStackline","lineMatch","funcMatch","chromeCall","parseFirefoxStackline","lio","firefoxCall","rejectMsg","manual","hackingTime","canHack","hackChance","expGainedOnSuccess","expGainedOnFailure","percentHacked","maxThreadNeeded","moneyDrained","influenceStockThroughServerHack","argsToString","toNative","helper","string","funcName","argName","boolean","checkSingularityAccess","getValidPort","iport","NetscriptGang","NetscriptSleeve","extra","NetscriptExtra","NetscriptHacknet","NetscriptStanek","NetscriptBladeburner","NetscriptCodingContract","NetscriptCorporation","formulas","NetscriptFormulas","singularity","NetscriptSingularity","stockmarket","NetscriptStockMarket","NetscriptUserInterface","NetscriptGrafting","_hostname","_hackAmount","hackAmount","_threads","_time","growTime","moneyBefore","moneyAfter","logGrowPercent","influenceStockThroughServerGrow","_growth","_cores","weakenTime","end","_format","tprintf","_fn","possibleLogs","arguments","openPortCount","sshPortOpen","ftpPortOpen","smtpPortOpen","httpPortOpen","sqlPortOpen","_scriptname","scriptServer","spawnDelay","killByPid","scriptsRunning","_hostname1","hostname2","hostname1","destServer","currServ","txtFile","newFile","sourceScript","oldScript","newScript","_grep","grep","allFiles","processes","speed","production","purchaseCost","coreCost","levelCost","_filename","_ram","_name","hostnameStr","_port","_mode","tryWrite","_file","clearPort","status","suc","offlineMoneyMade","_n","_milliseconds","_milliPrecision","milliseconds","milliPrecision","alert","_message","_variant","_txt","_url","_target","$","writeToTextFile","fail","tor","inBladeburner","hasCorporation","_host","_source","_destination","source_is_txt","dest_is_txt","source_file","dest_file","flags","Flags","fromEntries","getFunctionNames","functionNames","moneyHacked","orgName","percTotalMoneyHacked","moneyGrown","percTotalMoneyGrown","performanceMult","cyclesOfWork","compName","tooltiptext","reqRep","TerminalHelpText","TemplatedHelpTexts","HelpTexts","analyze","backdoor","cat","check","cls","cp","expr","free","help","history","lscpu","mem","nano","sudov","unalias","GameEnv","Platform","getErrorForDisplay","errorInfo","isElectron","Production","toDisplay","language","cookiesEnabled","cookieEnabled","doNotTrack","indexedDb","platform","Steam","Browser","environment","getErrorMetadata","Development","componentStack","Tracking","Retirement","Investigation","Raid","initValue","Hand","cards","addCards","removeByIndex","StockTickerTxButton","getContract","contractName","removeContract","ret","CodingContractModal","setProps","setAnswer","contractType","tries","BitFlumeEvent","BitFlumeModal","terminalCommandHistory","generalMethods","augmentationMethods","canAccessBladeburner","bladeburnerMethods","startBladeburner","canAccessCorporation","corporationMethods","startCorporation","gangMethods","serverMethods","InvitationModal","litObj","Literatures","recentScripts","unshift","timestamp","opt_initFunc","sourceCode","sourceCodeLineOffset","acorn","PARSE_OPTIONS","initFunc_","paused_","polyfills_","functionCounter_","stepFunctions_","stepMatch","methodName","createScope","stripLocations_","State","stateStack","nodeConstructor","READONLY_DESCRIPTOR","configurable","writable","NONENUMERABLE_DESCRIPTOR","READONLY_NONENUMERABLE_DESCRIPTOR","VARIABLE_DESCRIPTOR","STEP_ERROR","SCOPE_REFERENCE","VALUE_IN_DESCRIPTOR","toStringCycles_","getErrorLineNumber","getErrorLineNumberMessage","appendCode","populateScope_","initGlobalScope","OBJECT_PROTO","FUNCTION_PROTO","initFunction","initObject","proto","OBJECT","initArray","initString","initBoolean","initNumber","initDate","initRegExp","initError","initMath","initJSON","thisInterpreter","EvalError","parseInt","strFunctions","decodeURI","encodeURI","wrapper","nativeFunc","throwException","URI_ERROR","FUNCTION","ARRAY","ARRAY_PROTO","REGEXP","REGEXP_PROTO","DATE","DATE_PROTO","identifierRegexp","var_args","calledWithNew","newFunc","createObjectProto","argsStr","SYNTAX_ERROR","parentScope","boxThis","isObject","getScope","strict","box","getPrototype","thisArg","func_","funcThis_","arguments_","arrayPseudoToNative","TYPE_ERROR","doneExec_","setNativeFunctionPrototype","valueOf","throwIfNullUndefined","properties","arrayNativeToPseudo","descriptor","preventExtensions","getOwnPropertyDescriptor","setter","hasValue","pseudoDescriptor","propertyIsEnumerable","newArray","first","legalArrayLength","RANGE_ERROR","class","reverse","howmany","opt_begin","opt_end","opt_separator","iLength","getProperty","hasProperty","element","isa","jLength","searchElement","opt_fromIndex","STRING","fromCharCode","functions","compareString","locales","localeCompare","separator","jsList","regexp","search","newSubstr","BOOLEAN","NUMBER","numConsts","fractionDigits","toExponential","ERROR","digits","precision","toPrecision","radix","Function","UTC","pattern","rgx","populateRegExp","lastIndex","opt_message","newError","createObject","createErrorSubclass","EVAL_ERROR","REFERENCE_ERROR","myMath","mathConsts","numFunctions","myJSON","nativeObj","child","legalArrayIndex","Value","strs","pseudoRegexp","nativeRegexp","ignoreCase","createFunction","opt_constructor","illegalConstructor","asyncFunc","pseudoDate","pseudoObj","opt_cycles","pseudo","native","nativeArray","pseudoArray","lineNum","isGetter","TypeError","opt_descriptor","ReferenceError","defObj","firstNode","expression","createSpecialScope","opt_scope","getValueFromScope","prevNode","setValueToScope","nodeClass","isConstructor","getValue","Completion","NORMAL","BREAK","CONTINUE","RETURN","THROW","errorClass","lineNumErrorMsg","unwind","lineNumberMsg","cv","labels","isLoop","isSwitch","realError","errorTable","RangeError","URIError","createGetter_","funcThis","doneCallee_","doneArgs_","createSetter_","elements","n_","array_","doneLeft_","doneRight_","leftReference_","doneGetter_","leftValue_","leftValue","doneSetter_","setterValue_","rightValue","directEval_","funcNode","paramName","paramValue","argsList","evalNode","argsWithCallback","done_","throwValue","mode_","test_","doneInit_","doneObject_","variable_","object_","visited_","name_","gotPropName","props_","doneVariable_","doneProperty_","properties_","kinds","switchValue_","defaultCase_","index_","switchCase","matched_","tested_","doneBlock_","doneHandler_","doneFinalizer_","leftSide_","changeValue","returnValue","declarations","declarationNode","init_","doneBody_","numServerGrowthCycles","numServerGrowthCyclesAdjusted","findSleevePurchasableAugs","ownedAugNames","availableAugs","isAvailableForSleeve","validMults","StaneksGiftEvents","GraftableAugmentations","getAvailableAugs","canGraft","AugPreReqsChecklist","preAug","GraftingRoot","graftableAug","selectedAug","setSelectedAug","graftOpen","setGraftOpen","selected","matchEnding","zip","JSZip","zipFiles","fileNames","fileContents","zipFn","generateAsync","FileSaver","saveAs","AugmentationAccordion","displayName","unmountOnExit","stealthIcon","xmlns","viewBox","killIcon","ActionLevel","isActive","canIncrease","canDecrease","Autolevel","TeamSizeButton","BlinkingCursor","setOn","DeleteGameButton","modalOpened","setModalOpened","SoftResetButton","noConfirmation","ThemeEditorButton","themeEditorOpen","setThemeEditorOpen","ThemeCollaborate","StyleEditorButton","styleEditorOpen","setStyleEditorOpen","TravelAgencyRoot","setDestination","startTravel","symbolsLoaded","symbols","SetupTextEditor","populate","exclude","OpenScript","lastPosition","model","openScripts","currentScript","Root","editorRef","monacoRef","vimStatusRef","vimEditor","setVimEditor","editor","setEditor","setFilter","searchExpanded","setSearchExpanded","setRAM","ramEntries","setRamEntries","updatingRam","setUpdatingRam","decorations","setDecorations","optionsOpen","setOptionsOpen","setOptions","insertSpaces","wordWrap","ramInfoOpen","setRamInfoOpen","dimensions","setDimensions","regenerateModel","createModel","debouncedHandleResize","updateRAM","keydown","ctrlKey","metaKey","require","initVimMode","VimMode","Vim","defineEx","defineAction","_cm","nTabs","currIndex","currentTabIndex","onTabClick","nextIndex","mapCommand","context","dispose","debouncedSetRAM","useMemo","newCode","entriesDisp","scriptToSave","textFile","curIndex","isDisposed","setModel","setPosition","revealLineInCenter","onTabClose","closingScript","savedScriptIndex","savedScriptCode","serverScriptIndex","indexOffset","getServerCode","openScript","serverScript","handleFilterChange","handleExpandSearch","filteredOpenScripts","editorHeight","tabMaxWidth","tabTextWidth","tabIconWidth","onDragEnd","items","startIndex","endIndex","removed","reorder","droppableId","direction","provided","snapshot","innerRef","droppableProps","isDraggingOver","spellCheck","iconButtonStyle","minWidth","borderColor","scriptTabText","serverScriptCode","dirty","draggableId","disableInteractiveElementBlocking","draggableProps","dragHandleProps","flexShrink","textOverflow","onTabUpdate","beforeMount","monaco","languages","registerCompletionItemProvider","provideCompletionItems","suggestions","kind","CompletionItemKind","insertText","insertTextRules","CompletionItemInsertTextRule","InsertAsSnippet","getLanguages","loader","tokenizer","token","libSource","typescript","javascriptDefaults","addExtraLib","typescriptDefaults","loadThemes","onMount","Position","loading","defaultLanguage","defaultValue","newArr","tempScript","awaitWarning","newDecorations","deltaDecorations","startLineNumber","startColumn","endLineNumber","endColumn","isWholeLine","glyphMarginClassName","glyphMarginHoverMessage","infLoop","glyphMargin","getAction","makeScriptBlob","compile","shouldCompile","uurls","_getScriptUrls","loadedModule","isDependencyOutOfDate","scriptModuleSequenceNumber","depScript","seen","urlStack","ranges","importNodes","ExportNamedDeclaration","ExportAllDeclaration","transformedCode","matchingScripts","importedScript","urls","blob","ScriptUrl","vargs","numDashes","libarg","argv","defaultInterpreter","TablePaginationActionsAll","rowsPerPage","onPageChange","Cell","cellProps","onMouseEnter","newNs2Template","detectSimpleScriptGlob","globString","globDatabase","parsedGlob","glob","preGlob","postGlob","globError","globMatches","globAgainst","parseSimpleScriptGlob","commonEditor","scriptEditorRouteOptions","filesToLoadOrCreate","globSearch","isEmpty","filepath","getFilepath","fileIsNs2","isNs2","CursorPositions","saveCursor","column","automate","stop","corpName","additionalShares","warehouseApi","OfficeApi","createTreantMarkup","childrenArray","htmlClass","HTMLclass","innerHTML","findNode","setParent","chart","nodeStructure","queue","getMultiplierHelper","getProductProductionMultiplier","StanekConstants","RAMBonus","BaseSize","MaxSize","currPos","nextPosName","Engine","_lastUpdate","updateGame","expForOtherSleeves","decrementAllCounters","checkCounters","Counters","autoSaveCounter","updateSkillLevelsCounter","updateDisplays","updateDisplaysLong","updateActiveScriptsDisplay","createProgramNotifications","augmentationsNotifications","passiveFactionGrowth","mechanicProcess","contractGeneration","achievementsCounter","counterName","warningToast","warnAutosaveDisabled","adjustedCycles","startExploits","setupUncaughtPromiseHandler","timeOffline","numCyclesOffline","offlineReputation","offlineHackingIncome","offlineProductionFromHacknetNodes","hacknetProdInfo","timeOfflineString","_thisUpdate","requestAnimationFrame","LoadingScreen","setShow","loaded","setLoaded","reason","doLoad","installed","stacks","newMultipliers","calculateEntropy","typ","invalidArgs","baseSize","af","highestCharge","numCharge","cotmg","inBonus","updateMults","effect","fragmentAt","boost","neighboor","CalculateEffect","canPlace","rootX","rootY","newFrag","ActiveFragment","aFrag","fragments","collide","place","findFragment","worldX","worldY","clearCharge","thisFragment","otherFragment","dx","dy","Void","infiltrationData","techVendorMaxRam","techVendorMinRam","StatsElement","EarningsElement","ServerType","All","Foreign","Owned","Purchased","ServerDropdown","isValidServer","purchased","serverType","purchase","canPurchase","DECK_COUNT","Result","Blackjack","bet","canStartGame","playerHand","deck","safeDrawCard","dealerHand","gameInProgress","Pending","getTrueHandValue","finishGame","Tie","PlayerWonByBlackjack","DealerWon","hand","handValues","getHandValue","valuesUnder21","isHandBusted","newHand","newDealerHand","PlayerWon","dealerHandValue","playerHandValue","betInput","wager","wagerInvalid","wagerInvalidHelperText","startGame","Deck","render","playerHandValues","getHandDisplayValues","dealerHandValues","wagerOnChange","helperText","playerHit","playerStay","startOnClick","elevation","card","prev","hidden","fontWeight","red","ReactCard","Clubs","Spades","allFactionAugs","factionAugs","factionAug","repFromDonation","TickerHeaderFormatData","longestName","longestSymbol","AchievementEntry","cssFiltersUnlocked","cssFiltersLocked","isUnlocked","mainColor","achievedOn","unlocked","colorFilters","Color","hueRotate","angle","PI","sin","cos","multiply","grayscale","sepia","saturate","matrix","newR","newG","newB","brightness","linear","contrast","slope","intercept","invert","hsl","Solver","targetHSL","reusedColor","solve","solveNarrow","solveWide","css","best","initial","spsa","A1","iters","bestLoss","deltas","highArgs","lowArgs","ck","lossDiff","ak","fix","idx","filters","colorHSL","getFiltersFromHex","hex","rgb","hexToRgb","gameCPS","Theme","credit","screenshot","img1","reference","outputHistory","startHack","startGrow","startWeaken","startBackdoor","startAnalyze","finishHack","oldSec","newSec","finishGrow","finishWeaken","finishBackdoor","finishAnalyze","isHacknet","org","canRunScripts","hackingSkill","security","hackingChance","numPort","getProgressText","getFile","getLitFile","lit","currDir","setcwd","contractOpen","executeScanAnalyzeCommand","visited","depthQueue","newS","titleDashes","connectToServer","executeCommands","commandHistory","commandHistoryIndex","executeCommand","n00dlesServ","commandName","scananalyze","removeBracketsFromArrayString","strCpy","removeQuotesFromString","convert2DArrayToString","ans","len","nums","ways","padStart","spiral","u","col","playerAns","reach","intervals","numIntervals","interval","sanitizedResult","sanitizedAns","B","C","ansArr","ipInAns","maxCur","maxSoFar","hold1","MIN_SAFE_INTEGER","hold2","release1","release2","prices","hold","rele","cur","createTriangleRecurse","numLevels","createTriangle","triangle","dp","numRows","numColumns","currentRow","gridString","grid","obstacleGrid","roll","dfs","pair","playerAnsArray","resultInAnswer","numDigits","digitsArray","sanitizedPlayerAnsArr","evaluated","multed","htmlID","requireHackingLevel","targetServer","numAugReq","ipaddress","byteRange","multipliers","formattedHours","getHours","formattedMinutes","getMinutes","formattedSeconds","getSeconds","getMonth","getDate","hack_exp","hack_mult","str_exp","str_mult","def_exp","def_mult","dex_exp","dex_mult","agi_exp","agi_mult","cha_exp","cha_mult","assignToTask","unassignFromTask","difficultyPerCycles","getGainedAscensionPoints","canAscend","getCurrentAscensionMults","getAscensionMultsAfterAscend","getAscensionResults","postAscend","preAscend","applyUpgrade","respectToDeduct","buyUpgrade","createDescription","AllSoftwarePositions","AllITPositions","AllNetworkEngineerPositions","SecurityEngineerPositions","AllTechnologyPositions","AllBusinessPositions","AllAgentPositions","AllSecurityPositions","AllSoftwareConsultantPositions","AllBusinessConsultantPositions","SoftwarePositionsUpToHeadOfEngineering","SoftwarePositionsUpToLeadDeveloper","BusinessPositionsUpToOperationsManager","WaiterOnly","EmployeeOnly","PartTimeWaiterOnly","PartTimeEmployeeOnly","OperationsManagerOnly","CEOOnly","Sector12CarmichaelSecurity","advertisingMult","employeeChaMult","employeeCreMult","employeeEffMult","employeeIntMult","productionMult","productProductionMult","salesMult","sciResearchMult","storageMult","effectText","costPerLevel","hasTargetServer","lookup","checkGangApiAccess","getGangMember","_faction","wantedLevelGainRate","wantedPenalty","cpy","_memberName","memberName","hack_asc_mult","str_asc_mult","def_asc_mult","dex_asc_mult","agi_asc_mult","cha_asc_mult","respectGain","wantedLevelGain","recruited","tasks","_taskName","getGangTask","_equipName","equipName","equipment","typecheck","_engage","engage","_otherGang","playerPower","checkSleeveAPIAccess","checkSleeveNumber","sleeveNumber","sl","_sleeveNumber","_crimeRoughName","crimeRoughName","_universityName","_className","_cityName","acompanyName","_factionName","_workType","_gymName","_stat","jobTitle","maxHp","agilityExp","charismaExp","companyRep","crimeMoney","crimeSuccess","defenseExp","dexterityExp","factionRep","hackingExp","strengthExp","workMoney","workHackExpGain","workStrExpGain","workDefExpGain","workDexExpGain","workAgiExpGain","workChaExpGain","workMoneyGain","workRepGain","purchasableAugs","_augName","bypass","doc","completely_unused_field","real_document","alterReality","recur","rainbow","guess","bcrypt","tryGuess","getHacknetNode","hi","maxNumNodes","_i","hasUpgraded","timeOnline","totalProduction","_upgName","_upgTarget","getHashUpgrades","getHashUpgradeLevel","checkStanekAPIAccess","_rootX","_rootY","_rotation","_fragmentId","fragmentId","avgCharge","newTheme","currentTheme","errors","newStyles","currentStyles","checkBladeburnerAccess","skipjoined","apiDenied","bladeburnerDenied","checkBladeburnerCity","getBladeburnerActionObject","_blackOpName","blackOpName","_type","_level","_autoLevel","_skillName","_size","getCodingContract","returnReward","is2DArray","answerComponents","creward","hasUnlockUpgrade","upgradeName","getCorporation","hasResearched","getDivision","getOffice","getWarehouse","getMaterial","materialName","getProduct","getEmployee","employeeName","checkAccess","api","getSafeDivision","getPurchaseWarehouseCost","getUpgradeWarehouseCost","_divisionName","hasWarehouse","_materialName","sll","_productName","pCost","cityData","developmentProgress","purchaseWarehouse","upgradeWarehouse","sellMaterial","_amt","_price","sellProduct","_all","discontinueProduct","setSmartSupply","_enabled","enabled","setSmartSupplyUseLeftovers","buyMaterial","bulkPurchase","makeProduct","_designInvest","_marketingInvest","exportMaterial","_sourceDivision","_sourceCity","_targetDivision","_targetCity","sourceDivision","targetDivision","targetCity","cancelExportMaterial","setMaterialMarketTA1","_on","setMaterialMarketTA2","setProductMarketTA1","setProductMarketTA2","getHireAdVertCost","getHireAdVertCount","getResearchCost","_researchName","setAutoJobAssignment","_job","_amount","getOfficeSizeUpgradeCost","assignJob","_employeeName","hireEmployee","upgradeOfficeSize","_costPerEmployee","buyCoffee","hireAdVert","minEne","minHap","expandIndustry","_industryName","industryName","expandCity","unlockUpgrade","_upgradeName","levelUpgrade","issueDividends","_percent","createCorporation","_corporationName","_selfFund","corporationName","selfFund","getUnlockUpgradeCost","getUpgradeLevel","getUpgradeLevelCost","getExpandIndustryCost","getExpandCityCost","getInvestmentOffer","fundingRound","percShares","acceptInvestmentOffer","funding","investShares","goPublic","_numShares","initialSharePrice","sellShares","buyBackShares","bribe","_amountCash","_amountShares","amountCash","amountShares","reFac","robFac","aiFac","advFac","hwFac","getProductDescriptionText","getMaximumNumberProducts","additional","hasMaximumNumberProducts","calculateProductionFactors","multSum","cityMult","updateWarehouseSizeUsed","prodName","newInd","employeeSalary","officeLoc","processMaterialMarket","processProductMarket","popularityGain","awarenessGain","MAX_VALUE","processMaterials","processProducts","wh","foo","imp","buyAmt","maxAmt","smartBuy","smartSupplyStore","worseAmt","totalSize","freeSpace","maxProd","getOfficeProductivity","totalMatSize","tmp","reqMatName","normQty","producableFrac","reqMatQtyNeeded","fooProd","fooI","businessFactor","getBusinessFactor","advertisingFactor","getAdvertisingFactors","marketFactor","getMarketFactor","markupLimit","numerator","sqrtNumerator","sqrtDenominator","denominator","sqrt","optimalPrice","marketTa2Price","sellAmt","totalExp","expI","amtStr","expIndustry","expWarehouse","engrProd","mgmtProd","opProd","mgmtFactor","processProduct","totalProfit","forProduct","netStorageSize","sCostString","businessProd","calculateEffectWithFactors","awarenessFac","popularityFac","ratioFac","updateResearchTree","expFac","linearFac","morale","happiness","energy","det","trainingEff","effCre","effEff","prodBase","checkFormulasAccess","calculateFavorToRep","_favor","calculateRepToFavor","_rep","_exp","_mult","_skill","hackPercent","growPercent","hackTime","levelUpgradeCost","_startingLevel","_extraLevels","_costMult","ramUpgradeCost","_startingRam","coreUpgradeCost","_startingCore","_extraCores","extraCores","hacknetNodeCost","constants","hacknetServers","hashGainRate","_ramUsed","_maxRam","HScalculateHashGainRate","HScalculateLevelUpgradeCost","HScalculateRamUpgradeCost","HScalculateCoreUpgradeCost","cacheUpgradeCost","_startingCache","_extraCache","extraCache","HScalculateCacheUpgradeCost","hashUpgradeCost","hacknetServerCost","HScalculateServerCost","ascensionPointsGain","ascensionMultiplier","_points","checkTixApiAccess","getStockFromSymbol","_symbol","_shares","_posType","sanitizedPosType","_pos","orderPos","ltype","lpos","stockMarketOrders","forecast","checkGraftingAPIAccess","_focus","wasFocusing","craftableAug","maxClearanceLevel","startingSecurityLevel","TechVendor","University","AevumCasino","Casino","Special","NewTokyoArcade","Sector12CityHall","Hospital","WorldStockExchange","ChongqingChurchOfTheMachineGod","IshimaGlitch","detect","hasChanges","orig","fl","backups","textfield","InteractiveTutorialRoot","contents","canNext","square","overviewContainer","visibilityToggle","collapse","Overview","setX","setY","CurrentIcon","KeyboardArrowUpIcon","KeyboardArrowDownIcon","LeftIcon","SchoolIcon","EqualizerIcon","fakeDrag","triggerMouseEvent","eventType","clickEvent","createEvent","initEvent","dispatchEvent","Loading","onStop","defaultPosition","onDoubleClick","openedMixin","transitions","easing","sharp","enteringScreen","closedMixin","leavingScreen","breakpoints","up","Drawer","styled","shouldForwardProp","active","borderLeft","listitem","SidebarRoot","hackingOpen","setHackingOpen","characterOpen","setCharacterOpen","worldOpen","setWorldOpen","helpOpen","setHelpOpen","flashTerminal","flashStats","flashActiveScripts","flashHacknet","flashCity","flashTutorial","augmentationCount","invitationsCount","programCount","getAvailableCreatePrograms","canOpenFactions","canOpenAugmentations","canOpenSleeves","canCorporation","canGang","canJob","canStockMarket","canBladeburner","canStaneksGift","clickTerminal","clickScriptEditor","clickStats","clickActiveScripts","clickCreateProgram","clickFactions","clickAugmentations","clickHacknet","clickCity","clickTravel","clickJob","clickBladeburner","clickGang","clickTutorial","handleShortcuts","altKey","E","H","R","P","F","U","G","anchor","timeout","clsx","badgeContent","AugmentationsRoot","installOpen","setInstallOpen","InstalledAugmentations","sourceAugs","Alphabetically","aug1","aug2","Improvements","BN5Stat","base","MultiplierTable","PlayerMultipliers","augP","calculateAugmentedStats","BladeburnerMults","PurchasedAugmentations","SourceFileMinus1","OwnedSourceFiles","sourceSfs","sf1","sf2","sfObj","SourceFileAccordion","DevMenuRoot","General","setError","addMoney","TransitionProps","expandIcon","bigNumber","modifyExp","modifier","modifyKarma","resetExperience","modifyFactionRep","AllFaction","modifyFactionFavor","labelId","arial-label","setAugmentation","validSFN","setSF","sfN","sfLvl","setAllSF","setProgram","AllPrograms","Servers","setServer","setCompany","modifyCompanyRep","AllCompanies","modifyCompanyFavor","modifyBladeburnerRank","modify","modifyBladeburnerCycles","modifyGangCycles","modifyCorporationFunds","modifyCorporationCycles","CodingContracts","setCodingcontract","cc","stockPrice","setStockPrice","setStockSymbol","processStocks","inputSymbols","SM","stocks","sleeveSetStoredCycles","Stanek","modCycles","modCharge","TimeSkip","timeskip","playerAchievement","setPlayerAchievements","achieved","grantAchievement","removeAchievement","Entropy","BladeburnerRoot","travelOpen","setTravelOpen","inFaction","wordBreak","gap","TravelModal","nopadding","preformatted","Line","Console","setCommand","consoleInput","consoleHistoryIndex","setConsoleHistoryIndex","Logs","tabIndex","inputRef","prevCommand","currentTarget","scrollHook","scrollTop","scrollHeight","AllPages","tab","GeneralActionPage","GeneralActionList","actions","GeneralActionElem","computedActionTimeCurrent","actionData","ContractPage","ContractList","ContractElem","Contracts","StealthIcon","KillIcon","OperationPage","OperationList","OperationElem","TeamSizeModal","BlackOpPage","BlackOpList","blackopName","blackop","BlackOpElem","hasReqdRank","SkillPage","valid","onUpgrade","SkillList","SkillElem","canLevel","GangRoot","ManagementSubpage","GangStats","territoryStr","BonusTime","CyclerPerSecond","bonusMillis","GangMemberList","ascendOnly","setAscendOnly","onRecruit","newValue","GangMemberCard","GangMemberCardContent","ascendOpen","setAscendOpen","borderRightWidth","onAscend","borderLeftWidth","onTaskChange","GangMemberStats","asc","KillScriptsModal","TaskSelector","setCurrentTask","contextMember","TaskDescription","AscensionModal","RecruitButton","RecruitModal","setName","recruit","onKeyUp","TerritorySubpage","gangNames","infoOpen","setInfoOpen","formatTerritory","OtherGangTerritory","clashVictoryChance","TerritoryInfoModal","NextReveal","PurchasedUpgrade","UpgradeButton","GangMemberUpgradePanel","currentCategory","setCurrentCategory","filterUpgrades","weaponUpgrades","armorUpgrades","vehicleUpgrades","rootkitUpgrades","augUpgrades","categories","EquipmentsSubpage","CorporationRoot","setDivisionName","canExpand","industryType","MainPanel","CityTabs","setCity","cityStateSetter","countEmployee","SwitchButton","manualMode","switchMode","ManualManagement","setEmployee","employeePositionSelectorInitialValue","employeePositions","positionNames","AutoAssignJob","numJob","numUnassigned","AutoManagement","vechain","totalMorale","totalHappiness","totalEnergy","totalSalary","avgMorale","avgHappiness","avgEnergy","IndustryOffice","upgradeOfficeSizeOpen","setUpgradeOfficeSizeOpen","throwPartyOpen","setThrowPartyOpen","employeeManualAssignMode","setEmployeeManualAssignMode","UpgradeSizeButton","upgradeSize","UpgradeOfficeSizeModal","upgradeCost","upgradeCost15","maxMult","maxNum","multIncrease","upgradeCostMax","ThrowPartyModal","setCost","canParty","EffectText","MakeProductButton","makeOpen","setMakeOpen","hasMaxProducts","createProductButtonText","Text","researchOpen","setResearchOpen","advertisingInfo","advertisingFactors","totalAdvertisingFac","convertEffectFacToGraphic","Upgrades","IndustryOverview","MakeProductModal","allCities","design","setDesign","marketing","setMarketing","createProductPopupText","Upgrade","wrapInTooltip","ele","but","ResearchModal","retainHeight","WarehouseRoot","smartSupplyOpen","setSmartSupplyOpen","canAffordUpgrade","stateText","mats","isInStock","isRelevant","breakdownItems","breakdown","previous","IndustryWarehouse","EmptyWarehouse","Leftover","setChecked","SmartSupplyModal","ProductElem","sellOpen","setSellOpen","limitOpen","setLimitOpen","discontinueOpen","setDiscontinueOpen","marketTaOpen","setMarketTaOpen","nfB","hasUpgradeDashboard","sellButtonText","limitProductionButtonText","DiscontinueProductModal","LimitProductProductionModal","setLimit","limitProductProduction","SellProductModal","iQty","setQty","setPx","initialPrice","MarketTA2","ProductMarketTaModal","MaterialElem","purchaseMaterialOpen","setPurchaseMaterialOpen","exportOpen","setExportOpen","sellMaterialOpen","setSellMaterialOpen","materialMarketTaOpen","setMaterialMarketTaOpen","tutorial","purchaseButtonText","ExportModal","possibleDivisions","defaultDivision","setIndustry","setAmt","removeExport","currentDivision","possibleCities","newCost","setNewCost","MaterialMarketTaModal","SellMaterialModal","setPrice","BulkPurchaseText","parsedAmt","BulkPurchaseSection","setBuyAmt","PurchaseMaterialModal","purchaseMaterial","IndustryProductEquation","reqs","reqAmt","ExpandNewCity","ExpandIndustryTab","possibleIndustries","newIndustry","multRows","appendMult","DividendsStats","PublicButtons","PrivateButtons","BribeButton","findInvestorsopen","setFindInvestorsopen","goPublicopen","setGoPublicopen","fundingAvailable","findInvestorsTooltip","upgradeData","sellSharesOpen","setSellSharesOpen","buybackSharesOpen","setBuybackSharesOpen","issueNewSharesOpen","setIssueNewSharesOpen","issueDividendsOpen","setIssueDividendsOpen","sellSharesOnCd","sellSharesTooltip","issueNewSharesOnCd","issueNewSharesTooltip","canBribe","totalDividends","storedTime","LevelableUpgrade","UU","BribeFactionModal","setStock","selectedFaction","setSelectedFaction","getRepText","SellSharesModal","setShares","ProfitIndicator","BuybackSharesModal","CostIndicator","IssueDividendsModal","setPercent","canIssue","maxNewSharesUnrounded","maxNewShares","newShares","IssueNewSharesModal","issueNewShares","privateShares","FindInvestorsModal","GoPublicModal","calcRawDiff","startingDifficulty","InfiltrationRoot","setStart","calcDifficulty","calcReward","StartingDifficulty","Difficulty","Reward","cancel","arrowPart","arrow","Intro","Stage","minigames","SlashGame","BracketGame","BackwardGame","BribeGame","CheatCodeGame","Cyberpunk2077Game","MinesweeperGame","WireCuttingGame","setLevel","stage","setStage","Countdown","results","setResults","gameIds","setGameIds","lastGames","nextGameId","ids","setupNextGame","pushResult","next","stageComponent","onFinish","Minigame","MiniGame","onSuccess","Sell","onFailure","automated","Progress","difficulties","timer","setRight","OPEN_BRACKET","LESS_THAN","OPEN_PARENTHESIS","OPEN_BRACE","generateLeftSide","CLOSE_PARENTHESIS","CLOSE_BRACKET","CLOSE_BRACE","GREATER_THAN","getChar","phase","setPhase","words","makeAnswer","setGuess","BACKSPACE","nextGuess","positive","option","negative","array","shuffleArray","makeChoices","setIndex","newIndex","arrows","generateCode","puzzle","randChar","generatePuzzle","generateAnswer","setPos","move","mines","minefield","field","generateEmptyField","generateMinefield","memoryPhase","setMemoryPhase","fieldEquals","wiresmin","wiresmax","rules","PIPE","DOT","FORWARD_SLASH","HYPHEN","HASH","colorNames","blue","wires","numWires","wireColors","generateWires","cutWires","setCutWires","questions","numQuestions","questionGenerators","randomPositionQuestion","randomColorQuestion","generateQuestion","question","wire","wireNum","shouldCut","checkWire","wiresToBeCut","shouldBeCut","cutColor","Victory","quitInfiltration","levelBonus","CYCLES_PER_SEC","WorkInProgressRoot","unfocus","stopText","numBars","progressBar","GameOptionsRoot","importInput","execTime","setExecTime","logSize","setLogSize","portSize","setPortSize","terminalSize","setTerminalSize","autosaveInterval","setAutosaveInterval","timestampFormat","setTimestampFormat","setLocale","diagnosticOpen","setDiagnosticOpen","importSaveOpen","setImportSaveOpen","importData","setImportData","gutterBottom","sm","valueLabelDisplay","marks","method","alt","File","FileList","ii","ex","confirmedImportGame","ServerAccordion","FileDiagnosticModal","ColorEditor","onColorChange","defaultColor","hideTextfield","deferred","newColor","disableAlpha","ThemeEditorModal","customTheme","setCustomTheme","setTemplateTheme","py","placement","maxRows","importedTheme","FontFamilyField","refreshId","errorText","setErrorText","setFontFamily","LineHeightField","setLineHeight","StyleEditorModal","setRefreshId","customStyle","setCustomStyle","persistToSettings","endIcon","SleeveRoot","FAQOpen","setFAQOpen","SleeveElem","statsOpen","setStatsOpen","earningsOpen","setEarningsOpen","augmentationsOpen","setAugmentationsOpen","abc","setABC","doing","SleeveAugmentationsModal","MoreStatsModal","MoreEarningsModal","universitySelectorOptions","gymSelectorOptions","possibleJobs","forbiddenCompanies","otherSleeve","possibleFactions","forbiddenFactions","facInfo","second","universities","gyms","Synchronize","canDo","getABC","s0","setS0","setS1","setS2","validActions","detailsF","details2","detail","FAQModal","HacknetRoot","purchaseMultiplier","setPurchaseMultiplier","purchaseMultiplierOnClicks","onClicks","GeneralInfo","HacknetNodeElem","purchaseMult","upgradeLevelButton","upgradeRAMButton","upgradeCoresButton","increase","upgradeLevelCost","upgradeRamCost","upgradeCoreCost","HacknetServerElem","upgradeRamButton","upgradeCacheButton","upgradeCacheCost","HashUpgradeModal","serversMap","HacknetUpgradeElem","selectedServer","setSelectedServer","MultiplierButton","MultiplierButtons","buttons","btnProps","PlayerInfo","hasServers","PurchaseButton","GenericLocation","locContent","locName","getLocationSpecificContent","serverMeta","CompanyLocation","quitOpen","setQuitOpen","isEmployedHere","favorGain","onQuit","QuitJobModal","GymLocation","train","HospitalLocation","btnStyle","getHealed","currHp","SlumsLocation","shopliftChance","robStoreChance","mugChance","larcenyChance","drugsChance","bondChance","armsChance","homicideChance","gtaChance","kidnapChance","assassinateChance","heistChance","SpecialLocation","handleBladeburner","new","worldHeader","HTMLElement","handleGrafting","CreateCorporation","handleCotMG","renderBladeburner","renderCotMG","CreateCorporationModal","canSelfFund","n00dlePower","ArcadeRoot","Megabyteburner2000","currentGame","BBCabinetRoot","origin","joystick","borderStyle","borderWidth","ServerButton","TechVendorLocation","purchaseServerButtons","RamButton","TorButton","purchaseTorRouter","darkweb","CoresButton","maxCores","PurchaseServerModal","setHostname","tryToPurchaseServer","TravelConfirmationModal","UniversityLocation","take","dataStructuresCost","networksCost","algorithmsCost","managementCost","leadershipCost","GameType","CasinoLocation","setGame","Coin","Slots","Roulette","numDecks","shuffle","drawCard","CoinFlip","investment","setInvestment","setResult","setStatus","playLock","setPlayLock","play","correct","redNumbers","strategies","Red","payout","Black","Odd","Even","High","Low","Third1","Third2","Third3","Single","canPlay","setCanPlay","setN","lock","setLock","strategy","playerWin","isRed","currentNumber","getPayout","payLines","SlotMachine","locks","setLocks","stoppedOne","getPaylineData","payline","point","countSequence","checkWinnings","getTable","LocationLetter","ASCIICity","locationLettersRegex","letterMap","K","M","N","Q","V","Y","lineElems","elems","startI","endI","locationI","ListCity","locationButtons","LocationCity","OptionsModal","setInsertSpaces","setFontSize","setWordWrap","setVim","defineTheme","inherit","foreground","fontStyle","MilestonesRoot","milestones","highestMilestone","milestone","ActionTimer","paragraph","TerminalRoot","setKey","doScroll","hook","scrollIntoView","debounced","maxWait","unsubscribe","scrollId","TerminalInput","terminalInput","postUpdateValue","setPostUpdateValue","possibilities","setPossibilities","saveValue","postUpdate","modifyInput","mod","inputLength","selectionStart","inputText","delStart","moveTextCursor","keyDown","autoComplete","TAB","semiColonIndex","allPos","determineAllPossibilitiesForTabCompletion","tabCompletion","selectionEnd","parentDirPath","evaledParentDirPath","addAllCodingContracts","cct","addAllLitFiles","addAllPrograms","addAllScripts","processFilepath","addAllTextFiles","addAllDirectories","subdirs","getSubdirectories","t_parentDirPath","convertParentPath","isCommand","cmd","t_cmd","autocomplete","runArgs","permissive","flagFunc","autocompleteData","txts","schema","pos2","scriptAutocomplete","addAllMessages","t_dir","processFile","subdir","allPossibilities","oldValue","longestStartSubstr","TutorialRoot","confirmResetOpen","setConfirmResetOpen","ActiveScriptsRoot","setTab","ScriptProduction","prodRateSinceLastAug","ServerAccordions","setRowsPerPage","serverToScriptMap","filtered","rowsPerPageOptions","newPage","onRowsPerPageChange","ActionsComponent","paddedName","barOptions","headerTxt","ServerAccordionContent","disablePadding","noborder","WorkerScriptAccordion","killScript","onlineMps","onlineEps","RecentScriptsPage","recentScript","RecentScriptAccordion","MainPage","onAugmentations","sleevesOpen","setSleevesOpen","gangOpen","setGangOpen","isPlayersGang","favorToDonate","canDonate","canPurchaseSleeves","startHackingContracts","startFieldWork","startSecurityWork","FactionRoot","purchasingAugs","setPurchasingAugs","routeToMainPage","AugmentationsPage","getAugs","switchSortOrder","newOrder","Cost","augName1","augName2","getAugsSortedByCost","getAugsSortedByReputation","Purchasable","canBuy","hasReq","hasRep","cantBuy","getAugsSortedByPurchasable","getAugsSorted","purchasable","purchaseableAugmentation","augListElems","ownedElem","Requirements","PurchaseableAugmentation","hasCost","btnTxt","PurchaseAugmentationModal","DonateOption","donateAmt","setDonateAmt","Status","noformat","Info","CreateGangModal","CovenantPurchasesRoot","setUpdate","purchaseDisabled","upgradePanels","CovenantSleeveMemoryUpgrade","maxMemory","purchaseBtnDisabled","purchaseBtnContent","LastEmployer","LastJob","Employers","bn5Stat","CurrentBitNode","MoneyModal","convertMoneySourceTrackerToString","parts","infiltration","CharacterStats","moneyOpen","setMoneyOpen","timeRows","StockMarketRoot","Purchase4SMarketDataTixApiAccessButton","PurchaseWseAccountButton","PurchaseTixApiAccessButton","Purchase4SMarketDataButton","InfoAndPurchases","StockTickers","setTickerDisplayMode","AllStocks","watchlistSymbols","setWatchlistSymbols","tickers","stockMarketProp","rerenderAllTickers","sanitizedWatchlist","SelectorOrderType","StockTicker","setOrderType","Market","tickerOpen","setTicketOpen","modalProps","setModalProps","placeText","getQuantity","hasOrderAccess","Limit","Stop","getBuyTransactionCostContent","getSellTransactionCostContent","playerMoney","localesWithLongPriceFormat","StockTickerHeaderText","stockPriceFormat","spacesAllottedForStockPrice","spacesAfterStockName","spacesBeforePrice","hdrText","plusOrMinus","StockTickerOrderList","StockTickerOrder","posTxt","LongPosition","percentageGains","ShortPosition","StockTickerPositionText","PlaceOrderModal","portal","level0","level1","level2","level3","BitNodePortal","portalOpen","setPortalOpen","cssClass","aria-description","BitverseRoot","destroyed","destroySequence","setDestroySequence","nextSourceFileFlags","PortalModal","bitNodeKey","maxSourceFileLevel","newLevel","CinematicLine","setLength","ms","newLength","advance","StaneksGiftRoot","gift","zeros","MainBoard","calculateGrid","newgrid","setGrid","ghostGrid","setGhostGrid","setRotation","selectedFragment","setSelectedFragment","moveGhost","clickAt","deleteAt","randomColor","doRotate","selectFragment","FragmentInspector","setC","FragmentOption","colorAt","FragmentSelector","FragmentPreview","getComputedStyle","Element","AchievementsRoot","AchievementList","cssPrimary","cssSecondary","secret","unavailable","locked","pr","defaultExpanded","AchievementIcon","imgLoaded","setImgLoaded","onLoad","ErrorBoundary","Component","hasError","componentDidCatch","previousScrollY","modalOpen","setModalOpen","modalImageSrc","setModalImageSrc","predefinedThemes","themes","templateTheme","onActivated","scrollY","previousColors","onImageClick","handleZoom","ThemeEntry","subheader","image","ComparisonIcon","isBetter","initialAutosave","ImportSaveRoot","currentData","setCurrentData","importModalOpen","setImportModalOpen","headback","setHeadback","dataBeingImported","dataCurrentlyInGame","fetchData","BypassWrapper","frames","Apr1","isApr1","allow","getAugmentation","getFaction","getCompany","runAfterReset","cbScript","_purchased","_facName","_cbScript","_locationName","locationName","_programName","baseserver","installTime","jobTitles","_companyName","wasFocused","_field","repNeededToDonate","empty","srcFile","sourceFileObject","incMult","decMult","normalServer","relative_filename","evaledDir","t_dst","dst","srcExt","tRes","sRes","sanitizedExpr","used","avail","usedPercent","incorrectUsage","newPath","allPrograms","allScripts","allTextFiles","allContracts","allMessages","folders","handleFn","dest","parsedFn","firstParentDir","msgOrLit","ClickableScriptRow","scriptLinksWrap","scriptLink","textDecorationLine","paddingRight","rowSplitArray","rowItem","onScriptLinkClick","postSegments","segments","linked","filesPerRow","groups","numThreads","verboseEntries","t_dest","sourcePath","destFile","destPath","positions","getCursor","re","matching","rsObj","delTarget","executableName","runContract","runProgram","commandArgs","threadFlag","tailFlag","toLocaleLowerCase","hasRoot","maxHostname","maxIP","args2","headers","currRunningScripts","numSpacesScript","spacesScript","numSpacesPid","spacesPid","numSpacesThread","spacesThread","tampering","last","minute","timeCompression","Re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,IAChBX,SAAU,CACR7yB,IAAa+0C,YACb/0C,IAAai1C,aACbj1C,IAAa4yC,oBACb5yC,IAAakzC,sBACblzC,IAAamyC,gBACbnyC,IAAawxC,eAGjB,IAAIhf,IAAa,CACfp5B,KAAMsqB,IAAkBuwG,eACxBthG,UAAW,OACXC,QAAS,KACTF,KACE,0IAEFe,aAAc,IACdH,cAAe,IACfT,SAAU,CACR7yB,IAAakzC,sBACblzC,IAAaqzC,0BACbrzC,IAAa20C,mBACb30C,IAAasyC,IACbtyC,IAAawxC,YACbxxC,IAAasxC,SACbtxC,IAAaixC,cAGjB,IAAIze,IAAa,CACfp5B,KAAMsqB,IAAkBwwG,gBACxBthG,QAAS,OACTD,UAAW,OACXD,KACE,mSAGFY,cAAe,IACfC,aAAc,IACdV,SAAU,CACR7yB,IAAakzC,sBACblzC,IAAaqzC,0BACbrzC,IAAa20C,mBACb30C,IAAasyC,IACbtyC,IAAawxC,YACbxxC,IAAasxC,SACbtxC,IAAaixC,WACbjxC,IAAamyC,mBAGjB,IAAI3f,IAAa,CACfp5B,KAAMsqB,IAAkBywG,WACxBvhG,QAAS,KACTD,UAAW,OACXD,KACE,wIAEFY,cAAe,IACfC,aAAc,IACdV,SAAU,CACR7yB,IAAau1C,WACbv1C,IAAa+0C,YACb/0C,IAAai1C,aACbj1C,IAAa6vB,SACb7vB,IAAa4vB,OACb5vB,IAAa4yC,oBACb5yC,IAAakzC,sBACblzC,IAAamyC,mBAGjB,IAAI3f,IAAa,CACfp5B,KAAMsqB,IAAkB0wG,WACxBxhG,QAAS,MACTD,UAAW,KACXD,KACE,iKAEFI,QAAS,CAACpP,IAAkBywG,YAC5B7gG,cAAe,KACfC,aAAc,KACdV,SAAU,CACR7yB,IAAa+0C,YACb/0C,IAAai1C,aACbj1C,IAAa6vB,SACb7vB,IAAa4yC,oBACb5yC,IAAakzC,sBACblzC,IAAamyC,mBAGjB,IAAI3f,IAAa,CACfp5B,KAAMsqB,IAAkB2wG,WACxBzhG,QAA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GAAWyC,EAAYhnB,WAAa,gBACpCukB,GAAW2C,EAAWlnB,WAAa,eACnCukB,GAAW6C,EAAapnB,WAAa,iBACrCukB,GAAW+C,EAAWtnB,WAAa,eACnCukB,GAAWgD,EAAYvnB,WAAa,gBACpCukB,GAAWk/F,EAAOzjH,WAAa,gBAE/BukB,EAAU,aACNuC,EAAa,IACfvC,GAAWuC,EAAa,cAEtBE,EAAc,IAChBzC,GAAWyC,EAAc,eAEvBE,EAAa,IACf3C,GAAW2C,EAAa,cAEtBE,EAAe,IACjB7C,GAAW6C,EAAe,gBAExBE,EAAa,IACf/C,GAAW+C,EAAa,cAEtBC,EAAc,IAChBhD,GAAWgD,EAAc,eAEvBk8F,EAAS,IACXl/F,GAAWk/F,EAAS,iBAEtBl/F,EAAUA,EAAQ3lB,UAAU,EAAG2lB,EAAQp1C,OAAS,GAChDo1C,GAAW,KAENA,EAjDT,mC,8BCHA,oEAGO,MAAMm/F,EAA6B,CACxC,oDACA,IACA,8EACA,sFACA,sFACA,mFACA,8EACA,qEACA,6EACA,2EACA,gEACA,uEACA,uDACA,4FACA,8EACA,kFACA,mHACA,oEACA,kGACA,wEACA,oEACA,gFACA,6FACA,4FACA,6EACA,2FACA,iGACA,6EACA,4GACA,0FACA,yEACA,uEACA,gGACA,iGACA,iFACA,+FACA,0FACA,4FACA,uEACA,wHACA,sFACA,iFACA,KAGIC,EACW3yC,GACN,CACJ,UAASA,wBACT,IACA,8GACA,4FACA,IACA,4CAA2CA,kDAC3C,kBAAiBA,yEACjB,IACA,YACA,IACA,OAAMA,YACN,OAAMA,qBACN,IACA,OAAMA,WACN,OAAMA,iBACN,KAKM4yC,EAA4B,CACvC3yD,MAAO,CACL,oCACA,IACA,4FACA,uGACA,yHACA,kGACA,IACA,gCACA,IACA,mHACA,yHACA,4CACA,IACA,gCACA,IACA,6DACA,IACA,eACA,IACA,2HACA,4HACA,IACA,mCACA,IACA,8GACA,IACA,uHACA,uCACA,IACA,uDACA,KAEF4yD,QAAS,CACP,iBACA,IACA,0GACA,mHACA,kHACA,gCACA,KAEFC,SAAU,CACR,kBACA,IACA,6FACA,IACA,+BACA,KAEFr1H,IAAK,CACH,iCACA,IACA,yEACA,IACA,oHACA,oDACA,IACA,+FACA,IACA,wGACA,KAEFs1H,IAAK,CACH,oBACA,IACA,6EACA,IACA,iBACA,IACA,kBACA,IACA,sBACA,KAEF9e,GAAI,CACF,kBACA,IACA,yGACA,iFACA,IACA,yBACA,IACA,eACA,IACA,aACA,KAEF+e,MAAO,CACL,uCACA,IACA,+HACA,uDACA,kIACA,IACA,oCACA,IACA,gGACA,IACA,sCACA,KAEFh0H,MAAO,CACL,eACA,IACA,mIACA,uIACA,KAEFi0H,IAAK,CACH,aACA,IACA,mIACA,yIACA,KAEFhyH,QAAS,CACP,4BACA,IACA,+FACA,sIACA,iEACA,KAEFiyH,GAAI,CAAC,wBAAyB,IAAK,wEAAyE,KAC5G/nE,SAAU,CACR,qCACA,IACA,mFACA,IACA,4GACA,IACA,kDACA,IACA,0CACA,IACA,0CACA,KAEFgoE,KAAM,CACJ,wCACA,IACA,oFACA,IACA,oBACA,IACA,WACA,IACA,wBACA,IACA,qFACA,KAEFC,KAAM,CACJ,cACA,IACA,gIACA,gCACA,KAEFv5H,KAAM,CACJ,cACA,IACA,6GACA,2CACA,KAEFT,KAAM,CACJ,cACA,IACA,uHACA,KAEFi6H,KAAM,CACJ,wBACA,IACA,yHACA,0HACA,mEACA,IACA,iBACA,IACA,wBACA,KAEFC,QAAS,CACP,sBACA,IACA,6GACA,KAEF5qG,KAAM,CACJ,cAAe,IAAK,sGAAuG,KAE7H1Y,SAAU,CAAC,kBAAmB,IAAK,4CAA6C,KAChF7U,KAAM,CACJ,mDACA,IACA,4EACA,IACA,6EACA,4EACA,iFACA,4DACA,IACA,uCACA,IACA,qEACA,IACA,wCACA,IACA,qFACA,KAEFC,QAAS,CACP,iBACA,IACA,4CACA,2HACA,uHACA,2EACA,KAEFI,GAAI,CACF,wCACA,IACA,iIACA,sDACA,IACA,8FACA,IACA,gFACA,IACA,yHACA,IACA,YACA,IACA,wEACA,IACA,2BACA,IACA,iEACA,IACA,yBACA,IACA,uFACA,IACA,oCACA,KAEF+3H,MAAO,CAAC,eAAgB,IAAK,wDAAyD,KAEtFC,IAAK,CACH,4CACA,IACA,6HACA,2HACA,gFACA,IACA,qBACA,IACA,2BACA,IACA,4HACA,iFACA,KAEFlzH,GAAI,CACF,yBACA,IACA,6FACA,6FACA,kCACA,IACA,kFACA,kBACA,aACA,IACA,qEACA,IACA,oCACA,KAEFmzH,KAAMd,EAAgC,QACtCl3H,GAAI,CAAC,YAAa,IAAK,4DAA6D,KACpF2D,GAAI,CACF,mBACA,IACA,6GACA,IACA,kDACA,KAEFpE,IAAK,CACH,sDACA,IACA,gDACA,IACA,sHACA,2GACA,gEACA,2DACA,2FACA,IACA,kHACA,iFACA,KAEF7B,KAAM,CACJ,cACA,IACA,6HACA,2CACA,KAEF,eAAgB,CACd,mCACA,IACA,kGACA,wGACA,4EACA,IACA,uGACA,qGACA,0BACA,IACA,iHACA,yGACA,UACA,IACA,2GACA,sEACA,KAEFoC,IAAK,CACH,4CACA,IACA,8EACA,2GACA,oCACA,2FACA,IACA,6BACA,IACA,wCACA,KAEFm4H,MAAO,CAAC,eAAgB,IAAK,oEAAqE,KAElGlzH,KAAM,CACJ,sCACA,IACA,oHACA,uHACA,oEACA,IACA,8BACA,IACA,gFACA,IACA,+BACA,KAEFopE,IAAK,CACH,aACA,IACA,yGACA,+BACA,KAEF+pD,QAAS,CACP,8BACA,IACA,mFACA,IACA,iDACA,IACA,oBACA,IACA,kCACA,IACA,gBACA,IACA,kGACA,KAEFx5E,IAAKw4E,EAAgC,OACrC34H,OAAQ,CACN,gBACA,IACA,oHACA,iEACA,KAEFmG,KAAM,CACJ,kCACA,IACA,iGACA,oGACA,0CACA,IACA,mGACA,iDACA,IACA,mGACA,O,6BC5dJ,wEAIKyzH,EAKAC,EATL,yB,SAIKD,O,2BAAAA,I,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A,IACA,eACA,IACA,MAIA,mDACA,8CACA,+BACA,wFACA,wBACA,4BACA,gBACA,+DACA,kCACA,gBACA,kBACA,mDACA,IACA,IACA,cACA,IACA,MAKA,+BACA,mDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,iBACA,IACA,OACA,IACA,oBACA,KACA,sBACA,iBACA,MACA,IAKA,oCACA,wDACA,+BACA,sBACA,0DACA,IACA,wBACA,4BACA,yCACA,uDACA,IACA,8BACA,aACA,oBACA,qBACA,+CACA,YACA,IACA,OACA,IACA,aACA,KACA,sBACA,iBACA,MACA,IAIA,oDACA,8CACA,gCACA,kEACA,YACA,wBACA,4BACA,yCACA,SACA,oBACA,4CACA,OACA,IACA,IACA,MAIA,uDACA,8CACA,sBACA,0DACA,IACA,yCACA,wBACA,mDACA,4BACA,mCACA,mBACA,gBACA,IACA,yCACA,qEACA,yBACA,uBACA,qBACA,oBACA,2BACA,+BACA,uDACA,iCACA,8FACA,IACA,8BACA,oBACA,+DACA,wEACA,4CACA,eACA,IACA,0BACA,OACA,IACA,qBACA,gBACA,IACA,MAIA,gDACA,8CACA,gCACA,8DACA,eACA,wBACA,4BACA,yCACA,sBACA,SACA,oBACA,mDACA,OACA,IACA,YACA,IACA,MAIA,mDACA,8CACA,0CACA,kEACA,4DACA,gCACA,wBACA,WACA,oCACA,kBACA,kEACA,IACA,kBACA,IACA,yBACA,mDACA,IACA,gBACA,IACA,MAIA,wDACA,8CACA,0CACA,yGACA,kEACA,+BACA,wBACA,WACA,mCACA,eACA,kEACA,IACA,kBACA,IACA,wBACA,mDACA,IACA,gBACA,IACA,MAIA,iDACA,8CACA,+BACA,6DACA,wBACA,4BACA,+DACA,kCACA,iDACA,eACA,IACA,IACA,gBACA,IACA,MAEA,gBACA,oCACA,8CAEA,wCACA,2BACA,IAEA,0CACA,mBACA,kDACA,4CACA,sBACA,yBACA,sBACA,aACA,IACA,IACA,uBACA,IACA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A,MACA,UACA,QACA,WACA,UACA,aACA,QACA,UACA,MACA,OACA,SACA,WACA,WACA,UACA,QACA,cACA,cACA,YACA,SACA,OACA,SACA,QACA,WACA,WACA,WACA,OACA,SACA,WACA,YACA,OACA,OACA,YACA,YACA,OACA,QACA,UACA,YACA,WACA,aACA,YACA,OACA,WACA,WACA,SACA,MACA,WACA,UACA,SACA,gBACA,OACA,QACA,UACA,QACA,QACA,UACA,YACA,QACA,YACA,UACA,QACA,SACA,SACA,QACA,UACA,cACA,QACA,aACA,MACA,UACA,OACA,WACA,WACA,UACA,SACA,aACA,YACA,SACA,SACA,SACA,OACA,WACA,QACA,OACA,WACA,SACA,SACA,WACA,SACA,UACA,QACA,SACA,QACA,UACA,UACA,UACA,UACA,aACA,WACA,QACA,SACA,MACA,WACA,SACA,aACA,UACA,MACA,OACA,SACA,UACA,OACA,OACA,UACA,SACA,aACA,SACA,SACA,SACA,SACA,SACA,WACA,SACA,YACA,QACA,QACA,YACA,WACA,oBACA,WACA,OACA,UACA,cACA,UACA,SACA,UACA,gBACA,OACA,SACA,QACA,MACA,WACA,WACA,WACA,cACA,SACA,UACA,QACA,eACA,WACA,OACA,OACA,SACA,MACA,OACA,iBACA,WACA,UACA,UACA,UACA,iBACA,QACA,MACA,YACA,UACA,SACA,OACA,SACA,UACA,WACA,YACA,cACA,MACA,OACA,MACA,MACA,Q,6BCvTF,iHAgBA,MAAMf,EAKF,CACFj1G,QAAS,CAAEk1G,MAAO,KAAOlhJ,KAAM,GAC/BisC,OAAQ,CAAEi1G,MAAO,IAAMlhJ,KAAM,GAC7BksC,KAAM,CAAEg1G,MAAO,IAAMlhJ,KAAM,GAC3BmsC,WAAY,CAAE+0G,MAAO,KAAMlhJ,KAAM,KAG5B,SAASq/I,EAAUv+K,GACxB,MAAM+xB,EAAyB,CAAEquJ,MAAO,EAAGlhJ,KAAM,GACjD2rC,YAAYs1G,EAAcngL,EAAM+xB,WAAYA,GAC5C,MAAMquJ,EAAQruJ,EAAWquJ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,IAAS56D,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEF3yF,SAASo8C,eAAe,SAhB5B3X,cACA+oH,WAAU,MAAYjoM,IACtBioM,WAAU,SAAeD,IACzBA,IAAS56D,OACP,kBAAC,IAAD,KACE,kBAAC,IAAD,OAEF3yF,SAASo8C,eAAe,SAcxBlrC,IAAYvjB,UAAUR,GAIwBx4B,SAAS6qC,KAAK9+B,WAAW,aACvEruC,OAAOo7N,eAAiB,WACtB,MAAO,6B","file":"main.bundle.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t1: 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([1507,0]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { sanitizeExploits } from \"./Exploits/Exploit\";\n\nimport { Reviver } from \"./utils/JSONReviver\";\n\nexport let Player = new PlayerObject();\n\nexport function loadPlayer(saveString: string): void {\n Player = JSON.parse(saveString, Reviver);\n Player.money = parseFloat(Player.money as any);\n Player.exploits = sanitizeExploits(Player.exploits);\n}\n","import numeral from \"numeral\";\nimport \"numeral/locales/bg\";\nimport \"numeral/locales/cs\";\nimport \"numeral/locales/da-dk\";\nimport \"numeral/locales/de\";\nimport \"numeral/locales/en-au\";\nimport \"numeral/locales/en-gb\";\nimport \"numeral/locales/es\";\nimport \"numeral/locales/fr\";\nimport \"numeral/locales/hu\";\nimport \"numeral/locales/it\";\nimport \"numeral/locales/lv\";\nimport \"numeral/locales/no\";\nimport \"numeral/locales/pl\";\nimport \"numeral/locales/ru\";\n\nimport { Settings } from \"../Settings/Settings\";\n\nconst extraFormats = [1e15, 1e18, 1e21, 1e24, 1e27, 1e30];\nconst extraNotations = [\"q\", \"Q\", \"s\", \"S\", \"o\", \"n\"];\nconst gigaMultiplier = { standard: 1e9, iec60027_2: 2 ** 30 };\n\nclass NumeralFormatter {\n // Default Locale\n defaultLocale = \"en\";\n\n constructor() {\n this.defaultLocale = \"en\";\n }\n\n updateLocale(l: string): boolean {\n if (numeral.locale(l) == null) {\n console.warn(`Invalid locale for numeral: ${l}`);\n\n numeral.locale(this.defaultLocale);\n return false;\n }\n return true;\n }\n\n format(n: number, format: string): string {\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 const answer = numeral(n).format(format);\n if (answer === \"NaN\") {\n return `${n}`;\n }\n return answer;\n }\n\n formatBigNumber(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\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 formatReallyBigNumber(n: number, decimalPlaces = 3): string {\n const nAbs = Math.abs(n);\n if (n === Infinity) return \"∞\";\n for (let i = 0; i < extraFormats.length; i++) {\n if (extraFormats[i] < nAbs && nAbs <= extraFormats[i] * 1000) {\n return this.format(n / extraFormats[i], \"0.\" + \"0\".repeat(decimalPlaces)) + extraNotations[i];\n }\n }\n if (nAbs < 1000) {\n return this.format(n, \"0.\" + \"0\".repeat(decimalPlaces));\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: number): string {\n if (n < 1e6) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatMoney(n: number): string {\n return \"$\" + this.formatReallyBigNumber(n);\n }\n\n formatSkill(n: number): string {\n if (n < 1e15) {\n return this.format(n, \"0,0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatExp(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatHashes(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatReputation(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatFavor(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatSecurity(n: number): string {\n return n.toFixed(3);\n }\n\n formatRAM(n: number): string {\n if (Settings.UseIEC60027_2) {\n return this.format(n * gigaMultiplier.iec60027_2, \"0.00ib\");\n }\n return this.format(n * gigaMultiplier.standard, \"0.00b\");\n }\n\n formatPercentage(n: number, decimalPlaces = 2): string {\n const formatter: string = \"0.\" + \"0\".repeat(decimalPlaces) + \"%\";\n return this.format(n, formatter);\n }\n\n formatServerSecurity(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatRespect(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatWanted(n: number): string {\n return this.formatReallyBigNumber(n, 5);\n }\n\n formatMultiplier(n: number): string {\n return this.format(n, \"0,0.00\");\n }\n\n formatSleeveShock(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveSynchro(n: number): string {\n return this.format(n, \"0,0.000\");\n }\n\n formatSleeveMemory(n: number): string {\n return this.format(n, \"0\");\n }\n\n formatPopulation(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStamina(n: number): string {\n return this.format(n, \"0.0\");\n }\n\n formatShares(n: number): string {\n if (n < 1000) {\n return this.format(n, \"0\");\n }\n return this.formatReallyBigNumber(n);\n }\n\n formatInfiltrationSecurity(n: number): string {\n return this.formatReallyBigNumber(n);\n }\n\n formatThreads(n: number): string {\n return this.format(n, \"0,0\");\n }\n\n formatStaneksGiftHeat(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftCharge(n: number): string {\n return this.format(n, \"0.000a\");\n }\n\n formatStaneksGiftPower(n: number): string {\n return this.format(n, \"0.00\");\n }\n\n parseCustomLargeNumber(str: string): number {\n const numericRegExp = new RegExp(\"^(-?\\\\d+\\\\.?\\\\d*)([\" + extraNotations.join(\"\") + \"]?)$\");\n const match = str.match(numericRegExp);\n if (match == null) {\n return NaN;\n }\n const [, number, notation] = match;\n const notationIndex = extraNotations.indexOf(notation);\n if (notationIndex === -1) {\n return NaN;\n }\n return parseFloat(number) * extraFormats[notationIndex];\n }\n\n largestAbsoluteNumber(n1: number, n2 = 0, n3 = 0): number {\n if (isNaN(n1)) n1 = 0;\n if (isNaN(n2)) n2 = 0;\n if (isNaN(n3)) n3 = 0;\n const largestAbsolute = Math.max(Math.abs(n1), Math.abs(n2), Math.abs(n3));\n switch (largestAbsolute) {\n case Math.abs(n1):\n return n1;\n case Math.abs(n2):\n return n2;\n case Math.abs(n3):\n return n3;\n }\n return 0;\n }\n\n parseMoney(s: string): number {\n // numeral library does not handle formats like 1s (returns 1) and 1e10 (returns 110) well,\n // so if more then 1 return a valid number, return the one farthest from 0\n const numeralValue = numeral(s).value();\n const parsed = parseFloat(s);\n const selfParsed = this.parseCustomLargeNumber(s);\n // Check for one or more NaN values\n if (isNaN(parsed) && numeralValue === null && isNaN(selfParsed)) {\n // 3x NaN\n return NaN;\n } else if (isNaN(parsed) && isNaN(selfParsed)) {\n // 2x NaN\n return numeralValue;\n } else if (numeralValue === null && isNaN(selfParsed)) {\n // 2x NaN\n return parsed;\n } else if (isNaN(parsed) && numeralValue === null) {\n // 2x NaN\n return selfParsed;\n } else if (isNaN(parsed)) {\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, selfParsed);\n } else if (numeralValue === null) {\n // 1x NaN\n return this.largestAbsoluteNumber(parsed, selfParsed);\n } else if (isNaN(selfParsed)) {\n // 1x NaN\n return this.largestAbsoluteNumber(numeralValue, parsed);\n } else {\n // no NaN\n return this.largestAbsoluteNumber(numeralValue, parsed, selfParsed);\n }\n }\n}\n\nexport const numeralWrapper = new NumeralFormatter();\n","export enum FactionNames {\n Illuminati = \"Illuminati\",\n Daedalus = \"Daedalus\",\n TheCovenant = \"The Covenant\",\n ECorp = \"ECorp\",\n MegaCorp = \"MegaCorp\",\n BachmanAssociates = \"Bachman & Associates\",\n BladeIndustries = \"Blade Industries\",\n NWO = \"NWO\",\n ClarkeIncorporated = \"Clarke Incorporated\",\n OmniTekIncorporated = \"OmniTek Incorporated\",\n FourSigma = \"Four Sigma\",\n KuaiGongInternational = \"KuaiGong International\",\n FulcrumSecretTechnologies = \"Fulcrum Secret Technologies\",\n BitRunners = \"BitRunners\",\n TheBlackHand = \"The Black Hand\",\n NiteSec = \"NiteSec\",\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n SpeakersForTheDead = \"Speakers for the Dead\",\n TheDarkArmy = \"The Dark Army\",\n TheSyndicate = \"The Syndicate\",\n Silhouette = \"Silhouette\",\n Tetrads = \"Tetrads\",\n SlumSnakes = \"Slum Snakes\",\n Netburners = \"Netburners\",\n TianDiHui = \"Tian Di Hui\",\n CyberSec = \"CyberSec\",\n Bladeburners = \"Bladeburners\",\n ChurchOfTheMachineGod = \"Church of the Machine God\",\n}\n","/**\n * Bitnode multipliers influence the difficulty of different aspects of the game.\n * Each Bitnode has a different theme/strategy to achieving the end goal, so these multipliers will can help drive the\n * player toward the intended strategy. Unless they really want to play the long, slow game of waiting...\n */\ninterface IBitNodeMultipliers {\n /**\n * Influences how quickly the player's agility level (not exp) scales\n */\n AgilityLevelMultiplier: number;\n\n /**\n * Influences the base cost to purchase an augmentation.\n */\n AugmentationMoneyCost: number;\n\n /**\n * Influences the base rep the player must have with a faction to purchase an augmentation.\n */\n AugmentationRepCost: number;\n\n /**\n * Influences how quickly the player can gain rank within Bladeburner.\n */\n BladeburnerRank: number;\n\n /**\n * Influences the cost of skill levels from Bladeburner.\n */\n BladeburnerSkillCost: number;\n\n /**\n * Influences how quickly the player's charisma level (not exp) scales\n */\n CharismaLevelMultiplier: number;\n\n /**\n * Influences the experience gained for each ability when a player completes a class.\n */\n ClassGymExpGain: number;\n\n /**\n * Influences the amount of money gained from completing Coding Contracts\n **/\n CodingContractMoney: number;\n\n /**\n * Influences the experience gained for each ability when the player completes working their job.\n */\n CompanyWorkExpGain: number;\n\n /**\n * Influences how much money the player earns when completing working their job.\n */\n CompanyWorkMoney: number;\n\n /**\n * Influences the valuation of corporations created by the player.\n */\n CorporationValuation: number;\n\n /**\n * Influences the base experience gained for each ability when the player commits a crime.\n */\n CrimeExpGain: number;\n\n /**\n * Influences the base money gained when the player commits a crime.\n */\n CrimeMoney: number;\n\n /**\n * Influences how many Augmentations you need in order to get invited to the Daedalus faction\n */\n DaedalusAugsRequirement: number;\n\n /**\n * Influences how quickly the player's defense level (not exp) scales\n */\n DefenseLevelMultiplier: number;\n\n /**\n * Influences how quickly the player's dexterity level (not exp) scales\n */\n DexterityLevelMultiplier: number;\n\n /**\n * Influences how much rep the player gains in each faction simply by being a member.\n */\n FactionPassiveRepGain: number;\n\n /**\n * Influences the experience gained for each ability when the player completes work for a Faction.\n */\n FactionWorkExpGain: number;\n\n /**\n * Influences how much rep the player gains when performing work for a faction.\n */\n FactionWorkRepGain: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data API\n */\n FourSigmaMarketDataApiCost: number;\n\n /**\n * Influences how much it costs to unlock the stock market's 4S Market Data (NOT API)\n */\n FourSigmaMarketDataCost: number;\n\n /**\n * Reduces gangs earning.\n */\n GangSoftcap: number;\n\n /**\n * Percentage of unique augs that the gang has.\n */\n GangUniqueAugs: number;\n\n /**\n * Influences the experienced gained when hacking a server.\n */\n HackExpGain: number;\n\n /**\n * Influences how quickly the player's hacking level (not experience) scales\n */\n HackingLevelMultiplier: number;\n\n /**\n * Influences how much money is produced by Hacknet Nodes.\n * Influeces the hash rate of Hacknet Servers (unlocked in BitNode-9)\n */\n HacknetNodeMoney: number;\n\n /**\n * Influences how much money it costs to upgrade your home computer's RAM\n */\n HomeComputerRamCost: number;\n\n /**\n * Influences how much money is gained when the player infiltrates a company.\n */\n InfiltrationMoney: number;\n\n /**\n * Influences how much rep the player can gain from factions when selling stolen documents and secrets\n */\n InfiltrationRep: number;\n\n /**\n * Influences how much money can be stolen from a server when the player performs a hack against it through\n * the Terminal.\n */\n ManualHackMoney: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerCost: number;\n\n /**\n * Influence how much it costs to purchase a server\n */\n PurchasedServerSoftcap: number;\n\n /**\n * Influences the maximum number of purchased servers you can have\n */\n PurchasedServerLimit: number;\n\n /**\n * Influences the maximum allowed RAM for a purchased server\n */\n PurchasedServerMaxRam: number;\n /**\n * Influences the minimum favor the player must have with a faction before they can donate to gain rep.\n */\n RepToDonateToFaction: number;\n\n /**\n * Influences how much money can be stolen from a server when a script performs a hack against it.\n */\n ScriptHackMoney: number;\n\n /**\n * The amount of money actually gained when script hack a server. This is\n * different than the above because you can reduce the amount of money but\n * not gain that same amount.\n */\n ScriptHackMoneyGain: number;\n\n /**\n * Influences the growth percentage per cycle against a server.\n */\n ServerGrowthRate: number;\n\n /**\n * Influences the maxmimum money that a server can grow to.\n */\n ServerMaxMoney: number;\n\n /**\n * Influences the initial money that a server starts with.\n */\n ServerStartingMoney: number;\n\n /**\n * Influences the initial security level (hackDifficulty) of a server.\n */\n ServerStartingSecurity: number;\n\n /**\n * Influences the weaken amount per invocation against a server.\n */\n ServerWeakenRate: number;\n\n /**\n * Influences how quickly the player's strength level (not exp) scales\n */\n StrengthLevelMultiplier: number;\n\n /**\n * Influences the power of the gift.\n */\n StaneksGiftPowerMultiplier: number;\n\n /**\n * Influences the size of the gift.\n */\n StaneksGiftExtraSize: number;\n\n /**\n * Influences the hacking skill required to backdoor the world daemon.\n */\n WorldDaemonDifficulty: number;\n\n /**\n * Influences corporation dividends.\n */\n CorporationSoftCap: number;\n\n // Index signature\n [key: string]: number;\n}\n\n/**\n * The multipliers that are influenced by current Bitnode progression.\n */\n// tslint:disable-next-line:variable-name\nexport const BitNodeMultipliers: IBitNodeMultipliers = {\n HackingLevelMultiplier: 1,\n StrengthLevelMultiplier: 1,\n DefenseLevelMultiplier: 1,\n DexterityLevelMultiplier: 1,\n AgilityLevelMultiplier: 1,\n CharismaLevelMultiplier: 1,\n\n ServerGrowthRate: 1,\n ServerMaxMoney: 1,\n ServerStartingMoney: 1,\n ServerStartingSecurity: 1,\n ServerWeakenRate: 1,\n\n HomeComputerRamCost: 1,\n\n PurchasedServerCost: 1,\n PurchasedServerSoftcap: 1,\n PurchasedServerLimit: 1,\n PurchasedServerMaxRam: 1,\n\n CompanyWorkMoney: 1,\n CrimeMoney: 1,\n HacknetNodeMoney: 1,\n ManualHackMoney: 1,\n ScriptHackMoney: 1,\n ScriptHackMoneyGain: 1,\n CodingContractMoney: 1,\n\n ClassGymExpGain: 1,\n CompanyWorkExpGain: 1,\n CrimeExpGain: 1,\n FactionWorkExpGain: 1,\n HackExpGain: 1,\n\n FactionPassiveRepGain: 1,\n FactionWorkRepGain: 1,\n RepToDonateToFaction: 1,\n\n AugmentationMoneyCost: 1,\n AugmentationRepCost: 1,\n\n InfiltrationMoney: 1,\n InfiltrationRep: 1,\n\n FourSigmaMarketDataCost: 1,\n FourSigmaMarketDataApiCost: 1,\n\n CorporationValuation: 1,\n CorporationSoftCap: 1,\n\n BladeburnerRank: 1,\n BladeburnerSkillCost: 1,\n\n GangSoftcap: 1,\n GangUniqueAugs: 1,\n\n DaedalusAugsRequirement: 1,\n\n StaneksGiftPowerMultiplier: 1,\n StaneksGiftExtraSize: 0,\n\n WorldDaemonDifficulty: 1,\n};\n","/**\n * Generic Game Constants\n *\n * Constants for specific mechanics or features will NOT be here.\n */\nexport const CONSTANTS: {\n VersionString: string;\n VersionNumber: number;\n _idleSpeed: number;\n MaxSkillLevel: number;\n MilliPerCycle: number;\n CorpFactionRepRequirement: number;\n BaseFocusBonus: number;\n BaseCostFor1GBOfRamHome: number;\n BaseCostFor1GBOfRamServer: number;\n TravelCost: number;\n BaseFavorToDonate: number;\n DonateMoneyToRepDivisor: number;\n FactionReputationToFavorBase: number;\n FactionReputationToFavorMult: number;\n CompanyReputationToFavorBase: number;\n CompanyReputationToFavorMult: number;\n NeuroFluxGovernorLevelMult: number;\n NumNetscriptPorts: number;\n HomeComputerMaxRam: number;\n ServerBaseGrowthRate: number;\n ServerMaxGrowthRate: number;\n ServerFortifyAmount: number;\n ServerWeakenAmount: number;\n PurchasedServerLimit: number;\n PurchasedServerMaxRam: number;\n MultipleAugMultiplier: number;\n TorRouterCost: number;\n WSEAccountCost: number;\n TIXAPICost: number;\n MarketData4SCost: number;\n MarketDataTixApi4SCost: number;\n StockMarketCommission: number;\n HospitalCostPerHp: number;\n IntelligenceCrimeWeight: number;\n IntelligenceInfiltrationWeight: number;\n IntelligenceCrimeBaseExpGain: number;\n IntelligenceProgramBaseExpGain: number;\n IntelligenceGraftBaseExpGain: number;\n IntelligenceTerminalHackBaseExpGain: number;\n IntelligenceSingFnBaseExpGain: number;\n IntelligenceClassBaseExpGain: number;\n MillisecondsPer20Hours: number;\n GameCyclesPer20Hours: number;\n MillisecondsPer10Hours: number;\n GameCyclesPer10Hours: number;\n MillisecondsPer8Hours: number;\n GameCyclesPer8Hours: number;\n MillisecondsPer4Hours: number;\n GameCyclesPer4Hours: number;\n MillisecondsPer2Hours: number;\n GameCyclesPer2Hours: number;\n MillisecondsPerHour: number;\n GameCyclesPerHour: number;\n MillisecondsPerHalfHour: number;\n GameCyclesPerHalfHour: number;\n MillisecondsPerQuarterHour: number;\n GameCyclesPerQuarterHour: number;\n MillisecondsPerFiveMinutes: number;\n GameCyclesPerFiveMinutes: number;\n FactionWorkHacking: string;\n FactionWorkField: string;\n FactionWorkSecurity: string;\n WorkTypeCompany: string;\n WorkTypeCompanyPartTime: string;\n WorkTypeFaction: string;\n WorkTypeCreateProgram: string;\n WorkTypeStudyClass: string;\n WorkTypeCrime: string;\n WorkTypeGraftAugmentation: string;\n ClassStudyComputerScience: string;\n ClassDataStructures: string;\n ClassNetworks: string;\n ClassAlgorithms: string;\n ClassManagement: string;\n ClassLeadership: string;\n ClassGymStrength: string;\n ClassGymDefense: string;\n ClassGymDexterity: string;\n ClassGymAgility: string;\n ClassDataStructuresBaseCost: number;\n ClassNetworksBaseCost: number;\n ClassAlgorithmsBaseCost: number;\n ClassManagementBaseCost: number;\n ClassLeadershipBaseCost: number;\n ClassGymBaseCost: number;\n ClassStudyComputerScienceBaseExp: number;\n ClassDataStructuresBaseExp: number;\n ClassNetworksBaseExp: number;\n ClassAlgorithmsBaseExp: number;\n ClassManagementBaseExp: number;\n ClassLeadershipBaseExp: number;\n CrimeShoplift: string;\n CrimeRobStore: string;\n CrimeMug: string;\n CrimeLarceny: string;\n CrimeDrugs: string;\n CrimeBondForgery: string;\n CrimeTraffickArms: string;\n CrimeHomicide: string;\n CrimeGrandTheftAuto: string;\n CrimeKidnap: string;\n CrimeAssassination: string;\n CrimeHeist: string;\n CodingContractBaseFactionRepGain: number;\n CodingContractBaseCompanyRepGain: number;\n CodingContractBaseMoneyGain: number;\n AugmentationGraftingCostMult: number;\n AugmentationGraftingTimeBase: number;\n EntropyEffect: number;\n TotalNumBitNodes: number;\n LatestUpdate: string;\n} = {\n VersionString: \"1.6.3\",\n VersionNumber: 13,\n\n // Speed (in ms) at which the main loop is updated\n _idleSpeed: 200,\n\n /** Max level for any skill, assuming no multipliers. Determined by max numerical value in javascript for experience\n * and the skill level formula in Player.js. Note that all this means it that when experience hits MAX_INT, then\n * the player will have this level assuming no multipliers. Multipliers can cause skills to go above this.\n */\n MaxSkillLevel: 975,\n\n // Milliseconds per game cycle\n MilliPerCycle: 200,\n\n // How much reputation is needed to join a megacorporation's faction\n CorpFactionRepRequirement: 200e3,\n\n // Base RAM costs\n BaseCostFor1GBOfRamHome: 32000,\n BaseCostFor1GBOfRamServer: 55000, //1 GB of RAM\n\n // Cost to travel to another city\n TravelCost: 200e3,\n\n // Faction and Company favor-related things\n BaseFavorToDonate: 150,\n DonateMoneyToRepDivisor: 1e6,\n FactionReputationToFavorBase: 500,\n FactionReputationToFavorMult: 1.02,\n CompanyReputationToFavorBase: 500,\n CompanyReputationToFavorMult: 1.02,\n\n // NeuroFlux Governor Augmentation cost multiplier\n NeuroFluxGovernorLevelMult: 1.14,\n\n NumNetscriptPorts: 20,\n\n // Server-related constants\n HomeComputerMaxRam: 1073741824, // 2 ^ 30\n ServerBaseGrowthRate: 1.03, // Unadjusted Growth rate\n ServerMaxGrowthRate: 1.0035, // Maximum possible growth rate (max rate accounting for server security)\n ServerFortifyAmount: 0.002, // Amount by which server's security increases when its hacked/grown\n ServerWeakenAmount: 0.05, // Amount by which server's security decreases when weakened\n\n PurchasedServerLimit: 25,\n PurchasedServerMaxRam: 1048576, // 2^20\n\n // Augmentation Constants\n MultipleAugMultiplier: 1.9,\n\n // TOR Router\n TorRouterCost: 200e3,\n\n // Stock market\n WSEAccountCost: 200e6,\n TIXAPICost: 5e9,\n MarketData4SCost: 1e9,\n MarketDataTixApi4SCost: 25e9,\n StockMarketCommission: 100e3,\n\n // Hospital/Health\n HospitalCostPerHp: 100e3,\n\n // Intelligence-related constants\n IntelligenceCrimeWeight: 0.025, // Weight for how much int affects crime success rates\n IntelligenceInfiltrationWeight: 0.1, // Weight for how much int affects infiltration success rates\n IntelligenceCrimeBaseExpGain: 0.05,\n IntelligenceProgramBaseExpGain: 0.1, // Program required hack level divided by this to determine int exp gain\n IntelligenceGraftBaseExpGain: 0.05,\n IntelligenceTerminalHackBaseExpGain: 200, // Hacking exp divided by this to determine int exp gain\n IntelligenceSingFnBaseExpGain: 1.5,\n IntelligenceClassBaseExpGain: 0.01,\n\n // Time-related constants\n MillisecondsPer20Hours: 72000000,\n GameCyclesPer20Hours: 72000000 / 200,\n\n MillisecondsPer10Hours: 36000000,\n GameCyclesPer10Hours: 36000000 / 200,\n\n MillisecondsPer8Hours: 28800000,\n GameCyclesPer8Hours: 28800000 / 200,\n\n MillisecondsPer4Hours: 14400000,\n GameCyclesPer4Hours: 14400000 / 200,\n\n MillisecondsPer2Hours: 7200000,\n GameCyclesPer2Hours: 7200000 / 200,\n\n MillisecondsPerHour: 3600000,\n GameCyclesPerHour: 3600000 / 200,\n\n MillisecondsPerHalfHour: 1800000,\n GameCyclesPerHalfHour: 1800000 / 200,\n\n MillisecondsPerQuarterHour: 900000,\n GameCyclesPerQuarterHour: 900000 / 200,\n\n MillisecondsPerFiveMinutes: 300000,\n GameCyclesPerFiveMinutes: 300000 / 200,\n\n // Player Work & Action\n BaseFocusBonus: 0.8,\n FactionWorkHacking: \"Faction Hacking Work\",\n FactionWorkField: \"Faction Field Work\",\n FactionWorkSecurity: \"Faction Security Work\",\n\n WorkTypeCompany: \"Working for Company\",\n WorkTypeCompanyPartTime: \"Working for Company part-time\",\n WorkTypeFaction: \"Working for Faction\",\n WorkTypeCreateProgram: \"Working on Create a Program\",\n WorkTypeStudyClass: \"Studying or Taking a class at university\",\n WorkTypeCrime: \"Committing a crime\",\n WorkTypeGraftAugmentation: \"Grafting an Augmentation\",\n\n ClassStudyComputerScience: \"studying Computer Science\",\n ClassDataStructures: \"taking a Data Structures course\",\n ClassNetworks: \"taking a Networks course\",\n ClassAlgorithms: \"taking an Algorithms course\",\n ClassManagement: \"taking a Management course\",\n ClassLeadership: \"taking a Leadership course\",\n ClassGymStrength: \"training your strength at a gym\",\n ClassGymDefense: \"training your defense at a gym\",\n ClassGymDexterity: \"training your dexterity at a gym\",\n ClassGymAgility: \"training your agility at a gym\",\n\n ClassDataStructuresBaseCost: 40,\n ClassNetworksBaseCost: 80,\n ClassAlgorithmsBaseCost: 320,\n ClassManagementBaseCost: 160,\n ClassLeadershipBaseCost: 320,\n ClassGymBaseCost: 120,\n\n ClassStudyComputerScienceBaseExp: 0.5,\n ClassDataStructuresBaseExp: 1,\n ClassNetworksBaseExp: 2,\n ClassAlgorithmsBaseExp: 4,\n ClassManagementBaseExp: 2,\n ClassLeadershipBaseExp: 4,\n\n CrimeShoplift: \"shoplift\",\n CrimeRobStore: \"rob a store\",\n CrimeMug: \"mug someone\",\n CrimeLarceny: \"commit larceny\",\n CrimeDrugs: \"deal drugs\",\n CrimeBondForgery: \"forge corporate bonds\",\n CrimeTraffickArms: \"traffick illegal arms\",\n CrimeHomicide: \"commit homicide\",\n CrimeGrandTheftAuto: \"commit grand theft auto\",\n CrimeKidnap: \"kidnap someone for ransom\",\n CrimeAssassination: \"assassinate a high-profile target\",\n CrimeHeist: \"pull off the ultimate heist\",\n\n // Coding Contract\n // TODO: Move this into Coding contract implementation?\n CodingContractBaseFactionRepGain: 2500,\n CodingContractBaseCompanyRepGain: 4000,\n CodingContractBaseMoneyGain: 75e6,\n\n // Augmentation crafting multipliers\n AugmentationGraftingCostMult: 3,\n AugmentationGraftingTimeBase: 3600000,\n\n // Value raised to the number of entropy stacks, then multiplied to player multipliers\n EntropyEffect: 0.98,\n\n // BitNode/Source-File related stuff\n TotalNumBitNodes: 24,\n\n LatestUpdate: `\n v1.6.3 - 2022-04-01 Few stanek fixes\n ----------------------------\n\n Stanek Gift \n\n * Has a minimum size of 2x3\n * Active Fragment property 'avgCharge' renamed to 'highestCharge'\n * Formula for fragment effect updated to make 561% more sense. \n Now you can charge to your heart content.\n * Logs for the 'chargeFragment' function updated.\n\n Misc. \n\n * Nerf noodle bar.\n`,\n};\n","import { ISelfInitializer, ISelfLoading } from \"../types\";\nimport { OwnedAugmentationsOrderSetting, PurchaseAugmentationsOrderSetting } from \"./SettingEnums\";\nimport { defaultTheme, ITheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { WordWrapOptions } from \"../ScriptEditor/ui/Options\";\nimport { OverviewSettings } from \"../ui/React/Overview\";\nimport { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\n\n/**\n * Represents the default settings the player could customize.\n */\ninterface IDefaultSettings {\n /**\n * How many servers per page\n */\n ActiveScriptsServerPageSize: number;\n /**\n * How many scripts per page\n */\n ActiveScriptsScriptPageSize: number;\n /**\n * How often the game should autosave the player's progress, in seconds.\n */\n AutosaveInterval: number;\n\n /**\n * How many milliseconds between execution points for Netscript 1 statements.\n */\n CodeInstructionRunTime: number;\n\n /**\n * Render city as list of buttons.\n */\n DisableASCIIArt: boolean;\n\n /**\n * Whether global keyboard shortcuts should be recognized throughout the game.\n */\n DisableHotkeys: boolean;\n\n /**\n * Whether text effects such as corruption should be visible.\n */\n DisableTextEffects: boolean;\n\n /**\n * Whether overview progress bars should be visible.\n */\n DisableOverviewProgressBars: boolean;\n\n /**\n * Enable bash hotkeys\n */\n EnableBashHotkeys: boolean;\n\n /**\n * Timestamps format\n */\n TimestampsFormat: string;\n\n /**\n * Locale used for display numbers\n */\n Locale: string;\n\n /**\n * Limit the number of log entries for each script being executed on each server.\n */\n MaxLogCapacity: number;\n\n /**\n * Limit how many entries can be written to a Netscript Port before entries start to get pushed out.\n */\n MaxPortCapacity: number;\n\n /**\n * Limit the number of entries in the terminal.\n */\n MaxTerminalCapacity: number;\n\n /**\n * Save the game when you save any file.\n */\n SaveGameOnFileSave: boolean;\n\n /**\n * Whether the player should be asked to confirm purchasing each and every augmentation.\n */\n SuppressBuyAugmentationConfirmation: boolean;\n\n /**\n * Whether the user should be prompted to join each faction via a dialog box.\n */\n SuppressFactionInvites: boolean;\n\n /**\n * Whether the user should be shown a dialog box whenever they receive a new message file.\n */\n SuppressMessages: boolean;\n\n /**\n * Whether the user should be asked to confirm travelling between cities.\n */\n SuppressTravelConfirmation: boolean;\n\n /**\n * Whether the user should be displayed a popup message when his Bladeburner actions are cancelled.\n */\n SuppressBladeburnerPopup: boolean;\n\n /**\n * Whether the user should be displayed a popup message on stock market actions.\n */\n SuppressTIXPopup: boolean;\n\n /**\n * Whether the user should be displayed a toast alert when the game is saved.\n */\n SuppressSavedGameToast: boolean;\n\n /**\n * Whether the user should be displayed a toast warning when the autosave is disabled.\n */\n SuppressAutosaveDisabledWarnings: boolean;\n\n /*\n * Whether the game should skip saving the running scripts for late game\n */\n ExcludeRunningScriptsFromSave: boolean;\n\n /*\n * Theme colors\n */\n theme: ITheme;\n\n /*\n * Interface styles\n */\n styles: IStyleSettings;\n\n /*\n * Use GiB instead of GB\n */\n UseIEC60027_2: boolean;\n\n /*\n * Character overview settings\n */\n overview: OverviewSettings;\n\n /**\n * If the game's sidebar is opened\n */\n IsSidebarOpened: boolean;\n}\n\n/**\n * Represents all possible settings the player wants to customize to their play style.\n */\ninterface ISettings extends IDefaultSettings {\n /**\n * What order the player's owned Augmentations/Source Files should be displayed in\n */\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting;\n\n /**\n * What order the Augmentations should be displayed in when purchasing from a Faction\n */\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting;\n\n MonacoTheme: string;\n\n MonacoInsertSpaces: boolean;\n\n MonacoFontSize: number;\n\n MonacoVim: boolean;\n\n MonacoWordWrap: WordWrapOptions;\n}\n\nexport const defaultSettings: IDefaultSettings = {\n ActiveScriptsServerPageSize: 10,\n ActiveScriptsScriptPageSize: 10,\n AutosaveInterval: 60,\n CodeInstructionRunTime: 50,\n DisableASCIIArt: false,\n DisableHotkeys: false,\n DisableTextEffects: false,\n DisableOverviewProgressBars: false,\n EnableBashHotkeys: false,\n TimestampsFormat: \"\",\n Locale: \"en\",\n MaxLogCapacity: 50,\n MaxPortCapacity: 50,\n MaxTerminalCapacity: 500,\n SaveGameOnFileSave: true,\n SuppressBuyAugmentationConfirmation: false,\n SuppressFactionInvites: false,\n SuppressMessages: false,\n SuppressTravelConfirmation: false,\n SuppressBladeburnerPopup: false,\n SuppressTIXPopup: false,\n SuppressSavedGameToast: false,\n SuppressAutosaveDisabledWarnings: false,\n UseIEC60027_2: false,\n ExcludeRunningScriptsFromSave: false,\n IsSidebarOpened: true,\n\n theme: defaultTheme,\n styles: defaultStyles,\n overview: { x: 0, y: 0, opened: true },\n};\n\n/**\n * The current options the player has customized to their play style.\n */\n// tslint:disable-next-line:variable-name\nexport const Settings: ISettings & ISelfInitializer & ISelfLoading = {\n ActiveScriptsServerPageSize: defaultSettings.ActiveScriptsServerPageSize,\n ActiveScriptsScriptPageSize: defaultSettings.ActiveScriptsScriptPageSize,\n AutosaveInterval: defaultSettings.AutosaveInterval,\n CodeInstructionRunTime: 25,\n DisableASCIIArt: defaultSettings.DisableASCIIArt,\n DisableHotkeys: defaultSettings.DisableHotkeys,\n DisableTextEffects: defaultSettings.DisableTextEffects,\n DisableOverviewProgressBars: defaultSettings.DisableOverviewProgressBars,\n EnableBashHotkeys: defaultSettings.EnableBashHotkeys,\n TimestampsFormat: defaultSettings.TimestampsFormat,\n Locale: \"en\",\n MaxLogCapacity: defaultSettings.MaxLogCapacity,\n MaxPortCapacity: defaultSettings.MaxPortCapacity,\n MaxTerminalCapacity: defaultSettings.MaxTerminalCapacity,\n OwnedAugmentationsOrder: OwnedAugmentationsOrderSetting.AcquirementTime,\n PurchaseAugmentationsOrder: PurchaseAugmentationsOrderSetting.Default,\n SaveGameOnFileSave: defaultSettings.SaveGameOnFileSave,\n SuppressBuyAugmentationConfirmation: defaultSettings.SuppressBuyAugmentationConfirmation,\n SuppressFactionInvites: defaultSettings.SuppressFactionInvites,\n SuppressMessages: defaultSettings.SuppressMessages,\n SuppressTravelConfirmation: defaultSettings.SuppressTravelConfirmation,\n SuppressBladeburnerPopup: defaultSettings.SuppressBladeburnerPopup,\n SuppressTIXPopup: defaultSettings.SuppressTIXPopup,\n SuppressSavedGameToast: defaultSettings.SuppressSavedGameToast,\n SuppressAutosaveDisabledWarnings: defaultSettings.SuppressAutosaveDisabledWarnings,\n UseIEC60027_2: defaultSettings.UseIEC60027_2,\n ExcludeRunningScriptsFromSave: defaultSettings.ExcludeRunningScriptsFromSave,\n IsSidebarOpened: defaultSettings.IsSidebarOpened,\n\n MonacoTheme: \"monokai\",\n MonacoInsertSpaces: false,\n MonacoFontSize: 20,\n MonacoVim: false,\n MonacoWordWrap: \"off\",\n\n theme: { ...defaultTheme },\n styles: { ...defaultStyles },\n overview: defaultSettings.overview,\n init() {\n Object.assign(Settings, defaultSettings);\n },\n load(saveString: string) {\n const save = JSON.parse(saveString);\n Object.assign(Settings.theme, save.theme);\n delete save.theme;\n Object.assign(Settings.styles, save.styles);\n delete save.styles;\n Object.assign(Settings.overview, save.overview);\n delete save.overview;\n Object.assign(Settings, save);\n },\n};\n","/**\n * Names of all locations\n */\nexport enum LocationName {\n // Aevum Locations\n AevumAeroCorp = \"AeroCorp\",\n AevumBachmanAndAssociates = \"Bachman & Associates\",\n AevumClarkeIncorporated = \"Clarke Incorporated\",\n AevumCrushFitnessGym = \"Crush Fitness Gym\",\n AevumECorp = \"ECorp\",\n AevumFulcrumTechnologies = \"Fulcrum Technologies\",\n AevumGalacticCybersystems = \"Galactic Cybersystems\",\n AevumNetLinkTechnologies = \"NetLink Technologies\",\n AevumPolice = \"Aevum Police Headquarters\",\n AevumRhoConstruction = \"Rho Construction\",\n AevumSnapFitnessGym = \"Snap Fitness Gym\",\n AevumSummitUniversity = \"Summit University\",\n AevumWatchdogSecurity = \"Watchdog Security\",\n AevumCasino = \"Iker Molina Casino\",\n\n // Chongqing locations\n ChongqingKuaiGongInternational = \"KuaiGong International\",\n ChongqingSolarisSpaceSystems = \"Solaris Space Systems\",\n ChongqingChurchOfTheMachineGod = \"Church of the Machine God\",\n\n // Sector 12\n Sector12AlphaEnterprises = \"Alpha Enterprises\",\n Sector12BladeIndustries = \"Blade Industries\",\n Sector12CIA = \"Central Intelligence Agency\",\n Sector12CarmichaelSecurity = \"Carmichael Security\",\n Sector12CityHall = \"Sector-12 City Hall\",\n Sector12DeltaOne = \"DeltaOne\",\n Sector12FoodNStuff = \"FoodNStuff\",\n Sector12FourSigma = \"Four Sigma\",\n Sector12IcarusMicrosystems = \"Icarus Microsystems\",\n Sector12IronGym = \"Iron Gym\",\n Sector12JoesGuns = \"Joe's Guns\",\n Sector12MegaCorp = \"MegaCorp\",\n Sector12NSA = \"National Security Agency\",\n Sector12PowerhouseGym = \"Powerhouse Gym\",\n Sector12RothmanUniversity = \"Rothman University\",\n Sector12UniversalEnergy = \"Universal Energy\",\n\n // New Tokyo\n NewTokyoDefComm = \"DefComm\",\n NewTokyoGlobalPharmaceuticals = \"Global Pharmaceuticals\",\n NewTokyoNoodleBar = \"Noodle Bar\",\n NewTokyoVitaLife = \"VitaLife\",\n NewTokyoArcade = \"Arcade\",\n\n // Ishima\n IshimaNovaMedical = \"Nova Medical\",\n IshimaOmegaSoftware = \"Omega Software\",\n IshimaStormTechnologies = \"Storm Technologies\",\n IshimaGlitch = \"0x6C1\",\n\n // Volhaven\n VolhavenCompuTek = \"CompuTek\",\n VolhavenHeliosLabs = \"Helios Labs\",\n VolhavenLexoCorp = \"LexoCorp\",\n VolhavenMilleniumFitnessGym = \"Millenium Fitness Gym\",\n VolhavenNWO = \"NWO\",\n VolhavenOmniTekIncorporated = \"OmniTek Incorporated\",\n VolhavenOmniaCybersystems = \"Omnia Cybersystems\",\n VolhavenSysCoreSecurities = \"SysCore Securities\",\n VolhavenZBInstituteOfTechnology = \"ZB Institute of Technology\",\n\n // Generic locations\n Hospital = \"Hospital\",\n Slums = \"The Slums\",\n TravelAgency = \"Travel Agency\",\n WorldStockExchange = \"World Stock Exchange\",\n\n // Default name for Location objects\n Void = \"The Void\",\n}\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\n\n// TODO remember to update RamCalculations.js and WorkerScript.js\n\n// RAM costs for Netscript functions\nexport const RamCostConstants: IMap = {\n ScriptBaseRamCost: 1.6,\n ScriptDomRamCost: 25,\n ScriptCorporationRamCost: 1024 - 1.6,\n ScriptHackRamCost: 0.1,\n ScriptHackAnalyzeRamCost: 1,\n ScriptGrowRamCost: 0.15,\n ScriptGrowthAnalyzeRamCost: 1,\n ScriptWeakenRamCost: 0.15,\n ScriptWeakenAnalyzeRamCost: 1,\n ScriptScanRamCost: 0.2,\n ScriptPortProgramRamCost: 0.05,\n ScriptRunRamCost: 1.0,\n ScriptExecRamCost: 1.3,\n ScriptSpawnRamCost: 2.0,\n ScriptScpRamCost: 0.6,\n ScriptKillRamCost: 0.5,\n ScriptHasRootAccessRamCost: 0.05,\n ScriptGetHostnameRamCost: 0.05,\n ScriptGetHackingLevelRamCost: 0.05,\n ScriptGetMultipliersRamCost: 4.0,\n ScriptGetServerRamCost: 0.1,\n ScriptGetServerMaxRam: 0.05,\n ScriptGetServerUsedRam: 0.05,\n ScriptFileExistsRamCost: 0.1,\n ScriptIsRunningRamCost: 0.1,\n ScriptHacknetNodesRamCost: 4.0,\n ScriptHNUpgLevelRamCost: 0.4,\n ScriptHNUpgRamRamCost: 0.6,\n ScriptHNUpgCoreRamCost: 0.8,\n ScriptGetStockRamCost: 2.0,\n ScriptBuySellStockRamCost: 2.5,\n ScriptGetPurchaseServerRamCost: 0.25,\n ScriptPurchaseServerRamCost: 2.25,\n ScriptGetPurchasedServerLimit: 0.05,\n ScriptGetPurchasedServerMaxRam: 0.05,\n ScriptRoundRamCost: 0.05,\n ScriptReadWriteRamCost: 1.0,\n ScriptArbScriptRamCost: 1.0,\n ScriptGetScriptRamCost: 0.1,\n ScriptGetRunningScriptRamCost: 0.3,\n ScriptGetHackTimeRamCost: 0.05,\n ScriptGetFavorToDonate: 0.1,\n ScriptCodingContractBaseRamCost: 10,\n ScriptSleeveBaseRamCost: 4,\n ScriptGetOwnedSourceFiles: 5,\n\n ScriptSingularityFn1RamCost: 2,\n ScriptSingularityFn2RamCost: 3,\n ScriptSingularityFn3RamCost: 5,\n\n ScriptGangApiBaseRamCost: 4,\n\n ScriptBladeburnerApiBaseRamCost: 4,\n\n ScriptStanekWidth: 0.4,\n ScriptStanekHeight: 0.4,\n ScriptStanekCharge: 0.4,\n ScriptStanekFragmentDefinitions: 0,\n ScriptStanekPlacedFragments: 5,\n ScriptStanekClear: 0,\n ScriptStanekCanPlace: 0.5,\n ScriptStanekPlace: 5,\n ScriptStanekFragmentAt: 2,\n ScriptStanekDeleteAt: 0.15,\n};\n\nfunction SF4Cost(cost: number): (player: IPlayer) => number {\n return (player: IPlayer): number => {\n if (player.bitNodeN === 4) return cost;\n const sf4 = player.sourceFileLvl(4);\n if (sf4 <= 1) return cost * 16;\n if (sf4 === 2) return cost * 4;\n return cost;\n };\n}\n\nexport const RamCosts: IMap = {\n hacknet: {\n numNodes: 0,\n purchaseNode: 0,\n getPurchaseNodeCost: 0,\n getNodeStats: 0,\n upgradeLevel: 0,\n upgradeRam: 0,\n upgradeCore: 0,\n upgradeCache: 0,\n getLevelUpgradeCost: 0,\n getRamUpgradeCost: 0,\n getCoreUpgradeCost: 0,\n getCacheUpgradeCost: 0,\n numHashes: 0,\n hashCost: 0,\n spendHashes: 0,\n },\n sprintf: 0,\n vsprintf: 0,\n scan: RamCostConstants.ScriptScanRamCost,\n hack: RamCostConstants.ScriptHackRamCost,\n hackAnalyzeThreads: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyze: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeSecurity: RamCostConstants.ScriptHackAnalyzeRamCost,\n hackAnalyzeChance: RamCostConstants.ScriptHackAnalyzeRamCost,\n sleep: 0,\n asleep: 0,\n share: 2.4,\n getSharePower: 0.2,\n grow: RamCostConstants.ScriptGrowRamCost,\n growthAnalyze: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n growthAnalyzeSecurity: RamCostConstants.ScriptGrowthAnalyzeRamCost,\n weaken: RamCostConstants.ScriptWeakenRamCost,\n weakenAnalyze: RamCostConstants.ScriptWeakenAnalyzeRamCost,\n print: 0,\n printf: 0,\n tprint: 0,\n clearLog: 0,\n disableLog: 0,\n enableLog: 0,\n isLogEnabled: 0,\n getScriptLogs: 0,\n nuke: RamCostConstants.ScriptPortProgramRamCost,\n brutessh: RamCostConstants.ScriptPortProgramRamCost,\n ftpcrack: RamCostConstants.ScriptPortProgramRamCost,\n relaysmtp: RamCostConstants.ScriptPortProgramRamCost,\n httpworm: RamCostConstants.ScriptPortProgramRamCost,\n sqlinject: RamCostConstants.ScriptPortProgramRamCost,\n run: RamCostConstants.ScriptRunRamCost,\n exec: RamCostConstants.ScriptExecRamCost,\n spawn: RamCostConstants.ScriptSpawnRamCost,\n kill: RamCostConstants.ScriptKillRamCost,\n killall: RamCostConstants.ScriptKillRamCost,\n exit: 0,\n atExit: 0,\n scp: RamCostConstants.ScriptScpRamCost,\n ls: RamCostConstants.ScriptScanRamCost,\n ps: RamCostConstants.ScriptScanRamCost,\n hasRootAccess: RamCostConstants.ScriptHasRootAccessRamCost,\n getIp: RamCostConstants.ScriptGetHostnameRamCost,\n getHostname: RamCostConstants.ScriptGetHostnameRamCost,\n getHackingLevel: RamCostConstants.ScriptGetHackingLevelRamCost,\n getHackingMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getHacknetMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getBitNodeMultipliers: RamCostConstants.ScriptGetMultipliersRamCost,\n getServer: RamCostConstants.ScriptGetMultipliersRamCost / 2,\n getServerMoneyAvailable: RamCostConstants.ScriptGetServerRamCost,\n getServerSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerBaseSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMinSecurityLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerRequiredHackingLevel: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxMoney: RamCostConstants.ScriptGetServerRamCost,\n getServerGrowth: RamCostConstants.ScriptGetServerRamCost,\n getServerNumPortsRequired: RamCostConstants.ScriptGetServerRamCost,\n getServerRam: RamCostConstants.ScriptGetServerRamCost,\n getServerMaxRam: RamCostConstants.ScriptGetServerMaxRam,\n getServerUsedRam: RamCostConstants.ScriptGetServerUsedRam,\n serverExists: RamCostConstants.ScriptGetServerRamCost,\n fileExists: RamCostConstants.ScriptFileExistsRamCost,\n isRunning: RamCostConstants.ScriptIsRunningRamCost,\n stock: {\n getSymbols: RamCostConstants.ScriptGetStockRamCost,\n getPrice: RamCostConstants.ScriptGetStockRamCost,\n getAskPrice: RamCostConstants.ScriptGetStockRamCost,\n getBidPrice: RamCostConstants.ScriptGetStockRamCost,\n getPosition: RamCostConstants.ScriptGetStockRamCost,\n getMaxShares: RamCostConstants.ScriptGetStockRamCost,\n getPurchaseCost: RamCostConstants.ScriptGetStockRamCost,\n getSaleGain: RamCostConstants.ScriptGetStockRamCost,\n buy: RamCostConstants.ScriptBuySellStockRamCost,\n sell: RamCostConstants.ScriptBuySellStockRamCost,\n short: RamCostConstants.ScriptBuySellStockRamCost,\n sellShort: RamCostConstants.ScriptBuySellStockRamCost,\n placeOrder: RamCostConstants.ScriptBuySellStockRamCost,\n cancelOrder: RamCostConstants.ScriptBuySellStockRamCost,\n getOrders: RamCostConstants.ScriptBuySellStockRamCost,\n getVolatility: RamCostConstants.ScriptBuySellStockRamCost,\n getForecast: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketData: RamCostConstants.ScriptBuySellStockRamCost,\n purchase4SMarketDataTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseWseAccount: RamCostConstants.ScriptBuySellStockRamCost,\n purchaseTixApi: RamCostConstants.ScriptBuySellStockRamCost,\n },\n getPurchasedServerLimit: RamCostConstants.ScriptGetPurchasedServerLimit,\n getPurchasedServerMaxRam: RamCostConstants.ScriptGetPurchasedServerMaxRam,\n getPurchasedServerCost: RamCostConstants.ScriptGetPurchaseServerRamCost,\n purchaseServer: RamCostConstants.ScriptPurchaseServerRamCost,\n deleteServer: RamCostConstants.ScriptPurchaseServerRamCost,\n getPurchasedServers: RamCostConstants.ScriptPurchaseServerRamCost,\n write: 0,\n tryWritePort: 0,\n read: 0,\n peek: 0,\n clear: 0,\n writePort: 0,\n readPort: 0,\n getPortHandle: 0,\n rm: RamCostConstants.ScriptReadWriteRamCost,\n scriptRunning: RamCostConstants.ScriptArbScriptRamCost,\n scriptKill: RamCostConstants.ScriptArbScriptRamCost,\n getScriptName: 0,\n getScriptRam: RamCostConstants.ScriptGetScriptRamCost,\n getHackTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getGrowTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getWeakenTime: RamCostConstants.ScriptGetHackTimeRamCost,\n getScriptIncome: RamCostConstants.ScriptGetScriptRamCost,\n getScriptExpGain: RamCostConstants.ScriptGetScriptRamCost,\n getRunningScript: RamCostConstants.ScriptGetRunningScriptRamCost,\n nFormat: 0,\n tFormat: 0,\n getTimeSinceLastAug: RamCostConstants.ScriptGetHackTimeRamCost,\n prompt: 0,\n wget: 0,\n getFavorToDonate: RamCostConstants.ScriptGetFavorToDonate,\n getPlayer: RamCostConstants.ScriptSingularityFn1RamCost / 4,\n mv: 0,\n getOwnedSourceFiles: RamCostConstants.ScriptGetOwnedSourceFiles,\n tail: 0,\n toast: 0,\n\n // Singularity Functions\n universityCourse: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n gymWorkout: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n travelToCity: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n goToLocation: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n purchaseTor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n purchaseProgram: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getCurrentServer: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n connect: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n manualHack: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n installBackdoor: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost),\n getDarkwebProgramCost: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getDarkwebPrograms: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getStats: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n getCharacterInformation: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n hospitalize: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n isBusy: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 4),\n stopAction: SF4Cost(RamCostConstants.ScriptSingularityFn1RamCost / 2),\n upgradeHomeRam: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n upgradeHomeCores: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getUpgradeHomeRamCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n getUpgradeHomeCoresCost: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 2),\n workForCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n applyToCompany: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getCompanyRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getCompanyFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n checkFactionInvitations: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n joinFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n workForFaction: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost),\n getFactionRep: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavor: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 3),\n getFactionFavorGain: SF4Cost(RamCostConstants.ScriptSingularityFn2RamCost / 4),\n donateToFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n createProgram: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n commitCrime: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeChance: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getCrimeStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getOwnedAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationsFromFaction: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationCost: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrereq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n getAugmentationPrice: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationRepReq: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost / 2),\n getAugmentationStats: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n purchaseAugmentation: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n softReset: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n installAugmentations: SF4Cost(RamCostConstants.ScriptSingularityFn3RamCost),\n isFocused: SF4Cost(0.1),\n setFocus: SF4Cost(0.1),\n\n // Gang API\n gang: {\n createGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n inGang: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getMemberNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getOtherGangInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getMemberInformation: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n canRecruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n recruitMember: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getTaskNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getTaskStats: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n setMemberTask: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentNames: RamCostConstants.ScriptGangApiBaseRamCost / 4,\n getEquipmentCost: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentType: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,\n ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,\n getAscensionResult: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,\n getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,\n getBonusTime: 0,\n },\n\n // Bladeburner API\n bladeburner: {\n getContractNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getOperationNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getBlackOpRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getGeneralActionNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n getSkillNames: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 10,\n startAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n stopBladeburnerAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 2,\n getCurrentAction: RamCostConstants.ScriptBladeburnerApiBaseRamCost / 4,\n getActionTime: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionEstimatedSuccessChance: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionRepGain: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCountRemaining: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionMaxLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionCurrentLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionAutolevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setActionLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getRank: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillPoints: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillLevel: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getSkillUpgradeCost: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n upgradeSkill: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getStamina: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerFaction: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n joinBladeburnerDivision: RamCostConstants.ScriptBladeburnerApiBaseRamCost,\n getBonusTime: 0,\n },\n\n // Coding Contract API\n codingcontract: {\n attempt: RamCostConstants.ScriptCodingContractBaseRamCost,\n getContractType: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getData: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getDescription: RamCostConstants.ScriptCodingContractBaseRamCost / 2,\n getNumTriesRemaining: RamCostConstants.ScriptCodingContractBaseRamCost / 5,\n },\n\n // Duplicate Sleeve API\n sleeve: {\n getNumSleeves: RamCostConstants.ScriptSleeveBaseRamCost,\n setToShockRecovery: RamCostConstants.ScriptSleeveBaseRamCost,\n setToSynchronize: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCommitCrime: RamCostConstants.ScriptSleeveBaseRamCost,\n setToUniversityCourse: RamCostConstants.ScriptSleeveBaseRamCost,\n travel: RamCostConstants.ScriptSleeveBaseRamCost,\n setToCompanyWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToFactionWork: RamCostConstants.ScriptSleeveBaseRamCost,\n setToGymWorkout: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveStats: RamCostConstants.ScriptSleeveBaseRamCost,\n getTask: RamCostConstants.ScriptSleeveBaseRamCost,\n getInformation: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleeveAugmentations: RamCostConstants.ScriptSleeveBaseRamCost,\n getSleevePurchasableAugs: RamCostConstants.ScriptSleeveBaseRamCost,\n purchaseSleeveAug: RamCostConstants.ScriptSleeveBaseRamCost,\n },\n\n stanek: {\n giftWidth: RamCostConstants.ScriptStanekWidth,\n giftHeight: RamCostConstants.ScriptStanekHeight,\n chargeFragment: RamCostConstants.ScriptStanekCharge,\n fragmentDefinitions: RamCostConstants.ScriptStanekFragmentDefinitions,\n activeFragments: RamCostConstants.ScriptStanekPlacedFragments,\n clearGift: RamCostConstants.ScriptStanekClear,\n canPlaceFragment: RamCostConstants.ScriptStanekCanPlace,\n placeFragment: RamCostConstants.ScriptStanekPlace,\n getFragment: RamCostConstants.ScriptStanekFragmentAt,\n removeFragment: RamCostConstants.ScriptStanekDeleteAt,\n },\n\n ui: {\n getTheme: 0,\n setTheme: 0,\n resetTheme: 0,\n getStyles: 0,\n setStyles: 0,\n resetStyles: 0,\n getGameInfo: 0,\n },\n\n grafting: {\n getAugmentationGraftPrice: 3.75,\n getAugmentationGraftTime: 3.75,\n graftAugmentation: 7.5,\n },\n\n heart: {\n // Easter egg function\n break: 0,\n },\n};\n\nexport function getRamCost(player: IPlayer, ...args: string[]): number {\n if (args.length === 0) {\n console.warn(`No arguments passed to getRamCost()`);\n return 0;\n }\n\n let curr = RamCosts[args[0]];\n for (let i = 1; i < args.length; ++i) {\n if (curr == null) {\n console.warn(`Invalid function passed to getRamCost: ${args}`);\n return 0;\n }\n\n const currType = typeof curr;\n if (currType === \"function\" || currType === \"number\") {\n break;\n }\n\n curr = curr[args[i]];\n }\n\n if (typeof curr === \"number\") {\n return curr;\n }\n\n if (typeof curr === \"function\") {\n return curr(player);\n }\n\n console.warn(`Unexpected type (${curr}) for value [${args}]`);\n return 0;\n}\n","export enum AugmentationNames {\n Targeting1 = \"Augmented Targeting I\",\n Targeting2 = \"Augmented Targeting II\",\n Targeting3 = \"Augmented Targeting III\",\n SyntheticHeart = \"Synthetic Heart\",\n SynfibrilMuscle = \"Synfibril Muscle\",\n CombatRib1 = \"Combat Rib I\",\n CombatRib2 = \"Combat Rib II\",\n CombatRib3 = \"Combat Rib III\",\n NanofiberWeave = \"Nanofiber Weave\",\n SubdermalArmor = \"NEMEAN Subdermal Weave\",\n WiredReflexes = \"Wired Reflexes\",\n GrapheneBoneLacings = \"Graphene Bone Lacings\",\n BionicSpine = \"Bionic Spine\",\n GrapheneBionicSpine = \"Graphene Bionic Spine Upgrade\",\n BionicLegs = \"Bionic Legs\",\n GrapheneBionicLegs = \"Graphene Bionic Legs Upgrade\",\n SpeechProcessor = \"Speech Processor Implant\",\n TITN41Injection = \"TITN-41 Gene-Modification Injection\",\n EnhancedSocialInteractionImplant = \"Enhanced Social Interaction Implant\",\n BitWire = \"BitWire\",\n ArtificialBioNeuralNetwork = \"Artificial Bio-neural Network Implant\",\n ArtificialSynapticPotentiation = \"Artificial Synaptic Potentiation\",\n EnhancedMyelinSheathing = \"Enhanced Myelin Sheathing\",\n SynapticEnhancement = \"Synaptic Enhancement Implant\",\n NeuralRetentionEnhancement = \"Neural-Retention Enhancement\",\n DataJack = \"DataJack\",\n ENM = \"Embedded Netburner Module\",\n ENMCore = \"Embedded Netburner Module Core Implant\",\n ENMCoreV2 = \"Embedded Netburner Module Core V2 Upgrade\",\n ENMCoreV3 = \"Embedded Netburner Module Core V3 Upgrade\",\n ENMAnalyzeEngine = \"Embedded Netburner Module Analyze Engine\",\n ENMDMA = \"Embedded Netburner Module Direct Memory Access Upgrade\",\n Neuralstimulator = \"Neuralstimulator\",\n NeuralAccelerator = \"Neural Accelerator\",\n CranialSignalProcessorsG1 = \"Cranial Signal Processors - Gen I\",\n CranialSignalProcessorsG2 = \"Cranial Signal Processors - Gen II\",\n CranialSignalProcessorsG3 = \"Cranial Signal Processors - Gen III\",\n CranialSignalProcessorsG4 = \"Cranial Signal Processors - Gen IV\",\n CranialSignalProcessorsG5 = \"Cranial Signal Processors - Gen V\",\n NeuronalDensification = \"Neuronal Densification\",\n NeuroreceptorManager = \"Neuroreceptor Management Implant\",\n NuoptimalInjectorImplant = \"Nuoptimal Nootropic Injector Implant\",\n SpeechEnhancement = \"Speech Enhancement\",\n FocusWire = \"FocusWire\",\n PCDNI = \"PC Direct-Neural Interface\",\n PCDNIOptimizer = \"PC Direct-Neural Interface Optimization Submodule\",\n PCDNINeuralNetwork = \"PC Direct-Neural Interface NeuroNet Injector\",\n PCMatrix = \"PCMatrix\",\n ADRPheromone1 = \"ADR-V1 Pheromone Gene\",\n ADRPheromone2 = \"ADR-V2 Pheromone Gene\",\n ShadowsSimulacrum = \"The Shadow's Simulacrum\",\n HacknetNodeCPUUpload = \"Hacknet Node CPU Architecture Neural-Upload\",\n HacknetNodeCacheUpload = \"Hacknet Node Cache Architecture Neural-Upload\",\n HacknetNodeNICUpload = \"Hacknet Node NIC Architecture Neural-Upload\",\n HacknetNodeKernelDNI = \"Hacknet Node Kernel Direct-Neural Interface\",\n HacknetNodeCoreDNI = \"Hacknet Node Core Direct-Neural Interface\",\n NeuroFluxGovernor = \"NeuroFlux Governor\",\n Neurotrainer1 = \"Neurotrainer I\",\n Neurotrainer2 = \"Neurotrainer II\",\n Neurotrainer3 = \"Neurotrainer III\",\n Hypersight = \"HyperSight Corneal Implant\",\n LuminCloaking1 = \"LuminCloaking-V1 Skin Implant\",\n LuminCloaking2 = \"LuminCloaking-V2 Skin Implant\",\n HemoRecirculator = \"HemoRecirculator\",\n SmartSonar = \"SmartSonar Implant\",\n PowerRecirculator = \"Power Recirculation Core\",\n QLink = \"QLink\",\n TheRedPill = \"The Red Pill\",\n SPTN97 = \"SPTN-97 Gene Modification\",\n HiveMind = \"ECorp HVMind Implant\",\n CordiARCReactor = \"CordiARC Fusion Reactor\",\n SmartJaw = \"SmartJaw\",\n Neotra = \"Neotra\",\n Xanipher = \"Xanipher\",\n nextSENS = \"nextSENS Gene Modification\",\n OmniTekInfoLoad = \"OmniTek InfoLoad\",\n PhotosyntheticCells = \"Photosynthetic Cells\",\n Neurolink = \"BitRunners Neurolink\",\n TheBlackHand = \"The Black Hand\",\n UnstableCircadianModulator = \"Unstable Circadian Modulator\",\n CRTX42AA = \"CRTX42-AA Gene Modification\",\n Neuregen = \"Neuregen Gene Modification\",\n CashRoot = \"CashRoot Starter Kit\",\n NutriGen = \"NutriGen Implant\",\n INFRARet = \"INFRARET Enhancement\",\n DermaForce = \"DermaForce Particle Barrier\",\n GrapheneBrachiBlades = \"Graphene BrachiBlades Upgrade\",\n GrapheneBionicArms = \"Graphene Bionic Arms Upgrade\",\n BrachiBlades = \"BrachiBlades\",\n BionicArms = \"Bionic Arms\",\n SNA = \"Social Negotiation Assistant (S.N.A)\",\n HydroflameLeftArm = \"Hydroflame Left Arm\",\n EsperEyewear = \"EsperTech Bladeburner Eyewear\",\n EMS4Recombination = \"EMS-4 Recombination\",\n OrionShoulder = \"ORION-MKIV Shoulder\",\n HyperionV1 = \"Hyperion Plasma Cannon V1\",\n HyperionV2 = \"Hyperion Plasma Cannon V2\",\n GolemSerum = \"GOLEM Serum\",\n VangelisVirus = \"Vangelis Virus\",\n VangelisVirus3 = \"Vangelis Virus 3.0\",\n INTERLINKED = \"I.N.T.E.R.L.I.N.K.E.D\",\n BladeRunner = \"Blade's Runners\",\n BladeArmor = \"BLADE-51b Tesla Armor\",\n BladeArmorPowerCells = \"BLADE-51b Tesla Armor: Power Cells Upgrade\",\n BladeArmorEnergyShielding = \"BLADE-51b Tesla Armor: Energy Shielding Upgrade\",\n BladeArmorUnibeam = \"BLADE-51b Tesla Armor: Unibeam Upgrade\",\n BladeArmorOmnibeam = \"BLADE-51b Tesla Armor: Omnibeam Upgrade\",\n BladeArmorIPU = \"BLADE-51b Tesla Armor: IPU Upgrade\",\n BladesSimulacrum = \"The Blade's Simulacrum\",\n\n StaneksGift1 = \"Stanek's Gift - Genesis\",\n StaneksGift2 = \"Stanek's Gift - Awakening\",\n StaneksGift3 = \"Stanek's Gift - Serenity\",\n\n //Wasteland Augs\n //PepBoy: \"P.E.P-Boy\", Plasma Energy Projection System\n //PepBoyForceField Generates plasma force fields\n //PepBoyBlasts Generate high density plasma concussive blasts\n //PepBoyDataStorage STore more data on pep boy,\n}\n","import { AlertEvents } from \"./AlertManager\";\n\nimport React from \"react\";\nimport { SxProps } from \"@mui/system\";\nimport { Typography } from \"@mui/material\";\n\nexport function dialogBoxCreate(txt: string | JSX.Element, styles?: SxProps): void {\n if (typeof txt !== \"string\") {\n AlertEvents.emit(txt);\n } else {\n AlertEvents.emit();\n }\n}\n","/**\n * All possible Cities in the game. Names only, not actual \"City\" object\n * Implemented as an enum for typing purposes\n */\nexport enum CityName {\n Aevum = \"Aevum\",\n Chongqing = \"Chongqing\",\n Ishima = \"Ishima\",\n NewTokyo = \"New Tokyo\",\n Sector12 = \"Sector-12\",\n Volhaven = \"Volhaven\",\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number | string;\n player?: IPlayer;\n}\nexport function Money(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (props.player !== undefined) {\n if (typeof props.money !== \"number\") throw new Error(\"if player if provided, money should be number, contact dev\");\n if (!props.player.canAfford(props.money))\n return {numeralWrapper.formatMoney(props.money)};\n }\n return (\n \n {typeof props.money === \"number\" ? numeralWrapper.formatMoney(props.money) : props.money}\n \n );\n}\n","import { EqualityFunc } from \"../types\";\nimport { isString } from \"./helpers/isString\";\n\n/*\nConverts a date representing time in milliseconds to a string with the format H hours M minutes and S seconds\ne.g. 10000 -> \"10 seconds\"\n 120000 -> \"2 minutes and 0 seconds\"\n*/\nfunction convertTimeMsToTimeElapsedString(time: number, showMilli = false): string {\n time = Math.floor(time);\n const millisecondsPerSecond = 1000;\n const secondPerMinute = 60;\n const minutesPerHours = 60;\n const secondPerHours: number = secondPerMinute * minutesPerHours;\n const hoursPerDays = 24;\n const secondPerDay: number = secondPerHours * hoursPerDays;\n\n // Convert ms to seconds, since we only have second-level precision\n const totalSeconds: number = Math.floor(time / millisecondsPerSecond);\n\n const days: number = Math.floor(totalSeconds / secondPerDay);\n const secTruncDays: number = totalSeconds % secondPerDay;\n\n const hours: number = Math.floor(secTruncDays / secondPerHours);\n const secTruncHours: number = secTruncDays % secondPerHours;\n\n const minutes: number = Math.floor(secTruncHours / secondPerMinute);\n const secTruncMinutes: number = secTruncHours % secondPerMinute;\n\n const milliTruncSec: string = (() => {\n let str = `${time % millisecondsPerSecond}`;\n while (str.length < 3) str = \"0\" + str;\n return str;\n })();\n\n const seconds: string = showMilli ? `${secTruncMinutes}.${milliTruncSec}` : `${secTruncMinutes}`;\n\n let res = \"\";\n if (days > 0) {\n res += `${days} days `;\n }\n if (hours > 0) {\n res += `${hours} hours `;\n }\n if (minutes > 0) {\n res += `${minutes} minutes `;\n }\n res += `${seconds} seconds`;\n\n return res;\n}\n\n// Finds the longest common starting substring in a set of strings\nfunction longestCommonStart(strings: string[]): string {\n if (!containsAllStrings(strings)) {\n return \"\";\n }\n if (strings.length === 0) {\n return \"\";\n }\n\n const A: string[] = strings.concat().sort();\n const a1: string = A[0];\n const a2: string = A[A.length - 1];\n const L: number = a1.length;\n let i = 0;\n const areEqualCaseInsensitive: EqualityFunc = (a: string, b: string) => a.toUpperCase() === b.toUpperCase();\n while (i < L && areEqualCaseInsensitive(a1.charAt(i), a2.charAt(i))) {\n i++;\n }\n\n return a1.substring(0, i);\n}\n\n// Returns whether an array contains entirely of string objects\nfunction containsAllStrings(arr: string[]): boolean {\n return arr.every(isString);\n}\n\n// Formats a number with commas and a specific number of decimal digits\nfunction formatNumber(num: number, numFractionDigits = 0): string {\n return num.toLocaleString(undefined, {\n maximumFractionDigits: numFractionDigits,\n minimumFractionDigits: numFractionDigits,\n });\n}\n\n// Generates a random alphanumeric string with N characters\nfunction generateRandomString(n: number): string {\n let str = \"\";\n const chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\n for (let i = 0; i < n; i++) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n\n/**\n * Hashes the input string. This is a fast hash, so NOT good for cryptography.\n * This has been ripped off here: https://stackoverflow.com/a/52171480\n * @param str The string that is to be hashed\n * @param seed A seed to randomize the result\n * @returns An hexadecimal string representation of the hashed input\n */\nfunction cyrb53(str: string, seed = 0): string {\n let h1 = 0xdeadbeef ^ seed;\n let h2 = 0x41c6ce57 ^ seed;\n for (let i = 0, ch; i < str.length; i++) {\n ch = str.charCodeAt(i);\n h1 = Math.imul(h1 ^ ch, 2654435761);\n h2 = Math.imul(h2 ^ ch, 1597334677);\n }\n h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);\n h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);\n return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(16);\n}\n\nexport {\n convertTimeMsToTimeElapsedString,\n longestCommonStart,\n containsAllStrings,\n formatNumber,\n generateRandomString,\n cyrb53,\n};\n","/* Generic Reviver, toJSON, and fromJSON functions used for saving and loading objects */\n\nimport { validateObject } from \"./Validator\";\n\ninterface IReviverValue {\n ctor: string;\n data: any;\n}\n\n// A generic \"smart reviver\" function.\n// Looks for object values with a `ctor` property and\n// a `data` property. If it finds them, and finds a matching\n// constructor that has a `fromJSON` property on it, it hands\n// off to that `fromJSON` fuunction, passing in the value.\nexport function Reviver(key: string, value: IReviverValue | null): any {\n if (value == null) {\n return null;\n }\n\n if (typeof value === \"object\" && typeof value.ctor === \"string\" && typeof value.data !== \"undefined\") {\n // Compatibility for version v0.43.1\n // TODO Remove this eventually\n if (value.ctor === \"AllServersMap\") {\n console.warn(\"Converting AllServersMap for v0.43.1\");\n return value.data;\n }\n\n const ctor = Reviver.constructors[value.ctor];\n\n if (typeof ctor === \"function\" && typeof ctor.fromJSON === \"function\") {\n const obj = ctor.fromJSON(value);\n if (ctor.validationData !== undefined) {\n validateObject(obj, ctor.validationData);\n }\n return obj;\n }\n }\n return value;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport namespace Reviver {\n export const constructors: { [key: string]: any } = {};\n}\n\n// A generic \"toJSON\" function that creates the data expected\n// by Reviver.\n// `ctorName` The name of the constructor to use to revive it\n// `obj` The object being serialized\n// `keys` (Optional) Array of the properties to serialize,\n// if not given then all of the objects \"own\" properties\n// that don't have function values will be serialized.\n// (Note: If you list a property in `keys`, it will be serialized\n// regardless of whether it's an \"own\" property.)\n// Returns: The structure (which will then be turned into a string\n// as part of the JSON.stringify algorithm)\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_toJSON(ctorName: string, obj: any, keys?: string[]): IReviverValue {\n if (!keys) {\n keys = Object.keys(obj); // Only \"own\" properties are included\n }\n\n const data: any = {};\n for (let index = 0; index < keys.length; ++index) {\n const key = keys[index];\n data[key] = obj[key];\n }\n return { ctor: ctorName, data: data };\n}\n\n// A generic \"fromJSON\" function for use with Reviver: Just calls the\n// constructor function with no arguments, then applies all of the\n// key/value pairs from the raw data to the instance. Only useful for\n// constructors that can be reasonably called without arguments!\n// `ctor` The constructor to call\n// `data` The data to apply\n// Returns: The object\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function Generic_fromJSON(ctor: new () => T, data: any): T {\n const obj: any = new ctor();\n for (const name in data) {\n obj[name] = data[name];\n }\n return obj;\n}\n","import { Server } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { serverMetadata } from \"./data/servers\";\n\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\n\nimport { IMap } from \"../types\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Reviver } from \"../utils/JSONReviver\";\nimport { isValidIPAddress } from \"../utils/helpers/isValidIPAddress\";\nimport { SpecialServers } from \"./data/SpecialServers\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\n/**\n * Map of all Servers that exist in the game\n * Key (string) = IP\n * Value = Server object\n */\nlet AllServers: IMap = {};\n\nfunction GetServerByIP(ip: string): BaseServer | undefined {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== ip) continue;\n return server;\n }\n}\n\n//Returns server object with corresponding hostname\n// Relatively slow, would rather not use this a lot\nfunction GetServerByHostname(hostname: string): BaseServer | null {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.hostname == hostname) {\n return server;\n }\n }\n\n return null;\n}\n\n//Get server by IP or hostname. Returns null if invalid\nexport function GetServer(s: string): BaseServer | null {\n if (AllServers.hasOwnProperty(s)) {\n const server = AllServers[s];\n if (server) return server;\n }\n\n if (!isValidIPAddress(s)) {\n return GetServerByHostname(s);\n }\n\n const ipserver = GetServerByIP(s);\n if (ipserver !== undefined) {\n return ipserver;\n }\n\n return null;\n}\n\nexport function GetAllServers(): BaseServer[] {\n const servers: BaseServer[] = [];\n for (const key of Object.keys(AllServers)) {\n servers.push(AllServers[key]);\n }\n return servers;\n}\n\nexport function DeleteServer(serverkey: string): void {\n for (const key of Object.keys(AllServers)) {\n const server = AllServers[key];\n if (server.ip !== serverkey && server.hostname !== serverkey) continue;\n delete AllServers[key];\n break;\n }\n}\n\nexport function ipExists(ip: string): boolean {\n return AllServers[ip] != null;\n}\n\nexport function createUniqueRandomIp(): string {\n let ip: string;\n // Repeat generating ip, until unique one is found\n do {\n ip = createRandomIp();\n } while (ipExists(ip));\n\n return ip;\n}\n\n// Saftely add a Server to the AllServers map\nexport function AddToAllServers(server: Server | HacknetServer): void {\n if (GetServer(server.hostname)) {\n console.warn(`Hostname of the server thats being added: ${server.hostname}`);\n console.warn(`The server that already has this IP is: ${AllServers[server.hostname].hostname}`);\n throw new Error(\"Error: Trying to add a server with an existing IP\");\n }\n\n AllServers[server.hostname] = server;\n}\n\ninterface IServerParams {\n hackDifficulty?: number;\n hostname: string;\n ip: string;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired: number;\n organizationName: string;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n\n [key: string]: any;\n}\n\nexport function initForeignServers(homeComputer: Server): void {\n /* Create a randomized network for all the foreign servers */\n //Groupings for creating a randomized network\n const networkLayers: Server[][] = [];\n for (let i = 0; i < 15; i++) {\n networkLayers.push([]);\n }\n\n // Essentially any property that is of type 'number | IMinMaxRange'\n const propertiesToPatternMatch: string[] = [\n \"hackDifficulty\",\n \"moneyAvailable\",\n \"requiredHackingSkill\",\n \"serverGrowth\",\n ];\n\n const toNumber = (value: any): any => {\n switch (typeof value) {\n case \"number\":\n return value;\n case \"object\":\n return getRandomInt(value.min, value.max);\n default:\n throw Error(`Do not know how to convert the type '${typeof value}' to a number`);\n }\n };\n\n for (const metadata of serverMetadata) {\n const serverParams: IServerParams = {\n hostname: metadata.hostname,\n ip: createUniqueRandomIp(),\n numOpenPortsRequired: metadata.numOpenPortsRequired,\n organizationName: metadata.organizationName,\n };\n\n if (metadata.maxRamExponent !== undefined) {\n serverParams.maxRam = Math.pow(2, toNumber(metadata.maxRamExponent));\n }\n\n for (const prop of propertiesToPatternMatch) {\n if (metadata[prop] !== undefined) {\n serverParams[prop] = toNumber(metadata[prop]);\n }\n }\n\n const server = new Server(serverParams);\n for (const filename of metadata.literature || []) {\n server.messages.push(filename);\n }\n\n if (server.hostname === SpecialServers.WorldDaemon) {\n server.requiredHackingSkill *= BitNodeMultipliers.WorldDaemonDifficulty;\n }\n AddToAllServers(server);\n if (metadata.networkLayer !== undefined) {\n networkLayers[toNumber(metadata.networkLayer) - 1].push(server);\n }\n }\n\n /* Create a randomized network for all the foreign servers */\n const linkComputers = (server1: Server, server2: Server): void => {\n server1.serversOnNetwork.push(server2.hostname);\n server2.serversOnNetwork.push(server1.hostname);\n };\n\n const getRandomArrayItem = (arr: any[]): any => arr[Math.floor(Math.random() * arr.length)];\n\n const linkNetworkLayers = (network1: Server[], selectServer: () => Server): void => {\n for (const server of network1) {\n linkComputers(server, selectServer());\n }\n };\n\n // Connect the first tier of servers to the player's home computer\n linkNetworkLayers(networkLayers[0], () => homeComputer);\n for (let i = 1; i < networkLayers.length; i++) {\n linkNetworkLayers(networkLayers[i], () => getRandomArrayItem(networkLayers[i - 1]));\n }\n}\n\nexport function prestigeAllServers(): void {\n for (const member of Object.keys(AllServers)) {\n delete AllServers[member];\n }\n AllServers = {};\n}\n\nexport function loadAllServers(saveString: string): void {\n AllServers = JSON.parse(saveString, Reviver);\n}\n\nexport function saveAllServers(excludeRunningScripts = false): string {\n const TempAllServers = JSON.parse(JSON.stringify(AllServers), Reviver);\n for (const key of Object.keys(TempAllServers)) {\n const server = TempAllServers[key];\n if (excludeRunningScripts) {\n server.runningScripts = [];\n continue;\n }\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScriptObj = server.runningScripts[i];\n runningScriptObj.logs.length = 0;\n runningScriptObj.logs = [];\n }\n }\n\n return JSON.stringify(TempAllServers);\n}\n","import { Faction } from \"../Faction/Faction\";\nimport { Location } from \"../Locations/Location\";\n\n/**\n * The full-screen page the player is currently be on.\n * These pages are mutually exclusive.\n */\nexport enum Page {\n ActiveScripts,\n Augmentations,\n BitVerse,\n Bladeburner,\n City,\n Corporation,\n CreateProgram,\n ScriptEditor,\n DevMenu,\n Faction,\n Factions,\n Gang,\n Hacknet,\n Infiltration,\n Job,\n Milestones,\n Options,\n Grafting,\n Sleeves,\n Stats,\n StockMarket,\n Terminal,\n Travel,\n Tutorial,\n Work,\n BladeburnerCinematic,\n Location,\n Loading,\n StaneksGift,\n Recovery,\n Achievements,\n ThemeBrowser,\n ImportSave,\n}\n\nexport interface ScriptEditorRouteOptions {\n vim: boolean;\n}\n\n/**\n * This class keeps track of player navigation/routing within the game.\n */\nexport interface IRouter {\n // toCinematicText(): void;\n // toInfiltration(): void;\n // toMission(): void;\n // toRedPill(): void;\n // toworkInProgress(): void;\n isInitialized: boolean;\n page(): Page;\n allowRouting(value: boolean): void;\n toActiveScripts(): void;\n toAugmentations(): void;\n toBitVerse(flume: boolean, quick: boolean): void;\n toBladeburner(): void;\n toStats(): void;\n toCity(): void; // travel ? city ?\n toCorporation(): void;\n toCreateProgram(): void;\n toDevMenu(): void;\n toFaction(faction: Faction, augPage?: boolean): void; // faction name\n toFactions(): void;\n toGameOptions(): void;\n toGang(): void;\n toHacknetNodes(): void;\n toInfiltration(location: Location): void;\n toJob(): void;\n toMilestones(): void;\n toGrafting(): void;\n toScriptEditor(files?: Record, options?: ScriptEditorRouteOptions): void;\n toSleeves(): void;\n toStockMarket(): void;\n toTerminal(): void;\n toTravel(): void;\n toTutorial(): void;\n toWork(): void;\n toBladeburnerCinematic(): void;\n toLocation(location: Location): void;\n toStaneksGift(): void;\n toAchievements(): void;\n toThemeBrowser(): void;\n toImportSave(base64Save: string, automatic?: boolean): void;\n}\n","/**\n * Keyboard key codes\n */\nexport enum KEY {\n //SHIFT: 16, // Check by `&& event.shiftKey`\n //CTRL: 17, // Check by `&& event.ctrlKey`\n //ALT: 18, // Check by `&& event.altKey`\n ENTER = \"Enter\",\n ESC = \"Escape\",\n TAB = \"Tab\",\n SPACE = \" \",\n BACKSPACE = \"Backspace\",\n UP_ARROW = \"ArrowUp\",\n DOWN_ARROW = \"ArrowDown\",\n LEFT_ARROW = \"ArrowLeft\",\n RIGHT_ARROW = \"ArrowRight\",\n\n QUOTE = \"'\",\n DOUBLE_QUOTE = '\"',\n OPEN_BRACKET = \"[\",\n CLOSE_BRACKET = \"]\",\n LESS_THAN = \"<\",\n GREATER_THAN = \">\",\n OPEN_PARENTHESIS = \"(\",\n CLOSE_PARENTHESIS = \")\",\n OPEN_BRACE = \"{\",\n CLOSE_BRACE = \"}\",\n\n PIPE = \"|\",\n DOT = \".\",\n FORWARD_SLASH = \"/\",\n HYPHEN = \"-\",\n HASH = \"#\",\n\n k0 = \"0\",\n k1 = \"1\",\n k2 = \"2\",\n k3 = \"3\",\n k4 = \"4\",\n k5 = \"5\",\n k6 = \"6\",\n k7 = \"7\",\n k8 = \"8\",\n k9 = \"9\",\n\n A = \"a\",\n B = \"b\",\n C = \"c\",\n D = \"d\",\n E = \"e\",\n F = \"f\",\n G = \"g\",\n H = \"h\",\n I = \"i\",\n J = \"j\",\n K = \"k\",\n L = \"l\",\n M = \"m\",\n N = \"n\",\n O = \"o\",\n P = \"p\",\n Q = \"q\",\n R = \"r\",\n S = \"s\",\n T = \"t\",\n U = \"u\",\n V = \"v\",\n W = \"w\",\n X = \"x\",\n Y = \"y\",\n Z = \"z\",\n}\n","/**\n * Initialization and manipulation of the Factions object, which stores data\n * about all Factions in the game\n */\nimport { Faction } from \"./Faction\";\nimport { FactionInfos } from \"./FactionInfo\";\n\nimport { IMap } from \"../types\";\n\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Factions: IMap = {};\n\nexport function loadFactions(saveString: string): void {\n Factions = JSON.parse(saveString, Reviver);\n // safety check for when we load older save file that don't have newer factions\n for (const faction of Object.keys(Factions)) {\n try {\n Factions[faction].getInfo();\n } catch (err) {\n console.error(\"deleting \" + faction);\n delete Factions[faction];\n }\n }\n}\n\nfunction AddToFactions(faction: Faction): void {\n const name: string = faction.name;\n Factions[name] = faction;\n}\n\nexport function factionExists(name: string): boolean {\n return Factions.hasOwnProperty(name);\n}\n\nexport function initFactions(): void {\n for (const name of Object.keys(FactionInfos)) {\n resetFaction(new Faction(name));\n }\n}\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\nfunction resetFaction(newFactionObject: Faction): void {\n if (!(newFactionObject instanceof Faction)) {\n throw new Error(\"Invalid argument 'newFactionObject' passed into resetFaction()\");\n }\n const factionName: string = newFactionObject.name;\n if (factionExists(factionName)) {\n newFactionObject.favor = Factions[factionName].favor;\n delete Factions[factionName];\n }\n AddToFactions(newFactionObject);\n}\n","import React, { useContext } from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"./Router\";\n\nexport const Context: {\n Player: React.Context;\n Router: React.Context;\n} = {\n Player: React.createContext({} as IPlayer),\n Router: React.createContext({} as IRouter),\n};\n\nexport const use: {\n Player: () => IPlayer;\n Router: () => IRouter;\n} = {\n Player: () => useContext(Context.Player),\n Router: () => useContext(Context.Router),\n};\n","// Defs for job titles, stored in arrays and categorized by job \"type\"\n\nexport const SoftwareCompanyPositions: string[] = [\n \"Software Engineering Intern\",\n \"Junior Software Engineer\",\n \"Senior Software Engineer\",\n \"Lead Software Developer\",\n \"Head of Software\",\n \"Head of Engineering\",\n \"Vice President of Technology\",\n \"Chief Technology Officer\",\n];\n\nexport const ITCompanyPositions: string[] = [\"IT Intern\", \"IT Analyst\", \"IT Manager\", \"Systems Administrator\"];\n\nexport const SecurityEngineerCompanyPositions: string[] = [\"Security Engineer\"];\n\nexport const NetworkEngineerCompanyPositions: string[] = [\"Network Engineer\", \"Network Administrator\"];\n\nexport const BusinessCompanyPositions: string[] = [\n \"Business Intern\",\n \"Business Analyst\",\n \"Business Manager\",\n \"Operations Manager\",\n \"Chief Financial Officer\",\n \"Chief Executive Officer\",\n];\n\nexport const SecurityCompanyPositions: string[] = [\n \"Police Officer\",\n \"Police Chief\",\n \"Security Guard\",\n \"Security Officer\",\n \"Security Supervisor\",\n \"Head of Security\",\n];\n\nexport const AgentCompanyPositions: string[] = [\"Field Agent\", \"Secret Agent\", \"Special Operative\"];\n\nexport const MiscCompanyPositions: string[] = [\"Waiter\", \"Employee\"];\n\nexport const SoftwareConsultantCompanyPositions: string[] = [\"Software Consultant\", \"Senior Software Consultant\"];\n\nexport const BusinessConsultantCompanyPositions: string[] = [\"Business Consultant\", \"Senior Business Consultant\"];\n\nexport const PartTimeCompanyPositions: string[] = [\"Part-time Waiter\", \"Part-time Employee\"];\n","/**\n * Gets a random integer bounded by the values passed in.\n * @param min The minimum value in the range.\n * @param max The maximum value in the range.\n */\nexport function getRandomInt(min: number, max: number): number {\n const lower: number = Math.min(min, max);\n const upper: number = Math.max(min, max);\n\n return Math.floor(Math.random() * (upper - lower + 1)) + lower;\n}\n","import { CityName } from './../../Locations/data/CityNames';\nconst CyclesPerMarketCycle = 50;\nconst AllCorporationStates = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\nexport const CorporationConstants: {\n INITIALSHARES: number;\n SHARESPERPRICEUPDATE: number;\n IssueNewSharesCooldown: number;\n SellSharesCooldown: number;\n CyclesPerMarketCycle: number;\n CyclesPerIndustryStateCycle: number;\n SecsPerMarketCycle: number;\n Cities: string[];\n WarehouseInitialCost: number;\n WarehouseInitialSize: number;\n WarehouseUpgradeBaseCost: number;\n OfficeInitialCost: number;\n OfficeInitialSize: number;\n OfficeUpgradeBaseCost: number;\n BribeThreshold: number;\n BribeToRepRatio: number;\n ProductProductionCostRatio: number;\n DividendMaxPercentage: number;\n EmployeeSalaryMultiplier: number;\n CyclesPerEmployeeRaise: number;\n EmployeeRaiseAmount: number;\n BaseMaxProducts: number;\n AllCorporationStates: string[];\n AllMaterials: string[];\n FundingRoundShares: number[];\n FundingRoundMultiplier: number[];\n} = {\n INITIALSHARES: 1e9, //Total number of shares you have at your company\n SHARESPERPRICEUPDATE: 1e6, //When selling large number of shares, price is dynamically updated for every batch of this amount\n IssueNewSharesCooldown: 216e3, // 12 Hour in terms of game cycles\n SellSharesCooldown: 18e3, // 1 Hour in terms of game cycles\n\n CyclesPerMarketCycle: CyclesPerMarketCycle,\n CyclesPerIndustryStateCycle: CyclesPerMarketCycle / AllCorporationStates.length,\n SecsPerMarketCycle: CyclesPerMarketCycle / 5,\n\n Cities: [CityName.Aevum, CityName.Chongqing, CityName.Sector12, CityName.NewTokyo, CityName.Ishima, CityName.Volhaven],\n\n WarehouseInitialCost: 5e9, //Initial purchase cost of warehouse\n WarehouseInitialSize: 100,\n WarehouseUpgradeBaseCost: 1e9,\n\n OfficeInitialCost: 4e9,\n OfficeInitialSize: 3,\n OfficeUpgradeBaseCost: 1e9,\n\n BribeThreshold: 100e12, //Money needed to be able to bribe for faction rep\n BribeToRepRatio: 1e9, //Bribe Value divided by this = rep gain\n\n ProductProductionCostRatio: 5, //Ratio of material cost of a product to its production cost\n\n DividendMaxPercentage: 1,\n\n EmployeeSalaryMultiplier: 3, // Employee stats multiplied by this to determine initial salary\n CyclesPerEmployeeRaise: 400, // All employees get a raise every X market cycles\n EmployeeRaiseAmount: 50, // Employee salary increases by this (additive)\n\n BaseMaxProducts: 3, // Initial value for maximum number of products allowed\n AllCorporationStates: AllCorporationStates,\n AllMaterials: [\n \"Water\",\n \"Energy\",\n \"Food\",\n \"Plants\",\n \"Metal\",\n \"Hardware\",\n \"Chemicals\",\n \"Drugs\",\n \"Robots\",\n \"AI Cores\",\n \"Real Estate\",\n ],\n FundingRoundShares: [\n 0.1,\n 0.35,\n 0.25,\n 0.2\n ],\n FundingRoundMultiplier: [\n 4,\n 3,\n 3,\n 2.5\n ],\n};\n","export const HacknetNodeConstants: {\n // Constants for Hacknet Node production\n MoneyGainPerLevel: number;\n\n // Constants for Hacknet Node purchase/upgrade costs\n BaseCost: number;\n LevelBaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n\n PurchaseNextMult: number;\n UpgradeLevelMult: number;\n UpgradeRamMult: number;\n UpgradeCoreMult: number;\n\n // Constants for max upgrade levels for Hacknet Nodes\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n} = {\n MoneyGainPerLevel: 1.5,\n\n BaseCost: 1000,\n LevelBaseCost: 1,\n RamBaseCost: 30e3,\n CoreBaseCost: 500e3,\n\n PurchaseNextMult: 1.85,\n UpgradeLevelMult: 1.04,\n UpgradeRamMult: 1.28,\n UpgradeCoreMult: 1.48,\n\n MaxLevel: 200,\n MaxRam: 64,\n MaxCores: 16,\n};\n\nexport const PurchaseMultipliers: {\n [key: string]: number | \"MAX\" | undefined;\n x1: number;\n x5: number;\n x10: number;\n MAX: \"MAX\";\n} = {\n x1: 1,\n x5: 5,\n x10: 10,\n MAX: \"MAX\",\n};\n\nexport const HacknetServerConstants: {\n // Constants for Hacknet Server stats/production\n HashesPerLevel: number;\n\n // Constants for Hacknet Server purchase/upgrade costs\n BaseCost: number;\n RamBaseCost: number;\n CoreBaseCost: number;\n CacheBaseCost: number;\n\n PurchaseMult: number; // Multiplier for puchasing an additional Hacknet Server\n UpgradeLevelMult: number; // Multiplier for cost when upgrading level\n UpgradeRamMult: number; // Multiplier for cost when upgrading RAM\n UpgradeCoreMult: number; // Multiplier for cost when buying another core\n UpgradeCacheMult: number; // Multiplier for cost when upgrading cache\n MaxServers: number; // Max number of Hacknet Servers you can own\n\n // Constants for max upgrade levels for Hacknet Server\n MaxLevel: number;\n MaxRam: number;\n MaxCores: number;\n MaxCache: number;\n} = {\n HashesPerLevel: 0.001,\n\n BaseCost: 50e3,\n RamBaseCost: 200e3,\n CoreBaseCost: 1e6,\n CacheBaseCost: 10e6,\n\n PurchaseMult: 3.2,\n UpgradeLevelMult: 1.1,\n UpgradeRamMult: 1.4,\n UpgradeCoreMult: 1.55,\n UpgradeCacheMult: 1.85,\n\n MaxServers: 20,\n\n MaxLevel: 300,\n MaxRam: 8192,\n MaxCores: 128,\n MaxCache: 15,\n};\n","// Class definition for a single Augmentation object\nimport * as React from \"react\";\nimport { IMap } from \"../types\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n info: string | JSX.Element;\n stats?: JSX.Element | null;\n isSpecial?: boolean;\n moneyCost: number;\n name: string;\n prereqs?: string[];\n repCost: number;\n factions: string[];\n\n hacking_mult?: number;\n strength_mult?: number;\n defense_mult?: number;\n dexterity_mult?: number;\n agility_mult?: number;\n charisma_mult?: number;\n hacking_exp_mult?: number;\n strength_exp_mult?: number;\n defense_exp_mult?: number;\n dexterity_exp_mult?: number;\n agility_exp_mult?: number;\n charisma_exp_mult?: number;\n hacking_chance_mult?: number;\n hacking_speed_mult?: number;\n hacking_money_mult?: number;\n hacking_grow_mult?: number;\n company_rep_mult?: number;\n faction_rep_mult?: number;\n crime_money_mult?: number;\n crime_success_mult?: number;\n work_money_mult?: number;\n hacknet_node_money_mult?: number;\n hacknet_node_purchase_cost_mult?: number;\n hacknet_node_ram_cost_mult?: number;\n hacknet_node_core_cost_mult?: number;\n hacknet_node_level_cost_mult?: number;\n bladeburner_max_stamina_mult?: number;\n bladeburner_stamina_gain_mult?: number;\n bladeburner_analysis_mult?: number;\n bladeburner_success_chance_mult?: number;\n\n startingMoney?: number;\n programs?: string[];\n}\n\nfunction generateStatsDescription(mults: IMap, programs?: string[], startingMoney?: number): JSX.Element {\n const f = (x: number, decimals = 0): string => {\n // look, I don't know how to make a \"smart decimals\"\n // todo, make it smarter\n if (x === 1.0777 - 1) return \"7.77%\";\n if (x === 1.777 - 1) return \"77.7%\";\n return numeralWrapper.formatPercentage(x, decimals);\n };\n let desc = <>Effects:;\n\n if (\n mults.hacking_mult &&\n mults.hacking_mult == mults.strength_mult &&\n mults.hacking_mult == mults.defense_mult &&\n mults.hacking_mult == mults.dexterity_mult &&\n mults.hacking_mult == mults.agility_mult &&\n mults.hacking_mult == mults.charisma_mult\n ) {\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_mult - 1)} all skills\n \n );\n } else {\n if (mults.hacking_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_mult - 1)} hacking skill\n \n );\n\n if (\n mults.strength_mult &&\n mults.strength_mult == mults.defense_mult &&\n mults.strength_mult == mults.dexterity_mult &&\n mults.strength_mult == mults.agility_mult\n ) {\n desc = (\n <>\n {desc}\n
    +{f(mults.strength_mult - 1)} combat skills\n \n );\n } else {\n if (mults.strength_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.strength_mult - 1)} strength skill\n \n );\n if (mults.defense_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.defense_mult - 1)} defense skill\n \n );\n if (mults.dexterity_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.dexterity_mult - 1)} dexterity skill\n \n );\n if (mults.agility_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.agility_mult - 1)} agility skill\n \n );\n }\n if (mults.charisma_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.charisma_mult - 1)} Charisma skill\n \n );\n }\n\n if (\n mults.hacking_exp_mult &&\n mults.hacking_exp_mult === mults.strength_exp_mult &&\n mults.hacking_exp_mult === mults.defense_exp_mult &&\n mults.hacking_exp_mult === mults.dexterity_exp_mult &&\n mults.hacking_exp_mult === mults.agility_exp_mult &&\n mults.hacking_exp_mult === mults.charisma_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_exp_mult - 1)} exp for all skills\n \n );\n } else {\n if (mults.hacking_exp_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_exp_mult - 1)} hacking exp\n \n );\n\n if (\n mults.strength_exp_mult &&\n mults.strength_exp_mult === mults.defense_exp_mult &&\n mults.strength_exp_mult === mults.dexterity_exp_mult &&\n mults.strength_exp_mult === mults.agility_exp_mult\n ) {\n desc = (\n <>\n {desc}\n
    +{f(mults.strength_exp_mult - 1)} combat exp\n \n );\n } else {\n if (mults.strength_exp_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.strength_exp_mult - 1)} strength exp\n \n );\n if (mults.defense_exp_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.defense_exp_mult - 1)} defense exp\n \n );\n if (mults.dexterity_exp_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.dexterity_exp_mult - 1)} dexterity exp\n \n );\n if (mults.agility_exp_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.agility_exp_mult - 1)} agility exp\n \n );\n }\n if (mults.charisma_exp_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.charisma_exp_mult - 1)} charisma exp\n \n );\n }\n\n if (mults.hacking_speed_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_speed_mult - 1)} faster hack(), grow(), and weaken()\n \n );\n if (mults.hacking_chance_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_chance_mult - 1)} hack() success chance\n \n );\n if (mults.hacking_money_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_money_mult - 1)} hack() power\n \n );\n if (mults.hacking_grow_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.hacking_grow_mult - 1)} grow() power\n \n );\n\n if (mults.faction_rep_mult && mults.faction_rep_mult === mults.company_rep_mult) {\n desc = (\n <>\n {desc}\n
    +{f(mults.faction_rep_mult - 1)} reputation from factions and companies\n \n );\n } else {\n if (mults.faction_rep_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.faction_rep_mult - 1)} reputation from factions\n \n );\n if (mults.company_rep_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.company_rep_mult - 1)} reputation from companies\n \n );\n }\n\n if (mults.crime_money_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.crime_money_mult - 1)} crime money\n \n );\n if (mults.crime_success_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.crime_success_mult - 1)} crime success rate\n \n );\n if (mults.work_money_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.work_money_mult - 1)} work money\n \n );\n\n if (mults.hacknet_node_money_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.hacknet_node_money_mult - 1)} hacknet production\n \n );\n if (mults.hacknet_node_purchase_cost_mult)\n desc = (\n <>\n {desc}\n
    -{f(-(mults.hacknet_node_purchase_cost_mult - 1))} hacknet nodes cost\n \n );\n if (mults.hacknet_node_level_cost_mult)\n desc = (\n <>\n {desc}\n
    -{f(-(mults.hacknet_node_level_cost_mult - 1))} hacknet nodes upgrade cost\n \n );\n\n if (mults.bladeburner_max_stamina_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.bladeburner_max_stamina_mult - 1)} Bladeburner Max Stamina\n \n );\n if (mults.bladeburner_stamina_gain_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.bladeburner_stamina_gain_mult - 1)} Bladeburner Stamina gain\n \n );\n if (mults.bladeburner_analysis_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.bladeburner_analysis_mult - 1)} Bladeburner Field Analysis effectiveness\n \n );\n if (mults.bladeburner_success_chance_mult)\n desc = (\n <>\n {desc}\n
    +{f(mults.bladeburner_success_chance_mult - 1)} Bladeburner Contracts and Operations success chance\n \n );\n\n if (startingMoney)\n desc = (\n <>\n {desc}\n
    \n Start with after installing Augmentations.\n \n );\n\n if (programs)\n desc = (\n <>\n {desc}\n
    \n Start with {programs.join(\" and \")} after installing Augmentations.\n \n );\n return desc;\n}\n\nexport class Augmentation {\n // How much money this costs to buy\n baseCost = 0;\n\n // How much faction reputation is required to unlock this\n baseRepRequirement = 0;\n\n // Description of what this Aug is and what it does\n info: string | JSX.Element;\n\n // Description of the stats, often autogenerated, sometimes manually written.\n stats: JSX.Element | null;\n\n // Any Augmentation not immediately available in BitNode-1 is special (e.g. Bladeburner augs)\n isSpecial = false;\n\n // Augmentation level - for repeatable Augs like NeuroFlux Governor\n level = 0;\n\n // Name of Augmentation\n name = \"\";\n\n // Whether the player owns this Augmentation\n owned = false;\n\n // Array of names of all prerequisites\n prereqs: string[] = [];\n\n // Multipliers given by this Augmentation. Must match the property name in\n // The Player/Person classes\n mults: IMap = {};\n\n // Initial cost. Doesn't change when you purchase multiple Augmentation\n startingCost = 0;\n\n // Factions that offer this aug.\n factions: string[] = [];\n\n constructor(\n params: IConstructorParams = {\n info: \"\",\n moneyCost: 0,\n name: \"\",\n repCost: 0,\n factions: [],\n },\n ) {\n this.name = params.name;\n this.info = params.info;\n this.prereqs = params.prereqs ? params.prereqs : [];\n\n this.baseRepRequirement = params.repCost * BitNodeMultipliers.AugmentationRepCost;\n this.baseCost = params.moneyCost * BitNodeMultipliers.AugmentationMoneyCost;\n this.startingCost = this.baseCost;\n this.factions = params.factions;\n\n if (params.isSpecial) {\n this.isSpecial = true;\n }\n\n this.level = 0;\n\n // Set multipliers\n if (params.hacking_mult) {\n this.mults.hacking_mult = params.hacking_mult;\n }\n if (params.strength_mult) {\n this.mults.strength_mult = params.strength_mult;\n }\n if (params.defense_mult) {\n this.mults.defense_mult = params.defense_mult;\n }\n if (params.dexterity_mult) {\n this.mults.dexterity_mult = params.dexterity_mult;\n }\n if (params.agility_mult) {\n this.mults.agility_mult = params.agility_mult;\n }\n if (params.charisma_mult) {\n this.mults.charisma_mult = params.charisma_mult;\n }\n if (params.hacking_exp_mult) {\n this.mults.hacking_exp_mult = params.hacking_exp_mult;\n }\n if (params.strength_exp_mult) {\n this.mults.strength_exp_mult = params.strength_exp_mult;\n }\n if (params.defense_exp_mult) {\n this.mults.defense_exp_mult = params.defense_exp_mult;\n }\n if (params.dexterity_exp_mult) {\n this.mults.dexterity_exp_mult = params.dexterity_exp_mult;\n }\n if (params.agility_exp_mult) {\n this.mults.agility_exp_mult = params.agility_exp_mult;\n }\n if (params.charisma_exp_mult) {\n this.mults.charisma_exp_mult = params.charisma_exp_mult;\n }\n if (params.hacking_chance_mult) {\n this.mults.hacking_chance_mult = params.hacking_chance_mult;\n }\n if (params.hacking_speed_mult) {\n this.mults.hacking_speed_mult = params.hacking_speed_mult;\n }\n if (params.hacking_money_mult) {\n this.mults.hacking_money_mult = params.hacking_money_mult;\n }\n if (params.hacking_grow_mult) {\n this.mults.hacking_grow_mult = params.hacking_grow_mult;\n }\n if (params.company_rep_mult) {\n this.mults.company_rep_mult = params.company_rep_mult;\n }\n if (params.faction_rep_mult) {\n this.mults.faction_rep_mult = params.faction_rep_mult;\n }\n if (params.crime_money_mult) {\n this.mults.crime_money_mult = params.crime_money_mult;\n }\n if (params.crime_success_mult) {\n this.mults.crime_success_mult = params.crime_success_mult;\n }\n if (params.work_money_mult) {\n this.mults.work_money_mult = params.work_money_mult;\n }\n if (params.hacknet_node_money_mult) {\n this.mults.hacknet_node_money_mult = params.hacknet_node_money_mult;\n }\n if (params.hacknet_node_purchase_cost_mult) {\n this.mults.hacknet_node_purchase_cost_mult = params.hacknet_node_purchase_cost_mult;\n }\n if (params.hacknet_node_ram_cost_mult) {\n this.mults.hacknet_node_ram_cost_mult = params.hacknet_node_ram_cost_mult;\n }\n if (params.hacknet_node_core_cost_mult) {\n this.mults.hacknet_node_core_cost_mult = params.hacknet_node_core_cost_mult;\n }\n if (params.hacknet_node_level_cost_mult) {\n this.mults.hacknet_node_level_cost_mult = params.hacknet_node_level_cost_mult;\n }\n if (params.bladeburner_max_stamina_mult) {\n this.mults.bladeburner_max_stamina_mult = params.bladeburner_max_stamina_mult;\n }\n if (params.bladeburner_stamina_gain_mult) {\n this.mults.bladeburner_stamina_gain_mult = params.bladeburner_stamina_gain_mult;\n }\n if (params.bladeburner_analysis_mult) {\n this.mults.bladeburner_analysis_mult = params.bladeburner_analysis_mult;\n }\n if (params.bladeburner_success_chance_mult) {\n this.mults.bladeburner_success_chance_mult = params.bladeburner_success_chance_mult;\n }\n\n if (params.stats === undefined)\n this.stats = generateStatsDescription(this.mults, params.programs, params.startingMoney);\n else this.stats = params.stats;\n }\n\n // Adds this Augmentation to the specified Factions\n addToFactions(factionList: string[]): void {\n for (let i = 0; i < factionList.length; ++i) {\n const faction: Faction | null = Factions[factionList[i]];\n if (faction == null) {\n console.warn(`In Augmentation.addToFactions(), could not find faction with this name: ${factionList[i]}`);\n continue;\n }\n faction.augmentations.push(this.name);\n }\n }\n\n // Adds this Augmentation to all Factions\n addToAllFactions(): void {\n for (const fac of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(fac)) {\n const facObj: Faction | null = Factions[fac];\n if (facObj == null) {\n console.warn(`Invalid Faction object in addToAllFactions(). Key value: ${fac}`);\n continue;\n }\n if (facObj.getInfo().special) continue;\n facObj.augmentations.push(this.name);\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Augmentation\", this);\n }\n\n // Initiatizes a Augmentation object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Augmentation {\n return Generic_fromJSON(Augmentation, value.data);\n }\n}\n\nReviver.constructors.Augmentation = Augmentation;\n","import React from \"react\";\nimport { Theme } from \"@mui/material\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport M from \"@mui/material/Modal\";\nimport Fade from \"@mui/material/Fade\";\nimport Box from \"@mui/material/Box\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n modal: {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n paper: {\n backgroundColor: theme.palette.background.default,\n border: \"2px solid \" + theme.palette.primary.main,\n boxShadow: `0px 3px 5px -1px ${theme.palette.primary.dark},0px 5px 8px 0px ${theme.palette.primary.dark},0px 1px 14px 0px ${theme.palette.primary.dark}`,\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);\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: React.ReactNode;\n}\n\nexport const Modal = (props: IProps): React.ReactElement => {\n const classes = useStyles();\n return (\n \n \n
    \n {props.children}\n
    \n
    \n \n );\n};\n","// Action Identifier enum\nexport const ActionTypes: {\n [key: string]: number;\n Idle: number;\n Contract: number;\n Operation: number;\n BlackOp: number;\n BlackOperation: number;\n Training: number;\n Recruitment: number;\n FieldAnalysis: number;\n \"Field Analysis\": number;\n Diplomacy: number;\n \"Hyperbolic Regeneration Chamber\": number;\n \"Incite Violence\": number;\n} = {\n Idle: 1,\n Contract: 2,\n Operation: 3,\n BlackOp: 4,\n BlackOperation: 4,\n Training: 5,\n Recruitment: 6,\n FieldAnalysis: 7,\n \"Field Analysis\": 7,\n Diplomacy: 8,\n \"Hyperbolic Regeneration Chamber\": 9,\n \"Incite Violence\": 10,\n};\n","import React from \"react\";\nimport { TableCell as MuiTableCell, TableCellProps, Table as MuiTable, TableProps } from \"@mui/material\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\n\nconst useStyles = makeStyles({\n root: {\n borderBottom: \"none\",\n },\n small: {\n width: \"1px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\nexport const Table: React.FC = (props: TableProps) => {\n return (\n \n );\n};\n","import { Player } from \"./Player\";\n\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { ITutorialEvents } from \"./ui/InteractiveTutorial/ITutorialEvents\";\n\n// Ordered array of keys to Interactive Tutorial Steps\nenum iTutorialSteps {\n Start,\n 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 TerminalGoHome, // Go home before creating a script.\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,\n ActiveScriptsPage,\n ActiveScriptsToTerminal,\n TerminalTailScript,\n GoToHacknetNodesPage,\n HacknetNodesIntroduction,\n HacknetNodesGoToWorldPage,\n WorldDescription,\n TutorialPageInfo,\n End,\n}\n\nconst ITutorial: {\n currStep: iTutorialSteps;\n isRunning: boolean;\n stepIsDone: {\n [iTutorialSteps.Start]: boolean;\n [iTutorialSteps.GoToCharacterPage]: boolean;\n [iTutorialSteps.CharacterPage]: boolean;\n [iTutorialSteps.CharacterGoToTerminalPage]: boolean;\n [iTutorialSteps.TerminalIntro]: boolean;\n [iTutorialSteps.TerminalHelp]: boolean;\n [iTutorialSteps.TerminalLs]: boolean;\n [iTutorialSteps.TerminalScan]: boolean;\n [iTutorialSteps.TerminalScanAnalyze1]: boolean;\n [iTutorialSteps.TerminalScanAnalyze2]: boolean;\n [iTutorialSteps.TerminalConnect]: boolean;\n [iTutorialSteps.TerminalAnalyze]: boolean;\n [iTutorialSteps.TerminalNuke]: boolean;\n [iTutorialSteps.TerminalManualHack]: boolean;\n [iTutorialSteps.TerminalHackingMechanics]: boolean;\n [iTutorialSteps.TerminalGoHome]: boolean;\n [iTutorialSteps.TerminalCreateScript]: boolean;\n [iTutorialSteps.TerminalTypeScript]: boolean;\n [iTutorialSteps.TerminalFree]: boolean;\n [iTutorialSteps.TerminalRunScript]: boolean;\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsPage]: boolean;\n [iTutorialSteps.ActiveScriptsToTerminal]: boolean;\n [iTutorialSteps.TerminalTailScript]: boolean;\n [iTutorialSteps.GoToHacknetNodesPage]: boolean;\n [iTutorialSteps.HacknetNodesIntroduction]: boolean;\n [iTutorialSteps.HacknetNodesGoToWorldPage]: boolean;\n [iTutorialSteps.WorldDescription]: boolean;\n [iTutorialSteps.TutorialPageInfo]: boolean;\n [iTutorialSteps.End]: boolean;\n };\n} = {\n currStep: iTutorialSteps.Start,\n isRunning: false,\n\n // Keeps track of whether each step has been done\n stepIsDone: {\n [iTutorialSteps.Start]: false,\n [iTutorialSteps.GoToCharacterPage]: false,\n [iTutorialSteps.CharacterPage]: false,\n [iTutorialSteps.CharacterGoToTerminalPage]: false,\n [iTutorialSteps.TerminalIntro]: false,\n [iTutorialSteps.TerminalHelp]: false,\n [iTutorialSteps.TerminalLs]: false,\n [iTutorialSteps.TerminalScan]: false,\n [iTutorialSteps.TerminalScanAnalyze1]: false,\n [iTutorialSteps.TerminalScanAnalyze2]: false,\n [iTutorialSteps.TerminalConnect]: false,\n [iTutorialSteps.TerminalAnalyze]: false,\n [iTutorialSteps.TerminalNuke]: false,\n [iTutorialSteps.TerminalManualHack]: false,\n [iTutorialSteps.TerminalHackingMechanics]: false,\n [iTutorialSteps.TerminalGoHome]: false,\n [iTutorialSteps.TerminalCreateScript]: false,\n [iTutorialSteps.TerminalTypeScript]: false,\n [iTutorialSteps.TerminalFree]: false,\n [iTutorialSteps.TerminalRunScript]: false,\n [iTutorialSteps.TerminalGoToActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsPage]: false,\n [iTutorialSteps.ActiveScriptsToTerminal]: false,\n [iTutorialSteps.TerminalTailScript]: false,\n [iTutorialSteps.GoToHacknetNodesPage]: false,\n [iTutorialSteps.HacknetNodesIntroduction]: false,\n [iTutorialSteps.HacknetNodesGoToWorldPage]: false,\n [iTutorialSteps.WorldDescription]: false,\n [iTutorialSteps.TutorialPageInfo]: false,\n [iTutorialSteps.End]: false,\n },\n};\n\nfunction iTutorialStart(): void {\n ITutorial.isRunning = true;\n ITutorial.currStep = iTutorialSteps.Start;\n}\n\n// Go to the next step and evaluate it\nfunction iTutorialNextStep(): void {\n ITutorial.stepIsDone[ITutorial.currStep] = true;\n if (ITutorial.currStep < iTutorialSteps.End) {\n ITutorial.currStep += 1;\n }\n if (ITutorial.currStep === iTutorialSteps.End) iTutorialEnd();\n ITutorialEvents.emit();\n}\n\n// Go to previous step and evaluate\nfunction iTutorialPrevStep(): void {\n if (ITutorial.currStep > iTutorialSteps.Start) {\n ITutorial.currStep -= 1;\n }\n ITutorialEvents.emit();\n}\n\nfunction iTutorialEnd(): void {\n ITutorial.isRunning = false;\n ITutorial.currStep = iTutorialSteps.Start;\n Player.getHomeComputer().messages.push(LiteratureNames.HackersStartingHandbook);\n ITutorialEvents.emit();\n}\n\nexport { iTutorialSteps, iTutorialEnd, iTutorialStart, iTutorialNextStep, ITutorial, iTutorialPrevStep };\n","import { IPlayer } from \"../IPlayer\";\nimport { PlayerObject } from \"./PlayerObject\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { PlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CodingContractRewardType, ICodingContractReward } from \"../../CodingContracts\";\nimport { Company } from \"../../Company/Company\";\nimport { Companies } from \"../../Company/Companies\";\nimport { getNextCompanyPositionHelper } from \"../../Company/GetNextCompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { Programs } from \"../../Programs/Programs\";\nimport { determineCrimeSuccess } from \"../../Crime/CrimeHelpers\";\nimport { Crimes } from \"../../Crime/Crimes\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { resetGangs } from \"../../Gang/AllGangs\";\nimport { Cities } from \"../../Locations/Cities\";\nimport { Locations } from \"../../Locations/Locations\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport {\n calculateSkill as calculateSkillF,\n calculateSkillProgress as calculateSkillProgressF,\n ISkillProgress,\n} from \"../formulas/skill\";\nimport { calculateIntelligenceBonus } from \"../formulas/intelligence\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../formulas/reputation\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { safetlyCreateUniqueServer } from \"../../Server/ServerHelpers\";\n\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { applySourceFile } from \"../../SourceFile/applySourceFile\";\nimport { applyExploit } from \"../../Exploits/applyExploits\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { influenceStockThroughCompanyWork } from \"../../StockMarket/PlayerInfluencing\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { IRouter } from \"../../ui/Router\";\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport React from \"react\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { SnackbarEvents } from \"../../ui/React/Snackbar\";\nimport { calculateClassEarnings } from \"../formulas/work\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nexport function init(this: IPlayer): void {\n /* Initialize Player's home computer */\n const t_homeComp = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: \"home\",\n ip: createUniqueRandomIp(),\n isConnectedTo: true,\n maxRam: 8,\n organizationName: \"Home PC\",\n purchasedByPlayer: true,\n });\n this.currentServer = SpecialServers.Home;\n AddToAllServers(t_homeComp);\n\n this.getHomeComputer().programs.push(Programs.NukeProgram.name);\n}\n\nexport function prestigeAugmentation(this: PlayerObject): void {\n this.currentServer = SpecialServers.Home;\n\n this.numPeopleKilled = 0;\n\n //Reset stats\n this.hacking = 1;\n\n this.strength = 1;\n this.defense = 1;\n this.dexterity = 1;\n this.agility = 1;\n\n this.charisma = 1;\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\n this.money = 1000;\n\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n this.companyName = \"\";\n this.jobs = {};\n\n this.purchasedServers = [];\n\n this.factions = [];\n this.factionInvitations = [];\n\n this.queuedAugmentations = [];\n\n const numSleeves = Math.min(3, SourceFileFlags[10] + (this.bitNodeN === 10 ? 1 : 0)) + this.sleevesFromCovenant;\n if (this.sleeves.length > numSleeves) this.sleeves.length = numSleeves;\n for (let i = this.sleeves.length; i < numSleeves; i++) {\n this.sleeves.push(new Sleeve(this));\n }\n\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\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\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\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\n this.timeWorked = 0;\n\n this.lastUpdate = new Date().getTime();\n\n // Statistics Trackers\n this.playtimeSinceLastAug = 0;\n this.scriptProdSinceLastAug = 0;\n this.moneySourceA.reset();\n\n this.hacknetNodes.length = 0;\n this.hashManager.prestige();\n\n // Reapply augs, re-calculate skills and reset HP\n this.reapplyAllAugmentations(true);\n this.hp = this.max_hp;\n}\n\nexport function prestigeSourceFile(this: IPlayer): void {\n this.entropy = 0;\n this.prestigeAugmentation();\n this.karma = 0;\n // Duplicate sleeves are reset to level 1 every Bit Node (but the number of sleeves you have persists)\n for (let i = 0; i < this.sleeves.length; ++i) {\n if (this.sleeves[i] instanceof Sleeve) {\n this.sleeves[i].prestige(this);\n } else {\n this.sleeves[i] = new Sleeve(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;\n\n // Gang\n this.gang = null;\n resetGangs();\n\n // Reset Stock market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n // BitNode 3: Corporatocracy\n this.corporation = null;\n\n this.moneySourceB.reset();\n this.playtimeSinceLastBitnode = 0;\n this.augmentations = [];\n}\n\nexport function receiveInvite(this: IPlayer, factionName: string): void {\n if (this.factionInvitations.includes(factionName) || this.factions.includes(factionName)) {\n return;\n }\n this.factionInvitations.push(factionName);\n}\n\n//Calculates skill level based on experience. The same formula will be used for every skill\nexport function calculateSkill(this: IPlayer, exp: number, mult = 1): number {\n return calculateSkillF(exp, mult);\n}\n\n//Calculates skill level progress based on experience. The same formula will be used for every skill\nexport function calculateSkillProgress(this: IPlayer, exp: number, mult = 1): ISkillProgress {\n return calculateSkillProgressF(exp, mult);\n}\n\nexport function updateSkillLevels(this: IPlayer): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier)),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateSkill(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(this.calculateSkill(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier)),\n );\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 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\nexport function resetMultipliers(this: IPlayer): void {\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\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\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\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\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;\n\n this.work_money_mult = 1;\n\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}\n\nexport function hasProgram(this: IPlayer, programName: string): boolean {\n const home = this.getHomeComputer();\n if (home == null) {\n return false;\n }\n\n for (let i = 0; i < home.programs.length; ++i) {\n if (programName.toLowerCase() == home.programs[i].toLowerCase()) {\n return true;\n }\n }\n return false;\n}\n\nexport function setMoney(this: PlayerObject, money: number): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.setMoney()\");\n return;\n }\n this.money = money;\n}\n\nexport function gainMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.gainMoney()\");\n return;\n }\n\n this.money = this.money + money;\n this.recordMoneySource(money, source);\n}\n\nexport function loseMoney(this: PlayerObject, money: number, source: string): void {\n if (isNaN(money)) {\n console.error(\"NaN passed into Player.loseMoney()\");\n return;\n }\n if (this.money === Infinity && money === Infinity) return;\n this.money = this.money - money;\n this.recordMoneySource(-1 * money, source);\n}\n\nexport function canAfford(this: IPlayer, cost: number): boolean {\n if (isNaN(cost)) {\n console.error(`NaN passed into Player.canAfford()`);\n return false;\n }\n return this.money >= cost;\n}\n\nexport function recordMoneySource(this: PlayerObject, amt: number, source: string): void {\n if (!(this.moneySourceA instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceA was not properly initialized. Resetting`);\n this.moneySourceA = new MoneySourceTracker();\n }\n if (!(this.moneySourceB instanceof MoneySourceTracker)) {\n console.warn(`Player.moneySourceB was not properly initialized. Resetting`);\n this.moneySourceB = new MoneySourceTracker();\n }\n this.moneySourceA.record(amt, source);\n this.moneySourceB.record(amt, source);\n}\n\nexport function gainHackingExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainHackingExp()\");\n return;\n }\n this.hacking_exp += exp;\n if (this.hacking_exp < 0) {\n this.hacking_exp = 0;\n }\n\n this.hacking = calculateSkillF(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier);\n}\n\nexport function gainStrengthExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainStrengthExp()\");\n return;\n }\n this.strength_exp += exp;\n if (this.strength_exp < 0) {\n this.strength_exp = 0;\n }\n\n this.strength = calculateSkillF(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier);\n}\n\nexport function gainDefenseExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into player.gainDefenseExp()\");\n return;\n }\n this.defense_exp += exp;\n if (this.defense_exp < 0) {\n this.defense_exp = 0;\n }\n\n this.defense = calculateSkillF(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier);\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\nexport function gainDexterityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainDexterityExp()\");\n return;\n }\n this.dexterity_exp += exp;\n if (this.dexterity_exp < 0) {\n this.dexterity_exp = 0;\n }\n\n this.dexterity = calculateSkillF(\n this.dexterity_exp,\n this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n}\n\nexport function gainAgilityExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainAgilityExp()\");\n return;\n }\n this.agility_exp += exp;\n if (this.agility_exp < 0) {\n this.agility_exp = 0;\n }\n\n this.agility = calculateSkillF(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier);\n}\n\nexport function gainCharismaExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERR: NaN passed into Player.gainCharismaExp()\");\n return;\n }\n this.charisma_exp += exp;\n if (this.charisma_exp < 0) {\n this.charisma_exp = 0;\n }\n\n this.charisma = calculateSkillF(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier);\n}\n\nexport function gainIntelligenceExp(this: IPlayer, exp: number): void {\n if (isNaN(exp)) {\n console.error(\"ERROR: NaN passed into Player.gainIntelligenceExp()\");\n return;\n }\n if (SourceFileFlags[5] > 0 || this.intelligence > 0) {\n this.intelligence_exp += exp;\n this.intelligence = Math.floor(this.calculateSkill(this.intelligence_exp));\n }\n}\n\n//Given a string expression like \"str\" or \"strength\", returns the given stat\nexport function queryStatFromString(this: IPlayer, str: string): number {\n const tempStr = str.toLowerCase();\n if (tempStr.includes(\"hack\")) {\n return this.hacking;\n }\n if (tempStr.includes(\"str\")) {\n return this.strength;\n }\n if (tempStr.includes(\"def\")) {\n return this.defense;\n }\n if (tempStr.includes(\"dex\")) {\n return this.dexterity;\n }\n if (tempStr.includes(\"agi\")) {\n return this.agility;\n }\n if (tempStr.includes(\"cha\")) {\n return this.charisma;\n }\n if (tempStr.includes(\"int\")) {\n return this.intelligence;\n }\n return 0;\n}\n\n/******* Working functions *******/\nexport function resetWorkStatus(this: IPlayer, generalType?: string, group?: string, workType?: string): void {\n if (this.workType !== CONSTANTS.WorkTypeFaction && generalType === this.workType && group === this.companyName)\n return;\n if (generalType === this.workType && group === this.currentWorkFactionName && workType === this.factionWorkType)\n 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\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\n this.timeWorked = 0;\n this.timeWorkedCreateProgram = 0;\n this.timeWorkedGraftAugmentation = 0;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n this.createProgramName = \"\";\n this.graftAugmentationName = \"\";\n this.className = \"\";\n this.workType = \"\";\n}\n\nexport function processWorkEarnings(this: IPlayer, numCycles = 1): void {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\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, this.className ? \"class\" : \"work\");\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\n/* Working for Company */\nexport function startWork(this: IPlayer, companyName: string): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeCompany, companyName);\n this.isWorking = true;\n this.companyName = companyName;\n this.workType = CONSTANTS.WorkTypeCompany;\n\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\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n}\n\nexport function process(this: IPlayer, router: IRouter, numCycles = 1): void {\n // Working\n if (this.isWorking) {\n if (this.workType == CONSTANTS.WorkTypeFaction) {\n if (this.workForFaction(numCycles)) {\n router.toFaction(Factions[this.currentWorkFactionName]);\n }\n } else if (this.workType == CONSTANTS.WorkTypeCreateProgram) {\n if (this.createProgramWork(numCycles)) {\n router.toTerminal();\n }\n } else if (this.workType == CONSTANTS.WorkTypeStudyClass) {\n if (this.takeClass(numCycles)) {\n router.toCity();\n }\n } else if (this.workType == CONSTANTS.WorkTypeCrime) {\n if (this.commitCrime(numCycles)) {\n router.toLocation(Locations[LocationName.Slums]);\n }\n } else if (this.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n if (this.workPartTime(numCycles)) {\n router.toCity();\n }\n } else if (this.workType === CONSTANTS.WorkTypeGraftAugmentation) {\n if (this.graftAugmentationWork(numCycles)) {\n router.toGrafting();\n }\n } else if (this.work(numCycles)) {\n router.toCity();\n }\n }\n}\n\nexport function cancelationPenalty(this: IPlayer): number {\n const data = serverMetadata.find((s) => s.specialName === this.companyName);\n if (!data) return 0.5; // Does not have special server.\n const server = GetServer(data.hostname);\n if (server instanceof Server) {\n if (server && server.backdoorInstalled) return 0.75;\n }\n\n return 0.5;\n}\n\nexport function work(this: IPlayer, numCycles: number): boolean {\n // Cap the number of cycles being processed to whatever would put you at\n // the work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.workMoneyGainRate = this.getWorkMoneyGain();\n this.processWorkEarnings(numCycles);\n\n const comp = Companies[this.companyName];\n influenceStockThroughCompanyWork(comp, this.workRepGainRate, numCycles);\n\n // If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishWork(this: IPlayer, cancelled: boolean, sing = false): string {\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 penaltyString = this.cancelationPenalty() === 0.5 ? \"half\" : \"three-quarters\";\n\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n let content = (\n <>\n You earned a total of:
    \n \n
    \n reputation for the company
    \n {this.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
    \n \n )}\n {this.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
    \n \n )}\n {this.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
    \n \n )}\n {this.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
    \n \n )}\n {this.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
    \n \n )}\n {this.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp
    \n \n )}\n
    \n \n );\n\n if (cancelled) {\n content = (\n <>\n You worked a short shift of {convertTimeMsToTimeElapsedString(this.timeWorked)}
    \n
    \n Since you cancelled your work early, you only gained {penaltyString} of the reputation you earned.
    \n
    \n {content}\n \n );\n } else {\n content = (\n <>\n You worked a full shift of 8 hours!
    \n
    \n {content}\n \n );\n }\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n this.focus = false;\n\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked a short shift of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned $\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp.\";\n\n return res;\n }\n\n return \"\";\n}\n\nexport function startWorkPartTime(this: IPlayer, companyName: string): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeCompanyPartTime, companyName);\n this.isWorking = true;\n this.companyName = companyName;\n this.workType = CONSTANTS.WorkTypeCompanyPartTime;\n\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\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer8Hours;\n}\n\nexport function workPartTime(this: IPlayer, numCycles: number): boolean {\n //Cap the number of cycles being processed to whatever would put you at the\n //work time limit (8 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer8Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer8Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.workRepGainRate = this.getWorkRepGain();\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 8 hours, then finish. You can only gain 8 hours worth of exp and money\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer8Hours) {\n this.finishWorkPartTime();\n return true;\n }\n return false;\n}\n\nexport function finishWorkPartTime(this: IPlayer, sing = false): string {\n const company = Companies[this.companyName];\n company.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n const content = (\n <>\n You worked for {convertTimeMsToTimeElapsedString(this.timeWorked)}\n
    \n
    \n You earned a total of:
    \n \n
    \n reputation for the company
    \n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
    \n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
    \n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
    \n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
    \n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
    \n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
    \n \n );\n if (!sing) {\n dialogBoxCreate(content);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n\n if (sing) {\n const res =\n \"You worked for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \" and \" +\n \"earned a total of \" +\n \"$\" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" reputation, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n return res;\n }\n return \"\";\n}\n\nexport function startFocusing(this: IPlayer): void {\n this.focus = true;\n}\n\nexport function stopFocusing(this: IPlayer): void {\n this.focus = false;\n}\n\n/* Working for Faction */\nexport function startFactionWork(this: IPlayer, faction: Faction): void {\n //Update reputation gain rate to account for faction favor\n let favorMult = 1 + faction.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n this.workRepGainRate *= favorMult;\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeFaction;\n this.currentWorkFactionName = faction.name;\n\n this.timeNeededToCompleteWork = CONSTANTS.MillisecondsPer20Hours;\n}\n\nexport function startFactionHackWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkHacking);\n\n this.workHackExpGainRate = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkHacking;\n this.currentWorkFactionDescription = \"carrying out hacking contracts\";\n\n this.startFactionWork(faction);\n}\n\nexport function startFactionFieldWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkField);\n\n this.workHackExpGainRate = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkField;\n this.currentWorkFactionDescription = \"carrying out field missions\";\n\n this.startFactionWork(faction);\n}\n\nexport function startFactionSecurityWork(this: IPlayer, faction: Faction): void {\n this.resetWorkStatus(CONSTANTS.WorkTypeFaction, faction.name, CONSTANTS.FactionWorkSecurity);\n\n this.workHackExpGainRate = 0.05 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workStrExpGainRate = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDefExpGainRate = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workDexExpGainRate = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workAgiExpGainRate = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workChaExpGainRate = 0.0 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n\n this.factionWorkType = CONSTANTS.FactionWorkSecurity;\n this.currentWorkFactionDescription = \"performing security detail\";\n\n this.startFactionWork(faction);\n}\n\nexport function workForFaction(this: IPlayer, numCycles: number): boolean {\n const faction = Factions[this.currentWorkFactionName];\n\n if (!faction) {\n return false;\n }\n\n //Constantly update the rep gain rate\n switch (this.factionWorkType) {\n case CONSTANTS.FactionWorkHacking:\n this.workRepGainRate = getHackingWorkRepGain(this, faction);\n break;\n case CONSTANTS.FactionWorkField:\n this.workRepGainRate = getFactionFieldWorkRepGain(this, faction);\n break;\n case CONSTANTS.FactionWorkSecurity:\n this.workRepGainRate = getFactionSecurityWorkRepGain(this, faction);\n break;\n default:\n break;\n }\n this.workRepGainRate *= BitNodeMultipliers.FactionWorkRepGain;\n\n //Cap the number of cycles being processed to whatever would put you at limit (20 hours)\n let overMax = false;\n if (this.timeWorked + CONSTANTS._idleSpeed * numCycles >= CONSTANTS.MillisecondsPer20Hours) {\n overMax = true;\n numCycles = Math.round((CONSTANTS.MillisecondsPer20Hours - this.timeWorked) / CONSTANTS._idleSpeed);\n }\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n this.processWorkEarnings(numCycles);\n\n //If timeWorked == 20 hours, then finish. You can only work for the faction for 20 hours\n if (overMax || this.timeWorked >= CONSTANTS.MillisecondsPer20Hours) {\n this.finishFactionWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishFactionWork(this: IPlayer, cancelled: boolean, sing = false): string {\n const faction = Factions[this.currentWorkFactionName];\n faction.playerReputation += this.workRepGained;\n\n this.updateSkillLevels();\n\n if (!sing) {\n dialogBoxCreate(\n <>\n You worked for your faction {faction.name} for a total of {convertTimeMsToTimeElapsedString(this.timeWorked)}{\" \"}\n
    \n
    \n You earned a total of:
    \n \n
    \n reputation for the faction
    \n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
    \n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
    \n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
    \n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
    \n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
    \n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
    \n ,\n );\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n if (sing) {\n const res =\n \"You worked for your faction \" +\n faction.name +\n \" for a total of \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \". \" +\n \"You earned \" +\n numeralWrapper.formatReputation(this.workRepGained) +\n \" rep, \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\";\n\n return res;\n }\n return \"\";\n}\n\n//Money gained per game cycle\nexport function getWorkMoneyGain(this: IPlayer): number {\n // If player has SF-11, calculate salary multiplier from favor\n let bn11Mult = 1;\n const company = Companies[this.companyName];\n if (SourceFileFlags[11] > 0) {\n bn11Mult = 1 + company.favor / 100;\n }\n\n // Get base salary\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\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 (\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney *\n bn11Mult\n );\n}\n\n//Hack exp gained per game cycle\nexport function getWorkHackExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work hack exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Str exp gained per game cycle\nexport function getWorkStrExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work str exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Def exp gained per game cycle\nexport function getWorkDefExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work def exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Dex exp gained per game cycle\nexport function getWorkDexExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work dex exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Agi exp gained per game cycle\nexport function getWorkAgiExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work agi exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Charisma exp gained per game cycle\nexport function getWorkChaExpGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work cha exp gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n return (\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain\n );\n}\n\n//Reputation gained per game cycle\nexport function getWorkRepGain(this: IPlayer): number {\n const company = Companies[this.companyName];\n const companyPositionName = this.jobs[this.companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (company == null || companyPosition == null) {\n console.error(\n [\n `Could not find Company object for ${this.companyName}`,\n `or CompanyPosition object for ${companyPositionName}.`,\n `Work rep gain will be 0`,\n ].join(\" \"),\n );\n return 0;\n }\n\n let jobPerformance = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n\n //Intelligence provides a flat bonus to job performance\n jobPerformance += this.intelligence / CONSTANTS.MaxSkillLevel;\n\n //Update reputation gain rate to account for company favor\n let favorMult = 1 + company.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return jobPerformance * this.company_rep_mult * favorMult;\n}\n\n// export function getFactionSecurityWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / 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\n// export function getFactionFieldWorkRepGain(this: IPlayer) {\n// var t = 0.9 * (this.hacking / 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 */\nexport function startCreateProgramWork(this: IPlayer, programName: string, time: number, reqLevel: number): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeCreateProgram;\n\n //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 - reqLevel)) / CONSTANTS.MaxSkillLevel;\n //if (timeMultiplier > 1) {timeMultiplier = 1;}\n //if (timeMultiplier < 0.01) {timeMultiplier = 0.01;}\n this.createProgramReqLvl = reqLevel;\n\n this.timeNeededToCompleteWork = time;\n //Check for incomplete program\n for (let i = 0; i < this.getHomeComputer().programs.length; ++i) {\n const programFile = this.getHomeComputer().programs[i];\n if (programFile.startsWith(programName) && programFile.endsWith(\"%-INC\")) {\n const res = programFile.split(\"-\");\n if (res.length != 3) {\n break;\n }\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n break;\n }\n this.timeWorkedCreateProgram = (percComplete / 100) * this.timeNeededToCompleteWork;\n this.getHomeComputer().programs.splice(i, 1);\n }\n }\n\n this.createProgramName = programName;\n}\n\nexport function createProgramWork(this: IPlayer, numCycles: number): boolean {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames[\"NeuroreceptorManager\"])) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n //Higher hacking skill will allow you to create programs faster\n const reqLvl = this.createProgramReqLvl;\n let skillMult = (this.hacking / reqLvl) * this.getIntelligenceBonus(3); //This should always be greater than 1;\n skillMult = 1 + (skillMult - 1) / 5; //The divider constant can be adjusted as necessary\n skillMult *= focusBonus;\n //Skill multiplier directly applied to \"time worked\"\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n this.timeWorkedCreateProgram += CONSTANTS._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedCreateProgram >= this.timeNeededToCompleteWork) {\n this.finishCreateProgramWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishCreateProgramWork(this: IPlayer, cancelled: boolean): string {\n const programName = this.createProgramName;\n if (cancelled === false) {\n dialogBoxCreate(`You've finished creating ${programName}!
    The new program can be found on your home computer.`);\n\n this.getHomeComputer().programs.push(programName);\n } else {\n const perc = (Math.floor((this.timeWorkedCreateProgram / this.timeNeededToCompleteWork) * 10000) / 100).toString();\n const incompleteName = programName + \"-\" + perc + \"%-INC\";\n this.getHomeComputer().programs.push(incompleteName);\n }\n\n if (!cancelled) {\n this.gainIntelligenceExp((CONSTANTS.IntelligenceProgramBaseExpGain * this.timeWorked) / 1000);\n }\n\n this.isWorking = false;\n\n this.resetWorkStatus();\n return \"You've finished creating \" + programName + \"! The new program can be found on your home computer.\";\n}\n\nexport function startGraftAugmentationWork(this: IPlayer, augmentationName: string, time: number): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeGraftAugmentation;\n\n this.timeNeededToCompleteWork = time;\n this.graftAugmentationName = augmentationName;\n}\n\nexport function craftAugmentationWork(this: IPlayer, numCycles: number): boolean {\n let focusBonus = 1;\n if (!this.hasAugmentation(AugmentationNames.NeuroreceptorManager)) {\n focusBonus = this.focus ? 1 : CONSTANTS.BaseFocusBonus;\n }\n\n let skillMult = 1 + (this.getIntelligenceBonus(3) - 1) / 3;\n skillMult *= focusBonus;\n\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n this.timeWorkedGraftAugmentation += CONSTANTS._idleSpeed * numCycles * skillMult;\n\n if (this.timeWorkedGraftAugmentation >= this.timeNeededToCompleteWork) {\n this.finishGraftAugmentationWork(false);\n return true;\n }\n return false;\n}\n\nexport function finishGraftAugmentationWork(this: IPlayer, cancelled: boolean): string {\n const augName = this.graftAugmentationName;\n if (cancelled === false) {\n dialogBoxCreate(\n `You've finished crafting ${augName}.
    The augmentation has been grafted to your body, but you feel a bit off.`,\n );\n\n applyAugmentation(Augmentations[augName]);\n this.entropy += 1;\n this.applyEntropy(this.entropy);\n } else {\n dialogBoxCreate(`You cancelled the crafting of ${augName}.
    Your money was not returned to you.`);\n }\n\n // Intelligence gain\n if (!cancelled) {\n this.gainIntelligenceExp((CONSTANTS.IntelligenceGraftBaseExpGain * this.timeWorked) / 10000);\n }\n\n this.isWorking = false;\n this.resetWorkStatus();\n return `Grafting of ${augName} has ended.`;\n}\n\n/* Studying/Taking Classes */\nexport function startClass(this: IPlayer, costMult: number, expMult: number, className: string): void {\n this.resetWorkStatus();\n this.isWorking = true;\n this.workType = CONSTANTS.WorkTypeStudyClass;\n this.workCostMult = costMult;\n this.workExpMult = expMult;\n this.className = className;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n}\n\nexport function takeClass(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n const earnings = calculateClassEarnings(this);\n this.workMoneyLossRate = earnings.workMoneyLossRate;\n this.workHackExpGainRate = earnings.workHackExpGainRate;\n this.workStrExpGainRate = earnings.workStrExpGainRate;\n this.workDefExpGainRate = earnings.workDefExpGainRate;\n this.workDexExpGainRate = earnings.workDexExpGainRate;\n this.workAgiExpGainRate = earnings.workAgiExpGainRate;\n this.workChaExpGainRate = earnings.workChaExpGainRate;\n this.processWorkEarnings(numCycles);\n return false;\n}\n\n//The 'sing' argument defines whether or not this function was called\n//through a Singularity Netscript function\nexport function finishClass(this: IPlayer, sing = false): string {\n this.gainIntelligenceExp(CONSTANTS.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 if (!sing) {\n dialogBoxCreate(\n <>\n After {this.className} for {convertTimeMsToTimeElapsedString(this.timeWorked)},
    \n you spent a total of .
    \n
    \n You earned a total of:
    \n {numeralWrapper.formatExp(this.workHackExpGained)} hacking exp
    \n {numeralWrapper.formatExp(this.workStrExpGained)} strength exp
    \n {numeralWrapper.formatExp(this.workDefExpGained)} defense exp
    \n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity exp
    \n {numeralWrapper.formatExp(this.workAgiExpGained)} agility exp
    \n {numeralWrapper.formatExp(this.workChaExpGained)} charisma exp\n
    \n ,\n );\n }\n\n this.isWorking = false;\n\n if (sing) {\n const res =\n \"After \" +\n this.className +\n \" for \" +\n convertTimeMsToTimeElapsedString(this.timeWorked) +\n \", \" +\n \"you spent a total of \" +\n numeralWrapper.formatMoney(this.workMoneyGained * -1) +\n \". \" +\n \"You earned a total of: \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hacking exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" strength exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" defense exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dexterity exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agility exp, and \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" charisma exp\";\n this.resetWorkStatus();\n return res;\n }\n this.resetWorkStatus();\n return \"\";\n}\n\n//The EXP and $ gains are hardcoded. Time is in ms\nexport function startCrime(\n this: IPlayer,\n router: IRouter,\n crimeType: string,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n workerscript: WorkerScript | null = null,\n): void {\n this.crimeType = crimeType;\n\n this.resetWorkStatus();\n this.isWorking = true;\n this.focus = true;\n this.workType = CONSTANTS.WorkTypeCrime;\n\n if (workerscript !== null) {\n this.committingCrimeThruSingFn = true;\n this.singFnCrimeWorkerScript = workerscript;\n }\n\n this.workHackExpGained = hackExp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workStrExpGained = strExp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDefExpGained = defExp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workDexExpGained = dexExp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workAgiExpGained = agiExp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workChaExpGained = chaExp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.workMoneyGained = money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.timeNeededToCompleteWork = time;\n router.toWork();\n}\n\nexport function commitCrime(this: IPlayer, numCycles: number): boolean {\n this.timeWorked += CONSTANTS._idleSpeed * numCycles;\n\n if (this.timeWorked >= this.timeNeededToCompleteWork) {\n this.finishCrime(false);\n return true;\n }\n return false;\n}\n\nexport function finishCrime(this: IPlayer, cancelled: boolean): string {\n //Determine crime success/failure\n if (!cancelled) {\n if (determineCrimeSuccess(this, this.crimeType)) {\n //Handle Karma and crime statistics\n let crime = null;\n for (const i of Object.keys(Crimes)) {\n if (Crimes[i].type == this.crimeType) {\n crime = Crimes[i];\n break;\n }\n }\n if (crime == null) {\n dialogBoxCreate(\n `ERR: Unrecognized crime type (${this.crimeType}). This is probably a bug please contact the developer`,\n );\n return \"\";\n }\n this.gainMoney(this.workMoneyGained, \"crime\");\n this.karma -= crime.karma;\n this.numPeopleKilled += crime.kills;\n if (crime.intelligence_exp > 0) {\n this.gainIntelligenceExp(crime.intelligence_exp);\n }\n\n //On a crime success, gain 2x exp\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 const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"SUCCESS: Crime successful! Gained \" +\n numeralWrapper.formatMoney(this.workMoneyGained) +\n \", \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime successful!\n
    \n
    \n You gained:\n
    \n \n
    \n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
    \n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
    \n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
    \n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
    \n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
    \n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\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 const ws = this.singFnCrimeWorkerScript;\n if (this.committingCrimeThruSingFn && ws !== null) {\n if (ws.disableLogs.ALL == null && ws.disableLogs.commitCrime == null) {\n ws.scriptRef.log(\n \"FAIL: Crime failed! Gained \" +\n numeralWrapper.formatExp(this.workHackExpGained) +\n \" hack exp, \" +\n numeralWrapper.formatExp(this.workStrExpGained) +\n \" str exp, \" +\n numeralWrapper.formatExp(this.workDefExpGained) +\n \" def exp, \" +\n numeralWrapper.formatExp(this.workDexExpGained) +\n \" dex exp, \" +\n numeralWrapper.formatExp(this.workAgiExpGained) +\n \" agi exp, \" +\n numeralWrapper.formatExp(this.workChaExpGained) +\n \" cha exp.\",\n );\n }\n } else {\n dialogBoxCreate(\n <>\n Crime failed!\n
    \n
    \n You gained:\n
    \n {numeralWrapper.formatExp(this.workHackExpGained)} hacking experience
    \n {numeralWrapper.formatExp(this.workStrExpGained)} strength experience\n
    \n {numeralWrapper.formatExp(this.workDefExpGained)} defense experience\n
    \n {numeralWrapper.formatExp(this.workDexExpGained)} dexterity experience\n
    \n {numeralWrapper.formatExp(this.workAgiExpGained)} agility experience\n
    \n {numeralWrapper.formatExp(this.workChaExpGained)} charisma experience\n ,\n );\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 this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n this.isWorking = false;\n this.crimeType = \"\";\n this.resetWorkStatus();\n return \"\";\n}\n\n//Cancels the player's current \"work\" assignment and gives the proper rewards\n//Used only for Singularity functions, so no popups are created\nexport function singularityStopWork(this: IPlayer): string {\n if (!this.isWorking) {\n return \"\";\n }\n let res = \"\"; //Earnings text for work\n switch (this.workType) {\n case CONSTANTS.WorkTypeStudyClass:\n res = this.finishClass(true);\n break;\n case CONSTANTS.WorkTypeCompany:\n res = this.finishWork(true, true);\n break;\n case CONSTANTS.WorkTypeCompanyPartTime:\n res = this.finishWorkPartTime(true);\n break;\n case CONSTANTS.WorkTypeFaction:\n res = this.finishFactionWork(true, true);\n break;\n case CONSTANTS.WorkTypeCreateProgram:\n res = this.finishCreateProgramWork(true);\n break;\n case CONSTANTS.WorkTypeCrime:\n res = this.finishCrime(true);\n break;\n default:\n console.error(`Unrecognized work type (${this.workType})`);\n return \"\";\n }\n return res;\n}\n\n// Returns true if hospitalized, false otherwise\nexport function takeDamage(this: IPlayer, amt: number): boolean {\n if (typeof amt !== \"number\") {\n console.warn(`Player.takeDamage() called without a numeric argument: ${amt}`);\n return false;\n }\n\n this.hp -= amt;\n if (this.hp <= 0) {\n this.hospitalize();\n return true;\n } else {\n return false;\n }\n}\n\nexport function regenerateHp(this: IPlayer, amt: number): void {\n if (typeof amt !== \"number\") {\n console.warn(`Player.regenerateHp() called without a numeric argument: ${amt}`);\n return;\n }\n this.hp += amt;\n if (this.hp > this.max_hp) {\n this.hp = this.max_hp;\n }\n}\n\nexport function hospitalize(this: IPlayer): number {\n const cost = getHospitalizationCost(this);\n SnackbarEvents.emit(`You've been Hospitalized for ${numeralWrapper.formatMoney(cost)}`, \"warning\", 2000);\n\n this.loseMoney(cost, \"hospitalization\");\n this.hp = this.max_hp;\n return cost;\n}\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\nexport function applyForJob(this: IPlayer, entryPosType: CompanyPosition, sing = false): boolean {\n // Get current company and job\n let currCompany = null;\n if (this.companyName !== \"\") {\n currCompany = Companies[this.companyName];\n }\n const currPositionName = this.jobs[this.companyName];\n\n // Get company that's being applied to\n const company = Companies[this.location]; //Company being applied to\n if (!(company instanceof Company)) {\n console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);\n return false;\n }\n\n let pos = entryPosType;\n\n if (!this.isQualified(company, pos)) {\n const reqText = getJobRequirementText(company, pos);\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position
    \" + reqText);\n }\n return false;\n }\n\n // Check if this company has the position\n if (!company.hasPosition(pos)) {\n return false;\n }\n\n while (true) {\n const newPos = getNextCompanyPositionHelper(pos);\n if (newPos == null) {\n break;\n }\n\n //Check if this company has this position\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 pos = newPos;\n } else {\n break;\n }\n }\n\n //Check if the determined job is the same as the player's current job\n if (currCompany != null) {\n if (currCompany.name == company.name && pos.name == currPositionName) {\n const nextPos = getNextCompanyPositionHelper(pos);\n if (nextPos == null) {\n if (!sing) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n }\n return false;\n } else if (company.hasPosition(nextPos)) {\n if (!sing) {\n const reqText = getJobRequirementText(company, nextPos);\n dialogBoxCreate(\"Unfortunately, you do not qualify for a promotion
    \" + reqText);\n }\n return false;\n } else {\n if (!sing) {\n dialogBoxCreate(\"You are already at the highest position for your field! No promotion available\");\n }\n return false;\n }\n }\n }\n\n this.jobs[company.name] = pos.name;\n if (!this.focus && this.isWorking && this.companyName !== this.location) this.resetWorkStatus();\n this.companyName = this.location;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations! You were offered a new job at \" + this.companyName + \" as a \" + pos.name + \"!\");\n }\n return true;\n}\n\n//Returns your next position at a company given the field (software, business, etc.)\nexport function getNextCompanyPosition(\n this: IPlayer,\n company: Company,\n entryPosType: CompanyPosition,\n): CompanyPosition | null {\n let currCompany = null;\n if (this.companyName !== \"\") {\n currCompany = Companies[this.companyName];\n }\n\n //Not employed at this company, so return the entry position\n if (currCompany == null || currCompany.name != company.name) {\n return entryPosType;\n }\n\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 const currentPositionName = this.jobs[this.companyName];\n if (!currentPositionName) return entryPosType;\n const currentPosition = CompanyPositions[currentPositionName];\n if (\n (currentPosition.isSoftwareJob() && entryPosType.isSoftwareJob()) ||\n (currentPosition.isITJob() && entryPosType.isITJob()) ||\n (currentPosition.isBusinessJob() && entryPosType.isBusinessJob()) ||\n (currentPosition.isSecurityEngineerJob() && entryPosType.isSecurityEngineerJob()) ||\n (currentPosition.isNetworkEngineerJob() && entryPosType.isNetworkEngineerJob()) ||\n (currentPosition.isSecurityJob() && entryPosType.isSecurityJob()) ||\n (currentPosition.isAgentJob() && entryPosType.isAgentJob()) ||\n (currentPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||\n (currentPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||\n (currentPosition.isPartTimeJob() && entryPosType.isPartTimeJob())\n ) {\n return getNextCompanyPositionHelper(currentPosition);\n }\n\n return entryPosType;\n}\n\nexport function quitJob(this: IPlayer, company: string): void {\n if (this.isWorking == true && this.workType.includes(\"Working for Company\") && this.companyName == company) {\n this.isWorking = false;\n this.companyName = \"\";\n }\n if (this.companyName === company) {\n this.companyName = \"\";\n }\n delete this.jobs[company];\n}\n\n/**\n * Method to see if the player has at least one job assigned to them\n * @param this The player instance\n * @returns Whether the user has at least one job\n */\nexport function hasJob(this: IPlayer): boolean {\n return Boolean(Object.keys(this.jobs).length);\n}\n\nexport function applyForSoftwareJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareCompanyPositions[0]], sing);\n}\n\nexport function applyForSoftwareConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.SoftwareConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForItJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.ITCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]])) {\n return this.applyForJob(CompanyPositions[posNames.SecurityEngineerCompanyPositions[0]], sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForNetworkEngineerJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.NetworkEngineerCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForBusinessJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessCompanyPositions[0]], sing);\n}\n\nexport function applyForBusinessConsultantJob(this: IPlayer, sing = false): boolean {\n return this.applyForJob(CompanyPositions[posNames.BusinessConsultantCompanyPositions[0]], sing);\n}\n\nexport function applyForSecurityJob(this: IPlayer, sing = false): boolean {\n // TODO Police Jobs\n // Indexing starts at 2 because 0 is for police officer\n return this.applyForJob(CompanyPositions[posNames.SecurityCompanyPositions[2]], sing);\n}\n\nexport function applyForAgentJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n if (this.isQualified(company, CompanyPositions[posNames.AgentCompanyPositions[0]])) {\n const pos = CompanyPositions[posNames.AgentCompanyPositions[0]];\n return this.applyForJob(pos, sing);\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForPartTimeEmployeeJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[1];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed part-time at \" + this.location);\n }\n\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n\n return false;\n }\n}\n\nexport function applyForWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.MiscCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\nexport function applyForPartTimeWaiterJob(this: IPlayer, sing = false): boolean {\n const company = Companies[this.location]; //Company being applied to\n const position = posNames.PartTimeCompanyPositions[0];\n // Check if this company has the position\n if (!company.hasPosition(position)) {\n return false;\n }\n if (this.isQualified(company, CompanyPositions[position])) {\n this.jobs[company.name] = position;\n if (!this.focus && this.isWorking && this.companyName !== company.name) this.resetWorkStatus();\n this.companyName = company.name;\n if (!sing) {\n dialogBoxCreate(\"Congratulations, you are now employed as a part-time waiter at \" + this.location);\n }\n return true;\n } else {\n if (!sing) {\n dialogBoxCreate(\"Unfortunately, you do not qualify for this position\");\n }\n return false;\n }\n}\n\n//Checks if the Player is qualified for a certain position\nexport function isQualified(this: IPlayer, company: Company, position: CompanyPosition): boolean {\n const offset = company.jobStatReqOffset;\n const reqHacking = position.requiredHacking > 0 ? position.requiredHacking + offset : 0;\n const reqStrength = position.requiredStrength > 0 ? position.requiredStrength + offset : 0;\n const reqDefense = position.requiredDefense > 0 ? position.requiredDefense + offset : 0;\n const reqDexterity = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqAgility = position.requiredDexterity > 0 ? position.requiredDexterity + offset : 0;\n const reqCharisma = position.requiredCharisma > 0 ? position.requiredCharisma + offset : 0;\n\n return (\n this.hacking >= reqHacking &&\n this.strength >= reqStrength &&\n this.defense >= reqDefense &&\n this.dexterity >= reqDexterity &&\n this.agility >= reqAgility &&\n this.charisma >= reqCharisma &&\n company.playerReputation >= position.requiredReputation\n );\n}\n\n/********** Reapplying Augmentations and Source File ***********/\nexport function reapplyAllAugmentations(this: IPlayer, resetMultipliers = true): void {\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 playerAug = this.augmentations[i];\n const augName = playerAug.name;\n const aug = Augmentations[augName];\n if (aug == null) {\n console.warn(`Invalid augmentation name in Player.reapplyAllAugmentations(). Aug ${augName} will be skipped`);\n continue;\n }\n aug.owned = true;\n if (augName == AugmentationNames.NeuroFluxGovernor) {\n for (let j = 0; j < playerAug.level; ++j) {\n applyAugmentation(this.augmentations[i], true);\n }\n continue;\n }\n applyAugmentation(this.augmentations[i], true);\n }\n\n this.updateSkillLevels();\n}\n\nexport function reapplyAllSourceFiles(this: IPlayer): void {\n //Will always be called after reapplyAllAugmentations() so multipliers do not have to be reset\n //this.resetMultipliers();\n\n for (let i = 0; i < this.sourceFiles.length; ++i) {\n const srcFileKey = \"SourceFile\" + this.sourceFiles[i].n;\n const sourceFileObject = SourceFiles[srcFileKey];\n if (sourceFileObject == null) {\n console.error(`Invalid source file number: ${this.sourceFiles[i].n}`);\n continue;\n }\n applySourceFile(this.sourceFiles[i]);\n }\n applyExploit();\n this.updateSkillLevels();\n}\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\nexport function checkForFactionInvitations(this: IPlayer): Faction[] {\n const invitedFactions: Faction[] = []; //Array which will hold all Factions the player should be invited to\n\n const numAugmentations = this.augmentations.length;\n\n const allCompanies = Object.keys(this.jobs);\n const allPositions = Object.values(this.jobs);\n\n // Given a company name, safely returns the reputation (returns 0 if invalid company is specified)\n function getCompanyRep(companyName: string): number {\n const company = Companies[companyName];\n if (company == null) {\n return 0;\n } else {\n return company.playerReputation;\n }\n }\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 function checkMegacorpRequirements(companyName: string, repNeeded = CONSTANTS.CorpFactionRepRequirement): boolean {\n return allCompanies.includes(companyName) && getCompanyRep(companyName) > repNeeded;\n }\n\n //Illuminati\n const illuminatiFac = Factions[FactionNames.Illuminati];\n if (\n !illuminatiFac.isBanned &&\n !illuminatiFac.isMember &&\n !illuminatiFac.alreadyInvited &&\n numAugmentations >= 30 &&\n this.money >= 150000000000 &&\n this.hacking >= 1500 &&\n this.strength >= 1200 &&\n this.defense >= 1200 &&\n this.dexterity >= 1200 &&\n this.agility >= 1200\n ) {\n invitedFactions.push(illuminatiFac);\n }\n\n //Daedalus\n const daedalusFac = Factions[FactionNames.Daedalus];\n if (\n !daedalusFac.isBanned &&\n !daedalusFac.isMember &&\n !daedalusFac.alreadyInvited &&\n numAugmentations >= Math.round(30 * BitNodeMultipliers.DaedalusAugsRequirement) &&\n this.money >= 100000000000 &&\n (this.hacking >= 2500 ||\n (this.strength >= 1500 && this.defense >= 1500 && this.dexterity >= 1500 && this.agility >= 1500))\n ) {\n invitedFactions.push(daedalusFac);\n }\n\n //The Covenant\n const covenantFac = Factions[FactionNames.TheCovenant];\n if (\n !covenantFac.isBanned &&\n !covenantFac.isMember &&\n !covenantFac.alreadyInvited &&\n numAugmentations >= 20 &&\n this.money >= 75000000000 &&\n this.hacking >= 850 &&\n this.strength >= 850 &&\n this.defense >= 850 &&\n this.dexterity >= 850 &&\n this.agility >= 850\n ) {\n invitedFactions.push(covenantFac);\n }\n\n //ECorp\n const ecorpFac = Factions[FactionNames.ECorp];\n if (\n !ecorpFac.isBanned &&\n !ecorpFac.isMember &&\n !ecorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumECorp)\n ) {\n invitedFactions.push(ecorpFac);\n }\n\n //MegaCorp\n const megacorpFac = Factions[FactionNames.MegaCorp];\n if (\n !megacorpFac.isBanned &&\n !megacorpFac.isMember &&\n !megacorpFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12MegaCorp)\n ) {\n invitedFactions.push(megacorpFac);\n }\n\n //Bachman & Associates\n const bachmanandassociatesFac = Factions[FactionNames.BachmanAssociates];\n if (\n !bachmanandassociatesFac.isBanned &&\n !bachmanandassociatesFac.isMember &&\n !bachmanandassociatesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumBachmanAndAssociates)\n ) {\n invitedFactions.push(bachmanandassociatesFac);\n }\n\n //Blade Industries\n const bladeindustriesFac = Factions[FactionNames.BladeIndustries];\n if (\n !bladeindustriesFac.isBanned &&\n !bladeindustriesFac.isMember &&\n !bladeindustriesFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12BladeIndustries)\n ) {\n invitedFactions.push(bladeindustriesFac);\n }\n\n //NWO\n const nwoFac = Factions[FactionNames.NWO];\n if (\n !nwoFac.isBanned &&\n !nwoFac.isMember &&\n !nwoFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenNWO)\n ) {\n invitedFactions.push(nwoFac);\n }\n\n //Clarke Incorporated\n const clarkeincorporatedFac = Factions[FactionNames.ClarkeIncorporated];\n if (\n !clarkeincorporatedFac.isBanned &&\n !clarkeincorporatedFac.isMember &&\n !clarkeincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.AevumClarkeIncorporated)\n ) {\n invitedFactions.push(clarkeincorporatedFac);\n }\n\n //OmniTek Incorporated\n const omnitekincorporatedFac = Factions[FactionNames.OmniTekIncorporated];\n if (\n !omnitekincorporatedFac.isBanned &&\n !omnitekincorporatedFac.isMember &&\n !omnitekincorporatedFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.VolhavenOmniTekIncorporated)\n ) {\n invitedFactions.push(omnitekincorporatedFac);\n }\n\n //Four Sigma\n const foursigmaFac = Factions[FactionNames.FourSigma];\n if (\n !foursigmaFac.isBanned &&\n !foursigmaFac.isMember &&\n !foursigmaFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.Sector12FourSigma)\n ) {\n invitedFactions.push(foursigmaFac);\n }\n\n //KuaiGong International\n const kuaigonginternationalFac = Factions[FactionNames.KuaiGongInternational];\n if (\n !kuaigonginternationalFac.isBanned &&\n !kuaigonginternationalFac.isMember &&\n !kuaigonginternationalFac.alreadyInvited &&\n checkMegacorpRequirements(LocationName.ChongqingKuaiGongInternational)\n ) {\n invitedFactions.push(kuaigonginternationalFac);\n }\n\n //Fulcrum Secret Technologies - If u've unlocked fulcrum secret technolgoies server and have a high rep with the company\n const fulcrumsecrettechonologiesFac = Factions[FactionNames.FulcrumSecretTechnologies];\n const fulcrumSecretServer = GetServer(SpecialServers.FulcrumSecretTechnologies);\n if (!(fulcrumSecretServer instanceof Server))\n throw new Error(`${FactionNames.FulcrumSecretTechnologies} should be normal server`);\n if (fulcrumSecretServer == null) {\n console.error(`Could not find ${FactionNames.FulcrumSecretTechnologies} Server`);\n } else if (\n !fulcrumsecrettechonologiesFac.isBanned &&\n !fulcrumsecrettechonologiesFac.isMember &&\n !fulcrumsecrettechonologiesFac.alreadyInvited &&\n fulcrumSecretServer.backdoorInstalled &&\n checkMegacorpRequirements(LocationName.AevumFulcrumTechnologies, 250e3)\n ) {\n invitedFactions.push(fulcrumsecrettechonologiesFac);\n }\n\n //BitRunners\n const bitrunnersFac = Factions[FactionNames.BitRunners];\n const bitrunnersServer = GetServer(SpecialServers.BitRunnersServer);\n if (!(bitrunnersServer instanceof Server)) throw new Error(`${FactionNames.BitRunners} should be normal server`);\n if (bitrunnersServer == null) {\n console.error(`Could not find ${FactionNames.BitRunners} Server`);\n } else if (\n !bitrunnersFac.isBanned &&\n !bitrunnersFac.isMember &&\n bitrunnersServer.backdoorInstalled &&\n !bitrunnersFac.alreadyInvited\n ) {\n invitedFactions.push(bitrunnersFac);\n }\n\n //The Black Hand\n\n const theblackhandFac = Factions[FactionNames.TheBlackHand];\n const blackhandServer = GetServer(SpecialServers.TheBlackHandServer);\n if (!(blackhandServer instanceof Server)) throw new Error(`${FactionNames.TheBlackHand} should be normal server`);\n if (blackhandServer == null) {\n console.error(`Could not find ${FactionNames.TheBlackHand} Server`);\n } else if (\n !theblackhandFac.isBanned &&\n !theblackhandFac.isMember &&\n blackhandServer.backdoorInstalled &&\n !theblackhandFac.alreadyInvited\n ) {\n invitedFactions.push(theblackhandFac);\n }\n\n //NiteSec\n const nitesecFac = Factions[FactionNames.NiteSec];\n const nitesecServer = GetServer(SpecialServers.NiteSecServer);\n if (!(nitesecServer instanceof Server)) throw new Error(`${FactionNames.NiteSec} should be normal server`);\n if (nitesecServer == null) {\n console.error(`Could not find ${FactionNames.NiteSec} Server`);\n } else if (\n !nitesecFac.isBanned &&\n !nitesecFac.isMember &&\n nitesecServer.backdoorInstalled &&\n !nitesecFac.alreadyInvited\n ) {\n invitedFactions.push(nitesecFac);\n }\n\n //Chongqing\n const chongqingFac = Factions[FactionNames.Chongqing];\n if (\n !chongqingFac.isBanned &&\n !chongqingFac.isMember &&\n !chongqingFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.Chongqing\n ) {\n invitedFactions.push(chongqingFac);\n }\n\n //Sector-12\n const sector12Fac = Factions[FactionNames.Sector12];\n if (\n !sector12Fac.isBanned &&\n !sector12Fac.isMember &&\n !sector12Fac.alreadyInvited &&\n this.money >= 15000000 &&\n this.city == CityName.Sector12\n ) {\n invitedFactions.push(sector12Fac);\n }\n\n //New Tokyo\n const newtokyoFac = Factions[FactionNames.NewTokyo];\n if (\n !newtokyoFac.isBanned &&\n !newtokyoFac.isMember &&\n !newtokyoFac.alreadyInvited &&\n this.money >= 20000000 &&\n this.city == CityName.NewTokyo\n ) {\n invitedFactions.push(newtokyoFac);\n }\n\n //Aevum\n const aevumFac = Factions[FactionNames.Aevum];\n if (\n !aevumFac.isBanned &&\n !aevumFac.isMember &&\n !aevumFac.alreadyInvited &&\n this.money >= 40000000 &&\n this.city == CityName.Aevum\n ) {\n invitedFactions.push(aevumFac);\n }\n\n //Ishima\n const ishimaFac = Factions[FactionNames.Ishima];\n if (\n !ishimaFac.isBanned &&\n !ishimaFac.isMember &&\n !ishimaFac.alreadyInvited &&\n this.money >= 30000000 &&\n this.city == CityName.Ishima\n ) {\n invitedFactions.push(ishimaFac);\n }\n\n //Volhaven\n const volhavenFac = Factions[FactionNames.Volhaven];\n if (\n !volhavenFac.isBanned &&\n !volhavenFac.isMember &&\n !volhavenFac.alreadyInvited &&\n this.money >= 50000000 &&\n this.city == CityName.Volhaven\n ) {\n invitedFactions.push(volhavenFac);\n }\n\n //Speakers for the Dead\n const speakersforthedeadFac = Factions[FactionNames.SpeakersForTheDead];\n if (\n !speakersforthedeadFac.isBanned &&\n !speakersforthedeadFac.isMember &&\n !speakersforthedeadFac.alreadyInvited &&\n this.hacking >= 100 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.numPeopleKilled >= 30 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(speakersforthedeadFac);\n }\n\n //The Dark Army\n const thedarkarmyFac = Factions[FactionNames.TheDarkArmy];\n if (\n !thedarkarmyFac.isBanned &&\n !thedarkarmyFac.isMember &&\n !thedarkarmyFac.alreadyInvited &&\n this.hacking >= 300 &&\n this.strength >= 300 &&\n this.defense >= 300 &&\n this.dexterity >= 300 &&\n this.agility >= 300 &&\n this.city == CityName.Chongqing &&\n this.numPeopleKilled >= 5 &&\n this.karma <= -45 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thedarkarmyFac);\n }\n\n //The Syndicate\n const thesyndicateFac = Factions[FactionNames.TheSyndicate];\n if (\n !thesyndicateFac.isBanned &&\n !thesyndicateFac.isMember &&\n !thesyndicateFac.alreadyInvited &&\n this.hacking >= 200 &&\n this.strength >= 200 &&\n this.defense >= 200 &&\n this.dexterity >= 200 &&\n this.agility >= 200 &&\n (this.city == CityName.Aevum || this.city == CityName.Sector12) &&\n this.money >= 10000000 &&\n this.karma <= -90 &&\n !allCompanies.includes(LocationName.Sector12CIA) &&\n !allCompanies.includes(LocationName.Sector12NSA)\n ) {\n invitedFactions.push(thesyndicateFac);\n }\n\n //Silhouette\n const silhouetteFac = Factions[FactionNames.Silhouette];\n if (\n !silhouetteFac.isBanned &&\n !silhouetteFac.isMember &&\n !silhouetteFac.alreadyInvited &&\n (allPositions.includes(\"Chief Technology Officer\") ||\n allPositions.includes(\"Chief Financial Officer\") ||\n allPositions.includes(\"Chief Executive Officer\")) &&\n this.money >= 15000000 &&\n this.karma <= -22\n ) {\n invitedFactions.push(silhouetteFac);\n }\n\n //Tetrads\n const tetradsFac = Factions[FactionNames.Tetrads];\n if (\n !tetradsFac.isBanned &&\n !tetradsFac.isMember &&\n !tetradsFac.alreadyInvited &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima) &&\n this.strength >= 75 &&\n this.defense >= 75 &&\n this.dexterity >= 75 &&\n this.agility >= 75 &&\n this.karma <= -18\n ) {\n invitedFactions.push(tetradsFac);\n }\n\n //SlumSnakes\n const slumsnakesFac = Factions[FactionNames.SlumSnakes];\n if (\n !slumsnakesFac.isBanned &&\n !slumsnakesFac.isMember &&\n !slumsnakesFac.alreadyInvited &&\n this.strength >= 30 &&\n this.defense >= 30 &&\n this.dexterity >= 30 &&\n this.agility >= 30 &&\n this.karma <= -9 &&\n this.money >= 1000000\n ) {\n invitedFactions.push(slumsnakesFac);\n }\n\n //Netburners\n const netburnersFac = Factions[FactionNames.Netburners];\n let totalHacknetRam = 0;\n let totalHacknetCores = 0;\n let totalHacknetLevels = 0;\n for (let i = 0; i < this.hacknetNodes.length; ++i) {\n const v = this.hacknetNodes[i];\n if (typeof v === \"string\") {\n const hserver = GetServer(v);\n if (hserver === null || !(hserver instanceof HacknetServer))\n throw new Error(\"player hacknet server was not HacknetServer\");\n totalHacknetLevels += hserver.level;\n totalHacknetRam += hserver.maxRam;\n totalHacknetCores += hserver.cores;\n } else {\n totalHacknetLevels += v.level;\n totalHacknetRam += v.ram;\n totalHacknetCores += v.cores;\n }\n }\n if (\n !netburnersFac.isBanned &&\n !netburnersFac.isMember &&\n !netburnersFac.alreadyInvited &&\n this.hacking >= 80 &&\n totalHacknetRam >= 8 &&\n totalHacknetCores >= 4 &&\n totalHacknetLevels >= 100\n ) {\n invitedFactions.push(netburnersFac);\n }\n\n //Tian Di Hui\n const tiandihuiFac = Factions[FactionNames.TianDiHui];\n if (\n !tiandihuiFac.isBanned &&\n !tiandihuiFac.isMember &&\n !tiandihuiFac.alreadyInvited &&\n this.money >= 1000000 &&\n this.hacking >= 50 &&\n (this.city == CityName.Chongqing || this.city == CityName.NewTokyo || this.city == CityName.Ishima)\n ) {\n invitedFactions.push(tiandihuiFac);\n }\n\n //CyberSec\n const cybersecFac = Factions[FactionNames.CyberSec];\n const cybersecServer = GetServer(SpecialServers.CyberSecServer);\n if (!(cybersecServer instanceof Server)) throw new Error(`${FactionNames.CyberSec} should be normal server`);\n if (cybersecServer == null) {\n console.error(`Could not find ${FactionNames.CyberSec} Server`);\n } else if (\n !cybersecFac.isBanned &&\n !cybersecFac.isMember &&\n cybersecServer.backdoorInstalled &&\n !cybersecFac.alreadyInvited\n ) {\n invitedFactions.push(cybersecFac);\n }\n\n return invitedFactions;\n}\n\n/************* BitNodes **************/\nexport function setBitNodeNumber(this: IPlayer, n: number): void {\n this.bitNodeN = n;\n}\n\nexport function queueAugmentation(this: IPlayer, name: string): void {\n for (const aug of this.queuedAugmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n for (const aug of this.augmentations) {\n if (aug.name == name) {\n console.warn(`tried to queue ${name} twice, this may be a bug`);\n return;\n }\n }\n\n this.queuedAugmentations.push(new PlayerOwnedAugmentation(name));\n}\n\n/************* Coding Contracts **************/\nexport function gainCodingContractReward(this: IPlayer, reward: ICodingContractReward, difficulty = 1): string {\n if (reward == null || reward.type == null) {\n return `No reward for this contract`;\n }\n\n /* eslint-disable no-case-declarations */\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation:\n if (reward.name == null || !(Factions[reward.name] instanceof Faction)) {\n // If no/invalid faction was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n Factions[reward.name].playerReputation += repGain;\n return `Gained ${repGain} faction reputation for ${reward.name}`;\n case CodingContractRewardType.FactionReputationAll:\n const totalGain = CONSTANTS.CodingContractBaseFactionRepGain * difficulty;\n\n // Ignore Bladeburners and other special factions for this calculation\n const specialFactions = [FactionNames.Bladeburners as string];\n const factions = this.factions.slice().filter((f) => {\n return !specialFactions.includes(f);\n });\n\n // If the player was only part of the special factions, we'll just give money\n if (factions.length == 0) {\n reward.type = CodingContractRewardType.Money;\n return this.gainCodingContractReward(reward, difficulty);\n }\n\n const gainPerFaction = Math.floor(totalGain / factions.length);\n for (const facName of factions) {\n if (!(Factions[facName] instanceof Faction)) {\n continue;\n }\n Factions[facName].playerReputation += gainPerFaction;\n }\n return `Gained ${gainPerFaction} reputation for each of the following factions: ${factions.toString()}`;\n case CodingContractRewardType.CompanyReputation: {\n if (reward.name == null || !(Companies[reward.name] instanceof Company)) {\n //If no/invalid company was designated, just give rewards to all factions\n reward.type = CodingContractRewardType.FactionReputationAll;\n return this.gainCodingContractReward(reward);\n }\n const repGain = CONSTANTS.CodingContractBaseCompanyRepGain * difficulty;\n Companies[reward.name].playerReputation += repGain;\n return `Gained ${repGain} company reputation for ${reward.name}`;\n }\n case CodingContractRewardType.Money:\n default: {\n const moneyGain = CONSTANTS.CodingContractBaseMoneyGain * difficulty * BitNodeMultipliers.CodingContractMoney;\n this.gainMoney(moneyGain, \"codingcontract\");\n return `Gained ${numeralWrapper.formatMoney(moneyGain)}`;\n }\n }\n /* eslint-enable no-case-declarations */\n}\n\nexport function travel(this: IPlayer, to: CityName): boolean {\n if (Cities[to] == null) {\n console.warn(`Player.travel() called with invalid city: ${to}`);\n return false;\n }\n this.city = to;\n\n return true;\n}\n\nexport function gotoLocation(this: IPlayer, to: LocationName): boolean {\n if (Locations[to] == null) {\n console.warn(`Player.gotoLocation() called with invalid location: ${to}`);\n return false;\n }\n this.location = to;\n\n return true;\n}\n\nexport function canAccessGrafting(this: IPlayer): boolean {\n return this.bitNodeN === 10 || SourceFileFlags[10] > 0;\n}\n\nexport function giveExploit(this: IPlayer, exploit: Exploit): void {\n if (!this.exploits.includes(exploit)) {\n this.exploits.push(exploit);\n SnackbarEvents.emit(\"SF -1 acquired!\", \"success\", 2000);\n }\n}\n\nexport function giveAchievement(this: IPlayer, achievementId: string): void {\n const achievement = achievements[achievementId];\n if (!achievement) return;\n if (!this.achievements.map((a) => a.ID).includes(achievementId)) {\n this.achievements.push({ ID: achievementId, unlockedOn: new Date().getTime() });\n SnackbarEvents.emit(`Unlocked Achievement: \"${achievement.Name}\"`, \"success\", 2000);\n }\n}\n\nexport function getIntelligenceBonus(this: IPlayer, weight: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n}\n\nexport function getCasinoWinnings(this: IPlayer): number {\n return this.moneySourceA.casino;\n}\n\nexport function getMult(this: IPlayer, name: string): number {\n if (!this.hasOwnProperty(name)) return 1;\n return (this as any)[name];\n}\n\nexport function setMult(this: IPlayer, name: string, mult: number): void {\n if (!this.hasOwnProperty(name)) return;\n (this as any)[name] = mult;\n}\n\nexport function canAccessCotMG(this: IPlayer): boolean {\n return this.bitNodeN === 13 || SourceFileFlags[13] > 0;\n}\n\nexport function sourceFileLvl(this: IPlayer, n: number): number {\n const sf = this.sourceFiles.find((sf) => sf.n === n);\n if (!sf) return 0;\n return sf.lvl;\n}\n","// Class representing a single hackable Server\nimport { BaseServer } from \"./BaseServer\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\nimport { createRandomString } from \"../utils/helpers/createRandomString\";\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n adminRights?: boolean;\n hackDifficulty?: number;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n moneyAvailable?: number;\n numOpenPortsRequired?: number;\n organizationName?: string;\n purchasedByPlayer?: boolean;\n requiredHackingSkill?: number;\n serverGrowth?: number;\n}\n\nexport class Server extends BaseServer {\n // Flag indicating whether this server has a backdoor installed by a player\n backdoorInstalled = false;\n\n // Initial server security level\n // (i.e. security level when the server was created)\n baseDifficulty = 1;\n\n // Server Security Level\n hackDifficulty = 1;\n\n // Minimum server security level that this server can be weakened to\n minDifficulty = 1;\n\n // How much money currently resides on the server and can be hacked\n moneyAvailable = 0;\n\n // Maximum amount of money that this server can hold\n moneyMax = 0;\n\n // Number of open ports required in order to gain admin/root access\n numOpenPortsRequired = 5;\n\n // How many ports are currently opened on the server\n openPortCount = 0;\n\n // Hacking level required to hack this server\n requiredHackingSkill = 1;\n\n // Parameter that affects how effectively this server's money can\n // be increased using the grow() Netscript function\n serverGrowth = 1;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n // \"hacknet-node-X\" hostnames are reserved for Hacknet Servers\n if (this.hostname.startsWith(\"hacknet-node-\")) {\n this.hostname = createRandomString(10);\n }\n\n this.purchasedByPlayer = params.purchasedByPlayer != null ? params.purchasedByPlayer : false;\n\n //RAM, CPU speed and Scripts\n this.maxRam = params.maxRam != null ? params.maxRam : 0; //GB\n\n /* Hacking information (only valid for \"foreign\" aka non-purchased servers) */\n this.requiredHackingSkill = params.requiredHackingSkill != null ? params.requiredHackingSkill : 1;\n this.moneyAvailable =\n params.moneyAvailable != null ? params.moneyAvailable * BitNodeMultipliers.ServerStartingMoney : 0;\n this.moneyMax = 25 * this.moneyAvailable * BitNodeMultipliers.ServerMaxMoney;\n\n //Hack Difficulty is synonymous with server security. Base Difficulty = Starting difficulty\n this.hackDifficulty =\n params.hackDifficulty != null ? params.hackDifficulty * BitNodeMultipliers.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\n //Port information, required for porthacking servers to get admin rights\n this.numOpenPortsRequired = params.numOpenPortsRequired != null ? params.numOpenPortsRequired : 5;\n }\n\n /**\n * Ensures that the server's difficulty (server security) doesn't get too high\n */\n capDifficulty(): void {\n if (this.hackDifficulty < this.minDifficulty) {\n this.hackDifficulty = this.minDifficulty;\n }\n if (this.hackDifficulty < 1) {\n this.hackDifficulty = 1;\n }\n\n // Place some arbitrarily limit that realistically should never happen unless someone is\n // screwing around with the game\n if (this.hackDifficulty > 100) {\n this.hackDifficulty = 100;\n }\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 changeMinimumSecurity(n: number, perc = false): void {\n if (perc) {\n this.minDifficulty *= n;\n } else {\n this.minDifficulty += n;\n }\n\n // Server security cannot go below 1\n this.minDifficulty = Math.max(1, this.minDifficulty);\n }\n\n /**\n * Change this server's maximum money\n * @param n - Value by which to change the server's maximum money\n */\n changeMaximumMoney(n: number): void {\n const softCap = 10e12;\n if (this.moneyMax > softCap) {\n const aboveCap = this.moneyMax - softCap;\n n = 1 + (n - 1) / Math.log(aboveCap) / Math.log(8);\n }\n\n this.moneyMax *= n;\n }\n\n /**\n * Strengthens a server's security level (difficulty) by the specified amount\n */\n fortify(amt: number): void {\n this.hackDifficulty += amt;\n this.capDifficulty();\n }\n\n /**\n * Lowers the server's security level (difficulty) by the specified amount)\n */\n weaken(amt: number): void {\n this.hackDifficulty -= amt * BitNodeMultipliers.ServerWeakenRate;\n this.capDifficulty();\n }\n\n /**\n * Serialize the current object to a JSON save state\n */\n toJSON(): any {\n return Generic_toJSON(\"Server\", this);\n }\n\n // Initializes a Server Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Server {\n return Generic_fromJSON(Server, value.data);\n }\n}\n\nReviver.constructors.Server = Server;\n","import React, { useContext } from \"react\";\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\n\nexport const Context: {\n Corporation: React.Context;\n Division: React.Context;\n} = {\n Corporation: React.createContext({} as ICorporation),\n Division: React.createContext({} as IIndustry),\n};\n\nexport const useCorporation = (): ICorporation => useContext(Context.Corporation);\nexport const useDivision = (): IIndustry => useContext(Context.Division);\n","import React from \"react\";\nimport { ResearchTree } from \"./ResearchTree\";\nimport { ICorporation } from \"./ICorporation\";\nimport { getBaseResearchTreeCopy, getProductIndustryResearchTreeCopy } from \"./data/BaseResearchTree\";\nimport { MoneyCost } from \"./ui/MoneyCost\";\n\ninterface IIndustryMap {\n [key: string]: T | undefined;\n Energy: T;\n Utilities: T;\n Agriculture: T;\n Fishing: T;\n Mining: T;\n Food: T;\n Tobacco: T;\n Chemical: T;\n Pharmaceutical: T;\n Computer: T;\n Robotics: T;\n Software: T;\n Healthcare: T;\n RealEstate: T;\n}\n\n// Map of official names for each Industry\nexport const Industries: IIndustryMap = {\n Energy: \"Energy\",\n Utilities: \"Water Utilities\",\n Agriculture: \"Agriculture\",\n Fishing: \"Fishing\",\n Mining: \"Mining\",\n Food: \"Food\",\n Tobacco: \"Tobacco\",\n Chemical: \"Chemical\",\n Pharmaceutical: \"Pharmaceutical\",\n Computer: \"Computer Hardware\",\n Robotics: \"Robotics\",\n Software: \"Software\",\n Healthcare: \"Healthcare\",\n RealEstate: \"RealEstate\",\n};\n\n// Map of how much money it takes to start each industry\nexport const IndustryStartingCosts: IIndustryMap = {\n Energy: 225e9,\n Utilities: 150e9,\n Agriculture: 40e9,\n Fishing: 80e9,\n Mining: 300e9,\n Food: 10e9,\n Tobacco: 20e9,\n Chemical: 70e9,\n Pharmaceutical: 200e9,\n Computer: 500e9,\n Robotics: 1e12,\n Software: 25e9,\n Healthcare: 750e9,\n RealEstate: 600e9,\n};\n\n// Map of description for each industry\nexport const IndustryDescriptions: IIndustryMap<(corp: ICorporation) => React.ReactElement> = {\n Energy: (corp: ICorporation) => (\n <>\n Engage in the production and distribution of energy.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Utilities: (corp: ICorporation) => (\n <>\n Distribute water and provide wastewater services.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Agriculture: (corp: ICorporation) => (\n <>\n Cultivate crops and breed livestock to produce food.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: YES\n \n ),\n Fishing: (corp: ICorporation) => (\n <>\n Produce food through the breeding and processing of fish and fish products.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Mining: (corp: ICorporation) => (\n <>\n Extract and process metals from the earth.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Food: (corp: ICorporation) => (\n <>\n Create your own restaurants all around the world.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: YES\n \n ),\n Tobacco: (corp: ICorporation) => (\n <>\n Create and distribute tobacco and tobacco-related products.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: YES\n \n ),\n Chemical: (corp: ICorporation) => (\n <>\n Produce industrial chemicals.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Pharmaceutical: (corp: ICorporation) => (\n <>\n Discover, develop, and create new pharmaceutical drugs.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Computer: (corp: ICorporation) => (\n <>\n Develop and manufacture new computer hardware and networking infrastructures.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Robotics: (corp: ICorporation) => (\n <>\n Develop and create robots.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n Software: (corp: ICorporation) => (\n <>\n Develop computer software and create AI Cores.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: YES\n \n ),\n Healthcare: (corp: ICorporation) => (\n <>\n Create and manage hospitals.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n RealEstate: (corp: ICorporation) => (\n <>\n Develop and manage real estate properties.\n
    \n
    \n Starting cost: \n
    \n Recommended starting Industry: NO\n \n ),\n};\n\n// Map of available Research for each Industry. This data is held in a\n// ResearchTree object\nexport const IndustryResearchTrees: IIndustryMap = {\n Energy: getBaseResearchTreeCopy(),\n Utilities: getBaseResearchTreeCopy(),\n Agriculture: getBaseResearchTreeCopy(),\n Fishing: getBaseResearchTreeCopy(),\n Mining: getBaseResearchTreeCopy(),\n Food: getProductIndustryResearchTreeCopy(),\n Tobacco: getProductIndustryResearchTreeCopy(),\n Chemical: getBaseResearchTreeCopy(),\n Pharmaceutical: getProductIndustryResearchTreeCopy(),\n Computer: getProductIndustryResearchTreeCopy(),\n Robotics: getProductIndustryResearchTreeCopy(),\n Software: getProductIndustryResearchTreeCopy(),\n Healthcare: getProductIndustryResearchTreeCopy(),\n RealEstate: getProductIndustryResearchTreeCopy(),\n};\n\nexport function resetIndustryResearchTrees(): void {\n IndustryResearchTrees.Energy = getBaseResearchTreeCopy();\n IndustryResearchTrees.Utilities = getBaseResearchTreeCopy();\n IndustryResearchTrees.Agriculture = getBaseResearchTreeCopy();\n IndustryResearchTrees.Fishing = getBaseResearchTreeCopy();\n IndustryResearchTrees.Mining = getBaseResearchTreeCopy();\n IndustryResearchTrees.Food = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Tobacco = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Chemical = getBaseResearchTreeCopy();\n IndustryResearchTrees.Pharmaceutical = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Computer = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Robotics = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Software = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.Healthcare = getProductIndustryResearchTreeCopy();\n IndustryResearchTrees.RealEstate = getProductIndustryResearchTreeCopy();\n}\n","/**\n * Enum defining the different types of possible locations\n */\nexport enum LocationType {\n Company,\n Gym,\n Hospital,\n Slums,\n Special, // This location has special options/activities (e.g. Bladeburner, Re-sleeving)\n StockMarket,\n TechVendor,\n TravelAgency,\n University,\n Casino,\n}\n","import { IMap } from \"../types\";\n\nexport const EmployeePositions: IMap = {\n Operations: \"Operations\",\n Engineer: \"Engineer\",\n Business: \"Business\",\n Management: \"Management\",\n RandD: \"Research & Development\",\n Training: \"Training\",\n Unassigned: \"Unassigned\",\n};\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 */\nimport { HacknetNode } from \"./HacknetNode\";\nimport { calculateNodeCost } from \"./formulas/HacknetNodes\";\nimport { calculateServerCost } from \"./formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"./data/Constants\";\nimport { HacknetServer } from \"./HacknetServer\";\nimport { HashManager } from \"./HashManager\";\nimport { HashUpgrades } from \"./HashUpgrades\";\n\nimport { generateRandomContract } from \"../CodingContractGenerator\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../InteractiveTutorial\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Server } from \"../Server/Server\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\n// Returns a boolean indicating whether the player has Hacknet Servers\n// (the upgraded form of Hacknet Nodes)\nexport function hasHacknetServers(player: IPlayer): boolean {\n return player.bitNodeN === 9 || SourceFileFlags[9] > 0;\n}\n\nexport function purchaseHacknet(player: IPlayer): number {\n /* INTERACTIVE TUTORIAL */\n if (ITutorial.isRunning) {\n if (ITutorial.currStep === iTutorialSteps.HacknetNodesIntroduction) {\n iTutorialNextStep();\n } else {\n return -1;\n }\n }\n /* END INTERACTIVE TUTORIAL */\n\n const numOwned = player.hacknetNodes.length;\n if (hasHacknetServers(player)) {\n const cost = getCostOfNextHacknetServer(player);\n if (isNaN(cost)) {\n throw new Error(`Calculated cost of purchasing HacknetServer is NaN`);\n }\n\n if (!player.canAfford(cost) || numOwned >= HacknetServerConstants.MaxServers) {\n return -1;\n }\n player.loseMoney(cost, \"hacknet_expenses\");\n player.createHacknetServer();\n updateHashManagerCapacity(player);\n\n return numOwned;\n } else {\n const cost = getCostOfNextHacknetNode(player);\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 }\n\n // Auto generate a name for the Node\n const name = \"hacknet-node-\" + numOwned;\n const node = new HacknetNode(name, player.hacknet_node_money_mult);\n\n player.loseMoney(cost, \"hacknet_expenses\");\n player.hacknetNodes.push(node);\n\n return numOwned;\n }\n}\n\nexport function hasMaxNumberHacknetServers(player: IPlayer): boolean {\n return hasHacknetServers(player) && player.hacknetNodes.length >= HacknetServerConstants.MaxServers;\n}\n\nexport function getCostOfNextHacknetNode(player: IPlayer): number {\n return calculateNodeCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\nexport function getCostOfNextHacknetServer(player: IPlayer): number {\n return calculateServerCost(player.hacknetNodes.length + 1, player.hacknet_node_purchase_cost_mult);\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's level\nexport function getMaxNumberLevelUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberLevelUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < 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 if (player.money > 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 if (\n curr !== maxLevel &&\n player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult) &&\n player.money < nodeObj.calculateLevelUpgradeCost(curr + 1, player.hacknet_node_level_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n max = curr - 1;\n } else if (player.money > nodeObj.calculateLevelUpgradeCost(curr, player.hacknet_node_level_cost_mult)) {\n min = curr + 1;\n } else {\n return Math.min(levelsToMax, curr);\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's RAM\nexport function getMaxNumberRamUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberRamUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < nodeObj.calculateRamUpgradeCost(1, player.hacknet_node_ram_cost_mult)) {\n return 0;\n }\n\n let levelsToMax;\n if (nodeObj instanceof HacknetServer) {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.maxRam));\n } else {\n levelsToMax = Math.round(Math.log2(maxLevel / nodeObj.ram));\n }\n if (player.money > nodeObj.calculateRamUpgradeCost(levelsToMax, player.hacknet_node_ram_cost_mult)) {\n return levelsToMax;\n }\n\n //We'll just loop until we find the max\n for (let i = levelsToMax - 1; i >= 0; --i) {\n if (player.money > nodeObj.calculateRamUpgradeCost(i, player.hacknet_node_ram_cost_mult)) {\n return i;\n }\n }\n return 0;\n}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cores\nexport function getMaxNumberCoreUpgrades(\n player: IPlayer,\n nodeObj: HacknetNode | HacknetServer,\n maxLevel: number,\n): number {\n if (maxLevel == null) {\n throw new Error(`getMaxNumberCoreUpgrades() called without maxLevel arg`);\n }\n\n if (player.money < 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 if (player.money > nodeObj.calculateCoreUpgradeCost(levelsToMax, player.hacknet_node_core_cost_mult)) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.money > nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult) &&\n player.money < nodeObj.calculateCoreUpgradeCost(curr + 1, player.hacknet_node_core_cost_mult)\n ) {\n return Math.min(levelsToMax, curr);\n } else if (player.money < nodeObj.calculateCoreUpgradeCost(curr, player.hacknet_node_core_cost_mult)) {\n max = curr - 1;\n } else if (player.money > 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}\n\n// Calculate the maximum number of times the Player can afford to upgrade a Hacknet Node's cache\nexport function getMaxNumberCacheUpgrades(player: IPlayer, nodeObj: HacknetServer, maxLevel: number): number {\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 if (player.canAfford(nodeObj.calculateCacheUpgradeCost(levelsToMax))) {\n return levelsToMax;\n }\n\n // Use a binary search to find the max possible number of upgrades\n while (min <= max) {\n const curr = ((min + max) / 2) | 0;\n if (\n curr != maxLevel &&\n player.canAfford(nodeObj.calculateCacheUpgradeCost(curr)) &&\n !player.canAfford(nodeObj.calculateCacheUpgradeCost(curr + 1))\n ) {\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}\n\nexport function purchaseLevelUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateLevelUpgradeCost(sanitizedLevels, player.hacknet_node_level_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // If we're at max level, return false\n if (node.level >= (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max level, calculate\n // the maximum number of upgrades and use that\n if (node.level + sanitizedLevels > (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.MaxLevel)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxLevel : HacknetNodeConstants.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, \"hacknet_expenses\");\n node.upgradeLevel(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseRamUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateRamUpgradeCost(sanitizedLevels, player.hacknet_node_ram_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (node instanceof HacknetServer && node.maxRam >= HacknetServerConstants.MaxRam) {\n return false;\n }\n\n if (node instanceof HacknetNode && node.ram >= HacknetNodeConstants.MaxRam) {\n return false;\n }\n\n // If the number of specified upgrades would exceed the max RAM, calculate the\n // max possible number of upgrades and use that\n if (node instanceof HacknetServer) {\n if (node.maxRam * Math.pow(2, sanitizedLevels) > HacknetServerConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetServerConstants.MaxRam / node.maxRam)));\n return purchaseRamUpgrade(player, node, diff);\n }\n } else if (node instanceof HacknetNode) {\n if (node.ram * Math.pow(2, sanitizedLevels) > HacknetNodeConstants.MaxRam) {\n const diff = Math.max(0, Math.log2(Math.round(HacknetNodeConstants.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, \"hacknet_expenses\");\n node.upgradeRam(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCoreUpgrade(player: IPlayer, node: HacknetNode | HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCoreUpgradeCost(sanitizedLevels, player.hacknet_node_core_cost_mult);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n const isServer = node instanceof HacknetServer;\n\n // Fail if we're already at max\n if (node.cores >= (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n return false;\n }\n\n // If the specified number of upgrades would exceed the max Cores, calculate\n // the max possible number of upgrades and use that\n if (node.cores + sanitizedLevels > (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.MaxCores)) {\n const diff = Math.max(0, (isServer ? HacknetServerConstants.MaxCores : HacknetNodeConstants.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, \"hacknet_expenses\");\n node.upgradeCore(sanitizedLevels, player.hacknet_node_money_mult);\n\n return true;\n}\n\nexport function purchaseCacheUpgrade(player: IPlayer, node: HacknetServer, levels = 1): boolean {\n const sanitizedLevels = Math.round(levels);\n const cost = node.calculateCacheUpgradeCost(sanitizedLevels);\n if (isNaN(cost) || cost <= 0 || sanitizedLevels < 0) {\n return false;\n }\n\n if (!(node instanceof HacknetServer)) {\n console.warn(`purchaseCacheUpgrade() called for a non-HacknetNode`);\n return false;\n }\n\n // Fail if we're already at max\n if (node.cache + sanitizedLevels > HacknetServerConstants.MaxCache) {\n const diff = Math.max(0, HacknetServerConstants.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, \"hacknet_expenses\");\n node.upgradeCache(sanitizedLevels);\n\n return true;\n}\n\nexport function processHacknetEarnings(player: IPlayer, numCycles: number): number {\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 if (hasHacknetServers(player)) {\n return processAllHacknetServerEarnings(player, numCycles);\n } else if (player.hacknetNodes[0] instanceof HacknetNode) {\n return processAllHacknetNodeEarnings(player, numCycles);\n } else {\n return 0;\n }\n}\n\nfunction processAllHacknetNodeEarnings(player: IPlayer, numCycles: number): number {\n let total = 0;\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: IPlayer, numCycles: number, nodeObj: HacknetNode): number {\n const totalEarnings = nodeObj.process(numCycles);\n player.gainMoney(totalEarnings, \"hacknet\");\n\n return totalEarnings;\n}\n\nfunction processAllHacknetServerEarnings(player: IPlayer, numCycles: number): number {\n if (!(player.hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager (should be in 'hashManager' prop)`);\n }\n\n let hashes = 0;\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) throw new Error(`player nodes should not be HacketNode`);\n const hserver = GetServer(ip);\n if (!(hserver instanceof HacknetServer)) throw new Error(`player nodes shoud not be Server`);\n hserver.updateHashRate(player.hacknet_node_money_mult);\n const h = hserver.process(numCycles);\n hashes += h;\n }\n\n const wastedHashes = player.hashManager.storeHashes(hashes);\n if (wastedHashes > 0) {\n const upgrade = HashUpgrades[\"Sell for Money\"];\n if (upgrade === null) throw new Error(\"Could not get the hash upgrade\");\n if (!upgrade.cost) throw new Error(\"Upgrade is not properly configured\");\n\n const multiplier = Math.floor(wastedHashes / upgrade.cost);\n if (multiplier > 0) {\n player.gainMoney(upgrade.value * multiplier, \"hacknet\");\n }\n }\n\n return hashes;\n}\n\nexport function updateHashManagerCapacity(player: IPlayer): void {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return;\n }\n\n const nodes = player.hacknetNodes;\n if (nodes.length === 0) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n let total = 0;\n for (let i = 0; i < nodes.length; ++i) {\n if (typeof nodes[i] !== \"string\") {\n player.hashManager.updateCapacity(0);\n return;\n }\n const ip = nodes[i];\n if (ip instanceof HacknetNode) throw new Error(`player nodes should be string but isn't`);\n const h = GetServer(ip);\n if (!(h instanceof HacknetServer)) {\n player.hashManager.updateCapacity(0);\n return;\n }\n\n total += h.hashCapacity;\n }\n\n player.hashManager.updateCapacity(total);\n}\n\nexport function purchaseHashUpgrade(player: IPlayer, upgName: string, upgTarget: string): boolean {\n if (!(player.hashManager instanceof HashManager)) {\n console.error(`Player does not have a HashManager`);\n return false;\n }\n\n // HashManager handles the transaction. This just needs to actually implement\n // the effects of the upgrade\n if (player.hashManager.upgrade(upgName)) {\n const upg = HashUpgrades[upgName];\n\n switch (upgName) {\n case \"Sell for Money\": {\n player.gainMoney(upg.value, \"hacknet\");\n break;\n }\n case \"Sell for Corporation Funds\": {\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n corp.funds = corp.funds + upg.value;\n break;\n }\n case \"Reduce Minimum Security\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMinimumSecurity(upg.value, true);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Increase Maximum Money\": {\n try {\n const target = GetServer(upgTarget);\n if (target == null) {\n console.error(`Invalid target specified in purchaseHashUpgrade(): ${upgTarget}`);\n return false;\n }\n if (!(target instanceof Server)) throw new Error(`'${upgTarget}' is not a normal server.`);\n\n target.changeMaximumMoney(upg.value);\n } catch (e) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n break;\n }\n case \"Improve Studying\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Improve Gym Training\": {\n // Multiplier handled by HashManager\n break;\n }\n case \"Exchange for Corporation Research\": {\n // This will throw if player doesn't have a corporation\n const corp = player.corporation;\n if (corp === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n for (const division of corp.divisions) {\n division.sciResearch.qty += upg.value;\n }\n break;\n }\n case \"Exchange for Bladeburner Rank\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n bladeburner.changeRank(player, upg.value);\n break;\n }\n case \"Exchange for Bladeburner SP\": {\n // This will throw if player isnt in Bladeburner\n const bladeburner = player.bladeburner;\n if (bladeburner === null) {\n player.hashManager.refundUpgrade(upgName);\n return false;\n }\n\n bladeburner.skillPoints += upg.value;\n break;\n }\n case \"Generate Coding Contract\": {\n generateRandomContract();\n break;\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","import { Augmentation } from \"./Augmentation\";\nimport { IMap } from \"../types\";\n\nexport const Augmentations: IMap = {};\n","export enum BlackOperationNames {\n OperationTyphoon = \"Operation Typhoon\",\n OperationZero = \"Operation Zero\",\n OperationX = \"Operation X\",\n OperationTitan = \"Operation Titan\",\n OperationAres = \"Operation Ares\",\n OperationArchangel = \"Operation Archangel\",\n OperationJuggernaut = \"Operation Juggernaut\",\n OperationRedDragon = \"Operation Red Dragon\",\n OperationK = \"Operation K\",\n OperationDeckard = \"Operation Deckard\",\n OperationTyrell = \"Operation Tyrell\",\n OperationWallace = \"Operation Wallace\",\n OperationShoulderOfOrion = \"Operation Shoulder of Orion\",\n OperationHyron = \"Operation Hyron\",\n OperationMorpheus = \"Operation Morpheus\",\n OperationIonStorm = \"Operation Ion Storm\",\n OperationAnnihilus = \"Operation Annihilus\",\n OperationUltron = \"Operation Ultron\",\n OperationCenturion = \"Operation Centurion\",\n OperationVindictus = \"Operation Vindictus\",\n OperationDaedalus = \"Operation Daedalus\",\n}\n","import { CityName } from './../../Locations/data/CityNames';\nexport const BladeburnerConstants: {\n CityNames: string[];\n CyclesPerSecond: number;\n StaminaGainPerSecond: number;\n BaseStaminaLoss: number;\n MaxStaminaToGainFactor: number;\n DifficultyToTimeFactor: number;\n DiffMultExponentialFactor: number;\n DiffMultLinearFactor: number;\n EffAgiLinearFactor: number;\n EffDexLinearFactor: number;\n EffAgiExponentialFactor: number;\n EffDexExponentialFactor: number;\n BaseRecruitmentTimeNeeded: number;\n PopulationThreshold: number;\n PopulationExponent: number;\n ChaosThreshold: number;\n BaseStatGain: number;\n BaseIntGain: number;\n ActionCountGrowthPeriod: number;\n RankToFactionRepFactor: number;\n RankNeededForFaction: number;\n ContractSuccessesPerLevel: number;\n OperationSuccessesPerLevel: number;\n RanksPerSkillPoint: number;\n ContractBaseMoneyGain: number;\n HrcHpGain: number;\n HrcStaminaGain: number;\n} = {\n CityNames: [CityName.Aevum, CityName.Chongqing, CityName.Sector12, CityName.NewTokyo, CityName.Ishima, CityName.Volhaven],\n CyclesPerSecond: 5, // Game cycle is 200 ms\n\n StaminaGainPerSecond: 0.0085,\n BaseStaminaLoss: 0.285, // Base stamina loss per action. Increased based on difficulty\n MaxStaminaToGainFactor: 70000, // Max Stamina is divided by this to get bonus stamina gain\n\n DifficultyToTimeFactor: 10, // Action Difficulty divided by this to get base action time\n\n /**\n * The difficulty multiplier affects stamina loss and hp loss of an action. Also affects\n * experience gain. Its formula is:\n * difficulty ^ exponentialFactor + difficulty / linearFactor\n */\n DiffMultExponentialFactor: 0.28,\n DiffMultLinearFactor: 650,\n\n /**\n * These factors are used to calculate action time.\n * They affect how much action time is reduced based on your agility and dexterity\n */\n EffAgiLinearFactor: 10e3,\n EffDexLinearFactor: 10e3,\n EffAgiExponentialFactor: 0.04,\n EffDexExponentialFactor: 0.035,\n\n BaseRecruitmentTimeNeeded: 300, // Base time needed (s) to complete a Recruitment action\n\n PopulationThreshold: 1e9, // Population which determines baseline success rate\n PopulationExponent: 0.7, // Exponent that influences how different populations affect success rate\n ChaosThreshold: 50, // City chaos level after which it starts making tasks harder\n\n BaseStatGain: 1, // Base stat gain per second\n BaseIntGain: 0.003, // Base intelligence stat gain\n\n ActionCountGrowthPeriod: 480, // Time (s) it takes for action count to grow by its specified value\n\n RankToFactionRepFactor: 2, // Delta Faction Rep = this * Delta Rank\n RankNeededForFaction: 25,\n\n ContractSuccessesPerLevel: 3, // How many successes you need to level up a contract\n OperationSuccessesPerLevel: 2.5, // How many successes you need to level up an op\n\n RanksPerSkillPoint: 3, // How many ranks needed to get 1 Skill Point\n\n ContractBaseMoneyGain: 250e3, // Base Money Gained per contract\n\n HrcHpGain: 2, // HP Gained from Hyperbolic Regeneration chamber\n HrcStaminaGain: 1, // Percentage Stamina gained from Hyperbolic Regeneration Chamber\n};\n","import { IMap } from \"../../types\";\n\nexport const LiteratureNames: IMap = {\n HackersStartingHandbook: \"hackers-starting-handbook.lit\",\n CorporationManagementHandbook: \"corporation-management-handbook.lit\",\n HistoryOfSynthoids: \"history-of-synthoids.lit\",\n AGreenTomorrow: \"A-Green-Tomorrow.lit\",\n AlphaOmega: \"alpha-omega.lit\",\n SimulatedReality: \"simulated-reality.lit\",\n BeyondMan: \"beyond-man.lit\",\n BrighterThanTheSun: \"brighter-than-the-sun.lit\",\n DemocracyIsDead: \"democracy-is-dead.lit\",\n Sector12Crime: \"sector-12-crime.lit\",\n ManAndMachine: \"man-and-machine.lit\",\n SecretSocieties: \"secret-societies.lit\",\n TheFailedFrontier: \"the-failed-frontier.lit\",\n CodedIntelligence: \"coded-intelligence.lit\",\n SyntheticMuscles: \"synthetic-muscles.lit\",\n TensionsInTechRace: \"tensions-in-tech-race.lit\",\n CostOfImmortality: \"cost-of-immortality.lit\",\n TheHiddenWorld: \"the-hidden-world.lit\",\n TheNewGod: \"the-new-god.lit\",\n NewTriads: \"new-triads.lit\",\n TheSecretWar: \"the-secret-war.lit\",\n};\n","import { Program } from \"./Program\";\nimport { programsMetadata } from \"./data/ProgramsMetadata\";\nimport { IMap } from \"../types\";\n\nexport const Programs: IMap = {};\n\nfor (const params of programsMetadata) {\n Programs[params.key] = new Program(params.name, params.create, params.run);\n}\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companiesMetadata } from \"./data/CompaniesMetadata\";\nimport { Company, IConstructorParams } from \"./Company\";\nimport { IMap } from \"../types\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let Companies: IMap = {};\n\nfunction addCompany(params: IConstructorParams): void {\n if (Companies[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n Companies[params.name] = new Company(params);\n}\n\n// Used to initialize new Company objects for the Companies map\n// Called when creating new game or after a prestige/reset\nexport function initCompanies(): void {\n // Save Old Company data for 'favor'\n const oldCompanies = Companies;\n\n // Re-construct all Companies\n Companies = {};\n companiesMetadata.forEach((e) => {\n addCompany(e);\n });\n\n // Reset data\n for (const companyName of Object.keys(Companies)) {\n const company = Companies[companyName];\n const oldCompany = oldCompanies[companyName];\n if (!(oldCompany instanceof Company)) {\n // New game, so no OldCompanies data\n company.favor = 0;\n } else {\n company.favor = oldCompanies[companyName].favor;\n if (isNaN(company.favor)) {\n company.favor = 0;\n }\n }\n }\n}\n\n// Used to load Companies map from a save\nexport function loadCompanies(saveString: string): void {\n Companies = JSON.parse(saveString, Reviver);\n}\n","import { IPlayer } from \"src/PersonObjects/IPlayer\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { Industry } from \"./Industry\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Material } from \"./Material\";\nimport { Product } from \"./Product\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationUnlockUpgrade } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade } from \"./data/CorporationUpgrades\";\nimport { Cities } from \"../Locations/Cities\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Employee } from \"./Employee\";\nimport { IndustryUpgrades } from \"./IndustryUpgrades\";\nimport { ResearchMap } from \"./ResearchMap\";\nimport { isRelevantMaterial } from \"./ui/Helpers\";\nimport { CityName } from \"src/Locations/data/CityNames\";\n\nexport function NewIndustry(corporation: ICorporation, industry: string, name: string): void {\n if (corporation.divisions.find(({ type }) => industry == type))\n throw new Error(`You have already expanded into the ${industry} industry!`);\n\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 }\n }\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n if (corporation.funds < 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 - cost;\n corporation.divisions.push(\n new Industry({\n corp: corporation,\n name: name,\n type: industry,\n }),\n );\n }\n}\n\nexport function NewCity(corporation: ICorporation, division: IIndustry, city: string): void {\n if (corporation.funds < CorporationConstants.OfficeInitialCost) {\n throw new Error(\"You don't have enough company funds to open a new office!\");\n } else {\n corporation.funds = corporation.funds - CorporationConstants.OfficeInitialCost;\n division.offices[city] = new OfficeSpace({\n loc: city,\n size: CorporationConstants.OfficeInitialSize,\n });\n }\n}\n\nexport function UnlockUpgrade(corporation: ICorporation, upgrade: CorporationUnlockUpgrade): void {\n if (corporation.funds < upgrade[1]) {\n throw new Error(\"Insufficient funds\");\n }\n if (corporation.unlockUpgrades[upgrade[0]] === 1) {\n throw new Error(`You have already unlocked the ${upgrade[2]} upgrade!`);\n }\n corporation.unlock(upgrade);\n}\n\nexport function LevelUpgrade(corporation: ICorporation, upgrade: CorporationUpgrade): void {\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 if (corporation.funds < cost) {\n throw new Error(\"Insufficient funds\");\n } else {\n corporation.upgrade(upgrade);\n }\n}\n\nexport function IssueDividends(corporation: ICorporation, percent: number): void {\n if (isNaN(percent) || percent < 0 || percent > CorporationConstants.DividendMaxPercentage) {\n throw new Error(`Invalid value. Must be an integer between 0 and ${CorporationConstants.DividendMaxPercentage}`);\n }\n\n corporation.dividendPercentage = percent * 100;\n}\n\nexport function SellMaterial(mat: Material, amt: string, price: string): void {\n if (price === \"\") price = \"0\";\n if (amt === \"\") amt = \"0\";\n let cost = price.replace(/\\s+/g, \"\");\n cost = cost.replace(/[^-()\\d/*+.MPe]/g, \"\"); //Sanitize cost\n let temp = cost.replace(/MP/g, mat.bCost + \"\");\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)) || parseFloat(temp) < 0) {\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 }\n\n //Parse quantity\n amt = amt.toUpperCase();\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, mat.maxsll.toString());\n tempQty = tempQty.replace(/PROD/g, mat.prd.toString());\n try {\n tempQty = eval(tempQty);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell quantity field: \" + e);\n }\n\n if (tempQty == null || isNaN(parseFloat(tempQty)) || parseFloat(tempQty) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\n }\n\n mat.sllman[0] = true;\n mat.sllman[1] = q; //Use sanitized input\n } else if (isNaN(parseFloat(amt)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let q = parseFloat(amt);\n if (isNaN(q)) {\n q = 0;\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}\n\nexport function SellProduct(product: Product, city: string, amt: string, price: string, all: boolean): void {\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 try {\n temp = eval(temp);\n } catch (e) {\n throw new Error(\"Invalid value or expression for sell price field: \" + e);\n }\n if (temp == null || isNaN(parseFloat(temp)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell price field.\");\n }\n product.sCost = price; //Use sanitized price\n } else {\n const cost = parseFloat(price);\n if (isNaN(cost)) {\n throw new Error(\"Invalid value for sell price field\");\n }\n product.sCost = cost;\n }\n\n // Array of all cities. Used later\n const cities = Object.keys(Cities);\n\n // Parse quantity\n amt = amt.toUpperCase();\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, product.maxsll.toString());\n temp = temp.replace(/PROD/g, product.data[city][1].toString());\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)) || parseFloat(temp) < 0) {\n throw new Error(\"Invalid value or expression for sell quantity field\");\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)) || parseFloat(amt) < 0) {\n throw new Error(\"Invalid value for sell quantity field! Must be numeric or 'PROD' or 'MAX'\");\n } else {\n let qty = parseFloat(amt);\n if (isNaN(qty)) {\n qty = 0;\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 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\nexport function SetSmartSupply(warehouse: Warehouse, smartSupply: boolean): void {\n warehouse.smartSupplyEnabled = smartSupply;\n}\n\nexport function SetSmartSupplyUseLeftovers(warehouse: Warehouse, material: Material, useLeftover: boolean): void {\n if (!Object.keys(warehouse.smartSupplyUseLeftovers).includes(material.name.replace(/ /g, \"\")))\n throw new Error(`Invalid material '${material.name}'`);\n warehouse.smartSupplyUseLeftovers[material.name.replace(/ /g, \"\")] = useLeftover;\n}\n\nexport function BuyMaterial(material: Material, amt: number): void {\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid amount '${amt}' to buy material '${material.name}'`);\n }\n material.buy = amt;\n}\n\nexport function BulkPurchase(corp: ICorporation, warehouse: Warehouse, material: Material, amt: number): void {\n const matSize = MaterialSizes[material.name];\n const maxAmount = (warehouse.size - warehouse.sizeUsed) / matSize;\n if (isNaN(amt) || amt < 0) {\n throw new Error(`Invalid input amount`);\n }\n if (amt * matSize <= maxAmount) {\n throw new Error(`You do not have enough warehouse size to fit this purchase`);\n }\n const cost = amt * material.bCost;\n if (corp.funds >= cost) {\n corp.funds = corp.funds - cost;\n material.qty += amt;\n } else {\n throw new Error(`You cannot afford this purchase.`);\n }\n}\n\nexport function SellShares(corporation: ICorporation, player: IPlayer, numShares: number): number {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to sell!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n if (corporation.shareSaleCooldown) throw new Error(\"Share sale on cooldown!\");\n const stockSaleResults = corporation.calculateShareSale(numShares);\n const profit = stockSaleResults[0];\n const newSharePrice = stockSaleResults[1];\n const newSharesUntilUpdate = stockSaleResults[2];\n\n corporation.numShares -= numShares;\n corporation.issuedShares += numShares;\n corporation.sharePrice = newSharePrice;\n corporation.shareSalesUntilPriceUpdate = newSharesUntilUpdate;\n corporation.shareSaleCooldown = CorporationConstants.SellSharesCooldown;\n player.gainMoney(profit, \"corporation\");\n return profit;\n}\n\nexport function BuyBackShares(corporation: ICorporation, player: IPlayer, numShares: number): boolean {\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of shares\");\n if (numShares > corporation.issuedShares) throw new Error(\"You don't have that many shares to buy!\");\n if (!corporation.public) throw new Error(\"You haven't gone public!\");\n const buybackPrice = corporation.sharePrice * 1.1;\n if (player.money < numShares * buybackPrice) throw new Error(\"You cant afford that many shares!\");\n corporation.numShares += numShares;\n corporation.issuedShares -= numShares;\n player.loseMoney(numShares * buybackPrice, \"corporation\");\n return true;\n}\n\nexport function AssignJob(employee: Employee, job: string): void {\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n employee.pos = job;\n}\n\nexport function UpgradeOfficeSize(corp: ICorporation, office: OfficeSpace, size: number): void {\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const cost = CorporationConstants.OfficeInitialCost * mult;\n if (corp.funds < cost) return;\n office.size += size;\n corp.funds = corp.funds - cost;\n}\n\nexport function ThrowParty(corp: ICorporation, office: OfficeSpace, costPerEmployee: number): number {\n const totalCost = costPerEmployee * office.employees.length;\n if (corp.funds < totalCost) return 0;\n corp.funds = corp.funds - totalCost;\n let mult = 0;\n for (let i = 0; i < office.employees.length; ++i) {\n mult = office.employees[i].throwParty(costPerEmployee);\n }\n\n return mult;\n}\n\nexport function PurchaseWarehouse(corp: ICorporation, division: IIndustry, city: string): void {\n if (corp.funds < CorporationConstants.WarehouseInitialCost) return;\n if (division.warehouses[city] instanceof Warehouse) return;\n division.warehouses[city] = new Warehouse({\n corp: corp,\n industry: division,\n loc: city,\n size: CorporationConstants.WarehouseInitialSize,\n });\n corp.funds = corp.funds - CorporationConstants.WarehouseInitialCost;\n}\n\nexport function UpgradeWarehouse(corp: ICorporation, division: IIndustry, warehouse: Warehouse): void {\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n if (corp.funds < sizeUpgradeCost) return;\n ++warehouse.level;\n warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n}\n\nexport function BuyCoffee(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[0];\n const cost = office.employees.length * upgrade[1];\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function HireAdVert(corp: ICorporation, division: IIndustry, office: OfficeSpace): void {\n const upgrade = IndustryUpgrades[1];\n const cost = upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: office,\n });\n}\n\nexport function MakeProduct(\n corp: ICorporation,\n division: IIndustry,\n city: string,\n productName: string,\n designInvest: number,\n marketingInvest: number,\n): void {\n if (designInvest < 0) {\n designInvest = 0;\n }\n if (marketingInvest < 0) {\n marketingInvest = 0;\n }\n if (productName == null || productName === \"\") {\n throw new Error(\"You must specify a name for your product!\");\n }\n if (!division.makesProducts) {\n throw new Error(\"You cannot create products for this industry!\");\n }\n if (isNaN(designInvest)) {\n throw new Error(\"Invalid value for design investment\");\n }\n if (isNaN(marketingInvest)) {\n throw new Error(\"Invalid value for marketing investment\");\n }\n if (corp.funds < designInvest + marketingInvest) {\n throw new Error(\"You don't have enough company funds to make this large of an investment\");\n }\n let maxProducts = 3;\n if (division.hasResearch(\"uPgrade: Capacity.II\")) {\n maxProducts = 5;\n } else if (division.hasResearch(\"uPgrade: Capacity.I\")) {\n maxProducts = 4;\n }\n const products = division.products;\n if (Object.keys(products).length >= maxProducts) {\n throw new Error(`You are already at the max products (${maxProducts}) for division: ${division.name}!`);\n }\n\n const product = new Product({\n name: productName.replace(/[<>]/g, \"\"), //Sanitize for HTMl elements\n createCity: city,\n designCost: designInvest,\n advCost: marketingInvest,\n });\n if (products[product.name] instanceof Product) {\n throw new Error(`You already have a product with this name!`);\n }\n\n corp.funds = corp.funds - (designInvest + marketingInvest);\n products[product.name] = product;\n}\n\nexport function Research(division: IIndustry, researchName: string): void {\n const researchTree = IndustryResearchTrees[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[researchName];\n\n if (division.sciResearch.qty < research.cost)\n throw new Error(`You do not have enough Scientific Research for ${research.name}`);\n division.sciResearch.qty -= research.cost;\n\n // Get the Node from the Research Tree and set its 'researched' property\n researchTree.research(researchName);\n division.researched[researchName] = true;\n}\n\nexport function ExportMaterial(\n divisionName: string,\n cityName: string,\n material: Material,\n amt: string,\n division?: Industry,\n): void {\n // Sanitize amt\n let sanitizedAmt = amt.replace(/\\s+/g, \"\").toUpperCase();\n sanitizedAmt = sanitizedAmt.replace(/[^-()\\d/*+.MAX]/g, \"\");\n let temp = sanitizedAmt.replace(/MAX/g, \"1\");\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 if (!division || !isRelevantMaterial(material.name, division)) {\n throw new Error(`You cannot export material: ${material.name} to division: ${divisionName}!`);\n }\n\n const exportObj = { ind: divisionName, city: cityName, amt: sanitizedAmt };\n material.exp.push(exportObj);\n}\n\nexport function CancelExportMaterial(divisionName: string, cityName: string, material: Material, amt: string): void {\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)\n continue;\n material.exp.splice(i, 1);\n break;\n }\n}\n\nexport function LimitProductProduction(product: Product, cityName: string, qty: number): void {\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}\n\nexport function SetMaterialMarketTA1(material: Material, on: boolean): void {\n material.marketTa1 = on;\n}\n\nexport function SetMaterialMarketTA2(material: Material, on: boolean): void {\n material.marketTa2 = on;\n}\n\nexport function SetProductMarketTA1(product: Product, on: boolean): void {\n product.marketTa1 = on;\n}\n\nexport function SetProductMarketTA2(product: Product, on: boolean): void {\n product.marketTa2 = on;\n}\n","export enum PositionTypes {\n Long = \"L\",\n Short = \"S\",\n}\n","/**\n * Enum for different types of tasks that a Sleeve can perform\n */\nexport enum SleeveTaskType {\n // Same Order as selectable order in UI\n Idle,\n Company,\n Faction,\n Crime,\n Class,\n Gym,\n Recovery,\n Synchro,\n}\n","export enum FragmentType {\n // Special fragments for the UI\n None,\n Delete,\n\n // Stats boosting fragments\n HackingChance,\n HackingSpeed,\n HackingMoney,\n HackingGrow,\n Hacking,\n Strength,\n Defense,\n Dexterity,\n Agility,\n Charisma,\n HacknetMoney,\n HacknetCost,\n Rep,\n WorkMoney,\n Crime,\n Bladeburner,\n\n // utility fragments.\n Booster,\n}\n\nexport function Effect(tpe: FragmentType): string {\n switch (tpe) {\n case FragmentType.HackingChance: {\n return \"+x% hack() success chance\";\n }\n case FragmentType.HackingSpeed: {\n return \"+x% faster hack(), grow(), and weaken()\";\n }\n case FragmentType.HackingMoney: {\n return \"+x% hack() power\";\n }\n case FragmentType.HackingGrow: {\n return \"+x% grow() power\";\n }\n case FragmentType.Hacking: {\n return \"+x% hacking skill\";\n }\n case FragmentType.Strength: {\n return \"+x% strength skill\";\n }\n case FragmentType.Defense: {\n return \"+x% defense skill\";\n }\n case FragmentType.Dexterity: {\n return \"+x% dexterity skill\";\n }\n case FragmentType.Agility: {\n return \"+x% agility skill\";\n }\n case FragmentType.Charisma: {\n return \"+x% charisma skill\";\n }\n case FragmentType.HacknetMoney: {\n return \"+x% hacknet production\";\n }\n case FragmentType.HacknetCost: {\n return \"x% cheaper hacknet cost\";\n }\n case FragmentType.Rep: {\n return \"+x% reputation from factions and companies\";\n }\n case FragmentType.WorkMoney: {\n return \"+x% work money\";\n }\n case FragmentType.Crime: {\n return \"+x% crime money\";\n }\n case FragmentType.Bladeburner: {\n return \"+x% all bladeburner stats\";\n }\n }\n throw new Error(\"Calling effect for fragment type that doesn't have an effect \" + tpe);\n}\n","import { FactionNames } from '../Faction/data/FactionNames';\nimport { Reviver } from \"../utils/JSONReviver\";\n\ninterface GangTerritory {\n power: number;\n territory: number;\n}\n\nexport let AllGangs: {\n [key: string]: GangTerritory;\n} = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n};\n\nexport function resetGangs(): void {\n AllGangs = {\n [FactionNames.SlumSnakes]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.Tetrads]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheSyndicate]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheDarkArmy]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.SpeakersForTheDead]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.NiteSec]: {\n power: 1,\n territory: 1 / 7,\n },\n [FactionNames.TheBlackHand]: {\n power: 1,\n territory: 1 / 7,\n },\n };\n}\n\nexport function loadAllGangs(saveString: string): void {\n AllGangs = JSON.parse(saveString, Reviver);\n}\n","// Contains an array containing information about the player's source files\n// Array[n] returns what level the player has of Source-File N.\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport const SourceFileFlags: number[] = Array(CONSTANTS.TotalNumBitNodes + 1); // Skip index 0\n\nexport function updateSourceFileFlags(p: IPlayer): void {\n for (let i = 0; i < SourceFileFlags.length; ++i) {\n SourceFileFlags[i] = 0;\n }\n\n for (let i = 0; i < p.sourceFiles.length; ++i) {\n const sf = p.sourceFiles[i];\n SourceFileFlags[sf.n] = sf.lvl;\n }\n}\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 functions that deal only with that string manipulation.\n * Functions that need to access/process Server-related things can be\n * found in ./DirectoryServerHelpers.ts\n */\n\n/**\n * Removes leading forward slash (\"/\") from a string.\n */\nexport function removeLeadingSlash(s: string): string {\n if (s.startsWith(\"/\")) {\n return s.slice(1);\n }\n\n return s;\n}\n\n/**\n * Removes trailing forward slash (\"/\") from a string.\n * Note that this will also remove the slash if it is the leading slash (i.e. if s = \"/\")\n */\nexport function removeTrailingSlash(s: string): string {\n if (s.endsWith(\"/\")) {\n return s.slice(0, -1);\n }\n\n return s;\n}\n\n/**\n * Checks whether a string is a valid filename. Only used for the filename itself,\n * not the entire filepath\n */\nexport function isValidFilename(filename: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs\n // Must have a file extension\n const regex = /^[.a-zA-Z0-9_-]+[.][a-zA-Z0-9]+(?:-\\d+(?:\\.\\d*)?%-INC)?$/;\n\n // match() returns null if no match is found\n return filename.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory name. Only used for the directory itself,\n * not an entire path\n */\nexport function isValidDirectoryName(name: string): boolean {\n // Allows alphanumerics, hyphens, underscores, and percentage signs.\n // Name can begin with a single period, but otherwise cannot have any\n const regex = /^.?[a-zA-Z0-9_-]+$/;\n\n // match() returns null if no match is found\n return name.match(regex) != null;\n}\n\n/**\n * Checks whether a string is a valid directory path.\n * This only checks if it has the proper formatting. It does NOT check\n * if the directories actually exist on Terminal\n */\nexport function isValidDirectoryPath(path: string): boolean {\n let t_path: string = path;\n\n if (t_path.length === 0) {\n return false;\n }\n if (t_path.length === 1) {\n return t_path === \"/\";\n }\n\n // A full path must have a leading slash, but we'll ignore it for the checks\n if (t_path.startsWith(\"/\")) {\n t_path = t_path.slice(1);\n } else {\n return false;\n }\n\n // Trailing slash does not matter\n t_path = removeTrailingSlash(t_path);\n\n // Check that every section of the path is a valid directory name\n const dirs = t_path.split(\"/\");\n for (const dir of dirs) {\n // Special case, \".\" and \"..\" are valid for path\n if (dir === \".\" || dir === \"..\") {\n continue;\n }\n if (!isValidDirectoryName(dir)) {\n return false;\n }\n }\n\n return true;\n}\n\n/**\n * Checks whether a string is a valid file path. This only checks if it has the\n * proper formatting. It dose NOT check if the file actually exists on Terminal\n */\nexport function isValidFilePath(path: string): boolean {\n if (path == null || typeof path !== \"string\") {\n return false;\n }\n const t_path = path;\n\n // Impossible for filename to have less than length of 3\n if (t_path.length < 3) {\n return false;\n }\n\n // Full filepath can't end with trailing slash because it must be a file\n if (t_path.endsWith(\"/\")) {\n return false;\n }\n\n // Everything after the last forward slash is the filename. Everything before\n // it is the file path\n const fnSeparator = t_path.lastIndexOf(\"/\");\n if (fnSeparator === -1) {\n return isValidFilename(t_path);\n }\n\n const fn = t_path.slice(fnSeparator + 1);\n const dirPath = t_path.slice(0, fnSeparator + 1);\n\n return isValidDirectoryPath(dirPath) && isValidFilename(fn);\n}\n\n/**\n * Returns a formatted string for the first parent directory in a filepath. For example:\n * /home/var/test/ -> home/\n * If there is no first parent directory, then it returns \"/\" for root\n */\nexport function getFirstParentDirectory(path: string): string {\n let t_path = path;\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n if (t_path.lastIndexOf(\"/\") === -1) {\n return \"/\";\n }\n\n const dirs = t_path.split(\"/\");\n if (dirs.length === 0) {\n return \"/\";\n }\n\n return dirs[0] + \"/\";\n}\n\n/**\n * Given a filepath, returns a formatted string for all of the parent directories\n * in that filepath. For example:\n * /home/var/tes -> home/var/\n * /home/var/test/ -> home/var/test/\n * If there are no parent directories, it returns the empty string\n */\nexport function getAllParentDirectories(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return \"\";\n }\n\n return t_path.slice(0, lastSlash + 1);\n}\n\n/**\n * Given a destination that only contains a directory part, returns the\n * path to the source filename inside the new destination directory.\n * Otherwise, returns the path to the destination file.\n * @param destination The destination path or file name\n * @param source The source path\n * @param cwd The current working directory\n * @returns A file path which may be absolute or relative\n */\nexport function getDestinationFilepath(destination: string, source: string, cwd: string): string {\n const dstDir = evaluateDirectoryPath(destination, cwd);\n // If evaluating the directory for this destination fails, we have a filename or full path.\n if (dstDir === null) {\n return destination;\n } else {\n // Append the filename to the directory provided.\n const t_path = removeTrailingSlash(dstDir);\n const fileName = getFileName(source);\n return t_path + \"/\" + fileName;\n }\n}\n\n/**\n * Given a filepath, returns the file name (e.g. without directory parts)\n * For example:\n * /home/var/test.js -> test.js\n * ./var/test.js -> test.js\n * test.js -> test.js\n */\nexport function getFileName(path: string): string {\n const t_path = path;\n const lastSlash = t_path.lastIndexOf(\"/\");\n if (lastSlash === -1) {\n return t_path;\n }\n\n return t_path.slice(lastSlash + 1);\n}\n\n/**\n * Checks if a file path refers to a file in the root directory.\n */\nexport function isInRootDirectory(path: string): boolean {\n if (!isValidFilePath(path)) {\n return false;\n }\n if (path == null || path.length === 0) {\n return false;\n }\n\n return path.lastIndexOf(\"/\") <= 0;\n}\n\n/**\n * Evaluates a directory path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateDirectoryPath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidDirectoryPath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n t_path = removeTrailingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\n/**\n * Evaluates a file path, including the processing of linux dots.\n * Returns the full, proper path, or null if an invalid path is passed in\n */\nexport function evaluateFilePath(path: string, currPath?: string): string | null {\n let t_path = path;\n\n // If the path begins with a slash, then its an absolute path. Otherwise its relative\n // For relative paths, we need to prepend the current directory\n if (!t_path.startsWith(\"/\") && currPath != null) {\n t_path = currPath + (currPath.endsWith(\"/\") ? \"\" : \"/\") + t_path;\n }\n\n if (!isValidFilePath(t_path)) {\n return null;\n }\n\n // Trim leading/trailing slashes\n t_path = removeLeadingSlash(t_path);\n\n const dirs = t_path.split(\"/\");\n const reconstructedPath: string[] = [];\n\n for (const dir of dirs) {\n if (dir === \".\") {\n // Current directory, do nothing\n continue;\n } else if (dir === \"..\") {\n // Parent directory\n const res = reconstructedPath.pop();\n if (res == null) {\n return null; // Array was empty, invalid path\n }\n } else {\n reconstructedPath.push(dir);\n }\n }\n\n return \"/\" + reconstructedPath.join(\"/\");\n}\n\nexport function areFilesEqual(f0: string, f1: string): boolean {\n if (!f0.startsWith(\"/\")) f0 = \"/\" + f0;\n if (!f1.startsWith(\"/\")) f1 = \"/\" + f1;\n return f0 === f1;\n}\n\nexport function areImportsEquals(f0: string, f1: string): boolean {\n if (!f0.endsWith(\".ns\") && !f0.endsWith(\".js\")) f0 = f0 + \".js\";\n if (!f1.endsWith(\".ns\") && !f1.endsWith(\".js\")) f1 = f1 + \".js\";\n return areFilesEqual(f0, f1);\n}\n","import { Crime } from \"./Crime\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { IMap } from \"../types\";\n\nexport const Crimes: IMap = {\n Shoplift: new Crime(\"Shoplift\", CONSTANTS.CrimeShoplift, 2e3, 15e3, 1 / 20, 0.1, {\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n dexterity_exp: 2,\n agility_exp: 2,\n }),\n\n RobStore: new Crime(\"Rob Store\", CONSTANTS.CrimeRobStore, 60e3, 400e3, 1 / 5, 0.5, {\n hacking_exp: 30,\n dexterity_exp: 45,\n agility_exp: 45,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 7.5 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Mug: new Crime(\"Mug\", CONSTANTS.CrimeMug, 4e3, 36e3, 1 / 5, 0.25, {\n strength_exp: 3,\n defense_exp: 3,\n dexterity_exp: 3,\n agility_exp: 3,\n\n strength_success_weight: 1.5,\n defense_success_weight: 0.5,\n dexterity_success_weight: 1.5,\n agility_success_weight: 0.5,\n }),\n\n Larceny: new Crime(\"Larceny\", CONSTANTS.CrimeLarceny, 90e3, 800e3, 1 / 3, 1.5, {\n hacking_exp: 45,\n dexterity_exp: 60,\n agility_exp: 60,\n\n hacking_success_weight: 0.5,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 15 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n DealDrugs: new Crime(\"Deal Drugs\", CONSTANTS.CrimeDrugs, 10e3, 120e3, 1, 0.5, {\n dexterity_exp: 5,\n agility_exp: 5,\n charisma_exp: 10,\n\n charisma_success_weight: 3,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n }),\n\n BondForgery: new Crime(\"Bond Forgery\", CONSTANTS.CrimeBondForgery, 300e3, 4.5e6, 1 / 2, 0.1, {\n hacking_exp: 100,\n dexterity_exp: 150,\n charisma_exp: 15,\n\n hacking_success_weight: 0.05,\n dexterity_success_weight: 1.25,\n\n intelligence_exp: 60 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n TraffickArms: new Crime(\"Traffick Arms\", CONSTANTS.CrimeTraffickArms, 40e3, 600e3, 2, 1, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 20,\n charisma_exp: 40,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n }),\n\n Homicide: new Crime(\"Homicide\", CONSTANTS.CrimeHomicide, 3e3, 45e3, 1, 3, {\n strength_exp: 2,\n defense_exp: 2,\n dexterity_exp: 2,\n agility_exp: 2,\n\n strength_success_weight: 2,\n defense_success_weight: 2,\n dexterity_success_weight: 0.5,\n agility_success_weight: 0.5,\n\n kills: 1,\n }),\n\n GrandTheftAuto: new Crime(\"Grand Theft Auto\", CONSTANTS.CrimeGrandTheftAuto, 80e3, 1.6e6, 8, 5, {\n strength_exp: 20,\n defense_exp: 20,\n dexterity_exp: 20,\n agility_exp: 80,\n charisma_exp: 40,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 4,\n agility_success_weight: 2,\n charisma_success_weight: 2,\n\n intelligence_exp: 16 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Kidnap: new Crime(\"Kidnap\", CONSTANTS.CrimeKidnap, 120e3, 3.6e6, 5, 6, {\n strength_exp: 80,\n defense_exp: 80,\n dexterity_exp: 80,\n agility_exp: 80,\n charisma_exp: 80,\n\n charisma_success_weight: 1,\n strength_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n\n intelligence_exp: 26 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n\n Assassination: new Crime(\"Assassination\", CONSTANTS.CrimeAssassination, 300e3, 12e6, 8, 10, {\n strength_exp: 300,\n defense_exp: 300,\n dexterity_exp: 300,\n agility_exp: 300,\n\n strength_success_weight: 1,\n dexterity_success_weight: 2,\n agility_success_weight: 1,\n\n intelligence_exp: 65 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n\n kills: 1,\n }),\n\n Heist: new Crime(\"Heist\", CONSTANTS.CrimeHeist, 600e3, 120e6, 18, 15, {\n hacking_exp: 450,\n strength_exp: 450,\n defense_exp: 450,\n dexterity_exp: 450,\n agility_exp: 450,\n charisma_exp: 450,\n\n hacking_success_weight: 1,\n strength_success_weight: 1,\n defense_success_weight: 1,\n dexterity_success_weight: 1,\n agility_success_weight: 1,\n charisma_success_weight: 1,\n\n intelligence_exp: 130 * CONSTANTS.IntelligenceCrimeBaseExpGain,\n }),\n};\n","import * as React from \"react\";\n\nexport function trusted(f: () => void): (event: React.MouseEvent) => any {\n return function (event: React.MouseEvent): any {\n if (!event.isTrusted) return;\n f();\n };\n}\n","import { Terminal as TTerminal } from \"./Terminal/Terminal\";\n\nexport const Terminal = new TTerminal();\n","/**\n * Hacknet Servers - Reworked Hacknet Node mechanic for BitNode-9\n */\nimport { CONSTANTS } from \"../Constants\";\n\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { HacknetServerConstants } from \"./data/Constants\";\nimport {\n calculateHashGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateCacheUpgradeCost,\n} from \"./formulas/HacknetServers\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\nexport class HacknetServer extends BaseServer implements IHacknetNode {\n // Cache level. Affects hash Capacity\n cache = 1;\n\n // Number of cores. Improves hash production\n cores = 1;\n\n // Number of hashes that can be stored by this Hacknet Server\n hashCapacity = 0;\n\n // Hashes produced per second\n hashRate = 0;\n\n // Similar to Node level. Improves hash production\n level = 1;\n\n // How long this HacknetServer has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Total number of hashes earned by this server\n totalHashesGenerated = 0;\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = true;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n super(params);\n\n this.maxRam = 1;\n this.updateHashCapacity();\n }\n\n calculateCacheUpgradeCost(levels: number): number {\n return calculateCacheUpgradeCost(this.cache, levels);\n }\n\n calculateCoreUpgradeCost(levels: number, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n calculateLevelUpgradeCost(levels: number, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n calculateRamUpgradeCost(levels: number, costMult: number): number {\n return calculateRamUpgradeCost(this.maxRam, levels, costMult);\n }\n\n // Process this Hacknet Server in the game loop. Returns the number of hashes generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n this.onlineTimeSeconds += seconds;\n\n const hashes = this.hashRate * seconds;\n this.totalHashesGenerated += hashes;\n\n return hashes;\n }\n\n upgradeCache(levels: number): void {\n this.cache = Math.min(HacknetServerConstants.MaxCache, Math.round(this.cache + levels));\n this.updateHashCapacity();\n }\n\n upgradeCore(levels: number, prodMult: number): void {\n this.cores = Math.min(HacknetServerConstants.MaxCores, Math.round(this.cores + levels));\n this.updateHashRate(prodMult);\n this.cpuCores = this.cores;\n }\n\n upgradeLevel(levels: number, prodMult: number): void {\n this.level = Math.min(HacknetServerConstants.MaxLevel, Math.round(this.level + levels));\n this.updateHashRate(prodMult);\n }\n\n upgradeRam(levels: number, prodMult: number): boolean {\n for (let i = 0; i < levels; ++i) {\n this.maxRam *= 2;\n }\n this.maxRam = Math.min(HacknetServerConstants.MaxRam, Math.round(this.maxRam));\n this.updateHashRate(prodMult);\n\n return true;\n }\n\n // Whenever a script is run, we must update this server's hash rate\n runScript(script: RunningScript, prodMult?: number): void {\n super.runScript(script);\n if (prodMult != null && typeof prodMult === \"number\") {\n this.updateHashRate(prodMult);\n }\n }\n\n updateRamUsed(ram: number, player: IPlayer): void {\n super.updateRamUsed(ram, player);\n this.updateHashRate(player.hacknet_node_money_mult);\n }\n\n updateHashCapacity(): void {\n this.hashCapacity = 32 * Math.pow(2, this.cache);\n }\n\n updateHashRate(prodMult: number): void {\n this.hashRate = calculateHashGainRate(this.level, this.ramUsed, this.maxRam, this.cores, prodMult);\n\n if (isNaN(this.hashRate)) {\n this.hashRate = 0;\n console.error(\n `Error calculating Hacknet Server hash production. This is a bug. Please report to game dev`,\n false,\n );\n }\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"HacknetServer\", this);\n }\n\n // Initializes a HacknetServer Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HacknetServer {\n return Generic_fromJSON(HacknetServer, value.data);\n }\n}\n\nReviver.constructors.HacknetServer = HacknetServer;\n","// Constructs all CompanyPosition objects using the metadata in data/companypositions.ts\nimport { companyPositionMetadata } from \"./data/CompanyPositionsMetadata\";\nimport { CompanyPosition, IConstructorParams } from \"./CompanyPosition\";\nimport { IMap } from \"../types\";\n\nexport const CompanyPositions: IMap = {};\n\nfunction addCompanyPosition(params: IConstructorParams): void {\n if (CompanyPositions[params.name] != null) {\n console.warn(`Duplicate Company Position being defined: ${params.name}`);\n }\n CompanyPositions[params.name] = new CompanyPosition(params);\n}\n\ncompanyPositionMetadata.forEach((e) => {\n addCompanyPosition(e);\n});\n","import React, { useState, useEffect } from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IEngine } from \"../IEngine\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { saveObject } from \"../SaveObject\";\nimport { onExport } from \"../ExportBonus\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Location } from \"../Locations/Location\";\nimport { Locations } from \"../Locations/Locations\";\nimport { ITutorial, iTutorialStart } from \"../InteractiveTutorial\";\nimport { InteractiveTutorialRoot } from \"./InteractiveTutorial/InteractiveTutorialRoot\";\nimport { ITutorialEvents } from \"./InteractiveTutorial/ITutorialEvents\";\n\nimport { Faction } from \"../Faction/Faction\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { dialogBoxCreate } from \"./React/DialogBox\";\nimport { GetAllServers } from \"../Server/AllServers\";\nimport { Factions } from \"../Faction/Factions\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport {\n cancelOrder,\n eventEmitterForUiReset,\n initStockMarketFnForReact,\n placeOrder,\n StockMarket,\n} from \"../StockMarket/StockMarket\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\n\nimport { Page, IRouter, ScriptEditorRouteOptions } from \"./Router\";\nimport { Overview } from \"./React/Overview\";\nimport { SidebarRoot } from \"../Sidebar/ui/SidebarRoot\";\nimport { AugmentationsRoot } from \"../Augmentation/ui/AugmentationsRoot\";\nimport { DevMenuRoot } from \"../DevMenu\";\nimport { BladeburnerRoot } from \"../Bladeburner/ui/BladeburnerRoot\";\nimport { GangRoot } from \"../Gang/ui/GangRoot\";\nimport { CorporationRoot } from \"../Corporation/ui/CorporationRoot\";\nimport { InfiltrationRoot } from \"../Infiltration/ui/InfiltrationRoot\";\nimport { GraftingRoot } from \"../PersonObjects/Grafting/ui/GraftingRoot\";\nimport { WorkInProgressRoot } from \"./WorkInProgressRoot\";\nimport { GameOptionsRoot } from \"./React/GameOptionsRoot\";\nimport { SleeveRoot } from \"../PersonObjects/Sleeve/ui/SleeveRoot\";\nimport { HacknetRoot } from \"../Hacknet/ui/HacknetRoot\";\nimport { GenericLocation } from \"../Locations/ui/GenericLocation\";\nimport { LocationCity } from \"../Locations/ui/City\";\nimport { ProgramsRoot } from \"../Programs/ui/ProgramsRoot\";\nimport { Root as ScriptEditorRoot } from \"../ScriptEditor/ui/ScriptEditorRoot\";\nimport { MilestonesRoot } from \"../Milestones/ui/MilestonesRoot\";\nimport { TerminalRoot } from \"../Terminal/ui/TerminalRoot\";\nimport { TutorialRoot } from \"../Tutorial/ui/TutorialRoot\";\nimport { ActiveScriptsRoot } from \"./ActiveScripts/ActiveScriptsRoot\";\nimport { FactionsRoot } from \"../Faction/ui/FactionsRoot\";\nimport { FactionRoot } from \"../Faction/ui/FactionRoot\";\nimport { CharacterStats } from \"./CharacterStats\";\nimport { TravelAgencyRoot } from \"../Locations/ui/TravelAgencyRoot\";\nimport { StockMarketRoot } from \"../StockMarket/ui/StockMarketRoot\";\nimport { BitverseRoot } from \"../BitNode/ui/BitverseRoot\";\nimport { StaneksGiftRoot } from \"../CotMG/ui/StaneksGiftRoot\";\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { CharacterOverview } from \"./React/CharacterOverview\";\nimport { BladeburnerCinematic } from \"../Bladeburner/ui/BladeburnerCinematic\";\nimport { workerScripts } from \"../Netscript/WorkerScripts\";\nimport { Unclickable } from \"../Exploits/Unclickable\";\nimport { Snackbar, SnackbarProvider } from \"./React/Snackbar\";\nimport { LogBoxManager } from \"./React/LogBoxManager\";\nimport { AlertManager } from \"./React/AlertManager\";\nimport { PromptManager } from \"./React/PromptManager\";\nimport { InvitationModal } from \"../Faction/ui/InvitationModal\";\nimport { calculateAchievements } from \"../Achievements/Achievements\";\n\nimport { enterBitNode } from \"../RedPill\";\nimport { Context } from \"./Context\";\nimport { RecoveryMode, RecoveryRoot } from \"./React/RecoveryRoot\";\nimport { AchievementsRoot } from \"../Achievements/AchievementsRoot\";\nimport { ErrorBoundary } from \"./ErrorBoundary\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeBrowser } from \"../Themes/ui/ThemeBrowser\";\nimport { ImportSaveRoot } from \"./React/ImportSaveRoot\";\nimport { BypassWrapper } from \"./React/BypassWrapper\";\n\nimport _wrap from \"lodash/wrap\";\nimport _functions from \"lodash/functions\";\nimport { Apr1 } from \"./Apr1\";\n\nconst htmlLocation = location;\n\ninterface IProps {\n terminal: ITerminal;\n player: IPlayer;\n engine: IEngine;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n \"-ms-overflow-style\": \"none\" /* for Internet Explorer, Edge */,\n \"scrollbar-width\": \"none\" /* for Firefox */,\n margin: theme.spacing(0),\n flexGrow: 1,\n display: \"block\",\n padding: \"8px\",\n minHeight: \"100vh\",\n boxSizing: \"border-box\",\n },\n }),\n);\n\nconst uninitialized = (): any => {\n throw new Error(\"Router called before initialization\");\n};\n\nexport let Router: IRouter = {\n isInitialized: false,\n page: uninitialized,\n allowRouting: uninitialized,\n toActiveScripts: uninitialized,\n toAugmentations: uninitialized,\n toBitVerse: uninitialized,\n toBladeburner: uninitialized,\n toStats: uninitialized,\n toCity: uninitialized,\n toCorporation: uninitialized,\n toCreateProgram: uninitialized,\n toDevMenu: uninitialized,\n toFaction: uninitialized,\n toFactions: uninitialized,\n toGameOptions: uninitialized,\n toGang: uninitialized,\n toHacknetNodes: uninitialized,\n toInfiltration: uninitialized,\n toJob: uninitialized,\n toMilestones: uninitialized,\n toGrafting: uninitialized,\n toScriptEditor: uninitialized,\n toSleeves: uninitialized,\n toStockMarket: uninitialized,\n toTerminal: uninitialized,\n toTravel: uninitialized,\n toTutorial: uninitialized,\n toWork: uninitialized,\n toBladeburnerCinematic: uninitialized,\n toLocation: uninitialized,\n toStaneksGift: uninitialized,\n toAchievements: uninitialized,\n toThemeBrowser: uninitialized,\n toImportSave: uninitialized,\n};\n\nfunction determineStartPage(player: IPlayer): Page {\n if (RecoveryMode) return Page.Recovery;\n if (player.isWorking) return Page.Work;\n return Page.Terminal;\n}\n\nexport function GameRoot({ player, engine, terminal }: IProps): React.ReactElement {\n const classes = useStyles();\n const [{ files, vim }, setEditorOptions] = useState({ files: {}, vim: false });\n const [page, setPage] = useState(determineStartPage(player));\n const setRerender = useState(0)[1];\n const [augPage, setAugPage] = useState(false);\n const [faction, setFaction] = useState(\n player.currentWorkFactionName ? Factions[player.currentWorkFactionName] : (undefined as unknown as Faction),\n );\n if (faction === undefined && page === Page.Faction)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [flume, setFlume] = useState(false);\n const [quick, setQuick] = useState(false);\n const [location, setLocation] = useState(undefined as unknown as Location);\n if (location === undefined && (page === Page.Infiltration || page === Page.Location || page === Page.Job))\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [cinematicText, setCinematicText] = useState(\"\");\n const [errorBoundaryKey, setErrorBoundaryKey] = useState(0);\n const [sidebarOpened, setSideBarOpened] = useState(Settings.IsSidebarOpened);\n\n const [importString, setImportString] = useState(undefined as unknown as string);\n const [importAutomatic, setImportAutomatic] = useState(false);\n if (importString === undefined && page === Page.ImportSave)\n throw new Error(\"Trying to go to a page without the proper setup\");\n\n const [allowRoutingCalls, setAllowRoutingCalls] = useState(true);\n\n function resetErrorBoundary(): void {\n setErrorBoundaryKey(errorBoundaryKey + 1);\n }\n\n function rerender(): void {\n setRerender((old) => old + 1);\n }\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n\n function killAllScripts(): void {\n for (const server of GetAllServers()) {\n server.runningScripts = [];\n }\n saveObject.saveGame();\n setTimeout(() => htmlLocation.reload(), 2000);\n }\n\n Router = {\n isInitialized: true,\n page: () => page,\n allowRouting: (value: boolean) => setAllowRoutingCalls(value),\n toActiveScripts: () => setPage(Page.ActiveScripts),\n toAugmentations: () => setPage(Page.Augmentations),\n toBladeburner: () => setPage(Page.Bladeburner),\n toStats: () => setPage(Page.Stats),\n toCorporation: () => setPage(Page.Corporation),\n toCreateProgram: () => setPage(Page.CreateProgram),\n toDevMenu: () => setPage(Page.DevMenu),\n toFaction: (faction: Faction, augPage = false) => {\n setAugPage(augPage);\n setPage(Page.Faction);\n if (faction) setFaction(faction);\n },\n toFactions: () => setPage(Page.Factions),\n toGameOptions: () => setPage(Page.Options),\n toGang: () => setPage(Page.Gang),\n toHacknetNodes: () => setPage(Page.Hacknet),\n toMilestones: () => setPage(Page.Milestones),\n toGrafting: () => setPage(Page.Grafting),\n toScriptEditor: (files: Record, options?: ScriptEditorRouteOptions) => {\n setEditorOptions({\n files,\n vim: !!options?.vim,\n });\n setPage(Page.ScriptEditor);\n },\n toSleeves: () => setPage(Page.Sleeves),\n toStockMarket: () => setPage(Page.StockMarket),\n toTerminal: () => setPage(Page.Terminal),\n toTutorial: () => setPage(Page.Tutorial),\n toJob: () => {\n setLocation(Locations[player.companyName]);\n setPage(Page.Job);\n },\n toCity: () => {\n setPage(Page.City);\n },\n toTravel: () => {\n player.gotoLocation(LocationName.TravelAgency);\n setPage(Page.Travel);\n },\n toBitVerse: (flume: boolean, quick: boolean) => {\n setFlume(flume);\n setQuick(quick);\n calculateAchievements();\n setPage(Page.BitVerse);\n },\n toInfiltration: (location: Location) => {\n setLocation(location);\n setPage(Page.Infiltration);\n },\n toWork: () => setPage(Page.Work),\n toBladeburnerCinematic: () => {\n setPage(Page.BladeburnerCinematic);\n setCinematicText(cinematicText);\n },\n toLocation: (location: Location) => {\n setLocation(location);\n setPage(Page.Location);\n },\n toStaneksGift: () => {\n setPage(Page.StaneksGift);\n },\n toAchievements: () => {\n setPage(Page.Achievements);\n },\n toThemeBrowser: () => {\n setPage(Page.ThemeBrowser);\n },\n toImportSave: (base64save: string, automatic = false) => {\n setImportString(base64save);\n setImportAutomatic(automatic);\n setPage(Page.ImportSave);\n },\n };\n\n useEffect(() => {\n // Wrap Router navigate functions to be able to disable the execution\n _functions(Router)\n .filter((fnName) => fnName.startsWith(\"to\"))\n .forEach((fnName) => {\n // @ts-ignore - tslint does not like this, couldn't find a way to make it cooperate\n Router[fnName] = _wrap(Router[fnName], (func, ...args) => {\n if (!allowRoutingCalls) {\n // Let's just log to console.\n console.log(`Routing is currently disabled - Attempted router.${fnName}()`);\n return;\n }\n\n // Call the function normally\n return func(...args);\n });\n });\n });\n\n useEffect(() => {\n if (page !== Page.Terminal) window.scrollTo(0, 0);\n });\n\n function softReset(): void {\n dialogBoxCreate(\"Soft Reset!\");\n prestigeAugmentation();\n resetErrorBoundary();\n Router.toTerminal();\n }\n\n let mainPage = Cannot load;\n let withSidebar = true;\n let withPopups = true;\n let bypassGame = false;\n switch (page) {\n case Page.Recovery: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n break;\n }\n case Page.BitVerse: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Infiltration: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.BladeburnerCinematic: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n break;\n }\n case Page.Work: {\n mainPage = ;\n withSidebar = false;\n break;\n }\n case Page.Terminal: {\n mainPage = ;\n break;\n }\n case Page.Sleeves: {\n mainPage = ;\n break;\n }\n case Page.StaneksGift: {\n mainPage = ;\n break;\n }\n case Page.Stats: {\n mainPage = ;\n break;\n }\n case Page.ScriptEditor: {\n mainPage = (\n \n );\n break;\n }\n case Page.ActiveScripts: {\n mainPage = ;\n break;\n }\n case Page.Hacknet: {\n mainPage = ;\n break;\n }\n case Page.CreateProgram: {\n mainPage = ;\n break;\n }\n case Page.Factions: {\n mainPage = ;\n break;\n }\n case Page.Faction: {\n mainPage = ;\n break;\n }\n case Page.Milestones: {\n mainPage = ;\n break;\n }\n case Page.Tutorial: {\n mainPage = (\n {\n prestigeAugmentation();\n Router.toTerminal();\n iTutorialStart();\n }}\n />\n );\n break;\n }\n case Page.DevMenu: {\n mainPage = ;\n break;\n }\n case Page.Gang: {\n mainPage = ;\n break;\n }\n case Page.Corporation: {\n mainPage = ;\n break;\n }\n case Page.Bladeburner: {\n mainPage = ;\n break;\n }\n case Page.Grafting: {\n mainPage = ;\n break;\n }\n case Page.Travel: {\n mainPage = ;\n break;\n }\n case Page.StockMarket: {\n mainPage = (\n \n );\n break;\n }\n case Page.City: {\n mainPage = ;\n break;\n }\n case Page.Job:\n case Page.Location: {\n mainPage = ;\n break;\n }\n case Page.Options: {\n mainPage = (\n saveObject.saveGame()}\n export={() => {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n forceKill={killAllScripts}\n softReset={softReset}\n />\n );\n break;\n }\n case Page.Augmentations: {\n mainPage = (\n {\n // Apply the export bonus before saving the game\n onExport(player);\n saveObject.exportGame();\n }}\n installAugmentationsFn={() => {\n installAugmentations();\n Router.toTerminal();\n }}\n />\n );\n break;\n }\n case Page.Achievements: {\n mainPage = ;\n break;\n }\n case Page.ThemeBrowser: {\n mainPage = ;\n break;\n }\n case Page.ImportSave: {\n mainPage = ;\n withSidebar = false;\n withPopups = false;\n bypassGame = true;\n }\n }\n\n return (\n \n \n \n \n \n \n {!ITutorial.isRunning ? (\n saveObject.saveGame()} killScripts={killAllScripts} />\n ) : (\n \n )}\n \n {withSidebar ? (\n \n {\n setSideBarOpened(isOpened);\n Settings.IsSidebarOpened = isOpened;\n }}\n />\n {mainPage}\n \n ) : (\n {mainPage}\n )}\n \n {withPopups && (\n <>\n \n \n \n \n \n \n )}\n \n \n \n \n \n \n );\n}\n","import { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const StockSymbols: IMap = {};\n\n// Stocks for companies at which you can work\nStockSymbols[LocationName.AevumECorp] = \"ECP\";\nStockSymbols[LocationName.Sector12MegaCorp] = \"MGCP\";\nStockSymbols[LocationName.Sector12BladeIndustries] = \"BLD\";\nStockSymbols[LocationName.AevumClarkeIncorporated] = \"CLRK\";\nStockSymbols[LocationName.VolhavenOmniTekIncorporated] = \"OMTK\";\nStockSymbols[LocationName.Sector12FourSigma] = \"FSIG\";\nStockSymbols[LocationName.ChongqingKuaiGongInternational] = \"KGI\";\nStockSymbols[LocationName.AevumFulcrumTechnologies] = \"FLCM\";\nStockSymbols[LocationName.IshimaStormTechnologies] = \"STM\";\nStockSymbols[LocationName.NewTokyoDefComm] = \"DCOMM\";\nStockSymbols[LocationName.VolhavenHeliosLabs] = \"HLS\";\nStockSymbols[LocationName.NewTokyoVitaLife] = \"VITA\";\nStockSymbols[LocationName.Sector12IcarusMicrosystems] = \"ICRS\";\nStockSymbols[LocationName.Sector12UniversalEnergy] = \"UNV\";\nStockSymbols[LocationName.AevumAeroCorp] = \"AERO\";\nStockSymbols[LocationName.VolhavenOmniaCybersystems] = \"OMN\";\nStockSymbols[LocationName.ChongqingSolarisSpaceSystems] = \"SLRS\";\nStockSymbols[LocationName.NewTokyoGlobalPharmaceuticals] = \"GPH\";\nStockSymbols[LocationName.IshimaNovaMedical] = \"NVMD\";\nStockSymbols[LocationName.AevumWatchdogSecurity] = \"WDS\";\nStockSymbols[LocationName.VolhavenLexoCorp] = \"LXO\";\nStockSymbols[LocationName.AevumRhoConstruction] = \"RHOC\";\nStockSymbols[LocationName.Sector12AlphaEnterprises] = \"APHE\";\nStockSymbols[LocationName.VolhavenSysCoreSecurities] = \"SYSC\";\nStockSymbols[LocationName.VolhavenCompuTek] = \"CTK\";\nStockSymbols[LocationName.AevumNetLinkTechnologies] = \"NTLK\";\nStockSymbols[LocationName.IshimaOmegaSoftware] = \"OMGA\";\nStockSymbols[LocationName.Sector12FoodNStuff] = \"FNS\";\nStockSymbols[LocationName.Sector12JoesGuns] = \"JGN\";\n\n// Stocks for other companies\nStockSymbols[\"Sigma Cosmetics\"] = \"SGC\";\nStockSymbols[\"Catalyst Ventures\"] = \"CTYS\";\nStockSymbols[\"Microdyne Technologies\"] = \"MDYN\";\nStockSymbols[\"Titan Laboratories\"] = \"TITN\";\n","export const validScriptExtensions: Array = [`.js`, `.script`, `.ns`];\n\nexport function isScriptFilename(f: string): boolean {\n return validScriptExtensions.some((ext) => f.endsWith(ext));\n}\n","import { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { Server } from \"./Server/Server\";\n\n/**\n * Returns the chance the player has to successfully hack a server\n */\nexport function calculateHackingChance(server: Server, player: IPlayer): number {\n const hackFactor = 1.75;\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = hackFactor * player.hacking;\n const skillChance = (skillMult - server.requiredHackingSkill) / skillMult;\n const chance =\n skillChance * difficultyMult * player.hacking_chance_mult * calculateIntelligenceBonus(player.intelligence, 1);\n if (chance > 1) {\n return 1;\n }\n if (chance < 0) {\n return 0;\n }\n\n return chance;\n}\n\n/**\n * Returns the amount of hacking experience the player will gain upon\n * successfully hacking a server\n */\nexport function calculateHackingExpGain(server: Server, player: IPlayer): number {\n const baseExpGain = 3;\n const diffFactor = 0.3;\n if (server.baseDifficulty == null) {\n server.baseDifficulty = server.hackDifficulty;\n }\n let expGain = baseExpGain;\n expGain += server.baseDifficulty * diffFactor;\n\n return expGain * player.hacking_exp_mult * BitNodeMultipliers.HackExpGain;\n}\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 */\nexport function calculatePercentMoneyHacked(server: Server, player: IPlayer): number {\n // Adjust if needed for balancing. This is the divisor for the final calculation\n const balanceFactor = 240;\n\n const difficultyMult = (100 - server.hackDifficulty) / 100;\n const skillMult = (player.hacking - (server.requiredHackingSkill - 1)) / player.hacking;\n const percentMoneyHacked = (difficultyMult * skillMult * player.hacking_money_mult * BitNodeMultipliers.ScriptHackMoney) / balanceFactor;\n if (percentMoneyHacked < 0) {\n return 0;\n }\n if (percentMoneyHacked > 1) {\n return 1;\n }\n\n return percentMoneyHacked;\n}\n\n/**\n * Returns time it takes to complete a hack on a server, in seconds\n */\nexport function calculateHackingTime(server: Server, player: IPlayer): number {\n const difficultyMult = server.requiredHackingSkill * server.hackDifficulty;\n\n const baseDiff = 500;\n const baseSkill = 50;\n const diffFactor = 2.5;\n let skillFactor = diffFactor * difficultyMult + baseDiff;\n // tslint:disable-next-line\n skillFactor /= player.hacking + baseSkill;\n\n const hackTimeMultiplier = 5;\n const hackingTime =\n (hackTimeMultiplier * skillFactor) /\n (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1));\n\n return hackingTime;\n}\n\n/**\n * Returns time it takes to complete a grow operation on a server, in seconds\n */\nexport function calculateGrowTime(server: Server, player: IPlayer): number {\n const growTimeMultiplier = 3.2; // Relative to hacking time. 16/5 = 3.2\n\n return growTimeMultiplier * calculateHackingTime(server, player);\n}\n\n/**\n * Returns time it takes to complete a weaken operation on a server, in seconds\n */\nexport function calculateWeakenTime(server: Server, player: IPlayer): number {\n const weakenTimeMultiplier = 4; // Relative to hacking time\n\n return weakenTimeMultiplier * calculateHackingTime(server, player);\n}\n","import { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { processOrders } from \"./OrderProcessing\";\nimport { Stock } from \"./Stock\";\nimport { TicksPerCycle } from \"./StockMarketConstants\";\nimport { InitStockMetadata } from \"./data/InitStockMetadata\";\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { StockSymbols } from \"./data/StockSymbols\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IMap } from \"../types\";\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\n\nexport let StockMarket: IStockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n} as IStockMarket; // Maps full stock name -> Stock object\nexport const SymbolToStockMap: IMap = {}; // Maps symbol -> Stock object\n\nexport function placeOrder(\n stock: Stock,\n shares: number,\n price: number,\n type: OrderTypes,\n position: PositionTypes,\n workerScript: WorkerScript | null = null,\n): boolean {\n if (!(stock instanceof Stock)) {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid stock: '${stock}'`);\n } else {\n dialogBoxCreate(`ERROR: Invalid stock passed to placeOrder() function`);\n }\n return false;\n }\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n if (workerScript) {\n workerScript.log(\"stock.placeOrder\", () => `Invalid arguments: shares='${shares}' price='${price}'`);\n } else {\n dialogBoxCreate(\"ERROR: Invalid numeric value provided for either 'shares' or 'price' argument\");\n }\n return false;\n }\n\n const order = new Order(stock.symbol, shares, price, type, position);\n if (StockMarket[\"Orders\"] == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stk = StockMarket[name];\n if (!(stk instanceof Stock)) {\n continue;\n }\n orders[stk.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n }\n StockMarket[\"Orders\"][stock.symbol].push(order);\n\n // Process to see if it should be executed immediately\n const processOrderRefs = {\n stockMarket: StockMarket as IStockMarket,\n symbolToStockMap: SymbolToStockMap,\n };\n processOrders(stock, order.type, order.pos, processOrderRefs);\n\n return true;\n}\n\n// Returns true if successfully cancels an order, false otherwise\ninterface ICancelOrderParams {\n order?: Order;\n pos?: PositionTypes;\n price?: number;\n shares?: number;\n stock?: Stock;\n type?: OrderTypes;\n}\nexport function cancelOrder(params: ICancelOrderParams, workerScript: WorkerScript | null = null): boolean {\n if (StockMarket[\"Orders\"] == null) {\n return false;\n }\n if (params.order && params.order instanceof Order) {\n const order = params.order;\n // An 'Order' object is passed in\n const stockOrders = StockMarket[\"Orders\"][order.stockSymbol];\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 return false;\n } else if (\n params.stock &&\n params.shares &&\n params.price &&\n params.type &&\n params.pos &&\n params.stock instanceof Stock\n ) {\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 + \" @ \" + numeralWrapper.formatMoney(params.price);\n for (let i = 0; i < stockOrders.length; ++i) {\n const order = stockOrders[i];\n if (\n params.shares === order.shares &&\n params.price === order.price &&\n params.type === order.type &&\n params.pos === order.pos\n ) {\n stockOrders.splice(i, 1);\n if (workerScript) {\n workerScript.scriptRef.log(\"Successfully cancelled order: \" + orderTxt);\n }\n return true;\n }\n }\n if (workerScript) {\n workerScript.scriptRef.log(\"Failed to cancel order: \" + orderTxt);\n }\n return false;\n }\n return false;\n}\n\nexport function loadStockMarket(saveString: string): void {\n if (saveString === \"\") {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n } else {\n StockMarket = JSON.parse(saveString, Reviver);\n }\n}\n\nexport function deleteStockMarket(): void {\n StockMarket = {\n lastUpdate: 0,\n Orders: {},\n storedCycles: 0,\n ticksUntilCycle: 0,\n } as IStockMarket;\n}\n\nexport function initStockMarket(): void {\n for (const stk of Object.keys(StockMarket)) {\n if (StockMarket.hasOwnProperty(stk)) {\n delete StockMarket[stk];\n }\n }\n\n for (const metadata of InitStockMetadata) {\n const name = metadata.name;\n StockMarket[name] = new Stock(metadata);\n }\n\n const orders: IOrderBook = {};\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n StockMarket[\"Orders\"] = orders;\n\n StockMarket.storedCycles = 0;\n StockMarket.lastUpdate = 0;\n StockMarket.ticksUntilCycle = TicksPerCycle;\n}\n\nexport function initSymbolToStockMap(): void {\n for (const name of Object.keys(StockSymbols)) {\n if (StockSymbols.hasOwnProperty(name)) {\n const stock = StockMarket[name];\n if (stock == null) {\n console.error(`Could not find Stock for ${name}`);\n continue;\n }\n const symbol = StockSymbols[name];\n SymbolToStockMap[symbol] = stock;\n }\n }\n}\n\nfunction stockMarketCycle(): void {\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n\n const roll = Math.random();\n if (roll < 0.45) {\n stock.b = !stock.b;\n stock.flipForecastForecast();\n }\n\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n}\n\n// Stock prices updated every 6 seconds\nconst msPerStockUpdate = 6e3;\nconst cyclesPerStockUpdate = msPerStockUpdate / CONSTANTS.MilliPerCycle;\nexport function processStockPrices(numCycles = 1): void {\n if (StockMarket.storedCycles == null || isNaN(StockMarket.storedCycles)) {\n StockMarket.storedCycles = 0;\n }\n StockMarket.storedCycles += numCycles;\n\n if (StockMarket.storedCycles < cyclesPerStockUpdate) {\n return;\n }\n\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 const timeNow = new Date().getTime();\n if (timeNow - StockMarket.lastUpdate < 4e3) {\n return;\n }\n\n StockMarket.lastUpdate = timeNow;\n StockMarket.storedCycles -= cyclesPerStockUpdate;\n\n // Cycle\n if (StockMarket.ticksUntilCycle == null || typeof StockMarket.ticksUntilCycle !== \"number\") {\n StockMarket.ticksUntilCycle = TicksPerCycle;\n }\n --StockMarket.ticksUntilCycle;\n if (StockMarket.ticksUntilCycle <= 0) {\n stockMarketCycle();\n }\n\n const v = Math.random();\n for (const name of Object.keys(StockMarket)) {\n const stock = StockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n let av = (v * stock.mv) / 100;\n if (isNaN(av)) {\n av = 0.02;\n }\n\n let chc = 50;\n if (stock.b) {\n chc = (chc + stock.otlkMag) / 100;\n } else {\n chc = (chc - stock.otlkMag) / 100;\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 stock.b = false;\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 if (c < chc) {\n stock.changePrice(stock.price * (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Short, processOrderRefs);\n } else {\n stock.changePrice(stock.price / (1 + av));\n processOrders(stock, OrderTypes.LimitBuy, PositionTypes.Long, processOrderRefs);\n processOrders(stock, OrderTypes.LimitSell, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopBuy, PositionTypes.Short, processOrderRefs);\n processOrders(stock, OrderTypes.StopSell, PositionTypes.Long, processOrderRefs);\n }\n\n let otlkMagChange = stock.otlkMag * av;\n if (stock.otlkMag < 5) {\n if (stock.otlkMag <= 1) {\n otlkMagChange = 1;\n } else {\n otlkMagChange *= 10;\n }\n }\n stock.cycleForecast(otlkMagChange);\n stock.cycleForecastForecast(otlkMagChange / 2);\n\n // Shares required for price movement gradually approaches max over time\n stock.shareTxUntilMovement = Math.min(stock.shareTxUntilMovement + 10, stock.shareTxForMovement);\n }\n}\n\nexport function initStockMarketFnForReact(): void {\n initStockMarket();\n initSymbolToStockMap();\n}\n\nexport const eventEmitterForUiReset = new EventEmitter<[]>();\n","/* Holds IP of Special Servers */\nexport const SpecialServers: {\n [key: string]: string | undefined;\n\n Home: string;\n FulcrumSecretTechnologies: string;\n CyberSecServer: string;\n NiteSecServer: string;\n TheBlackHandServer: string;\n BitRunnersServer: string;\n TheDarkArmyServer: string;\n DaedalusServer: string;\n WorldDaemon: string;\n DarkWeb: string;\n} = {\n Home: \"home\",\n FulcrumSecretTechnologies: \"fulcrumassets\",\n CyberSecServer: \"CSEC\",\n NiteSecServer: \"avmnite-02h\",\n TheBlackHandServer: \"I.I.I.I\",\n BitRunnersServer: \"run4theh111z\",\n TheDarkArmyServer: \".\",\n DaedalusServer: \"The-Cave\",\n WorldDaemon: \"w0r1d_d43m0n\",\n DarkWeb: \"darkweb\",\n};\n","import { Augmentations } from \"../Augmentation/Augmentations\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { PlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nimport { Faction } from \"./Faction\";\nimport { Factions } from \"./Factions\";\nimport { Player } from \"../Player\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Settings } from \"../Settings/Settings\";\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"../PersonObjects/formulas/reputation\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { InvitationEvent } from \"./ui/InvitationModal\";\nimport { FactionNames } from \"./data/FactionNames\";\nimport { SFC32RNG } from \"../Casino/RNG\";\n\nexport function inviteToFaction(faction: Faction): void {\n Player.receiveInvite(faction.name);\n faction.alreadyInvited = true;\n if (!Settings.SuppressFactionInvites) {\n InvitationEvent.emit(faction);\n }\n}\n\nexport function joinFaction(faction: Faction): void {\n if (faction.isMember) return;\n faction.isMember = true;\n Player.factions.push(faction.name);\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n Player.factions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n const factionInfo = faction.getInfo();\n\n //Determine what factions you are banned from now that you have joined this faction\n for (const enemy of factionInfo.enemies) {\n if (Factions[enemy] instanceof Faction) {\n Factions[enemy].isBanned = true;\n }\n }\n for (let i = 0; i < Player.factionInvitations.length; ++i) {\n if (Player.factionInvitations[i] == faction.name || Factions[Player.factionInvitations[i]].isBanned) {\n Player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n}\n\n//Returns a boolean indicating whether the player has the prerequisites for the\n//specified Augmentation\nexport function hasAugmentationPrereqs(aug: Augmentation): boolean {\n let hasPrereqs = true;\n if (aug.prereqs && aug.prereqs.length > 0) {\n for (let i = 0; i < aug.prereqs.length; ++i) {\n const prereqAug = Augmentations[aug.prereqs[i]];\n if (prereqAug == null) {\n console.error(`Invalid prereq Augmentation ${aug.prereqs[i]}`);\n continue;\n }\n if (prereqAug.owned === false) {\n hasPrereqs = false;\n\n // Check if the aug is purchased\n for (let j = 0; j < Player.queuedAugmentations.length; ++j) {\n if (Player.queuedAugmentations[j].name === prereqAug.name) {\n hasPrereqs = true;\n break;\n }\n }\n }\n }\n }\n\n return hasPrereqs;\n}\n\nexport function purchaseAugmentation(aug: Augmentation, fac: Faction, sing = false): string {\n const factionInfo = fac.getInfo();\n const hasPrereqs = hasAugmentationPrereqs(aug);\n if (!hasPrereqs) {\n const txt = `You must first purchase or install ${aug.prereqs.join(\",\")} before you can purchase this one.`;\n if (sing) {\n return txt;\n } else {\n dialogBoxCreate(txt);\n }\n } else if (aug.baseCost !== 0 && Player.money < aug.baseCost * factionInfo.augmentationPriceMult) {\n const txt = \"You don't have enough money to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (fac.playerReputation < aug.baseRepRequirement) {\n const txt = \"You don't have enough faction reputation to purchase \" + aug.name;\n if (sing) {\n return txt;\n }\n dialogBoxCreate(txt);\n } else if (aug.baseCost === 0 || Player.money >= aug.baseCost * factionInfo.augmentationPriceMult) {\n const queuedAugmentation = new PlayerOwnedAugmentation(aug.name);\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n queuedAugmentation.level = getNextNeurofluxLevel();\n }\n Player.queuedAugmentations.push(queuedAugmentation);\n\n Player.loseMoney(aug.baseCost * factionInfo.augmentationPriceMult, \"augmentations\");\n\n // If you just purchased Neuroflux Governor, recalculate the cost\n if (aug.name == AugmentationNames.NeuroFluxGovernor) {\n let nextLevel = getNextNeurofluxLevel();\n --nextLevel;\n const mult = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n aug.baseRepRequirement = 500 * mult * BitNodeMultipliers.AugmentationRepCost;\n aug.baseCost = 750e3 * mult * BitNodeMultipliers.AugmentationMoneyCost;\n\n for (let i = 0; i < Player.queuedAugmentations.length - 1; ++i) {\n aug.baseCost *= CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n }\n }\n\n for (const name of Object.keys(Augmentations)) {\n if (Augmentations.hasOwnProperty(name)) {\n Augmentations[name].baseCost *= CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n }\n }\n\n if (sing) {\n return \"You purchased \" + aug.name;\n } else if (!Settings.SuppressBuyAugmentationConfirmation) {\n dialogBoxCreate(\n \"You purchased \" +\n aug.name +\n \". Its enhancements will not take \" +\n \"effect until they are installed. To install your augmentations, go to the \" +\n \"'Augmentations' tab on the left-hand navigation menu. Purchasing additional \" +\n \"augmentations will now be more expensive.\",\n );\n }\n } else {\n dialogBoxCreate(\n \"Hmm, something went wrong when trying to purchase an Augmentation. \" +\n \"Please report this to the game developer with an explanation of how to \" +\n \"reproduce this.\",\n );\n }\n return \"\";\n}\n\nexport function getNextNeurofluxLevel(): number {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = Player.augmentations[i].level;\n }\n }\n\n // Account for purchased but uninstalled Augmentations\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n return currLevel + 1;\n}\n\nexport function processPassiveFactionRepGain(numCycles: number): void {\n for (const name of Object.keys(Factions)) {\n if (name === Player.currentWorkFactionName) continue;\n if (!Factions.hasOwnProperty(name)) continue;\n const faction = Factions[name];\n if (!faction.isMember) continue;\n // No passive rep for special factions\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No passive rep for gangs.\n if (Player.getGangName() === name) continue;\n // 0 favor = 1%/s\n // 50 favor = 6%/s\n // 100 favor = 11%/s\n const favorMult = Math.min(0.1, faction.favor / 1000 + 0.01);\n // Find the best of all possible favor gain, minimum 1 rep / 2 minute.\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n const rate = Math.max(hRep * favorMult, sRep * favorMult, fRep * favorMult, 1 / 120);\n\n faction.playerReputation += rate * numCycles * Player.faction_rep_mult * BitNodeMultipliers.FactionPassiveRepGain;\n }\n}\n\nexport const getFactionAugmentationsFiltered = (player: IPlayer, faction: Faction): string[] => {\n // If player has a gang with this faction, return (almost) all augmentations\n if (player.hasGangWith(faction.name)) {\n let augs = Object.values(Augmentations);\n\n // Remove special augs\n augs = augs.filter((a) => !a.isSpecial);\n\n const blacklist: string[] = [AugmentationNames.NeuroFluxGovernor];\n\n if (player.bitNodeN !== 2) {\n // TRP is not available outside of BN2 for Gangs\n blacklist.push(AugmentationNames.TheRedPill);\n }\n\n const rng = SFC32RNG(`BN${player.bitNodeN}.${player.sourceFileLvl(player.bitNodeN)}`);\n // Remove faction-unique augs that don't belong to this faction\n const uniqueFilter = (a: Augmentation): boolean => {\n // Keep all the non-unique one\n if (a.factions.length > 1) {\n return true;\n }\n // Keep all the ones that this faction has anyway.\n if (faction.augmentations.includes(a.name)) {\n return true;\n }\n\n return rng() >= 1 - BitNodeMultipliers.GangUniqueAugs;\n };\n augs = augs.filter(uniqueFilter);\n\n // Remove blacklisted augs\n augs = augs.filter((a) => !blacklist.includes(a.name));\n\n return augs.map((a) => a.name);\n }\n\n return faction.augmentations.slice();\n};\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*/\n\nexport enum Exploit {\n Bypass = \"Bypass\",\n PrototypeTampering = \"PrototypeTampering\",\n Unclickable = \"Unclickable\",\n UndocumentedFunctionCall = \"UndocumentedFunctionCall\",\n TimeCompression = \"TimeCompression\",\n RealityAlteration = \"RealityAlteration\",\n N00dles = \"N00dles\",\n YoureNotMeantToAccessThis = \"YoureNotMeantToAccessThis\",\n TrueRecursion = \"TrueRecursion\",\n INeedARainbow = \"INeedARainbow\",\n // To the players reading this. Yes you're supposed to add EditSaveFile by\n // editing your save file, yes you could add them all, no we don't care\n // that's not the point.\n EditSaveFile = \"EditSaveFile\",\n}\n\nconst names: {\n [key: string]: string;\n} = {\n Bypass: \"by circumventing the ram cost of document.\",\n EditSaveFile: \"by editing your save file.\",\n PrototypeTampering: \"by tampering with Numbers prototype.\",\n TimeCompression: \"by compressing time.\",\n Unclickable: \"by clicking the unclickable.\",\n UndocumentedFunctionCall: \"by looking beyond the documentation.\",\n RealityAlteration: \"by altering reality to suit your whims.\",\n N00dles: \"by harnessing the power of the n00dles.\",\n YoureNotMeantToAccessThis: \"by accessing the dev menu.\",\n TrueRecursion: \"by truly recursing.\",\n INeedARainbow: \"by using the power of the rainbow.\",\n};\n\nexport function ExploitName(exploit: string): string {\n return names[exploit];\n}\n\nexport function sanitizeExploits(exploits: Exploit[]): Exploit[] {\n exploits = exploits.filter((e: Exploit) => Object.keys(Exploit).includes(e));\n return [...new Set(exploits)];\n}\n","import { loadAliases, loadGlobalAliases, Aliases, GlobalAliases } from \"./Alias\";\nimport { Companies, loadCompanies } from \"./Company/Companies\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, loadFactions } from \"./Faction/Factions\";\nimport { loadAllGangs, AllGangs } from \"./Gang/AllGangs\";\nimport { loadMessages, initMessages, Messages } from \"./Message/MessageHelpers\";\nimport { Player, loadPlayer } from \"./Player\";\nimport { saveAllServers, loadAllServers, GetAllServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { loadStockMarket, StockMarket } from \"./StockMarket/StockMarket\";\nimport { staneksGift, loadStaneksGift } from \"./CotMG/Helper\";\n\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nimport * as ExportBonus from \"./ExportBonus\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"./utils/JSONReviver\";\nimport { save } from \"./db\";\nimport { v1APIBreak } from \"./utils/v1APIBreak\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { PlayerOwnedAugmentation } from \"./Augmentation/PlayerOwnedAugmentation\";\nimport { LocationName } from \"./Locations/data/LocationNames\";\nimport { SxProps } from \"@mui/system\";\nimport { PlayerObject } from \"./PersonObjects/Player/PlayerObject\";\nimport { pushGameSaved } from \"./Electron\";\n\n/* SaveObject.js\n * Defines the object used to save/load games\n */\n\nexport interface SaveData {\n playerIdentifier: string;\n fileName: string;\n save: string;\n savedOn: number;\n}\n\nexport interface ImportData {\n base64: string;\n parsed: any;\n playerData?: ImportPlayerData;\n}\n\nexport interface ImportPlayerData {\n identifier: string;\n lastSave: number;\n totalPlaytime: number;\n\n money: number;\n hacking: number;\n\n augmentations: number;\n factions: number;\n achievements: number;\n\n bitNode: number;\n bitNodeLevel: number;\n sourceFiles: number;\n}\n\nclass BitburnerSaveObject {\n PlayerSave = \"\";\n AllServersSave = \"\";\n CompaniesSave = \"\";\n FactionsSave = \"\";\n AliasesSave = \"\";\n GlobalAliasesSave = \"\";\n MessagesSave = \"\";\n StockMarketSave = \"\";\n SettingsSave = \"\";\n VersionSave = \"\";\n AllGangsSave = \"\";\n LastExportBonus = \"\";\n StaneksGiftSave = \"\";\n\n getSaveString(excludeRunningScripts = false): string {\n this.PlayerSave = JSON.stringify(Player);\n\n this.AllServersSave = saveAllServers(excludeRunningScripts);\n this.CompaniesSave = JSON.stringify(Companies);\n this.FactionsSave = JSON.stringify(Factions);\n this.AliasesSave = JSON.stringify(Aliases);\n this.GlobalAliasesSave = JSON.stringify(GlobalAliases);\n this.MessagesSave = JSON.stringify(Messages);\n this.StockMarketSave = JSON.stringify(StockMarket);\n this.SettingsSave = JSON.stringify(Settings);\n this.VersionSave = JSON.stringify(CONSTANTS.VersionNumber);\n this.LastExportBonus = JSON.stringify(ExportBonus.LastExportBonus);\n this.StaneksGiftSave = JSON.stringify(staneksGift);\n\n if (Player.inGang()) {\n this.AllGangsSave = JSON.stringify(AllGangs);\n }\n const saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));\n\n return saveString;\n }\n\n saveGame(emitToastEvent = true): Promise {\n const savedOn = new Date().getTime();\n Player.lastSave = savedOn;\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n return new Promise((resolve, reject) => {\n save(saveString)\n .then(() => {\n const saveData: SaveData = {\n playerIdentifier: Player.identifier,\n fileName: this.getSaveFileName(),\n save: saveString,\n savedOn,\n };\n pushGameSaved(saveData);\n\n if (emitToastEvent) {\n SnackbarEvents.emit(\"Game Saved!\", \"info\", 2000);\n }\n return resolve();\n })\n .catch((err) => {\n console.error(err);\n return reject();\n });\n });\n }\n\n getSaveFileName(isRecovery = false): string {\n // Save file name is based on current timestamp and BitNode\n const epochTime = Math.round(Date.now() / 1000);\n const bn = Player.bitNodeN;\n let filename = `bitburnerSave_${epochTime}_BN${bn}x${SourceFileFlags[bn]}.json`;\n if (isRecovery) filename = \"RECOVERY\" + filename;\n return filename;\n }\n\n exportGame(): void {\n const saveString = this.getSaveString(Settings.ExcludeRunningScriptsFromSave);\n const filename = this.getSaveFileName();\n download(filename, saveString);\n }\n\n importGame(base64Save: string, reload = true): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n return save(base64Save).then(() => {\n if (reload) setTimeout(() => location.reload(), 1000);\n return Promise.resolve();\n });\n }\n\n getImportStringFromFile(files: FileList | null): Promise {\n if (files === null) return Promise.reject(new Error(\"No file selected\"));\n const file = files[0];\n if (!file) return Promise.reject(new Error(\"Invalid file selected\"));\n\n const reader = new FileReader();\n const promise: Promise = new Promise((resolve, reject) => {\n reader.onload = function (this: FileReader, e: ProgressEvent) {\n const target = e.target;\n if (target === null) {\n return reject(new Error(\"Error importing file\"));\n }\n const result = target.result;\n if (typeof result !== \"string\") {\n return reject(new Error(\"FileReader event was not type string\"));\n }\n const contents = result;\n resolve(contents);\n };\n });\n reader.readAsText(file);\n return promise;\n }\n\n async getImportDataFromString(base64Save: string): Promise {\n if (!base64Save || base64Save === \"\") throw new Error(\"Invalid import string\");\n\n let newSave;\n try {\n newSave = window.atob(base64Save);\n newSave = newSave.trim();\n } catch (error) {\n console.error(error); // We'll handle below\n }\n\n if (!newSave || newSave === \"\") {\n return Promise.reject(new Error(\"Save game had not content or was not base64 encoded\"));\n }\n\n let parsedSave;\n try {\n parsedSave = JSON.parse(newSave);\n } catch (error) {\n console.log(error); // We'll handle below\n }\n\n if (!parsedSave || parsedSave.ctor !== \"BitburnerSaveObject\" || !parsedSave.data) {\n return Promise.reject(new Error(\"Save game did not seem valid\"));\n }\n\n const data: ImportData = {\n base64: base64Save,\n parsed: parsedSave,\n };\n\n const importedPlayer = PlayerObject.fromJSON(JSON.parse(parsedSave.data.PlayerSave));\n\n const playerData: ImportPlayerData = {\n identifier: importedPlayer.identifier,\n lastSave: importedPlayer.lastSave,\n totalPlaytime: importedPlayer.totalPlaytime,\n\n money: importedPlayer.money,\n hacking: importedPlayer.hacking,\n\n augmentations: importedPlayer.augmentations?.reduce((total, current) => (total += current.level), 0) ?? 0,\n factions: importedPlayer.factions?.length ?? 0,\n achievements: importedPlayer.achievements?.length ?? 0,\n\n bitNode: importedPlayer.bitNodeN,\n bitNodeLevel: importedPlayer.sourceFileLvl(Player.bitNodeN) + 1,\n sourceFiles: importedPlayer.sourceFiles?.reduce((total, current) => (total += current.lvl), 0) ?? 0,\n };\n\n data.playerData = playerData;\n return Promise.resolve(data);\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BitburnerSaveObject\", this);\n }\n\n static fromJSON(value: { data: any }): BitburnerSaveObject {\n return Generic_fromJSON(BitburnerSaveObject, value.data);\n }\n}\n\n// Makes necessary changes to the loaded/imported data to ensure\n// the game stills works with new versions\nfunction evaluateVersionCompatibility(ver: string | number): void {\n // We have to do this because ts won't let us otherwise\n const anyPlayer = Player as any;\n if (typeof ver === \"string\") {\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 (anyPlayer.companyPosition != null && typeof anyPlayer.companyPosition !== \"string\") {\n anyPlayer.companyPosition = anyPlayer.companyPosition.data.positionName;\n if (anyPlayer.companyPosition == null) {\n anyPlayer.companyPosition = \"\";\n }\n }\n\n // The \"companyName\" property of all Companies is renamed to \"name\"\n for (const companyName of Object.keys(Companies)) {\n const company: any = Companies[companyName];\n if (company.name == 0 && company.companyName != null) {\n company.name = company.companyName;\n }\n\n if (company.companyPositions instanceof Array) {\n const pos: any = {};\n\n for (let i = 0; i < company.companyPositions.length; ++i) {\n pos[company.companyPositions[i]] = true;\n }\n company.companyPositions = pos;\n }\n }\n }\n\n // This version allowed players to hold multiple jobs\n if (ver < \"0.43.0\") {\n if (anyPlayer.companyName !== \"\" && anyPlayer.companyPosition != null && anyPlayer.companyPosition !== \"\") {\n anyPlayer.jobs[anyPlayer.companyName] = anyPlayer.companyPosition;\n }\n\n delete anyPlayer.companyPosition;\n }\n if (ver < \"0.56.0\") {\n for (const q of anyPlayer.queuedAugmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n for (const q of anyPlayer.augmentations) {\n if (q.name === \"Graphene BranchiBlades Upgrade\") {\n q.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n if (ver < \"0.56.1\") {\n if (anyPlayer.bladeburner === 0) {\n anyPlayer.bladeburner = null;\n }\n if (anyPlayer.gang === 0) {\n anyPlayer.gang = null;\n }\n if (anyPlayer.corporation === 0) {\n anyPlayer.corporation = null;\n }\n // convert all Messages to just filename to save space.\n const home = anyPlayer.getHomeComputer();\n for (let i = 0; i < home.messages.length; i++) {\n if (home.messages[i].filename) {\n home.messages[i] = home.messages[i].filename;\n }\n }\n }\n if (ver < \"0.58.0\") {\n const changes: [RegExp, string][] = [\n [/getStockSymbols/g, \"stock.getSymbols\"],\n [/getStockPrice/g, \"stock.getPrice\"],\n [/getStockAskPrice/g, \"stock.getAskPrice\"],\n [/getStockBidPrice/g, \"stock.getBidPrice\"],\n [/getStockPosition/g, \"stock.getPosition\"],\n [/getStockMaxShares/g, \"stock.getMaxShares\"],\n [/getStockPurchaseCost/g, \"stock.getPurchaseCost\"],\n [/getStockSaleGain/g, \"stock.getSaleGain\"],\n [/buyStock/g, \"stock.buy\"],\n [/sellStock/g, \"stock.sell\"],\n [/shortStock/g, \"stock.short\"],\n [/sellShort/g, \"stock.sellShort\"],\n [/placeOrder/g, \"stock.placeOrder\"],\n [/cancelOrder/g, \"stock.cancelOrder\"],\n [/getOrders/g, \"stock.getOrders\"],\n [/getStockVolatility/g, \"stock.getVolatility\"],\n [/getStockForecast/g, \"stock.getForecast\"],\n [/purchase4SMarketData/g, \"stock.purchase4SMarketData\"],\n [/purchase4SMarketDataTixApi/g, \"stock.purchase4SMarketDataTixApi\"],\n ];\n function convert(code: string): string {\n for (const change of changes) {\n code = code.replace(change[0], change[1]);\n }\n return code;\n }\n for (const server of GetAllServers()) {\n for (const script of server.scripts) {\n script.code = convert(script.code);\n }\n }\n }\n v1APIBreak();\n ver = 1;\n }\n if (typeof ver === \"number\") {\n if (ver < 2) {\n // Give 10 neuroflux because v1 API break.\n const nf = Player.augmentations.find((a) => a.name === AugmentationNames.NeuroFluxGovernor);\n if (nf) {\n nf.level += 10;\n } else {\n const nf = new PlayerOwnedAugmentation(AugmentationNames.NeuroFluxGovernor);\n nf.level = 10;\n Player.augmentations.push(nf);\n }\n Player.reapplyAllAugmentations(true);\n Player.reapplyAllSourceFiles();\n }\n if (ver < 3) {\n anyPlayer.money = parseFloat(anyPlayer.money);\n if (anyPlayer.corporation) {\n anyPlayer.corporation.funds = parseFloat(anyPlayer.corporation.funds);\n anyPlayer.corporation.revenue = parseFloat(anyPlayer.corporation.revenue);\n anyPlayer.corporation.expenses = parseFloat(anyPlayer.corporation.expenses);\n\n for (let i = 0; i < anyPlayer.corporation.divisions.length; ++i) {\n const ind = anyPlayer.corporation.divisions[i];\n ind.lastCycleRevenue = parseFloat(ind.lastCycleRevenue);\n ind.lastCycleExpenses = parseFloat(ind.lastCycleExpenses);\n ind.thisCycleRevenue = parseFloat(ind.thisCycleRevenue);\n ind.thisCycleExpenses = parseFloat(ind.thisCycleExpenses);\n }\n }\n }\n if (ver < 9) {\n if (StockMarket.hasOwnProperty(\"Joes Guns\")) {\n const s = StockMarket[\"Joes Guns\"];\n delete StockMarket[\"Joes Guns\"];\n StockMarket[LocationName.Sector12JoesGuns] = s;\n }\n }\n if (ver < 10) {\n // Augmentation name was changed in 0.56.0 but sleeves aug list was missed.\n if (anyPlayer.sleeves && anyPlayer.sleeves.length > 0) {\n for (const sleeve of anyPlayer.sleeves) {\n if (!sleeve.augmentations || sleeve.augmentations.length === 0) continue;\n for (const augmentation of sleeve.augmentations) {\n if (augmentation.name !== \"Graphene BranchiBlades Upgrade\") continue;\n augmentation.name = \"Graphene BrachiBlades Upgrade\";\n }\n }\n }\n }\n if (ver < 12) {\n if (anyPlayer.resleeves !== undefined) {\n delete anyPlayer.resleeves;\n }\n }\n }\n}\n\nfunction loadGame(saveString: string): boolean {\n createScamUpdateText();\n if (!saveString) return false;\n saveString = decodeURIComponent(escape(atob(saveString)));\n\n const saveObj = JSON.parse(saveString, Reviver);\n\n loadPlayer(saveObj.PlayerSave);\n loadAllServers(saveObj.AllServersSave);\n loadCompanies(saveObj.CompaniesSave);\n loadFactions(saveObj.FactionsSave);\n\n if (saveObj.hasOwnProperty(\"StaneksGiftSave\")) {\n loadStaneksGift(saveObj.StaneksGiftSave);\n } else {\n console.warn(`Could not load Staneks Gift from save`);\n loadStaneksGift(\"\");\n }\n if (saveObj.hasOwnProperty(\"AliasesSave\")) {\n try {\n loadAliases(saveObj.AliasesSave);\n } catch (e) {\n console.warn(`Could not load Aliases from save`);\n loadAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain an Aliases property`);\n loadAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"GlobalAliasesSave\")) {\n try {\n loadGlobalAliases(saveObj.GlobalAliasesSave);\n } catch (e) {\n console.warn(`Could not load GlobalAliases from save`);\n loadGlobalAliases(\"\");\n }\n } else {\n console.warn(`Save file did not contain a GlobalAliases property`);\n loadGlobalAliases(\"\");\n }\n if (saveObj.hasOwnProperty(\"MessagesSave\")) {\n try {\n loadMessages(saveObj.MessagesSave);\n } catch (e) {\n console.warn(`Could not load Messages from save`);\n initMessages();\n }\n } else {\n console.warn(`Save file did not contain a Messages property`);\n initMessages();\n }\n if (saveObj.hasOwnProperty(\"StockMarketSave\")) {\n try {\n loadStockMarket(saveObj.StockMarketSave);\n } catch (e) {\n loadStockMarket(\"\");\n }\n } else {\n loadStockMarket(\"\");\n }\n if (saveObj.hasOwnProperty(\"SettingsSave\")) {\n try {\n Settings.load(saveObj.SettingsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse Settings. Re-initing default values\");\n Settings.init();\n }\n } else {\n Settings.init();\n }\n if (saveObj.hasOwnProperty(\"LastExportBonus\")) {\n try {\n ExportBonus.setLastExportBonus(JSON.parse(saveObj.LastExportBonus));\n } catch (err) {\n ExportBonus.setLastExportBonus(new Date().getTime());\n console.error(\"ERROR: Failed to parse last export bonus Settings \" + err);\n }\n }\n if (Player.inGang() && saveObj.hasOwnProperty(\"AllGangsSave\")) {\n try {\n loadAllGangs(saveObj.AllGangsSave);\n } catch (e) {\n console.error(\"ERROR: Failed to parse AllGangsSave: \" + e);\n }\n }\n if (saveObj.hasOwnProperty(\"VersionSave\")) {\n try {\n const ver = JSON.parse(saveObj.VersionSave, Reviver);\n evaluateVersionCompatibility(ver);\n if (window.location.href.toLowerCase().includes(\"bitburner-beta\")) {\n // Beta branch, always show changes\n createBetaUpdateText();\n } else if (ver !== CONSTANTS.VersionNumber) {\n createNewUpdateText();\n }\n } catch (e) {\n createNewUpdateText();\n }\n } else {\n createNewUpdateText();\n }\n return true;\n}\n\nfunction createScamUpdateText(): void {\n if (navigator.userAgent.indexOf(\"wv\") !== -1 && navigator.userAgent.indexOf(\"Chrome/\") !== -1) {\n setInterval(() => {\n dialogBoxCreate(\"SCAM ALERT. This app is not official and you should uninstall it.\");\n }, 1000);\n }\n}\n\nconst resets: SxProps = {\n \"& h1, & h2, & h3, & h4, & p, & a, & ul\": {\n margin: 0,\n color: Settings.theme.primary,\n whiteSpace: \"initial\",\n },\n \"& ul\": {\n paddingLeft: \"1.5em\",\n lineHeight: 1.5,\n },\n};\n\nfunction createNewUpdateText(): void {\n setTimeout(\n () =>\n dialogBoxCreate(\n \"New update!
    \" +\n \"Please report any bugs/issues through the github repository \" +\n \"or the Bitburner subreddit (reddit.com/r/bitburner).

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

    \" +\n CONSTANTS.LatestUpdate,\n resets,\n );\n}\n\nfunction download(filename: string, content: string): void {\n const file = new Blob([content], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n 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 setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n}\n\nReviver.constructors.BitburnerSaveObject = BitburnerSaveObject;\n\nexport { saveObject, loadGame, download };\n\nconst saveObject = new BitburnerSaveObject();\n","import { isString } from \"./utils/helpers/isString\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\n\nexport function netscriptDelay(time: number, workerScript: WorkerScript): Promise {\n if (workerScript.delayReject) workerScript.delayReject();\n return new Promise(function (resolve, reject) {\n workerScript.delay = window.setTimeout(() => {\n workerScript.delay = null;\n workerScript.delayReject = undefined;\n\n if (workerScript.env.stopFlag) reject(workerScript);\n else resolve();\n }, time);\n workerScript.delayReject = reject;\n });\n}\n\nexport function makeRuntimeRejectMsg(workerScript: WorkerScript, msg: string): string {\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${workerScript.hostname}`);\n }\n\n for (const scriptUrl of workerScript.scriptRef.dependencies) {\n // Return just the original msg if it's nullish so that we don't get a workerscript error\n msg = msg?.replace(new RegExp(scriptUrl.url, \"g\"), scriptUrl.filename) ?? msg;\n }\n\n return \"|DELIMITER|\" + server.hostname + \"|DELIMITER|\" + workerScript.name + \"|DELIMITER|\" + msg;\n}\n\nexport function resolveNetscriptRequestedThreads(\n workerScript: WorkerScript,\n functionName: string,\n requestedThreads: number,\n): number {\n const threads = workerScript.scriptRef.threads;\n if (!requestedThreads) {\n return isNaN(threads) || threads < 1 ? 1 : threads;\n }\n const requestedThreadsAsInt = requestedThreads | 0;\n if (isNaN(requestedThreads) || requestedThreadsAsInt < 1) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid thread count passed to ${functionName}: ${requestedThreads}. Threads must be a positive number.`,\n );\n }\n if (requestedThreadsAsInt > threads) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Too many threads requested by ${functionName}. Requested: ${requestedThreads}. Has: ${threads}.`,\n );\n }\n return requestedThreadsAsInt;\n}\n\nexport function isScriptErrorMessage(msg: string): boolean {\n if (!isString(msg)) {\n return false;\n }\n const splitMsg = msg.split(\"|DELIMITER|\");\n return splitMsg.length == 4;\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Money } from \"./Money\";\n\nexport function MoneyRate({ money }: { money: number }): JSX.Element {\n return ;\n}\n","import { codingContractTypesMetadata, DescriptionFunc, GeneratorFunc, SolverFunc } from \"./data/codingcontracttypes\";\n\nimport { IMap } from \"./types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\nimport { CodingContractEvent } from \"./ui/React/CodingContractModal\";\n\n/* tslint:disable:no-magic-numbers completed-docs max-classes-per-file no-console */\n\n/* Represents different types of problems that a Coding Contract can have */\nclass CodingContractType {\n /**\n * Function that generates a description of the problem\n */\n desc: DescriptionFunc;\n\n /**\n * Number that generally represents the problem's difficulty. Bigger numbers = harder\n */\n difficulty: number;\n\n /**\n * A function that randomly generates a valid 'data' for the problem\n */\n generate: GeneratorFunc;\n\n /**\n * Name of the type of problem\n */\n name: string;\n\n /**\n * The maximum number of tries the player gets on this kind of problem before it self-destructs\n */\n numTries: number;\n\n /**\n * Stores a function that checks if the provided answer is correct\n */\n solver: SolverFunc;\n\n constructor(\n name: string,\n desc: DescriptionFunc,\n gen: GeneratorFunc,\n solver: SolverFunc,\n diff: number,\n numTries: number,\n ) {\n this.name = name;\n this.desc = desc;\n this.generate = gen;\n this.solver = solver;\n this.difficulty = diff;\n this.numTries = numTries;\n }\n}\n\n/* Contract Types */\n// tslint:disable-next-line\nexport const CodingContractTypes: IMap = {};\n\nfor (const md of codingContractTypesMetadata) {\n // tslint:disable-next-line\n CodingContractTypes[md.name] = new CodingContractType(\n md.name,\n md.desc,\n md.gen,\n md.solver,\n md.difficulty,\n md.numTries,\n );\n}\n\n/**\n * Enum representing the different types of rewards a Coding Contract can give\n */\nexport enum CodingContractRewardType {\n FactionReputation,\n FactionReputationAll,\n CompanyReputation,\n Money, // This must always be the last reward type\n}\n\n/**\n * Enum representing the result when trying to solve the Contract\n */\nexport enum CodingContractResult {\n Success,\n Failure,\n Cancelled,\n}\n\n/**\n * A class that represents the type of reward a contract gives\n */\nexport interface ICodingContractReward {\n /* Name of Company/Faction name for reward, if applicable */\n name?: string;\n type: CodingContractRewardType;\n}\n\n/**\n * A Coding Contract is a file that poses a programming-related problem to the Player.\n * The player receives a reward if the problem is solved correctly\n */\nexport class CodingContract {\n /* Relevant data for the contract's problem */\n data: any;\n\n /* Contract's filename */\n fn: string;\n\n /* Describes the reward given if this Contract is solved. The reward is actually\n processed outside of this file */\n reward: ICodingContractReward | null;\n\n /* Number of times the Contract has been attempted */\n tries = 0;\n\n /* String representing the contract's type. Must match type in ContractTypes */\n type: string;\n\n constructor(fn = \"\", type = \"Find Largest Prime Factor\", reward: ICodingContractReward | null = null) {\n this.fn = fn;\n if (!this.fn.endsWith(\".cct\")) {\n this.fn += \".cct\";\n }\n\n // tslint:disable-next-line\n if (CodingContractTypes[type] == null) {\n throw new Error(`Error: invalid contract type: ${type} please contact developer`);\n }\n\n this.type = type;\n this.data = CodingContractTypes[type].generate();\n this.reward = reward;\n }\n\n getData(): any {\n return this.data;\n }\n\n getDescription(): string {\n return CodingContractTypes[this.type].desc(this.data);\n }\n\n getDifficulty(): number {\n return CodingContractTypes[this.type].difficulty;\n }\n\n getMaxNumTries(): number {\n return CodingContractTypes[this.type].numTries;\n }\n\n getType(): string {\n return CodingContractTypes[this.type].name;\n }\n\n isSolution(solution: string): boolean {\n return CodingContractTypes[this.type].solver(this.data, solution);\n }\n\n /**\n * Creates a popup to prompt the player to solve the problem\n */\n async prompt(): Promise {\n return new Promise((resolve) => {\n const props = {\n c: this,\n onClose: () => {\n resolve(CodingContractResult.Cancelled);\n },\n onAttempt: (val: string) => {\n if (this.isSolution(val)) {\n resolve(CodingContractResult.Success);\n } else {\n resolve(CodingContractResult.Failure);\n }\n },\n };\n CodingContractEvent.emit(props);\n });\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"CodingContract\", this);\n }\n\n /**\n * Initiatizes a CodingContract from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): CodingContract {\n return Generic_fromJSON(CodingContract, value.data);\n }\n}\n\nReviver.constructors.CodingContract = CodingContract;\n","export enum OrderTypes {\n LimitBuy = \"Limit Buy Order\",\n LimitSell = \"Limit Sell Order\",\n StopBuy = \"Stop Buy Order\",\n StopSell = \"Stop Sell Order\",\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n reputation: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Reputation({ reputation }: { reputation: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n \n {typeof reputation === \"number\" ? numeralWrapper.formatReputation(reputation) : reputation}\n \n );\n}\n","import { Reviver } from \"../utils/JSONReviver\";\n\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { StaneksGift } from \"./StaneksGift\";\n\nexport let staneksGift: IStaneksGift = new StaneksGift();\n\nexport function loadStaneksGift(saveString: string): void {\n if (saveString) {\n staneksGift = JSON.parse(saveString, Reviver);\n } else {\n staneksGift = new StaneksGift();\n }\n}\n","import React, { useState } from \"react\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport RemoveIcon from \"@mui/icons-material/Remove\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\";\nimport TextField from \"@mui/material/TextField\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n label: string;\n placeholder: string;\n add: (x: number) => void;\n subtract: (x: number) => void;\n tons: () => void;\n reset: () => void;\n}\n\nexport function Adjuster(props: IProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setValue(\"\");\n else setValue(parseFloat(event.target.value));\n }\n\n const { label, placeholder, add, subtract, reset, tons } = props;\n return (\n <>\n \n \n \n \n \n \n \n add(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n ),\n endAdornment: (\n <>\n \n subtract(typeof value !== \"string\" ? value : 0)} size=\"large\">\n \n \n \n \n \n \n \n \n \n ),\n }}\n />\n \n );\n}\n","// Defines the ResearchTree that is common to all Corporation Industries\n// i.e. all Industries have these types of Research available to unlock\nimport { Research } from \"../Research\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { ResearchTree, Node } from \"../ResearchTree\";\n\nfunction makeNode(name: string): Node {\n const research: Research | null = ResearchMap[name];\n if (research == null) {\n throw new Error(`Invalid research name: ${name}`);\n }\n\n return new Node({ text: research.name, cost: research.cost });\n}\n\n// Creates the Nodes for the BaseResearchTree.\n// Return the Root Node\nfunction createBaseResearchTreeNodes(): Node {\n const rootNode: Node = makeNode(\"Hi-Tech R&D Laboratory\");\n const autoBrew: Node = makeNode(\"AutoBrew\");\n const autoParty: Node = makeNode(\"AutoPartyManager\");\n const autoDrugs: Node = makeNode(\"Automatic Drug Administration\");\n const bulkPurchasing: Node = makeNode(\"Bulk Purchasing\");\n const cph4: Node = makeNode(\"CPH4 Injections\");\n const drones: Node = makeNode(\"Drones\");\n const dronesAssembly: Node = makeNode(\"Drones - Assembly\");\n const dronesTransport: Node = makeNode(\"Drones - Transport\");\n const goJuice: Node = makeNode(\"Go-Juice\");\n const hrRecruitment: Node = makeNode(\"HRBuddy-Recruitment\");\n const hrTraining: Node = makeNode(\"HRBuddy-Training\");\n const joywire: Node = makeNode(\"JoyWire\");\n const marketta1: Node = makeNode(\"Market-TA.I\");\n const marketta2: Node = makeNode(\"Market-TA.II\");\n const overclock: Node = makeNode(\"Overclock\");\n const scAssemblers: Node = makeNode(\"Self-Correcting Assemblers\");\n const stimu: Node = makeNode(\"Sti.mu\");\n\n autoDrugs.addChild(goJuice);\n autoDrugs.addChild(cph4);\n\n drones.addChild(dronesAssembly);\n drones.addChild(dronesTransport);\n\n hrRecruitment.addChild(hrTraining);\n\n marketta1.addChild(marketta2);\n\n overclock.addChild(stimu);\n\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\n return rootNode;\n}\n\nexport function getBaseResearchTreeCopy(): ResearchTree {\n const baseResearchTree: ResearchTree = new ResearchTree();\n baseResearchTree.setRoot(createBaseResearchTreeNodes());\n\n return baseResearchTree;\n}\n\n// Base Research Tree for Industry's that make products\nexport function getProductIndustryResearchTreeCopy(): ResearchTree {\n const researchTree: ResearchTree = new ResearchTree();\n const root = createBaseResearchTreeNodes();\n\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\n upgradeCapacity1.addChild(upgradeCapacity2);\n upgradeFulcrum.addChild(upgradeCapacity1);\n upgradeFulcrum.addChild(upgradeDashboard);\n root.addChild(upgradeFulcrum);\n\n researchTree.setRoot(root);\n\n return researchTree;\n}\n","/**\n * Generic Event Emitter class following a subscribe/publish paradigm.\n */\nfunction uuidv4(): string {\n return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, function (c) {\n const r = (Math.random() * 16) | 0,\n v = c == \"x\" ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\n\nexport class EventEmitter {\n subscribers: { [key: string]: (...args: [...T]) => void | undefined } = {};\n\n subscribe(s: (...args: [...T]) => void): () => void {\n let uuid = uuidv4();\n while (this.subscribers[uuid] !== undefined) uuid = uuidv4();\n this.subscribers[uuid] = s;\n\n return () => {\n delete this.subscribers[uuid];\n };\n }\n\n emit(...args: [...T]): void {\n for (const s in this.subscribers) {\n const sub = this.subscribers[s];\n if (sub === undefined) continue;\n\n sub(...args);\n }\n }\n}\n","import { GetServer, createUniqueRandomIp, ipExists } from \"./AllServers\";\nimport { Server, IConstructorParams } from \"./Server\";\nimport { BaseServer } from \"./BaseServer\";\nimport { calculateServerGrowth } from \"./formulas/grow\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Programs } from \"../Programs/Programs\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\n\nimport { isValidNumber } from \"../utils/helpers/isValidNumber\";\n\n/**\n * Constructs a new server, while also ensuring that the new server\n * does not have a duplicate hostname/ip.\n */\nexport function safetlyCreateUniqueServer(params: IConstructorParams): Server {\n let hostname: string = params.hostname.replace(/ /g, `-`);\n\n if (params.ip != null && ipExists(params.ip)) {\n params.ip = createUniqueRandomIp();\n }\n\n if (GetServer(hostname) != null) {\n hostname = `${hostname}-0`;\n\n // Use a for loop to ensure that we don't get suck in an infinite loop somehow\n for (let i = 0; i < 200; ++i) {\n hostname = hostname.replace(/-[0-9]+$/, `-${i}`);\n if (GetServer(hostname) == null) {\n break;\n }\n }\n }\n\n params.hostname = hostname;\n return new Server(params);\n}\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 */\nexport function numCycleForGrowth(server: Server, growth: number, p: IPlayer, cores = 1): number {\n let ajdGrowthRate = 1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty;\n if (ajdGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n ajdGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n const serverGrowthPercentage = server.serverGrowth / 100;\n\n const coreBonus = 1 + (cores - 1) / 16;\n const cycles =\n Math.log(growth) /\n (Math.log(ajdGrowthRate) *\n p.hacking_grow_mult *\n serverGrowthPercentage *\n BitNodeMultipliers.ServerGrowthRate *\n coreBonus);\n\n return cycles;\n}\n\n/**\n * Replacement function for the above function that accounts for the +$1/thread functionality of grow\n * with parameters that are the same (for compatibility), but functionality is slightly different.\n * This function can ONLY be used to calculate the threads needed for a given server in its current state,\n * and so wouldn't be appropriate to use for formulas.exe or ns.growthAnalyze (as those are meant to\n * provide theoretical scenarios, or inverse hack respectively). Players COULD use this function with a\n * custom server object with the correct moneyAvailable and moneyMax amounts, combined with a multiplier\n * correctly calculated to bring the server to a new moneyAvailable (ie, passing in moneyAvailable 300 and x2\n * when you want the number of threads required to grow that particular server from 300 to 600), and this\n * function would pass back the correct number of threads. But the key thing is that it doesn't just\n * inverse/undo a hack (since the amount hacked from/to matters, not just the multiplier).\n * The above is also a rather unnecessarily obtuse way of thinking about it for a formulas.exe type of\n * application, so another function with different parameters is provided for that case below this one.\n * Instead this function is meant to hand-off from the old numCycleForGrowth function to the new one\n * where used internally for pro-rating or the like. Where you have applied a grow and want to determine\n * how many threads were needed for THAT SPECIFIC grow case using a multiplier.\n * Ideally, this function, and the original function above will be depreciated to use the methodology\n * and inputs of the new function below this one. Even for internal cases (it's actually easier to do so).\n * @param server - Server being grown\n * @param growth - How much the server money is expected to be multiplied by (e.g. 1.5 for *1.5 / +50%)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthTransition(server: Server, growth: number, p: IPlayer, cores = 1): number {\n return numCycleForGrowthCorrected(server, server.moneyAvailable * growth, server.moneyAvailable, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server from one $amount to a higher $amount\n * (ie, how many threads to grow this server from $200 to $600 for example). Used primarily for a formulas (or possibly growthAnalyze)\n * type of application. It lets you \"theorycraft\" and easily ask what-if type questions. It's also the one that implements the\n * main thread calculation algorithm, and so is the function all helper functions should call.\n * It protects the inputs (so putting in INFINITY for targetMoney will use moneyMax, putting in a negative for start will use 0, etc.)\n * @param server - Server being grown\n * @param targetMoney - How much you want the server grown TO (not by), for instance, to grow from 200 to 600, input 600\n * @param startMoney - How much you are growing the server from, for instance, to grow from 200 to 600, input 200\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthCorrected(server: Server, targetMoney: number, startMoney: number, p: IPlayer, cores = 1): number {\n\tif (startMoney < 0) { startMoney = 0; } // servers \"can't\" have less than 0 dollars on them\n\tif (targetMoney > server.moneyMax) { targetMoney = server.moneyMax; } // can't grow a server to more than its moneyMax\n\tif (targetMoney <= startMoney) { return 0; } // no growth --> no threads\n\n\t// exponential base adjusted by security\n\tconst adjGrowthRate = (1 + (CONSTANTS.ServerBaseGrowthRate - 1) / server.hackDifficulty);\n\tconst exponentialBase = Math.min(adjGrowthRate, CONSTANTS.ServerMaxGrowthRate); // cap growth rate\n\n\t// total of all grow thread multipliers\n\tconst serverGrowthPercentage = server.serverGrowth / 100.0;\n\tconst coreMultiplier = 1 + ((cores - 1) / 16);\n\tconst threadMultiplier = serverGrowthPercentage * p.hacking_grow_mult * coreMultiplier * BitNodeMultipliers.ServerGrowthRate;\n\n\t/* To understand what is done below we need to do some math. I hope the explanation is clear enough.\n\t * First of, the names will be shortened for ease of manipulation:\n\t * n:= targetMoney (n for new), o:= startMoney (o for old), b:= exponentialBase, t:= threadMultiplier, c:= cycles/threads\n\t * c is what we are trying to compute.\n\t *\n\t * After growing, the money on a server is n = (o + c) * b^(c*t)\n\t * c appears in an exponent and outside it, this is usually solved using the productLog/lambert's W special function\n\t * this function will be noted W in the following\n\t * The idea behind lambert's W function is W(x)*exp(W(x)) = x, or in other words, solving for y, y*exp(y) = x, as a function of x\n\t * This function is provided in some advanced math library but we will compute it ourself here.\n\t *\n\t * Let's get back to solving the equation. It cannot be rewrote using W immediately because the base of the exponentiation is b\n\t * b^(c*t) = exp(ln(b)*c*t) (this is how a^b is defined on reals, it matches the definition on integers)\n\t * so n = (o + c) * exp(ln(b)*c*t) , W still cannot be used directly. We want to eliminate the other terms in 'o + c' and 'ln(b)*c*t'.\n\t *\n\t * A change of variable will do. The idea is to add an equation introducing a new variable (w here) in the form c = f(w) (for some f)\n\t * With this equation we will eliminate all references to c, then solve for w and plug the result in the new equation to get c.\n\t * The change of variable performed here should get rid of the unwanted terms mentionned above, c = w/(ln(b)*t) - o should help.\n\t * This change of variable is allowed because whatever the value of c is, there is a value of w such that this equation holds:\n\t * w = (c + o)*ln(b)*t (see how we used the terms we wanted to eliminate in order to build this variable change)\n\t *\n\t * We get n = (o + w/(ln(b)*t) - o) * exp(ln(b)*(w/(ln(b)*t) - o)*t) [ = w/(ln(b)*t) * exp(w - ln(b)*o*t) ]\n\t * The change of variable exposed exp(w - o*ln(b)*t), we can rewrite that with exp(a - b) = exp(a)/exp(b) to isolate 'w*exp(w)'\n\t * n = w/(ln(b)*t) * exp(w)/exp(ln(b)*o*t) [ = w*exp(w) / (ln(b) * t * b^(o*t)) ]\n\t * Almost there, we just need to cancel the denominator on the right side of the equation:\n\t * n * ln(b) * t * b^(o*t) = w*exp(w), Thus w = W(n * ln(b) * t * b^(o*t))\n\t * Finally we invert the variable change: c = W(n * ln(b) * t * b^(o*t))/(ln(b)*t) - o\n\t *\n\t * There is still an issue left: b^(o*t) doesn't fit inside a double precision float\n\t * because the typical amount of money on servers is arround 10^6~10^9\n\t * We need to get an approximation of W without computing the power when o is huge\n\t * Thankfully an approximation giving ~30% error uses log immediately so we will use\n\t * W(n * ln(b) * t * b^(o*t)) ~= log(n * ln(b) * t * b^(o*t)) = log(n * ln(b) * t) + log(exp(ln(b) * o * t))\n\t * = log(n * ln(b) * t) + ln(b) * o * t\n\t * (thanks to Drak for the grow formula, f4113nb34st and Wolfram Alpha for the rewrite, dwRchyngqxs for the explanation)\n\t */\n\tconst x = threadMultiplier * Math.log(exponentialBase);\n\tconst y = startMoney * x + Math.log(targetMoney * x);\n\t/* Code for the approximation of lambert's W function is adapted from\n\t * https://git.savannah.gnu.org/cgit/gsl.git/tree/specfunc/lambert.c\n\t * using the articles [1] https://doi.org/10.1007/BF02124750 (algorithm above)\n\t * and [2] https://doi.org/10.1145/361952.361970 (initial approximation when x < 2.5)\n\t */\n\tlet w;\n\tif (y < Math.log(2.5)) {\n\t\t/* exp(y) can be safely computed without overflow.\n\t\t * The relative error on the result is better when exp(y) < 2.5\n\t\t * using Padé rational fraction approximation [2](5)\n\t\t */\n\t\tconst ey = Math.exp(y);\n\t\tw = (ey + 4/3 * ey*ey) / (1 + 7/3 * ey + 5/6 * ey*ey);\n\t} else {\n\t\t/* obtain initial approximation from rough asymptotic [1](4.18)\n\t\t * w = y [- log y when 0 <= y]\n\t\t */\n\t\tw = y;\n\t\tif (y > 0) w -= Math.log(y);\n\t}\n\tlet cycles = w/x - startMoney;\n\n\t/* Iterative refinement, the goal is to correct c until |(o + c) * b^(c*t) - n| < 1\n\t * or the correction on the approximation is less than 1\n\t * The Newton-Raphson method will be used, this method is a classic to find roots of functions\n\t * (given f, find c such that f(c) = 0).\n\t *\n\t * The idea of this method is to take the horizontal position at which the horizontal axis\n\t * intersects with of the tangent of the function's curve as the next approximation.\n\t * It is equivalent to treating the curve as a line (it is called a first order approximation)\n\t * If the current approximation is c then the new approximated value is c - f(c)/f'(c)\n\t * (where f' is the derivative of f).\n\t *\n\t * In our case f(c) = (o + c) * b^(c*t) - n, f'(c) = d((o + c) * b^(c*t) - n)/dc\n\t * = (ln(b)*t * (c + o) + 1) * b^(c*t)\n\t * And the update step is c[new] = c[old] - ((o + c) * b^(c*t) - n)/((ln(b)*t * (o + c) + 1) * b^(c*t))\n\t *\n\t * The main question to ask when using this method is \"does it converges?\"\n\t * (are the approximations getting better?), if it does then it does quickly.\n\t * DOES IT CONVERGES? In the present case it does. The reason why doesn't help explaining the algorithm.\n\t * If you are intrested then check out the wikipedia page.\n\t */\n\tconst bt = exponentialBase**threadMultiplier;\n\tlet corr = Infinity;\n\t// Two sided error because we do not want to get stuck if the error stays on the wrong side\n\tdo {\n\t\t// c should be above 0 so Halley's method can't be used, we have to stick to Newton-Raphson\n\t\tconst bct = bt**cycles;\n\t\tconst opc = startMoney + cycles;\n\t\tconst diff = opc * bct - targetMoney;\n\t\tcorr = diff / (opc * x + 1.0) / bct\n\t\tcycles -= corr;\n\t} while (Math.abs(corr) >= 1)\n\t/* c is now within +/- 1 of the exact result.\n\t * We want the ceiling of the exact result, so the floor if the approximation is above,\n\t * the ceiling if the approximation is in the same unit as the exact result,\n\t * and the ceiling + 1 if the approximation is below.\n\t */\n\tconst fca = Math.floor(cycles);\n\tif (targetMoney <= (startMoney + fca)*Math.pow(exponentialBase, fca*threadMultiplier)) {\n\t\treturn fca;\n\t}\n\tconst cca = Math.ceil(cycles);\n\tif (targetMoney <= (startMoney + cca)*Math.pow(exponentialBase, cca*threadMultiplier)) {\n\t\treturn cca;\n\t}\n\treturn cca + 1;\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on a pre-hack money and hackAmt\n * (ie, if you're hacking a server with $1e6 moneyAvail for 60%, this function will tell you how many threads to regrow it\n * A good replacement for the current ns.growthAnalyze if you want players to have more control/responsibility\n * @param server - Server being grown\n * @param hackProp - the proportion of money hacked (total, not per thread, like 0.60 for hacking 60% of available money)\n * @param prehackMoney - how much money the server had before being hacked (like 200000 for hacking a server that had $200000 on it at time of hacking)\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed to reverse the described hack\n */\nexport function numCycleForGrowthByHackAmt(server: Server, hackProp: number, prehackMoney: number, p: IPlayer, cores = 1): number{\n\tif (prehackMoney > server.moneyMax) prehackMoney = server.moneyMax;\n\tconst posthackMoney = Math.floor(prehackMoney * Math.min(1, Math.max(0, (1 - hackProp))));\n\treturn numCycleForGrowthCorrected(server, prehackMoney, posthackMoney, p, cores);\n}\n\n/**\n * This function calculates the number of threads needed to grow a server based on an expected growth multiplier assuming it will max out\n * (ie, if you expect to grow a server by 60% to reach maxMoney, this function will tell you how many threads to grow it)\n * PROBABLY the best replacement for the current ns.growthAnalyze to maintain existing scripts\n * @param server - Server being grown\n * @param growth - How much the server is being grown by, as a multiple in DECIMAL form (e.g. 1.5 rather than 50). Infinity is acceptable.\n * @param p - Reference to Player object\n * @returns Number of \"growth cycles\" needed\n */\nexport function numCycleForGrowthByMultiplier(server: Server, growth: number, p: IPlayer, cores = 1): number{\n\tif (growth < 1.0) growth = 1.0;\n\tconst targetMoney = server.moneyMax;\n\tconst startingMoney = server.moneyMax / growth;\n\treturn numCycleForGrowthCorrected(server, targetMoney, startingMoney, p, cores);\n}\n\n\n//Applied server growth for a single server. Returns the percentage growth\nexport function processSingleServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n let serverGrowth = calculateServerGrowth(server, threads, p, cores);\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 += 1 * threads; // It can be grown even if it has no money\n server.moneyAvailable *= serverGrowth;\n\n // in case of data corruption\n if (isValidNumber(server.moneyMax) && isNaN(server.moneyAvailable)) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // cap at max\n if (isValidNumber(server.moneyMax) && server.moneyAvailable > server.moneyMax) {\n server.moneyAvailable = server.moneyMax;\n }\n\n // if there was any growth at all, increase security\n if (oldMoneyAvailable !== server.moneyAvailable) {\n let usedCycles = numCycleForGrowthCorrected(server, server.moneyAvailable, oldMoneyAvailable, p, cores);\n // Growing increases server security twice as much as hacking\n usedCycles = Math.min(Math.max(0, Math.ceil(usedCycles)), threads);\n server.fortify(2 * CONSTANTS.ServerFortifyAmount * usedCycles);\n }\n return server.moneyAvailable / oldMoneyAvailable;\n}\n\nexport function prestigeHomeComputer(player: IPlayer, homeComp: Server): void {\n const hasBitflume = homeComp.programs.includes(Programs.BitFlume.name);\n\n homeComp.programs.length = 0; //Remove programs\n homeComp.runningScripts = [];\n homeComp.serversOnNetwork = [];\n homeComp.isConnectedTo = true;\n homeComp.ramUsed = 0;\n homeComp.programs.push(Programs.NukeProgram.name);\n if (hasBitflume) {\n homeComp.programs.push(Programs.BitFlume.name);\n }\n\n //Update RAM usage on all scripts\n homeComp.scripts.forEach(function (script) {\n script.updateRamUsage(player, homeComp.scripts);\n });\n\n homeComp.messages.length = 0; //Remove .lit and .msg files\n homeComp.messages.push(LiteratureNames.HackersStartingHandbook);\n}\n\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\nexport function getServerOnNetwork(server: BaseServer, i: number): BaseServer | null {\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 GetServer(server.serversOnNetwork[i]);\n}\n\nexport function isBackdoorInstalled(server: BaseServer): boolean {\n if (server instanceof Server) {\n return server.backdoorInstalled;\n }\n return false;\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\n\nexport function random(min: number, max: number): number {\n return Math.random() * (max - min) + min;\n}\n\nexport const upArrowSymbol = \"↑\";\nexport const downArrowSymbol = \"↓\";\nexport const leftArrowSymbol = \"←\";\nexport const rightArrowSymbol = \"→\";\n\nexport function getArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.UP_ARROW:\n case KEY.W:\n return upArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return leftArrowSymbol;\n case KEY.DOWN_ARROW:\n case KEY.S:\n return downArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return rightArrowSymbol;\n }\n return \"\";\n}\n\nexport function getInverseArrow(event: KeyboardEvent): string {\n switch (event.key) {\n case KEY.DOWN_ARROW:\n case KEY.S:\n return upArrowSymbol;\n case KEY.RIGHT_ARROW:\n case KEY.D:\n return leftArrowSymbol;\n case KEY.UP_ARROW:\n case KEY.W:\n return downArrowSymbol;\n case KEY.LEFT_ARROW:\n case KEY.A:\n return rightArrowSymbol;\n }\n return \"\";\n}\n","export const SkillNames: {\n BladesIntuition: string;\n Cloak: string;\n Marksman: string;\n WeaponProficiency: string;\n ShortCircuit: string;\n DigitalObserver: string;\n Tracer: string;\n Overclock: string;\n Reaper: string;\n EvasiveSystem: string;\n Datamancer: string;\n CybersEdge: string;\n HandsOfMidas: string;\n Hyperdrive: string;\n} = {\n BladesIntuition: \"Blade's Intuition\",\n Cloak: \"Cloak\",\n Marksman: \"Marksman\",\n WeaponProficiency: \"Weapon Proficiency\",\n ShortCircuit: \"Short-Circuit\",\n DigitalObserver: \"Digital Observer\",\n Tracer: \"Tracer\",\n Overclock: \"Overclock\",\n Reaper: \"Reaper\",\n EvasiveSystem: \"Evasive System\",\n Datamancer: \"Datamancer\",\n CybersEdge: \"Cyber's Edge\",\n HandsOfMidas: \"Hands of Midas\",\n Hyperdrive: \"Hyperdrive\",\n};\n","import { Operation, IOperationParams } from \"./Operation\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class BlackOperation extends Operation {\n constructor(params: IOperationParams | null = null) {\n super(params);\n this.count = 1;\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1.5;\n }\n\n getChaosCompetencePenalty(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n getChaosDifficultyBonus(/*inst: IBladeburner, params: ISuccessChanceParams*/): number {\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"BlackOperation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(BlackOperation, value.data);\n }\n}\n\nReviver.constructors.BlackOperation = BlackOperation;\n","import React, { useContext } from \"react\";\nimport { IGang } from \"../IGang\";\n\nexport const Context: {\n Gang: React.Context;\n} = {\n Gang: React.createContext({} as IGang),\n};\n\nexport const useGang = (): IGang => useContext(Context.Gang);\n","import React, { useEffect } from \"react\";\nimport { useSnackbar, SnackbarProvider as SB } from \"notistack\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Alert from \"@mui/material/Alert\";\nimport Paper from \"@mui/material/Paper\";\nimport { logBoxBaseZIndex } from \"./LogBoxManager\";\n\ninterface IProps {\n children: React.ReactNode | React.ReactNode[];\n}\n\nconst useStyles = makeStyles(() => ({\n snackbar: {\n // Log popup z-index increments, so let's add a padding to be well above them.\n zIndex: `${logBoxBaseZIndex + 1000} !important` as any,\n\n \"& .MuiAlert-icon\": {\n alignSelf: 'center',\n },\n }\n}));\n\nexport function SnackbarProvider(props: IProps): React.ReactElement {\n const classes = useStyles();\n return (\n \n {props.children}\n \n );\n}\n\nexport const SnackbarEvents = new EventEmitter<[string | React.ReactNode, \"success\" | \"warning\" | \"error\" | \"info\", number]>();\n\nexport function Snackbar(): React.ReactElement {\n const { enqueueSnackbar, closeSnackbar } = useSnackbar();\n\n useEffect(() =>\n SnackbarEvents.subscribe((s, variant, duration) => {\n const id = enqueueSnackbar({s}, {\n content: (k, m) => {m},\n variant: variant,\n autoHideDuration: duration,\n onClick: () => closeSnackbar(id),\n })\n }),\n );\n return <>;\n}\n","import { Augmentation } from \"./Augmentation\";\nimport { Augmentations } from \"./Augmentations\";\nimport { PlayerOwnedAugmentation, IPlayerOwnedAugmentation } from \"./PlayerOwnedAugmentation\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Player } from \"../Player\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { clearObject } from \"../utils/helpers/clearObject\";\n\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport {\n bladeburnerAugmentations,\n churchOfTheMachineGodAugmentations,\n generalAugmentations,\n initNeuroFluxGovernor,\n initUnstableCircadianModulator,\n} from \"./AugmentationCreator\";\n\nexport function AddToAugmentations(aug: Augmentation): void {\n const name = aug.name;\n Augmentations[name] = aug;\n}\n\nexport function getNextNeuroFluxLevel(): number {\n // Get current Neuroflux level based on Player's augmentations\n let currLevel = 0;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n currLevel = Player.augmentations[i].level;\n }\n }\n\n // Account for purchased but uninstalled Augmentations\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n if (Player.queuedAugmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n ++currLevel;\n }\n }\n return currLevel + 1;\n}\n\nfunction createAugmentations(): void {\n [\n initNeuroFluxGovernor(),\n initUnstableCircadianModulator(),\n ...generalAugmentations,\n ...(factionExists(FactionNames.Bladeburners) ? bladeburnerAugmentations : []),\n ...(factionExists(FactionNames.ChurchOfTheMachineGod) ? churchOfTheMachineGodAugmentations : []),\n ].map(resetAugmentation);\n}\n\nfunction resetFactionAugmentations(): void {\n for (const name of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(name)) {\n Factions[name].augmentations = [];\n }\n }\n}\n\nfunction initAugmentations(): void {\n resetFactionAugmentations();\n clearObject(Augmentations);\n createAugmentations();\n updateAugmentationCosts();\n Player.reapplyAllAugmentations();\n}\n\nfunction getBaseAugmentationPriceMultiplier(): number {\n return CONSTANTS.MultipleAugMultiplier * [1, 0.96, 0.94, 0.93][SourceFileFlags[11]];\n}\nexport function getGenericAugmentationPriceMultiplier(): number {\n return Math.pow(getBaseAugmentationPriceMultiplier(), Player.queuedAugmentations.length);\n}\n\nfunction updateNeuroFluxGovernorCosts(neuroFluxGovernorAugmentation: Augmentation): void {\n let nextLevel = getNextNeuroFluxLevel();\n --nextLevel;\n const multiplier = Math.pow(CONSTANTS.NeuroFluxGovernorLevelMult, nextLevel);\n neuroFluxGovernorAugmentation.baseRepRequirement *= multiplier * BitNodeMultipliers.AugmentationRepCost;\n neuroFluxGovernorAugmentation.baseCost *= multiplier * BitNodeMultipliers.AugmentationMoneyCost;\n\n for (let i = 0; i < Player.queuedAugmentations.length - 1; ++i) {\n neuroFluxGovernorAugmentation.baseCost *= getBaseAugmentationPriceMultiplier();\n }\n}\n\nexport function updateAugmentationCosts(): void {\n for (const name of Object.keys(Augmentations)) {\n if (Augmentations.hasOwnProperty(name)) {\n const augmentationToUpdate = Augmentations[name];\n if (augmentationToUpdate.name === AugmentationNames.NeuroFluxGovernor) {\n updateNeuroFluxGovernorCosts(augmentationToUpdate);\n } else {\n augmentationToUpdate.baseCost =\n augmentationToUpdate.startingCost *\n getGenericAugmentationPriceMultiplier() *\n BitNodeMultipliers.AugmentationMoneyCost;\n }\n }\n }\n}\n\n//Resets an Augmentation during (re-initizliation)\nfunction resetAugmentation(aug: Augmentation): void {\n aug.addToFactions(aug.factions);\n const name = aug.name;\n if (augmentationExists(name)) {\n delete Augmentations[name];\n }\n AddToAugmentations(aug);\n}\n\nfunction applyAugmentation(aug: IPlayerOwnedAugmentation, reapply = false): void {\n Augmentations[aug.name].owned = true;\n\n const augObj = Augmentations[aug.name];\n\n // Apply multipliers\n for (const mult of Object.keys(augObj.mults)) {\n const v = Player.getMult(mult) * augObj.mults[mult];\n Player.setMult(mult, v);\n }\n\n // Special logic for NeuroFlux Governor\n if (aug.name === AugmentationNames.NeuroFluxGovernor) {\n if (!reapply) {\n Augmentations[aug.name].level = aug.level;\n for (let i = 0; i < Player.augmentations.length; ++i) {\n if (Player.augmentations[i].name == AugmentationNames.NeuroFluxGovernor) {\n Player.augmentations[i].level = aug.level;\n return;\n // break;\n }\n }\n }\n }\n\n // Push onto Player's Augmentation list\n if (!reapply) {\n const ownedAug = new PlayerOwnedAugmentation(aug.name);\n Player.augmentations.push(ownedAug);\n }\n}\n\nfunction installAugmentations(): boolean {\n if (Player.queuedAugmentations.length == 0) {\n dialogBoxCreate(\"You have not purchased any Augmentations to install!\");\n return false;\n }\n let augmentationList = \"\";\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; ++i) {\n const ownedAug = Player.queuedAugmentations[i];\n const aug = Augmentations[ownedAug.name];\n if (aug == null) {\n console.error(`Invalid augmentation: ${ownedAug.name}`);\n continue;\n }\n\n applyAugmentation(Player.queuedAugmentations[i]);\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n\n let level = \"\";\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ` - ${ownedAug.level}`;\n }\n augmentationList += aug.name + level + \"
    \";\n }\n Player.queuedAugmentations = [];\n dialogBoxCreate(\n \"You slowly drift to sleep as scientists put you under in order \" +\n \"to install the following Augmentations:
    \" +\n augmentationList +\n \"
    You wake up in your home...you feel different...\",\n );\n prestigeAugmentation();\n return true;\n}\n\nfunction augmentationExists(name: string): boolean {\n return Augmentations.hasOwnProperty(name);\n}\n\nexport function isRepeatableAug(aug: Augmentation): boolean {\n const augName = aug instanceof Augmentation ? aug.name : aug;\n return augName === AugmentationNames.NeuroFluxGovernor;\n}\n\nexport { installAugmentations, initAugmentations, applyAugmentation, augmentationExists };\n","/**\n * Stops an actively-running script (represented by a WorkerScript object)\n * and removes it from the global pool of active scripts.\n */\nimport { WorkerScript } from \"./WorkerScript\";\nimport { workerScripts } from \"./WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./WorkerScriptStartStopEventEmitter\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { AddRecentScript } from \"./RecentScripts\";\nimport { Player } from \"../Player\";\n\nexport function killWorkerScript(runningScriptObj: RunningScript, hostname: string, rerenderUi?: boolean): boolean;\nexport function killWorkerScript(workerScript: WorkerScript): boolean;\nexport function killWorkerScript(pid: number): boolean;\nexport function killWorkerScript(\n script: RunningScript | WorkerScript | number,\n hostname?: string,\n rerenderUi?: boolean,\n): boolean {\n if (rerenderUi == null || typeof rerenderUi !== \"boolean\") {\n rerenderUi = true;\n }\n\n if (script instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(script);\n\n return true;\n } else if (script instanceof RunningScript && typeof hostname === \"string\") {\n // Try to kill by PID\n const res = killWorkerScriptByPid(script.pid, rerenderUi);\n if (res) {\n return res;\n }\n\n // If for some reason that doesn't work, we'll try the old way\n for (const ws of workerScripts.values()) {\n if (ws.name == script.filename && ws.hostname == hostname && compareArrays(ws.args, script.args)) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\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: number, rerenderUi = true): boolean {\n const ws = workerScripts.get(pid);\n if (ws instanceof WorkerScript) {\n stopAndCleanUpWorkerScript(ws, rerenderUi);\n\n return true;\n }\n\n return false;\n}\n\nfunction stopAndCleanUpWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n if (typeof workerScript.atExit === \"function\") {\n try {\n workerScript.atExit();\n } catch (e: any) {\n dialogBoxCreate(\n `Error trying to call atExit for script ${workerScript.name} on ${workerScript.hostname} ${workerScript.scriptRef.args} ${e}`,\n );\n }\n workerScript.atExit = undefined;\n }\n workerScript.env.stopFlag = true;\n killNetscriptDelay(workerScript);\n removeWorkerScript(workerScript, rerenderUi);\n}\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} - Identifier for WorkerScript. Either the object itself, or\n * its index in the global workerScripts array\n */\nfunction removeWorkerScript(workerScript: WorkerScript, rerenderUi = true): void {\n const ip = workerScript.hostname;\n const name = workerScript.name;\n\n // Get the server on which the script runs\n const server = GetServer(ip);\n if (server == null) {\n console.error(`Could not find server on which this script is running: ${ip}`);\n return;\n }\n\n // Delete the RunningScript object from that server\n for (let i = 0; i < server.runningScripts.length; ++i) {\n const runningScript = server.runningScripts[i];\n if (runningScript.filename === name && compareArrays(runningScript.args, workerScript.args)) {\n server.runningScripts.splice(i, 1);\n break;\n }\n }\n\n // Recalculate ram used on that server\n\n server.updateRamUsed(0, Player);\n for (const rs of server.runningScripts) server.updateRamUsed(server.ramUsed + rs.ramUsage * rs.threads, Player);\n\n // Delete script from global pool (workerScripts)\n workerScripts.delete(workerScript.pid);\n // const res = workerScripts.delete(workerScript.pid);\n // if (!res) {\n // console.warn(`removeWorkerScript() called with WorkerScript that wasn't in the global map:`);\n // console.warn(workerScript);\n // }\n AddRecentScript(workerScript);\n\n if (rerenderUi) {\n WorkerScriptStartStopEventEmitter.emit();\n }\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 */\nfunction killNetscriptDelay(workerScript: WorkerScript): void {\n if (workerScript instanceof WorkerScript) {\n if (workerScript.delay) {\n clearTimeout(workerScript.delay);\n if (workerScript.delayReject) {\n workerScript.delayReject(workerScript);\n }\n }\n }\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { ICorporation } from \"../ICorporation\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n unbuyable: {\n color: theme.palette.action.disabled,\n },\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\ninterface IProps {\n money: number;\n corp: ICorporation;\n}\n\nexport function MoneyCost(props: IProps): React.ReactElement {\n const classes = useStyles();\n if (!(props.corp.funds > props.money))\n return {numeralWrapper.formatMoney(props.money)};\n\n return {numeralWrapper.formatMoney(props.money)};\n}\n","import React from \"react\";\n\nimport {\n Typography,\n TableCell,\n TableRow,\n} from \"@mui/material\";\n\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { characterOverviewStyles as useStyles } from \"./CharacterOverview\";\n\ninterface ITableRowData {\n content?: string;\n level?: number;\n exp?: number;\n}\n\ninterface IProps {\n name: string;\n color: string;\n classes?: any;\n data: ITableRowData;\n}\n\nexport const StatsRow = ({ name, color, classes = useStyles(), data }: IProps): React.ReactElement => {\n let content;\n\n if (data.content !== undefined) {\n content = data.content;\n } else if (data.level !== undefined && data.exp !== undefined) {\n content = `${formatNumber(data.level, 0)} (${numeralWrapper.formatExp(data.exp)} exp)`;\n } else if (data.level !== undefined && data.exp === undefined) {\n content = `${formatNumber(data.level, 0)}`;\n }\n\n return (\n \n \n {name}\n \n \n \n {content}\n \n \n \n )\n}\n","/**\n * Checks whether the value passed in can be considered a string.\n * @param value The value to check if it is a string.\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function isString(value: any): boolean {\n return typeof value === \"string\" || value instanceof String;\n}\n","import { IMinMaxRange } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nexport const StockForecastInfluenceLimit = 5;\n\nexport interface IConstructorParams {\n b: boolean;\n initPrice: number | IMinMaxRange;\n marketCap: number;\n mv: number | IMinMaxRange;\n name: string;\n otlkMag: number;\n spreadPerc: number | IMinMaxRange;\n shareTxForMovement: number | IMinMaxRange;\n symbol: string;\n}\n\nconst defaultConstructorParams: IConstructorParams = {\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};\n\n// Helper function that convert a IMinMaxRange to a number\nfunction toNumber(n: number | IMinMaxRange): number {\n let value: number;\n switch (typeof n) {\n case \"number\": {\n return n;\n }\n case \"object\": {\n const range = n as IMinMaxRange;\n value = getRandomInt(range.min, range.max);\n break;\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/**\n * Represents the valuation of a company in the World Stock Exchange.\n */\nexport class Stock {\n /**\n * Bear or bull (more likely to go up or down, based on otlkMag)\n */\n b: boolean;\n\n /**\n * Maximum price of a stock (per share)\n */\n readonly cap: number;\n\n /**\n * Stocks previous share price\n */\n lastPrice: number;\n\n /**\n * Maximum number of shares that player can own (both long and short combined)\n */\n readonly maxShares: number;\n\n /**\n * Maximum volatility\n */\n readonly mv: number;\n\n /**\n * Name of the company that the stock is for\n */\n readonly name: string;\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 otlkMag: number;\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 otlkMagForecast: number;\n\n /**\n * Average price of stocks that the player owns in the LONG position\n */\n playerAvgPx: number;\n\n /**\n * Average price of stocks that the player owns in the SHORT position\n */\n playerAvgShortPx: number;\n\n /**\n * Number of shares the player owns in the LONG position\n */\n playerShares: number;\n\n /**\n * Number of shares the player owns in the SHORT position\n */\n playerShortShares: number;\n\n /**\n * Stock's share price\n */\n price: number;\n\n /**\n * How many shares need to be transacted in order to trigger a price movement\n */\n readonly shareTxForMovement: number;\n\n /**\n * How many share transactions remaining until a price movement occurs\n * (separately tracked for upward and downward movements)\n */\n shareTxUntilMovement: number;\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 readonly spreadPerc: number;\n\n /**\n * The stock's ticker symbol\n */\n readonly symbol: string;\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 readonly totalShares: number;\n\n constructor(p: IConstructorParams = 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 = getRandomInt(this.price * 1e3, this.price * 25e3);\n this.spreadPerc = toNumber(p.spreadPerc);\n this.shareTxForMovement = toNumber(p.shareTxForMovement);\n this.shareTxUntilMovement = this.shareTxForMovement;\n\n // Total shares is determined by market cap, and is rounded to nearest 100k\n const totalSharesUnrounded: number = p.marketCap / this.price;\n this.totalShares = Math.round(totalSharesUnrounded / 1e5) * 1e5;\n\n // Max Shares (Outstanding shares) is a percentage of total shares\n const outstandingSharePercentage = 0.2;\n this.maxShares = Math.round((this.totalShares * outstandingSharePercentage) / 1e5) * 1e5;\n }\n\n /**\n * Safely set the stock's second-order forecast to a new value\n */\n changeForecastForecast(newff: number): void {\n this.otlkMagForecast = newff;\n if (this.otlkMagForecast > 100) {\n this.otlkMagForecast = 100;\n } else if (this.otlkMagForecast < 0) {\n this.otlkMagForecast = 0;\n }\n }\n\n /**\n * Set the stock to a new price. Also updates the stock's previous price tracker\n */\n changePrice(newPrice: number): void {\n this.lastPrice = this.price;\n this.price = newPrice;\n }\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 cycleForecast(changeAmt = 0.1): void {\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 if (this.b) {\n // Forecast decreases\n this.otlkMag -= changeAmt;\n } else {\n this.otlkMag += changeAmt;\n }\n\n this.otlkMag = Math.min(this.otlkMag, 50);\n if (this.otlkMag < 0) {\n this.otlkMag *= -1;\n this.b = !this.b;\n }\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 cycleForecastForecast(changeAmt = 0.1): void {\n if (Math.random() < 0.5) {\n this.changeForecastForecast(this.otlkMagForecast + changeAmt);\n } else {\n this.changeForecastForecast(this.otlkMagForecast - changeAmt);\n }\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 flipForecastForecast(): void {\n const diff = this.otlkMagForecast - 50;\n this.otlkMagForecast = 50 + -1 * diff;\n }\n\n /**\n * Returns the stock's absolute forecast, which is a number between 0-100\n */\n getAbsoluteForecast(): number {\n return this.b ? 50 + this.otlkMag : 50 - this.otlkMag;\n }\n\n /**\n * Return the price at which YOUR stock is bought (market ask price). Accounts for spread\n */\n getAskPrice(): number {\n return this.price * (1 + this.spreadPerc / 100);\n }\n\n /**\n * Return the price at which YOUR stock is sold (market bid price). Accounts for spread\n */\n getBidPrice(): number {\n return this.price * (1 - this.spreadPerc / 100);\n }\n\n /**\n * Returns the chance (0-1 decimal) that a stock has of having its forecast increase\n */\n getForecastIncreaseChance(): number {\n const diff = this.otlkMagForecast - this.getAbsoluteForecast();\n\n return (50 + Math.min(Math.max(diff, -45), 45)) / 100;\n }\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 influenceForecast(change: number): void {\n if (this.otlkMag > StockForecastInfluenceLimit) {\n this.otlkMag = Math.max(StockForecastInfluenceLimit, this.otlkMag - change);\n }\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 influenceForecastForecast(change: number): void {\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 /**\n * Serialize the Stock to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Stock\", this);\n }\n\n /**\n * Initializes a Stock from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Stock {\n return Generic_fromJSON(Stock, value.data);\n }\n}\n\nReviver.constructors.Stock = Stock;\n","/**\n * Map of all Cities in the game\n * Key = City Name, Value = City object\n */\nimport { City } from \"./City\";\nimport { IMap } from \"../types\";\n\nexport const Cities: IMap = {};\n","import { IMap } from \"./types\";\nimport { Terminal } from \"./Terminal\";\n\nexport let Aliases: IMap = {};\nexport let GlobalAliases: IMap = {};\n\nexport function loadAliases(saveString: string): void {\n if (saveString === \"\") {\n Aliases = {};\n } else {\n Aliases = JSON.parse(saveString);\n }\n}\n\nexport function loadGlobalAliases(saveString: string): void {\n if (saveString === \"\") {\n GlobalAliases = {};\n } else {\n GlobalAliases = JSON.parse(saveString);\n }\n}\n\n// Prints all aliases to terminal\nexport function printAliases(): void {\n for (const name of Object.keys(Aliases)) {\n if (Aliases.hasOwnProperty(name)) {\n Terminal.print(\"alias \" + name + \"=\" + Aliases[name]);\n }\n }\n for (const name of Object.keys(GlobalAliases)) {\n if (GlobalAliases.hasOwnProperty(name)) {\n Terminal.print(\"global alias \" + name + \"=\" + GlobalAliases[name]);\n }\n }\n}\n\n// Returns true if successful, false otherwise\nexport function parseAliasDeclaration(dec: string, global = false): boolean {\n const re = /^([\\w|!%,@-]+)=((\"(.+)\")|('(.+)'))$/;\n const matches = dec.match(re);\n if (matches == null || matches.length != 7) {\n return false;\n }\n\n if (global) {\n addGlobalAlias(matches[1], matches[4] || matches[6]);\n } else {\n addAlias(matches[1], matches[4] || matches[6]);\n }\n return true;\n}\n\nfunction addAlias(name: string, value: string): void {\n if (name in GlobalAliases) {\n delete GlobalAliases[name];\n }\n Aliases[name] = value.trim();\n}\n\nfunction addGlobalAlias(name: string, value: string): void {\n if (name in Aliases) {\n delete Aliases[name];\n }\n GlobalAliases[name] = value.trim();\n}\n\nfunction getAlias(name: string): string | null {\n if (Aliases.hasOwnProperty(name)) {\n return Aliases[name];\n }\n\n return null;\n}\n\nfunction getGlobalAlias(name: string): string | null {\n if (GlobalAliases.hasOwnProperty(name)) {\n return GlobalAliases[name];\n }\n return null;\n}\n\nexport function removeAlias(name: string): boolean {\n if (Aliases.hasOwnProperty(name)) {\n delete Aliases[name];\n return true;\n }\n\n if (GlobalAliases.hasOwnProperty(name)) {\n delete GlobalAliases[name];\n return true;\n }\n\n return false;\n}\n\n/**\n * Returns the original string with any aliases substituted in.\n * Aliases are only applied to \"whole words\", one level deep\n */\nexport function substituteAliases(origCommand: string): string {\n const commandArray = origCommand.split(\" \");\n if (commandArray.length > 0) {\n // For the alias and unalias commands, dont substite\n if (commandArray[0] === \"unalias\" || commandArray[0] === \"alias\") {\n return commandArray.join(\" \");\n }\n\n let somethingSubstituted = true;\n let depth = 0;\n\n while (somethingSubstituted && depth < 10) {\n depth++;\n somethingSubstituted = false;\n const alias = getAlias(commandArray[0])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(0, 1, ...alias);\n //commandArray[0] = alias;\n }\n for (let i = 0; i < commandArray.length; ++i) {\n const alias = getGlobalAlias(commandArray[i])?.split(\" \");\n if (alias != null) {\n somethingSubstituted = true;\n commandArray.splice(i, 1, ...alias);\n i += alias.length - 1;\n //commandArray[i] = alias;\n }\n }\n }\n }\n return commandArray.join(\" \");\n}\n","/**\n * Lore / world building literature files that can be found on servers.\n * These files can be read by the player\n */\nexport class Literature {\n title: string;\n fn: string;\n txt: string;\n\n constructor(title: string, filename: string, txt: string) {\n this.title = title;\n this.fn = filename;\n this.txt = txt;\n }\n}\n","import React from \"react\";\nimport { createTheme, ThemeProvider, Theme, StyledEngineProvider } from \"@mui/material/styles\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Settings } from \"../../Settings/Settings\";\n\nexport const ThemeEvents = new EventEmitter<[]>();\n\ndeclare module \"@mui/material/styles\" {\n interface Theme {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n interface ThemeOptions {\n colors: {\n hp: React.CSSProperties[\"color\"];\n money: React.CSSProperties[\"color\"];\n hack: React.CSSProperties[\"color\"];\n combat: React.CSSProperties[\"color\"];\n cha: React.CSSProperties[\"color\"];\n int: React.CSSProperties[\"color\"];\n rep: React.CSSProperties[\"color\"];\n backgroundprimary: React.CSSProperties[\"color\"];\n backgroundsecondary: React.CSSProperties[\"color\"];\n button: React.CSSProperties[\"color\"];\n successlight: React.CSSProperties[\"color\"];\n success: React.CSSProperties[\"color\"];\n successdark: React.CSSProperties[\"color\"];\n white: React.CSSProperties[\"color\"];\n black: React.CSSProperties[\"color\"];\n };\n }\n}\n\nlet theme: Theme;\n\nexport function refreshTheme(): void {\n theme = createTheme({\n colors: {\n hp: Settings.theme.hp,\n money: Settings.theme.money,\n hack: Settings.theme.hack,\n combat: Settings.theme.combat,\n cha: Settings.theme.cha,\n int: Settings.theme.int,\n rep: Settings.theme.rep,\n backgroundprimary: Settings.theme.backgroundprimary,\n backgroundsecondary: Settings.theme.backgroundsecondary,\n button: Settings.theme.button,\n successlight: Settings.theme.successlight,\n success: Settings.theme.success,\n successdark: Settings.theme.successdark,\n white: Settings.theme.white,\n black: Settings.theme.black,\n },\n palette: {\n primary: {\n light: Settings.theme.primarylight,\n main: Settings.theme.primary,\n dark: Settings.theme.primarydark,\n },\n secondary: {\n light: Settings.theme.secondarylight,\n main: Settings.theme.secondary,\n dark: Settings.theme.secondarydark,\n },\n error: {\n light: Settings.theme.errorlight,\n main: Settings.theme.error,\n dark: Settings.theme.errordark,\n },\n info: {\n light: Settings.theme.infolight,\n main: Settings.theme.info,\n dark: Settings.theme.infodark,\n },\n warning: {\n light: Settings.theme.warninglight,\n main: Settings.theme.warning,\n dark: Settings.theme.warningdark,\n },\n success: {\n light: Settings.theme.successlight,\n main: Settings.theme.success,\n dark: Settings.theme.successdark,\n },\n background: {\n default: Settings.theme.backgroundprimary,\n paper: Settings.theme.well,\n },\n action: {\n disabled: Settings.theme.disabled,\n },\n },\n typography: {\n fontFamily: Settings.styles.fontFamily,\n button: {\n textTransform: \"none\",\n },\n },\n components: {\n MuiInputBase: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n color: Settings.theme.primary,\n },\n input: {\n \"&::placeholder\": {\n userSelect: \"none\",\n color: Settings.theme.primarydark,\n },\n },\n },\n },\n\n MuiInput: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.well,\n borderBottomColor: \"#fff\",\n },\n underline: {\n \"&:hover\": {\n borderBottomColor: Settings.theme.primarydark,\n },\n \"&:before\": {\n borderBottomColor: Settings.theme.primary,\n },\n \"&:after\": {\n borderBottomColor: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiInputLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primarydark, // why is this switched?\n userSelect: \"none\",\n \"&:before\": {\n color: Settings.theme.primarylight,\n },\n },\n },\n },\n\n MuiButtonGroup: {\n styleOverrides: {\n root: {\n '& .MuiButton-root:not(:last-of-type)': {\n marginRight: '1px',\n }\n }\n }\n },\n\n MuiButton: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.button,\n border: \"1px solid \" + Settings.theme.well,\n // color: Settings.theme.primary,\n \"&:hover\": {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n\n borderRadius: 0,\n },\n },\n },\n MuiSelect: {\n styleOverrides: {\n icon: {\n color: Settings.theme.primary,\n },\n },\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTextField: {\n defaultProps: {\n variant: \"standard\",\n },\n },\n MuiTypography: {\n defaultProps: {\n color: \"primary\",\n },\n styleOverrides: {\n root: {\n lineHeight: Settings.styles.lineHeight,\n }\n }\n },\n MuiMenu: {\n styleOverrides: {\n list: {\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiMenuItem: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiAccordionSummary: {\n styleOverrides: {\n root: {\n backgroundColor: \"#111\",\n },\n },\n },\n MuiAccordionDetails: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n },\n },\n MuiIconButton: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTooltip: {\n styleOverrides: {\n tooltip: {\n fontSize: \"1em\",\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n borderRadius: 0,\n border: \"2px solid white\",\n maxWidth: \"100vh\",\n },\n },\n defaultProps: {\n disableInteractive: true,\n },\n },\n MuiSlider: {\n styleOverrides: {\n valueLabel: {\n color: Settings.theme.primary,\n backgroundColor: Settings.theme.well,\n },\n },\n },\n MuiDrawer: {\n styleOverrides: {\n paper: {\n \"&::-webkit-scrollbar\": {\n // webkit\n display: \"none\",\n },\n scrollbarWidth: \"none\", // firefox\n backgroundColor: Settings.theme.backgroundsecondary,\n },\n paperAnchorDockedLeft: {\n borderRight: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiDivider: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiFormControlLabel: {\n styleOverrides: {\n root: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiSwitch: {\n styleOverrides: {\n switchBase: {\n color: Settings.theme.primarydark,\n },\n track: {\n backgroundColor: Settings.theme.welllight,\n },\n },\n },\n MuiPaper: {\n styleOverrides: {\n root: {\n borderRadius: 0,\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.welllight,\n },\n },\n },\n MuiTablePagination: {\n styleOverrides: {\n select: {\n color: Settings.theme.primary,\n },\n selectLabel: {\n color: Settings.theme.primary,\n },\n displayedRows: {\n color: Settings.theme.primary,\n },\n },\n },\n MuiTab: {\n styleOverrides: {\n textColorPrimary: {\n color: Settings.theme.secondary,\n \"&.Mui-selected\": {\n color: Settings.theme.primary,\n },\n },\n root: {\n backgroundColor: Settings.theme.backgroundsecondary,\n border: \"1px solid \" + Settings.theme.well,\n margin: '3px',\n\n \"&.Mui-selected\": {\n backgroundColor: Settings.theme.button\n },\n },\n },\n },\n MuiTabs: {\n styleOverrides: {\n scrollButtons: {\n backgroundColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n margin: '3px',\n opacity: 1,\n width: 'fit-content',\n\n \"&.Mui-disabled\": {\n opacity: 0.5\n }\n }\n },\n defaultProps: {\n TabIndicatorProps: {\n style: {\n display: \"none\"\n }\n }\n },\n },\n MuiAlert: {\n styleOverrides: {\n root: {\n backgroundColor: Settings.theme.black,\n borderRadius: 0,\n border: \"1px solid \" + Settings.theme.well,\n },\n standardSuccess: {\n color: Settings.theme.successlight,\n },\n standardError: {\n color: Settings.theme.errorlight,\n },\n standardWarning: {\n color: Settings.theme.warninglight,\n },\n standardInfo: {\n color: Settings.theme.infolight,\n },\n },\n },\n },\n });\n\n document.body.style.backgroundColor = theme.colors.backgroundprimary?.toString() ?? \"black\";\n}\nrefreshTheme();\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element;\n}\n\nexport const TTheme = ({ children }: IProps): React.ReactElement => (\n \n {children}\n \n);\n","import React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n value: string;\n color?: string;\n variant?:\n | \"button\"\n | \"caption\"\n | \"h1\"\n | \"h2\"\n | \"h3\"\n | \"h4\"\n | \"h5\"\n | \"h6\"\n | \"subtitle1\"\n | \"subtitle2\"\n | \"body1\"\n | \"body2\"\n | \"overline\"\n | \"inherit\"\n | undefined;\n};\n\nexport function CopyableText(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n function copy(): void {\n const copyText = document.createElement(\"textarea\");\n copyText.value = 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 setOpen(true);\n setTimeout(() => setOpen(false), 1000);\n }\n\n return (\n Copied!
    }>\n \n {props.value}\n \n \n );\n}\n","import { IMap } from \"../types\";\n\n// Map of material (by name) to their sizes (how much space it takes in warehouse)\nexport const MaterialSizes: IMap = {\n Water: 0.05,\n Energy: 0.01,\n Food: 0.03,\n Plants: 0.05,\n Metal: 0.1,\n Hardware: 0.06,\n Chemicals: 0.05,\n Drugs: 0.02,\n Robots: 0.5,\n AICores: 0.1,\n RealEstate: 0.005,\n \"Real Estate\": 0.005,\n \"AI Cores\": 0.1,\n};\n","export function calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n}\n\nexport function calculateExp(skill: number, mult = 1): number {\n return Math.exp((skill / mult + 200) / 32) - 534.6;\n}\n\nexport function calculateSkillProgress(exp: number, mult = 1): ISkillProgress {\n const currentSkill = calculateSkill(exp, mult);\n const nextSkill = currentSkill + 1;\n\n let baseExperience = calculateExp(currentSkill, mult);\n if (baseExperience < 0) baseExperience = 0;\n\n let nextExperience = calculateExp(nextSkill, mult)\n if (nextExperience < 0) nextExperience = 0;\n\n const normalize = (value: number): number => ((value - baseExperience) * 100) / (nextExperience - baseExperience);\n let progress = (nextExperience - baseExperience !== 0) ? normalize(exp) : 99.99;\n\n // Clamp progress: When sleeves are working out, the player gets way too much progress\n if (progress < 0) progress = 0\n if (progress > 100) progress = 100;\n\n // Clamp floating point imprecisions\n let currentExperience = exp - baseExperience;\n let remainingExperience = nextExperience - exp;\n if (currentExperience < 0) currentExperience = 0;\n if (remainingExperience < 0) remainingExperience = 0;\n\n return {\n currentSkill,\n nextSkill,\n baseExperience,\n experience: exp,\n nextExperience,\n currentExperience,\n remainingExperience,\n progress\n }\n}\n\nexport interface ISkillProgress {\n currentSkill: number;\n nextSkill: number;\n baseExperience: number;\n experience: number;\n nextExperience: number;\n currentExperience: number;\n remainingExperience: number;\n progress: number;\n}\n\nexport function getEmptySkillProgress(): ISkillProgress {\n return {\n currentSkill: 0, nextSkill: 0,\n baseExperience: 0, experience: 0, nextExperience: 0,\n currentExperience: 0, remainingExperience: 0,\n progress: 0,\n };\n}\n","export interface IMults {\n hack?: number;\n str?: number;\n def?: number;\n dex?: number;\n agi?: number;\n cha?: number;\n}\n\nexport enum UpgradeType {\n Weapon = \"w\",\n Armor = \"a\",\n Vehicle = \"v\",\n Rootkit = \"r\",\n Augmentation = \"g\",\n}\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberUpgrade\n * (defined in Gang.js)\n */\ninterface IGangMemberUpgradeMetadata {\n cost: number;\n mults: IMults;\n name: string;\n upgType: UpgradeType;\n}\n\n/**\n * Array of metadata for all Gang Member upgrades. Used to construct the global GangMemberUpgrade\n * objects in Gang.js\n */\nexport const gangMemberUpgradesMetadata: IGangMemberUpgradeMetadata[] = [\n {\n cost: 1e6,\n mults: { str: 1.04, def: 1.04 },\n name: \"Baseball Bat\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 12e6,\n mults: { str: 1.08, def: 1.08, dex: 1.08 },\n name: \"Katana\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 25e6,\n mults: { str: 1.1, def: 1.1, dex: 1.1, agi: 1.1 },\n name: \"Glock 18C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 50e6,\n mults: { str: 1.12, def: 1.1, agi: 1.1 },\n name: \"P90C\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 60e6,\n mults: { str: 1.2, def: 1.15 },\n name: \"Steyr AUG\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 100e6,\n mults: { str: 1.25, def: 1.2 },\n name: \"AK-47\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 150e6,\n mults: { str: 1.3, def: 1.25 },\n name: \"M15A10 Assault Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 225e6,\n mults: { str: 1.3, dex: 1.25, agi: 1.3 },\n name: \"AWM Sniper Rifle\",\n upgType: UpgradeType.Weapon,\n },\n {\n cost: 2e6,\n mults: { def: 1.04 },\n name: \"Bulletproof Vest\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 5e6,\n mults: { def: 1.08 },\n name: \"Full Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 25e6,\n mults: { def: 1.15, agi: 1.15 },\n name: \"Liquid Body Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 40e6,\n mults: { def: 1.2 },\n name: \"Graphene Plating Armor\",\n upgType: UpgradeType.Armor,\n },\n {\n cost: 3e6,\n mults: { agi: 1.04, cha: 1.04 },\n name: \"Ford Flex V20\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 9e6,\n mults: { agi: 1.08, cha: 1.08 },\n name: \"ATX1070 Superbike\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 18e6,\n mults: { agi: 1.12, cha: 1.12 },\n name: \"Mercedes-Benz S9001\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 30e6,\n mults: { agi: 1.16, cha: 1.16 },\n name: \"White Ferrari\",\n upgType: UpgradeType.Vehicle,\n },\n {\n cost: 5e6,\n mults: { hack: 1.05 },\n name: \"NUKE Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 25e6,\n mults: { hack: 1.1 },\n name: \"Soulstealer Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Demon Rootkit\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 40e6,\n mults: { hack: 1.12 },\n name: \"Hmap Node\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 75e6,\n mults: { hack: 1.15 },\n name: \"Jack the Ripper\",\n upgType: UpgradeType.Rootkit,\n },\n {\n cost: 10e9,\n mults: { str: 1.3, dex: 1.3 },\n name: \"Bionic Arms\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { agi: 1.6 },\n name: \"Bionic Legs\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.15, def: 1.15, dex: 1.15, agi: 1.15 },\n name: \"Bionic Spine\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 20e9,\n mults: { str: 1.4, def: 1.4 },\n name: \"BrachiBlades\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 12e9,\n mults: { str: 1.2, def: 1.2 },\n name: \"Nanofiber Weave\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 25e9,\n mults: { str: 1.5, agi: 1.5 },\n name: \"Synthetic Heart\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 15e9,\n mults: { str: 1.3, def: 1.3 },\n name: \"Synfibril Muscle\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 5e9,\n mults: { hack: 1.05 },\n name: \"BitWire\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 10e9,\n mults: { hack: 1.15 },\n name: \"Neuralstimulator\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 7.5e9,\n mults: { hack: 1.1 },\n name: \"DataJack\",\n upgType: UpgradeType.Augmentation,\n },\n {\n cost: 50e9,\n mults: { str: 1.7, def: 1.7 },\n name: \"Graphene Bone Lacings\",\n upgType: UpgradeType.Augmentation,\n },\n];\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { RunningScript } from \"../../Script/RunningScript\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Draggable from \"react-draggable\";\nimport { ResizableBox } from \"react-resizable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport ArrowForwardIosIcon from \"@mui/icons-material/ArrowForwardIos\";\nimport { workerScripts } from \"../../Netscript/WorkerScripts\";\nimport { startWorkerScript } from \"../../NetscriptWorker\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Theme } from \"@mui/material\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport { Player } from \"../../Player\";\nimport { debounce } from \"lodash\";\nimport { WorkerScriptStartStopEventEmitter } from \"../../Netscript/WorkerScriptStartStopEventEmitter\";\n\nlet layerCounter = 0;\n\nexport const LogBoxEvents = new EventEmitter<[RunningScript]>();\nexport const LogBoxClearEvents = new EventEmitter<[]>();\n\ninterface Log {\n id: string;\n script: RunningScript;\n}\n\nlet logs: Log[] = [];\n\nexport function LogBoxManager(): React.ReactElement {\n const setRerender = useState(true)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(\n () =>\n LogBoxEvents.subscribe((script: RunningScript) => {\n const id = script.server + \"-\" + script.filename + script.args.map((x: any): string => `${x}`).join(\"-\");\n if (logs.find((l) => l.id === id)) return;\n logs.push({\n id: id,\n script: script,\n });\n rerender();\n }),\n [],\n );\n\n useEffect(() =>\n LogBoxClearEvents.subscribe(() => {\n logs = [];\n rerender();\n }),\n );\n\n function close(id: string): void {\n logs = logs.filter((l) => l.id !== id);\n rerender();\n }\n\n return (\n <>\n {logs.map((log) => (\n close(log.id)} />\n ))}\n \n );\n}\n\ninterface IProps {\n script: RunningScript;\n id: string;\n onClose: () => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n title: {\n \"&.is-minimized + *\": {\n border: \"none\",\n margin: 0,\n \"max-height\": 0,\n padding: 0,\n \"pointer-events\": \"none\",\n visibility: \"hidden\",\n },\n },\n logs: {\n overflowY: \"scroll\",\n overflowX: \"hidden\",\n scrollbarWidth: \"auto\",\n display: \"flex\",\n flexDirection: \"column-reverse\",\n },\n success: {\n color: theme.colors.success,\n },\n error: {\n color: theme.palette.error.main,\n },\n primary: {\n color: theme.palette.primary.main,\n },\n info: {\n color: theme.palette.info.main,\n },\n warning: {\n color: theme.palette.warning.main,\n },\n }),\n);\n\nexport const logBoxBaseZIndex = 1500;\n\nfunction LogWindow(props: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const rootRef = useRef(null);\n const [script, setScript] = useState(props.script);\n const classes = useStyles();\n const container = useRef(null);\n const setRerender = useState(false)[1];\n const [minimized, setMinimized] = useState(false);\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // useEffect(\n // () =>\n // WorkerScriptStartStopEventEmitter.subscribe(() => {\n // setTimeout(() => {\n // const server = GetServer(script.server);\n // if (server === null) return;\n // const exisitingScript = findRunningScript(script.filename, script.args, server);\n // if (exisitingScript) {\n // exisitingScript.logs = script.logs.concat(exisitingScript.logs)\n // setScript(exisitingScript)\n // }\n // rerender();\n // }, 100)\n // }),\n // [],\n // );\n\n useEffect(() => {\n updateLayer();\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function kill(): void {\n killWorkerScript(script, script.server, true);\n }\n\n function run(): void {\n const server = GetServer(script.server);\n if (server === null) return;\n const s = findRunningScript(script.filename, script.args, server);\n if (s === null) {\n startWorkerScript(Player, script, server);\n } else {\n setScript(s);\n }\n }\n\n function updateLayer(): void {\n const c = container.current;\n if (c === null) return;\n c.style.zIndex = logBoxBaseZIndex + layerCounter + \"\";\n layerCounter++;\n rerender();\n }\n\n function title(full = false): string {\n const maxLength = 30;\n const t = `${script.filename} ${script.args.map((x: any): string => `${x}`).join(\" \")}`;\n if (full || t.length <= maxLength) {\n return t;\n }\n return t.slice(0, maxLength - 3) + \"...\";\n }\n\n function minimize(): void {\n setMinimized(!minimized);\n }\n\n function lineClass(s: string): string {\n if (s.match(/(^\\[[^\\]]+\\] )?ERROR/) || s.match(/(^\\[[^\\]]+\\] )?FAIL/)) {\n return classes.error;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?SUCCESS/)) {\n return classes.success;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?WARN/)) {\n return classes.warning;\n }\n if (s.match(/(^\\[[^\\]]+\\] )?INFO/)) {\n return classes.info;\n }\n return classes.primary;\n }\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", onResize);\n return () => {\n window.removeEventListener(\"resize\", onResize);\n };\n }, []);\n\n const onResize = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n if (!isOnScreen(node)) {\n resetPosition();\n }\n }, 100);\n\n const isOnScreen = (node: HTMLDivElement): boolean => {\n const bounds = node.getBoundingClientRect();\n\n return !(bounds.right < 0 || bounds.bottom < 0 || bounds.left > innerWidth || bounds.top > outerWidth);\n };\n\n const resetPosition = (): void => {\n const node = rootRef?.current;\n if (!node) return;\n const state = node.state as { x: number; y: number };\n state.x = 0;\n state.y = 0;\n node.setState(state);\n };\n\n const boundToBody = (e: any): void | false => {\n if (e.clientX < 0 || e.clientY < 0 || e.clientX > innerWidth || e.clientY > innerHeight) return false;\n };\n\n return (\n \n \n
    \n \n \n \n {title()}\n \n\n \n {!workerScripts.has(script.pid) && }\n {workerScripts.has(script.pid) && }\n \n \n \n \n \n \n \n \n \n }\n >\n \n {script.logs.map(\n (line: string, i: number): JSX.Element => (\n \n {line}\n
    \n
    \n ),\n )}\n
    \n \n
    \n
    \n \n
    \n );\n}\n","/**\n * Global pool of all active scripts (scripts that are currently running)\n */\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const workerScripts: Map = new Map();\n","import React from \"react\";\n\nimport { Table, TableCell } from \"./Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { Table as MuiTable } from \"@mui/material\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n rows: any[][];\n title?: string;\n wide?: boolean;\n}\n\nexport function StatsTable({ rows, title, wide }: IProps): React.ReactElement {\n const T = wide ? MuiTable : Table;\n return (\n <>\n {title && {title}}\n \n \n {rows.map((row: any[], i: number) => (\n \n {row.map((elem: any, i: number) => (\n \n {elem}\n \n ))}\n \n ))}\n \n \n \n );\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetServerConstants } from \"../data/Constants\";\n\nexport function calculateHashGainRate(\n level: number,\n ramUsed: number,\n maxRam: number,\n cores: number,\n mult: number,\n): number {\n const baseGain = HacknetServerConstants.HashesPerLevel * level;\n const ramMultiplier = Math.pow(1.07, Math.log2(maxRam));\n const coreMultiplier = 1 + (cores - 1) / 5;\n const ramRatio = 1 - ramUsed / maxRam;\n\n return baseGain * ramMultiplier * coreMultiplier * ramRatio * mult * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetServerConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return 10 * HacknetServerConstants.BaseCost * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetServerConstants.MaxRam) {\n return Infinity;\n }\n\n let totalCost = 0;\n let numUpgrades = Math.round(Math.log2(startingRam));\n let currentRam = startingRam;\n for (let i = 0; i < sanitizedLevels; ++i) {\n const baseCost = currentRam * HacknetServerConstants.RamBaseCost;\n const mult = Math.pow(HacknetServerConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCores: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCores >= HacknetServerConstants.MaxCores) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCores;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n totalCost *= HacknetServerConstants.CoreBaseCost;\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCacheUpgradeCost(startingCache: number, extraLevels = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingCache >= HacknetServerConstants.MaxCache) {\n return Infinity;\n }\n\n const mult = HacknetServerConstants.UpgradeCacheMult;\n let totalCost = 0;\n let currentCache = startingCache;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalCost += Math.pow(mult, currentCache - 1);\n ++currentCache;\n }\n totalCost *= HacknetServerConstants.CacheBaseCost;\n\n return totalCost;\n}\n\nexport function calculateServerCost(n: number, mult = 1): number {\n if (n - 1 >= HacknetServerConstants.MaxServers) {\n return Infinity;\n }\n\n return HacknetServerConstants.BaseCost * Math.pow(HacknetServerConstants.PurchaseMult, n - 1) * mult;\n}\n","export enum FactionWorkType {\n Field,\n Hacking,\n None,\n Security,\n}\n","import { FormControlLabel, Switch, Tooltip, Typography } from \"@mui/material\";\nimport React, { useEffect, useState } from \"react\";\n\ninterface IProps {\n checked: boolean;\n onChange: (newValue: boolean, error?: string) => void;\n text: React.ReactNode;\n tooltip: React.ReactNode;\n}\n\nexport function OptionSwitch({ checked, onChange, text, tooltip }: IProps): React.ReactElement {\n const [value, setValue] = useState(checked);\n\n function handleSwitchChange(event: React.ChangeEvent): void {\n setValue(event.target.checked);\n }\n\n useEffect(() => onChange(value), [value]);\n\n return (\n }\n label={\n {tooltip}}>\n {text}\n \n }\n />\n );\n}\n","/**\n * Represents the possible configuration values that can be provided when creating the progress bar text.\n */\ninterface IProgressBarConfiguration {\n /**\n * Current progress, taken as a decimal (i.e. '0.6' to represent '60%')\n */\n progress?: number;\n\n /**\n * Total number of ticks in progress bar. Preferably a factor of 100.\n */\n totalTicks?: number;\n}\n\n/**\n * Represents concrete configuration values when creating the progress bar text.\n */\ninterface IProgressBarConfigurationMaterialized extends IProgressBarConfiguration {\n progress: number;\n totalTicks: number;\n}\n\n/**\n * Creates a graphical \"progress bar\"\n * e.g.: [||||---------------]\n * @param params The configuration parameters for the progress bar\n */\nexport function createProgressBarText(params: IProgressBarConfiguration): string {\n // Default values\n const defaultParams: IProgressBarConfigurationMaterialized = {\n progress: 0,\n totalTicks: 20,\n };\n\n // tslint:disable-next-line:prefer-object-spread\n const derived: IProgressBarConfigurationMaterialized = Object.assign({}, defaultParams, params);\n // Ensure it is 0..1\n derived.progress = Math.max(Math.min(derived.progress, 1), 0);\n\n // This way there is always at least one bar filled in...\n const bars: number = Math.max(Math.floor(derived.progress / (1 / derived.totalTicks)), 1);\n const dashes: number = Math.max(derived.totalTicks - bars, 0);\n\n // String.prototype.repeat isn't completley supported, but good enough for our purposes\n return `[${\"|\".repeat(bars)}${\"-\".repeat(dashes)}]`;\n}\n","/**\n * Functions for handling WorkerScripts, which are the underlying mechanism\n * that allows for scripts to run\n */\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\nimport { generateNextPid } from \"./Netscript/Pid\";\n\nimport { CONSTANTS } from \"./Constants\";\nimport { Interpreter } from \"./ThirdParty/JSInterpreter\";\nimport { isScriptErrorMessage, makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { NetscriptFunctions } from \"./NetscriptFunctions\";\nimport { executeJSScript } from \"./NetscriptJSEvaluator\";\nimport { NetscriptPort, IPort } from \"./NetscriptPort\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport { getRamUsageFromRunningScript } from \"./Script/RunningScriptHelpers\";\nimport { scriptCalculateOfflineProduction } from \"./Script/ScriptHelpers\";\nimport { Script } from \"./Script/Script\";\nimport { GetAllServers } from \"./Server/AllServers\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Settings } from \"./Settings/Settings\";\n\nimport { generate } from \"escodegen\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { roundToTwo } from \"./utils/helpers/roundToTwo\";\nimport { isString } from \"./utils/helpers/isString\";\nimport { sprintf } from \"sprintf-js\";\n\nimport { parse } from \"acorn\";\nimport { simple as walksimple } from \"acorn-walk\";\nimport { areFilesEqual } from \"./Terminal/DirectoryHelpers\";\nimport { Player } from \"./Player\";\nimport { Terminal } from \"./Terminal\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\n// Netscript Ports are instantiated here\nexport const NetscriptPorts: IPort[] = [];\nfor (let i = 0; i < CONSTANTS.NumNetscriptPorts; ++i) {\n NetscriptPorts.push(NetscriptPort());\n}\n\nexport function prestigeWorkerScripts(): void {\n for (const ws of workerScripts.values()) {\n ws.env.stopFlag = true;\n killWorkerScript(ws);\n }\n for (const port of NetscriptPorts) {\n port.clear();\n }\n\n WorkerScriptStartStopEventEmitter.emit();\n workerScripts.clear();\n}\n\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.\nfunction startNetscript2Script(player: IPlayer, workerScript: WorkerScript): Promise {\n workerScript.running = true;\n\n // The name of the currently running netscript function, to prevent concurrent\n // calls to hack, grow, etc.\n let runningFn: string | null = null;\n\n // 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 function wrap(propName: string, f: (...args: any[]) => Promise): (...args: any[]) => Promise {\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: any[]) {\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 === \"asleep\") return f(...args); // OK for multiple simultaneous calls to sleep.\n\n const msg =\n \"Concurrent calls to Netscript functions are not allowed! \" +\n \"Did you forget to await hack(), grow(), or some other \" +\n \"promise-returning function? (Currently running: %s tried to run: %s)\";\n if (runningFn) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, sprintf(msg, runningFn, propName));\n throw workerScript;\n }\n runningFn = propName;\n\n // 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 let result;\n try {\n result = f(...args);\n } catch (e: any) {\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 (const prop of Object.keys(workerScript.env.vars)) {\n if (typeof workerScript.env.vars[prop] !== \"function\") continue;\n workerScript.env.vars[prop] = wrap(prop, workerScript.env.vars[prop]);\n }\n workerScript.env.vars.stanek.charge = wrap(\"stanek.charge\", workerScript.env.vars.stanek.charge);\n\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 return new Promise((resolve, reject) => {\n executeJSScript(player, workerScript.getServer().scripts, workerScript)\n .then(() => {\n resolve(workerScript);\n })\n .catch((e) => reject(e));\n }).catch((e) => {\n if (e instanceof Error) {\n if (e instanceof SyntaxError) {\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e.message + \" (sorry we can't be more helpful)\");\n } else {\n workerScript.errorMessage = makeRuntimeRejectMsg(\n workerScript,\n e.message + ((e.stack && \"\\nstack:\\n\" + e.stack.toString()) || \"\"),\n );\n }\n throw workerScript;\n } else if (isScriptErrorMessage(e)) {\n workerScript.errorMessage = e;\n throw workerScript;\n } else if (e instanceof WorkerScript) {\n throw e;\n }\n\n workerScript.errorMessage = makeRuntimeRejectMsg(workerScript, e);\n throw workerScript; // Don't know what to do with it, let's rethrow.\n });\n}\n\nfunction startNetscript1Script(workerScript: WorkerScript): Promise {\n const code = workerScript.code;\n workerScript.running = true;\n\n //Process imports\n let codeWithImports, codeLineOffset;\n try {\n const importProcessingRes = processNetscript1Imports(code, workerScript);\n codeWithImports = importProcessingRes.code;\n codeLineOffset = importProcessingRes.lineOffset;\n } catch (e: any) {\n dialogBoxCreate(\"Error processing Imports in \" + workerScript.name + \":
    \" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n\n const interpreterInitialization = function (int: any, scope: any): void {\n //Add the Netscript environment\n const ns = NetscriptFunctions(workerScript);\n for (const name of Object.keys(ns)) {\n const entry = ns[name];\n if (typeof entry === \"function\") {\n //Async functions need to be wrapped. See JS-Interpreter documentation\n if ([\"hack\", \"grow\", \"weaken\", \"sleep\", \"prompt\", \"manualHack\", \"scp\", \"write\", \"share\", \"wget\"].includes(name)) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //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 for (let i = 0; i < args.length - 1; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n const cb = args[args.length - 1];\n const fnPromise = entry(...fnArgs);\n fnPromise\n .then(function (res: any) {\n cb(res);\n })\n .catch(function (err: any) {\n // workerscript is when you cancel a delay\n if (!(err instanceof WorkerScript)) {\n console.error(err);\n const errorTextArray = err.split(\"|DELIMITER|\");\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n let msg = `${scriptName}@${hostname}
    `;\n msg += \"
    \";\n msg += errorMsg;\n dialogBoxCreate(msg);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n });\n };\n int.setProperty(scope, name, int.createAsyncFunction(tempWrapper));\n } else if (\n name === \"sprintf\" ||\n name === \"vsprintf\" ||\n name === \"scp\" ||\n name == \"write\" ||\n name === \"tryWrite\" ||\n name === \"run\" ||\n name === \"exec\"\n ) {\n const tempWrapper = function (...args: any[]): void {\n const fnArgs = [];\n\n //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 for (let i = 0; i < args.length; ++i) {\n if (typeof args[i] === \"object\" || args[i].constructor === Array) {\n fnArgs.push(int.pseudoToNative(args[i]));\n } else {\n fnArgs.push(args[i]);\n }\n }\n\n return entry(...fnArgs);\n };\n int.setProperty(scope, name, int.createNativeFunction(tempWrapper));\n } else {\n const tempWrapper = function (...args: any[]): any {\n const res = entry(...args);\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 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 }\n\n //Add the arguments\n int.setProperty(scope, \"args\", int.nativeToPseudo(workerScript.args));\n };\n\n let interpreter: any;\n try {\n interpreter = new Interpreter(codeWithImports, interpreterInitialization, codeLineOffset);\n } catch (e: any) {\n dialogBoxCreate(\"Syntax ERROR in \" + workerScript.name + \":
    \" + e);\n workerScript.env.stopFlag = true;\n workerScript.running = false;\n killWorkerScript(workerScript);\n return Promise.resolve(workerScript);\n }\n\n return new Promise(function (resolve, reject) {\n function runInterpreter(): void {\n try {\n if (workerScript.env.stopFlag) {\n return reject(workerScript);\n }\n\n let more = true;\n let i = 0;\n while (i < 3 && more) {\n more = more && interpreter.step();\n i++;\n }\n\n if (more) {\n setTimeout(runInterpreter, Settings.CodeInstructionRunTime);\n } else {\n resolve(workerScript);\n }\n } catch (e: any) {\n e = e.toString();\n if (!isScriptErrorMessage(e)) {\n e = makeRuntimeRejectMsg(workerScript, e);\n }\n workerScript.errorMessage = e;\n return reject(workerScript);\n }\n }\n\n try {\n runInterpreter();\n } catch (e: any) {\n if (isString(e)) {\n workerScript.errorMessage = e;\n return reject(workerScript);\n } else if (e instanceof WorkerScript) {\n return reject(e);\n } else {\n return reject(workerScript);\n }\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*/\nfunction processNetscript1Imports(code: string, workerScript: WorkerScript): any {\n //allowReserved prevents 'import' from throwing error in ES5\n const ast: any = parse(code, {\n ecmaVersion: 9,\n allowReserved: true,\n sourceType: \"module\",\n });\n\n const server = workerScript.getServer();\n if (server == null) {\n throw new Error(\"Failed to find underlying Server object for script\");\n }\n\n function getScript(scriptName: string): Script | null {\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 return null;\n }\n\n let generatedCode = \"\"; // Generated Javascript Code\n let hasImports = false;\n\n // Walk over the tree and process ImportDeclaration nodes\n walksimple(ast, {\n ImportDeclaration: (node: any) => {\n hasImports = true;\n let scriptName = node.source.value;\n if (scriptName.startsWith(\"./\")) {\n scriptName = scriptName.slice(2);\n }\n const script = getScript(scriptName);\n if (script == null) {\n throw new Error(\"'Import' failed due to invalid script: \" + scriptName);\n }\n const scriptAst = parse(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 const namespace = node.specifiers[0].local.name;\n const fnNames: string[] = []; //Names only\n const fnDeclarations: any[] = []; //FunctionDeclaration Node objects\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n fnNames.push(node.id.name);\n fnDeclarations.push(node);\n },\n });\n\n //Now we have to generate the code that would create the namespace\n generatedCode += `var ${namespace};\\n(function (namespace) {\\n`;\n\n //Add the function declarations\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n\n //Add functions to namespace\n fnNames.forEach((fnName) => {\n generatedCode += \"namespace.\" + fnName + \" = \" + fnName;\n generatedCode += \"\\n\";\n });\n\n //Finish\n generatedCode += `})(${namespace} || (\" + namespace + \" = {}));\\n`;\n } else {\n //import {...} from script\n\n //Get array of all fns to import\n const fnsToImport: string[] = [];\n node.specifiers.forEach((e: any) => {\n fnsToImport.push(e.local.name);\n });\n\n //Walk through script and get FunctionDeclaration code for all specified fns\n const fnDeclarations: any[] = [];\n walksimple(scriptAst, {\n FunctionDeclaration: (node: any) => {\n if (fnsToImport.includes(node.id.name)) {\n fnDeclarations.push(node);\n }\n },\n });\n\n //Convert FunctionDeclarations into code\n fnDeclarations.forEach((fn: any) => {\n generatedCode += generate(fn);\n generatedCode += \"\\n\";\n });\n }\n },\n });\n\n //If there are no imports, just return the original code\n if (!hasImports) {\n return { code: code, lineOffset: 0 };\n }\n\n //Remove ImportDeclarations from AST. These ImportDeclarations must be in top-level\n let linesRemoved = 0;\n if (ast.type !== \"Program\" || ast.body == null) {\n throw new Error(\"Code could not be properly parsed\");\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 }\n\n //Calculated line offset\n const lineOffset = (generatedCode.match(/\\n/g) || []).length - linesRemoved;\n\n //Convert the AST back into code\n code = generate(ast);\n\n //Add the imported code and re-generate in ES5 (JS Interpreter for NS1 only supports ES5);\n code = generatedCode + code;\n\n const res = {\n code: code,\n lineOffset: lineOffset,\n };\n return res;\n}\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 */\nexport function startWorkerScript(\n player: IPlayer,\n runningScript: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): number {\n if (createAndAddWorkerScript(player, runningScript, server, parent)) {\n // Push onto runningScripts.\n // This has to come after createAndAddWorkerScript() because that fn updates RAM usage\n server.runScript(runningScript);\n\n // Once the WorkerScript is constructed in createAndAddWorkerScript(), the RunningScript\n // object should have a PID assigned to it, so we return that\n return runningScript.pid;\n }\n\n return 0;\n}\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 */\nfunction createAndAddWorkerScript(\n player: IPlayer,\n runningScriptObj: RunningScript,\n server: BaseServer,\n parent?: WorkerScript,\n): boolean {\n // Update server's ram usage\n let threads = 1;\n if (runningScriptObj.threads && !isNaN(runningScriptObj.threads)) {\n threads = runningScriptObj.threads;\n } else {\n runningScriptObj.threads = 1;\n }\n const oneRamUsage = getRamUsageFromRunningScript(runningScriptObj);\n const ramUsage = roundToTwo(oneRamUsage * threads);\n const ramAvailable = server.maxRam - server.ramUsed;\n if (ramUsage > ramAvailable) {\n dialogBoxCreate(\n `Not enough RAM to run script ${runningScriptObj.filename} with args ` +\n `${arrayToString(runningScriptObj.args)}. This likely occurred because you re-loaded ` +\n `the game and the script's RAM usage increased (either because of an update to the game or ` +\n `your changes to the script.)`,\n );\n return false;\n }\n\n server.updateRamUsed(roundToTwo(server.ramUsed + ramUsage), Player);\n\n // Get the pid\n const pid = generateNextPid();\n if (pid === -1) {\n throw new Error(\n `Failed to start script because could not find available PID. This is most ` +\n `because you have too many scripts running.`,\n );\n }\n\n // Create the WorkerScript. NOTE: WorkerScript ctor will set the underlying\n // RunningScript's PID as well\n const s = new WorkerScript(runningScriptObj, pid, NetscriptFunctions);\n s.ramUsage = oneRamUsage;\n\n // Add the WorkerScript to the global pool\n workerScripts.set(pid, s);\n WorkerScriptStartStopEventEmitter.emit();\n\n // Start the script's execution\n let p: Promise | null = null; // Script's resulting promise\n if (s.name.endsWith(\".js\") || s.name.endsWith(\".ns\")) {\n p = startNetscript2Script(player, s);\n } else {\n p = startNetscript1Script(s);\n if (!(p instanceof Promise)) {\n return false;\n }\n }\n\n // Once the code finishes (either resolved or rejected, doesnt matter), set its\n // running status to false\n p.then(function (w: WorkerScript) {\n w.running = false;\n w.env.stopFlag = true;\n // On natural death, the earnings are transfered to the parent if it still exists.\n if (parent !== undefined) {\n if (parent.running) {\n parent.scriptRef.onlineExpGained += runningScriptObj.onlineExpGained;\n parent.scriptRef.onlineMoneyMade += runningScriptObj.onlineMoneyMade;\n }\n }\n\n killWorkerScript(s);\n w.log(\"\", () => \"Script finished running\");\n }).catch(function (w) {\n if (w instanceof Error) {\n dialogBoxCreate(\"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 WorkerScript) {\n if (isScriptErrorMessage(w.errorMessage)) {\n const errorTextArray = w.errorMessage.split(\"|DELIMITER|\");\n if (errorTextArray.length != 4) {\n console.error(\"ERROR: Something wrong with Error text in evaluator...\");\n console.error(\"Error text: \" + w.errorMessage);\n return;\n }\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n\n let msg = `RUNTIME ERROR
    ${scriptName}@${hostname}
    `;\n if (w.args.length > 0) {\n msg += `Args: ${arrayToString(w.args)}
    `;\n }\n msg += \"
    \";\n msg += errorMsg;\n\n dialogBoxCreate(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 } else if (isScriptErrorMessage(w)) {\n dialogBoxCreate(\"Script runtime unknown error. This is a bug please contact game developer\");\n console.error(\n \"ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: \" +\n w.toString(),\n );\n return;\n } else {\n dialogBoxCreate(\"An unknown script died for an unknown reason. This is a bug please contact game dev\");\n console.error(w);\n }\n\n killWorkerScript(s);\n });\n\n return true;\n}\n\n/**\n * Updates the online running time stat of all running scripts\n */\nexport function updateOnlineScriptTimes(numCycles = 1): void {\n const time = (numCycles * CONSTANTS._idleSpeed) / 1000; //seconds\n for (const ws of workerScripts.values()) {\n ws.scriptRef.onlineRunningTime += time;\n }\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 */\nexport function loadAllRunningScripts(player: IPlayer): void {\n const skipScriptLoad = window.location.href.toLowerCase().indexOf(\"?noscripts\") !== -1;\n if (skipScriptLoad) {\n Terminal.warn(\"Skipped loading player scripts during startup\");\n console.info(\"Skipping the load of any scripts during startup\");\n }\n for (const server of GetAllServers()) {\n // Reset each server's RAM usage to 0\n server.ramUsed = 0;\n\n // Reset modules on all scripts\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 const fileName = server.runningScripts[j].filename;\n createAndAddWorkerScript(player, server.runningScripts[j], server);\n\n if (!server.runningScripts[j]) {\n // createAndAddWorkerScript can modify the server.runningScripts array if a script is invalid\n console.error(`createAndAddWorkerScript removed ${fileName} from ${server}`);\n continue;\n }\n\n // Offline production\n scriptCalculateOfflineProduction(server.runningScripts[j]);\n }\n }\n }\n}\n\n/**\n * Run a script from inside another script (run(), exec(), spawn(), etc.)\n */\nexport function runScriptFromScript(\n player: IPlayer,\n caller: string,\n server: BaseServer,\n scriptname: string,\n args: any[],\n workerScript: WorkerScript,\n threads = 1,\n): number {\n // Sanitize arguments\n if (!(workerScript instanceof WorkerScript)) {\n return 0;\n }\n\n if (typeof scriptname !== \"string\" || !Array.isArray(args)) {\n workerScript.log(caller, () => `Invalid arguments: scriptname='${scriptname} args='${args}'`);\n console.error(`runScriptFromScript() failed due to invalid arguments`);\n return 0;\n }\n\n args.forEach((arg, i) => {\n if (typeof arg !== \"string\" && typeof arg !== \"number\" && typeof arg !== \"boolean\")\n throw new Error(\n \"Only strings, numbers, and booleans can be passed as arguments to other scripts.\\n\" +\n `${scriptname} argument index ${i} is of type ${typeof arg} and value ${JSON.stringify(arg)}`,\n );\n });\n\n // Check if the script is already running\n const runningScriptObj = server.getRunningScript(scriptname, args);\n if (runningScriptObj != null) {\n workerScript.log(caller, () => `'${scriptname}' is already running on '${server.hostname}'`);\n return 0;\n }\n\n // 'null/undefined' arguments are not allowed\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 }\n\n // Check if the script exists and if it does run it\n for (let i = 0; i < server.scripts.length; ++i) {\n if (!areFilesEqual(server.scripts[i].filename, scriptname)) continue;\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.floor(Number(threads));\n if (threads === 0) {\n return 0;\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(\n caller,\n () =>\n `Cannot run script '${scriptname}' (t=${threads}) on '${server.hostname}' because there is not enough available RAM!`,\n );\n return 0;\n }\n // Able to run script\n workerScript.log(\n caller,\n () => `'${scriptname}' on '${server.hostname}' with ${threads} threads and args: ${arrayToString(args)}.`,\n );\n const runningScriptObj = new RunningScript(script, args);\n runningScriptObj.threads = threads;\n runningScriptObj.server = server.hostname;\n\n return startWorkerScript(player, runningScriptObj, server, workerScript);\n }\n\n workerScript.log(caller, () => `Could not find script '${scriptname}' on '${server.hostname}'`);\n return 0;\n}\n","import { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Export } from \"./Export\";\n\ninterface IConstructorParams {\n name?: string;\n}\n\nexport class Material {\n // Name of material\n name = \"InitName\";\n\n // Amount of material owned\n qty = 0;\n\n // Material's \"quality\". Unbounded\n qlt = 0;\n\n // How much demand the Material has in the market, and the range of possible\n // values for this \"demand\"\n dmd = 0;\n dmdR: number[] = [0, 0];\n\n // How much competition there is for this Material in the market, and the range\n // of possible values for this \"competition\"\n cmp = 0;\n cmpR: number[] = [0, 0];\n\n // Maximum volatility of this Materials stats\n mv = 0;\n\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 mku = 0;\n\n // How much of this material is being bought, sold, imported and produced every second\n buy = 0;\n sll = 0;\n prd = 0;\n imp = 0;\n\n // Exports of this material to another warehouse/industry\n exp: Export[] = [];\n\n // Total amount of this material exported in the last cycle\n totalExp = 0;\n\n // Cost / sec to buy this material. AKA Market Price\n bCost = 0;\n\n // Cost / sec to sell this material\n sCost: string | number = 0;\n\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 prdman: [boolean, number] = [false, 0]; // Production\n sllman: [boolean, string | number] = [false, 0]; // Sale\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price = 0;\n\n // Determines the maximum amount of this material that can be sold in one market cycle\n maxsll = 0;\n\n constructor(params: IConstructorParams = {}) {\n if (params.name) {\n this.name = params.name;\n }\n this.init();\n }\n\n getMarkupLimit(): number {\n return this.qlt / this.mku;\n }\n\n init(): void {\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 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 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 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 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 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 this.mku = 1;\n break;\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 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 this.mku = 1.5;\n break;\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 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 this.mku = 1;\n break;\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 this.mku = 0.5;\n break;\n case \"Scientific Research\":\n case \"InitName\":\n break;\n default:\n console.error(`Invalid material type in init(): ${this.name}`);\n break;\n }\n }\n\n // Process change in demand, competition, and buy cost of this material\n processMarket(): void {\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: number = (Math.random() * this.mv) / 300;\n const priceChange: number = 1 + priceVolatility;\n\n //This 1st random check determines whether competition increases or decreases\n const compVolatility: number = (Math.random() * this.mv) / 100;\n const compChange: number = 1 + compVolatility;\n if (Math.random() < 0.5) {\n this.cmp *= compChange;\n if (this.cmp > this.cmpR[1]) {\n this.cmp = this.cmpR[1];\n }\n this.bCost *= 1 / priceChange; // Competition increases, so price goes down\n } else {\n this.cmp *= 1 / compChange;\n if (this.cmp < this.cmpR[0]) {\n this.cmp = this.cmpR[0];\n }\n this.bCost *= priceChange; // Competition decreases, so price goes up\n }\n\n // This 2nd random check determines whether demand increases or decreases\n const dmdVolatility: number = (Math.random() * this.mv) / 100;\n const dmdChange: number = 1 + dmdVolatility;\n if (Math.random() < 0.5) {\n this.dmd *= dmdChange;\n if (this.dmd > this.dmdR[1]) {\n this.dmd = this.dmdR[1];\n }\n this.bCost *= priceChange; // Demand increases, so price goes up\n } else {\n this.dmd *= 1 / dmdChange;\n if (this.dmd < this.dmdR[0]) {\n this.dmd = this.dmdR[0];\n }\n this.bCost *= 1 / priceChange;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Material\", this);\n }\n\n // Initiatizes a Material object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Material {\n return Generic_fromJSON(Material, value.data);\n }\n}\n\nReviver.constructors.Material = Material;\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberTask } from \"../GangMemberTask\";\n\ninterface Gang {\n respect: number;\n territory: number;\n wantedLevel: number;\n}\n\nexport function calculateWantedPenalty(gang: Gang): number {\n return gang.respect / (gang.respect + gang.wantedLevel);\n}\n\nexport function calculateRespectGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseRespect === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 4 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.respect) / 100);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n return Math.pow(11 * task.baseRespect * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateWantedLevelGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseWanted === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n statWeight -= 3.5 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.wanted) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n if (task.baseWanted < 0) {\n return 0.4 * task.baseWanted * statWeight * territoryMult;\n }\n const calc = (7 * task.baseWanted) / Math.pow(3 * statWeight * territoryMult, 0.8);\n\n // 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 return Math.min(100, calc);\n}\n\nexport function calculateMoneyGain(gang: Gang, member: GangMember, task: GangMemberTask): number {\n if (task.baseMoney === 0) return 0;\n let statWeight =\n (task.hackWeight / 100) * member.hack +\n (task.strWeight / 100) * member.str +\n (task.defWeight / 100) * member.def +\n (task.dexWeight / 100) * member.dex +\n (task.agiWeight / 100) * member.agi +\n (task.chaWeight / 100) * member.cha;\n\n statWeight -= 3.2 * task.difficulty;\n if (statWeight <= 0) return 0;\n const territoryMult = Math.max(0.005, Math.pow(gang.territory * 100, task.territory.money) / 100);\n if (isNaN(territoryMult) || territoryMult <= 0) return 0;\n const respectMult = calculateWantedPenalty(gang);\n const territoryPenalty = (0.2 * gang.territory + 0.8) * BitNodeMultipliers.GangSoftcap;\n return Math.pow(5 * task.baseMoney * statWeight * territoryMult * respectMult, territoryPenalty);\n}\n\nexport function calculateAscensionPointsGain(exp: number): number {\n return Math.max(exp - 1000, 0);\n}\n\nexport function calculateAscensionMult(points: number): number {\n return Math.max(Math.pow(points / 2000, 0.5), 1);\n}\n","import { FactionInfo, FactionInfos } from \"./FactionInfo\";\nimport { favorToRep, repToFavor } from \"./formulas/favor\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Faction {\n /**\n * Flag signalling whether the player has already received an invitation\n * to this faction\n */\n alreadyInvited = false;\n\n /**\n * Holds names of all augmentations that this Faction offers\n */\n augmentations: string[] = [];\n\n /**\n * Amount of favor the player has with this faction.\n */\n favor = 0;\n\n /**\n * Flag signalling whether player has been banned from this faction\n */\n isBanned = false;\n\n /**\n * Flag signalling whether player is a member of this faction\n */\n isMember = false;\n\n /**\n * Name of faction\n */\n name = \"\";\n\n /**\n * Amount of reputation player has with this faction\n */\n playerReputation = 0;\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n getInfo(): FactionInfo {\n const info = FactionInfos[this.name];\n if (info == null) {\n throw new Error(\n `Missing faction from FactionInfos: ${this.name} this probably means the faction got corrupted somehow`,\n );\n }\n\n return info;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n //Returns an array with [How much favor would be gained, how much rep would be left over]\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Faction\", this);\n }\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 static fromJSON(value: any): Faction {\n return Generic_fromJSON(Faction, value.data);\n }\n}\n\nReviver.constructors.Faction = Faction;\n","// Enums that defined allowed values for setting configuration\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum PurchaseAugmentationsOrderSetting {\n Cost,\n Default,\n Reputation,\n Purchasable,\n}\n\n/**\n * Allowed values for the 'OwnedAugmentationsOrder' setting\n */\nexport enum OwnedAugmentationsOrderSetting {\n Alphabetically,\n AcquirementTime,\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { HacknetNodeConstants } from \"../data/Constants\";\n\nexport function calculateMoneyGainRate(level: number, ram: number, cores: number, mult: number): number {\n const gainPerLevel = HacknetNodeConstants.MoneyGainPerLevel;\n\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 * BitNodeMultipliers.HacknetNodeMoney;\n}\n\nexport function calculateLevelUpgradeCost(startingLevel: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingLevel >= HacknetNodeConstants.MaxLevel) {\n return Infinity;\n }\n\n const mult = HacknetNodeConstants.UpgradeLevelMult;\n let totalMultiplier = 0;\n let currLevel = startingLevel;\n for (let i = 0; i < sanitizedLevels; ++i) {\n totalMultiplier += HacknetNodeConstants.LevelBaseCost * Math.pow(mult, currLevel);\n ++currLevel;\n }\n\n return (HacknetNodeConstants.BaseCost / 2) * totalMultiplier * costMult;\n}\n\nexport function calculateRamUpgradeCost(startingRam: number, extraLevels = 1, costMult = 1): number {\n const sanitizedLevels = Math.round(extraLevels);\n if (isNaN(sanitizedLevels) || sanitizedLevels < 1) {\n return 0;\n }\n\n if (startingRam >= HacknetNodeConstants.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 * HacknetNodeConstants.RamBaseCost;\n const mult = Math.pow(HacknetNodeConstants.UpgradeRamMult, numUpgrades);\n\n totalCost += baseCost * mult;\n\n currentRam *= 2;\n ++numUpgrades;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateCoreUpgradeCost(startingCore: number, extraLevels = 1, costMult = 1): number {\n const sanitizedCores = Math.round(extraLevels);\n if (isNaN(sanitizedCores) || sanitizedCores < 1) {\n return 0;\n }\n\n if (startingCore >= HacknetNodeConstants.MaxCores) {\n return Infinity;\n }\n\n const coreBaseCost = HacknetNodeConstants.CoreBaseCost;\n const mult = HacknetNodeConstants.UpgradeCoreMult;\n let totalCost = 0;\n let currentCores = startingCore;\n for (let i = 0; i < sanitizedCores; ++i) {\n totalCost += coreBaseCost * Math.pow(mult, currentCores - 1);\n ++currentCores;\n }\n\n totalCost *= costMult;\n\n return totalCost;\n}\n\nexport function calculateNodeCost(n: number, mult = 1): number {\n if (n <= 0) {\n return 0;\n }\n return HacknetNodeConstants.BaseCost * Math.pow(HacknetNodeConstants.PurchaseNextMult, n - 1) * mult;\n}\n","import * as React from \"react\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nconst gainLimit = 10e9;\n\nexport function win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n}\n\nexport function reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n}\n\nexport class Game extends React.Component {\n win(p: IPlayer, n: number): void {\n p.gainMoney(n, \"casino\");\n }\n\n reachedLimit(p: IPlayer): boolean {\n const reached = p.getCasinoWinnings() > gainLimit;\n if (reached) {\n dialogBoxCreate(<>Alright cheater get out of here. You're not allowed here anymore.);\n }\n return reached;\n }\n}\n","const _ = false;\nconst X = true;\nexport const Shapes: {\n O: boolean[][];\n I: boolean[][];\n L: boolean[][];\n J: boolean[][];\n S: boolean[][];\n Z: boolean[][];\n T: boolean[][];\n} = {\n O: [\n [X, X],\n [X, X],\n ],\n I: [[X, X, X, X]],\n L: [\n [_, _, X],\n [X, X, X],\n ],\n J: [\n [X, _, _],\n [X, X, X],\n ],\n S: [\n [_, X, X],\n [X, X, _],\n ],\n Z: [\n [X, X, _],\n [_, X, X],\n ],\n T: [\n [X, X, X],\n [_, X, _],\n ],\n};\n","import React, { useEffect } from \"react\";\n\ninterface IProps {\n onKeyDown: (this: Document, event: KeyboardEvent) => void;\n onFailure: (options?: { automated: boolean }) => void;\n}\n\nexport function KeyHandler(props: IProps): React.ReactElement {\n useEffect(() => {\n function press(this: Document, event: KeyboardEvent): void {\n if (!event.isTrusted) return;\n const f = props.onKeyDown.bind(this);\n f(event);\n }\n document.addEventListener(\"keydown\", press);\n return () => document.removeEventListener(\"keydown\", press);\n });\n\n // invisible autofocused element that eats all the keypress for the minigames.\n return <>;\n}\n","import LinearProgress from \"@mui/material/LinearProgress\";\nimport React, { useState, useEffect } from \"react\";\nimport withStyles from \"@mui/styles/withStyles\";\nimport { Theme } from \"@mui/material/styles\";\nimport Grid from \"@mui/material/Grid\";\n\nconst TimerProgress = withStyles((theme: Theme) => ({\n root: {\n backgroundColor: theme.palette.background.paper,\n },\n bar: {\n transition: \"none\",\n backgroundColor: theme.palette.primary.main,\n },\n}))(LinearProgress);\n\ninterface IProps {\n millis: number;\n onExpire: () => void;\n}\n\nexport function GameTimer(props: IProps): React.ReactElement {\n const [v, setV] = useState(100);\n\n const tick = 200;\n 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 }, []);\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 return (\n \n \n \n );\n}\n","interface DifficultySetting {\n [key: string]: number;\n}\n\ninterface DifficultySettings {\n Trivial: DifficultySetting;\n Normal: DifficultySetting;\n Hard: DifficultySetting;\n Impossible: DifficultySetting;\n}\n\n// I could use `any` to simply some of this but I also want to take advantage\n// of the type safety that typescript provides. I'm just not sure how in this\n// case.\nexport function interpolate(settings: DifficultySettings, n: number, out: DifficultySetting): DifficultySetting {\n // interpolates between 2 difficulties.\n function lerpD(a: DifficultySetting, b: DifficultySetting, t: number): DifficultySetting {\n // interpolates between 2 numbers.\n function lerp(x: number, y: number, t: number): number {\n return (1 - t) * x + t * y;\n }\n for (const key of Object.keys(a)) {\n out[key] = lerp(a[key], b[key], t);\n }\n return a;\n }\n if (n < 0) return lerpD(settings.Trivial, settings.Trivial, 0);\n if (n >= 0 && n < 1) return lerpD(settings.Trivial, settings.Normal, n);\n if (n >= 1 && n < 2) return lerpD(settings.Normal, settings.Hard, n - 1);\n if (n >= 2 && n < 3) return lerpD(settings.Hard, settings.Impossible, n - 2);\n return lerpD(settings.Impossible, settings.Impossible, 0);\n}\n","/**\n * Map of all Locations in the game\n * Key = Location name, value = Location object\n */\nimport { City } from \"./City\";\nimport { Cities } from \"./Cities\";\nimport { Location, IConstructorParams } from \"./Location\";\nimport { CityName } from \"./data/CityNames\";\nimport { LocationsMetadata } from \"./data/LocationsMetadata\";\n\nimport { IMap } from \"../types\";\n\nexport const Locations: IMap = {};\n\n/**\n * Here, we'll initialize both Locations and Cities data. These can both\n * be initialized from the `LocationsMetadata`\n */\nfunction constructLocation(p: IConstructorParams): Location {\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) {\n console.warn(`Property with name ${p.name} already exists and is being overwritten`);\n }\n\n Locations[p.name] = new Location(p);\n\n return Locations[p.name];\n}\n\n// First construct all cities\nCities[CityName.Aevum] = new City(CityName.Aevum);\nCities[CityName.Chongqing] = new City(CityName.Chongqing);\nCities[CityName.Ishima] = new City(CityName.Ishima);\nCities[CityName.NewTokyo] = new City(CityName.NewTokyo);\nCities[CityName.Sector12] = new City(CityName.Sector12);\nCities[CityName.Volhaven] = new City(CityName.Volhaven);\n\nCities[CityName.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 `;\nCities[CityName.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------G-- \n / 39 | 41 [church] \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 `;\nCities[CityName.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 [glitch] \n \\\\ / [nova medical] / 4/30 \\\\ \n 49 x A \\\\ H \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 `;\nCities[CityName.NewTokyo].asciiArt = `\n \n \n o \n \\\\ \n [arcade] E [defcomm] \n \\\\ \n o--x---A--x--o [travel agency] \n 7 8 10 H \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--F--x-----x-----x---+---x----x--I--x-o \n | \n | \n o 17 \n \n \n \n G [the slums] \n `;\nCities[CityName.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] `;\nCities[CityName.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 `;\n\n// Then construct all locations, and add them to the cities as we go.\nfor (const metadata of LocationsMetadata) {\n const loc = constructLocation(metadata);\n\n const cityName = loc.city;\n if (cityName === null) {\n // Generic location, add to all cities\n for (const city of Object.keys(Cities)) {\n Cities[city].addLocation(loc.name);\n }\n } else {\n Cities[cityName].addLocation(loc.name);\n }\n}\n","import React from \"react\";\nimport { BitNodeMultipliers } from \"./BitNodeMultipliers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { CityName } from \"../Locations/data/CityNames\";\n\nclass BitNode {\n // A short description, or tagline, about the BitNode\n desc: string;\n\n // A long, detailed overview of the BitNode\n info: JSX.Element;\n\n // Name of BitNode\n name: string;\n\n // BitNode number\n number: number;\n\n difficulty: 0 | 1 | 2;\n\n constructor(n: number, difficulty: 0 | 1 | 2, name: string, desc = \"\", info: JSX.Element = <>) {\n this.number = n;\n this.difficulty = difficulty;\n this.name = name;\n this.desc = desc;\n this.info = info;\n }\n}\n\nexport const BitNodes: IMap = {};\n\nBitNodes[\"BitNode1\"] = new BitNode(\n 1,\n 0,\n \"Source Genesis\",\n \"The original BitNode\",\n (\n <>\n The first BitNode created by the Enders to imprison the minds of humans. It became the prototype and\n testing-grounds for all of the BitNodes that followed.\n
    \n
    \n This is the first BitNode that you play through. It has no special modifications or mechanics.\n
    \n
    \n Destroying this BitNode will give you Source-File 1, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the player start with 32GB of RAM on his/her home computer when\n entering a new BitNode, and also increases all of the player's multipliers by:\n
    \n
    \n Level 1: 16%\n
    \n Level 2: 24%\n
    \n Level 3: 28%\n \n ),\n);\nBitNodes[\"BitNode2\"] = new BitNode(\n 2,\n 0,\n \"Rise of the Underworld\",\n \"From the shadows, they rose\", //Gangs\n (\n <>\n From the shadows, they rose.\n
    \n
    \n Organized crime groups quickly filled the void of power left behind from the collapse of Western government in the\n 2050s. As society and civilization broke down, people quickly succumbed to the innate human impulse of evil and\n savagery. The organized crime factions quickly rose to the top of the modern world.\n
    \n
    \n In this BitNode:\n
    \n
    \n Your hacking level is reduced by 20%\n
    \n The growth rate and maximum amount of money available on servers are significantly decreased\n
    \n The amount of money gained from crimes and Infiltration is tripled\n
    \n Certain Factions ({FactionNames.SlumSnakes}, {FactionNames.Tetrads}, {FactionNames.TheSyndicate},{\" \"}\n {FactionNames.TheDarkArmy}, {FactionNames.SpeakersForTheDead}, {FactionNames.NiteSec}, {FactionNames.TheBlackHand}\n ) give the player the ability to form and manage their own gangs. These gangs will earn the player money and\n reputation with the corresponding Faction\n
    \n Every Augmentation in the game will be available through the Factions listed above\n
    \n For every Faction NOT listed above, reputation gains are halved\n
    \n You will no longer gain passive reputation with Factions\n
    \n
    \n Destroying this BitNode will give you Source-File 2, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to form gangs in other BitNodes once your karma decreases\n to a certain value. It also increases the player's crime success rate, crime money, and charisma multipliers by:\n
    \n
    \n Level 1: 24%\n
    \n Level 2: 36%\n
    \n Level 3: 42%\n \n ),\n);\nBitNodes[\"BitNode3\"] = new BitNode(\n 3,\n 0,\n \"Corporatocracy\",\n \"The Price of Civilization\",\n (\n <>\n Our greatest illusion is that a healthy society can revolve around a single-minded pursuit of wealth.\n
    \n
    \n Sometime in the early 21st century economic and political globalization turned the world into a corporatocracy,\n and it never looked back. Now, the privileged elite will happily bankrupt their own countrymen, decimate their own\n community, and evict their neighbors from houses in their desperate bid to increase their wealth.\n
    \n
    \n In this BitNode you can create and manage your own corporation. Running a successful corporation has the potential\n of generating massive profits. All other forms of income are reduced by 75%. Furthermore:
    \n
    \n The price and reputation cost of all Augmentations is tripled\n
    \n The starting and maximum amount of money on servers is reduced by 75%\n
    \n Server growth rate is reduced by 80%\n
    \n You now only need 75 favour with a faction in order to donate to it, rather than 150\n
    \n
    \n Destroying this BitNode will give you Source-File 3, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you create corporations on other BitNodes (although some\n BitNodes will disable this mechanic). This Source-File also increases your charisma and company salary multipliers\n by:\n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode4\"] = new BitNode(\n 4,\n 1,\n \"The Singularity\",\n \"The Man and the Machine\",\n (\n <>\n The Singularity has arrived. The human race is gone, replaced by artificially superintelligent beings that are\n more machine than man.
    \n
    \n In this BitNode, progressing is significantly harder. Experience gain rates for all stats are reduced. Most\n methods of earning money will now give significantly less.\n
    \n
    \n In this BitNode you will gain access to a new set of Netscript Functions known as Singularity Functions. These\n functions allow you to control most aspects of the game through scripts, including working for factions/companies,\n purchasing/installing Augmentations, and creating programs.\n
    \n
    \n Destroying this BitNode will give you Source-File 4, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets you access and use the Singularity Functions in other BitNodes.\n Each level of this Source-File reduces the RAM cost of singularity functions.\n \n ),\n);\nBitNodes[\"BitNode5\"] = new BitNode(\n 5,\n 1,\n \"Artificial Intelligence\",\n \"Posthuman\",\n (\n <>\n They said it couldn't be done. They said the human brain, along with its consciousness and intelligence, couldn't\n be replicated. They said the complexity of the brain results from unpredictable, nonlinear interactions that\n couldn't be modeled by 1's and 0's. They were wrong.\n
    \n
    \n In this BitNode:\n
    \n
    \n The base security level of servers is doubled\n
    \n The starting money on servers is halved, but the maximum money remains the same\n
    \n Most methods of earning money now give significantly less\n
    \n Infiltration gives 50% more reputation and money\n
    \n Corporations have 50% lower valuations and are therefore less profitable\n
    \n Augmentations are more expensive\n
    \n Hacking experience gain rates are reduced\n
    \n
    \n Destroying this BitNode will give you Source-File 5, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants you a special new stat called Intelligence. Intelligence is\n unique because it is permanent and persistent (it never gets reset back to 1). However gaining Intelligence\n experience is much slower than other stats. Higher Intelligence levels will boost your production for many actions\n in the game.
    \n
    \n In addition, this Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with\n Formulas.exe, and will also raise all of your hacking-related multipliers by:\n
    \n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode6\"] = new BitNode(\n 6,\n 1,\n FactionNames.Bladeburners,\n \"Like Tears in Rain\",\n (\n <>\n In the middle of the 21st century, {FactionNames.OmniTekIncorporated} began designing and manufacturing advanced\n synthetic androids, or Synthoids for short. They achieved a major technological breakthrough in the sixth\n generation of their Synthoid design, called MK-VI, by developing a hyperintelligent AI. Many argue that this was\n the first sentient AI ever created. This resulted in Synthoid models that were stronger, faster, and more\n intelligent than the humans that had created them.\n
    \n
    \n In this BitNode you will be able to access the {FactionNames.Bladeburners} Division at the NSA, which provides a\n new mechanic for progression. Furthermore:\n
    \n
    \n Hacking and Hacknet Nodes will be less profitable\n
    \n Your hacking level is reduced by 65%\n
    \n Hacking experience gain from scripts is reduced by 75%\n
    \n Corporations have 80% lower valuations and are therefore less profitable\n
    \n Working for companies is 50% less profitable\n
    \n Crimes and Infiltration are 25% less profitable\n
    \n
    \n Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the NSA's {FactionNames.Bladeburners} Division\n in other BitNodes. In addition, this Source-File will raise both the level and experience gain rate of all your\n combat stats by:\n
    \n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode7\"] = new BitNode(\n 7,\n 2,\n `${FactionNames.Bladeburners} 2079`,\n \"More human than humans\",\n (\n <>\n In the middle of the 21st century, you were doing cutting-edge work at {FactionNames.OmniTekIncorporated} as part\n of the AI design team for advanced synthetic androids, or Synthoids for short. You helped achieve a major\n technological breakthrough in the sixth generation of the company's Synthoid design, called MK-VI, by developing a\n hyperintelligent AI. Many argue that this was the first sentient AI ever created. This resulted in Synthoid models\n that were stronger, faster, and more intelligent than the humans that had created them.\n
    \n
    \n In this BitNode you will be able to access the {FactionNames.Bladeburners} API, which allows you to access{\" \"}\n {FactionNames.Bladeburners}\n functionality through Netscript. Furthermore:
    \n
    \n The rank you gain from {FactionNames.Bladeburners} contracts/operations is reduced by 40%\n
    \n {FactionNames.Bladeburners} skills cost twice as many skill points\n
    \n Augmentations are 3x more expensive\n
    \n Hacking and Hacknet Nodes will be significantly less profitable\n
    \n Your hacking level is reduced by 65%\n
    \n Hacking experience gain from scripts is reduced by 75%\n
    \n Corporations have 80% lower valuations and are therefore less profitable\n
    \n Working for companies is 50% less profitable\n
    \n Crimes and Infiltration are 25% less profitable\n
    \n
    \n Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File allows you to access the {FactionNames.Bladeburners} Netscript API in\n other BitNodes. In addition, this Source-File will increase all of your {FactionNames.Bladeburners} multipliers\n by:\n
    \n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode8\"] = new BitNode(\n 8,\n 2,\n \"Ghost of Wall Street\",\n \"Money never sleeps\",\n (\n <>\n You are trying to make a name for yourself as an up-and-coming hedge fund manager on Wall Street.\n
    \n
    \n In this BitNode:\n
    \n
    \n You start with $250 million\n
    \n The only way to earn money is by trading on the stock market\n
    \n You start with a WSE membership and access to the TIX API\n
    \n You are able to short stocks and place different types of orders (limit/stop)\n
    \n You can immediately donate to factions to gain reputation\n
    \n
    \n Destroying this BitNode will give you Source-File 8, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
    \n
    \n Level 1: Permanent access to WSE and TIX API\n
    \n Level 2: Ability to short stocks in other BitNodes\n
    \n Level 3: Ability to use limit/stop orders in other BitNodes\n
    \n
    \n This Source-File also increases your hacking growth multipliers by:\n
    \n Level 1: 12%\n
    \n Level 2: 18%\n
    \n Level 3: 21%\n \n ),\n);\nBitNodes[\"BitNode9\"] = new BitNode(\n 9,\n 2,\n \"Hacktocracy\",\n \"Hacknet Unleashed\",\n (\n <>\n When {FactionNames.FulcrumSecretTechnologies} released their open-source Linux distro Chapeau, it quickly became\n the OS of choice for the underground hacking community. Chapeau became especially notorious for powering the\n Hacknet, a global, decentralized network used for nefarious purposes. {FactionNames.FulcrumSecretTechnologies}{\" \"}\n quickly abandoned the project and dissociated themselves from it.\n
    \n
    \n This BitNode unlocks the Hacknet Server, an upgraded version of the Hacknet Node. Hacknet Servers generate hashes,\n which can be spent on a variety of different upgrades.\n
    \n
    \n In this BitNode:\n
    \n
    \n Your stats are significantly decreased\n
    \n You cannnot purchase additional servers\n
    \n Hacking is significantly less profitable\n
    \n
    \n Destroying this BitNode will give you Source-File 9, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File grants the following benefits:\n
    \n
    \n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
    \n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
    \n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
    \n
    \n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
    \n
    \n This Source-File also increases your hacknet multipliers by:\n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nBitNodes[\"BitNode10\"] = new BitNode(\n 10,\n 2,\n \"Digital Carbon\",\n \"Your body is not who you are\",\n (\n <>\n In 2084, VitaLife unveiled to the world the Persona Core, a technology that allowed people to digitize their\n consciousness. Their consciousness could then be transferred into Synthoids or other bodies by trasmitting the\n digitized data. Human bodies became nothing more than 'sleeves' for the human consciousness. Mankind had finally\n achieved immortality - at least for those that could afford it.\n
    \n
    \n This BitNode unlocks Sleeve technology. Sleeve technology allows you to:\n
    \n
    \n 1. Grafting: Visit VitaLife in New Tokyo to be able to obtain Augmentations without needing to install\n
    \n 2. Duplicate Sleeves: Duplicate your consciousness into Synthoids, allowing you to perform different tasks\n synchronously\n
    \n
    \n In this BitNode:\n
    \n
    \n Your stats are significantly decreased\n
    \n All methods of gaining money are half as profitable (except Stock Market)\n
    \n Purchased servers are more expensive, have less max RAM, and a lower maximum limit\n
    \n Augmentations are 5x as expensive and require twice as much reputation\n
    \n
    \n Destroying this BitNode will give you Source-File 10, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File unlocks Sleeve technology in other BitNodes. Each level of this\n Source-File also grants you a Duplicate Sleeve\n \n ),\n);\nBitNodes[\"BitNode11\"] = new BitNode(\n 11,\n 1,\n \"The Big Crash\",\n \"Okay. Sell it all.\",\n (\n <>\n The 2050s was defined by the massive amounts of violent civil unrest and anarchic rebellion that rose all around\n the world. It was this period of disorder that eventually lead to the governmental reformation of many global\n superpowers, most notably the USA and China. But just as the world was slowly beginning to recover from these dark\n times, financial catastrophe hit.\n
    \n
    \n In many countries, the high cost of trying to deal with the civil disorder bankrupted the governments. In all of\n this chaos and confusion, hackers were able to steal billions of dollars from the world's largest electronic\n banks, prompting an international banking crisis as governments were unable to bail out insolvent banks. Now, the\n world is slowly crumbling in the middle of the biggest economic crisis of all time.\n
    \n
    \n In this BitNode:\n
    \n
    \n Your hacking stat and experience gain are halved\n
    \n The starting and maximum amount of money available on servers is significantly decreased\n
    \n The growth rate of servers is significantly reduced\n
    \n Weakening a server is twice as effective\n
    \n Company wages are decreased by 50%\n
    \n Corporation valuations are 90% lower and are therefore significantly less profitable\n
    \n Hacknet Node production is significantly decreased\n
    \n Crime and Infiltration are more lucrative\n
    \n Augmentations are twice as expensive\n
    \n
    \n Destroying this BitNode will give you Source-File 11, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File makes it so that company favor increases BOTH the player's salary and\n reputation gain rate at that company by 1% per favor (rather than just the reputation gain). This Source-File also\n increases the player's company salary and reputation gain multipliers by:\n
    \n
    \n Level 1: 32%\n
    \n Level 2: 48%\n
    \n Level 3: 56%\n
    \n
    \n It also reduces the price increase for every aug bought by:\n
    \n
    \n Level 1: 4%\n
    \n Level 2: 6%\n
    \n Level 3: 7%\n \n ),\n);\nBitNodes[\"BitNode12\"] = new BitNode(\n 12,\n 0,\n \"The Recursion\",\n \"Repeat.\",\n (\n <>\n To iterate is human, to recurse divine.\n
    \n
    \n Every time this BitNode is destroyed, it becomes slightly harder. Destroying this BitNode will give you\n Source-File 12, or if you already have this Source-File it will upgrade its level. There is no maximum level for\n Source-File 12. Each level of Source-File 12 lets you start any BitNodes with NeuroFlux Governor equal to the\n level of this source file.\n \n ),\n);\nBitNodes[\"BitNode13\"] = new BitNode(\n 13,\n 2,\n \"They're lunatics\",\n \"1 step back, 2 steps forward\",\n (\n <>\n With the invention of Augmentations in the 2040s a religious group known as the{\" \"}\n {FactionNames.ChurchOfTheMachineGod} has rallied far more support than anyone would have hoped.\n
    \n
    \n Their leader, Allison \"Mother\" Stanek is said to have created her own Augmentation whose power goes beyond any\n other. Find her in {CityName.Chongqing} and gain her trust.\n
    \n
    \n In this BitNode:\n
    \n
    \n Every stat is significantly reduced\n
    \n Stanek's Gift power is significantly increased.\n
    \n
    \n Destroying this BitNode will give you Source-File 13, or if you already have this Source-File it will upgrade its\n level up to a maximum of 3. This Source-File lets the {FactionNames.ChurchOfTheMachineGod} appear in other\n BitNodes.\n
    \n
    \n Each level of this Source-File increases the size of Stanek's Gift.\n \n ),\n);\n// Books: Frontera, Shiner\nBitNodes[\"BitNode14\"] = new BitNode(14, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode15\"] = new BitNode(15, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode16\"] = new BitNode(16, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode17\"] = new BitNode(17, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode18\"] = new BitNode(18, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode19\"] = new BitNode(19, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode20\"] = new BitNode(20, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode21\"] = new BitNode(21, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode22\"] = new BitNode(22, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode23\"] = new BitNode(23, 2, \"\", \"COMING SOON\");\nBitNodes[\"BitNode24\"] = new BitNode(24, 2, \"\", \"COMING SOON\");\n\nexport function initBitNodeMultipliers(p: IPlayer): void {\n if (p.bitNodeN == null) {\n p.bitNodeN = 1;\n }\n for (const mult of Object.keys(BitNodeMultipliers)) {\n if (BitNodeMultipliers.hasOwnProperty(mult)) {\n BitNodeMultipliers[mult] = 1;\n }\n }\n // Special case.\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n\n switch (p.bitNodeN) {\n case 1: // Source Genesis (every multiplier is 1)\n break;\n case 2: // Rise of the Underworld\n BitNodeMultipliers.HackingLevelMultiplier = 0.8;\n BitNodeMultipliers.ServerGrowthRate = 0.8;\n BitNodeMultipliers.ServerMaxMoney = 0.2;\n BitNodeMultipliers.ServerStartingMoney = 0.4;\n BitNodeMultipliers.CrimeMoney = 3;\n BitNodeMultipliers.InfiltrationMoney = 3;\n BitNodeMultipliers.FactionWorkRepGain = 0.5;\n BitNodeMultipliers.FactionPassiveRepGain = 0;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 2;\n BitNodeMultipliers.StaneksGiftExtraSize = -6;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.3;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 5;\n break;\n case 3: // Corporatocracy\n BitNodeMultipliers.HackingLevelMultiplier = 0.8;\n BitNodeMultipliers.RepToDonateToFaction = 0.5;\n BitNodeMultipliers.AugmentationRepCost = 3;\n BitNodeMultipliers.AugmentationMoneyCost = 3;\n BitNodeMultipliers.ServerMaxMoney = 0.2;\n BitNodeMultipliers.ServerStartingMoney = 0.2;\n BitNodeMultipliers.ServerGrowthRate = 0.2;\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.25;\n BitNodeMultipliers.CrimeMoney = 0.25;\n BitNodeMultipliers.HacknetNodeMoney = 0.25;\n BitNodeMultipliers.HomeComputerRamCost = 1.5;\n BitNodeMultipliers.PurchasedServerCost = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75;\n BitNodeMultipliers.StaneksGiftExtraSize = -2;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.3;\n BitNodeMultipliers.GangSoftcap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.5;\n break;\n case 4: // The Singularity\n BitNodeMultipliers.ServerMaxMoney = 0.15;\n BitNodeMultipliers.ServerStartingMoney = 0.75;\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.1;\n BitNodeMultipliers.CrimeMoney = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.05;\n BitNodeMultipliers.CompanyWorkExpGain = 0.5;\n BitNodeMultipliers.ClassGymExpGain = 0.5;\n BitNodeMultipliers.FactionWorkExpGain = 0.5;\n BitNodeMultipliers.HackExpGain = 0.4;\n BitNodeMultipliers.CrimeExpGain = 0.5;\n BitNodeMultipliers.FactionWorkRepGain = 0.75;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.2;\n BitNodeMultipliers.WorldDaemonDifficulty = 3;\n BitNodeMultipliers.GangUniqueAugs = 0.5;\n break;\n case 5: // Artificial intelligence\n BitNodeMultipliers.ServerMaxMoney = 2;\n BitNodeMultipliers.ServerStartingSecurity = 2;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.15;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.InfiltrationRep = 1.5;\n BitNodeMultipliers.InfiltrationMoney = 1.5;\n BitNodeMultipliers.AugmentationMoneyCost = 2;\n BitNodeMultipliers.HackExpGain = 0.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 1.3;\n BitNodeMultipliers.StaneksGiftExtraSize = 0;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.2;\n BitNodeMultipliers.WorldDaemonDifficulty = 1.5;\n BitNodeMultipliers.GangUniqueAugs = 0.5;\n break;\n case 6: // Bladeburner\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.ServerMaxMoney = 0.4;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n BitNodeMultipliers.ScriptHackMoney = 0.75;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.75;\n BitNodeMultipliers.InfiltrationMoney = 0.75;\n BitNodeMultipliers.CorporationValuation = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.HackExpGain = 0.25;\n BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 2;\n BitNodeMultipliers.GangSoftcap = 0.7;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.2;\n break;\n case 7: // Bladeburner 2079\n BitNodeMultipliers.BladeburnerRank = 0.6;\n BitNodeMultipliers.BladeburnerSkillCost = 2;\n BitNodeMultipliers.AugmentationMoneyCost = 3;\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.ServerMaxMoney = 0.4;\n BitNodeMultipliers.ServerStartingMoney = 0.5;\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n BitNodeMultipliers.ScriptHackMoney = 0.5;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.75;\n BitNodeMultipliers.InfiltrationMoney = 0.75;\n BitNodeMultipliers.CorporationValuation = 0.2;\n BitNodeMultipliers.HacknetNodeMoney = 0.2;\n BitNodeMultipliers.HackExpGain = 0.25;\n BitNodeMultipliers.FourSigmaMarketDataCost = 2;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 2;\n BitNodeMultipliers.DaedalusAugsRequirement = 1.166; // Results in 35 Augs needed\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.9;\n BitNodeMultipliers.StaneksGiftExtraSize = -1;\n BitNodeMultipliers.GangSoftcap = 0.7;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.2;\n break;\n case 8: // Ghost of Wall Street\n BitNodeMultipliers.ScriptHackMoney = 0.3;\n BitNodeMultipliers.ScriptHackMoneyGain = 0;\n BitNodeMultipliers.ManualHackMoney = 0;\n BitNodeMultipliers.CompanyWorkMoney = 0;\n BitNodeMultipliers.CrimeMoney = 0;\n BitNodeMultipliers.HacknetNodeMoney = 0;\n BitNodeMultipliers.InfiltrationMoney = 0;\n BitNodeMultipliers.RepToDonateToFaction = 0;\n BitNodeMultipliers.CorporationValuation = 0;\n BitNodeMultipliers.CodingContractMoney = 0;\n BitNodeMultipliers.StaneksGiftExtraSize = -7;\n BitNodeMultipliers.PurchasedServerSoftcap = 4;\n BitNodeMultipliers.GangSoftcap = 0;\n BitNodeMultipliers.CorporationSoftCap = 0;\n BitNodeMultipliers.GangUniqueAugs = 0;\n break;\n case 9: // Hacktocracy\n BitNodeMultipliers.HackingLevelMultiplier = 0.5;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.45;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.45;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.45;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.45;\n BitNodeMultipliers.CharismaLevelMultiplier = 0.45;\n BitNodeMultipliers.PurchasedServerLimit = 0;\n BitNodeMultipliers.HomeComputerRamCost = 5;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.1;\n BitNodeMultipliers.HackExpGain = 0.05;\n BitNodeMultipliers.ServerStartingMoney = 0.1;\n BitNodeMultipliers.ServerMaxMoney = 0.1;\n BitNodeMultipliers.ServerStartingSecurity = 2.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.FourSigmaMarketDataCost = 5;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;\n BitNodeMultipliers.BladeburnerRank = 0.9;\n BitNodeMultipliers.BladeburnerSkillCost = 1.2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.5;\n BitNodeMultipliers.StaneksGiftExtraSize = 2;\n BitNodeMultipliers.GangSoftcap = 0.8;\n BitNodeMultipliers.CorporationSoftCap = 0.7;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.25;\n break;\n case 10: // Digital Carbon\n BitNodeMultipliers.HackingLevelMultiplier = 0.35;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.4;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.4;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.4;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.4;\n BitNodeMultipliers.CharismaLevelMultiplier = 0.4;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.CrimeMoney = 0.5;\n BitNodeMultipliers.HacknetNodeMoney = 0.5;\n BitNodeMultipliers.ManualHackMoney = 0.5;\n BitNodeMultipliers.ScriptHackMoney = 0.5;\n BitNodeMultipliers.CodingContractMoney = 0.5;\n BitNodeMultipliers.InfiltrationMoney = 0.5;\n BitNodeMultipliers.CorporationValuation = 0.5;\n BitNodeMultipliers.AugmentationMoneyCost = 5;\n BitNodeMultipliers.AugmentationRepCost = 2;\n BitNodeMultipliers.HomeComputerRamCost = 1.5;\n BitNodeMultipliers.PurchasedServerCost = 5;\n BitNodeMultipliers.PurchasedServerLimit = 0.6;\n BitNodeMultipliers.PurchasedServerMaxRam = 0.5;\n BitNodeMultipliers.BladeburnerRank = 0.8;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 0.75;\n BitNodeMultipliers.StaneksGiftExtraSize = -3;\n BitNodeMultipliers.PurchasedServerSoftcap = 1.1;\n BitNodeMultipliers.GangSoftcap = 0.9;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 2;\n BitNodeMultipliers.GangUniqueAugs = 0.25;\n break;\n case 11: //The Big Crash\n BitNodeMultipliers.HackingLevelMultiplier = 0.6;\n BitNodeMultipliers.HackExpGain = 0.5;\n BitNodeMultipliers.ServerMaxMoney = 0.1;\n BitNodeMultipliers.ServerStartingMoney = 0.1;\n BitNodeMultipliers.ServerGrowthRate = 0.2;\n BitNodeMultipliers.ServerWeakenRate = 2;\n BitNodeMultipliers.CrimeMoney = 3;\n BitNodeMultipliers.CompanyWorkMoney = 0.5;\n BitNodeMultipliers.HacknetNodeMoney = 0.1;\n BitNodeMultipliers.AugmentationMoneyCost = 2;\n BitNodeMultipliers.InfiltrationMoney = 2.5;\n BitNodeMultipliers.InfiltrationRep = 2.5;\n BitNodeMultipliers.CorporationValuation = 0.1;\n BitNodeMultipliers.CodingContractMoney = 0.25;\n BitNodeMultipliers.FourSigmaMarketDataCost = 4;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 4;\n BitNodeMultipliers.PurchasedServerSoftcap = 2;\n BitNodeMultipliers.CorporationSoftCap = 0.9;\n BitNodeMultipliers.WorldDaemonDifficulty = 1.5;\n BitNodeMultipliers.GangUniqueAugs = 0.75;\n break;\n case 12: {\n //The Recursion\n let sf12Lvl = 0;\n for (let i = 0; i < p.sourceFiles.length; i++) {\n if (p.sourceFiles[i].n === 12) {\n sf12Lvl = p.sourceFiles[i].lvl;\n }\n }\n const inc = Math.pow(1.02, sf12Lvl);\n const dec = 1 / inc;\n\n // Multiplier for number of augs needed for Daedalus increases\n // up to a maximum of 1.34, which results in 40 Augs required\n BitNodeMultipliers.DaedalusAugsRequirement = Math.min(inc, 1.34);\n\n BitNodeMultipliers.HackingLevelMultiplier = dec;\n BitNodeMultipliers.StrengthLevelMultiplier = dec;\n BitNodeMultipliers.DefenseLevelMultiplier = dec;\n BitNodeMultipliers.DexterityLevelMultiplier = dec;\n BitNodeMultipliers.AgilityLevelMultiplier = dec;\n BitNodeMultipliers.CharismaLevelMultiplier = dec;\n\n BitNodeMultipliers.ServerMaxMoney = dec;\n BitNodeMultipliers.ServerStartingMoney = dec;\n BitNodeMultipliers.ServerGrowthRate = dec;\n BitNodeMultipliers.ServerWeakenRate = dec;\n\n //Does not scale, otherwise security might start at 300+\n BitNodeMultipliers.ServerStartingSecurity = 1.5;\n\n BitNodeMultipliers.HomeComputerRamCost = inc;\n\n BitNodeMultipliers.PurchasedServerCost = inc;\n BitNodeMultipliers.PurchasedServerLimit = dec;\n BitNodeMultipliers.PurchasedServerMaxRam = dec;\n BitNodeMultipliers.PurchasedServerSoftcap = inc;\n\n BitNodeMultipliers.ManualHackMoney = dec;\n BitNodeMultipliers.ScriptHackMoney = dec;\n BitNodeMultipliers.CompanyWorkMoney = dec;\n BitNodeMultipliers.CrimeMoney = dec;\n BitNodeMultipliers.HacknetNodeMoney = dec;\n BitNodeMultipliers.CodingContractMoney = dec;\n\n BitNodeMultipliers.CompanyWorkExpGain = dec;\n BitNodeMultipliers.ClassGymExpGain = dec;\n BitNodeMultipliers.FactionWorkExpGain = dec;\n BitNodeMultipliers.HackExpGain = dec;\n BitNodeMultipliers.CrimeExpGain = dec;\n\n BitNodeMultipliers.FactionWorkRepGain = dec;\n BitNodeMultipliers.FactionPassiveRepGain = dec;\n BitNodeMultipliers.RepToDonateToFaction = inc;\n\n BitNodeMultipliers.AugmentationRepCost = inc;\n BitNodeMultipliers.AugmentationMoneyCost = inc;\n\n BitNodeMultipliers.InfiltrationMoney = dec;\n BitNodeMultipliers.InfiltrationRep = dec;\n\n BitNodeMultipliers.FourSigmaMarketDataCost = inc;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = inc;\n\n BitNodeMultipliers.CorporationValuation = dec;\n\n BitNodeMultipliers.BladeburnerRank = dec;\n BitNodeMultipliers.BladeburnerSkillCost = inc;\n\n BitNodeMultipliers.StaneksGiftPowerMultiplier = inc;\n BitNodeMultipliers.StaneksGiftExtraSize = inc;\n BitNodeMultipliers.GangSoftcap = 0.8;\n BitNodeMultipliers.CorporationSoftCap = 0.8;\n BitNodeMultipliers.WorldDaemonDifficulty = inc;\n\n BitNodeMultipliers.GangUniqueAugs = dec;\n break;\n }\n case 13: {\n BitNodeMultipliers.PurchasedServerSoftcap = 1.6;\n\n BitNodeMultipliers.HackingLevelMultiplier = 0.25;\n BitNodeMultipliers.StrengthLevelMultiplier = 0.7;\n BitNodeMultipliers.DefenseLevelMultiplier = 0.7;\n BitNodeMultipliers.DexterityLevelMultiplier = 0.7;\n BitNodeMultipliers.AgilityLevelMultiplier = 0.7;\n\n BitNodeMultipliers.ServerMaxMoney = 0.45;\n BitNodeMultipliers.ServerStartingMoney = 0.75;\n\n BitNodeMultipliers.ServerStartingSecurity = 3;\n\n BitNodeMultipliers.ScriptHackMoney = 0.2;\n BitNodeMultipliers.CompanyWorkMoney = 0.4;\n BitNodeMultipliers.CrimeMoney = 0.4;\n BitNodeMultipliers.HacknetNodeMoney = 0.4;\n BitNodeMultipliers.CodingContractMoney = 0.4;\n\n BitNodeMultipliers.CompanyWorkExpGain = 0.5;\n BitNodeMultipliers.ClassGymExpGain = 0.5;\n BitNodeMultipliers.FactionWorkExpGain = 0.5;\n BitNodeMultipliers.HackExpGain = 0.1;\n BitNodeMultipliers.CrimeExpGain = 0.5;\n\n BitNodeMultipliers.FactionWorkRepGain = 0.6;\n\n BitNodeMultipliers.FourSigmaMarketDataCost = 10;\n BitNodeMultipliers.FourSigmaMarketDataApiCost = 10;\n\n BitNodeMultipliers.CorporationValuation = 0.001;\n\n BitNodeMultipliers.BladeburnerRank = 0.45;\n BitNodeMultipliers.BladeburnerSkillCost = 2;\n BitNodeMultipliers.StaneksGiftPowerMultiplier = 2;\n BitNodeMultipliers.StaneksGiftExtraSize = 1;\n BitNodeMultipliers.GangSoftcap = 0.3;\n BitNodeMultipliers.CorporationSoftCap = 0.3;\n BitNodeMultipliers.WorldDaemonDifficulty = 3;\n BitNodeMultipliers.GangUniqueAugs = 0.1;\n break;\n }\n default:\n console.warn(\"Player.bitNodeN invalid\");\n break;\n }\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 */\nimport { IHacknetNode } from \"./IHacknetNode\";\n\nimport { CONSTANTS } from \"../Constants\";\n\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateCoreUpgradeCost,\n calculateRamUpgradeCost,\n} from \"./formulas/HacknetNodes\";\nimport { HacknetNodeConstants } from \"./data/Constants\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { ObjectValidator, minMax } from \"../utils/Validator\";\n\nexport class HacknetNode implements IHacknetNode {\n\n static validationData: ObjectValidator = {\n cores: minMax(1, 1, HacknetNodeConstants.MaxCores),\n level: minMax(1, 1, HacknetNodeConstants.MaxLevel),\n ram: minMax(1, 1, HacknetNodeConstants.MaxRam),\n onlineTimeSeconds: minMax(0, 0, Infinity),\n totalMoneyGenerated: minMax(0, 0, Infinity)\n }\n\n // Node's number of cores\n cores = 1;\n\n // Node's Level\n level = 1;\n\n // Node's production per second\n moneyGainRatePerSecond = 0;\n\n // Identifier for Node. Includes the full \"name\" (hacknet-node-N)\n name: string;\n\n // How long this Node has existed, in seconds\n onlineTimeSeconds = 0;\n\n // Node's RAM (GB)\n ram = 1;\n\n // Total money earned by this Node\n totalMoneyGenerated = 0;\n\n constructor(name = \"\", prodMult = 1) {\n this.name = name;\n\n this.updateMoneyGainRate(prodMult);\n }\n\n // Get the cost to upgrade this Node's number of cores\n calculateCoreUpgradeCost(levels = 1, costMult: number): number {\n return calculateCoreUpgradeCost(this.cores, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's level\n calculateLevelUpgradeCost(levels = 1, costMult: number): number {\n return calculateLevelUpgradeCost(this.level, levels, costMult);\n }\n\n // Get the cost to upgrade this Node's RAM\n calculateRamUpgradeCost(levels = 1, costMult: number): number {\n return calculateRamUpgradeCost(this.ram, levels, costMult);\n }\n\n // Process this Hacknet Node in the game loop.\n // Returns the amount of money generated\n process(numCycles = 1): number {\n const seconds = (numCycles * CONSTANTS.MilliPerCycle) / 1000;\n let gain = this.moneyGainRatePerSecond * seconds;\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\n return gain;\n }\n\n // Upgrade this Node's number of cores, if possible\n // Returns a boolean indicating whether new cores were successfully bought\n upgradeCore(levels = 1, prodMult: number): void {\n this.cores = Math.min(HacknetNodeConstants.MaxCores, Math.round(this.cores + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's level, if possible\n // Returns a boolean indicating whether the level was successfully updated\n upgradeLevel(levels = 1, prodMult: number): void {\n this.level = Math.min(HacknetNodeConstants.MaxLevel, Math.round(this.level + levels));\n this.updateMoneyGainRate(prodMult);\n }\n\n // Upgrade this Node's RAM, if possible\n // Returns a boolean indicating whether the RAM was successfully upgraded\n upgradeRam(levels = 1, prodMult: number): void {\n for (let i = 0; i < levels; ++i) {\n this.ram *= 2; // Ram is always doubled\n }\n this.ram = Math.round(this.ram); // Handle any floating point precision issues\n this.updateMoneyGainRate(prodMult);\n }\n\n // Re-calculate this Node's production and update the moneyGainRatePerSecond prop\n updateMoneyGainRate(prodMult: number): void {\n this.moneyGainRatePerSecond = calculateMoneyGainRate(this.level, this.ram, this.cores, prodMult);\n if (isNaN(this.moneyGainRatePerSecond)) {\n this.moneyGainRatePerSecond = 0;\n dialogBoxCreate(\"Error in calculating Hacknet Node production. Please report to game developer\");\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"HacknetNode\", this);\n }\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 static fromJSON(value: any): HacknetNode {\n return Generic_fromJSON(HacknetNode, value.data);\n }\n}\n\nReviver.constructors.HacknetNode = HacknetNode;\n","/**\n * Implements functions for purchasing servers or purchasing more RAM for\n * the home computer\n */\nimport { AddToAllServers, createUniqueRandomIp } from \"./AllServers\";\nimport { safetlyCreateUniqueServer } from \"./ServerHelpers\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isPowerOfTwo } from \"../utils/helpers/isPowerOfTwo\";\n\n// Returns the cost of purchasing a server with the given RAM\n// Returns Infinity for invalid 'ram' arguments\n/**\n * @param ram Amount of RAM on purchased server (GB)\n * @returns Cost of purchasing the given server. Returns infinity for invalid arguments\n */\nexport function getPurchaseServerCost(ram: number): number {\n const sanitizedRam = Math.round(ram);\n if (isNaN(sanitizedRam) || !isPowerOfTwo(sanitizedRam) || !(Math.sign(sanitizedRam) === 1)) {\n return Infinity;\n }\n\n if (sanitizedRam > getPurchaseServerMaxRam()) {\n return Infinity;\n }\n\n const upg = Math.max(0, Math.log(sanitizedRam) / Math.log(2) - 6);\n\n return (\n sanitizedRam *\n CONSTANTS.BaseCostFor1GBOfRamServer *\n BitNodeMultipliers.PurchasedServerCost *\n Math.pow(BitNodeMultipliers.PurchasedServerSoftcap, upg)\n );\n}\n\nexport function getPurchaseServerLimit(): number {\n return Math.round(CONSTANTS.PurchasedServerLimit * BitNodeMultipliers.PurchasedServerLimit);\n}\n\nexport function getPurchaseServerMaxRam(): number {\n const ram = Math.round(CONSTANTS.PurchasedServerMaxRam * BitNodeMultipliers.PurchasedServerMaxRam);\n\n // Round this to the nearest power of 2\n return 1 << (31 - Math.clz32(ram));\n}\n\n// Manually purchase a server (NOT through Netscript)\nexport function purchaseServer(hostname: string, ram: number, cost: number, p: IPlayer): void {\n //Check if player has enough money\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You don't have enough money to purchase this server!\");\n return;\n }\n\n //Maximum server limit\n if (p.purchasedServers.length >= getPurchaseServerLimit()) {\n dialogBoxCreate(\n \"You have reached the maximum limit of \" +\n getPurchaseServerLimit() +\n \" servers. \" +\n \"You cannot purchase any more. You can \" +\n \"delete some of your purchased servers using the deleteServer() Netscript function in a script\",\n );\n return;\n }\n\n if (hostname == \"\") {\n dialogBoxCreate(\"You must enter a hostname for your new server!\");\n return;\n }\n\n // Create server\n const newServ = safetlyCreateUniqueServer({\n adminRights: true,\n hostname: hostname,\n ip: createUniqueRandomIp(),\n isConnectedTo: false,\n maxRam: ram,\n organizationName: \"\",\n purchasedByPlayer: true,\n });\n AddToAllServers(newServ);\n\n // Add to Player's purchasedServers array\n p.purchasedServers.push(newServ.hostname);\n\n // Connect new server to home computer\n const homeComputer = p.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n\n p.loseMoney(cost, \"servers\");\n\n dialogBoxCreate(\"Server successfully purchased with hostname \" + newServ.hostname);\n}\n\n// Manually upgrade RAM on home computer (NOT through Netscript)\nexport function purchaseRamForHomeComputer(p: IPlayer): void {\n const cost = p.getUpgradeHomeRamCost();\n if (!p.canAfford(cost)) {\n dialogBoxCreate(\"You do not have enough money to purchase additional RAM for your home computer\");\n return;\n }\n\n const homeComputer = p.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n dialogBoxCreate(`You cannot upgrade your home computer RAM because it is at its maximum possible value`);\n return;\n }\n\n homeComputer.maxRam *= 2;\n p.loseMoney(cost, \"servers\");\n}\n","import { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./utils/JSONReviver\";\nimport { removeLeadingSlash, isInRootDirectory } from \"./Terminal/DirectoryHelpers\"\n\n/**\n * Represents a plain text file that is typically stored on a server.\n */\nexport class TextFile {\n /**\n * The full file name.\n */\n fn: string;\n\n /**\n * The content of the file.\n */\n text: string;\n\n /**\n * The full file name.\n */\n get filename(): string {\n return this.fn;\n }\n\n /**\n * The full file name.\n */\n set filename(value: string) {\n this.fn = value;\n }\n\n constructor(fn = \"\", txt = \"\") {\n this.fn = (fn.endsWith(\".txt\") ? fn : `${fn}.txt`).replace(/\\s+/g, \"\");\n this.text = txt;\n }\n\n /**\n * Concatenates the raw values to the end of current content.\n */\n append(txt: string): void {\n this.text += txt;\n }\n\n /**\n * Serves the file to the user as a downloadable resource through the browser.\n */\n download(): void {\n const filename: string = this.fn;\n const file: Blob = new Blob([this.text], { type: \"text/plain\" });\n /* tslint:disable-next-line:strict-boolean-expressions */\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n navigator.msSaveOrOpenBlob(file, filename);\n } else {\n // Others\n const a: HTMLAnchorElement = document.createElement(\"a\");\n const url: string = URL.createObjectURL(file);\n a.href = url;\n a.download = this.fn;\n document.body.appendChild(a);\n a.click();\n setTimeout(() => {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\n }\n\n /**\n * Retrieve the content of the file.\n */\n read(): string {\n return this.text;\n }\n\n /**\n * Shows the content to the user via the game's dialog box.\n */\n show(): void {\n dialogBoxCreate(`${this.fn}

    ${this.text}`);\n }\n\n /**\n * Serialize the current file to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"TextFile\", this);\n }\n\n /**\n * Replaces the current content with the text provided.\n */\n write(txt: string): void {\n this.text = txt;\n }\n\n /**\n * Initiatizes a TextFile from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): TextFile {\n return Generic_fromJSON(TextFile, value.data);\n }\n}\n\nReviver.constructors.TextFile = TextFile;\n\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 */\nexport function getTextFile(fn: string, server: BaseServer): TextFile | null {\n let filename: string = !fn.endsWith(\".txt\") ? `${fn}.txt` : fn;\n\n if (isInRootDirectory(filename)) {\n filename = removeLeadingSlash(filename);\n }\n\n for (const file of server.textFiles as TextFile[]) {\n if (file.fn === filename) {\n return file;\n }\n }\n\n return null;\n}\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 */\nexport function createTextFile(fn: string, txt: string, server: BaseServer): TextFile | undefined {\n if (getTextFile(fn, server) !== null) {\n // This should probably be a `throw`...\n /* tslint:disable-next-line:no-console */\n console.error(`A file named \"${fn}\" already exists on server ${server.hostname}.`);\n\n return undefined;\n }\n const file: TextFile = new TextFile(fn, txt);\n server.textFiles.push(file);\n\n return file;\n}\n","import { Skill } from \"./Skill\";\nimport { SkillNames } from \"./data/SkillNames\";\nimport { IMap } from \"../types\";\n\nexport const Skills: IMap = {};\n\n(function () {\n Skills[SkillNames.BladesIntuition] = new Skill({\n name: SkillNames.BladesIntuition,\n desc:\n \"Each level of this skill increases your success chance for all Contracts, Operations, and BlackOps by 3%\",\n baseCost: 3,\n costInc: 2.1,\n successChanceAll: 3,\n });\n Skills[SkillNames.Cloak] = new Skill({\n name: SkillNames.Cloak,\n desc:\n \"Each level of this skill increases your \" +\n \"success chance in stealth-related Contracts, Operations, and BlackOps by 5.5%\",\n baseCost: 2,\n costInc: 1.1,\n successChanceStealth: 5.5,\n });\n Skills[SkillNames.ShortCircuit] = new Skill({\n name: SkillNames.ShortCircuit,\n desc:\n \"Each level of this skill increases your success chance \" +\n \"in Contracts, Operations, and BlackOps that involve retirement by 5.5%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceKill: 5.5,\n });\n Skills[SkillNames.DigitalObserver] = new Skill({\n name: SkillNames.DigitalObserver,\n desc: \"Each level of this skill increases your success chance in all Operations and BlackOps by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceOperation: 4,\n });\n Skills[SkillNames.Tracer] = new Skill({\n name: SkillNames.Tracer,\n desc: \"Each level of this skill increases your success chance in all Contracts by 4%\",\n baseCost: 2,\n costInc: 2.1,\n successChanceContract: 4,\n });\n Skills[SkillNames.Overclock] = new Skill({\n name: SkillNames.Overclock,\n desc:\n \"Each level of this skill decreases the time it takes \" +\n \"to attempt a Contract, Operation, and BlackOp by 1% (Max Level: 90)\",\n baseCost: 3,\n costInc: 1.4,\n maxLvl: 90,\n actionTime: 1,\n });\n Skills[SkillNames.Reaper] = new Skill({\n name: SkillNames.Reaper,\n desc: \"Each level of this skill increases your effective combat stats for Bladeburner actions by 2%\",\n baseCost: 2,\n costInc: 2.1,\n effStr: 2,\n effDef: 2,\n effDex: 2,\n effAgi: 2,\n });\n Skills[SkillNames.EvasiveSystem] = new Skill({\n name: SkillNames.EvasiveSystem,\n desc: \"Each level of this skill increases your effective dexterity and agility for Bladeburner actions by 4%\",\n baseCost: 2,\n costInc: 2.1,\n effDex: 4,\n effAgi: 4,\n });\n Skills[SkillNames.Datamancer] = new Skill({\n name: SkillNames.Datamancer,\n desc:\n \"Each level of this skill increases your effectiveness in \" +\n \"synthoid population analysis and investigation by 5%. \" +\n \"This affects all actions that can potentially increase \" +\n \"the accuracy of your synthoid population/community estimates.\",\n baseCost: 3,\n costInc: 1,\n successChanceEstimate: 5,\n });\n Skills[SkillNames.CybersEdge] = new Skill({\n name: SkillNames.CybersEdge,\n desc: \"Each level of this skill increases your max stamina by 2%\",\n baseCost: 1,\n costInc: 3,\n stamina: 2,\n });\n Skills[SkillNames.HandsOfMidas] = new Skill({\n name: SkillNames.HandsOfMidas,\n desc: \"Each level of this skill increases the amount of money you receive from Contracts by 10%\",\n baseCost: 2,\n costInc: 2.5,\n money: 10,\n });\n Skills[SkillNames.Hyperdrive] = new Skill({\n name: SkillNames.Hyperdrive,\n desc: \"Each level of this skill increases the experience earned from Contracts, Operations, and BlackOps by 10%\",\n baseCost: 1,\n costInc: 2.5,\n expGain: 10,\n });\n})();\n","import { gangMemberUpgradesMetadata } from \"./data/upgrades\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\n\nexport const GangMemberUpgrades: {\n [key: string]: GangMemberUpgrade;\n} = {};\n\n(function () {\n gangMemberUpgradesMetadata.forEach((e) => {\n GangMemberUpgrades[e.name] = new GangMemberUpgrade(e.name, e.cost, e.upgType, e.mults);\n });\n})();\n","/**\n * Stock Market Helper Functions\n */\nimport { Stock } from \"./Stock\";\nimport { PositionTypes } from \"./data/PositionTypes\";\nimport { CONSTANTS } from \"../Constants\";\n\n// Amount by which a stock's forecast changes during each price movement\nexport const forecastChangePerPriceMovement = 0.006;\n\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 */\nexport function getBuyTransactionCost(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\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 shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n\n // If the number of shares doesn't trigger a price movement, its a simple calculation\n if (isLong) {\n return shares * stock.getAskPrice() + CONSTANTS.StockMarketCommission;\n } else {\n return shares * stock.getBidPrice() + CONSTANTS.StockMarketCommission;\n }\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 */\nexport function getSellTransactionGain(stock: Stock, shares: number, posType: PositionTypes): number | null {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return null;\n }\n\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 shares = Math.min(shares, stock.maxShares);\n\n const isLong = posType === PositionTypes.Long;\n if (isLong) {\n return shares * stock.getBidPrice() - CONSTANTS.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.StockMarketCommission;\n\n return origCost + profit;\n }\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 */\nexport function processTransactionForecastMovement(stock: Stock, shares: number): void {\n if (isNaN(shares) || shares <= 0 || !(stock instanceof Stock)) {\n return;\n }\n\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 shares = Math.min(shares, stock.maxShares);\n\n // If there's only going to be one iteration at most\n const firstShares = stock.shareTxUntilMovement;\n if (shares <= firstShares) {\n stock.shareTxUntilMovement -= shares;\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 }\n\n // Calculate how many iterations of price changes we need to account for\n const remainingShares = shares - firstShares;\n let numIterations = 1 + Math.ceil(remainingShares / stock.shareTxForMovement);\n\n // If on the offchance we end up perfectly at the next price movement\n stock.shareTxUntilMovement =\n stock.shareTxForMovement - ((shares - stock.shareTxUntilMovement) % stock.shareTxForMovement);\n if (stock.shareTxUntilMovement === stock.shareTxForMovement || stock.shareTxUntilMovement <= 0) {\n ++numIterations;\n stock.shareTxUntilMovement = stock.shareTxForMovement;\n }\n\n // Forecast always decreases in magnitude\n const forecastChange = forecastChangePerPriceMovement * (numIterations - 1);\n const forecastForecastChange = forecastChange * (stock.mv / 100);\n stock.influenceForecast(forecastChange);\n stock.influenceForecastForecast(forecastForecastChange);\n}\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 */\nexport function calculateBuyMaxAmount(stock: Stock, posType: PositionTypes, money: number): number {\n if (!(stock instanceof Stock)) {\n return 0;\n }\n\n const isLong = posType === PositionTypes.Long;\n\n const remainingMoney = money - CONSTANTS.StockMarketCommission;\n const currPrice = isLong ? stock.getAskPrice() : stock.getBidPrice();\n\n return Math.floor(remainingMoney / currPrice);\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CONSTANTS } from \"../Constants\";\n\nexport function getStockMarket4SDataCost(): number {\n return CONSTANTS.MarketData4SCost * BitNodeMultipliers.FourSigmaMarketDataCost;\n}\n\nexport function getStockMarket4STixApiCost(): number {\n return CONSTANTS.MarketDataTixApi4SCost * BitNodeMultipliers.FourSigmaMarketDataApiCost;\n}\n\nexport function getStockMarketWseCost(): number {\n return CONSTANTS.WSEAccountCost;\n}\n\nexport function getStockMarketTixApiCost(): number {\n return CONSTANTS.TIXAPICost;\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { Player } from \"../Player\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { RunningScript } from \"./RunningScript\";\nimport { processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\n\nexport function scriptCalculateOfflineProduction(runningScript: RunningScript): void {\n //The Player object stores the last update time from when we were online\n const thisUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timePassed = (thisUpdate - lastUpdate) / 1000; //Seconds\n\n //Calculate the \"confidence\" rating of the script's true production. This is based\n //entirely off of time. We will arbitrarily say that if a script has been running for\n //4 hours (14400 sec) then we are completely confident in its ability\n let confidence = runningScript.onlineRunningTime / 14400;\n if (confidence >= 1) {\n confidence = 1;\n }\n\n //Data map: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n\n // Grow\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][2] == 0 || runningScript.dataMap[hostname][2] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n const timesGrown = Math.round(\n ((0.5 * runningScript.dataMap[hostname][2]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called on ${serv.hostname} ${timesGrown} times while offline`);\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n if (!(serv instanceof Server)) throw new Error(\"trying to grow a non-normal server\");\n const growth = processSingleServerGrowth(serv, timesGrown, Player, host.cpuCores);\n runningScript.log(\n `'${serv.hostname}' grown by ${numeralWrapper.format(growth * 100 - 100, \"0.000000%\")} while offline`,\n );\n }\n }\n\n // Offline EXP gain\n // A script's offline production will always be at most half of its online production.\n const expGain = confidence * (runningScript.onlineExpGained / runningScript.onlineRunningTime) * timePassed;\n Player.gainHackingExp(expGain);\n\n // Update script stats\n runningScript.offlineRunningTime += timePassed;\n runningScript.offlineExpGained += expGain;\n\n // Weaken\n for (const hostname of Object.keys(runningScript.dataMap)) {\n if (runningScript.dataMap.hasOwnProperty(hostname)) {\n if (runningScript.dataMap[hostname][3] == 0 || runningScript.dataMap[hostname][3] == null) {\n continue;\n }\n const serv = GetServer(hostname);\n if (serv == null) {\n continue;\n }\n\n if (!(serv instanceof Server)) throw new Error(\"trying to weaken a non-normal server\");\n const host = GetServer(runningScript.server);\n if (host === null) throw new Error(\"getServer of null key?\");\n const timesWeakened = Math.round(\n ((0.5 * runningScript.dataMap[hostname][3]) / runningScript.onlineRunningTime) * timePassed,\n );\n runningScript.log(`Called weaken() on ${serv.hostname} ${timesWeakened} times while offline`);\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n serv.weaken(CONSTANTS.ServerWeakenAmount * timesWeakened * coreBonus);\n }\n }\n}\n\n//Returns a RunningScript object matching the filename and arguments on the\n//designated server, and false otherwise\nexport function findRunningScript(\n filename: string,\n args: (string | number | boolean)[],\n server: BaseServer,\n): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === filename && compareArrays(server.runningScripts[i].args, args)) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n\n//Returns a RunningScript object matching the pid on the\n//designated server, and false otherwise\nexport function findRunningScriptByPid(pid: number, server: BaseServer): RunningScript | null {\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].pid === pid) {\n return server.runningScripts[i];\n }\n }\n return null;\n}\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n money: {\n color: theme.colors.money,\n },\n }),\n);\n\nexport function Hashes({ hashes }: { hashes: number | string }): React.ReactElement {\n const classes = useStyles();\n return (\n {typeof hashes === \"number\" ? numeralWrapper.formatHashes(hashes) : hashes}\n );\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IActionIdentifier } from \"./IActionIdentifier\";\nimport { ActionIdentifier } from \"./ActionIdentifier\";\nimport { ActionTypes } from \"./data/ActionTypes\";\nimport { Growths } from \"./data/Growths\";\nimport { BlackOperations } from \"./BlackOperations\";\nimport { BlackOperation } from \"./BlackOperation\";\nimport { Operation } from \"./Operation\";\nimport { Contract } from \"./Contract\";\nimport { GeneralActions } from \"./GeneralActions\";\nimport { formatNumber } from \"../utils/StringHelperFunctions\";\nimport { Skills } from \"./Skills\";\nimport { Skill } from \"./Skill\";\nimport { City } from \"./City\";\nimport { IAction } from \"./IAction\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter, Page } from \"../ui/Router\";\nimport { ConsoleHelpText } from \"./data/Help\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { calculateHospitalizationCost } from \"../Hospital/Hospital\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { getTimestamp } from \"../utils/helpers/getTimestamp\";\nimport { joinFaction } from \"../Faction/FactionHelpers\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { BlackOperationNames } from \"./data/BlackOperationNames\";\nimport { KEY } from \"../utils/helpers/keyCodes\";\n\ninterface BlackOpsAttempt {\n error?: string;\n isAvailable?: boolean;\n action?: BlackOperation;\n}\n\nexport class Bladeburner implements IBladeburner {\n numHosp = 0;\n moneyLost = 0;\n rank = 0;\n maxRank = 0;\n\n skillPoints = 0;\n totalSkillPoints = 0;\n\n teamSize = 0;\n teamLost = 0;\n hpLost = 0;\n\n storedCycles = 0;\n\n randomEventCounter: number = getRandomInt(240, 600);\n\n actionTimeToComplete = 0;\n actionTimeCurrent = 0;\n actionTimeOverflow = 0;\n\n action: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n\n cities: any = {};\n city: string = BladeburnerConstants.CityNames[2];\n skills: any = {};\n skillMultipliers: any = {};\n staminaBonus = 0;\n maxStamina = 0;\n stamina = 0;\n contracts: any = {};\n operations: any = {};\n blackops: any = {};\n logging: any = {\n general: true,\n contracts: true,\n ops: true,\n blackops: true,\n events: true,\n };\n automateEnabled = false;\n automateActionHigh: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshHigh = 0;\n automateActionLow: IActionIdentifier = new ActionIdentifier({\n type: ActionTypes[\"Idle\"],\n });\n automateThreshLow = 0;\n consoleHistory: string[] = [];\n consoleLogs: string[] = [\"Bladeburner Console\", \"Type 'help' to see console commands\"];\n\n constructor(player?: IPlayer) {\n for (let i = 0; i < BladeburnerConstants.CityNames.length; ++i) {\n this.cities[BladeburnerConstants.CityNames[i]] = new City(BladeburnerConstants.CityNames[i]);\n }\n\n this.updateSkillMultipliers(); // Calls resetSkillMultipliers()\n\n // Max Stamina is based on stats and Bladeburner-specific bonuses\n if (player) this.calculateMaxStamina(player);\n this.stamina = this.maxStamina;\n this.create();\n }\n\n getCurrentCity(): City {\n const city = this.cities[this.city];\n if (!(city instanceof City)) {\n throw new Error(\"Bladeburner.getCurrentCity() did not properly return a City object\");\n }\n return city;\n }\n\n calculateStaminaPenalty(): number {\n return Math.min(1, this.stamina / (0.5 * this.maxStamina));\n }\n\n canAttemptBlackOp(actionId: IActionIdentifier): BlackOpsAttempt {\n // Safety measure - don't repeat BlackOps that are already done\n if (this.blackops[actionId.name] != null) {\n return { error: \"Tried to start a Black Operation that had already been completed\" };\n }\n\n const action = this.getActionObject(actionId);\n if (!(action instanceof BlackOperation)) throw new Error(`Action should be BlackOperation but isn't`);\n if (action == null) throw new Error(\"Failed to get BlackOperation object for: \" + actionId.name);\n\n if (action.reqdRank > this.rank) {\n return { error: \"Tried to start a Black Operation without the rank requirement\" };\n }\n\n // Can't start a BlackOp if you haven't done the one before it\n const blackops = [];\n for (const nm of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(nm)) {\n blackops.push(nm);\n }\n }\n blackops.sort(function (a, b) {\n return BlackOperations[a].reqdRank - BlackOperations[b].reqdRank; // Sort black ops in intended order\n });\n\n const i = blackops.indexOf(actionId.name);\n if (i === -1) {\n return { error: `Invalid Black Op: '${name}'` };\n }\n\n if (i > 0 && this.blackops[blackops[i - 1]] == null) {\n return { error: `Preceding Black Op must be completed before starting '${actionId.name}'.` };\n }\n\n return { isAvailable: true, action };\n }\n\n startAction(player: IPlayer, actionId: IActionIdentifier): void {\n if (actionId == null) return;\n this.action = actionId;\n this.actionTimeCurrent = 0;\n switch (actionId.type) {\n case ActionTypes[\"Idle\"]:\n this.actionTimeToComplete = 0;\n break;\n case ActionTypes[\"Contract\"]:\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Contract Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n case ActionTypes[\"Operation\"]: {\n try {\n const action = this.getActionObject(actionId);\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + actionId.name);\n }\n if (action.count < 1) {\n return this.resetAction();\n }\n if (actionId.name === \"Raid\" && this.getCurrentCity().comms === 0) {\n return this.resetAction();\n }\n this.actionTimeToComplete = action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const testBlackOp = this.canAttemptBlackOp(actionId);\n if (!testBlackOp.isAvailable) {\n this.resetAction();\n this.log(`Error: ${testBlackOp.error}`);\n break;\n }\n if (testBlackOp.action === undefined) {\n throw new Error(\"action should not be null\");\n }\n this.actionTimeToComplete = testBlackOp.action.getActionTime(this);\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Recruitment\"]:\n this.actionTimeToComplete = this.getRecruitmentTime(player);\n break;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]:\n this.actionTimeToComplete = 30;\n break;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n this.actionTimeToComplete = 60;\n break;\n default:\n throw new Error(\"Invalid Action Type in startAction(Bladeburner,player, ): \" + actionId.type);\n }\n }\n\n upgradeSkill(skill: Skill): void {\n // This does NOT handle deduction of skill points\n const skillName = skill.name;\n if (this.skills[skillName]) {\n ++this.skills[skillName];\n } else {\n this.skills[skillName] = 1;\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 this.updateSkillMultipliers();\n }\n\n executeConsoleCommands(player: IPlayer, commands: string): void {\n try {\n // Console History\n if (this.consoleHistory[this.consoleHistory.length - 1] != commands) {\n this.consoleHistory.push(commands);\n if (this.consoleHistory.length > 50) {\n this.consoleHistory.splice(0, 1);\n }\n }\n\n const arrayOfCommands = commands.split(\";\");\n for (let i = 0; i < arrayOfCommands.length; ++i) {\n this.executeConsoleCommand(player, arrayOfCommands[i]);\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n postToConsole(input: string, saveToLogs = true): void {\n const MaxConsoleEntries = 100;\n if (saveToLogs) {\n this.consoleLogs.push(input);\n if (this.consoleLogs.length > MaxConsoleEntries) {\n this.consoleLogs.shift();\n }\n }\n }\n\n log(input: string): void {\n // Adds a timestamp and then just calls postToConsole\n this.postToConsole(`[${getTimestamp()}] ${input}`);\n }\n\n resetAction(): void {\n this.action = new ActionIdentifier({ type: ActionTypes.Idle });\n }\n\n clearConsole(): void {\n this.consoleLogs.length = 0;\n }\n\n prestige(): void {\n this.resetAction();\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n }\n }\n\n storeCycles(numCycles = 0): void {\n this.storedCycles += numCycles;\n }\n\n // working on\n getActionIdFromTypeAndName(type = \"\", name = \"\"): IActionIdentifier | null {\n if (type === \"\" || name === \"\") {\n return null;\n }\n const action = new ActionIdentifier();\n const convertedType = type.toLowerCase().trim();\n const convertedName = name.toLowerCase().trim();\n switch (convertedType) {\n case \"contract\":\n case \"contracts\":\n case \"contr\":\n action.type = ActionTypes[\"Contract\"];\n if (this.contracts.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"operation\":\n case \"operations\":\n case \"op\":\n case \"ops\":\n action.type = ActionTypes[\"Operation\"];\n if (this.operations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\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 = ActionTypes[\"BlackOp\"];\n if (BlackOperations.hasOwnProperty(name)) {\n action.name = name;\n return action;\n }\n return null;\n case \"general\":\n case \"general action\":\n case \"gen\":\n break;\n default:\n return null;\n }\n\n if (convertedType.startsWith(\"gen\")) {\n switch (convertedName) {\n case \"training\":\n action.type = ActionTypes[\"Training\"];\n action.name = \"Training\";\n break;\n case \"recruitment\":\n case \"recruit\":\n action.type = ActionTypes[\"Recruitment\"];\n action.name = \"Recruitment\";\n break;\n case \"field analysis\":\n case \"fieldanalysis\":\n action.type = ActionTypes[\"Field Analysis\"];\n action.name = \"Field Analysis\";\n break;\n case \"diplomacy\":\n action.type = ActionTypes[\"Diplomacy\"];\n action.name = \"Diplomacy\";\n break;\n case \"hyperbolic regeneration chamber\":\n action.type = ActionTypes[\"Hyperbolic Regeneration Chamber\"];\n action.name = \"Hyperbolic Regeneration Chamber\";\n break;\n case \"incite violence\":\n action.type = ActionTypes[\"Incite Violence\"];\n action.name = \"Incite Violence\";\n break;\n default:\n return null;\n }\n return action;\n }\n\n return null;\n }\n\n executeStartConsoleCommand(player: IPlayer, args: string[]): void {\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 const name = args[2];\n switch (args[1].toLowerCase()) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[name] != null) {\n this.action.type = ActionTypes[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 break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[name] != null) {\n this.action.type = ActionTypes.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 break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[name] != null) {\n this.action.type = ActionTypes.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 break;\n case \"blackops\":\n case \"blackop\":\n case \"black operations\":\n case \"black operation\":\n if (BlackOperations[name] != null) {\n this.action.type = ActionTypes.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 break;\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: string[]): void {\n switch (args.length) {\n case 1: {\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 case 2: {\n if (args[1].toLowerCase() === \"list\") {\n // List all skills and their level\n this.postToConsole(\"Skills: \");\n const skillNames = Object.keys(Skills);\n for (let i = 0; i < skillNames.length; ++i) {\n const skill = Skills[skillNames[i]];\n let level = 0;\n if (this.skills[skill.name] != null) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level, 0));\n }\n this.postToConsole(\" \");\n this.postToConsole(\"Effects: \");\n const multKeys = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multKeys.length; ++i) {\n let mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch (multKeys[i]) {\n case \"successChanceAll\":\n this.postToConsole(\"Total Success Chance: x\" + mult);\n break;\n case \"successChanceStealth\":\n this.postToConsole(\"Stealth Success Chance: x\" + mult);\n break;\n case \"successChanceKill\":\n this.postToConsole(\"Retirement Success Chance: x\" + mult);\n break;\n case \"successChanceContract\":\n this.postToConsole(\"Contract Success Chance: x\" + mult);\n break;\n case \"successChanceOperation\":\n this.postToConsole(\"Operation Success Chance: x\" + mult);\n break;\n case \"successChanceEstimate\":\n this.postToConsole(\"Synthoid Data Estimate: x\" + mult);\n break;\n case \"actionTime\":\n this.postToConsole(\"Action Time: x\" + mult);\n break;\n case \"effHack\":\n this.postToConsole(\"Hacking Skill: x\" + mult);\n break;\n case \"effStr\":\n this.postToConsole(\"Strength: x\" + mult);\n break;\n case \"effDef\":\n this.postToConsole(\"Defense: x\" + mult);\n break;\n case \"effDex\":\n this.postToConsole(\"Dexterity: x\" + mult);\n break;\n case \"effAgi\":\n this.postToConsole(\"Agility: x\" + mult);\n break;\n case \"effCha\":\n this.postToConsole(\"Charisma: x\" + mult);\n break;\n case \"effInt\":\n this.postToConsole(\"Intelligence: x\" + mult);\n break;\n case \"stamina\":\n this.postToConsole(\"Stamina: x\" + mult);\n break;\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 break;\n }\n case 3: {\n const skillName = args[2];\n const skill = Skills[skillName];\n if (skill == null || !(skill instanceof Skill)) {\n this.postToConsole(\"Invalid skill name (Note that it is case-sensitive): \" + skillName);\n break;\n }\n if (args[1].toLowerCase() === \"list\") {\n let level = 0;\n if (this.skills[skill.name] !== undefined) {\n level = this.skills[skill.name];\n }\n this.postToConsole(skill.name + \": Level \" + formatNumber(level));\n } else if (args[1].toLowerCase() === \"level\") {\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\n }\n const pointCost = skill.calculateCost(currentLevel);\n if (skill.maxLvl !== 0 && currentLevel >= skill.maxLvl) {\n this.postToConsole(`This skill ${skill.name} is already at max level (${currentLevel}/${skill.maxLvl}).`);\n } else 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(\n \"You do not have enough Skill Points to upgrade this. You need \" + formatNumber(pointCost, 0),\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 break;\n }\n default: {\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: string[]): void {\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 if (args[1].toLowerCase().includes(\"d\")) {\n flag = false;\n } // d for disable\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 case \"contract\":\n case \"contracts\":\n this.logging.contracts = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for Contracts\");\n break;\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 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 case \"event\":\n case \"events\":\n this.logging.events = flag;\n this.log(\"Logging \" + (flag ? \"enabled\" : \"disabled\") + \" for events\");\n break;\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 default:\n this.postToConsole(\"Invalid action/event type specified: \" + args[2]);\n this.postToConsole(\n \"Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]\",\n );\n break;\n }\n }\n\n executeHelpConsoleCommand(args: string[]): void {\n if (args.length === 1) {\n for (const line of ConsoleHelpText.helpList) {\n this.postToConsole(line);\n }\n } else {\n for (let i = 1; i < args.length; ++i) {\n if (!(args[i] in ConsoleHelpText)) continue;\n const helpText = ConsoleHelpText[args[i]];\n for (const line of helpText) {\n this.postToConsole(line);\n }\n }\n }\n }\n\n executeAutomateConsoleCommand(args: string[]): void {\n if (args.length !== 2 && args.length !== 4) {\n this.postToConsole(\n \"Invalid use of 'automate' command: automate [var] [val] [hi/low]. Use 'help automate' for more info\",\n );\n return;\n }\n\n // Enable/Disable\n if (args.length === 2) {\n const flag = args[1];\n if (flag.toLowerCase() === \"status\") {\n this.postToConsole(\"Automation: \" + (this.automateEnabled ? \"enabled\" : \"disabled\"));\n this.postToConsole(\n \"When your stamina drops to \" +\n formatNumber(this.automateThreshLow, 0) +\n \", you will automatically switch to \" +\n this.automateActionLow.name +\n \". When your stamina recovers to \" +\n formatNumber(this.automateThreshHigh, 0) +\n \", you will automatically \" +\n \"switch to \" +\n this.automateActionHigh.name +\n \".\",\n );\n } else if (flag.toLowerCase().includes(\"en\")) {\n if (\n !(this.automateActionLow instanceof ActionIdentifier) ||\n !(this.automateActionHigh instanceof ActionIdentifier)\n ) {\n return this.log(\"Failed to enable automation. Actions were not set\");\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 return;\n }\n\n // Set variables\n if (args.length === 4) {\n const variable = args[1];\n const val = args[2];\n\n let highLow = false; // True for high, false for low\n if (args[3].toLowerCase().includes(\"hi\")) {\n highLow = true;\n }\n\n switch (variable) {\n case \"general\":\n case \"gen\":\n if (GeneralActions[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes[val],\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid action name specified: \" + val);\n }\n break;\n case \"contract\":\n case \"contracts\":\n if (this.contracts[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Contract,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid contract name specified: \" + val);\n }\n break;\n case \"ops\":\n case \"op\":\n case \"operations\":\n case \"operation\":\n if (this.operations[val] != null) {\n const action = new ActionIdentifier({\n type: ActionTypes.Operation,\n name: val,\n });\n if (highLow) {\n this.automateActionHigh = action;\n } else {\n this.automateActionLow = action;\n }\n this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") action set to \" + val);\n } else {\n this.postToConsole(\"Invalid Operation name specified: \" + val);\n }\n break;\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 this.log(\"Automate (\" + (highLow ? \"HIGH\" : \"LOW\") + \") stamina threshold set to \" + val);\n }\n break;\n default:\n break;\n }\n\n return;\n }\n }\n\n parseCommandArguments(command: string): string[] {\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 while (i < command.length) {\n const c = command.charAt(i);\n if (c === '\"') {\n // Double quotes\n const endQuote = command.indexOf('\"', i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === \"'\") {\n // Single quotes, same thing as above\n const endQuote = command.indexOf(\"'\", i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (c === KEY.SPACE) {\n args.push(command.substr(start, i - start));\n start = i + 1;\n }\n ++i;\n }\n if (start !== i) {\n args.push(command.substr(start, i - start));\n }\n return args;\n }\n\n executeConsoleCommand(player: IPlayer, command: string): void {\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 case \"clear\":\n case \"cls\":\n this.clearConsole();\n break;\n case \"help\":\n this.executeHelpConsoleCommand(args);\n break;\n case \"log\":\n this.executeLogConsoleCommand(args);\n break;\n case \"skill\":\n this.executeSkillConsoleCommand(args);\n break;\n case \"start\":\n this.executeStartConsoleCommand(player, args);\n break;\n case \"stop\":\n this.resetAction();\n break;\n default:\n this.postToConsole(\"Invalid console command\");\n break;\n }\n }\n\n triggerMigration(sourceCityName: string): void {\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n const sourceCity = this.cities[sourceCityName];\n if (destCity == null || sourceCity == null) {\n throw new Error(\"Failed to find City with name: \" + destCityName);\n }\n const rand = Math.random();\n let percentage = getRandomInt(3, 15) / 100;\n\n if (rand < 0.05 && sourceCity.comms > 0) {\n // 5% chance for community migration\n percentage *= getRandomInt(2, 4); // Migration increases population change\n --sourceCity.comms;\n ++destCity.comms;\n }\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n destCity.pop += count;\n }\n\n triggerPotentialMigration(sourceCityName: string, chance: number): void {\n if (chance == null || isNaN(chance)) {\n console.error(\"Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()\");\n }\n if (chance > 1) {\n chance /= 100;\n }\n if (Math.random() < chance) {\n this.triggerMigration(sourceCityName);\n }\n }\n\n randomEvent(): void {\n const chance = Math.random();\n\n // Choose random source/destination city for events\n const sourceCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n const sourceCity = this.cities[sourceCityName];\n if (!(sourceCity instanceof City)) {\n throw new Error(\"sourceCity was not a City object in Bladeburner.randomEvent()\");\n }\n\n let destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n while (destCityName === sourceCityName) {\n destCityName = BladeburnerConstants.CityNames[getRandomInt(0, 5)];\n }\n const destCity = this.cities[destCityName];\n\n if (!(sourceCity instanceof City) || !(destCity instanceof City)) {\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 = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\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 = getRandomInt(10, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\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;\n\n // Change pop\n const percentage = getRandomInt(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(\n \"Intelligence indicates that a Synthoid community migrated from \" + sourceCityName + \" to some other city\",\n );\n }\n }\n } else if (chance <= 0.3) {\n // New Synthoids (non community), 20%\n const percentage = getRandomInt(8, 24) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop += count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\n } else if (chance <= 0.5) {\n // Synthoid migration (non community) 20%\n this.triggerMigration(sourceCityName);\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that a large number of Synthoids migrated from \" +\n sourceCityName +\n \" to some other city\",\n );\n }\n } else if (chance <= 0.7) {\n // Synthoid Riots (+chaos), 20%\n sourceCity.chaos += 1;\n sourceCity.chaos *= 1 + getRandomInt(5, 20) / 100;\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 = getRandomInt(8, 20) / 100;\n const count = Math.round(sourceCity.pop * percentage);\n sourceCity.pop -= count;\n if (this.logging.events) {\n this.log(\n \"Intelligence indicates that the Synthoid population of \" + sourceCityName + \" just changed significantly\",\n );\n }\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 gainActionStats(player: IPlayer, action: IAction, success: boolean): void {\n const difficulty = action.getDifficulty();\n\n /**\n * Gain multiplier based on difficulty. If it changes then the\n * same variable calculated in completeAction() needs to change too\n */\n const difficultyMult =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n const time = this.actionTimeToComplete;\n const successMult = success ? 1 : 0.5;\n\n const unweightedGain = time * BladeburnerConstants.BaseStatGain * successMult * difficultyMult;\n const unweightedIntGain = time * BladeburnerConstants.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 player.gainIntelligenceExp(unweightedIntGain * action.weights.int * skillMult);\n }\n\n getDiplomacyEffectiveness(player: IPlayer): number {\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\n const charismaEff = Math.pow(player.charisma, CharismaExponentialFactor) + player.charisma / CharismaLinearFactor;\n return (100 - charismaEff) / 100;\n }\n\n getRecruitmentSuccessChance(player: IPlayer): number {\n return Math.pow(player.charisma, 0.45) / (this.teamSize + 1);\n }\n\n getRecruitmentTime(player: IPlayer): number {\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(BladeburnerConstants.BaseRecruitmentTimeNeeded - charismaFactor));\n }\n\n resetSkillMultipliers(): void {\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(): void {\n this.resetSkillMultipliers();\n for (const skillName of Object.keys(this.skills)) {\n if (this.skills.hasOwnProperty(skillName)) {\n const skill = Skills[skillName];\n if (skill == null) {\n throw new Error(\"Could not find Skill Object for: \" + skillName);\n }\n const level = this.skills[skillName];\n if (level == null || level <= 0) {\n continue;\n } //Not upgraded\n\n const multiplierNames = Object.keys(this.skillMultipliers);\n for (let i = 0; i < multiplierNames.length; ++i) {\n const multiplierName = multiplierNames[i];\n if (skill.getMultiplier(multiplierName) != null && !isNaN(skill.getMultiplier(multiplierName))) {\n const value = skill.getMultiplier(multiplierName) * level;\n let multiplierValue = 1 + value / 100;\n if (multiplierName === \"actionTime\") {\n multiplierValue = 1 - value / 100;\n }\n this.skillMultipliers[multiplierName] *= multiplierValue;\n }\n }\n }\n }\n }\n\n completeOperation(success: boolean): void {\n if (this.action.type !== ActionTypes.Operation) {\n throw new Error(\"completeOperation() called even though current action is not an Operation\");\n }\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n\n // Calculate team losses\n const teamCount = action.teamCount;\n if (teamCount >= 1) {\n let max;\n if (success) {\n max = Math.ceil(teamCount / 2);\n } else {\n max = Math.floor(teamCount);\n }\n const losses = getRandomInt(0, max);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.ops && losses > 0) {\n this.log(\"Lost \" + formatNumber(losses, 0) + \" team members during this \" + action.name);\n }\n }\n\n const city = this.getCurrentCity();\n switch (action.name) {\n case \"Investigation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.4 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.1);\n }\n break;\n case \"Undercover Operation\":\n if (success) {\n city.improvePopulationEstimateByPercentage(0.8 * this.skillMultipliers.successChanceEstimate);\n } else {\n this.triggerPotentialMigration(this.city, 0.15);\n }\n break;\n case \"Sting Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.1, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByCount(0.1);\n break;\n case \"Raid\":\n if (success) {\n city.changePopulationByPercentage(-1, {\n changeEstEqually: true,\n nonZero: true,\n });\n --city.comms;\n } else {\n const change = getRandomInt(-10, -5) / 10;\n city.changePopulationByPercentage(change, {\n nonZero: true,\n changeEstEqually: false,\n });\n }\n city.changeChaosByPercentage(getRandomInt(1, 5));\n break;\n case \"Stealth Retirement Operation\":\n if (success) {\n city.changePopulationByPercentage(-0.5, {\n changeEstEqually: true,\n nonZero: true,\n });\n }\n city.changeChaosByPercentage(getRandomInt(-3, -1));\n break;\n case \"Assassination\":\n if (success) {\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n }\n city.changeChaosByPercentage(getRandomInt(-5, 5));\n break;\n default:\n throw new Error(\"Invalid Action name in completeOperation: \" + this.action.name);\n }\n }\n\n getActionObject(actionId: IActionIdentifier): IAction | null {\n /**\n * Given an ActionIdentifier object, returns the corresponding\n * GeneralAction, Contract, Operation, or BlackOperation object\n */\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n return this.contracts[actionId.name];\n case ActionTypes[\"Operation\"]:\n return this.operations[actionId.name];\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return BlackOperations[actionId.name];\n case ActionTypes[\"Training\"]:\n return GeneralActions[\"Training\"];\n case ActionTypes[\"Field Analysis\"]:\n return GeneralActions[\"Field Analysis\"];\n case ActionTypes[\"Recruitment\"]:\n return GeneralActions[\"Recruitment\"];\n case ActionTypes[\"Diplomacy\"]:\n return GeneralActions[\"Diplomacy\"];\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n return GeneralActions[\"Hyperbolic Regeneration Chamber\"];\n case ActionTypes[\"Incite Violence\"]:\n return GeneralActions[\"Incite Violence\"];\n default:\n return null;\n }\n }\n\n completeContract(success: boolean): void {\n if (this.action.type !== ActionTypes.Contract) {\n throw new Error(\"completeContract() called even though current action is not a Contract\");\n }\n const city = this.getCurrentCity();\n if (success) {\n switch (this.action.name) {\n case \"Tracking\":\n // Increase estimate accuracy by a relatively small amount\n city.improvePopulationEstimateByCount(getRandomInt(100, 1e3));\n break;\n case \"Bounty Hunter\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.02);\n break;\n case \"Retirement\":\n city.changePopulationByCount(-1, { estChange: -1, estOffset: 0 });\n city.changeChaosByCount(0.04);\n break;\n default:\n throw new Error(\"Invalid Action name in completeContract: \" + this.action.name);\n }\n }\n }\n\n completeAction(router: IRouter, player: IPlayer): void {\n switch (this.action.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]: {\n try {\n const isOperation = this.action.type === ActionTypes[\"Operation\"];\n const action = this.getActionObject(this.action);\n if (action == null) {\n throw new Error(\"Failed to get Contract/Operation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n const rewardMultiplier = Math.pow(action.rewardFac, action.level - 1);\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Process Contract/Operation success/failure\n if (action.attempt(this)) {\n this.gainActionStats(player, action, true);\n ++action.successes;\n --action.count;\n\n // Earn money for contracts\n let moneyGain = 0;\n if (!isOperation) {\n moneyGain = BladeburnerConstants.ContractBaseMoneyGain * rewardMultiplier * this.skillMultipliers.money;\n player.gainMoney(moneyGain, \"bladeburner\");\n }\n\n if (isOperation) {\n action.setMaxLevel(BladeburnerConstants.OperationSuccessesPerLevel);\n } else {\n action.setMaxLevel(BladeburnerConstants.ContractSuccessesPerLevel);\n }\n if (action.rankGain) {\n const gain = addOffset(action.rankGain * rewardMultiplier * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, gain);\n if (isOperation && this.logging.ops) {\n this.log(action.name + \" successfully completed! Gained \" + formatNumber(gain, 3) + \" rank\");\n } else if (!isOperation && this.logging.contracts) {\n this.log(\n action.name +\n \" contract successfully completed! Gained \" +\n formatNumber(gain, 3) +\n \" rank and \" +\n numeralWrapper.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 if (action.rankLoss) {\n loss = addOffset(action.rankLoss * rewardMultiplier, 10);\n this.changeRank(player, -1 * loss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n this.hpLost += damage;\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n let logLossText = \"\";\n if (loss > 0) {\n logLossText += \"Lost \" + formatNumber(loss, 3) + \" rank. \";\n }\n if (damage > 0) {\n logLossText += \"Took \" + formatNumber(damage, 0) + \" damage.\";\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 isOperation ? this.completeOperation(false) : this.completeContract(false);\n }\n if (action.autoLevel) {\n action.level = action.maxLevel;\n } // Autolevel\n this.startAction(player, this.action); // Repeat action\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]: {\n try {\n const action = this.getActionObject(this.action);\n if (action == null || !(action instanceof BlackOperation)) {\n throw new Error(\"Failed to get BlackOperation Object for: \" + this.action.name);\n }\n const difficulty = action.getDifficulty();\n const difficultyMultiplier =\n Math.pow(difficulty, BladeburnerConstants.DiffMultExponentialFactor) +\n difficulty / BladeburnerConstants.DiffMultLinearFactor;\n\n // Stamina loss is based on difficulty\n this.stamina -= BladeburnerConstants.BaseStaminaLoss * difficultyMultiplier;\n if (this.stamina < 0) {\n this.stamina = 0;\n }\n\n // Team loss variables\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 if (action.rankGain) {\n rankGain = addOffset(action.rankGain * BitNodeMultipliers.BladeburnerRank, 10);\n this.changeRank(player, rankGain);\n }\n teamLossMax = Math.ceil(teamCount / 2);\n\n // Operation Daedalus\n if (action.name === BlackOperationNames.OperationDaedalus) {\n this.resetAction();\n return router.toBitVerse(false, false);\n }\n\n if (this.logging.blackops) {\n this.log(action.name + \" successful! Gained \" + formatNumber(rankGain, 1) + \" rank\");\n }\n } else {\n this.gainActionStats(player, action, false);\n let rankLoss = 0;\n let damage = 0;\n if (action.rankLoss) {\n rankLoss = addOffset(action.rankLoss, 10);\n this.changeRank(player, -1 * rankLoss);\n }\n if (action.hpLoss) {\n damage = action.hpLoss * difficultyMultiplier;\n damage = Math.ceil(addOffset(damage, 10));\n const cost = calculateHospitalizationCost(player, damage);\n if (player.takeDamage(damage)) {\n ++this.numHosp;\n this.moneyLost += cost;\n }\n }\n teamLossMax = Math.floor(teamCount);\n\n if (this.logging.blackops) {\n this.log(\n action.name +\n \" failed! Lost \" +\n formatNumber(rankLoss, 1) +\n \" rank and took \" +\n formatNumber(damage, 0) +\n \" damage\",\n );\n }\n }\n\n this.resetAction(); // Stop regardless of success or fail\n\n // Calculate team lossses\n if (teamCount >= 1) {\n const losses = getRandomInt(1, teamLossMax);\n this.teamSize -= losses;\n this.teamLost += losses;\n if (this.logging.blackops) {\n this.log(\"You lost \" + formatNumber(losses, 0) + \" team members during \" + action.name);\n }\n }\n } catch (e: any) {\n exceptionAlert(e);\n }\n break;\n }\n case ActionTypes[\"Training\"]: {\n this.stamina -= 0.5 * BladeburnerConstants.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 if (this.logging.general) {\n this.log(\n \"Training completed. Gained: \" +\n formatNumber(strExpGain, 1) +\n \" str exp, \" +\n formatNumber(defExpGain, 1) +\n \" def exp, \" +\n formatNumber(dexExpGain, 1) +\n \" dex exp, \" +\n formatNumber(agiExpGain, 1) +\n \" agi exp, \" +\n formatNumber(staminaGain, 3) +\n \" max stamina\",\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Field Analysis\"]: {\n // Does not use stamina. Effectiveness depends on hacking, int, and cha\n let eff =\n 0.04 * Math.pow(player.hacking, 0.3) +\n 0.04 * Math.pow(player.intelligence, 0.9) +\n 0.02 * Math.pow(player.charisma, 0.3);\n eff *= player.bladeburner_analysis_mult;\n if (isNaN(eff) || eff < 0) {\n throw new Error(\"Field Analysis Effectiveness calculated to be NaN or negative\");\n }\n const hackingExpGain = 20 * player.hacking_exp_mult;\n const charismaExpGain = 20 * player.charisma_exp_mult;\n const rankGain = 0.1 * BitNodeMultipliers.BladeburnerRank;\n player.gainHackingExp(hackingExpGain);\n player.gainIntelligenceExp(BladeburnerConstants.BaseIntGain);\n player.gainCharismaExp(charismaExpGain);\n this.changeRank(player, rankGain);\n this.getCurrentCity().improvePopulationEstimateByPercentage(eff * this.skillMultipliers.successChanceEstimate);\n if (this.logging.general) {\n this.log(\n `Field analysis completed. Gained ${formatNumber(rankGain, 2)} rank, ` +\n `${formatNumber(hackingExpGain, 1)} hacking exp, and ` +\n `${formatNumber(charismaExpGain, 1)} charisma exp`,\n );\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Recruitment\"]: {\n const successChance = this.getRecruitmentSuccessChance(player);\n if (Math.random() < successChance) {\n const expGain = 2 * BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n ++this.teamSize;\n if (this.logging.general) {\n this.log(\"Successfully recruited a team member! Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n } else {\n const expGain = BladeburnerConstants.BaseStatGain * this.actionTimeToComplete;\n player.gainCharismaExp(expGain);\n if (this.logging.general) {\n this.log(\"Failed to recruit a team member. Gained \" + formatNumber(expGain, 1) + \" charisma exp\");\n }\n }\n this.startAction(player, this.action); // Repeat action\n break;\n }\n case ActionTypes[\"Diplomacy\"]: {\n const eff = this.getDiplomacyEffectiveness(player);\n this.getCurrentCity().chaos *= eff;\n if (this.getCurrentCity().chaos < 0) {\n this.getCurrentCity().chaos = 0;\n }\n if (this.logging.general) {\n this.log(\n `Diplomacy completed. Chaos levels in the current city fell by ${numeralWrapper.formatPercentage(1 - eff)}`,\n );\n }\n this.startAction(player, this.action); // Repeat Action\n break;\n }\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]: {\n player.regenerateHp(BladeburnerConstants.HrcHpGain);\n\n const staminaGain = this.maxStamina * (BladeburnerConstants.HrcStaminaGain / 100);\n this.stamina = Math.min(this.maxStamina, this.stamina + staminaGain);\n this.startAction(player, this.action);\n if (this.logging.general) {\n this.log(\n `Rested in Hyperbolic Regeneration Chamber. Restored ${\n BladeburnerConstants.HrcHpGain\n } HP and gained ${numeralWrapper.formatStamina(staminaGain)} stamina`,\n );\n }\n break;\n }\n case ActionTypes[\"Incite Violence\"]: {\n for (const contract of Object.keys(this.contracts)) {\n const growthF = Growths[contract];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + contract);\n this.contracts[contract].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const operation of Object.keys(this.operations)) {\n const growthF = Growths[operation];\n if (!growthF) throw new Error(\"trying to generate count for action that doesn't exist? \" + operation);\n this.operations[operation].count += (60 * 3 * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n if (this.logging.general) {\n this.log(`Incited violence in the synthoid communities.`);\n }\n for (const cityName of Object.keys(this.cities)) {\n const city = this.cities[cityName];\n city.chaos += 10;\n city.chaos += city.chaos / (Math.log(city.chaos) / Math.log(10));\n }\n\n this.startAction(player, this.action);\n break;\n }\n default:\n console.error(`Bladeburner.completeAction() called for invalid action: ${this.action.type}`);\n break;\n }\n }\n\n changeRank(player: IPlayer, change: number): void {\n if (isNaN(change)) {\n throw new Error(\"NaN passed into Bladeburner.changeRank()\");\n }\n this.rank += change;\n if (this.rank < 0) {\n this.rank = 0;\n }\n this.maxRank = Math.max(this.rank, this.maxRank);\n\n const bladeburnersFactionName = FactionNames.Bladeburners;\n if (factionExists(bladeburnersFactionName)) {\n const bladeburnerFac = Factions[bladeburnersFactionName];\n if (!(bladeburnerFac instanceof Faction)) {\n throw new Error(\n `Could not properly get ${FactionNames.Bladeburners} Faction object in ${FactionNames.Bladeburners} UI Overview Faction button`,\n );\n }\n if (bladeburnerFac.isMember) {\n const favorBonus = 1 + bladeburnerFac.favor / 100;\n bladeburnerFac.playerReputation +=\n BladeburnerConstants.RankToFactionRepFactor * change * player.faction_rep_mult * favorBonus;\n }\n }\n\n // Gain skill points\n const rankNeededForSp = (this.totalSkillPoints + 1) * BladeburnerConstants.RanksPerSkillPoint;\n if (this.maxRank >= rankNeededForSp) {\n // Calculate how many skill points to gain\n const gainedSkillPoints = Math.floor(\n (this.maxRank - rankNeededForSp) / BladeburnerConstants.RanksPerSkillPoint + 1,\n );\n this.skillPoints += gainedSkillPoints;\n this.totalSkillPoints += gainedSkillPoints;\n }\n }\n\n processAction(router: IRouter, player: IPlayer, seconds: number): void {\n if (this.action.type === ActionTypes[\"Idle\"]) return;\n if (this.actionTimeToComplete <= 0) {\n throw new Error(`Invalid actionTimeToComplete value: ${this.actionTimeToComplete}, type; ${this.action.type}`);\n }\n if (!(this.action instanceof ActionIdentifier)) {\n throw new Error(\"Bladeburner.action is not an ActionIdentifier Object\");\n }\n\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 this.actionTimeCurrent += seconds + this.actionTimeOverflow;\n this.actionTimeOverflow = 0;\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: IPlayer): number {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStaminaBonus = this.maxStamina / BladeburnerConstants.MaxStaminaToGainFactor;\n const gain = (BladeburnerConstants.StaminaGainPerSecond + maxStaminaBonus) * Math.pow(effAgility, 0.17);\n return gain * (this.skillMultipliers.stamina * player.bladeburner_stamina_gain_mult);\n }\n\n calculateMaxStamina(player: IPlayer): void {\n const effAgility = player.agility * this.skillMultipliers.effAgi;\n const maxStamina =\n (Math.pow(effAgility, 0.8) + this.staminaBonus) *\n this.skillMultipliers.stamina *\n player.bladeburner_max_stamina_mult;\n if (this.maxStamina !== maxStamina) {\n const oldMax = this.maxStamina;\n this.maxStamina = maxStamina;\n this.stamina = (this.maxStamina * this.stamina) / oldMax;\n }\n if (isNaN(maxStamina)) {\n throw new Error(\"Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()\");\n }\n }\n\n create(): void {\n this.contracts[\"Tracking\"] = new Contract({\n name: \"Tracking\",\n baseDifficulty: 125,\n difficultyFac: 1.02,\n rewardFac: 1.041,\n rankGain: 0.3,\n hpLoss: 0.5,\n count: getRandomInt(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({\n name: \"Bounty Hunter\",\n baseDifficulty: 250,\n difficultyFac: 1.04,\n rewardFac: 1.085,\n rankGain: 0.9,\n hpLoss: 1,\n count: getRandomInt(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({\n name: \"Retirement\",\n baseDifficulty: 200,\n difficultyFac: 1.03,\n rewardFac: 1.065,\n rankGain: 0.6,\n hpLoss: 1,\n count: getRandomInt(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\n this.operations[\"Investigation\"] = new Operation({\n name: \"Investigation\",\n baseDifficulty: 400,\n difficultyFac: 1.03,\n rewardFac: 1.07,\n reqdRank: 25,\n rankGain: 2.2,\n rankLoss: 0.2,\n count: getRandomInt(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({\n name: \"Undercover Operation\",\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: getRandomInt(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({\n name: \"Sting Operation\",\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: getRandomInt(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({\n name: \"Raid\",\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: getRandomInt(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({\n name: \"Stealth Retirement Operation\",\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: getRandomInt(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({\n name: \"Assassination\",\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: getRandomInt(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: IRouter, player: IPlayer): void {\n // Edge race condition when the engine checks the processing counters and attempts to route before the router is initialized.\n if (!router.isInitialized) return;\n\n // Edge case condition...if Operation Daedalus is complete trigger the BitNode\n if (router.page() !== Page.BitVerse && this.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)) {\n return router.toBitVerse(false, false);\n }\n\n // If the Player starts doing some other actions, set action to idle and alert\n if (Augmentations[AugmentationNames.BladesSimulacrum].owned === false && player.isWorking) {\n if (this.action.type !== ActionTypes[\"Idle\"]) {\n let msg = \"Your Bladeburner action was cancelled because you started doing something else.\";\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 if (!Settings.SuppressBladeburnerPopup) {\n dialogBoxCreate(msg);\n }\n }\n this.resetAction();\n }\n\n // If the Player has no Stamina, set action to idle\n if (this.stamina <= 0) {\n this.log(\"Your Bladeburner action was cancelled because your stamina hit 0\");\n this.resetAction();\n }\n\n // A 'tick' for this mechanic is one second (= 5 game cycles)\n if (this.storedCycles >= BladeburnerConstants.CyclesPerSecond) {\n let seconds = Math.floor(this.storedCycles / BladeburnerConstants.CyclesPerSecond);\n seconds = Math.min(seconds, 5); // Max of 5 'ticks'\n this.storedCycles -= seconds * BladeburnerConstants.CyclesPerSecond;\n\n // Stamina\n this.calculateMaxStamina(player);\n this.stamina += this.calculateStaminaGainPerSecond(player) * seconds;\n this.stamina = Math.min(this.maxStamina, this.stamina);\n\n // Count increase for contracts/operations\n for (const contract of Object.values(this.contracts) as Contract[]) {\n const growthF = Growths[contract.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${contract.name}' is undefined`);\n contract.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n for (const op of Object.values(this.operations) as Operation[]) {\n const growthF = Growths[op.name];\n if (growthF === undefined) throw new Error(`growth formula for action '${op.name}' is undefined`);\n if (growthF !== undefined) {\n op.count += (seconds * growthF()) / BladeburnerConstants.ActionCountGrowthPeriod;\n }\n }\n\n // Chaos goes down very slowly\n for (const cityName of BladeburnerConstants.CityNames) {\n const city = this.cities[cityName];\n if (!(city instanceof City)) {\n throw new Error(\"Invalid City object when processing passive chaos reduction in Bladeburner.process\");\n }\n city.chaos -= 0.0001 * seconds;\n city.chaos = Math.max(0, city.chaos);\n }\n\n // Random Events\n this.randomEventCounter -= seconds;\n if (this.randomEventCounter <= 0) {\n this.randomEvent();\n // Add instead of setting because we might have gone over the required time for the event\n this.randomEventCounter += getRandomInt(240, 600);\n }\n\n this.processAction(router, player, seconds);\n\n // Automation\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({\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({\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: IActionIdentifier): {\n type: string;\n name: string;\n } {\n const res = { type: \"\", name: \"\" };\n const types = Object.keys(ActionTypes);\n for (let i = 0; i < types.length; ++i) {\n if (actionId.type === ActionTypes[types[i]]) {\n res.type = types[i];\n break;\n }\n }\n const gen = [\n \"Training\",\n \"Recruitment\",\n \"FieldAnalysis\",\n \"Field Analysis\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\",\n ];\n if (gen.includes(res.type)) {\n res.type = \"General\";\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(): string[] {\n return Object.keys(this.contracts);\n }\n\n getOperationNamesNetscriptFn(): string[] {\n return Object.keys(this.operations);\n }\n\n getBlackOpNamesNetscriptFn(): string[] {\n return Object.keys(BlackOperations);\n }\n\n getGeneralActionNamesNetscriptFn(): string[] {\n return Object.keys(GeneralActions);\n }\n\n getSkillNamesNetscriptFn(): string[] {\n return Object.keys(Skills);\n }\n\n startActionNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n\n // Special logic for Black Ops\n if (actionId.type === ActionTypes[\"BlackOp\"]) {\n const canRunOp = this.canAttemptBlackOp(actionId);\n if (!canRunOp.isAvailable) {\n workerScript.log(\"bladeburner.startAction\", () => canRunOp.error + \"\");\n return false;\n }\n }\n\n try {\n this.startAction(player, actionId);\n workerScript.log(\n \"bladeburner.startAction\",\n () => `Starting bladeburner action with type '${type}' and name '${name}'`,\n );\n return true;\n } catch (e: any) {\n this.resetAction();\n workerScript.log(\"bladeburner.startAction\", () => errorLogText);\n return false;\n }\n }\n\n getActionTimeNetscriptFn(player: IPlayer, type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getActionTime(this) * 1000;\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n return 30000;\n case ActionTypes[\"Recruitment\"]:\n return this.getRecruitmentTime(player) * 1000;\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return 60000;\n default:\n workerScript.log(\"bladeburner.getActionTime\", () => errorLogText);\n return -1;\n }\n }\n\n getActionEstimatedSuccessChanceNetscriptFn(\n player: IPlayer,\n type: string,\n name: string,\n workerScript: WorkerScript,\n ): [number, number] {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n return actionObj.getEstSuccessChance(this);\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return [1, 1];\n case ActionTypes[\"Recruitment\"]: {\n const recChance = this.getRecruitmentSuccessChance(player);\n return [recChance, recChance];\n }\n default:\n workerScript.log(\"bladeburner.getActionEstimatedSuccessChance\", () => errorLogText);\n return [-1, -1];\n }\n }\n\n getActionCountRemainingNetscriptFn(type: string, name: string, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n\n switch (actionId.type) {\n case ActionTypes[\"Contract\"]:\n case ActionTypes[\"Operation\"]:\n return Math.floor(actionObj.count);\n case ActionTypes[\"BlackOp\"]:\n case ActionTypes[\"BlackOperation\"]:\n if (this.blackops[name] != null) {\n return 0;\n } else {\n return 1;\n }\n case ActionTypes[\"Training\"]:\n case ActionTypes[\"Recruitment\"]:\n case ActionTypes[\"Field Analysis\"]:\n case ActionTypes[\"FieldAnalysis\"]:\n case ActionTypes[\"Diplomacy\"]:\n case ActionTypes[\"Hyperbolic Regeneration Chamber\"]:\n case ActionTypes[\"Incite Violence\"]:\n return Infinity;\n default:\n workerScript.log(\"bladeburner.getActionCountRemaining\", () => errorLogText);\n return -1;\n }\n }\n\n getSkillLevelNetscriptFn(skillName: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.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: string, workerScript: WorkerScript): number {\n if (skillName === \"\" || !Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.getSkillUpgradeCost\", () => `Invalid skill: '${skillName}'`);\n return -1;\n }\n\n const skill = Skills[skillName];\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: string, workerScript: WorkerScript): boolean {\n const errorLogText = `Invalid skill: '${skillName}'`;\n if (!Skills.hasOwnProperty(skillName)) {\n workerScript.log(\"bladeburner.upgradeSkill\", () => errorLogText);\n return false;\n }\n\n const skill = Skills[skillName];\n let currentLevel = 0;\n if (this.skills[skillName] && !isNaN(this.skills[skillName])) {\n currentLevel = this.skills[skillName];\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(\n \"bladeburner.upgradeSkill\",\n () =>\n `You do not have enough skill points to upgrade ${skillName} (You have ${this.skillPoints}, you need ${cost})`,\n );\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: string, name: string, workerScript: WorkerScript): number {\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 if (actionId == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.getTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type === ActionTypes[\"Operation\"] ||\n actionId.type === ActionTypes[\"BlackOp\"] ||\n actionId.type === ActionTypes[\"BlackOperation\"]\n ) {\n return actionObj.teamCount;\n } else {\n return 0;\n }\n }\n\n setTeamSizeNetscriptFn(type: string, name: string, size: number, workerScript: WorkerScript): number {\n const errorLogText = `Invalid action: type='${type}' name='${name}'`;\n const actionId = this.getActionIdFromTypeAndName(type, name);\n if (actionId == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n if (\n actionId.type !== ActionTypes[\"Operation\"] &&\n actionId.type !== ActionTypes[\"BlackOp\"] &&\n actionId.type !== ActionTypes[\"BlackOperation\"]\n ) {\n workerScript.log(\"bladeburner.setTeamSize\", () => \"Only valid for 'Operations' and 'BlackOps'\");\n return -1;\n }\n\n const actionObj = this.getActionObject(actionId);\n if (actionObj == null) {\n workerScript.log(\"bladeburner.setTeamSize\", () => errorLogText);\n return -1;\n }\n\n let sanitizedSize = Math.round(size);\n if (isNaN(sanitizedSize) || sanitizedSize < 0) {\n workerScript.log(\"bladeburner.setTeamSize\", () => `Invalid size: ${size}`);\n return -1;\n }\n if (this.teamSize < sanitizedSize) {\n sanitizedSize = this.teamSize;\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: WorkerScript): boolean {\n const bladeburnerFac = Factions[FactionNames.Bladeburners];\n if (bladeburnerFac.isMember) {\n return true;\n } else if (this.rank >= BladeburnerConstants.RankNeededForFaction) {\n joinFaction(bladeburnerFac);\n workerScript.log(\"bladeburner.joinBladeburnerFaction\", () => `Joined ${FactionNames.Bladeburners} faction.`);\n return true;\n } else {\n workerScript.log(\n \"bladeburner.joinBladeburnerFaction\",\n () => `You do not have the required rank (${this.rank}/${BladeburnerConstants.RankNeededForFaction}).`,\n );\n return false;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Bladeburner\", this);\n }\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 static fromJSON(value: any): Bladeburner {\n return Generic_fromJSON(Bladeburner, value.data);\n }\n}\n\nReviver.constructors.Bladeburner = Bladeburner;\n","import { CompanyPosition } from \"./CompanyPosition\";\nimport * as posNames from \"./data/companypositionnames\";\nimport { favorToRep, repToFavor } from \"../Faction/formulas/favor\";\n\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IConstructorParams {\n name: string;\n info: string;\n companyPositions: IMap;\n expMultiplier: number;\n salaryMultiplier: number;\n jobStatReqOffset: number;\n isMegacorp?: boolean;\n}\n\nconst DefaultConstructorParams: IConstructorParams = {\n name: \"\",\n info: \"\",\n companyPositions: {},\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n};\n\nexport class Company {\n /**\n * Company name\n */\n name: string;\n\n /**\n * Description and general information about company\n */\n info: string;\n\n /**\n * Has faction associated.\n */\n isMegacorp: boolean;\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 companyPositions: IMap;\n\n /**\n * Company-specific multiplier for earnings\n */\n expMultiplier: number;\n salaryMultiplier: number;\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 jobStatReqOffset: number;\n\n /**\n * Properties to track the player's progress in this company\n */\n isPlayerEmployed: boolean;\n playerReputation: number;\n favor: number;\n\n constructor(p: IConstructorParams = 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\n this.isPlayerEmployed = false;\n this.playerReputation = 1;\n this.favor = 0;\n this.isMegacorp = false;\n if (p.isMegacorp) this.isMegacorp = true;\n }\n\n hasPosition(pos: CompanyPosition | string): boolean {\n if (pos instanceof CompanyPosition) {\n return this.companyPositions[pos.name] != null;\n } else {\n return this.companyPositions[pos] != null;\n }\n }\n\n hasAgentPositions(): boolean {\n return this.companyPositions[posNames.AgentCompanyPositions[0]] != null;\n }\n\n hasBusinessConsultantPositions(): boolean {\n return this.companyPositions[posNames.BusinessConsultantCompanyPositions[0]] != null;\n }\n\n hasBusinessPositions(): boolean {\n return this.companyPositions[posNames.BusinessCompanyPositions[0]] != null;\n }\n\n hasEmployeePositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[1]] != null;\n }\n\n hasITPositions(): boolean {\n return this.companyPositions[posNames.ITCompanyPositions[0]] != null;\n }\n\n hasSecurityPositions(): boolean {\n return this.companyPositions[posNames.SecurityCompanyPositions[2]] != null;\n }\n\n hasSoftwareConsultantPositions(): boolean {\n return this.companyPositions[posNames.SoftwareConsultantCompanyPositions[0]] != null;\n }\n\n hasSoftwarePositions(): boolean {\n return this.companyPositions[posNames.SoftwareCompanyPositions[0]] != null;\n }\n\n hasWaiterPositions(): boolean {\n return this.companyPositions[posNames.MiscCompanyPositions[0]] != null;\n }\n\n gainFavor(): void {\n if (this.favor == null) {\n this.favor = 0;\n }\n this.favor += this.getFavorGain();\n }\n\n getFavorGain(): number {\n if (this.favor == null) {\n this.favor = 0;\n }\n const storedRep = Math.max(0, favorToRep(this.favor));\n const totalRep = storedRep + this.playerReputation;\n const newFavor = repToFavor(totalRep);\n return newFavor - this.favor;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Company\", this);\n }\n\n /**\n * Initiatizes a Company from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Company {\n return Generic_fromJSON(Company, value.data);\n }\n}\n\nReviver.constructors.Company = Company;\n","import { Material } from \"./Material\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\n\ninterface IConstructorParams {\n corp?: ICorporation;\n industry?: IIndustry;\n loc?: string;\n size?: number;\n}\n\nexport class Warehouse {\n // Warehouse's level, which affects its maximum size\n level = 1;\n\n // City that this Warehouse is in\n loc: string;\n\n // Map of Materials held by this Warehouse\n materials: IMap;\n\n // Maximum amount warehouse can hold\n size: number;\n\n // Amount of space currently used by warehouse\n sizeUsed = 0;\n\n // Whether Smart Supply is enabled for this Industry (the Industry that this Warehouse is for)\n smartSupplyEnabled = false;\n\n // Decide if smart supply should use the materials already in the warehouse when deciding on the amount to buy.\n smartSupplyUseLeftovers: { [key: string]: boolean | undefined } = {};\n\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 smartSupplyStore = 0;\n\n constructor(params: IConstructorParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 0;\n\n this.materials = {\n Water: new Material({ name: \"Water\" }),\n Energy: new Material({ name: \"Energy\" }),\n Food: new Material({ name: \"Food\" }),\n Plants: new Material({ name: \"Plants\" }),\n Metal: new Material({ name: \"Metal\" }),\n Hardware: new Material({ name: \"Hardware\" }),\n Chemicals: new Material({ name: \"Chemicals\" }),\n Drugs: new Material({ name: \"Drugs\" }),\n Robots: new Material({ name: \"Robots\" }),\n AICores: new Material({ name: \"AI Cores\" }),\n RealEstate: new Material({ 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 }\n\n // Default smart supply to being enabled if the upgrade is unlocked\n if (params.corp?.unlockUpgrades[1]) {\n this.smartSupplyEnabled = true;\n }\n }\n\n // Re-calculate how much space is being used by this Warehouse\n updateMaterialSizeUsed(): void {\n this.sizeUsed = 0;\n for (const matName of Object.keys(this.materials)) {\n const mat = this.materials[matName];\n if (MaterialSizes.hasOwnProperty(matName)) {\n this.sizeUsed += mat.qty * MaterialSizes[matName];\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: ICorporation, industry: IIndustry): void {\n try {\n this.size = this.level * 100 * corporation.getStorageMultiplier() * industry.getStorageMultiplier();\n } catch (e: any) {\n exceptionAlert(e);\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Warehouse\", this);\n }\n\n // Initiatizes a Warehouse object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Warehouse {\n return Generic_fromJSON(Warehouse, value.data);\n }\n}\n\nReviver.constructors.Warehouse = Warehouse;\n","import { gangMemberTasksMetadata } from \"./data/tasks\";\nimport { GangMemberTask } from \"./GangMemberTask\";\n\nexport const GangMemberTasks: {\n [key: string]: GangMemberTask;\n} = {};\n\n(function () {\n gangMemberTasksMetadata.forEach((e) => {\n GangMemberTasks[e.name] = new GangMemberTask(e.name, e.desc, e.isHacking, e.isCombat, e.params);\n });\n})();\n","/**\n * Map of all Hash Upgrades\n * Key = Hash name, Value = HashUpgrade object\n */\nimport { HashUpgrade, IConstructorParams } from \"./HashUpgrade\";\nimport { HashUpgradesMetadata } from \"./data/HashUpgradesMetadata\";\nimport { IMap } from \"../types\";\n\nexport const HashUpgrades: IMap = {};\n\nfunction createHashUpgrade(p: IConstructorParams): void {\n HashUpgrades[p.name] = new HashUpgrade(p);\n}\n\nfor (const metadata of HashUpgradesMetadata) {\n createHashUpgrade(metadata);\n}\n","import { FragmentType } from \"./FragmentType\";\nimport { Shapes } from \"./data/Shapes\";\n\nexport const Fragments: Fragment[] = [];\n\nexport class Fragment {\n id: number;\n shape: boolean[][];\n type: FragmentType;\n power: number;\n limit: number;\n\n constructor(id: number, shape: boolean[][], type: FragmentType, power: number, limit: number) {\n this.id = id;\n this.shape = shape;\n this.type = type;\n this.power = power;\n this.limit = limit;\n }\n\n fullAt(x: number, y: number, rotation: number): boolean {\n if (y < 0) return false;\n if (y >= this.height(rotation)) return false;\n if (x < 0) return false;\n if (x >= this.width(rotation)) return false;\n // start xy, modifier xy\n let [sx, sy, mx, my] = [0, 0, 1, 1];\n if (rotation === 1) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, 0, -1, 1];\n } else if (rotation === 2) {\n [sx, sy, mx, my] = [this.width(rotation) - 1, this.height(rotation) - 1, -1, -1];\n } else if (rotation === 3) {\n [sx, sy, mx, my] = [0, this.height(rotation) - 1, 1, -1];\n }\n let [qx, qy] = [sx + mx * x, sy + my * y];\n if (rotation % 2 === 1) [qx, qy] = [qy, qx];\n return this.shape[qy][qx];\n }\n\n width(rotation: number): number {\n if (rotation % 2 === 0) return this.shape[0].length;\n return this.shape.length;\n }\n\n height(rotation: number): number {\n if (rotation % 2 === 0) return this.shape.length;\n return this.shape[0].length;\n }\n\n // List of direct neighboors of this fragment.\n neighboors(rotation: number): number[][] {\n const candidates: number[][] = [];\n\n const add = (x: number, y: number): void => {\n if (this.fullAt(x, y, rotation)) return;\n if (candidates.some((coord) => coord[0] === x && coord[1] === y)) return;\n candidates.push([x, y]);\n };\n for (let y = 0; y < this.height(rotation); y++) {\n for (let x = 0; x < this.width(rotation); x++) {\n // This cell is full, add all it's neighboors.\n if (!this.fullAt(x, y, rotation)) continue;\n add(x - 1, y);\n add(x + 1, y);\n add(x, y - 1);\n add(x, y + 1);\n }\n }\n const cells: number[][] = [];\n for (const candidate of candidates) {\n if (cells.some((cell) => cell[0] === candidate[0] && cell[1] === candidate[1])) continue;\n cells.push(candidate);\n }\n\n return cells;\n }\n\n copy(): Fragment {\n return new Fragment(\n this.id,\n this.shape.map((a) => a.slice()),\n this.type,\n this.power,\n this.limit,\n );\n }\n}\n\nexport function FragmentById(id: number): Fragment | null {\n for (const fragment of Fragments) {\n if (fragment.id === id) return fragment;\n }\n return null;\n}\n\n(function () {\n const _ = false;\n const X = true;\n Fragments.push(\n new Fragment(\n 0, // id\n Shapes.S,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 1, // id\n Shapes.Z,\n FragmentType.Hacking, // type\n 1,\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 5, // id\n Shapes.T,\n FragmentType.HackingSpeed, // type\n 1.3,\n 1, // limit\n ),\n );\n\n Fragments.push(\n new Fragment(\n 6, // id\n Shapes.I,\n FragmentType.HackingMoney, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 7, // id\n Shapes.J,\n FragmentType.HackingGrow, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 10, // id\n Shapes.T,\n FragmentType.Strength, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 12, // id\n Shapes.L,\n FragmentType.Defense, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 14, // id\n Shapes.L,\n FragmentType.Dexterity, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 16, // id\n Shapes.S,\n FragmentType.Agility, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 18, // id\n Shapes.S,\n FragmentType.Charisma, // type\n 3, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 20, // id\n Shapes.I,\n FragmentType.HacknetMoney, // type\n 1, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 21, // id\n Shapes.O,\n FragmentType.HacknetCost, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 25, // id\n Shapes.J,\n FragmentType.Rep, // type\n 0.5, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 27, // id\n Shapes.J,\n FragmentType.WorkMoney, // type\n 10, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 28, // id\n Shapes.L,\n FragmentType.Crime, // type\n 2, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 30, // id\n Shapes.S,\n FragmentType.Bladeburner, // type\n 0.4, // power\n 1, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 100, // id\n [\n // shape\n [_, X, X],\n [X, X, _],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 101, // id\n [\n // shape\n [X, X, X, X],\n [X, _, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 102, // id\n [\n // shape\n [_, X, X, X],\n [X, X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 103, // id\n [\n // shape\n [X, X, X, _],\n [_, _, X, X],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 104, // id\n [\n // shape\n [_, X, X],\n [_, X, _],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 105, // id\n [\n // shape\n [_, _, X],\n [_, X, X],\n [X, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 106, // id\n [\n // shape\n [X, _, _],\n [X, X, X],\n [X, _, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n Fragments.push(\n new Fragment(\n 107, // id\n [\n // shape\n [_, X, _],\n [X, X, X],\n [_, X, _],\n ],\n FragmentType.Booster, // type\n 1.1, // power\n 99, // limit\n ),\n );\n})();\n\nexport const NoneFragment = new Fragment(-2, [], FragmentType.None, 0, Infinity);\nexport const DeleteFragment = new Fragment(-2, [], FragmentType.Delete, 0, Infinity);\n","import { IPlayer } from \"../IPlayer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { CalculateShareMult } from \"../../NetworkShare/Share\";\n\nfunction mult(f: Faction): number {\n let favorMult = 1 + f.favor / 100;\n if (isNaN(favorMult)) {\n favorMult = 1;\n }\n return favorMult * BitNodeMultipliers.FactionWorkRepGain;\n}\n\nexport function getHackingWorkRepGain(p: IPlayer, f: Faction): number {\n return (\n ((p.hacking + p.intelligence / 3) / CONSTANTS.MaxSkillLevel) *\n p.faction_rep_mult *\n p.getIntelligenceBonus(1) *\n mult(f) *\n CalculateShareMult()\n );\n}\n\nexport function getFactionSecurityWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.strength + p.defense + p.dexterity + p.agility +\n (p.hacking + p.intelligence) * CalculateShareMult()\n )\n ) / CONSTANTS.MaxSkillLevel / 4.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n\nexport function getFactionFieldWorkRepGain(p: IPlayer, f: Faction): number {\n const t =\n (0.9 *\n (p.strength + p.defense + p.dexterity + p.agility + p.charisma +\n (p.hacking + p.intelligence) * CalculateShareMult()\n )\n ) / CONSTANTS.MaxSkillLevel / 5.5;\n return t * p.faction_rep_mult * mult(f) * p.getIntelligenceBonus(1);\n}\n","/**\n * Functions for buying/selling stocks. There are four functions total, two for\n * long positions and two for short positions.\n */\nimport { Stock } from \"./Stock\";\nimport {\n getBuyTransactionCost,\n getSellTransactionGain,\n processTransactionForecastMovement,\n} from \"./StockMarketHelpers\";\n\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { Player } from \"../Player\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nimport * as React from \"react\";\n\n/**\n * Each function takes an optional config object as its last argument\n */\ninterface IOptions {\n rerenderFn?: () => void;\n suppressDialog?: boolean;\n}\n\n/**\n * Attempt to buy a stock in the long position\n * @param {Stock} stock - Stock to buy\n * @param {number} shares - Number of shares to buy\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function buyStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.buy\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\"Failed to buy stock. This may be a bug, contact developer\");\n }\n\n return false;\n }\n\n // Does player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Long);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `You do not have enough money to purchase this position. You need ${numeralWrapper.formatMoney(totalPrice)}.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.buy\",\n () =>\n `Purchasing '${shares + stock.playerShares + stock.playerShortShares}' shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${numeralWrapper.formatShares(\n stock.maxShares,\n )} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShares * stock.playerAvgPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShares = Math.round(stock.playerShares + shares);\n stock.playerAvgPx = newTotal / stock.playerShares;\n processTransactionForecastMovement(stock, shares);\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} for ${numeralWrapper.formatMoney(\n totalPrice,\n )}. Paid ${numeralWrapper.formatMoney(CONSTANTS.StockMarketCommission)} in commission fees.`;\n workerScript.log(\"stock.buy\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Bought {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for . Paid{\" \"}\n in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the long position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * returns {boolean} - true if successfully sells given number of shares OR MAX owned, false otherwise\n */\nexport function sellStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Sanitize/Validate arguments\n if (stock == null || shares < 0 || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.sell\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to sell stock. This is probably due to an invalid quantity. Otherwise, this may be a bug, contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShares) {\n shares = stock.playerShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const gains = getSellTransactionGain(stock, shares, PositionTypes.Long);\n if (gains == null) {\n return false;\n }\n let netProfit = gains - stock.playerAvgPx * shares;\n if (isNaN(netProfit)) {\n netProfit = 0;\n }\n Player.gainMoney(gains, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += netProfit;\n Player.scriptProdSinceLastAug += netProfit;\n }\n\n stock.playerShares = Math.round(stock.playerShares - shares);\n if (stock.playerShares === 0) {\n stock.playerAvgPx = 0;\n }\n\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(gains)}.`;\n workerScript.log(\"stock.sell\", () => resultTxt);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions, you gained a total of{\" \"}\n .\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to buy a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to short\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} - true if successful, false otherwise\n */\nexport function shortStock(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n // Validate arguments\n shares = Math.round(shares);\n if (shares <= 0) {\n return false;\n }\n if (stock == null || isNaN(shares)) {\n if (workerScript) {\n workerScript.log(\"stock.short\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n \"Failed to initiate a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n return false;\n }\n\n // Does the player have enough money?\n const totalPrice = getBuyTransactionCost(stock, shares, PositionTypes.Short);\n if (totalPrice == null) {\n return false;\n }\n if (Player.money < totalPrice) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n \"You do not have enough \" +\n \"money to purchase this short position. You need \" +\n numeralWrapper.formatMoney(totalPrice),\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n <>\n You do not have enough money to purchase this short position. You need \n ,\n );\n }\n\n return false;\n }\n\n // Would this purchase exceed the maximum number of shares?\n if (shares + stock.playerShares + stock.playerShortShares > stock.maxShares) {\n if (workerScript) {\n workerScript.log(\n \"stock.short\",\n () =>\n `This '${shares + stock.playerShares + stock.playerShortShares}' short shares would exceed ${\n stock.symbol\n }'s maximum (${stock.maxShares}) number of shares.`,\n );\n } else if (opts.suppressDialog !== true) {\n dialogBoxCreate(\n `You cannot purchase this many shares. ${stock.symbol} has a maximum of ${stock.maxShares} shares.`,\n );\n }\n\n return false;\n }\n\n const origTotal = stock.playerShortShares * stock.playerAvgShortPx;\n Player.loseMoney(totalPrice, \"stock\");\n const newTotal = origTotal + totalPrice - CONSTANTS.StockMarketCommission;\n stock.playerShortShares = Math.round(stock.playerShortShares + shares);\n stock.playerAvgShortPx = newTotal / stock.playerShortShares;\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Bought a short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol} ` +\n `for ${numeralWrapper.formatMoney(totalPrice)}. Paid ${numeralWrapper.formatMoney(\n CONSTANTS.StockMarketCommission,\n )} ` +\n `in commission fees.`;\n workerScript.log(\"stock.short\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Bought a short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol} for{\" \"}\n . Paid in commission fees.\n ,\n );\n }\n\n return true;\n}\n\n/**\n * Attempt to sell a stock in the short position\n * @param {Stock} stock - Stock to sell\n * @param {number} shares - Number of shares to sell\n * @param {WorkerScript} workerScript - If this is being called through Netscript\n * @param opts - Optional configuration for this function's behavior. See top of file\n * @returns {boolean} true if successfully sells given amount OR max owned, false otherwise\n */\nexport function sellShort(\n stock: Stock,\n shares: number,\n workerScript: WorkerScript | null = null,\n opts: IOptions = {},\n): boolean {\n if (stock == null || isNaN(shares) || shares < 0) {\n if (workerScript) {\n workerScript.log(\"stock.sellShort\", () => `Invalid arguments: stock='${stock}' shares='${shares}'`);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n \"Failed to sell a short position in a stock. This is probably \" +\n \"due to an invalid quantity. Otherwise, this may be a bug, so contact developer\",\n );\n }\n\n return false;\n }\n shares = Math.round(shares);\n if (shares > stock.playerShortShares) {\n shares = stock.playerShortShares;\n }\n if (shares === 0) {\n return false;\n }\n\n const origCost = shares * stock.playerAvgShortPx;\n const totalGain = getSellTransactionGain(stock, shares, PositionTypes.Short);\n if (totalGain == null || isNaN(totalGain) || origCost == null) {\n if (workerScript) {\n workerScript.log(\n \"stock.sellShort\",\n () => `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n `Failed to sell short position in a stock. This is probably either due to invalid arguments, or a bug`,\n );\n }\n\n return false;\n }\n let profit = totalGain - origCost;\n if (isNaN(profit)) {\n profit = 0;\n }\n Player.gainMoney(totalGain, \"stock\");\n if (workerScript) {\n workerScript.scriptRef.onlineMoneyMade += profit;\n Player.scriptProdSinceLastAug += profit;\n }\n\n stock.playerShortShares = Math.round(stock.playerShortShares - shares);\n if (stock.playerShortShares === 0) {\n stock.playerAvgShortPx = 0;\n }\n processTransactionForecastMovement(stock, shares);\n\n if (opts.rerenderFn != null && typeof opts.rerenderFn === \"function\") {\n opts.rerenderFn();\n }\n\n if (workerScript) {\n const resultTxt =\n `Sold your short position of ${numeralWrapper.formatShares(shares)} shares of ${stock.symbol}. ` +\n `After commissions, you gained a total of ${numeralWrapper.formatMoney(totalGain)}`;\n workerScript.log(\"stock.sellShort\", () => resultTxt);\n } else if (!opts.suppressDialog) {\n dialogBoxCreate(\n <>\n Sold your short position of {numeralWrapper.formatShares(shares)} shares of {stock.symbol}. After commissions,\n you gained a total of \n ,\n );\n }\n\n return true;\n}\n","import React from \"react\";\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\nimport { Settings } from \"../Settings/Settings\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\nimport { BaseServer } from \"../Server/BaseServer\";\n\nexport class Output {\n text: string;\n color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\";\n constructor(text: string, color: \"primary\" | \"error\" | \"success\" | \"info\" | \"warn\") {\n if (Settings.TimestampsFormat) text = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + text;\n this.text = text;\n this.color = color;\n }\n}\n\nexport class RawOutput {\n raw: React.ReactNode;\n constructor(node: React.ReactNode) {\n if (Settings.TimestampsFormat)\n node = (\n <>\n [{formatTime(Settings.TimestampsFormat)}] {node}\n \n );\n this.raw = node;\n }\n}\n\nexport class Link {\n hostname: string;\n dashes: string;\n constructor(dashes: string, hostname: string) {\n if (Settings.TimestampsFormat) dashes = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + dashes;\n this.hostname = hostname;\n this.dashes = dashes;\n }\n}\n\nexport class TTimer {\n time: number;\n timeLeft: number;\n action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\";\n server?: BaseServer;\n\n constructor(time: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer) {\n this.time = time;\n this.timeLeft = time;\n this.action = action;\n this.server = server;\n }\n}\n\nexport interface ITerminal {\n action: TTimer | null;\n\n commandHistory: string[];\n commandHistoryIndex: number;\n\n outputHistory: (Output | Link | RawOutput)[];\n\n // True if a Coding Contract prompt is opened\n contractOpen: boolean;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir: string;\n\n print(s: string): void;\n printRaw(node: React.ReactNode): void;\n error(s: string): void;\n success(s: string): void;\n info(s: string): void;\n warn(s: string): void;\n\n clear(): void;\n startAnalyze(player: IPlayer): void;\n startBackdoor(player: IPlayer): void;\n startHack(player: IPlayer): void;\n startGrow(player: IPlayer): void;\n startWeaken(player: IPlayer): void;\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishGrow(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishWeaken(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAnalyze(player: IPlayer, server: BaseServer, cancelled?: boolean): void;\n finishAction(router: IRouter, player: IPlayer, cancelled?: boolean): void;\n getFilepath(filename: string): string;\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null;\n getScript(player: IPlayer, filename: string): Script | null;\n getTextFile(player: IPlayer, filename: string): TextFile | null;\n getLitFile(player: IPlayer, filename: string): string | null;\n cwd(): string;\n setcwd(dir: string): void;\n runContract(player: IPlayer, name: string): void;\n executeScanAnalyzeCommand(player: IPlayer, depth?: number, all?: boolean): void;\n connectToServer(player: IPlayer, server: string): void;\n executeCommand(router: IRouter, player: IPlayer, command: string): void;\n executeCommands(router: IRouter, player: IPlayer, commands: string): void;\n // If there was any changes, will return true, once.\n process(router: IRouter, player: IPlayer, cycles: number): void;\n prestige(): void;\n getProgressText(): string;\n}\n","import { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\n\ninterface ISkillParams {\n name: string;\n desc: string;\n\n baseCost?: number;\n costInc?: number;\n maxLvl?: number;\n\n successChanceAll?: number;\n successChanceStealth?: number;\n successChanceKill?: number;\n successChanceContract?: number;\n successChanceOperation?: number;\n successChanceEstimate?: number;\n\n actionTime?: number;\n\n effHack?: number;\n effStr?: number;\n effDef?: number;\n effDex?: number;\n effAgi?: number;\n effCha?: number;\n\n stamina?: number;\n money?: number;\n expGain?: number;\n}\n\nexport class Skill {\n name: string;\n desc: string;\n // Cost is in Skill Points\n baseCost = 1;\n // Additive cost increase per level\n costInc = 1;\n maxLvl = 0;\n\n /**\n * These benefits are additive. So total multiplier will be level (handled externally) times the\n * effects below\n */\n successChanceAll = 0;\n successChanceStealth = 0;\n successChanceKill = 0;\n successChanceContract = 0;\n successChanceOperation = 0;\n\n /**\n * This multiplier affects everything that increases synthoid population/community estimate\n * e.g. Field analysis, Investigation Op, Undercover Op\n */\n successChanceEstimate = 0;\n actionTime = 0;\n effHack = 0;\n effStr = 0;\n effDef = 0;\n effDex = 0;\n effAgi = 0;\n effCha = 0;\n stamina = 0;\n money = 0;\n expGain = 0;\n\n constructor(params: ISkillParams = { name: \"foo\", desc: \"foo\" }) {\n if (!params.name) {\n throw new Error(\"Failed to initialize Bladeburner Skill. No name was specified in ctor\");\n }\n if (!params.desc) {\n throw new Error(\"Failed to initialize Bladeburner Skills. No desc was specified in ctor\");\n }\n this.name = params.name;\n this.desc = params.desc;\n this.baseCost = params.baseCost ? params.baseCost : 1;\n this.costInc = params.costInc ? params.costInc : 1;\n\n if (params.maxLvl) {\n this.maxLvl = params.maxLvl;\n }\n\n if (params.successChanceAll) {\n this.successChanceAll = params.successChanceAll;\n }\n if (params.successChanceStealth) {\n this.successChanceStealth = params.successChanceStealth;\n }\n if (params.successChanceKill) {\n this.successChanceKill = params.successChanceKill;\n }\n if (params.successChanceContract) {\n this.successChanceContract = params.successChanceContract;\n }\n if (params.successChanceOperation) {\n this.successChanceOperation = params.successChanceOperation;\n }\n\n if (params.successChanceEstimate) {\n this.successChanceEstimate = params.successChanceEstimate;\n }\n\n if (params.actionTime) {\n this.actionTime = params.actionTime;\n }\n if (params.effHack) {\n this.effHack = params.effHack;\n }\n if (params.effStr) {\n this.effStr = params.effStr;\n }\n if (params.effDef) {\n this.effDef = params.effDef;\n }\n if (params.effDex) {\n this.effDex = params.effDex;\n }\n if (params.effAgi) {\n this.effAgi = params.effAgi;\n }\n if (params.effCha) {\n this.effCha = params.effCha;\n }\n\n if (params.stamina) {\n this.stamina = params.stamina;\n }\n if (params.money) {\n this.money = params.money;\n }\n if (params.expGain) {\n this.expGain = params.expGain;\n }\n }\n\n calculateCost(currentLevel: number): number {\n return Math.floor((this.baseCost + currentLevel * this.costInc) * BitNodeMultipliers.BladeburnerSkillCost);\n }\n\n getMultiplier(name: string): number {\n if (name === \"successChanceAll\") return this.successChanceAll;\n if (name === \"successChanceStealth\") return this.successChanceStealth;\n if (name === \"successChanceKill\") return this.successChanceKill;\n if (name === \"successChanceContract\") return this.successChanceContract;\n if (name === \"successChanceOperation\") return this.successChanceOperation;\n if (name === \"successChanceEstimate\") return this.successChanceEstimate;\n\n if (name === \"actionTime\") return this.actionTime;\n\n if (name === \"effHack\") return this.effHack;\n if (name === \"effStr\") return this.effStr;\n if (name === \"effDef\") return this.effDef;\n if (name === \"effDex\") return this.effDex;\n if (name === \"effAgi\") return this.effAgi;\n if (name === \"effCha\") return this.effCha;\n\n if (name === \"stamina\") return this.stamina;\n if (name === \"money\") return this.money;\n if (name === \"expGain\") return this.expGain;\n return 0;\n }\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n onConfirm: () => void;\n confirmationText: string | React.ReactNode;\n additionalButton?: React.ReactNode;\n}\n\nexport function ConfirmationModal(props: IProps): React.ReactElement {\n return (\n \n <>\n {props.confirmationText}\n {\n props.onConfirm();\n }}\n >\n Confirm\n \n {props.additionalButton && <>{props.additionalButton}}\n \n \n );\n}\n","export function hash(): string {\n try {\n if (__COMMIT_HASH__) {\n return __COMMIT_HASH__;\n }\n } catch (err) {}\n return \"DEV\";\n}\n","import { FactionNames } from \"../../Faction/data/FactionNames\";\n\nexport const GangConstants: {\n GangRespectToReputationRatio: number;\n MaximumGangMembers: number;\n CyclesPerTerritoryAndPowerUpdate: number;\n AscensionMultiplierRatio: number;\n Names: string[];\n} = {\n // Respect is divided by this to get rep gain\n GangRespectToReputationRatio: 75,\n MaximumGangMembers: 12,\n CyclesPerTerritoryAndPowerUpdate: 100,\n // Portion of upgrade multiplier that is kept after ascending\n AscensionMultiplierRatio: 0.15,\n // Names of possible Gangs\n Names: [\n FactionNames.SlumSnakes,\n FactionNames.Tetrads,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n FactionNames.NiteSec,\n FactionNames.TheBlackHand,\n ],\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 */\nimport { calculateRamUsage, RamUsageEntry } from \"./RamCalculations\";\nimport { ScriptUrl } from \"./ScriptUrl\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { roundToTwo } from \"../utils/helpers/roundToTwo\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nlet globalModuleSequenceNumber = 0;\n\ninterface ScriptReference {\n filename: string;\n server: string;\n}\n\nexport class Script {\n // Code for this script\n code = \"\";\n\n // Filename for the script file\n filename = \"\";\n\n // url of the script if any, only for NS2.\n url = \"\";\n\n // The dynamic module generated for this script when it is run.\n // This is only applicable for NetscriptJS\n module: any = \"\";\n\n // The timestamp when when the script was last updated.\n moduleSequenceNumber: number;\n\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 dependencies: ScriptUrl[] = [];\n dependents: ScriptReference[] = [];\n\n // Amount of RAM this Script requres to run\n ramUsage = 0;\n ramUsageEntries?: RamUsageEntry[];\n\n // hostname of server that this script is on.\n server = \"\";\n\n constructor(player: IPlayer | null = null, fn = \"\", code = \"\", server = \"\", otherScripts: Script[] = []) {\n this.filename = fn;\n this.code = code;\n this.ramUsage = 0;\n this.server = server; // hostname of server this script is on\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n if (this.code !== \"\" && player !== null) {\n this.updateRamUsage(player, otherScripts);\n }\n }\n\n /**\n * Download the script as a file\n */\n download(): void {\n const filename = this.filename;\n const file = new Blob([this.code], { type: \"text/plain\" });\n const navigator = window.navigator as any;\n if (navigator.msSaveOrOpenBlob) {\n // IE10+\n 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 setTimeout(function () {\n document.body.removeChild(a);\n window.URL.revokeObjectURL(url);\n }, 0);\n }\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 markUpdated(): void {\n this.module = \"\";\n this.moduleSequenceNumber = ++globalModuleSequenceNumber;\n }\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 saveScript(player: IPlayer, filename: string, code: string, hostname: string, otherScripts: Script[]): void {\n // Update code and filename\n this.code = Script.formatCode(code);\n\n this.filename = filename;\n this.server = hostname;\n this.updateRamUsage(player, otherScripts);\n this.markUpdated();\n for (const dependent of this.dependents) {\n const [dependentScript] = otherScripts.filter(\n (s) => s.filename === dependent.filename && s.server == dependent.server,\n );\n if (dependentScript !== null) dependentScript.markUpdated();\n }\n }\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 async updateRamUsage(player: IPlayer, otherScripts: Script[]): Promise {\n const res = await calculateRamUsage(player, this.code, otherScripts);\n if (res.cost > 0) {\n this.ramUsage = roundToTwo(res.cost);\n this.ramUsageEntries = res.entries;\n }\n this.markUpdated();\n }\n\n imports(): string[] {\n return [];\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"Script\", this);\n }\n\n // Initializes a Script Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Script {\n const s = Generic_fromJSON(Script, value.data);\n // Force the url to blank from the save data. Urls are not valid outside the current browser page load.\n s.url = \"\";\n s.dependents = [];\n return s;\n }\n\n /**\n * Formats code: Removes the starting & trailing whitespace\n * @param {string} code - The code to format\n * @returns The formatted code\n */\n static formatCode(code: string): string {\n return code.replace(/^\\s+|\\s+$/g, \"\");\n }\n}\n\nReviver.constructors.Script = Script;\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 */\nexport function arrayToString(a: T[]): string {\n const vals: any[] = [];\n for (let i = 0; i < a.length; ++i) {\n let elem: any = a[i];\n if (Array.isArray(elem)) {\n elem = arrayToString(elem);\n } else if (typeof elem === \"string\") {\n elem = `\"${elem}\"`;\n }\n vals.push(elem);\n }\n\n return `[${vals.join(\", \")}]`;\n}\n","import { DarkWebItem } from \"./DarkWebItem\";\nimport { IMap } from \"../types\";\nimport { Programs } from \"../Programs/Programs\";\n\nexport const DarkWebItems: IMap = {\n BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, \"Opens up SSH Ports.\"),\n FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, \"Opens up FTP Ports.\"),\n RelaySMTPProgram: new DarkWebItem(Programs.RelaySMTPProgram.name, 5e6, \"Opens up SMTP Ports.\"),\n HTTPWormProgram: new DarkWebItem(Programs.HTTPWormProgram.name, 30e6, \"Opens up HTTP Ports.\"),\n SQLInjectProgram: new DarkWebItem(Programs.SQLInjectProgram.name, 250e6, \"Opens up SQL Ports.\"),\n ServerProfiler: new DarkWebItem(\n Programs.ServerProfiler.name,\n 500000,\n \"Displays detailed information about a server.\",\n ),\n DeepscanV1: new DarkWebItem(Programs.DeepscanV1.name, 500000, \"Enables 'scan-analyze' with a depth up to 5.\"),\n DeepscanV2: new DarkWebItem(Programs.DeepscanV2.name, 25e6, \"Enables 'scan-analyze' with a depth up to 10.\"),\n AutolinkProgram: new DarkWebItem(Programs.AutoLink.name, 1e6, \"Enables direct connect via 'scan-analyze'.\"),\n FormulasProgram: new DarkWebItem(Programs.Formulas.name, 5e9, \"Unlock access to the formulas API.\"),\n};\n","import { Action } from \"./Action\";\nimport { IMap } from \"../types\";\n\nexport const GeneralActions: IMap = {};\n\nconst actionNames : Array = [\n \"Training\",\n \"Field Analysis\",\n \"Recruitment\",\n \"Diplomacy\",\n \"Hyperbolic Regeneration Chamber\",\n \"Incite Violence\"\n];\n\nfor (const actionName of actionNames){\n GeneralActions[actionName] = new Action({\n name: actionName,\n });\n}\n","// Enum values are lowercased to match css classes\nexport enum Suit {\n Clubs = \"clubs\",\n Diamonds = \"diamonds\",\n Hearts = \"hearts\",\n Spades = \"spades\",\n}\n\nexport class Card {\n constructor(readonly value: number, readonly suit: Suit) {\n if (value < 1 || value > 13) {\n throw new Error(`Card instantiated with improper value: ${value}`);\n }\n }\n\n formatValue(): string {\n switch (this.value) {\n case 1:\n return \"A\";\n case 11:\n return \"J\";\n case 12:\n return \"Q\";\n case 13:\n return \"K\";\n default:\n return `${this.value}`;\n }\n }\n\n isRedSuit(): boolean {\n return this.suit === Suit.Hearts || this.suit === Suit.Diamonds;\n }\n\n getStringRepresentation(): string {\n const value = this.formatValue();\n\n return `${value} of ${this.suit}`;\n }\n}\n","import { IActionIdentifier } from \"./IActionIdentifier\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\ninterface IParams {\n name?: string;\n type?: number;\n}\n\nexport class ActionIdentifier implements IActionIdentifier {\n name = \"\";\n type = -1;\n\n constructor(params: IParams = {}) {\n if (params.name) this.name = params.name;\n if (params.type) this.type = params.type;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"ActionIdentifier\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActionIdentifier {\n return Generic_fromJSON(ActionIdentifier, value.data);\n }\n}\n\nReviver.constructors.ActionIdentifier = ActionIdentifier;\n","import { BitNodes } from \"../BitNode/BitNode\";\n\nexport class SourceFile {\n info: JSX.Element;\n lvl = 1;\n n: number;\n name: string;\n owned = false;\n\n constructor(number: number, info: JSX.Element) {\n const bitnodeKey = \"BitNode\" + number;\n const bitnode = BitNodes[bitnodeKey];\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","// Base class representing a person-like object\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { IPlayerOwnedAugmentation } from \"../Augmentation/PlayerOwnedAugmentation\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { CONSTANTS } from \"../Constants\";\nimport { calculateSkill } from \"./formulas/skill\";\nimport { calculateIntelligenceBonus } from \"./formulas/intelligence\";\n\n// Interface that defines a generic object used to track experience/money\n// earnings for tasks\nexport interface ITaskTracker {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n money: number;\n}\n\nexport function createTaskTracker(): ITaskTracker {\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}\n\nexport abstract class Person {\n /**\n * Stats\n */\n hacking = 1;\n strength = 1;\n defense = 1;\n dexterity = 1;\n agility = 1;\n charisma = 1;\n intelligence = 1;\n hp = 10;\n max_hp = 10;\n\n /**\n * Experience\n */\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n /**\n * Multipliers\n */\n hacking_mult = 1;\n strength_mult = 1;\n defense_mult = 1;\n dexterity_mult = 1;\n agility_mult = 1;\n charisma_mult = 1;\n\n hacking_exp_mult = 1;\n strength_exp_mult = 1;\n defense_exp_mult = 1;\n dexterity_exp_mult = 1;\n agility_exp_mult = 1;\n charisma_exp_mult = 1;\n\n hacking_chance_mult = 1;\n hacking_speed_mult = 1;\n hacking_money_mult = 1;\n hacking_grow_mult = 1;\n\n company_rep_mult = 1;\n faction_rep_mult = 1;\n\n crime_money_mult = 1;\n crime_success_mult = 1;\n\n work_money_mult = 1;\n\n hacknet_node_money_mult = 1;\n hacknet_node_purchase_cost_mult = 1;\n hacknet_node_ram_cost_mult = 1;\n hacknet_node_core_cost_mult = 1;\n hacknet_node_level_cost_mult = 1;\n\n bladeburner_max_stamina_mult = 1;\n bladeburner_stamina_gain_mult = 1;\n bladeburner_analysis_mult = 1;\n bladeburner_success_chance_mult = 1;\n\n /**\n * Augmentations\n */\n augmentations: IPlayerOwnedAugmentation[] = [];\n queuedAugmentations: IPlayerOwnedAugmentation[] = [];\n\n /**\n * City that the person is in\n */\n city: CityName = CityName.Sector12;\n\n /**\n * Updates this object's multipliers for the given augmentation\n */\n applyAugmentation(aug: Augmentation): void {\n for (const mult of Object.keys(aug.mults)) {\n if ((this as any)[mult] == null) {\n console.warn(`Augmentation has unrecognized multiplier property: ${mult}`);\n } else {\n (this as any)[mult] *= aug.mults[mult];\n }\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 calculateStat(exp: number, mult = 1): number {\n return calculateSkill(exp, mult);\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Field Work for a faction\n */\n getFactionFieldWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / 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 5.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Hacking Work for a faction\n */\n getFactionHackingWorkRepGain(): number {\n return (this.hacking / CONSTANTS.MaxSkillLevel) * this.faction_rep_mult;\n }\n\n /**\n * Calculate and return the amount of faction reputation earned per cycle\n * when doing Security Work for a faction\n */\n getFactionSecurityWorkRepGain(): number {\n const t =\n (0.9 *\n (this.hacking / CONSTANTS.MaxSkillLevel +\n this.strength / CONSTANTS.MaxSkillLevel +\n this.defense / CONSTANTS.MaxSkillLevel +\n this.dexterity / CONSTANTS.MaxSkillLevel +\n this.agility / CONSTANTS.MaxSkillLevel)) /\n 4.5;\n return t * this.faction_rep_mult;\n }\n\n /**\n * Reset all multipliers to 1\n */\n resetMultipliers(): void {\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\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\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n this.work_money_mult = 1;\n }\n\n /**\n * Update all stat levels\n */\n updateStatLevels(): void {\n this.hacking = Math.max(\n 1,\n Math.floor(this.calculateStat(this.hacking_exp, this.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier)),\n );\n this.strength = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.strength_exp, this.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier),\n ),\n );\n this.defense = Math.max(\n 1,\n Math.floor(this.calculateStat(this.defense_exp, this.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier)),\n );\n this.dexterity = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.dexterity_exp, this.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier),\n ),\n );\n this.agility = Math.max(\n 1,\n Math.floor(this.calculateStat(this.agility_exp, this.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier)),\n );\n this.charisma = Math.max(\n 1,\n Math.floor(\n this.calculateStat(this.charisma_exp, this.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier),\n ),\n );\n\n const ratio: number = 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: number): number {\n return calculateIntelligenceBonus(this.intelligence, weight);\n }\n}\n","import React from 'react';\nimport { MathJax, MathJaxContext } from \"better-react-mathjax\";\n\ninterface IProps {\n children: React.ReactNode;\n}\n\nexport function MathJaxWrapper({ children }: IProps): React.ReactElement {\n return (\n \n {children}\n \n )\n}\n","import { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ninterface IError {\n fileName?: string;\n lineNumber?: number;\n}\n\nexport function exceptionAlert(e: IError | string): void {\n console.error(e);\n dialogBoxCreate(\n \"Caught an exception: \" +\n e +\n \"

    \" +\n \"Filename: \" +\n ((e as any).fileName || \"UNKNOWN FILE NAME\") +\n \"

    \" +\n \"Line Number: \" +\n ((e as any).lineNumber || \"UNKNOWN LINE NUMBER\") +\n \"

    \" +\n \"This is a bug, please report to game developer with this \" +\n \"message as well as details about how to reproduce the bug.

    \" +\n \"If you want to be safe, I suggest refreshing the game WITHOUT saving so that your \" +\n \"safe doesn't get corrupted\",\n );\n}\n","import { Message } from \"./Message\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Player } from \"../Player\";\nimport { redPillFlag } from \"../RedPill\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver } from \"../utils/JSONReviver\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\n//Sends message to player, including a pop up\nfunction sendMessage(msg: Message, forced = false): void {\n msg.recvd = true;\n if (forced || !Settings.SuppressMessages) {\n showMessage(msg.filename);\n }\n addMessageToServer(msg, \"home\");\n}\n\nfunction showMessage(name: string): void {\n const msg = Messages[name];\n if (!msg) throw new Error(\"trying to display unexistent message\");\n const txt =\n \"Message received from unknown sender:

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

    \" +\n \"This message was saved as \" +\n msg.filename +\n \" onto your home computer.\";\n dialogBoxCreate(txt);\n}\n\n//Adds a message to a server\nfunction addMessageToServer(msg: Message, serverHostname: string): void {\n const server = GetServer(serverHostname);\n if (server == null) {\n console.warn(`Could not find server ${serverHostname}`);\n return;\n }\n for (let i = 0; i < server.messages.length; ++i) {\n const other = server.messages[i];\n if (msg.filename === other) {\n return; //Already exists\n }\n }\n server.messages.push(msg.filename);\n}\n\n//Checks if any of the 'timed' messages should be sent\nfunction checkForMessagesToSend(): void {\n if (redPillFlag) return;\n const jumper0 = Messages[MessageFilenames.Jumper0];\n const jumper1 = Messages[MessageFilenames.Jumper1];\n const jumper2 = Messages[MessageFilenames.Jumper2];\n const jumper3 = Messages[MessageFilenames.Jumper3];\n const jumper4 = Messages[MessageFilenames.Jumper4];\n const cybersecTest = Messages[MessageFilenames.CyberSecTest];\n const nitesecTest = Messages[MessageFilenames.NiteSecTest];\n const bitrunnersTest = Messages[MessageFilenames.BitRunnersTest];\n const redpill = Messages[MessageFilenames.RedPill];\n\n let redpillOwned = false;\n if (Augmentations[AugmentationNames.TheRedPill].owned) {\n redpillOwned = true;\n }\n\n if (redpill && redpillOwned && Player.sourceFiles.length === 0 && !redPillFlag) {\n sendMessage(redpill, true);\n } else if (redpill && redpillOwned) {\n //If player has already destroyed a BitNode, message is not forced\n if (!redPillFlag) {\n sendMessage(redpill);\n }\n } else if (jumper0 && !jumper0.recvd && Player.hacking >= 25) {\n sendMessage(jumper0);\n const flightName = Programs.Flight.name;\n const homeComp = Player.getHomeComputer();\n if (!homeComp.programs.includes(flightName)) {\n homeComp.programs.push(flightName);\n }\n } else if (jumper1 && !jumper1.recvd && Player.hacking >= 40) {\n sendMessage(jumper1);\n } else if (cybersecTest && !cybersecTest.recvd && Player.hacking >= 50) {\n sendMessage(cybersecTest);\n } else if (jumper2 && !jumper2.recvd && Player.hacking >= 175) {\n sendMessage(jumper2);\n } else if (nitesecTest && !nitesecTest.recvd && Player.hacking >= 200) {\n sendMessage(nitesecTest);\n } else if (jumper3 && !jumper3.recvd && Player.hacking >= 350) {\n sendMessage(jumper3);\n } else if (jumper4 && !jumper4.recvd && Player.hacking >= 490) {\n sendMessage(jumper4);\n } else if (bitrunnersTest && !bitrunnersTest.recvd && Player.hacking >= 500) {\n sendMessage(bitrunnersTest);\n }\n}\n\nfunction AddToAllMessages(msg: Message): void {\n Messages[msg.filename] = msg;\n}\n\nlet Messages: { [key: string]: Message | undefined } = {};\n\nfunction loadMessages(saveString: string): void {\n Messages = JSON.parse(saveString, Reviver);\n}\n\nconst 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(): void {\n //Reset\n Messages = {};\n\n //jump3R Messages\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper0,\n \"I know you can sense it. I know you're searching for it. \" +\n \"It's why you spend night after \" +\n \"night at your computer.

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

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

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

    \" +\n \"-jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper1,\n `Soon you will be contacted by a hacking group known as ${FactionNames.NiteSec}. ` +\n \"They can help you with your search.

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

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

    Watch out for a hacking group known as ${FactionNames.NiteSec}.` +\n \"

    -jump3R\",\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.Jumper3,\n \"You must learn to walk before you can run. And you must \" +\n `run before you can fly. Look for ${FactionNames.TheBlackHand}.

    ` +\n \"I.I.I.I

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

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

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

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

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

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

    -${FactionNames.NiteSec}`,\n ),\n );\n AddToAllMessages(\n new Message(\n MessageFilenames.BitRunnersTest,\n \"We know what you are doing. We know what drives you. We know \" +\n \"what you are looking for.

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

    \" +\n \"run4theh111z\",\n ),\n );\n\n AddToAllMessages(\n new Message(\n MessageFilenames.RedPill,\n \"@)(#V%*N)@(#*)*C)@#%*)*V)@#(*%V@)(#VN%*)@#(*%
    \" +\n \")@B(*#%)@)M#B*%V)____FIND___#$@)#%(B*)@#(*%B)
    \" +\n \"@_#(%_@#M(BDSPOMB__THE-CAVE_#)$(*@#$)@#BNBEGB
    \" +\n \"DFLSMFVMV)#@($*)@#*$MV)@#(*$V)M#(*$)M@(#*VM$)\",\n ),\n );\n}\n\nexport { Messages, checkForMessagesToSend, showMessage, loadMessages, initMessages };\n","/**\n * The worker agent for running a script instance. Each running script instance\n * has its own underlying WorkerScript object.\n *\n * Note that these objects are not saved and re-loaded when the game is refreshed.\n * Instead, whenever the game is opened, WorkerScripts are re-created from\n * RunningScript objects\n */\nimport { Environment } from \"./Environment\";\nimport { RamCostConstants } from \"./RamCostGenerator\";\n\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { IMap } from \"../types\";\n\nexport class WorkerScript {\n /**\n * Script's arguments\n */\n args: any[];\n\n /**\n * Copy of the script's code\n */\n code = \"\";\n\n /**\n * Holds the timeoutID (numeric value) for whenever this script is blocked by a\n * timed Netscript function. i.e. Holds the return value of setTimeout()\n */\n delay: number | null = null;\n\n /**\n * Holds the Promise reject() function while the script is \"blocked\" by an async op\n */\n delayReject?: (reason?: any) => void;\n\n /**\n * Stores names of all functions that have logging disabled\n */\n disableLogs: IMap = {};\n\n /**\n * Used for dynamic RAM calculation. Stores names of all functions that have\n * already been checked by this script.\n * TODO: Could probably just combine this with loadedFns?\n */\n dynamicLoadedFns: IMap = {};\n\n /**\n * Tracks dynamic RAM usage\n */\n dynamicRamUsage: number = RamCostConstants.ScriptBaseRamCost;\n\n /**\n * Netscript Environment for this script\n */\n env: Environment;\n\n /**\n * Status message in case of script error. Currently unused I think\n */\n errorMessage = \"\";\n\n /**\n * Used for static RAM calculation. Stores names of all functions that have\n * already been checked by this script\n */\n loadedFns: IMap = {};\n\n /**\n * Filename of script\n */\n name: string;\n\n /**\n * Script's output/return value. Currently not used or implemented\n */\n output = \"\";\n\n /**\n * Process ID. Must be an integer. Used for efficient script\n * killing and removal.\n */\n pid: number;\n\n /**\n * Script's Static RAM usage. Equivalent to underlying script's RAM usage\n */\n ramUsage = 0;\n\n /**\n * Whether or not this workerScript is currently running\n */\n running = false;\n\n /**\n * Reference to underlying RunningScript object\n */\n scriptRef: RunningScript;\n\n /**\n * hostname on which this script is running\n */\n hostname: string;\n\n /**\n * Function called when the script ends.\n */\n atExit: any;\n\n constructor(runningScriptObj: RunningScript, pid: number, nsFuncsGenerator?: (ws: WorkerScript) => any) {\n this.name = runningScriptObj.filename;\n this.hostname = runningScriptObj.server;\n\n const sanitizedPid = Math.round(pid);\n if (typeof sanitizedPid !== \"number\" || isNaN(sanitizedPid)) {\n throw new Error(`Invalid PID when constructing WorkerScript: ${pid}`);\n }\n this.pid = sanitizedPid;\n runningScriptObj.pid = sanitizedPid;\n\n // Get the underlying script's code\n const server = GetServer(this.hostname);\n if (server == null) {\n throw new Error(`WorkerScript constructed with invalid server ip: ${this.hostname}`);\n }\n let found = false;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n found = true;\n this.code = server.scripts[i].code;\n }\n }\n if (!found) {\n throw new Error(`WorkerScript constructed with invalid script filename: ${this.name}`);\n }\n this.scriptRef = runningScriptObj;\n this.args = runningScriptObj.args.slice();\n this.env = new Environment(null);\n if (typeof nsFuncsGenerator === \"function\") {\n this.env.vars = nsFuncsGenerator(this);\n }\n this.env.set(\"args\", runningScriptObj.args.slice());\n }\n\n /**\n * Returns the Server on which this script is running\n */\n getServer(): BaseServer {\n const server = GetServer(this.hostname);\n if (server == null) throw new Error(`Script ${this.name} pid ${this.pid} is running on non-existent server?`);\n return server;\n }\n\n /**\n * Returns the Script object for the underlying script.\n * Returns null if it cannot be found (which would be a bug)\n */\n getScript(): Script | null {\n const server = this.getServer();\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === this.name) {\n return server.scripts[i];\n }\n }\n\n console.error(\n \"Failed to find underlying Script object in WorkerScript.getScript(). This probably means somethings wrong\",\n );\n return null;\n }\n\n /**\n * Returns the script with the specified filename on the specified server,\n * or null if it cannot be found\n */\n getScriptOnServer(fn: string, server: BaseServer): Script | null {\n if (server == null) {\n server = this.getServer();\n }\n\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename === fn) {\n return server.scripts[i];\n }\n }\n\n return null;\n }\n\n shouldLog(fn: string): boolean {\n return this.disableLogs[fn] == null;\n }\n\n log(func: string, txt: () => string): void {\n if (this.shouldLog(func)) {\n if (func && txt) {\n this.scriptRef.log(`${func}: ${txt()}`);\n } else if (func) {\n this.scriptRef.log(func);\n } else {\n this.scriptRef.log(txt());\n }\n }\n }\n\n print(txt: string): void {\n this.scriptRef.log(txt);\n }\n}\n","import { BlackOperation } from \"./BlackOperation\";\nimport { IMap } from \"../types\";\nimport { BlackOperationNames } from \"./data/BlackOperationNames\";\n\nexport const BlackOperations: IMap = {};\n\n(function () {\n BlackOperations[BlackOperationNames.OperationTyphoon] = new BlackOperation({\n name: BlackOperationNames.OperationTyphoon,\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[BlackOperationNames.OperationZero] = new BlackOperation({\n name: BlackOperationNames.OperationZero,\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[BlackOperationNames.OperationX] = new BlackOperation({\n name: BlackOperationNames.OperationX,\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[BlackOperationNames.OperationTitan] = new BlackOperation({\n name: BlackOperationNames.OperationTitan,\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[BlackOperationNames.OperationAres] = new BlackOperation({\n name: BlackOperationNames.OperationAres,\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[BlackOperationNames.OperationArchangel] = new BlackOperation({\n name: BlackOperationNames.OperationArchangel,\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[BlackOperationNames.OperationJuggernaut] = new BlackOperation({\n name: BlackOperationNames.OperationJuggernaut,\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[BlackOperationNames.OperationRedDragon] = new BlackOperation({\n name: BlackOperationNames.OperationRedDragon,\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[BlackOperationNames.OperationK] = new BlackOperation({\n name: BlackOperationNames.OperationK,\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[BlackOperationNames.OperationDeckard] = new BlackOperation({\n name: BlackOperationNames.OperationDeckard,\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[BlackOperationNames.OperationTyrell] = new BlackOperation({\n name: BlackOperationNames.OperationTyrell,\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[BlackOperationNames.OperationWallace] = new BlackOperation({\n name: BlackOperationNames.OperationWallace,\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[BlackOperationNames.OperationShoulderOfOrion] = new BlackOperation({\n name: BlackOperationNames.OperationShoulderOfOrion,\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[BlackOperationNames.OperationHyron] = new BlackOperation({\n name: BlackOperationNames.OperationHyron,\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[BlackOperationNames.OperationMorpheus] = new BlackOperation({\n name: BlackOperationNames.OperationMorpheus,\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[BlackOperationNames.OperationIonStorm] = new BlackOperation({\n name: BlackOperationNames.OperationIonStorm,\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[BlackOperationNames.OperationAnnihilus] = new BlackOperation({\n name: BlackOperationNames.OperationAnnihilus,\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[BlackOperationNames.OperationUltron] = new BlackOperation({\n name: BlackOperationNames.OperationUltron,\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[BlackOperationNames.OperationCenturion] = new BlackOperation({\n name: BlackOperationNames.OperationCenturion,\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[BlackOperationNames.OperationVindictus] = new BlackOperation({\n name: BlackOperationNames.OperationVindictus,\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[BlackOperationNames.OperationDaedalus] = new BlackOperation({\n name: BlackOperationNames.OperationDaedalus,\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","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IPlayerOrSleeve } from \"../PersonObjects/IPlayerOrSleeve\";\nimport { IRouter } from \"../ui/Router\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\n\ninterface IConstructorParams {\n hacking_success_weight?: number;\n strength_success_weight?: number;\n defense_success_weight?: number;\n dexterity_success_weight?: number;\n agility_success_weight?: number;\n charisma_success_weight?: number;\n hacking_exp?: number;\n strength_exp?: number;\n defense_exp?: number;\n dexterity_exp?: number;\n agility_exp?: number;\n charisma_exp?: number;\n intelligence_exp?: number;\n\n kills?: number;\n}\n\nexport class Crime {\n // Number representing the difficulty of the crime. Used for success chance calculations\n difficulty = 0;\n\n // Amount of karma lost for SUCCESSFULLY committing this crime\n karma = 0;\n\n // How many people die as a result of this crime\n kills = 0;\n\n // How much money is given by the\n money = 0;\n\n // Name of crime\n name = \"\";\n\n // Milliseconds it takes to attempt the crime\n time = 0;\n\n // Corresponding type in CONSTANTS. Contains a description for the crime activity\n type = \"\";\n\n // Weighting factors that determine how stats affect the success rate of this crime\n hacking_success_weight = 0;\n strength_success_weight = 0;\n defense_success_weight = 0;\n dexterity_success_weight = 0;\n agility_success_weight = 0;\n charisma_success_weight = 0;\n\n // How much stat experience is granted by this crime\n hacking_exp = 0;\n strength_exp = 0;\n defense_exp = 0;\n dexterity_exp = 0;\n agility_exp = 0;\n charisma_exp = 0;\n intelligence_exp = 0;\n\n constructor(name = \"\", type = \"\", time = 0, money = 0, difficulty = 0, karma = 0, params: IConstructorParams = {}) {\n this.name = name;\n this.type = type;\n this.time = time;\n this.money = money;\n this.difficulty = difficulty;\n this.karma = karma;\n\n this.hacking_success_weight = params.hacking_success_weight ? params.hacking_success_weight : 0;\n this.strength_success_weight = params.strength_success_weight ? params.strength_success_weight : 0;\n this.defense_success_weight = params.defense_success_weight ? params.defense_success_weight : 0;\n this.dexterity_success_weight = params.dexterity_success_weight ? params.dexterity_success_weight : 0;\n this.agility_success_weight = params.agility_success_weight ? params.agility_success_weight : 0;\n this.charisma_success_weight = params.charisma_success_weight ? params.charisma_success_weight : 0;\n\n this.hacking_exp = params.hacking_exp ? params.hacking_exp : 0;\n this.strength_exp = params.strength_exp ? params.strength_exp : 0;\n this.defense_exp = params.defense_exp ? params.defense_exp : 0;\n this.dexterity_exp = params.dexterity_exp ? params.dexterity_exp : 0;\n this.agility_exp = params.agility_exp ? params.agility_exp : 0;\n this.charisma_exp = params.charisma_exp ? params.charisma_exp : 0;\n this.intelligence_exp = params.intelligence_exp ? params.intelligence_exp : 0;\n\n this.kills = params.kills ? params.kills : 0;\n }\n\n commit(router: IRouter, p: IPlayer, div = 1, workerScript: WorkerScript | null = null): number {\n if (div <= 0) {\n div = 1;\n }\n p.startCrime(\n router,\n this.type,\n this.hacking_exp / div,\n this.strength_exp / div,\n this.defense_exp / div,\n this.dexterity_exp / div,\n this.agility_exp / div,\n this.charisma_exp / div,\n this.money / div,\n this.time,\n workerScript,\n );\n\n return this.time;\n }\n\n successRate(p: IPlayerOrSleeve): number {\n let chance: number =\n this.hacking_success_weight * p.hacking +\n this.strength_success_weight * p.strength +\n this.defense_success_weight * p.defense +\n this.dexterity_success_weight * p.dexterity +\n this.agility_success_weight * p.agility +\n this.charisma_success_weight * p.charisma +\n CONSTANTS.IntelligenceCrimeWeight * p.intelligence;\n chance /= CONSTANTS.MaxSkillLevel;\n chance /= this.difficulty;\n chance *= p.crime_success_mult;\n chance *= p.getIntelligenceBonus(1);\n\n return Math.min(chance, 1);\n }\n}\n","export function calculateIntelligenceBonus(intelligence: number, weight = 1): number {\n return 1 + (weight * Math.pow(intelligence, 0.8)) / 600;\n}\n","// The Research Map is an object that holds all Corporation Research objects\n// as values. They are identified by their names\nimport { Research, IConstructorParams } from \"./Research\";\nimport { researchMetadata } from \"./data/ResearchMetadata\";\nimport { IMap } from \"../types\";\n\nexport const ResearchMap: IMap = {};\n\nfunction addResearch(p: IConstructorParams): void {\n if (ResearchMap[p.name] != null) {\n console.warn(`Duplicate Research being defined: ${p.name}`);\n }\n ResearchMap[p.name] = new Research(p);\n}\n\nfor (const metadata of researchMetadata) {\n addResearch(metadata);\n}\n","/**\n * React Component for a button that's used to apply for a job\n */\nimport * as React from \"react\";\n\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { getJobRequirementText } from \"../../Company/GetJobRequirementText\";\n\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ntype IProps = {\n company: Company;\n entryPosType: CompanyPosition;\n onClick: (e: React.MouseEvent) => void;\n text: string;\n};\n\nexport function ApplyToJobButton(props: IProps): React.ReactElement {\n const player = use.Player();\n\n function getJobRequirementTooltip(): string {\n const pos = player.getNextCompanyPosition(props.company, props.entryPosType);\n if (pos == null) {\n return \"\";\n }\n\n if (!props.company.hasPosition(pos)) {\n return \"\";\n }\n\n return getJobRequirementText(props.company, pos, true);\n }\n\n return (\n <>\n }>\n \n \n \n );\n}\n","/**\n * Event emitter that triggers when scripts are started/stopped\n */\nimport { EventEmitter } from \"../utils/EventEmitter\";\n\nexport const WorkerScriptStartStopEventEmitter = new EventEmitter<[]>();\n","import { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { Terminal } from \"./Terminal\";\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\nimport { IMap, IReturnStatus } from \"./types\";\nimport { GetServer } from \"./Server/AllServers\";\nimport { ImportPlayerData, SaveData, saveObject } from \"./SaveObject\";\nimport { Settings } from \"./Settings/Settings\";\nimport { exportScripts } from \"./Terminal/commands/download\";\nimport { CONSTANTS } from \"./Constants\";\nimport { hash } from \"./hash/hash\";\n\nexport function initElectron(): void {\n const userAgent = navigator.userAgent.toLowerCase();\n if (userAgent.indexOf(\" electron/\") > -1) {\n // Electron-specific code\n (document as any).achievements = [];\n initWebserver();\n initAppNotifier();\n initSaveFunctions();\n initElectronBridge();\n }\n}\n\nfunction initWebserver(): void {\n interface IReturnWebStatus extends IReturnStatus {\n data?: {\n [propName: string]: any;\n };\n }\n function normalizeFileName(filename: string): string {\n filename = filename.replace(/\\/\\/+/g, \"/\");\n filename = removeLeadingSlash(filename);\n if (filename.includes(\"/\")) {\n filename = \"/\" + removeLeadingSlash(filename);\n }\n return filename;\n }\n\n (document as any).getFiles = function (): IReturnWebStatus {\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return {\n res: true,\n data: {\n files: home.scripts.map((script) => ({\n filename: script.filename,\n code: script.code,\n ramUsage: script.ramUsage,\n })),\n },\n };\n };\n\n (document as any).deleteFile = function (filename: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n return home.removeFile(filename);\n };\n\n (document as any).saveFile = function (filename: string, code: string): IReturnWebStatus {\n filename = normalizeFileName(filename);\n\n code = Buffer.from(code, \"base64\").toString();\n const home = GetServer(\"home\");\n if (home === null) {\n return {\n res: false,\n msg: \"Home server does not exist.\",\n };\n }\n const { success, overwritten } = home.writeToScriptFile(Player, filename, code);\n let script;\n if (success) {\n script = home.getScript(filename);\n }\n return {\n res: success,\n data: {\n overwritten,\n ramUsage: script?.ramUsage,\n },\n };\n };\n}\n\n// Expose certain alert functions to allow the wrapper to sends message to the game\nfunction initAppNotifier(): void {\n const funcs = {\n terminal: (message: string, type?: string) => {\n const typesFn: IMap<(s: string) => void> = {\n info: Terminal.info,\n warn: Terminal.warn,\n error: Terminal.error,\n success: Terminal.success,\n };\n let fn;\n if (type) fn = typesFn[type];\n if (!fn) fn = Terminal.print;\n fn.bind(Terminal)(message);\n },\n toast: (message: string, type: \"info\" | \"success\" | \"warning\" | \"error\", duration = 2000) =>\n SnackbarEvents.emit(message, type, duration),\n };\n\n // Will be consumud by the electron wrapper.\n (window as any).appNotifier = funcs;\n}\n\nfunction initSaveFunctions(): void {\n const funcs = {\n triggerSave: (): Promise => saveObject.saveGame(true),\n triggerGameExport: (): void => {\n try {\n saveObject.exportGame();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export game.\", \"error\", 2000);\n }\n },\n triggerScriptsExport: (): void => exportScripts(\"*\", Player.getHomeComputer()),\n getSaveData: (): { save: string; fileName: string } => {\n return {\n save: saveObject.getSaveString(Settings.ExcludeRunningScriptsFromSave),\n fileName: saveObject.getSaveFileName(),\n };\n },\n getSaveInfo: async (base64save: string): Promise => {\n try {\n const data = await saveObject.getImportDataFromString(base64save);\n return data.playerData;\n } catch (error) {\n console.error(error);\n return;\n }\n },\n pushSaveData: (base64save: string, automatic = false): void => Router.toImportSave(base64save, automatic),\n };\n\n // Will be consumud by the electron wrapper.\n (window as any).appSaveFns = funcs;\n}\n\nfunction initElectronBridge(): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.receive(\"get-save-data-request\", () => {\n const data = (window as any).appSaveFns.getSaveData();\n bridge.send(\"get-save-data-response\", data);\n });\n bridge.receive(\"get-save-info-request\", async (save: string) => {\n const data = await (window as any).appSaveFns.getSaveInfo(save);\n bridge.send(\"get-save-info-response\", data);\n });\n bridge.receive(\"push-save-request\", ({ save, automatic = false }: { save: string; automatic: boolean }) => {\n (window as any).appSaveFns.pushSaveData(save, automatic);\n });\n bridge.receive(\"trigger-save\", () => {\n return (window as any).appSaveFns\n .triggerSave()\n .then(() => {\n bridge.send(\"save-completed\");\n })\n .catch((error: any) => {\n console.log(error);\n SnackbarEvents.emit(\"Could not save game.\", \"error\", 2000);\n });\n });\n bridge.receive(\"trigger-game-export\", () => {\n try {\n (window as any).appSaveFns.triggerGameExport();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export game.\", \"error\", 2000);\n }\n });\n bridge.receive(\"trigger-scripts-export\", () => {\n try {\n (window as any).appSaveFns.triggerScriptsExport();\n } catch (error) {\n console.log(error);\n SnackbarEvents.emit(\"Could not export scripts.\", \"error\", 2000);\n }\n });\n}\n\nexport function pushGameSaved(data: SaveData): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.send(\"push-game-saved\", data);\n}\n\nexport function pushGameReady(): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n // Send basic information to the electron wrapper\n bridge.send(\"push-game-ready\", {\n player: {\n identifier: Player.identifier,\n playtime: Player.totalPlaytime,\n lastSave: Player.lastSave,\n },\n game: {\n version: CONSTANTS.VersionString,\n hash: hash(),\n },\n });\n}\n\nexport function pushImportResult(wasImported: boolean): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.send(\"push-import-result\", { wasImported });\n pushDisableRestore();\n}\n\nexport function pushDisableRestore(): void {\n const bridge = (window as any).electronBridge as any;\n if (!bridge) return;\n\n bridge.send(\"push-disable-restore\", { duration: 1000 * 60 });\n}\n","import { PlayerObject } from \"src/PersonObjects/Player/PlayerObject\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { SkillNames } from \"../Bladeburner/data/SkillNames\";\nimport { Skills } from \"../Bladeburner/Skills\";\nimport { CONSTANTS } from \"../Constants\";\nimport { Industries } from \"../Corporation/IndustryData\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport { Factions } from \"../Faction/Factions\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { hasHacknetServers } from \"../Hacknet/HacknetHelpers\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Player } from \"../Player\";\nimport { Programs } from \"../Programs/Programs\";\nimport { GetAllServers, GetServer } from \"../Server/AllServers\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Server } from \"../Server/Server\";\nimport { Router } from \"../ui/GameRoot\";\nimport { Page } from \"../ui/Router\";\nimport { IMap } from \"../types\";\nimport * as data from \"./AchievementData.json\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\nimport { BlackOperationNames } from \"../Bladeburner/data/BlackOperationNames\";\n\n// Unable to correctly cast the JSON data into AchievementDataJson type otherwise...\nconst achievementData = ((data)).achievements;\n\nexport interface Achievement {\n ID: string;\n Icon?: string;\n Name?: string;\n Description?: string;\n Secret?: boolean;\n Condition: () => boolean;\n Visible?: () => boolean;\n AdditionalUnlock?: string[]; // IDs of achievements that should be awarded when awarding this one\n}\n\nexport interface PlayerAchievement {\n ID: string;\n unlockedOn?: number;\n}\n\nexport interface AchievementDataJson {\n achievements: IMap;\n}\n\nexport interface AchievementData {\n ID: string;\n Name: string;\n Description: string;\n}\n\nfunction bitNodeFinishedState(): boolean {\n const wd = GetServer(SpecialServers.WorldDaemon);\n if (!(wd instanceof Server)) return false;\n if (wd.backdoorInstalled) return true;\n return (\n Player.bladeburner !== null && Player.bladeburner.blackops.hasOwnProperty(BlackOperationNames.OperationDaedalus)\n );\n}\n\nfunction hasAccessToSF(player: PlayerObject, bn: number): boolean {\n return player.bitNodeN === bn || player.sourceFiles.some((a) => a.n === bn);\n}\n\nfunction knowsAboutBitverse(player: PlayerObject): boolean {\n return player.sourceFiles.some((a) => a.n === 1);\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction sfAchievement(): Achievement[] {\n const achs: Achievement[] = [];\n for (let i = 0; i <= 11; i++) {\n for (let j = 1; j <= 3; j++) {\n achs.push({\n ID: `SF${i}.${j}`,\n Condition: () => Player.sourceFileLvl(i) >= j,\n });\n }\n }\n return achs;\n}\n\nexport const achievements: IMap = {\n [FactionNames.CyberSec.toUpperCase()]: {\n ...achievementData[FactionNames.CyberSec.toUpperCase()],\n Icon: \"CSEC\",\n Condition: () => Player.factions.includes(FactionNames.CyberSec),\n },\n [FactionNames.NiteSec.toUpperCase()]: {\n ...achievementData[FactionNames.NiteSec.toUpperCase()],\n Icon: FactionNames.NiteSec,\n Condition: () => Player.factions.includes(FactionNames.NiteSec),\n },\n THE_BLACK_HAND: {\n ...achievementData[\"THE_BLACK_HAND\"],\n Icon: \"TBH\",\n Condition: () => Player.factions.includes(FactionNames.TheBlackHand),\n },\n [FactionNames.BitRunners.toUpperCase()]: {\n ...achievementData[FactionNames.BitRunners.toUpperCase()],\n Icon: FactionNames.BitRunners.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.BitRunners),\n },\n [FactionNames.Daedalus.toUpperCase()]: {\n ...achievementData[FactionNames.Daedalus.toUpperCase()],\n Icon: FactionNames.Daedalus.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Daedalus),\n },\n THE_COVENANT: {\n ...achievementData[\"THE_COVENANT\"],\n Icon: FactionNames.TheCovenant.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.TheCovenant),\n },\n [FactionNames.Illuminati.toUpperCase()]: {\n ...achievementData[FactionNames.Illuminati.toUpperCase()],\n Icon: FactionNames.Illuminati.toLowerCase(),\n Condition: () => Player.factions.includes(FactionNames.Illuminati),\n },\n \"BRUTESSH.EXE\": {\n ...achievementData[\"BRUTESSH.EXE\"],\n Icon: \"p0\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.BruteSSHProgram.name),\n },\n \"FTPCRACK.EXE\": {\n ...achievementData[\"FTPCRACK.EXE\"],\n Icon: \"p1\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.FTPCrackProgram.name),\n },\n //-----------------------------------------------------\n \"RELAYSMTP.EXE\": {\n ...achievementData[\"RELAYSMTP.EXE\"],\n Icon: \"p2\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.RelaySMTPProgram.name),\n },\n \"HTTPWORM.EXE\": {\n ...achievementData[\"HTTPWORM.EXE\"],\n Icon: \"p3\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.HTTPWormProgram.name),\n },\n \"SQLINJECT.EXE\": {\n ...achievementData[\"SQLINJECT.EXE\"],\n Icon: \"p4\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.SQLInjectProgram.name),\n },\n \"FORMULAS.EXE\": {\n ...achievementData[\"FORMULAS.EXE\"],\n Icon: \"formulas\",\n Condition: () => Player.getHomeComputer().programs.includes(Programs.Formulas.name),\n },\n \"SF1.1\": {\n ...achievementData[\"SF1.1\"],\n Icon: \"SF1.1\",\n Visible: () => hasAccessToSF(Player, 1),\n Condition: () => Player.sourceFileLvl(1) >= 1,\n },\n \"SF2.1\": {\n ...achievementData[\"SF2.1\"],\n Icon: \"SF2.1\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.sourceFileLvl(2) >= 1,\n },\n \"SF3.1\": {\n ...achievementData[\"SF3.1\"],\n Icon: \"SF3.1\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.sourceFileLvl(3) >= 1,\n },\n \"SF4.1\": {\n ...achievementData[\"SF4.1\"],\n Icon: \"SF4.1\",\n Visible: () => hasAccessToSF(Player, 4),\n Condition: () => Player.sourceFileLvl(4) >= 1,\n },\n \"SF5.1\": {\n ...achievementData[\"SF5.1\"],\n Icon: \"SF5.1\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.sourceFileLvl(5) >= 1,\n },\n \"SF6.1\": {\n ...achievementData[\"SF6.1\"],\n Icon: \"SF6.1\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.sourceFileLvl(6) >= 1,\n },\n \"SF7.1\": {\n ...achievementData[\"SF7.1\"],\n Icon: \"SF7.1\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.sourceFileLvl(7) >= 1,\n },\n \"SF8.1\": {\n ...achievementData[\"SF8.1\"],\n Icon: \"SF8.1\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.sourceFileLvl(8) >= 1,\n },\n \"SF9.1\": {\n ...achievementData[\"SF9.1\"],\n Icon: \"SF9.1\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => Player.sourceFileLvl(9) >= 1,\n },\n \"SF10.1\": {\n ...achievementData[\"SF10.1\"],\n Icon: \"SF10.1\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sourceFileLvl(10) >= 1,\n },\n \"SF11.1\": {\n ...achievementData[\"SF11.1\"],\n Icon: \"SF11.1\",\n Visible: () => hasAccessToSF(Player, 11),\n Condition: () => Player.sourceFileLvl(11) >= 1,\n },\n \"SF12.1\": {\n ...achievementData[\"SF12.1\"],\n Icon: \"SF12.1\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 1,\n },\n MONEY_1Q: {\n ...achievementData[\"MONEY_1Q\"],\n Icon: \"$1Q\",\n Condition: () => Player.money >= 1e18,\n },\n MONEY_M1B: {\n ...achievementData[\"MONEY_M1B\"],\n Icon: \"-1b\",\n Secret: true,\n Condition: () => Player.money <= -1e9,\n },\n INSTALL_1: {\n ...achievementData[\"INSTALL_1\"],\n Icon: \"install\",\n Condition: () => Player.augmentations.length >= 1,\n },\n INSTALL_100: {\n ...achievementData[\"INSTALL_100\"],\n Icon: \"install_100\",\n Condition: () => Player.augmentations.length >= 100,\n },\n QUEUE_40: {\n ...achievementData[\"QUEUE_40\"],\n Icon: \"queue40\",\n Condition: () => Player.queuedAugmentations.length >= 40,\n },\n HACKING_100000: {\n ...achievementData[\"HACKING_100000\"],\n Icon: \"hack100000\",\n Condition: () => Player.hacking >= 100000,\n },\n COMBAT_3000: {\n ...achievementData[\"COMBAT_3000\"],\n Icon: \"combat3000\",\n Condition: () =>\n Player.strength >= 3000 && Player.defense >= 3000 && Player.dexterity >= 3000 && Player.agility >= 3000,\n },\n NEUROFLUX_255: {\n ...achievementData[\"NEUROFLUX_255\"],\n Icon: \"nf255\",\n Condition: () => Player.augmentations.some((a) => a.name === AugmentationNames.NeuroFluxGovernor && a.level >= 255),\n },\n NS2: {\n ...achievementData[\"NS2\"],\n Icon: \"ns2\",\n Condition: () =>\n Player.getHomeComputer().scripts.some((s) => s.filename.endsWith(\".js\") || s.filename.endsWith(\".ns\")),\n },\n FROZE: {\n ...achievementData[\"FROZE\"],\n Icon: \"forze\",\n Condition: () => location.href.includes(\"noScripts\"),\n },\n RUNNING_SCRIPTS_1000: {\n ...achievementData[\"RUNNING_SCRIPTS_1000\"],\n Icon: \"run1000\",\n Condition: (): boolean => {\n let running = 0;\n for (const s of GetAllServers()) {\n running += s.runningScripts.length;\n }\n return running >= 1000;\n },\n },\n DRAIN_SERVER: {\n ...achievementData[\"DRAIN_SERVER\"],\n Icon: \"drain\",\n Condition: (): boolean => {\n for (const s of GetAllServers()) {\n if (s instanceof Server) {\n if (s.moneyMax > 0 && s.moneyAvailable === 0) return true;\n }\n }\n return false;\n },\n },\n MAX_RAM: {\n ...achievementData[\"MAX_RAM\"],\n Icon: \"maxram\",\n Condition: () => Player.getHomeComputer().maxRam === CONSTANTS.HomeComputerMaxRam,\n },\n MAX_CORES: {\n ...achievementData[\"MAX_CORES\"],\n Icon: \"maxcores\",\n Condition: () => Player.getHomeComputer().cpuCores === 8,\n },\n SCRIPTS_30: {\n ...achievementData[\"SCRIPTS_30\"],\n Icon: \"folders\",\n Condition: () => Player.getHomeComputer().scripts.length >= 30,\n },\n KARMA_1000000: {\n ...achievementData[\"KARMA_1000000\"],\n Icon: \"karma\",\n Secret: true,\n Condition: () => Player.karma <= -1e6,\n },\n STOCK_1q: {\n ...achievementData[\"STOCK_1q\"],\n Icon: \"$1Q\",\n Condition: () => Player.moneySourceB.stock >= 1e15,\n },\n DISCOUNT: {\n ...achievementData[\"DISCOUNT\"],\n Icon: \"discount\",\n Condition: (): boolean => {\n const p = GetServer(\"powerhouse-fitness\");\n if (!(p instanceof Server)) return false;\n return p.backdoorInstalled;\n },\n },\n SCRIPT_32GB: {\n ...achievementData[\"SCRIPT_32GB\"],\n Icon: \"bigcost\",\n Condition: () => Player.getHomeComputer().scripts.some((s) => s.ramUsage >= 32),\n },\n FIRST_HACKNET_NODE: {\n ...achievementData[\"FIRST_HACKNET_NODE\"],\n Icon: \"node\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n },\n \"30_HACKNET_NODE\": {\n ...achievementData[\"30_HACKNET_NODE\"],\n Icon: \"hacknet-all\",\n Condition: () => !hasHacknetServers(Player) && Player.hacknetNodes.length >= 30,\n },\n MAX_HACKNET_NODE: {\n ...achievementData[\"MAX_HACKNET_NODE\"],\n Icon: \"hacknet-max\",\n Condition: (): boolean => {\n if (hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (!(h instanceof HacknetNode)) return false;\n if (\n h.ram === HacknetNodeConstants.MaxRam &&\n h.cores === HacknetNodeConstants.MaxCores &&\n h.level === HacknetNodeConstants.MaxLevel\n )\n return true;\n }\n return false;\n },\n },\n HACKNET_NODE_10M: {\n ...achievementData[\"HACKNET_NODE_10M\"],\n Icon: \"hacknet-10m\",\n Condition: () => !hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 10e6,\n },\n REPUTATION_10M: {\n ...achievementData[\"REPUTATION_10M\"],\n Icon: \"reputation\",\n Condition: () => Object.values(Factions).some((f) => f.playerReputation >= 10e6),\n },\n DONATION: {\n ...achievementData[\"DONATION\"],\n Icon: \"donation\",\n Condition: () => Object.values(Factions).some((f) => f.favor >= 150),\n },\n TRAVEL: {\n ...achievementData[\"TRAVEL\"],\n Icon: \"TRAVEL\",\n Condition: () => Player.city !== CityName.Sector12,\n },\n WORKOUT: {\n ...achievementData[\"WORKOUT\"],\n Icon: \"WORKOUT\",\n Condition: () =>\n [\n CONSTANTS.ClassGymStrength,\n CONSTANTS.ClassGymDefense,\n CONSTANTS.ClassGymDexterity,\n CONSTANTS.ClassGymAgility,\n ].includes(Player.className),\n },\n TOR: {\n ...achievementData[\"TOR\"],\n Icon: \"TOR\",\n Condition: () => Player.hasTorRouter(),\n },\n HOSPITALIZED: {\n ...achievementData[\"HOSPITALIZED\"],\n Icon: \"OUCH\",\n Condition: () => Player.moneySourceB.hospitalization !== 0,\n },\n GANG: {\n ...achievementData[\"GANG\"],\n Icon: \"GANG\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null,\n },\n FULL_GANG: {\n ...achievementData[\"FULL_GANG\"],\n Icon: \"GANGMAX\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && Player.gang.members.length === GangConstants.MaximumGangMembers,\n },\n GANG_TERRITORY: {\n ...achievementData[\"GANG_TERRITORY\"],\n Icon: \"GANG100%\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.gang !== null && AllGangs[Player.gang.facName].territory >= 0.999,\n },\n GANG_MEMBER_POWER: {\n ...achievementData[\"GANG_MEMBER_POWER\"],\n Icon: \"GANG10000\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () =>\n Player.gang !== null &&\n Player.gang.members.some(\n (m) =>\n m.hack >= 10000 || m.str >= 10000 || m.def >= 10000 || m.dex >= 10000 || m.agi >= 10000 || m.cha >= 10000,\n ),\n },\n CORPORATION: {\n ...achievementData[\"CORPORATION\"],\n Icon: \"CORP\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null,\n },\n CORPORATION_BRIBE: {\n ...achievementData[\"CORPORATION_BRIBE\"],\n Icon: \"CORPLOBBY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.unlockUpgrades[6] === 1,\n },\n CORPORATION_PROD_1000: {\n ...achievementData[\"CORPORATION_PROD_1000\"],\n Icon: \"CORP1000\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.corporation !== null && Player.corporation.divisions.some((d) => d.prodMult >= 1000),\n },\n CORPORATION_EMPLOYEE_3000: {\n ...achievementData[\"CORPORATION_EMPLOYEE_3000\"],\n Icon: \"CORPCITY\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: (): boolean => {\n if (Player.corporation === null) return false;\n for (const d of Player.corporation.divisions) {\n for (const o of Object.values(d.offices)) {\n if (o === 0) continue;\n if (o.employees.length >= 3000) return true;\n }\n }\n return false;\n },\n },\n CORPORATION_REAL_ESTATE: {\n ...achievementData[\"CORPORATION_REAL_ESTATE\"],\n Icon: \"CORPRE\",\n Name: \"Own the land\",\n Description: \"Expand to the Real Estate division.\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () =>\n Player.corporation !== null && Player.corporation.divisions.some((d) => d.type === Industries.RealEstate),\n },\n INTELLIGENCE_255: {\n ...achievementData[\"INTELLIGENCE_255\"],\n Icon: \"INT255\",\n Visible: () => hasAccessToSF(Player, 5),\n Condition: () => Player.intelligence >= 255,\n },\n BLADEBURNER_DIVISION: {\n ...achievementData[\"BLADEBURNER_DIVISION\"],\n Icon: \"BLADE\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null,\n },\n BLADEBURNER_OVERCLOCK: {\n ...achievementData[\"BLADEBURNER_OVERCLOCK\"],\n Icon: \"BLADEOVERCLOCK\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () =>\n Player.bladeburner !== null &&\n Player.bladeburner.skills[SkillNames.Overclock] === Skills[SkillNames.Overclock].maxLvl,\n },\n BLADEBURNER_UNSPENT_100000: {\n ...achievementData[\"BLADEBURNER_UNSPENT_100000\"],\n Icon: \"BLADE100K\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bladeburner !== null && Player.bladeburner.skillPoints >= 100000,\n },\n \"4S\": {\n ...achievementData[\"4S\"],\n Icon: \"4S\",\n Condition: () => Player.has4SData,\n },\n FIRST_HACKNET_SERVER: {\n ...achievementData[\"FIRST_HACKNET_SERVER\"],\n Icon: \"HASHNET\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length > 0,\n AdditionalUnlock: [achievementData.FIRST_HACKNET_NODE.ID],\n },\n ALL_HACKNET_SERVER: {\n ...achievementData[\"ALL_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.hacknetNodes.length === HacknetServerConstants.MaxServers,\n AdditionalUnlock: [achievementData[\"30_HACKNET_NODE\"].ID],\n },\n MAX_HACKNET_SERVER: {\n ...achievementData[\"MAX_HACKNET_SERVER\"],\n Icon: \"HASHNETALL\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: (): boolean => {\n if (!hasHacknetServers(Player)) return false;\n for (const h of Player.hacknetNodes) {\n if (typeof h !== \"string\") return false;\n const hs = GetServer(h);\n if (!(hs instanceof HacknetServer)) return false;\n if (\n hs.maxRam === HacknetServerConstants.MaxRam &&\n hs.cores === HacknetServerConstants.MaxCores &&\n hs.level === HacknetServerConstants.MaxLevel &&\n hs.cache === HacknetServerConstants.MaxCache\n )\n return true;\n }\n return false;\n },\n AdditionalUnlock: [achievementData.MAX_HACKNET_NODE.ID],\n },\n HACKNET_SERVER_1B: {\n ...achievementData[\"HACKNET_SERVER_1B\"],\n Icon: \"HASHNETMONEY\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () => hasHacknetServers(Player) && Player.moneySourceB.hacknet >= 1e9,\n AdditionalUnlock: [achievementData.HACKNET_NODE_10M.ID],\n },\n MAX_CACHE: {\n ...achievementData[\"MAX_CACHE\"],\n Icon: \"HASHNETCAP\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n hasHacknetServers(Player) &&\n Player.hashManager.hashes === Player.hashManager.capacity &&\n Player.hashManager.capacity > 0,\n },\n SLEEVE_8: {\n ...achievementData[\"SLEEVE_8\"],\n Icon: \"SLEEVE8\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () => Player.sleeves.length === 8 && Player.sourceFileLvl(10) === 3,\n },\n INDECISIVE: {\n ...achievementData[\"INDECISIVE\"],\n Icon: \"1H\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: (function () {\n let c = 0;\n setInterval(() => {\n if (Router.page() === Page.BitVerse) {\n c++;\n } else {\n c = 0;\n }\n }, 60 * 1000);\n return () => c > 60;\n })(),\n },\n FAST_BN: {\n ...achievementData[\"FAST_BN\"],\n Icon: \"2DAYS\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () => bitNodeFinishedState() && Player.playtimeSinceLastBitnode < 1000 * 60 * 60 * 24 * 2,\n },\n CHALLENGE_BN1: {\n ...achievementData[\"CHALLENGE_BN1\"],\n Icon: \"BN1+\",\n Visible: () => knowsAboutBitverse(Player),\n Condition: () =>\n Player.bitNodeN === 1 &&\n bitNodeFinishedState() &&\n Player.getHomeComputer().maxRam <= 128 &&\n Player.getHomeComputer().cpuCores === 1,\n },\n CHALLENGE_BN2: {\n ...achievementData[\"CHALLENGE_BN2\"],\n Icon: \"BN2+\",\n Visible: () => hasAccessToSF(Player, 2),\n Condition: () => Player.bitNodeN === 2 && bitNodeFinishedState() && Player.gang === null,\n },\n CHALLENGE_BN3: {\n ...achievementData[\"CHALLENGE_BN3\"],\n Icon: \"BN3+\",\n Visible: () => hasAccessToSF(Player, 3),\n Condition: () => Player.bitNodeN === 3 && bitNodeFinishedState() && Player.corporation === null,\n },\n CHALLENGE_BN6: {\n ...achievementData[\"CHALLENGE_BN6\"],\n Icon: \"BN6+\",\n Visible: () => hasAccessToSF(Player, 6),\n Condition: () => Player.bitNodeN === 6 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN7: {\n ...achievementData[\"CHALLENGE_BN7\"],\n Icon: \"BN7+\",\n Visible: () => hasAccessToSF(Player, 7),\n Condition: () => Player.bitNodeN === 7 && bitNodeFinishedState() && Player.bladeburner === null,\n },\n CHALLENGE_BN8: {\n ...achievementData[\"CHALLENGE_BN8\"],\n Icon: \"BN8+\",\n Visible: () => hasAccessToSF(Player, 8),\n Condition: () => Player.bitNodeN === 8 && bitNodeFinishedState() && !Player.has4SData && !Player.has4SDataTixApi,\n },\n CHALLENGE_BN9: {\n ...achievementData[\"CHALLENGE_BN9\"],\n Icon: \"BN9+\",\n Visible: () => hasAccessToSF(Player, 9),\n Condition: () =>\n Player.bitNodeN === 9 &&\n bitNodeFinishedState() &&\n Player.moneySourceB.hacknet === 0 &&\n Player.moneySourceB.hacknet_expenses === 0,\n },\n CHALLENGE_BN10: {\n ...achievementData[\"CHALLENGE_BN10\"],\n Icon: \"BN10+\",\n Visible: () => hasAccessToSF(Player, 10),\n Condition: () =>\n Player.bitNodeN === 10 &&\n bitNodeFinishedState() &&\n !Player.sleeves.some(\n (s) =>\n s.augmentations.length > 0 ||\n s.hacking_exp > 0 ||\n s.strength_exp > 0 ||\n s.defense_exp > 0 ||\n s.agility_exp > 0 ||\n s.dexterity_exp > 0 ||\n s.charisma_exp > 0,\n ),\n },\n CHALLENGE_BN12: {\n ...achievementData[\"CHALLENGE_BN12\"],\n Icon: \"BN12+\",\n Visible: () => hasAccessToSF(Player, 12),\n Condition: () => Player.sourceFileLvl(12) >= 50,\n },\n BYPASS: {\n ...achievementData[\"BYPASS\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Bypass),\n },\n PROTOTYPETAMPERING: {\n ...achievementData[\"PROTOTYPETAMPERING\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.PrototypeTampering),\n },\n UNCLICKABLE: {\n ...achievementData[\"UNCLICKABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.Unclickable),\n },\n UNDOCUMENTEDFUNCTIONCALL: {\n ...achievementData[\"UNDOCUMENTEDFUNCTIONCALL\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.UndocumentedFunctionCall),\n },\n TIMECOMPRESSION: {\n ...achievementData[\"TIMECOMPRESSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TimeCompression),\n },\n REALITYALTERATION: {\n ...achievementData[\"REALITYALTERATION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.RealityAlteration),\n },\n N00DLES: {\n ...achievementData[\"N00DLES\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.N00dles),\n },\n EDITSAVEFILE: {\n ...achievementData[\"EDITSAVEFILE\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.EditSaveFile),\n },\n UNACHIEVABLE: {\n ...achievementData[\"UNACHIEVABLE\"],\n Icon: \"SF-1\",\n Secret: true,\n // Hey Players! Yes, you're supposed to modify this to get the achievement!\n Condition: () => false,\n },\n CHALLENGE_BN13: {\n ...achievementData[\"CHALLENGE_BN13\"],\n Icon: \"BN13+\",\n Visible: () => hasAccessToSF(Player, 13),\n Condition: () =>\n Player.bitNodeN === 13 &&\n bitNodeFinishedState() &&\n !Player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1),\n },\n DEVMENU: {\n ...achievementData[\"DEVMENU\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.YoureNotMeantToAccessThis),\n },\n RAINBOW: {\n ...achievementData[\"RAINBOW\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.INeedARainbow),\n },\n TRUE_RECURSION: {\n ...achievementData[\"TRUE_RECURSION\"],\n Icon: \"SF-1\",\n Secret: true,\n Condition: () => Player.exploits.includes(Exploit.TrueRecursion),\n },\n};\n\n// Steam has a limit of 100 achievement. So these were planned but commented for now.\n// { ID: FactionNames.ECorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.ECorp) },\n// { ID: FactionNames.MegaCorp.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.MegaCorp) },\n// { ID: \"BACHMAN_&_ASSOCIATES\", Condition: () => Player.factions.includes(FactionNames.BachmanAssociates) },\n// { ID: \"BLADE_INDUSTRIES\", Condition: () => Player.factions.includes(FactionNames.BladeIndustries) },\n// { ID: FactionNames.NWO.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.NWO) },\n// { ID: \"CLARKE_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.ClarkeIncorporated) },\n// { ID: \"OMNITEK_INCORPORATED\", Condition: () => Player.factions.includes(FactionNames.OmniTekIncorporated) },\n// { ID: \"FOUR_SIGMA\", Condition: () => Player.factions.includes(FactionNames.FourSigma) },\n// { ID: \"KUAIGONG_INTERNATIONAL\", Condition: () => Player.factions.includes(FactionNames.KuaiGongInternational) },\n// { ID: \"FULCRUM_SECRET_TECHNOLOGIES\", Condition: () => Player.factions.includes(FactionNames.FulcrumSecretTechnologies) },\n// { ID: FactionNames.Aevum.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Aevum) },\n// { ID: FactionNames.Chongqing.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Chongqing) },\n// { ID: FactionNames.Ishima.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Ishima) },\n// { ID: \"NEW_TOKYO\", Condition: () => Player.factions.includes(FactionNames.NewTokyo) },\n// { ID: \"SECTOR-12\", Condition: () => Player.factions.includes(FactionNames.Sector12) },\n// { ID: FactionNames.Volhaven.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Volhaven) },\n// { ID: \"SPEAKERS_FOR_THE_DEAD\", Condition: () => Player.factions.includes(FactionNames.SpeakersForTheDead) },\n// { ID: \"THE_DARK_ARMY\", Condition: () => Player.factions.includes(FactionNames.TheDarkArmy) },\n// { ID: \"THE_SYNDICATE\", Condition: () => Player.factions.includes(FactionNames.TheSyndicate) },\n// { ID: FactionNames.Silhouette.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Silhouette) },\n// { ID: FactionNames.Tetrads.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Tetrads) },\n// { ID: \"SLUM_SNAKES\", Condition: () => Player.factions.includes(FactionNames.SlumSnakes) },\n// { ID: FactionNames.Netburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Netburners) },\n// { ID: \"TIAN_DI_HUI\", Condition: () => Player.factions.includes(FactionNames.TianDiHui) },\n// { ID: FactionNames.Bladeburners.toUpperCase(), Condition: () => Player.factions.includes(FactionNames.Bladeburners) },\n// { ID: \"DEEPSCANV1.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV1.name) },\n// { ID: \"DEEPSCANV2.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.DeepscanV2.name) },\n// {\n// ID: \"SERVERPROFILER.EXE\",\n// Condition: () => Player.getHomeComputer().programs.includes(Programs.ServerProfiler.name),\n// },\n// { ID: \"AUTOLINK.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.AutoLink.name) },\n// { ID: \"FLIGHT.EXE\", Condition: () => Player.getHomeComputer().programs.includes(Programs.Flight.name) },\n\nexport function calculateAchievements(): void {\n const playerAchievements = Player.achievements.map((a) => a.ID);\n\n const missingAchievements = Object.values(achievements)\n .filter((a) => !playerAchievements.includes(a.ID) && a.Condition())\n // callback returns array of achievement id and id of any in the additional list, flatmap means we have only a 1D array\n .flatMap((a) => [a.ID, ...(a.AdditionalUnlock || [])]);\n\n for (const id of missingAchievements) {\n Player.giveAchievement(id);\n }\n\n // Write all player's achievements to document for Steam/Electron\n // This could be replaced by \"availableAchievements\"\n // if we don't want to grant the save game achievements to steam but only currently available\n (document as any).achievements = [...Player.achievements.map((a) => a.ID)];\n}\n","// Root React Component for the Corporation UI\nimport React, { useState, useEffect } from \"react\";\n\nimport { Theme, useTheme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\nimport { KillScriptsModal } from \"./KillScriptsModal\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport SaveIcon from \"@mui/icons-material/Save\";\nimport ClearAllIcon from \"@mui/icons-material/ClearAll\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../Context\";\nimport { StatsProgressOverviewCell } from \"./StatsProgressBar\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Box, Tooltip } from \"@mui/material\";\nimport { CONSTANTS } from \"../../Constants\";\n\ninterface IProps {\n save: () => void;\n killScripts: () => void;\n}\n\nfunction Intelligence(): React.ReactElement {\n const theme = useTheme();\n const player = use.Player();\n const classes = useStyles();\n if (player.intelligence === 0) return <>;\n const progress = player.calculateSkillProgress(player.intelligence_exp);\n\n return (\n <>\n \n \n Int \n \n \n {numeralWrapper.formatSkill(player.intelligence)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n );\n}\n\nfunction Bladeburner(): React.ReactElement {\n const player = use.Player();\n const classes = useStyles();\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n const action = bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n if (action.type === \"Idle\") return <>;\n return (\n <>\n \n \n Bladeburner:\n \n \n \n \n \n {action.type}: {action.name}\n \n \n \n \n );\n}\n\ninterface WorkInProgressOverviewProps {\n tooltip: React.ReactNode;\n header: React.ReactNode;\n children: React.ReactNode;\n onClickFocus: () => void;\n}\n\nfunction WorkInProgressOverview({\n tooltip,\n children,\n onClickFocus,\n header,\n}: WorkInProgressOverviewProps): React.ReactElement {\n const classes = useStyles();\n return (\n <>\n \n \n {tooltip}}>\n \n {header}\n \n \n \n \n \n \n {children}\n \n \n \n \n \n \n \n \n );\n}\n\nfunction Work(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const onClickFocus = (): void => {\n player.startFocusing();\n router.toWork();\n };\n\n if (!player.isWorking || player.focus) return <>;\n\n let details = <>;\n let header = <>;\n let innerText = <>;\n switch (player.workType) {\n case CONSTANTS.WorkTypeCompanyPartTime:\n case CONSTANTS.WorkTypeCompany:\n details = (\n <>\n {player.jobs[player.companyName]} at {player.companyName}\n \n );\n header = (\n <>\n Working at {player.companyName}\n \n );\n innerText = (\n <>\n + rep\n \n );\n break;\n case CONSTANTS.WorkTypeFaction:\n details = (\n <>\n {player.factionWorkType} for {player.currentWorkFactionName}\n \n );\n header = (\n <>\n Working for {player.currentWorkFactionName}\n \n );\n innerText = (\n <>\n + rep\n \n );\n break;\n case CONSTANTS.WorkTypeStudyClass:\n details = <>{player.workType};\n header = <>You are {player.className};\n innerText = <>{convertTimeMsToTimeElapsedString(player.timeWorked)};\n break;\n case CONSTANTS.WorkTypeCreateProgram:\n details = <>Coding {player.createProgramName};\n header = <>Creating a program;\n innerText = (\n <>\n {player.createProgramName}{\" \"}\n {((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}%\n \n );\n break;\n case CONSTANTS.WorkTypeGraftAugmentation:\n details = <>Grafting {player.graftAugmentationName};\n header = <>Grafting an Augmentation;\n innerText = (\n <>\n {((player.timeWorkedGraftAugmentation / player.timeNeededToCompleteWork) * 100).toFixed(2)}%{\" \"}\n done\n \n );\n }\n\n return (\n \n {innerText}\n \n );\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n workCell: {\n textAlign: \"center\",\n maxWidth: \"200px\",\n borderBottom: \"none\",\n padding: 0,\n margin: 0,\n },\n\n workHeader: {\n fontSize: \"0.9rem\",\n },\n\n workSubtitles: {\n fontSize: \"0.8rem\",\n },\n\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.colors.hp,\n },\n money: {\n color: theme.colors.money,\n },\n hack: {\n color: theme.colors.hack,\n },\n combat: {\n color: theme.colors.combat,\n },\n cha: {\n color: theme.colors.cha,\n },\n int: {\n color: theme.colors.int,\n },\n }),\n);\n\nexport { useStyles as characterOverviewStyles };\n\nexport function CharacterOverview({ save, killScripts }: IProps): React.ReactElement {\n const [killOpen, setKillOpen] = useState(false);\n const player = use.Player();\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 600);\n return () => clearInterval(id);\n }, []);\n\n const classes = useStyles();\n const theme = useTheme();\n\n const hackingProgress = player.calculateSkillProgress(\n player.hacking_exp,\n player.hacking_mult * BitNodeMultipliers.HackingLevelMultiplier,\n );\n const strengthProgress = player.calculateSkillProgress(\n player.strength_exp,\n player.strength_mult * BitNodeMultipliers.StrengthLevelMultiplier,\n );\n const defenseProgress = player.calculateSkillProgress(\n player.defense_exp,\n player.defense_mult * BitNodeMultipliers.DefenseLevelMultiplier,\n );\n const dexterityProgress = player.calculateSkillProgress(\n player.dexterity_exp,\n player.dexterity_mult * BitNodeMultipliers.DexterityLevelMultiplier,\n );\n const agilityProgress = player.calculateSkillProgress(\n player.agility_exp,\n player.agility_mult * BitNodeMultipliers.AgilityLevelMultiplier,\n );\n const charismaProgress = player.calculateSkillProgress(\n player.charisma_exp,\n player.charisma_mult * BitNodeMultipliers.CharismaLevelMultiplier,\n );\n\n return (\n <>\n \n \n \n \n HP \n \n \n \n {numeralWrapper.formatHp(player.hp)} / {numeralWrapper.formatHp(player.max_hp)}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Money \n \n \n {numeralWrapper.formatMoney(player.money)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Hack \n \n \n {numeralWrapper.formatSkill(player.hacking)}\n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n \n \n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n\n \n \n Str \n \n \n {numeralWrapper.formatSkill(player.strength)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Def \n \n \n {numeralWrapper.formatSkill(player.defense)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Dex \n \n \n {numeralWrapper.formatSkill(player.dexterity)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Agi \n \n \n {numeralWrapper.formatSkill(player.agility)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n \n Cha \n \n \n {numeralWrapper.formatSkill(player.charisma)}\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {!Settings.DisableOverviewProgressBars && (\n \n )}\n \n\n \n\n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n {/*Hook for player scripts*/}\n \n \n \n \n \n \n
    \n \n \n \n \n \n \n \n \n \n setKillOpen(true)}>\n \n \n \n \n \n \n setKillOpen(false)} killScripts={killScripts} />\n \n );\n}\n","import { IMap } from \"../../types\";\n\nexport type CorporationUnlockUpgrade = [number, number, string, string];\n\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]\nexport const CorporationUnlockUpgrades: IMap = {\n //Lets you export goods\n \"0\": [\n 0,\n 20e9,\n \"Export\",\n \"Develop infrastructure to export your materials to your other facilities. \" +\n \"This allows you to move materials around between different divisions and cities.\",\n ],\n\n //Lets you buy exactly however many required materials you need for production\n \"1\": [\n 1,\n 25e9,\n \"Smart Supply\",\n \"Use advanced AI to anticipate your supply needs. \" +\n \"This allows you to purchase exactly however many materials you need for production.\",\n ],\n\n //Displays each material/product's demand\n \"2\": [\n 2,\n 5e9,\n \"Market Research - Demand\",\n \"Mine and analyze market data to determine the demand of all resources. \" +\n \"The demand attribute, which affects sales, will be displayed for every material and product.\",\n ],\n\n //Display's each material/product's competition\n \"3\": [\n 3,\n 5e9,\n \"Market Data - Competition\",\n \"Mine and analyze market data to determine how much competition there is on the market \" +\n \"for all resources. The competition attribute, which affects sales, will be displayed for \" +\n \"every material and product.\",\n ],\n \"4\": [\n 4,\n 10e9,\n \"VeChain\",\n \"Use AI and blockchain technology to identify where you can improve your supply chain systems. \" +\n \"This upgrade will allow you to view a wide array of useful statistics about your \" +\n \"Corporation.\",\n ],\n \"5\": [\n 5,\n 500e12,\n \"Shady Accounting\",\n \"Utilize unscrupulous accounting practices and pay off government officials to save money \" +\n \"on taxes. This reduces the dividend tax rate by 5%.\",\n ],\n \"6\": [\n 6,\n 2e15,\n \"Government Partnership\",\n \"Help national governments further their agendas in exchange for lowered taxes. \" +\n \"This reduces the dividend tax rate by 10%\",\n ],\n \"7\": [7, 50e9, \"Warehouse API\", \"Enables the warehouse API.\"],\n \"8\": [8, 50e9, \"Office API\", \"Enables the office API.\"],\n};\n","/**\n * Implementation for what happens when you destroy a BitNode\n */\nimport React from \"react\";\nimport { Player } from \"./Player\";\nimport { prestigeSourceFile } from \"./Prestige\";\nimport { PlayerOwnedSourceFile } from \"./SourceFile/PlayerOwnedSourceFile\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { SourceFiles } from \"./SourceFile/SourceFiles\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { IRouter } from \"./ui/Router\";\n\nexport let redPillFlag = false;\n\nexport function setRedPillFlag(b: boolean): void {\n redPillFlag = b;\n}\n\nfunction giveSourceFile(bitNodeNumber: number): void {\n const sourceFileKey = \"SourceFile\" + bitNodeNumber.toString();\n const sourceFile = SourceFiles[sourceFileKey];\n if (sourceFile == null) {\n console.error(`Could not find source file for Bit node: ${bitNodeNumber}`);\n return;\n }\n\n // Check if player already has this source file\n let alreadyOwned = false;\n let ownedSourceFile = null;\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n if (Player.sourceFiles[i].n === bitNodeNumber) {\n alreadyOwned = true;\n ownedSourceFile = Player.sourceFiles[i];\n break;\n }\n }\n\n if (alreadyOwned && ownedSourceFile) {\n if (ownedSourceFile.lvl >= 3 && ownedSourceFile.n !== 12) {\n dialogBoxCreate(\n `The Source-File for the BitNode you just destroyed, ${sourceFile.name}, is already at max level!`,\n );\n } else {\n ++ownedSourceFile.lvl;\n dialogBoxCreate(\n sourceFile.name +\n \" was upgraded to level \" +\n ownedSourceFile.lvl +\n \" for \" +\n \"destroying its corresponding BitNode!\",\n );\n }\n } else {\n const playerSrcFile = new PlayerOwnedSourceFile(bitNodeNumber, 1);\n Player.sourceFiles.push(playerSrcFile);\n if (bitNodeNumber === 5 && Player.intelligence === 0) {\n // Artificial Intelligence\n Player.intelligence = 1;\n }\n dialogBoxCreate(\n <>\n You received a Source-File for destroying a BitNode!\n
    \n
    \n {sourceFile.name}\n
    \n
    \n {sourceFile.info}\n ,\n );\n }\n}\n\nexport function enterBitNode(router: IRouter, flume: boolean, destroyedBitNode: number, newBitNode: number): void {\n if (!flume) {\n giveSourceFile(destroyedBitNode);\n } else if (SourceFileFlags[5] === 0 && newBitNode !== 5) {\n Player.intelligence = 0;\n Player.intelligence_exp = 0;\n }\n if (newBitNode === 5 && Player.intelligence === 0) {\n Player.intelligence = 1;\n }\n redPillFlag = false;\n // Set new Bit Node\n Player.bitNodeN = newBitNode;\n\n if (newBitNode === 6) {\n router.toBladeburnerCinematic();\n } else {\n router.toTerminal();\n }\n prestigeSourceFile(flume);\n}\n","/**\n * Adds a random offset to a number within a certain percentage\n * @example\n * // Returns between 95-105\n * addOffset(100, 5);\n * @example\n * // Returns between 63-77\n * addOffSet(70, 10);\n * @param midpoint The number to be the midpoint of the offset range\n * @param percentage The percentage (in a range of 0-100) to offset\n */\nexport function addOffset(midpoint: number, percentage: number): number {\n const maxPercent = 100;\n if (percentage < 0 || percentage > maxPercent) {\n return midpoint;\n }\n\n const offset: number = midpoint * (percentage / maxPercent);\n\n // Double the range to account for both sides of the midpoint.\n // tslint:disable-next-line:no-magic-numbers\n return midpoint + (Math.random() * (offset * 2) - offset);\n}\n","export class DarkWebItem {\n program: string;\n price: number;\n description: string;\n\n constructor(program: string, price: number, description: string) {\n this.program = program;\n this.price = price;\n this.description = description;\n }\n}\n","interface RNG {\n random(): number;\n}\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 implements RNG {\n x: number;\n m = 1024;\n a = 341;\n c = 1;\n\n constructor() {\n this.x = 0;\n this.reset();\n }\n\n step(): void {\n this.x = (this.a * this.x + this.c) % this.m;\n }\n\n random(): number {\n this.step();\n return this.x / this.m;\n }\n\n reset(): void {\n this.x = new Date().getTime() % this.m;\n }\n}\n\nexport const BadRNG: RNG0 = new RNG0();\n\n/*\n * Wichmann–Hill PRNG\n * The period is 6e12.\n */\nexport class WHRNG implements RNG {\n s1 = 0;\n s2 = 0;\n s3 = 0;\n\n constructor(totalPlaytime: number) {\n // This one is seeded by the players total play time.\n const v: number = (totalPlaytime / 1000) % 30000;\n this.s1 = v;\n this.s2 = v;\n this.s3 = v;\n }\n\n step(): void {\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(): number {\n this.step();\n return (this.s1 / 30269.0 + this.s2 / 30307.0 + this.s3 / 30323.0) % 1.0;\n }\n}\n\nexport function SFC32RNG(seed: string): () => number {\n let h = 1779033703 ^ seed.length;\n for (let i = 0; i < seed.length; i++) {\n h = Math.imul(h ^ seed.charCodeAt(i), 3432918353);\n h = (h << 13) | (h >>> 19);\n }\n const genSeed = (): number => {\n h = Math.imul(h ^ (h >>> 16), 2246822507);\n h = Math.imul(h ^ (h >>> 13), 3266489909);\n return (h ^= h >>> 16) >>> 0;\n };\n\n let a = genSeed();\n let b = genSeed();\n let c = genSeed();\n let d = genSeed();\n return (): number => {\n a >>>= 0;\n b >>>= 0;\n c >>>= 0;\n d >>>= 0;\n let t = (a + b) | 0;\n a = b ^ (b >>> 9);\n b = (c + (c << 3)) | 0;\n c = (c << 21) | (c >>> 11);\n d = (d + 1) | 0;\n t = (t + d) | 0;\n c = (c + t) | 0;\n return (t >>> 0) / 4294967296;\n };\n}\n","/**\n * Does a shallow compare of two arrays to determine if they are equal.\n * @param a1 The first array\n * @param a2 The second array\n */\nexport function compareArrays(a1: T[], a2: T[]): boolean {\n if (a1.length !== a2.length) {\n return false;\n }\n\n for (let i = 0; i < a1.length; ++i) {\n if (Array.isArray(a1[i])) {\n // If the other element is not an array, then these cannot be equal\n if (!Array.isArray(a2[i])) {\n return false;\n }\n\n const elem1 = a1[i] as any;\n const elem2 = a2[i] as any;\n if (!compareArrays(elem1, elem2)) {\n return false;\n }\n } else if (a1[i] !== a2[i] && !(Number.isNaN(a1[i]) && Number.isNaN(a2[i]))) {\n // strict (in)equality considers NaN not equal to itself\n return false;\n }\n }\n\n return true;\n}\n","import { IMap } from \"../types\";\n\nexport type IndustryUpgrade = [number, number, number, number, string, string];\n\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]\nexport const IndustryUpgrades: IMap = {\n \"0\": [0, 500e3, 1, 1.05, \"Coffee\", \"Provide your employees with coffee, increasing their energy by 5%.\"],\n \"1\": [\n 1,\n 1e9,\n 1.06,\n 1.03,\n \"AdVert.Inc\",\n \"Hire AdVert.Inc to advertise your company. Each level of \" +\n \"this upgrade grants your company a static increase of 3 and 1 to its awareness and \" +\n \"popularity, respectively. It will then increase your company's awareness by 1%, and its popularity \" +\n \"by a random percentage between 1% and 3%. These effects are increased by other upgrades \" +\n \"that increase the power of your advertising.\",\n ],\n};\n","import * as React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n favor: {\n color: theme.colors.rep,\n },\n }),\n);\n\nexport function Favor({ favor }: { favor: number | string }): React.ReactElement {\n const classes = useStyles();\n return {typeof favor === \"number\" ? numeralWrapper.formatFavor(favor) : favor};\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 */\nimport { SleeveTaskType } from \"./SleeveTaskTypesEnum\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { Person, ITaskTracker, createTaskTracker } from \"../Person\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nimport { Crime } from \"../../Crime/Crime\";\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { Company } from \"../../Company/Company\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { FactionWorkType } from \"../../Faction/FactionWorkTypeEnum\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../../utils/JSONReviver\";\n\nexport class Sleeve extends Person {\n /**\n * Stores the name of the class that the player is currently taking\n */\n className = \"\";\n\n /**\n * Stores the type of crime the sleeve is currently attempting\n * Must match the name of a Crime object\n */\n crimeType = \"\";\n\n /**\n * Enum value for current task\n */\n currentTask: SleeveTaskType = SleeveTaskType.Idle;\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 currentTaskLocation = \"\";\n\n /**\n * Maximum amount of time (in milliseconds) that can be spent on current task.\n */\n currentTaskMaxTime = 0;\n\n /**\n * Milliseconds spent on current task\n */\n currentTaskTime = 0;\n\n /**\n * Keeps track of experience earned for other sleeves\n */\n earningsForSleeves: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experience + money earned for player\n */\n earningsForPlayer: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of experienced earned in the current task/action\n */\n earningsForTask: ITaskTracker = createTaskTracker();\n\n /**\n * Keeps track of what type of work sleeve is doing for faction, if applicable\n */\n factionWorkType: FactionWorkType = FactionWorkType.None;\n\n /**\n * Records experience gain rate for the current task\n */\n gainRatesForTask: ITaskTracker = createTaskTracker();\n\n /**\n * String that stores what stat the sleeve is training at the gym\n */\n gymStatType = \"\";\n\n /**\n * Keeps track of events/notifications for this sleeve\n */\n logs: string[] = [];\n\n /**\n * Clone retains 'memory' synchronization (and maybe exp?) upon prestige/installing Augs\n */\n memory = 1;\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 shock = 1;\n\n /**\n * Stored number of game \"loop\" cycles\n */\n storedCycles = 0;\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 sync = 1;\n\n constructor(p: IPlayer | null = null) {\n super();\n if (p != null) {\n this.shockRecovery(p);\n }\n }\n\n /**\n * Commit crimes\n */\n commitCrime(p: IPlayer, crimeKey: string): boolean {\n const crime: Crime | null = Crimes[crimeKey] || Object.values(Crimes).find((crime) => crime.name === crimeKey);\n if (!crime) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.gainRatesForTask.hack = crime.hacking_exp * this.hacking_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.str = crime.strength_exp * this.strength_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.def = crime.defense_exp * this.defense_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.dex = crime.dexterity_exp * this.dexterity_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.agi = crime.agility_exp * this.agility_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.cha = crime.charisma_exp * this.charisma_exp_mult * BitNodeMultipliers.CrimeExpGain;\n this.gainRatesForTask.money = crime.money * this.crime_money_mult * BitNodeMultipliers.CrimeMoney;\n\n this.currentTaskLocation = String(this.gainRatesForTask.money);\n\n this.crimeType = crime.name;\n this.currentTaskMaxTime = crime.time;\n this.currentTask = SleeveTaskType.Crime;\n return true;\n }\n\n /**\n * Called to stop the current task\n */\n finishTask(p: IPlayer): ITaskTracker {\n let retValue: ITaskTracker = createTaskTracker(); // Amount of exp to be gained by other sleeves\n\n if (this.currentTask === SleeveTaskType.Crime) {\n // For crimes, all experience and money is gained at the end\n if (this.currentTaskTime >= this.currentTaskMaxTime) {\n const crime: Crime | undefined = Object.values(Crimes).find((crime) => crime.name === this.crimeType);\n if (!crime) {\n console.error(`Invalid data stored in sleeve.crimeType: ${this.crimeType}`);\n this.resetTaskStatus();\n return retValue;\n }\n if (Math.random() < crime.successRate(this)) {\n // Success\n const successGainRates: ITaskTracker = createTaskTracker();\n\n const keysForIteration: (keyof ITaskTracker)[] = Object.keys(successGainRates) as (keyof ITaskTracker)[];\n for (let i = 0; i < keysForIteration.length; ++i) {\n const key = keysForIteration[i];\n successGainRates[key] = this.gainRatesForTask[key] * 2;\n }\n retValue = this.gainExperience(p, successGainRates);\n this.gainMoney(p, this.gainRatesForTask);\n\n p.karma -= crime.karma * (this.sync / 100);\n } else {\n retValue = this.gainExperience(p, this.gainRatesForTask);\n }\n\n // Do not reset task to IDLE\n this.currentTaskTime = 0;\n return retValue;\n }\n } else {\n // For other crimes... I dont think anything else needs to be done\n }\n\n this.resetTaskStatus();\n\n return retValue;\n }\n\n /**\n * Earn experience for any stats (supports multiple)\n * This function also handles experience propogating to Player and other sleeves\n */\n gainExperience(p: IPlayer, exp: ITaskTracker, numCycles = 1, fromOtherSleeve = false): ITaskTracker {\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 createTaskTracker();\n }\n\n // Experience is first multiplied by shock. Then 'synchronization'\n // is accounted for\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;\n\n // Experience is gained by both this sleeve and player\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 }\n\n // Record earnings for other sleeves\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);\n\n // Return the experience to be gained by other sleeves\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 /**\n * Earn money for player\n */\n gainMoney(p: IPlayer, task: ITaskTracker, numCycles = 1): void {\n const gain: number = task.money * numCycles;\n this.earningsForTask.money += gain;\n this.earningsForPlayer.money += gain;\n p.gainMoney(gain, \"sleeves\");\n }\n\n /**\n * Returns the cost of upgrading this sleeve's memory by a certain amount\n */\n getMemoryUpgradeCost(n: number): number {\n const amt = Math.round(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 for (let i = 0; i < n; ++i) {\n currCost += Math.pow(mult, currMemory);\n ++currMemory;\n }\n\n return currCost * baseCost;\n }\n\n /**\n * Gets reputation gain for the current task\n * Only applicable when working for company or faction\n */\n getRepGain(p: IPlayer): number {\n if (this.currentTask === SleeveTaskType.Faction) {\n let favorMult = 1;\n const fac: Faction | null = Factions[this.currentTaskLocation];\n if (fac != null) {\n favorMult = 1 + fac.favor / 100;\n }\n\n switch (this.factionWorkType) {\n case FactionWorkType.Hacking:\n return this.getFactionHackingWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Field:\n return this.getFactionFieldWorkRepGain() * (this.shock / 100) * favorMult;\n case FactionWorkType.Security:\n return this.getFactionSecurityWorkRepGain() * (this.shock / 100) * favorMult;\n default:\n console.warn(`Invalid Sleeve.factionWorkType property in Sleeve.getRepGain(): ${this.factionWorkType}`);\n return 0;\n }\n } else if (this.currentTask === SleeveTaskType.Company) {\n const companyName: string = this.currentTaskLocation;\n const company: Company | null = Companies[companyName];\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: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\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: number = companyPosition.calculateJobPerformance(\n this.hacking,\n this.strength,\n this.defense,\n this.dexterity,\n this.agility,\n this.charisma,\n );\n const favorMult = 1 + company.favor / 100;\n\n return jobPerformance * this.company_rep_mult * favorMult;\n } else {\n return 0;\n }\n }\n\n installAugmentation(aug: Augmentation): void {\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({ name: aug.name, level: 1 });\n this.updateStatLevels();\n }\n\n log(entry: string): void {\n const MaxLogSize = 50;\n this.logs.push(entry);\n if (this.logs.length > MaxLogSize) {\n this.logs.shift();\n }\n }\n\n /**\n * Called on every sleeve for a Source File Prestige\n */\n prestige(p: IPlayer): void {\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;\n\n // Reset task-related stuff\n this.resetTaskStatus();\n this.earningsForSleeves = createTaskTracker();\n this.earningsForPlayer = createTaskTracker();\n this.shockRecovery(p);\n\n // Reset augs and multipliers\n this.augmentations = [];\n this.resetMultipliers();\n\n // Reset Location\n\n this.city = CityName.Sector12;\n\n // Reset sleeve-related stats\n this.shock = 1;\n this.storedCycles = 0;\n this.sync = Math.max(this.memory, 1);\n\n this.logs = [];\n }\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 process(p: IPlayer, numCycles = 1): ITaskTracker | null {\n // Only process once every second (5 cycles)\n const CyclesPerSecond = 1000 / CONSTANTS.MilliPerCycle;\n this.storedCycles += numCycles;\n if (this.storedCycles < CyclesPerSecond) {\n return null;\n }\n\n let cyclesUsed = this.storedCycles;\n cyclesUsed = Math.min(cyclesUsed, 15);\n let time = cyclesUsed * CONSTANTS.MilliPerCycle;\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime + time > this.currentTaskMaxTime) {\n time = this.currentTaskMaxTime - this.currentTaskTime;\n cyclesUsed = Math.floor(time / CONSTANTS.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;\n\n // Shock gradually goes towards 100\n this.shock = Math.min(100, this.shock + 0.0001 * cyclesUsed);\n\n let retValue: ITaskTracker = createTaskTracker();\n switch (this.currentTask) {\n case SleeveTaskType.Idle:\n break;\n case SleeveTaskType.Class:\n case SleeveTaskType.Gym:\n this.updateTaskGainRates(p);\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n break;\n case SleeveTaskType.Faction: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n // Gain faction reputation\n const fac: Faction = Factions[this.currentTaskLocation];\n if (!(fac instanceof Faction)) {\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 case SleeveTaskType.Company: {\n retValue = this.gainExperience(p, this.gainRatesForTask, cyclesUsed);\n this.gainMoney(p, this.gainRatesForTask, cyclesUsed);\n\n const company: Company = Companies[this.currentTaskLocation];\n if (!(company instanceof Company)) {\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 case SleeveTaskType.Recovery:\n this.shock = Math.min(100, this.shock + 0.0002 * cyclesUsed);\n if (this.shock >= 100) this.resetTaskStatus();\n break;\n case SleeveTaskType.Synchro:\n this.sync = Math.min(100, this.sync + p.getIntelligenceBonus(0.5) * 0.0002 * cyclesUsed);\n if (this.sync >= 100) this.resetTaskStatus();\n break;\n default:\n break;\n }\n\n if (this.currentTaskMaxTime !== 0 && this.currentTaskTime >= this.currentTaskMaxTime) {\n if (this.currentTask === SleeveTaskType.Crime) {\n retValue = this.finishTask(p);\n } else {\n this.finishTask(p);\n }\n }\n\n this.updateStatLevels();\n\n this.storedCycles -= cyclesUsed;\n\n return retValue;\n }\n\n /**\n * Resets all parameters used to keep information about the current task\n */\n resetTaskStatus(): void {\n this.earningsForTask = createTaskTracker();\n this.gainRatesForTask = createTaskTracker();\n this.currentTask = SleeveTaskType.Idle;\n this.currentTaskTime = 0;\n this.currentTaskMaxTime = 0;\n this.factionWorkType = FactionWorkType.None;\n this.crimeType = \"\";\n this.currentTaskLocation = \"\";\n this.gymStatType = \"\";\n this.className = \"\";\n }\n\n shockRecovery(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Recovery;\n return true;\n }\n\n synchronize(p: IPlayer): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n this.currentTask = SleeveTaskType.Synchro;\n return true;\n }\n\n /**\n * Take a course at a university\n */\n takeUniversityCourse(p: IPlayer, universityName: string, className: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (this.city !== CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSummitUniversity;\n costMult = 4;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (this.city !== CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (this.city !== CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n switch (className.toLowerCase()) {\n case \"study computer science\":\n break;\n case \"data structures\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassDataStructuresBaseCost * costMult);\n break;\n case \"networks\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassNetworksBaseCost * costMult);\n break;\n case \"algorithms\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassAlgorithmsBaseCost * costMult);\n break;\n case \"management\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassManagementBaseCost * costMult);\n break;\n case \"leadership\":\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassLeadershipBaseCost * costMult);\n break;\n default:\n return false;\n }\n\n this.className = className;\n this.currentTask = SleeveTaskType.Class;\n return true;\n }\n\n /**\n * Travel to another City. Costs money from player\n */\n travel(p: IPlayer, newCity: CityName): boolean {\n p.loseMoney(CONSTANTS.TravelCost, \"sleeves\");\n this.city = newCity;\n\n return true;\n }\n\n tryBuyAugmentation(p: IPlayer, aug: Augmentation): boolean {\n if (!p.canAfford(aug.startingCost)) {\n return false;\n }\n\n // Verify that this sleeve does not already have that augmentation.\n if (this.augmentations.some((a) => a.name === aug.name)) {\n return false;\n }\n\n p.loseMoney(aug.startingCost, \"sleeves\");\n this.installAugmentation(aug);\n return true;\n }\n\n updateTaskGainRates(p: IPlayer): void {\n if (this.currentTask === SleeveTaskType.Class) {\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n const totalExpMult = expMult * p.hashManager.getStudyMult();\n switch (this.className.toLowerCase()) {\n case \"study computer science\":\n this.gainRatesForTask.hack =\n CONSTANTS.ClassStudyComputerScienceBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"data structures\":\n this.gainRatesForTask.hack = CONSTANTS.ClassDataStructuresBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"networks\":\n this.gainRatesForTask.hack = CONSTANTS.ClassNetworksBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"algorithms\":\n this.gainRatesForTask.hack = CONSTANTS.ClassAlgorithmsBaseExp * totalExpMult * this.hacking_exp_mult;\n break;\n case \"management\":\n this.gainRatesForTask.cha = CONSTANTS.ClassManagementBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n case \"leadership\":\n this.gainRatesForTask.cha = CONSTANTS.ClassLeadershipBaseExp * totalExpMult * this.charisma_exp_mult;\n break;\n default:\n break;\n }\n\n return;\n }\n\n if (this.currentTask === SleeveTaskType.Gym) {\n // Get gym exp multiplier\n let expMult = 1;\n switch (this.currentTaskLocation.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n expMult = 4;\n break;\n default:\n return;\n }\n\n // Set stat gain rate\n const baseGymExp = 1;\n const totalExpMultiplier = p.hashManager.getTrainingMult() * expMult;\n const sanitizedStat: string = this.gymStatType.toLowerCase();\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: number): void {\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 /**\n * Start work for one of the player's companies\n * Returns boolean indicating success\n */\n workForCompany(p: IPlayer, companyName: string): boolean {\n if (!(Companies[companyName] instanceof Company) || p.jobs[companyName] == null) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const company: Company | null = Companies[companyName];\n const companyPosition: CompanyPosition | null = CompanyPositions[p.jobs[companyName]];\n if (company == null) {\n return false;\n }\n if (companyPosition == null) {\n return false;\n }\n this.gainRatesForTask.money =\n companyPosition.baseSalary *\n company.salaryMultiplier *\n this.work_money_mult *\n BitNodeMultipliers.CompanyWorkMoney;\n this.gainRatesForTask.hack =\n companyPosition.hackingExpGain *\n company.expMultiplier *\n this.hacking_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.str =\n companyPosition.strengthExpGain *\n company.expMultiplier *\n this.strength_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.def =\n companyPosition.defenseExpGain *\n company.expMultiplier *\n this.defense_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.dex =\n companyPosition.dexterityExpGain *\n company.expMultiplier *\n this.dexterity_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.agi =\n companyPosition.agilityExpGain *\n company.expMultiplier *\n this.agility_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n this.gainRatesForTask.cha =\n companyPosition.charismaExpGain *\n company.expMultiplier *\n this.charisma_exp_mult *\n BitNodeMultipliers.CompanyWorkExpGain;\n\n this.currentTaskLocation = companyName;\n this.currentTask = SleeveTaskType.Company;\n\n return true;\n }\n\n /**\n * Start work for one of the player's factions\n * Returns boolean indicating success\n */\n workForFaction(p: IPlayer, factionName: string, workType: string): boolean {\n const faction = Factions[factionName]\n if (factionName === \"\" || !faction || !(faction instanceof Faction) || !p.factions.includes(factionName)) {\n return false;\n }\n\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n const factionInfo = faction.getInfo();\n\n // Set type of work (hacking/field/security), and the experience gains\n const sanitizedWorkType: string = workType.toLowerCase();\n if (sanitizedWorkType.includes(\"hack\")) {\n if (!factionInfo.offerHackingWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Hacking;\n this.gainRatesForTask.hack = 0.15 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"field\")) {\n if (!factionInfo.offerFieldWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Field;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.1 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.1 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.1 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.1 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.cha = 0.1 * this.charisma_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else if (sanitizedWorkType.includes(\"security\")) {\n if (!factionInfo.offerSecurityWork) {\n return false;\n }\n this.factionWorkType = FactionWorkType.Security;\n this.gainRatesForTask.hack = 0.1 * this.hacking_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.str = 0.15 * this.strength_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.def = 0.15 * this.defense_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.dex = 0.15 * this.dexterity_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n this.gainRatesForTask.agi = 0.15 * this.agility_exp_mult * BitNodeMultipliers.FactionWorkExpGain;\n } else {\n return false;\n }\n\n this.currentTaskLocation = factionName;\n this.currentTask = SleeveTaskType.Faction;\n\n return true;\n }\n\n /**\n * Begin a gym workout task\n */\n workoutAtGym(p: IPlayer, gymName: string, stat: string): boolean {\n if (this.currentTask !== SleeveTaskType.Idle) {\n this.finishTask(p);\n } else {\n this.resetTaskStatus();\n }\n\n // Set exp/money multipliers based on which university.\n // Also check that the sleeve is in the right city\n let costMult = 1;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (this.city != CityName.Aevum) {\n return false;\n }\n this.currentTaskLocation = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12IronGym;\n costMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (this.city != CityName.Sector12) {\n return false;\n }\n this.currentTaskLocation = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (this.city != CityName.Volhaven) {\n return false;\n }\n this.currentTaskLocation = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n break;\n default:\n return false;\n }\n\n // Set experience/money gains based on class\n const sanitizedStat: string = stat.toLowerCase();\n\n // Set cost\n this.gainRatesForTask.money = -1 * (CONSTANTS.ClassGymBaseCost * costMult);\n\n // Validate \"stat\" argument\n if (\n !sanitizedStat.includes(\"str\") &&\n !sanitizedStat.includes(\"def\") &&\n !sanitizedStat.includes(\"dex\") &&\n !sanitizedStat.includes(\"agi\")\n ) {\n return false;\n }\n\n this.gymStatType = stat;\n this.currentTask = SleeveTaskType.Gym;\n\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Sleeve\", this);\n }\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 static fromJSON(value: any): Sleeve {\n return Generic_fromJSON(Sleeve, value.data);\n }\n}\n\nReviver.constructors.Sleeve = Sleeve;\n","export enum RamCalculationErrorCode {\n SyntaxError = -1,\n ImportError = -2,\n URLImportError = -3,\n}\n","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const TerminalEvents = new EventEmitter<[]>();\nexport const TerminalClearEvents = new EventEmitter<[]>();\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\n\nexport class Message {\n // Name of Message file\n filename = \"\";\n\n // The text contains in the Message\n msg = \"\";\n\n // Flag indicating whether this Message has been received by the player\n recvd = false;\n\n constructor(filename = \"\", msg = \"\") {\n this.filename = filename;\n this.msg = msg;\n this.recvd = false;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"Message\", this);\n }\n\n // Initializes a Message Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Message {\n return Generic_fromJSON(Message, value.data);\n }\n}\n\nReviver.constructors.Message = Message;\n","/**\n * Helper functions for determine whether Limit and Stop orders should\n * be executed (and executing them)\n */\nimport { buyStock, sellStock, shortStock, sellShort } from \"./BuyingAndSelling\";\nimport { IOrderBook } from \"./IOrderBook\";\nimport { IStockMarket } from \"./IStockMarket\";\nimport { Order } from \"./Order\";\nimport { Stock } from \"./Stock\";\n\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Settings } from \"../Settings/Settings\";\n\nimport * as React from \"react\";\n\nexport interface IProcessOrderRefs {\n stockMarket: IStockMarket;\n symbolToStockMap: IMap;\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 */\nexport function processOrders(\n stock: Stock,\n orderType: OrderTypes,\n posType: PositionTypes,\n refs: IProcessOrderRefs,\n): void {\n const orderBook = refs.stockMarket[\"Orders\"];\n if (orderBook == null) {\n const orders: IOrderBook = {};\n for (const name of Object.keys(refs.stockMarket)) {\n const stock = refs.stockMarket[name];\n if (!(stock instanceof Stock)) {\n continue;\n }\n orders[stock.symbol] = [];\n }\n refs.stockMarket[\"Orders\"] = orders;\n return; // Newly created, so no orders to process\n }\n let stockOrders = orderBook[stock.symbol];\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 OrderTypes.LimitBuy:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.LimitSell:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopBuy:\n if (order.pos === PositionTypes.Long && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long && stock.price <= order.price) {\n executeOrder(/*66*/ order, refs);\n } else if (order.pos === PositionTypes.Short && stock.price >= order.price) {\n executeOrder(/*66*/ order, refs);\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\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 */\nfunction executeOrder(order: Order, refs: IProcessOrderRefs): void {\n const stock = refs.symbolToStockMap[order.stockSymbol];\n if (!(stock instanceof Stock)) {\n console.error(`Could not find stock for this order: ${order.stockSymbol}`);\n return;\n }\n const stockMarket = refs.stockMarket;\n const orderBook = stockMarket[\"Orders\"];\n const stockOrders = orderBook[stock.symbol];\n\n // 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 const opts = {\n suppressDialog: true,\n };\n\n let res = true;\n let isBuy = false;\n switch (order.type) {\n case OrderTypes.LimitBuy:\n case OrderTypes.StopBuy:\n isBuy = true;\n if (order.pos === PositionTypes.Long) {\n res = buyStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = shortStock(stock, order.shares, null, opts) && res;\n }\n break;\n case OrderTypes.LimitSell:\n case OrderTypes.StopSell:\n if (order.pos === PositionTypes.Long) {\n res = sellStock(stock, order.shares, null, opts) && res;\n } else if (order.pos === PositionTypes.Short) {\n res = sellShort(stock, order.shares, null, opts) && res;\n }\n break;\n default:\n console.warn(`Invalid order type: ${order.type}`);\n return;\n }\n\n // Position type, for logging/message purposes\n const pos = order.pos === PositionTypes.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 if (!Settings.SuppressTIXPopup) {\n dialogBoxCreate(\n <>\n {order.type} for {stock.symbol} @ ({pos}) was filled (\n {numeralWrapper.formatShares(Math.round(order.shares))} shares)\n ,\n );\n }\n return;\n }\n }\n\n console.error(\"Could not find the following Order in Order Book: \");\n console.error(order);\n } else if (isBuy) {\n dialogBoxCreate(\n <>\n Failed to execute {order.type} for {stock.symbol} @ ({pos}). This is most likely\n because you do not have enough money or the order would exceed the stock's maximum number of shares\n ,\n );\n }\n}\n","import { IMap } from \"../types\";\nimport * as predefined from \"./data\";\n\nexport interface ITheme {\n [key: string]: string | undefined;\n primarylight: string;\n primary: string;\n primarydark: string;\n successlight: string;\n success: string;\n successdark: string;\n errorlight: string;\n error: string;\n errordark: string;\n secondarylight: string;\n secondary: string;\n secondarydark: string;\n warninglight: string;\n warning: string;\n warningdark: string;\n infolight: string;\n info: string;\n infodark: string;\n welllight: string;\n well: string;\n white: string;\n black: string;\n hp: string;\n money: string;\n hack: string;\n combat: string;\n cha: string;\n int: string;\n rep: string;\n disabled: string;\n backgroundprimary: string;\n backgroundsecondary: string;\n button: string;\n}\n\nexport interface IPredefinedTheme {\n colors: ITheme;\n name: string;\n credit: string;\n screenshot: string;\n description: string;\n reference?: string;\n}\n\nexport const defaultTheme: ITheme = {\n ...predefined.Default.colors,\n};\n\nexport const getPredefinedThemes = (): IMap => ({\n ...predefined,\n});\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport { sha256 } from \"js-sha256\";\n\nexport const AlertEvents = new EventEmitter<[string | JSX.Element]>();\n\ninterface Alert {\n id: string;\n text: string | JSX.Element;\n hash: string;\n}\n\nlet i = 0;\nexport function AlertManager(): React.ReactElement {\n const [alerts, setAlerts] = useState([]);\n useEffect(\n () =>\n AlertEvents.subscribe((text: string | JSX.Element) => {\n const id = i + \"\";\n i++;\n setAlerts((old) => {\n const hash = getMessageHash(text);\n if (old.some((a) => a.hash === hash)) {\n console.log(\"Duplicate message\");\n return old;\n }\n return [\n ...old,\n {\n id: id,\n text: text,\n hash: hash,\n },\n ];\n });\n }),\n [],\n );\n\n useEffect(() => {\n function handle(this: Document, event: KeyboardEvent): void {\n if (event.code === \"Escape\") {\n setAlerts([]);\n }\n }\n document.addEventListener(\"keydown\", handle);\n return () => document.removeEventListener(\"keydown\", handle);\n }, []);\n\n function getMessageHash(text: string | JSX.Element): string {\n if (typeof text === \"string\") return sha256(text);\n return sha256(JSON.stringify(text.props));\n }\n\n function close(): void {\n setAlerts((old) => {\n return old.slice(1, 1e99);\n });\n }\n\n return (\n <>\n {alerts.length > 0 && (\n \n \n {alerts[0].text}\n \n \n )}\n \n );\n}\n","import { getRandomByte } from \"./helpers/getRandomByte\";\n\n/**\n * Generate a random IP address\n * Does not check to see if the IP already exists in the game\n */\nexport function createRandomIp(): string {\n const ip: string = getRandomByte(99) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9) + \".\" + getRandomByte(9);\n\n return ip;\n}\n","import { FactionNames } from \"./Faction/data/FactionNames\";\nimport { CityName } from \"./Locations/data/CityNames\";\nimport { Augmentations } from \"./Augmentation/Augmentations\";\nimport { augmentationExists, initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { Companies, initCompanies } from \"./Company/Companies\";\nimport { resetIndustryResearchTrees } from \"./Corporation/IndustryData\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Faction } from \"./Faction/Faction\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { joinFaction } from \"./Faction/FactionHelpers\";\nimport { updateHashManagerCapacity } from \"./Hacknet/HacknetHelpers\";\nimport { initMessages } from \"./Message/MessageHelpers\";\nimport { prestigeWorkerScripts } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { Router } from \"./ui/GameRoot\";\nimport { resetPidCounter } from \"./Netscript/Pid\";\nimport { LiteratureNames } from \"./Literature/data/LiteratureNames\";\n\nimport { GetServer, AddToAllServers, initForeignServers, prestigeAllServers } from \"./Server/AllServers\";\nimport { prestigeHomeComputer } from \"./Server/ServerHelpers\";\nimport { SourceFileFlags, updateSourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { deleteStockMarket, initStockMarket, initSymbolToStockMap } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\n\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { ProgramsSeen } from \"./Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"./Faction/ui/FactionsRoot\";\nimport { CONSTANTS } from \"./Constants\";\nimport { LogBoxClearEvents } from \"./ui/React/LogBoxManager\";\n\nconst BitNode8StartingMoney = 250e6;\n\n// Prestige by purchasing augmentation\nexport function prestigeAugmentation(): void {\n initBitNodeMultipliers(Player);\n\n const maintainMembership = Player.factions.concat(Player.factionInvitations).filter(function (faction) {\n return Factions[faction].getInfo().keep;\n });\n Player.prestigeAugmentation();\n\n // Delete all Worker Scripts objects\n prestigeWorkerScripts();\n\n const homeComp = Player.getHomeComputer();\n // Delete all servers except home computer\n prestigeAllServers();\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n if (augmentationExists(AugmentationNames.Neurolink) && Augmentations[AugmentationNames.Neurolink].owned) {\n homeComp.programs.push(Programs.FTPCrackProgram.name);\n homeComp.programs.push(Programs.RelaySMTPProgram.name);\n }\n if (augmentationExists(AugmentationNames.CashRoot) && Augmentations[AugmentationNames.CashRoot].owned) {\n Player.setMoney(1e6);\n homeComp.programs.push(Programs.BruteSSHProgram.name);\n }\n if (augmentationExists(AugmentationNames.PCMatrix) && Augmentations[AugmentationNames.PCMatrix].owned) {\n homeComp.programs.push(Programs.DeepscanV1.name);\n homeComp.programs.push(Programs.AutoLink.name);\n }\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n // Gain favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].gainFavor();\n }\n }\n\n // Gain favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].gainFavor();\n }\n }\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n\n Player.factionInvitations = Player.factionInvitations.concat(maintainMembership);\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Messages\n initMessages();\n\n // Apply entropy from grafting\n Player.applyEntropy(Player.entropy);\n\n // Gang\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n const faction = Factions[gang.facName];\n if (faction instanceof Faction) {\n joinFaction(faction);\n }\n const penalty = 0.95;\n for (const m of gang.members) {\n m.hack_asc_points *= penalty;\n m.str_asc_points *= penalty;\n m.def_asc_points *= penalty;\n m.dex_asc_points *= penalty;\n m.agi_asc_points *= penalty;\n m.cha_asc_points *= penalty;\n }\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n }\n\n // Cancel Bladeburner action\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.prestige();\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || SourceFileFlags[8] > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Reset Stock market\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n }\n\n // Red Pill\n if (augmentationExists(AugmentationNames.TheRedPill) && Augmentations[AugmentationNames.TheRedPill].owned) {\n const WorldDaemon = GetServer(SpecialServers.WorldDaemon);\n const DaedalusServer = GetServer(SpecialServers.DaedalusServer);\n if (WorldDaemon && DaedalusServer) {\n WorldDaemon.serversOnNetwork.push(DaedalusServer.hostname);\n DaedalusServer.serversOnNetwork.push(WorldDaemon.hostname);\n }\n }\n\n if (augmentationExists(AugmentationNames.StaneksGift1) && Augmentations[AugmentationNames.StaneksGift1].owned) {\n joinFaction(Factions[FactionNames.ChurchOfTheMachineGod]);\n }\n\n staneksGift.prestigeAugmentation();\n\n resetPidCounter();\n ProgramsSeen.splice(0, ProgramsSeen.length);\n InvitationsSeen.splice(0, InvitationsSeen.length);\n}\n\n// Prestige by destroying Bit Node and gaining a Source File\nexport function prestigeSourceFile(flume: boolean): void {\n initBitNodeMultipliers(Player);\n updateSourceFileFlags(Player);\n\n Player.prestigeSourceFile();\n prestigeWorkerScripts(); // Delete all Worker Scripts objects\n\n const homeComp = Player.getHomeComputer();\n\n // Stop a Terminal action if there is one.\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n Terminal.clear();\n LogBoxClearEvents.emit();\n\n // Delete all servers except home computer\n prestigeAllServers(); // Must be done before initForeignServers()\n\n // Reset home computer (only the programs) and add to AllServers\n AddToAllServers(homeComp);\n prestigeHomeComputer(Player, homeComp);\n\n // Re-create foreign servers\n initForeignServers(Player.getHomeComputer());\n\n if (SourceFileFlags[9] >= 2) {\n homeComp.setMaxRam(128);\n } else if (SourceFileFlags[1] > 0) {\n homeComp.setMaxRam(32);\n } else {\n homeComp.setMaxRam(8);\n }\n homeComp.cpuCores = 1;\n\n // Reset favor for Companies\n for (const member of Object.keys(Companies)) {\n if (Companies.hasOwnProperty(member)) {\n Companies[member].favor = 0;\n }\n }\n\n // Reset favor for factions\n for (const member of Object.keys(Factions)) {\n if (Factions.hasOwnProperty(member)) {\n Factions[member].favor = 0;\n }\n }\n\n // Stop a Terminal action if there is one\n if (Terminal.action !== null) {\n Terminal.finishAction(Router, Player, true);\n }\n\n // Delete all Augmentations\n for (const name of Object.keys(Augmentations)) {\n if (Augmentations.hasOwnProperty(name)) {\n delete Augmentations[name];\n }\n }\n\n // Give levels of NeuroFluxGoverner for Source-File 12. Must be done here before Augmentations are recalculated\n if (SourceFileFlags[12] > 0) {\n Player.augmentations.push({\n name: AugmentationNames.NeuroFluxGovernor,\n level: SourceFileFlags[12],\n });\n }\n\n // Re-initialize things - This will update any changes\n initFactions(); // Factions must be initialized before augmentations\n initAugmentations(); // Calls reapplyAllAugmentations() and resets Player multipliers\n Player.reapplyAllSourceFiles();\n initCompanies();\n\n // Messages\n initMessages();\n\n if (Player.sourceFileLvl(5) > 0 || Player.bitNodeN === 5) {\n homeComp.programs.push(Programs.Formulas.name);\n }\n\n // BitNode 3: Corporatocracy\n if (Player.bitNodeN === 3) {\n homeComp.messages.push(LiteratureNames.CorporationManagementHandbook);\n dialogBoxCreate(\n \"You received a copy of the Corporation Management Handbook on your home computer. \" +\n \"Read it if you need help getting started with Corporations!\",\n );\n }\n\n // BitNode 8: Ghost of Wall Street\n if (Player.bitNodeN === 8) {\n Player.money = BitNode8StartingMoney;\n }\n if (Player.bitNodeN === 8 || SourceFileFlags[8] > 0) {\n Player.hasWseAccount = true;\n Player.hasTixApiAccess = true;\n }\n\n // Bit Node 10: Digital Carbon\n if (Player.bitNodeN === 10) {\n dialogBoxCreate(\"Visit VitaLife in New Tokyo if you'd like to purchase a new sleeve!\");\n }\n\n if (Player.bitNodeN === 13) {\n dialogBoxCreate(`Trouble is brewing in ${CityName.Chongqing}`);\n }\n\n // Reset Stock market, gang, and corporation\n if (Player.hasWseAccount) {\n initStockMarket();\n initSymbolToStockMap();\n } else {\n deleteStockMarket();\n }\n\n Player.gang = null;\n Player.corporation = null;\n resetIndustryResearchTrees();\n Player.bladeburner = null;\n\n // Source-File 9 (level 3) effect\n if (SourceFileFlags[9] >= 3) {\n const hserver = Player.createHacknetServer();\n\n hserver.level = 100;\n hserver.cores = 10;\n hserver.cache = 5;\n hserver.updateHashRate(Player.hacknet_node_money_mult);\n hserver.updateHashCapacity();\n updateHashManagerCapacity(Player);\n }\n\n if (Player.bitNodeN === 13) {\n Player.money = CONSTANTS.TravelCost;\n }\n staneksGift.prestigeSourceFile();\n\n // Gain int exp\n if (SourceFileFlags[5] !== 0 && !flume) Player.gainIntelligenceExp(300);\n\n resetPidCounter();\n}\n","function getDB(): Promise {\n return new Promise((resolve, reject) => {\n if (!window.indexedDB) {\n reject(\"Indexed DB does not exists\");\n }\n /**\n * DB is called bitburnerSave\n * Object store is called savestring\n * key for the Object store is called save\n * Version `1` is important\n */\n const indexedDbRequest: IDBOpenDBRequest = window.indexedDB.open(\"bitburnerSave\", 1);\n\n // This is called when there's no db to begin with. It's important, don't remove it.\n indexedDbRequest.onupgradeneeded = function (this: IDBRequest) {\n const db = this.result;\n db.createObjectStore(\"savestring\");\n };\n\n indexedDbRequest.onerror = function (this: IDBRequest, ev: Event) {\n reject(`Failed to get IDB ${ev}`);\n };\n\n indexedDbRequest.onsuccess = function (this: IDBRequest) {\n const db = this.result;\n if (!db) {\n reject(\"database loading result was undefined\");\n return;\n }\n resolve(db.transaction([\"savestring\"], \"readwrite\").objectStore(\"savestring\"));\n };\n });\n}\n\nexport function load(): Promise {\n return new Promise((resolve, reject) => {\n getDB()\n .then((db) => {\n return new Promise((resolve, reject) => {\n const request: IDBRequest = db.get(\"save\");\n request.onerror = function (this: IDBRequest, ev: Event) {\n reject(\"Error in Database request to get savestring: \" + ev);\n };\n\n request.onsuccess = function (this: IDBRequest) {\n resolve(this.result);\n };\n }).then((saveString) => resolve(saveString));\n })\n .catch((r) => reject(r));\n });\n}\n\nexport function save(saveString: string): Promise {\n return getDB().then((db) => {\n return new Promise((resolve, reject) => {\n // We'll save to both localstorage and indexedDb\n const request = db.put(saveString, \"save\");\n\n request.onerror = function (e) {\n reject(\"Error saving game to IndexedDB: \" + e);\n };\n\n request.onsuccess = () => resolve();\n });\n });\n}\n\nexport function deleteGame(): Promise {\n return getDB().then((db) => {\n db.delete(\"save\");\n });\n}\n","// The initial formulas was sum 0 to f of 500*1.02^f.\n// see https://en.wikipedia.org/wiki/Geometric_series#Closed-form_formula\n// for information on how to calculate this\n\nexport function favorToRep(f: number): number {\n const raw = 25000 * (Math.pow(1.02, f) - 1);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n\nexport function repToFavor(r: number): number {\n const raw = Math.log(r / 25000 + 1) / Math.log(1.02);\n return Math.round(raw * 10000) / 10000; // round to make things easier.\n}\n","import { Factions } from \"./Faction/Factions\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\nexport let LastExportBonus = 0;\n\nconst bonusTimer = 24 * 60 * 60 * 1000; // 24h\nexport function canGetBonus(): boolean {\n const now = new Date().getTime();\n return now - LastExportBonus > bonusTimer;\n}\n\nexport function onExport(p: IPlayer): void {\n if (!canGetBonus()) return;\n for (const facName of p.factions) {\n Factions[facName].favor++;\n }\n LastExportBonus = new Date().getTime();\n}\n\nexport function setLastExportBonus(unixTime: number): void {\n LastExportBonus = unixTime;\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IOperationParams extends IActionParams {\n reqdRank?: number;\n teamCount?: number;\n}\n\nexport class Operation extends Action {\n reqdRank = 100;\n teamCount = 0;\n\n constructor(params: IOperationParams | null = null) {\n super(params);\n if (params && params.reqdRank) this.reqdRank = params.reqdRank;\n if (params && params.teamCount) this.teamCount = params.teamCount;\n }\n\n // For actions that have teams. To be implemented by subtypes.\n getTeamSuccessBonus(inst: IBladeburner): number {\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: IBladeburner): number {\n return inst.skillMultipliers.successChanceOperation;\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Operation\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Operation {\n return Generic_fromJSON(Operation, value.data);\n }\n}\n\nReviver.constructors.Operation = Operation;\n","import { FactionNames } from '../../Faction/data/FactionNames';\n// tslint:disable:max-file-line-count\n\n// This could actually be a JSON file as it should be constant metadata to be imported...\nimport { IMinMaxRange } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { LiteratureNames } from \"../../Literature/data/LiteratureNames\";\nimport { SpecialServers } from \"./SpecialServers\";\n\n/**\n * The metadata describing the base state of servers on the network.\n * These values will be adjusted based on Bitnode multipliers when the Server objects are built out.\n */\ninterface IServerMetadata {\n /**\n * When populated, the base security level of the server.\n */\n hackDifficulty?: number | IMinMaxRange;\n\n /**\n * The DNS name of the server.\n */\n hostname: string;\n\n /**\n * When populated, the files will be added to the server when created.\n */\n literature?: string[];\n\n /**\n * When populated, the exponent of 2^x amount of RAM the server has.\n * This should be in the range of 1-20, to match the Player's max RAM.\n */\n maxRamExponent?: number | IMinMaxRange;\n\n /**\n * How much money the server starts out with.\n */\n moneyAvailable: number | IMinMaxRange;\n\n /**\n * The number of network layers away from the `home` server.\n * This value is between 1 and 15.\n * If this is not populated, @specialName should be.\n */\n networkLayer?: number | IMinMaxRange;\n\n /**\n * The number of ports that must be opened before the player can execute NUKE.\n */\n numOpenPortsRequired: number;\n\n /**\n * The organization that the server belongs to.\n */\n organizationName: string;\n\n /**\n * The minimum hacking level before the player can run NUKE.\n */\n requiredHackingSkill: number | IMinMaxRange;\n\n /**\n * The growth factor for the server.\n */\n serverGrowth?: number | IMinMaxRange;\n\n /**\n * A \"unique\" server that has special implications when the player manually hacks it.\n */\n specialName?: string;\n\n [key: string]: any;\n}\n\n/**\n * The metadata for building up the servers on the network.\n */\nexport const serverMetadata: IServerMetadata[] = [\n {\n hackDifficulty: 99,\n hostname: LocationName.AevumECorp.toLowerCase(),\n moneyAvailable: {\n max: 70e9,\n min: 30e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumECorp,\n requiredHackingSkill: {\n max: 1400,\n min: 1050,\n },\n serverGrowth: 99,\n specialName: LocationName.AevumECorp,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.Sector12MegaCorp.toLowerCase(),\n moneyAvailable: {\n max: 60e9,\n min: 40e9,\n },\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12MegaCorp,\n requiredHackingSkill: {\n max: 1350,\n min: 1100,\n },\n serverGrowth: 99,\n specialName: LocationName.Sector12MegaCorp,\n },\n {\n hackDifficulty: {\n max: 88,\n min: 72,\n },\n hostname: \"b-and-a\",\n moneyAvailable: {\n max: 30e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumBachmanAndAssociates,\n requiredHackingSkill: {\n max: 1150,\n min: 900,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.AevumBachmanAndAssociates,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 88,\n },\n hostname: \"blade\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: {\n max: 40e9,\n min: 10e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12BladeIndustries,\n requiredHackingSkill: {\n max: 1200,\n min: 900,\n },\n serverGrowth: {\n max: 85,\n min: 55,\n },\n specialName: LocationName.Sector12BladeIndustries,\n },\n {\n hackDifficulty: 99,\n hostname: LocationName.VolhavenNWO.toLowerCase(),\n literature: [LiteratureNames.TheHiddenWorld],\n moneyAvailable: {\n max: 40e9,\n min: 20e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenNWO,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 95,\n min: 65,\n },\n specialName: LocationName.VolhavenNWO,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"clarkinc\",\n literature: [LiteratureNames.BeyondMan, LiteratureNames.CostOfImmortality],\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumClarkeIncorporated,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumClarkeIncorporated,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 90,\n },\n hostname: \"omnitek\",\n literature: [LiteratureNames.CodedIntelligence, LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 9,\n min: 7,\n },\n moneyAvailable: {\n max: 22e9,\n min: 13e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniTekIncorporated,\n requiredHackingSkill: {\n max: 1100,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 95,\n },\n specialName: LocationName.VolhavenOmniTekIncorporated,\n },\n {\n hackDifficulty: {\n max: 75,\n min: 55,\n },\n hostname: \"4sigma\",\n moneyAvailable: {\n max: 25e9,\n min: 15e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12FourSigma,\n requiredHackingSkill: {\n max: 1250,\n min: 900,\n },\n serverGrowth: {\n max: 99,\n min: 75,\n },\n specialName: LocationName.Sector12FourSigma,\n },\n {\n hackDifficulty: {\n max: 99,\n min: 95,\n },\n hostname: \"kuai-gong\",\n moneyAvailable: {\n max: 30e9,\n min: 20e9,\n },\n networkLayer: 13,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingKuaiGongInternational,\n requiredHackingSkill: {\n max: 1300,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 90,\n },\n specialName: LocationName.ChongqingKuaiGongInternational,\n },\n {\n hackDifficulty: {\n max: 97,\n min: 83,\n },\n hostname: \"fulcrumtech\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 11,\n min: 7,\n },\n moneyAvailable: {\n max: 1800e6,\n min: 1400e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1250,\n min: 950,\n },\n serverGrowth: {\n max: 99,\n min: 80,\n },\n specialName: LocationName.AevumFulcrumTechnologies,\n },\n {\n hackDifficulty: 99,\n hostname: \"fulcrumassets\",\n moneyAvailable: 1e6,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumFulcrumTechnologies,\n requiredHackingSkill: {\n max: 1600,\n min: 1100,\n },\n serverGrowth: 1,\n specialName: SpecialServers.FulcrumSecretTechnologies,\n },\n {\n hackDifficulty: {\n max: 92,\n min: 78,\n },\n hostname: \"stormtech\",\n moneyAvailable: {\n max: 1200e6,\n min: 1000e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.IshimaStormTechnologies,\n requiredHackingSkill: {\n max: 1075,\n min: 875,\n },\n serverGrowth: {\n max: 92,\n min: 68,\n },\n specialName: LocationName.IshimaStormTechnologies,\n },\n {\n hackDifficulty: {\n max: 96,\n min: 84,\n },\n hostname: \"defcomm\",\n moneyAvailable: {\n max: 950e6,\n min: 800e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoDefComm,\n requiredHackingSkill: {\n max: 1050,\n min: 850,\n },\n serverGrowth: {\n max: 73,\n min: 47,\n },\n specialName: LocationName.NewTokyoDefComm,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"infocomm\",\n moneyAvailable: {\n max: 900e6,\n min: 600e6,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"InfoComm\",\n requiredHackingSkill: {\n max: 950,\n min: 875,\n },\n serverGrowth: {\n max: 75,\n min: 35,\n },\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"helios\",\n literature: [LiteratureNames.BeyondMan],\n maxRamExponent: {\n max: 8,\n min: 5,\n },\n moneyAvailable: {\n max: 750e6,\n min: 550e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenHeliosLabs,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.VolhavenHeliosLabs,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.NewTokyoVitaLife.toLowerCase(),\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800e6,\n min: 700e6,\n },\n networkLayer: 12,\n numOpenPortsRequired: 5,\n organizationName: LocationName.NewTokyoVitaLife,\n requiredHackingSkill: {\n max: 900,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n specialName: LocationName.NewTokyoVitaLife,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"icarus\",\n moneyAvailable: {\n max: 1000e6,\n min: 900e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12IcarusMicrosystems,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 95,\n min: 85,\n },\n specialName: LocationName.Sector12IcarusMicrosystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: \"univ-energy\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1200e6,\n min: 1100e6,\n },\n networkLayer: 9,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12UniversalEnergy,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.Sector12UniversalEnergy,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"titan-labs\",\n literature: [LiteratureNames.CodedIntelligence],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 750000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Titan Laboratories\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 60,\n },\n },\n {\n hackDifficulty: {\n max: 75,\n min: 65,\n },\n hostname: \"microdyne\",\n literature: [LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 5,\n organizationName: \"Microdyne Technologies\",\n requiredHackingSkill: {\n max: 875,\n min: 800,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"taiyang-digital\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.BrighterThanTheSun],\n moneyAvailable: {\n max: 900000000,\n min: 800000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 5,\n organizationName: \"Taiyang Digital\",\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"galactic-cyber\",\n moneyAvailable: {\n max: 850000000,\n min: 750000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumGalacticCybersystems,\n requiredHackingSkill: {\n max: 875,\n min: 825,\n },\n serverGrowth: {\n max: 90,\n min: 70,\n },\n specialName: LocationName.AevumGalacticCybersystems,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 80,\n },\n hostname: LocationName.AevumAeroCorp.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 1200000000,\n min: 1000000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 5,\n organizationName: LocationName.AevumAeroCorp,\n requiredHackingSkill: {\n max: 925,\n min: 850,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.AevumAeroCorp,\n },\n {\n hackDifficulty: {\n max: 95,\n min: 85,\n },\n hostname: \"omnia\",\n literature: [LiteratureNames.HistoryOfSynthoids],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1000000000,\n min: 900000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenOmniaCybersystems,\n requiredHackingSkill: {\n max: 950,\n min: 850,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenOmniaCybersystems,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"zb-def\",\n literature: [LiteratureNames.SyntheticMuscles],\n moneyAvailable: {\n max: 1100000000,\n min: 900000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: \"ZB Defense Industries\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 65,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"applied-energetics\",\n moneyAvailable: {\n max: 1000000000,\n min: 700000000,\n },\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"Applied Energetics\",\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 75,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"solaris\",\n literature: [LiteratureNames.AGreenTomorrow, LiteratureNames.TheFailedFrontier],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 900000000,\n min: 700000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: LocationName.ChongqingSolarisSpaceSystems,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n specialName: LocationName.ChongqingSolarisSpaceSystems,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: LocationName.Sector12DeltaOne.toLowerCase(),\n moneyAvailable: {\n max: 1700000000,\n min: 1300000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 5,\n organizationName: LocationName.Sector12DeltaOne,\n requiredHackingSkill: {\n max: 900,\n min: 800,\n },\n serverGrowth: {\n max: 70,\n min: 50,\n },\n specialName: LocationName.Sector12DeltaOne,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 75,\n },\n hostname: \"global-pharm\",\n literature: [LiteratureNames.AGreenTomorrow],\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 1750000000,\n min: 1500000000,\n },\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: LocationName.NewTokyoGlobalPharmaceuticals,\n requiredHackingSkill: {\n max: 850,\n min: 750,\n },\n serverGrowth: {\n max: 90,\n min: 80,\n },\n specialName: LocationName.NewTokyoGlobalPharmaceuticals,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"nova-med\",\n moneyAvailable: {\n max: 1250000000,\n min: 1100000000,\n },\n networkLayer: 10,\n numOpenPortsRequired: 4,\n organizationName: LocationName.IshimaNovaMedical,\n requiredHackingSkill: {\n max: 850,\n min: 775,\n },\n serverGrowth: {\n max: 85,\n min: 65,\n },\n specialName: LocationName.IshimaNovaMedical,\n },\n {\n hackDifficulty: {\n max: 90,\n min: 70,\n },\n hostname: \"zeus-med\",\n moneyAvailable: {\n max: 1500000000,\n min: 1300000000,\n },\n networkLayer: 9,\n numOpenPortsRequired: 5,\n organizationName: \"Zeus Medical\",\n requiredHackingSkill: {\n max: 850,\n min: 800,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"unitalife\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 1000000000,\n },\n networkLayer: 8,\n numOpenPortsRequired: 4,\n organizationName: \"UnitaLife Group\",\n requiredHackingSkill: {\n max: 825,\n min: 775,\n },\n serverGrowth: {\n max: 80,\n min: 70,\n },\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"lexo-corp\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 800000000,\n min: 700000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenLexoCorp,\n requiredHackingSkill: {\n max: 750,\n min: 650,\n },\n serverGrowth: {\n max: 65,\n min: 55,\n },\n specialName: LocationName.VolhavenLexoCorp,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"rho-construction\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 700000000,\n min: 500000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumRhoConstruction,\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumRhoConstruction,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 50,\n },\n hostname: \"alpha-ent\",\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 750000000,\n min: 600000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.Sector12AlphaEnterprises,\n requiredHackingSkill: {\n max: 600,\n min: 500,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12AlphaEnterprises,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 70,\n },\n hostname: \"aevum-police\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 400000000,\n min: 200000000,\n },\n networkLayer: 6,\n numOpenPortsRequired: 4,\n organizationName: LocationName.AevumPolice,\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 50,\n min: 30,\n },\n specialName: LocationName.AevumPolice,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"rothman-uni\",\n literature: [\n LiteratureNames.SecretSocieties,\n LiteratureNames.TheFailedFrontier,\n LiteratureNames.TensionsInTechRace,\n ],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 250000000,\n min: 175000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.Sector12RothmanUniversity,\n requiredHackingSkill: {\n max: 430,\n min: 370,\n },\n serverGrowth: {\n max: 45,\n min: 35,\n },\n specialName: LocationName.Sector12RothmanUniversity,\n },\n {\n hackDifficulty: {\n max: 85,\n min: 65,\n },\n hostname: \"zb-institute\",\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 1100000000,\n min: 800000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 5,\n organizationName: LocationName.VolhavenZBInstituteOfTechnology,\n requiredHackingSkill: {\n max: 775,\n min: 725,\n },\n serverGrowth: {\n max: 85,\n min: 75,\n },\n specialName: LocationName.VolhavenZBInstituteOfTechnology,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 45,\n },\n hostname: \"summit-uni\",\n literature: [LiteratureNames.SecretSocieties, LiteratureNames.TheFailedFrontier, LiteratureNames.SyntheticMuscles],\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: {\n max: 350000000,\n min: 200000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumSummitUniversity,\n requiredHackingSkill: {\n max: 475,\n min: 425,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSummitUniversity,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"syscore\",\n moneyAvailable: {\n max: 600000000,\n min: 400000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 4,\n organizationName: LocationName.VolhavenSysCoreSecurities,\n requiredHackingSkill: {\n max: 650,\n min: 550,\n },\n serverGrowth: {\n max: 70,\n min: 60,\n },\n specialName: LocationName.VolhavenSysCoreSecurities,\n },\n {\n hackDifficulty: {\n max: 70,\n min: 60,\n },\n hostname: \"catalyst\",\n literature: [LiteratureNames.TensionsInTechRace],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: {\n max: 550000000,\n min: 300000000,\n },\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"Catalyst Ventures\",\n requiredHackingSkill: {\n max: 450,\n min: 400,\n },\n serverGrowth: {\n max: 55,\n min: 25,\n },\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"the-hub\",\n maxRamExponent: {\n max: 6,\n min: 3,\n },\n moneyAvailable: {\n max: 200000000,\n min: 150000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"The Hub\",\n requiredHackingSkill: {\n max: 325,\n min: 275,\n },\n serverGrowth: {\n max: 55,\n min: 45,\n },\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: LocationName.VolhavenCompuTek.toLowerCase(),\n literature: [LiteratureNames.ManAndMachine],\n moneyAvailable: {\n max: 250000000,\n min: 220000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.VolhavenCompuTek,\n requiredHackingSkill: {\n max: 400,\n min: 300,\n },\n serverGrowth: {\n max: 65,\n min: 45,\n },\n specialName: LocationName.VolhavenCompuTek,\n },\n {\n hackDifficulty: {\n max: 80,\n min: 60,\n },\n hostname: \"netlink\",\n literature: [LiteratureNames.SimulatedReality],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 275000000,\n networkLayer: 4,\n numOpenPortsRequired: 3,\n organizationName: LocationName.AevumNetLinkTechnologies,\n requiredHackingSkill: {\n max: 425,\n min: 375,\n },\n serverGrowth: {\n max: 75,\n min: 45,\n },\n specialName: LocationName.AevumNetLinkTechnologies,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 35,\n },\n hostname: \"johnson-ortho\",\n moneyAvailable: {\n max: 85000000,\n min: 70000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Johnson Orthopedics\",\n requiredHackingSkill: {\n max: 300,\n min: 250,\n },\n serverGrowth: {\n max: 65,\n min: 35,\n },\n },\n {\n hackDifficulty: 1,\n hostname: \"n00dles\",\n literature: [],\n maxRamExponent: 2,\n moneyAvailable: 70000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.NewTokyoNoodleBar,\n requiredHackingSkill: 1,\n serverGrowth: 3000,\n specialName: LocationName.NewTokyoNoodleBar,\n },\n {\n hackDifficulty: 10,\n hostname: LocationName.Sector12FoodNStuff.toLowerCase(),\n literature: [LiteratureNames.Sector12Crime],\n maxRamExponent: 4,\n moneyAvailable: 2000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12FoodNStuff,\n requiredHackingSkill: 1,\n serverGrowth: 5,\n specialName: LocationName.Sector12FoodNStuff,\n },\n {\n hackDifficulty: 10,\n hostname: \"sigma-cosmetics\",\n maxRamExponent: 4,\n moneyAvailable: 2300000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"Sigma Cosmetics\",\n requiredHackingSkill: 5,\n serverGrowth: 10,\n },\n {\n hackDifficulty: 15,\n hostname: \"joesguns\",\n maxRamExponent: 4,\n moneyAvailable: 2500000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: LocationName.Sector12JoesGuns,\n requiredHackingSkill: 10,\n serverGrowth: 20,\n specialName: LocationName.Sector12JoesGuns,\n },\n {\n hackDifficulty: 25,\n hostname: \"zer0\",\n maxRamExponent: 5,\n moneyAvailable: 7500000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"ZER0 Nightclub\",\n requiredHackingSkill: 75,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"nectar-net\",\n maxRamExponent: 4,\n moneyAvailable: 2750000,\n networkLayer: 2,\n numOpenPortsRequired: 0,\n organizationName: \"Nectar Nightclub Network\",\n requiredHackingSkill: 20,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 25,\n hostname: \"neo-net\",\n literature: [LiteratureNames.TheHiddenWorld],\n maxRamExponent: 5,\n moneyAvailable: 5000000,\n networkLayer: 3,\n numOpenPortsRequired: 1,\n organizationName: \"Neo Nightclub Network\",\n requiredHackingSkill: 50,\n serverGrowth: 25,\n },\n {\n hackDifficulty: 30,\n hostname: \"silver-helix\",\n literature: [LiteratureNames.NewTriads],\n maxRamExponent: 6,\n moneyAvailable: 45000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Silver Helix\",\n requiredHackingSkill: 150,\n serverGrowth: 30,\n },\n {\n hackDifficulty: 15,\n hostname: \"hong-fang-tea\",\n literature: [LiteratureNames.BrighterThanTheSun],\n maxRamExponent: 4,\n moneyAvailable: 3000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HongFang Teahouse\",\n requiredHackingSkill: 30,\n serverGrowth: 20,\n },\n {\n hackDifficulty: 15,\n hostname: \"harakiri-sushi\",\n maxRamExponent: 4,\n moneyAvailable: 4000000,\n networkLayer: 1,\n numOpenPortsRequired: 0,\n organizationName: \"HaraKiri Sushi Bar Network\",\n requiredHackingSkill: 40,\n serverGrowth: 40,\n },\n {\n hackDifficulty: 20,\n hostname: \"phantasy\",\n maxRamExponent: 5,\n moneyAvailable: 24000000,\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: \"Phantasy Club\",\n requiredHackingSkill: 100,\n serverGrowth: 35,\n },\n {\n hackDifficulty: 15,\n hostname: \"max-hardware\",\n maxRamExponent: 5,\n moneyAvailable: 10000000,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: \"Max Hardware Store\",\n requiredHackingSkill: 80,\n serverGrowth: 30,\n },\n {\n hackDifficulty: {\n max: 35,\n min: 25,\n },\n hostname: \"omega-net\",\n literature: [LiteratureNames.TheNewGod],\n maxRamExponent: 5,\n moneyAvailable: {\n max: 70000000,\n min: 60000000,\n },\n networkLayer: 3,\n numOpenPortsRequired: 2,\n organizationName: LocationName.IshimaOmegaSoftware,\n requiredHackingSkill: {\n max: 220,\n min: 180,\n },\n serverGrowth: {\n max: 40,\n min: 30,\n },\n specialName: LocationName.IshimaOmegaSoftware,\n },\n {\n hackDifficulty: {\n max: 45,\n min: 35,\n },\n hostname: \"crush-fitness\",\n moneyAvailable: {\n max: 60000000,\n min: 40000000,\n },\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: \"Crush Fitness\",\n requiredHackingSkill: {\n max: 275,\n min: 225,\n },\n serverGrowth: {\n max: 33,\n min: 27,\n },\n specialName: LocationName.AevumCrushFitnessGym,\n },\n {\n hackDifficulty: 30,\n hostname: \"iron-gym\",\n maxRamExponent: 5,\n moneyAvailable: 20000000,\n networkLayer: 1,\n numOpenPortsRequired: 1,\n organizationName: `${LocationName.Sector12IronGym} Network`,\n requiredHackingSkill: 100,\n serverGrowth: 20,\n specialName: LocationName.Sector12IronGym,\n },\n {\n hackDifficulty: {\n max: 55,\n min: 45,\n },\n hostname: \"millenium-fitness\",\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 250000000,\n networkLayer: 6,\n numOpenPortsRequired: 3,\n organizationName: \"Millenium Fitness Network\",\n requiredHackingSkill: {\n max: 525,\n min: 475,\n },\n serverGrowth: {\n max: 45,\n min: 25,\n },\n specialName: LocationName.VolhavenMilleniumFitnessGym,\n },\n {\n hackDifficulty: {\n max: 65,\n min: 55,\n },\n hostname: \"powerhouse-fitness\",\n maxRamExponent: {\n max: 6,\n min: 4,\n },\n moneyAvailable: 900000000,\n networkLayer: 14,\n numOpenPortsRequired: 5,\n organizationName: \"Powerhouse Fitness\",\n requiredHackingSkill: {\n max: 1100,\n min: 950,\n },\n serverGrowth: {\n max: 60,\n min: 50,\n },\n specialName: LocationName.Sector12PowerhouseGym,\n },\n {\n hackDifficulty: {\n max: 60,\n min: 40,\n },\n hostname: \"snap-fitness\",\n moneyAvailable: 450000000,\n networkLayer: 7,\n numOpenPortsRequired: 4,\n organizationName: \"Snap Fitness\",\n requiredHackingSkill: {\n max: 800,\n min: 675,\n },\n serverGrowth: {\n max: 60,\n min: 40,\n },\n specialName: LocationName.AevumSnapFitnessGym,\n },\n {\n hackDifficulty: 0,\n hostname: \"run4theh111z\",\n literature: [LiteratureNames.SimulatedReality, LiteratureNames.TheNewGod],\n maxRamExponent: {\n max: 9,\n min: 5,\n },\n moneyAvailable: 0,\n networkLayer: 11,\n numOpenPortsRequired: 4,\n organizationName: \"The Runners\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.BitRunnersServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"I.I.I.I\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 8,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 5,\n numOpenPortsRequired: 3,\n organizationName: \"I.I.I.I\",\n requiredHackingSkill: {\n max: 365,\n min: 340,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheBlackHandServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"avmnite-02h\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: {\n max: 7,\n min: 4,\n },\n moneyAvailable: 0,\n networkLayer: 4,\n numOpenPortsRequired: 2,\n organizationName: FactionNames.NiteSec,\n requiredHackingSkill: {\n max: 220,\n min: 202,\n },\n serverGrowth: 0,\n specialName: SpecialServers.NiteSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \".\",\n maxRamExponent: 4,\n moneyAvailable: 0,\n networkLayer: 13,\n numOpenPortsRequired: 4,\n organizationName: \".\",\n requiredHackingSkill: {\n max: 550,\n min: 505,\n },\n serverGrowth: 0,\n specialName: SpecialServers.TheDarkArmyServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"CSEC\",\n literature: [LiteratureNames.DemocracyIsDead],\n maxRamExponent: 3,\n moneyAvailable: 0,\n networkLayer: 2,\n numOpenPortsRequired: 1,\n organizationName: FactionNames.CyberSec,\n requiredHackingSkill: {\n max: 60,\n min: 51,\n },\n serverGrowth: 0,\n specialName: SpecialServers.CyberSecServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"The-Cave\",\n literature: [LiteratureNames.AlphaOmega],\n moneyAvailable: 0,\n networkLayer: 15,\n numOpenPortsRequired: 5,\n organizationName: \"Helios\",\n requiredHackingSkill: 925,\n serverGrowth: 0,\n specialName: SpecialServers.DaedalusServer,\n },\n {\n hackDifficulty: 0,\n hostname: \"w0r1d_d43m0n\",\n moneyAvailable: 0,\n numOpenPortsRequired: 5,\n organizationName: \"w0r1d_d43m0n\",\n requiredHackingSkill: 3000,\n serverGrowth: 0,\n specialName: SpecialServers.WorldDaemon,\n },\n];\n","export class PlayerOwnedAugmentation {\n level = 1;\n name = \"\";\n\n constructor(name = \"\") {\n this.name = name;\n }\n}\n\nexport interface IPlayerOwnedAugmentation {\n level: number;\n name: string;\n}\n","import { CONSTANTS } from \"../Constants\";\nimport * as names from \"./data/companypositionnames\";\n\n/* tslint:disable:completed-docs */\n\nexport interface IConstructorParams {\n name: string;\n nextPosition: string | null;\n baseSalary: number;\n repMultiplier: number;\n\n reqdHacking?: number;\n reqdStrength?: number;\n reqdDefense?: number;\n reqdDexterity?: number;\n reqdAgility?: number;\n reqdCharisma?: number;\n reqdReputation?: number;\n\n hackingEffectiveness?: number;\n strengthEffectiveness?: number;\n defenseEffectiveness?: number;\n dexterityEffectiveness?: number;\n agilityEffectiveness?: number;\n charismaEffectiveness?: number;\n\n hackingExpGain?: number;\n strengthExpGain?: number;\n defenseExpGain?: number;\n dexterityExpGain?: number;\n agilityExpGain?: number;\n charismaExpGain?: number;\n}\n\nexport class CompanyPosition {\n /**\n * Position title\n */\n name: string;\n\n /**\n * Title of next position to be promoted to\n */\n nextPosition: string | null;\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 baseSalary: number;\n\n /**\n * Reputation multiplier\n */\n repMultiplier: number;\n\n /**\n * Required stats to earn this position\n */\n requiredAgility: number;\n requiredCharisma: number;\n requiredDefense: number;\n requiredDexterity: number;\n requiredHacking: number;\n requiredStrength: number;\n\n /**\n * Required company reputation to earn this position\n */\n requiredReputation: number;\n\n /**\n * Effectiveness of each stat time for job performance\n */\n hackingEffectiveness: number;\n strengthEffectiveness: number;\n defenseEffectiveness: number;\n dexterityEffectiveness: number;\n agilityEffectiveness: number;\n charismaEffectiveness: number;\n\n /**\n * Experience gain for performing job (per 200ms game cycle)\n */\n hackingExpGain: number;\n strengthExpGain: number;\n defenseExpGain: number;\n dexterityExpGain: number;\n agilityExpGain: number;\n charismaExpGain: number;\n\n constructor(p: IConstructorParams) {\n this.name = p.name;\n this.nextPosition = p.nextPosition;\n this.baseSalary = p.baseSalary;\n this.repMultiplier = p.repMultiplier;\n\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\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 (\n Math.round(\n this.hackingEffectiveness +\n this.strengthEffectiveness +\n this.defenseEffectiveness +\n this.dexterityEffectiveness +\n this.agilityEffectiveness +\n this.charismaEffectiveness,\n ) !== 100\n ) {\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: number, str: number, def: number, dex: number, agi: number, cha: number): number {\n const hackRatio: number = (this.hackingEffectiveness * hack) / CONSTANTS.MaxSkillLevel;\n const strRatio: number = (this.strengthEffectiveness * str) / CONSTANTS.MaxSkillLevel;\n const defRatio: number = (this.defenseEffectiveness * def) / CONSTANTS.MaxSkillLevel;\n const dexRatio: number = (this.dexterityEffectiveness * dex) / CONSTANTS.MaxSkillLevel;\n const agiRatio: number = (this.agilityEffectiveness * agi) / CONSTANTS.MaxSkillLevel;\n const chaRatio: number = (this.charismaEffectiveness * cha) / CONSTANTS.MaxSkillLevel;\n\n let reputationGain: number =\n (this.repMultiplier * (hackRatio + strRatio + defRatio + dexRatio + agiRatio + chaRatio)) / 100;\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(): boolean {\n return names.SoftwareCompanyPositions.includes(this.name);\n }\n\n isITJob(): boolean {\n return names.ITCompanyPositions.includes(this.name);\n }\n\n isSecurityEngineerJob(): boolean {\n return names.SecurityEngineerCompanyPositions.includes(this.name);\n }\n\n isNetworkEngineerJob(): boolean {\n return names.NetworkEngineerCompanyPositions.includes(this.name);\n }\n\n isBusinessJob(): boolean {\n return names.BusinessCompanyPositions.includes(this.name);\n }\n\n isSecurityJob(): boolean {\n return names.SecurityCompanyPositions.includes(this.name);\n }\n\n isAgentJob(): boolean {\n return names.AgentCompanyPositions.includes(this.name);\n }\n\n isSoftwareConsultantJob(): boolean {\n return names.SoftwareConsultantCompanyPositions.includes(this.name);\n }\n\n isBusinessConsultantJob(): boolean {\n return names.BusinessConsultantCompanyPositions.includes(this.name);\n }\n\n isPartTimeJob(): boolean {\n return names.PartTimeCompanyPositions.includes(this.name);\n }\n}\n","import React from \"react\";\nimport { SourceFile } from \"./SourceFile\";\nimport { IMap } from \"../types\";\n\nexport const SourceFiles: IMap = {};\n\nSourceFiles[\"SourceFile1\"] = new SourceFile(\n 1,\n (\n <>\n This Source-File lets the player start with 32GB of RAM on his/her home computer. It also increases all of the\n player's multipliers by:\n
    \n
    \n Level 1: 16%\n
    \n Level 2: 24%\n
    \n Level 3: 28%\n \n ),\n);\nSourceFiles[\"SourceFile2\"] = new SourceFile(\n 2,\n (\n <>\n This Source-File allows you to form gangs in other BitNodes once your karma decreases to a certain value. It also\n increases the player's crime success rate, crime money, and charisma multipliers by:\n
    \n
    \n Level 1: 24%\n
    \n Level 2: 36%\n
    \n Level 3: 42%\n \n ),\n);\nSourceFiles[\"SourceFile3\"] = new SourceFile(\n 3,\n (\n <>\n This Source-File lets you create corporations on other BitNodes (although some BitNodes will disable this\n mechanic). This Source-File also increases your charisma and company salary multipliers by:\n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile4\"] = new SourceFile(\n 4,\n (\n <>\n This Source-File lets you access and use the Singularity Functions in every BitNode. Every level of this\n Source-File reduces the RAM cost of Singularity functions.\n \n ),\n);\nSourceFiles[\"SourceFile5\"] = new SourceFile(\n 5,\n (\n <>\n This Source-File grants a special new stat called Intelligence. Intelligence is unique because it is permanent and\n persistent (it never gets reset back to 1). However, gaining Intelligence experience is much slower than other\n stats. Higher Intelligence levels will boost your production for many actions in the game. In addition, this\n Source-File will unlock the getBitNodeMultipliers() Netscript function and let you start with Formulas.exe, and\n will raise all of your hacking-related multipliers by:\n
    \n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile6\"] = new SourceFile(\n 6,\n (\n <>\n This Source-File allows you to access the NSA's Bladeburner Division in other BitNodes. In addition, this\n Source-File will raise both the level and experience gain rate of all your combat stats by:\n
    \n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile7\"] = new SourceFile(\n 7,\n (\n <>\n This Source-File allows you to access the Bladeburner Netscript API in other BitNodes. In addition, this\n Source-File will increase all of your Bladeburner multipliers by:\n
    \n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile8\"] = new SourceFile(\n 8,\n (\n <>\n This Source-File grants the following benefits:\n
    \n
    \n Level 1: Permanent access to WSE and TIX API\n
    \n Level 2: Ability to short stocks in other BitNodes\n
    \n Level 3: Ability to use limit/stop orders in other BitNodes\n
    \n
    \n This Source-File also increases your hacking growth multipliers by:\n
    \n Level 1: 12%\n
    \n Level 2: 18%\n
    \n Level 3: 21%\n \n ),\n);\nSourceFiles[\"SourceFile9\"] = new SourceFile(\n 9,\n (\n <>\n This Source-File grants the following benefits:\n
    \n
    \n Level 1: Permanently unlocks the Hacknet Server in other BitNodes\n
    \n Level 2: You start with 128GB of RAM on your home computer when entering a new BitNode\n
    \n Level 3: Grants a highly-upgraded Hacknet Server when entering a new BitNode\n
    \n
    \n (Note that the Level 3 effect of this Source-File only applies when entering a new BitNode, NOT when installing\n Augmentations)\n
    \n
    \n This Source-File also increases your hacknet multipliers by:\n
    \n Level 1: 8%\n
    \n Level 2: 12%\n
    \n Level 3: 14%\n \n ),\n);\nSourceFiles[\"SourceFile10\"] = new SourceFile(\n 10,\n (\n <>\n This Source-File unlocks Sleeve technology, and the Grafting API in other BitNodes.\n Each level of this Source-File also grants you a Duplicate Sleeve\n \n ),\n);\nSourceFiles[\"SourceFile11\"] = new SourceFile(\n 11,\n (\n <>\n This Source-File makes it so that company favor increases BOTH the player's salary and reputation gain rate at\n that company by 1% per favor (rather than just the reputation gain). This Source-File also increases the player's\n company salary and reputation gain multipliers by:\n
    \n
    \n Level 1: 32%\n
    \n Level 2: 48%\n
    \n Level 3: 56%\n
    \n
    \n It also reduces the price increase for every aug bought by:\n
    \n
    \n Level 1: 4%\n
    \n Level 2: 6%\n
    \n Level 3: 7%\n \n ),\n);\nSourceFiles[\"SourceFile12\"] = new SourceFile(\n 12,\n <>This Source-File lets the player start with Neuroflux Governor equal to the level of this Source-File.,\n);\nSourceFiles[\"SourceFile13\"] = new SourceFile(\n 13,\n <>Each level of this Source-File increases the size of Stanek's Gift.,\n);\n","/**\n * Class representing a Script instance that is actively running.\n * A Script can have multiple active instances\n */\nimport { Script } from \"./Script\";\nimport { ScriptUrl } from \"./ScriptUrl\";\nimport { Settings } from \"../Settings/Settings\";\nimport { IMap } from \"../types\";\nimport { Terminal } from \"../Terminal\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { formatTime } from \"../utils/helpers/formatTime\";\n\nexport class RunningScript {\n // Script arguments\n args: any[] = [];\n\n // Map of [key: hostname] -> Hacking data. Used for offline progress calculations.\n // Hacking data format: [MoneyStolen, NumTimesHacked, NumTimesGrown, NumTimesWeaken]\n dataMap: IMap = {};\n\n // Script filename\n filename = \"\";\n\n // This script's logs. An array of log entries\n logs: string[] = [];\n\n // Flag indicating whether the logs have been updated since\n // the last time the UI was updated\n logUpd = false;\n\n // Total amount of hacking experience earned from this script when offline\n offlineExpGained = 0;\n\n // Total amount of money made by this script when offline\n offlineMoneyMade = 0;\n\n // Number of seconds that the script has been running offline\n offlineRunningTime = 0.01;\n\n // Total amount of hacking experience earned from this script when online\n onlineExpGained = 0;\n\n // Total amount of money made by this script when online\n onlineMoneyMade = 0;\n\n // Number of seconds that this script has been running online\n onlineRunningTime = 0.01;\n\n // Process ID. Must be an integer and equals the PID of corresponding WorkerScript\n pid = -1;\n\n // How much RAM this script uses for ONE thread\n ramUsage = 0;\n\n // hostname of the server on which this script is running\n server = \"\";\n\n // Number of threads that this script is running with\n threads = 1;\n\n // Script urls for the current running script for translating urls back to file names in errors\n dependencies: ScriptUrl[] = [];\n\n constructor(script: Script | null = null, args: any[] = []) {\n if (script == null) {\n return;\n }\n this.filename = script.filename;\n this.args = args;\n this.server = script.server;\n this.ramUsage = script.ramUsage;\n this.dependencies = script.dependencies;\n }\n\n log(txt: string): void {\n if (this.logs.length > Settings.MaxLogCapacity) {\n this.logs.shift();\n }\n\n let logEntry = txt;\n if (Settings.TimestampsFormat) {\n logEntry = \"[\" + formatTime(Settings.TimestampsFormat) + \"] \" + logEntry;\n }\n\n this.logs.push(logEntry);\n this.logUpd = true;\n }\n\n displayLog(): void {\n for (let i = 0; i < this.logs.length; ++i) {\n Terminal.print(this.logs[i]);\n }\n }\n\n clearLog(): void {\n this.logs.length = 0;\n }\n\n // Update the moneyStolen and numTimesHack maps when hacking\n recordHack(hostname: string, moneyGained: number, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][0] += moneyGained;\n this.dataMap[hostname][1] += n;\n }\n\n // Update the grow map when calling grow()\n recordGrow(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][2] += n;\n }\n\n // Update the weaken map when calling weaken() {\n recordWeaken(hostname: string, n = 1): void {\n if (this.dataMap[hostname] == null || this.dataMap[hostname].constructor !== Array) {\n this.dataMap[hostname] = [0, 0, 0, 0];\n }\n this.dataMap[hostname][3] += n;\n }\n\n // Serialize the current object to a JSON save state\n toJSON(): any {\n return Generic_toJSON(\"RunningScript\", this);\n }\n\n // Initializes a RunningScript Object from a JSON save state\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): RunningScript {\n return Generic_fromJSON(RunningScript, value.data);\n }\n}\n\nReviver.constructors.RunningScript = RunningScript;\n","import React from \"react\";\n\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { use } from \"../../ui/Context\";\nimport Button from \"@mui/material/Button\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n type: number;\n name: string;\n rerender: () => void;\n}\nexport function StartButton(props: IProps): React.ReactElement {\n const player = use.Player();\n const action = props.bladeburner.getActionObject({ name: props.name, type: props.type });\n if (action == null) {\n throw new Error(\"Failed to get Operation Object for: \" + props.name);\n }\n let disabled = false;\n if (action.count < 1) {\n disabled = true;\n }\n if (props.name === \"Raid\" && props.bladeburner.getCurrentCity().comms === 0) {\n disabled = true;\n }\n\n if (action instanceof BlackOperation && props.bladeburner.rank < action.reqdRank) {\n disabled = true;\n }\n function onStart(): void {\n if (disabled) return;\n props.bladeburner.action.type = props.type;\n props.bladeburner.action.name = props.name;\n if (!player.hasAugmentation(AugmentationNames.BladesSimulacrum, true)) player.singularityStopWork();\n props.bladeburner.startAction(player, props.bladeburner.action);\n props.rerender();\n }\n\n return (\n \n );\n}\n","import { format } from \"date-fns\";\n\nexport function formatTime(fmt: string): string {\n try {\n return format(new Date(), fmt);\n } catch (err: any) {\n return \"format error\";\n }\n}\n","import React from \"react\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"./data/FactionNames\";\n\n/**\n * Contains the \"information\" property for all the Factions, which is just a description of each faction\n */\nexport class FactionInfo {\n /**\n * The multiplier to apply to augmentation base purchase price.\n */\n augmentationPriceMult: number;\n\n /**\n * The multiplier to apply to augmentation reputation base requirement.\n */\n augmentationRepRequirementMult: number;\n\n /**\n * The names of all other factions considered to be enemies to this faction.\n */\n enemies: string[];\n\n /**\n * The descriptive text to show on the faction's page.\n */\n infoText: JSX.Element;\n\n /**\n * A flag indicating if the faction supports field work to earn reputation.\n */\n offerFieldWork: boolean;\n\n /**\n * A flag indicating if the faction supports hacking missions to earn reputation.\n */\n offerHackingMission: boolean;\n\n /**\n * A flag indicating if the faction supports hacking work to earn reputation.\n */\n offerHackingWork: boolean;\n\n /**\n * A flag indicating if the faction supports security work to earn reputation.\n */\n offerSecurityWork: boolean;\n\n /**\n * Keep faction on install.\n */\n keep: boolean;\n\n /**\n * Special faction\n */\n special: boolean;\n\n constructor(\n infoText: JSX.Element,\n enemies: string[],\n offerHackingMission: boolean,\n offerHackingWork: boolean,\n offerFieldWork: boolean,\n offerSecurityWork: boolean,\n special: boolean,\n keep: boolean,\n ) {\n this.infoText = infoText;\n this.enemies = enemies;\n this.offerHackingMission = offerHackingMission;\n this.offerHackingWork = offerHackingWork;\n this.offerFieldWork = offerFieldWork;\n this.offerSecurityWork = offerSecurityWork;\n\n // These are always all 1 for now.\n this.augmentationPriceMult = 1;\n this.augmentationRepRequirementMult = 1;\n this.keep = keep;\n this.special = special;\n }\n\n offersWork(): boolean {\n return this.offerFieldWork || this.offerHackingMission || this.offerHackingWork || this.offerSecurityWork;\n }\n}\n\n\n\n/**\n * A map of all factions and associated info to them.\n */\n// tslint:disable-next-line:variable-name\nexport const FactionInfos: IMap = {\n // Endgame\n [FactionNames.Illuminati]: new FactionInfo(\n (\n <>\n Humanity never changes. No matter how civilized society becomes, it will eventually fall back into chaos. And\n from this chaos, we are the invisible hand that guides them to order.{\" \"}\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.Daedalus]: new FactionInfo(\n <>Yesterday we obeyed kings and bent our necks to emperors. Today we kneel only to truth.,\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.TheCovenant]: new FactionInfo(\n (\n <>\n Surrender yourself. Give up your empty individuality to become part of something great, something eternal.\n Become a slave. Submit your mind, body, and soul. Only then can you set yourself free.\n
    \n
    \n Only then can you discover immortality.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n // Megacorporations, each forms its own faction\n [FactionNames.ECorp]: new FactionInfo(\n (\n <>\n {FactionNames.ECorp}'s mission is simple: to connect the world of today with the technology of tomorrow. With our wide range of\n Internet-related software and commercial hardware, {FactionNames.ECorp} makes the world's information universally accessible.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.MegaCorp]: new FactionInfo(\n (\n <>\n {FactionNames.MegaCorp} does what no other dares to do. We imagine. We create. We invent. We create what others have never even\n dreamed of. Our work fills the world's needs for food, water, power, and transportation on an unprecedented\n scale, in ways that no other company can.\n
    \n
    \n In our labs and factories and on the ground with customers, {FactionNames.MegaCorp} is ushering in a new era for the world.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.BachmanAssociates]: new FactionInfo(\n (\n <>\n Where Law and Business meet - thats where we are.\n
    \n
    \n Legal Insight - Business Instinct - Innovative Experience.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.BladeIndustries]: new FactionInfo(<>Augmentation is Salvation., [], true, true, true, true, false, true),\n\n [FactionNames.NWO]: new FactionInfo(\n (\n <>\n Humans don't truly desire freedom. They want to be observed, understood, and judged. They want to be given\n purpose and direction in life. That is why they created God. And that is why they created civilization - not\n because of willingness, but because of a need to be incorporated into higher orders of structure and meaning.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.ClarkeIncorporated]: new FactionInfo(\n <>The Power of the Genome - Unlocked.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.OmniTekIncorporated]: new FactionInfo(\n <>Simply put, our mission is to design and build robots that make a difference.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.FourSigma]: new FactionInfo(\n (\n <>\n The scientific method is the best way to approach investing. Big strategies backed up with big data. Driven by\n deep learning and innovative ideas. And improved by iteration. That's {FactionNames.FourSigma}.\n \n ),\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n [FactionNames.KuaiGongInternational]: new FactionInfo(\n <>Dream big. Work hard. Make history.,\n [],\n true,\n true,\n true,\n true,\n false,\n true,\n ),\n\n // Other Corporations\n [FactionNames.FulcrumSecretTechnologies]: new FactionInfo(\n (\n <>\n The human organism has an innate desire to worship. That is why they created gods. If there were no gods, it\n would be necessary to create them. And now we can.\n \n ),\n [],\n true,\n true,\n false,\n true,\n false,\n true,\n ),\n\n // Hacker groups\n [FactionNames.BitRunners]: new FactionInfo(\n (\n <>\n Our entire lives are controlled by bits. All of our actions, our thoughts, our personal information. It's all\n transformed into bits, stored in bits, communicated through bits. It’s impossible for any person to move, to\n live, to operate at any level without the use of bits. And when a person moves, lives, and operates, they leave\n behind their bits, mere traces of seemingly meaningless fragments of information. But these bits can be\n reconstructed. Transformed. Used.\n
    \n
    \n Those who run the bits, run the world.\n \n ),\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n [FactionNames.TheBlackHand]: new FactionInfo(\n (\n <>\n The world, so afraid of strong government, now has no government. Only power - Digital power. Financial power.\n Technological power. And those at the top rule with an invisible hand. They built a society where the rich get\n richer, and everyone else suffers.\n
    \n
    \n So much pain. So many lives. Their darkness must end.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n // prettier-ignore\n [FactionNames.NiteSec]: new FactionInfo(<>\n {\" __..__ \"}
    \n {\" _.nITESECNIt. \"}
    \n {\" .-'NITESECNITESEc. \"}
    \n {\" .' NITESECNITESECn \"}
    \n {\" / NITESECNITESEC; \"}
    \n {\" : :NITESECNITESEC; \"}
    \n {\" ; $ NITESECNITESECN \"}
    \n {\" : _, ,N'ITESECNITESEC \"}
    \n {\" : .+^^`, : `NITESECNIT \"}
    \n {\" ) /), `-,-=,NITESECNI \"}
    \n {\" / ^ ,-;|NITESECN; \"}
    \n {\" / _.' '-';NITESECN \"}
    \n {\" ( , ,-''`^NITE' \"}
    \n {\" )` :`. .' \"}
    \n {\" )-- ; `- / \"}
    \n {\" ' _.-' : \"}
    \n {\" ( _.-' . \"}
    \n {\" ------. \"}
    \n {\" . \"}
    \n {\" _.nIt \"}
    \n {\" _.nITESECNi \"}
    \n {\" nITESECNIT^' \"}
    \n {\" NITE^' ___ \"}
    \n {\" / .gP''''Tp. \"}
    \n {\" : d' . `b \"}
    \n {\" ; d' o `b ; \"}
    \n {\" / d; `b| \"}
    \n {\" /, $; @ `: \"}
    \n {\" /' $/ ; \"}
    \n {\" .' $/b o | \"}
    \n {\" .' d$/$; : \"}
    \n {\" / .d/$/$; , ; \"}
    \n {\" d .dNITESEC $ | \"}
    \n {\" :bp.__.gNITESEC/$ :$ ; \"}
    \n {\" NITESECNITESECNIT /$b : \"}
    ,\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n // City factions, essentially governments\n [FactionNames.Aevum]: new FactionInfo(\n <>The Silicon City.,\n [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Chongqing]: new FactionInfo(\n <>Serve the People.,\n [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Ishima]: new FactionInfo(\n <>The East Asian Order of the Future.,\n [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.NewTokyo]: new FactionInfo(\n <>Asia's World City.,\n [FactionNames.Sector12, FactionNames.Aevum, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Sector12]: new FactionInfo(\n <>The City of the Future.,\n [FactionNames.Chongqing, FactionNames.NewTokyo, FactionNames.Ishima, FactionNames.Volhaven],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n [FactionNames.Volhaven]: new FactionInfo(\n <>Benefit, Honor, and Glory.,\n [FactionNames.Chongqing, FactionNames.Sector12, FactionNames.NewTokyo, FactionNames.Aevum, FactionNames.Ishima],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n\n // Criminal Organizations/Gangs\n [FactionNames.SpeakersForTheDead]: new FactionInfo(\n <>It is better to reign in Hell than to serve in Heaven.,\n [],\n true,\n true,\n true,\n true,\n false,\n false,\n ),\n\n [FactionNames.TheDarkArmy]: new FactionInfo(\n <>The World doesn't care about right or wrong. It only cares about power.,\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.TheSyndicate]: new FactionInfo(<>Honor holds you back., [], true, true, true, true, false, false),\n\n [FactionNames.Silhouette]: new FactionInfo(\n (\n <>\n Corporations have filled the void of power left behind by the collapse of Western government. The issue is\n they've become so big that you don't know who they're working for. And if you're employed at one of these\n corporations, you don't even know who you're working for.\n
    \n
    \n That's terror. Terror, fear, and corruption. All born into the system, all propagated by the system.\n \n ),\n [],\n true,\n true,\n true,\n false,\n false,\n false,\n ),\n\n [FactionNames.Tetrads]: new FactionInfo(\n <>Following the mandate of Heaven and carrying out the way.,\n [],\n false,\n false,\n true,\n true,\n false,\n false,\n ),\n\n [FactionNames.SlumSnakes]: new FactionInfo(<>{FactionNames.SlumSnakes} rule!, [], false, false, true, true, false, false),\n\n // Earlygame factions - factions the player will prestige with early on that don't belong in other categories.\n [FactionNames.Netburners]: new FactionInfo(<>{\"~~//*>H4CK||3T 8URN3R5**>?>\\\\~~\"}, [], true, true, false, false, false, false),\n\n [FactionNames.TianDiHui]: new FactionInfo(<>Obey Heaven and work righteously., [], true, true, false, true, false, false),\n\n [FactionNames.CyberSec]: new FactionInfo(\n (\n <>\n The Internet is the first thing that was built that we don't fully understand, the largest experiment in anarchy\n that we have ever had. And as the world becomes increasingly dominated by it, society approaches the brink of\n total chaos. We serve only to protect society, to protect humanity, to protect the world from imminent collapse.\n \n ),\n [],\n true,\n true,\n false,\n false,\n false,\n false,\n ),\n\n // Special Factions\n [FactionNames.Bladeburners]: new FactionInfo(\n (\n <>\n It's too bad they won't live. But then again, who does?\n
    \n
    \n Note that for this faction, reputation can only be gained through {FactionNames.Bladeburners} actions. Completing {FactionNames.Bladeburners}\n contracts/operations will increase your reputation.\n \n ),\n [],\n false,\n false,\n false,\n false,\n true,\n false,\n ),\n\n // prettier-ignore\n [FactionNames.ChurchOfTheMachineGod]: new FactionInfo(<>\n {\" `` \"}
    \n {\" -odmmNmds: \"}
    \n {\" `hNmo:..-omNh. \"}
    \n {\" yMd` `hNh \"}
    \n {\" mMd oNm \"}
    \n {\" oMNo .mM/ \"}
    \n {\" `dMN+ -mM+ \"}
    \n {\" -mMNo -mN+ \"}
    \n {\" .+- :mMNo/mN/ \"}
    \n {\":yNMd. :NMNNN/ \"}
    \n {\"-mMMMh. /NMMh` \"}
    \n {\" .dMMMd. /NMMMy` \"}
    \n {\" `yMMMd. /NNyNMMh` \"}
    \n {\" `sMMMd. +Nm: +NMMh. \"}
    \n {\" oMMMm- oNm: /NMMd. \"}
    \n {\" +NMMmsMm- :mMMd. \"}
    \n {\" /NMMMm- -mMMd. \"}
    \n {\" /MMMm- -mMMd. \"}
    \n {\" `sMNMMm- .mMmo \"}
    \n {\" `sMd:hMMm. ./. \"}
    \n {\" `yMy` `yNMd` \"}
    \n {\" `hMs` oMMy \"}
    \n {\" `hMh sMN- \"}
    \n {\" /MM- .NMo \"}
    \n {\" +MM: :MM+ \"}
    \n {\" sNNo-.`.-omNy` \"}
    \n {\" -smNNNNmdo- \"}
    \n {\" `..` \"}

    \n Many cultures predict an end to humanity in the near future, a final\n Armageddon that will end the world; but we disagree.\n

    Note that for this faction, reputation can\n only be gained by charging Stanek's gift.,\n [],\n false,\n false,\n false,\n false,\n true,\n true,\n ),\n};\n","import { IMap } from \"../../types\";\n\nexport type CorporationUpgrade = [number, number, number, number, string, string];\n\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]\nexport const CorporationUpgrades: IMap = {\n //Smart factories, increases production\n \"0\": [\n 0,\n 2e9,\n 1.06,\n 0.03,\n \"Smart Factories\",\n \"Advanced AI automatically optimizes the operation and productivity \" +\n \"of factories. Each level of this upgrade increases your global production by 3% (additive).\",\n ],\n\n //Smart warehouses, increases storage size\n \"1\": [\n 1,\n 2e9,\n 1.06,\n 0.1,\n \"Smart Storage\",\n \"Advanced AI automatically optimizes your warehouse storage methods. \" +\n \"Each level of this upgrade increases your global warehouse storage size by 10% (additive).\",\n ],\n\n //Advertise through dreams, passive popularity/ awareness gain\n \"2\": [\n 2,\n 4e9,\n 1.1,\n 0.001,\n \"DreamSense\",\n \"Use DreamSense LCC Technologies to advertise your corporation \" +\n \"to consumers through their dreams. Each level of this upgrade provides a passive \" +\n \"increase in awareness of all of your companies (divisions) by 0.004 / market cycle,\" +\n \"and in popularity by 0.001 / market cycle. A market cycle is approximately \" +\n \"15 seconds.\",\n ],\n\n //Makes advertising more effective\n \"3\": [\n 3,\n 4e9,\n 1.5,\n 0.005,\n \"Wilson Analytics\",\n \"Purchase data and analysis from Wilson, a marketing research \" +\n \"firm. Each level of this upgrades increases the effectiveness of your \" +\n \"advertising by 0.5% (additive).\",\n ],\n\n //Augmentation for employees, increases cre\n \"4\": [\n 4,\n 1e9,\n 1.06,\n 0.1,\n \"Nuoptimal Nootropic Injector Implants\",\n \"Purchase the Nuoptimal Nootropic \" +\n \"Injector augmentation for your employees. Each level of this upgrade \" +\n \"globally increases the creativity of your employees by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases cha\n \"5\": [\n 5,\n 1e9,\n 1.06,\n 0.1,\n \"Speech Processor Implants\",\n \"Purchase the Speech Processor augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the charisma of your employees by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases int\n \"6\": [\n 6,\n 1e9,\n 1.06,\n 0.1,\n \"Neural Accelerators\",\n \"Purchase the Neural Accelerator augmentation for your employees. \" +\n \"Each level of this upgrade globally increases the intelligence of your employees \" +\n \"by 10% (additive).\",\n ],\n\n //Augmentation for employees, increases eff\n \"7\": [\n 7,\n 1e9,\n 1.06,\n 0.1,\n \"FocusWires\",\n \"Purchase the FocusWire augmentation for your employees. Each level \" +\n \"of this upgrade globally increases the efficiency of your employees by 10% (additive).\",\n ],\n\n //Improves sales of materials/products\n \"8\": [\n 8,\n 1e9,\n 1.07,\n 0.01,\n \"ABC SalesBots\",\n \"Always Be Closing. Purchase these robotic salesmen to increase the amount of \" +\n \"materials and products you sell. Each level of this upgrade globally increases your sales \" +\n \"by 1% (additive).\",\n ],\n\n //Improves scientific research rate\n \"9\": [\n 9,\n 5e9,\n 1.07,\n 0.05,\n \"Project Insight\",\n \"Purchase 'Project Insight', a R&D service provided by the secretive \" +\n \"Fulcrum Technologies. Each level of this upgrade globally increases the amount of \" +\n \"Scientific Research you produce by 5% (additive).\",\n ],\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 */\nimport { HashUpgrades } from \"./HashUpgrades\";\nimport { HashUpgrade } from \"./HashUpgrade\";\n\nimport { IMap } from \"../types\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class HashManager {\n // Max number of hashes this can hold. Equal to the sum of capacities of\n // all Hacknet Servers\n capacity = 0;\n\n // Number of hashes currently in storage\n hashes = 0;\n\n // Map of Hash Upgrade Name -> levels in that upgrade\n upgrades: IMap = {};\n\n constructor() {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n }\n\n /**\n * Generic helper function for getting a multiplier from a HashUpgrade\n */\n getMult(upgName: string): number {\n const upg = HashUpgrades[upgName];\n const currLevel = this.upgrades[upgName];\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 /**\n * One of the Hash upgrades improves studying. This returns that multiplier\n */\n getStudyMult(): number {\n const upgName = \"Improve Studying\";\n\n return this.getMult(upgName);\n }\n\n /**\n * One of the Hash upgrades improves gym training. This returns that multiplier\n */\n getTrainingMult(): number {\n const upgName = \"Improve Gym Training\";\n\n return this.getMult(upgName);\n }\n\n getUpgrade(upgName: string): HashUpgrade | null {\n const upg = HashUpgrades[upgName];\n if (!upg) {\n console.error(`Invalid Upgrade Name given to HashManager.getUpgrade(): ${upgName}`);\n return null;\n }\n return upg;\n }\n\n /**\n * Get the cost (in hashes) of an upgrade\n */\n getUpgradeCost(upgName: string): number {\n const upg = this.getUpgrade(upgName);\n const currLevel = this.upgrades[upgName];\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(): void {\n for (const name of Object.keys(HashUpgrades)) {\n this.upgrades[name] = 0;\n }\n this.hashes = 0;\n\n // When prestiging, player's hacknet nodes are always reset. So capacity = 0\n this.updateCapacity(0);\n }\n\n /**\n * Reverts an upgrade and refunds the hashes used to buy it\n */\n refundUpgrade(upgName: string): void {\n const upg = HashUpgrades[upgName];\n\n // Reduce the level first, so we get the right cost\n --this.upgrades[upgName];\n\n const currLevel = this.upgrades[upgName];\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 /**\n * Stores the given hashes, capping at capacity\n * @param numHashes The number of hashes to increment\n * @returns The number of wasted hashes (over capacity)\n */\n storeHashes(numHashes: number): number {\n this.hashes += numHashes;\n let wastedHashes = this.hashes;\n this.hashes = Math.min(this.hashes, this.capacity);\n wastedHashes -= this.hashes;\n return wastedHashes;\n }\n\n updateCapacity(newCap: number): void {\n if (newCap < 0) {\n this.capacity = 0;\n }\n this.capacity = Math.max(newCap, 0);\n }\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 upgrade(upgName: string): boolean {\n const upg = HashUpgrades[upgName];\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\n return true;\n }\n\n //Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"HashManager\", this);\n }\n\n // Initiatizes a HashManager object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): HashManager {\n return Generic_fromJSON(HashManager, value.data);\n }\n}\n\nReviver.constructors.HashManager = HashManager;\n","import {\n CodingContract,\n CodingContractRewardType,\n CodingContractTypes,\n ICodingContractReward,\n} from \"./CodingContracts\";\nimport { Factions } from \"./Faction/Factions\";\nimport { Player } from \"./Player\";\nimport { GetServer, GetAllServers } from \"./Server/AllServers\";\nimport { SpecialServers } from \"./Server/data/SpecialServers\";\nimport { Server } from \"./Server/Server\";\nimport { BaseServer } from \"./Server/BaseServer\";\n\nimport { getRandomInt } from \"./utils/helpers/getRandomInt\";\n\nexport function generateRandomContract(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const randServer = getRandomServer();\n\n const contractFn = getRandomFilename(randServer, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n randServer.addContract(contract);\n}\n\nexport function generateRandomContractOnHome(): void {\n // First select a random problem type\n const problemType = getRandomProblemType();\n\n // Then select a random reward type. 'Money' will always be the last reward type\n const reward = getRandomReward();\n\n // Choose random server\n const serv = Player.getHomeComputer();\n\n const contractFn = getRandomFilename(serv, reward);\n const contract = new CodingContract(contractFn, problemType, reward);\n\n serv.addContract(contract);\n}\n\ninterface IGenerateContractParams {\n problemType?: string;\n server?: string;\n fn?: string;\n}\n\nexport function generateContract(params: IGenerateContractParams): void {\n // Problem Type\n let problemType;\n const problemTypes = Object.keys(CodingContractTypes);\n if (params.problemType != null && problemTypes.includes(params.problemType)) {\n problemType = params.problemType;\n } else {\n problemType = getRandomProblemType();\n }\n\n // Reward Type - This is always random for now\n const reward = getRandomReward();\n\n // Server\n let server;\n if (params.server != null) {\n server = GetServer(params.server);\n if (server == null) {\n server = getRandomServer();\n }\n } else {\n server = getRandomServer();\n }\n\n // Filename\n let fn;\n if (params.fn != null) {\n fn = params.fn;\n } else {\n fn = getRandomFilename(server, reward);\n }\n\n const contract = new CodingContract(fn, problemType, reward);\n server.addContract(contract);\n}\n\n// Ensures that a contract's reward type is valid\nfunction sanitizeRewardType(rewardType: CodingContractRewardType): CodingContractRewardType {\n let type = rewardType; // Create copy\n\n const factionsThatAllowHacking = Player.factions.filter((fac) => {\n try {\n return Factions[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 if (type === CodingContractRewardType.FactionReputation && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.FactionReputationAll && factionsThatAllowHacking.length === 0) {\n type = CodingContractRewardType.CompanyReputation;\n }\n if (type === CodingContractRewardType.CompanyReputation && Object.keys(Player.jobs).length === 0) {\n type = CodingContractRewardType.Money;\n }\n\n return type;\n}\n\nfunction getRandomProblemType(): string {\n const problemTypes = Object.keys(CodingContractTypes);\n const randIndex = getRandomInt(0, problemTypes.length - 1);\n\n return problemTypes[randIndex];\n}\n\nfunction getRandomReward(): ICodingContractReward {\n const reward: ICodingContractReward = {\n name: \"\",\n type: getRandomInt(0, CodingContractRewardType.Money),\n };\n reward.type = sanitizeRewardType(reward.type);\n\n // Add additional information based on the reward type\n const factionsThatAllowHacking = Player.factions.filter((fac) => Factions[fac].getInfo().offerHackingWork);\n\n switch (reward.type) {\n case CodingContractRewardType.FactionReputation: {\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[getRandomInt(0, numFactions - 1)];\n reward.name = randFaction;\n break;\n }\n case CodingContractRewardType.CompanyReputation: {\n const allJobs = Object.keys(Player.jobs);\n if (allJobs.length > 0) {\n reward.name = allJobs[getRandomInt(0, allJobs.length - 1)];\n } else {\n reward.type = CodingContractRewardType.Money;\n }\n break;\n }\n default:\n break;\n }\n\n return reward;\n}\n\nfunction getRandomServer(): BaseServer {\n const servers = GetAllServers();\n let randIndex = getRandomInt(0, servers.length - 1);\n let randServer = servers[randIndex];\n\n // 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 for (let i = 0; i < 200; ++i) {\n if (\n randServer instanceof Server &&\n !randServer.purchasedByPlayer &&\n randServer.hostname !== SpecialServers.WorldDaemon\n ) {\n break;\n }\n randIndex = getRandomInt(0, servers.length - 1);\n randServer = servers[randIndex];\n }\n\n return randServer;\n}\n\nfunction getRandomFilename(server: BaseServer, reward: ICodingContractReward): string {\n let contractFn = `contract-${getRandomInt(0, 1e6)}`;\n\n for (let i = 0; i < 1000; ++i) {\n if (\n server.contracts.filter((c: CodingContract) => {\n return c.fn === contractFn;\n }).length <= 0\n ) {\n break;\n }\n contractFn = `contract-${getRandomInt(0, 1e6)}`;\n }\n\n if (reward.name) {\n contractFn += `-${reward.name.replace(/\\s/g, \"\")}`;\n }\n\n return contractFn;\n}\n","import { EventEmitter } from \"../../utils/EventEmitter\";\nexport const ITutorialEvents = new EventEmitter<[]>();\n","import { Crimes } from \"./Crimes\";\nimport { Crime } from \"./Crime\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function determineCrimeSuccess(p: IPlayer, type: string): boolean {\n let chance = 0;\n let found = false;\n for (const i of Object.keys(Crimes)) {\n const crime = Crimes[i];\n if (crime.type == type) {\n chance = crime.successRate(p);\n found = true;\n break;\n }\n }\n\n if (!found) {\n dialogBoxCreate(`ERR: Unrecognized crime type: ${type} This is probably a bug please contact the developer`);\n return false;\n }\n return Math.random() <= chance;\n}\n\nexport function findCrime(roughName: string): Crime | null {\n roughName = roughName.toLowerCase();\n if (roughName.includes(\"shoplift\")) {\n return Crimes.Shoplift;\n } else if (roughName.includes(\"rob\") && roughName.includes(\"store\")) {\n return Crimes.RobStore;\n } else if (roughName.includes(\"mug\")) {\n return Crimes.Mug;\n } else if (roughName.includes(\"larceny\")) {\n return Crimes.Larceny;\n } else if (roughName.includes(\"drugs\")) {\n return Crimes.DealDrugs;\n } else if (roughName.includes(\"bond\") && roughName.includes(\"forge\")) {\n return Crimes.BondForgery;\n } else if ((roughName.includes(\"traffic\") || roughName.includes(\"illegal\")) && roughName.includes(\"arms\")) {\n return Crimes.TraffickArms;\n } else if (roughName.includes(\"homicide\")) {\n return Crimes.Homicide;\n } else if (roughName.includes(\"grand\") && roughName.includes(\"auto\")) {\n return Crimes.GrandTheftAuto;\n } else if (roughName.includes(\"kidnap\")) {\n return Crimes.Kidnap;\n } else if (roughName.includes(\"assassin\")) {\n return Crimes.Assassination;\n } else if (roughName.includes(\"heist\")) {\n return Crimes.Heist;\n }\n\n return null;\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { generateRandomString } from \"../utils/StringHelperFunctions\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { Employee } from \"./Employee\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ICorporation } from \"./ICorporation\";\n\ninterface IParams {\n loc?: string;\n size?: number;\n}\n\nexport class OfficeSpace {\n loc: string;\n size: number;\n minEne = 0;\n maxEne = 100;\n minHap = 0;\n maxHap = 100;\n maxMor = 100;\n employees: Employee[] = [];\n employeeProd: { [key: string]: number } = {\n [EmployeePositions.Operations]: 0,\n [EmployeePositions.Engineer]: 0,\n [EmployeePositions.Business]: 0,\n [EmployeePositions.Management]: 0,\n [EmployeePositions.RandD]: 0,\n total: 0,\n };\n\n constructor(params: IParams = {}) {\n this.loc = params.loc ? params.loc : \"\";\n this.size = params.size ? params.size : 1;\n }\n\n atCapacity(): boolean {\n return this.employees.length >= this.size;\n }\n\n process(marketCycles = 1, corporation: ICorporation, industry: IIndustry): number {\n // HRBuddy AutoRecruitment and training\n if (industry.hasResearch(\"HRBuddy-Recruitment\") && !this.atCapacity()) {\n const emp = this.hireRandomEmployee();\n if (industry.hasResearch(\"HRBuddy-Training\") && emp !== undefined) {\n emp.pos = EmployeePositions.Training;\n }\n }\n\n // Process Office properties\n this.maxEne = 100;\n this.maxHap = 100;\n this.maxMor = 100;\n if (industry.hasResearch(\"Go-Juice\")) {\n this.maxEne += 10;\n }\n if (industry.hasResearch(\"JoyWire\")) {\n this.maxHap += 10;\n }\n if (industry.hasResearch(\"Sti.mu\")) {\n this.maxMor += 10;\n }\n\n // Calculate changes in Morale/Happiness/Energy for Employees\n let perfMult = 1; //Multiplier for employee morale/happiness/energy based on company performance\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\n let salaryPaid = 0;\n for (let i = 0; i < this.employees.length; ++i) {\n const emp = this.employees[i];\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: ICorporation, industry: IIndustry): void {\n //Reset\n for (const name of Object.keys(this.employeeProd)) {\n this.employeeProd[name] = 0;\n }\n\n let total = 0;\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 this.employeeProd.total = total;\n }\n\n hireRandomEmployee(): Employee | undefined {\n if (this.atCapacity()) return;\n if (document.getElementById(\"cmpy-mgmt-hire-employee-popup\") != null) return;\n\n //Generate three random employees (meh, decent, amazing)\n const int = getRandomInt(50, 100),\n cha = getRandomInt(50, 100),\n exp = getRandomInt(50, 100),\n cre = getRandomInt(50, 100),\n eff = getRandomInt(50, 100),\n sal = CorporationConstants.EmployeeSalaryMultiplier * (int + cha + exp + cre + eff);\n\n const emp = new Employee({\n intelligence: int,\n charisma: cha,\n experience: exp,\n creativity: cre,\n efficiency: eff,\n salary: sal,\n });\n\n const name = generateRandomString(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 emp.name = name;\n this.employees.push(emp);\n\n return emp;\n }\n\n //Finds the first unassigned employee and assigns its to the specified job\n assignEmployeeToJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === EmployeePositions.Unassigned) {\n this.employees[i].pos = job;\n return true;\n }\n }\n return false;\n }\n\n //Finds the first employee with the given job and unassigns it\n unassignEmployeeFromJob(job: string): boolean {\n for (let i = 0; i < this.employees.length; ++i) {\n if (this.employees[i].pos === job) {\n this.employees[i].pos = EmployeePositions.Unassigned;\n return true;\n }\n }\n return false;\n }\n\n setEmployeeToJob(job: string, amount: number): boolean {\n let jobCount = this.employees.reduce((acc, employee) => (employee.pos === job ? acc + 1 : acc), 0);\n\n for (const employee of this.employees) {\n if (jobCount == amount) return true\n if (employee.pos === EmployeePositions.Unassigned && jobCount <= amount) {\n employee.pos = job;\n jobCount++;\n } else if (employee.pos === job && jobCount >= amount) {\n employee.pos = EmployeePositions.Unassigned;\n jobCount--;\n }\n }\n return jobCount === amount;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"OfficeSpace\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): OfficeSpace {\n return Generic_fromJSON(OfficeSpace, value.data);\n }\n}\n\nReviver.constructors.OfficeSpace = OfficeSpace;\n","export type ObjectValidator = {\n [key in keyof T]?: ParameterValidator;\n}\n\ninterface ParameterValidatorObject {\n default?: any;\n min?: number;\n max?: number;\n func?: (obj: Type, validator: ObjectValidator, key: Key) => void;\n}\ntype ParameterValidatorFunction = (obj: Type, key: Key) => void;\ntype ParameterValidator = ParameterValidatorObject | ParameterValidatorFunction\n\nexport function validateObject, Key extends keyof Type>(obj: Type, validator: ObjectValidator): void {\n for (const key of Object.keys(validator) as Key[]) {\n const paramValidator = validator[key];\n if (paramValidator !== undefined) {\n if (typeof paramValidator === 'function') {\n paramValidator(obj, key);\n } else if (paramValidator.func !== undefined) {\n paramValidator.func(obj, validator, key);\n } else {\n if ((typeof obj[key]) !== (typeof paramValidator.default)) {\n obj[key] = paramValidator.default\n }\n if (typeof obj[key] === 'number' && paramValidator.min !== undefined) {\n if (obj[key] < paramValidator.min) obj[key] = paramValidator.min as Type[Key];\n }\n if (typeof obj[key] === 'number' && paramValidator.max !== undefined) {\n if (obj[key] > paramValidator.max) obj[key] = paramValidator.max as Type[Key];\n }\n }\n }\n }\n}\n\nexport function minMax(def: number, min: number, max: number): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== 'number') {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if ((obj[key] as unknown as number) < min) {\n obj[key] = min as unknown as Type[Key];\n }\n if ((obj[key] as unknown as number) > max) {\n obj[key] = max as unknown as Type[Key];\n }\n };\n}\n\nexport function oneOf(def: Value, options: Value[]): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== typeof def) {\n obj[key] = def as unknown as Type[Key];\n return;\n }\n if (!options.includes(obj[key] as unknown as Value)) {\n obj[key] = def as unknown as Type[Key];\n }\n };\n}\n\nexport function subsetOf(options: Value[]): (obj: Type, key: Key & keyof Type) => void {\n return (obj, key) => {\n if (typeof obj[key] !== 'object' || !Array.isArray(obj[key])) {\n obj[key] = [] as unknown as Type[Key];\n return;\n }\n const validValues: Value[] = [];\n for (const value of obj[key] as unknown as Value[]) {\n if (options.includes(value)) validValues.push(value);\n }\n obj[key] = validValues as unknown as Type[Key];\n };\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 */\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"./JSONReviver\";\n\nexport class MoneySourceTracker {\n // eslint-disable-next-line @typescript-eslint/ban-types\n [key: string]: number | Function;\n\n bladeburner = 0;\n casino = 0;\n class = 0;\n codingcontract = 0;\n corporation = 0;\n crime = 0;\n gang = 0;\n hacking = 0;\n hacknet = 0;\n hacknet_expenses = 0;\n hospitalization = 0;\n infiltration = 0;\n sleeves = 0;\n stock = 0;\n total = 0;\n work = 0;\n servers = 0;\n other = 0;\n augmentations = 0;\n\n // Record money earned\n record(amt: number, source: string): void {\n const sanitizedSource = source.toLowerCase();\n if (typeof this[sanitizedSource] !== \"number\") {\n console.warn(`MoneySourceTracker.record() called with invalid source: ${source}`);\n return;\n }\n\n (this[sanitizedSource] as number) += amt;\n this.total += amt;\n }\n\n // Reset the money tracker by setting all stats to 0\n reset(): void {\n for (const prop in this) {\n if (typeof this[prop] === \"number\") {\n (this[prop] as number) = 0;\n }\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"MoneySourceTracker\", this);\n }\n\n // Initiatizes a MoneySourceTracker object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): MoneySourceTracker {\n return Generic_fromJSON(MoneySourceTracker, value.data);\n }\n}\n\nReviver.constructors.MoneySourceTracker = MoneySourceTracker;\n","import * as React from \"react\";\nimport LinearProgress from \"@mui/material/LinearProgress\";\nimport { TableCell, Tooltip, Typography } from \"@mui/material\";\nimport { characterOverviewStyles } from \"./CharacterOverview\";\nimport { ISkillProgress } from \"src/PersonObjects/formulas/skill\";\nimport { numeralWrapper } from \"../numeralFormat\";\n\ninterface IProgressProps {\n min: number;\n max: number;\n current: number;\n remaining: number;\n progress: number;\n color?: React.CSSProperties[\"color\"];\n}\n\ninterface IStatsOverviewCellProps {\n progress: ISkillProgress;\n color?: React.CSSProperties[\"color\"];\n}\n\nexport function StatsProgressBar({ min, max, current, remaining, progress, color }: IProgressProps): React.ReactElement {\n const tooltip = (\n \n Progress: \n {numeralWrapper.formatExp(current)} / {numeralWrapper.formatExp(max - min)}\n
    \n Remaining: \n {numeralWrapper.formatExp(remaining)} ({progress.toFixed(2)}%)\n
    \n );\n\n return (\n \n \n \n );\n}\n\nexport function StatsProgressOverviewCell({ progress: skill, color }: IStatsOverviewCellProps): React.ReactElement {\n const classes = characterOverviewStyles();\n return (\n \n \n \n );\n}\n","import { IStyleSettings } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport const defaultStyles: IStyleSettings = {\n lineHeight: 1.5,\n fontFamily: \"Lucida Console, Lucida Sans Unicode, Fira Mono, Consolas, Courier New, Courier, monospace, Times New Roman\"\n}\n","import { CONSTANTS } from \"../Constants\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport function getHospitalizationCost(p: IPlayer): number {\n if (p.money < 0) {\n return 0;\n }\n\n return Math.min(p.money * 0.1, (p.max_hp - p.hp) * CONSTANTS.HospitalCostPerHp);\n}\n\nexport function calculateHospitalizationCost(p: IPlayer, damage: number): number {\n const oldhp = p.hp;\n p.hp -= damage;\n const cost = getHospitalizationCost(p);\n p.hp = oldhp;\n return cost;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nexport const PromptEvent = new EventEmitter<[Prompt]>();\n\ninterface Prompt {\n txt: string;\n options?: { type?: string; choices?: string[] };\n resolve: (result: boolean | string) => void;\n}\n\nexport function PromptManager(): React.ReactElement {\n const [prompt, setPrompt] = useState(null);\n useEffect(() => {\n return PromptEvent.subscribe((p: Prompt) => {\n setPrompt(p);\n });\n }, []);\n\n if (prompt === null) {\n return <>;\n }\n\n function close(): void {\n if (prompt === null) return;\n if ([\"text\", \"select\"].includes(prompt?.options?.type ?? \"\")) {\n prompt.resolve(\"\");\n } else {\n prompt.resolve(false);\n }\n setPrompt(null);\n }\n\n const types: { [key: string]: any } = {\n text: PromptMenuText,\n select: PromptMenuSelect,\n };\n\n let PromptContent = PromptMenuBoolean;\n if (prompt?.options?.type && [\"text\", \"select\"].includes(prompt?.options?.type))\n PromptContent = types[prompt?.options?.type];\n const resolve = (value: boolean | string): void => {\n prompt.resolve(value);\n setPrompt(null);\n };\n\n return (\n \n
    \n        {prompt.txt}\n      
    \n \n
    \n );\n}\n\ninterface IContentProps {\n prompt: Prompt;\n resolve: (value: boolean | string) => void;\n}\n\nfunction PromptMenuBoolean({ resolve }: IContentProps): React.ReactElement {\n const yes = (): void => resolve(true);\n const no = (): void => resolve(false);\n\n return (\n <>\n
    \n \n \n
    \n \n );\n}\n\nfunction PromptMenuText({ resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onInput = (event: React.ChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const onKeyDown = (event: React.KeyboardEvent): void => {\n event.stopPropagation();\n\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n submit();\n }\n };\n\n return (\n <>\n
    \n Confirm,\n }}\n />\n
    \n \n );\n}\n\nfunction PromptMenuSelect({ prompt, resolve }: IContentProps): React.ReactElement {\n const [value, setValue] = useState(\"\");\n\n const submit = (): void => resolve(value);\n\n const onChange = (event: SelectChangeEvent): void => {\n setValue(event.target.value);\n };\n\n const getItems = (choices: string[]): React.ReactElement[] => {\n const content = [];\n for (const i of choices) {\n // @ts-ignore\n content.push(\n \n {i}\n ,\n );\n }\n return content;\n };\n\n return (\n <>\n
    \n \n \n
    \n \n );\n}\n","import { EmployeePositions } from \"./EmployeePositions\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { IIndustry } from \"./IIndustry\";\nimport { ProductRatingWeights, IProductRatingWeight } from \"./ProductRatingWeights\";\n\nimport { createCityMap } from \"../Locations/createCityMap\";\nimport { IMap } from \"../types\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\ninterface IConstructorParams {\n name?: string;\n demand?: number;\n competition?: number;\n markup?: number;\n createCity?: string;\n designCost?: number;\n advCost?: number;\n quality?: number;\n performance?: number;\n durability?: number;\n reliability?: number;\n aesthetics?: number;\n features?: number;\n loc?: string;\n size?: number;\n req?: IMap;\n}\n\nexport class Product {\n // Product name\n name = \"\";\n\n // The demand for this Product in the market. Gradually decreases\n dmd = 0;\n\n // How much competition there is in the market for this Product\n cmp = 0;\n\n // Markup. Affects how high of a price you can charge for this Product\n // without suffering a loss in the # of sales\n mku = 0;\n\n // Production cost - estimation of how much money it costs to make this Product\n pCost = 0;\n\n // Sell cost\n sCost: string | number = 0;\n\n // Variables for handling the creation process of this Product\n fin = false; // Whether this Product has finished being created\n prog = 0; // Creation progress - A number betwee 0-100 representing percentage\n createCity = \"\"; // City in which the product is/was being created\n designCost = 0; // How much money was invested into designing this Product\n advCost = 0; // How much money was invested into advertising this Product\n\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 rat = 0;\n\n // Stats/properties of this Product\n qlt = 0;\n per = 0;\n dur = 0;\n rel = 0;\n aes = 0;\n fea = 0;\n\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 data: IMap = createCityMap([0, 0, 0]);\n\n // Location of this Product\n // Only applies for location-based products like restaurants/hospitals\n loc = \"\";\n\n // How much space 1 unit of the Product takes (in the warehouse)\n // Not applicable for all Products\n siz = 0;\n\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 reqMats: IMap = {};\n\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 prdman: IMap = createCityMap([false, 0]);\n sllman: IMap = createCityMap([false, 0]);\n\n // Flags that signal whether automatic sale pricing through Market TA is enabled\n marketTa1 = false;\n marketTa2 = false;\n marketTa2Price: IMap = createCityMap(0);\n\n // Determines the maximum amount of this product that can be sold in one market cycle\n maxsll = 0;\n constructor(params: IConstructorParams = {}) {\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 }\n\n // empWorkMult is a multiplier that increases progress rate based on\n // productivity of employees\n createProduct(marketCycles = 1, empWorkMult = 1): void {\n if (this.fin) {\n return;\n }\n this.prog += marketCycles * 0.01 * empWorkMult;\n }\n\n // @param industry - Industry object. Reference to industry that makes this Product\n finishProduct(employeeProd: { [key: string]: number }, industry: IIndustry): void {\n this.fin = true;\n\n //Calculate properties\n const progrMult = this.prog / 100;\n\n const engrRatio = employeeProd[EmployeePositions.Engineer] / employeeProd[\"total\"];\n const mgmtRatio = employeeProd[EmployeePositions.Management] / employeeProd[\"total\"];\n const rndRatio = employeeProd[EmployeePositions.RandD] / employeeProd[\"total\"];\n const opsRatio = employeeProd[EmployeePositions.Operations] / employeeProd[\"total\"];\n const busRatio = employeeProd[EmployeePositions.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\n this.qlt =\n totalMult *\n (0.1 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.per =\n totalMult *\n (0.15 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.02 * employeeProd[EmployeePositions.Business]);\n this.dur =\n totalMult *\n (0.05 * employeeProd[EmployeePositions.Engineer] +\n 0.02 * employeeProd[EmployeePositions.Management] +\n 0.08 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.rel =\n totalMult *\n (0.02 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.08 * employeeProd[EmployeePositions.Business]);\n this.aes =\n totalMult *\n (0.0 * employeeProd[EmployeePositions.Engineer] +\n 0.08 * employeeProd[EmployeePositions.Management] +\n 0.05 * employeeProd[EmployeePositions.RandD] +\n 0.02 * employeeProd[EmployeePositions.Operations] +\n 0.1 * employeeProd[EmployeePositions.Business]);\n this.fea =\n totalMult *\n (0.08 * employeeProd[EmployeePositions.Engineer] +\n 0.05 * employeeProd[EmployeePositions.Management] +\n 0.02 * employeeProd[EmployeePositions.RandD] +\n 0.05 * employeeProd[EmployeePositions.Operations] +\n 0.05 * employeeProd[EmployeePositions.Business]);\n this.calculateRating(industry);\n const advMult = 1 + Math.pow(this.advCost, 0.1) / 100;\n const busmgtgRatio = Math.max(busRatio + mgmtRatio, 1 / employeeProd[\"total\"]);\n this.mku = 100 / (advMult * Math.pow(this.qlt + 0.001, 0.65) * busmgtgRatio);\n\n // I actually don't understand well enough to know if this is right.\n // I'm adding this to prevent a crash.\n if (this.mku === 0 || !isFinite(this.mku)) this.mku = 1;\n\n this.dmd =\n industry.awareness === 0 ? 20 : Math.min(100, advMult * (100 * (industry.popularity / industry.awareness)));\n this.cmp = getRandomInt(0, 70);\n\n //Calculate the product's required materials\n //For now, just set it to be the same as the requirements to make materials\n for (const matName of Object.keys(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 }\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 this.siz = 0;\n for (const matName of Object.keys(industry.reqMats)) {\n const reqMat = industry.reqMats[matName];\n if (reqMat === undefined) continue;\n this.siz += MaterialSizes[matName] * reqMat;\n }\n }\n\n calculateRating(industry: IIndustry): void {\n const weights: IProductRatingWeight = ProductRatingWeights[industry.type];\n if (weights == null) {\n console.error(`Could not find product rating weights for: ${industry}`);\n return;\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 }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"Product\", this);\n }\n\n // Initiatizes a Product object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Product {\n return Generic_fromJSON(Product, value.data);\n }\n}\n\nReviver.constructors.Product = Product;\n","import { IIndustry } from \"../IIndustry\";\n\n// Returns a boolean indicating whether the given material is relevant for the\n// current industry.\nexport function isRelevantMaterial(matName: string, division: IIndustry): boolean {\n // Materials that affect Production multiplier\n const prodMultiplierMats = [\"Hardware\", \"Robots\", \"AICores\", \"RealEstate\", \"AI Cores\", \"Real Estate\"];\n\n if (Object.keys(division.reqMats).includes(matName)) {\n return true;\n }\n if (division.prodMats.includes(matName)) {\n return true;\n }\n if (prodMultiplierMats.includes(matName)) {\n return true;\n }\n\n return false;\n}\n","import React, { useState, useEffect } from \"react\";\nimport { find } from \"lodash\";\n\nimport {\n Box,\n Typography,\n Button,\n Container,\n Paper\n} from \"@mui/material\";\nimport { Check, Lock, Create } from \"@mui/icons-material\";\n\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { Programs } from \"../Programs\";\n\nexport const ProgramsSeen: string[] = [];\n\nexport function ProgramsRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n const programs = [...Object.values(Programs)]\n .filter(prog => {\n const create = prog.create;\n if (create === null) return false;\n if (prog.name === \"b1t_flum3.exe\") {\n return create.req(player);\n }\n return true;\n })\n .sort((a, b) => {\n if (player.hasProgram(a.name)) return 1;\n if (player.hasProgram(b.name)) return -1;\n return (a.create?.level ?? 0) - (b.create?.level ?? 0);\n })\n\n useEffect(() => {\n programs.forEach((p) => {\n if (ProgramsSeen.includes(p.name)) return;\n ProgramsSeen.push(p.name);\n });\n }, []);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const getHackingLevelRemaining = (lvl: number): number => {\n return Math.ceil(Math.max(lvl - (player.hacking + player.intelligence / 2), 0));\n }\n\n const getProgCompletion = (name: string): number => {\n const programFile = find(player.getHomeComputer().programs, p => {\n return (p.startsWith(name) && p.endsWith(\"%-INC\"));\n });\n if (!programFile) return -1;\n\n const res = programFile.split(\"-\");\n if (res.length != 3) return -1;\n const percComplete = Number(res[1].slice(0, -1));\n if (isNaN(percComplete) || percComplete < 0 || percComplete >= 100) {\n return -1;\n }\n return percComplete;\n }\n\n return (\n \n Create program\n \n This page displays any programs that you are able to create. Writing the code for a program takes time, which\n can vary based on how complex the program is. If you are working on creating a program you can cancel at any\n time. Your progress will be saved and you can continue later.\n \n\n \n {programs.map((program) => {\n const create = program.create;\n if (create === null) return <>;\n const curCompletion = getProgCompletion(program.name);\n\n return (\n \n \n {player.hasProgram(program.name) && ||\n (create.req(player) && || )}\n {program.name}\n \n {(!player.hasProgram(program.name) && create.req(player)) && {\n if (!event.isTrusted) return;\n player.startCreateProgramWork(program.name, create.time, create.level);\n player.startFocusing();\n router.toWork();\n }}\n >\n Create program\n }\n {(player.hasProgram(program.name) || getHackingLevelRemaining(create.level) === 0) ||\n \n Unlocks in: {getHackingLevelRemaining(create.level)} hacking levels\n }\n {(curCompletion !== -1) &&\n \n Current completion: {curCompletion}%\n }\n \n {create.tooltip}\n \n \n );\n })}\n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nimport { Box, Button, Container, Paper, TableBody, TableRow, Typography } from \"@mui/material\";\n\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Table, TableCell } from \"../../ui/React/Table\";\nimport { IRouter } from \"../../ui/Router\";\n\nimport { Faction } from \"../Faction\";\nimport { joinFaction, getFactionAugmentationsFiltered } from \"../FactionHelpers\";\nimport { Factions } from \"../Factions\";\nimport { FactionNames } from \"../data/FactionNames\";\n\nexport const InvitationsSeen: string[] = [];\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function FactionsRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n useEffect(() => {\n props.player.factionInvitations.forEach((faction) => {\n if (InvitationsSeen.includes(faction)) return;\n InvitationsSeen.push(faction);\n });\n }, []);\n\n function openFaction(faction: Faction): void {\n props.router.toFaction(faction);\n }\n\n function openFactionAugPage(faction: Faction): void {\n props.router.toFaction(faction, true);\n }\n\n function acceptInvitation(event: React.MouseEvent, faction: string): void {\n if (!event.isTrusted) return;\n joinFaction(Factions[faction]);\n setRerender((x) => !x);\n }\n\n const getAugsLeft = (faction: Faction, player: IPlayer): number => {\n const augs = getFactionAugmentationsFiltered(player, faction);\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation)).length;\n };\n\n const allFactions = Object.values(FactionNames).map((faction) => faction as string);\n const allJoinedFactions = props.player.factions.slice(0);\n allJoinedFactions.sort((a, b) => allFactions.indexOf(a) - allFactions.indexOf(b));\n\n return (\n \n Factions\n \n Throughout the game you may receive invitations from factions. There are many different factions, and each\n faction has different criteria for determining its potential members. Joining a faction and furthering its cause\n is crucial to progressing in the game and unlocking endgame content.\n \n\n \n Factions you have joined:\n \n {(allJoinedFactions.length > 0 && (\n \n \n \n {allJoinedFactions.map((faction: string) => (\n \n \n \n {faction}\n \n \n \n \n \n \n \n \n \n \n \n \n \n ))}\n \n
    \n
    \n )) || You haven't joined any factions.}\n \n Outstanding Faction Invitations\n \n \n Factions you have been invited to. You can accept these faction invitations at any time:\n \n {(props.player.factionInvitations.length > 0 && (\n \n \n \n {props.player.factionInvitations.map((faction: string) => (\n \n \n \n {faction}\n \n \n \n \n \n \n \n \n ))}\n \n
    \n
    \n )) || You have no outstanding faction invites.}\n
    \n );\n}\n","import React, { useEffect } from \"react\";\n\nimport { Typography, Link, Button, ButtonGroup, Tooltip, Box, Paper, TextField } from \"@mui/material\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { load } from \"../../db\";\nimport { IRouter } from \"../Router\";\nimport { download } from \"../../SaveObject\";\nimport { IErrorData, newIssueUrl } from \"../../utils/ErrorHelper\";\nimport { DeleteGameButton } from \"./DeleteGameButton\";\nimport { SoftResetButton } from \"./SoftResetButton\";\n\nimport DirectionsRunIcon from '@mui/icons-material/DirectionsRun';\nimport GitHubIcon from \"@mui/icons-material/GitHub\";\n\nexport let RecoveryMode = false;\n\nexport function ActivateRecoveryMode(): void {\n RecoveryMode = true;\n}\n\ninterface IProps {\n router: IRouter;\n softReset: () => void;\n errorData?: IErrorData;\n resetError?: () => void;\n}\n\nexport function RecoveryRoot({ router, softReset, errorData, resetError }: IProps): React.ReactElement {\n function recover(): void {\n if (resetError) resetError();\n RecoveryMode = false;\n router.toTerminal();\n }\n Settings.AutosaveInterval = 0;\n\n useEffect(() => {\n load().then((content) => {\n const epochTime = Math.round(Date.now() / 1000);\n const filename = `RECOVERY_BITBURNER_${epochTime}.json`;\n download(filename, content);\n });\n }, []);\n\n return (\n \n RECOVERY MODE ACTIVATED\n \n There was an error with your save file and the game went into recovery mode. In this mode saving is disabled\n and the game will automatically export your save file (to prevent corruption).\n \n At this point it is recommended to alert a developer.\n \n File an issue on github\n \n \n Make a reddit post\n \n \n Post in the #bug-report channel on Discord.\n \n Please include your save file.\n
    \n
    \n You can disable recovery mode now. But chances are the game will not work correctly.\n \n \n \n \n \n \n \n\n {errorData && (\n \n \n {errorData.title}\n \n \n \n \n \n \n \n \n )}\n
    \n );\n}\n","import { CalculateShareMult as CSM } from \"./formulas/share\";\n\nexport let sharePower = 1;\n\nexport function StartSharing(threads: number): () => void {\n sharePower += threads;\n return () => (sharePower -= threads);\n}\n\nexport function CalculateShareMult(): number {\n return CSM(sharePower);\n}\n","import { CorporationState } from \"./CorporationState\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"./data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"./data/CorporationUpgrades\";\nimport { Warehouse } from \"./Warehouse\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { Industry } from \"./Industry\";\n\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { showLiterature } from \"../Literature/LiteratureHelpers\";\nimport { LiteratureNames } from \"../Literature/data/LiteratureNames\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { isString } from \"../utils/helpers/isString\";\n\ninterface IParams {\n name?: string;\n}\n\nexport class Corporation {\n name = \"The Corporation\";\n\n //A division/business sector is represented by the object:\n divisions: Industry[] = [];\n\n //Financial stats\n funds = 150e9;\n revenue = 0;\n expenses = 0;\n fundingRound = 0;\n public = false; //Publicly traded\n totalShares = CorporationConstants.INITIALSHARES; // Total existing shares\n numShares = CorporationConstants.INITIALSHARES; // Total shares owned by player\n shareSalesUntilPriceUpdate = CorporationConstants.SHARESPERPRICEUPDATE;\n shareSaleCooldown = 0; // Game cycles until player can sell shares again\n issueNewSharesCooldown = 0; // Game cycles until player can issue shares again\n dividendPercentage = 0;\n dividendTaxPercentage = 50;\n issuedShares = 0;\n sharePrice = 0;\n storedCycles = 0;\n\n unlockUpgrades: number[];\n upgrades: number[];\n upgradeMultipliers: number[];\n\n state = new CorporationState();\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"The Corporation\";\n const numUnlockUpgrades = Object.keys(CorporationUnlockUpgrades).length;\n const numUpgrades = Object.keys(CorporationUpgrades).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: number): void {\n if (!isFinite(amt)) {\n console.error(\"Trying to add invalid amount of funds. Report to a developper.\");\n return;\n }\n this.funds = this.funds + amt;\n }\n\n getState(): string {\n return this.state.getState();\n }\n\n storeCycles(numCycles = 1): void {\n this.storedCycles += numCycles;\n }\n\n process(player: IPlayer): void {\n if (this.storedCycles >= CorporationConstants.CyclesPerIndustryStateCycle) {\n const state = this.getState();\n const marketCycles = 1;\n const gameCycles = marketCycles * CorporationConstants.CyclesPerIndustryStateCycle;\n this.storedCycles -= gameCycles;\n\n this.divisions.forEach((ind) => {\n ind.process(marketCycles, state, this);\n });\n\n // Process cooldowns\n if (this.shareSaleCooldown > 0) {\n this.shareSaleCooldown -= gameCycles;\n }\n if (this.issueNewSharesCooldown > 0) {\n this.issueNewSharesCooldown -= gameCycles;\n }\n\n //At the start of a new cycle, calculate profits from previous cycle\n if (state === \"START\") {\n this.revenue = 0;\n this.expenses = 0;\n this.divisions.forEach((ind) => {\n if (ind.lastCycleRevenue === -Infinity || ind.lastCycleRevenue === Infinity) {\n return;\n }\n if (ind.lastCycleExpenses === -Infinity || ind.lastCycleExpenses === Infinity) {\n return;\n }\n this.revenue = this.revenue + ind.lastCycleRevenue;\n this.expenses = this.expenses + ind.lastCycleExpenses;\n });\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * (marketCycles * CorporationConstants.SecsPerMarketCycle);\n if (isNaN(this.funds) || this.funds === Infinity || this.funds === -Infinity) {\n dialogBoxCreate(\n \"There was an error calculating your Corporations funds and they got reset to 0. \" +\n \"This is a bug. Please report to game developer.

    \" +\n \"(Your funds have been set to $150b for the inconvenience)\",\n );\n this.funds = 150e9;\n }\n\n // Process dividends\n if (this.dividendPercentage > 0 && cycleProfit > 0) {\n // Validate input again, just to be safe\n if (\n isNaN(this.dividendPercentage) ||\n this.dividendPercentage < 0 ||\n this.dividendPercentage > CorporationConstants.DividendMaxPercentage * 100\n ) {\n console.error(`Invalid Corporation dividend percentage: ${this.dividendPercentage}`);\n } else {\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const retainedEarnings = cycleProfit - totalDividends;\n player.gainMoney(this.getDividends(), \"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 getDividends(): number {\n const profit = this.revenue - this.expenses;\n const cycleProfit = profit * CorporationConstants.SecsPerMarketCycle;\n const totalDividends = (this.dividendPercentage / 100) * cycleProfit;\n const dividendsPerShare = totalDividends / this.totalShares;\n const dividends = this.numShares * dividendsPerShare;\n let upgrades = -0.15;\n if (this.unlockUpgrades[5] === 1) {\n upgrades += 0.05;\n }\n if (this.unlockUpgrades[6] === 1) {\n upgrades += 0.1;\n }\n return Math.pow(dividends, BitNodeMultipliers.CorporationSoftCap + upgrades);\n }\n\n determineValuation(): number {\n let val,\n profit = this.revenue - this.expenses;\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 + 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, 0) / 3; //Base valuation\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 val -= val % 1e6; //Round down to nearest millionth\n }\n return val * BitNodeMultipliers.CorporationValuation;\n }\n\n getTargetSharePrice(): number {\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(): void {\n const targetPrice = this.getTargetSharePrice();\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 if (this.sharePrice <= 0.01) {\n this.sharePrice = 0.01;\n }\n }\n\n immediatelyUpdateSharePrice(): void {\n this.sharePrice = this.getTargetSharePrice();\n }\n\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 calculateShareSale(numShares: number): [number, number, number] {\n let sharesTracker = numShares;\n let sharesUntilUpdate = this.shareSalesUntilPriceUpdate;\n let sharePrice = this.sharePrice;\n let sharesSold = 0;\n let profit = 0;\n\n const maxIterations = Math.ceil(numShares / CorporationConstants.SHARESPERPRICEUPDATE);\n if (isNaN(maxIterations) || maxIterations > 10e6) {\n console.error(\n `Something went wrong or unexpected when calculating share sale. Maxiterations calculated to be ${maxIterations}`,\n );\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 = CorporationConstants.SHARESPERPRICEUPDATE;\n sharesTracker -= sharesUntilUpdate;\n sharesSold += sharesUntilUpdate;\n\n // Calculate what new share price would be\n sharePrice = this.determineValuation() / (2 * (this.totalShares + sharesSold - this.numShares));\n }\n }\n\n return [profit, sharePrice, sharesUntilUpdate];\n }\n\n convertCooldownToString(cd: number): string {\n // The cooldown value is based on game cycles. Convert to a simple string\n const seconds = cd / 5;\n\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 }\n\n //One time upgrades that unlock new features\n unlock(upgrade: CorporationUnlockUpgrade): void {\n const upgN = upgrade[0],\n price = upgrade[1];\n while (this.unlockUpgrades.length <= upgN) {\n this.unlockUpgrades.push(0);\n }\n if (this.funds < price) {\n dialogBoxCreate(\"You don't have enough funds to unlock this!\");\n return;\n }\n this.unlockUpgrades[upgN] = 1;\n this.funds = this.funds - price;\n\n // Apply effects for one-time upgrades\n if (upgN === 5) {\n this.dividendTaxPercentage -= 5;\n } else if (upgN === 6) {\n this.dividendTaxPercentage -= 10;\n }\n }\n\n //Levelable upgrades\n upgrade(upgrade: CorporationUpgrade): void {\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 while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n while (this.upgradeMultipliers.length <= upgN) {\n this.upgradeMultipliers.push(1);\n }\n const totalCost = basePrice * Math.pow(priceMult, this.upgrades[upgN]);\n if (this.funds < totalCost) {\n dialogBoxCreate(\"You don't have enough funds to purchase this!\");\n return;\n }\n ++this.upgrades[upgN];\n this.funds = this.funds - totalCost;\n\n //Increase upgrade multiplier\n this.upgradeMultipliers[upgN] = 1 + this.upgrades[upgN] * upgradeAmt;\n\n //If storage size is being updated, update values in Warehouse objects\n if (upgN === 1) {\n for (let i = 0; i < this.divisions.length; ++i) {\n const industry = this.divisions[i];\n for (const city of Object.keys(industry.warehouses)) {\n const warehouse = industry.warehouses[city];\n if (warehouse === 0) continue;\n if (industry.warehouses.hasOwnProperty(city) && warehouse instanceof Warehouse) {\n warehouse.updateSize(this, industry);\n }\n }\n }\n }\n }\n\n getProductionMultiplier(): number {\n const mult = this.upgradeMultipliers[0];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getStorageMultiplier(): number {\n const mult = this.upgradeMultipliers[1];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getDreamSenseGain(): number {\n const gain = this.upgradeMultipliers[2] - 1;\n return gain <= 0 ? 0 : gain;\n }\n\n getAdvertisingMultiplier(): number {\n const mult = this.upgradeMultipliers[3];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeCreMultiplier(): number {\n const mult = this.upgradeMultipliers[4];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeChaMultiplier(): number {\n const mult = this.upgradeMultipliers[5];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeIntMultiplier(): number {\n const mult = this.upgradeMultipliers[6];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getEmployeeEffMultiplier(): number {\n const mult = this.upgradeMultipliers[7];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getSalesMultiplier(): number {\n const mult = this.upgradeMultipliers[8];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\n\n getScientificResearchMultiplier(): number {\n const mult = this.upgradeMultipliers[9];\n if (isNaN(mult) || mult < 1) {\n return 1;\n } else {\n return mult;\n }\n }\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 getStarterGuide(player: IPlayer): void {\n // Check if player already has Corporation Handbook\n const homeComp = player.getHomeComputer();\n let hasHandbook = false;\n const handbookFn = LiteratureNames.CorporationManagementHandbook;\n for (let i = 0; i < homeComp.messages.length; ++i) {\n if (isString(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 showLiterature(handbookFn);\n return;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Corporation\", this);\n }\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 static fromJSON(value: any): Corporation {\n return Generic_fromJSON(Corporation, value.data);\n }\n}\n\nReviver.constructors.Corporation = Corporation;\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Hashes } from \"./Hashes\";\n\nexport function HashRate({ hashes }: { hashes: number }): React.ReactElement {\n return ;\n}\n","import { BladeburnerConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\n\ninterface IChangePopulationByCountParams {\n estChange: number;\n estOffset: number;\n}\n\ninterface IChangePopulationByPercentageParams {\n nonZero: boolean;\n changeEstEqually: boolean;\n}\n\nexport class City {\n /**\n * Name of the city.\n */\n name = \"\";\n\n /**\n * Population of the city.\n */\n pop = 0;\n\n /**\n * Population estimation of the city.\n */\n popEst = 0;\n\n /**\n * Number of communities in the city.\n */\n comms = 0;\n\n /**\n * Chaos level of the city.\n */\n chaos = 0;\n\n constructor(name: string = BladeburnerConstants.CityNames[2]) {\n this.name = name;\n\n // Synthoid population and estimate\n this.pop = getRandomInt(BladeburnerConstants.PopulationThreshold, 1.5 * BladeburnerConstants.PopulationThreshold);\n this.popEst = this.pop * (Math.random() + 0.5);\n\n // Number of Synthoid communities population and estimate\n this.comms = getRandomInt(5, 150);\n this.chaos = 0;\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n changeChaosByPercentage(p: number): void {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.chaosChaosByPercentage()\");\n }\n if (p === 0) {\n return;\n }\n this.chaos += this.chaos * (p / 100);\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n improvePopulationEstimateByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passeed into City.improvePopulationEstimateByCount()\");\n }\n if (this.popEst < this.pop) {\n this.popEst += 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 if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\n }\n }\n\n /**\n * p is the percentage, not the multiplier (e.g. pass in p = 5 for 5%)\n */\n improvePopulationEstimateByPercentage(p: number, skillMult = 1): void {\n p = p * skillMult;\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.improvePopulationEstimateByPercentage()\");\n }\n if (this.popEst < this.pop) {\n ++this.popEst; // In case estimate is 0\n this.popEst *= 1 + p / 100;\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 if (this.popEst < this.pop) {\n this.popEst = this.pop;\n }\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 changePopulationByCount(n: number, params: IChangePopulationByCountParams = { estChange: 0, estOffset: 0 }): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changePopulationByCount()\");\n }\n this.pop += n;\n if (params.estChange && !isNaN(params.estChange)) {\n this.popEst += params.estChange;\n }\n if (params.estOffset) {\n this.popEst = addOffset(this.popEst, params.estOffset);\n }\n this.popEst = Math.max(this.popEst, 0);\n }\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 changePopulationByPercentage(\n p: number,\n params: IChangePopulationByPercentageParams = {\n nonZero: false,\n changeEstEqually: false,\n },\n ): number {\n if (isNaN(p)) {\n throw new Error(\"NaN passed into City.changePopulationByPercentage()\");\n }\n if (p === 0) {\n return 0;\n }\n let change = Math.round(this.pop * (p / 100));\n\n // Population always changes by at least 1\n if (params.nonZero && change === 0) {\n p > 0 ? (change = 1) : (change = -1);\n }\n\n this.pop += change;\n if (params.changeEstEqually) {\n this.popEst += change;\n if (this.popEst < 0) {\n this.popEst = 0;\n }\n }\n return change;\n }\n\n changeChaosByCount(n: number): void {\n if (isNaN(n)) {\n throw new Error(\"NaN passed into City.changeChaosByCount()\");\n }\n if (n === 0) {\n return;\n }\n this.chaos += n;\n if (this.chaos < 0) {\n this.chaos = 0;\n }\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"City\", this);\n }\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 static fromJSON(value: any): City {\n return Generic_fromJSON(City, value.data);\n }\n}\n\nReviver.constructors.City = City;\n","import { Factions } from \"../../Faction/Factions\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Gang } from \"../../Gang/Gang\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\n// Amount of negative karma needed to manage a gang in BitNodes other than 2\nconst GangKarmaRequirement = -54000;\n\nexport function canAccessGang(this: IPlayer): boolean {\n if (this.bitNodeN === 2) {\n return true;\n }\n if (SourceFileFlags[2] <= 0) {\n return false;\n }\n\n return this.karma <= GangKarmaRequirement;\n}\n\nexport function getGangFaction(this: IPlayer): Faction {\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n const fac = Factions[gang.facName];\n if (fac == null) {\n throw new Error(`Gang has invalid faction name: ${gang.facName}`);\n }\n\n return fac;\n}\n\nexport function getGangName(this: IPlayer): string {\n if (!this.inGang()) return \"\";\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName;\n}\n\nexport function hasGangWith(this: IPlayer, facName: string): boolean {\n if (!this.inGang()) return false;\n const gang = this.gang;\n if (gang === null) {\n throw new Error(\"Cannot get gang faction because player is not in a gang.\");\n }\n return gang.facName === facName;\n}\n\nexport function inGang(this: IPlayer): boolean {\n if (this.gang == null || this.gang == undefined) {\n return false;\n }\n\n return this.gang instanceof Gang;\n}\n\nexport function startGang(this: IPlayer, factionName: string, hacking: boolean): void {\n this.gang = new Gang(factionName, hacking);\n\n const fac = Factions[factionName];\n if (fac == null) {\n throw new Error(`Invalid faction name when creating gang: ${factionName}`);\n }\n fac.playerReputation = 0;\n}\n","/**\n * Class representing a City in the game\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\n\nexport class City {\n /**\n * List of all locations in this city\n */\n locations: LocationName[];\n\n /**\n * Name of this city\n */\n name: CityName;\n\n /**\n * Metro map ascii art\n */\n asciiArt: string;\n\n constructor(name: CityName, locations: LocationName[] = [], asciiArt = \"\") {\n this.name = name;\n this.locations = locations;\n this.asciiArt = asciiArt;\n }\n\n addLocation(loc: LocationName): void {\n this.locations.push(loc);\n }\n}\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 */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\n\ntype IProps = {\n buttonText: string;\n infoText: string;\n onClick: (e: React.MouseEvent) => void;\n};\n\nexport function Option(props: IProps): React.ReactElement {\n return (\n \n \n \n {props.infoText}\n \n \n );\n}\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 */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\nexport enum TickerDisplayMode {\n AllStocks,\n Portfolio,\n}\n\ntype IProps = {\n changeDisplayMode: () => void;\n changeWatchlistFilter: (e: React.ChangeEvent) => void;\n tickerDisplayMode: TickerDisplayMode;\n};\n\nfunction DisplayModeButton(props: IProps): React.ReactElement {\n let txt = \"\";\n let tooltip = \"\";\n if (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 (\n {tooltip}}>\n \n \n );\n}\n\nexport function StockTickersConfig(props: IProps): React.ReactElement {\n return (\n <>\n \n
    \n \n \n );\n}\n","/**\n * Server and HacknetServer-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../../Server/AllServers\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\n\nexport function hasTorRouter(this: IPlayer): boolean {\n return !!GetServer(SpecialServers.DarkWeb);\n}\n\nexport function getCurrentServer(this: IPlayer): BaseServer {\n const server = GetServer(this.currentServer);\n if (server === null) throw new Error(`somehow connected to a server that does not exist. ${this.currentServer}`);\n return server;\n}\n\nexport function getHomeComputer(this: IPlayer): Server {\n const home = GetServer(\"home\");\n if (home instanceof Server) return home;\n throw new Error(\"home computer was not a normal server\");\n}\n\nexport function getUpgradeHomeRamCost(this: IPlayer): number {\n //Calculate how many times ram has been upgraded (doubled)\n const currentRam = this.getHomeComputer().maxRam;\n const numUpgrades = Math.log2(currentRam);\n\n //Calculate cost\n //Have cost increase by some percentage each time RAM has been upgraded\n const mult = Math.pow(1.58, numUpgrades);\n const cost = currentRam * CONSTANTS.BaseCostFor1GBOfRamHome * mult * BitNodeMultipliers.HomeComputerRamCost;\n return cost;\n}\n\nexport function getUpgradeHomeCoresCost(this: IPlayer): number {\n return 1e9 * Math.pow(7.5, this.getHomeComputer().cpuCores);\n}\n\nexport function createHacknetServer(this: IPlayer): HacknetServer {\n const numOwned = this.hacknetNodes.length;\n const name = `hacknet-node-${numOwned}`;\n const server = new HacknetServer({\n adminRights: true,\n hostname: name,\n ip: createUniqueRandomIp(),\n // player: this,\n });\n this.hacknetNodes.push(server.hostname);\n\n // Configure the HacknetServer to actually act as a Server\n AddToAllServers(server);\n const homeComputer = this.getHomeComputer();\n homeComputer.serversOnNetwork.push(server.hostname);\n server.serversOnNetwork.push(SpecialServers.Home);\n\n return server;\n}\n","import { Player } from \"../Player\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { addOffset } from \"../utils/helpers/addOffset\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { BladeburnerConstants } from \"./data/Constants\";\nimport { IBladeburner } from \"./IBladeburner\";\nimport { IAction, ISuccessChanceParams } from \"./IAction\";\n\nclass StatsMultiplier {\n [key: string]: number;\n\n hack = 0;\n str = 0;\n def = 0;\n dex = 0;\n agi = 0;\n cha = 0;\n int = 0;\n}\n\nexport interface IActionParams {\n name?: string;\n level?: number;\n maxLevel?: number;\n autoLevel?: boolean;\n baseDifficulty?: number;\n difficultyFac?: number;\n rewardFac?: number;\n successes?: number;\n failures?: number;\n rankGain?: number;\n rankLoss?: number;\n hpLoss?: number;\n hpLost?: number;\n isStealth?: boolean;\n isKill?: boolean;\n count?: number;\n weights?: StatsMultiplier;\n decays?: StatsMultiplier;\n teamCount?: number;\n}\n\nexport class Action implements IAction {\n name = \"\";\n\n // Difficulty scales with level. See getDifficulty() method\n level = 1;\n maxLevel = 1;\n autoLevel = true;\n baseDifficulty = 100;\n difficultyFac = 1.01;\n\n // Rank increase/decrease is affected by this exponent\n rewardFac = 1.02;\n\n successes = 0;\n failures = 0;\n\n // All of these scale with level/difficulty\n rankGain = 0;\n rankLoss = 0;\n hpLoss = 0;\n hpLost = 0;\n\n // Action Category. Current categories are stealth and kill\n isStealth = false;\n isKill = false;\n\n /**\n * Number of this contract remaining, and its growth rate\n * Growth rate is an integer and the count will increase by that integer every \"cycle\"\n */\n count: number = getRandomInt(1e3, 25e3);\n\n // Weighting of each stat in determining action success rate\n weights: StatsMultiplier = {\n hack: 1 / 7,\n str: 1 / 7,\n def: 1 / 7,\n dex: 1 / 7,\n agi: 1 / 7,\n cha: 1 / 7,\n int: 1 / 7,\n };\n // Diminishing returns of stats (stat ^ decay where 0 <= decay <= 1)\n decays: StatsMultiplier = {\n hack: 0.9,\n str: 0.9,\n def: 0.9,\n dex: 0.9,\n agi: 0.9,\n cha: 0.9,\n int: 0.9,\n };\n teamCount = 0;\n\n // Base Class for Contracts, Operations, and BlackOps\n constructor(params: IActionParams | null = null) {\n // | null = null\n if (params && params.name) this.name = params.name;\n\n if (params && params.baseDifficulty) this.baseDifficulty = addOffset(params.baseDifficulty, 10);\n if (params && params.difficultyFac) this.difficultyFac = params.difficultyFac;\n\n if (params && params.rewardFac) this.rewardFac = params.rewardFac;\n if (params && params.rankGain) this.rankGain = params.rankGain;\n if (params && params.rankLoss) this.rankLoss = params.rankLoss;\n if (params && params.hpLoss) this.hpLoss = params.hpLoss;\n\n if (params && params.isStealth) this.isStealth = params.isStealth;\n if (params && params.isKill) this.isKill = params.isKill;\n\n if (params && params.count) this.count = params.count;\n\n if (params && params.weights) this.weights = params.weights;\n if (params && params.decays) this.decays = params.decays;\n\n // Check to make sure weights are summed properly\n let sum = 0;\n for (const weight of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(weight)) {\n sum += this.weights[weight];\n }\n }\n if (sum - 1 >= 10 * Number.EPSILON) {\n throw new Error(\n \"Invalid weights when constructing Action \" +\n this.name +\n \". The weights should sum up to 1. They sum up to :\" +\n 1,\n );\n }\n\n for (const decay of Object.keys(this.decays)) {\n if (this.decays.hasOwnProperty(decay)) {\n if (this.decays[decay] > 1) {\n throw new Error(\n `Invalid decays when constructing Action ${this.name}. Decay value cannot be greater than 1`,\n );\n }\n }\n }\n }\n\n getDifficulty(): number {\n const difficulty = this.baseDifficulty * Math.pow(this.difficultyFac, this.level - 1);\n if (isNaN(difficulty)) {\n throw new Error(\"Calculated NaN in Action.getDifficulty()\");\n }\n return difficulty;\n }\n\n /**\n * Tests for success. Should be called when an action has completed\n * @param inst {Bladeburner} - Bladeburner instance\n */\n attempt(inst: IBladeburner): boolean {\n return Math.random() < this.getSuccessChance(inst);\n }\n\n // To be implemented by subtypes\n getActionTimePenalty(): number {\n return 1;\n }\n\n getActionTime(inst: IBladeburner): number {\n const difficulty = this.getDifficulty();\n let baseTime = difficulty / BladeburnerConstants.DifficultyToTimeFactor;\n const skillFac = inst.skillMultipliers.actionTime; // Always < 1\n\n const effAgility = Player.agility * inst.skillMultipliers.effAgi;\n const effDexterity = Player.dexterity * inst.skillMultipliers.effDex;\n const statFac =\n 0.5 *\n (Math.pow(effAgility, BladeburnerConstants.EffAgiExponentialFactor) +\n Math.pow(effDexterity, BladeburnerConstants.EffDexExponentialFactor) +\n effAgility / BladeburnerConstants.EffAgiLinearFactor +\n effDexterity / BladeburnerConstants.EffDexLinearFactor); // Always > 1\n\n baseTime = Math.max(1, (baseTime * skillFac) / statFac);\n\n return Math.ceil(baseTime * this.getActionTimePenalty());\n }\n\n // For actions that have teams. To be implemented by subtypes.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getTeamSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return 1;\n }\n\n getChaosCompetencePenalty(inst: IBladeburner, params: ISuccessChanceParams): number {\n const city = inst.getCurrentCity();\n if (params.est) {\n return Math.pow(city.popEst / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n } else {\n return Math.pow(city.pop / BladeburnerConstants.PopulationThreshold, BladeburnerConstants.PopulationExponent);\n }\n }\n\n getChaosDifficultyBonus(inst: IBladeburner /*, params: ISuccessChanceParams*/): number {\n const city = inst.getCurrentCity();\n if (city.chaos > BladeburnerConstants.ChaosThreshold) {\n const diff = 1 + (city.chaos - BladeburnerConstants.ChaosThreshold);\n const mult = Math.pow(diff, 0.5);\n return mult;\n }\n\n return 1;\n }\n\n getEstSuccessChance(inst: IBladeburner): [number, number] {\n function clamp(x: number): number {\n return Math.max(0, Math.min(x, 1));\n }\n const est = this.getSuccessChance(inst, { est: true });\n const real = this.getSuccessChance(inst);\n const diff = Math.abs(real - est);\n let low = real - diff;\n let high = real + diff;\n const city = inst.getCurrentCity();\n const r = city.pop / city.popEst;\n if (r < 1) low *= r;\n else high *= r;\n return [clamp(low), clamp(high)];\n }\n\n /**\n * @inst - Bladeburner Object\n * @params - options:\n * est (bool): Get success chance estimate instead of real success chance\n */\n getSuccessChance(inst: IBladeburner, params: ISuccessChanceParams = { est: false }): number {\n if (inst == null) {\n throw new Error(\"Invalid Bladeburner instance passed into Action.getSuccessChance\");\n }\n let difficulty = this.getDifficulty();\n let competence = 0;\n for (const stat of Object.keys(this.weights)) {\n if (this.weights.hasOwnProperty(stat)) {\n const playerStatLvl = Player.queryStatFromString(stat);\n const key = \"eff\" + stat.charAt(0).toUpperCase() + stat.slice(1);\n let effMultiplier = inst.skillMultipliers[key];\n if (effMultiplier == null) {\n console.error(`Failed to find Bladeburner Skill multiplier for: ${stat}`);\n effMultiplier = 1;\n }\n competence += this.weights[stat] * Math.pow(effMultiplier * playerStatLvl, this.decays[stat]);\n }\n }\n competence *= Player.getIntelligenceBonus(0.75);\n competence *= inst.calculateStaminaPenalty();\n\n competence *= this.getTeamSuccessBonus(inst);\n\n competence *= this.getChaosCompetencePenalty(inst, params);\n difficulty *= this.getChaosDifficultyBonus(inst);\n\n if (this.name == \"Raid\" && inst.getCurrentCity().comms <= 0) {\n return 0;\n }\n\n // Factor skill multipliers into success chance\n competence *= inst.skillMultipliers.successChanceAll;\n competence *= this.getActionTypeSkillSuccessBonus(inst);\n if (this.isStealth) {\n competence *= inst.skillMultipliers.successChanceStealth;\n }\n if (this.isKill) {\n competence *= inst.skillMultipliers.successChanceKill;\n }\n\n // Augmentation multiplier\n competence *= Player.bladeburner_success_chance_mult;\n\n if (isNaN(competence)) {\n throw new Error(\"Competence calculated as NaN in Action.getSuccessChance()\");\n }\n return Math.min(1, competence / difficulty);\n }\n\n getSuccessesNeededForNextLevel(baseSuccessesPerLevel: number): number {\n return Math.ceil(0.5 * this.maxLevel * (2 * baseSuccessesPerLevel + (this.maxLevel - 1)));\n }\n\n setMaxLevel(baseSuccessesPerLevel: number): void {\n if (this.successes >= this.getSuccessesNeededForNextLevel(baseSuccessesPerLevel)) {\n ++this.maxLevel;\n }\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Action\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Action {\n return Generic_fromJSON(Action, value.data);\n }\n}\n\nReviver.constructors.Action = Action;\n","import React from \"react\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ICityProps {\n currentCity: CityName;\n city: CityName;\n onTravel: (city: CityName) => void;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n travel: {\n color: theme.colors.white,\n lineHeight: \"1em\",\n whiteSpace: \"pre\",\n cursor: \"pointer\"\n },\n })\n);\n\nfunction City(props: ICityProps): React.ReactElement {\n const classes = useStyles();\n if (props.city !== props.currentCity) {\n return (\n {props.city}}>\n props.onTravel(props.city)}\n className={classes.travel}\n >\n {props.city[0]}\n \n \n );\n }\n return {props.city[0]};\n}\n\ninterface IProps {\n currentCity: CityName;\n onTravel: (city: CityName) => void;\n}\n\nexport function WorldMap(props: IProps): React.ReactElement {\n // prettier-ignore\n return (\n <>\n ,_ . ._. _. .\n , _-\\','|~\\~ ~/ ;-'_ _-' ,;_;_, ~~-\n /~~-\\_/-'~'--' \\~~| ', ,' / / ~|-_\\_/~/~ ~~--~~~~'--_\n / ,/'-/~ '\\ ,' _ , ','|~ ._/-, /~\n ~/-'~\\_, '-,| '|. ' ~ ,\\ /'~ / /_ /~\n .-~ '| '',\\~|\\ _\\~ ,_ , /,\n '\\ /'~ |_/~\\\\,-,~ \\ \" ,_,/ |\n | / ._-~'\\_ _~| \\ ) \n \\ __-\\ '/ ~ |\\ \\_ / ~\n ., '\\ |, ~-_ - | \\\\_' ~| /\\ \\~ ,\n ~-_' _; '\\ '-, \\,' /\\/ |\n '\\_,~'\\_ \\_ _, /' ' |, /|'\n / \\_ ~ | / \\ ~'; -,_.\n | ~\\ | | , '-_, ,; ~ ~\\\n \\, / \\ / /| ,-, , -,\n | ,/ | |' |/ ,- ~ \\ '.\n ,| ,/ \\ ,/ \\ |\n / | ~ -~~-, / _\n | ,-' ~ /\n / ,' ~\n ',| ~\n ~'\n \n );\n}\n","import React from \"react\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { StealthIcon } from \"./StealthIcon\";\nimport { KillIcon } from \"./KillIcon\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: IAction;\n}\n\nexport function SuccessChance(props: IProps): React.ReactElement {\n const estimatedSuccessChance = props.action.getEstSuccessChance(props.bladeburner);\n\n let chance = <>;\n if (estimatedSuccessChance[0] === estimatedSuccessChance[1]) {\n chance = <>{formatNumber(estimatedSuccessChance[0] * 100, 1)}%;\n } else {\n chance = (\n <>\n {formatNumber(estimatedSuccessChance[0] * 100, 1)}% ~ {formatNumber(estimatedSuccessChance[1] * 100, 1)}%\n \n );\n }\n\n return (\n <>\n Estimated success chance: {chance} {props.action.isStealth ? : <>}\n {props.action.isKill ? : <>}\n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n}\n\nexport function StaticModal(props: IProps): React.ReactElement {\n return (\n \n {props.children}\n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nfunction replace(str: string, i: number, char: string): string {\n return str.substring(0, i) + char + str.substring(i + 1);\n}\n\ninterface IProps {\n content: string;\n}\n\nfunction randomize(char: string): string {\n const randFrom = (str: string): string => str[Math.floor(Math.random() * str.length)];\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\nexport function CorruptableText(props: IProps): JSX.Element {\n const [content, setContent] = useState(props.content);\n\n useEffect(() => {\n let counter = 5;\n const timers: number[] = [];\n const intervalId = 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((content) => replace(content, index, randomize(letter)));\n timers.push(window.setTimeout(() => {\n setContent((content) => replace(content, index, letter));\n }, 500));\n }, 20);\n\n return () => {\n clearInterval(intervalId);\n timers.forEach((timerId) => clearTimeout(timerId));\n };\n }, []);\n\n return {content};\n}\n","import React from \"react\";\nimport { DarkWebItems } from \"./DarkWebItems\";\n\nimport { Player } from \"../Player\";\nimport { Terminal } from \"../Terminal\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { Money } from \"../ui/React/Money\";\nimport { DarkWebItem } from \"./DarkWebItem\";\n\n//Posts a \"help\" message if connected to DarkWeb\nexport function checkIfConnectedToDarkweb(): void {\n const server = Player.getCurrentServer();\n if (server !== null && SpecialServers.DarkWeb == server.hostname) {\n Terminal.print(\n \"You are now connected to the dark web. From the dark web you can purchase illegal items. \" +\n \"Use the 'buy -l' command to display a list of all the items you can buy. Use 'buy [item-name]' \" +\n \"to purchase an item. Use 'buy -a' to purchase all unowned items.\",\n );\n }\n}\n\nexport function listAllDarkwebItems(): void {\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n\n const cost = Player.getHomeComputer().programs.includes(item.program) ? (\n [OWNED]\n ) : (\n \n );\n\n Terminal.printRaw(\n <>\n {item.program} - {cost} - {item.description}\n ,\n );\n }\n}\n\nexport function buyDarkwebItem(itemName: string): void {\n itemName = itemName.toLowerCase();\n\n // find the program that matches, if any\n let item: DarkWebItem | null = null;\n\n for (const key of Object.keys(DarkWebItems)) {\n const i = DarkWebItems[key];\n if (i.program.toLowerCase() == itemName) {\n item = i;\n }\n }\n\n // return if invalid\n if (item === null) {\n Terminal.error(\"Unrecognized item: \" + itemName);\n return;\n }\n\n // return if the player already has it.\n if (Player.hasProgram(item.program)) {\n Terminal.print(\"You already have the \" + item.program + \" program\");\n return;\n }\n\n // return if the player doesn't have enough money\n if (Player.money < item.price) {\n Terminal.error(\"Not enough money to purchase \" + item.program);\n return;\n }\n\n // buy and push\n Player.loseMoney(item.price, \"other\");\n\n const programsRef = Player.getHomeComputer().programs;\n // Remove partially created program if there is one\n const existingPartialExeIndex = programsRef.findIndex(\n (program) => item?.program && program.startsWith(item?.program),\n );\n // findIndex returns -1 if there is no match, we only want to splice on a match\n if (existingPartialExeIndex > -1) {\n programsRef.splice(existingPartialExeIndex, 1);\n }\n // Add the newly bought, full .exe\n Player.getHomeComputer().programs.push(item.program);\n\n Terminal.print(\n \"You have purchased the \" + item.program + \" program. The new program can be found on your home computer.\",\n );\n}\n\nexport function buyAllDarkwebItems(): void {\n const itemsToBuy: DarkWebItem[] = [];\n let cost = 0;\n\n for (const key of Object.keys(DarkWebItems)) {\n const item = DarkWebItems[key];\n if (!Player.hasProgram(item.program)) {\n itemsToBuy.push(item);\n cost += item.price;\n }\n }\n\n if (itemsToBuy.length === 0) {\n Terminal.print(\"All available programs have been purchased already.\");\n return;\n }\n\n if (cost > Player.money) {\n Terminal.error(\"Not enough money to purchase remaining programs, \" + numeralWrapper.formatMoney(cost) + \" required\");\n return;\n }\n\n for (const item of itemsToBuy) {\n buyDarkwebItem(item.program);\n }\n}\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 */\nimport { IReturnStatus } from \"../types\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Server } from \"../Server/Server\";\n\nfunction baseCheck(server: Server, fnName: string): IReturnStatus {\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 { res: true };\n}\n\nexport function netscriptCanHack(server: Server, p: IPlayer): IReturnStatus {\n const initialCheck = baseCheck(server, \"hack\");\n if (!initialCheck.res) {\n return initialCheck;\n }\n\n const s = server;\n if (s.requiredHackingSkill > p.hacking) {\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 { res: true };\n}\n\nexport function netscriptCanGrow(server: Server): IReturnStatus {\n return baseCheck(server, \"grow\");\n}\n\nexport function netscriptCanWeaken(server: Server): IReturnStatus {\n return baseCheck(server, \"weaken\");\n}\n","import { sum } from \"lodash\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { CONSTANTS } from \"../../Constants\";\n\nexport interface IConstructorParams {\n augmentation: Augmentation;\n readonly cost: number;\n readonly time: number;\n}\n\nexport class GraftableAugmentation {\n // The augmentation that this craftable corresponds to\n augmentation: Augmentation;\n\n constructor(augmentation: Augmentation) {\n this.augmentation = augmentation;\n }\n\n get cost(): number {\n return this.augmentation.startingCost * CONSTANTS.AugmentationGraftingCostMult;\n }\n\n get time(): number {\n // Time = 1 hour * log_2(sum(aug multipliers) || 1) + 30 minutes\n const antiLog = Math.max(sum(Object.values(this.augmentation.mults)), 1);\n\n const mult = Math.log2(antiLog);\n return (CONSTANTS.AugmentationGraftingTimeBase * mult + CONSTANTS.MillisecondsPerHalfHour) / 2;\n }\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../numeralFormat\";\nimport { Reputation } from \"./Reputation\";\n\nexport function ReputationRate({ reputation }: { reputation: number }): React.ReactElement {\n return ;\n}\n","import { KEY } from \"../utils/helpers/keyCodes\";\nimport { substituteAliases } from \"../Alias\";\n// Helper function that checks if an argument (which is a string) is a valid number\nfunction isNumber(str: string): boolean {\n if (typeof str != \"string\") {\n return false;\n } // Only process strings\n return !isNaN(str as unknown as number) && !isNaN(parseFloat(str));\n}\nexport function ParseCommands(commands: string): string[] {\n // Sanitize input\n commands = commands.trim();\n // Replace all extra whitespace in command with a single space\n commands = commands.replace(/\\s\\s+/g, \" \");\n\n const match = commands.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g);\n if (!match) return [];\n // Split commands and execute sequentially\n const allCommands = match\n .map(substituteAliases)\n .map((c) => c.match(/(?:'[^']*'|\"[^\"]*\"|[^;\"])*/g))\n .flat();\n\n const out: string[] = [];\n for (const c of allCommands) {\n if (c === null) continue;\n if (c.match(/^\\s*$/)) {\n continue;\n } // Don't run commands that only have whitespace\n out.push(c.trim());\n }\n return out;\n}\n\nexport function ParseCommand(command: string): (string | number | boolean)[] {\n // This will be used to keep track of whether we're in a quote. This is for situations\n // like the alias command:\n // alias run=\"run NUKE.exe\"\n // We want the run=\"run NUKE.exe\" to be parsed as a single command, so this flag\n // will keep track of whether we have a quote in\n let inQuote = ``;\n\n // Returns an array with the command and its arguments in each index\n // Properly handles quotation marks (e.g. `run foo.script \"the sun\"` will return [run, foo.script, the sun])\n const args = [];\n let start = 0,\n i = 0;\n let prevChar = \"\"; // Previous character\n while (i < command.length) {\n let escaped = false; // Check for escaped quotation marks\n if (i >= 1) {\n prevChar = command.charAt(i - 1);\n if (prevChar === \"\\\\\") {\n escaped = true;\n }\n }\n\n const c = command.charAt(i);\n if (c === KEY.DOUBLE_QUOTE) {\n // Double quotes\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.DOUBLE_QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.DOUBLE_QUOTE;\n } else if (inQuote === KEY.DOUBLE_QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.QUOTE) {\n // Single quotes, same thing as above\n if (!escaped && prevChar === KEY.SPACE) {\n const endQuote = command.indexOf(KEY.QUOTE, i + 1);\n if (endQuote !== -1 && (endQuote === command.length - 1 || command.charAt(endQuote + 1) === KEY.SPACE)) {\n args.push(command.substr(i + 1, endQuote - i - 1));\n if (endQuote === command.length - 1) {\n start = i = endQuote + 1;\n } else {\n start = i = endQuote + 2; // Skip the space\n }\n continue;\n }\n } else if (inQuote === ``) {\n inQuote = KEY.QUOTE;\n } else if (inQuote === KEY.QUOTE) {\n inQuote = ``;\n }\n } else if (c === KEY.SPACE && inQuote === ``) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from a string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n\n start = i + 1;\n }\n ++i;\n }\n\n // Add the last argument\n if (start !== i) {\n const arg = command.substr(start, i - start);\n\n // If this is a number, convert it from string to number\n if (isNumber(arg)) {\n args.push(parseFloat(arg));\n } else if (arg === \"true\") {\n args.push(true);\n } else if (arg === \"false\") {\n args.push(false);\n } else {\n args.push(arg);\n }\n }\n\n return args;\n}\n","import React, { useState } from \"react\";\n\nimport { CinematicLine } from \"./CinematicLine\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n lines: string[];\n auto?: boolean;\n onDone?: () => void;\n}\n\nexport function CinematicText(props: IProps): React.ReactElement {\n const [i, setI] = useState(0);\n const [done, setDone] = useState(false);\n\n function advance(): void {\n const newI = i + 1;\n setI(newI);\n if (newI >= props.lines.length) {\n if (props.onDone && props.auto) props.onDone();\n setDone(true);\n }\n }\n\n return (\n <>\n {props.lines.slice(0, i).map((line, i) => (\n {line}\n ))}\n {props.lines.length > i && }\n {!props.auto && props.onDone && done && }\n \n );\n}\n","/**\n * Implements the purchasing of extra Duplicate Sleeves from The Covenant,\n * as well as the purchasing of upgrades (memory)\n */\n\nexport const MaxSleevesFromCovenant = 5;\nexport const BaseCostPerSleeve = 10e12;\n","import { Augmentation, IConstructorParams } from \"./Augmentation\";\nimport { AugmentationNames } from \"./data/AugmentationNames\";\nimport { Player } from \"../Player\";\nimport { Programs } from \"../Programs/Programs\";\nimport { WHRNG } from \"../Casino/RNG\";\nimport React from \"react\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\nfunction getRandomBonus(): any {\n const bonuses = [\n {\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:\n \"Increases the player's hacking chance by 25%.
    \" +\n \"Increases the player's hacking speed by 10%.
    \" +\n \"Increases the amount of money the player's gains from hacking by 25%.
    \" +\n \"Improves grow() by 10%.\",\n },\n {\n bonuses: {\n hacking_mult: 1.15,\n hacking_exp_mult: 2,\n },\n description:\n \"Increases the player's hacking skill by 15%.
    \" +\n \"Increases the player's hacking experience gain rate by 100%.\",\n },\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:\n \"Increases all of the player's combat stats by 25%.
    \" +\n \"Increases all of the player's combat stat experience gain rate by 100%.\",\n },\n {\n bonuses: {\n charisma_mult: 1.5,\n charisma_exp_mult: 2,\n },\n description:\n \"This augmentation increases the player's charisma by 50%.
    \" +\n \"Increases the player's charisma experience gain rate by 100%.\",\n },\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:\n \"Increases the amount of money produced by Hacknet Nodes by 20%.
    \" +\n \"Decreases all costs related to Hacknet Node by 15%.\",\n },\n {\n bonuses: {\n company_rep_mult: 1.25,\n faction_rep_mult: 1.15,\n work_money_mult: 1.7,\n },\n description:\n \"Increases the amount of money the player gains from working by 70%.
    \" +\n \"Increases the amount of reputation the player gains when working for a company by 25%.
    \" +\n \"Increases the amount of reputation the player gains for a faction by 15%.\",\n },\n {\n bonuses: {\n crime_success_mult: 2,\n crime_money_mult: 2,\n },\n description:\n \"Increases the player's crime success rate by 100%.
    \" +\n \"Increases the amount of money the player gains from crimes by 100%.\",\n },\n ];\n\n const randomNumber = new WHRNG(Math.floor(Player.lastUpdate / 3600000));\n for (let i = 0; i < 5; i++) randomNumber.step();\n\n return bonuses[Math.floor(bonuses.length * randomNumber.random())];\n}\n\nexport const generalAugmentations = [\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting1,\n moneyCost: 1.5e7,\n repCost: 5e3,\n info:\n \"A cranial implant that is embedded within the inner ear structures and optic nerves. It regulates \" +\n \"and enhances balance and hand-eye coordination.\",\n dexterity_mult: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Targeting2,\n moneyCost: 4.25e7,\n repCost: 8.75e3,\n info:\n \"This upgraded version of the 'Augmented Targeting' implant is capable of augmenting \" +\n \"reality by digitally displaying weaknesses and vital signs of threats.\",\n prereqs: [AugmentationNames.Targeting1],\n dexterity_mult: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Sector12,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.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: [AugmentationNames.Targeting2],\n dexterity_mult: 1.3,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SyntheticHeart,\n moneyCost: 2.875e9,\n repCost: 7.5e5,\n info:\n \"This advanced artificial heart, created from plasteel and graphene, is capable of pumping blood \" +\n \"more efficiently than an organic heart.\",\n agility_mult: 1.5,\n strength_mult: 1.5,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SynfibrilMuscle,\n repCost: 4.375e5,\n moneyCost: 1.125e9,\n info:\n \"The myofibrils in human muscles are injected with special chemicals that react with the proteins inside \" +\n \"the myofibrils, altering their underlying structure. The end result is muscles that are stronger and more elastic. \" +\n \"Scientists have named these artificially enhanced units 'synfibrils'.\",\n strength_mult: 1.3,\n defense_mult: 1.3,\n factions: [\n FactionNames.KuaiGongInternational,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.SpeakersForTheDead,\n FactionNames.NWO,\n FactionNames.TheCovenant,\n FactionNames.Daedalus,\n FactionNames.Illuminati,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib1,\n repCost: 7.5e3,\n moneyCost: 2.375e7,\n info:\n \"The rib cage is augmented to continuously release boosters into the bloodstream \" +\n \"which increase the oxygen-carrying capacity of blood.\",\n strength_mult: 1.1,\n defense_mult: 1.1,\n factions: [\n FactionNames.SlumSnakes,\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.Ishima,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib2,\n repCost: 1.875e4,\n moneyCost: 6.5e7,\n info:\n \"An upgraded version of the 'Combat Rib' augmentation that adds potent stimulants which \" +\n \"improve focus and endurance while decreasing reaction time and fatigue.\",\n prereqs: [AugmentationNames.CombatRib1],\n strength_mult: 1.14,\n defense_mult: 1.14,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.Volhaven,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.CombatRib3,\n repCost: 3.5e4,\n moneyCost: 1.2e8,\n info:\n \"The latest version of the 'Combat Rib' augmentation releases advanced anabolic steroids that \" +\n \"improve muscle mass and physical performance while being safe and free of side effects.\",\n prereqs: [AugmentationNames.CombatRib2],\n strength_mult: 1.18,\n defense_mult: 1.18,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n FactionNames.BladeIndustries,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NanofiberWeave,\n repCost: 3.75e4,\n moneyCost: 1.25e8,\n info:\n \"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning, \" +\n \"which improves its regenerative and extracellular homeostasis abilities.\",\n strength_mult: 1.2,\n defense_mult: 1.2,\n factions: [\n FactionNames.TheDarkArmy,\n FactionNames.TheSyndicate,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FulcrumSecretTechnologies,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SubdermalArmor,\n repCost: 8.75e5,\n moneyCost: 3.25e9,\n info:\n \"The NEMEAN Subdermal Weave is a thin, light-weight, graphene plating that houses a dilatant fluid. \" +\n \"The material is implanted underneath the skin, and is the most advanced form of defensive enhancement \" +\n \"that has ever been created. The dilatant fluid, despite being thin and light, is extremely effective \" +\n \"at stopping piercing blows and reducing blunt trauma. The properties of graphene allow the plating to \" +\n \"mitigate damage from any fire or electrical traumas.\",\n defense_mult: 2.2,\n factions: [\n FactionNames.TheSyndicate,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.Illuminati,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.WiredReflexes,\n repCost: 1.25e3,\n moneyCost: 2.5e6,\n info:\n \"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, \" +\n \"supercharging the spread of neural signals and increasing reflex speed.\",\n agility_mult: 1.05,\n dexterity_mult: 1.05,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SlumSnakes,\n FactionNames.Sector12,\n FactionNames.Volhaven,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.TheSyndicate,\n FactionNames.TheDarkArmy,\n FactionNames.SpeakersForTheDead,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.BionicSpine,\n repCost: 4.5e4,\n moneyCost: 1.25e8,\n info:\n \"The spine is reconstructed using plasteel and carbon fibers. \" +\n \"It is now capable of stimulating and regulating neural signals \" +\n \"passing through the spinal cord, improving senses and reaction speed. \" +\n \"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 factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicSpine,\n repCost: 1.625e6,\n moneyCost: 6e9,\n info:\n \"An upgrade to the 'Bionic Spine' augmentation. The spine is fused with graphene \" +\n \"which enhances durability and supercharges all body functions.\",\n prereqs: [AugmentationNames.BionicSpine],\n strength_mult: 1.6,\n defense_mult: 1.6,\n agility_mult: 1.6,\n dexterity_mult: 1.6,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [\n FactionNames.SpeakersForTheDead,\n FactionNames.TheSyndicate,\n FactionNames.KuaiGongInternational,\n FactionNames.OmniTekIncorporated,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicLegs,\n repCost: 7.5e5,\n moneyCost: 4.5e9,\n info:\n \"An upgrade to the 'Bionic Legs' augmentation. The legs are fused \" +\n \"with graphene, greatly enhancing jumping ability.\",\n prereqs: [AugmentationNames.BionicLegs],\n agility_mult: 2.5,\n factions: [FactionNames.MegaCorp, FactionNames.ECorp, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechProcessor,\n repCost: 7.5e3,\n moneyCost: 5e7,\n info:\n \"A cochlear implant with an embedded computer that analyzes incoming speech. \" +\n \"The embedded computer processes characteristics of incoming speech, such as tone \" +\n \"and inflection, to pick up on subtle cues and aid in social interactions.\",\n charisma_mult: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.Silhouette,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.TITN41Injection,\n repCost: 2.5e4,\n moneyCost: 1.9e8,\n info:\n \"TITN is a series of viruses that targets and alters the sequences of human DNA in genes that \" +\n \"control personality. The TITN-41 strain alters these genes so that the subject becomes more \" +\n \"outgoing and socialable.\",\n charisma_mult: 1.15,\n charisma_exp_mult: 1.15,\n factions: [FactionNames.Silhouette],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedSocialInteractionImplant,\n repCost: 3.75e5,\n moneyCost: 1.375e9,\n info:\n \"A cranial implant that greatly assists in the user's ability to analyze social situations \" +\n \"and interactions. The system uses a wide variety of factors such as facial expressions, body \" +\n \"language, and the voice tone, and inflection to determine the best course of action during social\" +\n \"situations. The implant also uses deep learning software to continuously learn new behavior\" +\n \"patterns and how to best respond.\",\n charisma_mult: 1.6,\n charisma_exp_mult: 1.6,\n factions: [\n FactionNames.BachmanAssociates,\n FactionNames.NWO,\n FactionNames.ClarkeIncorporated,\n FactionNames.OmniTekIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.BitWire,\n repCost: 3.75e3,\n moneyCost: 1e7,\n info:\n \"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing \" +\n \"capabilities.\",\n hacking_mult: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialBioNeuralNetwork,\n repCost: 2.75e5,\n moneyCost: 3e9,\n info:\n \"A network consisting of millions of nanoprocessors is embedded into the brain. \" +\n \"The network is meant to mimic the way a biological brain solves a problem, with each \" +\n \"nanoprocessor acting similar to the way a neuron would in a neural network. However, these \" +\n \"nanoprocessors are programmed to perform computations much faster than organic neurons, \" +\n \"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 factions: [FactionNames.BitRunners, FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ArtificialSynapticPotentiation,\n repCost: 6.25e3,\n moneyCost: 8e7,\n info:\n \"The body is injected with a chemical that artificially induces synaptic potentiation, \" +\n \"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 factions: [FactionNames.TheBlackHand, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.EnhancedMyelinSheathing,\n repCost: 1e5,\n moneyCost: 1.375e9,\n info:\n \"Electrical signals are used to induce a new, artificial form of myelinogenesis in the human body. \" +\n \"This process results in the proliferation of new, synthetic myelin sheaths in the nervous \" +\n \"system. These myelin sheaths can propogate neuro-signals much faster than their organic \" +\n \"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 factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.BitRunners, FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.SynapticEnhancement,\n repCost: 2e3,\n moneyCost: 7.5e6,\n info:\n \"A small cranial implant that continuously uses weak electrical signals to stimulate the brain and \" +\n \"induce stronger synaptic activity. This improves the user's cognitive abilities.\",\n hacking_speed_mult: 1.03,\n factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralRetentionEnhancement,\n repCost: 2e4,\n moneyCost: 2.5e8,\n info:\n \"Chemical injections are used to permanently alter and strengthen the brain's neuronal \" +\n \"circuits, strengthening the ability to retain information.\",\n hacking_exp_mult: 1.25,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.DataJack,\n repCost: 1.125e5,\n moneyCost: 4.5e8,\n info:\n \"A brain implant that provides an interface for direct, wireless communication between a computer's main \" +\n \"memory and the mind. This implant allows the user to not only access a computer's memory, but also alter \" +\n \"and delete it.\",\n hacking_money_mult: 1.25,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.Chongqing,\n FactionNames.NewTokyo,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENM,\n repCost: 1.5e4,\n moneyCost: 2.5e8,\n info:\n \"A thin device embedded inside the arm containing a wireless module capable of connecting \" +\n \"to nearby networks. Once connected, the Netburner Module is capable of capturing and \" +\n \"processing all of the traffic on that network. By itself, the Embedded Netburner Module does \" +\n \"not do much, but a variety of very powerful upgrades can be installed that allow you to fully \" +\n \"control the traffic on a network.\",\n hacking_mult: 1.08,\n factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.NiteSec,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCore,\n repCost: 175e3,\n moneyCost: 2.5e9,\n info:\n \"The Core library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgrade allows the Embedded Netburner Module to generate its own data on a network.\",\n prereqs: [AugmentationNames.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 factions: [\n FactionNames.BitRunners,\n FactionNames.TheBlackHand,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV2,\n repCost: 1e6,\n moneyCost: 4.5e9,\n info:\n \"The Core V2 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to control information on \" +\n \"a network by re-routing traffic, spoofing IP addresses, and altering the data inside network \" +\n \"packets.\",\n prereqs: [AugmentationNames.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 factions: [\n FactionNames.BitRunners,\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.BladeIndustries,\n FactionNames.OmniTekIncorporated,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMCoreV3,\n repCost: 1.75e6,\n moneyCost: 7.5e9,\n info:\n \"The Core V3 library is an implant that upgrades the firmware of the Embedded Netburner Module. \" +\n \"This upgraded firmware allows the Embedded Netburner Module to seamlessly inject code into \" +\n \"any device on a network.\",\n prereqs: [AugmentationNames.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 factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMAnalyzeEngine,\n repCost: 6.25e5,\n moneyCost: 6e9,\n info:\n \"Installs the Analyze Engine for the Embedded Netburner Module, which is a CPU cluster \" +\n \"that vastly outperforms the Netburner Module's native single-core processor.\",\n prereqs: [AugmentationNames.ENM],\n hacking_speed_mult: 1.1,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ENMDMA,\n repCost: 1e6,\n moneyCost: 7e9,\n info:\n \"This implant installs a Direct Memory Access (DMA) controller into the \" +\n \"Embedded Netburner Module. This allows the Module to send and receive data \" +\n \"directly to and from the main memory of devices on a network.\",\n prereqs: [AugmentationNames.ENM],\n hacking_money_mult: 1.4,\n hacking_chance_mult: 1.2,\n factions: [\n FactionNames.ECorp,\n FactionNames.MegaCorp,\n FactionNames.FulcrumSecretTechnologies,\n FactionNames.NWO,\n FactionNames.Daedalus,\n FactionNames.TheCovenant,\n FactionNames.Illuminati,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.Neuralstimulator,\n repCost: 5e4,\n moneyCost: 3e9,\n info:\n \"A cranial implant that intelligently stimulates certain areas of the brain \" +\n \"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 factions: [\n FactionNames.TheBlackHand,\n FactionNames.Chongqing,\n FactionNames.Sector12,\n FactionNames.NewTokyo,\n FactionNames.Aevum,\n FactionNames.Ishima,\n FactionNames.Volhaven,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.NeuralAccelerator,\n repCost: 2e5,\n moneyCost: 1.75e9,\n info:\n \"A microprocessor that accelerates the processing \" +\n \"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 factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG1,\n repCost: 1e4,\n moneyCost: 7e7,\n info:\n \"The first generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n hacking_speed_mult: 1.01,\n hacking_mult: 1.05,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG2,\n repCost: 1.875e4,\n moneyCost: 1.25e8,\n info:\n \"The second generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG1],\n hacking_speed_mult: 1.02,\n hacking_chance_mult: 1.05,\n hacking_mult: 1.07,\n factions: [FactionNames.CyberSec, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG3,\n repCost: 5e4,\n moneyCost: 5.5e8,\n info:\n \"The third generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG2],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.15,\n hacking_mult: 1.09,\n factions: [FactionNames.NiteSec, FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG4,\n repCost: 1.25e5,\n moneyCost: 1.1e9,\n info:\n \"The fourth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG3],\n hacking_speed_mult: 1.02,\n hacking_money_mult: 1.2,\n hacking_grow_mult: 1.25,\n factions: [FactionNames.TheBlackHand, FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.CranialSignalProcessorsG5,\n repCost: 2.5e5,\n moneyCost: 2.25e9,\n info:\n \"The fifth generation of Cranial Signal Processors. Cranial Signal Processors \" +\n \"are a set of specialized microprocessors that are attached to \" +\n \"neurons in the brain. These chips process neural signals to quickly and automatically perform specific computations \" +\n \"so that the brain doesn't have to.\",\n prereqs: [AugmentationNames.CranialSignalProcessorsG4],\n hacking_mult: 1.3,\n hacking_money_mult: 1.25,\n hacking_grow_mult: 1.75,\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.NeuronalDensification,\n repCost: 1.875e5,\n moneyCost: 1.375e9,\n info:\n \"The brain is surgically re-engineered to have increased neuronal density \" +\n \"by decreasing the neuron gap junction. Then, the body is genetically modified \" +\n \"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 factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.NuoptimalInjectorImplant,\n repCost: 5e3,\n moneyCost: 2e7,\n info:\n \"This torso implant automatically injects nootropic supplements into \" +\n \"the bloodstream to improve memory, increase focus, and provide other \" +\n \"cognitive enhancements.\",\n company_rep_mult: 1.2,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.Volhaven,\n FactionNames.NewTokyo,\n FactionNames.Chongqing,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.SpeechEnhancement,\n repCost: 2.5e3,\n moneyCost: 1.25e7,\n info:\n \"An advanced neural implant that improves your speaking abilities, making \" +\n \"you more convincing and likable in conversations and overall improving your \" +\n \"social interactions.\",\n company_rep_mult: 1.1,\n charisma_mult: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.SpeakersForTheDead,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n FactionNames.ClarkeIncorporated,\n FactionNames.BachmanAssociates,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n FactionNames.FourSigma,\n FactionNames.KuaiGongInternational,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNI,\n repCost: 3.75e5,\n moneyCost: 3.75e9,\n info:\n \"Installs a Direct-Neural Interface jack into your arm that is compatible with most \" +\n \"computers. Connecting to a computer through this jack allows you to interface with \" +\n \"it using the brain's electrochemical signals.\",\n company_rep_mult: 1.3,\n hacking_mult: 1.08,\n factions: [\n FactionNames.FourSigma,\n FactionNames.OmniTekIncorporated,\n FactionNames.ECorp,\n FactionNames.BladeIndustries,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNIOptimizer,\n repCost: 5e5,\n moneyCost: 4.5e9,\n info:\n \"This is a submodule upgrade to the PC Direct-Neural Interface augmentation. It \" +\n \"improves the performance of the interface and gives the user more control options \" +\n \"to a connected computer.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 1.75,\n hacking_mult: 1.1,\n factions: [FactionNames.FulcrumSecretTechnologies, FactionNames.ECorp, FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.PCDNINeuralNetwork,\n repCost: 1.5e6,\n moneyCost: 7.5e9,\n info:\n \"This is an additional installation that upgrades the functionality of the \" +\n \"PC Direct-Neural Interface augmentation. When connected to a computer, \" +\n \"The Neural Network upgrade allows the user to use their own brain's \" +\n \"processing power to aid the computer in computational tasks.\",\n prereqs: [AugmentationNames.PCDNI],\n company_rep_mult: 2,\n hacking_mult: 1.1,\n hacking_speed_mult: 1.05,\n factions: [FactionNames.FulcrumSecretTechnologies],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone1,\n repCost: 3.75e3,\n moneyCost: 1.75e7,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V1 pheromone, \" +\n \"an artificial pheromone discovered by scientists. The ADR-V1 pheromone, when excreted, \" +\n \"triggers feelings of admiration and approval in other people.\",\n company_rep_mult: 1.1,\n faction_rep_mult: 1.1,\n factions: [\n FactionNames.TianDiHui,\n FactionNames.TheSyndicate,\n FactionNames.NWO,\n FactionNames.MegaCorp,\n FactionNames.FourSigma,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ADRPheromone2,\n repCost: 6.25e4,\n moneyCost: 5.5e8,\n info:\n \"The body is genetically re-engineered so that it produces the ADR-V2 pheromone, \" +\n \"which is similar to but more potent than ADR-V1. This pheromone, when excreted, \" +\n \"triggers feelings of admiration, approval, and respect in others.\",\n company_rep_mult: 1.2,\n faction_rep_mult: 1.2,\n factions: [\n FactionNames.Silhouette,\n FactionNames.FourSigma,\n FactionNames.BachmanAssociates,\n FactionNames.ClarkeIncorporated,\n ],\n }),\n new Augmentation({\n name: AugmentationNames.ShadowsSimulacrum,\n repCost: 3.75e4,\n moneyCost: 4e8,\n info:\n \"A crude but functional matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation was developed by \" +\n \"criminal organizations and allows the user to project and control holographic \" +\n \"simulacrums within a large radius. These simulacrums are commonly used for \" +\n \"espionage and surveillance work.\",\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n factions: [FactionNames.TheSyndicate, FactionNames.TheDarkArmy, FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCPUUpload,\n repCost: 3.75e3,\n moneyCost: 1.1e7,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's CPU into \" +\n \"the brain. This allows the user to engineer custom hardware and software \" +\n \"for the Hacknet Node that provides better performance.\",\n hacknet_node_money_mult: 1.15,\n hacknet_node_purchase_cost_mult: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCacheUpload,\n repCost: 2.5e3,\n moneyCost: 5.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's main-memory cache \" +\n \"into the brain. This allows the user to engineer custom cache hardware for the \" +\n \"Hacknet Node that offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_level_cost_mult: 0.85,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeNICUpload,\n repCost: 1.875e3,\n moneyCost: 4.5e6,\n info:\n \"Uploads the architecture and design details of a Hacknet Node's Network Interface Card (NIC) \" +\n \"into the brain. This allows the user to engineer a custom NIC for the Hacknet Node that \" +\n \"offers better performance.\",\n hacknet_node_money_mult: 1.1,\n hacknet_node_purchase_cost_mult: 0.9,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeKernelDNI,\n repCost: 7.5e3,\n moneyCost: 4e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting to a \" +\n \"Hacknet Node. This lets the user access and manipulate the Node's kernel using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.25,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.HacknetNodeCoreDNI,\n repCost: 1.25e4,\n moneyCost: 6e7,\n info:\n \"Installs a Direct-Neural Interface jack into the arm that is capable of connecting \" +\n \"to a Hacknet Node. This lets the user access and manipulate the Node's processing logic using \" +\n \"electrochemical signals.\",\n hacknet_node_money_mult: 1.45,\n factions: [FactionNames.Netburners],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer1,\n repCost: 1e3,\n moneyCost: 4e6,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. It is \" +\n \"installed by releasing millions of nanobots into the human brain, each of which \" +\n \"attaches to a different neural pathway to enhance the brain's ability to retain \" +\n \"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 factions: [FactionNames.CyberSec, FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer2,\n repCost: 1e4,\n moneyCost: 4.5e7,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I augmentation, but it does not \" +\n \"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 factions: [FactionNames.BitRunners, FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neurotrainer3,\n repCost: 2.5e4,\n moneyCost: 1.3e8,\n info:\n \"A decentralized cranial implant that improves the brain's ability to learn. This \" +\n \"is a more powerful version of the Neurotrainer I and Neurotrainer II augmentation, \" +\n \"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 factions: [FactionNames.NWO, FactionNames.FourSigma],\n }),\n new Augmentation({\n name: AugmentationNames.Hypersight,\n repCost: 1.5e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic eye implant that grants sight capabilities far beyond those of a natural human. \" +\n \"Embedded circuitry within the implant provides the ability to detect heat and movement \" +\n \"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 factions: [FactionNames.BladeIndustries, FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking1,\n repCost: 1.5e3,\n moneyCost: 5e6,\n info:\n \"A skin implant that reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, have a negative refractive index. As a result, they bend light \" +\n \"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 factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.LuminCloaking2,\n repCost: 5e3,\n moneyCost: 3e7,\n info:\n \"This is a more advanced version of the LuminCloaking-V1 augmentation. This skin implant \" +\n \"reinforces the skin with highly-advanced synthetic cells. These \" +\n \"cells, when powered, are capable of not only bending light but also of bending heat, \" +\n \"making the user more resilient as well as stealthy.\",\n prereqs: [AugmentationNames.LuminCloaking1],\n agility_mult: 1.1,\n defense_mult: 1.1,\n crime_money_mult: 1.25,\n factions: [FactionNames.SlumSnakes, FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.SlumSnakes],\n }),\n new Augmentation({\n name: AugmentationNames.PowerRecirculator,\n repCost: 2.5e4,\n moneyCost: 1.8e8,\n info:\n \"The body's nerves are attached with polypyrrole nanocircuits that \" +\n \"are capable of capturing wasted energy, in the form of heat, \" +\n \"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 factions: [FactionNames.Tetrads, FactionNames.TheDarkArmy, FactionNames.TheSyndicate, FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.QLink,\n repCost: 1.875e6,\n moneyCost: 2.5e13,\n info:\n `A brain implant that wirelessly connects you to the ${FactionNames.Illuminati}'s ` +\n \"quantum supercomputer, allowing you to access and use its incredible \" +\n \"computing power.\",\n hacking_mult: 1.75,\n hacking_speed_mult: 2,\n hacking_chance_mult: 2.5,\n hacking_money_mult: 4,\n factions: [FactionNames.Illuminati],\n }),\n new Augmentation({\n name: AugmentationNames.SPTN97,\n repCost: 1.25e6,\n moneyCost: 4.875e9,\n info:\n \"The SPTN-97 gene is injected into the genome. The SPTN-97 gene is an \" +\n \"artificially-synthesized gene that was developed by DARPA to create \" +\n \"super-soldiers through genetic modification. The gene was outlawed in \" +\n \"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 factions: [FactionNames.TheCovenant],\n }),\n new Augmentation({\n name: AugmentationNames.HiveMind,\n repCost: 1.5e6,\n moneyCost: 5.5e9,\n info:\n `A brain implant developed by ${FactionNames.ECorp}. They do not reveal what ` +\n \"exactly the implant does, but they promise that it will greatly \" +\n \"enhance your abilities.\",\n hacking_grow_mult: 3,\n stats: null,\n factions: [FactionNames.ECorp],\n }),\n new Augmentation({\n name: AugmentationNames.TheRedPill,\n repCost: 2.5e6,\n moneyCost: 0,\n info: \"It's time to leave the cave.\",\n stats: null,\n factions: [FactionNames.Daedalus],\n }),\n new Augmentation({\n name: AugmentationNames.CordiARCReactor,\n repCost: 1.125e6,\n moneyCost: 5e9,\n info:\n \"The thoracic cavity is equipped with a small chamber designed \" +\n \"to hold and sustain hydrogen plasma. The plasma is used to generate \" +\n \"fusion power through nuclear fusion, providing limitless amounts of clean \" +\n \"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 factions: [FactionNames.MegaCorp],\n }),\n new Augmentation({\n name: AugmentationNames.SmartJaw,\n repCost: 3.75e5,\n moneyCost: 2.75e9,\n info:\n \"A bionic jaw that contains advanced hardware and software \" +\n \"capable of psychoanalyzing and profiling the personality of \" +\n \"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 factions: [FactionNames.BachmanAssociates],\n }),\n new Augmentation({\n name: AugmentationNames.Neotra,\n repCost: 5.625e5,\n moneyCost: 2.875e9,\n info:\n \"A highly-advanced techno-organic drug that is injected into the skeletal \" +\n \"and integumentary system. The drug permanently modifies the DNA of the \" +\n \"body's skin and bone cells, granting them the ability to repair \" +\n \"and restructure themselves.\",\n strength_mult: 1.55,\n defense_mult: 1.55,\n factions: [FactionNames.BladeIndustries],\n }),\n new Augmentation({\n name: AugmentationNames.Xanipher,\n repCost: 8.75e5,\n moneyCost: 4.25e9,\n info:\n \"A concoction of advanced nanobots that is orally ingested into the \" +\n \"body. These nanobots induce physiological changes and significantly \" +\n \"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 factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.HydroflameLeftArm,\n repCost: 1.25e6,\n moneyCost: 2.5e12,\n info:\n \"The left arm of a legendary BitRunner who ascended beyond this world. \" +\n \"It projects a light blue energy shield that protects the exposed inner parts. \" +\n \"Even though it contains no weapons, the advanced tungsten titanium \" +\n \"alloy increases the user's strength to unbelievable levels. The augmentation \" +\n \"gets more powerful over time for seemingly no reason.\",\n strength_mult: 2.7,\n factions: [FactionNames.NWO],\n }),\n new Augmentation({\n name: AugmentationNames.nextSENS,\n repCost: 4.375e5,\n moneyCost: 1.925e9,\n info:\n \"The body is genetically re-engineered to maintain a state \" +\n \"of negligible senescence, preventing the body from \" +\n \"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 factions: [FactionNames.ClarkeIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.OmniTekInfoLoad,\n repCost: 6.25e5,\n moneyCost: 2.875e9,\n info:\n \"OmniTek's data and information repository is uploaded \" +\n \"into your brain, enhancing your programming and \" +\n \"hacking abilities.\",\n hacking_mult: 1.2,\n hacking_exp_mult: 1.25,\n factions: [FactionNames.OmniTekIncorporated],\n }),\n new Augmentation({\n name: AugmentationNames.PhotosyntheticCells,\n repCost: 5.625e5,\n moneyCost: 2.75e9,\n info:\n \"Chloroplasts are added to epidermal stem cells and are applied \" +\n \"to the body using a skin graft. The result is photosynthetic \" +\n \"skin cells, allowing users to generate their own energy \" +\n \"and nutrition using solar power.\",\n strength_mult: 1.4,\n defense_mult: 1.4,\n agility_mult: 1.4,\n factions: [FactionNames.KuaiGongInternational],\n }),\n new Augmentation({\n name: AugmentationNames.Neurolink,\n repCost: 8.75e5,\n moneyCost: 4.375e9,\n info:\n \"A brain implant that provides a high-bandwidth, direct neural link between your \" +\n `mind and the ${FactionNames.BitRunners}' data servers, which reportedly contain ` +\n \"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.FTPCrackProgram.name, Programs.RelaySMTPProgram.name],\n factions: [FactionNames.BitRunners],\n }),\n new Augmentation({\n name: AugmentationNames.TheBlackHand,\n repCost: 1e5,\n moneyCost: 5.5e8,\n info:\n \"A highly advanced bionic hand. This prosthetic not only \" +\n \"enhances strength and dexterity but it is also embedded \" +\n \"with hardware and firmware that lets the user connect to, access, and hack \" +\n \"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 factions: [FactionNames.TheBlackHand],\n }),\n new Augmentation({\n name: AugmentationNames.CRTX42AA,\n repCost: 4.5e4,\n moneyCost: 2.25e8,\n info:\n \"The CRTX42-AA gene is injected into the genome. \" +\n \"The CRTX42-AA is an artificially-synthesized gene that targets the visual and prefrontal \" +\n \"cortex and improves cognitive abilities.\",\n hacking_mult: 1.08,\n hacking_exp_mult: 1.15,\n factions: [FactionNames.NiteSec],\n }),\n new Augmentation({\n name: AugmentationNames.Neuregen,\n repCost: 3.75e4,\n moneyCost: 3.75e8,\n info:\n \"A drug that genetically modifies the neurons in the brain \" +\n \"resulting in neurons that never die, continuously \" +\n \"regenerate, and strengthen themselves.\",\n hacking_exp_mult: 1.4,\n factions: [FactionNames.Chongqing],\n }),\n new Augmentation({\n name: AugmentationNames.CashRoot,\n repCost: 1.25e4,\n moneyCost: 1.25e8,\n info: (\n <>\n A collection of digital assets saved on a small chip. The chip is implanted into your wrist. A small jack in the\n chip allows you to connect it to a computer and upload the assets.\n \n ),\n startingMoney: 1e6,\n programs: [Programs.BruteSSHProgram.name],\n factions: [FactionNames.Sector12],\n }),\n new Augmentation({\n name: AugmentationNames.NutriGen,\n repCost: 6.25e3,\n moneyCost: 2.5e6,\n info:\n \"A thermo-powered artificial nutrition generator. Endogenously \" +\n \"synthesizes glucose, amino acids, and vitamins and redistributes them \" +\n \"across the body. The device is powered by the body's naturally wasted \" +\n \"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 factions: [FactionNames.NewTokyo],\n }),\n new Augmentation({\n name: AugmentationNames.PCMatrix,\n repCost: 100e3,\n moneyCost: 2e9,\n info:\n \"A 'Probability Computation Matrix' is installed in the frontal cortex. This implant \" +\n \"uses advanced mathematical algorithims to rapidly identify and compute statistical \" +\n \"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.DeepscanV1.name, Programs.AutoLink.name],\n factions: [FactionNames.Aevum],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.Ishima],\n }),\n new Augmentation({\n name: AugmentationNames.DermaForce,\n repCost: 1.5e4,\n moneyCost: 5e7,\n info:\n \"Synthetic skin that is grafted onto the body. This skin consists of \" +\n \"millions of nanobots capable of projecting high-density muon beams, \" +\n \"creating an energy barrier around the user.\",\n defense_mult: 1.4,\n factions: [FactionNames.Volhaven],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBrachiBlades,\n repCost: 2.25e5,\n moneyCost: 2.5e9,\n info:\n \"An upgrade to the BrachiBlades augmentation. It infuses \" +\n \"the retractable blades with an advanced graphene material \" +\n \"making them stronger and lighter.\",\n prereqs: [AugmentationNames.BrachiBlades],\n strength_mult: 1.4,\n defense_mult: 1.4,\n crime_success_mult: 1.1,\n crime_money_mult: 1.3,\n factions: [FactionNames.SpeakersForTheDead],\n }),\n new Augmentation({\n name: AugmentationNames.GrapheneBionicArms,\n repCost: 5e5,\n moneyCost: 3.75e9,\n info:\n \"An upgrade to the Bionic Arms augmentation. It infuses the \" +\n \"prosthetic arms with an advanced graphene material \" +\n \"to make them stronger and lighter.\",\n prereqs: [AugmentationNames.BionicArms],\n strength_mult: 1.85,\n dexterity_mult: 1.85,\n factions: [FactionNames.TheDarkArmy],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.TheSyndicate],\n }),\n new Augmentation({\n name: AugmentationNames.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 factions: [FactionNames.Tetrads],\n }),\n new Augmentation({\n name: AugmentationNames.SNA,\n repCost: 6.25e3,\n moneyCost: 3e7,\n info:\n \"A cranial implant that affects the user's personality, making them better \" +\n \"at negotiation in social situations.\",\n work_money_mult: 1.1,\n company_rep_mult: 1.15,\n faction_rep_mult: 1.15,\n factions: [FactionNames.TianDiHui],\n }),\n new Augmentation({\n name: AugmentationNames.NeuroreceptorManager,\n repCost: 0.75e5,\n moneyCost: 5.5e8,\n info:\n \"A brain implant carefully assembled around the synapses, which \" +\n \"micromanages the activity and levels of various neuroreceptor \" +\n \"chemicals and modulates electrical activity to optimize concentration, \" +\n \"allowing the user to multitask much more effectively.\",\n stats: (\n <>\n This augmentation removes the penalty for not focusing on actions such as working in a job or working for a\n faction.\n \n ),\n factions: [FactionNames.TianDiHui],\n }),\n];\n\nexport const bladeburnerAugmentations = [\n new Augmentation({\n name: AugmentationNames.EsperEyewear,\n repCost: 1.25e3,\n moneyCost: 1.65e8,\n info:\n \"Ballistic-grade protective and retractable eyewear that was designed specifically \" +\n \"for Bladeburner units. This \" +\n \"is implanted by installing a mechanical frame in the skull's orbit. \" +\n \"This frame interfaces with the brain and allows the user to \" +\n \"automatically extrude and extract the eyewear. The eyewear protects \" +\n \"against debris, shrapnel, lasers, blinding flashes, and gas. It is also \" +\n \"embedded with a data processing chip that can be programmed to display an \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.EMS4Recombination,\n repCost: 2.5e3,\n moneyCost: 2.75e8,\n info:\n \"A DNA recombination of the EMS-4 Gene. This genetic engineering \" +\n \"technique was originally used on Bladeburners during the Synthoid uprising \" +\n \"to induce wakefulness and concentration, suppress fear, reduce empathy, \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.OrionShoulder,\n repCost: 6.25e3,\n moneyCost: 5.5e8,\n info:\n \"A bionic shoulder augmentation for the right shoulder. Using cybernetics, \" +\n \"the ORION-MKIV shoulder enhances the strength and dexterity \" +\n \"of the user's right arm. It also provides protection due to its \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV1,\n repCost: 1.25e4,\n moneyCost: 2.75e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. The Hyperion is capable \" +\n \"of rapidly firing bolts of high-density plasma. The weapon is meant to \" +\n \"be used against augmented enemies as the ionized \" +\n \"nature of the plasma disrupts the electrical systems of Augmentations. However, \" +\n \"it can also be effective against non-augmented enemies due to its high temperature \" +\n \"and concussive force.\",\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.HyperionV2,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"A pair of mini plasma cannons embedded into the hands. This augmentation \" +\n \"is more advanced and powerful than the original V1 model. This V2 model is \" +\n \"more power-efficient, more accurate, and can fire plasma bolts at a much \" +\n \"higher velocity than the V1 model.\",\n prereqs: [AugmentationNames.HyperionV1],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.GolemSerum,\n repCost: 3.125e4,\n moneyCost: 1.1e10,\n info:\n \"A serum that permanently enhances many aspects of human capabilities, \" +\n \"including strength, speed, immune system enhancements, and mitochondrial efficiency. The \" +\n \"serum was originally developed by the Chinese military in an attempt to \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"A synthetic symbiotic virus that is injected into human brain tissue. The Vangelis virus \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.VangelisVirus3,\n repCost: 3.75e4,\n moneyCost: 1.1e10,\n info:\n \"An improved version of Vangelis, a synthetic symbiotic virus that is \" +\n \"injected into human brain tissue. On top of the benefits of the original \" +\n \"virus, this also grants an accelerated healing factor and enhanced \" +\n \"reflexes.\",\n prereqs: [AugmentationNames.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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.INTERLINKED,\n repCost: 2.5e4,\n moneyCost: 5.5e9,\n info:\n \"The DNA is genetically modified to enhance the human's body \" +\n \"extracellular matrix (ECM). This improves the ECM's ability to \" +\n \"structurally support the body and grants heightened strength and \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeRunner,\n repCost: 2e4,\n moneyCost: 8.25e9,\n info:\n `A cybernetic foot augmentation that was specifically created for ${FactionNames.Bladeburners} ` +\n \"during the Synthoid Uprising. The organic musculature of the human foot \" +\n \"is enhanced with flexible carbon nanotube matrices that are controlled by \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmor,\n repCost: 1.25e4,\n moneyCost: 1.375e9,\n info:\n `A powered exoskeleton suit designed as armor for ${FactionNames.Bladeburners} units. This ` +\n \"exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, \" +\n \"concussive, thermal, chemical, and electric trauma. It also enhances the user's \" +\n \"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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorPowerCells,\n repCost: 1.875e4,\n moneyCost: 2.75e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of \" +\n \"more efficiently storing and using power.\",\n prereqs: [AugmentationNames.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 factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorEnergyShielding,\n repCost: 2.125e4,\n moneyCost: 5.5e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system \" +\n \"that is capable of projecting an energy shielding force field.\",\n prereqs: [AugmentationNames.BladeArmor],\n defense_mult: 1.05,\n bladeburner_success_chance_mult: 1.06,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorUnibeam,\n repCost: 3.125e4,\n moneyCost: 1.65e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser \" +\n \"weapon. It's precision and accuracy makes it useful for quickly neutralizing \" +\n \"threats while keeping casualties to a minimum.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_success_chance_mult: 1.08,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorOmnibeam,\n repCost: 6.25e4,\n moneyCost: 2.75e10,\n info:\n \"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use a \" +\n \"multiple-fiber system. This upgraded weapon uses multiple fiber laser \" +\n \"modules that combine together to form a single, more powerful beam of up to \" +\n \"2000MW.\",\n prereqs: [AugmentationNames.BladeArmorUnibeam],\n bladeburner_success_chance_mult: 1.1,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladeArmorIPU,\n repCost: 1.5e4,\n moneyCost: 1.1e9,\n info:\n \"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing \" +\n \"Unit that was specially designed to analyze Synthoid related data and \" +\n \"information.\",\n prereqs: [AugmentationNames.BladeArmor],\n bladeburner_analysis_mult: 1.15,\n bladeburner_success_chance_mult: 1.02,\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n new Augmentation({\n name: AugmentationNames.BladesSimulacrum,\n repCost: 1.25e3,\n moneyCost: 1.5e11,\n info:\n \"A highly-advanced matter phase-shifter module that is embedded \" +\n \"in the brainstem and cerebellum. This augmentation allows \" +\n \"the user to project and control a holographic simulacrum within an \" +\n \"extremely large radius. These specially-modified holograms were specifically \" +\n \"weaponized by Bladeburner units to be used against Synthoids.\",\n stats: (\n <>\n This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting\n crimes, etc.) at the same time.\n \n ),\n isSpecial: true,\n factions: [FactionNames.Bladeburners],\n }),\n];\n\nexport const churchOfTheMachineGodAugmentations = [\n new Augmentation({\n name: AugmentationNames.StaneksGift1,\n repCost: 0,\n moneyCost: 0,\n info:\n 'Allison \"Mother\" Stanek imparts you with her gift. An ' +\n \"experimental Augmentation implanted at the base of the neck. \" +\n \"It allows you to overclock your entire system by carefully \" +\n \"changing the configuration.\",\n isSpecial: true,\n hacking_chance_mult: 0.9,\n hacking_speed_mult: 0.9,\n hacking_money_mult: 0.9,\n hacking_grow_mult: 0.9,\n hacking_mult: 0.9,\n strength_mult: 0.9,\n defense_mult: 0.9,\n dexterity_mult: 0.9,\n agility_mult: 0.9,\n charisma_mult: 0.9,\n hacking_exp_mult: 0.9,\n strength_exp_mult: 0.9,\n defense_exp_mult: 0.9,\n dexterity_exp_mult: 0.9,\n agility_exp_mult: 0.9,\n charisma_exp_mult: 0.9,\n company_rep_mult: 0.9,\n faction_rep_mult: 0.9,\n crime_money_mult: 0.9,\n crime_success_mult: 0.9,\n hacknet_node_money_mult: 0.9,\n hacknet_node_purchase_cost_mult: 1.1,\n hacknet_node_ram_cost_mult: 1.1,\n hacknet_node_core_cost_mult: 1.1,\n hacknet_node_level_cost_mult: 1.1,\n work_money_mult: 0.9,\n stats: <>Its unstable nature decreases all your stats by 10%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift2,\n repCost: 1e6,\n moneyCost: 0,\n info:\n \"The next evolution is near, a coming together of man and machine. A synthesis greater than the birth of the human \" +\n \"organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon \" +\n \"your frame granting lesser penalty of 5% to all stats.\",\n prereqs: [AugmentationNames.StaneksGift1],\n isSpecial: true,\n hacking_chance_mult: 0.95 / 0.9,\n hacking_speed_mult: 0.95 / 0.9,\n hacking_money_mult: 0.95 / 0.9,\n hacking_grow_mult: 0.95 / 0.9,\n hacking_mult: 0.95 / 0.9,\n strength_mult: 0.95 / 0.9,\n defense_mult: 0.95 / 0.9,\n dexterity_mult: 0.95 / 0.9,\n agility_mult: 0.95 / 0.9,\n charisma_mult: 0.95 / 0.9,\n hacking_exp_mult: 0.95 / 0.9,\n strength_exp_mult: 0.95 / 0.9,\n defense_exp_mult: 0.95 / 0.9,\n dexterity_exp_mult: 0.95 / 0.9,\n agility_exp_mult: 0.95 / 0.9,\n charisma_exp_mult: 0.95 / 0.9,\n company_rep_mult: 0.95 / 0.9,\n faction_rep_mult: 0.95 / 0.9,\n crime_money_mult: 0.95 / 0.9,\n crime_success_mult: 0.95 / 0.9,\n hacknet_node_money_mult: 0.95 / 0.9,\n hacknet_node_purchase_cost_mult: 1.05 / 1.1,\n hacknet_node_ram_cost_mult: 1.05 / 1.1,\n hacknet_node_core_cost_mult: 1.05 / 1.1,\n hacknet_node_level_cost_mult: 1.05 / 1.1,\n work_money_mult: 0.95 / 0.9,\n stats: <>The penalty for the gift is reduced to 5%,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n new Augmentation({\n name: AugmentationNames.StaneksGift3,\n repCost: 1e8,\n moneyCost: 0,\n info:\n \"The synthesis of human and machine is nothing to fear. It is our destiny. \" +\n \"You will become greater than the sum of our parts. As One. Embrace your gift \" +\n \"fully and wholly free of it's accursed toll. Serenity brings tranquility the form \" +\n \"of no longer suffering a stat penalty. \",\n prereqs: [AugmentationNames.StaneksGift2],\n isSpecial: true,\n hacking_chance_mult: 1 / 0.95,\n hacking_speed_mult: 1 / 0.95,\n hacking_money_mult: 1 / 0.95,\n hacking_grow_mult: 1 / 0.95,\n hacking_mult: 1 / 0.95,\n strength_mult: 1 / 0.95,\n defense_mult: 1 / 0.95,\n dexterity_mult: 1 / 0.95,\n agility_mult: 1 / 0.95,\n charisma_mult: 1 / 0.95,\n hacking_exp_mult: 1 / 0.95,\n strength_exp_mult: 1 / 0.95,\n defense_exp_mult: 1 / 0.95,\n dexterity_exp_mult: 1 / 0.95,\n agility_exp_mult: 1 / 0.95,\n charisma_exp_mult: 1 / 0.95,\n company_rep_mult: 1 / 0.95,\n faction_rep_mult: 1 / 0.95,\n crime_money_mult: 1 / 0.95,\n crime_success_mult: 1 / 0.95,\n hacknet_node_money_mult: 1 / 0.95,\n hacknet_node_purchase_cost_mult: 1 / 1.05,\n hacknet_node_ram_cost_mult: 1 / 1.05,\n hacknet_node_core_cost_mult: 1 / 1.05,\n hacknet_node_level_cost_mult: 1 / 1.05,\n work_money_mult: 1 / 0.95,\n stats: <>Stanek's Gift has no penalty.,\n factions: [FactionNames.ChurchOfTheMachineGod],\n }),\n];\n\nexport function initNeuroFluxGovernor(): Augmentation {\n return new Augmentation({\n name: AugmentationNames.NeuroFluxGovernor,\n repCost: 500,\n moneyCost: 750e3,\n info:\n \"A device that is embedded in the back of the neck. The NeuroFlux Governor \" +\n \"monitors and regulates nervous impulses coming to and from the spinal column, \" +\n \"essentially 'governing' the body. By doing so, it improves the functionality of the \" +\n \"body's nervous system.\",\n stats: (\n <>\n This special augmentation can be leveled up infinitely. Each level of this augmentation increases MOST\n multipliers by 1%, stacking multiplicatively.\n \n ),\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 factions: Object.values(FactionNames),\n });\n}\n\nexport function initUnstableCircadianModulator(): Augmentation {\n //Time-Based Augment Test\n const randomBonuses = getRandomBonus();\n\n const UnstableCircadianModulatorParams: IConstructorParams = {\n name: AugmentationNames.UnstableCircadianModulator,\n moneyCost: 5e9,\n repCost: 3.625e5,\n info:\n \"An experimental nanobot injection. Its unstable nature leads to \" +\n \"unpredictable results based on your circadian rhythm.\",\n factions: [FactionNames.SpeakersForTheDead],\n };\n Object.keys(randomBonuses.bonuses).forEach(\n (key) => ((UnstableCircadianModulatorParams as any)[key] = randomBonuses.bonuses[key]),\n );\n\n return new Augmentation(UnstableCircadianModulatorParams);\n}\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 */\nimport * as walk from \"acorn-walk\";\nimport acorn, { parse } from \"acorn\";\n\nimport { RamCalculationErrorCode } from \"./RamCalculationErrorCodes\";\n\nimport { RamCosts, RamCostConstants } from \"../Netscript/RamCostGenerator\";\nimport { Script } from \"./Script\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { areImportsEquals } from \"../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\nexport interface RamUsageEntry {\n type: 'ns' | 'dom' | 'fn' | 'misc';\n name: string;\n cost: number;\n}\n\nexport interface RamCalculation {\n cost: number;\n entries?: RamUsageEntry[];\n}\n\n// These special strings are used to reference the presence of a given logical\n// construct within a user script.\nconst specialReferenceIF = \"__SPECIAL_referenceIf\";\nconst specialReferenceFOR = \"__SPECIAL_referenceFor\";\nconst specialReferenceWHILE = \"__SPECIAL_referenceWhile\";\n\n// The global scope of a script is registered under this key during parsing.\nconst memCheckGlobalKey = \".__GLOBAL__\";\n\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 */\nasync function parseOnlyRamCalculate(\n player: IPlayer,\n otherScripts: Script[],\n code: string,\n workerScript: WorkerScript,\n): Promise {\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: { [key: string]: string[] } = {};\n\n // Scripts we've parsed.\n const completedParses = new Set();\n\n // Scripts we've discovered that need to be parsed.\n const parseQueue: string[] = [];\n\n // Parses a chunk of code with a given module name, and updates parseQueue and dependencyMap.\n function parseCode(code: string, moduleName: string): void {\n const result = parseOnlyCalculateDeps(code, moduleName);\n completedParses.add(moduleName);\n\n // Add any additional modules to the parse queue;\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 }\n\n // Splice all the references in\n dependencyMap = Object.assign(dependencyMap, result.dependencyMap);\n }\n\n // Parse the initial module, which is the \"main\" script that is being run\n const initialModule = \"__SPECIAL_INITIAL_MODULE__\";\n parseCode(code, initialModule);\n\n // Process additional modules, which occurs if the \"main\" script has any imports\n while (parseQueue.length > 0) {\n const nextModule = parseQueue.shift();\n if (nextModule === undefined) throw new Error(\"nextModule should not be undefined\");\n\n // 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 let code;\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 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 { cost: RamCalculationErrorCode.URLImportError };\n }\n } else {\n if (!Array.isArray(otherScripts)) {\n console.warn(`parseOnlyRamCalculate() not called with array of scripts`);\n return { cost: RamCalculationErrorCode.ImportError };\n }\n\n let script = null;\n const fn = nextModule.startsWith(\"./\") ? nextModule.slice(2) : nextModule;\n for (const s of otherScripts) {\n if (areImportsEquals(s.filename, fn)) {\n script = s;\n break;\n }\n }\n\n if (script == null) {\n return { cost: RamCalculationErrorCode.ImportError }; // No such script on the server\n }\n\n code = script.code;\n }\n\n parseCode(code, nextModule);\n }\n\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 let ram = RamCostConstants.ScriptBaseRamCost;\n const detailedCosts: RamUsageEntry[] = [{ type: 'misc', name: 'baseCost', cost: RamCostConstants.ScriptBaseRamCost}];\n const unresolvedRefs = Object.keys(dependencyMap).filter((s) => s.startsWith(initialModule));\n const resolvedRefs = new Set();\n while (unresolvedRefs.length > 0) {\n const ref = unresolvedRefs.shift();\n if (ref === undefined) throw new Error(\"ref should not be undefined\");\n\n // Check if this is one of the special keys, and add the appropriate ram cost if so.\n if (ref === \"hacknet\" && !resolvedRefs.has(\"hacknet\")) {\n ram += RamCostConstants.ScriptHacknetNodesRamCost;\n detailedCosts.push({ type: 'ns', name: 'hacknet', cost: RamCostConstants.ScriptHacknetNodesRamCost});\n }\n if (ref === \"document\" && !resolvedRefs.has(\"document\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: 'dom', name: 'document', cost: RamCostConstants.ScriptDomRamCost});\n }\n if (ref === \"window\" && !resolvedRefs.has(\"window\")) {\n ram += RamCostConstants.ScriptDomRamCost;\n detailedCosts.push({ type: 'dom', name: 'window', cost: RamCostConstants.ScriptDomRamCost});\n }\n if (ref === \"corporation\" && !resolvedRefs.has(\"corporation\")) {\n ram += RamCostConstants.ScriptCorporationRamCost;\n detailedCosts.push({ type: 'ns', name: 'corporation', cost: RamCostConstants.ScriptCorporationRamCost});\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 for (const ident of Object.keys(dependencyMap).filter((k) => k.startsWith(prefix))) {\n for (const 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 (const dep of dependencyMap[ref] || []) {\n if (!resolvedRefs.has(dep)) unresolvedRefs.push(dep);\n }\n }\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 try {\n function applyFuncRam(cost: any): number {\n if (typeof cost === \"number\") {\n return cost;\n } else if (typeof cost === \"function\") {\n return cost(player);\n } else {\n return 0;\n }\n }\n\n // Only count each function once\n if (workerScript.loadedFns[ref]) {\n continue;\n } else {\n workerScript.loadedFns[ref] = true;\n }\n\n // This accounts for namespaces (Bladeburner, CodingCpntract, etc.)\n let func;\n let refDetail = 'n/a';\n if (ref in workerScript.env.vars.bladeburner) {\n func = workerScript.env.vars.bladeburner[ref];\n refDetail = `bladeburner.${ref}`;\n } else if (ref in workerScript.env.vars.codingcontract) {\n func = workerScript.env.vars.codingcontract[ref];\n refDetail = `codingcontract.${ref}`;\n } else if (ref in workerScript.env.vars.stanek) {\n func = workerScript.env.vars.stanek[ref];\n refDetail = `stanek.${ref}`;\n } else if (ref in workerScript.env.vars.gang) {\n func = workerScript.env.vars.gang[ref];\n refDetail = `gang.${ref}`;\n } else if (ref in workerScript.env.vars.sleeve) {\n func = workerScript.env.vars.sleeve[ref];\n refDetail = `sleeve.${ref}`;\n } else if (ref in workerScript.env.vars.stock) {\n func = workerScript.env.vars.stock[ref];\n refDetail = `stock.${ref}`;\n } else if (ref in workerScript.env.vars.ui) {\n func = workerScript.env.vars.ui[ref];\n refDetail = `ui.${ref}`;\n } else if (ref in workerScript.env.vars.grafting) {\n func = workerScript.env.vars.grafting[ref];\n refDetail = `grafting.${ref}`;\n } else {\n func = workerScript.env.vars[ref];\n refDetail = `${ref}`;\n }\n const fnRam = applyFuncRam(func);\n ram += fnRam;\n detailedCosts.push({ type: 'fn', name: refDetail, cost: fnRam});\n } catch (error) {\n continue;\n }\n }\n return { cost: ram, entries: detailedCosts.filter(e => e.cost > 0) };\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 { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n\nexport function checkInfiniteLoop(code: string): number {\n const ast = parse(code, { sourceType: \"module\", ecmaVersion: \"latest\" });\n\n function nodeHasTrueTest(node: acorn.Node): boolean {\n return node.type === \"Literal\" && (node as any).raw === \"true\";\n }\n\n function hasAwait(ast: acorn.Node): boolean {\n let hasAwait = false;\n walk.recursive(\n ast,\n {},\n {\n AwaitExpression: () => {\n hasAwait = true;\n },\n },\n );\n return hasAwait;\n }\n\n let missingAwaitLine = -1;\n walk.recursive(\n ast,\n {},\n {\n WhileStatement: (node: acorn.Node, st: any, walkDeeper: walk.WalkerCallback) => {\n if (nodeHasTrueTest((node as any).test) && !hasAwait(node)) {\n missingAwaitLine = (code.slice(0, node.start).match(/\\n/g) || []).length + 1;\n } else {\n (node as any).body && walkDeeper((node as any).body, st);\n }\n },\n },\n );\n\n return missingAwaitLine;\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 */\nfunction parseOnlyCalculateDeps(code: string, currentModule: string): any {\n const ast = parse(code, { sourceType: \"module\", 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 const globalKey = currentModule + memCheckGlobalKey;\n const dependencyMap: { [key: string]: Set | undefined } = {};\n dependencyMap[globalKey] = new Set();\n\n // If we reference this internal name, we're really referencing that external name.\n // Filled when we import names from other modules.\n const internalToExternal: { [key: string]: string | undefined } = {};\n\n const additionalModules: string[] = [];\n\n // References get added pessimistically. They are added for thisModule.name, name, and for\n // any aliases.\n function addRef(key: string, name: string): void {\n const s = dependencyMap[key] || (dependencyMap[key] = new Set());\n const external = internalToExternal[name];\n if (external !== undefined) {\n s.add(external);\n }\n s.add(currentModule + \".\" + name);\n s.add(name); // For builtins like hack.\n }\n\n //A list of identifiers that resolve to \"native Javascript code\"\n const objectPrototypeProperties = Object.getOwnPropertyNames(Object.prototype);\n\n // 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 function commonVisitors(): any {\n return {\n Identifier: (node: any, st: any) => {\n if (objectPrototypeProperties.includes(node.name)) {\n return;\n }\n addRef(st.key, node.name);\n },\n WhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n DoWhileStatement: (node: any, st: any, walkDeeper: any) => {\n addRef(st.key, specialReferenceWHILE);\n node.test && walkDeeper(node.test, st);\n node.body && walkDeeper(node.body, st);\n },\n ForStatement: (node: any, st: any, walkDeeper: any) => {\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: any, st: any, walkDeeper: any) => {\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: any, st: any, walkDeeper: any) => {\n node.object && walkDeeper(node.object, st);\n node.property && walkDeeper(node.property, st);\n },\n };\n }\n\n walk.recursive(\n ast,\n { key: globalKey },\n Object.assign(\n {\n ImportDeclaration: (node: any, st: any) => {\n const importModuleName = node.source.value;\n additionalModules.push(importModuleName);\n\n // This module's global scope refers to that module's global scope, no matter how we\n // import it.\n const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + memCheckGlobalKey);\n\n for (let i = 0; i < node.specifiers.length; ++i) {\n const spec = node.specifiers[i];\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 const set = dependencyMap[st.key];\n if (set === undefined) throw new Error(\"set should not be undefined\");\n set.add(importModuleName + \".*\");\n }\n }\n },\n FunctionDeclaration: (node: any) => {\n // node.id will be null when using 'export default'. Add a module name indicating the default export.\n const key = currentModule + \".\" + (node.id === null ? \"__SPECIAL_DEFAULT_EXPORT__\" : node.id.name);\n walk.recursive(node, { key: key }, commonVisitors());\n },\n },\n commonVisitors(),\n ),\n );\n\n return { dependencyMap: dependencyMap, 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 */\nexport async function calculateRamUsage(\n player: IPlayer,\n codeCopy: string,\n otherScripts: Script[],\n): Promise {\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: RamCosts,\n },\n } as WorkerScript;\n\n try {\n return await parseOnlyRamCalculate(player, otherScripts, codeCopy, workerScript);\n } catch (e) {\n console.error(`Failed to parse script for RAM calculations:`);\n console.error(e);\n return { cost: RamCalculationErrorCode.SyntaxError };\n }\n}\n","/**\n * Rounds a number to two decimal places.\n * @param decimal A decimal value to trim to two places.\n */\nexport function roundToTwo(decimal: number): number {\n const leftShift: number = Math.round(parseFloat(`${decimal}e+2`));\n\n return +`${leftShift}e-2`;\n}\n","/**\n * TODO\n * Add police clashes\n * balance point to keep them from running out of control\n */\n\nimport { Faction } from \"../Faction/Faction\";\nimport { Factions } from \"../Faction/Factions\";\n\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\n\nimport { exceptionAlert } from \"../utils/helpers/exceptionAlert\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangConstants } from \"./data/Constants\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { IAscensionResult } from \"./IAscensionResult\";\n\nimport { AllGangs } from \"./AllGangs\";\nimport { GangMember } from \"./GangMember\";\n\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { PowerMultiplier } from \"./data/power\";\nimport { IGang } from \"./IGang\";\n\nexport class Gang implements IGang {\n facName: string;\n members: GangMember[];\n wanted: number;\n respect: number;\n\n isHackingGang: boolean;\n\n respectGainRate: number;\n wantedGainRate: number;\n moneyGainRate: number;\n\n storedCycles: number;\n\n storedTerritoryAndPowerCycles: number;\n\n territoryClashChance: number;\n territoryWarfareEngaged: boolean;\n\n notifyMemberDeath: boolean;\n\n constructor(facName = \"\", hacking = false) {\n this.facName = facName;\n this.members = [];\n this.wanted = 1;\n this.respect = 1;\n\n this.isHackingGang = hacking;\n\n this.respectGainRate = 0;\n this.wantedGainRate = 0;\n this.moneyGainRate = 0;\n\n // 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 this.storedCycles = 0;\n\n // Separate variable to keep track of cycles for Territry + Power gang, which\n // happens on a slower \"clock\" than normal processing\n this.storedTerritoryAndPowerCycles = 0;\n\n this.territoryClashChance = 0;\n this.territoryWarfareEngaged = false;\n\n this.notifyMemberDeath = true;\n }\n\n getPower(): number {\n return AllGangs[this.facName].power;\n }\n\n getTerritory(): number {\n return AllGangs[this.facName].territory;\n }\n\n process(numCycles = 1, player: IPlayer): void {\n const CyclesPerSecond = 1000 / CONSTANTS._idleSpeed;\n\n if (isNaN(numCycles)) {\n console.error(`NaN passed into Gang.process(): ${numCycles}`);\n }\n this.storedCycles += numCycles;\n\n // Only process if there are at least 2 seconds, and at most 5 seconds\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: any) {\n console.error(`Exception caught when processing Gang: ${e}`);\n }\n }\n\n processGains(numCycles = 1, player: IPlayer): void {\n // Get gains per cycle\n let moneyGains = 0;\n let respectGains = 0;\n let wantedLevelGains = 0;\n let justice = 0;\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 this.respectGainRate = respectGains;\n this.wantedGainRate = wantedLevelGains;\n this.moneyGainRate = moneyGains;\n const gain = respectGains * numCycles;\n this.respect += gain;\n // Faction reputation gains is respect gain divided by some constant\n const fac = Factions[this.facName];\n if (!(fac instanceof Faction)) {\n dialogBoxCreate(\n \"ERROR: Could not get Faction associates with your gang. This is a bug, please report to game dev\",\n );\n throw new Error(\"Could not find the faction associated with this gang.\");\n }\n const favorMult = 1 + fac.favor / 100;\n\n fac.playerReputation += (player.faction_rep_mult * gain * favorMult) / GangConstants.GangRespectToReputationRatio;\n\n // Keep track of respect gained per member\n for (let i = 0; i < this.members.length; ++i) {\n this.members[i].recordEarnedRespect(numCycles, this);\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 if (wantedLevelGains <= 0 && newWanted > oldWanted) newWanted = 1;\n\n this.wanted = newWanted;\n if (this.wanted < 1) this.wanted = 1;\n }\n player.gainMoney(moneyGains * numCycles, \"gang\");\n }\n\n processTerritoryAndPowerGains(numCycles = 1): void {\n this.storedTerritoryAndPowerCycles += numCycles;\n if (this.storedTerritoryAndPowerCycles < GangConstants.CyclesPerTerritoryAndPowerUpdate) return;\n this.storedTerritoryAndPowerCycles -= GangConstants.CyclesPerTerritoryAndPowerUpdate;\n\n // Process power first\n const gangName = this.facName;\n for (const name of Object.keys(AllGangs)) {\n if (AllGangs.hasOwnProperty(name)) {\n if (name == gangName) {\n AllGangs[name].power += this.calculatePower();\n } else {\n // All NPC gangs get random power gains\n const gainRoll = Math.random();\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[name].power * 0.005;\n AllGangs[name].power += Math.min(0.85, multiplicativeGain);\n } else {\n // Additive gain (50% chance)\n const powerMult = PowerMultiplier[name];\n if (powerMult === undefined) throw new Error(\"Should not be undefined\");\n const additiveGain = 0.75 * gainRoll * AllGangs[name].territory * powerMult;\n AllGangs[name].power += additiveGain;\n }\n }\n }\n }\n\n // Determine if territory should be processed\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 }\n\n // Then process territory\n const gangs = GangConstants.Names.filter((g) => AllGangs[g].territory > 0 || g === gangName);\n if (gangs.length > 1) {\n for (let i = 0; i < gangs.length; ++i) {\n const others = gangs.filter((e) => {\n return e !== gangs[i];\n });\n const other = getRandomInt(0, others.length - 1);\n\n const thisGang = gangs[i];\n const otherGang = others[other];\n\n // 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 if (thisGang === gangName || otherGang === gangName) {\n if (!(Math.random() < this.territoryClashChance)) continue;\n }\n\n const thisPwr = AllGangs[thisGang].power;\n const otherPwr = AllGangs[otherGang].power;\n const thisChance = thisPwr / (thisPwr + otherPwr);\n\n function calculateTerritoryGain(winGang: string, loseGang: string): number {\n const powerBonus = Math.max(\n 1,\n 1 + Math.log(AllGangs[winGang].power / AllGangs[loseGang].power) / Math.log(50),\n );\n const gains = Math.min(AllGangs[loseGang].territory, powerBonus * 0.0001 * (Math.random() + 0.5));\n return gains;\n }\n\n if (Math.random() < thisChance) {\n if (AllGangs[otherGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(thisGang, otherGang);\n AllGangs[thisGang].territory += territoryGain;\n if (AllGangs[thisGang].territory > 0.999) AllGangs[thisGang].territory = 1;\n AllGangs[otherGang].territory -= territoryGain;\n if (thisGang === gangName) {\n this.clash(true); // Player won\n AllGangs[otherGang].power *= 1 / 1.01;\n } else if (otherGang === gangName) {\n this.clash(false); // Player lost\n } else {\n AllGangs[otherGang].power *= 1 / 1.01;\n }\n } else {\n if (AllGangs[thisGang].territory <= 0) return;\n const territoryGain = calculateTerritoryGain(otherGang, thisGang);\n AllGangs[thisGang].territory -= territoryGain;\n if (AllGangs[otherGang].territory < 0.001) AllGangs[otherGang].territory = 0;\n AllGangs[otherGang].territory += territoryGain;\n if (AllGangs[otherGang].territory > 0.999) AllGangs[otherGang].territory = 1;\n if (thisGang === gangName) {\n this.clash(false); // Player lost\n } else if (otherGang === gangName) {\n this.clash(true); // Player won\n AllGangs[thisGang].power *= 1 / 1.01;\n } else {\n AllGangs[thisGang].power *= 1 / 1.01;\n }\n }\n }\n }\n }\n\n processExperienceGains(numCycles = 1): void {\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): void {\n // Determine if a gang member should die\n let baseDeathChance = 0.01;\n if (won) baseDeathChance /= 2;\n // If the clash was lost, the player loses a small percentage of power\n else AllGangs[this.facName].power *= 1 / 1.008;\n\n // Deaths can only occur during X% of clashes\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];\n\n // Only members assigned to Territory Warfare can die\n if (member.task !== \"Territory Warfare\") continue;\n\n // Chance to die is decreased based on defense\n const modifiedDeathChance = baseDeathChance / Math.pow(member.def, 0.6);\n if (Math.random() < modifiedDeathChance) {\n this.killMember(member);\n }\n }\n }\n\n canRecruitMember(): boolean {\n if (this.members.length >= GangConstants.MaximumGangMembers) return false;\n return this.respect >= this.getRespectNeededToRecruitMember();\n }\n\n getRespectNeededToRecruitMember(): number {\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\n const i = this.members.length - (numFreeMembers - 1);\n return Math.pow(5, i);\n }\n\n recruitMember(name: string): boolean {\n name = String(name);\n if (name === \"\" || !this.canRecruitMember()) return false;\n\n // Check for already-existing names\n const sameNames = this.members.filter((m) => m.name === name);\n if (sameNames.length >= 1) return false;\n\n const member = new GangMember(name);\n this.members.push(member);\n return true;\n }\n\n // Money and Respect gains multiplied by this number (< 1)\n getWantedPenalty(): number {\n return this.respect / (this.respect + this.wanted);\n }\n\n //Calculates power GAIN, which is added onto the Gang's existing power\n calculatePower(): number {\n let memberTotal = 0;\n for (let i = 0; i < this.members.length; ++i) {\n if (!GangMemberTasks.hasOwnProperty(this.members[i].task) || this.members[i].task !== \"Territory Warfare\")\n continue;\n memberTotal += this.members[i].calculatePower();\n }\n return 0.015 * Math.max(0.002, this.getTerritory()) * memberTotal;\n }\n\n killMember(member: GangMember): void {\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 }\n\n // Notify of death\n if (this.notifyMemberDeath) {\n dialogBoxCreate(`${member.name} was killed in a gang clash! You lost ${lostRespect} respect`);\n }\n }\n\n ascendMember(member: GangMember, workerScript?: WorkerScript): IAscensionResult {\n try {\n const res = member.ascend();\n this.respect = Math.max(1, this.respect - res.respect);\n if (workerScript) {\n workerScript.log(\"gang.ascendMember\", () => `Ascended Gang member ${member.name}`);\n }\n return res;\n } catch (e: any) {\n if (workerScript == null) {\n exceptionAlert(e);\n }\n throw e; // Re-throw, will be caught in the Netscript Function\n }\n }\n\n // Cost of upgrade gets cheaper as gang increases in respect + power\n getDiscount(): number {\n const power = this.getPower();\n const respect = this.respect;\n\n const respectLinearFac = 5e6;\n const powerLinearFac = 1e6;\n const discount =\n Math.pow(respect, 0.01) + respect / respectLinearFac + Math.pow(power, 0.01) + power / powerLinearFac - 1;\n return Math.max(1, discount);\n }\n\n // Returns only valid tasks for this gang. Excludes 'Unassigned'\n getAllTaskNames(): string[] {\n return Object.keys(GangMemberTasks).filter((taskName: string) => {\n const task = GangMemberTasks[taskName];\n if (task == null) return false;\n if (task.name === \"Unassigned\") return false;\n // yes you need both checks\n return this.isHackingGang === task.isHacking || !this.isHackingGang === task.isCombat;\n });\n }\n\n getUpgradeCost(upg: GangMemberUpgrade | null): number {\n if (upg == null) {\n return Infinity;\n }\n return upg.cost / this.getDiscount();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Gang\", this);\n }\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 static fromJSON(value: any): Gang {\n return Generic_fromJSON(Gang, value.data);\n }\n}\n\nReviver.constructors.Gang = Gang;\n","import { workerScripts } from \"./WorkerScripts\";\n\nlet pidCounter = 1;\n\n/**\n * Find and return the next availble PID for a script\n */\nexport function generateNextPid(): number {\n let tempCounter = pidCounter;\n\n // 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 let found = false;\n for (let i = 0; i < 1e6; ) {\n if (!workerScripts.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 if (pidCounter >= Number.MAX_SAFE_INTEGER) {\n pidCounter = 1;\n }\n\n return tempCounter;\n } else {\n return -1;\n }\n}\n\nexport function resetPidCounter(): void {\n pidCounter = 1;\n}\n","import { vsprintf, sprintf } from \"sprintf-js\";\n\nimport { getRamCost } from \"./Netscript/RamCostGenerator\";\nimport { WorkerScriptStartStopEventEmitter } from \"./Netscript/WorkerScriptStartStopEventEmitter\";\n\nimport { BitNodeMultipliers } from \"./BitNode/BitNodeMultipliers\";\n\nimport { CONSTANTS } from \"./Constants\";\n\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"./Hacking\";\n\nimport { netscriptCanGrow, netscriptCanHack, netscriptCanWeaken } from \"./Hacking/netscriptCanHack\";\n\nimport { HacknetServer } from \"./Hacknet/HacknetServer\";\n\nimport { Terminal } from \"./Terminal\";\n\nimport { Player } from \"./Player\";\nimport { Programs } from \"./Programs/Programs\";\nimport { Script } from \"./Script/Script\";\nimport { findRunningScript, findRunningScriptByPid } from \"./Script/ScriptHelpers\";\nimport { isScriptFilename } from \"./Script/isScriptFilename\";\nimport { PromptEvent } from \"./ui/React/PromptManager\";\n\nimport { GetServer, GetAllServers, DeleteServer, AddToAllServers, createUniqueRandomIp } from \"./Server/AllServers\";\nimport { RunningScript } from \"./Script/RunningScript\";\nimport {\n getServerOnNetwork,\n numCycleForGrowth,\n processSingleServerGrowth,\n safetlyCreateUniqueServer,\n} from \"./Server/ServerHelpers\";\nimport { getPurchaseServerCost, getPurchaseServerLimit, getPurchaseServerMaxRam } from \"./Server/ServerPurchases\";\nimport { Server } from \"./Server/Server\";\nimport { SourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { influenceStockThroughServerHack, influenceStockThroughServerGrow } from \"./StockMarket/PlayerInfluencing\";\n\nimport { isValidFilePath, removeLeadingSlash } from \"./Terminal/DirectoryHelpers\";\nimport { TextFile, getTextFile, createTextFile } from \"./TextFile\";\n\nimport { NetscriptPorts, runScriptFromScript } from \"./NetscriptWorker\";\nimport { killWorkerScript } from \"./Netscript/killWorkerScript\";\nimport { workerScripts } from \"./Netscript/WorkerScripts\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { makeRuntimeRejectMsg, netscriptDelay, resolveNetscriptRequestedThreads } from \"./NetscriptEvaluator\";\n\nimport { numeralWrapper } from \"./ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\n\nimport { LogBoxEvents } from \"./ui/React/LogBoxManager\";\nimport { arrayToString } from \"./utils/helpers/arrayToString\";\nimport { isString } from \"./utils/helpers/isString\";\n\nimport { BaseServer } from \"./Server/BaseServer\";\nimport { NetscriptGang } from \"./NetscriptFunctions/Gang\";\nimport { NetscriptSleeve } from \"./NetscriptFunctions/Sleeve\";\nimport { NetscriptExtra } from \"./NetscriptFunctions/Extra\";\nimport { NetscriptHacknet } from \"./NetscriptFunctions/Hacknet\";\nimport { NetscriptStanek } from \"./NetscriptFunctions/Stanek\";\nimport { NetscriptUserInterface } from \"./NetscriptFunctions/UserInterface\";\nimport { NetscriptBladeburner } from \"./NetscriptFunctions/Bladeburner\";\nimport { NetscriptCodingContract } from \"./NetscriptFunctions/CodingContract\";\nimport { NetscriptCorporation } from \"./NetscriptFunctions/Corporation\";\nimport { NetscriptFormulas } from \"./NetscriptFunctions/Formulas\";\nimport { NetscriptStockMarket } from \"./NetscriptFunctions/StockMarket\";\nimport { NetscriptGrafting } from \"./NetscriptFunctions/Grafting\";\nimport { IPort } from \"./NetscriptPort\";\n\nimport {\n NS as INS,\n Player as INetscriptPlayer,\n Gang as IGang,\n Bladeburner as IBladeburner,\n Stanek as IStanek,\n SourceFileLvl,\n BasicHGWOptions,\n ProcessInfo,\n HackingMultipliers,\n HacknetMultipliers,\n BitNodeMultipliers as IBNMults,\n Server as IServerDef,\n RunningScript as IRunningScriptDef,\n} from \"./ScriptEditor/NetscriptDefinitions\";\nimport { NetscriptSingularity } from \"./NetscriptFunctions/Singularity\";\n\nimport { toNative } from \"./NetscriptFunctions/toNative\";\n\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nimport { Flags } from \"./NetscriptFunctions/Flags\";\nimport { calculateIntelligenceBonus } from \"./PersonObjects/formulas/intelligence\";\nimport { CalculateShareMult, StartSharing } from \"./NetworkShare/Share\";\nimport { CityName } from \"./Locations/data/CityNames\";\n\ninterface NS extends INS {\n [key: string]: any;\n gang: IGang;\n bladeburner: IBladeburner;\n stanek: IStanek;\n}\n\nexport function NetscriptFunctions(workerScript: WorkerScript): NS {\n const updateDynamicRam = function (fnName: string, ramCost: number): void {\n if (workerScript.dynamicLoadedFns[fnName]) {\n return;\n }\n workerScript.dynamicLoadedFns[fnName] = true;\n\n let threads = workerScript.scriptRef.threads;\n if (typeof threads !== \"number\") {\n console.warn(`WorkerScript detected NaN for threadcount for ${workerScript.name} on ${workerScript.hostname}`);\n threads = 1;\n }\n\n workerScript.dynamicRamUsage += ramCost;\n if (workerScript.dynamicRamUsage > 1.01 * workerScript.ramUsage) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `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 Threads: ${threads}\n Dynamic RAM Usage: ${numeralWrapper.formatRAM(workerScript.dynamicRamUsage)}\n Static RAM Usage: ${numeralWrapper.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 myScan = eval('ns.scan');\n\n * Using map access to do the same\n   const myScan = ns['scan'];\n\n Sorry :(`,\n );\n }\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} hostname - Hostname or IP of the server\n * @param {string} callingFnName - Name of calling function. For logging purposes\n * @returns {BaseServer} The specified server as a BaseServer\n */\n const safeGetServer = function (hostname: string, callingFnName: string): BaseServer {\n const server = GetServer(hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(callingFnName, `Invalid hostname: ${hostname}`);\n }\n return server;\n };\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} hostname - 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 const getRunningScript = function (\n fn: string,\n hostname: string,\n callingFnName: string,\n scriptArgs: any,\n ): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScript\";\n }\n\n if (!Array.isArray(scriptArgs)) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `Invalid scriptArgs argument passed into getRunningScript() from ${callingFnName}(). ` +\n `This is probably a bug. Please report to game developer`,\n );\n }\n\n if (fn != null && typeof fn === \"string\") {\n // Get Logs of another script\n if (hostname == null) {\n hostname = workerScript.hostname;\n }\n const server = safeGetServer(hostname, callingFnName);\n\n return findRunningScript(fn, scriptArgs, server);\n }\n\n // If no arguments are specified, return the current RunningScript\n return workerScript.scriptRef;\n };\n\n const getRunningScriptByPid = function (pid: number, callingFnName: string): RunningScript | null {\n if (typeof callingFnName !== \"string\" || callingFnName === \"\") {\n callingFnName = \"getRunningScriptgetRunningScriptByPid\";\n }\n\n for (const server of GetAllServers()) {\n const runningScript = findRunningScriptByPid(pid, server);\n if (runningScript) return runningScript;\n }\n return null;\n };\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} hostname - 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 const getCannotFindRunningScriptErrorMessage = function (fn: string, hostname: string, scriptArgs: any): string {\n if (!Array.isArray(scriptArgs)) {\n scriptArgs = [];\n }\n\n return `Cannot find running script ${fn} on server ${hostname} with args: ${arrayToString(scriptArgs)}`;\n };\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 const failOnHacknetServer = function (server: BaseServer, callingFn = \"\"): boolean {\n if (server instanceof HacknetServer) {\n workerScript.log(callingFn, () => `Does not work on Hacknet Servers`);\n return true;\n } else {\n return false;\n }\n };\n\n const makeRuntimeErrorMsg = function (caller: string, msg: string): string {\n const errstack = new Error().stack;\n if (errstack === undefined) throw new Error(\"how did we not throw an error?\");\n const stack = errstack.split(\"\\n\").slice(1);\n const scripts = workerScript.getServer().scripts;\n const userstack = [];\n for (const stackline of stack) {\n let filename;\n for (const script of scripts) {\n if (script.url && stackline.includes(script.url)) {\n filename = script.filename;\n }\n for (const dependency of script.dependencies) {\n if (stackline.includes(dependency.url)) {\n filename = dependency.filename;\n }\n }\n }\n if (!filename) continue;\n\n interface ILine {\n line: string;\n func: string;\n }\n\n function parseChromeStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+.*/;\n const funcRe = /.*at (.+) \\(.*/;\n\n const lineMatch = line.match(lineRe);\n const funcMatch = line.match(funcRe);\n if (lineMatch && funcMatch) {\n return { line: lineMatch[1], func: funcMatch[1] };\n }\n return null;\n }\n let call = { line: \"-1\", func: \"unknown\" };\n const chromeCall = parseChromeStackline(stackline);\n if (chromeCall) {\n call = chromeCall;\n }\n\n function parseFirefoxStackline(line: string): ILine | null {\n const lineRe = /.*:(\\d+):\\d+$/;\n const lineMatch = line.match(lineRe);\n\n const lio = line.lastIndexOf(\"@\");\n\n if (lineMatch && lio !== -1) {\n return { line: lineMatch[1], func: line.slice(0, lio) };\n }\n return null;\n }\n\n const firefoxCall = parseFirefoxStackline(stackline);\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 makeRuntimeRejectMsg(workerScript, rejectMsg);\n };\n\n const checkSingularityAccess = function (func: string): void {\n if (Player.bitNodeN !== 4) {\n if (Player.sourceFileLvl(4) === 0) {\n throw makeRuntimeErrorMsg(\n func,\n `This singularity function requires Source-File 4 to run. A power up you obtain later in the game. It will be very obvious when and how you can obtain it.`,\n );\n }\n }\n };\n\n const hack = function (\n hostname: string,\n manual: boolean,\n { threads: requestedThreads, stock }: any = {},\n ): Promise {\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hack\", \"Takes 1 argument.\");\n }\n const threads = resolveNetscriptRequestedThreads(workerScript, \"hack\", requestedThreads);\n const server = safeGetServer(hostname, \"hack\");\n if (!(server instanceof Server)) {\n throw makeRuntimeErrorMsg(\"hack\", \"Cannot be executed on this server.\");\n }\n\n // Calculate the hacking time\n const hackingTime = calculateHackingTime(server, Player); // This is in seconds\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, Player);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"hack\", canHack.msg || \"\");\n }\n\n workerScript.log(\n \"hack\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n hackingTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n\n return netscriptDelay(hackingTime * 1000, workerScript).then(function () {\n const hackChance = calculateHackingChance(server, Player);\n const rand = Math.random();\n let expGainedOnSuccess = calculateHackingExpGain(server, Player) * threads;\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n let maxThreadNeeded = Math.ceil(1 / percentHacked);\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;\n\n // Over-the-top safety checks\n if (moneyDrained <= 0) {\n moneyDrained = 0;\n expGainedOnSuccess = expGainedOnFailure;\n }\n if (moneyDrained > server.moneyAvailable) {\n moneyDrained = server.moneyAvailable;\n }\n server.moneyAvailable -= moneyDrained;\n if (server.moneyAvailable < 0) {\n server.moneyAvailable = 0;\n }\n\n const moneyGained = moneyDrained * BitNodeMultipliers.ScriptHackMoneyGain;\n\n Player.gainMoney(moneyGained, \"hacking\");\n workerScript.scriptRef.onlineMoneyMade += moneyGained;\n Player.scriptProdSinceLastAug += moneyGained;\n workerScript.scriptRef.recordHack(server.hostname, moneyGained, threads);\n Player.gainHackingExp(expGainedOnSuccess);\n if (manual) Player.gainIntelligenceExp(0.005);\n workerScript.scriptRef.onlineExpGained += expGainedOnSuccess;\n workerScript.log(\n \"hack\",\n () =>\n `Successfully hacked '${server.hostname}' for ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n server.fortify(CONSTANTS.ServerFortifyAmount * Math.min(threads, maxThreadNeeded));\n if (stock) {\n influenceStockThroughServerHack(server, moneyDrained);\n }\n if (manual) {\n server.backdoorInstalled = true;\n }\n return Promise.resolve(moneyGained);\n } else {\n // Player only gains 25% exp for failure?\n Player.gainHackingExp(expGainedOnFailure);\n workerScript.scriptRef.onlineExpGained += expGainedOnFailure;\n workerScript.log(\n \"hack\",\n () =>\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(\n expGainedOnFailure,\n )} exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return Promise.resolve(0);\n }\n });\n };\n\n const argsToString = function (args: any[]): string {\n let out = \"\";\n for (let arg of args) {\n arg = toNative(arg);\n out += typeof arg === \"object\" ? JSON.stringify(arg) : `${arg}`;\n }\n\n return out;\n };\n\n const helper = {\n updateDynamicRam: updateDynamicRam,\n makeRuntimeErrorMsg: makeRuntimeErrorMsg,\n string: (funcName: string, argName: string, v: unknown): string => {\n if (typeof v === \"string\") return v;\n if (typeof v === \"number\") return v + \"\"; // cast to string;\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a string.`);\n },\n number: (funcName: string, argName: string, v: unknown): number => {\n if (typeof v === \"string\") {\n const x = parseFloat(v);\n if (!isNaN(x)) return x; // otherwise it wasn't even a string representing a number.\n } else if (typeof v === \"number\") {\n if (isNaN(v)) throw makeRuntimeErrorMsg(funcName, `${argName} is NaN.`);\n return v;\n }\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a number.`);\n },\n boolean: (v: unknown): boolean => {\n return !!v; // Just convert it to boolean.\n },\n city: (funcName: string, argName: string, v: unknown): CityName => {\n if (typeof v !== \"string\") throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n const s = v as CityName;\n if (!Object.values(CityName).includes(s))\n throw makeRuntimeErrorMsg(funcName, `${argName} should be a city name.`);\n return s;\n },\n getServer: safeGetServer,\n checkSingularityAccess: checkSingularityAccess,\n hack: hack,\n getValidPort: (funcName: string, port: number): IPort => {\n if (isNaN(port)) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Invalid argument. Must be a port number between 1 and ${CONSTANTS.NumNetscriptPorts}, is ${port}`,\n );\n }\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n funcName,\n `Trying to use an invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(funcName, `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return iport;\n },\n };\n\n const gang = NetscriptGang(Player, workerScript, helper);\n const sleeve = NetscriptSleeve(Player, workerScript, helper);\n const extra = NetscriptExtra(Player, workerScript, helper);\n const hacknet = NetscriptHacknet(Player, workerScript, helper);\n const stanek = NetscriptStanek(Player, workerScript, helper);\n const bladeburner = NetscriptBladeburner(Player, workerScript, helper);\n const codingcontract = NetscriptCodingContract(Player, workerScript, helper);\n const corporation = NetscriptCorporation(Player, workerScript, helper);\n const formulas = NetscriptFormulas(Player, workerScript, helper);\n const singularity = NetscriptSingularity(Player, workerScript, helper);\n const stockmarket = NetscriptStockMarket(Player, workerScript, helper);\n const ui = NetscriptUserInterface(Player, workerScript, helper);\n const grafting = NetscriptGrafting(Player, workerScript, helper);\n\n const base: INS = {\n ...singularity,\n\n singularity: singularity,\n gang: gang,\n bladeburner: bladeburner,\n codingcontract: codingcontract,\n sleeve: sleeve,\n corporation: corporation,\n stanek: stanek,\n ui: ui,\n formulas: formulas,\n stock: stockmarket,\n grafting: grafting,\n args: workerScript.args,\n hacknet: hacknet,\n sprintf: sprintf,\n vsprintf: vsprintf,\n scan: function (_hostname: unknown = workerScript.hostname): string[] {\n const hostname = helper.string(\"scan\", \"hostname\", _hostname);\n updateDynamicRam(\"scan\", getRamCost(Player, \"scan\"));\n const server = safeGetServer(hostname, \"scan\");\n const out = [];\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const s = getServerOnNetwork(server, i);\n if (s === null) continue;\n const entry = s.hostname;\n if (entry === null) continue;\n out.push(entry);\n }\n workerScript.log(\"scan\", () => `returned ${server.serversOnNetwork.length} connections for ${server.hostname}`);\n return out;\n },\n hack: function (_hostname: unknown, { threads: requestedThreads, stock }: BasicHGWOptions = {}): Promise {\n const hostname = helper.string(\"hack\", \"hostname\", _hostname);\n updateDynamicRam(\"hack\", getRamCost(Player, \"hack\"));\n return hack(hostname, false, { threads: requestedThreads, stock: stock });\n },\n hackAnalyzeThreads: function (_hostname: unknown, _hackAmount: unknown): number {\n const hostname = helper.string(\"hackAnalyzeThreads\", \"hostname\", _hostname);\n const hackAmount = helper.number(\"hackAnalyzeThreads\", \"hackAmount\", _hackAmount);\n updateDynamicRam(\"hackAnalyzeThreads\", getRamCost(Player, \"hackAnalyzeThreads\"));\n\n // Check argument validity\n const server = safeGetServer(hostname, \"hackAnalyzeThreads\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeThreads\", () => \"Cannot be executed on this server.\");\n return -1;\n }\n if (isNaN(hackAmount)) {\n throw makeRuntimeErrorMsg(\n \"hackAnalyzeThreads\",\n `Invalid hackAmount argument passed into hackAnalyzeThreads: ${hackAmount}. Must be numeric.`,\n );\n }\n\n if (hackAmount < 0 || hackAmount > server.moneyAvailable) {\n return -1;\n } else if (hackAmount === 0) {\n return 0;\n }\n\n const percentHacked = calculatePercentMoneyHacked(server, Player);\n\n if (percentHacked === 0 || server.moneyAvailable === 0) {\n return 0; // To prevent returning infinity below\n }\n\n return hackAmount / Math.floor(server.moneyAvailable * percentHacked);\n },\n hackAnalyze: function (_hostname: unknown): number {\n const hostname = helper.string(\"hackAnalyze\", \"hostname\", _hostname);\n updateDynamicRam(\"hackAnalyze\", getRamCost(Player, \"hackAnalyze\"));\n\n const server = safeGetServer(hostname, \"hackAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyze\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculatePercentMoneyHacked(server, Player);\n },\n hackAnalyzeSecurity: function (_threads: unknown): number {\n const threads = helper.number(\"hackAnalyzeSecurity\", \"threads\", _threads);\n updateDynamicRam(\"hackAnalyzeSecurity\", getRamCost(Player, \"hackAnalyzeSecurity\"));\n return CONSTANTS.ServerFortifyAmount * threads;\n },\n hackAnalyzeChance: function (_hostname: unknown): number {\n const hostname = helper.string(\"hackAnalyzeChance\", \"hostname\", _hostname);\n updateDynamicRam(\"hackAnalyzeChance\", getRamCost(Player, \"hackAnalyzeChance\"));\n\n const server = safeGetServer(hostname, \"hackAnalyzeChance\");\n if (!(server instanceof Server)) {\n workerScript.log(\"hackAnalyzeChance\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n\n return calculateHackingChance(server, Player);\n },\n sleep: async function (_time: unknown = 0): Promise {\n const time = helper.number(\"sleep\", \"time\", _time);\n updateDynamicRam(\"sleep\", getRamCost(Player, \"sleep\"));\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"sleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"sleep\", () => `Sleeping for ${time} milliseconds`);\n return netscriptDelay(time, workerScript).then(function () {\n return Promise.resolve();\n });\n },\n asleep: function (_time: unknown = 0): Promise {\n const time = helper.number(\"asleep\", \"time\", _time);\n updateDynamicRam(\"asleep\", getRamCost(Player, \"asleep\"));\n if (time === undefined) {\n throw makeRuntimeErrorMsg(\"asleep\", \"Takes 1 argument.\");\n }\n workerScript.log(\"asleep\", () => `Sleeping for ${time} milliseconds`);\n return new Promise((resolve) => setTimeout(resolve, time));\n },\n grow: async function (\n _hostname: unknown,\n { threads: requestedThreads, stock }: BasicHGWOptions = {},\n ): Promise {\n const hostname = helper.string(\"grow\", \"hostname\", _hostname);\n updateDynamicRam(\"grow\", getRamCost(Player, \"grow\"));\n const threads = resolveNetscriptRequestedThreads(\n workerScript,\n \"grow\",\n requestedThreads ?? workerScript.scriptRef.threads,\n );\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"grow\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"grow\");\n if (!(server instanceof Server)) {\n workerScript.log(\"grow\", () => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n throw new Error(\"Workerscript host is null\");\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanGrow(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"grow\", canHack.msg || \"\");\n }\n\n const growTime = calculateGrowTime(server, Player);\n workerScript.log(\n \"grow\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n growTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n return netscriptDelay(growTime * 1000, workerScript).then(function () {\n const moneyBefore = server.moneyAvailable <= 0 ? 1 : server.moneyAvailable;\n processSingleServerGrowth(server, threads, Player, host.cpuCores);\n const moneyAfter = server.moneyAvailable;\n workerScript.scriptRef.recordGrow(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n const logGrowPercent = moneyAfter / moneyBefore - 1;\n workerScript.log(\n \"grow\",\n () =>\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n logGrowPercent,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)}).`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n if (stock) {\n influenceStockThroughServerGrow(server, moneyAfter - moneyBefore);\n }\n return Promise.resolve(moneyAfter / moneyBefore);\n });\n },\n growthAnalyze: function (_hostname: unknown, _growth: unknown, _cores: unknown = 1): number {\n const hostname = helper.string(\"growthAnalyze\", \"hostname\", _hostname);\n const growth = helper.number(\"growthAnalyze\", \"growth\", _growth);\n const cores = helper.number(\"growthAnalyze\", \"cores\", _cores);\n updateDynamicRam(\"growthAnalyze\", getRamCost(Player, \"growthAnalyze\"));\n\n // Check argument validity\n const server = safeGetServer(hostname, \"growthAnalyze\");\n if (!(server instanceof Server)) {\n workerScript.log(\"growthAnalyze\", () => \"Cannot be executed on this server.\");\n return 0;\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 numCycleForGrowth(server, Number(growth), Player, cores);\n },\n growthAnalyzeSecurity: function (_threads: unknown): number {\n const threads = helper.number(\"growthAnalyzeSecurity\", \"threads\", _threads);\n updateDynamicRam(\"growthAnalyzeSecurity\", getRamCost(Player, \"growthAnalyzeSecurity\"));\n return 2 * CONSTANTS.ServerFortifyAmount * threads;\n },\n weaken: async function (_hostname: unknown, { threads: requestedThreads }: BasicHGWOptions = {}): Promise {\n const hostname = helper.string(\"weaken\", \"hostname\", _hostname);\n updateDynamicRam(\"weaken\", getRamCost(Player, \"weaken\"));\n const threads = resolveNetscriptRequestedThreads(\n workerScript,\n \"weaken\",\n requestedThreads ?? workerScript.scriptRef.threads,\n );\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"weaken\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"weaken\");\n if (!(server instanceof Server)) {\n workerScript.log(\"weaken\", () => \"Cannot be executed on this server.\");\n return Promise.resolve(0);\n }\n\n // No root access or skill level too low\n const canHack = netscriptCanWeaken(server);\n if (!canHack.res) {\n throw makeRuntimeErrorMsg(\"weaken\", canHack.msg || \"\");\n }\n\n const weakenTime = calculateWeakenTime(server, Player);\n workerScript.log(\n \"weaken\",\n () =>\n `Executing on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(\n weakenTime * 1000,\n true,\n )} (t=${numeralWrapper.formatThreads(threads)})`,\n );\n return netscriptDelay(weakenTime * 1000, workerScript).then(function () {\n const host = GetServer(workerScript.hostname);\n if (host === null) {\n workerScript.log(\"weaken\", () => \"Server is null, did it die?\");\n return Promise.resolve(0);\n }\n const coreBonus = 1 + (host.cpuCores - 1) / 16;\n server.weaken(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n workerScript.scriptRef.recordWeaken(server.hostname, threads);\n const expGain = calculateHackingExpGain(server, Player) * threads;\n workerScript.log(\n \"weaken\",\n () =>\n `'${server.hostname}' security level weakened to ${\n server.hackDifficulty\n }. Gained ${numeralWrapper.formatExp(expGain)} hacking exp (t=${numeralWrapper.formatThreads(threads)})`,\n );\n workerScript.scriptRef.onlineExpGained += expGain;\n Player.gainHackingExp(expGain);\n return Promise.resolve(CONSTANTS.ServerWeakenAmount * threads * coreBonus);\n });\n },\n weakenAnalyze: function (_threads: unknown, _cores: unknown = 1): number {\n const threads = helper.number(\"weakenAnalyze\", \"threads\", _threads);\n const cores = helper.number(\"weakenAnalyze\", \"cores\", _cores);\n updateDynamicRam(\"weakenAnalyze\", getRamCost(Player, \"weakenAnalyze\"));\n const coreBonus = 1 + (cores - 1) / 16;\n return CONSTANTS.ServerWeakenAmount * threads * coreBonus * BitNodeMultipliers.ServerWeakenRate;\n },\n share: async function (): Promise {\n updateDynamicRam(\"share\", getRamCost(Player, \"share\"));\n workerScript.log(\"share\", () => \"Sharing this computer.\");\n const end = StartSharing(workerScript.scriptRef.threads * calculateIntelligenceBonus(Player.intelligence, 2));\n return netscriptDelay(10000, workerScript).finally(function () {\n workerScript.log(\"share\", () => \"Finished sharing this computer.\");\n end();\n });\n },\n getSharePower: function (): number {\n updateDynamicRam(\"getSharePower\", getRamCost(Player, \"getSharePower\"));\n return CalculateShareMult();\n },\n print: function (...args: any[]): void {\n updateDynamicRam(\"print\", getRamCost(Player, \"print\"));\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"print\", \"Takes at least 1 argument.\");\n }\n workerScript.print(argsToString(args));\n },\n printf: function (_format: unknown, ...args: any[]): void {\n const format = helper.string(\"printf\", \"format\", _format);\n updateDynamicRam(\"printf\", getRamCost(Player, \"printf\"));\n if (typeof format !== \"string\") {\n throw makeRuntimeErrorMsg(\"printf\", \"First argument must be string for the format.\");\n }\n workerScript.print(vsprintf(format, args));\n },\n tprint: function (...args: any[]): void {\n updateDynamicRam(\"tprint\", getRamCost(Player, \"tprint\"));\n if (args.length === 0) {\n throw makeRuntimeErrorMsg(\"tprint\", \"Takes at least 1 argument.\");\n }\n const str = argsToString(args);\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${workerScript.scriptRef.filename}: ${str}`);\n return;\n }\n Terminal.print(`${workerScript.scriptRef.filename}: ${str}`);\n },\n tprintf: function (_format: unknown, ...args: any[]): void {\n const format = helper.string(\"printf\", \"format\", _format);\n updateDynamicRam(\"tprintf\", getRamCost(Player, \"tprintf\"));\n if (typeof format !== \"string\") {\n throw makeRuntimeErrorMsg(\"tprintf\", \"First argument must be string for the format.\");\n }\n const str = vsprintf(format, args);\n\n if (str.startsWith(\"ERROR\") || str.startsWith(\"FAIL\")) {\n Terminal.error(`${str}`);\n return;\n }\n if (str.startsWith(\"SUCCESS\")) {\n Terminal.success(`${str}`);\n return;\n }\n if (str.startsWith(\"WARN\")) {\n Terminal.warn(`${str}`);\n return;\n }\n if (str.startsWith(\"INFO\")) {\n Terminal.info(`${str}`);\n return;\n }\n Terminal.print(`${str}`);\n },\n clearLog: function (): void {\n updateDynamicRam(\"clearLog\", getRamCost(Player, \"clearLog\"));\n workerScript.scriptRef.clearLog();\n },\n disableLog: function (_fn: unknown): void {\n const fn = helper.string(\"disableLog\", \"fn\", _fn);\n updateDynamicRam(\"disableLog\", getRamCost(Player, \"disableLog\"));\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n workerScript.disableLogs[fn] = true;\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: unknown): void {\n const fn = helper.string(\"enableLog\", \"fn\", _fn);\n updateDynamicRam(\"enableLog\", getRamCost(Player, \"enableLog\"));\n if (fn === \"ALL\") {\n for (const fn of Object.keys(possibleLogs)) {\n delete workerScript.disableLogs[fn];\n }\n workerScript.log(\"enableLog\", () => `Enabled logging for all functions`);\n } else if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"enableLog\", `Invalid argument: ${fn}.`);\n }\n delete workerScript.disableLogs[fn];\n workerScript.log(\"enableLog\", () => `Enabled logging for ${fn}`);\n },\n isLogEnabled: function (_fn: unknown): boolean {\n const fn = helper.string(\"isLogEnabled\", \"fn\", _fn);\n updateDynamicRam(\"isLogEnabled\", getRamCost(Player, \"isLogEnabled\"));\n if (possibleLogs[fn] === undefined) {\n throw makeRuntimeErrorMsg(\"isLogEnabled\", `Invalid argument: ${fn}.`);\n }\n return !workerScript.disableLogs[fn];\n },\n getScriptLogs: function (fn: any, hostname: any, ...scriptArgs: any[]): string[] {\n updateDynamicRam(\"getScriptLogs\", getRamCost(Player, \"getScriptLogs\"));\n const runningScriptObj = getRunningScript(fn, hostname, \"getScriptLogs\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"getScriptLogs\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return [];\n }\n\n return runningScriptObj.logs.slice();\n },\n tail: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any[]): void {\n updateDynamicRam(\"tail\", getRamCost(Player, \"tail\"));\n let runningScriptObj;\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, hostname, \"tail\", scriptArgs);\n }\n if (runningScriptObj == null) {\n workerScript.log(\"tail\", () => getCannotFindRunningScriptErrorMessage(fn, hostname, scriptArgs));\n return;\n }\n\n LogBoxEvents.emit(runningScriptObj);\n },\n nuke: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"tail\", \"hostname\", _hostname);\n updateDynamicRam(\"nuke\", getRamCost(Player, \"nuke\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"nuke\");\n if (!(server instanceof Server)) {\n workerScript.log(\"nuke\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (server.hasAdminRights) {\n workerScript.log(\"nuke\", () => `Already have root access to '${server.hostname}'.`);\n return true;\n }\n if (!Player.hasProgram(Programs.NukeProgram.name)) {\n throw makeRuntimeErrorMsg(\"nuke\", \"You do not have the NUKE.exe virus!\");\n }\n if (server.openPortCount < server.numOpenPortsRequired) {\n throw makeRuntimeErrorMsg(\"nuke\", \"Not enough ports opened to use NUKE.exe virus.\");\n }\n server.hasAdminRights = true;\n workerScript.log(\"nuke\", () => `Executed NUKE.exe virus on '${server.hostname}' to gain root access.`);\n return true;\n },\n brutessh: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"brutessh\", \"hostname\", _hostname);\n updateDynamicRam(\"brutessh\", getRamCost(Player, \"brutessh\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"brutessh\");\n if (!(server instanceof Server)) {\n workerScript.log(\"brutessh\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.BruteSSHProgram.name)) {\n throw makeRuntimeErrorMsg(\"brutessh\", \"You do not have the BruteSSH.exe program!\");\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 return true;\n },\n ftpcrack: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"ftpcrack\", \"hostname\", _hostname);\n updateDynamicRam(\"ftpcrack\", getRamCost(Player, \"ftpcrack\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"ftpcrack\");\n if (!(server instanceof Server)) {\n workerScript.log(\"ftpcrack\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.FTPCrackProgram.name)) {\n throw makeRuntimeErrorMsg(\"ftpcrack\", \"You do not have the FTPCrack.exe program!\");\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 return true;\n },\n relaysmtp: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"relaysmtp\", \"hostname\", _hostname);\n updateDynamicRam(\"relaysmtp\", getRamCost(Player, \"relaysmtp\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"relaysmtp\");\n if (!(server instanceof Server)) {\n workerScript.log(\"relaysmtp\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.RelaySMTPProgram.name)) {\n throw makeRuntimeErrorMsg(\"relaysmtp\", \"You do not have the relaySMTP.exe program!\");\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 return true;\n },\n httpworm: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"httpworm\", \"hostname\", _hostname);\n updateDynamicRam(\"httpworm\", getRamCost(Player, \"httpworm\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"httpworm\");\n if (!(server instanceof Server)) {\n workerScript.log(\"httpworm\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.HTTPWormProgram.name)) {\n throw makeRuntimeErrorMsg(\"httpworm\", \"You do not have the HTTPWorm.exe program!\");\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 return true;\n },\n sqlinject: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"sqlinject\", \"hostname\", _hostname);\n updateDynamicRam(\"sqlinject\", getRamCost(Player, \"sqlinject\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"Takes 1 argument.\");\n }\n const server = safeGetServer(hostname, \"sqlinject\");\n if (!(server instanceof Server)) {\n workerScript.log(\"sqlinject\", () => \"Cannot be executed on this server.\");\n return false;\n }\n if (!Player.hasProgram(Programs.SQLInjectProgram.name)) {\n throw makeRuntimeErrorMsg(\"sqlinject\", \"You do not have the SQLInject.exe program!\");\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 return true;\n },\n run: function (_scriptname: unknown, _threads: unknown = 1, ...args: any[]): number {\n const scriptname = helper.string(\"run\", \"scriptname\", _scriptname);\n const threads = helper.number(\"run\", \"threads\", _threads);\n updateDynamicRam(\"run\", getRamCost(Player, \"run\"));\n if (scriptname === undefined) {\n throw makeRuntimeErrorMsg(\"run\", \"Usage: run(scriptname, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"run\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"run\", \"Could not find server. This is a bug. Report to dev.\");\n }\n\n return runScriptFromScript(Player, \"run\", scriptServer, scriptname, args, workerScript, threads);\n },\n exec: function (_scriptname: unknown, _hostname: unknown, _threads: unknown = 1, ...args: any[]): number {\n const scriptname = helper.string(\"exec\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"exec\", \"hostname\", _hostname);\n const threads = helper.number(\"exec\", \"threads\", _threads);\n updateDynamicRam(\"exec\", getRamCost(Player, \"exec\"));\n if (scriptname === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"exec\", \"Usage: exec(scriptname, server, [numThreads], [arg1], [arg2]...)\");\n }\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"exec\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const server = safeGetServer(hostname, \"exec\");\n return runScriptFromScript(Player, \"exec\", server, scriptname, args, workerScript, threads);\n },\n spawn: function (_scriptname: unknown, _threads: unknown = 1, ...args: any[]): void {\n const scriptname = helper.string(\"spawn\", \"scriptname\", _scriptname);\n const threads = helper.number(\"spawn\", \"threads\", _threads);\n updateDynamicRam(\"spawn\", getRamCost(Player, \"spawn\"));\n if (!scriptname || !threads) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Usage: spawn(scriptname, threads)\");\n }\n\n const spawnDelay = 10;\n setTimeout(() => {\n if (isNaN(threads) || threads <= 0) {\n throw makeRuntimeErrorMsg(\"spawn\", `Invalid thread count. Must be numeric and > 0, is ${threads}`);\n }\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"spawn\", \"Could not find server. This is a bug. Report to dev\");\n }\n\n return runScriptFromScript(Player, \"spawn\", scriptServer, scriptname, args, workerScript, threads);\n }, spawnDelay * 1e3);\n\n workerScript.log(\"spawn\", () => `Will execute '${scriptname}' in ${spawnDelay} seconds`);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"spawn\", () => \"Exiting...\");\n }\n },\n kill: function (filename: any, hostname?: any, ...scriptArgs: any[]): boolean {\n updateDynamicRam(\"kill\", getRamCost(Player, \"kill\"));\n\n let res;\n const killByPid = typeof filename === \"number\";\n if (killByPid) {\n // Kill by pid\n res = killWorkerScript(filename);\n } else {\n // Kill by filename/hostname\n if (filename === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"kill\", \"Usage: kill(scriptname, server, [arg1], [arg2]...)\");\n }\n\n const server = safeGetServer(hostname, \"kill\");\n const runningScriptObj = getRunningScript(filename, hostname, \"kill\", scriptArgs);\n if (runningScriptObj == null) {\n workerScript.log(\"kill\", () => getCannotFindRunningScriptErrorMessage(filename, hostname, scriptArgs));\n return false;\n }\n\n res = killWorkerScript(runningScriptObj, server.hostname);\n }\n\n if (res) {\n if (killByPid) {\n workerScript.log(\"kill\", () => `Killing script with PID ${filename}`);\n } else {\n workerScript.log(\n \"kill\",\n () => `Killing '${filename}' on '${hostname}' with args: ${arrayToString(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(\n \"kill\",\n () => `No such script '${filename}' on '${hostname}' with args: ${arrayToString(scriptArgs)}`,\n );\n }\n return false;\n }\n },\n killall: function (_hostname: unknown = workerScript.hostname): boolean {\n const hostname = helper.string(\"killall\", \"hostname\", _hostname);\n updateDynamicRam(\"killall\", getRamCost(Player, \"killall\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"killall\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"killall\");\n const scriptsRunning = server.runningScripts.length > 0;\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n killWorkerScript(server.runningScripts[i], server.hostname, false);\n }\n WorkerScriptStartStopEventEmitter.emit();\n workerScript.log(\n \"killall\",\n () => `Killing all scripts on '${server.hostname}'. May take a few minutes for the scripts to die.`,\n );\n\n return scriptsRunning;\n },\n exit: function (): void {\n updateDynamicRam(\"exit\", getRamCost(Player, \"exit\"));\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n if (killWorkerScript(workerScript)) {\n workerScript.log(\"exit\", () => \"Exiting...\");\n } else {\n workerScript.log(\"exit\", () => \"Failed. This is a bug. Report to dev.\");\n }\n },\n scp: async function (scriptname: any, _hostname1: unknown, hostname2?: any): Promise {\n const hostname1 = helper.string(\"scp\", \"hostname1\", _hostname1);\n updateDynamicRam(\"scp\", getRamCost(Player, \"scp\"));\n if (arguments.length !== 2 && arguments.length !== 3) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n if (scriptname && scriptname.constructor === Array) {\n // Recursively call scp on all elements of array\n const scripts: Array = scriptname;\n if (scripts.length === 0) {\n throw makeRuntimeErrorMsg(\"scp\", \"No scripts to copy\");\n }\n let res = true;\n await Promise.all(\n scripts.map(async function (script) {\n if (!(await NetscriptFunctions(workerScript).scp(script, hostname1, hostname2))) {\n res = false;\n }\n }),\n );\n return Promise.resolve(res);\n }\n\n // Invalid file type\n if (!isValidFilePath(scriptname)) {\n throw makeRuntimeErrorMsg(\"scp\", `Invalid filename: '${scriptname}'`);\n }\n\n // Invalid file name\n if (!scriptname.endsWith(\".lit\") && !isScriptFilename(scriptname) && !scriptname.endsWith(\"txt\")) {\n throw makeRuntimeErrorMsg(\"scp\", \"Only works for scripts, .lit and .txt files\");\n }\n\n let destServer: BaseServer | null;\n let currServ: BaseServer | null;\n\n if (hostname2 != null) {\n // 3 Argument version: scriptname, source, destination\n if (scriptname === undefined || hostname1 === undefined || hostname2 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname2, \"scp\");\n currServ = safeGetServer(hostname1, \"scp\");\n } else if (hostname1 != null) {\n // 2 Argument version: scriptname, destination\n if (scriptname === undefined || hostname1 === undefined) {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n destServer = safeGetServer(hostname1, \"scp\");\n currServ = GetServer(workerScript.hostname);\n if (currServ == null) {\n throw makeRuntimeErrorMsg(\n \"scp\",\n \"Could not find server hostname for this script. This is a bug. Report to dev.\",\n );\n }\n } else {\n throw makeRuntimeErrorMsg(\"scp\", \"Takes 2 or 3 arguments\");\n }\n\n // Scp for lit files\n if (scriptname.endsWith(\".lit\")) {\n let found = false;\n for (let i = 0; i < currServ.messages.length; ++i) {\n if (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 Promise.resolve(false);\n }\n\n for (let 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 Promise.resolve(true); // Already exists\n }\n }\n destServer.messages.push(scriptname);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for text files\n if (scriptname.endsWith(\".txt\")) {\n let txtFile;\n for (let i = 0; i < currServ.textFiles.length; ++i) {\n if (currServ.textFiles[i].fn === scriptname) {\n txtFile = currServ.textFiles[i];\n break;\n }\n }\n if (txtFile === undefined) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n for (let 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 Promise.resolve(true);\n }\n }\n const newFile = new TextFile(txtFile.fn, txtFile.text);\n destServer.textFiles.push(newFile);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return Promise.resolve(true);\n }\n\n // Scp for script files\n let sourceScript = null;\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 if (sourceScript == null) {\n workerScript.log(\"scp\", () => `File '${scriptname}' does not exist.`);\n return Promise.resolve(false);\n }\n\n // Overwrite script if it already exists\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];\n // 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 if (oldScript.code === sourceScript.code) return Promise.resolve(true);\n oldScript.code = sourceScript.code;\n oldScript.ramUsage = sourceScript.ramUsage;\n oldScript.markUpdated();\n return Promise.resolve(true);\n }\n }\n\n // Create new script if it does not already exist\n const newScript = new Script(Player, scriptname);\n newScript.code = sourceScript.code;\n newScript.ramUsage = sourceScript.ramUsage;\n newScript.server = destServer.hostname;\n destServer.scripts.push(newScript);\n workerScript.log(\"scp\", () => `File '${scriptname}' copied over to '${destServer?.hostname}'.`);\n return new Promise((resolve) => {\n if (destServer === null) {\n resolve(false);\n return;\n }\n newScript.updateRamUsage(Player, destServer.scripts).then(() => resolve(true));\n });\n },\n ls: function (_hostname: unknown, _grep: unknown = \"\"): string[] {\n const hostname = helper.string(\"ls\", \"hostname\", _hostname);\n const grep = helper.string(\"ls\", \"grep\", _grep);\n updateDynamicRam(\"ls\", getRamCost(Player, \"ls\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"ls\", \"Usage: ls(hostname/ip, [grep filter])\");\n }\n const server = safeGetServer(hostname, \"ls\");\n\n // Get the grep filter, if one exists\n let filter = \"\";\n if (arguments.length >= 2) {\n filter = grep.toString();\n }\n\n const allFiles = [];\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 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 for (let i = 0; i < server.messages.length; i++) {\n if (filter) {\n const msg = server.messages[i];\n if (msg.includes(filter)) {\n allFiles.push(msg);\n }\n } else {\n allFiles.push(server.messages[i]);\n }\n }\n\n for (let 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 (let 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 }\n\n // Sort the files alphabetically then print each\n allFiles.sort();\n return allFiles;\n },\n ps: function (_hostname: unknown = workerScript.hostname): ProcessInfo[] {\n const hostname = helper.string(\"ps\", \"hostname\", _hostname);\n updateDynamicRam(\"ps\", getRamCost(Player, \"ps\"));\n const server = safeGetServer(hostname, \"ps\");\n const processes = [];\n for (const script of server.runningScripts) {\n processes.push({\n filename: script.filename,\n threads: script.threads,\n args: script.args.slice(),\n pid: script.pid,\n });\n }\n return processes;\n },\n hasRootAccess: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"hasRootAccess\", \"hostname\", _hostname);\n updateDynamicRam(\"hasRootAccess\", getRamCost(Player, \"hasRootAccess\"));\n if (hostname === undefined) {\n throw makeRuntimeErrorMsg(\"hasRootAccess\", \"Takes 1 argument\");\n }\n const server = safeGetServer(hostname, \"hasRootAccess\");\n return server.hasAdminRights;\n },\n getHostname: function (): string {\n updateDynamicRam(\"getHostname\", getRamCost(Player, \"getHostname\"));\n const scriptServer = GetServer(workerScript.hostname);\n if (scriptServer == null) {\n throw makeRuntimeErrorMsg(\"getHostname\", \"Could not find server. This is a bug. Report to dev.\");\n }\n return scriptServer.hostname;\n },\n getHackingLevel: function (): number {\n updateDynamicRam(\"getHackingLevel\", getRamCost(Player, \"getHackingLevel\"));\n Player.updateSkillLevels();\n workerScript.log(\"getHackingLevel\", () => `returned ${Player.hacking}`);\n return Player.hacking;\n },\n getHackingMultipliers: function (): HackingMultipliers {\n updateDynamicRam(\"getHackingMultipliers\", getRamCost(Player, \"getHackingMultipliers\"));\n return {\n chance: Player.hacking_chance_mult,\n speed: Player.hacking_speed_mult,\n money: Player.hacking_money_mult,\n growth: Player.hacking_grow_mult,\n };\n },\n getHacknetMultipliers: function (): HacknetMultipliers {\n updateDynamicRam(\"getHacknetMultipliers\", getRamCost(Player, \"getHacknetMultipliers\"));\n return {\n production: Player.hacknet_node_money_mult,\n purchaseCost: Player.hacknet_node_purchase_cost_mult,\n ramCost: Player.hacknet_node_ram_cost_mult,\n coreCost: Player.hacknet_node_core_cost_mult,\n levelCost: Player.hacknet_node_level_cost_mult,\n };\n },\n getBitNodeMultipliers: function (): IBNMults {\n updateDynamicRam(\"getBitNodeMultipliers\", getRamCost(Player, \"getBitNodeMultipliers\"));\n if (SourceFileFlags[5] <= 0 && Player.bitNodeN !== 5) {\n throw makeRuntimeErrorMsg(\"getBitNodeMultipliers\", \"Requires Source-File 5 to run.\");\n }\n const copy = Object.assign({}, BitNodeMultipliers);\n return copy;\n },\n getServer: function (_hostname: unknown = workerScript.hostname): IServerDef {\n const hostname = helper.string(\"getServer\", \"hostname\", _hostname);\n updateDynamicRam(\"getServer\", getRamCost(Player, \"getServer\"));\n const server = safeGetServer(hostname, \"getServer\");\n const copy = Object.assign({}, server) as any;\n // These fields should be hidden.\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 if (!copy.baseDifficulty) copy.baseDifficulty = 0;\n if (!copy.hackDifficulty) copy.hackDifficulty = 0;\n if (!copy.minDifficulty) copy.minDifficulty = 0;\n if (!copy.moneyAvailable) copy.moneyAvailable = 0;\n if (!copy.moneyMax) copy.moneyMax = 0;\n if (!copy.numOpenPortsRequired) copy.numOpenPortsRequired = 0;\n if (!copy.openPortCount) copy.openPortCount = 0;\n if (!copy.requiredHackingSkill) copy.requiredHackingSkill = 0;\n if (!copy.serverGrowth) copy.serverGrowth = 0;\n return copy;\n },\n getServerMoneyAvailable: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMoneyAvailable\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMoneyAvailable\", getRamCost(Player, \"getServerMoneyAvailable\"));\n const server = safeGetServer(hostname, \"getServerMoneyAvailable\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMoneyAvailable\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMoneyAvailable\")) {\n return 0;\n }\n if (server.hostname == \"home\") {\n // Return player's money\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned player's money: ${numeralWrapper.formatMoney(Player.money)}`,\n );\n return Player.money;\n }\n workerScript.log(\n \"getServerMoneyAvailable\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyAvailable)} for '${server.hostname}'`,\n );\n return server.moneyAvailable;\n },\n getServerSecurityLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerSecurityLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerSecurityLevel\", getRamCost(Player, \"getServerSecurityLevel\"));\n const server = safeGetServer(hostname, \"getServerSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.hackDifficulty)} for '${server.hostname}'`,\n );\n return server.hackDifficulty;\n },\n getServerBaseSecurityLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerBaseSecurityLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerBaseSecurityLevel\", getRamCost(Player, \"getServerBaseSecurityLevel\"));\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `getServerBaseSecurityLevel is deprecated because it's not useful.`,\n );\n const server = safeGetServer(hostname, \"getServerBaseSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerBaseSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerBaseSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerBaseSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.baseDifficulty)} for '${server.hostname}'`,\n );\n return server.baseDifficulty;\n },\n getServerMinSecurityLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMinSecurityLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMinSecurityLevel\", getRamCost(Player, \"getServerMinSecurityLevel\"));\n const server = safeGetServer(hostname, \"getServerMinSecurityLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMinSecurityLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerMinSecurityLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerMinSecurityLevel\",\n () => `returned ${numeralWrapper.formatServerSecurity(server.minDifficulty)} for ${server.hostname}`,\n );\n return server.minDifficulty;\n },\n getServerRequiredHackingLevel: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerRequiredHackingLevel\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerRequiredHackingLevel\", getRamCost(Player, \"getServerRequiredHackingLevel\"));\n const server = safeGetServer(hostname, \"getServerRequiredHackingLevel\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerRequiredHackingLevel\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerRequiredHackingLevel\")) {\n return 1;\n }\n workerScript.log(\n \"getServerRequiredHackingLevel\",\n () => `returned ${numeralWrapper.formatSkill(server.requiredHackingSkill)} for '${server.hostname}'`,\n );\n return server.requiredHackingSkill;\n },\n getServerMaxMoney: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMaxMoney\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMaxMoney\", getRamCost(Player, \"getServerMaxMoney\"));\n const server = safeGetServer(hostname, \"getServerMaxMoney\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerMaxMoney\", () => \"Cannot be executed on this server.\");\n return 0;\n }\n if (failOnHacknetServer(server, \"getServerMaxMoney\")) {\n return 0;\n }\n workerScript.log(\n \"getServerMaxMoney\",\n () => `returned ${numeralWrapper.formatMoney(server.moneyMax)} for '${server.hostname}'`,\n );\n return server.moneyMax;\n },\n getServerGrowth: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerGrowth\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerGrowth\", getRamCost(Player, \"getServerGrowth\"));\n const server = safeGetServer(hostname, \"getServerGrowth\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerGrowth\", () => \"Cannot be executed on this server.\");\n return 1;\n }\n if (failOnHacknetServer(server, \"getServerGrowth\")) {\n return 1;\n }\n workerScript.log(\"getServerGrowth\", () => `returned ${server.serverGrowth} for '${server.hostname}'`);\n return server.serverGrowth;\n },\n getServerNumPortsRequired: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerNumPortsRequired\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerNumPortsRequired\", getRamCost(Player, \"getServerNumPortsRequired\"));\n const server = safeGetServer(hostname, \"getServerNumPortsRequired\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getServerNumPortsRequired\", () => \"Cannot be executed on this server.\");\n return 5;\n }\n if (failOnHacknetServer(server, \"getServerNumPortsRequired\")) {\n return 5;\n }\n workerScript.log(\n \"getServerNumPortsRequired\",\n () => `returned ${server.numOpenPortsRequired} for '${server.hostname}'`,\n );\n return server.numOpenPortsRequired;\n },\n getServerRam: function (_hostname: unknown): [number, number] {\n const hostname = helper.string(\"getServerRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerRam\", getRamCost(Player, \"getServerRam\"));\n workerScript.log(\n \"getServerRam\",\n () => `getServerRam is deprecated in favor of getServerMaxRam / getServerUsedRam`,\n );\n const server = safeGetServer(hostname, \"getServerRam\");\n workerScript.log(\n \"getServerRam\",\n () => `returned [${numeralWrapper.formatRAM(server.maxRam)}, ${numeralWrapper.formatRAM(server.ramUsed)}]`,\n );\n return [server.maxRam, server.ramUsed];\n },\n getServerMaxRam: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerMaxRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerMaxRam\", getRamCost(Player, \"getServerMaxRam\"));\n const server = safeGetServer(hostname, \"getServerMaxRam\");\n workerScript.log(\"getServerMaxRam\", () => `returned ${numeralWrapper.formatRAM(server.maxRam)}`);\n return server.maxRam;\n },\n getServerUsedRam: function (_hostname: unknown): number {\n const hostname = helper.string(\"getServerUsedRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getServerUsedRam\", getRamCost(Player, \"getServerUsedRam\"));\n const server = safeGetServer(hostname, \"getServerUsedRam\");\n workerScript.log(\"getServerUsedRam\", () => `returned ${numeralWrapper.formatRAM(server.ramUsed)}`);\n return server.ramUsed;\n },\n serverExists: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"serverExists\", \"hostname\", _hostname);\n updateDynamicRam(\"serverExists\", getRamCost(Player, \"serverExists\"));\n return GetServer(hostname) !== null;\n },\n fileExists: function (_filename: unknown, _hostname: unknown = workerScript.hostname): boolean {\n const filename = helper.string(\"fileExists\", \"filename\", _filename);\n const hostname = helper.string(\"fileExists\", \"hostname\", _hostname);\n updateDynamicRam(\"fileExists\", getRamCost(Player, \"fileExists\"));\n if (filename === undefined) {\n throw makeRuntimeErrorMsg(\"fileExists\", \"Usage: fileExists(scriptname, [server])\");\n }\n const server = safeGetServer(hostname, \"fileExists\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (filename == server.scripts[i].filename) {\n return true;\n }\n }\n for (let i = 0; i < server.programs.length; ++i) {\n if (filename.toLowerCase() == server.programs[i].toLowerCase()) {\n return true;\n }\n }\n for (let i = 0; i < server.messages.length; ++i) {\n if (filename.toLowerCase() === server.messages[i].toLowerCase()) {\n return true;\n }\n }\n const txtFile = getTextFile(filename, server);\n return txtFile != null;\n },\n isRunning: function (fn: any, hostname: any = workerScript.hostname, ...scriptArgs: any[]): boolean {\n updateDynamicRam(\"isRunning\", getRamCost(Player, \"isRunning\"));\n if (fn === undefined || hostname === undefined) {\n throw makeRuntimeErrorMsg(\"isRunning\", \"Usage: isRunning(scriptname, server, [arg1], [arg2]...)\");\n }\n if (typeof fn === \"number\") {\n return getRunningScriptByPid(fn, \"isRunning\") != null;\n } else {\n return getRunningScript(fn, hostname, \"isRunning\", scriptArgs) != null;\n }\n },\n getPurchasedServerLimit: function (): number {\n updateDynamicRam(\"getPurchasedServerLimit\", getRamCost(Player, \"getPurchasedServerLimit\"));\n\n return getPurchaseServerLimit();\n },\n getPurchasedServerMaxRam: function (): number {\n updateDynamicRam(\"getPurchasedServerMaxRam\", getRamCost(Player, \"getPurchasedServerMaxRam\"));\n\n return getPurchaseServerMaxRam();\n },\n getPurchasedServerCost: function (_ram: unknown): number {\n const ram = helper.number(\"getPurchasedServerCost\", \"ram\", _ram);\n updateDynamicRam(\"getPurchasedServerCost\", getRamCost(Player, \"getPurchasedServerCost\"));\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n workerScript.log(\"getPurchasedServerCost\", () => `Invalid argument: ram='${ram}'`);\n return Infinity;\n }\n\n return cost;\n },\n purchaseServer: function (_name: unknown, _ram: unknown): string {\n const name = helper.string(\"purchaseServer\", \"name\", _name);\n const ram = helper.number(\"purchaseServer\", \"ram\", _ram);\n if (arguments.length !== 2) throw makeRuntimeErrorMsg(\"purchaseServer\", \"Takes 2 arguments\");\n updateDynamicRam(\"purchaseServer\", getRamCost(Player, \"purchaseServer\"));\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s+/g, \"\");\n if (hostnameStr == \"\") {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: hostname='${hostnameStr}'`);\n return \"\";\n }\n\n if (Player.purchasedServers.length >= getPurchaseServerLimit()) {\n workerScript.log(\n \"purchaseServer\",\n () =>\n `You have reached the maximum limit of ${getPurchaseServerLimit()} servers. You cannot purchase any more.`,\n );\n return \"\";\n }\n\n const cost = getPurchaseServerCost(ram);\n if (cost === Infinity) {\n if (ram > getPurchaseServerMaxRam()) {\n workerScript.log(\n \"purchaseServer\",\n () => `Invalid argument: ram='${ram}' must not be greater than getPurchaseServerMaxRam`,\n );\n } else {\n workerScript.log(\"purchaseServer\", () => `Invalid argument: ram='${ram}' must be a positive power of 2`);\n }\n\n return \"\";\n }\n\n if (Player.money < cost) {\n workerScript.log(\n \"purchaseServer\",\n () => `Not enough money to purchase server. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return \"\";\n }\n const newServ = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: hostnameStr,\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: true,\n purchasedByPlayer: true,\n maxRam: ram,\n });\n AddToAllServers(newServ);\n\n Player.purchasedServers.push(newServ.hostname);\n const homeComputer = Player.getHomeComputer();\n homeComputer.serversOnNetwork.push(newServ.hostname);\n newServ.serversOnNetwork.push(homeComputer.hostname);\n Player.loseMoney(cost, \"servers\");\n workerScript.log(\n \"purchaseServer\",\n () => `Purchased new server with hostname '${newServ.hostname}' for ${numeralWrapper.formatMoney(cost)}`,\n );\n return newServ.hostname;\n },\n deleteServer: function (_name: unknown): boolean {\n const name = helper.string(\"purchaseServer\", \"name\", _name);\n updateDynamicRam(\"deleteServer\", getRamCost(Player, \"deleteServer\"));\n let hostnameStr = String(name);\n hostnameStr = hostnameStr.replace(/\\s\\s+/g, \"\");\n const server = GetServer(hostnameStr);\n if (!(server instanceof Server)) {\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 const hostname = server.hostname;\n\n // Can't delete server you're currently connected to\n if (server.isConnectedTo) {\n workerScript.log(\"deleteServer\", () => \"You are currently connected to the server you are trying to delete.\");\n return false;\n }\n\n // A server cannot delete itself\n if (hostname === workerScript.hostname) {\n workerScript.log(\"deleteServer\", () => \"Cannot delete the server this script is running on.\");\n return false;\n }\n\n // Delete all scripts running on server\n if (server.runningScripts.length > 0) {\n workerScript.log(\n \"deleteServer\",\n () => `Cannot delete server '${hostname}' because it still has scripts running.`,\n );\n return false;\n }\n\n // Delete from player's purchasedServers array\n let found = false;\n for (let i = 0; i < Player.purchasedServers.length; ++i) {\n if (hostname == Player.purchasedServers[i]) {\n found = true;\n Player.purchasedServers.splice(i, 1);\n break;\n }\n }\n\n if (!found) {\n workerScript.log(\n \"deleteServer\",\n () => `Could not identify server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n }\n\n // Delete from all servers\n DeleteServer(hostname);\n\n // Delete from home computer\n found = false;\n const homeComputer = Player.getHomeComputer();\n for (let i = 0; i < homeComputer.serversOnNetwork.length; ++i) {\n if (hostname == homeComputer.serversOnNetwork[i]) {\n homeComputer.serversOnNetwork.splice(i, 1);\n workerScript.log(\"deleteServer\", () => `Deleted server '${hostnameStr}`);\n return true;\n }\n }\n // Wasn't found on home computer\n workerScript.log(\n \"deleteServer\",\n () => `Could not find server ${hostname} as a purchased server. This is a bug. Report to dev.`,\n );\n return false;\n },\n getPurchasedServers: function (): string[] {\n updateDynamicRam(\"getPurchasedServers\", getRamCost(Player, \"getPurchasedServers\"));\n const res: string[] = [];\n Player.purchasedServers.forEach(function (hostname) {\n res.push(hostname);\n });\n return res;\n },\n writePort: function (_port: unknown, data: any = \"\"): Promise {\n const port = helper.number(\"writePort\", \"port\", _port);\n updateDynamicRam(\"writePort\", getRamCost(Player, \"writePort\"));\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"writePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n const iport = helper.getValidPort(\"writePort\", port);\n return Promise.resolve(iport.write(data));\n },\n write: function (_port: unknown, data: any = \"\", _mode: unknown = \"a\"): Promise {\n const port = helper.string(\"write\", \"port\", _port);\n const mode = helper.string(\"write\", \"mode\", _mode);\n updateDynamicRam(\"write\", getRamCost(Player, \"write\"));\n if (isString(port)) {\n // Write to script or text file\n let fn = port;\n if (!isValidFilePath(fn)) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid filepath: ${fn}`);\n }\n\n if (fn.lastIndexOf(\"/\") === 0) {\n fn = removeLeadingSlash(fn);\n }\n\n // Coerce 'data' to be a string\n try {\n data = String(data);\n } catch (e: any) {\n throw makeRuntimeErrorMsg(\"write\", `Invalid data (${e}). Data being written must be convertible to a string`);\n }\n\n const server = workerScript.getServer();\n if (server == null) {\n throw makeRuntimeErrorMsg(\"write\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Write to script\n let script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n // Create a new script\n script = new Script(Player, fn, data, server.hostname, server.scripts);\n server.scripts.push(script);\n return script.updateRamUsage(Player, server.scripts);\n }\n mode === \"w\" ? (script.code = data) : (script.code += data);\n return script.updateRamUsage(Player, server.scripts);\n } else {\n // Write to text file\n const txtFile = getTextFile(fn, server);\n if (txtFile == null) {\n createTextFile(fn, data, server);\n return Promise.resolve();\n }\n if (mode === \"w\") {\n txtFile.write(data);\n } else {\n txtFile.append(data);\n }\n }\n return Promise.resolve();\n } else {\n throw makeRuntimeErrorMsg(\"write\", `Invalid argument: ${port}`);\n }\n },\n tryWritePort: function (_port: unknown, data: any = \"\"): Promise {\n let port = helper.number(\"tryWritePort\", \"port\", _port);\n updateDynamicRam(\"tryWritePort\", getRamCost(Player, \"tryWritePort\"));\n if (typeof data !== \"string\" && typeof data !== \"number\") {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Trying to write invalid data to a port: only strings and numbers are valid.`,\n );\n }\n if (!isNaN(port)) {\n port = Math.round(port);\n if (port < 1 || port > CONSTANTS.NumNetscriptPorts) {\n throw makeRuntimeErrorMsg(\n \"tryWritePort\",\n `Invalid port: ${port}. Only ports 1-${CONSTANTS.NumNetscriptPorts} are valid.`,\n );\n }\n const iport = NetscriptPorts[port - 1];\n if (iport == null || !(iport instanceof Object)) {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Could not find port: ${port}. This is a bug. Report to dev.`);\n }\n return Promise.resolve(iport.tryWrite(data));\n } else {\n throw makeRuntimeErrorMsg(\"tryWritePort\", `Invalid argument: ${port}`);\n }\n },\n readPort: function (_port: unknown): any {\n const port = helper.number(\"readPort\", \"port\", _port);\n updateDynamicRam(\"readPort\", getRamCost(Player, \"readPort\"));\n // Read from port\n const iport = helper.getValidPort(\"readPort\", port);\n const x = iport.read();\n return x;\n },\n read: function (_port: unknown): string {\n const port = helper.string(\"read\", \"port\", _port);\n updateDynamicRam(\"read\", getRamCost(Player, \"read\"));\n if (isString(port)) {\n // Read from script or text file\n const fn = port;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"read\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n if (isScriptFilename(fn)) {\n // Read from script\n const script = workerScript.getScriptOnServer(fn, server);\n if (script == null) {\n return \"\";\n }\n return script.code;\n } else {\n // Read from text file\n const txtFile = getTextFile(fn, server);\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: unknown): any {\n const port = helper.number(\"peek\", \"port\", _port);\n updateDynamicRam(\"peek\", getRamCost(Player, \"peek\"));\n const iport = helper.getValidPort(\"peek\", port);\n const x = iport.peek();\n return x;\n },\n clear: function (_file: unknown): void {\n const file = helper.string(\"peek\", \"file\", _file);\n updateDynamicRam(\"clear\", getRamCost(Player, \"clear\"));\n if (isString(file)) {\n // Clear text file\n const fn = file;\n const server = GetServer(workerScript.hostname);\n if (server == null) {\n throw makeRuntimeErrorMsg(\"clear\", \"Error getting Server. This is a bug. Report to dev.\");\n }\n const txtFile = getTextFile(fn, server);\n if (txtFile != null) {\n txtFile.write(\"\");\n }\n } else {\n throw makeRuntimeErrorMsg(\"clear\", `Invalid argument: ${file}`);\n }\n },\n clearPort: function (_port: unknown): void {\n const port = helper.number(\"clearPort\", \"port\", _port);\n updateDynamicRam(\"clearPort\", getRamCost(Player, \"clearPort\"));\n // Clear port\n const iport = helper.getValidPort(\"clearPort\", port);\n iport.clear();\n },\n getPortHandle: function (_port: unknown): IPort {\n const port = helper.number(\"getPortHandle\", \"port\", _port);\n updateDynamicRam(\"getPortHandle\", getRamCost(Player, \"getPortHandle\"));\n const iport = helper.getValidPort(\"getPortHandle\", port);\n return iport;\n },\n rm: function (_fn: unknown, hostname: any): boolean {\n const fn = helper.string(\"rm\", \"fn\", _fn);\n updateDynamicRam(\"rm\", getRamCost(Player, \"rm\"));\n\n if (hostname == null || hostname === \"\") {\n hostname = workerScript.hostname;\n }\n const s = safeGetServer(hostname, \"rm\");\n\n const status = s.removeFile(fn);\n if (!status.res) {\n workerScript.log(\"rm\", () => status.msg + \"\");\n }\n\n return status.res;\n },\n scriptRunning: function (_scriptname: unknown, _hostname: unknown): boolean {\n const scriptname = helper.string(\"scriptRunning\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"scriptRunning\", \"hostname\", _hostname);\n updateDynamicRam(\"scriptRunning\", getRamCost(Player, \"scriptRunning\"));\n const server = safeGetServer(hostname, \"scriptRunning\");\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename == scriptname) {\n return true;\n }\n }\n return false;\n },\n scriptKill: function (_scriptname: unknown, _hostname: unknown): boolean {\n const scriptname = helper.string(\"scriptKill\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"scriptKill\", \"hostname\", _hostname);\n updateDynamicRam(\"scriptKill\", getRamCost(Player, \"scriptKill\"));\n const server = safeGetServer(hostname, \"scriptKill\");\n let suc = false;\n for (let i = 0; i < server.runningScripts.length; i++) {\n if (server.runningScripts[i].filename == scriptname) {\n killWorkerScript(server.runningScripts[i], server.hostname);\n suc = true;\n i--;\n }\n }\n return suc;\n },\n getScriptName: function (): string {\n updateDynamicRam(\"getScriptName\", getRamCost(Player, \"getScriptName\"));\n return workerScript.name;\n },\n getScriptRam: function (_scriptname: unknown, _hostname: unknown = workerScript.hostname): number {\n const scriptname = helper.string(\"getScriptRam\", \"scriptname\", _scriptname);\n const hostname = helper.string(\"getScriptRam\", \"hostname\", _hostname);\n updateDynamicRam(\"getScriptRam\", getRamCost(Player, \"getScriptRam\"));\n const server = safeGetServer(hostname, \"getScriptRam\");\n for (let i = 0; i < server.scripts.length; ++i) {\n if (server.scripts[i].filename == scriptname) {\n return server.scripts[i].ramUsage;\n }\n }\n return 0;\n },\n getRunningScript: function (fn: any, hostname: any, ...args: any[]): IRunningScriptDef | null {\n updateDynamicRam(\"getRunningScript\", getRamCost(Player, \"getRunningScript\"));\n\n let runningScript;\n if (fn === undefined && hostname === undefined && args.length === 0) {\n runningScript = workerScript.scriptRef;\n } else if (typeof fn === \"number\") {\n runningScript = getRunningScriptByPid(fn, \"getRunningScript\");\n } else {\n runningScript = getRunningScript(fn, hostname, \"getRunningScript\", args);\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 (_hostname: unknown = workerScript.hostname): number {\n const hostname = helper.string(\"getHackTime\", \"hostname\", _hostname);\n updateDynamicRam(\"getHackTime\", getRamCost(Player, \"getHackTime\"));\n const server = safeGetServer(hostname, \"getHackTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getHackTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getHackTime\")) {\n return Infinity;\n }\n\n return calculateHackingTime(server, Player) * 1000;\n },\n getGrowTime: function (_hostname: unknown = workerScript.hostname): number {\n const hostname = helper.string(\"getGrowTime\", \"hostname\", _hostname);\n updateDynamicRam(\"getGrowTime\", getRamCost(Player, \"getGrowTime\"));\n const server = safeGetServer(hostname, \"getGrowTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getGrowTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getGrowTime\")) {\n return Infinity;\n }\n\n return calculateGrowTime(server, Player) * 1000;\n },\n getWeakenTime: function (_hostname: unknown = workerScript.hostname): number {\n const hostname = helper.string(\"getWeakenTime\", \"hostname\", _hostname);\n updateDynamicRam(\"getWeakenTime\", getRamCost(Player, \"getWeakenTime\"));\n const server = safeGetServer(hostname, \"getWeakenTime\");\n if (!(server instanceof Server)) {\n workerScript.log(\"getWeakenTime\", () => \"invalid for this kind of server\");\n return Infinity;\n }\n if (failOnHacknetServer(server, \"getWeakenTime\")) {\n return Infinity;\n }\n\n return calculateWeakenTime(server, Player) * 1000;\n },\n getScriptIncome: function (scriptname?: any, hostname?: any, ...args: any[]): any {\n updateDynamicRam(\"getScriptIncome\", getRamCost(Player, \"getScriptIncome\"));\n if (arguments.length === 0) {\n const res = [];\n\n // First element is total income of all currently running scripts\n let total = 0;\n for (const script of workerScripts.values()) {\n total += script.scriptRef.onlineMoneyMade / script.scriptRef.onlineRunningTime;\n }\n res.push(total);\n\n // Second element is total income you've earned from scripts since you installed Augs\n res.push(Player.scriptProdSinceLastAug / (Player.playtimeSinceLastAug / 1000));\n return res;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptIncome\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptIncome\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineMoneyMade / runningScriptObj.onlineRunningTime;\n }\n },\n getScriptExpGain: function (scriptname?: any, hostname?: any, ...args: any[]): number {\n updateDynamicRam(\"getScriptExpGain\", getRamCost(Player, \"getScriptExpGain\"));\n if (arguments.length === 0) {\n let total = 0;\n for (const ws of workerScripts.values()) {\n total += ws.scriptRef.onlineExpGained / ws.scriptRef.onlineRunningTime;\n }\n return total;\n } else {\n // Get income for a particular script\n const server = safeGetServer(hostname, \"getScriptExpGain\");\n const runningScriptObj = findRunningScript(scriptname, args, server);\n if (runningScriptObj == null) {\n workerScript.log(\n \"getScriptExpGain\",\n () => `No such script '${scriptname}' on '${server.hostname}' with args: ${arrayToString(args)}`,\n );\n return -1;\n }\n return runningScriptObj.onlineExpGained / runningScriptObj.onlineRunningTime;\n }\n },\n nFormat: function (_n: unknown, _format: unknown): string {\n const n = helper.number(\"nFormat\", \"n\", _n);\n const format = helper.string(\"nFormat\", \"format\", _format);\n updateDynamicRam(\"nFormat\", getRamCost(Player, \"nFormat\"));\n if (isNaN(n)) {\n return \"\";\n }\n\n return numeralWrapper.format(n, format);\n },\n tFormat: function (_milliseconds: unknown, _milliPrecision: unknown = false): string {\n const milliseconds = helper.number(\"tFormat\", \"milliseconds\", _milliseconds);\n const milliPrecision = helper.boolean(_milliPrecision);\n updateDynamicRam(\"tFormat\", getRamCost(Player, \"tFormat\"));\n return convertTimeMsToTimeElapsedString(milliseconds, milliPrecision);\n },\n getTimeSinceLastAug: function (): number {\n updateDynamicRam(\"getTimeSinceLastAug\", getRamCost(Player, \"getTimeSinceLastAug\"));\n return Player.playtimeSinceLastAug;\n },\n alert: function (_message: unknown): void {\n const message = helper.string(\"alert\", \"message\", _message);\n updateDynamicRam(\"alert\", getRamCost(Player, \"alert\"));\n dialogBoxCreate(message);\n },\n toast: function (_message: unknown, _variant: unknown = \"success\", duration: any = 2000): void {\n const message = helper.string(\"toast\", \"message\", _message);\n const variant = helper.string(\"toast\", \"variant\", _variant);\n updateDynamicRam(\"toast\", getRamCost(Player, \"toast\"));\n if (![\"success\", \"info\", \"warning\", \"error\"].includes(variant))\n throw new Error(`variant must be one of \"success\", \"info\", \"warning\", or \"error\"`);\n SnackbarEvents.emit(message, variant as any, duration);\n },\n prompt: function (_txt: unknown, options?: { type?: string; options?: string[] }): Promise {\n const txt = helper.string(\"toast\", \"txt\", _txt);\n updateDynamicRam(\"prompt\", getRamCost(Player, \"prompt\"));\n\n return new Promise(function (resolve) {\n PromptEvent.emit({\n txt: txt,\n options,\n resolve: resolve,\n });\n });\n },\n wget: async function (\n _url: unknown,\n _target: unknown,\n _hostname: unknown = workerScript.hostname,\n ): Promise {\n const url = helper.string(\"wget\", \"url\", _url);\n const target = helper.string(\"wget\", \"target\", _target);\n const hostname = helper.string(\"wget\", \"hostname\", _hostname);\n updateDynamicRam(\"wget\", getRamCost(Player, \"wget\"));\n if (!isScriptFilename(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 const s = safeGetServer(hostname, \"wget\");\n return new Promise(function (resolve) {\n $.get(\n url,\n function (data) {\n let res;\n if (isScriptFilename(target)) {\n res = s.writeToScriptFile(Player, target, data);\n } else {\n res = s.writeToTextFile(target, data);\n }\n if (!res.success) {\n workerScript.log(\"wget\", () => \"Failed.\");\n return resolve(false);\n }\n if (res.overwritten) {\n workerScript.log(\n \"wget\",\n () => `Successfully retrieved content and overwrote '${target}' on '${hostname}'`,\n );\n return resolve(true);\n }\n workerScript.log(\"wget\", () => `Successfully retrieved content to new file '${target}' on '${hostname}'`);\n return resolve(true);\n },\n \"text\",\n ).fail(function (e) {\n workerScript.log(\"wget\", () => JSON.stringify(e));\n return resolve(false);\n });\n });\n },\n getFavorToDonate: function (): number {\n updateDynamicRam(\"getFavorToDonate\", getRamCost(Player, \"getFavorToDonate\"));\n return Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n },\n getOwnedSourceFiles: function (): SourceFileLvl[] {\n updateDynamicRam(\"getOwnedSourceFiles\", getRamCost(Player, \"getOwnedSourceFiles\"));\n const res: SourceFileLvl[] = [];\n for (let i = 0; i < Player.sourceFiles.length; ++i) {\n res.push({\n n: Player.sourceFiles[i].n,\n lvl: Player.sourceFiles[i].lvl,\n } as SourceFileLvl);\n }\n return res;\n },\n getPlayer: function (): INetscriptPlayer {\n updateDynamicRam(\"getPlayer\", getRamCost(Player, \"getPlayer\"));\n\n const data = {\n hacking: Player.hacking,\n hp: Player.hp,\n max_hp: Player.max_hp,\n strength: Player.strength,\n defense: Player.defense,\n dexterity: Player.dexterity,\n agility: Player.agility,\n charisma: Player.charisma,\n intelligence: Player.intelligence,\n hacking_chance_mult: Player.hacking_chance_mult,\n hacking_speed_mult: Player.hacking_speed_mult,\n hacking_money_mult: Player.hacking_money_mult,\n hacking_grow_mult: Player.hacking_grow_mult,\n hacking_exp: Player.hacking_exp,\n strength_exp: Player.strength_exp,\n defense_exp: Player.defense_exp,\n dexterity_exp: Player.dexterity_exp,\n agility_exp: Player.agility_exp,\n charisma_exp: Player.charisma_exp,\n hacking_mult: Player.hacking_mult,\n strength_mult: Player.strength_mult,\n defense_mult: Player.defense_mult,\n dexterity_mult: Player.dexterity_mult,\n agility_mult: Player.agility_mult,\n charisma_mult: Player.charisma_mult,\n hacking_exp_mult: Player.hacking_exp_mult,\n strength_exp_mult: Player.strength_exp_mult,\n defense_exp_mult: Player.defense_exp_mult,\n dexterity_exp_mult: Player.dexterity_exp_mult,\n agility_exp_mult: Player.agility_exp_mult,\n charisma_exp_mult: Player.charisma_exp_mult,\n company_rep_mult: Player.company_rep_mult,\n faction_rep_mult: Player.faction_rep_mult,\n numPeopleKilled: Player.numPeopleKilled,\n money: Player.money,\n city: Player.city,\n location: Player.location,\n companyName: Player.companyName,\n crime_money_mult: Player.crime_money_mult,\n crime_success_mult: Player.crime_success_mult,\n isWorking: Player.isWorking,\n workType: Player.workType,\n currentWorkFactionName: Player.currentWorkFactionName,\n currentWorkFactionDescription: Player.currentWorkFactionDescription,\n workHackExpGainRate: Player.workHackExpGainRate,\n workStrExpGainRate: Player.workStrExpGainRate,\n workDefExpGainRate: Player.workDefExpGainRate,\n workDexExpGainRate: Player.workDexExpGainRate,\n workAgiExpGainRate: Player.workAgiExpGainRate,\n workChaExpGainRate: Player.workChaExpGainRate,\n workRepGainRate: Player.workRepGainRate,\n workMoneyGainRate: Player.workMoneyGainRate,\n workMoneyLossRate: Player.workMoneyLossRate,\n workHackExpGained: Player.workHackExpGained,\n workStrExpGained: Player.workStrExpGained,\n workDefExpGained: Player.workDefExpGained,\n workDexExpGained: Player.workDexExpGained,\n workAgiExpGained: Player.workAgiExpGained,\n workChaExpGained: Player.workChaExpGained,\n workRepGained: Player.workRepGained,\n workMoneyGained: Player.workMoneyGained,\n createProgramName: Player.createProgramName,\n createProgramReqLvl: Player.createProgramReqLvl,\n className: Player.className,\n crimeType: Player.crimeType,\n work_money_mult: Player.work_money_mult,\n hacknet_node_money_mult: Player.hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: Player.hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: Player.hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: Player.hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: Player.hacknet_node_level_cost_mult,\n hasWseAccount: Player.hasWseAccount,\n hasTixApiAccess: Player.hasTixApiAccess,\n has4SData: Player.has4SData,\n has4SDataTixApi: Player.has4SDataTixApi,\n bladeburner_max_stamina_mult: Player.bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: Player.bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: Player.bladeburner_analysis_mult,\n bladeburner_success_chance_mult: Player.bladeburner_success_chance_mult,\n bitNodeN: Player.bitNodeN,\n totalPlaytime: Player.totalPlaytime,\n playtimeSinceLastAug: Player.playtimeSinceLastAug,\n playtimeSinceLastBitnode: Player.playtimeSinceLastBitnode,\n jobs: {},\n factions: Player.factions.slice(),\n tor: Player.hasTorRouter(),\n inBladeburner: Player.inBladeburner(),\n hasCorporation: Player.hasCorporation(),\n entropy: Player.entropy,\n };\n Object.assign(data.jobs, Player.jobs);\n return data;\n },\n atExit: function (f: any): void {\n updateDynamicRam(\"atExit\", getRamCost(Player, \"atExit\"));\n if (typeof f !== \"function\") {\n throw makeRuntimeErrorMsg(\"atExit\", \"argument should be function\");\n }\n workerScript.atExit = () => {\n f();\n }; // Wrap the user function to prevent WorkerScript leaking as 'this'\n },\n mv: function (_host: unknown, _source: unknown, _destination: unknown): void {\n const host = helper.string(\"mv\", \"host\", _host);\n const source = helper.string(\"mv\", \"source\", _source);\n const destination = helper.string(\"mv\", \"destination\", _destination);\n updateDynamicRam(\"mv\", getRamCost(Player, \"mv\"));\n\n if (!isValidFilePath(source)) throw makeRuntimeErrorMsg(\"mv\", `Invalid filename: '${source}'`);\n if (!isValidFilePath(destination)) throw makeRuntimeErrorMsg(\"mv\", `Invalid filename: '${destination}'`);\n\n const source_is_txt = source.endsWith(\".txt\");\n const dest_is_txt = destination.endsWith(\".txt\");\n\n if (!isScriptFilename(source) && !source_is_txt)\n throw makeRuntimeErrorMsg(\"mv\", `'mv' can only be used on scripts and text files (.txt)`);\n if (source_is_txt != dest_is_txt)\n throw makeRuntimeErrorMsg(\"mv\", `Source and destination files must have the same type`);\n\n if (source === destination) {\n return;\n }\n\n // This will throw if the server is not found, we do not need to validate result.\n const destServer: BaseServer | null = safeGetServer(host, \"mv\");\n\n if (!source_is_txt && destServer.isRunning(source))\n throw makeRuntimeErrorMsg(\"mv\", `Cannot use 'mv' on a script that is running`);\n\n interface File {\n filename: string;\n }\n\n const files = source_is_txt ? destServer.textFiles : destServer.scripts;\n let source_file: File | null = null;\n let dest_file: File | null = null;\n\n for (let i = 0; i < files.length; ++i) {\n const file = files[i];\n if (file.filename === source) {\n source_file = file;\n } else if (file.filename === destination) {\n dest_file = file;\n }\n }\n\n if (source_file == null) throw makeRuntimeErrorMsg(\"mv\", `Source file ${source} does not exist`);\n\n if (dest_file != null) {\n if (dest_file instanceof TextFile && source_file instanceof TextFile) {\n dest_file.text = source_file.text;\n } else if (dest_file instanceof Script && source_file instanceof Script) {\n dest_file.code = source_file.code;\n dest_file.markUpdated();\n }\n\n destServer.removeFile(source);\n } else {\n source_file.filename = destination;\n if (source_file instanceof Script) {\n source_file.markUpdated();\n }\n }\n },\n flags: Flags(workerScript.args),\n };\n\n // add undocumented functions\n const ns = {\n ...base,\n ...extra,\n };\n function getFunctionNames(obj: any, prefix: string): string[] {\n const functionNames: string[] = [];\n for (const [key, value] of Object.entries(obj)) {\n if (key === \"args\") {\n continue;\n } else if (typeof value == \"function\") {\n functionNames.push(prefix + key);\n } else if (typeof value == \"object\") {\n functionNames.push(...getFunctionNames(value, key + \".\"));\n }\n }\n return functionNames;\n }\n\n const possibleLogs = Object.fromEntries([...getFunctionNames(ns, \"\")].map((a) => [a, true]));\n\n return ns;\n}\n","/**\n * Implementation of the mechanisms that allow the player to affect the\n * Stock Market\n */\nimport { Stock } from \"./Stock\";\nimport { StockMarket } from \"./StockMarket\";\n\nimport { Company } from \"../Company/Company\";\nimport { Server } from \"../Server/Server\";\n\n// Change in second-order forecast due to hacks/grows\nexport const forecastForecastChangeFromHack = 0.1;\n\n// Change in second-order forecast due to company work\nexport const forecastForecastChangeFromCompanyWork = 0.001;\n\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 */\nexport function influenceStockThroughServerHack(server: Server, moneyHacked: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyHacked = moneyHacked / server.moneyMax;\n if (Math.random() < percTotalMoneyHacked) {\n stock.changeForecastForecast(stock.otlkMagForecast - forecastForecastChangeFromHack);\n }\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 */\nexport function influenceStockThroughServerGrow(server: Server, moneyGrown: number): void {\n const orgName = server.organizationName;\n let stock: Stock | null = null;\n if (typeof orgName === \"string\" && orgName !== \"\") {\n stock = StockMarket[orgName];\n }\n if (!(stock instanceof Stock)) {\n return;\n }\n\n const percTotalMoneyGrown = moneyGrown / server.moneyMax;\n if (Math.random() < percTotalMoneyGrown) {\n stock.changeForecastForecast(stock.otlkMagForecast + forecastForecastChangeFromHack);\n }\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 */\nexport function influenceStockThroughCompanyWork(\n company: Company,\n performanceMult: number,\n cyclesOfWork: number,\n): void {\n const compName = company.name;\n let stock: Stock | null = null;\n if (typeof compName === \"string\" && compName !== \"\") {\n stock = StockMarket[compName];\n }\n if (!(stock instanceof Stock)) {\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","import { Company } from \"./Company\";\nimport { CompanyPosition } from \"./CompanyPosition\";\n\n/**\n * Returns a string with the given CompanyPosition's stat requirements\n */\n\nexport function getJobRequirementText(company: Company, pos: CompanyPosition, tooltiptext = false): string {\n let reqText = \"\";\n const offset: number = company.jobStatReqOffset;\n const reqHacking: number = pos.requiredHacking > 0 ? pos.requiredHacking + offset : 0;\n const reqStrength: number = pos.requiredStrength > 0 ? pos.requiredStrength + offset : 0;\n const reqDefense: number = pos.requiredDefense > 0 ? pos.requiredDefense + offset : 0;\n const reqDexterity: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqAgility: number = pos.requiredDexterity > 0 ? pos.requiredDexterity + offset : 0;\n const reqCharisma: number = pos.requiredCharisma > 0 ? pos.requiredCharisma + offset : 0;\n const reqRep: number = pos.requiredReputation;\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 if (reqHacking > 0) {\n reqText += reqHacking + \" hacking, \";\n }\n if (reqStrength > 0) {\n reqText += reqStrength + \" strength, \";\n }\n if (reqDefense > 0) {\n reqText += reqDefense + \" defense, \";\n }\n if (reqDexterity > 0) {\n reqText += reqDexterity + \" dexterity, \";\n }\n if (reqAgility > 0) {\n reqText += reqAgility + \" agility, \";\n }\n if (reqCharisma > 0) {\n reqText += reqCharisma + \" charisma, \";\n }\n if (reqRep > 1) {\n reqText += reqRep + \" reputation, \";\n }\n reqText = reqText.substring(0, reqText.length - 2);\n reqText += \")\";\n }\n return reqText;\n}\n","/* tslint:disable:max-line-length completed-docs variable-name*/\nimport { IMap } from \"../types\";\n\nexport const TerminalHelpText: string[] = [\n \"Type 'help name' to learn more about the command \",\n \" \",\n ' alias [-g] [name=\"value\"] Create or display Terminal aliases',\n \" analyze Get information about the current machine \",\n \" backdoor Install a backdoor on the current machine \",\n \" buy [-l/-a/program] Purchase a program through the Dark Web\",\n \" cat [file] Display a .msg, .lit, or .txt file\",\n \" cd [dir] Change to a new directory\",\n \" check [script] [args...] Print a script's logs to Terminal\",\n \" clear Clear all text on the terminal \",\n \" cls See 'clear' command \",\n \" connect [hostname] Connects to a remote server\",\n \" cp [src] [dst] Copy a file\",\n \" download [script/text file] Downloads scripts or text files to your computer\",\n \" expr [math expression] Evaluate a mathematical expression\",\n \" free Check the machine's memory (RAM) usage\",\n \" grow Spoof money in a servers bank account, increasing the amount available.\",\n \" hack Hack the current machine\",\n \" help [command] Display this help text, or the help text for a command\",\n \" history [-c] Display the terminal history\",\n \" home Connect to home computer\",\n \" hostname Displays the hostname of the machine\",\n \" kill [script/pid] [args...] Stops the specified script on the current server \",\n \" killall Stops all running scripts on the current machine\",\n \" ls [dir] [--grep pattern] Displays all files on the machine\",\n \" lscpu Displays the number of CPU cores on the machine\",\n \" mem [script] [-t n] Displays the amount of RAM required to run the script\",\n \" mv [src] [dest] Move/rename a text or script file\",\n \" nano [file ...] Text editor - Open up and edit one or more scripts or text files\",\n \" ps Display all scripts that are currently running\",\n \" rm [file] Delete a file from the server\",\n \" run [name] [-t n] [--tail] [args...] Execute a program or script\",\n \" scan Prints all immediately-available network connections\",\n \" scan-analyze [d] [-a] Prints info for all servers up to d nodes away\",\n \" scp [file ...] [server] Copies a file to a destination server\",\n \" sudov Shows whether you have root access on this computer\",\n \" tail [script] [args...] Displays dynamic logs for the specified script\",\n \" top Displays all running scripts and their RAM usage\",\n \" unalias [alias name] Deletes the specified alias\",\n \" vim [file ...] Text editor - Open up and edit one or more scripts or text files in vim mode\",\n \" weaken Reduce the security of the current machine\",\n \" wget [url] [target file] Retrieves code/text from a web server\",\n \" \",\n];\n\nconst TemplatedHelpTexts: IMap<(command: string) => string[]> = {\n scriptEditor: (command) => {\n return [\n `Usage: ${command} [file ...] | [glob]`,\n ` `,\n `Opens up the specified file(s) in the Script Editor. Only scripts (.js, .ns, .script) or text files (.txt) `,\n `can be edited using the Script Editor. If a file does not exist a new one will be created`,\n ` `,\n `If provided a glob as the only argument, ${command} can spider directories and open all matching `,\n `files at once. ${command} cannot create files using globs, so your scripts must already exist.`,\n ` `,\n `Examples:`,\n ` `,\n ` ${command} test.js`,\n ` ${command} test.js test2.js`,\n ` `,\n ` ${command} test.*`,\n ` ${command} /my-dir/*.js`,\n ` `\n ]\n }\n}\n\nexport const HelpTexts: IMap = {\n alias: [\n 'Usage: alias [-g] [name=\"value\"] ',\n \" \",\n \"Create or display aliases. An alias enables a replacement of a word with another string. \",\n \"It can be used to abbreviate a commonly used command, or commonly used parts of a command. The NAME \",\n \"of an alias defines the word that will be replaced, while the VALUE defines what it will be replaced by. For example, \",\n \"you could create the alias 'nuke' for the Terminal command 'run NUKE.exe' using the following: \",\n \" \",\n ' alias nuke=\"run NUKE.exe\"',\n \" \",\n \"Then, to run the NUKE.exe program you would just have to enter 'nuke' in Terminal rather than the full command. \",\n \"It is important to note that 'default' aliases will only be substituted for the first word of a Terminal command. For \",\n \"example, if the following alias was set: \",\n \" \",\n ' alias worm=\"HTTPWorm.exe\"',\n \" \",\n \"and then you tried to run the following terminal command: \",\n \" \",\n \" run worm\",\n \" \",\n \"This would fail because the worm alias is not the first word of a Terminal command. To allow an alias to be substituted \",\n \"anywhere in a Terminal command, rather than just the first word, you must set it to be a global alias using the -g flag: \",\n \" \",\n ' alias -g worm=\"HTTPWorm.exe\"',\n \" \",\n \"Now, the 'worm' alias will be substituted anytime it shows up as an individual word in a Terminal command. \",\n \" \",\n \"Entering just the command 'alias' without any arguments prints the list of all defined aliases in the reusable form \",\n \"'alias NAME=VALUE' on the Terminal. \",\n \" \",\n \"The 'unalias' command can be used to remove aliases.\",\n \" \",\n ],\n analyze: [\n \"Usage: analyze\",\n \" \",\n \"Prints details and statistics about the current server. The information that is printed includes basic \",\n \"server details such as the hostname, whether the player has root access, what ports are opened/closed, and also \",\n \"hacking-related information such as an estimated chance to successfully hack, an estimate of how much money is \",\n \"available on the server, etc.\",\n \" \",\n ],\n backdoor: [\n \"Usage: backdoor\",\n \" \",\n \"Install a backdoor on the current machine, grants a secret bonus depending on the machine.\",\n \" \",\n \"Requires root access to run.\",\n \" \",\n ],\n buy: [\n \"Usage: buy [-l / -a / program]\",\n \" \",\n \"Purchase a program through the Dark Web. Requires a TOR router to use.\",\n \" \",\n \"If this command is ran with the '-l' flag, it will display a list of all programs that can be bought through the \",\n \"dark web to the Terminal, as well as their costs.\",\n \" \",\n \"If this command is ran with the '-a' flag, it will attempt to purchase all unowned programs.\",\n \" \",\n \"Otherwise, the name of the program must be passed in as a parameter. This name is NOT case-sensitive.\",\n \" \",\n ],\n cat: [\n \"Usage: cat [file]\",\n \" \",\n \"Display message (.msg), literature (.lit), or text (.txt) files. Examples:\",\n \" \",\n \" cat j1.msg\",\n \" \",\n \" cat foo.lit\",\n \" \",\n \" cat servers.txt\",\n \" \",\n ],\n cd: [\n \"Usage: cd [dir]\",\n \" \",\n \"Change to the specified directory. Note that this works even for directories that don't exist. If you \",\n \"change to a directory that does not exist, it will not be 'created'. Examples:\",\n \" \",\n \" cd scripts/hacking\",\n \" \",\n \" cd /logs\",\n \" \",\n \" cd ../\",\n \" \",\n ],\n check: [\n \"Usage: check [script name] [args...]\",\n \" \",\n \"Print the logs of the script specified by the script name and arguments to the Terminal. Each argument must be separated by \",\n \"a space. Remember that a running script is uniquely \",\n \"identified both by its name and the arguments that are used to start it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 1 2 foodnstuff\",\n \" \",\n \"Then to run the 'check' command on this script you would have to pass the same arguments in: \",\n \" \",\n \" check foo.script 1 2 foodnstuff\",\n \" \",\n ],\n clear: [\n \"Usage: clear\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"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 \" \",\n ],\n cls: [\n \"Usage: cls\",\n \" \",\n \"Clear the Terminal screen, deleting all of the text. Note that this does not delete the user's command history, so using the up \",\n \"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 \" \",\n ],\n connect: [\n \"Usage: connect [hostname]\",\n \" \",\n \"Connect to a remote server. The hostname of the remote server must be given as the argument \",\n \"to this command. Note that only servers that are immediately adjacent to the current server in the network can be connected to. To \",\n \"see which servers can be connected to, use the 'scan' command.\",\n \" \",\n ],\n cp: [\"Usage: cp [src] [dst]\", \" \", \"Copy a file on this server. To copy a file to another server use scp.\", \" \"],\n download: [\n \"Usage: download [script/text file]\",\n \" \",\n \"Downloads a script or text file to your computer (like your real life computer).\",\n \" \",\n \"You can also download all of your scripts/text files as a zip file using the following Terminal commands:\",\n \" \",\n \"Download all scripts and text files: download *\",\n \" \",\n \"Download all scripts: download *.script\",\n \" \",\n \"Download all text files: download *.txt\",\n \" \",\n ],\n expr: [\n \"Usage: expr [mathematical expression]\",\n \" \",\n \"Evaluate a simple mathematical expression. Supports native JavaScript operators:\",\n \" \",\n \"+, -, /, *, **, %\",\n \" \",\n \"Example:\",\n \" \",\n \" expr 25 * 2 ** 10\",\n \" \",\n \"Note that letters (non-digits) are not allowed and will be removed from the input.\",\n \" \",\n ],\n free: [\n \"Usage: free\",\n \" \",\n \"Displays the memory usage on the current machine. Print the amount of RAM that is available on the current server as well as \",\n \"how much of it is being used.\",\n \" \",\n ],\n grow: [\n \"Usage: grow\",\n \" \",\n \"Spoof transactions in the current server. Increasing the money available by hacking. Requires root access.\",\n \"See the wiki page for hacking mechanics.\",\n \" \",\n ],\n hack: [\n \"Usage: hack\",\n \" \",\n \"Attempt to hack the current server. Requires root access in order to be run. See the wiki page for hacking mechanics\",\n \" \",\n ],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Display Terminal help information. Without arguments, 'help' prints a list of all valid Terminal commands and a brief \",\n \"description of their functionality. You can also pass the name of a Terminal command as an argument to 'help' to print \",\n \"more detailed information about the Terminal command. Examples: \",\n \" \",\n \" help alias\",\n \" \",\n \" help scan-analyze\",\n \" \",\n ],\n history: [\n \"Usage: history [-c]\",\n \" \",\n \"Without arguments, displays the terminal command history. To clear the history, pass in the '-c' argument.\",\n \" \",\n ],\n home: [\n \"Usage: home\", \" \", \"Connect to your home computer. This will work no matter what server you are currently connected to.\", \" \",\n ],\n hostname: [\"Usage: hostname\", \" \", \"Prints the hostname of the current server\", \" \"],\n kill: [\n \"Usage: kill [script name] [args...] or kill [pid\",\n \" \",\n \"Kill the script specified by the script name and arguments OR by its PID.\",\n \" \",\n \"If you are killing the script using its filename and arguments, then each \",\n \"argument must be separated by a space. Remember that a running script is \",\n \"uniquely identified by both its name and the arguments that are used to start \",\n \"it. So, if a script was ran with the following arguments:\",\n \" \",\n \" run foo.script 1 sigma-cosmetics\",\n \" \",\n \"Then to kill this script the same arguments would have to be used:\",\n \" \",\n \" kill foo.script 1 sigma-cosmetics\",\n \" \",\n \"If you are killing the script using its PID, then the PID argument must be numeric\",\n \" \",\n ],\n killall: [\n \"Usage: killall\",\n \" \",\n \"Kills all scripts on the current server. \",\n \"Note that after the 'kill' command is issued for a script, it may take a while for the script to actually stop running. \",\n \"This will happen if the script is in the middle of a command such as grow() or weaken() that takes time to execute. \",\n \"The script will not be stopped/killed until after that time has elapsed.\",\n \" \",\n ],\n ls: [\n \"Usage: ls [dir] [-l] [--grep pattern]\",\n \" \",\n \"The ls command, with no arguments, prints all files and directories on the current server's directory to the Terminal screen. \",\n \"The files will be displayed in alphabetical order. \",\n \" \",\n \"The 'dir' optional parameter can be used to display files/directories in another directory.\",\n \" \",\n \"The '-l' optional parameter allows you to force each item onto a single line.\",\n \" \",\n \"The '--grep pattern' optional parameter can be used to only display files whose filenames match the specified pattern.\",\n \" \",\n \"Examples:\",\n \" \",\n \"List all files with the '.script' extension in the current directory:\",\n \" \",\n \" ls -l --grep .script\",\n \" \",\n \"List all files with the '.js' extension in the root directory:\",\n \" \",\n \" ls / -l --grep .js\",\n \" \",\n \"List all files with the word 'purchase' in the filename, in the 'scripts' directory:\",\n \" \",\n \" ls scripts -l --grep purchase\",\n \" \",\n ],\n lscpu: [\"Usage: lscpu\", \" \", \"Prints the number of CPU Cores the current server has\", \" \"],\n\n mem: [\n \"Usage: mem [script name] [-t num_threads]\",\n \" \",\n \"Displays the amount of RAM needed to run the specified script with a single thread. The command can also be used to print \",\n \"the amount of RAM needed to run a script with multiple threads using the '-t' flag. If the '-t' flag is specified, then \",\n \"an argument for the number of threads must be passed in afterwards. Examples:\",\n \" \",\n \" mem foo.script\",\n \" \",\n \" mem foo.script -t 50\",\n \" \",\n \"The first example above will print the amount of RAM needed to run 'foo.script' with a single thread. The second example \",\n \"above will print the amount of RAM needed to run 'foo.script' with 50 threads.\",\n \" \",\n ],\n mv: [\n \"Usage: mv [src] [dest]\",\n \" \",\n \"Move the source file to the specified destination. This can also be used to rename files. \",\n \"This command only works for scripts and text files (.txt). This command CANNOT be used to \",\n \"convert to different file types\",\n \" \",\n \"Note that, unlike the Linux 'mv' command, the destination argument must be the \",\n \"full filepath. \",\n \"Examples: \",\n \" \",\n \" mv hacking-controller.script scripts/hacking-controller.script\",\n \" \",\n \" mv myScript.js myOldScript.js\",\n \" \",\n ],\n nano: TemplatedHelpTexts.scriptEditor('nano'),\n ps: [\"Usage: ps\", \" \", \"Prints all scripts that are running on the current server\", \" \"],\n rm: [\n \"Usage: rm [file]\",\n \" \",\n \"Removes the specified file from the current server. A file can be a script, a program, or a message file. \",\n \" \",\n \"WARNING: This is permanent and cannot be undone\",\n \" \",\n ],\n run: [\n \"Usage: run [file name] [-t] [num threads] [args...]\",\n \" \",\n \"Execute a program, script or coding contract.\",\n \" \",\n \"The '[-t]', '[num threads]', and '[args...]' arguments are only valid when running a script. The '-t' flag is used \",\n \"to indicate that the script should be run with the specified number of threads. If the flag is omitted, \",\n \"then the script will be run with a single thread by default. \",\n \"If the '-t' flag is used, then it MUST come immediately \",\n \"after the script name, and the [num threads] argument MUST come immediately afterwards. \",\n \" \",\n \"[args...] represents a variable number of arguments that will be passed into the script. See the documentation \",\n \"about script arguments. Each specified argument must be separated by a space. \",\n \" \",\n ],\n scan: [\n \"Usage: scan\",\n \" \",\n \"Prints all immediately-available network connection. This will print a list of all servers that you can currently connect \",\n \"to using the 'connect' Terminal command.\",\n \" \",\n ],\n \"scan-analyze\": [\n \"Usage: scan-analyze [depth] [-a]\",\n \" \",\n \"Prints detailed information about all servers up to [depth] nodes away on the network. Calling \",\n \"'scan-analyze 1' will display information for the same servers that are shown by the 'scan' Terminal \",\n \"command. This command also shows the relative paths to reach each server.\",\n \" \",\n \"By default, the maximum depth that can be specified for 'scan-analyze' is 3. However, once you have \",\n \"the DeepscanV1.exe and DeepscanV2.exe programs, you can execute 'scan-analyze' with a depth up to \",\n \"5 and 10, respectively.\",\n \" \",\n \"The information 'scan-analyze' displays about each server includes whether or not you have root access to it, \",\n \"its required hacking level, the number of open ports required to run NUKE.exe on it, and how much RAM \",\n \"it has.\",\n \" \",\n \"By default, this command will not display servers that you have purchased. However, you can pass in the \",\n \"-a flag at the end of the command if you would like to enable that.\",\n \" \",\n ],\n scp: [\n \"Usage: scp [filename ...] [target server]\",\n \" \",\n \"Copies the specified file(s) from the current server to the target server. \",\n \"This command only works for script files (.script or .js extension), literature files (.lit extension), \",\n \"and text files (.txt extension). \",\n \"The second argument passed in must be the hostname or IP of the target server. Examples:\",\n \" \",\n \" scp foo.script n00dles\",\n \" \",\n \" scp foo.script bar.script n00dles\",\n \" \",\n ],\n sudov: [\"Usage: sudov\", \" \", \"Prints whether or not you have root access to the current machine\", \" \"],\n\n tail: [\n \"Usage: tail [script name] [args...]\",\n \" \",\n \"Displays dynamic logs for the script specified by the script name and arguments. Each argument must be separated \",\n \"by a space. Remember that a running script is uniquely identified by both its name and the arguments that were used \",\n \"to run it. So, if a script was ran with the following arguments: \",\n \" \",\n \" run foo.script 10 50000\",\n \" \",\n \"Then in order to check its logs with 'tail' the same arguments must be used: \",\n \" \",\n \" tail foo.script 10 50000\",\n \" \",\n ],\n top: [\n \"Usage: top\",\n \" \",\n \"Prints a list of all scripts running on the current server as well as their thread count and how much \",\n \"RAM they are using in total.\",\n \" \",\n ],\n unalias: [\n \"Usage: unalias [alias name]\",\n \" \",\n \"Deletes the specified alias. Note that the double quotation marks are required. \",\n \" \",\n \"As an example, if an alias was declared using:\",\n \" \",\n ' alias r=\"run\"',\n \" \",\n \"Then it could be removed using:\",\n \" \",\n \" unalias r\",\n \" \",\n \"It is not necessary to differentiate between global and non-global aliases when using 'unalias'\",\n \" \",\n ],\n vim: TemplatedHelpTexts.scriptEditor('vim'),\n weaken: [\n \"Usage: weaken\",\n \" \",\n \"Reduces the security level of the current server. Decreasing the time it takes for all operations on this server.\",\n \"Requires root access. See the wiki page for hacking mechanics.\",\n \" \",\n ],\n wget: [\n \"Usage: wget [url] [target file]\",\n \" \",\n \"Retrieves data from a URL and downloads it to a file on the current server. The data can only \",\n \"be downloaded to a script (.script, .ns, .js) or a text file (.txt). If the file already exists, \",\n \"it will be overwritten by this command.\",\n \" \",\n \"Note that it will not be possible to download data from many websites because they do not allow \",\n \"cross-origin resource sharing (CORS). Example:\",\n \" \",\n \" wget https://raw.githubusercontent.com/danielyxie/bitburner/master/README.md game_readme.txt\",\n \" \",\n ],\n};\n","import React from \"react\";\n\nimport { Page } from \"../ui/Router\";\nimport { hash } from \"../hash/hash\";\nimport { CONSTANTS } from \"../Constants\";\n\nenum GameEnv {\n Production,\n Development,\n}\n\nenum Platform {\n Browser,\n Steam,\n}\n\ninterface GameVersion {\n version: string;\n hash: string;\n\n toDisplay: () => string;\n}\n\ninterface BrowserFeatures {\n userAgent: string;\n language: string;\n cookiesEnabled: boolean;\n doNotTrack: string | null;\n indexedDb: boolean;\n}\n\ninterface IErrorMetadata {\n error: Error;\n errorInfo?: React.ErrorInfo;\n page?: Page;\n\n environment: GameEnv;\n platform: Platform;\n version: GameVersion;\n features: BrowserFeatures;\n}\n\nexport interface IErrorData {\n metadata: IErrorMetadata;\n\n title: string;\n body: string;\n\n features: string;\n fileName?: string;\n\n issueUrl: string;\n}\n\n\nexport const newIssueUrl = `https://github.com/danielyxie/bitburner/issues/new`;\n\nfunction getErrorMetadata(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorMetadata {\n const isElectron = navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1;\n const env = process.env.NODE_ENV === \"development\" ? GameEnv.Development : GameEnv.Production;\n const version: GameVersion = {\n version: CONSTANTS.VersionString,\n hash: hash(),\n toDisplay: () => `v${CONSTANTS.VersionString} (${hash()})`,\n }\n const features: BrowserFeatures = {\n userAgent: navigator.userAgent,\n\n language: navigator.language,\n cookiesEnabled: navigator.cookieEnabled,\n doNotTrack: navigator.doNotTrack,\n indexedDb: (!!window.indexedDB),\n }\n const metadata: IErrorMetadata = {\n platform: isElectron ? Platform.Steam : Platform.Browser,\n environment: env,\n version, features,\n error, errorInfo, page,\n }\n return metadata;\n}\n\nexport function getErrorForDisplay(error: Error, errorInfo?: React.ErrorInfo, page?: Page): IErrorData {\n const metadata = getErrorMetadata(error, errorInfo, page);\n const fileName = (metadata.error as any).fileName;\n const features = `lang=${metadata.features.language} cookiesEnabled=${metadata.features.cookiesEnabled.toString()}` +\n ` doNotTrack=${metadata.features.doNotTrack} indexedDb=${metadata.features.indexedDb.toString()}`;\n\n const title = `${metadata.error.name}: ${metadata.error.message}${metadata.page && ` (at \"${Page[metadata.page]}\")`}`;\n const body = `\n## ${title}\n\n### How did this happen?\n\nPlease fill this information with details if relevant.\n\n- [ ] Save file\n- [ ] Minimal scripts to reproduce the issue\n- [ ] Steps to reproduce\n\n### Environment\n\n* Error: ${metadata.error?.toString() ?? 'n/a'}\n* Page: ${metadata.page ? Page[metadata.page] : 'n/a'}\n* Version: ${metadata.version.toDisplay()}\n* Environment: ${GameEnv[metadata.environment]}\n* Platform: ${Platform[metadata.platform]}\n* UserAgent: ${navigator.userAgent}\n* Features: ${features}\n* Source: ${fileName ?? 'n/a'}\n\n${metadata.environment === GameEnv.Development ? `\n### Stack Trace\n\\`\\`\\`\n${metadata.errorInfo?.componentStack.toString().trim()}\n\\`\\`\\`\n` : ''}\n### Save\n\\`\\`\\`\nCopy your save here if possible\n\\`\\`\\`\n`.trim();\n\n const issueUrl = `${newIssueUrl}?title=${encodeURIComponent(title)}&body=${encodeURIComponent(body)}`;\n\n const data: IErrorData = {\n metadata,\n fileName,\n features,\n title,\n body,\n issueUrl,\n }\n return data;\n}\n","import { getRandomInt } from \"./getRandomInt\";\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 */\nexport function getRandomByte(max: number): number {\n // Technically 2^8 is 256, but the values are 0-255, not 1-256.\n const byteMaximum = 255;\n const upper: number = Math.max(Math.min(max, byteMaximum), 0);\n\n return getRandomInt(0, upper);\n}\n","import { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\nexport const Growths: {\n [key: string]: (() => number) | undefined;\n [\"Tracking\"]: () => number;\n [\"Bounty Hunter\"]: () => number;\n [\"Retirement\"]: () => number;\n [\"Investigation\"]: () => number;\n [\"Undercover Operation\"]: () => number;\n [\"Sting Operation\"]: () => number;\n [\"Raid\"]: () => number;\n [\"Stealth Retirement Operation\"]: () => number;\n [\"Assassination\"]: () => number;\n} = {\n Tracking: () => getRandomInt(5, 75) / 10,\n \"Bounty Hunter\": () => getRandomInt(5, 75) / 10,\n Retirement: () => getRandomInt(5, 75) / 10,\n Investigation: () => getRandomInt(10, 40) / 10,\n \"Undercover Operation\": () => getRandomInt(10, 40) / 10,\n \"Sting Operation\": () => getRandomInt(3, 40) / 10,\n Raid: () => getRandomInt(2, 40) / 10,\n \"Stealth Retirement Operation\": () => getRandomInt(1, 20) / 10,\n Assassination: () => getRandomInt(1, 20) / 10,\n};\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 */\nimport { Cities } from \"./Cities\";\nimport { IMap } from \"../types\";\n\nexport function createCityMap(initValue: T): IMap {\n const map: IMap = {};\n const cities = Object.keys(Cities);\n for (let i = 0; i < cities.length; ++i) {\n map[cities[i]] = initValue;\n }\n\n // round try JSON so to make sure none of the initial values have the same references.\n return JSON.parse(JSON.stringify(map));\n}\n","/**\n * Represents a Hand of cards.\n *\n * This class is IMMUTABLE\n */\n\nimport { Card } from \"./Card\";\n\nexport class Hand {\n constructor(readonly cards: readonly Card[]) {}\n\n addCards(...cards: Card[]): Hand {\n return new Hand([...this.cards, ...cards]);\n }\n\n removeByIndex(i: number): Hand {\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 * React Component for a button that initiates a transaction on the Stock Market UI\n * (Buy, Sell, Buy Max, etc.)\n */\nimport * as React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\ntype IProps = {\n onClick: () => void;\n text: string;\n tooltip?: JSX.Element | null;\n};\n\nexport function StockTickerTxButton(props: IProps): React.ReactElement {\n return (\n {props.tooltip} : \"\"}>\n \n \n );\n}\n","/**\n * Abstract Base Class for any Server object\n */\nimport { CodingContract } from \"../CodingContracts\";\nimport { RunningScript } from \"../Script/RunningScript\";\nimport { Script } from \"../Script/Script\";\nimport { isValidFilePath } from \"../Terminal/DirectoryHelpers\";\nimport { TextFile } from \"../TextFile\";\nimport { IReturnStatus } from \"../types\";\n\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\n\nimport { createRandomIp } from \"../utils/IPAddress\";\nimport { compareArrays } from \"../utils/helpers/compareArrays\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\ninterface IConstructorParams {\n adminRights?: boolean;\n hostname: string;\n ip?: string;\n isConnectedTo?: boolean;\n maxRam?: number;\n organizationName?: string;\n}\n\ninterface writeResult {\n success: boolean;\n overwritten: boolean;\n}\n\nexport class BaseServer {\n // Coding Contract files on this server\n contracts: CodingContract[] = [];\n\n // How many CPU cores this server has. Maximum of 8.\n // Currently, this only affects hacking missions\n cpuCores = 1;\n\n // Flag indicating whether the FTP port is open\n ftpPortOpen = false;\n\n // Flag indicating whether player has admin/root access to this server\n hasAdminRights = false;\n\n // Hostname. Must be unique\n hostname = \"\";\n\n // Flag indicating whether HTTP Port is open\n httpPortOpen = false;\n\n // IP Address. Must be unique\n ip = \"\";\n\n // Flag indicating whether player is curently connected to this server\n isConnectedTo = false;\n\n // RAM (GB) available on this server\n maxRam = 0;\n\n // Message files AND Literature files on this Server\n messages: string[] = [];\n\n // Name of company/faction/etc. that this server belongs to.\n // Optional, not applicable to all Servers\n organizationName = \"\";\n\n // Programs on this servers. Contains only the names of the programs\n programs: string[] = [];\n\n // RAM (GB) used. i.e. unavailable RAM\n ramUsed = 0;\n\n // RunningScript files on this server\n runningScripts: RunningScript[] = [];\n\n // Script files on this Server\n scripts: Script[] = [];\n\n // Contains the hostnames of all servers that are immediately\n // reachable from this one\n serversOnNetwork: string[] = [];\n\n // Flag indicating whether SMTP Port is open\n smtpPortOpen = false;\n\n // Flag indicating whether SQL Port is open\n sqlPortOpen = false;\n\n // Flag indicating whether the SSH Port is open\n sshPortOpen = false;\n\n // Text files on this server\n textFiles: TextFile[] = [];\n\n // Flag indicating wehther this is a purchased server\n purchasedByPlayer = false;\n\n constructor(params: IConstructorParams = { hostname: \"\", ip: createRandomIp() }) {\n this.ip = params.ip ? params.ip : createRandomIp();\n\n this.hostname = params.hostname;\n this.organizationName = params.organizationName != null ? params.organizationName : \"\";\n this.isConnectedTo = params.isConnectedTo != null ? params.isConnectedTo : false;\n\n //Access information\n this.hasAdminRights = params.adminRights != null ? params.adminRights : false;\n }\n\n addContract(contract: CodingContract): void {\n this.contracts.push(contract);\n }\n\n getContract(contractName: string): CodingContract | null {\n for (const contract of this.contracts) {\n if (contract.fn === contractName) {\n return contract;\n }\n }\n return null;\n }\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 getRunningScript(scriptName: string, scriptArgs: any[]): RunningScript | null {\n for (const rs of this.runningScripts) {\n if (rs.filename === scriptName && compareArrays(rs.args, scriptArgs)) {\n return rs;\n }\n }\n\n return null;\n }\n\n /**\n * Given the name of the script, returns the corresponding\n * Script object on the server (if it exists)\n */\n getScript(scriptName: string): Script | null {\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 /**\n * Returns boolean indicating whether the given script is running on this server\n */\n isRunning(fn: string): boolean {\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: CodingContract | string): void {\n if (contract instanceof CodingContract) {\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 /**\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 removeFile(fn: string): IReturnStatus {\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 { res: true };\n }\n }\n } else if (isScriptFilename(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 { res: true };\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 if (typeof f === \"string\" && f === fn) {\n this.messages.splice(i, 1);\n return { res: true };\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 { res: true };\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 { res: true };\n }\n }\n }\n\n return { res: false, 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 runScript(script: RunningScript): void {\n this.runningScripts.push(script);\n }\n\n setMaxRam(ram: number): void {\n this.maxRam = ram;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n updateRamUsed(ram: number, player: IPlayer): void {\n this.ramUsed = ram;\n }\n\n /**\n * Write to a script file\n * Overwrites existing files. Creates new files if the script does not eixst\n */\n writeToScriptFile(player: IPlayer, fn: string, code: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !isScriptFilename(fn)) {\n return ret;\n }\n\n // Check if the script already exists, and overwrite it if it does\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(player, this.scripts);\n script.markUpdated();\n ret.overwritten = true;\n ret.success = true;\n return ret;\n }\n }\n\n // Otherwise, create a new script\n const newScript = new Script(player, fn, code, this.hostname, this.scripts);\n this.scripts.push(newScript);\n ret.success = true;\n return ret;\n }\n\n // Write to a text file\n // Overwrites existing files. Creates new files if the text file does not exist\n writeToTextFile(fn: string, txt: string): writeResult {\n const ret = { success: false, overwritten: false };\n if (!isValidFilePath(fn) || !fn.endsWith(\"txt\")) {\n return ret;\n }\n\n // Check if the text file already exists, and overwrite if it does\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 }\n\n // Otherwise create a new text file\n const newFile = new TextFile(fn, txt);\n this.textFiles.push(newFile);\n ret.success = true;\n return ret;\n }\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { CodingContract, CodingContractTypes } from \"../../CodingContracts\";\nimport { CopyableText } from \"./CopyableText\";\nimport { Modal } from \"./Modal\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n c: CodingContract;\n onClose: () => void;\n onAttempt: (answer: string) => void;\n}\n\nexport const CodingContractEvent = new EventEmitter<[IProps]>();\n\nexport function CodingContractModal(): React.ReactElement {\n const [props, setProps] = useState(null);\n const [answer, setAnswer] = useState(\"\");\n\n useEffect(() => {\n CodingContractEvent.subscribe((props) => setProps(props));\n });\n if (props === null) return <>;\n\n function onChange(event: React.ChangeEvent): void {\n setAnswer(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (props === null) return;\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 as any).value;\n\n if (event.key === KEY.ENTER && value !== \"\") {\n event.preventDefault();\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }\n }\n\n function close(): void {\n if (props === null) return;\n props.onClose();\n setProps(null);\n }\n\n const contractType = CodingContractTypes[props.c.type];\n const description = [];\n for (const [i, value] of contractType.desc(props.c.data).split(\"\\n\").entries())\n description.push(\" }}>);\n return (\n \n \n \n You are attempting to solve a Coding Contract. You have {props.c.getMaxNumTries() - props.c.tries} tries\n remaining, after which the contract will self-destruct.\n \n
    \n {description}\n
    \n {\n props.onAttempt(answer);\n setAnswer(\"\");\n close();\n }}\n >\n Solve\n \n ),\n }}\n />\n
    \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const BitFlumeEvent = new EventEmitter<[]>();\n\nexport function BitFlumeModal(): React.ReactElement {\n const router = use.Router();\n const [open, setOpen] = useState(false);\n function flume(): void {\n router.toBitVerse(true, false);\n setOpen(false);\n }\n\n useEffect(() => BitFlumeEvent.subscribe(() => setOpen(true)), []);\n\n return (\n setOpen(false)}>\n \n WARNING: USING THIS PROGRAM WILL CAUSE YOU TO LOSE ALL OF YOUR PROGRESS ON THE CURRENT BITNODE.\n
    \n
    \n Do you want to travel to the BitNode Nexus? This allows you to reset the current BitNode and select a new one.\n
    \n
    \n
    \n \n
    \n );\n}\n","import * as augmentationMethods from \"./PlayerObjectAugmentationMethods\";\nimport * as bladeburnerMethods from \"./PlayerObjectBladeburnerMethods\";\nimport * as corporationMethods from \"./PlayerObjectCorporationMethods\";\nimport * as gangMethods from \"./PlayerObjectGangMethods\";\nimport * as generalMethods from \"./PlayerObjectGeneralMethods\";\nimport * as serverMethods from \"./PlayerObjectServerMethods\";\n\nimport { IMap } from \"../../types\";\nimport { Sleeve } from \"../Sleeve/Sleeve\";\nimport { IPlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Company } from \"../../Company/Company\";\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ICodingContractReward } from \"../../CodingContracts\";\n\nimport { IPlayer } from \"../IPlayer\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\nimport { IPlayerOwnedAugmentation } from \"../../Augmentation/PlayerOwnedAugmentation\";\nimport { ICorporation } from \"../../Corporation/ICorporation\";\nimport { IGang } from \"../../Gang/IGang\";\nimport { IBladeburner } from \"../../Bladeburner/IBladeburner\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\n\nimport { HashManager } from \"../../Hacknet/HashManager\";\nimport { CityName } from \"../../Locations/data/CityNames\";\n\nimport { MoneySourceTracker } from \"../../utils/MoneySourceTracker\";\nimport { Reviver, Generic_toJSON, Generic_fromJSON } from \"../../utils/JSONReviver\";\nimport { ISkillProgress } from \"../formulas/skill\";\nimport { PlayerAchievement } from \"../../Achievements/Achievements\";\nimport { cyrb53 } from \"../../utils/StringHelperFunctions\";\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\n\nexport class PlayerObject implements IPlayer {\n // Class members\n augmentations: IPlayerOwnedAugmentation[];\n bitNodeN: number;\n city: CityName;\n companyName: string;\n corporation: ICorporation | null;\n gang: IGang | null;\n bladeburner: IBladeburner | null;\n currentServer: string;\n factions: string[];\n factionInvitations: string[];\n hacknetNodes: (HacknetNode | string)[]; // HacknetNode object or IP of Hacknet Server\n has4SData: boolean;\n has4SDataTixApi: boolean;\n hashManager: HashManager;\n hasTixApiAccess: boolean;\n hasWseAccount: boolean;\n hp: number;\n jobs: IMap;\n init: () => void;\n isWorking: boolean;\n karma: number;\n numPeopleKilled: number;\n location: LocationName;\n max_hp: number;\n money: number;\n moneySourceA: MoneySourceTracker;\n moneySourceB: MoneySourceTracker;\n playtimeSinceLastAug: number;\n playtimeSinceLastBitnode: number;\n purchasedServers: any[];\n queuedAugmentations: IPlayerOwnedAugmentation[];\n scriptProdSinceLastAug: number;\n sleeves: Sleeve[];\n sleevesFromCovenant: number;\n sourceFiles: IPlayerOwnedSourceFile[];\n exploits: Exploit[];\n achievements: PlayerAchievement[];\n terminalCommandHistory: string[];\n identifier: string;\n lastUpdate: number;\n lastSave: number;\n totalPlaytime: number;\n\n // Stats\n hacking: number;\n strength: number;\n defense: number;\n dexterity: number;\n agility: number;\n charisma: number;\n intelligence: number;\n\n // Experience\n hacking_exp: number;\n strength_exp: number;\n defense_exp: number;\n dexterity_exp: number;\n agility_exp: number;\n charisma_exp: number;\n intelligence_exp: number;\n\n // Multipliers\n hacking_chance_mult: number;\n hacking_speed_mult: number;\n hacking_money_mult: number;\n hacking_grow_mult: number;\n hacking_mult: number;\n hacking_exp_mult: number;\n strength_mult: number;\n strength_exp_mult: number;\n defense_mult: number;\n defense_exp_mult: number;\n dexterity_mult: number;\n dexterity_exp_mult: number;\n agility_mult: number;\n agility_exp_mult: number;\n charisma_mult: number;\n charisma_exp_mult: number;\n hacknet_node_money_mult: number;\n hacknet_node_purchase_cost_mult: number;\n hacknet_node_ram_cost_mult: number;\n hacknet_node_core_cost_mult: number;\n hacknet_node_level_cost_mult: number;\n company_rep_mult: number;\n faction_rep_mult: number;\n work_money_mult: number;\n crime_success_mult: number;\n crime_money_mult: number;\n bladeburner_max_stamina_mult: number;\n bladeburner_stamina_gain_mult: number;\n bladeburner_analysis_mult: number;\n bladeburner_success_chance_mult: number;\n\n createProgramReqLvl: number;\n factionWorkType: string;\n createProgramName: string;\n timeWorkedCreateProgram: number;\n graftAugmentationName: string;\n timeWorkedGraftAugmentation: number;\n crimeType: string;\n committingCrimeThruSingFn: boolean;\n singFnCrimeWorkerScript: WorkerScript | null;\n timeNeededToCompleteWork: number;\n focus: boolean;\n className: string;\n currentWorkFactionName: string;\n workType: string;\n workCostMult: number;\n workExpMult: number;\n currentWorkFactionDescription: string;\n timeWorked: number;\n workMoneyGained: number;\n workMoneyGainRate: number;\n workRepGained: number;\n workRepGainRate: number;\n workHackExpGained: number;\n workHackExpGainRate: number;\n workStrExpGained: number;\n workStrExpGainRate: number;\n workDefExpGained: number;\n workDefExpGainRate: number;\n workDexExpGained: number;\n workDexExpGainRate: number;\n workAgiExpGained: number;\n workAgiExpGainRate: number;\n workChaExpGained: number;\n workChaExpGainRate: number;\n workMoneyLossRate: number;\n\n entropy: number;\n\n // Methods\n work: (numCycles: number) => boolean;\n workPartTime: (numCycles: number) => boolean;\n workForFaction: (numCycles: number) => boolean;\n applyForAgentJob: (sing?: boolean) => boolean;\n applyForBusinessConsultantJob: (sing?: boolean) => boolean;\n applyForBusinessJob: (sing?: boolean) => boolean;\n applyForEmployeeJob: (sing?: boolean) => boolean;\n applyForItJob: (sing?: boolean) => boolean;\n applyForJob: (entryPosType: CompanyPosition, sing?: boolean) => boolean;\n applyForNetworkEngineerJob: (sing?: boolean) => boolean;\n applyForPartTimeEmployeeJob: (sing?: boolean) => boolean;\n applyForPartTimeWaiterJob: (sing?: boolean) => boolean;\n applyForSecurityEngineerJob: (sing?: boolean) => boolean;\n applyForSecurityJob: (sing?: boolean) => boolean;\n applyForSoftwareConsultantJob: (sing?: boolean) => boolean;\n applyForSoftwareJob: (sing?: boolean) => boolean;\n applyForWaiterJob: (sing?: boolean) => boolean;\n canAccessBladeburner: () => boolean;\n canAccessCorporation: () => boolean;\n canAccessGang: () => boolean;\n canAccessGrafting: () => boolean;\n canAfford: (cost: number) => boolean;\n gainHackingExp: (exp: number) => void;\n gainStrengthExp: (exp: number) => void;\n gainDefenseExp: (exp: number) => void;\n gainDexterityExp: (exp: number) => void;\n gainAgilityExp: (exp: number) => void;\n gainCharismaExp: (exp: number) => void;\n gainIntelligenceExp: (exp: number) => void;\n gainMoney: (money: number, source: string) => void;\n getCurrentServer: () => BaseServer;\n getGangFaction: () => Faction;\n getGangName: () => string;\n getHomeComputer: () => Server;\n getNextCompanyPosition: (company: Company, entryPosType: CompanyPosition) => CompanyPosition | null;\n getUpgradeHomeRamCost: () => number;\n getUpgradeHomeCoresCost: () => number;\n gotoLocation: (to: LocationName) => boolean;\n hasAugmentation: (aug: string | Augmentation, installed?: boolean) => boolean;\n hasCorporation: () => boolean;\n hasGangWith: (facName: string) => boolean;\n hasTorRouter: () => boolean;\n hasProgram: (program: string) => boolean;\n inBladeburner: () => boolean;\n inGang: () => boolean;\n isQualified: (company: Company, position: CompanyPosition) => boolean;\n loseMoney: (money: number, source: string) => void;\n reapplyAllAugmentations: (resetMultipliers?: boolean) => void;\n reapplyAllSourceFiles: () => void;\n regenerateHp: (amt: number) => void;\n recordMoneySource: (amt: number, source: string) => void;\n setMoney: (amt: number) => void;\n singularityStopWork: () => string;\n startBladeburner: (p: any) => void;\n startFactionWork: (faction: Faction) => void;\n startClass: (costMult: number, expMult: number, className: string) => void;\n startCorporation: (corpName: string, additionalShares?: number) => void;\n startCrime: (\n router: IRouter,\n crimeType: string,\n hackExp: number,\n strExp: number,\n defExp: number,\n dexExp: number,\n agiExp: number,\n chaExp: number,\n money: number,\n time: number,\n singParams: any,\n ) => void;\n startFactionFieldWork: (faction: Faction) => void;\n startFactionHackWork: (faction: Faction) => void;\n startFactionSecurityWork: (faction: Faction) => void;\n startFocusing: () => void;\n startGang: (facName: string, isHacking: boolean) => void;\n startWork: (companyName: string) => void;\n startWorkPartTime: (companyName: string) => void;\n takeDamage: (amt: number) => boolean;\n travel: (to: CityName) => boolean;\n giveExploit: (exploit: Exploit) => void;\n giveAchievement: (achievementId: string) => void;\n queryStatFromString: (str: string) => number;\n getIntelligenceBonus: (weight: number) => number;\n getCasinoWinnings: () => number;\n quitJob: (company: string) => void;\n hasJob: () => boolean;\n process: (router: IRouter, numCycles?: number) => void;\n createHacknetServer: () => HacknetServer;\n startCreateProgramWork: (programName: string, time: number, reqLevel: number) => void;\n queueAugmentation: (augmentationName: string) => void;\n receiveInvite: (factionName: string) => void;\n updateSkillLevels: () => void;\n gainCodingContractReward: (reward: ICodingContractReward, difficulty?: number) => string;\n stopFocusing: () => void;\n finishFactionWork: (cancelled: boolean, sing?: boolean) => string;\n finishClass: (sing?: boolean) => string;\n finishWork: (cancelled: boolean, sing?: boolean) => string;\n cancelationPenalty: () => number;\n finishWorkPartTime: (sing?: boolean) => string;\n finishCrime: (cancelled: boolean) => string;\n finishCreateProgramWork: (cancelled: boolean) => string;\n resetMultipliers: () => void;\n prestigeAugmentation: () => void;\n prestigeSourceFile: () => void;\n calculateSkill: (exp: number, mult?: number) => number;\n calculateSkillProgress: (exp: number, mult?: number) => ISkillProgress;\n resetWorkStatus: (generalType?: string, group?: string, workType?: string) => void;\n getWorkHackExpGain: () => number;\n getWorkStrExpGain: () => number;\n getWorkDefExpGain: () => number;\n getWorkDexExpGain: () => number;\n getWorkAgiExpGain: () => number;\n getWorkChaExpGain: () => number;\n getWorkRepGain: () => number;\n getWorkMoneyGain: () => number;\n processWorkEarnings: (cycles: number) => void;\n hospitalize: () => void;\n createProgramWork: (numCycles: number) => boolean;\n takeClass: (numCycles: number) => boolean;\n commitCrime: (numCycles: number) => boolean;\n checkForFactionInvitations: () => Faction[];\n setBitNodeNumber: (n: number) => void;\n getMult: (name: string) => number;\n setMult: (name: string, mult: number) => void;\n canAccessCotMG: () => boolean;\n sourceFileLvl: (n: number) => number;\n startGraftAugmentationWork: (augmentationName: string, time: number) => void;\n graftAugmentationWork: (numCycles: number) => boolean;\n finishGraftAugmentationWork: (cancelled: boolean) => string;\n applyEntropy: (stacks?: number) => void;\n\n constructor() {\n //Skills and stats\n this.hacking = 1;\n\n //Combat stats\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;\n\n //Labor stats\n this.charisma = 1;\n\n //Special stats\n this.intelligence = 0;\n\n //Hacking multipliers\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\n //Experience and multipliers\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\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\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\n this.company_rep_mult = 1;\n this.faction_rep_mult = 1;\n\n //Money\n this.money = 1000;\n\n //Location information\n this.city = CityName.Sector12;\n this.location = LocationName.TravelAgency;\n\n // 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 this.jobs = {};\n\n // Company at which player is CURRENTLY working (only valid when the player is actively working)\n this.companyName = \"\"; // Name of Company. Must match a key value in Companies ma;\n\n // Servers\n this.currentServer = \"\"; //hostname of Server currently being accessed through termina;\n this.purchasedServers = []; //hostnames of purchased server;\n\n // Hacknet Nodes/Servers\n this.hacknetNodes = []; // Note= For Hacknet Servers, this array holds the hostnames of the server;\n this.hashManager = new HashManager();\n\n //Factions\n this.factions = []; //Names of all factions player has joine;\n this.factionInvitations = []; //Outstanding faction invitation;\n\n //Augmentations\n this.queuedAugmentations = [];\n this.augmentations = [];\n\n this.sourceFiles = [];\n\n //Crime statistics\n this.numPeopleKilled = 0;\n this.karma = 0;\n\n this.crime_money_mult = 1;\n this.crime_success_mult = 1;\n\n //Flags/variables for working (Company, Faction, Creating Program, Taking Class)\n this.isWorking = false;\n this.focus = false;\n this.workType = \"\";\n this.workCostMult = 1;\n this.workExpMult = 1;\n\n this.currentWorkFactionName = \"\";\n this.currentWorkFactionDescription = \"\";\n\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\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\n this.createProgramName = \"\";\n this.createProgramReqLvl = 0;\n\n this.graftAugmentationName = \"\";\n this.timeWorkedGraftAugmentation = 0;\n\n this.className = \"\";\n\n this.crimeType = \"\";\n\n this.timeWorked = 0; //in m;\n this.timeWorkedCreateProgram = 0;\n this.timeNeededToCompleteWork = 0;\n\n this.work_money_mult = 1;\n\n //Hacknet Node multipliers\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\n //Stock Market\n this.hasWseAccount = false;\n this.hasTixApiAccess = false;\n this.has4SData = false;\n this.has4SDataTixApi = false;\n\n //Gang\n this.gang = null;\n\n //Corporation\n this.corporation = null;\n\n //Bladeburner\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 Onl;\n this.bladeburner_success_chance_mult = 1;\n\n // Sleeves & Re-sleeving\n this.sleeves = [];\n this.sleevesFromCovenant = 0; // # of Duplicate sleeves purchased from the covenan;\n //bitnode\n this.bitNodeN = 1;\n\n this.entropy = 0;\n\n //Used to store the last update time.\n this.lastUpdate = 0;\n this.lastSave = 0;\n this.totalPlaytime = 0;\n\n this.playtimeSinceLastAug = 0;\n this.playtimeSinceLastBitnode = 0;\n\n // Keep track of where money comes from\n this.moneySourceA = new MoneySourceTracker(); // Where money comes from since last-installed Augmentatio;\n this.moneySourceB = new MoneySourceTracker(); // Where money comes from for this entire BitNode ru;\n // Production since last Augmentation installation\n this.scriptProdSinceLastAug = 0;\n\n this.exploits = [];\n this.achievements = [];\n this.terminalCommandHistory = [];\n\n // Let's get a hash of some semi-random stuff so we have something unique.\n this.identifier = cyrb53(\n \"I-\" +\n new Date().getTime() +\n navigator.userAgent +\n window.innerWidth +\n window.innerHeight +\n getRandomInt(100, 999),\n );\n\n this.init = generalMethods.init;\n this.prestigeAugmentation = generalMethods.prestigeAugmentation;\n this.prestigeSourceFile = generalMethods.prestigeSourceFile;\n this.receiveInvite = generalMethods.receiveInvite;\n this.calculateSkill = generalMethods.calculateSkill;\n this.calculateSkillProgress = generalMethods.calculateSkillProgress;\n this.updateSkillLevels = generalMethods.updateSkillLevels;\n this.resetMultipliers = generalMethods.resetMultipliers;\n this.hasProgram = generalMethods.hasProgram;\n this.setMoney = generalMethods.setMoney;\n this.gainMoney = generalMethods.gainMoney;\n this.loseMoney = generalMethods.loseMoney;\n this.canAfford = generalMethods.canAfford;\n this.recordMoneySource = generalMethods.recordMoneySource;\n this.gainHackingExp = generalMethods.gainHackingExp;\n this.gainStrengthExp = generalMethods.gainStrengthExp;\n this.gainDefenseExp = generalMethods.gainDefenseExp;\n this.gainDexterityExp = generalMethods.gainDexterityExp;\n this.gainAgilityExp = generalMethods.gainAgilityExp;\n this.gainCharismaExp = generalMethods.gainCharismaExp;\n this.gainIntelligenceExp = generalMethods.gainIntelligenceExp;\n this.queryStatFromString = generalMethods.queryStatFromString;\n this.resetWorkStatus = generalMethods.resetWorkStatus;\n this.processWorkEarnings = generalMethods.processWorkEarnings;\n this.startWork = generalMethods.startWork;\n this.cancelationPenalty = generalMethods.cancelationPenalty;\n this.work = generalMethods.work;\n this.finishWork = generalMethods.finishWork;\n this.startWorkPartTime = generalMethods.startWorkPartTime;\n this.workPartTime = generalMethods.workPartTime;\n this.finishWorkPartTime = generalMethods.finishWorkPartTime;\n this.startFocusing = generalMethods.startFocusing;\n this.stopFocusing = generalMethods.stopFocusing;\n this.startFactionWork = generalMethods.startFactionWork;\n this.startFactionHackWork = generalMethods.startFactionHackWork;\n this.startFactionFieldWork = generalMethods.startFactionFieldWork;\n this.startFactionSecurityWork = generalMethods.startFactionSecurityWork;\n this.workForFaction = generalMethods.workForFaction;\n this.finishFactionWork = generalMethods.finishFactionWork;\n this.getWorkMoneyGain = generalMethods.getWorkMoneyGain;\n this.getWorkHackExpGain = generalMethods.getWorkHackExpGain;\n this.getWorkStrExpGain = generalMethods.getWorkStrExpGain;\n this.getWorkDefExpGain = generalMethods.getWorkDefExpGain;\n this.getWorkDexExpGain = generalMethods.getWorkDexExpGain;\n this.getWorkAgiExpGain = generalMethods.getWorkAgiExpGain;\n this.getWorkChaExpGain = generalMethods.getWorkChaExpGain;\n this.getWorkRepGain = generalMethods.getWorkRepGain;\n this.process = generalMethods.process;\n this.startCreateProgramWork = generalMethods.startCreateProgramWork;\n this.createProgramWork = generalMethods.createProgramWork;\n this.finishCreateProgramWork = generalMethods.finishCreateProgramWork;\n this.startGraftAugmentationWork = generalMethods.startGraftAugmentationWork;\n this.graftAugmentationWork = generalMethods.craftAugmentationWork;\n this.finishGraftAugmentationWork = generalMethods.finishGraftAugmentationWork;\n this.startClass = generalMethods.startClass;\n this.takeClass = generalMethods.takeClass;\n this.finishClass = generalMethods.finishClass;\n this.startCrime = generalMethods.startCrime;\n this.commitCrime = generalMethods.commitCrime;\n this.finishCrime = generalMethods.finishCrime;\n this.singularityStopWork = generalMethods.singularityStopWork;\n this.takeDamage = generalMethods.takeDamage;\n this.regenerateHp = generalMethods.regenerateHp;\n this.hospitalize = generalMethods.hospitalize;\n this.applyForJob = generalMethods.applyForJob;\n this.getNextCompanyPosition = generalMethods.getNextCompanyPosition;\n this.quitJob = generalMethods.quitJob;\n this.hasJob = generalMethods.hasJob;\n this.applyForSoftwareJob = generalMethods.applyForSoftwareJob;\n this.applyForSoftwareConsultantJob = generalMethods.applyForSoftwareConsultantJob;\n this.applyForItJob = generalMethods.applyForItJob;\n this.applyForSecurityEngineerJob = generalMethods.applyForSecurityEngineerJob;\n this.applyForNetworkEngineerJob = generalMethods.applyForNetworkEngineerJob;\n this.applyForBusinessJob = generalMethods.applyForBusinessJob;\n this.applyForBusinessConsultantJob = generalMethods.applyForBusinessConsultantJob;\n this.applyForSecurityJob = generalMethods.applyForSecurityJob;\n this.applyForAgentJob = generalMethods.applyForAgentJob;\n this.applyForEmployeeJob = generalMethods.applyForEmployeeJob;\n this.applyForPartTimeEmployeeJob = generalMethods.applyForPartTimeEmployeeJob;\n this.applyForWaiterJob = generalMethods.applyForWaiterJob;\n this.applyForPartTimeWaiterJob = generalMethods.applyForPartTimeWaiterJob;\n this.isQualified = generalMethods.isQualified;\n this.reapplyAllAugmentations = generalMethods.reapplyAllAugmentations;\n this.reapplyAllSourceFiles = generalMethods.reapplyAllSourceFiles;\n this.checkForFactionInvitations = generalMethods.checkForFactionInvitations;\n this.setBitNodeNumber = generalMethods.setBitNodeNumber;\n this.queueAugmentation = generalMethods.queueAugmentation;\n this.gainCodingContractReward = generalMethods.gainCodingContractReward;\n this.travel = generalMethods.travel;\n this.gotoLocation = generalMethods.gotoLocation;\n this.canAccessGrafting = generalMethods.canAccessGrafting;\n this.giveExploit = generalMethods.giveExploit;\n this.giveAchievement = generalMethods.giveAchievement;\n this.getIntelligenceBonus = generalMethods.getIntelligenceBonus;\n this.getCasinoWinnings = generalMethods.getCasinoWinnings;\n this.hasAugmentation = augmentationMethods.hasAugmentation;\n this.canAccessBladeburner = bladeburnerMethods.canAccessBladeburner;\n this.inBladeburner = bladeburnerMethods.inBladeburner;\n this.startBladeburner = bladeburnerMethods.startBladeburner;\n this.canAccessCorporation = corporationMethods.canAccessCorporation;\n this.hasCorporation = corporationMethods.hasCorporation;\n this.startCorporation = corporationMethods.startCorporation;\n this.canAccessGang = gangMethods.canAccessGang;\n this.getGangFaction = gangMethods.getGangFaction;\n this.getGangName = gangMethods.getGangName;\n this.hasGangWith = gangMethods.hasGangWith;\n this.inGang = gangMethods.inGang;\n this.startGang = gangMethods.startGang;\n\n this.hasTorRouter = serverMethods.hasTorRouter;\n this.getCurrentServer = serverMethods.getCurrentServer;\n this.getHomeComputer = serverMethods.getHomeComputer;\n this.getUpgradeHomeRamCost = serverMethods.getUpgradeHomeRamCost;\n this.getUpgradeHomeCoresCost = serverMethods.getUpgradeHomeCoresCost;\n this.createHacknetServer = serverMethods.createHacknetServer;\n this.factionWorkType = \"\";\n this.committingCrimeThruSingFn = false;\n this.singFnCrimeWorkerScript = null;\n\n this.getMult = generalMethods.getMult;\n this.setMult = generalMethods.setMult;\n\n this.canAccessCotMG = generalMethods.canAccessCotMG;\n this.sourceFileLvl = generalMethods.sourceFileLvl;\n\n this.applyEntropy = augmentationMethods.applyEntropy;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"PlayerObject\", this);\n }\n\n /**\n * Initiatizes a PlayerObject object from a JSON save state.\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): PlayerObject {\n return Generic_fromJSON(PlayerObject, value.data);\n }\n}\n\nReviver.constructors.PlayerObject = PlayerObject;\n","import React, { useState, useEffect } from \"react\";\nimport { joinFaction } from \"../FactionHelpers\";\nimport { Faction } from \"../Faction\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { EventEmitter } from \"../../utils/EventEmitter\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nexport const InvitationEvent = new EventEmitter<[Faction]>();\n\nexport function InvitationModal(): React.ReactElement {\n const [faction, setFaction] = useState(null);\n const player = use.Player();\n function join(): void {\n if (faction === null) return;\n //Remove from invited factions\n const i = player.factionInvitations.findIndex((facName) => facName === faction.name);\n if (i === -1) {\n console.error(\"Could not find faction in Player.factionInvitations\");\n }\n joinFaction(faction);\n setFaction(null);\n }\n\n useEffect(() => InvitationEvent.subscribe((faction) => setFaction(faction)), []);\n\n return (\n setFaction(null)}>\n You have received a faction invitation.\n \n Would you like to join {(faction || { name: \"\" }).name}?
    \n
    \n Warning: Joining this faction may prevent you from joining other factions during this run!\n
    \n \n \n
    \n );\n}\n","import { Literatures } from \"./Literatures\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\n\nexport function showLiterature(fn: string): void {\n const litObj = Literatures[fn];\n if (litObj == null) {\n return;\n }\n const txt = `${litObj.title}

    ${litObj.txt}`;\n dialogBoxCreate(txt);\n}\n","import { ITaskParams, ITerritory } from \"./ITaskParams\";\n\nexport class GangMemberTask {\n name: string;\n desc: string;\n\n isHacking: boolean;\n isCombat: boolean;\n\n baseRespect: number;\n baseWanted: number;\n baseMoney: number;\n\n hackWeight: number;\n strWeight: number;\n defWeight: number;\n dexWeight: number;\n agiWeight: number;\n chaWeight: number;\n\n difficulty: number;\n\n territory: ITerritory;\n\n // Defines tasks that Gang Members can work on\n constructor(name: string, desc: string, isHacking: boolean, isCombat: boolean, params: ITaskParams) {\n this.name = name;\n this.desc = desc;\n\n // Flags that describe whether this Task is applicable for Hacking/Combat gangs\n this.isHacking = isHacking;\n this.isCombat = isCombat;\n\n // Base gain rates for respect/wanted/money\n this.baseRespect = params.baseRespect ? params.baseRespect : 0;\n this.baseWanted = params.baseWanted ? params.baseWanted : 0;\n this.baseMoney = params.baseMoney ? params.baseMoney : 0;\n\n // Weighting for the effect that each stat has on the tasks effectiveness.\n // Weights must add up to 100\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 (\n Math.round(\n this.hackWeight + this.strWeight + this.defWeight + this.dexWeight + this.agiWeight + this.chaWeight,\n ) != 100\n ) {\n console.error(`GangMemberTask ${this.name} weights do not add up to 100`);\n }\n\n // 1 - 100\n this.difficulty = params.difficulty ? params.difficulty : 1;\n\n // 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 this.territory = params.territory ? params.territory : { money: 1, respect: 1, wanted: 1 };\n }\n}\n","export class PlayerOwnedSourceFile {\n // Source-File level\n lvl = 1;\n\n // Source-File number\n n = 1;\n\n constructor(n: number, level: number) {\n this.n = n;\n this.lvl = level;\n }\n}\n\nexport interface IPlayerOwnedSourceFile {\n lvl: number;\n n: number;\n}\n","import { RunningScript } from \"src/Script/RunningScript\";\nimport { WorkerScript } from \"./WorkerScript\";\n\nexport const recentScripts: RecentScript[] = [];\n\nexport function AddRecentScript(workerScript: WorkerScript): void {\n if (recentScripts.find((r) => r.pid === workerScript.pid)) return;\n recentScripts.unshift({\n filename: workerScript.name,\n args: workerScript.args,\n pid: workerScript.pid,\n timestamp: new Date(),\n\n runningScript: workerScript.scriptRef,\n });\n while (recentScripts.length > 50) {\n recentScripts.pop();\n }\n}\n\nexport interface RecentScript {\n filename: string;\n args: string[];\n pid: number;\n timestamp: Date;\n runningScript: RunningScript;\n}\n","import * as acorn from \"acorn\";\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(\"use strict\");\n\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 */\nvar Interpreter = function (code, opt_initFunc, lineOffset = 0) {\n this.sourceCode = code;\n this.sourceCodeLineOffset = lineOffset;\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n this.ast = code;\n this.initFunc_ = opt_initFunc;\n this.paused_ = false;\n this.polyfills_ = [];\n // Unique identifier for native functions. Used in serialization.\n this.functionCounter_ = 0;\n // Map node types to our step function names; a property lookup is faster\n // than string concatenation with \"step\" prefix.\n this.stepFunctions_ = Object.create(null);\n var stepMatch = /^step([A-Z]\\w*)$/;\n var m;\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 }\n // Create and initialize the global scope.\n this.global = this.createScope(this.ast, null);\n // Run the polyfills.\n this.ast = acorn.parse(this.polyfills_.join(\"\\n\"), Interpreter.PARSE_OPTIONS);\n this.polyfills_ = undefined; // Allow polyfill strings to garbage collect.\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;\n // Point at the main program.\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;\n // Get a handle on Acorn's node_t object. It's tricky to access.\n this.nodeConstructor = state.node.constructor;\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\n this[\"stateStack\"] = this.stateStack;\n};\n\n/**\n * @const {!Object} Configuration used for all Acorn parsing.\n */\nInterpreter.PARSE_OPTIONS = {\n ecmaVersion: 5,\n locations: true,\n};\n\n/**\n * Property descriptor of readonly properties.\n */\nInterpreter.READONLY_DESCRIPTOR = {\n configurable: true,\n enumerable: true,\n writable: false,\n};\n\n/**\n * Property descriptor of non-enumerable properties.\n */\nInterpreter.NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: true,\n};\n\n/**\n * Property descriptor of readonly, non-enumerable properties.\n */\nInterpreter.READONLY_NONENUMERABLE_DESCRIPTOR = {\n configurable: true,\n enumerable: false,\n writable: false,\n};\n\n/**\n * Property descriptor of variables.\n */\nInterpreter.VARIABLE_DESCRIPTOR = {\n configurable: false,\n enumerable: true,\n writable: true,\n};\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 */\nInterpreter.STEP_ERROR = {};\n\n/**\n * Unique symbol for indicating that a reference is a variable on the scope,\n * not an object property.\n */\nInterpreter.SCOPE_REFERENCE = {};\n\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 */\nInterpreter.VALUE_IN_DESCRIPTOR = {};\n\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 */\nInterpreter.toStringCycles_ = [];\n\n/**\n * Determine error/exception line number in Bitburner source code\n * @param {Object} AST Node that causes Error/Exception\n */\nInterpreter.prototype.getErrorLineNumber = function (node) {\n var code = this.sourceCode;\n if (node == null || node.start == null) {\n return NaN;\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/**\n * Generate the appropriate line number error message for Bitburner\n * @param {Number} lineNumber\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 (\n \" (Line Number \" +\n lineNumber +\n \". This line number is probably incorrect \" +\n \"if your script is importing any functions. This is being worked on)\"\n );\n }\n};\n\n/**\n * Add more code to the interpreter.\n * @param {string|!Object} code Raw JavaScript text or AST.\n */\nInterpreter.prototype.appendCode = function (code) {\n var state = this.stateStack[0];\n if (!state || state.node[\"type\"] !== \"Program\") {\n throw Error(\"Expecting original AST to start with a Program node.\");\n }\n if (typeof code === \"string\") {\n code = acorn.parse(code, Interpreter.PARSE_OPTIONS);\n }\n if (!code || code[\"type\"] !== \"Program\") {\n throw Error(\"Expecting new AST to start with a Program node.\");\n }\n this.populateScope_(code, state.scope);\n // Append the new program to the old one.\n for (var i = 0, node; (node = code[\"body\"][i]); i++) {\n state.node[\"body\"].push(node);\n }\n state.done = false;\n};\n\n/**\n * Execute one step of the interpreter.\n * @return {boolean} True if a step was executed, false if no more instructions.\n */\nInterpreter.prototype.step = function () {\n var stack = this.stateStack;\n var state = stack[stack.length - 1];\n if (!state) {\n return false;\n }\n var node = state.node,\n type = node[\"type\"];\n if (type === \"Program\" && state.done) {\n return false;\n } else if (this.paused_) {\n return true;\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 if (nextState) {\n stack.push(nextState);\n }\n if (!node[\"end\"]) {\n // This is polyfill code. Keep executing until we arrive at user code.\n return this.step();\n }\n return true;\n};\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 */\nInterpreter.prototype.run = function () {\n while (!this.paused_ && this.step()) {}\n return this.paused_;\n};\n\n/**\n * Initialize the global scope with buitin properties and functions.\n * @param {!Interpreter.Object} scope Global scope.\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\n // Create the objects which will become Object.prototype and\n // Function.prototype, which are needed to bootstrap everything else.\n this.OBJECT_PROTO = new Interpreter.Object(null);\n this.FUNCTION_PROTO = new Interpreter.Object(this.OBJECT_PROTO);\n // Initialize global objects.\n this.initFunction(scope);\n this.initObject(scope);\n // 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 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);\n\n // Initialize global functions.\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\n this.setProperty(scope, \"parseInt\", this.createNativeFunction(parseInt, false));\n this.setProperty(scope, \"parseFloat\", this.createNativeFunction(parseFloat, false));\n\n this.setProperty(scope, \"isNaN\", this.createNativeFunction(isNaN, false));\n\n this.setProperty(scope, \"isFinite\", this.createNativeFunction(isFinite, false));\n\n var strFunctions = [\n [escape, \"escape\"],\n [unescape, \"unescape\"],\n [decodeURI, \"decodeURI\"],\n [decodeURIComponent, \"decodeURIComponent\"],\n [encodeURI, \"encodeURI\"],\n [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 this.setProperty(\n scope,\n strFunctions[i][1],\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n // Preserve publicly properties from being pruned/renamed by JS compilers.\n // Add others as needed.\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;\n // The following properties are obsolete. Do not use.\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;\n\n // Run any user-provided initialization.\n if (this.initFunc_) {\n this.initFunc_(this, scope);\n }\n};\n\n/**\n * Initialize the Function class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initFunction = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n var identifierRegexp = /^[A-Za-z_$][\\w$]*$/;\n // Function constructor.\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 if (arguments.length) {\n var code = String(arguments[arguments.length - 1]);\n } else {\n var code = \"\";\n }\n var argsStr = Array.prototype.slice.call(arguments, 0, -1).join(\",\").trim();\n if (argsStr) {\n var args = argsStr.split(/\\s*,\\s*/);\n for (var i = 0; i < args.length; i++) {\n var name = args[i];\n if (!identifierRegexp.test(name)) {\n thisInterpreter.throwException(thisInterpreter.SYNTAX_ERROR, \"Invalid function argument: \" + name);\n }\n }\n argsStr = args.join(\", \");\n }\n // Interestingly, the scope for constructed functions is the global scope,\n // even if they were constructed in some other scope.\n newFunc.parentScope = thisInterpreter.global;\n // Acorn needs to parse code in the context of a function or else 'return'\n // statements will be syntax errors.\n try {\n var ast = acorn.parse(\"(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 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 newFunc.node = ast[\"body\"][0][\"expression\"];\n thisInterpreter.setProperty(newFunc, \"length\", newFunc.node[\"length\"], Interpreter.READONLY_DESCRIPTOR);\n return newFunc;\n };\n wrapper.id = this.functionCounter_++;\n this.FUNCTION = this.createObjectProto(this.FUNCTION_PROTO);\n\n this.setProperty(scope, \"Function\", this.FUNCTION);\n // Manually setup type and prototype because createObj doesn't recognize\n // this object as a function (this.FUNCTION did not exist).\n this.setProperty(this.FUNCTION, \"prototype\", this.FUNCTION_PROTO);\n this.FUNCTION.nativeFunc = wrapper;\n\n // Configure Function.prototype.\n this.setProperty(this.FUNCTION_PROTO, \"constructor\", this.FUNCTION, Interpreter.NONENUMERABLE_DESCRIPTOR);\n this.FUNCTION_PROTO.nativeFunc = function () {};\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 return value;\n };\n\n wrapper = function (thisArg, args) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to apply a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\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 state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"apply\", wrapper);\n\n wrapper = function (thisArg /*, var_args */) {\n var state = thisInterpreter.stateStack[thisInterpreter.stateStack.length - 1];\n // Rewrite the current 'CallExpression' to call a different function.\n state.func_ = this;\n // Assign the 'this' object.\n state.funcThis_ = boxThis(thisArg);\n // Bind any provided arguments.\n state.arguments_ = [];\n for (var i = 1; i < arguments.length; i++) {\n state.arguments_.push(arguments[i]);\n }\n state.doneExec_ = false;\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"call\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_objects/Function/bind\n \"Object.defineProperty(Function.prototype, 'bind',\",\n \"{configurable: true, writable: true, value:\",\n \"function(oThis) {\",\n \"if (typeof this !== 'function') {\",\n \"throw TypeError('What is trying to be bound is not callable');\",\n \"}\",\n \"var aArgs = Array.prototype.slice.call(arguments, 1),\",\n \"fToBind = this,\",\n \"fNOP = function() {},\",\n \"fBound = function() {\",\n \"return fToBind.apply(this instanceof fNOP\",\n \"? this\",\n \": oThis,\",\n \"aArgs.concat(Array.prototype.slice.call(arguments)));\",\n \"};\",\n \"if (this.prototype) {\",\n \"fNOP.prototype = this.prototype;\",\n \"}\",\n \"fBound.prototype = new fNOP();\",\n \"return fBound;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n // Function has no parent to inherit from, so it needs its own mandatory\n // toString and valueOf functions.\n wrapper = function () {\n return this.toString();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"toString\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"toString\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n wrapper = function () {\n return this.valueOf();\n };\n this.setNativeFunctionPrototype(this.FUNCTION, \"valueOf\", wrapper);\n this.setProperty(\n this.FUNCTION,\n \"valueOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Initialize the Object class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initObject = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Object constructor.\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 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 }\n // Return the provided object.\n return value;\n };\n this.OBJECT = this.createNativeFunction(wrapper, true);\n // Throw away the created prototype and use the root prototype.\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 /**\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 var throwIfNullUndefined = function (value) {\n if (value === undefined || value === null) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Cannot convert '\" + value + \"' to object\");\n }\n };\n\n // Static methods on Object.\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n var props = obj.isObject ? obj.properties : obj;\n return thisInterpreter.arrayNativeToPseudo(Object.getOwnPropertyNames(props));\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyNames\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n if (obj.isObject) {\n obj = obj.properties;\n }\n return thisInterpreter.arrayNativeToPseudo(Object.keys(obj));\n };\n this.setProperty(\n this.OBJECT,\n \"keys\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\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 if (proto === undefined || !proto.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object prototype may only be an Object or null\");\n }\n return thisInterpreter.createObjectProto(proto);\n };\n this.setProperty(\n this.OBJECT,\n \"create\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Add a polyfill to handle create's second argument.\n this.polyfills_.push(\n \"(function() {\",\n \"var create_ = Object.create;\",\n \"Object.create = function(proto, props) {\",\n \"var obj = create_(proto);\",\n \"props && Object.defineProperties(obj, props);\",\n \"return obj;\",\n \"};\",\n \"})();\",\n \"\",\n );\n\n wrapper = function (obj, prop, descriptor) {\n prop = String(prop);\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Object.defineProperty called on non-object\");\n }\n if (!descriptor || !descriptor.isObject) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, \"Property description must be an object\");\n }\n if (!obj.properties[prop] && obj.preventExtensions) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Can't define property '\" + prop + \"', object is not extensible\",\n );\n }\n // The polyfill guarantees no inheritance and no getter functions.\n // Therefore the descriptor properties map is the native object needed.\n thisInterpreter.setProperty(obj, prop, Interpreter.VALUE_IN_DESCRIPTOR, descriptor.properties);\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"defineProperty\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.polyfills_.push(\n // Flatten the descriptor to remove any inheritance or getter functions.\n \"(function() {\",\n \"var defineProperty_ = Object.defineProperty;\",\n \"Object.defineProperty = function(obj, prop, d1) {\",\n \"var d2 = {};\",\n \"if ('configurable' in d1) d2.configurable = d1.configurable;\",\n \"if ('enumerable' in d1) d2.enumerable = d1.enumerable;\",\n \"if ('writable' in d1) d2.writable = d1.writable;\",\n \"if ('value' in d1) d2.value = d1.value;\",\n \"if ('get' in d1) d2.get = d1.get;\",\n \"if ('set' in d1) d2.set = d1.set;\",\n \"return defineProperty_(obj, prop, d2);\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Object, 'defineProperties',\",\n \"{configurable: true, writable: true, value:\",\n \"function(obj, props) {\",\n \"var keys = Object.keys(props);\",\n \"for (var i = 0; i < keys.length; i++) {\",\n \"Object.defineProperty(obj, keys[i], props[keys[i]]);\",\n \"}\",\n \"return obj;\",\n \"}\",\n \"});\",\n \"\",\n );\n\n wrapper = function (obj, prop) {\n if (!obj || !obj.isObject) {\n thisInterpreter.throwException(\n thisInterpreter.TYPE_ERROR,\n \"Object.getOwnPropertyDescriptor called on non-object\",\n );\n }\n prop = String(prop);\n if (!(prop in obj.properties)) {\n return undefined;\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 }\n // Preserve value, but remove it for the nativeToPseudo call.\n var value = descriptor.value;\n var hasValue = \"value\" in descriptor;\n delete descriptor.value;\n var pseudoDescriptor = thisInterpreter.nativeToPseudo(descriptor);\n if (hasValue) {\n thisInterpreter.setProperty(pseudoDescriptor, \"value\", value);\n }\n return pseudoDescriptor;\n };\n this.setProperty(\n this.OBJECT,\n \"getOwnPropertyDescriptor\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n throwIfNullUndefined(obj);\n return thisInterpreter.getPrototype(obj);\n };\n this.setProperty(\n this.OBJECT,\n \"getPrototypeOf\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n return Boolean(obj) && !obj.preventExtensions;\n };\n this.setProperty(\n this.OBJECT,\n \"isExtensible\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (obj) {\n if (obj && obj.isObject) {\n obj.preventExtensions = true;\n }\n return obj;\n };\n this.setProperty(\n this.OBJECT,\n \"preventExtensions\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Object.\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 if (!this.isObject) {\n return this.hasOwnProperty(prop);\n }\n return String(prop) in this.properties;\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"hasOwnProperty\", wrapper);\n\n wrapper = function (prop) {\n throwIfNullUndefined(this);\n if (!this.isObject) {\n return this.propertyIsEnumerable(prop);\n }\n return Object.prototype.propertyIsEnumerable.call(this.properties, prop);\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 if (!obj) {\n // No parent; reached the top.\n return false;\n }\n if (obj === this) {\n return true;\n }\n }\n };\n this.setNativeFunctionPrototype(this.OBJECT, \"isPrototypeOf\", wrapper);\n};\n\n/**\n * Initialize the Array class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initArray = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Array constructor.\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 var first = arguments[0];\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 newArray.properties.length = first;\n } else {\n for (var i = 0; i < arguments.length; i++) {\n newArray.properties[i] = arguments[i];\n }\n newArray.properties.length = i;\n }\n return newArray;\n };\n this.ARRAY = this.createNativeFunction(wrapper, true);\n this.ARRAY_PROTO = this.ARRAY.properties[\"prototype\"];\n this.setProperty(scope, \"Array\", this.ARRAY);\n\n // Static methods on Array.\n wrapper = function (obj) {\n return obj && obj.class === \"Array\";\n };\n this.setProperty(\n this.ARRAY,\n \"isArray\",\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on Array.\n wrapper = function () {\n return Array.prototype.pop.call(this.properties);\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 this.setNativeFunctionPrototype(this.ARRAY, \"push\", wrapper);\n\n wrapper = function () {\n return Array.prototype.shift.call(this.properties);\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 this.setNativeFunctionPrototype(this.ARRAY, \"unshift\", wrapper);\n\n wrapper = function () {\n Array.prototype.reverse.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"reverse\", wrapper);\n\n wrapper = function (index, howmany /*, var_args*/) {\n var list = Array.prototype.splice.apply(this.properties, arguments);\n return thisInterpreter.arrayNativeToPseudo(list);\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 this.setNativeFunctionPrototype(this.ARRAY, \"slice\", wrapper);\n\n wrapper = function (opt_separator) {\n return Array.prototype.join.call(this.properties, opt_separator);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"join\", wrapper);\n\n wrapper = function (var_args) {\n var list = [];\n var length = 0;\n // Start by copying the current array.\n var iLength = thisInterpreter.getProperty(this, \"length\");\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 length++;\n }\n // Loop through all arguments and copy them in.\n for (var i = 0; i < arguments.length; i++) {\n var value = arguments[i];\n if (thisInterpreter.isa(value, thisInterpreter.ARRAY)) {\n var jLength = thisInterpreter.getProperty(value, \"length\");\n for (var j = 0; j < jLength; j++) {\n if (thisInterpreter.hasProperty(value, j)) {\n list[length] = thisInterpreter.getProperty(value, j);\n }\n length++;\n }\n } else {\n list[length] = value;\n }\n }\n return thisInterpreter.arrayNativeToPseudo(list);\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 this.setNativeFunctionPrototype(this.ARRAY, \"indexOf\", wrapper);\n\n wrapper = function (searchElement, opt_fromIndex) {\n return Array.prototype.lastIndexOf.apply(this.properties, arguments);\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"lastIndexOf\", wrapper);\n\n wrapper = function () {\n Array.prototype.sort.call(this.properties);\n return this;\n };\n this.setNativeFunctionPrototype(this.ARRAY, \"sort\", wrapper);\n\n this.polyfills_.push(\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/every\n \"Object.defineProperty(Array.prototype, 'every',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callbackfn, thisArg) {\",\n \"if (!this || typeof callbackfn !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O && !callbackfn.call(T, O[k], k, O)) return false;\",\n \"k++;\",\n \"}\",\n \"return true;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/filter\n \"Object.defineProperty(Array.prototype, 'filter',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (this === void 0 || this === null || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var res = [];\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t) {\",\n \"var val = t[i];\",\n \"if (fun.call(thisArg, val, i, t)) res.push(val);\",\n \"}\",\n \"}\",\n \"return res;\",\n \"}\",\n \"});\",\n\n // 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) {\",\n \"Object.defineProperty(Array.prototype, 'find', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return kValue;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return undefined;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // 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) {\",\n \"Object.defineProperty(Array.prototype, 'findIndex', {\",\n \"value: function(predicate) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"var o = Object(this);\",\n \"var len = o.length >>> 0;\",\n \"if (typeof predicate !== 'function') {\",\n \"throw new TypeError('predicate must be a function');\",\n \"}\",\n \"var thisArg = arguments[1];\",\n \"var k = 0;\",\n \"while (k < len) {\",\n \"var kValue = o[k];\",\n \"if (predicate.call(thisArg, kValue, k, o)) {\",\n \"return k;\",\n \"}\",\n \"k++;\",\n \"}\",\n \"return -1;\",\n \"},\",\n \"configurable: true,\",\n \"writable: true\",\n \"});\",\n \"}\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/forEach\n \"Object.defineProperty(Array.prototype, 'forEach',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var T, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"}\",\n \"});\",\n\n // 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', {\",\n \"value: function(searchElement, fromIndex) {\",\n \"if (this == null) {\",\n \"throw new TypeError('\\\"this\\\" is null or not defined');\",\n \"}\",\n \"// 1. Let O be ? ToObject(this value).\",\n \"var o = Object(this);\",\n '// 2. Let len be ? ToLength(? Get(O, \"length\")).',\n \"var len = o.length >>> 0;\",\n \"// 3. If len is 0, return false.\",\n \"if (len === 0) {\",\n \"return false;\",\n \"}\",\n \"// 4. Let n be ? ToInteger(fromIndex).\",\n \"// (If fromIndex is undefined, this step produces the value 0.)\",\n \"var n = fromIndex | 0;\",\n \"// 5. If n ≥ 0, then\",\n \"// a. Let k be n.\",\n \"// 6. Else n < 0,\",\n \"// a. Let k be len + n.\",\n \"// b. If k < 0, let k be 0.\",\n \"var k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);\",\n \"function sameValueZero(x, y) {\",\n \"return x === y || (typeof x === 'number' && typeof y === 'number' && isNaN(x) && isNaN(y));\",\n \"}\",\n \"// 7. Repeat, while k < len\",\n \"while (k < len) {\",\n \"// a. Let elementK be the result of ? Get(O, ! ToString(k)).\",\n \"// b. If SameValueZero(searchElement, elementK) is true, return true.\",\n \"if (sameValueZero(o[k], searchElement)) {\",\n \"return true;\",\n \"}\",\n \"// c. Increase k by 1. \",\n \"k++;\",\n \"}\",\n \"// 8. Return false\",\n \"return false;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/map\n \"Object.defineProperty(Array.prototype, 'map',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback, thisArg) {\",\n \"if (!this || typeof callback !== 'function') new TypeError;\",\n \"var T, A, k;\",\n \"var O = Object(this);\",\n \"var len = O.length >>> 0;\",\n \"if (arguments.length > 1) T = thisArg;\",\n \"A = new Array(len);\",\n \"k = 0;\",\n \"while (k < len) {\",\n \"if (k in O) A[k] = callback.call(T, O[k], k, O);\",\n \"k++;\",\n \"}\",\n \"return A;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce\n \"Object.defineProperty(Array.prototype, 'reduce',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (!this || typeof callback !== 'function') throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = 0, value;\",\n \"if (arguments.length === 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k < len && !(k in t)) k++;\",\n \"if (k >= len) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k++];\",\n \"}\",\n \"for (; k < len; k++) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/ReduceRight\n \"Object.defineProperty(Array.prototype, 'reduceRight',\",\n \"{configurable: true, writable: true, value:\",\n \"function(callback /*, initialValue*/) {\",\n \"if (null === this || 'undefined' === typeof this || 'function' !== typeof callback) throw TypeError();\",\n \"var t = Object(this), len = t.length >>> 0, k = len - 1, value;\",\n \"if (arguments.length >= 2) {\",\n \"value = arguments[1];\",\n \"} else {\",\n \"while (k >= 0 && !(k in t)) k--;\",\n \"if (k < 0) {\",\n \"throw TypeError('Reduce of empty array with no initial value');\",\n \"}\",\n \"value = t[k--];\",\n \"}\",\n \"for (; k >= 0; k--) {\",\n \"if (k in t) value = callback(value, t[k], k, t);\",\n \"}\",\n \"return value;\",\n \"}\",\n \"});\",\n\n // Polyfill copied from:\n // developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array/some\n \"Object.defineProperty(Array.prototype, 'some',\",\n \"{configurable: true, writable: true, value:\",\n \"function(fun/*, thisArg*/) {\",\n \"if (!this || typeof fun !== 'function') throw TypeError();\",\n \"var t = Object(this);\",\n \"var len = t.length >>> 0;\",\n \"var thisArg = arguments.length >= 2 ? arguments[1] : void 0;\",\n \"for (var i = 0; i < len; i++) {\",\n \"if (i in t && fun.call(thisArg, t[i], i, t)) {\",\n \"return true;\",\n \"}\",\n \"}\",\n \"return false;\",\n \"}\",\n \"});\",\n\n \"(function() {\",\n \"var sort_ = Array.prototype.sort;\",\n \"Array.prototype.sort = function(opt_comp) {\",\n // Fast native sort.\n \"if (typeof opt_comp !== 'function') {\",\n \"return sort_.call(this);\",\n \"}\",\n // Slow bubble sort.\n \"for (var i = 0; i < this.length; i++) {\",\n \"var changes = 0;\",\n \"for (var j = 0; j < this.length - i - 1; j++) {\",\n \"if (opt_comp(this[j], this[j + 1]) > 0) {\",\n \"var swap = this[j];\",\n \"this[j] = this[j + 1];\",\n \"this[j + 1] = swap;\",\n \"changes++;\",\n \"}\",\n \"}\",\n \"if (!changes) break;\",\n \"}\",\n \"return this;\",\n \"};\",\n \"})();\",\n\n \"Object.defineProperty(Array.prototype, 'toLocaleString',\",\n \"{configurable: true, writable: true, value:\",\n \"function() {\",\n \"var out = [];\",\n \"for (var i = 0; i < this.length; i++) {\",\n \"out[i] = (this[i] === null || this[i] === undefined) ? '' : this[i].toLocaleString();\",\n \"}\",\n \"return out.join(',');\",\n \"}\",\n \"});\",\n \"\",\n );\n};\n\n/**\n * Initialize the String class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initString = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // String constructor.\n wrapper = function (value) {\n value = String(value);\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 this.STRING = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"String\", this.STRING);\n\n // Static methods on String.\n this.setProperty(\n this.STRING,\n \"fromCharCode\",\n this.createNativeFunction(String.fromCharCode, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n // Instance methods on String.\n // Methods with exclusively primitive arguments.\n var functions = [\n \"charAt\",\n \"charCodeAt\",\n \"concat\",\n \"indexOf\",\n \"lastIndexOf\",\n \"slice\",\n \"substr\",\n \"substring\",\n \"toLocaleLowerCase\",\n \"toLocaleUpperCase\",\n \"toLowerCase\",\n \"toUpperCase\",\n \"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 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 var jsList = String(this).split(separator, limit);\n return thisInterpreter.arrayNativeToPseudo(jsList);\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 var m = String(this).match(regexp);\n return m && thisInterpreter.arrayNativeToPseudo(m);\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 return String(this).search(regexp);\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 return String(this).replace(substr, newSubstr);\n };\n this.setNativeFunctionPrototype(this.STRING, \"replace\", wrapper);\n // Add a polyfill to handle replace's second argument being a function.\n this.polyfills_.push(\n \"(function() {\",\n \"var replace_ = String.prototype.replace;\",\n \"String.prototype.replace = function(substr, newSubstr) {\",\n \"if (typeof newSubstr !== 'function') {\",\n // string.replace(string|regexp, string)\n \"return replace_.call(this, substr, newSubstr);\",\n \"}\",\n \"var str = this;\",\n \"if (substr instanceof RegExp) {\", // string.replace(regexp, function)\n \"var subs = [];\",\n \"var m = substr.exec(str);\",\n \"while (m) {\",\n \"m.push(m.index, str);\",\n \"var inject = newSubstr.apply(null, m);\",\n \"subs.push([m.index, m[0].length, inject]);\",\n \"m = substr.global ? substr.exec(str) : null;\",\n \"}\",\n \"for (var i = subs.length - 1; i >= 0; i--) {\",\n \"str = str.substring(0, subs[i][0]) + subs[i][2] + \" + \"str.substring(subs[i][0] + subs[i][1]);\",\n \"}\",\n \"} else {\", // string.replace(string, function)\n \"var i = str.indexOf(substr);\",\n \"if (i !== -1) {\",\n \"var inject = newSubstr(str.substr(i, substr.length), i, str);\",\n \"str = str.substring(0, i) + inject + \" + \"str.substring(i + substr.length);\",\n \"}\",\n \"}\",\n \"return str;\",\n \"};\",\n \"})();\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\n \"if (!String.prototype.endsWith) {\",\n \"String.prototype.endsWith = function(search, this_len) {\",\n \"if (this_len === undefined || this_len > this.length) {\",\n \"this_len = this.length;\",\n \"}\",\n \"return this.substring(this_len - search.length, this_len) === search;\",\n \"};\",\n \"}\",\n\n //Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\n \"if (!String.prototype.includes) {\",\n \"String.prototype.includes = function(search, start) {\",\n \"'use strict';\",\n \"if (typeof start !== 'number') {\",\n \"start = 0;\",\n \"}\",\n \" \",\n \"if (start + search.length > this.length) {\",\n \"return false;\",\n \"} else {\",\n \"return this.indexOf(search, start) !== -1;\",\n \"}\",\n \"};\",\n \"}\",\n\n // Polyfill copied from:\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\n \"if (!String.prototype.startsWith) {\",\n \"String.prototype.startsWith = function(search, pos) {\",\n \"return this.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\",\n \"};\",\n \"}\",\n\n \"\",\n );\n};\n\n/**\n * Initialize the Boolean class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initBoolean = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Boolean constructor.\n wrapper = function (value) {\n value = Boolean(value);\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 this.BOOLEAN = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Boolean\", this.BOOLEAN);\n};\n\n/**\n * Initialize the Number class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initNumber = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Number constructor.\n wrapper = function (value) {\n value = Number(value);\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 this.NUMBER = this.createNativeFunction(wrapper, true);\n this.setProperty(scope, \"Number\", this.NUMBER);\n\n var numConsts = [\"MAX_VALUE\", \"MIN_VALUE\", \"NaN\", \"NEGATIVE_INFINITY\", \"POSITIVE_INFINITY\"];\n for (var i = 0; i < numConsts.length; i++) {\n this.setProperty(this.NUMBER, numConsts[i], Number[numConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n\n // Instance methods on Number.\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 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 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 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 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 this.setNativeFunctionPrototype(this.NUMBER, \"toLocaleString\", wrapper);\n};\n\n/**\n * Initialize the Date class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initDate = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // Date constructor.\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 }\n // Called as new Date().\n var args = [null].concat(Array.from(arguments));\n this.data = new (Function.prototype.bind.apply(Date, args))();\n return this;\n };\n this.DATE = this.createNativeFunction(wrapper, true);\n this.DATE_PROTO = this.DATE.properties[\"prototype\"];\n this.setProperty(scope, \"Date\", this.DATE);\n\n // Static methods on Date.\n this.setProperty(this.DATE, \"now\", this.createNativeFunction(Date.now, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n this.setProperty(\n this.DATE,\n \"parse\",\n this.createNativeFunction(Date.parse, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n\n this.setProperty(this.DATE, \"UTC\", this.createNativeFunction(Date.UTC, false), Interpreter.NONENUMERABLE_DESCRIPTOR);\n\n // Instance methods on Date.\n var functions = [\n \"getDate\",\n \"getDay\",\n \"getFullYear\",\n \"getHours\",\n \"getMilliseconds\",\n \"getMinutes\",\n \"getMonth\",\n \"getSeconds\",\n \"getTime\",\n \"getTimezoneOffset\",\n \"getUTCDate\",\n \"getUTCDay\",\n \"getUTCFullYear\",\n \"getUTCHours\",\n \"getUTCMilliseconds\",\n \"getUTCMinutes\",\n \"getUTCMonth\",\n \"getUTCSeconds\",\n \"getYear\",\n \"setDate\",\n \"setFullYear\",\n \"setHours\",\n \"setMilliseconds\",\n \"setMinutes\",\n \"setMonth\",\n \"setSeconds\",\n \"setTime\",\n \"setUTCDate\",\n \"setUTCFullYear\",\n \"setUTCHours\",\n \"setUTCMilliseconds\",\n \"setUTCMinutes\",\n \"setUTCMonth\",\n \"setUTCSeconds\",\n \"setYear\",\n \"toDateString\",\n \"toISOString\",\n \"toJSON\",\n \"toGMTString\",\n \"toLocaleDateString\",\n \"toLocaleString\",\n \"toLocaleTimeString\",\n \"toTimeString\",\n \"toUTCString\",\n ];\n for (var i = 0; i < functions.length; i++) {\n wrapper = (function (nativeFunc) {\n return function (var_args) {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args[i] = thisInterpreter.pseudoToNative(arguments[i]);\n }\n return this.data[nativeFunc].apply(this.data, args);\n };\n })(functions[i]);\n this.setNativeFunctionPrototype(this.DATE, functions[i], wrapper);\n }\n};\n\n/**\n * Initialize Regular Expression object.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initRegExp = function (scope) {\n var thisInterpreter = this;\n var wrapper;\n // RegExp constructor.\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 pattern = pattern ? pattern.toString() : \"\";\n flags = flags ? flags.toString() : \"\";\n thisInterpreter.populateRegExp(rgx, new RegExp(pattern, flags));\n return rgx;\n };\n this.REGEXP = this.createNativeFunction(wrapper, true);\n this.REGEXP_PROTO = this.REGEXP.properties[\"prototype\"];\n this.setProperty(scope, \"RegExp\", this.REGEXP);\n\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"global\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"ignoreCase\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"multiline\",\n undefined,\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n this.setProperty(\n this.REGEXP.properties[\"prototype\"],\n \"source\",\n \"(?:)\",\n Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR,\n );\n\n wrapper = function (str) {\n return this.data.test(str);\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"test\", wrapper);\n\n wrapper = function (str) {\n str = str.toString();\n // Get lastIndex from wrapped regex, since this is settable.\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 for (var i = 0; i < match.length; i++) {\n thisInterpreter.setProperty(result, i, match[i]);\n }\n // match has additional properties.\n thisInterpreter.setProperty(result, \"index\", match.index);\n thisInterpreter.setProperty(result, \"input\", match.input);\n return result;\n }\n return null;\n };\n this.setNativeFunctionPrototype(this.REGEXP, \"exec\", wrapper);\n};\n\n/**\n * Initialize the Error class.\n * @param {!Interpreter.Object} scope Global scope.\n */\nInterpreter.prototype.initError = function (scope) {\n var thisInterpreter = this;\n // Error constructor.\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 if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\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 if (opt_message) {\n thisInterpreter.setProperty(newError, \"message\", String(opt_message), Interpreter.NONENUMERABLE_DESCRIPTOR);\n }\n return newError;\n }, true);\n thisInterpreter.setProperty(constructor, \"prototype\", thisInterpreter.createObject(thisInterpreter.ERROR));\n thisInterpreter.setProperty(\n constructor.properties[\"prototype\"],\n \"name\",\n name,\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n thisInterpreter.setProperty(scope, name, constructor);\n\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/**\n * Initialize Math object.\n * @param {!Interpreter.Object} scope Global scope.\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 for (var i = 0; i < mathConsts.length; i++) {\n this.setProperty(myMath, mathConsts[i], Math[mathConsts[i]], Interpreter.READONLY_NONENUMERABLE_DESCRIPTOR);\n }\n var numFunctions = [\n \"abs\",\n \"acos\",\n \"asin\",\n \"atan\",\n \"atan2\",\n \"ceil\",\n \"cos\",\n \"exp\",\n \"floor\",\n \"log\",\n \"max\",\n \"min\",\n \"pow\",\n \"random\",\n \"round\",\n \"sin\",\n \"sqrt\",\n \"tan\",\n ];\n for (var i = 0; i < numFunctions.length; i++) {\n this.setProperty(\n myMath,\n numFunctions[i],\n this.createNativeFunction(Math[numFunctions[i]], false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n }\n};\n\n/**\n * Initialize JSON object.\n * @param {!Interpreter.Object} scope Global scope.\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 return thisInterpreter.nativeToPseudo(nativeObj);\n };\n this.setProperty(myJSON, \"parse\", this.createNativeFunction(wrapper, false));\n\n wrapper = function (value) {\n var nativeObj = thisInterpreter.pseudoToNative(value);\n try {\n var str = JSON.stringify(nativeObj);\n } catch (e) {\n thisInterpreter.throwException(thisInterpreter.TYPE_ERROR, e.message);\n }\n return str;\n };\n this.setProperty(myJSON, \"stringify\", this.createNativeFunction(wrapper, false));\n};\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 */\nInterpreter.prototype.isa = function (child, constructor) {\n if (child === null || child === undefined || !constructor) {\n return false;\n }\n var proto = constructor.properties[\"prototype\"];\n if (child === proto) {\n return true;\n }\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 child = this.getPrototype(child);\n while (child) {\n if (child === proto) {\n return true;\n }\n child = child.proto;\n }\n return false;\n};\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 */\nInterpreter.legalArrayLength = function (x) {\n var n = x >>> 0;\n // Array length must be between 0 and 2^32-1 (inclusive).\n return n === Number(x) ? n : NaN;\n};\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 */\nInterpreter.legalArrayIndex = function (x) {\n var n = x >>> 0;\n // Array index cannot be 2^32-1, otherwise length would be 2^32.\n // 0xffffffff is 2^32-1.\n return String(n) === String(x) && n !== 0xffffffff ? n : NaN;\n};\n\n/**\n * Typedef for JS values.\n * @typedef {!Interpreter.Object|boolean|number|string|undefined|null}\n */\nInterpreter.Value;\n\n/**\n * Class for an object.\n * @param {Interpreter.Object} proto Prototype object or null.\n * @constructor\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\n/** @type {Interpreter.Object} */\nInterpreter.Object.prototype.proto = null;\n\n/** @type {boolean} */\nInterpreter.Object.prototype.isObject = true;\n\n/** @type {string} */\nInterpreter.Object.prototype.class = \"Object\";\n\n/** @type {Date|RegExp|boolean|number|string|undefined|null} */\nInterpreter.Object.prototype.data = null;\n\n/**\n * Convert this object into a string.\n * @return {string} String value.\n * @override\n */\nInterpreter.Object.prototype.toString = function () {\n if (this.class === \"Array\") {\n // Array\n var cycles = Interpreter.toStringCycles_;\n cycles.push(this);\n try {\n var strs = [];\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 return strs.join(\",\");\n }\n if (this.class === \"Error\") {\n var cycles = Interpreter.toStringCycles_;\n if (cycles.indexOf(this) !== -1) {\n return \"[object Error]\";\n }\n var name, message;\n // Bug: Does not support getters and setters for name or message.\n var obj = this;\n do {\n if (\"name\" in obj.properties) {\n name = obj.properties[\"name\"];\n break;\n }\n } while ((obj = obj.proto));\n var obj = this;\n do {\n if (\"message\" in obj.properties) {\n message = obj.properties[\"message\"];\n break;\n }\n } while ((obj = obj.proto));\n cycles.push(this);\n try {\n name = name && name.toString();\n message = message && message.toString();\n } finally {\n cycles.pop();\n }\n return message ? name + \": \" + message : String(name);\n }\n\n // RegExp, Date, and boxed primitives.\n if (this.data !== null) {\n return String(this.data);\n }\n\n return \"[object \" + this.class + \"]\";\n};\n\n/**\n * Return the object's value.\n * @return {Interpreter.Value} Value.\n * @override\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 if (this.data instanceof Date) {\n return this.data.valueOf(); // Milliseconds.\n }\n return /** @type {(boolean|number|string)} */ (this.data); // Boxed primitive.\n};\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 */\nInterpreter.prototype.createObject = function (constructor) {\n return this.createObjectProto(constructor && constructor.properties[\"prototype\"]);\n};\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 */\nInterpreter.prototype.createObjectProto = function (proto) {\n if (typeof proto !== \"object\") {\n throw Error(\"Non object prototype\");\n }\n var obj = new Interpreter.Object(proto);\n // Functions have prototype objects.\n if (this.isa(obj, this.FUNCTION)) {\n this.setProperty(obj, \"prototype\", this.createObjectProto(this.OBJECT_PROTO || null));\n obj.class = \"Function\";\n }\n // Arrays have length.\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 if (this.isa(obj, this.ERROR)) {\n obj.class = \"Error\";\n }\n return obj;\n};\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 */\nInterpreter.prototype.populateRegExp = function (pseudoRegexp, nativeRegexp) {\n pseudoRegexp.data = nativeRegexp;\n // lastIndex is settable, all others are read-only attributes\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/**\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 */\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/**\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 */\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 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 return func;\n};\n\n/**\n * Create a new native asynchronous function.\n * @param {!Function} asyncFunc JavaScript function.\n * @return {!Interpreter.Object} New function.\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/**\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 */\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 var wrapper = function () {\n return interpreter.nativeToPseudo(\n nativeObj.apply(\n interpreter,\n Array.prototype.slice.call(arguments).map(function (i) {\n return interpreter.pseudoToNative(i);\n }),\n ),\n );\n };\n return this.createNativeFunction(wrapper, undefined);\n }\n\n var pseudoObj;\n if (Array.isArray(nativeObj)) {\n // Array.\n pseudoObj = this.createObjectProto(this.ARRAY_PROTO);\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 for (var key in nativeObj) {\n this.setProperty(pseudoObj, key, this.nativeToPseudo(nativeObj[key]));\n }\n }\n return pseudoObj;\n};\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 */\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 if (i !== -1) {\n return cycles.native[i];\n }\n cycles.pseudo.push(pseudoObj);\n var nativeObj;\n if (this.isa(pseudoObj, this.ARRAY)) {\n // Array.\n nativeObj = [];\n cycles.native.push(nativeObj);\n var length = this.getProperty(pseudoObj, \"length\");\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 for (var key in pseudoObj.properties) {\n val = pseudoObj.properties[key];\n nativeObj[key] = this.pseudoToNative(val, cycles);\n }\n }\n cycles.pseudo.pop();\n cycles.native.pop();\n return nativeObj;\n};\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 */\nInterpreter.prototype.arrayNativeToPseudo = function (nativeArray) {\n var pseudoArray = this.createObjectProto(this.ARRAY_PROTO);\n var props = Object.getOwnPropertyNames(nativeArray);\n for (var i = 0; i < props.length; i++) {\n this.setProperty(pseudoArray, props[i], nativeArray[props[i]]);\n }\n return pseudoArray;\n};\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 */\nInterpreter.prototype.arrayPseudoToNative = function (pseudoArray) {\n var nativeArray = [];\n for (var key in pseudoArray.properties) {\n nativeArray[key] = this.getProperty(pseudoArray, key);\n }\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 nativeArray.length = Interpreter.legalArrayLength(this.getProperty(pseudoArray, \"length\")) || 0;\n return nativeArray;\n};\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 */\nInterpreter.prototype.getPrototype = function (value) {\n switch (typeof value) {\n case \"number\":\n return this.NUMBER.properties[\"prototype\"];\n case \"boolean\":\n return this.BOOLEAN.properties[\"prototype\"];\n case \"string\":\n return this.STRING.properties[\"prototype\"];\n }\n if (value) {\n return value.proto;\n }\n return null;\n};\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 */\nInterpreter.prototype.getProperty = function (obj, name, node) {\n name = String(name);\n if (obj === undefined || obj === null) {\n let lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.TYPE_ERROR, \"Cannot read property '\" + name + \"' of \" + obj, lineNum);\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 if (!isNaN(n) && n < String(obj).length) {\n return String(obj)[n];\n }\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n var getter = obj.getter[name];\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 return obj.properties[name];\n }\n } while ((obj = this.getPrototype(obj)));\n return undefined;\n};\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 */\nInterpreter.prototype.hasProperty = function (obj, name) {\n if (!obj.isObject) {\n throw TypeError(\"Primitive data type has no properties\");\n }\n name = String(name);\n if (name === \"length\" && this.isa(obj, this.STRING)) {\n return true;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\n if (!isNaN(n) && n < String(obj).length) {\n return true;\n }\n }\n do {\n if (obj.properties && name in obj.properties) {\n return true;\n }\n } while ((obj = this.getPrototype(obj)));\n return false;\n};\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 */\nInterpreter.prototype.setProperty = function (obj, name, value, opt_descriptor) {\n name = String(name);\n if (obj === undefined || obj === null) {\n this.throwException(this.TYPE_ERROR, \"Cannot set property '\" + name + \"' of \" + obj);\n }\n if (\n opt_descriptor &&\n (\"get\" in opt_descriptor || \"set\" in opt_descriptor) &&\n (\"value\" in opt_descriptor || \"writable\" in opt_descriptor)\n ) {\n this.throwException(\n this.TYPE_ERROR,\n \"Invalid property descriptor. \" + \"Cannot both specify accessors and a value or writable attribute\",\n );\n }\n var strict = !this.stateStack || this.getScope().strict;\n if (!obj.isObject) {\n if (strict) {\n this.throwException(this.TYPE_ERROR, \"Can't create property '\" + name + \"' on '\" + obj + \"'\");\n }\n return;\n }\n if (this.isa(obj, this.STRING)) {\n var n = Interpreter.legalArrayIndex(name);\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(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of String '\" + obj.data + \"'\",\n );\n }\n return;\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 if (name === \"length\") {\n // Delete elements if length is smaller.\n if (opt_descriptor) {\n if (!(\"value\" in opt_descriptor)) {\n return;\n }\n value = opt_descriptor.value;\n }\n value = Interpreter.legalArrayLength(value);\n if (isNaN(value)) {\n this.throwException(this.RANGE_ERROR, \"Invalid array length\");\n }\n if (value < length) {\n for (i in obj.properties) {\n i = Interpreter.legalArrayIndex(i);\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 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 return;\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 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 var descriptor = {};\n if (\"configurable\" in opt_descriptor) {\n descriptor.configurable = opt_descriptor.configurable;\n }\n if (\"enumerable\" in opt_descriptor) {\n descriptor.enumerable = opt_descriptor.enumerable;\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 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 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 }\n // Determine the parent (possibly self) where the property is defined.\n var defObj = obj;\n while (!(name in defObj.properties)) {\n defObj = this.getPrototype(defObj);\n if (!defObj) {\n // This is a new property.\n defObj = obj;\n break;\n }\n }\n if (defObj.setter && defObj.setter[name]) {\n return defObj.setter[name];\n }\n if (defObj.getter && defObj.getter[name]) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot set property '\" + name + \"' of object '\" + obj + \"' which only has a getter\",\n );\n }\n } else {\n // No setter, simple assignment.\n try {\n obj.properties[name] = value;\n } catch (e) {\n if (strict) {\n this.throwException(\n this.TYPE_ERROR,\n \"Cannot assign to read only \" + \"property '\" + name + \"' of object '\" + obj + \"'\",\n );\n }\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 */\nInterpreter.prototype.setNativeFunctionPrototype = function (obj, name, wrapper) {\n this.setProperty(\n obj.properties[\"prototype\"],\n name,\n this.createNativeFunction(wrapper, false),\n Interpreter.NONENUMERABLE_DESCRIPTOR,\n );\n};\n\n/**\n * Returns the current scope from the stateStack.\n * @return {!Interpreter.Object} Current scope dictionary.\n */\nInterpreter.prototype.getScope = function () {\n var scope = this.stateStack[this.stateStack.length - 1].scope;\n if (!scope) {\n throw Error(\"No scope found.\");\n }\n return scope;\n};\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 */\nInterpreter.prototype.createScope = function (node, parentScope) {\n var scope = this.createObjectProto(null);\n scope.parentScope = parentScope;\n if (!parentScope) {\n this.initGlobalScope(scope);\n }\n this.populateScope_(node, scope);\n\n // Determine if this scope starts with 'use strict'.\n scope.strict = false;\n if (parentScope && parentScope.strict) {\n scope.strict = true;\n } else {\n var firstNode = node[\"body\"] && node[\"body\"][0];\n if (\n firstNode &&\n firstNode.expression &&\n firstNode.expression[\"type\"] === \"Literal\" &&\n firstNode.expression.value === \"use strict\"\n ) {\n scope.strict = true;\n }\n }\n return scope;\n};\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 */\nInterpreter.prototype.createSpecialScope = function (parentScope, opt_scope) {\n if (!parentScope) {\n throw Error(\"parentScope required\");\n }\n var scope = opt_scope || this.createObjectProto(null);\n scope.parentScope = parentScope;\n scope.strict = parentScope.strict;\n return scope;\n};\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 */\nInterpreter.prototype.getValueFromScope = function (name, node) {\n var scope = this.getScope();\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n return scope.properties[name];\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has inherited properties and\n // could also have getters.\n if (scope === this.global && this.hasProperty(scope, name)) {\n return this.getProperty(scope, name);\n }\n // Typeof operator is unique: it can safely look at non-defined variables.\n var prevNode = this.stateStack[this.stateStack.length - 1].node;\n if (prevNode[\"type\"] === \"UnaryExpression\" && prevNode[\"operator\"] === \"typeof\") {\n return undefined;\n }\n\n var lineNum;\n if (node != null && node.loc != null && node.loc.start != null) {\n lineNum = node.loc.start.line;\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\", lineNum);\n};\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 */\nInterpreter.prototype.setValueToScope = function (name, value) {\n var scope = this.getScope();\n var strict = scope.strict;\n while (scope && scope !== this.global) {\n if (name in scope.properties) {\n scope.properties[name] = value;\n return undefined;\n }\n scope = scope.parentScope;\n }\n // The root scope is also an object which has readonly properties and\n // could also have setters.\n if (scope === this.global && (!strict || this.hasProperty(scope, name))) {\n return this.setProperty(scope, name, value);\n }\n this.throwException(this.REFERENCE_ERROR, name + \" is not defined\");\n};\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 */\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 var nodeClass = node[\"constructor\"];\n for (var name in node) {\n var prop = node[name];\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/**\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 */\nInterpreter.prototype.stripLocations_ = function (node, start, end) {\n if (start) {\n node[\"start\"] = start;\n } else {\n delete node[\"start\"];\n }\n if (end) {\n node[\"end\"] = end;\n } else {\n delete node[\"end\"];\n }\n for (var name in node) {\n if (node.hasOwnProperty(name)) {\n var prop = node[name];\n if (prop && typeof prop === \"object\") {\n this.stripLocations_(prop, start, end);\n }\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 */\nInterpreter.prototype.calledWithNew = function () {\n return this.stateStack[this.stateStack.length - 1].isConstructor;\n};\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 */\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/**\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 */\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/**\n * Completion Value Types.\n * @enum {number}\n */\nInterpreter.Completion = {\n NORMAL: 0,\n BREAK: 1,\n CONTINUE: 2,\n RETURN: 3,\n THROW: 4,\n};\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 */\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 var lineNumErrorMsg;\n if (lineNumber != null) {\n lineNumErrorMsg = this.getErrorLineNumberMessage(lineNumber);\n }\n this.unwind(Interpreter.Completion.THROW, error, undefined, lineNumErrorMsg);\n // Abort anything related to the current step.\n throw Interpreter.STEP_ERROR;\n};\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 */\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 switch (state.node[\"type\"]) {\n case \"TryStatement\":\n state.cv = { type: type, value: value, label: label };\n return;\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 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 }\n\n // Unhandled completion. Throw a real error.\n var realError;\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 throw realError;\n};\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 */\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/**\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 */\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/**\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 */\nInterpreter.State = function (node, scope) {\n this.node = node;\n this.scope = scope;\n};\n\n///////////////////////////////////////////////////////////////////////////////\n// Functions to handle each node type.\n///////////////////////////////////////////////////////////////////////////////\n\nInterpreter.prototype[\"stepArrayExpression\"] = function (stack, state, node) {\n var elements = node[\"elements\"];\n var n = state.n_ || 0;\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 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 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 if (!state.doneRight_) {\n if (!state.leftReference_) {\n state.leftReference_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_ && node[\"operator\"] !== \"=\") {\n var leftValue = this.getValue(state.leftReference_, node);\n state.leftValue_ = leftValue;\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 = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftReference_);\n }\n }\n state.doneRight_ = true;\n return new Interpreter.State(node[\"right\"], state.scope);\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 var value = state.leftValue_;\n var rightValue = state.value;\n switch (node[\"operator\"]) {\n case \"=\":\n value = rightValue;\n break;\n case \"+=\":\n value += rightValue;\n break;\n case \"-=\":\n value -= rightValue;\n break;\n case \"*=\":\n value *= rightValue;\n break;\n case \"/=\":\n value /= rightValue;\n break;\n case \"%=\":\n value %= rightValue;\n break;\n case \"<<=\":\n value <<= rightValue;\n break;\n case \">>=\":\n value >>= rightValue;\n break;\n case \">>>=\":\n value >>>= rightValue;\n break;\n case \"&=\":\n value &= rightValue;\n break;\n case \"^=\":\n value ^= rightValue;\n break;\n case \"|=\":\n value |= rightValue;\n break;\n default:\n throw SyntaxError(\"Unknown assignment expression: \" + node[\"operator\"]);\n }\n var setter = this.setValue(state.leftReference_, value);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = value;\n return this.createSetter_(setter, state.leftReference_, value);\n }\n // Return if no setter function.\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 if (!state.doneRight_) {\n state.doneRight_ = true;\n state.leftValue_ = state.value;\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n stack.pop();\n var leftValue = state.leftValue_;\n var rightValue = state.value;\n var value;\n switch (node[\"operator\"]) {\n case \"==\":\n value = leftValue == rightValue;\n break;\n case \"!=\":\n value = leftValue != rightValue;\n break;\n case \"===\":\n value = leftValue === rightValue;\n break;\n case \"!==\":\n value = leftValue !== rightValue;\n break;\n case \">\":\n value = leftValue > rightValue;\n break;\n case \">=\":\n value = leftValue >= rightValue;\n break;\n case \"<\":\n value = leftValue < rightValue;\n break;\n case \"<=\":\n value = leftValue <= rightValue;\n break;\n case \"+\":\n value = leftValue + rightValue;\n break;\n case \"-\":\n value = leftValue - rightValue;\n break;\n case \"*\":\n value = leftValue * rightValue;\n break;\n case \"/\":\n value = leftValue / rightValue;\n break;\n case \"%\":\n value = leftValue % rightValue;\n break;\n case \"&\":\n value = leftValue & rightValue;\n break;\n case \"|\":\n value = leftValue | rightValue;\n break;\n case \"^\":\n value = leftValue ^ rightValue;\n break;\n case \"<<\":\n value = leftValue << rightValue;\n break;\n case \">>\":\n value = leftValue >> rightValue;\n break;\n case \">>>\":\n value = leftValue >>> rightValue;\n break;\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 value = this.hasProperty(rightValue, leftValue);\n break;\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 value = leftValue.isObject ? this.isa(leftValue, rightValue) : false;\n break;\n default:\n throw SyntaxError(\"Unknown binary operator: \" + node[\"operator\"]);\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 if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\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;\n // Components needed to determine value of 'this'.\n var nextState = new Interpreter.State(node[\"callee\"], state.scope);\n nextState.components = true;\n return nextState;\n }\n if (state.doneCallee_ === 1) {\n // Determine value of the function.\n state.doneCallee_ = 2;\n var func = state.value;\n if (Array.isArray(func)) {\n state.func_ = this.getValue(func, node);\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 func = state.func_;\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_(/** @type {!Interpreter.Object} */ (func), state.value);\n }\n } else {\n // Already evaluated function: (function(){...})();\n state.func_ = func;\n }\n state.arguments_ = [];\n state.n_ = 0;\n }\n var func = state.func_;\n if (!state.doneArgs_) {\n if (state.n_ !== 0) {\n state.arguments_.push(state.value);\n }\n if (node[\"arguments\"][state.n_]) {\n return new Interpreter.State(node[\"arguments\"][state.n_++], state.scope);\n }\n // Determine value of 'this' in function.\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 }\n // Constructor, 'this' is new object.\n var proto = func.properties[\"prototype\"];\n if (typeof proto !== \"object\" || proto === null) {\n // Non-object prototypes default to Object.prototype.\n proto = this.OBJECT_PROTO;\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 state.doneArgs_ = true;\n }\n if (!state.doneExec_) {\n state.doneExec_ = true;\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 var funcNode = func.node;\n if (funcNode) {\n var scope = this.createScope(funcNode[\"body\"], func.parentScope);\n // Add all arguments.\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 }\n // Build arguments variable.\n var argsList = this.createObjectProto(this.ARRAY_PROTO);\n for (var i = 0; i < state.arguments_.length; i++) {\n this.setProperty(argsList, i, state.arguments_[i]);\n }\n this.setProperty(scope, \"arguments\", argsList);\n // Add the function's name (var x = function foo(){};)\n var name = funcNode[\"id\"] && funcNode[\"id\"][\"name\"];\n if (name) {\n this.setProperty(scope, name, func);\n }\n this.setProperty(scope, \"this\", state.funcThis_, Interpreter.READONLY_DESCRIPTOR);\n state.value = undefined; // Default value if no explicit return.\n return new Interpreter.State(funcNode[\"body\"], scope);\n } else if (func.eval) {\n var code = state.arguments_[0];\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.parse(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 var evalNode = new this.nodeConstructor();\n evalNode[\"type\"] = \"EvalProgram_\";\n evalNode[\"body\"] = ast[\"body\"];\n this.stripLocations_(evalNode, node[\"start\"], node[\"end\"]);\n // Create new scope and update it with definitions in eval().\n var scope = state.directEval_ ? state.scope : this.global;\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 this.value = undefined; // Default value if no code.\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 var callback = function (value) {\n state.value = value;\n thisInterpreter.paused_ = false;\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 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;\n // Create an empty scope.\n var scope = this.createSpecialScope(state.scope);\n // Add the argument.\n this.setProperty(scope, node[\"param\"][\"name\"], state.throwValue);\n // Execute catch clause.\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 if (mode === 0) {\n state.mode_ = 1;\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n if (mode === 1) {\n state.mode_ = 2;\n var value = Boolean(state.value);\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 }\n // eval('1;if(false){2}') -> undefined\n this.value = undefined;\n }\n stack.pop();\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 if (!state.test_) {\n state.test_ = true;\n return new Interpreter.State(node[\"test\"], state.scope);\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 if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\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 stack.pop();\n // Save this value to interpreter.value for use as a return value if\n // this code is inside an eval function.\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 if (node[\"left\"][\"declarations\"] && node[\"left\"][\"declarations\"][0][\"init\"]) {\n if (state.scope.strict) {\n let lineNum = this.getErrorLineNumber(node);\n this.throwException(\n this.SYNTAX_ERROR,\n \"for-in loop variable declaration may not have an initializer.\",\n lineNum,\n );\n }\n // Variable initialization: for (var x = 4 in y)\n return new Interpreter.State(node[\"left\"], state.scope);\n }\n }\n // Second, look up the object. Only do so once, ever.\n if (!state.doneObject_) {\n state.doneObject_ = true;\n if (!state.variable_) {\n state.variable_ = state.value;\n }\n return new Interpreter.State(node[\"right\"], state.scope);\n }\n if (!state.isLoop) {\n // First iteration.\n state.isLoop = true;\n state.object_ = state.value;\n state.visited_ = Object.create(null);\n }\n // Third, find the property name for this iteration.\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 while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this object's properties.\n }\n if (!Object.prototype.hasOwnProperty.call(state.object_.properties, prop)) {\n continue; // Property has been deleted in the loop.\n }\n if (state.visited_[prop]) {\n continue; // Already seen this property on a child.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_.properties, prop)) {\n continue; // Skip non-enumerable property.\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 while (true) {\n var prop = state.props_.shift();\n if (prop === undefined) {\n break; // Reached end of this value's properties.\n }\n state.visited_[prop] = true;\n if (!Object.prototype.propertyIsEnumerable.call(state.object_, prop)) {\n continue; // Skip non-enumerable property.\n }\n state.name_ = prop;\n break gotPropName;\n }\n }\n state.object_ = this.getPrototype(state.object_);\n state.props_ = null;\n if (state.object_ === null) {\n // Done, exit loop.\n stack.pop();\n return;\n }\n }\n }\n // Fourth, find the variable\n if (!state.doneVariable_) {\n state.doneVariable_ = true;\n var left = node[\"left\"];\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 if (!state.variable_) {\n state.variable_ = state.value;\n }\n // Fifth, set the variable.\n if (!state.doneSetter_) {\n state.doneSetter_ = true;\n var value = state.name_;\n var setter = this.setValue(state.variable_, value);\n if (setter) {\n return this.createSetter_(setter, state.variable_, value);\n }\n }\n // Next step will be step three.\n state.name_ = undefined;\n // Reevaluate the variable since it could be a setter on the global object.\n state.doneVariable_ = false;\n state.doneSetter_ = false;\n // Sixth and finally, execute the body if there was one. this.\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 if (mode === 0) {\n state.mode_ = 1;\n if (node[\"init\"]) {\n return new Interpreter.State(node[\"init\"], state.scope);\n }\n } else if (mode === 1) {\n state.mode_ = 2;\n if (node[\"test\"]) {\n return new Interpreter.State(node[\"test\"], state.scope);\n }\n } else if (mode === 2) {\n state.mode_ = 3;\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 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 if (state.components) {\n stack[stack.length - 1].value = [Interpreter.SCOPE_REFERENCE, node[\"name\"]];\n return;\n }\n var value = this.getValueFromScope(node[\"name\"], node);\n // An identifier could be a getter if it's a property on the global object.\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 while (!this.hasProperty(scope, node[\"name\"])) {\n scope = scope.parentScope;\n }\n var func = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, this.global);\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();\n // Note that a statement might have multiple labels.\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 if (value instanceof RegExp) {\n var pseudoRegexp = this.createObjectProto(this.REGEXP_PROTO);\n this.populateRegExp(pseudoRegexp, value);\n value = pseudoRegexp;\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 if (!state.doneLeft_) {\n state.doneLeft_ = true;\n return new Interpreter.State(node[\"left\"], state.scope);\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 var propName;\n if (!node[\"computed\"]) {\n state.object_ = state.value;\n // obj.foo -- Just access 'foo' directly.\n propName = node[\"property\"][\"name\"];\n } else if (!state.doneProperty_) {\n state.object_ = state.value;\n // obj[foo] -- Compute value of 'foo'.\n state.doneProperty_ = true;\n return new Interpreter.State(node[\"property\"], state.scope);\n } else {\n propName = state.value;\n }\n stack.pop();\n if (state.components) {\n stack[stack.length - 1].value = [state.object_, propName];\n } else {\n var value = this.getProperty(state.object_, propName);\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 = /** @type {!Interpreter.Object} */ (value);\n return this.createGetter_(func, state.object_);\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 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 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 }\n // Set the property computed in the previous execution.\n if (!state.properties_[propName]) {\n // Create temp object to collect value, getter, and/or setter.\n state.properties_[propName] = {};\n }\n state.properties_[propName][property[\"kind\"]] = state.value;\n state.n_ = ++n;\n property = node[\"properties\"][n];\n }\n if (property) {\n return new Interpreter.State(property[\"value\"], state.scope);\n }\n for (var key in state.properties_) {\n var kinds = state.properties_[key];\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 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 if (expression) {\n state.done = false;\n return new Interpreter.State(expression, state.scope);\n }\n state.done = true;\n // 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 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 if (expression) {\n state.n_ = n + 1;\n return new Interpreter.State(expression, state.scope);\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 if (state.test_ === 1) {\n state.test_ = 2;\n // Preserve switch value between case tests.\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 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 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 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 if (state.matched_ || state.value === state.switchValue_) {\n state.matched_ = true;\n var n = state.n_ || 0;\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 }\n // Move on to next case.\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 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 return nextState;\n }\n if (!state.doneFinalizer_ && node[\"finalizer\"]) {\n state.doneFinalizer_ = true;\n return new Interpreter.State(node[\"finalizer\"], state.scope);\n }\n stack.pop();\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 stack.pop();\n var value = state.value;\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;\n // 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 if (Array.isArray(value)) {\n var obj = value[0];\n if (obj === Interpreter.SCOPE_REFERENCE) {\n // 'delete foo;' is the same as 'delete window.foo'.\n obj = state.scope;\n }\n var name = String(value[1]);\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 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 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 if (!state.leftSide_) {\n state.leftSide_ = state.value;\n }\n if (state.doneGetter_) {\n state.leftValue_ = state.value;\n }\n if (!state.doneGetter_) {\n var leftValue = this.getValue(state.leftSide_, node);\n state.leftValue_ = leftValue;\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 = /** @type {!Interpreter.Object} */ (leftValue);\n return this.createGetter_(func, state.leftSide_);\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 var leftValue = Number(state.leftValue_);\n var changeValue;\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 var returnValue = node[\"prefix\"] ? changeValue : leftValue;\n var setter = this.setValue(state.leftSide_, changeValue);\n if (setter) {\n state.doneSetter_ = true;\n state.setterValue_ = returnValue;\n return this.createSetter_(setter, state.leftSide_, changeValue);\n }\n // Return if no setter function.\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 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 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 declarationNode = declarations[++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\"];\n\n// 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;\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;\n// Obsolete. Do not use.\nInterpreter.prototype[\"createPrimitive\"] = function (x) {\n return x;\n};\n\nexport { Interpreter };\n","import { CONSTANTS } from \"../../Constants\";\nimport { Server } from \"../Server\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function calculateServerGrowth(server: Server, threads: number, p: IPlayer, cores = 1): number {\n const numServerGrowthCycles = Math.max(Math.floor(threads), 0);\n\n //Get adjusted growth rate, which accounts for server security\n const growthRate = CONSTANTS.ServerBaseGrowthRate;\n let adjGrowthRate = 1 + (growthRate - 1) / server.hackDifficulty;\n if (adjGrowthRate > CONSTANTS.ServerMaxGrowthRate) {\n adjGrowthRate = CONSTANTS.ServerMaxGrowthRate;\n }\n\n //Calculate adjusted server growth rate based on parameters\n const serverGrowthPercentage = server.serverGrowth / 100;\n const numServerGrowthCyclesAdjusted =\n numServerGrowthCycles * serverGrowthPercentage * BitNodeMultipliers.ServerGrowthRate;\n\n //Apply serverGrowth for the calculated number of growth cycles\n const coreBonus = 1 + (cores - 1) / 16;\n return Math.pow(adjGrowthRate, numServerGrowthCyclesAdjusted * p.hacking_grow_mult * coreBonus);\n}\n","import { FactionNames } from '../../Faction/data/FactionNames';\nimport { Sleeve } from \"./Sleeve\";\n\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { Augmentations } from \"../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Faction } from \"../../Faction/Faction\";\nimport { Factions } from \"../../Faction/Factions\";\n\nexport function findSleevePurchasableAugs(sleeve: Sleeve, p: IPlayer): Augmentation[] {\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\n const ownedAugNames: string[] = sleeve.augmentations.map((e) => {\n return e.name;\n });\n const availableAugs: Augmentation[] = [];\n\n // Helper function that helps filter out augs that are already owned\n // and augs that aren't allowed for sleeves\n function isAvailableForSleeve(aug: Augmentation): boolean {\n if (aug.name === AugmentationNames.NeuroFluxGovernor) {\n return false;\n }\n if (ownedAugNames.includes(aug.name)) {\n return false;\n }\n if (availableAugs.includes(aug)) {\n return false;\n }\n if (aug.isSpecial) {\n return false;\n }\n\n const validMults = [\n \"hacking_mult\",\n \"strength_mult\",\n \"defense_mult\",\n \"dexterity_mult\",\n \"agility_mult\",\n \"charisma_mult\",\n \"hacking_exp_mult\",\n \"strength_exp_mult\",\n \"defense_exp_mult\",\n \"dexterity_exp_mult\",\n \"agility_exp_mult\",\n \"charisma_exp_mult\",\n \"company_rep_mult\",\n \"faction_rep_mult\",\n \"crime_money_mult\",\n \"crime_success_mult\",\n \"work_money_mult\",\n ];\n for (const mult of Object.keys(aug.mults)) {\n if (validMults.includes(mult)) {\n return true;\n }\n }\n\n return false;\n }\n\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 if (p.inGang()) {\n const fac = p.getGangFaction();\n\n for (const augName of Object.keys(Augmentations)) {\n const aug = Augmentations[augName];\n if (!isAvailableForSleeve(aug)) {\n continue;\n }\n\n if (fac.playerReputation > aug.baseRepRequirement) {\n availableAugs.push(aug);\n }\n }\n }\n\n for (const facName of p.factions) {\n if (facName === FactionNames.Bladeburners) {\n continue;\n }\n if (facName === FactionNames.Netburners) {\n continue;\n }\n const fac: Faction | null = Factions[facName];\n if (fac == null) {\n continue;\n }\n\n for (const augName of fac.augmentations) {\n const aug: Augmentation = Augmentations[augName];\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","import { EventEmitter } from \"../utils/EventEmitter\";\nexport const StaneksGiftEvents = new EventEmitter<[]>();\n","import { Construction, CheckBox, CheckBoxOutlineBlank } from \"@mui/icons-material\";\nimport { Box, Button, Container, List, ListItemButton, Paper, Typography } from \"@mui/material\";\nimport React, { useState } from \"react\";\nimport { Augmentation } from \"../../../Augmentation/Augmentation\";\nimport { Augmentations } from \"../../../Augmentation/Augmentations\";\nimport { AugmentationNames } from \"../../../Augmentation/data/AugmentationNames\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { hasAugmentationPrereqs } from \"../../../Faction/FactionHelpers\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { Locations } from \"../../../Locations/Locations\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { IMap } from \"../../../types\";\nimport { use } from \"../../../ui/Context\";\nimport { ConfirmationModal } from \"../../../ui/React/ConfirmationModal\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { convertTimeMsToTimeElapsedString, formatNumber } from \"../../../utils/StringHelperFunctions\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { GraftableAugmentation } from \"../GraftableAugmentation\";\n\nconst GraftableAugmentations: IMap = {};\n\nexport const getAvailableAugs = (player: IPlayer): string[] => {\n const augs: string[] = [];\n\n for (const [augName, aug] of Object.entries(Augmentations)) {\n if (augName === AugmentationNames.NeuroFluxGovernor || augName === AugmentationNames.TheRedPill || aug.isSpecial)\n continue;\n augs.push(augName);\n }\n\n return augs.filter((augmentation: string) => !player.hasAugmentation(augmentation));\n};\n\nconst canGraft = (player: IPlayer, aug: GraftableAugmentation): boolean => {\n if (player.money < aug.cost) {\n return false;\n }\n return hasAugmentationPrereqs(aug.augmentation);\n};\n\ninterface IProps {\n player: IPlayer;\n aug: Augmentation;\n}\n\nconst AugPreReqsChecklist = (props: IProps): React.ReactElement => {\n const aug = props.aug,\n player = props.player;\n\n return (\n \n Pre-Requisites:\n
    \n {aug.prereqs.map((preAug) => (\n \n {player.hasAugmentation(preAug) ? : }\n {preAug}\n \n ))}\n
    \n );\n};\n\nexport const GraftingRoot = (): React.ReactElement => {\n const player = use.Player();\n const router = use.Router();\n\n for (const aug of Object.values(Augmentations)) {\n const name = aug.name;\n const graftableAug = new GraftableAugmentation(aug);\n GraftableAugmentations[name] = graftableAug;\n }\n\n const [selectedAug, setSelectedAug] = useState(getAvailableAugs(player)[0]);\n const [graftOpen, setGraftOpen] = useState(false);\n\n return (\n \n \n Grafting Laboratory\n \n You find yourself in a secret laboratory, owned by a mysterious researcher.\n
    \n The scientist explains that they've been studying Augmentation grafting, the process of applying Augmentations\n without requiring a body reset.\n
    \n
    \n Through legally questionable connections, the scientist has access to a vast array of Augmentation blueprints,\n even private designs. They offer to build and graft the Augmentations to you, in exchange for both a hefty sum\n of money, and being a lab rat.\n
    \n\n \n Graft Augmentations\n {getAvailableAugs(player).length > 0 ? (\n \n \n {getAvailableAugs(player).map((k, i) => (\n setSelectedAug(k)} selected={selectedAug === k}>\n {k}\n \n ))}\n \n \n \n {selectedAug}\n \n setGraftOpen(true)}\n sx={{ width: \"100%\" }}\n disabled={!canGraft(player, GraftableAugmentations[selectedAug])}\n >\n Graft Augmentation (\n \n \n \n )\n \n setGraftOpen(false)}\n onConfirm={() => {\n const graftableAug = GraftableAugmentations[selectedAug];\n player.loseMoney(graftableAug.cost, \"augmentations\");\n player.startGraftAugmentationWork(selectedAug, graftableAug.time);\n player.startFocusing();\n router.toWork();\n }}\n confirmationText={\n <>\n Cancelling grafting will not save grafting progress, and the money you spend will not{\" \"}\n be returned.\n
    \n
    \n Additionally, grafting an Augmentation will increase the potency of the Entropy virus.\n \n }\n />\n \n Time to Graft:{\" \"}\n {convertTimeMsToTimeElapsedString(\n GraftableAugmentations[selectedAug].time / (1 + (player.getIntelligenceBonus(3) - 1) / 3),\n )}\n {/* Use formula so the displayed creation time is accurate to player bonus */}\n \n {Augmentations[selectedAug].prereqs.length > 0 && (\n \n )}\n\n
    \n \n {(() => {\n const aug = Augmentations[selectedAug];\n\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info;\n const tooltip = (\n <>\n {info}\n
    \n
    \n {aug.stats}\n \n );\n return tooltip;\n })()}\n
    \n
    \n
    \n ) : (\n All Augmentations owned\n )}\n
    \n\n \n Entropy Virus\n\n \n \n Entropy strength: {player.entropy}\n
    \n All multipliers decreased by:{\" \"}\n {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}% (multiplicative)\n
    \n
    \n\n \n When installed on an unconscious individual, Augmentations are scanned by the body on awakening, eliminating\n hidden malware. However, grafted Augmentations do not provide this security measure.\n
    \n
    \n Individuals who tested Augmentation grafting have reported symptoms of an unknown virus, which they've dubbed\n \"Entropy\". This virus seems to grow more potent with each grafted Augmentation...\n
    \n
    \n
    \n );\n};\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport FileSaver from \"file-saver\";\nimport JSZip from \"jszip\";\n\nexport function exportScripts(pattern: string, server: BaseServer): void {\n const matchEnding = pattern.length == 1 || pattern === \"*.*\" ? null : pattern.slice(1); // Treat *.* the same as *\n const zip = new JSZip();\n // Helper function to zip any file contents whose name matches the pattern\n const zipFiles = (fileNames: string[], fileContents: string[]): void => {\n for (let i = 0; i < fileContents.length; ++i) {\n let name = fileNames[i];\n if (name.startsWith(\"/\")) name = name.slice(1);\n if (!matchEnding || name.endsWith(matchEnding))\n zip.file(name, new Blob([fileContents[i]], { type: \"text/plain\" }));\n }\n };\n // In the case of script files, we pull from the server.scripts array\n if (!matchEnding || isScriptFilename(matchEnding))\n zipFiles(\n server.scripts.map((s) => s.filename),\n server.scripts.map((s) => s.code),\n );\n // In the case of text files, we pull from the server.scripts array\n if (!matchEnding || matchEnding.endsWith(\".txt\"))\n zipFiles(\n server.textFiles.map((s) => s.fn),\n server.textFiles.map((s) => s.text),\n );\n\n // Return an error if no files matched, rather than an empty zip folder\n if (Object.keys(zip.files).length == 0) throw new Error(`No files match the pattern ${pattern}`);\n const zipFn = `bitburner${isScriptFilename(pattern) ? \"Scripts\" : pattern === \"*.txt\" ? \"Texts\" : \"Files\"}.zip`;\n zip.generateAsync({ type: \"blob\" }).then((content: any) => FileSaver.saveAs(content, zipFn));\n}\n\nexport function download(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of download command. Usage: download [script/text file]\");\n return;\n }\n const fn = args[0] + \"\";\n // If the parameter starts with *, download all files that match the wildcard pattern\n if (fn.startsWith(\"*\")) {\n try {\n exportScripts(fn, server);\n return;\n } catch (error: any) {\n return terminal.error(error.message);\n }\n } else if (isScriptFilename(fn)) {\n // Download a single script\n const script = terminal.getScript(player, fn);\n if (script != null) {\n return script.download();\n }\n } else if (fn.endsWith(\".txt\")) {\n // Download a single text file\n const txt = terminal.getTextFile(player, fn);\n if (txt != null) {\n return txt.download();\n }\n } else {\n terminal.error(`Cannot download this filetype`);\n return;\n }\n terminal.error(`${fn} does not exist`);\n return;\n } catch (e) {\n terminal.error(e + \"\");\n return;\n }\n}\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 */\nimport React, { useState } from \"react\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\ntype IProps = {\n aug: Augmentation;\n level?: number | string | null;\n};\n\nexport function AugmentationAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n let displayName = props.aug.name;\n if (props.level != null) {\n if (props.aug.name === AugmentationNames.NeuroFluxGovernor) {\n displayName += ` - Level ${props.level}`;\n }\n }\n\n if (typeof props.aug.info === \"string\") {\n return (\n \n setOpen((old) => !old)}>\n {displayName}} />\n {open ? : }\n \n \n \n \n {props.aug.stats && (\n <>\n
    \n
    \n {props.aug.stats}\n \n )}\n
    \n
    \n
    \n );\n }\n\n return (\n \n setOpen((old) => !old)}>\n {displayName}} />\n {open ? : }\n \n \n \n \n {props.aug.info}\n {props.aug.stats && (\n <>\n
    \n
    \n {props.aug.stats}\n \n )}\n
    \n
    \n
    \n
    \n );\n}\n","import * as React from \"react\";\n\nexport const stealthIcon = (\n \n \n \n \n \n \n);\nexport const killIcon = (\n \n \n \n \n \n \n);\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\n\ninterface IProps {\n action: IAction;\n isActive: boolean;\n bladeburner: IBladeburner;\n rerender: () => void;\n}\n\nexport function ActionLevel({ action, isActive, bladeburner, rerender }: IProps): React.ReactElement {\n const player = use.Player();\n\n const canIncrease = action.level < action.maxLevel;\n const canDecrease = action.level > 1;\n\n function increaseLevel(): void {\n if (!canIncrease) return;\n ++action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n function decreaseLevel(): void {\n if (!canDecrease) return;\n --action.level;\n if (isActive) bladeburner.startAction(player, bladeburner.action);\n rerender();\n }\n\n return (\n \n \n \n {action.getSuccessesNeededForNextLevel(BladeburnerConstants.ContractSuccessesPerLevel)} successes needed\n for next level\n \n }\n >\n \n Level: {action.level} / {action.maxLevel}\n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n WARNING: changing the level will restart the Operation : \"\"}>\n \n \n \n \n \n \n \n );\n}\n","import React from \"react\";\nimport { IAction } from \"../IAction\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface IProps {\n action: IAction;\n rerender: () => void;\n}\n\nexport function Autolevel(props: IProps): React.ReactElement {\n function onAutolevel(event: React.ChangeEvent): void {\n props.action.autoLevel = event.target.checked;\n props.rerender();\n }\n return (\n \n Automatically increase operation level when possible}>\n Autolevel:\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Operation } from \"../Operation\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { TeamSizeModal } from \"./TeamSizeModal\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport Button from \"@mui/material/Button\";\ninterface IProps {\n action: Operation;\n bladeburner: IBladeburner;\n}\nexport function TeamSizeButton(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n\n return (\n <>\n \n setOpen(false)} action={props.action} bladeburner={props.bladeburner} />\n \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nexport function BlinkingCursor(): React.ReactElement {\n const [on, setOn] = useState(true);\n useEffect(() => {\n const i = setInterval(() => setOn((old) => !old), 1000);\n return () => clearInterval(i);\n });\n return <>{on ? \"|\" : \"\"};\n}\n","import React, { useState } from 'react';\nimport { deleteGame } from \"../../db\";\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from '@mui/material';\n\nimport DeleteIcon from '@mui/icons-material/Delete';\nimport { pushDisableRestore } from '../../Electron';\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n}\n\nexport function DeleteGameButton({ color = \"primary\" }: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n return (<>\n \n \n \n {\n setModalOpened(false);\n deleteGame()\n .then(() => {\n pushDisableRestore();\n setTimeout(() => location.reload(), 1000);\n })\n .catch((r) => console.error(`Could not delete game: ${r}`));\n }}\n open={modalOpened}\n onClose={() => setModalOpened(false)}\n confirmationText={\"Really delete your game? (It's permanent!)\"}\n />\n )\n}\n","import React, { useState } from 'react';\n\nimport { ConfirmationModal } from \"./ConfirmationModal\";\nimport Button from \"@mui/material/Button\";\nimport { Tooltip } from '@mui/material';\nimport RestartAltIcon from '@mui/icons-material/RestartAlt';\n\ninterface IProps {\n color?: \"primary\" | \"warning\" | \"error\";\n noConfirmation?: boolean;\n onTriggered: () => void;\n}\n\nexport function SoftResetButton({ color = \"primary\", noConfirmation = false, onTriggered }: IProps): React.ReactElement {\n const [modalOpened, setModalOpened] = useState(false);\n\n function handleButtonClick(): void {\n if (noConfirmation) {\n onTriggered();\n } else {\n setModalOpened(true);\n }\n }\n\n return (<>\n \n \n \n setModalOpened(false)}\n confirmationText={\"This will perform the same action as installing Augmentations, are you sure?\"}\n />\n )\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { ThemeEditorModal } from \"./ThemeEditorModal\";\nimport { IRouter } from \"../../ui/Router\";\nimport ColorizeIcon from \"@mui/icons-material/Colorize\";\n\ninterface IProps {\n router: IRouter;\n}\n\nexport function ThemeEditorButton({ router }: IProps): React.ReactElement {\n const [themeEditorOpen, setThemeEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setThemeEditorOpen(false)} router={router} />\n \n );\n}\n","import React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { Link } from \"@mui/material\";\n\nexport function ThemeCollaborate(): React.ReactElement {\n return (\n <>\n \n If you've created a theme that you believe should be added in game's theme browser, feel free to{\" \"}\n \n create a pull request\n \n .\n \n \n Head over to the{\" \"}\n \n theme-sharing\n {\" \"}\n discord channel for more.\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport TextFormatIcon from \"@mui/icons-material/TextFormat\";\nimport { StyleEditorModal } from \"./StyleEditorModal\";\n\nexport function StyleEditorButton(): React.ReactElement {\n const [styleEditorOpen, setStyleEditorOpen] = useState(false);\n return (\n <>\n \n \n \n setStyleEditorOpen(false)} />\n \n );\n}\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 */\nimport React, { useState, useEffect } from \"react\";\n\nimport { CityName } from \"../data/CityNames\";\nimport { TravelConfirmationModal } from \"./TravelConfirmationModal\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { use } from \"../../ui/Context\";\nimport { Money } from \"../../ui/React/Money\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\n\ntype IProps = {\n p: IPlayer;\n router: IRouter;\n};\n\nfunction travel(p: IPlayer, router: IRouter, to: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!p.canAfford(cost)) {\n return;\n }\n\n p.loseMoney(cost, \"other\");\n p.travel(to);\n dialogBoxCreate(<>You are now in {to}!);\n router.toCity();\n}\n\nexport function TravelAgencyRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const [open, setOpen] = useState(false);\n const [destination, setDestination] = useState(CityName.Sector12);\n function rerender(): void {\n setRerender((o) => !o);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => clearInterval(id);\n }, []);\n\n function startTravel(city: CityName): void {\n const cost = CONSTANTS.TravelCost;\n if (!player.canAfford(cost)) {\n return;\n }\n if (Settings.SuppressTravelConfirmation) {\n travel(player, router, city);\n return;\n }\n setOpen(true);\n setDestination(city);\n }\n\n return (\n <>\n Travel Agency\n \n \n From here, you can travel to any other city! A ticket costs{\" \"}\n .\n \n {Settings.DisableASCIIArt ? (\n <>\n {Object.values(CityName)\n .filter((city: string) => city != props.p.city)\n .map((city: string) => {\n const match = Object.entries(CityName).find((entry) => entry[1] === city);\n if (match === undefined) throw new Error(`could not find key for city '${city}'`);\n return (\n \n \n
    \n
    \n );\n })}\n \n ) : (\n startTravel(city)} />\n )}\n
    \n travel(player, router, destination)}\n open={open}\n onClose={() => setOpen(false)}\n />\n \n );\n}\n","import React, { useState, useEffect, useRef, useMemo } from \"react\";\nimport Editor, { Monaco } from \"@monaco-editor/react\";\nimport * as monaco from \"monaco-editor\";\n\ntype IStandaloneCodeEditor = monaco.editor.IStandaloneCodeEditor;\ntype ITextModel = monaco.editor.ITextModel;\nimport { OptionsModal } from \"./OptionsModal\";\nimport { Options } from \"./Options\";\nimport { isValidFilePath } from \"../../Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { Script } from \"../../Script/Script\";\nimport { TextFile } from \"../../TextFile\";\nimport { calculateRamUsage, checkInfiniteLoop } from \"../../Script/RamCalculations\";\nimport { RamCalculationErrorCode } from \"../../Script/RamCalculationErrorCodes\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { DragDropContext, Droppable, Draggable } from \"react-beautiful-dnd\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { NetscriptFunctions } from \"../../NetscriptFunctions\";\nimport { WorkerScript } from \"../../Netscript/WorkerScript\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { iTutorialNextStep, ITutorial, iTutorialSteps } from \"../../InteractiveTutorial\";\nimport { debounce } from \"lodash\";\nimport { saveObject } from \"../../SaveObject\";\nimport { loadThemes } from \"./themes\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport Link from \"@mui/material/Link\";\nimport Box from \"@mui/material/Box\";\nimport SettingsIcon from \"@mui/icons-material/Settings\";\nimport SyncIcon from \"@mui/icons-material/Sync\";\nimport CloseIcon from \"@mui/icons-material/Close\";\nimport Table from \"@mui/material/Table\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableRow from \"@mui/material/TableRow\";\nimport TableBody from \"@mui/material/TableBody\";\nimport { PromptEvent } from \"../../ui/React/PromptManager\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport libSource from \"!!raw-loader!../NetscriptDefinitions.d.ts\";\nimport { TextField, Tooltip } from \"@mui/material\";\n\ninterface IProps {\n // Map of filename -> code\n files: Record;\n hostname: string;\n player: IPlayer;\n router: IRouter;\n vim: boolean;\n}\n\n// TODO: try to remove global symbols\nlet symbolsLoaded = false;\nlet symbols: string[] = [];\nexport function SetupTextEditor(): void {\n const ns = NetscriptFunctions({} as WorkerScript);\n\n // Populates symbols for text editor\n function populate(ns: any): string[] {\n let symbols: string[] = [];\n const keys = Object.keys(ns);\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 if (typeof ns[key] === \"function\") {\n symbols.push(key);\n }\n }\n\n return symbols;\n }\n\n symbols = populate(ns);\n\n const exclude = [\"heart\", \"break\", \"exploit\", \"bypass\", \"corporation\", \"alterReality\"];\n symbols = symbols.filter((symbol: string) => !exclude.includes(symbol)).sort();\n}\n\n// Holds all the data for a open script\nclass OpenScript {\n fileName: string;\n code: string;\n hostname: string;\n lastPosition: monaco.Position;\n model: ITextModel;\n\n constructor(fileName: string, code: string, hostname: string, lastPosition: monaco.Position, model: ITextModel) {\n this.fileName = fileName;\n this.code = code;\n this.hostname = hostname;\n this.lastPosition = lastPosition;\n this.model = model;\n }\n}\n\nlet openScripts: OpenScript[] = [];\nlet currentScript: OpenScript | null = null;\n\n// Called every time script editor is opened\nexport function Root(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n const editorRef = useRef(null);\n const monacoRef = useRef(null);\n const vimStatusRef = useRef(null);\n const [vimEditor, setVimEditor] = useState(null);\n const [editor, setEditor] = useState(null);\n const [filter, setFilter] = useState(\"\");\n const [searchExpanded, setSearchExpanded] = useState(false);\n\n const [ram, setRAM] = useState(\"RAM: ???\");\n const [ramEntries, setRamEntries] = useState([[\"???\", \"\"]]);\n const [updatingRam, setUpdatingRam] = useState(false);\n const [decorations, setDecorations] = useState([]);\n\n const [optionsOpen, setOptionsOpen] = useState(false);\n const [options, setOptions] = useState({\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: props.vim || Settings.MonacoVim,\n });\n\n const [ramInfoOpen, setRamInfoOpen] = useState(false);\n\n // Prevent Crash if script is open on deleted server\n openScripts = openScripts.filter((script) => {\n return GetServer(script.hostname) !== null;\n });\n if (currentScript && GetServer(currentScript.hostname) === null) {\n currentScript = openScripts[0];\n if (currentScript === undefined) currentScript = null;\n }\n\n const [dimensions, setDimensions] = useState({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n useEffect(() => {\n const debouncedHandleResize = debounce(function handleResize() {\n setDimensions({\n height: window.innerHeight,\n width: window.innerWidth,\n });\n }, 250);\n\n window.addEventListener(\"resize\", debouncedHandleResize);\n\n return () => {\n window.removeEventListener(\"resize\", debouncedHandleResize);\n };\n }, []);\n\n useEffect(() => {\n if (currentScript !== null) {\n updateRAM(currentScript.code);\n }\n }, []);\n\n useEffect(() => {\n function keydown(event: KeyboardEvent): void {\n if (Settings.DisableHotkeys) return;\n //Ctrl + b\n if (event.code == \"KeyB\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n props.router.toTerminal();\n }\n\n // CTRL/CMD + S\n if (event.code == \"KeyS\" && (event.ctrlKey || event.metaKey)) {\n event.preventDefault();\n event.stopPropagation();\n save();\n }\n }\n document.addEventListener(\"keydown\", keydown);\n return () => document.removeEventListener(\"keydown\", keydown);\n });\n\n useEffect(() => {\n // setup monaco-vim\n if (options.vim && editor && !vimEditor) {\n try {\n // This library is not typed\n // @ts-expect-error\n window.require([\"monaco-vim\"], function (MonacoVim: any) {\n setVimEditor(MonacoVim.initVimMode(editor, vimStatusRef.current));\n MonacoVim.VimMode.Vim.defineEx(\"write\", \"w\", function () {\n // your own implementation on what you want to do when :w is pressed\n save();\n });\n MonacoVim.VimMode.Vim.defineEx(\"quit\", \"q\", function () {\n props.router.toTerminal();\n });\n // \"wqriteandquit\" is not a typo, prefix must be found in full string\n MonacoVim.VimMode.Vim.defineEx(\"wqriteandquit\", \"wq\", function () {\n save();\n props.router.toTerminal();\n });\n\n // Setup \"go to next tab\" and \"go to previous tab\". This is a little more involved\n // since these aren't Ex commands (they run in normal mode, not after typing `:`)\n MonacoVim.VimMode.Vim.defineAction(\"nextTabs\", function (_cm: any, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the next tab (to the right). Wraps around when at the rightmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n const nextIndex = (currIndex + nTabs) % openScripts.length;\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.defineAction(\"prevTabs\", function (_cm: any, args: { repeat?: number }) {\n const nTabs = args.repeat ?? 1;\n // Go to the previous tab (to the left). Wraps around when at the leftmost tab\n const currIndex = currentTabIndex();\n if (currIndex !== undefined) {\n let nextIndex = currIndex - nTabs;\n while (nextIndex < 0) {\n nextIndex += openScripts.length;\n }\n onTabClick(nextIndex);\n }\n });\n MonacoVim.VimMode.Vim.mapCommand(\"gt\", \"action\", \"nextTabs\", {}, { context: \"normal\" });\n MonacoVim.VimMode.Vim.mapCommand(\"gT\", \"action\", \"prevTabs\", {}, { context: \"normal\" });\n editor.focus();\n });\n } catch { }\n } else if (!options.vim) {\n // Whem vim mode is disabled\n vimEditor?.dispose();\n setVimEditor(null);\n }\n\n return () => {\n vimEditor?.dispose();\n };\n }, [options, editorRef, editor, vimEditor]);\n\n // Generates a new model for the script\n function regenerateModel(script: OpenScript): void {\n if (monacoRef.current !== null) {\n script.model = monacoRef.current.editor.createModel(\n script.code,\n script.fileName.endsWith(\".txt\") ? \"plaintext\" : \"javascript\",\n );\n }\n }\n\n const debouncedSetRAM = useMemo(\n () =>\n debounce((s, e) => {\n setRAM(s);\n setRamEntries(e);\n setUpdatingRam(false);\n }, 300),\n [],\n );\n\n async function updateRAM(newCode: string): Promise {\n if (currentScript != null && currentScript.fileName.endsWith(\".txt\")) {\n debouncedSetRAM(\"N/A\", [[\"N/A\", \"\"]]);\n return;\n }\n setUpdatingRam(true);\n const codeCopy = newCode + \"\";\n const ramUsage = await calculateRamUsage(props.player, codeCopy, props.player.getCurrentServer().scripts);\n if (ramUsage.cost > 0) {\n const entries = ramUsage.entries?.sort((a, b) => b.cost - a.cost) ?? [];\n const entriesDisp = [];\n for (const entry of entries) {\n entriesDisp.push([`${entry.name} (${entry.type})`, numeralWrapper.formatRAM(entry.cost)]);\n }\n\n debouncedSetRAM(\"RAM: \" + numeralWrapper.formatRAM(ramUsage.cost), entriesDisp);\n return;\n }\n switch (ramUsage.cost) {\n case RamCalculationErrorCode.ImportError: {\n debouncedSetRAM(\"RAM: Import Error\", [[\"Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.URLImportError: {\n debouncedSetRAM(\"RAM: HTTP Import Error\", [[\"HTTP Import Error\", \"\"]]);\n break;\n }\n case RamCalculationErrorCode.SyntaxError:\n default: {\n debouncedSetRAM(\"RAM: Syntax Error\", [[\"Syntax Error\", \"\"]]);\n break;\n }\n }\n return new Promise(() => undefined);\n }\n\n // Formats the code\n function beautify(): void {\n if (editorRef.current === null) return;\n editorRef.current.getAction(\"editor.action.formatDocument\").run();\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 // https://blog.checklyhq.com/customizing-monaco/\n // Before the editor is mounted\n function beforeMount(monaco: any): void {\n if (symbolsLoaded) return;\n // Setup monaco auto completion\n symbolsLoaded = true;\n monaco.languages.registerCompletionItemProvider(\"javascript\", {\n provideCompletionItems: () => {\n const suggestions = [];\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 return { suggestions: suggestions };\n },\n });\n\n (async function () {\n // We have to improve the default js language otherwise theme sucks\n const l = await monaco.languages\n .getLanguages()\n .find((l: any) => l.id === \"javascript\")\n .loader();\n // replaced the bare tokens with regexes surrounded by \\b, e.g. \\b{token}\\b which matches a word-break on either side\n // this prevents the highlighter from highlighting pieces of variables that start with a reserved token name\n l.language.tokenizer.root.unshift([new RegExp(\"\\\\bns\\\\b\"), { token: \"ns\" }]);\n for (const symbol of symbols)\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${symbol}\\\\b`), { token: \"netscriptfunction\" }]);\n const otherKeywords = [\"let\", \"const\", \"var\", \"function\"];\n const otherKeyvars = [\"true\", \"false\", \"null\", \"undefined\"];\n otherKeywords.forEach((k) =>\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeywords\" }]),\n );\n otherKeyvars.forEach((k) =>\n l.language.tokenizer.root.unshift([new RegExp(`\\\\b${k}\\\\b`), { token: \"otherkeyvars\" }]),\n );\n l.language.tokenizer.root.unshift([new RegExp(\"\\\\bthis\\\\b\"), { token: \"this\" }]);\n })();\n\n const source = (libSource + \"\").replace(/export /g, \"\");\n monaco.languages.typescript.javascriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n monaco.languages.typescript.typescriptDefaults.addExtraLib(source, \"netscript.d.ts\");\n loadThemes(monaco);\n }\n\n // When the editor is mounted\n function onMount(editor: IStandaloneCodeEditor, monaco: Monaco): void {\n // Required when switching between site navigation (e.g. from Script Editor -> Terminal and back)\n // the `useEffect()` for vim mode is called before editor is mounted.\n setEditor(editor);\n\n editorRef.current = editor;\n monacoRef.current = monaco;\n\n if (editorRef.current === null || monacoRef.current === null) return;\n\n if (!props.files && currentScript !== null) {\n // Open currentscript\n regenerateModel(currentScript);\n editorRef.current.setModel(currentScript.model);\n editorRef.current.setPosition(currentScript.lastPosition);\n editorRef.current.revealLineInCenter(currentScript.lastPosition.lineNumber);\n updateRAM(currentScript.code);\n editorRef.current.focus();\n return;\n }\n if (props.files) {\n const files = Object.entries(props.files);\n\n if (!files.length) {\n editorRef.current.focus();\n return;\n }\n\n for (const [filename, code] of files) {\n // Check if file is already opened\n const openScript = openScripts.find(\n (script) => script.fileName === filename && script.hostname === props.hostname,\n );\n if (openScript) {\n // Script is already opened\n if (openScript.model === undefined || openScript.model === null || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n\n currentScript = openScript;\n editorRef.current.setModel(openScript.model);\n editorRef.current.setPosition(openScript.lastPosition);\n editorRef.current.revealLineInCenter(openScript.lastPosition.lineNumber);\n updateRAM(openScript.code);\n } else {\n // Open script\n const newScript = new OpenScript(\n filename,\n code,\n props.hostname,\n new monacoRef.current.Position(0, 0),\n monacoRef.current.editor.createModel(code, filename.endsWith(\".txt\") ? \"plaintext\" : \"javascript\"),\n );\n openScripts.push(newScript);\n currentScript = { ...newScript };\n editorRef.current.setModel(newScript.model);\n updateRAM(newScript.code);\n }\n }\n }\n\n editorRef.current.focus();\n }\n\n function infLoop(newCode: string): void {\n if (editorRef.current === null || currentScript === null) return;\n if (!currentScript.fileName.endsWith(\".ns\") && !currentScript.fileName.endsWith(\".js\")) return;\n const awaitWarning = checkInfiniteLoop(newCode);\n if (awaitWarning !== -1) {\n const newDecorations = editorRef.current.deltaDecorations(decorations, [\n {\n range: {\n startLineNumber: awaitWarning,\n startColumn: 1,\n endLineNumber: awaitWarning,\n endColumn: 10,\n },\n options: {\n isWholeLine: true,\n glyphMarginClassName: \"myGlyphMarginClass\",\n glyphMarginHoverMessage: {\n value: \"Possible infinite loop, await something.\",\n },\n },\n },\n ]);\n setDecorations(newDecorations);\n } else {\n const newDecorations = editorRef.current.deltaDecorations(decorations, []);\n setDecorations(newDecorations);\n }\n }\n\n // When the code is updated within the editor\n function updateCode(newCode?: string): void {\n if (newCode === undefined) return;\n updateRAM(newCode);\n if (editorRef.current === null) return;\n const newPos = editorRef.current.getPosition();\n if (newPos === null) return;\n if (currentScript !== null) {\n currentScript = { ...currentScript, code: newCode, lastPosition: newPos };\n const curIndex = openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n const newArr = [...openScripts];\n const tempScript = currentScript;\n tempScript.code = newCode;\n newArr[curIndex] = tempScript;\n openScripts = [...newArr];\n }\n try {\n infLoop(newCode);\n } catch (err) { }\n }\n\n function saveScript(scriptToSave: OpenScript): void {\n const server = GetServer(scriptToSave.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(scriptToSave.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 (scriptToSave.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n scriptToSave.fileName,\n scriptToSave.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (scriptToSave.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === scriptToSave.fileName) {\n server.textFiles[i].write(scriptToSave.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n return;\n }\n }\n const textFile = new TextFile(scriptToSave.fileName, scriptToSave.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n props.router.toTerminal();\n }\n\n function save(): void {\n if (currentScript === null) {\n console.error(\"currentScript is null when it shouldn't be. Unable to save script\");\n return;\n }\n // this is duplicate code with saving later.\n if (ITutorial.isRunning && ITutorial.currStep === iTutorialSteps.TerminalTypeScript) {\n //Make sure filename + code properly follow tutorial\n if (currentScript.fileName !== \"n00dles.script\") {\n dialogBoxCreate(\"Leave the script name as 'n00dles.script'!\");\n return;\n }\n if (currentScript.code.replace(/\\s/g, \"\").indexOf(\"while(true){hack('n00dles');}\") == -1) {\n dialogBoxCreate(\"Please copy and paste the code from the tutorial!\");\n return;\n }\n\n //Save the script\n saveScript(currentScript);\n\n iTutorialNextStep();\n\n return;\n }\n\n if (currentScript.fileName == \"\") {\n dialogBoxCreate(\"You must specify a filename!\");\n return;\n }\n\n if (!isValidFilePath(currentScript.fileName)) {\n dialogBoxCreate(\n \"Script filename can contain only alphanumerics, hyphens, and underscores, and must end with an extension.\",\n );\n return;\n }\n\n const server = GetServer(currentScript.hostname);\n if (server === null) throw new Error(\"Server should not be null but it is.\");\n if (isScriptFilename(currentScript.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 (currentScript.fileName == server.scripts[i].filename) {\n server.scripts[i].saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n\n //If the current script does NOT exist, create a new one\n const script = new Script();\n script.saveScript(\n props.player,\n currentScript.fileName,\n currentScript.code,\n props.player.currentServer,\n server.scripts,\n );\n server.scripts.push(script);\n } else if (currentScript.fileName.endsWith(\".txt\")) {\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === currentScript.fileName) {\n server.textFiles[i].write(currentScript.code);\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n return;\n }\n }\n const textFile = new TextFile(currentScript.fileName, currentScript.code);\n server.textFiles.push(textFile);\n } else {\n dialogBoxCreate(\"Invalid filename. Must be either a script (.script, .js, or .ns) or a text file (.txt)\");\n return;\n }\n\n if (Settings.SaveGameOnFileSave) saveObject.saveGame();\n }\n\n function reorder(list: Array, startIndex: number, endIndex: number): OpenScript[] {\n const result = Array.from(list);\n const [removed] = result.splice(startIndex, 1);\n result.splice(endIndex, 0, removed);\n\n return result;\n }\n\n function onDragEnd(result: any): void {\n // Dropped outside of the list\n if (!result.destination) {\n result;\n return;\n }\n\n const items = reorder(openScripts, result.source.index, result.destination.index);\n\n openScripts = items;\n }\n\n function currentTabIndex(): number | undefined {\n if (currentScript !== null) {\n return openScripts.findIndex(\n (script) =>\n currentScript !== null &&\n script.fileName === currentScript.fileName &&\n script.hostname === currentScript.hostname,\n );\n }\n\n return undefined;\n }\n\n function onTabClick(index: number): void {\n if (currentScript !== null) {\n // Save currentScript to openScripts\n const curIndex = currentTabIndex();\n if (curIndex !== undefined) {\n openScripts[curIndex] = currentScript;\n }\n }\n\n currentScript = { ...openScripts[index] };\n\n if (editorRef.current !== null && openScripts[index] !== null) {\n if (openScripts[index].model === undefined || openScripts[index].model.isDisposed()) {\n regenerateModel(openScripts[index]);\n }\n editorRef.current.setModel(openScripts[index].model);\n\n editorRef.current.setPosition(openScripts[index].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index].lastPosition.lineNumber);\n updateRAM(openScripts[index].code);\n editorRef.current.focus();\n }\n }\n\n function onTabClose(index: number): void {\n // See if the script on the server is up to date\n const closingScript = openScripts[index];\n const savedScriptIndex = openScripts.findIndex(\n (script) => script.fileName === closingScript.fileName && script.hostname === closingScript.hostname,\n );\n let savedScriptCode = \"\";\n if (savedScriptIndex !== -1) {\n savedScriptCode = openScripts[savedScriptIndex].code;\n }\n const server = GetServer(closingScript.hostname);\n if (server === null) throw new Error(`Server '${closingScript.hostname}' should not be null, but it is.`);\n\n const serverScriptIndex = server.scripts.findIndex((script) => script.filename === closingScript.fileName);\n if (serverScriptIndex === -1 || savedScriptCode !== server.scripts[serverScriptIndex as number].code) {\n PromptEvent.emit({\n txt: \"Do you want to save changes to \" + closingScript.fileName + \"?\",\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n closingScript.code = savedScriptCode;\n saveScript(closingScript);\n }\n },\n });\n }\n\n if (openScripts.length > 1) {\n openScripts = openScripts.filter((value, i) => i !== index);\n\n let indexOffset = -1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 1;\n if (openScripts[index + indexOffset] === undefined) {\n indexOffset = 0;\n }\n }\n\n // Change current script if we closed it\n currentScript = openScripts[index + indexOffset];\n if (editorRef.current !== null) {\n if (\n openScripts[index + indexOffset].model === undefined ||\n openScripts[index + indexOffset].model === null ||\n openScripts[index + indexOffset].model.isDisposed()\n ) {\n regenerateModel(openScripts[index + indexOffset]);\n }\n\n editorRef.current.setModel(openScripts[index + indexOffset].model);\n editorRef.current.setPosition(openScripts[index + indexOffset].lastPosition);\n editorRef.current.revealLineInCenter(openScripts[index + indexOffset].lastPosition.lineNumber);\n editorRef.current.focus();\n }\n rerender();\n } else {\n // No more scripts are open\n openScripts = [];\n currentScript = null;\n props.router.toTerminal();\n }\n }\n\n function onTabUpdate(index: number): void {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return;\n\n if (openScript.code !== serverScriptCode) {\n PromptEvent.emit({\n txt:\n \"Do you want to overwrite the current editor content with the contents of \" +\n openScript.fileName +\n \" on the server? This cannot be undone.\",\n resolve: (result: boolean | string) => {\n if (result) {\n // Save changes\n openScript.code = serverScriptCode;\n\n // Switch to target tab\n onTabClick(index);\n\n if (editorRef.current !== null && openScript !== null) {\n if (openScript.model === undefined || openScript.model.isDisposed()) {\n regenerateModel(openScript);\n }\n editorRef.current.setModel(openScript.model);\n\n editorRef.current.setValue(openScript.code);\n updateRAM(openScript.code);\n editorRef.current.focus();\n }\n }\n },\n });\n }\n }\n\n function dirty(index: number): string {\n const openScript = openScripts[index];\n const serverScriptCode = getServerCode(index);\n if (serverScriptCode === null) return \" *\";\n\n // The server code is stored with its starting & trailing whitespace removed\n const openScriptFormatted = Script.formatCode(openScript.code);\n return serverScriptCode !== openScriptFormatted ? \" *\" : \"\";\n }\n\n function getServerCode(index: number): string | null {\n const openScript = openScripts[index];\n const server = GetServer(openScript.hostname);\n if (server === null) throw new Error(`Server '${openScript.hostname}' should not be null, but it is.`);\n\n const serverScript = server.scripts.find((s) => s.filename === openScript.fileName);\n return serverScript?.code ?? null;\n }\n function handleFilterChange(event: React.ChangeEvent): void {\n setFilter(event.target.value);\n }\n function handleExpandSearch(): void {\n setFilter(\"\")\n setSearchExpanded(!searchExpanded)\n }\n const filteredOpenScripts = Object.values(openScripts).filter(\n (script) => (script.hostname.includes(filter) || script.fileName.includes(filter))\n );\n\n // Toolbars are roughly 112px:\n // 8px body margin top\n // 38.5px filename tabs\n // 5px padding for top of editor\n // 44px bottom tool bar + 16px margin\n // + vim bar 34px\n const editorHeight = dimensions.height - (130 + (options.vim ? 34 : 0));\n const tabsMaxWidth = 1640;\n const tabMargin = 5;\n const tabMaxWidth = filteredOpenScripts.length ? tabsMaxWidth / filteredOpenScripts.length - tabMargin : 0;\n const tabIconWidth = 25;\n const tabTextWidth = tabMaxWidth - tabIconWidth * 2;\n return (\n <>\n
    \n \n \n {(provided, snapshot) => (\n \n \n {searchExpanded ?\n ,\n spellCheck: false,\n endAdornment: \n }}\n /> : }\n \n {filteredOpenScripts.map(({ fileName, hostname }, index) => {\n const iconButtonStyle = {\n maxWidth: `${tabIconWidth}px`,\n minWidth: `${tabIconWidth}px`,\n minHeight: \"38.5px\",\n maxHeight: \"38.5px\",\n ...(currentScript?.fileName === filteredOpenScripts[index].fileName\n ? {\n background: Settings.theme.button,\n borderColor: Settings.theme.button,\n color: Settings.theme.primary,\n }\n : {\n background: Settings.theme.backgroundsecondary,\n borderColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n }),\n };\n\n const scriptTabText = `${hostname}:~/${fileName} ${dirty(index)}`;\n return (\n \n {(provided) => (\n \n \n onTabClick(index)}\n onMouseDown={(e) => {\n e.preventDefault();\n if (e.button === 1) onTabClose(index);\n }}\n style={{\n maxWidth: `${tabTextWidth}px`,\n minHeight: '38.5px',\n overflow: \"hidden\",\n ...(currentScript?.fileName === filteredOpenScripts[index].fileName\n ? {\n background: Settings.theme.button,\n borderColor: Settings.theme.button,\n color: Settings.theme.primary,\n }\n : {\n background: Settings.theme.backgroundsecondary,\n borderColor: Settings.theme.backgroundsecondary,\n color: Settings.theme.secondary,\n }),\n }}\n >\n \n {scriptTabText}\n \n \n \n \n \n \n \n
    \n )}\n
    \n );\n })}\n {provided.placeholder}\n \n )}\n \n \n
    \n Loading script editor!}\n height={`${editorHeight}px`}\n defaultLanguage=\"javascript\"\n defaultValue={\"\"}\n onChange={updateCode}\n theme={options.theme}\n options={{ ...options, glyphMargin: true }}\n />\n\n \n\n \n \n \n {\n setRamInfoOpen(true);\n }}\n >\n {ram}\n \n \n \n \n {\" \"}\n Documentation:{\" \"}\n \n Basic\n {\" \"}\n |\n \n Full\n \n \n \n setOptionsOpen(false)}\n options={{\n theme: Settings.MonacoTheme,\n insertSpaces: Settings.MonacoInsertSpaces,\n fontSize: Settings.MonacoFontSize,\n wordWrap: Settings.MonacoWordWrap,\n vim: Settings.MonacoVim,\n }}\n save={(options: Options) => {\n setOptions(options);\n Settings.MonacoTheme = options.theme;\n Settings.MonacoInsertSpaces = options.insertSpaces;\n Settings.MonacoFontSize = options.fontSize;\n Settings.MonacoWordWrap = options.wordWrap;\n Settings.MonacoVim = options.vim;\n }}\n />\n setRamInfoOpen(false)}>\n \n \n {ramEntries.map(([n, r]) => (\n \n \n {n}\n \n {r}\n \n \n \n ))}\n \n
    \n
    \n
    \n \n \n No open files\n \n Use nano FILENAME in\n
    \n the terminal to open files\n
    \n
    \n \n \n );\n}\n","/**\n * Uses the acorn.js library to parse a script's code into an AST and\n * recursively walk through that AST to replace import urls with blobs\n */\nimport * as walk from \"acorn-walk\";\nimport { parse } from \"acorn\";\n\nimport { makeRuntimeRejectMsg } from \"./NetscriptEvaluator\";\nimport { ScriptUrl } from \"./Script/ScriptUrl\";\nimport { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { Script } from \"./Script/Script\";\nimport { areImportsEquals } from \"./Terminal/DirectoryHelpers\";\nimport { IPlayer } from \"./PersonObjects/IPlayer\";\n\n// Makes a blob that contains the code of a given script.\nfunction makeScriptBlob(code: string): Blob {\n return new Blob([code], { type: \"text/javascript\" });\n}\n\nexport async function compile(player: IPlayer, script: Script, scripts: Script[]): Promise {\n if (!shouldCompile(script, scripts)) return;\n // The URL at the top is the one we want to import. It will\n // recursively import all the other modules in the urlStack.\n //\n // Webpack likes to turn the import into a require, which sort of\n // but not really behaves like import. Particularly, it cannot\n // load fully dynamic content. So we hide the import from webpack\n // by placing it inside an eval call.\n await script.updateRamUsage(player, scripts);\n const uurls = _getScriptUrls(script, scripts, []);\n const url = uurls[uurls.length - 1].url;\n if (script.url && script.url !== url) {\n URL.revokeObjectURL(script.url);\n // Thoughts: Should we be revoking any URLs here?\n // If a script is modified repeatedly between two states,\n // we could reuse the blob at a later time.\n // BlobCache.removeByValue(script.url);\n // URL.revokeObjectURL(script.url);\n // if (script.dependencies.length > 0) {\n // script.dependencies.forEach((dep) => {\n // removeBlobFromCache(dep.url);\n // URL.revokeObjectURL(dep.url);\n // });\n // }\n }\n if (script.dependencies.length > 0) script.dependencies.forEach((dep) => URL.revokeObjectURL(dep.url));\n script.url = uurls[uurls.length - 1].url;\n script.module = new Promise((resolve) => resolve(eval(\"import(uurls[uurls.length - 1].url)\")));\n script.dependencies = uurls;\n}\n\n// Begin executing a user JS script, and return a promise that resolves\n// or rejects when the script finishes.\n// - script is a script to execute (see Script.js). We depend only on .filename and .code.\n// scripts is an array of other scripts on the server.\n// env is the global environment that should be visible to all the scripts\n// (i.e. hack, grow, etc.).\n// When the promise returned by this resolves, we'll have finished\n// running the main function of the script.\nexport async function executeJSScript(\n player: IPlayer,\n scripts: Script[] = [],\n workerScript: WorkerScript,\n): Promise {\n const script = workerScript.getScript();\n if (script === null) throw new Error(\"script is null\");\n await compile(player, script, scripts);\n workerScript.ramUsage = script.ramUsage;\n const loadedModule = await script.module;\n\n const ns = workerScript.env.vars;\n\n // TODO: putting await in a non-async function yields unhelpful\n // \"SyntaxError: unexpected reserved word\" with no line number information.\n if (!loadedModule.main) {\n throw makeRuntimeRejectMsg(\n workerScript,\n `${script.filename} cannot be run because it does not have a main function.`,\n );\n }\n return loadedModule.main(ns);\n}\n\nfunction isDependencyOutOfDate(filename: string, scripts: Script[], scriptModuleSequenceNumber: number): boolean {\n const depScript = scripts.find((s) => s.filename == filename);\n\n // If the script is not present on the server, we should recompile, if only to get any necessary\n // compilation errors.\n if (!depScript) return true;\n\n const depIsMoreRecent = depScript.moduleSequenceNumber > scriptModuleSequenceNumber;\n return depIsMoreRecent;\n}\n/** Returns whether we should compile the script parameter.\n *\n * @param {Script} script\n * @param {Script[]} scripts\n */\nfunction shouldCompile(script: Script, scripts: Script[]): boolean {\n if (script.module === \"\") return true;\n return script.dependencies.some((dep) => isDependencyOutOfDate(dep.filename, scripts, script.moduleSequenceNumber));\n}\n\n// Gets a stack of blob urls, the top/right-most element being\n// the blob url for the named script on the named server.\n//\n// - script -- the script for whom we are getting a URL.\n// - scripts -- all the scripts available on this server\n// - seen -- The modules above this one -- to prevent mutual dependency.\n//\n// TODO We don't make any effort to cache a given module when it is imported at\n// different parts of the tree. That hasn't presented any problem with during\n// testing, but it might be an idea for the future. Would require a topo-sort\n// then url-izing from leaf-most to root-most.\n/**\n * @param {Script} script\n * @param {Script[]} scripts\n * @param {Script[]} seen\n * @returns {ScriptUrl[]} All of the compiled scripts, with the final one\n * in the list containing the blob corresponding to\n * the script parameter.\n */\n// BUG: apparently seen is never consulted. Oops.\nfunction _getScriptUrls(script: Script, scripts: Script[], seen: Script[]): ScriptUrl[] {\n // Inspired by: https://stackoverflow.com/a/43834063/91401\n const urlStack: ScriptUrl[] = [];\n // Seen contains the dependents of the current script. Make sure we include that in the script dependents.\n for (const dependent of seen) {\n if (!script.dependents.some((s) => s.server === dependent.server && s.filename == dependent.filename)) {\n script.dependents.push({ server: dependent.server, filename: dependent.filename });\n }\n }\n seen.push(script);\n try {\n // Replace every import statement with an import to a blob url containing\n // the corresponding script. E.g.\n //\n // import {foo} from \"bar.js\";\n //\n // becomes\n //\n // import {foo} from \"blob://\"\n //\n // Where the blob URL contains the script content.\n\n // Parse the code into an ast tree\n const ast: any = parse(script.code, { sourceType: \"module\", ecmaVersion: \"latest\", ranges: true });\n\n const importNodes: Array = [];\n // Walk the nodes of this tree and find any import declaration statements.\n walk.simple(ast, {\n ImportDeclaration(node: any) {\n // Push this import onto the stack to replace\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n },\n ExportNamedDeclaration(node: any) {\n if (node.source) {\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n }\n },\n ExportAllDeclaration(node: any) {\n if (node.source) {\n importNodes.push({\n filename: node.source.value,\n start: node.source.range[0] + 1,\n end: node.source.range[1] - 1,\n });\n }\n },\n });\n // Sort the nodes from last start index to first. This replaces the last import with a blob first,\n // preventing the ranges for other imports from being shifted.\n importNodes.sort((a, b) => b.start - a.start);\n let transformedCode = script.code;\n // Loop through each node and replace the script name with a blob url.\n for (const node of importNodes) {\n const filename = node.filename.startsWith(\"./\") ? node.filename.substring(2) : node.filename;\n\n // Find the corresponding script.\n const matchingScripts = scripts.filter((s) => areImportsEquals(s.filename, filename));\n if (matchingScripts.length === 0) continue;\n\n const [importedScript] = matchingScripts;\n\n const urls = _getScriptUrls(importedScript, scripts, seen);\n\n // The top url in the stack is the replacement import file for this script.\n urlStack.push(...urls);\n const blob = urls[urls.length - 1].url;\n\n // Replace the blob inside the import statement.\n transformedCode = transformedCode.substring(0, node.start) + blob + transformedCode.substring(node.end);\n }\n\n // We automatically define a print function() in the NetscriptJS module so that\n // accidental calls to window.print() do not bring up the \"print screen\" dialog\n transformedCode += `\\n\\nfunction print() {throw new Error(\"Invalid call to window.print(). Did you mean to use Netscript's print()?\");}`;\n\n const blob = URL.createObjectURL(makeScriptBlob(transformedCode));\n // Push the blob URL onto the top of the stack.\n urlStack.push(new ScriptUrl(script.filename, blob, script.moduleSequenceNumber));\n return urlStack;\n } catch (err) {\n // If there is an error, we need to clean up the URLs.\n for (const url of urlStack) URL.revokeObjectURL(url.url);\n throw err;\n } finally {\n seen.pop();\n }\n}\n","import { toNative } from \"./toNative\";\nimport * as libarg from \"arg\";\n\nexport function Flags(vargs: string[]): any {\n return function (data: any): any {\n data = toNative(data);\n // We always want the help flag.\n const args: {\n [key: string]: any;\n } = {};\n\n for (const d of data) {\n let t: any = String;\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 const numDashes = d[0].length > 1 ? 2 : 1;\n args[\"-\".repeat(numDashes) + d[0]] = t;\n }\n const ret = libarg(args, { argv: vargs });\n for (const d of data) {\n if (!ret.hasOwnProperty(\"--\" + d[0]) || !ret.hasOwnProperty(\"-\" + d[0])) ret[d[0]] = d[1];\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 return ret;\n };\n}\n","import { Interpreter } from \"../ThirdParty/JSInterpreter\";\n\nconst defaultInterpreter = new Interpreter(\"\", () => undefined);\n\n// 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// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function toNative(pseudoObj: any): any {\n if (pseudoObj == null) return null;\n if (\n !pseudoObj.hasOwnProperty(\"properties\") ||\n !pseudoObj.hasOwnProperty(\"getter\") ||\n !pseudoObj.hasOwnProperty(\"setter\") ||\n !pseudoObj.hasOwnProperty(\"proto\")\n ) {\n return pseudoObj; // it wasn't a pseudo object anyway.\n }\n\n let nativeObj: any;\n if (pseudoObj.hasOwnProperty(\"class\") && pseudoObj.class === \"Array\") {\n nativeObj = [];\n const length = defaultInterpreter.getProperty(pseudoObj, \"length\");\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 for (const key of Object.keys(pseudoObj.properties)) {\n const val = pseudoObj.properties[key];\n nativeObj[key] = toNative(val);\n }\n }\n return nativeObj;\n}\n","import * as React from \"react\";\nimport { useTheme } from \"@mui/material/styles\";\nimport Box from \"@mui/material/Box\";\nimport IconButton from \"@mui/material/IconButton\";\nimport FirstPageIcon from \"@mui/icons-material/FirstPage\";\nimport KeyboardArrowLeft from \"@mui/icons-material/KeyboardArrowLeft\";\nimport KeyboardArrowRight from \"@mui/icons-material/KeyboardArrowRight\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\n\ninterface TablePaginationActionsProps {\n count: number;\n page: number;\n rowsPerPage: number;\n onPageChange: (event: React.MouseEvent, newPage: number) => void;\n}\n\nexport function TablePaginationActionsAll(props: TablePaginationActionsProps): React.ReactElement {\n const theme = useTheme();\n const { count, page, rowsPerPage, onPageChange } = props;\n\n const handleFirstPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, 0);\n };\n\n const handleBackButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page - 1);\n };\n\n const handleNextButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, page + 1);\n };\n\n const handleLastPageButtonClick = (event: React.MouseEvent): void => {\n onPageChange(event, Math.max(0, Math.ceil(count / rowsPerPage) - 1));\n };\n\n return (\n \n \n {theme.direction === \"rtl\" ? : }\n \n \n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n = Math.ceil(count / rowsPerPage) - 1}>\n {theme.direction === \"rtl\" ? : }\n \n \n );\n}\n","import * as React from \"react\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { TableCell as MuiTableCell, TableCellProps } from \"@mui/material\";\n\nconst useStyles = makeStyles({\n root: {\n border: \"1px solid white\",\n width: \"5px\",\n height: \"5px\",\n },\n});\n\nexport const TableCell: React.FC = (props: TableCellProps) => {\n return (\n \n );\n};\n\ntype IProps = {\n onMouseEnter?: () => void;\n onClick?: () => void;\n color: string;\n};\n\nexport function Cell(cellProps: IProps): React.ReactElement {\n return (\n \n );\n}\n","import { GetServer } from \"../Server/AllServers\";\nimport { RunningScript } from \"./RunningScript\";\n\nexport function getRamUsageFromRunningScript(script: RunningScript): number {\n if (script.ramUsage != null && script.ramUsage > 0) {\n return script.ramUsage; // Use cached value\n }\n\n const server = GetServer(script.server);\n if (server == null) {\n return 0;\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","import { ITerminal } from \"../../ITerminal\";\nimport { removeLeadingSlash, removeTrailingSlash } from '../../DirectoryHelpers'\nimport { IRouter, ScriptEditorRouteOptions } from \"../../../ui/Router\";\nimport { IPlayer } from \"../../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../../Script/isScriptFilename\";\nimport { CursorPositions } from \"../../../ScriptEditor/CursorPositions\";\nimport { Script } from \"../../../Script/Script\";\nimport { isEmpty } from \"lodash\";\n\ninterface EditorParameters {\n terminal: ITerminal;\n router: IRouter;\n player: IPlayer;\n server: BaseServer;\n args: (string | number | boolean)[];\n}\n\nfunction isNs2(filename: string): boolean {\n return filename.endsWith(\".ns\") || filename.endsWith(\".js\");\n}\n\nconst newNs2Template = `/** @param {NS} ns */\nexport async function main(ns) {\n\n}`;\n\ninterface ISimpleScriptGlob {\n glob: string;\n preGlob: string;\n postGlob: string;\n globError: string;\n globMatches: string[];\n globAgainst: Script[];\n}\n\nfunction containsSimpleGlob(filename: string): boolean {\n return filename.includes(\"*\");\n}\n\nfunction detectSimpleScriptGlob(\n args: EditorParameters[\"args\"],\n player: IPlayer,\n terminal: ITerminal,\n): ISimpleScriptGlob | null {\n if (args.length == 1 && containsSimpleGlob(`${args[0]}`)) {\n const filename = `${args[0]}`;\n const scripts = player.getCurrentServer().scripts;\n const parsedGlob = parseSimpleScriptGlob(filename, scripts, terminal);\n return parsedGlob;\n }\n return null;\n}\n\nfunction parseSimpleScriptGlob(globString: string, globDatabase: Script[], terminal: ITerminal): ISimpleScriptGlob {\n const parsedGlob: ISimpleScriptGlob = {\n glob: globString,\n preGlob: \"\",\n postGlob: \"\",\n globError: \"\",\n globMatches: [],\n globAgainst: globDatabase,\n };\n\n // Ensure deep globs are minified to simple globs, which act as deep globs in this impl\n globString = globString.replace(\"**\", \"*\");\n\n // Ensure only a single glob is present\n if (globString.split(\"\").filter((c) => c == \"*\").length !== 1) {\n parsedGlob.globError = \"Only a single glob is supported per command.\\nexample: `nano my-dir/*.js`\";\n return parsedGlob;\n }\n\n // Split arg around glob, normalize preGlob path\n [parsedGlob.preGlob, parsedGlob.postGlob] = globString.split(\"*\");\n parsedGlob.preGlob = removeLeadingSlash(parsedGlob.preGlob);\n\n // Add CWD to preGlob path\n const cwd = removeTrailingSlash(terminal.cwd())\n parsedGlob.preGlob = `${cwd}/${parsedGlob.preGlob}`\n\n // For every script on the current server, filter matched scripts per glob values & persist\n globDatabase.forEach((script) => {\n const filename = script.filename.startsWith('/') ? script.filename : `/${script.filename}`\n if (filename.startsWith(parsedGlob.preGlob) && filename.endsWith(parsedGlob.postGlob)) {\n parsedGlob.globMatches.push(filename);\n }\n });\n\n // Rebuild glob for potential error reporting\n parsedGlob.glob = `${parsedGlob.preGlob}*${parsedGlob.postGlob}`\n\n return parsedGlob;\n}\n\nexport function commonEditor(\n command: string,\n { terminal, router, player, args }: EditorParameters,\n scriptEditorRouteOptions?: ScriptEditorRouteOptions,\n): void {\n if (args.length < 1) {\n terminal.error(`Incorrect usage of ${command} command. Usage: ${command} [scriptname]`);\n return;\n }\n\n let filesToLoadOrCreate = args;\n try {\n const globSearch = detectSimpleScriptGlob(args, player, terminal);\n if (globSearch) {\n if (isEmpty(globSearch.globError) === false) throw new Error(globSearch.globError);\n filesToLoadOrCreate = globSearch.globMatches;\n }\n\n const files = filesToLoadOrCreate.map((arg) => {\n const filename = `${arg}`;\n\n if (isScriptFilename(filename)) {\n const filepath = terminal.getFilepath(filename);\n const script = terminal.getScript(player, filename);\n const fileIsNs2 = isNs2(filename);\n const code = script !== null ? script.code : fileIsNs2 ? newNs2Template : \"\";\n\n if (code === newNs2Template) {\n CursorPositions.saveCursor(filename, {\n row: 3,\n column: 5,\n });\n }\n\n return [filepath, code];\n }\n\n if (filename.endsWith(\".txt\")) {\n const filepath = terminal.getFilepath(filename);\n const txt = terminal.getTextFile(player, filename);\n return [filepath, txt === null ? \"\" : txt.text];\n }\n\n throw new Error(\n `Invalid file. Only scripts (.script, .ns, .js), or text files (.txt) can be edited with ${command}`,\n );\n });\n\n if (globSearch && files.length === 0) {\n throw new Error(`Could not find any valid files to open with ${command} using glob: \\`${globSearch.glob}\\``)\n }\n\n router.toScriptEditor(Object.fromEntries(files), scriptEditorRouteOptions);\n } catch (e) {\n terminal.error(`${e}`);\n }\n}\n","import { Bladeburner } from \"../../Bladeburner/Bladeburner\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessBladeburner(this: IPlayer): boolean {\n if (this.bitNodeN === 8) {\n return false;\n }\n\n return this.bitNodeN === 6 || this.bitNodeN === 7 || SourceFileFlags[6] > 0 || SourceFileFlags[7] > 0;\n}\n\nexport function inBladeburner(this: IPlayer): boolean {\n if (this.bladeburner == null) {\n return false;\n }\n return this.bladeburner instanceof Bladeburner;\n}\n\nexport function startBladeburner(this: IPlayer): void {\n this.bladeburner = new Bladeburner(this);\n}\n","import { IBladeburner } from \"./IBladeburner\";\nimport { Action, IActionParams } from \"./Action\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Contract extends Action {\n constructor(params: IActionParams | null = null) {\n super(params);\n }\n\n getActionTypeSkillSuccessBonus(inst: IBladeburner): number {\n return inst.skillMultipliers.successChanceContract;\n }\n\n toJSON(): any {\n return Generic_toJSON(\"Contract\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Contract {\n return Generic_fromJSON(Contract, value.data);\n }\n}\n\nReviver.constructors.Contract = Contract;\n","export const ConsoleHelpText: {\n [key: string]: string[];\n helpList: string[];\n automate: string[];\n clear: string[];\n cls: string[];\n help: string[];\n log: string[];\n skill: string[];\n start: string[];\n stop: string[];\n} = {\n helpList: [\n \"Use 'help [command]' to get more information about a particular Bladeburner console command.\",\n \" \",\n \" automate [var] [val] [hi/low] Configure simple automation for Bladeburner tasks\",\n \" clear/cls Clear the console\",\n \" help [cmd] Display this help text, or help text for a specific command\",\n \" log [en/dis] [type] Enable or disable logging for events and actions\",\n \" skill [action] [name] Level or display info about your Bladeburner skills\",\n \" start [type] [name] Start a Bladeburner action/task\",\n \" stop Stops your current Bladeburner action/task\",\n \" \",\n ],\n automate: [\n \"Usage: automate [var] [val] [hi/low]\",\n \" \",\n \"A simple way to automate your Bladeburner actions. This console command can be used \" +\n \"to automatically start an action when your stamina rises above a certain threshold, and \" +\n \"automatically switch to another action when your stamina drops below another threshold.\",\n \" \",\n \" automate status - Check the current status of your automation and get a brief description of what it'll do\",\n \" automate en - Enable the automation feature\",\n \" automate dis - Disable the automation feature\",\n \" \",\n \"There are four properties that must be set for this automation to work properly. Here is how to set them:\",\n \" \",\n \" automate stamina 100 high\",\n \" automate contract Tracking high\",\n \" automate stamina 50 low\",\n \" automate general 'Field Analysis' low\",\n \" \",\n \"Using the four console commands above will set the automation to perform Tracking contracts \" +\n \"if your stamina is 100 or higher, and then switch to Field Analysis if your stamina drops below \" +\n \"50. Note that when setting the action, the name of the action is CASE-SENSITIVE. It must \" +\n \"exactly match whatever the name is in the UI.\",\n \" \",\n ],\n clear: [\"Usage: clear\", \" \", \"Clears the console\", \" \"],\n cls: [\"Usage: cls\", \" \", \"Clears the console\", \" \"],\n help: [\n \"Usage: help [command]\",\n \" \",\n \"Running 'help' with no arguments displays the general help text, which lists all console commands \" +\n \"and a brief description of what they do. A command can be specified to get more specific help text \" +\n \"about that particular command. For example:\",\n \" \",\n \" help automate\",\n \" \",\n \"will display specific information about using the automate console command\",\n \" \",\n ],\n log: [\n \"Usage: log [en/dis] [type]\",\n \" \",\n \"Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged \" +\n \"in the console. There are also random events that are logged in the console as well. The five categories of \" +\n \"things that get logged are:\",\n \" \",\n \"[general, contracts, ops, blackops, events]\",\n \" \",\n \"The logging for these categories can be enabled or disabled like so:\",\n \" \",\n \" log dis contracts - Disables logging that occurs when contracts are completed\",\n \" log en contracts - Enables logging that occurs when contracts are completed\",\n \" log dis events - Disables logging for Bladeburner random events\",\n \" \",\n \"Logging can be universally enabled/disabled using the 'all' keyword:\",\n \" \",\n \" log dis all\",\n \" log en all\",\n \" \",\n ],\n skill: [\n \"Usage: skill [action] [name]\",\n \" \",\n \"Level or display information about your skills.\",\n \" \",\n \"To display information about all of your skills and your multipliers, use:\",\n \" \",\n \" skill list\",\n \" \",\n \"To display information about a specific skill, specify the name of the skill afterwards. \" +\n \"Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If \" +\n \"the name of the skill has whitespace, enclose the name of the skill in double quotation marks:\",\n \" \",\n \" skill list Reaper\",\n \" skill list 'Digital Observer'\",\n \" \",\n \"This console command can also be used to level up skills:\",\n \" \",\n \" skill level [skill name]\",\n \" \",\n ],\n start: [\n \"Usage: start [type] [name]\",\n \" \",\n \"Start an action. An action is specified by its type and its name. The \" +\n \"name is case-sensitive. It must appear exactly as it does in the UI. If \" +\n \"the name of the action has whitespace, enclose it in double quotation marks. \" +\n \"Valid action types include:\",\n \" \",\n \"[general, contract, op, blackop]\",\n \" \",\n \"Examples:\",\n \" \",\n \" start contract Tracking\",\n \" start op 'Undercover Operation'\",\n \" \",\n ],\n stop: [\"Usage: stop\", \" \", \"Stop your current action and go idle.\", \" \"],\n};\n","import { Corporation } from \"../../Corporation/Corporation\";\nimport { CorporationUnlockUpgrades } from \"../../Corporation/data/CorporationUnlockUpgrades\";\nimport { SourceFileFlags } from \"../../SourceFile/SourceFileFlags\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport function canAccessCorporation(this: IPlayer): boolean {\n return this.bitNodeN === 3 || SourceFileFlags[3] > 0;\n}\n\nexport function hasCorporation(this: IPlayer): boolean {\n if (this.corporation == null) {\n return false;\n }\n return this.corporation instanceof Corporation;\n}\n\nexport function startCorporation(this: IPlayer, corpName: string, additionalShares = 0): void {\n this.corporation = new Corporation({\n name: corpName,\n });\n\n if (SourceFileFlags[3] === 3) {\n const warehouseApi = CorporationUnlockUpgrades[\"7\"][0];\n const OfficeApi = CorporationUnlockUpgrades[\"8\"][0];\n\n this.corporation.unlockUpgrades[warehouseApi] = 1;\n this.corporation.unlockUpgrades[OfficeApi] = 1;\n }\n\n this.corporation.totalShares += additionalShares;\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\nimport { Research } from \"./Research\";\nimport { ResearchMap } from \"./ResearchMap\";\n\nimport { IMap } from \"../types\";\n\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\ninterface IConstructorParams {\n children?: Node[];\n cost: number;\n text: string;\n parent?: Node | null;\n}\n\nexport class 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 children: Node[] = [];\n\n // How much Scientific Research is needed for this\n // Necessary to show it on the UI\n cost = 0;\n\n // Whether or not this Research has been unlocked\n researched = false;\n\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 parent: Node | null = null;\n\n // Name of the Research held in this Node\n text = \"\";\n\n constructor(p: IConstructorParams = { cost: 0, text: \"\" }) {\n if (ResearchMap[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: Node): void {\n this.children.push(n);\n n.parent = this;\n }\n\n // Return an object that describes a TreantJS-compatible markup/config for this Node\n // See: http://fperucic.github.io/treant-js/\n createTreantMarkup(): any {\n const childrenArray = [];\n for (let i = 0; i < this.children.length; ++i) {\n childrenArray.push(this.children[i].createTreantMarkup());\n }\n\n // Determine what css class this Node should have in the diagram\n let htmlClass = \"tooltip\";\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: Research | null = ResearchMap[this.text];\n const sanitizedName: string = this.text.replace(/\\s/g, \"\");\n return {\n children: childrenArray,\n HTMLclass: htmlClass,\n innerHTML:\n `
    ` +\n `${this.text}
    ${numeralWrapper.format(this.cost, \"0,0\")} Scientific Research` +\n `` +\n `${research.desc}` +\n `` +\n `
    `,\n text: { name: this.text },\n };\n }\n\n // Recursive function for finding a Node with the specified text\n findNode(text: string): Node | null {\n // Is this the Node?\n if (this.text === text) {\n return this;\n }\n\n // Recursively search chilren\n let res = null;\n for (let i = 0; i < this.children.length; ++i) {\n res = this.children[i].findNode(text);\n if (res != null) {\n return res;\n }\n }\n\n return null;\n }\n\n setParent(n: Node): void {\n this.parent = n;\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\"\nexport class ResearchTree {\n // Object containing names of all acquired Research by name\n researched: IMap = {};\n\n // Root Node\n root: Node | null = null;\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(): any {\n if (this.root == null) {\n return {};\n }\n\n const treeMarkup = this.root.createTreantMarkup();\n\n return {\n chart: {\n container: \"\",\n },\n nodeStructure: treeMarkup,\n };\n }\n\n // Gets an array with the 'text' values of ALL Nodes in the Research Tree\n getAllNodes(): string[] {\n const res: string[] = [];\n const queue: Node[] = [];\n\n if (this.root == null) {\n return res;\n }\n\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n if (node == null) {\n continue;\n }\n\n res.push(node.text);\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Get total multipliers from this Research Tree\n getAdvertisingMultiplier(): number {\n return this.getMultiplierHelper(\"advertisingMult\");\n }\n\n getEmployeeChaMultiplier(): number {\n return this.getMultiplierHelper(\"employeeChaMult\");\n }\n\n getEmployeeCreMultiplier(): number {\n return this.getMultiplierHelper(\"employeeCreMult\");\n }\n\n getEmployeeEffMultiplier(): number {\n return this.getMultiplierHelper(\"employeeEffMult\");\n }\n\n getEmployeeIntMultiplier(): number {\n return this.getMultiplierHelper(\"employeeIntMult\");\n }\n\n getProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productionMult\");\n }\n\n getProductProductionMultiplier(): number {\n return this.getMultiplierHelper(\"productProductionMult\");\n }\n\n getSalesMultiplier(): number {\n return this.getMultiplierHelper(\"salesMult\");\n }\n\n getScientificResearchMultiplier(): number {\n return this.getMultiplierHelper(\"sciResearchMult\");\n }\n\n getStorageMultiplier(): number {\n return this.getMultiplierHelper(\"storageMult\");\n }\n\n // Helper function for all the multiplier getter fns\n getMultiplierHelper(propName: string): number {\n let res = 1;\n if (this.root == null) {\n return res;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\n\n // If the Node has not been researched, there's no need to\n // process it or its children\n if (node == null || !node.researched) {\n continue;\n }\n\n const research: Research | null = ResearchMap[node.text];\n\n // Safety checks\n if (research == null) {\n console.warn(`Invalid Research name in node: ${node.text}`);\n continue;\n }\n\n const mult: any = (research as any)[propName];\n if (mult == null) {\n console.warn(`Invalid propName specified in ResearchTree.getMultiplierHelper: ${propName}`);\n continue;\n }\n\n res *= mult;\n for (let i = 0; i < node.children.length; ++i) {\n queue.push(node.children[i]);\n }\n }\n\n return res;\n }\n\n // Search for a Node with the given name ('text' property on the Node)\n // Returns 'null' if it cannot be found\n findNode(name: string): Node | null {\n if (this.root == null) {\n return null;\n }\n return this.root.findNode(name);\n }\n\n // Marks a Node as researched\n research(name: string): void {\n if (this.root == null) {\n return;\n }\n\n const queue: Node[] = [];\n queue.push(this.root);\n while (queue.length !== 0) {\n const node: Node | undefined = queue.shift();\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 }\n\n // Set the tree's Root Node\n setRoot(root: Node): void {\n this.root = root;\n }\n}\n","/**\n * How many stock market 'ticks' before a 'cycle' is triggered.\n * A 'tick' is whenver stock prices update\n */\nexport const TicksPerCycle = 75;\n","export const StanekConstants: {\n RAMBonus: number;\n BaseSize: number;\n MaxSize: number;\n} = {\n RAMBonus: 0.1,\n BaseSize: 9,\n MaxSize: 25\n};\n","// Function that returns the next Company Position in the \"ladder\"\n// i.e. the next position to get promoted to\nimport { CompanyPosition } from \"./CompanyPosition\";\nimport { CompanyPositions } from \"./CompanyPositions\";\n\nexport function getNextCompanyPositionHelper(currPos: CompanyPosition | null): CompanyPosition | null {\n if (currPos == null) {\n return null;\n }\n\n const nextPosName: string | null = currPos.nextPosition;\n if (nextPosName == null) {\n return null;\n }\n\n return CompanyPositions[nextPosName];\n}\n","/**\n * Game engine. Handles the main game loop.\n */\nimport { convertTimeMsToTimeElapsedString } from \"./utils/StringHelperFunctions\";\nimport { Augmentations } from \"./Augmentation/Augmentations\";\nimport { initAugmentations } from \"./Augmentation/AugmentationHelpers\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\nimport { initBitNodeMultipliers } from \"./BitNode/BitNode\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { generateRandomContract } from \"./CodingContractGenerator\";\nimport { initCompanies } from \"./Company/Companies\";\nimport { Corporation } from \"./Corporation/Corporation\";\nimport { CONSTANTS } from \"./Constants\";\nimport { Factions, initFactions } from \"./Faction/Factions\";\nimport { staneksGift } from \"./CotMG/Helper\";\nimport { processPassiveFactionRepGain, inviteToFaction } from \"./Faction/FactionHelpers\";\nimport { Router } from \"./ui/GameRoot\";\nimport { Page } from \"./ui/Router\";\nimport { SetupTextEditor } from \"./ScriptEditor/ui/ScriptEditorRoot\";\n\nimport {\n getHackingWorkRepGain,\n getFactionSecurityWorkRepGain,\n getFactionFieldWorkRepGain,\n} from \"./PersonObjects/formulas/reputation\";\nimport { hasHacknetServers, processHacknetEarnings } from \"./Hacknet/HacknetHelpers\";\nimport { iTutorialStart } from \"./InteractiveTutorial\";\nimport { checkForMessagesToSend, initMessages } from \"./Message/MessageHelpers\";\nimport { loadAllRunningScripts, updateOnlineScriptTimes } from \"./NetscriptWorker\";\nimport { Player } from \"./Player\";\nimport { saveObject, loadGame } from \"./SaveObject\";\nimport { initForeignServers } from \"./Server/AllServers\";\nimport { Settings } from \"./Settings/Settings\";\nimport { ThemeEvents } from \"./Themes/ui/Theme\";\nimport { updateSourceFileFlags } from \"./SourceFile/SourceFileFlags\";\nimport { initSymbolToStockMap, processStockPrices } from \"./StockMarket/StockMarket\";\nimport { Terminal } from \"./Terminal\";\nimport { Sleeve } from \"./PersonObjects/Sleeve/Sleeve\";\n\nimport { Money } from \"./ui/React/Money\";\nimport { Hashes } from \"./ui/React/Hashes\";\nimport { Reputation } from \"./ui/React/Reputation\";\n\nimport { AlertEvents } from \"./ui/React/AlertManager\";\nimport { exceptionAlert } from \"./utils/helpers/exceptionAlert\";\n\nimport { startExploits } from \"./Exploits/loops\";\nimport { calculateAchievements } from \"./Achievements/Achievements\";\n\nimport React from \"react\";\nimport { setupUncaughtPromiseHandler } from \"./UncaughtPromiseHandler\";\nimport { Button, Typography } from \"@mui/material\";\nimport { SnackbarEvents } from \"./ui/React/Snackbar\";\n\nconst Engine: {\n _lastUpdate: number;\n updateGame: (numCycles?: number) => void;\n Counters: {\n [key: string]: number | undefined;\n autoSaveCounter: number;\n updateSkillLevelsCounter: number;\n updateDisplays: number;\n updateDisplaysLong: number;\n updateActiveScriptsDisplay: number;\n createProgramNotifications: number;\n augmentationsNotifications: number;\n checkFactionInvitations: number;\n passiveFactionGrowth: number;\n messages: number;\n mechanicProcess: number;\n contractGeneration: number;\n achievementsCounter: number;\n };\n decrementAllCounters: (numCycles?: number) => void;\n checkCounters: () => void;\n load: (saveString: string) => void;\n start: () => void;\n} = {\n // Time variables (milliseconds unix epoch time)\n _lastUpdate: new Date().getTime(),\n\n updateGame: function (numCycles = 1) {\n const time = numCycles * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Terminal.process(Router, Player, numCycles);\n\n Player.process(Router, numCycles);\n\n // Update stock prices\n if (Player.hasWseAccount) {\n processStockPrices(numCycles);\n }\n\n // Gang, if applicable\n if (Player.inGang() && Player.gang !== null) {\n Player.gang.process(numCycles, Player);\n }\n\n // Staneks gift\n staneksGift.process(Player, numCycles);\n\n // Corporation\n if (Player.corporation instanceof Corporation) {\n // Stores cycles in a \"buffer\". Processed separately using Engine Counters\n Player.corporation.storeCycles(numCycles);\n }\n\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCycles);\n }\n\n // Sleeves\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCycles);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCycles, true);\n }\n }\n }\n\n // Counters\n Engine.decrementAllCounters(numCycles);\n Engine.checkCounters();\n\n // Update the running time of all active scripts\n updateOnlineScriptTimes(numCycles);\n\n // Hacknet Nodes\n processHacknetEarnings(Player, 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, // Processes certain mechanics (Corporation, Bladeburner)\n contractGeneration: 3000, // Generate Coding Contracts\n achievementsCounter: 60, // Check if we have new achievements\n },\n\n decrementAllCounters: function (numCycles = 1) {\n for (const counterName of Object.keys(Engine.Counters)) {\n const counter = Engine.Counters[counterName];\n if (counter === undefined) throw new Error(\"counter should not be undefined\");\n Engine.Counters[counterName] = counter - numCycles;\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.AutosaveInterval == null) {\n Settings.AutosaveInterval = 60;\n }\n if (Settings.AutosaveInterval === 0) {\n warnAutosaveDisabled();\n Engine.Counters.autoSaveCounter = 60 * 5; // Let's check back in a bit\n } else {\n Engine.Counters.autoSaveCounter = Settings.AutosaveInterval * 5;\n saveObject.saveGame(!Settings.SuppressSavedGameToast);\n }\n }\n\n if (Engine.Counters.checkFactionInvitations <= 0) {\n const invitedFactions = Player.checkForFactionInvitations();\n if (invitedFactions.length > 0) {\n const randFaction = invitedFactions[Math.floor(Math.random() * invitedFactions.length)];\n inviteToFaction(randFaction);\n }\n Engine.Counters.checkFactionInvitations = 100;\n }\n\n if (Engine.Counters.passiveFactionGrowth <= 0) {\n const adjustedCycles = Math.floor(5 - Engine.Counters.passiveFactionGrowth);\n processPassiveFactionRepGain(adjustedCycles);\n Engine.Counters.passiveFactionGrowth = 5;\n }\n\n if (Engine.Counters.messages <= 0) {\n checkForMessagesToSend();\n if (Augmentations[AugmentationNames.TheRedPill].owned) {\n Engine.Counters.messages = 4500; // 15 minutes for Red pill message\n } else {\n Engine.Counters.messages = 150;\n }\n }\n if (Player.corporation instanceof Corporation) {\n Player.corporation.process(Player);\n }\n if (Engine.Counters.mechanicProcess <= 0) {\n if (Player.bladeburner instanceof Bladeburner) {\n try {\n Player.bladeburner.process(Router, Player);\n } catch (e) {\n exceptionAlert(\"Exception caught in Bladeburner.process(): \" + e);\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 generateRandomContract();\n }\n Engine.Counters.contractGeneration = 3000;\n }\n\n if (Engine.Counters.achievementsCounter <= 0) {\n calculateAchievements();\n Engine.Counters.achievementsCounter = 300;\n }\n },\n\n load: function (saveString) {\n startExploits();\n setupUncaughtPromiseHandler();\n // Load game from save or create new game\n if (loadGame(saveString)) {\n ThemeEvents.emit();\n\n initBitNodeMultipliers(Player);\n updateSourceFileFlags(Player);\n initAugmentations(); // Also calls Player.reapplyAllAugmentations()\n Player.reapplyAllSourceFiles();\n if (Player.hasWseAccount) {\n initSymbolToStockMap();\n }\n\n // Apply penalty for entropy accumulation\n Player.applyEntropy(Player.entropy);\n\n // Calculate the number of cycles have elapsed while offline\n Engine._lastUpdate = new Date().getTime();\n const lastUpdate = Player.lastUpdate;\n const timeOffline = Engine._lastUpdate - lastUpdate;\n const numCyclesOffline = Math.floor(timeOffline / CONSTANTS._idleSpeed);\n\n // Generate coding contracts\n // let numContracts = 0;\n // if (numCyclesOffline < 3000 * 100) {\n // // if we have less than 100 rolls, just roll them exactly.\n // for (let i = 0; i < numCyclesOffline / 3000; i++) {\n // if (Math.random() < 0.25) numContracts++;\n // }\n // } else {\n // // just average it.\n // numContracts = (numCyclesOffline / 3000) * 0.25;\n // }\n // console.log(`${numCyclesOffline} ${numContracts}`);\n // for (let i = 0; i < numContracts; i++) {\n // generateRandomContract();\n // }\n\n let offlineReputation = 0;\n const offlineHackingIncome = (Player.moneySourceA.hacking / Player.playtimeSinceLastAug) * timeOffline * 0.75;\n Player.gainMoney(offlineHackingIncome, \"hacking\");\n // Process offline progress\n loadAllRunningScripts(Player); // This also takes care of offline production for those scripts\n if (Player.isWorking) {\n Player.focus = true;\n if (Player.workType == CONSTANTS.WorkTypeFaction) {\n Player.workForFaction(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCreateProgram) {\n Player.createProgramWork(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeStudyClass) {\n Player.takeClass(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCrime) {\n Player.commitCrime(numCyclesOffline);\n } else if (Player.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n Player.workPartTime(numCyclesOffline);\n } else if (Player.workType === CONSTANTS.WorkTypeGraftAugmentation) {\n Player.graftAugmentationWork(numCyclesOffline);\n } else {\n Player.work(numCyclesOffline);\n }\n } else {\n for (let i = 0; i < Player.factions.length; i++) {\n const facName = Player.factions[i];\n if (!Factions.hasOwnProperty(facName)) continue;\n const faction = Factions[facName];\n if (!faction.isMember) continue;\n // No rep for special factions.\n const info = faction.getInfo();\n if (!info.offersWork()) continue;\n // No rep for gangs.\n if (Player.getGangName() === facName) continue;\n\n const hRep = getHackingWorkRepGain(Player, faction);\n const sRep = getFactionSecurityWorkRepGain(Player, faction);\n const fRep = getFactionFieldWorkRepGain(Player, faction);\n // can be infinite, doesn't matter.\n const reputationRate = Math.max(hRep, sRep, fRep) / Player.factions.length;\n\n const rep = reputationRate * numCyclesOffline;\n faction.playerReputation += rep;\n offlineReputation += rep;\n }\n }\n\n // Hacknet Nodes offline progress\n const offlineProductionFromHacknetNodes = processHacknetEarnings(Player, numCyclesOffline);\n const hacknetProdInfo = hasHacknetServers(Player) ? (\n <>\n hashes\n \n ) : (\n \n );\n\n // Passive faction rep gain offline\n processPassiveFactionRepGain(numCyclesOffline);\n\n // Stock Market offline progress\n if (Player.hasWseAccount) {\n processStockPrices(numCyclesOffline);\n }\n\n // Gang progress for BitNode 2\n const gang = Player.gang;\n if (Player.inGang() && gang !== null) {\n gang.process(numCyclesOffline, Player);\n }\n\n // Corporation offline progress\n if (Player.corporation instanceof Corporation) {\n Player.corporation.storeCycles(numCyclesOffline);\n }\n\n // Bladeburner offline progress\n if (Player.bladeburner instanceof Bladeburner) {\n Player.bladeburner.storeCycles(numCyclesOffline);\n }\n\n staneksGift.process(Player, numCyclesOffline);\n\n // Sleeves offline progress\n for (let i = 0; i < Player.sleeves.length; ++i) {\n if (Player.sleeves[i] instanceof Sleeve) {\n const expForOtherSleeves = Player.sleeves[i].process(Player, numCyclesOffline);\n\n // This sleeve earns experience for other sleeves\n if (expForOtherSleeves == null) {\n continue;\n }\n for (let j = 0; j < Player.sleeves.length; ++j) {\n if (j === i) {\n continue;\n }\n Player.sleeves[j].gainExperience(Player, expForOtherSleeves, numCyclesOffline, true);\n }\n }\n }\n\n // Update total playtime\n const time = numCyclesOffline * CONSTANTS._idleSpeed;\n if (Player.totalPlaytime == null) {\n Player.totalPlaytime = 0;\n }\n if (Player.playtimeSinceLastAug == null) {\n Player.playtimeSinceLastAug = 0;\n }\n if (Player.playtimeSinceLastBitnode == null) {\n Player.playtimeSinceLastBitnode = 0;\n }\n Player.totalPlaytime += time;\n Player.playtimeSinceLastAug += time;\n Player.playtimeSinceLastBitnode += time;\n\n Player.lastUpdate = Engine._lastUpdate;\n Engine.start(); // Run main game loop and Scripts loop\n const timeOfflineString = convertTimeMsToTimeElapsedString(time);\n setTimeout(\n () =>\n AlertEvents.emit(\n <>\n Offline for {timeOfflineString}. While you were offline:\n
      \n
    • \n \n Your scripts generated \n \n
    • \n
    • \n Your Hacknet Nodes generated {hacknetProdInfo}\n
    • \n
    • \n \n You gained reputation divided amongst your factions\n \n
    • \n
    \n ,\n ),\n 250,\n );\n } else {\n // No save found, start new game\n initBitNodeMultipliers(Player);\n Engine.start(); // Run main game loop and Scripts loop\n Player.init();\n initForeignServers(Player.getHomeComputer());\n initCompanies();\n initFactions();\n initAugmentations();\n initMessages();\n updateSourceFileFlags(Player);\n\n // Start interactive tutorial\n iTutorialStart();\n }\n SetupTextEditor();\n },\n\n start: function () {\n // Get time difference\n const _thisUpdate = new Date().getTime();\n let diff = _thisUpdate - Engine._lastUpdate;\n const offset = diff % CONSTANTS._idleSpeed;\n\n // Divide this by cycle time to determine how many cycles have elapsed since last update\n diff = Math.floor(diff / CONSTANTS._idleSpeed);\n\n if (diff > 0) {\n // Update the game engine by the calculated number of cycles\n Engine._lastUpdate = _thisUpdate - offset;\n Player.lastUpdate = _thisUpdate - offset;\n Engine.updateGame(diff);\n }\n window.requestAnimationFrame(Engine.start);\n },\n};\n\n/**\n * Shows a toast warning that lets the player know that auto-saves are disabled, with an button to re-enable them.\n */\nfunction warnAutosaveDisabled(): void {\n // If the player has suppressed those warnings let's just exit right away.\n if (Settings.SuppressAutosaveDisabledWarnings) return;\n\n // We don't want this warning to show up on certain pages.\n // When in recovery or importing we want to keep autosave disabled.\n const ignoredPages = [Page.Recovery, Page.ImportSave];\n if (ignoredPages.includes(Router.page())) return;\n\n const warningToast = (\n <>\n Auto-saves are disabled!\n {\n // We reset the value to a default\n Settings.AutosaveInterval = 60;\n }}\n >\n Enable\n \n \n );\n SnackbarEvents.emit(warningToast, \"warning\", 5000);\n}\n\nexport { Engine };\n","export { Theme as Default } from \"./default\";\nexport { Theme as DefaultLite } from \"./default-lite\";\nexport { Theme as Monokai } from \"./monokai-ish\";\nexport { Theme as Warmer } from \"./warmer\";\nexport { Theme as DarkPlus } from \"./dark-plus\";\nexport { Theme as MayukaiDark } from \"./mayukai-dark\";\nexport { Theme as Purple } from \"./purple\";\nexport { Theme as SmoothGreen } from \"./smooth-green\";\nexport { Theme as Dracula } from \"./dracula\";\nexport { Theme as DarkBlue } from \"./dark-blue\";\nexport { Theme as DiscordLike } from \"./discord-like\";\nexport { Theme as OneDark } from \"./one-dark\";\nexport { Theme as MutedGoldBlue } from \"./muted-gold-blue\";\nexport { Theme as Light } from \"./light\";\n","import React, { useState, useEffect } from \"react\";\nimport CircularProgress from \"@mui/material/CircularProgress\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Box from \"@mui/material/Box\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport { Terminal } from \"../Terminal\";\nimport { load } from \"../db\";\nimport { Player } from \"../Player\";\nimport { Engine } from \"../engine\";\nimport { GameRoot } from \"./GameRoot\";\n\nimport { CONSTANTS } from \"../Constants\";\nimport { ActivateRecoveryMode } from \"./React/RecoveryRoot\";\nimport { hash } from \"../hash/hash\";\nimport { pushGameReady } from \"../Electron\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n backgroundColor: theme.colors.backgroundprimary,\n },\n }),\n);\n\nexport function LoadingScreen(): React.ReactElement {\n const classes = useStyles();\n const [show, setShow] = useState(false);\n const [loaded, setLoaded] = useState(false);\n\n const version = `v${CONSTANTS.VersionString} (${hash()})`;\n if (process.env.NODE_ENV === \"development\") {\n document.title = `[dev] Bitburner ${version}`;\n } else {\n document.title = `Bitburner ${version}`;\n }\n\n useEffect(() => {\n const id = setTimeout(() => {\n if (!loaded) setShow(true);\n }, 2000);\n return () => clearTimeout(id);\n });\n\n useEffect(() => {\n async function doLoad(): Promise {\n await load()\n .then((saveString) => {\n try {\n Engine.load(saveString);\n } catch (err: any) {\n ActivateRecoveryMode();\n setLoaded(true);\n throw err;\n }\n\n pushGameReady();\n setLoaded(true);\n })\n .catch((reason) => {\n console.error(reason);\n Engine.load(\"\");\n setLoaded(true);\n });\n }\n doLoad();\n }, []);\n\n return (\n \n {loaded ? (\n \n ) : (\n \n \n \n \n \n Loading Bitburner {version}\n \n {show && (\n \n \n If the game fails to load, consider killing all scripts\n \n \n )}\n \n )}\n \n );\n}\n","/**\n * Augmentation-related methods for the Player class (PlayerObject)\n */\nimport { IPlayer } from \"../IPlayer\";\n\nimport { Augmentation } from \"../../Augmentation/Augmentation\";\n\nimport { calculateEntropy } from \"../Grafting/EntropyAccumulation\";\n\nexport function hasAugmentation(this: IPlayer, aug: string | Augmentation, installed = false): boolean {\n const augName: string = aug instanceof Augmentation ? aug.name : aug;\n\n for (const owned of this.augmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n\n if (!installed) {\n for (const owned of this.queuedAugmentations) {\n if (owned.name === augName) {\n return true;\n }\n }\n }\n\n return false;\n}\n\nexport function applyEntropy(this: IPlayer, stacks = 1): void {\n // Re-apply all multipliers\n this.reapplyAllAugmentations();\n this.reapplyAllSourceFiles();\n\n const newMultipliers = calculateEntropy(this, stacks);\n for (const [mult, val] of Object.entries(newMultipliers)) {\n this.setMult(mult, val);\n }\n}\n","/**\n * Checks that a variable is a valid number. A valid number\n * must be a \"number\" type and cannot be NaN\n */\nexport function isValidNumber(n: number): boolean {\n return typeof n === \"number\" && !isNaN(n);\n}\n","/**\n * Represents a Limit or Buy Order on the stock market. Does not represent\n * a Market Order since those are just executed immediately\n */\nimport { OrderTypes } from \"./data/OrderTypes\";\nimport { PositionTypes } from \"./data/PositionTypes\";\n\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport class Order {\n readonly pos: PositionTypes;\n readonly price: number;\n shares: number;\n readonly stockSymbol: string;\n readonly type: OrderTypes;\n\n constructor(\n stockSymbol = \"\",\n shares = 0,\n price = 0,\n typ: OrderTypes = OrderTypes.LimitBuy,\n pos: PositionTypes = PositionTypes.Long,\n ) {\n // Validate arguments\n let invalidArgs = false;\n if (typeof shares !== \"number\" || typeof price !== \"number\") {\n invalidArgs = true;\n }\n if (isNaN(shares) || isNaN(price)) {\n invalidArgs = true;\n }\n if (typeof stockSymbol !== \"string\") {\n invalidArgs = true;\n }\n if (invalidArgs) {\n throw new Error(`Invalid constructor paramters for Order`);\n }\n\n this.stockSymbol = stockSymbol;\n this.shares = shares;\n this.price = price;\n this.type = typ;\n this.pos = pos;\n }\n\n /**\n * Serialize the Order to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Order\", this);\n }\n\n /**\n * Initializes a Order from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Order {\n return Generic_fromJSON(Order, value.data);\n }\n}\n\nReviver.constructors.Order = Order;\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { Fragment } from \"./Fragment\";\nimport { ActiveFragment } from \"./ActiveFragment\";\nimport { FragmentType } from \"./FragmentType\";\nimport { IStaneksGift } from \"./IStaneksGift\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { CalculateEffect } from \"./formulas/effect\";\nimport { StaneksGiftEvents } from \"./StaneksGiftEvents\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { CONSTANTS } from \"../Constants\";\nimport { StanekConstants } from \"./data/Constants\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Player } from \"../Player\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport class StaneksGift implements IStaneksGift {\n storedCycles = 0;\n fragments: ActiveFragment[] = [];\n\n baseSize(): number {\n return StanekConstants.BaseSize + BitNodeMultipliers.StaneksGiftExtraSize + Player.sourceFileLvl(13);\n }\n\n width(): number {\n return Math.max(2, Math.min(Math.floor(this.baseSize() / 2 + 1), StanekConstants.MaxSize));\n }\n height(): number {\n return Math.max(3, Math.min(Math.floor(this.baseSize() / 2 + 0.6), StanekConstants.MaxSize));\n }\n\n charge(player: IPlayer, af: ActiveFragment, threads: number): void {\n if (threads > af.highestCharge) {\n af.numCharge = (af.highestCharge * af.numCharge) / threads + 1;\n af.highestCharge = threads;\n } else {\n af.numCharge += threads / af.highestCharge;\n }\n\n const cotmg = Factions[FactionNames.ChurchOfTheMachineGod];\n cotmg.playerReputation += (player.faction_rep_mult * (Math.pow(threads, 0.95) * (cotmg.favor + 100))) / 1000;\n }\n\n inBonus(): boolean {\n return (this.storedCycles * CONSTANTS._idleSpeed) / 1000 > 1;\n }\n\n process(p: IPlayer, numCycles = 1): void {\n if (!p.hasAugmentation(AugmentationNames.StaneksGift1)) return;\n this.storedCycles += numCycles;\n this.storedCycles -= 10;\n this.storedCycles = Math.max(0, this.storedCycles);\n this.updateMults(p);\n StaneksGiftEvents.emit();\n }\n\n effect(fragment: ActiveFragment): number {\n // Find all the neighbooring cells\n const cells = fragment.neighboors();\n // find the neighbooring active fragments.\n const maybeFragments = cells.map((n) => this.fragmentAt(n[0], n[1]));\n\n // Filter out undefined with typescript \"Type guard\". Whatever\n let neighboors = maybeFragments.filter((v: ActiveFragment | undefined): v is ActiveFragment => !!v);\n\n neighboors = neighboors.filter((fragment) => fragment.fragment().type === FragmentType.Booster);\n let boost = 1;\n\n neighboors = neighboors.filter((v, i, s) => s.indexOf(v) === i);\n for (const neighboor of neighboors) {\n boost *= neighboor.fragment().power;\n }\n return CalculateEffect(fragment.highestCharge, fragment.numCharge, fragment.fragment().power, boost);\n }\n\n canPlace(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (rootX < 0 || rootY < 0) return false;\n if (rootX + fragment.width(rotation) > this.width()) return false;\n if (rootY + fragment.height(rotation) > this.height()) return false;\n if (this.count(fragment) >= fragment.limit) return false;\n const newFrag = new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment });\n for (const aFrag of this.fragments) {\n if (aFrag.collide(newFrag)) return false;\n }\n return true;\n }\n\n place(rootX: number, rootY: number, rotation: number, fragment: Fragment): boolean {\n if (!this.canPlace(rootX, rootY, rotation, fragment)) return false;\n this.fragments.push(new ActiveFragment({ x: rootX, y: rootY, rotation: rotation, fragment: fragment }));\n return true;\n }\n\n findFragment(rootX: number, rootY: number): ActiveFragment | undefined {\n return this.fragments.find((f) => f.x === rootX && f.y === rootY);\n }\n\n fragmentAt(worldX: number, worldY: number): ActiveFragment | undefined {\n for (const aFrag of this.fragments) {\n if (aFrag.fullAt(worldX, worldY)) {\n return aFrag;\n }\n }\n\n return undefined;\n }\n\n count(fragment: Fragment): number {\n let amt = 0;\n for (const aFrag of this.fragments) {\n if (aFrag.fragment().id === fragment.id) amt++;\n }\n return amt;\n }\n\n delete(rootX: number, rootY: number): boolean {\n for (let i = 0; i < this.fragments.length; i++) {\n if (this.fragments[i].x === rootX && this.fragments[i].y === rootY) {\n this.fragments.splice(i, 1);\n return true;\n }\n }\n\n return false;\n }\n\n clear(): void {\n this.fragments = [];\n }\n\n clearCharge(): void {\n this.fragments.forEach((f) => {\n f.highestCharge = 0;\n f.numCharge = 0;\n });\n }\n\n updateMults(p: IPlayer): void {\n p.reapplyAllAugmentations(true);\n p.reapplyAllSourceFiles();\n\n for (const aFrag of this.fragments) {\n const fragment = aFrag.fragment();\n\n const power = this.effect(aFrag);\n switch (fragment.type) {\n case FragmentType.HackingChance:\n p.hacking_chance_mult *= power;\n break;\n case FragmentType.HackingSpeed:\n p.hacking_speed_mult *= power;\n break;\n case FragmentType.HackingMoney:\n p.hacking_money_mult *= power;\n break;\n case FragmentType.HackingGrow:\n p.hacking_grow_mult *= power;\n break;\n case FragmentType.Hacking:\n p.hacking_mult *= power;\n p.hacking_exp_mult *= power;\n break;\n case FragmentType.Strength:\n p.strength_mult *= power;\n p.strength_exp_mult *= power;\n break;\n case FragmentType.Defense:\n p.defense_mult *= power;\n p.defense_exp_mult *= power;\n break;\n case FragmentType.Dexterity:\n p.dexterity_mult *= power;\n p.dexterity_exp_mult *= power;\n break;\n case FragmentType.Agility:\n p.agility_mult *= power;\n p.agility_exp_mult *= power;\n break;\n case FragmentType.Charisma:\n p.charisma_mult *= power;\n p.charisma_exp_mult *= power;\n break;\n case FragmentType.HacknetMoney:\n p.hacknet_node_money_mult *= power;\n break;\n case FragmentType.HacknetCost:\n p.hacknet_node_purchase_cost_mult /= power;\n p.hacknet_node_ram_cost_mult /= power;\n p.hacknet_node_core_cost_mult /= power;\n p.hacknet_node_level_cost_mult /= power;\n break;\n case FragmentType.Rep:\n p.company_rep_mult *= power;\n p.faction_rep_mult *= power;\n break;\n case FragmentType.WorkMoney:\n p.work_money_mult *= power;\n break;\n case FragmentType.Crime:\n p.crime_success_mult *= power;\n p.crime_money_mult *= power;\n break;\n case FragmentType.Bladeburner:\n p.bladeburner_max_stamina_mult *= power;\n p.bladeburner_stamina_gain_mult *= power;\n p.bladeburner_analysis_mult *= power;\n p.bladeburner_success_chance_mult *= power;\n break;\n }\n }\n p.updateSkillLevels();\n }\n\n prestigeAugmentation(): void {\n this.clearCharge();\n }\n\n prestigeSourceFile(): void {\n this.clear();\n this.storedCycles = 0;\n }\n\n /**\n * Serialize Staneks Gift to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"StaneksGift\", this);\n }\n\n /**\n * Initializes Staneks Gift from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): StaneksGift {\n return Generic_fromJSON(StaneksGift, value.data);\n }\n}\n\nReviver.constructors.StaneksGift = StaneksGift;\n","import { Fragment, FragmentById } from \"./Fragment\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\nexport interface IActiveFragmentParams {\n x: number;\n y: number;\n rotation: number;\n fragment: Fragment;\n}\n\nexport class ActiveFragment {\n id: number;\n highestCharge: number;\n numCharge: number;\n rotation: number;\n x: number;\n y: number;\n\n constructor(params?: IActiveFragmentParams) {\n if (params) {\n this.id = params.fragment.id;\n this.x = params.x;\n this.y = params.y;\n this.highestCharge = 0;\n this.numCharge = 0;\n this.rotation = params.rotation;\n } else {\n this.id = -1;\n this.x = -1;\n this.y = -1;\n this.highestCharge = -1;\n this.numCharge = -1;\n this.rotation = -1;\n }\n }\n\n collide(other: ActiveFragment): boolean {\n const thisFragment = this.fragment();\n const otherFragment = other.fragment();\n // These 2 variables converts 'this' local coordinates to world to other local.\n const dx: number = other.x - this.x;\n const dy: number = other.y - this.y;\n for (let j = 0; j < thisFragment.shape.length; j++) {\n for (let i = 0; i < thisFragment.shape[j].length; i++) {\n if (thisFragment.fullAt(i, j, this.rotation) && otherFragment.fullAt(i - dx, j - dy, other.rotation))\n return true;\n }\n }\n\n return false;\n }\n\n fragment(): Fragment {\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n return fragment;\n }\n\n fullAt(worldX: number, worldY: number): boolean {\n return this.fragment().fullAt(worldX - this.x, worldY - this.y, this.rotation);\n }\n\n neighboors(): number[][] {\n return this.fragment()\n .neighboors(this.rotation)\n .map((cell) => [this.x + cell[0], this.y + cell[1]]);\n }\n\n copy(): ActiveFragment {\n // We have to do a round trip because the constructor.\n const fragment = FragmentById(this.id);\n if (fragment === null) throw new Error(\"ActiveFragment id refers to unknown Fragment.\");\n const c = new ActiveFragment({ x: this.x, y: this.y, rotation: this.rotation, fragment: fragment });\n c.highestCharge = this.highestCharge;\n c.numCharge = this.numCharge;\n return c;\n }\n\n /**\n * Serialize an active fragment to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"ActiveFragment\", this);\n }\n\n /**\n * Initializes an acive fragment from a JSON save state\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): ActiveFragment {\n return Generic_fromJSON(ActiveFragment, value.data);\n }\n}\n\nReviver.constructors.ActiveFragment = ActiveFragment;\n","/**\n * Class representing a visitable location in the world\n */\nimport { CityName } from \"./data/CityNames\";\nimport { LocationName } from \"./data/LocationNames\";\nimport { LocationType } from \"./LocationTypeEnum\";\n\ninterface IInfiltrationMetadata {\n maxClearanceLevel: number;\n startingSecurityLevel: number;\n}\n\nexport interface IConstructorParams {\n city?: CityName | null;\n costMult?: number;\n expMult?: number;\n infiltrationData?: IInfiltrationMetadata;\n name?: LocationName;\n types?: LocationType[];\n techVendorMaxRam?: number;\n techVendorMinRam?: number;\n}\n\nexport class Location {\n /**\n * Name of city this location is in. If this property is null, it means this i\n * is a generic location that is available in all cities\n */\n city: CityName | null = null;\n\n /**\n * Cost multiplier that influences how expensive a gym/university is\n */\n costMult = 0;\n\n /**\n * Exp multiplier that influences how effective a gym/university is\n */\n expMult = 0;\n\n /**\n * Companies can be infiltrated. This contains the data required for that\n * infiltration event\n */\n infiltrationData?: IInfiltrationMetadata;\n\n /**\n * Identifier for location\n */\n name: LocationName = LocationName.Void;\n\n /**\n * List of what type(s) this location is. A location can be multiple types\n * (e.g. company and tech vendor)\n */\n types: LocationType[] = [];\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMaxRam = 0;\n\n /**\n * Tech vendors allow you to purchase servers.\n * This property defines the max RAM server you can purchase from this vendor\n */\n techVendorMinRam = 0;\n\n constructor(p: IConstructorParams) {\n if (p.city) {\n this.city = p.city;\n }\n if (p.costMult) {\n this.costMult = p.costMult;\n }\n if (p.expMult) {\n this.expMult = p.expMult;\n }\n if (p.infiltrationData) {\n this.infiltrationData = p.infiltrationData;\n }\n if (p.name) {\n this.name = p.name;\n }\n if (p.types) {\n this.types = p.types;\n }\n if (p.techVendorMaxRam) {\n this.techVendorMaxRam = p.techVendorMaxRam;\n }\n if (p.techVendorMinRam) {\n this.techVendorMinRam = p.techVendorMinRam;\n }\n }\n}\n","import React from \"react\";\n\nimport {\n Typography,\n Table,\n TableBody,\n TableCell,\n TableRow,\n} from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { StatsRow } from \"../../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../../ui/React/CharacterOverview\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { MoneyRate } from \"../../../ui/React/MoneyRate\";\nimport { ReputationRate } from \"../../../ui/React/ReputationRate\";\nimport { use } from \"../../../ui/Context\";\n\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\n\ninterface IProps {\n sleeve: Sleeve;\n}\n\nexport function StatsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n\n return (\n \n \n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n \n \n \n
    \n
    \n )\n}\n\nexport function EarningsElement(props: IProps): React.ReactElement {\n const classes = useStyles();\n const player = use.Player();\n\n let data: any[][] = [];\n if (props.sleeve.currentTask === SleeveTaskType.Crime) {\n data = [\n [`Money`, <> (on success)],\n [`Hacking Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.hack)} (2x on success)`],\n [`Strength Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.str)} (2x on success)`],\n [`Defense Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.def)} (2x on success)`],\n [`Dexterity Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.dex)} (2x on success)`],\n [`Agility Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.agi)} (2x on success)`],\n [`Charisma Exp`, `${numeralWrapper.formatExp(props.sleeve.gainRatesForTask.cha)} (2x on success)`],\n ];\n } else {\n data = [\n [`Money:`, ],\n [`Hacking Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.hack)} / sec`],\n [`Strength Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.str)} / sec`],\n [`Defense Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.def)} / sec`],\n [`Dexterity Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.dex)} / sec`],\n [`Agility Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.agi)} / sec`],\n [`Charisma Exp:`, `${numeralWrapper.formatExp(5 * props.sleeve.gainRatesForTask.cha)} / sec`],\n ];\n if (props.sleeve.currentTask === SleeveTaskType.Company || props.sleeve.currentTask === SleeveTaskType.Faction) {\n const repGain: number = props.sleeve.getRepGain(player);\n data.push([`Reputation:`, ]);\n }\n }\n\n return (\n \n \n \n \n \n Earnings\n \n \n \n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n \n
    \n )\n}\n","/**\n * Creates a dropdown (select HTML element) with server hostnames as options\n *\n * Configurable to only contain certain types of servers\n */\nimport React from \"react\";\nimport { GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\n// TODO make this an enum when this gets converted to TypeScript\nexport const ServerType = {\n All: 0,\n Foreign: 1, // Hackable, non-owned servers\n Owned: 2, // Home Computer, Purchased Servers, and Hacknet Servers\n Purchased: 3, // Everything from Owned except home computer\n};\n\ninterface IProps {\n purchase: () => void;\n canPurchase: boolean;\n serverType: number;\n onChange: (event: SelectChangeEvent) => void;\n value: string;\n}\n\nexport function ServerDropdown(props: IProps): React.ReactElement {\n /**\n * Checks if the server should be shown in the dropdown menu, based on the\n * 'serverType' property\n */\n function isValidServer(s: BaseServer): boolean {\n const purchased = s instanceof Server && s.purchasedByPlayer;\n const type = props.serverType;\n switch (type) {\n case ServerType.All:\n return true;\n case ServerType.Foreign:\n return s.hostname !== \"home\" && !purchased;\n case ServerType.Owned:\n return purchased || s instanceof HacknetServer || s.hostname === \"home\";\n case ServerType.Purchased:\n return purchased || s instanceof HacknetServer;\n default:\n console.warn(`Invalid ServerType specified for ServerDropdown component: ${type}`);\n return false;\n }\n }\n\n const servers = [];\n for (const server of GetAllServers().sort((a, b) => a.hostname.localeCompare(b.hostname))) {\n if (isValidServer(server)) {\n servers.push(\n \n {server.hostname}\n ,\n );\n }\n }\n\n return (\n \n Buy\n \n }\n sx={{ mx: 1 }}\n value={props.value}\n onChange={props.onChange}\n >\n {servers}\n \n );\n}\n","import * as React from \"react\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Money } from \"../ui/React/Money\";\nimport { Game, reachedLimit } from \"./Game\";\nimport { Deck } from \"./CardDeck/Deck\";\nimport { Hand } from \"./CardDeck/Hand\";\nimport { InputAdornment } from \"@mui/material\";\nimport { ReactCard } from \"./CardDeck/ReactCard\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\n\nconst MAX_BET = 100e6;\nexport const DECK_COUNT = 5; // 5-deck multideck\n\nenum Result {\n Pending = \"\",\n PlayerWon = \"You won!\",\n PlayerWonByBlackjack = \"You Won! Blackjack!\",\n DealerWon = \"You lost!\",\n Tie = \"Push! (Tie)\",\n}\n\ntype Props = {\n p: IPlayer;\n};\n\ntype State = {\n playerHand: Hand;\n dealerHand: Hand;\n bet: number;\n betInput: string;\n gameInProgress: boolean;\n result: Result;\n gains: number; // Track gains only for this session\n wagerInvalid: boolean;\n wagerInvalidHelperText: string;\n};\n\nexport class Blackjack extends Game {\n deck: Deck;\n\n constructor(props: Props) {\n super(props);\n\n this.deck = new Deck(DECK_COUNT);\n\n const initialBet = 1e6;\n\n this.state = {\n playerHand: new Hand([]),\n dealerHand: new Hand([]),\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 canStartGame = (): boolean => {\n const { p } = this.props;\n const { bet } = this.state;\n\n return p.canAfford(bet);\n };\n\n startGame = (): void => {\n if (!this.canStartGame() || reachedLimit(this.props.p)) {\n return;\n }\n\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) TODO: Save/Restore the RNG state to limit the value of save-scumming.\n this.props.p.loseMoney(this.state.bet, \"casino\");\n\n const playerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n const dealerHand = new Hand([this.deck.safeDrawCard(), this.deck.safeDrawCard()]);\n\n this.setState({\n playerHand,\n dealerHand,\n gameInProgress: true,\n result: Result.Pending,\n });\n\n // If the player is dealt a blackjack and the dealer is not, then the player\n // immediately wins\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 // Returns an array of numbers representing all possible values of the given Hand. The reason it needs to be\n // an array is because an Ace can count as both 1 and 11.\n getHandValue = (hand: Hand): number[] => {\n let result: number[] = [0];\n\n for (let i = 0; i < hand.cards.length; ++i) {\n const value = hand.cards[i].value;\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 // Returns the single hand value used for determine things like victory and whether or not\n // the dealer has to hit. Essentially this uses the biggest value that's 21 or under. If no such value exists,\n // then it means the hand is busted and we can just return whatever\n getTrueHandValue = (hand: Hand): number => {\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 // Returns all hand values that are 21 or under. If no values are 21 or under, then the first value is returned.\n getHandDisplayValues = (hand: Hand): number[] => {\n const handValues = this.getHandValue(hand);\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 isHandBusted = (hand: Hand): boolean => {\n return this.getTrueHandValue(hand) > 21;\n };\n\n playerHit = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\n const newHand = this.state.playerHand.addCards(this.deck.safeDrawCard());\n\n this.setState({\n playerHand: newHand,\n });\n\n // Check if player busted, and finish the game if so\n if (this.isHandBusted(newHand)) {\n this.finishGame(Result.DealerWon);\n }\n };\n\n playerStay = (event: React.MouseEvent): void => {\n if (!event.isTrusted) {\n return;\n }\n\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 let newDealerHand = this.state.dealerHand;\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 });\n\n // If dealer has busted, then player wins\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);\n\n // We expect nobody to have busted. If someone busted, there is an error\n // in our game logic\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 finishGame = (result: Result): void => {\n const gains =\n result === Result.DealerWon\n ? 0 // We took away the bet at the start, don't need to take more\n : result === Result.Tie\n ? this.state.bet // We took away the bet at the start, give it back\n : result === Result.PlayerWon\n ? 2 * this.state.bet // Give back their bet plus their winnings\n : result === Result.PlayerWonByBlackjack\n ? 2.5 * this.state.bet // Blackjack pays out 1.5x bet!\n : (() => {\n throw new Error(`Unexpected result: ${result}`);\n })(); // This can't happen, right?\n this.win(this.props.p, gains);\n this.setState({\n gameInProgress: false,\n result,\n gains: this.state.gains + gains - this.state.bet, // Not updated upfront - only tracks the final outcome\n });\n };\n\n wagerOnChange = (event: React.ChangeEvent): void => {\n const { p } = this.props;\n const betInput = event.target.value;\n const wager = Math.round(parseFloat(betInput));\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 // Start game button\n startOnClick = (event: React.MouseEvent): void => {\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 render(): React.ReactNode {\n const { betInput, playerHand, dealerHand, gameInProgress, result, wagerInvalid, wagerInvalidHelperText, gains } =\n this.state;\n\n // Get the player totals to display.\n const playerHandValues = this.getHandDisplayValues(playerHand);\n const dealerHandValues = this.getHandDisplayValues(dealerHand);\n\n return (\n <>\n {/* Wager input */}\n \n \n {\"Wager (Max: \"}\n \n {\")\"}\n \n }\n disabled={gameInProgress}\n onChange={this.wagerOnChange}\n error={wagerInvalid}\n helperText={wagerInvalid ? wagerInvalidHelperText : \"\"}\n type=\"number\"\n style={{\n width: \"200px\",\n }}\n InputProps={{\n startAdornment: (\n \n $\n \n ),\n }}\n />\n\n \n {\"Total earnings this session: \"}\n \n \n \n\n {/* Buttons */}\n {!gameInProgress ? (\n \n ) : (\n <>\n \n \n \n )}\n\n {/* Main game part. Displays both if the game is in progress OR if there's a result so you can see\n * the cards that led to that result. */}\n {(gameInProgress || result !== Result.Pending) && (\n <>\n \n \n Player\n {playerHand.cards.map((card, i) => (\n \n ))}\n\n \n Count:{\" \"}\n {playerHandValues\n .map((value, i) => {value})\n .reduce((prev, curr) => [prev, \" or \", curr])}\n \n \n \n\n
    \n\n \n \n Dealer\n {dealerHand.cards.map((card, i) => (\n // Hide every card except the first while game is in progress\n \n \n \n )}\n\n {/* Results from previous round */}\n {result !== Result.Pending && (\n \n {result} \n {result === Result.PlayerWon && }\n {result === Result.PlayerWonByBlackjack && }\n {result === Result.DealerWon && }\n \n )}\n \n );\n }\n}\n","import React, { FC } from \"react\";\nimport { Card, Suit } from \"./Card\";\n\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Paper from \"@mui/material/Paper\";\n\ntype Props = {\n card: Card;\n hidden?: boolean;\n};\n\nconst useStyles = makeStyles(() =>\n createStyles({\n card: {\n padding: \"10px\",\n border: \"solid 1px #808080\",\n backgroundColor: \"white\",\n display: \"inline-block\",\n borderRadius: \"10px\",\n fontSize: \"18.5px\",\n textAlign: \"center\",\n margin: \"3px\",\n fontWeight: \"bold\",\n },\n red: {\n color: \"red\",\n },\n\n black: {\n color: \"black\",\n },\n value: {\n fontSize: \"20px\",\n fontFamily: \"sans-serif\",\n },\n }),\n);\n\nexport const ReactCard: FC = ({ card, hidden }) => {\n const classes = useStyles();\n let suit: React.ReactNode;\n switch (card.suit) {\n case Suit.Clubs:\n suit = ;\n break;\n case Suit.Diamonds:\n suit = ;\n break;\n case Suit.Hearts:\n suit = ;\n break;\n case Suit.Spades:\n suit = ;\n break;\n default:\n throw new Error(`MissingCaseException: ${card.suit}`);\n }\n return (\n \n <>\n {hidden ? \" - \" : card.formatValue()}\n {hidden ? \" - \" : suit}\n \n \n );\n};\n","import { Milestone } from \"./Milestone\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { GetServer } from \"../Server/AllServers\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\nfunction allFactionAugs(p: IPlayer, f: Faction): boolean {\n const factionAugs = f.augmentations.slice().filter((aug) => aug !== \"NeuroFlux Governor\");\n for (const factionAug of factionAugs) {\n if (\n !p.augmentations.some((aug) => {\n return aug.name == factionAug;\n })\n )\n return false;\n }\n return true;\n}\n\nexport const Milestones: Milestone[] = [\n {\n title: \"Gain root access on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"hasAdminRights\")) return false;\n return (server as any).hasAdminRights;\n },\n },\n {\n title: \"Install the backdoor on CSEC\",\n fulfilled: (): boolean => {\n const server = GetServer(\"CSEC\");\n if (!server || !server.hasOwnProperty(\"backdoorInstalled\")) return false;\n return (server as any).backdoorInstalled;\n },\n },\n {\n title: \"Join the faction hinted at in csec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.CyberSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.CyberSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.CyberSec]);\n },\n },\n {\n title: \"Join the faction hinted at in nitesec-test.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.NiteSec);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.NiteSec}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.NiteSec]);\n },\n },\n {\n title: \"Join the faction hinted at in j3.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.TheBlackHand);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.TheBlackHand}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.TheBlackHand]);\n },\n },\n {\n title: \"Join the faction hinted at in 19dfj3l1nd.msg\",\n fulfilled: (p: IPlayer): boolean => {\n return p.factions.includes(FactionNames.BitRunners);\n },\n },\n {\n title: `Install all the Augmentations from ${FactionNames.BitRunners}`,\n fulfilled: (p: IPlayer): boolean => {\n return allFactionAugs(p, Factions[FactionNames.BitRunners]);\n },\n },\n {\n title: \"Complete fl1ght.exe\",\n fulfilled: (p: IPlayer): boolean => {\n // technically wrong but whatever\n return p.factions.includes(FactionNames.Daedalus);\n },\n },\n {\n title: `Install the special Augmentation from ${FactionNames.Daedalus}`,\n fulfilled: (p: IPlayer): boolean => {\n return p.augmentations.some((aug) => aug.name == \"The Red Pill\");\n },\n },\n {\n title: \"Install the final backdoor and free yourself.\",\n fulfilled: (): boolean => {\n return false;\n },\n },\n];\n","import { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function repFromDonation(amt: number, player: IPlayer): number {\n return (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;\n}\n","import { StockSymbols } from \"./StockSymbols\";\n\nexport const TickerHeaderFormatData = {\n longestName: 0,\n longestSymbol: 0,\n};\n\nfor (const key of Object.keys(StockSymbols)) {\n TickerHeaderFormatData.longestName = Math.max(key.length, TickerHeaderFormatData.longestName);\n TickerHeaderFormatData.longestSymbol = Math.max(StockSymbols[key].length, TickerHeaderFormatData.longestSymbol);\n}\n","import React from \"react\";\n\nimport { Box, Typography } from \"@mui/material\";\n\nimport { Achievement } from \"./Achievements\";\nimport { Settings } from \"../Settings/Settings\"\nimport { AchievementIcon } from \"./AchievementIcon\";\n\ninterface IProps {\n achievement: Achievement;\n unlockedOn?: number;\n cssFiltersUnlocked: string;\n cssFiltersLocked: string;\n}\n\nexport function AchievementEntry({ achievement, unlockedOn, cssFiltersUnlocked, cssFiltersLocked }: IProps): JSX.Element {\n if (!achievement) return <>;\n const isUnlocked = !!unlockedOn;\n\n const mainColor = isUnlocked ? Settings.theme.primary : Settings.theme.secondarylight;\n\n let achievedOn = '';\n if (unlockedOn) {\n achievedOn = new Date(unlockedOn).toLocaleString();\n }\n\n return (\n \n \n \n \n \n {achievement.Name}\n \n \n {achievement.Description}\n \n {isUnlocked && (\n \n Acquired on {achievedOn}\n \n )}\n \n \n \n );\n}\n","// @ts-nocheck\n/* tslint:disable */\n/* eslint-disable */\n\n/*\n Taken from:\n https://codepen.io/sosuke/pen/Pjoqqp\n --------------------------------------------------------\n This utility transform an hex color into css filter rules.\n Useful to change color of a black image to match a given color\n*/\n\nclass Color {\n constructor(r, g, b) {\n this.set(r, g, b);\n }\n\n toString() {\n return `rgb(${Math.round(this.r)}, ${Math.round(this.g)}, ${Math.round(this.b)})`;\n }\n\n set(r, g, b) {\n this.r = this.clamp(r);\n this.g = this.clamp(g);\n this.b = this.clamp(b);\n }\n\n hueRotate(angle = 0) {\n angle = angle / 180 * Math.PI;\n const sin = Math.sin(angle);\n const cos = Math.cos(angle);\n\n this.multiply([\n 0.213 + cos * 0.787 - sin * 0.213,\n 0.715 - cos * 0.715 - sin * 0.715,\n 0.072 - cos * 0.072 + sin * 0.928,\n 0.213 - cos * 0.213 + sin * 0.143,\n 0.715 + cos * 0.285 + sin * 0.140,\n 0.072 - cos * 0.072 - sin * 0.283,\n 0.213 - cos * 0.213 - sin * 0.787,\n 0.715 - cos * 0.715 + sin * 0.715,\n 0.072 + cos * 0.928 + sin * 0.072,\n ]);\n }\n\n grayscale(value = 1) {\n this.multiply([\n 0.2126 + 0.7874 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 + 0.2848 * (1 - value),\n 0.0722 - 0.0722 * (1 - value),\n 0.2126 - 0.2126 * (1 - value),\n 0.7152 - 0.7152 * (1 - value),\n 0.0722 + 0.9278 * (1 - value),\n ]);\n }\n\n sepia(value = 1) {\n this.multiply([\n 0.393 + 0.607 * (1 - value),\n 0.769 - 0.769 * (1 - value),\n 0.189 - 0.189 * (1 - value),\n 0.349 - 0.349 * (1 - value),\n 0.686 + 0.314 * (1 - value),\n 0.168 - 0.168 * (1 - value),\n 0.272 - 0.272 * (1 - value),\n 0.534 - 0.534 * (1 - value),\n 0.131 + 0.869 * (1 - value),\n ]);\n }\n\n saturate(value = 1) {\n this.multiply([\n 0.213 + 0.787 * value,\n 0.715 - 0.715 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 + 0.285 * value,\n 0.072 - 0.072 * value,\n 0.213 - 0.213 * value,\n 0.715 - 0.715 * value,\n 0.072 + 0.928 * value,\n ]);\n }\n\n multiply(matrix) {\n const newR = this.clamp(this.r * matrix[0] + this.g * matrix[1] + this.b * matrix[2]);\n const newG = this.clamp(this.r * matrix[3] + this.g * matrix[4] + this.b * matrix[5]);\n const newB = this.clamp(this.r * matrix[6] + this.g * matrix[7] + this.b * matrix[8]);\n this.r = newR;\n this.g = newG;\n this.b = newB;\n }\n\n brightness(value = 1) {\n this.linear(value);\n }\n contrast(value = 1) {\n this.linear(value, -(0.5 * value) + 0.5);\n }\n\n linear(slope = 1, intercept = 0) {\n this.r = this.clamp(this.r * slope + intercept * 255);\n this.g = this.clamp(this.g * slope + intercept * 255);\n this.b = this.clamp(this.b * slope + intercept * 255);\n }\n\n invert(value = 1) {\n this.r = this.clamp((value + this.r / 255 * (1 - 2 * value)) * 255);\n this.g = this.clamp((value + this.g / 255 * (1 - 2 * value)) * 255);\n this.b = this.clamp((value + this.b / 255 * (1 - 2 * value)) * 255);\n }\n\n hsl() {\n // Code taken from https://stackoverflow.com/a/9493060/2688027, licensed under CC BY-SA.\n const r = this.r / 255;\n const g = this.g / 255;\n const b = this.b / 255;\n const max = Math.max(r, g, b);\n const min = Math.min(r, g, b);\n let h, s, l = (max + min) / 2;\n\n if (max === min) {\n h = s = 0;\n } else {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n\n case g:\n h = (b - r) / d + 2;\n break;\n\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {\n h: h * 100,\n s: s * 100,\n l: l * 100,\n };\n }\n\n clamp(value) {\n if (value > 255) {\n value = 255;\n } else if (value < 0) {\n value = 0;\n }\n return value;\n }\n}\n\nexport class Solver {\n constructor(target) {\n this.target = target;\n this.targetHSL = target.hsl();\n this.reusedColor = new Color(0, 0, 0);\n }\n\n solve() {\n const result = this.solveNarrow(this.solveWide());\n return {\n values: result.values,\n loss: result.loss,\n filter: this.css(result.values),\n };\n }\n\n solveWide() {\n const A = 5;\n const c = 15;\n const a = [60, 180, 18000, 600, 1.2, 1.2];\n\n let best = { loss: Infinity };\n for (let i = 0; best.loss > 25 && i < 3; i++) {\n const initial = [50, 20, 3750, 50, 100, 100];\n const result = this.spsa(A, a, c, initial, 1000);\n if (result.loss < best.loss) {\n best = result;\n }\n }\n return best;\n }\n\n solveNarrow(wide) {\n const A = wide.loss;\n const c = 2;\n const A1 = A + 1;\n const a = [0.25 * A1, 0.25 * A1, A1, 0.25 * A1, 0.2 * A1, 0.2 * A1];\n return this.spsa(A, a, c, wide.values, 500);\n }\n\n spsa(A, a, c, values, iters) {\n const alpha = 1;\n const gamma = 0.16666666666666666;\n\n let best = null;\n let bestLoss = Infinity;\n const deltas = new Array(6);\n const highArgs = new Array(6);\n const lowArgs = new Array(6);\n\n for (let k = 0; k < iters; k++) {\n const ck = c / Math.pow(k + 1, gamma);\n for (let i = 0; i < 6; i++) {\n deltas[i] = Math.random() > 0.5 ? 1 : -1;\n highArgs[i] = values[i] + ck * deltas[i];\n lowArgs[i] = values[i] - ck * deltas[i];\n }\n\n const lossDiff = this.loss(highArgs) - this.loss(lowArgs);\n for (let i = 0; i < 6; i++) {\n const g = lossDiff / (2 * ck) * deltas[i];\n const ak = a[i] / Math.pow(A + k + 1, alpha);\n values[i] = fix(values[i] - ak * g, i);\n }\n\n const loss = this.loss(values);\n if (loss < bestLoss) {\n best = values.slice(0);\n bestLoss = loss;\n }\n }\n return { values: best, loss: bestLoss };\n\n function fix(value, idx) {\n let max = 100;\n if (idx === 2 /* saturate */) {\n max = 7500;\n } else if (idx === 4 /* brightness */ || idx === 5 /* contrast */) {\n max = 200;\n }\n\n if (idx === 3 /* hue-rotate */) {\n if (value > max) {\n value %= max;\n } else if (value < 0) {\n value = max + value % max;\n }\n } else if (value < 0) {\n value = 0;\n } else if (value > max) {\n value = max;\n }\n return value;\n }\n }\n\n loss(filters) {\n // Argument is array of percentages.\n const color = this.reusedColor;\n color.set(0, 0, 0);\n\n color.invert(filters[0] / 100);\n color.sepia(filters[1] / 100);\n color.saturate(filters[2] / 100);\n color.hueRotate(filters[3] * 3.6);\n color.brightness(filters[4] / 100);\n color.contrast(filters[5] / 100);\n\n const colorHSL = color.hsl();\n return (\n Math.abs(color.r - this.target.r) +\n Math.abs(color.g - this.target.g) +\n Math.abs(color.b - this.target.b) +\n Math.abs(colorHSL.h - this.targetHSL.h) +\n Math.abs(colorHSL.s - this.targetHSL.s) +\n Math.abs(colorHSL.l - this.targetHSL.l)\n );\n }\n\n css(filters) {\n function fmt(idx, multiplier = 1) {\n return Math.round(filters[idx] * multiplier);\n }\n return `invert(${fmt(0)}%) sepia(${fmt(1)}%) saturate(${fmt(2)}%) hue-rotate(${fmt(3, 3.6)}deg) brightness(${fmt(4)}%) contrast(${fmt(5)}%)`\n }\n}\n\nfunction hexToRgb(hex): number[] {\n // Expand shorthand form (e.g. \"03F\") to full form (e.g. \"0033FF\")\n const shorthandRegex = /^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i;\n hex = hex.replace(shorthandRegex, (m, r, g, b) => {\n return r + r + g + g + b + b;\n });\n\n const result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex);\n return result\n ? [\n parseInt(result[1], 16),\n parseInt(result[2], 16),\n parseInt(result[3], 16),\n ]\n : null;\n}\n\nexport function getFiltersFromHex(hex): string {\n const rgb = hexToRgb(hex);\n if (!rgb) return ''\n\n const [r, g, b] = rgb;\n const color = new Color(r, g, b);\n const solver = new Solver(color);\n return solver.solve().filter;\n}\n","import { CONSTANTS } from \"../../Constants\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { IPlayer } from \"../IPlayer\";\n\nexport interface WorkEarnings {\n workMoneyLossRate: number;\n workHackExpGainRate: number;\n workStrExpGainRate: number;\n workDefExpGainRate: number;\n workDexExpGainRate: number;\n workAgiExpGainRate: number;\n workChaExpGainRate: number;\n}\n\nexport function calculateClassEarnings(player: IPlayer): WorkEarnings {\n const gameCPS = 1000 / CONSTANTS._idleSpeed;\n\n //Find cost and exp gain per game cycle\n let cost = 0;\n let hackExp = 0,\n strExp = 0,\n defExp = 0,\n dexExp = 0,\n agiExp = 0,\n chaExp = 0;\n const hashManager = player.hashManager;\n switch (player.className) {\n case CONSTANTS.ClassStudyComputerScience:\n hackExp =\n ((CONSTANTS.ClassStudyComputerScienceBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassDataStructures:\n cost = (CONSTANTS.ClassDataStructuresBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassDataStructuresBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassNetworks:\n cost = (CONSTANTS.ClassNetworksBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassNetworksBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassAlgorithms:\n cost = (CONSTANTS.ClassAlgorithmsBaseCost * player.workCostMult) / gameCPS;\n hackExp = ((CONSTANTS.ClassAlgorithmsBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassManagement:\n cost = (CONSTANTS.ClassManagementBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassManagementBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassLeadership:\n cost = (CONSTANTS.ClassLeadershipBaseCost * player.workCostMult) / gameCPS;\n chaExp = ((CONSTANTS.ClassLeadershipBaseExp * player.workExpMult) / gameCPS) * hashManager.getStudyMult();\n break;\n case CONSTANTS.ClassGymStrength:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n strExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDefense:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n defExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymDexterity:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n dexExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n case CONSTANTS.ClassGymAgility:\n cost = (CONSTANTS.ClassGymBaseCost * player.workCostMult) / gameCPS;\n agiExp = (player.workExpMult / gameCPS) * hashManager.getTrainingMult();\n break;\n default:\n throw new Error(\"ERR: Invalid/unrecognized class name\");\n }\n return {\n workMoneyLossRate: cost,\n workHackExpGainRate: hackExp * player.hacking_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workStrExpGainRate: strExp * player.strength_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDefExpGainRate: defExp * player.defense_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workDexExpGainRate: dexExp * player.dexterity_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workAgiExpGainRate: agiExp * player.agility_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n workChaExpGainRate: chaExp * player.charisma_exp_mult * BitNodeMultipliers.ClassGymExpGain,\n };\n}\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: 'Default',\n description: 'Default game theme, most supported',\n credit: 'hydroflame',\n screenshot: img1,\n colors: {\n primarylight: \"#0f0\",\n primary: \"#0c0\",\n primarydark: \"#090\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#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 rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Default-lite\",\n description: \"Less eye-straining default theme\",\n credit: \"NmuGmu\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/925263801564151888\",\n screenshot: img1,\n colors: {\n primarylight: \"#28CF28\",\n primary: \"#21A821\",\n primarydark: \"#177317\",\n successlight: \"#1CFF1C\",\n success: \"#16CA16\",\n successdark: \"#0D910D\",\n errorlight: \"#FF3B3B\",\n error: \"#C32D2D\",\n errordark: \"#8E2121\",\n secondarylight: \"#B3B3B3\",\n secondary: \"#838383\",\n secondarydark: \"#676767\",\n warninglight: \"#FFFF3A\",\n warning: \"#C3C32A\",\n warningdark: \"#8C8C1E\",\n infolight: \"#64CBFF\",\n info: \"#3399CC\",\n infodark: \"#246D91\",\n welllight: \"#404040\",\n well: \"#1C1C1C\",\n white: \"#C3C3C3\",\n black: \"#0A0B0B\",\n hp: \"#C62E2E\",\n money: \"#D6BB27\",\n hack: \"#ADFF2F\",\n combat: \"#E8EDCD\",\n cha: \"#8B5FAF\",\n int: \"#537CC8\",\n rep: \"#E8EDCD\",\n disabled: \"#5AB5A5\",\n backgroundprimary: \"#0C0D0E\",\n backgroundsecondary: \"#121415\",\n button: \"#252829\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Monokai'ish\",\n description: \"Monokai'ish\",\n credit: \"eltea\",\n screenshot: img1,\n colors: {\n primarylight: \"#FFF\",\n primary: \"#F8F8F2\",\n primarydark: \"#FAFAEB\",\n successlight: \"#ADE146\",\n success: \"#A6E22E\",\n successdark: \"#98E104\",\n errorlight: \"#FF69A0\",\n error: \"#F92672\",\n errordark: \"#D10F56\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E1D992\",\n warning: \"#E6DB74\",\n warningdark: \"#EDDD54\",\n infolight: \"#92E1F1\",\n info: \"#66D9EF\",\n infodark: \"#31CDED\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#000\",\n hp: \"#F92672\",\n money: \"#E6DB74\",\n hack: \"#A6E22E\",\n combat: \"#75715E\",\n cha: \"#AE81FF\",\n int: \"#66D9EF\",\n rep: \"#E69F66\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#272822\",\n backgroundsecondary: \"#1B1C18\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Warmer\",\n credit: \"hexnaught\",\n description: \"Warmer, softer theme\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999581020028938\",\n screenshot: img1,\n colors: {\n primarylight: \"#EA9062\",\n primary: \"#DD7B4A\",\n primarydark: \"#D3591C\",\n successlight: \"#6ACF6A\",\n success: \"#43BF43\",\n successdark: \"#3E913E\",\n errorlight: \"#C15757\",\n error: \"#B34141\",\n errordark: \"#752525\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E6E69D\",\n warning: \"#DADA56\",\n warningdark: \"#A1A106\",\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: \"#AD84CF\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#76C6B7\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark+\",\n credit: \"LoganMD\",\n description: \"VSCode Dark+\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/921999975867617310\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#CCCCAE\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#00D200\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#C80000\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#969090\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#C8C800\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#222\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Mayukai Dark\",\n description: \"Mayukai Dark-esque\",\n credit: \"Festive Noire\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922037502334889994\",\n screenshot: img1,\n colors: {\n primarylight: \"#DDDFC5\",\n primary: \"#CDCFB6\",\n primarydark: \"#9D9F8C\",\n successlight: \"#00EF00\",\n success: \"#00A500\",\n successdark: \"#007A00\",\n errorlight: \"#F92672\",\n error: \"#CA1C5C\",\n errordark: \"#90274A\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#D3D300\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#00010A\",\n white: \"#fff\",\n black: \"#020509\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#8CCF27\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#080C11\",\n backgroundsecondary: \"#03080F\",\n button: \"#00010A\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Purple\",\n credit: \"zer0ney\",\n description: \"Essentially all defaults except for purple replacing the main colors\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922091815849570395\",\n screenshot: img1,\n colors: {\n primarylight: \"#BA55D3\",\n primary: \"#9370DB\",\n primarydark: \"#8A2BE2\",\n successlight: \"#BA55D3\",\n success: \"#9370DB\",\n successdark: \"#8A2BE2\",\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 rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#000\",\n backgroundsecondary: \"#000\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Smooth Green\",\n description: \"A nice green theme that doesn't hurt your eyes.\",\n credit: \"Swidt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922243957986033725\",\n screenshot: img1,\n colors: {\n primarylight: \"#E0E0BC\",\n primary: \"#B0D9A3\",\n primarydark: \"#B8B89C\",\n successlight: \"#00F000\",\n success: \"#6BC16B\",\n successdark: \"#00B400\",\n errorlight: \"#F00000\",\n error: \"#3D713D\",\n errordark: \"#A00000\",\n secondarylight: \"#B4AEAE\",\n secondary: \"#8FAF85\",\n secondarydark: \"#787272\",\n warninglight: \"#F0F000\",\n warning: \"#38F100\",\n warningdark: \"#A0A000\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#2F3C2B\",\n white: \"#fff\",\n black: \"#1E1E1E\",\n hp: \"#dd3434\",\n money: \"#4AA52E\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#35A135\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#1E1E1E\",\n backgroundsecondary: \"#252525\",\n button: \"#2F3C2B\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dracula\",\n description: \"Dracula Look-alike\",\n credit: \"H3draut3r\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/922296307836678144\",\n screenshot: img1,\n colors: {\n primarylight: \"#7082B8\",\n primary: \"#F8F8F2\",\n primarydark: \"#FF79C6\",\n successlight: \"#0f0\",\n success: \"#0c0\",\n successdark: \"#090\",\n errorlight: \"#FD4545\",\n error: \"#FF2D2D\",\n errordark: \"#C62424\",\n secondarylight: \"#AAA\",\n secondary: \"#8BE9FD\",\n secondarydark: \"#666\",\n warninglight: \"#FFC281\",\n warning: \"#FFB86C\",\n warningdark: \"#E6A055\",\n infolight: \"#A0A0FF\",\n info: \"#7070FF\",\n infodark: \"#4040FF\",\n welllight: \"#44475A\",\n well: \"#363948\",\n white: \"#fff\",\n black: \"#282A36\",\n hp: \"#D34448\",\n money: \"#50FA7B\",\n hack: \"#F1FA8C\",\n combat: \"#BD93F9\",\n cha: \"#FF79C6\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#282A36\",\n backgroundsecondary: \"#21222C\",\n button: \"#21222C\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Dark Blue\",\n description: \"Very dark with a blue/purplelly primary\",\n credit: \"Saynt_Garmo\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/923084732718264340\",\n screenshot: img1,\n colors: {\n primarylight: \"#023DDE\",\n primary: \"#4A41C8\",\n primarydark: \"#005299\",\n successlight: \"#00FF00\",\n success: \"#D1DAD1\",\n successdark: \"#BFCABF\",\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: \"#040505\",\n white: \"#fff\",\n black: \"#000000\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#091419\",\n backgroundsecondary: \"#000000\",\n button: \"#000000\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Discord-like\",\n description: \"Discord inspired theme\",\n credit: \"Thermite\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924305252017143818\",\n screenshot: img1,\n colors: {\n primarylight: \"#7389DC\",\n primary: \"#7389DC\",\n primarydark: \"#5964F1\",\n successlight: \"#00CC00\",\n success: \"#20DF20\",\n successdark: \"#0CB80C\",\n errorlight: \"#EA5558\",\n error: \"#EC4145\",\n errordark: \"#E82528\",\n secondarylight: \"#C3C3C3\",\n secondary: \"#9C9C9C\",\n secondarydark: \"#4E4E4E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#1C4FB3\",\n welllight: \"#999999\",\n well: \"#35383C\",\n white: \"#FFFFFF\",\n black: \"#202225\",\n hp: \"#FF5656\",\n money: \"#43FF43\",\n hack: \"#FFAB3D\",\n combat: \"#8A90FD\",\n cha: \"#FF51D9\",\n int: \"#6495ed\",\n rep: \"#FFFF30\",\n disabled: \"#474B51\",\n backgroundprimary: \"#2F3136\",\n backgroundsecondary: \"#35393E\",\n button: \"#333\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"One Dark\",\n description: \"Dark with a greenish tint\",\n credit: \"Dexalt142\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924650660694208512\",\n screenshot: img1,\n colors: {\n primarylight: \"#98C379\",\n primary: \"#98C379\",\n primarydark: \"#98C379\",\n successlight: \"#98C379\",\n success: \"#98C379\",\n successdark: \"#98C379\",\n errorlight: \"#E06C75\",\n error: \"#BE5046\",\n errordark: \"#BE5046\",\n secondarylight: \"#AAA\",\n secondary: \"#888\",\n secondarydark: \"#666\",\n warninglight: \"#E5C07B\",\n warning: \"#E5C07B\",\n warningdark: \"#D19A66\",\n infolight: \"#61AFEF\",\n info: \"#61AFEF\",\n infodark: \"#61AFEF\",\n welllight: \"#4B5263\",\n well: \"#282C34\",\n white: \"#ABB2BF\",\n black: \"#282C34\",\n hp: \"#E06C75\",\n money: \"#E5C07B\",\n hack: \"#98C379\",\n combat: \"#ABB2BF\",\n cha: \"#C678DD\",\n int: \"#61AFEF\",\n rep: \"#ABB2BF\",\n disabled: \"#56B6C2\",\n backgroundprimary: \"#282C34\",\n backgroundsecondary: \"#21252B\",\n button: \"#4B5263\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Muted Gold & Blue\",\n description: \"Muted gold with blue accents.\",\n credit: \"Sloth\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/924672660758208563\",\n screenshot: img1,\n colors: {\n primarylight: \"#E3B54A\",\n primary: \"#CAA243\",\n primarydark: \"#7E6937\",\n successlight: \"#82FF82\",\n success: \"#6FDA6F\",\n successdark: \"#64C364\",\n errorlight: \"#FD5555\",\n error: \"#D84A4A\",\n errordark: \"#AC3939\",\n secondarylight: \"#D8D0B8\",\n secondary: \"#B1AA95\",\n secondarydark: \"#736E5E\",\n warninglight: \"#ff0\",\n warning: \"#cc0\",\n warningdark: \"#990\",\n infolight: \"#69f\",\n info: \"#36c\",\n infodark: \"#039\",\n welllight: \"#444\",\n well: \"#111111\",\n white: \"#fff\",\n black: \"#070300\",\n hp: \"#dd3434\",\n money: \"#ffd700\",\n hack: \"#adff2f\",\n combat: \"#faffdf\",\n cha: \"#a671d1\",\n int: \"#6495ed\",\n rep: \"#faffdf\",\n disabled: \"#66cfbc\",\n backgroundprimary: \"#0A0A0E\",\n backgroundsecondary: \"#0E0E10\",\n button: \"#222222\",\n },\n};\n","import { IPredefinedTheme } from \"../../Themes\";\nimport img1 from \"./screenshot.png\";\n\nexport const Theme: IPredefinedTheme = {\n name: \"Light\",\n description: \"Cobbled Together Light Theme\",\n credit: \"matt\",\n reference: \"https://discord.com/channels/415207508303544321/921991895230611466/926114005456658432\",\n screenshot: img1,\n colors: {\n primarylight: \"#535353\",\n primary: \"#1A1A1A\",\n primarydark: \"#0d0d0d\",\n successlight: \"#63c439\",\n success: \"#428226\",\n successdark: \"#2E5A1B\",\n errorlight: \"#df7051\",\n error: \"#C94824\",\n errordark: \"#91341B\",\n secondarylight: \"#b3b3b3\",\n secondary: \"#9B9B9B\",\n secondarydark: \"#7A7979\",\n warninglight: \"#e8d464\",\n warning: \"#C6AD20\",\n warningdark: \"#9F8A16\",\n infolight: \"#6299cf\",\n info: \"#3778B7\",\n infodark: \"#30689C\",\n welllight: \"#f9f9f9\",\n well: \"#eaeaea\",\n white: \"#F7F7F7\",\n black: \"#F7F7F7\",\n hp: \"#BF5C41\",\n money: \"#E1B121\",\n hack: \"#47BC38\",\n combat: \"#656262\",\n cha: \"#A568AC\",\n int: \"#889BCF\",\n rep: \"#656262\",\n disabled: \"#70B4BF\",\n backgroundprimary: \"#F7F7F7\",\n backgroundsecondary: \"#f9f9f9\",\n button: \"#eaeaea\",\n },\n};\n","export default __webpack_public_path__ + \"dist/images/83b2443ab7e7d346766c8f6bc5afc7a7.png\";","export default __webpack_public_path__ + \"dist/images/6caf35202b10b52e1fc2743f674c33e8.png\";","export default __webpack_public_path__ + \"dist/images/cb88977ea837bccb9cceb727adc78302.png\";","export default __webpack_public_path__ + \"dist/images/4e0e750f2f09de58219773edd46cbbf5.png\";","export default __webpack_public_path__ + \"dist/images/e97de4daa946331c7e99dee9c05d629c.png\";","export default __webpack_public_path__ + \"dist/images/9f96a5084f4e5f1a6c0041b41b34d62d.png\";","export default __webpack_public_path__ + \"dist/images/85a7b2896acb62be76f3ea7100fe9012.png\";","export default __webpack_public_path__ + \"dist/images/5aa87b7de67a77c914088783b055e1cf.png\";","export default __webpack_public_path__ + \"dist/images/c7164b072d62c91c27c6d607b5207e7b.png\";","export default __webpack_public_path__ + \"dist/images/66f4b86d86164fc117bd6d648e4eaa6f.png\";","export default __webpack_public_path__ + \"dist/images/a1110d6c8d16a14c4570411750248399.png\";","export default __webpack_public_path__ + \"dist/images/447bc31e61f55e7eff875be3e9a81f1a.png\";","export default __webpack_public_path__ + \"dist/images/297df8c0e47764ea113951318b2acf55.png\";","export default __webpack_public_path__ + \"dist/images/e66b0c327f97d08e4253f52234d659eb.png\";","import { ITerminal, Output, Link, RawOutput, TTimer } from \"./ITerminal\";\nimport { IRouter } from \"../ui/Router\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { BaseServer } from \"../Server/BaseServer\";\nimport { Server } from \"../Server/Server\";\nimport { Programs } from \"../Programs/Programs\";\nimport { CodingContractResult } from \"../CodingContracts\";\nimport { TerminalEvents, TerminalClearEvents } from \"./TerminalEvents\";\n\nimport { TextFile } from \"../TextFile\";\nimport { Script } from \"../Script/Script\";\nimport { isScriptFilename } from \"../Script/isScriptFilename\";\nimport { CONSTANTS } from \"../Constants\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\n\nimport { removeLeadingSlash, isInRootDirectory, evaluateFilePath } from \"./DirectoryHelpers\";\nimport { checkIfConnectedToDarkweb } from \"../DarkWeb/DarkWeb\";\nimport { iTutorialNextStep, iTutorialSteps, ITutorial } from \"../InteractiveTutorial\";\nimport { getServerOnNetwork, processSingleServerGrowth } from \"../Server/ServerHelpers\";\nimport { ParseCommand, ParseCommands } from \"./Parser\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Settings } from \"../Settings/Settings\";\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\n\nimport { alias } from \"./commands/alias\";\nimport { analyze } from \"./commands/analyze\";\nimport { backdoor } from \"./commands/backdoor\";\nimport { buy } from \"./commands/buy\";\nimport { cat } from \"./commands/cat\";\nimport { cd } from \"./commands/cd\";\nimport { check } from \"./commands/check\";\nimport { connect } from \"./commands/connect\";\nimport { cp } from \"./commands/cp\";\nimport { download } from \"./commands/download\";\nimport { expr } from \"./commands/expr\";\nimport { free } from \"./commands/free\";\nimport { grow } from \"./commands/grow\";\nimport { hack } from \"./commands/hack\";\nimport { help } from \"./commands/help\";\nimport { history } from \"./commands/history\";\nimport { home } from \"./commands/home\";\nimport { hostname } from \"./commands/hostname\";\nimport { kill } from \"./commands/kill\";\nimport { killall } from \"./commands/killall\";\nimport { ls } from \"./commands/ls\";\nimport { lscpu } from \"./commands/lscpu\";\nimport { mem } from \"./commands/mem\";\nimport { mv } from \"./commands/mv\";\nimport { nano } from \"./commands/nano\";\nimport { ps } from \"./commands/ps\";\nimport { rm } from \"./commands/rm\";\nimport { run } from \"./commands/run\";\nimport { scan } from \"./commands/scan\";\nimport { scananalyze } from \"./commands/scananalyze\";\nimport { scp } from \"./commands/scp\";\nimport { sudov } from \"./commands/sudov\";\nimport { tail } from \"./commands/tail\";\nimport { top } from \"./commands/top\";\nimport { unalias } from \"./commands/unalias\";\nimport { vim } from \"./commands/vim\";\nimport { weaken } from \"./commands/weaken\";\nimport { wget } from \"./commands/wget\";\nimport { hash } from \"../hash/hash\";\n\nexport class Terminal implements ITerminal {\n // Flags to determine whether the player is currently running a hack or an analyze\n action: TTimer | null = null;\n\n commandHistory: string[] = [];\n commandHistoryIndex = 0;\n\n outputHistory: (Output | Link | RawOutput)[] = [\n new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\"),\n ];\n\n // True if a Coding Contract prompt is opened\n contractOpen = false;\n\n // Full Path of current directory\n // Excludes the trailing forward slash\n currDir = \"/\";\n\n process(router: IRouter, player: IPlayer, cycles: number): void {\n if (this.action === null) return;\n this.action.timeLeft -= (CONSTANTS._idleSpeed * cycles) / 1000;\n if (this.action.timeLeft < 0.01) this.finishAction(router, player, false);\n TerminalEvents.emit();\n }\n\n append(item: Output | Link | RawOutput): void {\n this.outputHistory.push(item);\n if (this.outputHistory.length > Settings.MaxTerminalCapacity) {\n this.outputHistory.splice(0, this.outputHistory.length - Settings.MaxTerminalCapacity);\n }\n TerminalEvents.emit();\n }\n\n print(s: string): void {\n this.append(new Output(s, \"primary\"));\n }\n\n printRaw(node: React.ReactNode): void {\n this.append(new RawOutput(node));\n }\n\n error(s: string): void {\n this.append(new Output(s, \"error\"));\n }\n\n success(s: string): void {\n this.append(new Output(s, \"success\"));\n }\n\n info(s: string): void {\n this.append(new Output(s, \"info\"));\n }\n\n warn(s: string): void {\n this.append(new Output(s, \"warn\"));\n }\n\n startHack(player: IPlayer): void {\n // Hacking through Terminal should be faster than hacking through a script\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"h\", server);\n }\n\n startGrow(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateGrowTime(server, player) / 16, \"g\", server);\n }\n startWeaken(player: IPlayer): void {\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateWeakenTime(server, player) / 16, \"w\", server);\n }\n\n startBackdoor(player: IPlayer): void {\n // Backdoor should take the same amount of time as hack\n const server = player.getCurrentServer();\n if (server instanceof HacknetServer) {\n this.error(\"Cannot backdoor this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n this.startAction(calculateHackingTime(server, player) / 4, \"b\", server);\n }\n\n startAnalyze(player: IPlayer): void {\n this.print(\"Analyzing system...\");\n const server = player.getCurrentServer();\n this.startAction(1, \"a\", server);\n }\n\n startAction(n: number, action: \"h\" | \"b\" | \"a\" | \"g\" | \"w\", server?: BaseServer): void {\n this.action = new TTimer(n, action, server);\n }\n\n // Complete the hack/analyze command\n finishHack(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n\n // Calculate whether hack was successful\n const hackChance = calculateHackingChance(server, player);\n const rand = Math.random();\n const expGainedOnSuccess = calculateHackingExpGain(server, player);\n const expGainedOnFailure = expGainedOnSuccess / 4;\n if (rand < hackChance) {\n // Success!\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n router.toBitVerse(false, false);\n return;\n }\n let moneyGained = calculatePercentMoneyHacked(server, player);\n moneyGained = Math.floor(server.moneyAvailable * moneyGained);\n\n if (moneyGained <= 0) {\n moneyGained = 0;\n } // Safety check\n\n server.moneyAvailable -= moneyGained;\n player.gainMoney(moneyGained, \"hacking\");\n player.gainHackingExp(expGainedOnSuccess);\n player.gainIntelligenceExp(expGainedOnSuccess / CONSTANTS.IntelligenceTerminalHackBaseExpGain);\n\n const oldSec = server.hackDifficulty;\n server.fortify(CONSTANTS.ServerFortifyAmount);\n const newSec = server.hackDifficulty;\n\n this.print(\n `Hack successful on '${server.hostname}'! Gained ${numeralWrapper.formatMoney(\n moneyGained,\n )} and ${numeralWrapper.formatExp(expGainedOnSuccess)} hacking exp`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n } else {\n // Failure\n player.gainHackingExp(expGainedOnFailure);\n this.print(\n `Failed to hack '${server.hostname}'. Gained ${numeralWrapper.formatExp(expGainedOnFailure)} hacking exp`,\n );\n }\n }\n\n finishGrow(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot grow this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n const growth = processSingleServerGrowth(server, 25, player, server.cpuCores) - 1;\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Available money on '${server.hostname}' grown by ${numeralWrapper.formatPercentage(\n growth,\n 6,\n )}. Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n this.print(\n `Security increased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)}`,\n );\n }\n\n finishWeaken(player: IPlayer, server: BaseServer, cancelled = false): void {\n if (cancelled) return;\n\n if (server instanceof HacknetServer) {\n this.error(\"Cannot weaken this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n const expGain = calculateHackingExpGain(server, player);\n const oldSec = server.hackDifficulty;\n server.weaken(CONSTANTS.ServerWeakenAmount);\n const newSec = server.hackDifficulty;\n\n player.gainHackingExp(expGain);\n this.print(\n `Security decreased on '${server.hostname}' from ${numeralWrapper.formatSecurity(\n oldSec,\n )} to ${numeralWrapper.formatSecurity(newSec)} (min: ${numeralWrapper.formatSecurity(server.minDifficulty)})` +\n ` and Gained ${numeralWrapper.formatExp(expGain)} hacking exp.`,\n );\n }\n\n finishBackdoor(router: IRouter, player: IPlayer, server: BaseServer, cancelled = false): void {\n if (!cancelled) {\n if (server instanceof HacknetServer) {\n this.error(\"Cannot hack this kind of server\");\n return;\n }\n if (!(server instanceof Server)) throw new Error(\"server should be normal server\");\n server.backdoorInstalled = true;\n if (SpecialServers.WorldDaemon === server.hostname) {\n if (player.bitNodeN == null) {\n player.bitNodeN = 1;\n }\n router.toBitVerse(false, false);\n return;\n }\n this.print(`Backdoor on '${server.hostname}' successful!`);\n }\n }\n\n finishAnalyze(player: IPlayer, currServ: BaseServer, cancelled = false): void {\n if (!cancelled) {\n const isHacknet = currServ instanceof HacknetServer;\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 canRunScripts = hasAdminRights && currServ.maxRam > 0;\n this.print(\"Can run scripts on this host: \" + (canRunScripts ? \"YES\" : \"NO\"));\n this.print(\"RAM: \" + numeralWrapper.formatRAM(currServ.maxRam));\n if (currServ instanceof Server) {\n this.print(\"Backdoor: \" + (currServ.backdoorInstalled ? \"YES\" : \"NO\"));\n const hackingSkill = currServ.requiredHackingSkill;\n this.print(\"Required hacking skill for hack() and backdoor: \" + (!isHacknet ? hackingSkill : \"N/A\"));\n const security = currServ.hackDifficulty;\n this.print(\"Server security level: \" + (!isHacknet ? numeralWrapper.formatServerSecurity(security) : \"N/A\"));\n const hackingChance = calculateHackingChance(currServ, player);\n this.print(\"Chance to hack: \" + (!isHacknet ? numeralWrapper.formatPercentage(hackingChance) : \"N/A\"));\n const hackingTime = calculateHackingTime(currServ, player) * 1000;\n this.print(\"Time to hack: \" + (!isHacknet ? convertTimeMsToTimeElapsedString(hackingTime, true) : \"N/A\"));\n }\n this.print(\n `Total money available on server: ${\n currServ instanceof Server ? numeralWrapper.formatMoney(currServ.moneyAvailable) : \"N/A\"\n }`,\n );\n if (currServ instanceof Server) {\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\n finishAction(router: IRouter, player: IPlayer, cancelled = false): void {\n if (this.action === null) {\n if (!cancelled) throw new Error(\"Finish action called when there was no action\");\n return;\n }\n\n if (!this.action.server) throw new Error(\"Missing action target server\");\n\n this.print(this.getProgressText());\n if (this.action.action === \"h\") {\n this.finishHack(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"g\") {\n this.finishGrow(player, this.action.server, cancelled);\n } else if (this.action.action === \"w\") {\n this.finishWeaken(player, this.action.server, cancelled);\n } else if (this.action.action === \"b\") {\n this.finishBackdoor(router, player, this.action.server, cancelled);\n } else if (this.action.action === \"a\") {\n this.finishAnalyze(player, this.action.server, cancelled);\n }\n\n if (cancelled) {\n this.print(\"Cancelled\");\n }\n this.action = null;\n TerminalEvents.emit();\n }\n\n getFile(player: IPlayer, filename: string): Script | TextFile | string | null {\n if (isScriptFilename(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: string): string {\n const path = evaluateFilePath(filename, this.cwd());\n if (path == null) {\n throw new Error(`Invalid file path specified: ${filename}`);\n }\n\n if (isInRootDirectory(path)) {\n return removeLeadingSlash(path);\n }\n\n return path;\n }\n\n getScript(player: IPlayer, filename: string): Script | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\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: IPlayer, filename: string): TextFile | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\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: IPlayer, filename: string): string | null {\n const s = player.getCurrentServer();\n const filepath = this.getFilepath(filename);\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(): string {\n return this.currDir;\n }\n\n setcwd(dir: string): void {\n this.currDir = dir;\n TerminalEvents.emit();\n }\n\n async runContract(player: IPlayer, contractName: string): Promise {\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 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 CodingContractResult.Success:\n if (contract.reward !== null) {\n const reward = player.gainCodingContractReward(contract.reward, contract.getDifficulty());\n this.print(`Contract SUCCESS - ${reward}`);\n }\n serv.removeContract(contract);\n break;\n case CodingContractResult.Failure:\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n this.error(\"Contract FAILED - Contract is now self-destructing\");\n serv.removeContract(contract);\n } else {\n this.error(`Contract FAILED - ${contract.getMaxNumTries() - contract.tries} tries remaining`);\n }\n break;\n case CodingContractResult.Cancelled:\n default:\n this.print(\"Contract cancelled\");\n break;\n }\n this.contractOpen = false;\n }\n\n executeScanAnalyzeCommand(player: IPlayer, depth = 1, all = false): void {\n // TODO Using array as stack for now, can make more efficient\n this.print(\"~~~~~~~~~~ Beginning scan-analyze ~~~~~~~~~~\");\n this.print(\" \");\n\n // Map of all servers to keep track of which have been visited\n const visited: {\n [key: string]: number | undefined;\n } = {};\n for (const server of GetAllServers()) {\n visited[server.hostname] = 0;\n }\n\n const stack: BaseServer[] = [];\n const depthQueue: number[] = [0];\n const currServ = player.getCurrentServer();\n stack.push(currServ);\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 HacknetServer;\n if (!all && (s as any).purchasedByPlayer && s.hostname != \"home\") {\n continue; // Purchased server\n } else if (visited[s.hostname] || d > depth) {\n continue; // Already visited or out-of-depth\n } else if (!all && isHacknet) {\n continue; // Hacknet Server\n } else {\n visited[s.hostname] = 1;\n }\n for (let i = s.serversOnNetwork.length - 1; i >= 0; --i) {\n const newS = getServerOnNetwork(s, i);\n if (newS === null) continue;\n stack.push(newS);\n depthQueue.push(d + 1);\n }\n if (d == 0) {\n continue;\n } // Don't print current server\n const titleDashes = Array((d - 1) * 4 + 1).join(\"-\");\n if (player.hasProgram(Programs.AutoLink.name)) {\n this.append(new Link(titleDashes, s.hostname));\n } else {\n this.print(titleDashes + s.hostname);\n }\n\n const dashes = titleDashes + \"--\";\n let c = \"NO\";\n if (s.hasAdminRights) {\n c = \"YES\";\n }\n this.print(\n `${dashes}Root Access: ${c}${!isHacknet ? \", Required hacking skill: \" + (s as any).requiredHackingSkill : \"\"}`,\n );\n\n if (s.hasOwnProperty(\"numOpenPortsRequired\")) {\n this.print(dashes + \"Number of open ports required to NUKE: \" + (s as any).numOpenPortsRequired);\n }\n this.print(dashes + \"RAM: \" + numeralWrapper.formatRAM(s.maxRam));\n this.print(\" \");\n }\n }\n\n connectToServer(player: IPlayer, server: string): void {\n const serv = GetServer(server);\n if (serv == null) {\n this.error(\"Invalid server. Connection failed.\");\n return;\n }\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = serv.hostname;\n player.getCurrentServer().isConnectedTo = true;\n this.print(\"Connected to \" + serv.hostname);\n this.setcwd(\"/\");\n if (player.getCurrentServer().hostname == \"darkweb\") {\n checkIfConnectedToDarkweb(); // Posts a 'help' message if connecting to dark web\n }\n }\n\n executeCommands(router: IRouter, player: IPlayer, commands: string): void {\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\n // Handle Terminal History - multiple commands should be saved as one\n if (this.commandHistory[this.commandHistory.length - 1] != commands) {\n this.commandHistory.push(commands);\n if (this.commandHistory.length > 50) {\n this.commandHistory.splice(0, 1);\n }\n player.terminalCommandHistory = this.commandHistory;\n }\n this.commandHistoryIndex = this.commandHistory.length;\n const allCommands = ParseCommands(commands);\n\n for (let i = 0; i < allCommands.length; i++) {\n this.executeCommand(router, player, allCommands[i]);\n }\n }\n\n clear(): void {\n this.outputHistory = [new Output(`Bitburner v${CONSTANTS.VersionString} (${hash()})`, \"primary\")];\n TerminalEvents.emit();\n TerminalClearEvents.emit();\n }\n\n prestige(): void {\n this.action = null;\n this.clear();\n }\n\n executeCommand(router: IRouter, player: IPlayer, command: string): void {\n if (this.action !== null) {\n this.error(`Cannot execute command (${command}) while an action is in progress`);\n return;\n }\n // Allow usage of ./\n if (command.startsWith(\"./\")) {\n command = \"run \" + command.slice(2);\n }\n // Only split the first space\n const commandArray = ParseCommand(command);\n if (commandArray.length == 0) {\n return;\n }\n const s = player.getCurrentServer();\n /****************** Interactive Tutorial Terminal Commands ******************/\n if (ITutorial.isRunning) {\n const n00dlesServ = GetServer(\"n00dles\");\n if (n00dlesServ == null) {\n throw new Error(\"Could not get n00dles server\");\n }\n switch (ITutorial.currStep) {\n case iTutorialSteps.TerminalHelp:\n if (commandArray.length === 1 && commandArray[0] == \"help\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalLs:\n if (commandArray.length === 1 && commandArray[0] == \"ls\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScan:\n if (commandArray.length === 1 && commandArray[0] == \"scan\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze1:\n if (commandArray.length == 1 && commandArray[0] == \"scan-analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalScanAnalyze2:\n if (commandArray.length == 2 && commandArray[0] == \"scan-analyze\" && commandArray[1] === 2) {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalConnect:\n if (commandArray.length == 2) {\n if (\n commandArray[0] == \"connect\" &&\n (commandArray[1] == \"n00dles\" || commandArray[1] == n00dlesServ.hostname)\n ) {\n iTutorialNextStep();\n } else {\n this.error(\"Wrong command! Try again!\");\n return;\n }\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalAnalyze:\n if (commandArray.length === 1 && commandArray[0] === \"analyze\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalNuke:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"NUKE.exe\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalManualHack:\n if (commandArray.length == 1 && commandArray[0] == \"hack\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalHackingMechanics:\n if (commandArray.length !== 1 || ![\"grow\", \"weaken\", \"hack\"].includes(commandArray[0] + \"\")) {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalGoHome:\n if (commandArray.length == 1 && commandArray[0] == \"home\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalCreateScript:\n if (commandArray.length == 2 && commandArray[0] == \"nano\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalFree:\n if (commandArray.length == 1 && commandArray[0] == \"free\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.TerminalRunScript:\n if (commandArray.length == 2 && commandArray[0] == \"run\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n case iTutorialSteps.ActiveScriptsToTerminal:\n if (commandArray.length == 2 && commandArray[0] == \"tail\" && commandArray[1] == \"n00dles.script\") {\n iTutorialNextStep();\n } else {\n this.error(\"Bad command. Please follow the tutorial\");\n return;\n }\n break;\n default:\n this.error(\"Please follow the tutorial, or click 'EXIT' if you'd like to skip it\");\n return;\n }\n }\n /****************** END INTERACTIVE TUTORIAL ******************/\n /* Command parser */\n const commandName = commandArray[0];\n if (typeof commandName === \"number\" || typeof commandName === \"boolean\") {\n this.error(`Command ${commandArray[0]} not found`);\n return;\n }\n\n const commands: {\n [key: string]: (\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n ) => void;\n } = {\n \"scan-analyze\": scananalyze,\n alias: alias,\n analyze: analyze,\n backdoor: backdoor,\n buy: buy,\n cat: cat,\n cd: cd,\n check: check,\n clear: () => this.clear(),\n cls: () => this.clear(),\n connect: connect,\n cp: cp,\n download: download,\n expr: expr,\n free: free,\n grow: grow,\n hack: hack,\n help: help,\n history: history,\n home: home,\n hostname: hostname,\n kill: kill,\n killall: killall,\n ls: ls,\n lscpu: lscpu,\n mem: mem,\n mv: mv,\n nano: nano,\n ps: ps,\n rm: rm,\n run: run,\n scan: scan,\n scp: scp,\n sudov: sudov,\n tail: tail,\n top: top,\n unalias: unalias,\n vim: vim,\n weaken: weaken,\n wget: wget,\n };\n\n const f = commands[commandName.toLowerCase()];\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(): string {\n if (this.action === null) throw new Error(\"trying to get the progress text when there's no action\");\n return createProgressBarText({\n progress: (this.action.time - this.action.timeLeft) / this.action.time,\n totalTicks: 50,\n });\n }\n}\n","import { getRandomInt } from \"../utils/helpers/getRandomInt\";\n\n/* tslint:disable:completed-docs no-magic-numbers arrow-return-shorthand */\n\n/* Function that generates a valid 'data' for a contract type */\nexport type GeneratorFunc = () => any;\n\n/* Function that checks if the provided solution is the correct one */\nexport type SolverFunc = (data: any, answer: string) => boolean;\n\n/* Function that returns a string with the problem's description.\n Requires the 'data' of a Contract as input */\nexport type DescriptionFunc = (data: any) => string;\n\ninterface ICodingContractTypeMetadata {\n desc: DescriptionFunc;\n difficulty: number;\n gen: GeneratorFunc;\n name: string;\n numTries: number;\n solver: SolverFunc;\n}\n\n/* Helper functions for Coding Contract implementations */\nfunction removeBracketsFromArrayString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith(\"[\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith(\"]\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction removeQuotesFromString(str: string): string {\n let strCpy: string = str;\n if (strCpy.startsWith('\"') || strCpy.startsWith(\"'\")) {\n strCpy = strCpy.slice(1);\n }\n if (strCpy.endsWith('\"') || strCpy.endsWith(\"'\")) {\n strCpy = strCpy.slice(0, -1);\n }\n\n return strCpy;\n}\n\nfunction convert2DArrayToString(arr: any[][]): string {\n const components: string[] = [];\n arr.forEach((e: any) => {\n let s: string = e.toString();\n s = [\"[\", s, \"]\"].join(\"\");\n components.push(s);\n });\n\n return components.join(\",\").replace(/\\s/g, \"\");\n}\n\nexport const codingContractTypesMetadata: ICodingContractTypeMetadata[] = [\n {\n desc: (n: number): string => {\n return [\"A prime factor is a factor that is a prime number.\", `What is the largest prime factor of ${n}?`].join(\n \" \",\n );\n },\n difficulty: 1,\n gen: (): number => {\n return getRandomInt(500, 1e9);\n },\n name: \"Find Largest Prime Factor\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n let fac = 2;\n let n: number = data;\n while (n > (fac - 1) * (fac - 1)) {\n while (n % fac === 0) {\n n = Math.round(n / fac);\n }\n ++fac;\n }\n\n return (n === 1 ? fac - 1 : n) === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[]): string => {\n return [\n \"Given the following integer array, find the contiguous subarray\",\n \"(containing at least one number) which has the largest sum and return that sum.\",\n \"'Sum' refers to the sum of all the numbers in the subarray.\\n\",\n `${n.toString()}`,\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(5, 40);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(-10, 10);\n }\n\n return arr;\n },\n name: \"Subarray with Maximum Sum\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const nums: number[] = data.slice();\n for (let i = 1; i < nums.length; i++) {\n nums[i] = Math.max(nums[i], nums[i] + nums[i - 1]);\n }\n\n return parseInt(ans, 10) === Math.max(...nums);\n },\n },\n {\n desc: (n: number): string => {\n return [\n \"It is possible write four as a sum in exactly four different ways:\\n\\n\",\n \"    3 + 1\\n\",\n \"    2 + 2\\n\",\n \"    2 + 1 + 1\\n\",\n \"    1 + 1 + 1 + 1\\n\\n\",\n `How many different ways can the number ${n} be written as a sum of at least`,\n \"two positive integers?\",\n ].join(\" \");\n },\n difficulty: 1.5,\n gen: (): number => {\n return getRandomInt(8, 100);\n },\n name: \"Total Ways to Sum\",\n numTries: 10,\n solver: (data: number, ans: string): boolean => {\n const ways: number[] = [1];\n ways.length = data + 1;\n ways.fill(0, 1);\n for (let i = 1; i < data; ++i) {\n for (let j: number = i; j <= data; ++j) {\n ways[j] += ways[j - i];\n }\n }\n\n return ways[data] === parseInt(ans, 10);\n },\n },\n {\n desc: (n: number[][]): string => {\n let d: string = [\n \"Given the following array of arrays of numbers representing a 2D matrix,\",\n \"return the elements of the matrix as an array in spiral order:\\n\\n\",\n ].join(\" \");\n // for (const line of n) {\n // d += `${line.toString()},\\n`;\n // }\n d += \"    [\\n\";\n d += n\n .map(\n (line: number[]) =>\n \"        [\" +\n line.map((x: number) => `${x}`.padStart(2, \" \")).join(\",\") +\n \"]\",\n )\n .join(\"\\n\");\n d += \"\\n    ]\\n\";\n d += [\n \"\\nHere is an example of what spiral order should be:\\n\\n\",\n \"    [\\n\",\n \"        [1, 2, 3]\\n\",\n \"        [4, 5, 6]\\n\",\n \"        [7, 8, 9]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 6, 9, 8 ,7, 4, 5]\\n\\n\",\n \"Note that the matrix will not always be square:\\n\\n\",\n \"    [\\n\",\n \"        [1,  2,  3,  4]\\n\",\n \"        [5,  6,  7,  8]\\n\",\n \"        [9, 10, 11, 12]\\n\",\n \"    ]\\n\\n\",\n \"Answer: [1, 2, 3, 4, 8, 12, 11, 10, 9, 5, 6, 7]\",\n ].join(\" \");\n\n return d;\n },\n difficulty: 2,\n gen: (): number[][] => {\n const m: number = getRandomInt(1, 15);\n const n: number = getRandomInt(1, 15);\n const matrix: number[][] = [];\n matrix.length = m;\n for (let i = 0; i < m; ++i) {\n matrix[i] = [];\n matrix[i].length = n;\n }\n\n for (let i = 0; i < m; ++i) {\n for (let j = 0; j < n; ++j) {\n matrix[i][j] = getRandomInt(1, 50);\n }\n }\n\n return matrix;\n },\n name: \"Spiralize Matrix\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const spiral: number[] = [];\n const m: number = data.length;\n const n: number = data[0].length;\n let u = 0;\n let d: number = m - 1;\n let l = 0;\n let r: number = n - 1;\n let k = 0;\n while (true) {\n // Up\n for (let col: number = l; col <= r; col++) {\n spiral[k] = data[u][col];\n ++k;\n }\n if (++u > d) {\n break;\n }\n\n // Right\n for (let row: number = u; row <= d; row++) {\n spiral[k] = data[row][r];\n ++k;\n }\n if (--r < l) {\n break;\n }\n\n // Down\n for (let col: number = r; col >= l; col--) {\n spiral[k] = data[d][col];\n ++k;\n }\n if (--d < u) {\n break;\n }\n\n // Left\n for (let row: number = d; row >= u; row--) {\n spiral[k] = data[row][l];\n ++k;\n }\n if (++l > r) {\n break;\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const playerAns: any[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < playerAns.length; ++i) {\n playerAns[i] = parseInt(playerAns[i], 10);\n }\n if (spiral.length !== playerAns.length) {\n return false;\n }\n for (let i = 0; i < spiral.length; ++i) {\n if (spiral[i] !== playerAns[i]) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (arr: number[]): string => {\n return [\n \"You are given the following array of integers:\\n\\n\",\n `${arr}\\n\\n`,\n \"Each element in the array represents your MAXIMUM jump length\",\n \"at that position. This means that if you are at position i and your\",\n \"maximum jump length is n, you can jump to any position from\",\n \"i to i+n.\",\n \"\\n\\nAssuming you are initially positioned\",\n \"at the start of the array, determine whether you are\",\n \"able to reach the last index.\\n\\n\",\n \"Your answer should be submitted as 1 or 0, representing true and false respectively\",\n ].join(\" \");\n },\n difficulty: 2.5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 25);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < arr.length; ++i) {\n if (Math.random() < 0.2) {\n arr[i] = 0; // 20% chance of being 0\n } else {\n arr[i] = getRandomInt(0, 10);\n }\n }\n\n return arr;\n },\n name: \"Array Jumping Game\",\n numTries: 1,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data.length;\n let i = 0;\n for (let reach = 0; i < n && i <= reach; ++i) {\n reach = Math.max(i + data[i], reach);\n }\n const solution: boolean = i === n;\n return (ans === \"1\" && solution) || (ans === \"0\" && !solution);\n },\n },\n {\n desc: (arr: number[][]): string => {\n return [\n \"Given the following array of array of numbers representing a list of\",\n \"intervals, merge all overlapping intervals.\\n\\n\",\n `[${convert2DArrayToString(arr)}]\\n\\n`,\n \"Example:\\n\\n\",\n \"[[1, 3], [8, 10], [2, 6], [10, 16]]\\n\\n\",\n \"would merge into [[1, 6], [8, 16]].\\n\\n\",\n \"The intervals must be returned in ASCENDING order.\",\n \"You can assume that in an interval, the first number will always be\",\n \"smaller than the second.\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[][] => {\n const intervals: number[][] = [];\n const numIntervals: number = getRandomInt(3, 20);\n for (let i = 0; i < numIntervals; ++i) {\n const start: number = getRandomInt(1, 25);\n const end: number = start + getRandomInt(1, 10);\n intervals.push([start, end]);\n }\n\n return intervals;\n },\n name: \"Merge Overlapping Intervals\",\n numTries: 15,\n solver: (data: number[][], ans: string): boolean => {\n const intervals: number[][] = data.slice();\n intervals.sort((a: number[], b: number[]) => {\n return a[0] - b[0];\n });\n\n const result: number[][] = [];\n let start: number = intervals[0][0];\n let end: number = intervals[0][1];\n for (const interval of intervals) {\n if (interval[0] <= end) {\n end = Math.max(end, interval[1]);\n } else {\n result.push([start, end]);\n start = interval[0];\n end = interval[1];\n }\n }\n result.push([start, end]);\n\n const sanitizedResult: string = convert2DArrayToString(result);\n const sanitizedAns: string = ans.replace(/\\s/g, \"\");\n\n return sanitizedResult === sanitizedAns || sanitizedResult === removeBracketsFromArrayString(sanitizedAns);\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string containing only digits, return\",\n \"an array with all possible valid IP address combinations\",\n \"that can be created from the string:\\n\\n\",\n `${data}\\n\\n`,\n \"Note that an octet cannot begin with a '0' unless the number\",\n \"itself is actually 0. For example, '192.168.010.1' is not a valid IP.\\n\\n\",\n \"Examples:\\n\\n\",\n \"25525511135 -> [255.255.11.135, 255.255.111.35]\\n\",\n \"1938718066 -> [193.87.180.66]\",\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): string => {\n let str = \"\";\n for (let i = 0; i < 4; ++i) {\n const num: number = getRandomInt(0, 255);\n const convNum: string = num.toString();\n str += convNum;\n }\n\n return str;\n },\n name: \"Generate IP Addresses\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n const ret: string[] = [];\n for (let a = 1; a <= 3; ++a) {\n for (let b = 1; b <= 3; ++b) {\n for (let c = 1; c <= 3; ++c) {\n for (let d = 1; d <= 3; ++d) {\n if (a + b + c + d === data.length) {\n const A: number = parseInt(data.substring(0, a), 10);\n const B: number = parseInt(data.substring(a, a + b), 10);\n const C: number = parseInt(data.substring(a + b, a + b + c), 10);\n const D: number = parseInt(data.substring(a + b + c, a + b + c + d), 10);\n if (A <= 255 && B <= 255 && C <= 255 && D <= 255) {\n const ip: string = [A.toString(), \".\", B.toString(), \".\", C.toString(), \".\", D.toString()].join(\"\");\n if (ip.length === data.length + 3) {\n ret.push(ip);\n }\n }\n }\n }\n }\n }\n }\n\n const sanitizedAns: string = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n const ansArr: string[] = sanitizedAns.split(\",\");\n if (ansArr.length !== ret.length) {\n return false;\n }\n for (const ipInAns of ansArr) {\n if (!ret.includes(ipInAns)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"one transaction (i.e. you can only buy and sell the stock once). If no profit can be made\",\n \"then the answer should be 0. Note\",\n \"that you have to buy the stock before you can sell it\",\n ].join(\" \");\n },\n difficulty: 1,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader I\",\n numTries: 5,\n solver: (data: number[], ans: string): boolean => {\n let maxCur = 0;\n let maxSoFar = 0;\n for (let i = 1; i < data.length; ++i) {\n maxCur = Math.max(0, (maxCur += data[i] - data[i - 1]));\n maxSoFar = Math.max(maxCur, maxSoFar);\n }\n\n return maxSoFar.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using as many\",\n \"transactions as you'd like. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 2,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader II\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let profit = 0;\n for (let p = 1; p < data.length; ++p) {\n profit += Math.max(data[p] - data[p - 1], 0);\n }\n\n return profit.toString() === ans;\n },\n },\n {\n desc: (data: number[]): string => {\n return [\n \"You are given the following array of stock prices (which are numbers)\",\n \"where the i-th element represents the stock price on day i:\\n\\n\",\n `${data}\\n\\n`,\n \"Determine the maximum possible profit you can earn using at most\",\n \"two transactions. A transaction is defined as buying\",\n \"and then selling one share of the stock. Note that you cannot\",\n \"engage in multiple transactions at once. In other words, you\",\n \"must sell the stock before you buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[] => {\n const len: number = getRandomInt(3, 50);\n const arr: number[] = [];\n arr.length = len;\n for (let i = 0; i < len; ++i) {\n arr[i] = getRandomInt(1, 200);\n }\n\n return arr;\n },\n name: \"Algorithmic Stock Trader III\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n let hold1: number = Number.MIN_SAFE_INTEGER;\n let hold2: number = Number.MIN_SAFE_INTEGER;\n let release1 = 0;\n let release2 = 0;\n for (const price of data) {\n release2 = Math.max(release2, hold2 + price);\n hold2 = Math.max(hold2, release1 - price);\n release1 = Math.max(release1, hold1 + price);\n hold1 = Math.max(hold1, price * -1);\n }\n\n return release2.toString() === ans;\n },\n },\n {\n desc: (data: any[]): string => {\n const k: number = data[0];\n const prices: number[] = data[1];\n return [\n \"You are given the following array with two elements:\\n\\n\",\n `[${k}, [${prices}]]\\n\\n`,\n \"The first element is an integer k. The second element is an\",\n \"array of stock prices (which are numbers) where the i-th element\",\n \"represents the stock price on day i.\\n\\n\",\n \"Determine the maximum possible profit you can earn using at most\",\n \"k transactions. A transaction is defined as buying and then selling\",\n \"one share of the stock. Note that you cannot engage in multiple\",\n \"transactions at once. In other words, you must sell the stock before\",\n \"you can buy it again.\\n\\n\",\n \"If no profit can be made, then the answer should be 0.\",\n ].join(\" \");\n },\n difficulty: 8,\n gen: (): any[] => {\n const k: number = getRandomInt(2, 10);\n const len: number = getRandomInt(3, 50);\n const prices: number[] = [];\n prices.length = len;\n for (let i = 0; i < len; ++i) {\n prices[i] = getRandomInt(1, 200);\n }\n\n return [k, prices];\n },\n name: \"Algorithmic Stock Trader IV\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const k: number = data[0];\n const prices: number[] = data[1];\n\n const len = prices.length;\n if (len < 2) {\n return parseInt(ans) === 0;\n }\n if (k > len / 2) {\n let res = 0;\n for (let i = 1; i < len; ++i) {\n res += Math.max(prices[i] - prices[i - 1], 0);\n }\n\n return parseInt(ans) === res;\n }\n\n const hold: number[] = [];\n const rele: number[] = [];\n hold.length = k + 1;\n rele.length = k + 1;\n for (let i = 0; i <= k; ++i) {\n hold[i] = Number.MIN_SAFE_INTEGER;\n rele[i] = 0;\n }\n\n let cur: number;\n for (let i = 0; i < len; ++i) {\n cur = prices[i];\n for (let j = k; j > 0; --j) {\n rele[j] = Math.max(rele[j], hold[j] + cur);\n hold[j] = Math.max(hold[j], rele[j - 1] - cur);\n }\n }\n\n return parseInt(ans) === rele[k];\n },\n },\n {\n desc: (data: number[][]): string => {\n function createTriangleRecurse(data: number[][], level = 0): string {\n const numLevels: number = data.length;\n if (level >= numLevels) {\n return \"\";\n }\n const numSpaces = numLevels - level + 1;\n\n let str: string = [\" \".repeat(numSpaces), \"[\", data[level].toString(), \"]\"].join(\"\");\n if (level < numLevels - 1) {\n str += \",\";\n }\n\n return str + \"\\n\" + createTriangleRecurse(data, level + 1);\n }\n\n function createTriangle(data: number[][]): string {\n return [\"[\\n\", createTriangleRecurse(data), \"]\"].join(\"\");\n }\n\n const triangle = createTriangle(data);\n\n return [\n \"Given a triangle, find the minimum path sum from top to bottom. In each step\",\n \"of the path, you may only move to adjacent numbers in the row below.\",\n \"The triangle is represented as a 2D array of numbers:\\n\\n\",\n `${triangle}\\n\\n`,\n \"Example: If you are given the following triangle:\\n\\n[\\n\",\n \"     [2],\\n\",\n \"    [3,4],\\n\",\n \"   [6,5,7],\\n\",\n \"  [4,1,8,3]\\n\",\n \"]\\n\\n\",\n \"The minimum path sum is 11 (2 -> 3 -> 5 -> 1).\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const triangle: number[][] = [];\n const levels: number = getRandomInt(3, 12);\n triangle.length = levels;\n\n for (let row = 0; row < levels; ++row) {\n triangle[row] = [];\n triangle[row].length = row + 1;\n for (let i = 0; i < triangle[row].length; ++i) {\n triangle[row][i] = getRandomInt(1, 9);\n }\n }\n\n return triangle;\n },\n name: \"Minimum Path Sum in a Triangle\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const n: number = data.length;\n const dp: number[] = data[n - 1].slice();\n for (let i = n - 2; i > -1; --i) {\n for (let j = 0; j < data[i].length; ++j) {\n dp[j] = Math.min(dp[j], dp[j + 1]) + data[i][j];\n }\n }\n\n return dp[0] === parseInt(ans);\n },\n },\n {\n desc: (data: number[]): string => {\n const numRows = data[0];\n const numColumns = data[1];\n return [\n \"You are in a grid with\",\n `${numRows} rows and ${numColumns} columns, and you are`,\n \"positioned in the top-left corner of that grid. You are trying to\",\n \"reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Determine how many\",\n \"unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an array\",\n \"with the number of rows and columns:\\n\\n\",\n `[${numRows}, ${numColumns}]`,\n ].join(\" \");\n },\n difficulty: 3,\n gen: (): number[] => {\n const numRows: number = getRandomInt(2, 14);\n const numColumns: number = getRandomInt(2, 14);\n\n return [numRows, numColumns];\n },\n name: \"Unique Paths in a Grid I\",\n numTries: 10,\n solver: (data: number[], ans: string): boolean => {\n const n: number = data[0]; // Number of rows\n const m: number = data[1]; // Number of columns\n const currentRow: number[] = [];\n currentRow.length = n;\n\n for (let i = 0; i < n; i++) {\n currentRow[i] = 1;\n }\n for (let row = 1; row < m; row++) {\n for (let i = 1; i < n; i++) {\n currentRow[i] += currentRow[i - 1];\n }\n }\n\n return parseInt(ans) === currentRow[n - 1];\n },\n },\n {\n desc: (data: number[][]): string => {\n let gridString = \"\";\n for (const line of data) {\n gridString += `${line.toString()},\\n`;\n }\n return [\n \"You are located in the top-left corner of the following grid:\\n\\n\",\n `${gridString}\\n`,\n \"You are trying reach the bottom-right corner of the grid, but you can only\",\n \"move down or right on each step. Furthermore, there are obstacles on the grid\",\n \"that you cannot move onto. These obstacles are denoted by '1', while empty\",\n \"spaces are denoted by 0.\\n\\n\",\n \"Determine how many unique paths there are from start to finish.\\n\\n\",\n \"NOTE: The data returned for this contract is an 2D array of numbers representing the grid.\",\n ].join(\" \");\n },\n difficulty: 5,\n gen: (): number[][] => {\n const numRows: number = getRandomInt(2, 12);\n const numColumns: number = getRandomInt(2, 12);\n\n const grid: number[][] = [];\n grid.length = numRows;\n for (let i = 0; i < numRows; ++i) {\n grid[i] = [];\n grid[i].length = numColumns;\n grid[i].fill(0);\n }\n\n for (let r = 0; r < numRows; ++r) {\n for (let c = 0; c < numColumns; ++c) {\n if (r === 0 && c === 0) {\n continue;\n }\n if (r === numRows - 1 && c === numColumns - 1) {\n continue;\n }\n\n // 15% chance of an element being an obstacle\n if (Math.random() < 0.15) {\n grid[r][c] = 1;\n }\n }\n }\n\n return grid;\n },\n name: \"Unique Paths in a Grid II\",\n numTries: 10,\n solver: (data: number[][], ans: string): boolean => {\n const obstacleGrid: number[][] = [];\n obstacleGrid.length = data.length;\n for (let i = 0; i < obstacleGrid.length; ++i) {\n obstacleGrid[i] = data[i].slice();\n }\n\n for (let i = 0; i < obstacleGrid.length; i++) {\n for (let j = 0; j < obstacleGrid[0].length; j++) {\n if (obstacleGrid[i][j] == 1) {\n obstacleGrid[i][j] = 0;\n } else if (i == 0 && j == 0) {\n obstacleGrid[0][0] = 1;\n } else {\n obstacleGrid[i][j] = (i > 0 ? obstacleGrid[i - 1][j] : 0) + (j > 0 ? obstacleGrid[i][j - 1] : 0);\n }\n }\n }\n\n return obstacleGrid[obstacleGrid.length - 1][obstacleGrid[0].length - 1] === parseInt(ans);\n },\n },\n {\n desc: (data: string): string => {\n return [\n \"Given the following string:\\n\\n\",\n `${data}\\n\\n`,\n \"remove the minimum number of invalid parentheses in order to validate\",\n \"the string. If there are multiple minimal ways to validate the string,\",\n \"provide all of the possible results. The answer should be provided\",\n \"as an array of strings. If it is impossible to validate the string\",\n \"the result should be an array with only an empty string.\\n\\n\",\n \"IMPORTANT: The string may contain letters, not just parentheses.\",\n `Examples:\\n`,\n `\"()())()\" -> [()()(), (())()]\\n`,\n `\"(a)())()\" -> [(a)()(), (a())()]\\n`,\n `\")(\" -> [\"\"]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): string => {\n const len: number = getRandomInt(6, 20);\n const chars: string[] = [];\n chars.length = len;\n\n // 80% chance of the first parenthesis being (\n Math.random() < 0.8 ? (chars[0] = \"(\") : (chars[0] = \")\");\n\n for (let i = 1; i < len; ++i) {\n const roll = Math.random();\n if (roll < 0.4) {\n chars[i] = \"(\";\n } else if (roll < 0.8) {\n chars[i] = \")\";\n } else {\n chars[i] = \"a\";\n }\n }\n\n return chars.join(\"\");\n },\n name: \"Sanitize Parentheses in Expression\",\n numTries: 10,\n solver: (data: string, ans: string): boolean => {\n let left = 0;\n let right = 0;\n const res: string[] = [];\n\n for (let i = 0; i < data.length; ++i) {\n if (data[i] === \"(\") {\n ++left;\n } else if (data[i] === \")\") {\n left > 0 ? --left : ++right;\n }\n }\n\n function dfs(\n pair: number,\n index: number,\n left: number,\n right: number,\n s: string,\n solution: string,\n res: string[],\n ): void {\n if (s.length === index) {\n if (left === 0 && right === 0 && pair === 0) {\n for (let i = 0; i < res.length; i++) {\n if (res[i] === solution) {\n return;\n }\n }\n res.push(solution);\n }\n return;\n }\n\n if (s[index] === \"(\") {\n if (left > 0) {\n dfs(pair, index + 1, left - 1, right, s, solution, res);\n }\n dfs(pair + 1, index + 1, left, right, s, solution + s[index], res);\n } else if (s[index] === \")\") {\n if (right > 0) dfs(pair, index + 1, left, right - 1, s, solution, res);\n if (pair > 0) dfs(pair - 1, index + 1, left, right, s, solution + s[index], res);\n } else {\n dfs(pair, index + 1, left, right, s, solution + s[index], res);\n }\n }\n\n dfs(0, 0, left, right, data, \"\", res);\n\n const sanitizedPlayerAns = removeBracketsFromArrayString(ans).replace(/\\s/g, \"\");\n\n const playerAnsArray: string[] = sanitizedPlayerAns.split(\",\");\n if (playerAnsArray.length !== res.length) {\n return false;\n }\n for (const resultInAnswer of res) {\n if (!playerAnsArray.includes(resultInAnswer)) {\n return false;\n }\n }\n\n return true;\n },\n },\n {\n desc: (data: any[]): string => {\n const digits: string = data[0];\n const target: number = data[1];\n\n return [\n \"You are given the following string which contains only digits between 0 and 9:\\n\\n\",\n `${digits}\\n\\n`,\n `You are also given a target number of ${target}. Return all possible ways`,\n \"you can add the +(add), -(subtract), and *(multiply) operators to the string such\",\n \"that it evaluates to the target number. (Normal order of operations applies.)\\n\\n\",\n \"The provided answer should be an array of strings containing the valid expressions.\",\n \"The data provided by this problem is an array with two elements. The first element\",\n \"is the string of digits, while the second element is the target number:\\n\\n\",\n `[\"${digits}\", ${target}]\\n\\n`,\n \"NOTE: The order of evaluation expects script operator precedence\",\n \"NOTE: Numbers in the expression cannot have leading 0's. In other words,\",\n `\"1+01\" is not a valid expression`,\n \"Examples:\\n\\n\",\n `Input: digits = \"123\", target = 6\\n`,\n `Output: [1+2+3, 1*2*3]\\n\\n`,\n `Input: digits = \"105\", target = 5\\n`,\n `Output: [1*0+5, 10-5]`,\n ].join(\" \");\n },\n difficulty: 10,\n gen: (): any[] => {\n const numDigits = getRandomInt(4, 12);\n const digitsArray: string[] = [];\n digitsArray.length = numDigits;\n for (let i = 0; i < digitsArray.length; ++i) {\n if (i === 0) {\n digitsArray[i] = String(getRandomInt(1, 9));\n } else {\n digitsArray[i] = String(getRandomInt(0, 9));\n }\n }\n\n const target: number = getRandomInt(-100, 100);\n const digits: string = digitsArray.join(\"\");\n\n return [digits, target];\n },\n name: \"Find All Valid Math Expressions\",\n numTries: 10,\n solver: (data: any[], ans: string): boolean => {\n const num: string = data[0];\n const target: number = data[1];\n\n function helper(\n res: string[],\n path: string,\n num: string,\n target: number,\n pos: number,\n evaluated: number,\n multed: number,\n ): void {\n if (pos === num.length) {\n if (target === evaluated) {\n res.push(path);\n }\n return;\n }\n\n for (let i = pos; i < num.length; ++i) {\n if (i != pos && num[pos] == \"0\") {\n break;\n }\n const cur = parseInt(num.substring(pos, i + 1));\n\n if (pos === 0) {\n helper(res, path + cur, num, target, i + 1, cur, cur);\n } else {\n helper(res, path + \"+\" + cur, num, target, i + 1, evaluated + cur, cur);\n helper(res, path + \"-\" + cur, num, target, i + 1, evaluated - cur, -cur);\n helper(res, path + \"*\" + cur, num, target, i + 1, evaluated - multed + multed * cur, multed * cur);\n }\n }\n }\n\n const sanitizedPlayerAns: string = removeBracketsFromArrayString(ans);\n const sanitizedPlayerAnsArr: string[] = sanitizedPlayerAns.split(\",\");\n for (let i = 0; i < sanitizedPlayerAnsArr.length; ++i) {\n sanitizedPlayerAnsArr[i] = removeQuotesFromString(sanitizedPlayerAnsArr[i]).replace(/\\s/g, \"\");\n }\n\n if (num == null || num.length === 0) {\n if (sanitizedPlayerAnsArr.length === 0) {\n return true;\n }\n if (sanitizedPlayerAnsArr.length === 1 && sanitizedPlayerAnsArr[0] === \"\") {\n return true;\n }\n return false;\n }\n\n const result: string[] = [];\n helper(result, \"\", num, target, 0, 0, 0);\n\n for (const expr of result) {\n if (!sanitizedPlayerAnsArr.includes(expr)) {\n return false;\n }\n }\n\n return true;\n },\n },\n];\n","// Function that generates a random gibberish string of length n\nconst chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789\";\n\nexport function createRandomString(n: number): string {\n let str = \"\";\n\n for (let i = 0; i < n; ++i) {\n str += chars.charAt(Math.floor(Math.random() * chars.length));\n }\n\n return str;\n}\n","import { BaseServer } from \"../Server/BaseServer\";\nimport { ITerminal } from \"../Terminal/ITerminal\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IRouter } from \"../ui/Router\";\n\nexport interface IProgramCreate {\n level: number;\n req(p: IPlayer): boolean; // Function that indicates whether player meets requirements\n time: number;\n tooltip: string;\n}\n\nexport class Program {\n name = \"\";\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n\n constructor(\n name: string,\n create: IProgramCreate | null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void,\n ) {\n this.name = name;\n this.create = create;\n this.run = run;\n }\n\n htmlID(): string {\n const name = this.name.endsWith(\".exe\") ? this.name.slice(0, -\".exe\".length) : this.name;\n return \"create-program-\" + name;\n }\n}\n","import { IProgramCreate } from \"../Program\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\nimport { ITerminal } from \"../../Terminal/ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { BitFlumeEvent } from \"../../BitNode/ui/BitFlumeModal\";\nimport { calculateHackingTime, calculateGrowTime, calculateWeakenTime } from \"../../Hacking\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nfunction requireHackingLevel(lvl: number) {\n return function (p: IPlayer) {\n return p.hacking + p.intelligence / 2 >= lvl;\n };\n}\n\nfunction bitFlumeRequirements() {\n return function (p: IPlayer) {\n return p.sourceFiles.length > 0 && p.hacking >= 1;\n };\n}\n\ninterface IProgramCreationParams {\n key: string;\n name: string;\n create: IProgramCreate | null;\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]) => void;\n}\n\nexport const programsMetadata: IProgramCreationParams[] = [\n {\n key: \"NukeProgram\",\n name: \"NUKE.exe\",\n create: {\n level: 1,\n tooltip: \"This virus is used to gain root access to a machine if enough ports are opened.\",\n req: requireHackingLevel(1),\n time: CONSTANTS.MillisecondsPerFiveMinutes,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot nuke this kind of server.\");\n return;\n }\n if (server.hasAdminRights) {\n terminal.print(\"You already have root access to this computer. There is no reason to run NUKE.exe\");\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n if (server.openPortCount >= server.numOpenPortsRequired) {\n server.hasAdminRights = true;\n terminal.print(\"NUKE successful! Gained root access to \" + server.hostname);\n terminal.print(\"You can now run scripts on this server.\");\n return;\n }\n\n terminal.print(\"NUKE unsuccessful. Not enough ports have been opened\");\n },\n },\n {\n key: \"BruteSSHProgram\",\n name: \"BruteSSH.exe\",\n create: {\n level: 50,\n tooltip: \"This program executes a brute force attack that opens SSH ports\",\n req: requireHackingLevel(50),\n time: CONSTANTS.MillisecondsPerFiveMinutes * 2,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run BruteSSH.exe on this kind of server.\");\n return;\n }\n if (server.sshPortOpen) {\n terminal.print(\"SSH Port (22) is already open!\");\n return;\n }\n\n server.sshPortOpen = true;\n terminal.print(\"Opened SSH Port(22)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"FTPCrackProgram\",\n name: \"FTPCrack.exe\",\n create: {\n level: 100,\n tooltip: \"This program cracks open FTP ports\",\n req: requireHackingLevel(100),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run FTPCrack.exe on this kind of server.\");\n return;\n }\n if (server.ftpPortOpen) {\n terminal.print(\"FTP Port (21) is already open!\");\n return;\n }\n\n server.ftpPortOpen = true;\n terminal.print(\"Opened FTP Port (21)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"RelaySMTPProgram\",\n name: \"relaySMTP.exe\",\n create: {\n level: 250,\n tooltip: \"This program opens SMTP ports by redirecting data\",\n req: requireHackingLevel(250),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run relaySMTP.exe on this kind of server.\");\n return;\n }\n if (server.smtpPortOpen) {\n terminal.print(\"SMTP Port (25) is already open!\");\n return;\n }\n\n server.smtpPortOpen = true;\n terminal.print(\"Opened SMTP Port (25)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"HTTPWormProgram\",\n name: \"HTTPWorm.exe\",\n create: {\n level: 500,\n tooltip: \"This virus opens up HTTP ports\",\n req: requireHackingLevel(500),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run HTTPWorm.exe on this kind of server.\");\n return;\n }\n if (server.httpPortOpen) {\n terminal.print(\"HTTP Port (80) is already open!\");\n return;\n }\n\n server.httpPortOpen = true;\n terminal.print(\"Opened HTTP Port (80)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"SQLInjectProgram\",\n name: \"SQLInject.exe\",\n create: {\n level: 750,\n tooltip: \"This virus opens SQL ports\",\n req: requireHackingLevel(750),\n time: CONSTANTS.MillisecondsPer8Hours,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer): void => {\n if (!(server instanceof Server)) {\n terminal.error(\"Cannot run SQLInject.exe on this kind of server.\");\n return;\n }\n if (server.sqlPortOpen) {\n terminal.print(\"SQL Port (1433) is already open!\");\n return;\n }\n\n server.sqlPortOpen = true;\n terminal.print(\"Opened SQL Port (1433)!\");\n server.openPortCount++;\n },\n },\n {\n key: \"DeepscanV1\",\n name: \"DeepscanV1.exe\",\n create: {\n level: 75,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 5\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV1.exe lets you run 'scan-analyze' with a depth up to 5.\");\n },\n },\n {\n key: \"DeepscanV2\",\n name: \"DeepscanV2.exe\",\n create: {\n level: 400,\n tooltip: \"This program allows you to use the scan-analyze command with a depth up to 10\",\n req: requireHackingLevel(400),\n time: CONSTANTS.MillisecondsPer2Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"DeepscanV2.exe lets you run 'scan-analyze' with a depth up to 10.\");\n },\n },\n {\n key: \"ServerProfiler\",\n name: \"ServerProfiler.exe\",\n create: {\n level: 75,\n tooltip: \"This program is used to display hacking and Netscript-related information about servers\",\n req: requireHackingLevel(75),\n time: CONSTANTS.MillisecondsPerHalfHour,\n },\n run: (router: IRouter, terminal: ITerminal, player: IPlayer, server: BaseServer, args: string[]): void => {\n if (args.length !== 1) {\n terminal.error(\"Must pass a server hostname or IP as an argument for ServerProfiler.exe\");\n return;\n }\n\n const targetServer = GetServer(args[0]);\n if (targetServer == null) {\n terminal.error(\"Invalid server IP/hostname\");\n return;\n }\n\n if (!(targetServer instanceof Server)) {\n terminal.error(`ServerProfiler.exe can only be run on normal servers.`);\n return;\n }\n\n terminal.print(targetServer.hostname + \":\");\n terminal.print(\"Server base security level: \" + targetServer.baseDifficulty);\n terminal.print(\"Server current security level: \" + targetServer.hackDifficulty);\n terminal.print(\"Server growth rate: \" + targetServer.serverGrowth);\n terminal.print(\n `Netscript hack() execution time: ${convertTimeMsToTimeElapsedString(\n calculateHackingTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript grow() execution time: ${convertTimeMsToTimeElapsedString(\n calculateGrowTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n terminal.print(\n `Netscript weaken() execution time: ${convertTimeMsToTimeElapsedString(\n calculateWeakenTime(targetServer, player) * 1000,\n true,\n )}`,\n );\n },\n },\n {\n key: \"AutoLink\",\n name: \"AutoLink.exe\",\n create: {\n level: 25,\n tooltip: \"This program allows you to directly connect to other servers through the 'scan-analyze' command\",\n req: requireHackingLevel(25),\n time: CONSTANTS.MillisecondsPerQuarterHour,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"AutoLink.exe lets you automatically connect to other servers when using 'scan-analyze'.\");\n terminal.print(\"When using scan-analyze, click on a server's hostname to connect to it.\");\n },\n },\n {\n key: \"Formulas\",\n name: \"Formulas.exe\",\n create: {\n level: 1000,\n tooltip: \"This program allows you to use the formulas API\",\n req: requireHackingLevel(1000),\n time: CONSTANTS.MillisecondsPer4Hours,\n },\n run: (router: IRouter, terminal: ITerminal): void => {\n terminal.print(\"This executable cannot be run.\");\n terminal.print(\"Formulas.exe lets you use the formulas API.\");\n },\n },\n {\n key: \"BitFlume\",\n name: \"b1t_flum3.exe\",\n create: {\n level: 1,\n tooltip: \"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)\",\n req: bitFlumeRequirements(),\n time: CONSTANTS.MillisecondsPerFiveMinutes / 20,\n },\n run: (): void => {\n BitFlumeEvent.emit();\n },\n },\n {\n key: \"Flight\",\n name: \"fl1ght.exe\",\n create: null,\n run: (router: IRouter, terminal: ITerminal, player: IPlayer): void => {\n const numAugReq = Math.round(BitNodeMultipliers.DaedalusAugsRequirement * 30);\n const fulfilled = player.augmentations.length >= numAugReq && player.money > 1e11 && player.hacking >= 2500;\n if (!fulfilled) {\n terminal.print(`Augmentations: ${player.augmentations.length} / ${numAugReq}`);\n terminal.print(`Money: ${numeralWrapper.formatMoney(player.money)} / $100b`);\n terminal.print(`Hacking skill: ${player.hacking} / 2500`);\n return;\n }\n\n terminal.print(\"We will contact you.\");\n terminal.print(`-- ${FactionNames.Daedalus} --`);\n },\n },\n];\n","/**\n * Checks whether a IP Address string is valid.\n * @param ipaddress A string representing a potential IP Address\n */\nexport function isValidIPAddress(ipaddress: string): boolean {\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\n return ipAddressRegex.test(ipaddress);\n}\n","import { IMap } from \"../../types\";\nimport { CONSTANTS } from \"../../Constants\";\n\nimport { IPlayer } from \"../IPlayer\";\n\nexport const calculateEntropy = (player: IPlayer, stacks = 1): IMap => {\n const multipliers: IMap = {\n hacking_chance_mult: player.hacking_chance_mult,\n hacking_speed_mult: player.hacking_speed_mult,\n hacking_money_mult: player.hacking_money_mult,\n hacking_grow_mult: player.hacking_grow_mult,\n\n hacking_mult: player.hacking_mult,\n strength_mult: player.strength_mult,\n defense_mult: player.defense_mult,\n dexterity_mult: player.dexterity_mult,\n agility_mult: player.agility_mult,\n charisma_mult: player.charisma_mult,\n\n hacking_exp_mult: player.hacking_exp_mult,\n strength_exp_mult: player.strength_exp_mult,\n defense_exp_mult: player.defense_exp_mult,\n dexterity_exp_mult: player.dexterity_exp_mult,\n agility_exp_mult: player.agility_exp_mult,\n charisma_exp_mult: player.charisma_exp_mult,\n\n company_rep_mult: player.company_rep_mult,\n faction_rep_mult: player.faction_rep_mult,\n\n crime_money_mult: player.crime_money_mult,\n crime_success_mult: player.crime_success_mult,\n\n hacknet_node_money_mult: player.hacknet_node_money_mult,\n hacknet_node_purchase_cost_mult: player.hacknet_node_purchase_cost_mult,\n hacknet_node_ram_cost_mult: player.hacknet_node_ram_cost_mult,\n hacknet_node_core_cost_mult: player.hacknet_node_core_cost_mult,\n hacknet_node_level_cost_mult: player.hacknet_node_level_cost_mult,\n\n work_money_mult: player.work_money_mult,\n\n bladeburner_max_stamina_mult: player.bladeburner_max_stamina_mult,\n bladeburner_stamina_gain_mult: player.bladeburner_stamina_gain_mult,\n bladeburner_analysis_mult: player.bladeburner_analysis_mult,\n bladeburner_success_chance_mult: player.bladeburner_success_chance_mult,\n };\n\n for (const [mult, val] of Object.entries(multipliers)) {\n multipliers[mult] = val * CONSTANTS.EntropyEffect ** stacks;\n }\n\n return multipliers;\n};\n","/**\n * Returns a MM/DD HH:MM timestamp for the current time\n */\nexport function getTimestamp(): string {\n const d: Date = new Date();\n // A negative slice value takes from the end of the string rather than the beginning.\n const stringWidth = -2;\n const formattedHours: string = `0${d.getHours()}`.slice(stringWidth);\n const formattedMinutes: string = `0${d.getMinutes()}`.slice(stringWidth);\n const formattedSeconds: string = `0${d.getSeconds()}`.slice(stringWidth);\n\n return `${d.getMonth() + 1}/${d.getDate()} ${formattedHours}:${formattedMinutes}:${formattedSeconds}`;\n}\n","export function CalculateShareMult(power: number): number {\n const x = 1 + Math.log(power) / 25;\n if (isNaN(x) || !isFinite(x)) return 1;\n return x;\n}\n","import { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\n\n// Array of all valid states\nconst AllCorporationStates: string[] = [\"START\", \"PURCHASE\", \"PRODUCTION\", \"SALE\", \"EXPORT\"];\n\nexport class CorporationState {\n // Number representing what state the Corporation is in. The number\n // is an index for the array that holds all Corporation States\n state = 0;\n\n // Get the name of the current state\n // NOTE: This does NOT return the number stored in the 'state' property,\n // which is just an index for the array of all possible Corporation States.\n getState(): string {\n return AllCorporationStates[this.state];\n }\n\n // Transition to the next state\n nextState(): void {\n if (this.state < 0 || this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n\n ++this.state;\n if (this.state >= AllCorporationStates.length) {\n this.state = 0;\n }\n }\n\n // Serialize the current object to a JSON save state.\n toJSON(): any {\n return Generic_toJSON(\"CorporationState\", this);\n }\n\n // Initiatizes a CorporationState object from a JSON save state.\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): CorporationState {\n return Generic_fromJSON(CorporationState, value.data);\n }\n}\n\nReviver.constructors.CorporationState = CorporationState;\n","import { CityName } from './../Locations/data/CityNames';\nimport { Literature } from \"./Literature\";\nimport { LiteratureNames } from \"./data/LiteratureNames\";\nimport { IMap } from \"../types\";\nimport { FactionNames } from \"../Faction/data/FactionNames\";\n\nexport const Literatures: IMap = {};\n\n(function () {\n let title, fn, txt;\n title = \"The Beginner's Guide to Hacking\";\n fn = LiteratureNames.HackersStartingHandbook;\n txt =\n \"Some resources:

    \" +\n \"Learn to Program

    \" +\n \"For Experienced JavaScript Developers: NetscriptJS

    \" +\n \"Netscript Documentation

    \" +\n \"When starting out, hacking is the most profitable way to earn money and progress. This \" +\n \"is a brief collection of tips/pointers on how to make the most out of your hacking scripts.

    \" +\n \"-hack() and grow() both work by percentages. hack() steals a certain percentage of the \" +\n \"money on a server, and grow() increases the amount of money on a server by some percentage (multiplicatively)

    \" +\n \"-Because hack() and grow() work by percentages, they are more effective if the target server has a high amount of money. \" +\n \"Therefore, you should try to increase the amount of money on a server (using grow()) to a certain amount before hacking it. Two \" +\n \"important Netscript functions for this are getServerMoneyAvailable() and getServerMaxMoney()

    \" +\n \"-Keep security level low. Security level affects everything when hacking. Two important Netscript functions \" +\n \"for this are getServerSecurityLevel() and getServerMinSecurityLevel()

    \" +\n \"-Purchase additional servers by visiting 'Alpha Enterprises' in the city. They are relatively cheap \" +\n \"and give you valuable RAM to run more scripts early in the game

    \" +\n \"-Prioritize upgrading the RAM on your home computer. This can also be done at 'Alpha Enterprises'

    \" +\n \"-Many low level servers have free RAM. You can use this RAM to run your scripts. Use the scp Terminal or \" +\n \"Netscript command to copy your scripts onto these servers and then run them.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Complete Handbook for Creating a Successful Corporation\";\n fn = LiteratureNames.CorporationManagementHandbook;\n txt =\n \"Getting Started with Corporations
    \" +\n \"To get started, visit the City Hall in Sector-12 in order to create a Corporation. This requires \" +\n \"$150b of your own money, but this $150b will get put into your Corporation's funds. \" +\n \"Your Corporation can have many different divisions, each in a different Industry. There are many different \" +\n \"types of Industries, each with different properties. To create your first division, click the \" +\n \"'Expand into new Industry' button at the top of the management UI. The Agriculture \" +\n \"and Software industries are recommended for your first division.

    \" +\n \"The first thing you'll need to do is hire some employees. Employees can be assigned to five different positions. \" +\n \"Each position has a different effect on various aspects of your Corporation. It is recommended to have at least \" +\n \"one employee at each position.

    \" +\n \"Each industry uses some combination of Materials in order to produce other Materials and/or create Products. \" +\n \"Specific information about this is displayed in each of your divisions' UI.

    \" +\n \"Products are special, industry-specific objects. They are different than Materials because you \" +\n \"must manually choose to develop them, and you can choose to develop any number of Products. Developing \" +\n \"a Product takes time, but a Product typically generates significantly more revenue than any Material. \" +\n \"Not all industries allow you to create Products. To create a Product, look for a button \" +\n \"in the top-left panel of the division UI (e.g. For the Software Industry, the button says 'Develop Software').

    \" +\n \"To get your supply chain system started, \" +\n \"purchase the Materials that your industry needs to produce other Materials/Products. This can be done \" +\n \"by clicking the 'Buy' button next to the corresponding Material(s). After you have the required Materials, \" +\n \"you will immediately start production. The amount of Materials/Products you produce is based on a variety of factors, \" +\n \"one of which is your employees and their productivity.

    \" +\n \"Once you start producing Materials/Products, you can sell them in order to start earning revenue. This can be done \" +\n \"by clicking the 'Sell' button next to the corresponding Material or Product. The amount of Material/Product you sell is dependent \" +\n \"on a wide variety of different factors.

    \" +\n \"These are the basics of getting your Corporation up and running! Now, you can start purchasing upgrades to improve \" +\n \"your bottom line. If you need money, consider looking for seed investors, who will give you money in exchange for stock shares. \" +\n \"Otherwise, once you feel you are ready, take your Corporation public! Once your Corporation goes public, you can no longer \" +\n \"find investors. Instead, your Corporation will be publicly traded and its stock price will change based on how well \" +\n \"it's performing financially. You can then sell your stock shares in order to make money.

    \" +\n \"Tips/Pointers
    \" +\n \"-The 'Smart Supply' upgrade is extremely useful. Consider purchasing it as soon as possible.

    \" +\n \"-Purchasing Hardware, Robots, AI Cores, and Real Estate can potentially increase your production. \" +\n \"The effects of these depend on what industry you are in.

    \" +\n \"-In order to optimize your production, you will need a good balance of Operators, Managers, and Engineers

    \" +\n \"-Different employees excel in different jobs. For example, the highly intelligent employees will probably do best \" +\n \"if they are assigned to do Engineering work or Research & Development.

    \" +\n \"-If your employees have low morale, energy, or happiness, their production will greatly suffer.

    \" +\n \"-Tech is important, but don't neglect sales! Having several Businessmen can boost your sales and your bottom line.

    \" +\n \"-Don't forget to advertise your company. You won't have any business if nobody knows you.

    \" +\n \"-Having company awareness is great, but what's really important is your company's popularity. Try to keep \" +\n \"your popularity as high as possible to see the biggest benefit for your sales

    \" +\n \"-Remember, you need to spend money to make money!

    \" +\n \"-Corporations do not reset when installing Augmentations, but they do reset when destroying a BitNode\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"A Brief History of Synthoids\";\n fn = LiteratureNames.HistoryOfSynthoids;\n txt =\n \"Synthetic androids, or Synthoids for short, are genetically engineered robots and, short of Augmentations, \" +\n \"are composed entirely of organic substances. For this reason, Synthoids are virtually identical to \" +\n \"humans in form, composition, and appearance.

    \" +\n `Synthoids were first designed and manufactured by ${FactionNames.OmniTekIncorporated} sometime around the middle of the century. ` +\n \"Their original purpose was to be used for manual labor and as emergency responders for disasters. As such, they \" +\n \"were initially programmed only for their specific tasks. Each iteration that followed improved upon the \" +\n \"intelligence and capabilities of the Synthoids. By the 6th iteration, called MK-VI, the Synthoids were \" +\n `so smart and capable enough of making their own decisions that many argued ${FactionNames.OmniTekIncorporated} had created the first ` +\n \"sentient AI. These MK-VI Synthoids were produced in mass quantities (estimates up to 50 billion) with the hopes of increasing society's \" +\n \"productivity and bolstering the global economy. Stemming from humanity's desire for technological advancement, optimism \" +\n \"and excitement about the future had never been higher.

    \" +\n \"All of that excitement and optimism quickly turned to fear, panic, and dread in 2070, when a terrorist group \" +\n `called Ascendis Totalis hacked into ${FactionNames.OmniTekIncorporated} and uploaded a rogue AI into severeal of their Synthoid manufacturing facilities. ` +\n `This hack went undetected and for months ${FactionNames.OmniTekIncorporated} unknowingly churned out legions of Synthoids embedded with this ` +\n \"rogue AI. Then, on December 24th, 2070, Omnica activated dormant protocols in the rogue AI, causing all of the \" +\n \"infected Synthoids to immediately launch a military campaign to seek and destroy all of humanity.

    \" +\n \"What ensued was the deadlist conflict in human history. This crisis, now commonly known as the Synthoid Uprising, \" +\n \"resulted in almost ten billion deaths over the course of a year. Despite the nations of the world banding together \" +\n \"to combat the threat, the MK-VI Synthoids were simply stronger, faster, more intelligent, and more adaptable than humans, \" +\n \"outsmarting them at every turn.

    \" +\n `It wasn't until the sacrifice of an elite international military taskforce, called the ${FactionNames.Bladeburners}, that humanity ` +\n `was finally able to defeat the Synthoids. The ${FactionNames.Bladeburners}' final act was a suicide bombing mission that ` +\n \"destroyed a large portion of the MK-VI Synthoids, including many of its leaders. In the following \" +\n \"weeks militaries from around the world were able to round up and shut down the remaining rogue MK-VI Synthoids, ending \" +\n \"the Synthoid Uprising.

    \" +\n `In the aftermath of the bloodshed, the Synthoid Accords were drawn up. These Accords banned ${FactionNames.OmniTekIncorporated} ` +\n \"from manufacturing any Synthoids beyond the MK-III series. They also banned any other corporation \" +\n \"from constructing androids with advanced, near-sentient AI. MK-VI Synthoids that did not have the rogue Ascendis Totalis \" +\n \"AI were allowed to continue their existence, but they were stripped of all rights and protections as they \" +\n \"were not considered humans. They were also banned from doing anything that may pose a global security threat, such \" +\n \"as working for any military/defense organization or conducting any bioengineering, computing, or robotics related research.

    \" +\n \"Unfortunately, many believe that not all of the rogue MK-VI Synthoids from the Uprising were found and destroyed, \" +\n \"and that many of them are blending in as normal humans in society today. In response, many nations have created \" +\n `${FactionNames.Bladeburners} divisions, special military branches that are tasked with investigating and dealing with any Synthoid threats.

    ` +\n \"To this day, tensions still exist between the remaining Synthoids and humans as a result of the Uprising.

    \" +\n \"Nobody knows what happened to the terrorist group Ascendis Totalis.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"A Green Tomorrow\";\n fn = LiteratureNames.AGreenTomorrow;\n txt =\n \"Starting a few decades ago, there was a massive global movement towards the generation of renewable energy in an effort to \" +\n \"combat global warming and climate change. The shift towards renewable energy was a big success, or so it seemed. In 2045 \" +\n \"a staggering 80% of the world's energy came from non-renewable fossil fuels. Now, about three decades later, that \" +\n \"number is down to only 15%. Most of the world's energy now comes from nuclear power and renewable sources such as \" +\n \"solar and geothermal energy. Unfortunately, these efforts were not the huge success that they seem to be.

    \" +\n \"Since 2045 primary energy use has soared almost tenfold. This was mainly due to growing urban populations and \" +\n \"the rise of increasingly advanced (and power-hungry) technology that has become ubiquitous in our lives. So, \" +\n \"despite the fact that the percentage of our energy that comes from fossil fuels has drastically decreased, \" +\n \"the total amount of energy we are producing from fossil fuels has actually increased.

    \" +\n \"The grim effects of our species' irresponsible use of energy and neglect of our mother world have become increasingly apparent. \" +\n \"Last year a temperature of 190F was recorded in the Death Valley desert, which is over 50% higher than the highest \" +\n \"recorded temperature at the beginning of the century. In the last two decades numerous major cities such as Manhattan, Boston, and \" +\n \"Los Angeles have been partially or fully submerged by rising sea levels. In the present day, over 75% of the world's agriculture is \" +\n \"done in climate-controlled vertical farms, as most traditional farmland has become unusable due to severe climate conditions.

    \" +\n \"Despite all of this, the greedy and corrupt corporations that rule the world have done nothing to address these problems that \" +\n \"threaten our species. And so it's up to us, the common people. Each and every one of us can make a difference by doing what \" +\n \"these corporations won't: taking responsibility. If we don't, pretty soon there won't be an Earth left to save. We are \" +\n \"the last hope for a green tomorrow.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Alpha and Omega\";\n fn = LiteratureNames.AlphaOmega;\n txt =\n \"Then we saw a new Heaven and a new Earth, for our first Heaven and Earth had gone away, and our sea was no more. \" +\n \"And we saw a new holy city, new Aeria, coming down out of this new Heaven, prepared as a bride adorned for her husband. \" +\n \"And we heard a loud voice saying, 'Behold, the new dwelling place of the Gods. We will dwell with them, and they \" +\n \"will be our people, and we will be with them as their Gods. We will wipe away every tear from their eyes, and death \" +\n \"shall be no more, neither shall there be mourning, nor crying, nor pain anymore, for the former things \" +\n \"have passed away.'

    \" +\n \"And once we were seated on the throne we said 'Behold, I am making all things new.' \" +\n \"Also we said, 'Write this down, for these words are trustworthy and true.' And we said to you, \" +\n \"'It is done! I am the Alpha and the Omega, the beginning and the end. To the thirsty I will give from the spring \" +\n \"of the water of life without payment. The one who conquers will have this heritage, and we will be his God and \" +\n \"he will be our son. But as for the cowardly, the faithless, the detestable, as for murderers, \" +\n \"the sexually immoral, sorcerers, idolaters, and all liars, their portion will be in the lake that \" +\n \"burns with fire and sulfur, for it is the second true death.'\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Are We Living in a Computer Simulation?\";\n fn = LiteratureNames.SimulatedReality;\n txt =\n \"The idea that we are living in a virtual world is not new. It's a trope that has \" +\n \"been explored constantly in literature and pop culture. However, it is also a legitimate \" +\n \"scientific hypothesis that many notable physicists and philosophers have debated for years.

    \" +\n \"Proponents for this simulated reality theory often point to how advanced our technology has become, \" +\n \"as well as the incredibly fast pace at which it has advanced over the past decades. The amount of computing \" +\n \"power available to us has increased over 100-fold since 2060 due to the development of nanoprocessors and \" +\n \"quantum computers. Artifical Intelligence has advanced to the point where our entire lives are controlled \" +\n \"by robots and machines that handle our day-to-day activities such as autonomous transportation and scheduling. \" +\n \"If we consider the pace at which this technology has advanced and assume that these developments continue, it's \" +\n \"reasonable to assume that at some point in the future our technology would be advanced enough that \" +\n \"we could create simulations that are indistinguishable from reality. However, if continued technological advancement \" +\n \"is a reasonable outcome, then it is very likely that such a scenario has already happened.

    \" +\n \"Statistically speaking, somewhere out there in the infinite universe there is an advanced, intelligent species \" +\n \"that already has such technology. Who's to say that they haven't already created such a virtual reality: our own?\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Beyond Man\";\n fn = LiteratureNames.BeyondMan;\n txt =\n \"Humanity entered a 'transhuman' era a long time ago. And despite the protests and criticisms of many who cried out against \" +\n \"human augmentation at the time, the transhuman movement continued and prospered. Proponents of the movement ignored the critics, \" +\n \"arguing that it was in our inherent nature to better ourselves. To improve. To be more than we were. They claimed that \" +\n \"not doing so would be to go against every living organism's biological purpose: evolution and survival of the fittest.

    \" +\n \"And here we are today, with technology that is advanced enough to augment humans to a state that \" +\n \"can only be described as posthuman. But what do we have to show for it when this augmentation \" +\n \"technology is only available to the so-called 'elite'? Are we really better off than before when only 5% of the \" +\n \"world's population has access to this technology? When the powerful corporations and organizations of the world \" +\n \"keep it all to themselves, have we really evolved?

    \" +\n \"Augmentation technology has only further increased the divide between the rich and the poor, between the powerful and \" +\n \"the oppressed. We have not become 'more than human'. We have not evolved from nature's original design. We are still the greedy, \" +\n \"corrupted, and evil men that we always were.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Brighter than the Sun\";\n fn = LiteratureNames.BrighterThanTheSun;\n txt =\n `When people think about the corporations that dominate the East, they typically think of ${FactionNames.KuaiGongInternational}, which ` +\n \"holds a complete monopoly for manufacturing and commerce in Asia, or Global Pharmaceuticals, the world's largest \" +\n `drug company, or ${FactionNames.OmniTekIncorporated}, the global leader in intelligent and autonomous robots. But there's one company ` +\n \"that has seen a rapid rise in the last year and is poised to dominate not only the East, but the entire world: TaiYang Digital.

    \" +\n \"TaiYang Digital is a Chinese internet-technology corporation that provides services such as \" +\n \"online advertising, search engines, gaming, media, entertainment, and cloud computing/storage. Its name TaiYang comes from the Chinese word \" +\n \"for 'sun'. In Chinese culture, the sun is a 'yang' symbol \" +\n \"associated with life, heat, masculinity, and heaven.

    \" +\n \"The company was founded \" +\n \"less than 5 years ago and is already the third highest valued company in all of Asia. In 2076 it generated a total revenue of \" +\n \"over 10 trillion yuan. It's services are used daily by over a billion people worldwide.

    \" +\n \"TaiYang Digital's meteoric rise is extremely surprising in modern society. This sort of growth is \" +\n \"something you'd commonly see in the first half of the century, especially for tech companies. However in \" +\n \"the last two decades the number of corporations has significantly declined as the largest entities \" +\n `quickly took over the economy. Corporations such as ${FactionNames.ECorp}, ${FactionNames.MegaCorp}, and ${FactionNames.KuaiGongInternational} have established ` +\n \"such strong monopolies in their market sectors that they have effectively killed off all \" +\n \"of the smaller and new corporations that have tried to start up over the years. This is what makes \" +\n \"the rise of TaiYang Digital so impressive. And if TaiYang continues down this path, then they have \" +\n \"a bright future ahead of them.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Democracy is Dead: The Fall of an Empire\";\n fn = LiteratureNames.DemocracyIsDead;\n txt =\n \"They rose from the shadows in the street.
    From the places where the oppressed meet.
    \" +\n \"Their cries echoed loudly through the air.
    As they once did in Tiananmen Square.
    \" +\n \"Loudness in the silence, Darkness in the light.
    They came forth with power and might.
    \" +\n \"Once the beacon of democracy, America was first.
    Its pillars of society destroyed and dispersed.
    \" +\n \"Soon the cries rose everywhere, with revolt and riot.
    Until one day, finally, all was quiet.
    \" +\n \"From the ashes rose a new order, corporatocracy was its name.
    \" +\n \"Rome, Mongol, Byzantine, all of history is just the same.
    \" +\n \"For man will never change in a fundamental way.
    \" +\n \"And now democracy is dead, in the USA.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = `Figures Show Rising Crime Rates in ${CityName.Sector12}`;\n fn = LiteratureNames.Sector12Crime;\n txt =\n \"A recent study by analytics company Wilson Inc. shows a significant rise \" +\n `in criminal activity in ${CityName.Sector12}. Perhaps the most alarming part of the statistic ` +\n \"is that most of the rise is in violent crime such as homicide and assault. According \" +\n \"to the study, the city saw a total of 21,406 reported homicides in 2076, which is over \" +\n \"a 20% increase compared to 2075.

    \" +\n \"CIA director David Glarow says its too early to know \" +\n \"whether these figures indicate the beginning of a sustained increase in crime rates, or whether \" +\n \"the year was just an unfortunate outlier. He states that many intelligence and law enforcement \" +\n \"agents have noticed an increase in organized crime activites, and believes that these figures may \" +\n `be the result of an uprising from criminal organizations such as ${FactionNames.TheSyndicate} or the ${FactionNames.SlumSnakes}.`;\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Man and the Machine\";\n fn = LiteratureNames.ManAndMachine;\n txt =\n \"In 2005 Ray Kurzweil popularized his theory of the Singularity. He predicted that the rate \" +\n \"of technological advancement would continue to accelerate faster and faster until one day \" +\n \"machines would be become infinitely more intelligent than humans. This point, called the \" +\n \"Singularity, would result in a drastic transformation of the world as we know it. He predicted \" +\n \"that the Singularity would arrive by 2045. \" +\n \"And yet here we are, more than three decades later, where most would agree that we have not \" +\n \"yet reached a point where computers and machines are vastly more intelligent than we are. So what gives?

    \" +\n \"The answer is that we have reached the Singularity, just not in the way we expected. The artifical superintelligence \" +\n \"that was predicted by Kurzweil and others exists in the world today - in the form of Augmentations. \" +\n \"Yes, those Augmentations that the rich and powerful keep to themselves enable humans \" +\n \"to become superintelligent beings. The Singularity did not lead to a world where \" +\n \"our machines are infinitely more intelligent than us, it led to a world \" +\n \"where man and machine can merge to become something greater. Most of the world just doesn't \" +\n \"know it yet.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Secret Societies\";\n fn = LiteratureNames.SecretSocieties;\n txt =\n \"The idea of secret societies has long intrigued the general public by inspiring curiosity, fascination, and \" +\n \"distrust. People have long wondered about who these secret society members are and what they do, with the \" +\n \"most radical of conspiracy theorists claiming that they control everything in the entire world. And while the world \" +\n \"may never know for sure, it is likely that many secret societies do actually exist, even today.

    \" +\n \"However, the secret societies of the modern world are nothing like those that (supposedly) existed \" +\n `decades and centuries ago. The Freemasons, Knights Templar, and ${FactionNames.Illuminati}, while they may have been around ` +\n \"at the turn of the 21st century, almost assuredly do not exist today. The dominance of the Web in \" +\n \"our everyday lives and the fact that so much of the world is now digital has given rise to a new breed \" +\n \"of secret societies: Internet-based ones.

    \" +\n \"Commonly called 'hacker groups', Internet-based secret societies have become well-known in today's \" +\n `world. Some of these, such as ${FactionNames.TheBlackHand}, are black hat groups that claim they are trying to ` +\n `help the oppressed by attacking the elite and powerful. Others, such as ${FactionNames.NiteSec}, are hacktivist groups ` +\n \"that try to push political and social agendas. Perhaps the most intriguing hacker group \" +\n `is the mysterious ${FactionNames.BitRunners}, whose purpose still remains unknown.`;\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Space: The Failed Frontier\";\n fn = LiteratureNames.TheFailedFrontier;\n txt =\n \"Humans have long dreamed about spaceflight. With enduring interest, we were driven to explore \" +\n \"the unknown and discover new worlds. We dreamed about conquering the stars. And in our quest, \" +\n \"we pushed the boundaries of our scientific limits, and then pushed further. Space exploration \" +\n \"lead to the development of many important technologies and new industries.

    \" +\n \"But sometime in the middle of the 21st century, all of that changed. Humanity lost its ambitions and \" +\n \"aspirations of exploring the cosmos. The once-large funding for agencies like NASA and the European \" +\n \"Space Agency gradually whittled away until their eventual disbanding in the 2060's. Not even \" +\n \"militaries are fielding flights into space nowadays. The only remnants of the once great mission for cosmic \" +\n \"conquest are the countless satellites in near-earth orbit, used for communications, espionage, \" +\n \"and other corporate interests.

    \" +\n \"And as we continue to look at the state of space technology, it becomes more and \" +\n \"more apparent that we will never return to that golden age of space exploration, that \" +\n \"age where everyone dreamed of going beyond earth for the sake of discovery.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Coded Intelligence: Myth or Reality?\";\n fn = LiteratureNames.CodedIntelligence;\n txt =\n \"Tremendous progress has been made in the field of Artificial Intelligence over the past few decades. \" +\n \"Our autonomous vehicles and transportation systems. The electronic personal assistants that control our everyday lives. \" +\n \"Medical, service, and manufacturing robots. All of these are examples of how far AI has come and how much it has \" +\n \"improved our daily lives. However, the question still remains of whether AI will ever be advanced enough to re-create \" +\n \"human intelligence.

    \" +\n `We've certainly come close to artificial intelligence that is similar to humans. For example ${FactionNames.OmniTekIncorporated}'s ` +\n \"CompanionBot, a robot meant to act as a comforting friend for lonely and grieving people, is eerily human-like \" +\n \"in its appearance, speech, mannerisms, and even movement. However its artificial intelligence isn't the same as \" +\n \"that of humans. Not yet. It doesn't have sentience or self-awareness or consciousness.

    \" +\n \"Many neuroscientists believe that we won't ever reach the point of creating artificial human intelligence. 'At the end of the \" +\n \"the day, AI comes down to 1's and 0's, while the human brain does not. We'll never see AI that is identical to that of \" +\n \"humans.'\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Synthetic Muscles\";\n fn = LiteratureNames.SyntheticMuscles;\n txt =\n \"Initial versions of synthetic muscles weren't made of anything organic but were actually \" +\n \"crude devices made to mimic human muscle function. Some of the early iterations were actually made of \" +\n \"common materials such as fishing lines and sewing threads due to their high strength for \" +\n \"a cheap cost.

    \" +\n \"As technology progressed, however, advances in biomedical engineering paved the way for a new method of \" +\n \"creating synthetic muscles. Instead of creating something that closely imitated the functionality \" +\n \"of human muscle, scientists discovered a way of forcing the human body itself to augment its own \" +\n \"muscle tissue using both synthetic and organic materials. This is typically done using gene therapy \" +\n \"or chemical injections.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"Tensions rise in global tech race\";\n fn = LiteratureNames.TensionsInTechRace;\n txt =\n \"Have we entered a new Cold War? Is WWIII just beyond the horizon?

    \" +\n `After rumors came out that ${FactionNames.OmniTekIncorporated} had begun developing advanced robotic supersoldiers, ` +\n \"geopolitical tensions quickly flared between the USA, Russia, and several Asian superpowers. \" +\n `In a rare show of cooperation between corporations, ${FactionNames.MegaCorp} and ${FactionNames.ECorp} have ` +\n \"reportedly launched hundreds of new surveillance and espionage satellites. \" +\n \"Defense contractors such as \" +\n \"DeltaOne and AeroCorp have been working with the CIA and NSA to prepare \" +\n \"for conflict. Meanwhile, the rest of the world sits in earnest \" +\n \"hoping that it never reaches full-scale war. With today's technology \" +\n \"and firepower, a World War would assuredly mean the end of human civilization.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Cost of Immortality\";\n fn = LiteratureNames.CostOfImmortality;\n txt =\n \"Evolution and advances in medical and augmentation technology has lead to drastic improvements \" +\n \"in human mortality rates. Recent figures show that the life expectancy for humans \" +\n \"that live in a first-world country is about 130 years of age, almost double of what it was \" +\n \"at the turn of the century. However, this increase in average lifespan has had some \" +\n \"significant effects on society and culture.

    \" +\n \"Due to longer lifespans and a better quality of life, many adults are holding \" +\n \"off on having kids until much later. As a result, the percentage of youth in \" +\n \"first-world countries has been decreasing, while the number \" +\n \"of senior citizens is significantly increasing.

    \" +\n \"Perhaps the most alarming result of all of this is the rapidly shrinking workforce. \" +\n \"Despite the increase in life expectancy, the typical retirement age for \" +\n \"workers in America has remained about the same, meaning a larger and larger \" +\n \"percentage of people in America are retirees. Furthermore, many \" +\n \"young adults are holding off on joining the workforce because they feel that \" +\n \"they have plenty of time left in their lives for employment, and want to \" +\n \"'enjoy life while they're young.' For most industries, this shrinking workforce \" +\n \"is not a major issue as most things are handled by robots anyways. However, \" +\n \"there are still several key industries such as engineering and education \" +\n \"that have not been automated, and these remain in danger to this cultural \" +\n \"phenomenon.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Hidden World\";\n fn = LiteratureNames.TheHiddenWorld;\n txt =\n \"WAKE UP SHEEPLE

    \" +\n \"THE GOVERNMENT DOES NOT EXIST. CORPORATIONS DO NOT RUN SOCIETY

    \" +\n `THE ${FactionNames.Illuminati.toUpperCase()} ARE THE SECRET RULERS OF THE WORLD!

    ` +\n `Yes, the ${FactionNames.Illuminati} of legends. The ancient secret society that controls the entire ` +\n \"world from the shadows with their invisible hand. The group of the rich and wealthy \" +\n \"that have penetrated every major government, financial agency, and corporation in the last \" +\n \"three hundred years.

    \" +\n \"OPEN YOUR EYES

    \" +\n `It was the ${FactionNames.Illuminati} that brought an end to democracy in the world. They are the driving force ` +\n \"behind everything that happens.

    \" +\n \"THEY ARE ALL AROUND YOU

    \" +\n \"After destabilizing the world's governments, they are now entering the final stage of their master plan. \" +\n \"They will secretly initiate global crises. Terrorism. Pandemics. World War. And out of the chaos \" +\n \"that ensues they will build their New World Order.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The New God\";\n fn = LiteratureNames.TheNewGod;\n txt =\n \"Everyone has a moment in their life when they wonder about the bigger questions.

    \" +\n \"What's the point of all this? What is my purpose?

    \" +\n \"Some people dare to think even bigger.

    \" +\n \"What will the fate of the human race be?

    \" +\n \"We live in an era vastly different from that of 15 or even 20 years ago. We have gone \" +\n \"beyond the limits of humanity. We have stripped ourselves of the tyranny of flesh.

    \" +\n \"The Singularity is here. The merging of man and machine. This is where humanity evolves into \" +\n \"something greater. This is our future.

    \" +\n \"Embrace it, and you will obey a new god. The God in the Machine.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The New Triads\";\n fn = LiteratureNames.NewTriads;\n txt =\n \"The Triads were an ancient transnational crime syndicate based in China, Hong Kong, and other Asian \" +\n \"territories. They were often considered one of the first and biggest criminal secret societies. \" +\n \"While most of the branches of the Triads have been destroyed over the past few decades, the \" +\n \"crime faction has spawned and inspired a number of other Asian crime organizations over the past few years. \" +\n `The most notable of these is the ${FactionNames.Tetrads}.

    ` +\n `It is widely believed that the ${FactionNames.Tetrads} are a rogue group that splintered off from the Triads sometime in the ` +\n `mid 21st century. The founders of the ${FactionNames.Tetrads}, all of whom were ex-Triad members, believed that the ` +\n `Triads were losing their purpose and direction. The ${FactionNames.Tetrads} started off as a small group that mainly engaged ` +\n \"in fraud and extortion. They were largely unknown until just a few years ago when they took over the illegal \" +\n \"drug trade in all of the major Asian cities. They quickly became the most powerful crime syndicate in the \" +\n \"continent.

    \" +\n `Not much else is known about the ${FactionNames.Tetrads}, or about the efforts the Asian governments and corporations are making ` +\n `to take down this large new crime organization. Many believe that the ${FactionNames.Tetrads} have infiltrated the governments ` +\n \"and powerful corporations in Asia, which has helped faciliate their recent rapid rise.\";\n Literatures[fn] = new Literature(title, fn, txt);\n\n title = \"The Secret War\";\n fn = LiteratureNames.TheSecretWar;\n txt = \"\";\n Literatures[fn] = new Literature(title, fn, txt);\n})();\n","import { ITaskParams } from \"../ITaskParams\";\n/* tslint:disable:max-line-length */\n\n/**\n * Defines the parameters that can be used to initialize and describe a GangMemberTask\n * (defined in Gang.js)\n */\ninterface IGangMemberTaskMetadata {\n /**\n * Description of the task\n */\n desc: string;\n\n /**\n * Whether or not this task is meant for Combat-type gangs\n */\n isCombat: boolean;\n\n /**\n * Whether or not this task is for Hacking-type gangs\n */\n isHacking: boolean;\n\n /**\n * Name of the task\n */\n name: string;\n\n /**\n * An object containing weighting parameters for the task. These parameters are used for\n * various calculations (respect gain, wanted gain, etc.)\n */\n params: ITaskParams;\n}\n\n/**\n * Array of metadata for all Gang Member tasks. Used to construct the global GangMemberTask\n * objects in Gang.js\n */\nexport const gangMemberTasksMetadata: IGangMemberTaskMetadata[] = [\n {\n desc: \"This gang member is currently idle\",\n isCombat: true,\n isHacking: true,\n name: \"Unassigned\",\n params: { hackWeight: 100 }, // This is just to get by the weight check in the GangMemberTask constructor\n },\n {\n desc: \"Assign this gang member to create and distribute ransomware

    Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ransomware\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.0001,\n baseMoney: 3,\n hackWeight: 100,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to attempt phishing scams and attacks

    Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Phishing\",\n params: {\n baseRespect: 0.00008,\n baseWanted: 0.003,\n baseMoney: 7.5,\n hackWeight: 85,\n chaWeight: 15,\n difficulty: 3.5,\n },\n },\n {\n desc: \"Assign this gang member to attempt identity theft

    Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Identity Theft\",\n params: {\n baseRespect: 0.0001,\n baseWanted: 0.075,\n baseMoney: 18,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 5,\n },\n },\n {\n desc: \"Assign this gang member to carry out DDoS attacks

    Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"DDoS Attacks\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.2,\n hackWeight: 100,\n difficulty: 8,\n },\n },\n {\n desc: \"Assign this gang member to create and distribute malicious viruses

    Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Plant Virus\",\n params: {\n baseRespect: 0.0006,\n baseWanted: 0.4,\n hackWeight: 100,\n difficulty: 12,\n },\n },\n {\n desc: \"Assign this gang member to commit financial fraud and digital counterfeiting

    Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Fraud & Counterfeiting\",\n params: {\n baseRespect: 0.0004,\n baseWanted: 0.3,\n baseMoney: 45,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to launder money

    Earns money - Increases respect - Increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Money Laundering\",\n params: {\n baseRespect: 0.001,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 75,\n chaWeight: 25,\n difficulty: 25,\n },\n },\n {\n desc: \"Assign this gang member to commit acts of cyberterrorism

    Greatly increases respect - Greatly increases wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Cyberterrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 80,\n chaWeight: 20,\n difficulty: 36,\n },\n },\n {\n desc: \"Assign this gang member to be an ethical hacker for corporations

    Earns money - Lowers wanted level\",\n isCombat: false,\n isHacking: true,\n name: \"Ethical Hacking\",\n params: {\n baseWanted: -0.001,\n baseMoney: 3,\n hackWeight: 90,\n chaWeight: 10,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to mug random people on the streets

    Earns money - Slightly increases respect - Very slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Mug People\",\n params: {\n baseRespect: 0.00005,\n baseWanted: 0.00005,\n baseMoney: 3.6,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 10,\n chaWeight: 15,\n difficulty: 1,\n },\n },\n {\n desc: \"Assign this gang member to sell drugs

    Earns money - Slightly increases respect - Slightly increases wanted level - Scales slightly with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Deal Drugs\",\n params: {\n baseRespect: 0.00006,\n baseWanted: 0.002,\n baseMoney: 15,\n agiWeight: 20,\n dexWeight: 20,\n chaWeight: 60,\n difficulty: 3.5,\n territory: {\n money: 1.2,\n respect: 1,\n wanted: 1.15,\n },\n },\n },\n {\n desc: \"Assign this gang member to extort civilians in your territory

    Earns money - Slightly increases respect - Increases wanted - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Strongarm Civilians\",\n params: {\n baseRespect: 0.00004,\n baseWanted: 0.02,\n baseMoney: 7.5,\n hackWeight: 10,\n strWeight: 25,\n defWeight: 25,\n dexWeight: 20,\n agiWeight: 10,\n chaWeight: 10,\n difficulty: 5,\n territory: {\n money: 1.6,\n respect: 1.1,\n wanted: 1.5,\n },\n },\n },\n {\n desc: \"Assign this gang member to run cons

    Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Run a Con\",\n params: {\n baseRespect: 0.00012,\n baseWanted: 0.05,\n baseMoney: 45,\n strWeight: 5,\n defWeight: 5,\n agiWeight: 25,\n dexWeight: 25,\n chaWeight: 40,\n difficulty: 14,\n },\n },\n {\n desc: \"Assign this gang member to commit armed robbery on stores, banks and armored cars

    Earns money - Increases respect - Increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Armed Robbery\",\n params: {\n baseRespect: 0.00014,\n baseWanted: 0.1,\n baseMoney: 114,\n hackWeight: 20,\n strWeight: 15,\n defWeight: 15,\n agiWeight: 10,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 20,\n },\n },\n {\n desc: \"Assign this gang member to traffick illegal arms

    Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Traffick Illegal Arms\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.24,\n baseMoney: 174,\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 25,\n difficulty: 32,\n territory: {\n money: 1.4,\n respect: 1.3,\n wanted: 1.25,\n },\n },\n },\n {\n desc: \"Assign this gang member to threaten and black mail high-profile targets

    Earns money - Slightly increases respect - Slightly increases wanted level\",\n isCombat: true,\n isHacking: false,\n name: \"Threaten & Blackmail\",\n params: {\n baseRespect: 0.0002,\n baseWanted: 0.125,\n baseMoney: 72,\n hackWeight: 25,\n strWeight: 25,\n dexWeight: 25,\n chaWeight: 25,\n difficulty: 28,\n },\n },\n {\n desc: \"Assign this gang member to engage in human trafficking operations

    Earns money - Increases respect - Increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Human Trafficking\",\n params: {\n baseRespect: 0.004,\n baseWanted: 1.25,\n baseMoney: 360,\n hackWeight: 30,\n strWeight: 5,\n defWeight: 5,\n dexWeight: 30,\n chaWeight: 30,\n difficulty: 36,\n territory: {\n money: 1.5,\n respect: 1.5,\n wanted: 1.6,\n },\n },\n },\n {\n desc: \"Assign this gang member to commit acts of terrorism

    Greatly increases respect - Greatly increases wanted level - Scales heavily with territory\",\n isCombat: true,\n isHacking: false,\n name: \"Terrorism\",\n params: {\n baseRespect: 0.01,\n baseWanted: 6,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n chaWeight: 20,\n difficulty: 36,\n territory: {\n money: 1,\n respect: 2,\n wanted: 2,\n },\n },\n },\n {\n desc: \"Assign this gang member to be a vigilante and protect the city from criminals

    Decreases wanted level\",\n isCombat: true,\n isHacking: true,\n name: \"Vigilante Justice\",\n params: {\n baseWanted: -0.001,\n hackWeight: 20,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n difficulty: 1,\n territory: {\n money: 1,\n respect: 1,\n wanted: 0.9, // Gets harder with more territory\n },\n },\n },\n {\n desc: \"Assign this gang member to increase their combat stats (str, def, dex, agi)\",\n isCombat: true,\n isHacking: true,\n name: \"Train Combat\",\n params: {\n strWeight: 25,\n defWeight: 25,\n dexWeight: 25,\n agiWeight: 25,\n difficulty: 100,\n },\n },\n {\n desc: \"Assign this gang member to train their hacking skills\",\n isCombat: true,\n isHacking: true,\n name: \"Train Hacking\",\n params: { hackWeight: 100, difficulty: 45 },\n },\n {\n desc: \"Assign this gang member to train their charisma\",\n isCombat: true,\n isHacking: true,\n name: \"Train Charisma\",\n params: { chaWeight: 100, difficulty: 8 },\n },\n {\n desc: \"Assign this gang member to engage in territorial warfare with other gangs. Members assigned to this task will help increase your gang's territory and will defend your territory from being taken.\",\n isCombat: true,\n isHacking: true,\n name: \"Territory Warfare\",\n params: {\n hackWeight: 15,\n strWeight: 20,\n defWeight: 20,\n dexWeight: 20,\n agiWeight: 20,\n chaWeight: 5,\n difficulty: 5,\n },\n },\n];\n","import { GangMemberTask } from \"./GangMemberTask\";\nimport { GangMemberTasks } from \"./GangMemberTasks\";\nimport { GangMemberUpgrade } from \"./GangMemberUpgrade\";\nimport { GangMemberUpgrades } from \"./GangMemberUpgrades\";\nimport { IAscensionResult } from \"./IAscensionResult\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { IGang } from \"./IGang\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport {\n calculateRespectGain,\n calculateMoneyGain,\n calculateWantedLevelGain,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"./formulas/formulas\";\n\ninterface IMults {\n hack: number;\n str: number;\n def: number;\n dex: number;\n agi: number;\n cha: number;\n}\n\nexport class GangMember {\n name: string;\n task = \"Unassigned\";\n\n earnedRespect = 0;\n\n hack = 1;\n str = 1;\n def = 1;\n dex = 1;\n agi = 1;\n cha = 1;\n\n hack_exp = 0;\n str_exp = 0;\n def_exp = 0;\n dex_exp = 0;\n agi_exp = 0;\n cha_exp = 0;\n\n hack_mult = 1;\n str_mult = 1;\n def_mult = 1;\n dex_mult = 1;\n agi_mult = 1;\n cha_mult = 1;\n\n hack_asc_points = 0;\n str_asc_points = 0;\n def_asc_points = 0;\n dex_asc_points = 0;\n agi_asc_points = 0;\n cha_asc_points = 0;\n\n upgrades: string[] = []; // Names of upgrades\n augmentations: string[] = []; // Names of augmentations only\n\n constructor(name = \"\") {\n this.name = name;\n }\n\n calculateSkill(exp: number, mult = 1): number {\n return Math.max(Math.floor(mult * (32 * Math.log(exp + 534.5) - 200)), 1);\n }\n\n calculateAscensionMult(points: number): number {\n return calculateAscensionMult(points);\n }\n\n updateSkillLevels(): void {\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(): number {\n return (this.hack + this.str + this.def + this.dex + this.agi + this.cha) / 95;\n }\n\n assignToTask(taskName: string): boolean {\n if (!GangMemberTasks.hasOwnProperty(taskName)) {\n this.task = \"Unassigned\";\n return false;\n }\n this.task = taskName;\n return true;\n }\n\n unassignFromTask(): void {\n this.task = \"Unassigned\";\n }\n\n getTask(): GangMemberTask {\n // TODO(hydroflame): transfer that to a save file migration function\n // Backwards compatibility\n if ((this.task as any) instanceof GangMemberTask) {\n this.task = (this.task as any).name;\n }\n\n if (GangMemberTasks.hasOwnProperty(this.task)) {\n return GangMemberTasks[this.task];\n }\n return GangMemberTasks[\"Unassigned\"];\n }\n\n calculateRespectGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateRespectGain(g, this, task);\n }\n\n calculateWantedLevelGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateWantedLevelGain(g, this, task);\n }\n\n calculateMoneyGain(gang: IGang): number {\n const task = this.getTask();\n const g = {\n respect: gang.respect,\n wantedLevel: gang.wanted,\n territory: gang.getTerritory(),\n };\n return calculateMoneyGain(g, this, task);\n }\n\n expMult(): IMults {\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): void {\n const task = this.getTask();\n if (task === GangMemberTasks[\"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 +=\n (task.hackWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.hack *\n this.calculateAscensionMult(this.hack_asc_points);\n this.str_exp +=\n (task.strWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.str *\n this.calculateAscensionMult(this.str_asc_points);\n this.def_exp +=\n (task.defWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.def *\n this.calculateAscensionMult(this.def_asc_points);\n this.dex_exp +=\n (task.dexWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.dex *\n this.calculateAscensionMult(this.dex_asc_points);\n this.agi_exp +=\n (task.agiWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.agi *\n this.calculateAscensionMult(this.agi_asc_points);\n this.cha_exp +=\n (task.chaWeight / weightDivisor) *\n difficultyPerCycles *\n expMult.cha *\n this.calculateAscensionMult(this.cha_asc_points);\n }\n\n recordEarnedRespect(numCycles = 1, gang: IGang): void {\n this.earnedRespect += this.calculateRespectGain(gang) * numCycles;\n }\n\n getGainedAscensionPoints(): IMults {\n return {\n hack: calculateAscensionPointsGain(this.hack_exp),\n str: calculateAscensionPointsGain(this.str_exp),\n def: calculateAscensionPointsGain(this.def_exp),\n dex: calculateAscensionPointsGain(this.dex_exp),\n agi: calculateAscensionPointsGain(this.agi_exp),\n cha: calculateAscensionPointsGain(this.cha_exp),\n };\n }\n\n canAscend(): boolean {\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 getCurrentAscensionMults(): IMults {\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points),\n str: this.calculateAscensionMult(this.str_asc_points),\n def: this.calculateAscensionMult(this.def_asc_points),\n dex: this.calculateAscensionMult(this.dex_asc_points),\n agi: this.calculateAscensionMult(this.agi_asc_points),\n cha: this.calculateAscensionMult(this.cha_asc_points),\n };\n }\n\n getAscensionMultsAfterAscend(): IMults {\n const points = this.getGainedAscensionPoints();\n return {\n hack: this.calculateAscensionMult(this.hack_asc_points + points.hack),\n str: this.calculateAscensionMult(this.str_asc_points + points.str),\n def: this.calculateAscensionMult(this.def_asc_points + points.def),\n dex: this.calculateAscensionMult(this.dex_asc_points + points.dex),\n agi: this.calculateAscensionMult(this.agi_asc_points + points.agi),\n cha: this.calculateAscensionMult(this.cha_asc_points + points.cha),\n };\n }\n\n getAscensionResults(): IMults {\n const postAscend = this.getAscensionMultsAfterAscend();\n const preAscend = this.getCurrentAscensionMults();\n\n return {\n hack: postAscend.hack / preAscend.hack,\n str: postAscend.str / preAscend.str,\n def: postAscend.def / preAscend.def,\n dex: postAscend.dex / preAscend.dex,\n agi: postAscend.agi / preAscend.agi,\n cha: postAscend.cha / preAscend.cha,\n };\n }\n\n ascend(): IAscensionResult {\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;\n\n // Remove upgrades. Then re-calculate multipliers and stats\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 for (let i = 0; i < this.augmentations.length; ++i) {\n const aug = GangMemberUpgrades[this.augmentations[i]];\n this.applyUpgrade(aug);\n }\n\n // Clear exp and recalculate stats\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\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: GangMemberUpgrade): void {\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: GangMemberUpgrade, player: IPlayer, gang: IGang): boolean {\n // Prevent purchasing of already-owned upgrades\n if (this.augmentations.includes(upg.name) || this.upgrades.includes(upg.name)) return false;\n\n if (player.money < gang.getUpgradeCost(upg)) return false;\n player.loseMoney(gang.getUpgradeCost(upg), \"gang\");\n if (upg.type === \"g\") {\n this.augmentations.push(upg.name);\n } else {\n this.upgrades.push(upg.name);\n }\n this.applyUpgrade(upg);\n return true;\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"GangMember\", this);\n }\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 static fromJSON(value: any): GangMember {\n return Generic_fromJSON(GangMember, value.data);\n }\n}\n\nReviver.constructors.GangMember = GangMember;\n","import { IMults, UpgradeType } from \"./data/upgrades\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nexport class GangMemberUpgrade {\n name: string;\n cost: number;\n type: UpgradeType;\n desc: string;\n mults: IMults;\n\n constructor(name = \"\", cost = 0, type: UpgradeType = UpgradeType.Weapon, mults: IMults = {}) {\n this.name = name;\n this.cost = cost;\n this.type = type;\n this.mults = mults;\n\n this.desc = this.createDescription();\n }\n\n createDescription(): string {\n const lines = [\"Effects:\"];\n if (this.mults.str != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.str - 1, 0)} strength skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.str - 1) / 4, 2)} strength exp`);\n }\n if (this.mults.def != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.def - 1, 0)} defense skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.def - 1) / 4, 2)} defense exp`);\n }\n if (this.mults.dex != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.dex - 1, 0)} dexterity skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.dex - 1) / 4, 2)} dexterity exp`);\n }\n if (this.mults.agi != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.agi - 1, 0)} agility skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.agi - 1) / 4, 2)} agility exp`);\n }\n if (this.mults.cha != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.cha - 1, 0)} charisma skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.cha - 1) / 4, 2)} charisma exp`);\n }\n if (this.mults.hack != null) {\n lines.push(`+${numeralWrapper.formatPercentage(this.mults.hack - 1, 0)} hacking skill`);\n lines.push(`+${numeralWrapper.formatPercentage((this.mults.hack - 1) / 4, 2)} hacking exp`);\n }\n return lines.join(\"
    \");\n }\n\n // User friendly version of type.\n getType(): string {\n switch (this.type) {\n case UpgradeType.Weapon:\n return \"Weapon\";\n case UpgradeType.Armor:\n return \"Armor\";\n case UpgradeType.Vehicle:\n return \"Vehicle\";\n case UpgradeType.Rootkit:\n return \"Rootkit\";\n case UpgradeType.Augmentation:\n return \"Augmentation\";\n default:\n return \"\";\n }\n }\n}\n","import { FactionNames } from '../../Faction/data/FactionNames';\nexport const PowerMultiplier: {\n [key: string]: number | undefined;\n} = {\n [FactionNames.SlumSnakes]: 1,\n [FactionNames.Tetrads]: 2,\n [FactionNames.TheSyndicate]: 2,\n [FactionNames.TheDarkArmy]: 2,\n [FactionNames.SpeakersForTheDead]: 5,\n [FactionNames.NiteSec]: 2,\n [FactionNames.TheBlackHand]: 5,\n};\n","import * as posNames from \"./companypositionnames\";\nimport { IConstructorParams } from \"../Company\";\n\nimport { IMap } from \"../../types\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\n// Create Objects containing Company Positions by category\n// Will help in metadata construction later\nconst AllSoftwarePositions: IMap = {};\nconst AllITPositions: IMap = {};\nconst AllNetworkEngineerPositions: IMap = {};\nconst SecurityEngineerPositions: IMap = {};\nconst AllTechnologyPositions: IMap = {};\nconst AllBusinessPositions: IMap = {};\nconst AllAgentPositions: IMap = {};\nconst AllSecurityPositions: IMap = {};\nconst AllSoftwareConsultantPositions: IMap = {};\nconst AllBusinessConsultantPositions: IMap = {};\nconst SoftwarePositionsUpToHeadOfEngineering: IMap = {};\nconst SoftwarePositionsUpToLeadDeveloper: IMap = {};\nconst BusinessPositionsUpToOperationsManager: IMap = {};\nconst WaiterOnly: IMap = {};\nconst EmployeeOnly: IMap = {};\nconst PartTimeWaiterOnly: IMap = {};\nconst PartTimeEmployeeOnly: IMap = {};\nconst OperationsManagerOnly: IMap = {};\nconst CEOOnly: IMap = {};\n\nposNames.SoftwareCompanyPositions.forEach((e) => {\n AllSoftwarePositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.ITCompanyPositions.forEach((e) => {\n AllITPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nposNames.NetworkEngineerCompanyPositions.forEach((e) => {\n AllNetworkEngineerPositions[e] = true;\n AllTechnologyPositions[e] = true;\n});\n\nAllTechnologyPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\nSecurityEngineerPositions[posNames.SecurityEngineerCompanyPositions[0]] = true;\n\nposNames.BusinessCompanyPositions.forEach((e) => {\n AllBusinessPositions[e] = true;\n});\n\nposNames.SecurityCompanyPositions.forEach((e) => {\n AllSecurityPositions[e] = true;\n});\n\nposNames.AgentCompanyPositions.forEach((e) => {\n AllAgentPositions[e] = true;\n});\n\nposNames.SoftwareConsultantCompanyPositions.forEach((e) => {\n AllSoftwareConsultantPositions[e] = true;\n});\n\nposNames.BusinessConsultantCompanyPositions.forEach((e) => {\n AllBusinessConsultantPositions[e] = true;\n});\n\nfor (let i = 0; i < posNames.SoftwareCompanyPositions.length; ++i) {\n const e = posNames.SoftwareCompanyPositions[i];\n if (i <= 5) {\n SoftwarePositionsUpToHeadOfEngineering[e] = true;\n }\n if (i <= 3) {\n SoftwarePositionsUpToLeadDeveloper[e] = true;\n }\n}\nfor (let i = 0; i < posNames.BusinessCompanyPositions.length; ++i) {\n const e = posNames.BusinessCompanyPositions[i];\n if (i <= 3) {\n BusinessPositionsUpToOperationsManager[e] = true;\n }\n}\n\nWaiterOnly[posNames.MiscCompanyPositions[0]] = true;\nEmployeeOnly[posNames.MiscCompanyPositions[1]] = true;\nPartTimeWaiterOnly[posNames.PartTimeCompanyPositions[0]] = true;\nPartTimeEmployeeOnly[posNames.PartTimeCompanyPositions[1]] = true;\nOperationsManagerOnly[posNames.BusinessCompanyPositions[3]] = true;\nCEOOnly[posNames.BusinessCompanyPositions[5]] = true;\n\n// Metadata\nexport const companiesMetadata: IConstructorParams[] = [\n {\n name: LocationName.AevumECorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.Sector12MegaCorp,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 3,\n salaryMultiplier: 3,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumBachmanAndAssociates,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.6,\n salaryMultiplier: 2.6,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12BladeIndustries,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenNWO,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.75,\n salaryMultiplier: 2.75,\n jobStatReqOffset: 249,\n },\n {\n name: LocationName.AevumClarkeIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.VolhavenOmniTekIncorporated,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.25,\n salaryMultiplier: 2.25,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.Sector12FourSigma,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.5,\n salaryMultiplier: 2.5,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.ChongqingKuaiGongInternational,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSecurityPositions),\n expMultiplier: 2.2,\n salaryMultiplier: 2.2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.AevumFulcrumTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaStormTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllSoftwareConsultantPositions, AllBusinessPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoDefComm,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenHeliosLabs,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, AllTechnologyPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoVitaLife,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12IcarusMicrosystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12UniversalEnergy,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumGalacticCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions, AllBusinessPositions, AllSoftwareConsultantPositions),\n expMultiplier: 1.9,\n salaryMultiplier: 1.9,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.AevumAeroCorp,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.VolhavenOmniaCybersystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.ChongqingSolarisSpaceSystems,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.7,\n salaryMultiplier: 1.7,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12DeltaOne,\n info: \"\",\n companyPositions: Object.assign({}, CEOOnly, OperationsManagerOnly, AllTechnologyPositions, AllSecurityPositions),\n expMultiplier: 1.6,\n salaryMultiplier: 1.6,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.8,\n salaryMultiplier: 1.8,\n jobStatReqOffset: 224,\n },\n {\n name: LocationName.IshimaNovaMedical,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllBusinessPositions,\n AllSoftwareConsultantPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.75,\n salaryMultiplier: 1.75,\n jobStatReqOffset: 199,\n },\n {\n name: LocationName.Sector12CIA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.Sector12NSA,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n SecurityEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n ),\n expMultiplier: 2,\n salaryMultiplier: 2,\n jobStatReqOffset: 149,\n },\n {\n name: LocationName.AevumWatchdogSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToHeadOfEngineering,\n AllNetworkEngineerPositions,\n AllITPositions,\n AllSecurityPositions,\n AllAgentPositions,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenLexoCorp,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllBusinessPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.4,\n salaryMultiplier: 1.4,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumRhoConstruction,\n info: \"\",\n companyPositions: Object.assign({}, SoftwarePositionsUpToLeadDeveloper, BusinessPositionsUpToOperationsManager),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.Sector12AlphaEnterprises,\n info: \"\",\n companyPositions: Object.assign(\n {},\n SoftwarePositionsUpToLeadDeveloper,\n BusinessPositionsUpToOperationsManager,\n AllSoftwareConsultantPositions,\n ),\n expMultiplier: 1.5,\n salaryMultiplier: 1.5,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.AevumPolice,\n info: \"\",\n companyPositions: Object.assign({}, AllSecurityPositions, SoftwarePositionsUpToLeadDeveloper),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.VolhavenSysCoreSecurities,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.3,\n salaryMultiplier: 1.3,\n jobStatReqOffset: 124,\n },\n {\n name: LocationName.VolhavenCompuTek,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.AevumNetLinkTechnologies,\n info: \"\",\n companyPositions: Object.assign({}, AllTechnologyPositions),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 99,\n },\n {\n name: LocationName.Sector12CarmichaelSecurity,\n info: \"\",\n companyPositions: Object.assign(\n {},\n AllTechnologyPositions,\n AllSoftwareConsultantPositions,\n AllAgentPositions,\n AllSecurityPositions,\n ),\n expMultiplier: 1.2,\n salaryMultiplier: 1.2,\n jobStatReqOffset: 74,\n },\n {\n name: LocationName.Sector12FoodNStuff,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.Sector12JoesGuns,\n info: \"\",\n companyPositions: Object.assign({}, EmployeeOnly, PartTimeEmployeeOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n {\n name: LocationName.IshimaOmegaSoftware,\n info: \"\",\n companyPositions: Object.assign({}, AllSoftwarePositions, AllSoftwareConsultantPositions, AllITPositions),\n expMultiplier: 1.1,\n salaryMultiplier: 1.1,\n jobStatReqOffset: 49,\n },\n {\n name: LocationName.NewTokyoNoodleBar,\n info: \"\",\n companyPositions: Object.assign({}, WaiterOnly, PartTimeWaiterOnly),\n expMultiplier: 1,\n salaryMultiplier: 1,\n jobStatReqOffset: 0,\n },\n];\n","export interface IConstructorParams {\n name: string;\n cost: number;\n desc: string;\n advertisingMult?: number;\n employeeChaMult?: number;\n employeeCreMult?: number;\n employeeEffMult?: number;\n employeeIntMult?: number;\n productionMult?: number;\n productProductionMult?: number;\n salesMult?: number;\n sciResearchMult?: number;\n storageMult?: number;\n}\n\nexport class Research {\n // Name of research. This will be used to identify researches in the Research Tree\n name = \"\";\n\n // How much scientific research it costs to unlock this\n cost = 0;\n\n // Description of what the Research does\n desc = \"\";\n\n // All possible generic upgrades for the company, in the form of multipliers\n advertisingMult = 1;\n employeeChaMult = 1;\n employeeCreMult = 1;\n employeeEffMult = 1;\n employeeIntMult = 1;\n productionMult = 1;\n productProductionMult = 1;\n salesMult = 1;\n sciResearchMult = 1;\n storageMult = 1;\n\n constructor(p: IConstructorParams = { name: \"\", cost: 0, desc: \"\" }) {\n this.name = p.name;\n this.cost = p.cost;\n this.desc = p.desc;\n if (p.advertisingMult) {\n this.advertisingMult = p.advertisingMult;\n }\n if (p.employeeChaMult) {\n this.employeeChaMult = p.employeeChaMult;\n }\n if (p.employeeCreMult) {\n this.employeeCreMult = p.employeeCreMult;\n }\n if (p.employeeEffMult) {\n this.employeeEffMult = p.employeeEffMult;\n }\n if (p.employeeIntMult) {\n this.employeeIntMult = p.employeeIntMult;\n }\n if (p.productionMult) {\n this.productionMult = p.productionMult;\n }\n if (p.productProductionMult) {\n this.productProductionMult = p.productProductionMult;\n }\n if (p.salesMult) {\n this.salesMult = p.salesMult;\n }\n if (p.sciResearchMult) {\n this.sciResearchMult = p.sciResearchMult;\n }\n if (p.storageMult) {\n this.storageMult = p.storageMult;\n }\n }\n}\n","import { IConstructorParams } from \"../Research\";\n\nexport const researchMetadata: IConstructorParams[] = [\n {\n name: \"AutoBrew\",\n cost: 12e3,\n desc:\n \"Automatically keep your employees fully caffeinated with \" +\n \"coffee injections. This research will keep the energy of all \" +\n \"employees at its maximum possible value, for no cost. \" +\n \"This will also disable the Coffee upgrade.\",\n },\n {\n name: \"AutoPartyManager\",\n cost: 15e3,\n desc:\n \"Automatically analyzes your employees' happiness and morale \" +\n \"and boosts them whenever it detects a decrease. This research will \" +\n \"keep the morale and happiness of all employees at their maximum possible \" +\n \"values, for no cost. \" +\n \"This will also disable the 'Throw Party' feature.\",\n },\n {\n name: \"Automatic Drug Administration\",\n cost: 10e3,\n desc:\n \"Research how to automatically administer performance-enhacing drugs to all of \" +\n \"your employees. This unlocks Drug-related Research.\",\n },\n {\n name: \"Bulk Purchasing\",\n cost: 5e3,\n desc:\n \"Research the art of buying materials in bulk. This allows you to purchase \" +\n \"any amount of a material instantly.\",\n },\n {\n name: \"CPH4 Injections\",\n cost: 25e3,\n desc:\n \"Develop an advanced and harmless synthetic drug that is administered to \" +\n \"employees to increase all of their stats, except experience, by 10%.\",\n employeeCreMult: 1.1,\n employeeChaMult: 1.1,\n employeeEffMult: 1.1,\n employeeIntMult: 1.1,\n },\n {\n name: \"Drones\",\n cost: 5e3,\n desc:\n \"Acquire the knowledge needed to create advanced drones. This research does nothing \" +\n \"by itself, but unlocks other Drone-related research.\",\n },\n {\n name: \"Drones - Assembly\",\n cost: 25e3,\n desc:\n \"Manufacture and use Assembly Drones to improve the efficiency of \" +\n \"your production lines. This increases all production by 20%.\",\n productionMult: 1.2,\n },\n {\n name: \"Drones - Transport\",\n cost: 30e3,\n desc:\n \"Manufacture and use intelligent Transport Drones to optimize \" +\n \"your warehouses. This increases the storage space of all warehouses \" +\n \"by 50%.\",\n storageMult: 1.5,\n },\n {\n name: \"Go-Juice\",\n cost: 25e3,\n desc:\n \"Provide employees with Go-Juice, a coffee-derivative that further enhances \" +\n \"the brain's dopamine production. This increases the maximum energy of all \" +\n \"employees by 10.\",\n },\n {\n name: \"Hi-Tech R&D Laboratory\",\n cost: 5e3,\n desc:\n \"Construct a cutting edge facility dedicated to advanced research and \" +\n \"and development. This allows you to spend Scientific Research \" +\n \"on powerful upgrades. It also globally increases Scientific Research \" +\n \"production by 10%.\",\n sciResearchMult: 1.1,\n },\n {\n name: \"HRBuddy-Recruitment\",\n cost: 15e3,\n desc:\n \"Use automated software to handle the hiring of employees. With this \" +\n \"research, each office will automatically hire one employee per \" +\n \"market cycle if there is available space.\",\n },\n {\n name: \"HRBuddy-Training\",\n cost: 20e3,\n desc:\n \"Use automated software to handle the training of employees. With this \" +\n \"research, each employee hired with HRBuddy-Recruitment will automatically \" +\n \"be assigned to 'Training', rather than being unassigned.\",\n },\n {\n name: \"JoyWire\",\n cost: 20e3,\n desc: \"A brain implant which is installed in employees, increasing their maximum happiness by 10.\",\n },\n {\n name: \"Market-TA.I\",\n cost: 20e3,\n desc:\n \"Develop advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know what price to sell your Materials/Products \" +\n \"at in order to avoid losing sales due to having too high of a mark-up. \" +\n \"It also lets you automatically use that sale price.\",\n },\n {\n name: \"Market-TA.II\",\n cost: 50e3,\n desc:\n \"Develop double-advanced AI software that uses technical analysis to \" +\n \"help you understand and exploit the market. This research \" +\n \"allows you to know how many sales of a Material/Product you lose or gain \" +\n \"from having too high or too low or a sale price. It also lets you automatically \" +\n \"set the sale price of your Materials/Products at the optimal price such that \" +\n \"the amount sold matches the amount produced.\",\n },\n {\n name: \"Overclock\",\n cost: 15e3,\n desc:\n \"Equip employees with a headset that uses transcranial direct current \" +\n \"stimulation (tDCS) to increase the speed of their neurotransmitters. \" +\n \"This research increases the intelligence and efficiency of all \" +\n \"employees by 25%.\",\n employeeEffMult: 1.25,\n employeeIntMult: 1.25,\n },\n {\n name: \"Self-Correcting Assemblers\",\n cost: 25e3,\n desc:\n \"Create assemblers that can be used for universal production. \" +\n \"These assemblers use deep learning to improve their efficiency \" +\n \"at their tasks. This research increases all production by 10%\",\n productionMult: 1.1,\n },\n {\n name: \"Sti.mu\",\n cost: 30e3,\n desc:\n \"Upgrade the tDCS headset to stimulate regions of the brain that \" +\n \"control confidence and enthusiasm. This research increases the max \" +\n \"morale of all employees by 10.\",\n },\n {\n name: \"sudo.Assist\",\n cost: 15e3,\n desc: \"Develop a virtual assistant AI to handle and manage administrative issues for your corporation.\",\n },\n {\n name: \"uPgrade: Capacity.I\",\n cost: 20e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 3 to 4).\",\n },\n {\n name: \"uPgrade: Capacity.II\",\n cost: 30e3,\n desc:\n \"Expand the industry's capacity for designing and manufacturing its \" +\n \"various products. This increases the industry's maximum number of products \" +\n \"by 1 (from 4 to 5).\",\n },\n {\n name: \"uPgrade: Dashboard\",\n cost: 5e3,\n desc:\n \"Improve the software used to manage the industry's production line \" +\n \"for its various products. This allows you to manage the production and \" +\n \"sale of a product before it's finished being designed.\",\n },\n {\n name: \"uPgrade: Fulcrum\",\n cost: 10e3,\n desc:\n \"Streamline the manufacturing of this industry's various products. \" +\n \"This research increases the production of your products by 5%\",\n productProductionMult: 1.05,\n },\n];\n","/**\n * Object representing an upgrade that can be purchased with hashes\n */\nexport interface IConstructorParams {\n cost?: number;\n costPerLevel: number;\n desc: string;\n hasTargetServer?: boolean;\n name: string;\n value: number;\n effectText?: (level: number) => JSX.Element | null;\n}\n\nexport class HashUpgrade {\n /**\n * If the upgrade has a flat cost (never increases), it goes here\n * Otherwise, this property should be undefined\n *\n * This property overrides the 'costPerLevel' property\n */\n cost?: number;\n\n /**\n * Base cost for this upgrade. Every time the upgrade is purchased,\n * its cost increases by this same amount (so its 1x, 2x, 3x, 4x, etc.)\n */\n costPerLevel = 0;\n\n /**\n * Description of what the upgrade does\n */\n desc = \"\";\n\n /**\n * Boolean indicating that this upgrade's effect affects a single server,\n * the \"target\" server\n */\n hasTargetServer = false;\n\n // Name of upgrade\n name = \"\";\n\n // Generic value used to indicate the potency/amount of this upgrade's effect\n // The meaning varies between different upgrades\n value = 0;\n\n constructor(p: IConstructorParams) {\n if (p.cost != null) {\n this.cost = p.cost;\n }\n if (p.effectText != null) {\n this.effectText = p.effectText;\n }\n\n this.costPerLevel = p.costPerLevel;\n this.desc = p.desc;\n this.hasTargetServer = p.hasTargetServer ? p.hasTargetServer : false;\n this.name = p.name;\n this.value = p.value;\n }\n\n // Functions that returns the UI element to display the effect of this upgrade.\n effectText: (level: number) => JSX.Element | null = () => null;\n\n getCost(levels: number): number {\n if (typeof this.cost === \"number\") {\n return this.cost;\n }\n\n return Math.round((levels + 1) * this.costPerLevel);\n }\n}\n","// Metadata used to construct all Hash Upgrades\nimport React from \"react\";\nimport { IConstructorParams } from \"../HashUpgrade\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Money } from \"../../ui/React/Money\";\n\nexport const HashUpgradesMetadata: IConstructorParams[] = [\n {\n cost: 4,\n costPerLevel: 4,\n desc: \"Sell hashes for $1m\",\n name: \"Sell for Money\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for \n \n ),\n value: 1e6,\n },\n {\n costPerLevel: 100,\n desc: \"Sell hashes for $1b in Corporation funds\",\n name: \"Sell for Corporation Funds\",\n effectText: (level: number): JSX.Element | null => (\n <>\n Sold for Corporation funds.\n \n ),\n value: 1e9,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to decrease the minimum security of a single server by 2%. \" +\n \"Note that a server's minimum security cannot go below 1. This effect persists \" +\n \"until you install Augmentations (since servers are reset at that time).\",\n hasTargetServer: true,\n name: \"Reduce Minimum Security\",\n value: 0.98,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to increase the maximum amount of money on a single server by 2%. \" +\n \"This effect persists until you install Augmentations (since servers \" +\n \"are reset at that time).\",\n hasTargetServer: true,\n name: \"Increase Maximum Money\",\n value: 1.02,\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when studying at a university by 20%. \" +\n \"This effect persists until you install Augmentations\",\n name: \"Improve Studying\",\n effectText: (level: number): JSX.Element | null => <>Improves studying by {level * 20}%,\n value: 20, // Improves studying by value%\n },\n {\n costPerLevel: 50,\n desc:\n \"Use hashes to improve the experience earned when training at the gym by 20%. This effect \" +\n \"persists until you install Augmentations\",\n name: \"Improve Gym Training\",\n effectText: (level: number): JSX.Element | null => <>Improves training by {level * 20}%,\n value: 20, // Improves training by value%\n },\n {\n costPerLevel: 200,\n desc: \"Exchange hashes for 1k Scientific Research in all of your Corporation's Industries\",\n name: \"Exchange for Corporation Research\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {level}k Scientific Research in your industries.\n ),\n value: 1000,\n },\n {\n costPerLevel: 250,\n desc: \"Exchange hashes for 100 Bladeburner Rank\",\n name: \"Exchange for Bladeburner Rank\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(100 * level, \"0a\")} Bladeburner rank\n ),\n value: 100,\n },\n {\n costPerLevel: 250,\n desc: \"Exchanges hashes for 10 Bladeburner Skill Points\",\n name: \"Exchange for Bladeburner SP\",\n effectText: (level: number): JSX.Element | null => (\n <>Acquired a total of {numeralWrapper.format(10 * level, \"0a\")} Bladeburner Skill Points\n ),\n value: 10,\n },\n {\n costPerLevel: 200,\n desc: \"Generate a random Coding Contract somewhere on the network\",\n name: \"Generate Coding Contract\",\n effectText: (level: number): JSX.Element | null => <>Generated {level} contracts.,\n value: 1,\n },\n];\n","/**\n * The environment in which a script runs. The environment holds\n * Netscript functions and arguments for that script.\n */\nimport { IMap } from \"../types\";\n\nexport class Environment {\n /**\n * Parent environment. Used to implement \"scope\"\n */\n parent: Environment | null = null;\n\n /**\n * Whether or not the script that uses this Environment should stop running\n */\n stopFlag = false;\n\n /**\n * Environment variables (currently only Netscript functions)\n */\n vars: IMap = {};\n\n constructor(parent: Environment | null) {\n if (parent instanceof Environment) {\n this.vars = Object.assign({}, parent.vars);\n }\n\n this.parent = parent;\n }\n\n /**\n * Finds the scope where the variable with the given name is defined\n */\n lookup(name: string): Environment | null {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n let scope: Environment | null = this;\n while (scope) {\n if (Object.prototype.hasOwnProperty.call(scope.vars, name)) {\n return scope;\n }\n scope = scope.parent;\n }\n\n return null;\n }\n\n //Get the current value of a variable\n get(name: string): any {\n if (name in this.vars) {\n return this.vars[name];\n }\n\n throw new Error(`Undefined variable ${name}`);\n }\n\n //Sets the value of a variable in any scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n set(name: string, value: any): any {\n const scope = this.lookup(name);\n\n //If scope has a value, then this variable is already set in a higher scope, so\n //set is there. Otherwise, create a new variable in the local scope\n if (scope !== null) {\n return (scope.vars[name] = value);\n } else {\n return (this.vars[name] = value);\n }\n }\n\n //Creates (or overwrites) a variable in the current scope\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n def(name: string, value: any): any {\n return (this.vars[name] = value);\n }\n}\n","/**\n * Determines if the number is a power of 2\n * @param n The number to check.\n */\nexport function isPowerOfTwo(n: number): boolean {\n if (isNaN(n)) {\n return false;\n }\n\n if (n === 0) {\n return false;\n }\n\n // Disabiling the bitwise rule because it's honestly the most effecient way to check for this.\n // tslint:disable-next-line:no-bitwise\n return (n & (n - 1)) === 0;\n}\n","/**\n * Initialization metadata for all Stocks. This is used to generate the\n * stock parameter values upon a reset\n *\n * Some notes:\n * - Megacorporations have better otlkMags\n * - Higher volatility -> Bigger spread\n * - Lower price -> Bigger spread\n * - Share tx required for movement used for balancing\n */\nimport { StockSymbols } from \"./StockSymbols\";\nimport { IConstructorParams } from \"../Stock\";\nimport { LocationName } from \"../../Locations/data/LocationNames\";\n\nexport const InitStockMetadata: IConstructorParams[] = [\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 17e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.AevumECorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumECorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 34e3,\n min: 24e3,\n },\n marketCap: 2.4e12,\n mv: {\n divisor: 100,\n max: 50,\n min: 40,\n },\n name: LocationName.Sector12MegaCorp,\n otlkMag: 19,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12MegaCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 12e3,\n },\n marketCap: 1.6e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12BladeIndustries,\n otlkMag: 13,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12BladeIndustries],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 10e3,\n },\n marketCap: 1.5e12,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.AevumClarkeIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 5,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumClarkeIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 43e3,\n min: 32e3,\n },\n marketCap: 1.8e12,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n otlkMag: 12,\n spreadPerc: {\n divisor: 10,\n max: 6,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniTekIncorporated],\n },\n\n {\n b: true,\n initPrice: {\n max: 80e3,\n min: 50e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 110,\n min: 100,\n },\n name: LocationName.Sector12FourSigma,\n otlkMag: 17,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12FourSigma],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 16e3,\n },\n marketCap: 1.9e12,\n mv: {\n divisor: 100,\n max: 85,\n min: 75,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 7,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.ChongqingKuaiGongInternational],\n },\n\n {\n b: true,\n initPrice: {\n max: 36e3,\n min: 29e3,\n },\n marketCap: 2e12,\n mv: {\n divisor: 100,\n max: 130,\n min: 120,\n },\n name: LocationName.AevumFulcrumTechnologies,\n otlkMag: 16,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 1,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.AevumFulcrumTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 25e3,\n min: 20e3,\n },\n marketCap: 1.2e12,\n mv: {\n divisor: 100,\n max: 90,\n min: 80,\n },\n name: LocationName.IshimaStormTechnologies,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.IshimaStormTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 19e3,\n min: 6e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.NewTokyoDefComm,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoDefComm],\n },\n\n {\n b: true,\n initPrice: {\n max: 18e3,\n min: 10e3,\n },\n marketCap: 825e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.VolhavenHeliosLabs,\n otlkMag: 9,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenHeliosLabs],\n },\n\n {\n b: true,\n initPrice: {\n max: 14e3,\n min: 8e3,\n },\n marketCap: 1e12,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.NewTokyoVitaLife,\n otlkMag: 7,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoVitaLife],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 800e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 60,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n otlkMag: 7.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12IcarusMicrosystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 29e3,\n min: 16e3,\n },\n marketCap: 900e9,\n mv: {\n divisor: 100,\n max: 60,\n min: 50,\n },\n name: LocationName.Sector12UniversalEnergy,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.Sector12UniversalEnergy],\n },\n\n {\n b: true,\n initPrice: {\n max: 17e3,\n min: 8e3,\n },\n marketCap: 640e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.AevumAeroCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.AevumAeroCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 15e3,\n min: 6e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 75,\n min: 65,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n otlkMag: 4.5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.VolhavenOmniaCybersystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 28e3,\n min: 14e3,\n },\n marketCap: 705e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n otlkMag: 8.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.ChongqingSolarisSpaceSystems],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 12e3,\n },\n marketCap: 695e9,\n mv: {\n divisor: 100,\n max: 65,\n min: 55,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n otlkMag: 10.5,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.NewTokyoGlobalPharmaceuticals],\n },\n\n {\n b: true,\n initPrice: {\n max: 27e3,\n min: 15e3,\n },\n marketCap: 600e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.IshimaNovaMedical,\n otlkMag: 5,\n spreadPerc: {\n divisor: 10,\n max: 11,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 42e3,\n },\n symbol: StockSymbols[LocationName.IshimaNovaMedical],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 450e9,\n mv: {\n divisor: 100,\n max: 260,\n min: 240,\n },\n name: LocationName.AevumWatchdogSecurity,\n otlkMag: 1.5,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 12e3,\n },\n symbol: StockSymbols[LocationName.AevumWatchdogSecurity],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 4.5e3,\n },\n marketCap: 300e9,\n mv: {\n divisor: 100,\n max: 135,\n min: 115,\n },\n name: LocationName.VolhavenLexoCorp,\n otlkMag: 6,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 108e3,\n min: 36e3,\n },\n symbol: StockSymbols[LocationName.VolhavenLexoCorp],\n },\n\n {\n b: true,\n initPrice: {\n max: 7e3,\n min: 2e3,\n },\n marketCap: 180e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: LocationName.AevumRhoConstruction,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.AevumRhoConstruction],\n },\n\n {\n b: true,\n initPrice: {\n max: 8.5e3,\n min: 4e3,\n },\n marketCap: 240e9,\n mv: {\n divisor: 100,\n max: 205,\n min: 175,\n },\n name: LocationName.Sector12AlphaEnterprises,\n otlkMag: 10,\n spreadPerc: {\n divisor: 10,\n max: 16,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.Sector12AlphaEnterprises],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 3e3,\n },\n marketCap: 200e9,\n mv: {\n divisor: 100,\n max: 170,\n min: 150,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n otlkMag: 3,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 5,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.VolhavenSysCoreSecurities],\n },\n\n {\n b: true,\n initPrice: {\n max: 6e3,\n min: 1e3,\n },\n marketCap: 185e9,\n mv: {\n divisor: 100,\n max: 100,\n min: 80,\n },\n name: LocationName.VolhavenCompuTek,\n otlkMag: 4,\n spreadPerc: {\n divisor: 10,\n max: 12,\n min: 4,\n },\n shareTxForMovement: {\n max: 126e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.VolhavenCompuTek],\n },\n\n {\n b: true,\n initPrice: {\n max: 5e3,\n min: 1e3,\n },\n marketCap: 58e9,\n mv: {\n divisor: 100,\n max: 400,\n min: 200,\n },\n name: LocationName.AevumNetLinkTechnologies,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 20,\n min: 5,\n },\n shareTxForMovement: {\n max: 54e3,\n min: 18e3,\n },\n symbol: StockSymbols[LocationName.AevumNetLinkTechnologies],\n },\n\n {\n b: true,\n initPrice: {\n max: 8e3,\n min: 1e3,\n },\n marketCap: 60e9,\n mv: {\n divisor: 100,\n max: 110,\n min: 90,\n },\n name: LocationName.IshimaOmegaSoftware,\n otlkMag: 0.5,\n spreadPerc: {\n divisor: 10,\n max: 13,\n min: 4,\n },\n shareTxForMovement: {\n max: 90e3,\n min: 30e3,\n },\n symbol: StockSymbols[LocationName.IshimaOmegaSoftware],\n },\n\n {\n b: false,\n initPrice: {\n max: 4.5e3,\n min: 500,\n },\n marketCap: 45e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: LocationName.Sector12FoodNStuff,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 6,\n },\n shareTxForMovement: {\n max: 180e3,\n min: 60e3,\n },\n symbol: StockSymbols[LocationName.Sector12FoodNStuff],\n },\n\n {\n b: true,\n initPrice: {\n max: 3.5e3,\n min: 1.5e3,\n },\n marketCap: 30e9,\n mv: {\n divisor: 100,\n max: 275,\n min: 100,\n },\n name: \"Sigma Cosmetics\",\n otlkMag: 0,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 70e3,\n min: 20e3,\n },\n symbol: StockSymbols[\"Sigma Cosmetics\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 42e9,\n mv: {\n divisor: 100,\n max: 350,\n min: 200,\n },\n name: LocationName.Sector12JoesGuns,\n otlkMag: 1,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 6,\n },\n shareTxForMovement: {\n max: 52e3,\n min: 15e3,\n },\n symbol: StockSymbols[LocationName.Sector12JoesGuns],\n },\n\n {\n b: true,\n initPrice: {\n max: 1.5e3,\n min: 250,\n },\n marketCap: 100e9,\n mv: {\n divisor: 100,\n max: 175,\n min: 120,\n },\n name: \"Catalyst Ventures\",\n otlkMag: 13.5,\n spreadPerc: {\n divisor: 10,\n max: 14,\n min: 5,\n },\n shareTxForMovement: {\n max: 72e3,\n min: 24e3,\n },\n symbol: StockSymbols[\"Catalyst Ventures\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 30e3,\n min: 15e3,\n },\n marketCap: 360e9,\n mv: {\n divisor: 100,\n max: 80,\n min: 70,\n },\n name: \"Microdyne Technologies\",\n otlkMag: 8,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 3,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Microdyne Technologies\"],\n },\n\n {\n b: true,\n initPrice: {\n max: 24e3,\n min: 12e3,\n },\n marketCap: 420e9,\n mv: {\n divisor: 100,\n max: 70,\n min: 50,\n },\n name: \"Titan Laboratories\",\n otlkMag: 11,\n spreadPerc: {\n divisor: 10,\n max: 10,\n min: 2,\n },\n shareTxForMovement: {\n max: 216e3,\n min: 90e3,\n },\n symbol: StockSymbols[\"Titan Laboratories\"],\n },\n];\n","import { FactionNames } from \"../Faction/data/FactionNames\";\nimport { GangConstants } from \"../Gang/data/Constants\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { Gang } from \"../Gang/Gang\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { GangMemberTasks } from \"../Gang/GangMemberTasks\";\nimport { GangMemberUpgrades } from \"../Gang/GangMemberUpgrades\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GangMember } from \"../Gang/GangMember\";\nimport { GangMemberTask } from \"../Gang/GangMemberTask\";\n\nimport {\n Gang as IGang,\n GangGenInfo,\n GangOtherInfo,\n GangMemberInfo,\n GangMemberAscension,\n EquipmentStats,\n GangTaskStats,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGang {\n const checkGangApiAccess = function (func: string): void {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n const hasAccess = gang instanceof Gang;\n if (!hasAccess) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `You do not currently have a Gang`);\n }\n };\n\n const getGangMember = function (func: string, name: string): GangMember {\n const gang = player.gang;\n if (gang === null) throw new Error(\"Must have joined gang\");\n for (const member of gang.members) if (member.name === name) return member;\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid gang member: '${name}'`);\n };\n\n const getGangTask = function (func: string, name: string): GangMemberTask {\n const task = GangMemberTasks[name];\n if (!task) {\n throw helper.makeRuntimeErrorMsg(`gang.${func}`, `Invalid task: '${name}'`);\n }\n\n return task;\n };\n\n return {\n createGang: function (_faction: unknown): boolean {\n const faction = helper.string(\"createGang\", \"faction\", _faction);\n helper.updateDynamicRam(\"createGang\", getRamCost(player, \"gang\", \"createGang\"));\n // this list is copied from Faction/ui/Root.tsx\n\n if (!player.canAccessGang() || !GangConstants.Names.includes(faction)) return false;\n if (player.inGang()) return false;\n if (!player.factions.includes(faction)) return false;\n\n const isHacking = faction === FactionNames.NiteSec || faction === FactionNames.TheBlackHand;\n player.startGang(faction, isHacking);\n return true;\n },\n inGang: function (): boolean {\n helper.updateDynamicRam(\"inGang\", getRamCost(player, \"gang\", \"inGang\"));\n return player.inGang();\n },\n getMemberNames: function (): string[] {\n helper.updateDynamicRam(\"getMemberNames\", getRamCost(player, \"gang\", \"getMemberNames\"));\n checkGangApiAccess(\"getMemberNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.members.map((member) => member.name);\n },\n getGangInformation: function (): GangGenInfo {\n helper.updateDynamicRam(\"getGangInformation\", getRamCost(player, \"gang\", \"getGangInformation\"));\n checkGangApiAccess(\"getGangInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return {\n faction: gang.facName,\n isHacking: gang.isHackingGang,\n moneyGainRate: gang.moneyGainRate,\n power: gang.getPower(),\n respect: gang.respect,\n respectGainRate: gang.respectGainRate,\n territory: gang.getTerritory(),\n territoryClashChance: gang.territoryClashChance,\n territoryWarfareEngaged: gang.territoryWarfareEngaged,\n wantedLevel: gang.wanted,\n wantedLevelGainRate: gang.wantedGainRate,\n wantedPenalty: gang.getWantedPenalty(),\n };\n },\n getOtherGangInformation: function (): GangOtherInfo {\n helper.updateDynamicRam(\"getOtherGangInformation\", getRamCost(player, \"gang\", \"getOtherGangInformation\"));\n checkGangApiAccess(\"getOtherGangInformation\");\n const cpy: any = {};\n for (const gang of Object.keys(AllGangs)) {\n cpy[gang] = Object.assign({}, AllGangs[gang]);\n }\n\n return cpy;\n },\n getMemberInformation: function (_memberName: unknown): GangMemberInfo {\n const memberName = helper.string(\"getMemberInformation\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"getMemberInformation\", getRamCost(player, \"gang\", \"getMemberInformation\"));\n checkGangApiAccess(\"getMemberInformation\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getMemberInformation\", memberName);\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\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\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\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\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\n upgrades: member.upgrades.slice(),\n augmentations: member.augmentations.slice(),\n\n respectGain: member.calculateRespectGain(gang),\n wantedLevelGain: member.calculateWantedLevelGain(gang),\n moneyGain: member.calculateMoneyGain(gang),\n };\n },\n canRecruitMember: function (): boolean {\n helper.updateDynamicRam(\"canRecruitMember\", getRamCost(player, \"gang\", \"canRecruitMember\"));\n checkGangApiAccess(\"canRecruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return gang.canRecruitMember();\n },\n recruitMember: function (_memberName: unknown): boolean {\n const memberName = helper.string(\"recruitMember\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"recruitMember\", getRamCost(player, \"gang\", \"recruitMember\"));\n checkGangApiAccess(\"recruitMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const recruited = gang.recruitMember(memberName);\n if (recruited) {\n workerScript.log(\"gang.recruitMember\", () => `Successfully recruited Gang Member '${memberName}'`);\n } else {\n workerScript.log(\"gang.recruitMember\", () => `Failed to recruit Gang Member '${memberName}'`);\n }\n\n return recruited;\n },\n getTaskNames: function (): string[] {\n helper.updateDynamicRam(\"getTaskNames\", getRamCost(player, \"gang\", \"getTaskNames\"));\n checkGangApiAccess(\"getTaskNames\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const tasks = gang.getAllTaskNames();\n tasks.unshift(\"Unassigned\");\n return tasks;\n },\n setMemberTask: function (_memberName: unknown, _taskName: unknown): boolean {\n const memberName = helper.string(\"setMemberTask\", \"memberName\", _memberName);\n const taskName = helper.string(\"setMemberTask\", \"taskName\", _taskName);\n helper.updateDynamicRam(\"setMemberTask\", getRamCost(player, \"gang\", \"setMemberTask\"));\n checkGangApiAccess(\"setMemberTask\");\n const member = getGangMember(\"setMemberTask\", memberName);\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (!gang.getAllTaskNames().includes(taskName)) {\n workerScript.log(\n \"gang.setMemberTask\",\n () =>\n `Failed to assign Gang Member '${memberName}' to Invalid task '${taskName}'. '${memberName}' is now Unassigned`,\n );\n return member.assignToTask(\"Unassigned\");\n }\n const success = member.assignToTask(taskName);\n if (success) {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`,\n );\n } else {\n workerScript.log(\n \"gang.setMemberTask\",\n () => `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`,\n );\n }\n\n return success;\n },\n getTaskStats: function (_taskName: unknown): GangTaskStats {\n const taskName = helper.string(\"getTaskStats\", \"taskName\", _taskName);\n helper.updateDynamicRam(\"getTaskStats\", getRamCost(player, \"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 (): string[] {\n helper.updateDynamicRam(\"getEquipmentNames\", getRamCost(player, \"gang\", \"getEquipmentNames\"));\n checkGangApiAccess(\"getEquipmentNames\");\n return Object.keys(GangMemberUpgrades);\n },\n getEquipmentCost: function (_equipName: any): number {\n const equipName = helper.string(\"getEquipmentCost\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"getEquipmentCost\", getRamCost(player, \"gang\", \"getEquipmentCost\"));\n checkGangApiAccess(\"getEquipmentCost\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const upg = GangMemberUpgrades[equipName];\n if (upg === null) return Infinity;\n return gang.getUpgradeCost(upg);\n },\n getEquipmentType: function (_equipName: unknown): string {\n const equipName = helper.string(\"getEquipmentType\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"getEquipmentType\", getRamCost(player, \"gang\", \"getEquipmentType\"));\n checkGangApiAccess(\"getEquipmentType\");\n const upg = GangMemberUpgrades[equipName];\n if (upg == null) return \"\";\n return upg.getType();\n },\n getEquipmentStats: function (_equipName: unknown): EquipmentStats {\n const equipName = helper.string(\"getEquipmentStats\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"getEquipmentStats\", getRamCost(player, \"gang\", \"getEquipmentStats\"));\n checkGangApiAccess(\"getEquipmentStats\");\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) {\n throw helper.makeRuntimeErrorMsg(\"getEquipmentStats\", `Invalid equipment: ${equipName}`);\n }\n const typecheck: EquipmentStats = equipment.mults;\n return Object.assign({}, typecheck) as any;\n },\n purchaseEquipment: function (_memberName: unknown, _equipName: unknown): boolean {\n const memberName = helper.string(\"purchaseEquipment\", \"memberName\", _memberName);\n const equipName = helper.string(\"purchaseEquipment\", \"equipName\", _equipName);\n helper.updateDynamicRam(\"purchaseEquipment\", getRamCost(player, \"gang\", \"purchaseEquipment\"));\n checkGangApiAccess(\"purchaseEquipment\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"purchaseEquipment\", memberName);\n const equipment = GangMemberUpgrades[equipName];\n if (!equipment) return false;\n const res = member.buyUpgrade(equipment, player, gang);\n if (res) {\n workerScript.log(\"gang.purchaseEquipment\", () => `Purchased '${equipName}' for Gang member '${memberName}'`);\n } else {\n workerScript.log(\n \"gang.purchaseEquipment\",\n () => `Failed to purchase '${equipName}' for Gang member '${memberName}'`,\n );\n }\n\n return res;\n },\n ascendMember: function (_memberName: unknown): GangMemberAscension | undefined {\n const memberName = helper.string(\"ascendMember\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"ascendMember\", getRamCost(player, \"gang\", \"ascendMember\"));\n checkGangApiAccess(\"ascendMember\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"ascendMember\", memberName);\n if (!member.canAscend()) return;\n return gang.ascendMember(member, workerScript);\n },\n getAscensionResult: function (_memberName: unknown): GangMemberAscension | undefined {\n const memberName = helper.string(\"getAscensionResult\", \"memberName\", _memberName);\n helper.updateDynamicRam(\"getAscensionResult\", getRamCost(player, \"gang\", \"getAscensionResult\"));\n checkGangApiAccess(\"getAscensionResult\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n const member = getGangMember(\"getAscensionResult\", memberName);\n if (!member.canAscend()) return;\n return {\n respect: member.earnedRespect,\n ...member.getAscensionResults(),\n };\n },\n setTerritoryWarfare: function (_engage: unknown): void {\n const engage = helper.boolean(_engage);\n helper.updateDynamicRam(\"setTerritoryWarfare\", getRamCost(player, \"gang\", \"setTerritoryWarfare\"));\n checkGangApiAccess(\"setTerritoryWarfare\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (engage) {\n gang.territoryWarfareEngaged = true;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Engaging in Gang Territory Warfare\");\n } else {\n gang.territoryWarfareEngaged = false;\n workerScript.log(\"gang.setTerritoryWarfare\", () => \"Disengaging in Gang Territory Warfare\");\n }\n },\n getChanceToWinClash: function (_otherGang: unknown): number {\n const otherGang = helper.string(\"getChanceToWinClash\", \"otherGang\", _otherGang);\n helper.updateDynamicRam(\"getChanceToWinClash\", getRamCost(player, \"gang\", \"getChanceToWinClash\"));\n checkGangApiAccess(\"getChanceToWinClash\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n if (AllGangs[otherGang] == null) {\n throw helper.makeRuntimeErrorMsg(`gang.getChanceToWinClash`, `Invalid gang: ${otherGang}`);\n }\n\n const playerPower = AllGangs[gang.facName].power;\n const otherPower = AllGangs[otherGang].power;\n\n return playerPower / (otherPower + playerPower);\n },\n getBonusTime: function (): number {\n helper.updateDynamicRam(\"getBonusTime\", getRamCost(player, \"gang\", \"getBonusTime\"));\n checkGangApiAccess(\"getBonusTime\");\n const gang = player.gang;\n if (gang === null) throw new Error(\"Should not be called without Gang\");\n return Math.round(gang.storedCycles / 5);\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { FactionWorkType } from \"../Faction/FactionWorkTypeEnum\";\nimport { SourceFileFlags } from \"../SourceFile/SourceFileFlags\";\nimport { SleeveTaskType } from \"../PersonObjects/Sleeve/SleeveTaskTypesEnum\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { findSleevePurchasableAugs } from \"../PersonObjects/Sleeve/SleeveHelpers\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { findCrime } from \"../Crime/CrimeHelpers\";\n\nimport {\n AugmentPair,\n Sleeve as ISleeve,\n SleeveInformation,\n SleeveSkills,\n SleeveTask,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptSleeve(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): ISleeve {\n const checkSleeveAPIAccess = function (func: string): void {\n if (player.bitNodeN !== 10 && !SourceFileFlags[10]) {\n throw helper.makeRuntimeErrorMsg(\n `sleeve.${func}`,\n \"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\n const checkSleeveNumber = function (func: string, sleeveNumber: number): void {\n if (sleeveNumber >= player.sleeves.length || sleeveNumber < 0) {\n const msg = `Invalid sleeve number: ${sleeveNumber}`;\n workerScript.log(func, () => msg);\n throw helper.makeRuntimeErrorMsg(`sleeve.${func}`, msg);\n }\n };\n\n const getSleeveStats = function (sleeveNumber: number): SleeveSkills {\n const sl = player.sleeves[sleeveNumber];\n return {\n shock: 100 - sl.shock,\n sync: sl.sync,\n hacking: sl.hacking,\n strength: sl.strength,\n defense: sl.defense,\n dexterity: sl.dexterity,\n agility: sl.agility,\n charisma: sl.charisma,\n };\n };\n\n return {\n getNumSleeves: function (): number {\n helper.updateDynamicRam(\"getNumSleeves\", getRamCost(player, \"sleeve\", \"getNumSleeves\"));\n checkSleeveAPIAccess(\"getNumSleeves\");\n return player.sleeves.length;\n },\n setToShockRecovery: function (_sleeveNumber: unknown): boolean {\n const sleeveNumber = helper.number(\"setToShockRecovery\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"setToShockRecovery\", getRamCost(player, \"sleeve\", \"setToShockRecovery\"));\n checkSleeveAPIAccess(\"setToShockRecovery\");\n checkSleeveNumber(\"setToShockRecovery\", sleeveNumber);\n return player.sleeves[sleeveNumber].shockRecovery(player);\n },\n setToSynchronize: function (_sleeveNumber: unknown): boolean {\n const sleeveNumber = helper.number(\"setToSynchronize\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"setToSynchronize\", getRamCost(player, \"sleeve\", \"setToSynchronize\"));\n checkSleeveAPIAccess(\"setToSynchronize\");\n checkSleeveNumber(\"setToSynchronize\", sleeveNumber);\n return player.sleeves[sleeveNumber].synchronize(player);\n },\n setToCommitCrime: function (_sleeveNumber: unknown, _crimeRoughName: unknown): boolean {\n const sleeveNumber = helper.number(\"setToCommitCrime\", \"sleeveNumber\", _sleeveNumber);\n const crimeRoughName = helper.string(\"setToCommitCrime\", \"crimeName\", _crimeRoughName);\n helper.updateDynamicRam(\"setToCommitCrime\", getRamCost(player, \"sleeve\", \"setToCommitCrime\"));\n checkSleeveAPIAccess(\"setToCommitCrime\");\n checkSleeveNumber(\"setToCommitCrime\", sleeveNumber);\n const crime = findCrime(crimeRoughName);\n if (crime === null) {\n return false;\n }\n return player.sleeves[sleeveNumber].commitCrime(player, crime.name);\n },\n setToUniversityCourse: function (_sleeveNumber: unknown, _universityName: unknown, _className: unknown): boolean {\n const sleeveNumber = helper.number(\"setToUniversityCourse\", \"sleeveNumber\", _sleeveNumber);\n const universityName = helper.string(\"setToUniversityCourse\", \"universityName\", _universityName);\n const className = helper.string(\"setToUniversityCourse\", \"className\", _className);\n helper.updateDynamicRam(\"setToUniversityCourse\", getRamCost(player, \"sleeve\", \"setToUniversityCourse\"));\n checkSleeveAPIAccess(\"setToUniversityCourse\");\n checkSleeveNumber(\"setToUniversityCourse\", sleeveNumber);\n return player.sleeves[sleeveNumber].takeUniversityCourse(player, universityName, className);\n },\n travel: function (_sleeveNumber: unknown, _cityName: unknown): boolean {\n const sleeveNumber = helper.number(\"travel\", \"sleeveNumber\", _sleeveNumber);\n const cityName = helper.string(\"setToUniversityCourse\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"travel\", getRamCost(player, \"sleeve\", \"travel\"));\n checkSleeveAPIAccess(\"travel\");\n checkSleeveNumber(\"travel\", sleeveNumber);\n return player.sleeves[sleeveNumber].travel(player, cityName as CityName);\n },\n setToCompanyWork: function (_sleeveNumber: unknown, acompanyName: unknown): boolean {\n const sleeveNumber = helper.number(\"setToCompanyWork\", \"sleeveNumber\", _sleeveNumber);\n const companyName = helper.string(\"setToUniversityCourse\", \"companyName\", acompanyName);\n helper.updateDynamicRam(\"setToCompanyWork\", getRamCost(player, \"sleeve\", \"setToCompanyWork\"));\n checkSleeveAPIAccess(\"setToCompanyWork\");\n checkSleeveNumber(\"setToCompanyWork\", sleeveNumber);\n\n // Cannot work at the same company that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Company && other.currentTaskLocation === companyName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for company ${companyName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForCompany(player, companyName);\n },\n setToFactionWork: function (_sleeveNumber: unknown, _factionName: unknown, _workType: unknown): boolean {\n const sleeveNumber = helper.number(\"setToFactionWork\", \"sleeveNumber\", _sleeveNumber);\n const factionName = helper.string(\"setToUniversityCourse\", \"factionName\", _factionName);\n const workType = helper.string(\"setToUniversityCourse\", \"workType\", _workType);\n helper.updateDynamicRam(\"setToFactionWork\", getRamCost(player, \"sleeve\", \"setToFactionWork\"));\n checkSleeveAPIAccess(\"setToFactionWork\");\n checkSleeveNumber(\"setToFactionWork\", sleeveNumber);\n\n // Cannot work at the same faction that another sleeve is working at\n for (let i = 0; i < player.sleeves.length; ++i) {\n if (i === sleeveNumber) {\n continue;\n }\n const other = player.sleeves[i];\n if (other.currentTask === SleeveTaskType.Faction && other.currentTaskLocation === factionName) {\n throw helper.makeRuntimeErrorMsg(\n \"sleeve.setToFactionWork\",\n `Sleeve ${sleeveNumber} cannot work for faction ${factionName} because Sleeve ${i} is already working for them.`,\n );\n }\n }\n\n return player.sleeves[sleeveNumber].workForFaction(player, factionName, workType);\n },\n setToGymWorkout: function (_sleeveNumber: unknown, _gymName: unknown, _stat: unknown): boolean {\n const sleeveNumber = helper.number(\"setToGymWorkout\", \"sleeveNumber\", _sleeveNumber);\n const gymName = helper.string(\"setToUniversityCourse\", \"gymName\", _gymName);\n const stat = helper.string(\"setToUniversityCourse\", \"stat\", _stat);\n helper.updateDynamicRam(\"setToGymWorkout\", getRamCost(player, \"sleeve\", \"setToGymWorkout\"));\n checkSleeveAPIAccess(\"setToGymWorkout\");\n checkSleeveNumber(\"setToGymWorkout\", sleeveNumber);\n\n return player.sleeves[sleeveNumber].workoutAtGym(player, gymName, stat);\n },\n getSleeveStats: function (_sleeveNumber: unknown): SleeveSkills {\n const sleeveNumber = helper.number(\"getSleeveStats\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getSleeveStats\", getRamCost(player, \"sleeve\", \"getSleeveStats\"));\n checkSleeveAPIAccess(\"getSleeveStats\");\n checkSleeveNumber(\"getSleeveStats\", sleeveNumber);\n return getSleeveStats(sleeveNumber);\n },\n getTask: function (_sleeveNumber: unknown): SleeveTask {\n const sleeveNumber = helper.number(\"getTask\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getTask\", getRamCost(player, \"sleeve\", \"getTask\"));\n checkSleeveAPIAccess(\"getTask\");\n checkSleeveNumber(\"getTask\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n task: SleeveTaskType[sl.currentTask],\n crime: sl.crimeType,\n location: sl.currentTaskLocation,\n gymStatType: sl.gymStatType,\n factionWorkType: FactionWorkType[sl.factionWorkType],\n };\n },\n getInformation: function (_sleeveNumber: unknown): SleeveInformation {\n const sleeveNumber = helper.number(\"getInformation\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getInformation\", getRamCost(player, \"sleeve\", \"getInformation\"));\n checkSleeveAPIAccess(\"getInformation\");\n checkSleeveNumber(\"getInformation\", sleeveNumber);\n\n const sl = player.sleeves[sleeveNumber];\n return {\n tor: false,\n city: sl.city,\n hp: sl.hp,\n jobs: Object.keys(player.jobs), // technically sleeves have the same jobs as the player.\n jobTitle: Object.values(player.jobs),\n maxHp: sl.max_hp,\n\n mult: {\n agility: sl.agility_mult,\n agilityExp: sl.agility_exp_mult,\n charisma: sl.charisma_mult,\n charismaExp: sl.charisma_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\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),\n };\n },\n getSleeveAugmentations: function (_sleeveNumber: unknown): string[] {\n const sleeveNumber = helper.number(\"getSleeveAugmentations\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getSleeveAugmentations\", getRamCost(player, \"sleeve\", \"getSleeveAugmentations\"));\n checkSleeveAPIAccess(\"getSleeveAugmentations\");\n checkSleeveNumber(\"getSleeveAugmentations\", sleeveNumber);\n\n const augs = [];\n for (let i = 0; i < player.sleeves[sleeveNumber].augmentations.length; i++) {\n augs.push(player.sleeves[sleeveNumber].augmentations[i].name);\n }\n return augs;\n },\n getSleevePurchasableAugs: function (_sleeveNumber: unknown): AugmentPair[] {\n const sleeveNumber = helper.number(\"getSleevePurchasableAugs\", \"sleeveNumber\", _sleeveNumber);\n helper.updateDynamicRam(\"getSleevePurchasableAugs\", getRamCost(player, \"sleeve\", \"getSleevePurchasableAugs\"));\n checkSleeveAPIAccess(\"getSleevePurchasableAugs\");\n checkSleeveNumber(\"getSleevePurchasableAugs\", sleeveNumber);\n\n const purchasableAugs = findSleevePurchasableAugs(player.sleeves[sleeveNumber], player);\n const augs = [];\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: unknown, _augName: unknown): boolean {\n const sleeveNumber = helper.number(\"purchaseSleeveAug\", \"sleeveNumber\", _sleeveNumber);\n const augName = helper.string(\"purchaseSleeveAug\", \"augName\", _augName);\n helper.updateDynamicRam(\"purchaseSleeveAug\", getRamCost(player, \"sleeve\", \"purchaseSleeveAug\"));\n checkSleeveAPIAccess(\"purchaseSleeveAug\");\n checkSleeveNumber(\"purchaseSleeveAug\", sleeveNumber);\n\n if (getSleeveStats(sleeveNumber).shock > 0) {\n throw helper.makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Sleeve shock too high: Sleeve ${sleeveNumber}`);\n }\n\n const aug = Augmentations[augName];\n if (!aug) {\n throw helper.makeRuntimeErrorMsg(\"sleeve.purchaseSleeveAug\", `Invalid aug: ${augName}`);\n }\n\n return player.sleeves[sleeveNumber].tryBuyAugmentation(player, aug);\n },\n };\n}\n","import { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Exploit } from \"../Exploits/Exploit\";\nimport * as bcrypt from \"bcryptjs\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\n\nexport interface INetscriptExtra {\n heart: {\n break(): number;\n };\n exploit(): void;\n bypass(doc: Document): void;\n alterReality(): void;\n rainbow(guess: string): void;\n}\n\nexport function NetscriptExtra(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): INetscriptExtra {\n return {\n heart: {\n // Easter egg function\n break: function (): number {\n return player.karma;\n },\n },\n exploit: function (): void {\n player.giveExploit(Exploit.UndocumentedFunctionCall);\n },\n bypass: function (doc: unknown): void {\n // reset both fields first\n const d = doc as any;\n d.completely_unused_field = undefined;\n const real_document: any = document;\n real_document.completely_unused_field = undefined;\n // set one to true and check that it affected the other.\n real_document.completely_unused_field = true;\n if (d.completely_unused_field && workerScript.ramUsage === 1.6) {\n player.giveExploit(Exploit.Bypass);\n }\n d.completely_unused_field = undefined;\n real_document.completely_unused_field = undefined;\n },\n alterReality: function (): void {\n // We need to trick webpack into not optimizing a variable that is guaranteed to be false (and doesn't use prototypes)\n let x = false;\n const recur = function (depth: number): void {\n if (depth === 0) return;\n x = !x;\n recur(depth - 1);\n };\n recur(2);\n console.warn(\"I am sure that this variable is false.\");\n if (x !== false) {\n console.warn(\"Reality has been altered!\");\n player.giveExploit(Exploit.RealityAlteration);\n }\n },\n rainbow: function (guess: unknown): void {\n async function tryGuess(): Promise {\n const verified = await bcrypt.compare(\n helper.string(\"rainbow\", \"guess\", guess),\n \"$2a$10$aertxDEkgor8baVtQDZsLuMwwGYmkRM/ohcA6FjmmzIHQeTCsrCcO\",\n );\n if (verified) {\n player.giveExploit(Exploit.INeedARainbow);\n }\n }\n tryGuess();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n purchaseHashUpgrade,\n updateHashManagerCapacity,\n} from \"../Hacknet/HacknetHelpers\";\nimport { HacknetServer } from \"../Hacknet/HacknetServer\";\nimport { HacknetNode } from \"../Hacknet/HacknetNode\";\nimport { HashUpgrades } from \"../Hacknet/HashUpgrades\";\nimport { HashUpgrade } from \"../Hacknet/HashUpgrade\";\nimport { GetServer } from \"../Server/AllServers\";\n\nimport { Hacknet as IHacknet, NodeStats } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptHacknet(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IHacknet {\n // Utility function to get Hacknet Node object\n const getHacknetNode = function (i: number, callingFn = \"\"): HacknetNode | HacknetServer {\n if (i < 0 || i >= player.hacknetNodes.length) {\n throw helper.makeRuntimeErrorMsg(callingFn, \"Index specified for Hacknet Node is out-of-bounds: \" + i);\n }\n\n if (hasHacknetServers(player)) {\n const hi = player.hacknetNodes[i];\n if (typeof hi !== \"string\") throw new Error(\"hacknet node was not a string\");\n const hserver = GetServer(hi);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"hacknet server was not actually hacknet server\");\n if (hserver == null) {\n throw helper.makeRuntimeErrorMsg(\n callingFn,\n `Could not get Hacknet Server for index ${i}. This is probably a bug, please report to game dev`,\n );\n }\n\n return hserver;\n } else {\n const node = player.hacknetNodes[i];\n if (!(node instanceof HacknetNode)) throw new Error(\"hacknet node was not node.\");\n return node;\n }\n };\n\n return {\n numNodes: function (): number {\n return player.hacknetNodes.length;\n },\n maxNumNodes: function (): number {\n if (hasHacknetServers(player)) {\n return HacknetServerConstants.MaxServers;\n }\n return Infinity;\n },\n purchaseNode: function (): number {\n return purchaseHacknet(player);\n },\n getPurchaseNodeCost: function (): number {\n if (hasHacknetServers(player)) {\n return getCostOfNextHacknetServer(player);\n } else {\n return getCostOfNextHacknetNode(player);\n }\n },\n getNodeStats: function (_i: unknown): NodeStats {\n const i = helper.number(\"getNodeStats\", \"i\", _i);\n const node = getHacknetNode(i, \"getNodeStats\");\n const hasUpgraded = hasHacknetServers(player);\n const res: any = {\n name: node instanceof HacknetServer ? node.hostname : node.name,\n level: node.level,\n ram: node instanceof HacknetServer ? node.maxRam : node.ram,\n ramUsed: node instanceof HacknetServer ? node.ramUsed : undefined,\n cores: node.cores,\n production: node instanceof HacknetServer ? node.hashRate : node.moneyGainRatePerSecond,\n timeOnline: node.onlineTimeSeconds,\n totalProduction: node instanceof HacknetServer ? node.totalHashesGenerated : node.totalMoneyGenerated,\n };\n\n if (hasUpgraded && node instanceof HacknetServer) {\n res.cache = node.cache;\n res.hashCapacity = node.hashCapacity;\n }\n\n return res;\n },\n upgradeLevel: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeLevel\", \"i\", _i);\n const n = helper.number(\"upgradeLevel\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeLevel\");\n return purchaseLevelUpgrade(player, node, n);\n },\n upgradeRam: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeRam\", \"i\", _i);\n const n = helper.number(\"upgradeRam\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeRam\");\n return purchaseRamUpgrade(player, node, n);\n },\n upgradeCore: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeCore\", \"i\", _i);\n const n = helper.number(\"upgradeCore\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeCore\");\n return purchaseCoreUpgrade(player, node, n);\n },\n upgradeCache: function (_i: unknown, _n: unknown = 1): boolean {\n const i = helper.number(\"upgradeCache\", \"i\", _i);\n const n = helper.number(\"upgradeCache\", \"n\", _n);\n if (!hasHacknetServers(player)) {\n return false;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.upgradeCache\", () => \"Can only be called on hacknet servers\");\n return false;\n }\n const res = purchaseCacheUpgrade(player, node, n);\n if (res) {\n updateHashManagerCapacity(player);\n }\n return res;\n },\n getLevelUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getLevelUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getLevelUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeLevel\");\n return node.calculateLevelUpgradeCost(n, player.hacknet_node_level_cost_mult);\n },\n getRamUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getRamUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getRamUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeRam\");\n return node.calculateRamUpgradeCost(n, player.hacknet_node_ram_cost_mult);\n },\n getCoreUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getCoreUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getCoreUpgradeCost\", \"n\", _n);\n const node = getHacknetNode(i, \"upgradeCore\");\n return node.calculateCoreUpgradeCost(n, player.hacknet_node_core_cost_mult);\n },\n getCacheUpgradeCost: function (_i: unknown, _n: unknown = 1): number {\n const i = helper.number(\"getCacheUpgradeCost\", \"i\", _i);\n const n = helper.number(\"getCacheUpgradeCost\", \"n\", _n);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n const node = getHacknetNode(i, \"upgradeCache\");\n if (!(node instanceof HacknetServer)) {\n workerScript.log(\"hacknet.getCacheUpgradeCost\", () => \"Can only be called on hacknet servers\");\n return -1;\n }\n return node.calculateCacheUpgradeCost(n);\n },\n numHashes: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.hashes;\n },\n hashCapacity: function (): number {\n if (!hasHacknetServers(player)) {\n return 0;\n }\n return player.hashManager.capacity;\n },\n hashCost: function (_upgName: unknown): number {\n const upgName = helper.string(\"hashCost\", \"upgName\", _upgName);\n if (!hasHacknetServers(player)) {\n return Infinity;\n }\n\n return player.hashManager.getUpgradeCost(upgName);\n },\n spendHashes: function (_upgName: unknown, _upgTarget: unknown = \"\"): boolean {\n const upgName = helper.string(\"spendHashes\", \"upgName\", _upgName);\n const upgTarget = helper.string(\"spendHashes\", \"upgTarget\", _upgTarget);\n if (!hasHacknetServers(player)) {\n return false;\n }\n return purchaseHashUpgrade(player, upgName, upgTarget);\n },\n getHashUpgrades: function (): string[] {\n if (!hasHacknetServers(player)) {\n return [];\n }\n return Object.values(HashUpgrades).map((upgrade: HashUpgrade) => upgrade.name);\n },\n getHashUpgradeLevel: function (_upgName: unknown): number {\n const upgName = helper.string(\"getHashUpgradeLevel\", \"upgName\", _upgName);\n const level = player.hashManager.upgrades[upgName];\n if (level === undefined) {\n throw helper.makeRuntimeErrorMsg(\"hacknet.hashUpgradeLevel\", `Invalid Hash Upgrade: ${upgName}`);\n }\n return level;\n },\n getStudyMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getStudyMult();\n },\n getTrainingMult: function (): number {\n if (!hasHacknetServers(player)) {\n return 1;\n }\n return player.hashManager.getTrainingMult();\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\n\nimport { staneksGift } from \"../CotMG/Helper\";\nimport { Fragments, FragmentById } from \"../CotMG/Fragment\";\n\nimport {\n Stanek as IStanek,\n Fragment as IFragment,\n ActiveFragment as IActiveFragment,\n} from \"../ScriptEditor/NetscriptDefinitions\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\n\nexport function NetscriptStanek(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IStanek {\n function checkStanekAPIAccess(func: string): void {\n if (!player.hasAugmentation(AugmentationNames.StaneksGift1, true)) {\n helper.makeRuntimeErrorMsg(func, \"Requires Stanek's Gift installed.\");\n }\n }\n\n return {\n giftWidth: function (): number {\n helper.updateDynamicRam(\"giftWidth\", getRamCost(player, \"stanek\", \"giftWidth\"));\n checkStanekAPIAccess(\"giftWidth\");\n return staneksGift.width();\n },\n giftHeight: function (): number {\n helper.updateDynamicRam(\"giftHeight\", getRamCost(player, \"stanek\", \"giftHeight\"));\n checkStanekAPIAccess(\"giftHeight\");\n return staneksGift.height();\n },\n chargeFragment: function (_rootX: unknown, _rootY: unknown): Promise {\n const rootX = helper.number(\"stanek.chargeFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.chargeFragment\", \"rootY\", _rootY);\n\n helper.updateDynamicRam(\"chargeFragment\", getRamCost(player, \"stanek\", \"chargeFragment\"));\n checkStanekAPIAccess(\"chargeFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (!fragment)\n throw helper.makeRuntimeErrorMsg(\"stanek.chargeFragment\", `No fragment with root (${rootX}, ${rootY}).`);\n const time = staneksGift.inBonus() ? 200 : 1000;\n return netscriptDelay(time, workerScript).then(function () {\n const charge = staneksGift.charge(player, fragment, workerScript.scriptRef.threads);\n workerScript.log(\"stanek.chargeFragment\", () => `Charged fragment for ${charge} charge.`);\n return Promise.resolve();\n });\n },\n fragmentDefinitions: function (): IFragment[] {\n helper.updateDynamicRam(\"fragmentDefinitions\", getRamCost(player, \"stanek\", \"fragmentDefinitions\"));\n checkStanekAPIAccess(\"fragmentDefinitions\");\n workerScript.log(\"stanek.fragmentDefinitions\", () => `Returned ${Fragments.length} fragments`);\n return Fragments.map((f) => f.copy());\n },\n activeFragments: function (): IActiveFragment[] {\n helper.updateDynamicRam(\"activeFragments\", getRamCost(player, \"stanek\", \"activeFragments\"));\n checkStanekAPIAccess(\"activeFragments\");\n workerScript.log(\"stanek.activeFragments\", () => `Returned ${staneksGift.fragments.length} fragments`);\n return staneksGift.fragments.map((af) => {\n return { ...af.copy(), ...af.fragment().copy() };\n });\n },\n clearGift: function (): void {\n helper.updateDynamicRam(\"clearGift\", getRamCost(player, \"stanek\", \"clearGift\"));\n checkStanekAPIAccess(\"clearGift\");\n workerScript.log(\"stanek.clearGift\", () => `Cleared Stanek's Gift.`);\n staneksGift.clear();\n },\n canPlaceFragment: function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = helper.number(\"stanek.canPlaceFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.canPlaceFragment\", \"rootY\", _rootY);\n const rotation = helper.number(\"stanek.canPlaceFragment\", \"rotation\", _rotation);\n const fragmentId = helper.number(\"stanek.canPlaceFragment\", \"fragmentId\", _fragmentId);\n helper.updateDynamicRam(\"canPlaceFragment\", getRamCost(player, \"stanek\", \"canPlaceFragment\"));\n checkStanekAPIAccess(\"canPlaceFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw helper.makeRuntimeErrorMsg(\"stanek.canPlaceFragment\", `Invalid fragment id: ${fragmentId}`);\n const can = staneksGift.canPlace(rootX, rootY, rotation, fragment);\n return can;\n },\n placeFragment: function (_rootX: unknown, _rootY: unknown, _rotation: unknown, _fragmentId: unknown): boolean {\n const rootX = helper.number(\"stanek.placeFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.placeFragment\", \"rootY\", _rootY);\n const rotation = helper.number(\"stanek.placeFragment\", \"rotation\", _rotation);\n const fragmentId = helper.number(\"stanek.placeFragment\", \"fragmentId\", _fragmentId);\n helper.updateDynamicRam(\"placeFragment\", getRamCost(player, \"stanek\", \"placeFragment\"));\n checkStanekAPIAccess(\"placeFragment\");\n const fragment = FragmentById(fragmentId);\n if (!fragment) throw helper.makeRuntimeErrorMsg(\"stanek.placeFragment\", `Invalid fragment id: ${fragmentId}`);\n return staneksGift.place(rootX, rootY, rotation, fragment);\n },\n getFragment: function (_rootX: unknown, _rootY: unknown): IActiveFragment | undefined {\n const rootX = helper.number(\"stanek.getFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.getFragment\", \"rootY\", _rootY);\n helper.updateDynamicRam(\"getFragment\", getRamCost(player, \"stanek\", \"getFragment\"));\n checkStanekAPIAccess(\"getFragment\");\n const fragment = staneksGift.findFragment(rootX, rootY);\n if (fragment !== undefined) return fragment.copy();\n return undefined;\n },\n removeFragment: function (_rootX: unknown, _rootY: unknown): boolean {\n const rootX = helper.number(\"stanek.removeFragment\", \"rootX\", _rootX);\n const rootY = helper.number(\"stanek.removeFragment\", \"rootY\", _rootY);\n helper.updateDynamicRam(\"removeFragment\", getRamCost(player, \"stanek\", \"removeFragment\"));\n checkStanekAPIAccess(\"removeFragment\");\n return staneksGift.delete(rootX, rootY);\n },\n };\n}\n","import { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nexport function CalculateEffect(avgCharge: number, numCharge: number, power: number, boost: number): number {\n return (\n 1 +\n (Math.log(avgCharge + 1) / (Math.log(1.8) * 100)) *\n Math.pow((numCharge + 1) / 5, 0.07) *\n power *\n boost *\n BitNodeMultipliers.StaneksGiftPowerMultiplier\n );\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { GameInfo, IStyleSettings, UserInterface as IUserInterface, UserInterfaceTheme } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Settings } from \"../Settings/Settings\";\nimport { ThemeEvents } from \"../Themes/ui/Theme\";\nimport { defaultTheme } from \"../Themes/Themes\";\nimport { defaultStyles } from \"../Themes/Styles\";\nimport { CONSTANTS } from \"../Constants\";\nimport { hash } from \"../hash/hash\";\n\nexport function NetscriptUserInterface(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): IUserInterface {\n return {\n getTheme: function (): UserInterfaceTheme {\n helper.updateDynamicRam(\"getTheme\", getRamCost(player, \"ui\", \"getTheme\"));\n return { ...Settings.theme };\n },\n\n getStyles: function (): IStyleSettings {\n helper.updateDynamicRam(\"getStyles\", getRamCost(player, \"ui\", \"getStyles\"));\n return { ...Settings.styles };\n },\n\n setTheme: function (newTheme: UserInterfaceTheme): void {\n helper.updateDynamicRam(\"setTheme\", getRamCost(player, \"ui\", \"setTheme\"));\n const hex = /^(#)((?:[A-Fa-f0-9]{2}){3,4}|(?:[A-Fa-f0-9]{3}))$/;\n const currentTheme = {...Settings.theme}\n const errors: string[] = [];\n for (const key of Object.keys(newTheme)) {\n if (!currentTheme[key]) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else if (!hex.test(newTheme[key] ?? '')) {\n errors.push(`Invalid color \"${key}\": ${newTheme[key]}`);\n } else {\n currentTheme[key] = newTheme[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.theme, currentTheme);\n ThemeEvents.emit();\n workerScript.log(\"ui.setTheme\", () => `Successfully set theme`);\n } else {\n workerScript.log(\"ui.setTheme\", () => `Failed to set theme. Errors: ${errors.join(', ')}`);\n }\n },\n\n setStyles: function (newStyles: IStyleSettings): void {\n helper.updateDynamicRam(\"setStyles\", getRamCost(player, \"ui\", \"setStyles\"));\n\n const currentStyles = {...Settings.styles}\n const errors: string[] = [];\n for (const key of Object.keys(newStyles)) {\n if (!((currentStyles as any)[key])) {\n // Invalid key\n errors.push(`Invalid key \"${key}\"`);\n } else {\n (currentStyles as any)[key] = (newStyles as any)[key];\n }\n }\n\n if (errors.length === 0) {\n Object.assign(Settings.styles, currentStyles);\n ThemeEvents.emit();\n workerScript.log(\"ui.setStyles\", () => `Successfully set styles`);\n } else {\n workerScript.log(\"ui.setStyles\", () => `Failed to set styles. Errors: ${errors.join(', ')}`);\n }\n },\n\n resetTheme: function (): void {\n helper.updateDynamicRam(\"resetTheme\", getRamCost(player, \"ui\", \"resetTheme\"));\n Settings.theme = { ...defaultTheme };\n ThemeEvents.emit();\n workerScript.log(\"ui.resetTheme\", () => `Reinitialized theme to default`);\n },\n\n resetStyles: function (): void {\n helper.updateDynamicRam(\"resetStyles\", getRamCost(player, \"ui\", \"resetStyles\"));\n Settings.styles = { ...defaultStyles };\n ThemeEvents.emit();\n workerScript.log(\"ui.resetStyles\", () => `Reinitialized styles to default`);\n },\n\n getGameInfo: function (): GameInfo {\n helper.updateDynamicRam(\"getGameInfo\", getRamCost(player, \"ui\", \"getGameInfo\"));\n const version = CONSTANTS.VersionString;\n const commit = hash();\n const platform = (navigator.userAgent.toLowerCase().indexOf(\" electron/\") > -1) ? 'Steam' : 'Browser';\n\n const gameInfo = {\n version, commit, platform,\n }\n\n return gameInfo;\n }\n }\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Bladeburner } from \"../Bladeburner/Bladeburner\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Bladeburner as INetscriptBladeburner, BladeburnerCurAction } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { IAction } from \"src/Bladeburner/IAction\";\n\nexport function NetscriptBladeburner(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): INetscriptBladeburner {\n const checkBladeburnerAccess = function (func: string, skipjoined = false): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const apiAccess =\n player.bitNodeN === 7 ||\n player.sourceFiles.some((a) => {\n return a.n === 7;\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 helper.makeRuntimeErrorMsg(`bladeburner.${func}`, apiDenied);\n }\n if (!skipjoined) {\n const bladeburnerAccess = bladeburner instanceof Bladeburner;\n if (!bladeburnerAccess) {\n const bladeburnerDenied = `You must be a member of the Bladeburner division to use this API.`;\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, bladeburnerDenied);\n }\n }\n };\n\n const checkBladeburnerCity = function (func: string, city: string): void {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n if (!bladeburner.cities.hasOwnProperty(city)) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid city: ${city}`);\n }\n };\n\n const getBladeburnerActionObject = function (func: string, type: string, name: string): IAction {\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Must have joined bladeburner\");\n const actionId = bladeburner.getActionIdFromTypeAndName(type, name);\n if (!actionId) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n const actionObj = bladeburner.getActionObject(actionId);\n if (!actionObj) {\n throw helper.makeRuntimeErrorMsg(`bladeburner.${func}`, `Invalid action type='${type}', name='${name}'`);\n }\n\n return actionObj;\n };\n\n return {\n getContractNames: function (): string[] {\n helper.updateDynamicRam(\"getContractNames\", getRamCost(player, \"bladeburner\", \"getContractNames\"));\n checkBladeburnerAccess(\"getContractNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getContractNamesNetscriptFn();\n },\n getOperationNames: function (): string[] {\n helper.updateDynamicRam(\"getOperationNames\", getRamCost(player, \"bladeburner\", \"getOperationNames\"));\n checkBladeburnerAccess(\"getOperationNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getOperationNamesNetscriptFn();\n },\n getBlackOpNames: function (): string[] {\n helper.updateDynamicRam(\"getBlackOpNames\", getRamCost(player, \"bladeburner\", \"getBlackOpNames\"));\n checkBladeburnerAccess(\"getBlackOpNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getBlackOpNamesNetscriptFn();\n },\n getBlackOpRank: function (_blackOpName: unknown): number {\n const blackOpName = helper.string(\"getBlackOpRank\", \"blackOpName\", _blackOpName);\n helper.updateDynamicRam(\"getBlackOpRank\", getRamCost(player, \"bladeburner\", \"getBlackOpRank\"));\n checkBladeburnerAccess(\"getBlackOpRank\");\n const action: any = getBladeburnerActionObject(\"getBlackOpRank\", \"blackops\", blackOpName);\n return action.reqdRank;\n },\n getGeneralActionNames: function (): string[] {\n helper.updateDynamicRam(\"getGeneralActionNames\", getRamCost(player, \"bladeburner\", \"getGeneralActionNames\"));\n checkBladeburnerAccess(\"getGeneralActionNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getGeneralActionNamesNetscriptFn();\n },\n getSkillNames: function (): string[] {\n helper.updateDynamicRam(\"getSkillNames\", getRamCost(player, \"bladeburner\", \"getSkillNames\"));\n checkBladeburnerAccess(\"getSkillNames\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getSkillNamesNetscriptFn();\n },\n startAction: function (_type: unknown, _name: unknown): boolean {\n const type = helper.string(\"startAction\", \"type\", _type);\n const name = helper.string(\"startAction\", \"name\", _name);\n helper.updateDynamicRam(\"startAction\", getRamCost(player, \"bladeburner\", \"startAction\"));\n checkBladeburnerAccess(\"startAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.startActionNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.startAction\", e);\n }\n },\n stopBladeburnerAction: function (): void {\n helper.updateDynamicRam(\"stopBladeburnerAction\", getRamCost(player, \"bladeburner\", \"stopBladeburnerAction\"));\n checkBladeburnerAccess(\"stopBladeburnerAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.resetAction();\n },\n getCurrentAction: function (): BladeburnerCurAction {\n helper.updateDynamicRam(\"getCurrentAction\", getRamCost(player, \"bladeburner\", \"getCurrentAction\"));\n checkBladeburnerAccess(\"getCurrentAction\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.getTypeAndNameFromActionId(bladeburner.action);\n },\n getActionTime: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionTime\", \"type\", _type);\n const name = helper.string(\"getActionTime\", \"name\", _name);\n helper.updateDynamicRam(\"getActionTime\", getRamCost(player, \"bladeburner\", \"getActionTime\"));\n checkBladeburnerAccess(\"getActionTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionTimeNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionTime\", e);\n }\n },\n getActionEstimatedSuccessChance: function (_type: unknown, _name: unknown): [number, number] {\n const type = helper.string(\"getActionEstimatedSuccessChance\", \"type\", _type);\n const name = helper.string(\"getActionEstimatedSuccessChance\", \"name\", _name);\n helper.updateDynamicRam(\n \"getActionEstimatedSuccessChance\",\n getRamCost(player, \"bladeburner\", \"getActionEstimatedSuccessChance\"),\n );\n checkBladeburnerAccess(\"getActionEstimatedSuccessChance\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionEstimatedSuccessChanceNetscriptFn(player, type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionEstimatedSuccessChance\", e);\n }\n },\n getActionRepGain: function (_type: unknown, _name: unknown, _level: unknown): number {\n const type = helper.string(\"getActionRepGain\", \"type\", _type);\n const name = helper.string(\"getActionRepGain\", \"name\", _name);\n const level = helper.number(\"getActionRepGain\", \"level\", _level);\n helper.updateDynamicRam(\"getActionRepGain\", getRamCost(player, \"bladeburner\", \"getActionRepGain\"));\n checkBladeburnerAccess(\"getActionRepGain\");\n const action = getBladeburnerActionObject(\"getActionRepGain\", type, name);\n let rewardMultiplier;\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 * BitNodeMultipliers.BladeburnerRank;\n },\n getActionCountRemaining: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionCountRemaining\", \"type\", _type);\n const name = helper.string(\"getActionCountRemaining\", \"name\", _name);\n helper.updateDynamicRam(\"getActionCountRemaining\", getRamCost(player, \"bladeburner\", \"getActionCountRemaining\"));\n checkBladeburnerAccess(\"getActionCountRemaining\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getActionCountRemainingNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getActionCountRemaining\", e);\n }\n },\n getActionMaxLevel: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionMaxLevel\", \"type\", _type);\n const name = helper.string(\"getActionMaxLevel\", \"name\", _name);\n helper.updateDynamicRam(\"getActionMaxLevel\", getRamCost(player, \"bladeburner\", \"getActionMaxLevel\"));\n checkBladeburnerAccess(\"getActionMaxLevel\");\n const action = getBladeburnerActionObject(\"getActionMaxLevel\", type, name);\n return action.maxLevel;\n },\n getActionCurrentLevel: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getActionCurrentLevel\", \"type\", _type);\n const name = helper.string(\"getActionCurrentLevel\", \"name\", _name);\n helper.updateDynamicRam(\"getActionCurrentLevel\", getRamCost(player, \"bladeburner\", \"getActionCurrentLevel\"));\n checkBladeburnerAccess(\"getActionCurrentLevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.level;\n },\n getActionAutolevel: function (_type: unknown, _name: unknown): boolean {\n const type = helper.string(\"getActionAutolevel\", \"type\", _type);\n const name = helper.string(\"getActionAutolevel\", \"name\", _name);\n helper.updateDynamicRam(\"getActionAutolevel\", getRamCost(player, \"bladeburner\", \"getActionAutolevel\"));\n checkBladeburnerAccess(\"getActionAutolevel\");\n const action = getBladeburnerActionObject(\"getActionCurrentLevel\", type, name);\n return action.autoLevel;\n },\n setActionAutolevel: function (_type: unknown, _name: unknown, _autoLevel: unknown = true): void {\n const type = helper.string(\"setActionAutolevel\", \"type\", _type);\n const name = helper.string(\"setActionAutolevel\", \"name\", _name);\n const autoLevel = helper.boolean(_autoLevel);\n helper.updateDynamicRam(\"setActionAutolevel\", getRamCost(player, \"bladeburner\", \"setActionAutolevel\"));\n checkBladeburnerAccess(\"setActionAutolevel\");\n const action = getBladeburnerActionObject(\"setActionAutolevel\", type, name);\n action.autoLevel = autoLevel;\n },\n setActionLevel: function (_type: unknown, _name: unknown, _level: unknown = 1): void {\n const type = helper.string(\"setActionLevel\", \"type\", _type);\n const name = helper.string(\"setActionLevel\", \"name\", _name);\n const level = helper.number(\"setActionLevel\", \"level\", _level);\n helper.updateDynamicRam(\"setActionLevel\", getRamCost(player, \"bladeburner\", \"setActionLevel\"));\n checkBladeburnerAccess(\"setActionLevel\");\n const action = getBladeburnerActionObject(\"setActionLevel\", type, name);\n if (level < 1 || level > action.maxLevel) {\n throw helper.makeRuntimeErrorMsg(\n \"bladeburner.setActionLevel\",\n `Level must be between 1 and ${action.maxLevel}, is ${level}`,\n );\n }\n action.level = level;\n },\n getRank: function (): number {\n helper.updateDynamicRam(\"getRank\", getRamCost(player, \"bladeburner\", \"getRank\"));\n checkBladeburnerAccess(\"getRank\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.rank;\n },\n getSkillPoints: function (): number {\n helper.updateDynamicRam(\"getSkillPoints\", getRamCost(player, \"bladeburner\", \"getSkillPoints\"));\n checkBladeburnerAccess(\"getSkillPoints\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.skillPoints;\n },\n getSkillLevel: function (_skillName: unknown): number {\n const skillName = helper.string(\"getSkillLevel\", \"skillName\", _skillName);\n helper.updateDynamicRam(\"getSkillLevel\", getRamCost(player, \"bladeburner\", \"getSkillLevel\"));\n checkBladeburnerAccess(\"getSkillLevel\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillLevelNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillLevel\", e);\n }\n },\n getSkillUpgradeCost: function (_skillName: unknown): number {\n const skillName = helper.string(\"getSkillUpgradeCost\", \"skillName\", _skillName);\n helper.updateDynamicRam(\"getSkillUpgradeCost\", getRamCost(player, \"bladeburner\", \"getSkillUpgradeCost\"));\n checkBladeburnerAccess(\"getSkillUpgradeCost\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getSkillUpgradeCostNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getSkillUpgradeCost\", e);\n }\n },\n upgradeSkill: function (_skillName: unknown): boolean {\n const skillName = helper.string(\"upgradeSkill\", \"skillName\", _skillName);\n helper.updateDynamicRam(\"upgradeSkill\", getRamCost(player, \"bladeburner\", \"upgradeSkill\"));\n checkBladeburnerAccess(\"upgradeSkill\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.upgradeSkillNetscriptFn(skillName, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.upgradeSkill\", e);\n }\n },\n getTeamSize: function (_type: unknown, _name: unknown): number {\n const type = helper.string(\"getTeamSize\", \"type\", _type);\n const name = helper.string(\"getTeamSize\", \"name\", _name);\n helper.updateDynamicRam(\"getTeamSize\", getRamCost(player, \"bladeburner\", \"getTeamSize\"));\n checkBladeburnerAccess(\"getTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.getTeamSizeNetscriptFn(type, name, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.getTeamSize\", e);\n }\n },\n setTeamSize: function (_type: unknown, _name: unknown, _size: unknown): number {\n const type = helper.string(\"setTeamSize\", \"type\", _type);\n const name = helper.string(\"setTeamSize\", \"name\", _name);\n const size = helper.number(\"setTeamSize\", \"size\", _size);\n helper.updateDynamicRam(\"setTeamSize\", getRamCost(player, \"bladeburner\", \"setTeamSize\"));\n checkBladeburnerAccess(\"setTeamSize\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n try {\n return bladeburner.setTeamSizeNetscriptFn(type, name, size, workerScript);\n } catch (e: any) {\n throw helper.makeRuntimeErrorMsg(\"bladeburner.setTeamSize\", e);\n }\n },\n getCityEstimatedPopulation: function (_cityName: unknown): number {\n const cityName = helper.string(\"getCityEstimatedPopulation\", \"cityName\", _cityName);\n helper.updateDynamicRam(\n \"getCityEstimatedPopulation\",\n getRamCost(player, \"bladeburner\", \"getCityEstimatedPopulation\"),\n );\n checkBladeburnerAccess(\"getCityEstimatedPopulation\");\n checkBladeburnerCity(\"getCityEstimatedPopulation\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].popEst;\n },\n getCityCommunities: function (_cityName: unknown): number {\n const cityName = helper.string(\"getCityCommunities\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"getCityCommunities\", getRamCost(player, \"bladeburner\", \"getCityCommunities\"));\n checkBladeburnerAccess(\"getCityCommunities\");\n checkBladeburnerCity(\"getCityCommunities\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].comms;\n },\n getCityChaos: function (_cityName: unknown): number {\n const cityName = helper.string(\"getCityChaos\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"getCityChaos\", getRamCost(player, \"bladeburner\", \"getCityChaos\"));\n checkBladeburnerAccess(\"getCityChaos\");\n checkBladeburnerCity(\"getCityChaos\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.cities[cityName].chaos;\n },\n getCity: function (): string {\n helper.updateDynamicRam(\"getCity\", getRamCost(player, \"bladeburner\", \"getCity\"));\n checkBladeburnerAccess(\"getCityChaos\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.city;\n },\n switchCity: function (_cityName: unknown): boolean {\n const cityName = helper.string(\"switchCity\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"switchCity\", getRamCost(player, \"bladeburner\", \"switchCity\"));\n checkBladeburnerAccess(\"switchCity\");\n checkBladeburnerCity(\"switchCity\", cityName);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n bladeburner.city = cityName;\n return true;\n },\n getStamina: function (): [number, number] {\n helper.updateDynamicRam(\"getStamina\", getRamCost(player, \"bladeburner\", \"getStamina\"));\n checkBladeburnerAccess(\"getStamina\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return [bladeburner.stamina, bladeburner.maxStamina];\n },\n joinBladeburnerFaction: function (): boolean {\n helper.updateDynamicRam(\"joinBladeburnerFaction\", getRamCost(player, \"bladeburner\", \"joinBladeburnerFaction\"));\n checkBladeburnerAccess(\"joinBladeburnerFaction\", true);\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return bladeburner.joinBladeburnerFactionNetscriptFn(workerScript);\n },\n joinBladeburnerDivision: function (): boolean {\n helper.updateDynamicRam(\"joinBladeburnerDivision\", getRamCost(player, \"bladeburner\", \"joinBladeburnerDivision\"));\n if (player.bitNodeN === 7 || player.sourceFileLvl(7) > 0) {\n if (player.bitNodeN === 8) {\n return false;\n }\n if (player.bladeburner instanceof Bladeburner) {\n return true; // Already member\n } else if (\n player.strength >= 100 &&\n player.defense >= 100 &&\n player.dexterity >= 100 &&\n player.agility >= 100\n ) {\n player.bladeburner = new Bladeburner(player);\n workerScript.log(\"joinBladeburnerDivision\", () => \"You have been accepted into the Bladeburner division\");\n\n return true;\n } else {\n workerScript.log(\n \"joinBladeburnerDivision\",\n () => \"You do not meet the requirements for joining the Bladeburner division\",\n );\n return false;\n }\n }\n return false;\n },\n getBonusTime: function (): number {\n helper.updateDynamicRam(\"getBonusTime\", getRamCost(player, \"bladeburner\", \"getBonusTime\"));\n checkBladeburnerAccess(\"getBonusTime\");\n const bladeburner = player.bladeburner;\n if (bladeburner === null) throw new Error(\"Should not be called without Bladeburner\");\n return Math.round(bladeburner.storedCycles / 5) * 1000;\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { is2DArray } from \"../utils/helpers/is2DArray\";\nimport { CodingContract } from \"../CodingContracts\";\nimport { CodingAttemptOptions, CodingContract as ICodingContract } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptCodingContract(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): ICodingContract {\n const getCodingContract = function (func: string, hostname: string, filename: string): CodingContract {\n const server = helper.getServer(hostname, func);\n const contract = server.getContract(filename);\n if (contract == null) {\n throw helper.makeRuntimeErrorMsg(\n `codingcontract.${func}`,\n `Cannot find contract '${filename}' on server '${hostname}'`,\n );\n }\n\n return contract;\n };\n\n return {\n attempt: function (\n answer: any,\n _filename: unknown,\n _hostname: unknown = workerScript.hostname,\n { returnReward }: CodingAttemptOptions = { returnReward: false },\n ): boolean | string {\n const filename = helper.string(\"attempt\", \"filename\", _filename);\n const hostname = helper.string(\"attempt\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"attempt\", getRamCost(player, \"codingcontract\", \"attempt\"));\n const contract = getCodingContract(\"attempt\", hostname, filename);\n\n // Convert answer to string. If the answer is a 2D array, then we have to\n // manually add brackets for the inner arrays\n if (is2DArray(answer)) {\n const answerComponents = [];\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 creward = contract.reward;\n if (creward === null) throw new Error(\"Somehow solved a contract that didn't have a reward\");\n\n const serv = helper.getServer(hostname, \"codingcontract.attempt\");\n if (contract.isSolution(answer)) {\n const reward = player.gainCodingContractReward(creward, contract.getDifficulty());\n workerScript.log(\n \"codingcontract.attempt\",\n () => `Successfully completed Coding Contract '${filename}'. Reward: ${reward}`,\n );\n serv.removeContract(filename);\n return returnReward ? reward : true;\n } else {\n ++contract.tries;\n if (contract.tries >= contract.getMaxNumTries()) {\n workerScript.log(\n \"codingcontract.attempt\",\n () => `Coding Contract attempt '${filename}' failed. Contract is now self-destructing`,\n );\n serv.removeContract(filename);\n } else {\n workerScript.log(\n \"codingcontract.attempt\",\n () =>\n `Coding Contract attempt '${filename}' failed. ${\n contract.getMaxNumTries() - contract.tries\n } attempts remaining.`,\n );\n }\n\n return returnReward ? \"\" : false;\n }\n },\n getContractType: function (_filename: unknown, _hostname: unknown = workerScript.hostname): string {\n const filename = helper.string(\"getContractType\", \"filename\", _filename);\n const hostname = helper.string(\"getContractType\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getContractType\", getRamCost(player, \"codingcontract\", \"getContractType\"));\n const contract = getCodingContract(\"getContractType\", hostname, filename);\n return contract.getType();\n },\n getData: function (_filename: unknown, _hostname: unknown = workerScript.hostname): any {\n const filename = helper.string(\"getContractType\", \"filename\", _filename);\n const hostname = helper.string(\"getContractType\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getData\", getRamCost(player, \"codingcontract\", \"getData\"));\n const contract = getCodingContract(\"getData\", hostname, filename);\n const data = contract.getData();\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 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 (_filename: unknown, _hostname: unknown = workerScript.hostname): string {\n const filename = helper.string(\"getDescription\", \"filename\", _filename);\n const hostname = helper.string(\"getDescription\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getDescription\", getRamCost(player, \"codingcontract\", \"getDescription\"));\n const contract = getCodingContract(\"getDescription\", hostname, filename);\n return contract.getDescription();\n },\n getNumTriesRemaining: function (_filename: unknown, _hostname: unknown = workerScript.hostname): number {\n const filename = helper.string(\"getNumTriesRemaining\", \"filename\", _filename);\n const hostname = helper.string(\"getNumTriesRemaining\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"getNumTriesRemaining\", getRamCost(player, \"codingcontract\", \"getNumTriesRemaining\"));\n const contract = getCodingContract(\"getNumTriesRemaining\", hostname, filename);\n return contract.getMaxNumTries() - contract.tries;\n },\n };\n}\n","// Checks whether an array is a 2D array.\n// For this, a 2D array is an array which contains only other arrays.\n// If one element in the array is a number or string, it is NOT a 2D array\nexport function is2DArray(arr: any[]): boolean {\n if (arr.constructor !== Array) {\n return false;\n }\n\n return arr.every((e) => {\n return e.constructor === Array;\n });\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\n\nimport { OfficeSpace } from \"../Corporation/OfficeSpace\";\nimport { Employee } from \"../Corporation/Employee\";\nimport { Product } from \"../Corporation/Product\";\nimport { Material } from \"../Corporation/Material\";\nimport { Warehouse } from \"../Corporation/Warehouse\";\nimport { IIndustry } from \"../Corporation/IIndustry\";\nimport { ICorporation } from \"../Corporation/ICorporation\";\n\nimport {\n Corporation as NSCorporation,\n CorporationInfo,\n Employee as NSEmployee,\n Product as NSProduct,\n Material as NSMaterial,\n Warehouse as NSWarehouse,\n Division as NSDivision,\n WarehouseAPI,\n OfficeAPI,\n InvestmentOffer,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport {\n NewIndustry,\n NewCity,\n UnlockUpgrade,\n LevelUpgrade,\n IssueDividends,\n SellMaterial,\n SellProduct,\n SetSmartSupply,\n BuyMaterial,\n AssignJob,\n UpgradeOfficeSize,\n ThrowParty,\n PurchaseWarehouse,\n UpgradeWarehouse,\n BuyCoffee,\n HireAdVert,\n MakeProduct,\n Research,\n ExportMaterial,\n CancelExportMaterial,\n SetMaterialMarketTA1,\n SetMaterialMarketTA2,\n SetProductMarketTA1,\n SetProductMarketTA2,\n BulkPurchase,\n SellShares,\n BuyBackShares,\n SetSmartSupplyUseLeftovers,\n} from \"../Corporation/Actions\";\nimport { CorporationUnlockUpgrades } from \"../Corporation/data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrades } from \"../Corporation/data/CorporationUpgrades\";\nimport { EmployeePositions } from \"../Corporation/EmployeePositions\";\nimport { calculateIntelligenceBonus } from \"../PersonObjects/formulas/intelligence\";\nimport { Industry } from \"../Corporation/Industry\";\nimport { IndustryResearchTrees, IndustryStartingCosts } from \"../Corporation/IndustryData\";\nimport { CorporationConstants } from \"../Corporation/data/Constants\";\nimport { IndustryUpgrades } from \"../Corporation/IndustryUpgrades\";\nimport { ResearchMap } from \"../Corporation/ResearchMap\";\nimport { Factions } from \"../Faction/Factions\";\n\nexport function NetscriptCorporation(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): NSCorporation {\n function createCorporation(corporationName: string, selfFund = true): boolean {\n if (!player.canAccessCorporation() || player.hasCorporation()) return false;\n if (!corporationName) return false;\n if (player.bitNodeN !== 3 && !selfFund) throw new Error(\"cannot use seed funds outside of BitNode 3\");\n\n if (selfFund) {\n if (!player.canAfford(150e9)) return false;\n\n player.startCorporation(corporationName);\n player.loseMoney(150e9, \"corporation\");\n } else {\n player.startCorporation(corporationName, 500e6);\n }\n return true;\n }\n\n function hasUnlockUpgrade(upgradeName: string): boolean {\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade[0];\n return corporation.unlockUpgrades[upgN] === 1;\n }\n\n function getUnlockUpgradeCost(upgradeName: string): number {\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n return upgrade[1];\n }\n\n function getUpgradeLevel(_upgradeName: string): number {\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade[0];\n return corporation.upgrades[upgN];\n }\n\n function getUpgradeLevelCost(_upgradeName: string): number {\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n const upgN = upgrade[0];\n const baseCost = upgrade[1];\n const priceMult = upgrade[2];\n const level = corporation.upgrades[upgN];\n return baseCost * Math.pow(priceMult, level);\n }\n\n function getExpandIndustryCost(industryName: string): number {\n const cost = IndustryStartingCosts[industryName];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industryName}'`);\n }\n return cost;\n }\n\n function getExpandCityCost(): number {\n return CorporationConstants.OfficeInitialCost;\n }\n\n function getInvestmentOffer(): InvestmentOffer {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return {\n funds: 0,\n shares: 0,\n round: corporation.fundingRound + 1, // Make more readable\n }; // Don't throw an error here, no reason to have a second function to check if you can get investment.\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n return {\n funds: funding,\n shares: investShares,\n round: corporation.fundingRound + 1, // Make more readable\n };\n }\n\n function acceptInvestmentOffer(): boolean {\n const corporation = getCorporation();\n if (\n corporation.fundingRound >= CorporationConstants.FundingRoundShares.length ||\n corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length ||\n corporation.public\n )\n return false;\n const val = corporation.determineValuation();\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n return true;\n }\n\n function goPublic(numShares: number): boolean {\n const corporation = getCorporation();\n const initialSharePrice = corporation.determineValuation() / corporation.totalShares;\n if (isNaN(numShares)) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares < 0) throw new Error(\"Invalid value for number of issued shares\");\n if (numShares > corporation.numShares) throw new Error(\"You don't have that many shares to issue!\");\n corporation.public = true;\n corporation.sharePrice = initialSharePrice;\n corporation.issuedShares = numShares;\n corporation.numShares -= numShares;\n corporation.addFunds(numShares * initialSharePrice);\n return true;\n }\n\n function getResearchCost(division: IIndustry, researchName: string): number {\n const researchTree = IndustryResearchTrees[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[researchName];\n return research.cost;\n }\n\n function hasResearched(division: IIndustry, researchName: string): boolean {\n return division.researched[researchName] === undefined ? false : (division.researched[researchName] as boolean);\n }\n\n function bribe(factionName: string, amountCash: number, amountShares: number): boolean {\n if (!player.factions.includes(factionName)) throw new Error(\"Invalid faction name\");\n if (isNaN(amountCash) || amountCash < 0 || isNaN(amountShares) || amountShares < 0)\n throw new Error(\"Invalid value for amount field! Must be numeric, grater than 0.\");\n\n const corporation = getCorporation();\n if (corporation.funds < amountCash) return false;\n if (corporation.numShares < amountShares) return false;\n const faction = Factions[factionName];\n const info = faction.getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(factionName)) return false;\n\n const repGain = (amountCash + amountShares * corporation.sharePrice) / CorporationConstants.BribeToRepRatio;\n faction.playerReputation += repGain;\n corporation.funds = corporation.funds - amountCash;\n corporation.numShares -= amountShares;\n\n return true;\n }\n\n function getCorporation(): ICorporation {\n const corporation = player.corporation;\n if (corporation === null) throw new Error(\"cannot be called without a corporation\");\n return corporation;\n }\n\n function getDivision(divisionName: string): IIndustry {\n const corporation = getCorporation();\n const division = 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: string, cityName: string): OfficeSpace {\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: string, cityName: string): Warehouse {\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: string, cityName: string, materialName: string): Material {\n const warehouse = getWarehouse(divisionName, cityName);\n const matName = (materialName as string).replace(/ /g, \"\");\n const material = warehouse.materials[matName];\n if (material === undefined) throw new Error(`Invalid material name: '${materialName}'`);\n return material;\n }\n\n function getProduct(divisionName: string, productName: string): Product {\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: string, cityName: string, employeeName: string): Employee {\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 function checkAccess(func: string, api?: number): void {\n if (player.corporation === null) throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"Must own a corporation.\");\n if (!api) return;\n\n if (!player.corporation.unlockUpgrades[api])\n throw helper.makeRuntimeErrorMsg(`corporation.${func}`, \"You do not have access to this API.\");\n }\n\n function getSafeDivision(division: Industry): NSDivision {\n const cities: string[] = [];\n for (const office of Object.values(division.offices)) {\n if (office === 0) continue;\n cities.push(office.loc);\n }\n return {\n name: division.name,\n type: division.type,\n awareness: division.awareness,\n popularity: division.popularity,\n prodMult: division.prodMult,\n research: division.sciResearch.qty,\n lastCycleRevenue: division.lastCycleRevenue,\n lastCycleExpenses: division.lastCycleExpenses,\n thisCycleRevenue: division.thisCycleRevenue,\n thisCycleExpenses: division.thisCycleExpenses,\n upgrades: division.upgrades.slice(),\n cities: cities,\n products: division.products === undefined ? [] : Object.keys(division.products),\n };\n }\n\n const warehouseAPI: WarehouseAPI = {\n getPurchaseWarehouseCost: function (): number {\n checkAccess(\"getPurchaseWarehouseCost\", 7);\n return CorporationConstants.WarehouseInitialCost;\n },\n getUpgradeWarehouseCost: function (_divisionName: unknown, _cityName: unknown): number {\n checkAccess(\"upgradeWarehouse\", 7);\n const divisionName = helper.string(\"getUpgradeWarehouseCost\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getUpgradeWarehouseCost\", \"cityName\", _cityName);\n const warehouse = getWarehouse(divisionName, cityName);\n return CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, warehouse.level + 1);\n },\n hasWarehouse: function (_divisionName: unknown, _cityName: unknown): boolean {\n checkAccess(\"hasWarehouse\", 7);\n const divisionName = helper.string(\"getWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getWarehouse\", \"cityName\", _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 return warehouse !== 0;\n },\n getWarehouse: function (_divisionName: unknown, _cityName: unknown): NSWarehouse {\n checkAccess(\"getWarehouse\", 7);\n const divisionName = helper.string(\"getWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getWarehouse\", \"cityName\", _cityName);\n const warehouse = getWarehouse(divisionName, cityName);\n return {\n level: warehouse.level,\n loc: warehouse.loc,\n size: warehouse.size,\n sizeUsed: warehouse.sizeUsed,\n smartSupplyEnabled: warehouse.smartSupplyEnabled,\n };\n },\n getMaterial: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown): NSMaterial {\n checkAccess(\"getMaterial\", 7);\n const divisionName = helper.string(\"getMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"getMaterial\", \"materialName\", _materialName);\n const material = getMaterial(divisionName, cityName, materialName);\n return {\n name: material.name,\n qty: material.qty,\n qlt: material.qlt,\n prod: material.prd,\n sell: material.sll,\n };\n },\n getProduct: function (_divisionName: unknown, _productName: unknown): NSProduct {\n checkAccess(\"getProduct\", 7);\n const divisionName = helper.string(\"getProduct\", \"divisionName\", _divisionName);\n const productName = helper.string(\"getProduct\", \"productName\", _productName);\n const product = getProduct(divisionName, productName);\n return {\n name: product.name,\n dmd: product.dmd,\n cmp: product.cmp,\n pCost: product.pCost,\n sCost: product.sCost,\n cityData: product.data,\n developmentProgress: product.prog,\n };\n },\n purchaseWarehouse: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"purchaseWarehouse\", 7);\n const divisionName = helper.string(\"purchaseWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"purchaseWarehouse\", \"cityName\", _cityName);\n const corporation = getCorporation();\n PurchaseWarehouse(corporation, getDivision(divisionName), cityName);\n },\n upgradeWarehouse: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"upgradeWarehouse\", 7);\n const divisionName = helper.string(\"upgradeWarehouse\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"upgradeWarehouse\", \"cityName\", _cityName);\n const corporation = getCorporation();\n UpgradeWarehouse(corporation, getDivision(divisionName), getWarehouse(divisionName, cityName));\n },\n sellMaterial: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _amt: unknown,\n _price: unknown,\n ): void {\n checkAccess(\"sellMaterial\", 7);\n const divisionName = helper.string(\"sellMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"sellMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"sellMaterial\", \"amt\", _amt);\n const price = helper.string(\"sellMaterial\", \"price\", _price);\n const material = getMaterial(divisionName, cityName, materialName);\n SellMaterial(material, amt, price);\n },\n sellProduct: function (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _amt: unknown,\n _price: unknown,\n _all: unknown,\n ): void {\n checkAccess(\"sellProduct\", 7);\n const divisionName = helper.string(\"sellProduct\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const productName = helper.string(\"sellProduct\", \"productName\", _productName);\n const amt = helper.string(\"sellProduct\", \"amt\", _amt);\n const price = helper.string(\"sellProduct\", \"price\", _price);\n const all = helper.boolean(_all);\n const product = getProduct(divisionName, productName);\n SellProduct(product, cityName, amt, price, all);\n },\n discontinueProduct: function (_divisionName: unknown, _productName: unknown): void {\n checkAccess(\"discontinueProduct\", 7);\n const divisionName = helper.string(\"discontinueProduct\", \"divisionName\", _divisionName);\n const productName = helper.string(\"discontinueProduct\", \"productName\", _productName);\n getDivision(divisionName).discontinueProduct(getProduct(divisionName, productName));\n },\n setSmartSupply: function (_divisionName: unknown, _cityName: unknown, _enabled: unknown): void {\n checkAccess(\"setSmartSupply\", 7);\n const divisionName = helper.string(\"setSmartSupply\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const enabled = helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setSmartSupply`,\n `You have not purchased the Smart Supply upgrade!`,\n );\n SetSmartSupply(warehouse, enabled);\n },\n setSmartSupplyUseLeftovers: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _enabled: unknown,\n ): void {\n checkAccess(\"setSmartSupplyUseLeftovers\", 7);\n const divisionName = helper.string(\"setSmartSupply\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"sellProduct\", \"cityName\", _cityName);\n const materialName = helper.string(\"sellProduct\", \"materialName\", _materialName);\n const enabled = helper.boolean(_enabled);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n if (!hasUnlockUpgrade(\"Smart Supply\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setSmartSupply`,\n `You have not purchased the Smart Supply upgrade!`,\n );\n SetSmartSupplyUseLeftovers(warehouse, material, enabled);\n },\n buyMaterial: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void {\n checkAccess(\"buyMaterial\", 7);\n const divisionName = helper.string(\"buyMaterial\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"buyMaterial\", \"cityName\", _cityName);\n const materialName = helper.string(\"buyMaterial\", \"materialName\", _materialName);\n const amt = helper.number(\"buyMaterial\", \"amt\", _amt);\n if (amt < 0) throw new Error(\"Invalid value for amount field! Must be numeric and greater than 0\");\n const material = getMaterial(divisionName, cityName, materialName);\n BuyMaterial(material, amt);\n },\n bulkPurchase: function (_divisionName: unknown, _cityName: unknown, _materialName: unknown, _amt: unknown): void {\n checkAccess(\"bulkPurchase\", 7);\n const divisionName = helper.string(\"bulkPurchase\", \"divisionName\", _divisionName);\n if (!hasResearched(getDivision(divisionName), \"Bulk Purchasing\"))\n throw new Error(`You have not researched Bulk Purchasing in ${divisionName}`);\n const corporation = getCorporation();\n const cityName = helper.city(\"bulkPurchase\", \"cityName\", _cityName);\n const materialName = helper.string(\"bulkPurchase\", \"materialName\", _materialName);\n const amt = helper.number(\"bulkPurchase\", \"amt\", _amt);\n const warehouse = getWarehouse(divisionName, cityName);\n const material = getMaterial(divisionName, cityName, materialName);\n BulkPurchase(corporation, warehouse, material, amt);\n },\n makeProduct: function (\n _divisionName: unknown,\n _cityName: unknown,\n _productName: unknown,\n _designInvest: unknown,\n _marketingInvest: unknown,\n ): void {\n checkAccess(\"makeProduct\", 7);\n const divisionName = helper.string(\"makeProduct\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"makeProduct\", \"cityName\", _cityName);\n const productName = helper.string(\"makeProduct\", \"productName\", _productName);\n const designInvest = helper.number(\"makeProduct\", \"designInvest\", _designInvest);\n const marketingInvest = helper.number(\"makeProduct\", \"marketingInvest\", _marketingInvest);\n const corporation = getCorporation();\n MakeProduct(corporation, getDivision(divisionName), cityName, productName, designInvest, marketingInvest);\n },\n exportMaterial: function (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void {\n checkAccess(\"exportMaterial\", 7);\n const sourceDivision = helper.string(\"exportMaterial\", \"sourceDivision\", _sourceDivision);\n const sourceCity = helper.string(\"exportMaterial\", \"sourceCity\", _sourceCity);\n const targetDivision = helper.string(\"exportMaterial\", \"targetDivision\", _targetDivision);\n const targetCity = helper.string(\"exportMaterial\", \"targetCity\", _targetCity);\n const materialName = helper.string(\"exportMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"exportMaterial\", \"amt\", _amt);\n ExportMaterial(\n targetDivision,\n targetCity,\n getMaterial(sourceDivision, sourceCity, materialName),\n amt + \"\",\n getDivision(targetDivision),\n );\n },\n cancelExportMaterial: function (\n _sourceDivision: unknown,\n _sourceCity: unknown,\n _targetDivision: unknown,\n _targetCity: unknown,\n _materialName: unknown,\n _amt: unknown,\n ): void {\n checkAccess(\"cancelExportMaterial\", 7);\n const sourceDivision = helper.string(\"cancelExportMaterial\", \"sourceDivision\", _sourceDivision);\n const sourceCity = helper.string(\"cancelExportMaterial\", \"sourceCity\", _sourceCity);\n const targetDivision = helper.string(\"cancelExportMaterial\", \"targetDivision\", _targetDivision);\n const targetCity = helper.string(\"cancelExportMaterial\", \"targetCity\", _targetCity);\n const materialName = helper.string(\"cancelExportMaterial\", \"materialName\", _materialName);\n const amt = helper.string(\"cancelExportMaterial\", \"amt\", _amt);\n CancelExportMaterial(targetDivision, targetCity, getMaterial(sourceDivision, sourceCity, materialName), amt + \"\");\n },\n setMaterialMarketTA1: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _on: unknown,\n ): void {\n checkAccess(\"setMaterialMarketTA1\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA1\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setMaterialMarketTA1\", \"cityName\", _cityName);\n const materialName = helper.string(\"setMaterialMarketTA1\", \"materialName\", _materialName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setMaterialMarketTA1`,\n `You have not researched MarketTA.I for division: ${divisionName}`,\n );\n SetMaterialMarketTA1(getMaterial(divisionName, cityName, materialName), on);\n },\n setMaterialMarketTA2: function (\n _divisionName: unknown,\n _cityName: unknown,\n _materialName: unknown,\n _on: unknown,\n ): void {\n checkAccess(\"setMaterialMarketTA2\", 7);\n const divisionName = helper.string(\"setMaterialMarketTA2\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setMaterialMarketTA2\", \"cityName\", _cityName);\n const materialName = helper.string(\"setMaterialMarketTA2\", \"materialName\", _materialName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setMaterialMarketTA2`,\n `You have not researched MarketTA.II for division: ${divisionName}`,\n );\n SetMaterialMarketTA2(getMaterial(divisionName, cityName, materialName), on);\n },\n setProductMarketTA1: function (_divisionName: unknown, _productName: unknown, _on: unknown): void {\n checkAccess(\"setProductMarketTA1\", 7);\n const divisionName = helper.string(\"setProductMarketTA1\", \"divisionName\", _divisionName);\n const productName = helper.string(\"setProductMarketTA1\", \"productName\", _productName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.I\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setProductMarketTA1`,\n `You have not researched MarketTA.I for division: ${divisionName}`,\n );\n SetProductMarketTA1(getProduct(divisionName, productName), on);\n },\n setProductMarketTA2: function (_divisionName: unknown, _productName: unknown, _on: unknown): void {\n checkAccess(\"setProductMarketTA2\", 7);\n const divisionName = helper.string(\"setProductMarketTA2\", \"divisionName\", _divisionName);\n const productName = helper.string(\"setProductMarketTA2\", \"productName\", _productName);\n const on = helper.boolean(_on);\n if (!getDivision(divisionName).hasResearch(\"Market-TA.II\"))\n throw helper.makeRuntimeErrorMsg(\n `corporation.setProductMarketTA2`,\n `You have not researched MarketTA.II for division: ${divisionName}`,\n );\n SetProductMarketTA2(getProduct(divisionName, productName), on);\n },\n };\n\n const officeAPI: OfficeAPI = {\n getHireAdVertCost: function (_divisionName: unknown): number {\n checkAccess(\"getHireAdVertCost\", 8);\n const divisionName = helper.string(\"getHireAdVertCost\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n const upgrade = IndustryUpgrades[1];\n return upgrade[1] * Math.pow(upgrade[2], division.upgrades[1]);\n },\n getHireAdVertCount: function (_divisionName: unknown): number {\n checkAccess(\"getHireAdVertCount\", 8);\n const divisionName = helper.string(\"getHireAdVertCount\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return division.upgrades[1];\n },\n getResearchCost: function (_divisionName: unknown, _researchName: unknown): number {\n checkAccess(\"getResearchCost\", 8);\n const divisionName = helper.string(\"getResearchCost\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"getResearchCost\", \"researchName\", _researchName);\n return getResearchCost(getDivision(divisionName), researchName);\n },\n hasResearched: function (_divisionName: unknown, _researchName: unknown): boolean {\n checkAccess(\"hasResearched\", 8);\n const divisionName = helper.string(\"hasResearched\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"hasResearched\", \"researchName\", _researchName);\n return hasResearched(getDivision(divisionName), researchName);\n },\n setAutoJobAssignment: function (\n _divisionName: unknown,\n _cityName: unknown,\n _job: unknown,\n _amount: unknown,\n ): Promise {\n checkAccess(\"setAutoJobAssignment\", 8);\n const divisionName = helper.string(\"setAutoJobAssignment\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"setAutoJobAssignment\", \"cityName\", _cityName);\n const amount = helper.number(\"setAutoJobAssignment\", \"amount\", _amount);\n const job = helper.string(\"setAutoJobAssignment\", \"job\", _job);\n const office = getOffice(divisionName, cityName);\n if (!Object.values(EmployeePositions).includes(job)) throw new Error(`'${job}' is not a valid job.`);\n return netscriptDelay(1000, workerScript).then(function () {\n if (workerScript.env.stopFlag) {\n return Promise.reject(workerScript);\n }\n return Promise.resolve(office.setEmployeeToJob(job, amount));\n });\n },\n getOfficeSizeUpgradeCost: function (_divisionName: unknown, _cityName: unknown, _size: unknown): number {\n checkAccess(\"getOfficeSizeUpgradeCost\", 8);\n const divisionName = helper.string(\"getOfficeSizeUpgradeCost\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getOfficeSizeUpgradeCost\", \"cityName\", _cityName);\n const size = helper.number(\"getOfficeSizeUpgradeCost\", \"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const initialPriceMult = Math.round(office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n let mult = 0;\n for (let i = 0; i < size / CorporationConstants.OfficeInitialSize; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n return CorporationConstants.OfficeInitialCost * mult;\n },\n assignJob: function (\n _divisionName: unknown,\n _cityName: unknown,\n _employeeName: unknown,\n _job: unknown,\n ): Promise {\n checkAccess(\"assignJob\", 8);\n const divisionName = helper.string(\"assignJob\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"assignJob\", \"cityName\", _cityName);\n const employeeName = helper.string(\"assignJob\", \"employeeName\", _employeeName);\n const job = helper.string(\"assignJob\", \"job\", _job);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return netscriptDelay(1000, workerScript).then(function () {\n return Promise.resolve(AssignJob(employee, job));\n });\n },\n hireEmployee: function (_divisionName: unknown, _cityName: unknown): any {\n checkAccess(\"hireEmployee\", 8);\n const divisionName = helper.string(\"hireEmployee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"hireEmployee\", \"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n return office.hireRandomEmployee();\n },\n upgradeOfficeSize: function (_divisionName: unknown, _cityName: unknown, _size: unknown): void {\n checkAccess(\"upgradeOfficeSize\", 8);\n const divisionName = helper.string(\"upgradeOfficeSize\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"upgradeOfficeSize\", \"cityName\", _cityName);\n const size = helper.number(\"upgradeOfficeSize\", \"size\", _size);\n if (size < 0) throw new Error(\"Invalid value for size field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n UpgradeOfficeSize(corporation, office, size);\n },\n throwParty: function (_divisionName: unknown, _cityName: unknown, _costPerEmployee: unknown): Promise {\n checkAccess(\"throwParty\", 8);\n const divisionName = helper.string(\"throwParty\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"throwParty\", \"cityName\", _cityName);\n const costPerEmployee = helper.number(\"throwParty\", \"costPerEmployee\", _costPerEmployee);\n if (costPerEmployee < 0)\n throw new Error(\"Invalid value for Cost Per Employee field! Must be numeric and greater than 0\");\n const office = getOffice(divisionName, cityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(ThrowParty(corporation, office, costPerEmployee));\n });\n },\n buyCoffee: function (_divisionName: unknown, _cityName: unknown): Promise {\n checkAccess(\"buyCoffee\", 8);\n const divisionName = helper.string(\"buyCoffee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"buyCoffee\", \"cityName\", _cityName);\n const corporation = getCorporation();\n return netscriptDelay(\n (60 * 1000) / (player.hacking_speed_mult * calculateIntelligenceBonus(player.intelligence, 1)),\n workerScript,\n ).then(function () {\n return Promise.resolve(BuyCoffee(corporation, getDivision(divisionName), getOffice(divisionName, cityName)));\n });\n },\n hireAdVert: function (_divisionName: unknown): void {\n checkAccess(\"hireAdVert\", 8);\n const divisionName = helper.string(\"hireAdVert\", \"divisionName\", _divisionName);\n const corporation = getCorporation();\n HireAdVert(corporation, getDivision(divisionName), getOffice(divisionName, \"Sector-12\"));\n },\n research: function (_divisionName: unknown, _researchName: unknown): void {\n checkAccess(\"research\", 8);\n const divisionName = helper.string(\"research\", \"divisionName\", _divisionName);\n const researchName = helper.string(\"research\", \"researchName\", _researchName);\n Research(getDivision(divisionName), researchName);\n },\n getOffice: function (_divisionName: unknown, _cityName: unknown): any {\n checkAccess(\"getOffice\", 8);\n const divisionName = helper.string(\"getOffice\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getOffice\", \"cityName\", _cityName);\n const office = getOffice(divisionName, cityName);\n return {\n loc: office.loc,\n size: office.size,\n minEne: office.minEne,\n maxEne: office.maxEne,\n minHap: office.minHap,\n maxHap: office.maxHap,\n maxMor: office.maxMor,\n employees: office.employees.map((e) => e.name),\n employeeProd: {\n Operations: office.employeeProd[EmployeePositions.Operations],\n Engineer: office.employeeProd[EmployeePositions.Engineer],\n Business: office.employeeProd[EmployeePositions.Business],\n Management: office.employeeProd[EmployeePositions.Management],\n \"Research & Development\": office.employeeProd[EmployeePositions.RandD],\n Training: office.employeeProd[EmployeePositions.Training],\n },\n };\n },\n getEmployee: function (_divisionName: unknown, _cityName: unknown, _employeeName: unknown): NSEmployee {\n checkAccess(\"getEmployee\", 8);\n const divisionName = helper.string(\"getEmployee\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"getEmployee\", \"cityName\", _cityName);\n const employeeName = helper.string(\"getEmployee\", \"employeeName\", _employeeName);\n const employee = getEmployee(divisionName, cityName, employeeName);\n return {\n name: employee.name,\n mor: employee.mor,\n hap: employee.hap,\n ene: employee.ene,\n int: employee.int,\n cha: employee.cha,\n exp: employee.exp,\n cre: employee.cre,\n eff: employee.eff,\n sal: employee.sal,\n loc: employee.loc,\n pos: employee.pos,\n };\n },\n };\n\n return {\n ...warehouseAPI,\n ...officeAPI,\n expandIndustry: function (_industryName: unknown, _divisionName: unknown): void {\n checkAccess(\"expandIndustry\");\n const industryName = helper.string(\"expandIndustry\", \"industryName\", _industryName);\n const divisionName = helper.string(\"expandIndustry\", \"divisionName\", _divisionName);\n const corporation = getCorporation();\n NewIndustry(corporation, industryName, divisionName);\n },\n expandCity: function (_divisionName: unknown, _cityName: unknown): void {\n checkAccess(\"expandCity\");\n const divisionName = helper.string(\"expandCity\", \"divisionName\", _divisionName);\n const cityName = helper.city(\"expandCity\", \"cityName\", _cityName);\n if (!CorporationConstants.Cities.includes(cityName)) throw new Error(\"Invalid city name\");\n const corporation = getCorporation();\n const division = getDivision(divisionName);\n NewCity(corporation, division, cityName);\n },\n unlockUpgrade: function (_upgradeName: unknown): void {\n checkAccess(\"unlockUpgrade\");\n const upgradeName = helper.string(\"unlockUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUnlockUpgrades).find((upgrade) => upgrade[2] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n UnlockUpgrade(corporation, upgrade);\n },\n levelUpgrade: function (_upgradeName: unknown): void {\n checkAccess(\"levelUpgrade\");\n const upgradeName = helper.string(\"levelUpgrade\", \"upgradeName\", _upgradeName);\n const corporation = getCorporation();\n const upgrade = Object.values(CorporationUpgrades).find((upgrade) => upgrade[4] === upgradeName);\n if (upgrade === undefined) throw new Error(`No upgrade named '${upgradeName}'`);\n LevelUpgrade(corporation, upgrade);\n },\n issueDividends: function (_percent: unknown): void {\n checkAccess(\"issueDividends\");\n const percent = helper.number(\"issueDividends\", \"percent\", _percent);\n if (percent < 0 || percent > 100)\n throw new Error(\"Invalid value for percent field! Must be numeric, greater than 0, and less than 100\");\n const corporation = getCorporation();\n if (!corporation.public)\n throw helper.makeRuntimeErrorMsg(`corporation.issueDividends`, `Your company has not gone public!`);\n IssueDividends(corporation, percent);\n },\n\n // If you modify these objects you will affect them for real, it's not\n // copies.\n getDivision: function (_divisionName: unknown): NSDivision {\n checkAccess(\"getDivision\");\n const divisionName = helper.string(\"getDivision\", \"divisionName\", _divisionName);\n const division = getDivision(divisionName);\n return getSafeDivision(division);\n },\n getCorporation: function (): CorporationInfo {\n checkAccess(\"getCorporation\");\n const corporation = getCorporation();\n return {\n name: corporation.name,\n funds: corporation.funds,\n revenue: corporation.revenue,\n expenses: corporation.expenses,\n public: corporation.public,\n totalShares: corporation.totalShares,\n numShares: corporation.numShares,\n shareSaleCooldown: corporation.shareSaleCooldown,\n issuedShares: corporation.issuedShares,\n sharePrice: corporation.sharePrice,\n state: corporation.state.getState(),\n divisions: corporation.divisions.map((division): NSDivision => getSafeDivision(division)),\n };\n },\n createCorporation: function (_corporationName: unknown, _selfFund: unknown = true): boolean {\n const corporationName = helper.string(\"createCorporation\", \"corporationName\", _corporationName);\n const selfFund = helper.boolean(_selfFund);\n return createCorporation(corporationName, selfFund);\n },\n hasUnlockUpgrade: function (_upgradeName: unknown): boolean {\n checkAccess(\"hasUnlockUpgrade\");\n const upgradeName = helper.string(\"hasUnlockUpgrade\", \"upgradeName\", _upgradeName);\n return hasUnlockUpgrade(upgradeName);\n },\n getUnlockUpgradeCost: function (_upgradeName: unknown): number {\n checkAccess(\"getUnlockUpgradeCost\");\n const upgradeName = helper.string(\"getUnlockUpgradeCost\", \"upgradeName\", _upgradeName);\n return getUnlockUpgradeCost(upgradeName);\n },\n getUpgradeLevel: function (_upgradeName: unknown): number {\n checkAccess(\"hasUnlockUpgrade\");\n const upgradeName = helper.string(\"getUpgradeLevel\", \"upgradeName\", _upgradeName);\n return getUpgradeLevel(upgradeName);\n },\n getUpgradeLevelCost: function (_upgradeName: unknown): number {\n checkAccess(\"getUpgradeLevelCost\");\n const upgradeName = helper.string(\"getUpgradeLevelCost\", \"upgradeName\", _upgradeName);\n return getUpgradeLevelCost(upgradeName);\n },\n getExpandIndustryCost: function (_industryName: unknown): number {\n checkAccess(\"getExpandIndustryCost\");\n const industryName = helper.string(\"getExpandIndustryCost\", \"industryName\", _industryName);\n return getExpandIndustryCost(industryName);\n },\n getExpandCityCost: function (): number {\n checkAccess(\"getExpandCityCost\");\n return getExpandCityCost();\n },\n getInvestmentOffer: function (): InvestmentOffer {\n checkAccess(\"getInvestmentOffer\");\n return getInvestmentOffer();\n },\n acceptInvestmentOffer: function (): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n return acceptInvestmentOffer();\n },\n goPublic: function (_numShares: unknown): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"goPublic\", \"numShares\", _numShares);\n return goPublic(numShares);\n },\n sellShares: function (_numShares: unknown): number {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"sellStock\", \"numShares\", _numShares);\n return SellShares(getCorporation(), player, numShares);\n },\n buyBackShares: function (_numShares: unknown): boolean {\n checkAccess(\"acceptInvestmentOffer\");\n const numShares = helper.number(\"buyStock\", \"numShares\", _numShares);\n return BuyBackShares(getCorporation(), player, numShares);\n },\n bribe: function (_factionName: unknown, _amountCash: unknown, _amountShares: unknown): boolean {\n checkAccess(\"bribe\");\n const factionName = helper.string(\"bribe\", \"factionName\", _factionName);\n const amountCash = helper.number(\"bribe\", \"amountCash\", _amountCash);\n const amountShares = helper.number(\"bribe\", \"amountShares\", _amountShares);\n return bribe(factionName, amountCash, amountShares);\n },\n getBonusTime: function (): number {\n checkAccess(\"getBonusTime\");\n return Math.round(getCorporation().storedCycles / 5) * 1000;\n },\n };\n}\n","import { Reviver, Generic_toJSON, Generic_fromJSON } from \"../utils/JSONReviver\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { Industries, IndustryStartingCosts, IndustryResearchTrees } from \"./IndustryData\";\nimport { CorporationConstants } from \"./data/Constants\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { Material } from \"./Material\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { calculateEffectWithFactors } from \"../utils/calculateEffectWithFactors\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { Product } from \"./Product\";\nimport { dialogBoxCreate } from \"../ui/React/DialogBox\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { MaterialSizes } from \"./MaterialSizes\";\nimport { Warehouse } from \"./Warehouse\";\nimport { ICorporation } from \"./ICorporation\";\nimport { IIndustry } from \"./IIndustry\";\nimport { IndustryUpgrade, IndustryUpgrades } from \"./IndustryUpgrades\";\n\ninterface IParams {\n name?: string;\n corp?: ICorporation;\n type?: string;\n}\n\nexport class Industry implements IIndustry {\n name = \"\";\n type = Industries.Agriculture;\n sciResearch = new Material({ name: \"Scientific Research\" });\n researched: { [key: string]: boolean | undefined } = {};\n reqMats: { [key: string]: number | undefined } = {};\n\n //An array of the name of materials being produced\n prodMats: string[] = [];\n\n products: { [key: string]: Product | undefined } = {};\n makesProducts = false;\n\n awareness = 0;\n popularity = 0; //Should always be less than awareness\n startingCost = 0;\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 reFac = 0; //Real estate Factor\n sciFac = 0; //Scientific Research Factor, affects quality\n hwFac = 0; //Hardware factor\n robFac = 0; //Robotics Factor\n aiFac = 0; //AI Cores factor;\n advFac = 0; //Advertising factor, affects sales\n\n prodMult = 0; //Production multiplier\n\n //Financials\n lastCycleRevenue: number;\n lastCycleExpenses: number;\n thisCycleRevenue: number;\n thisCycleExpenses: number;\n\n //Upgrades\n upgrades: number[] = Array(Object.keys(IndustryUpgrades).length).fill(0);\n\n state = \"START\";\n newInd = true;\n\n //Maps locations to warehouses. 0 if no warehouse at that location\n warehouses: { [key: string]: Warehouse | 0 };\n\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\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"\";\n this.type = params.type ? params.type : Industries.Agriculture;\n\n //Financials\n this.lastCycleRevenue = 0;\n this.lastCycleExpenses = 0;\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n this.warehouses = {\n [CityName.Aevum]: 0,\n [CityName.Chongqing]: 0,\n [CityName.Sector12]: new Warehouse({\n corp: params.corp,\n industry: this,\n loc: CityName.Sector12,\n size: CorporationConstants.WarehouseInitialSize,\n }),\n [CityName.NewTokyo]: 0,\n [CityName.Ishima]: 0,\n [CityName.Volhaven]: 0,\n };\n\n this.init();\n }\n\n init(): void {\n //Set the unique properties of an industry (how much its affected by real estate/scientific research, etc.)\n const startingCost = IndustryStartingCosts[this.type];\n if (startingCost === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.startingCost = startingCost;\n switch (this.type) {\n case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 case Industries.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 default:\n console.error(`Invalid Industry Type passed into Industry.init(): ${this.type}`);\n return;\n }\n }\n\n getProductDescriptionText(): string {\n if (!this.makesProducts) return \"\";\n switch (this.type) {\n case Industries.Food:\n return \"create and manage restaurants\";\n case Industries.Tobacco:\n return \"create tobacco and tobacco-related products\";\n case Industries.Pharmaceutical:\n return \"develop new pharmaceutical drugs\";\n case Industries.Computer:\n case \"Computer\":\n return \"create new computer hardware and networking infrastructures\";\n case Industries.Robotics:\n return \"build specialized robots and robot-related products\";\n case Industries.Software:\n return \"develop computer software\";\n case Industries.Healthcare:\n return \"build and manage hospitals\";\n case Industries.RealEstate:\n return \"develop and manage real estate properties\";\n default:\n console.error(\"Invalid industry type in Industry.getProductDescriptionText\");\n return \"\";\n }\n }\n\n getMaximumNumberProducts(): number {\n if (!this.makesProducts) return 0;\n\n // Calculate additional number of allowed Products from Research/Upgrades\n let additional = 0;\n if (this.hasResearch(\"uPgrade: Capacity.I\")) ++additional;\n if (this.hasResearch(\"uPgrade: Capacity.II\")) ++additional;\n\n return CorporationConstants.BaseMaxProducts + additional;\n }\n\n hasMaximumNumberProducts(): boolean {\n return Object.keys(this.products).length >= this.getMaximumNumberProducts();\n }\n\n //Calculates the values that factor into the production and properties of\n //materials/products (such as quality, etc.)\n calculateProductionFactors(): void {\n let multSum = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const warehouse = this.warehouses[city];\n if (!(warehouse instanceof Warehouse)) {\n continue;\n }\n\n const materials = warehouse.materials;\n\n const cityMult =\n Math.pow(0.002 * materials.RealEstate.qty + 1, this.reFac) *\n Math.pow(0.002 * materials.Hardware.qty + 1, this.hwFac) *\n Math.pow(0.002 * materials.Robots.qty + 1, this.robFac) *\n 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: Warehouse): void {\n warehouse.updateMaterialSizeUsed();\n\n for (const prodName of Object.keys(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 }\n }\n\n process(marketCycles = 1, state: string, corporation: ICorporation): void {\n this.state = state;\n\n //At the start of a cycle, store and reset revenue/expenses\n //Then calculate salaries and processs the markets\n if (state === \"START\") {\n if (isNaN(this.thisCycleRevenue) || isNaN(this.thisCycleExpenses)) {\n console.error(\"NaN in Corporation's computed revenue/expenses\");\n dialogBoxCreate(\n \"Something went wrong when compting Corporation's revenue/expenses. This is a bug. Please report to game developer\",\n );\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n }\n this.lastCycleRevenue = this.thisCycleRevenue / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.lastCycleExpenses = this.thisCycleExpenses / (marketCycles * CorporationConstants.SecsPerMarketCycle);\n this.thisCycleRevenue = 0;\n this.thisCycleExpenses = 0;\n\n // Once you start making revenue, the player should no longer be\n // considered new, and therefore no longer needs the 'tutorial' UI elements\n if (this.lastCycleRevenue > 0) {\n this.newInd = false;\n }\n\n // Process offices (and the employees in them)\n let employeeSalary = 0;\n for (const officeLoc of Object.keys(this.offices)) {\n const office = this.offices[officeLoc];\n if (office === 0) continue;\n if (office instanceof OfficeSpace) {\n employeeSalary += office.process(marketCycles, corporation, this);\n }\n }\n this.thisCycleExpenses = this.thisCycleExpenses + employeeSalary;\n\n // Process change in demand/competition of materials/products\n this.processMaterialMarket();\n this.processProductMarket(marketCycles);\n\n // Process loss of popularity\n this.popularity -= marketCycles * 0.0001;\n this.popularity = Math.max(0, this.popularity);\n\n // Process Dreamsense gains\n const popularityGain = corporation.getDreamSenseGain(),\n awarenessGain = popularityGain * 4;\n if (popularityGain > 0) {\n const awareness = this.awareness + (awarenessGain * marketCycles);\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = this.popularity + (popularityGain * marketCycles);\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n }\n\n return;\n }\n\n // Process production, purchase, and import/export of materials\n let res = this.processMaterials(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n\n // Process creation, production & sale of products\n res = this.processProducts(marketCycles, corporation);\n if (Array.isArray(res)) {\n this.thisCycleRevenue = this.thisCycleRevenue + res[0];\n this.thisCycleExpenses = this.thisCycleExpenses + res[1];\n }\n }\n\n // Process change in demand and competition for this industry's materials\n processMaterialMarket(): void {\n //References to prodMats and reqMats\n const reqMats = this.reqMats,\n prodMats = this.prodMats;\n\n //Only 'process the market' for materials that this industry deals with\n for (let i = 0; i < CorporationConstants.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[CorporationConstants.Cities[i]] instanceof Warehouse) {\n const wh = this.warehouses[CorporationConstants.Cities[i]];\n if (wh === 0) continue;\n for (const name of Object.keys(reqMats)) {\n if (reqMats.hasOwnProperty(name)) {\n wh.materials[name].processMarket();\n }\n }\n\n //Produced materials are stored in an array\n for (let foo = 0; foo < prodMats.length; ++foo) {\n wh.materials[prodMats[foo]].processMarket();\n }\n\n //Process these twice because these boost production\n wh.materials[\"Hardware\"].processMarket();\n wh.materials[\"Robots\"].processMarket();\n wh.materials[\"AICores\"].processMarket();\n wh.materials[\"RealEstate\"].processMarket();\n }\n }\n }\n\n // Process change in demand and competition for this industry's products\n processProductMarket(marketCycles = 1): void {\n // Demand gradually decreases, and competition gradually increases\n for (const name of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(name)) {\n const product = this.products[name];\n if (product === undefined) continue;\n let change = getRandomInt(0, 3) * 0.0004;\n if (change === 0) continue;\n\n if (\n this.type === Industries.Pharmaceutical ||\n this.type === Industries.Software ||\n this.type === Industries.Robotics\n ) {\n change *= 3;\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 }\n\n //Process production, purchase, and import/export of materials\n processMaterials(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0,\n expenses = 0;\n this.calculateProductionFactors();\n\n //At the start of the export state, set the imports of everything to 0\n if (this.state === \"EXPORT\") {\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n if (!(this.warehouses[city] instanceof Warehouse)) {\n continue;\n }\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n for (const matName of Object.keys(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 < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n\n if (this.warehouses[city] instanceof Warehouse) {\n const warehouse = this.warehouses[city];\n if (warehouse === 0) continue;\n\n switch (this.state) {\n case \"PURCHASE\": {\n /* Process purchase of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (!warehouse.materials.hasOwnProperty(matName)) continue;\n const mat = warehouse.materials[matName];\n let buyAmt = 0;\n let maxAmt = 0;\n if (warehouse.smartSupplyEnabled && Object.keys(this.reqMats).includes(matName)) {\n continue;\n }\n buyAmt = mat.buy * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) {\n mat.qty += buyAmt;\n expenses += buyAmt * mat.bCost;\n }\n this.updateWarehouseSizeUsed(warehouse);\n } //End process purchase of materials\n\n // smart supply\n const smartBuy: { [key: string]: number | undefined } = {};\n for (const matName of Object.keys(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];\n\n //Smart supply tracker is stored as per second rate\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 * CorporationConstants.SecsPerMarketCycle * marketCycles;\n const maxAmt = Math.floor((warehouse.size - warehouse.sizeUsed) / MaterialSizes[matName]);\n buyAmt = Math.min(buyAmt, maxAmt);\n if (buyAmt > 0) smartBuy[matName] = buyAmt;\n }\n\n // Find which material were trying to create the least amount of product with.\n let worseAmt = 1e99;\n for (const matName of Object.keys(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 }\n\n // Align all the materials to the smallest amount.\n for (const matName of Object.keys(smartBuy)) {\n const reqMat = this.reqMats[matName];\n if (reqMat === undefined) throw new Error(`reqMat \"${matName}\" is undefined`);\n smartBuy[matName] = worseAmt * reqMat;\n }\n\n // Calculate the total size of all things were trying to buy\n let totalSize = 0;\n for (const matName of Object.keys(smartBuy)) {\n const buyAmt = smartBuy[matName];\n if (buyAmt === undefined) throw new Error(`Somehow smartbuy matname is undefined`);\n totalSize += buyAmt * MaterialSizes[matName];\n }\n\n // Shrink to the size of available space.\n const freeSpace = warehouse.size - warehouse.sizeUsed;\n if (totalSize > freeSpace) {\n for (const matName of Object.keys(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 }\n\n // Use the materials already in the warehouse if the option is on.\n for (const matName of Object.keys(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 }\n\n // buy them\n for (const matName of Object.keys(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 break;\n }\n case \"PRODUCTION\":\n warehouse.smartSupplyStore = 0; //Reset smart supply amount\n\n /* Process production of materials */\n if (this.prodMats.length > 0) {\n const mat = warehouse.materials[this.prodMats[0]];\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office) *\n this.prodMult * // Multiplier from materials\n corporation.getProductionMultiplier() *\n this.getProductionMultiplier(); // Multiplier from Research\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 prod *= CorporationConstants.SecsPerMarketCycle * marketCycles; //Convert production from per second to per market cycle\n\n // Calculate net change in warehouse storage making the produced materials will cost\n let totalMatSize = 0;\n for (let tmp = 0; tmp < this.prodMats.length; ++tmp) {\n totalMatSize += MaterialSizes[this.prodMats[tmp]];\n }\n for (const reqMatName of Object.keys(this.reqMats)) {\n const normQty = this.reqMats[reqMatName];\n if (normQty === undefined) continue;\n totalMatSize -= MaterialSizes[reqMatName] * normQty;\n }\n // If not enough space in warehouse, limit the amount of produced materials\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 }\n\n // Keep track of production for smart supply (/s)\n warehouse.smartSupplyStore += prod / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n // Make sure we have enough resource to make our materials\n let producableFrac = 1;\n for (const reqMatName of Object.keys(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 if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n if (producableFrac <= 0) {\n producableFrac = 0;\n prod = 0;\n }\n\n // Make our materials if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(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 -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\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 =\n office.employeeProd[EmployeePositions.Engineer] / 90 +\n Math.pow(this.sciResearch.qty, this.sciFac) +\n Math.pow(warehouse.materials[\"AICores\"].qty, this.aiFac) / 10e3;\n }\n } else {\n for (const reqMatName of Object.keys(this.reqMats)) {\n if (this.reqMats.hasOwnProperty(reqMatName)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n }\n\n //Per second\n const fooProd = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\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 of Object.keys(this.reqMats)) {\n warehouse.materials[reqMatName].prd = 0;\n }\n }\n break;\n\n case \"SALE\":\n /* Process sale of materials */\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n if (mat.sCost < 0 || mat.sllman[0] === false) {\n mat.sll = 0;\n continue;\n }\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(mat); //Competition + demand\n\n // Determine the cost that the material will be sold at\n const markupLimit = mat.getMarkupLimit();\n let sCost;\n if (mat.marketTa2) {\n const prod = mat.prd;\n\n // Reverse engineer the 'maxSell' formula\n // 1. Set 'maxSell' = prod\n // 2. Substitute formula for 'markup'\n // 3. Solve for 'sCost'\n const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n (mat.qlt + 0.001) *\n marketFactor *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\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 }\n\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 mat.marketTa2Price = optimalPrice;\n\n sCost = optimalPrice;\n } else if (mat.marketTa1) {\n sCost = mat.bCost + markupLimit;\n } else if (isString(mat.sCost)) {\n sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sCost = eval(sCost);\n } else {\n sCost = mat.sCost;\n }\n\n // Calculate how much of the material sells (per second)\n let markup = 1;\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 mat.maxsll =\n (mat.qlt + 0.001) *\n marketFactor *\n markup *\n businessFactor *\n corporation.getSalesMultiplier() *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (isString(mat.sllman[1])) {\n //Dynamically evaluated\n let tmp = (mat.sllman[1] as string).replace(/MAX/g, (mat.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, mat.prd + \"\");\n try {\n sellAmt = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell amount for material \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. The sell amount \" +\n \"is being set to zero\",\n );\n sellAmt = 0;\n }\n sellAmt = Math.min(mat.maxsll, sellAmt);\n } else if (mat.sllman[1] === -1) {\n //Backwards compatibility, -1 = MAX\n sellAmt = mat.maxsll;\n } else {\n //Player's input value is just a number\n sellAmt = Math.min(mat.maxsll, mat.sllman[1] as number);\n }\n\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(mat.qty, sellAmt);\n if (sellAmt < 0) {\n console.warn(`sellAmt calculated to be negative for ${matName} in ${city}`);\n mat.sll = 0;\n continue;\n }\n if (sellAmt && sCost >= 0) {\n mat.qty -= sellAmt;\n revenue += sellAmt * sCost;\n mat.sll = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n } else {\n mat.sll = 0;\n }\n }\n } //End processing of sale of materials\n break;\n\n case \"EXPORT\":\n for (const matName of Object.keys(warehouse.materials)) {\n if (warehouse.materials.hasOwnProperty(matName)) {\n const mat = warehouse.materials[matName];\n mat.totalExp = 0; //Reset export\n for (let expI = 0; expI < mat.exp.length; ++expI) {\n const exp = mat.exp[expI];\n const amtStr = exp.amt.replace(\n /MAX/g,\n (mat.qty / (CorporationConstants.SecsPerMarketCycle * marketCycles) + \"\").toUpperCase(),\n );\n let amt = 0;\n try {\n amt = eval(amtStr);\n } catch (e) {\n dialogBoxCreate(\n \"Calculating export for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division failed with \" +\n \"error: \" +\n e,\n );\n continue;\n }\n if (isNaN(amt)) {\n dialogBoxCreate(\n \"Error calculating export amount for \" +\n mat.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" division.\",\n );\n continue;\n }\n amt = amt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n if (mat.qty < amt) {\n amt = mat.qty;\n }\n if (amt === 0) {\n break; //None left\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 if (!(expWarehouse instanceof Warehouse)) {\n console.error(`Invalid export! ${expIndustry.name} ${exp.city}`);\n break;\n }\n\n // Make sure theres enough space in warehouse\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[matName]);\n amt = Math.min(maxAmt, amt);\n }\n expWarehouse.materials[matName].imp +=\n amt / (CorporationConstants.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 }\n //totalExp should be per second\n mat.totalExp /= CorporationConstants.SecsPerMarketCycle * marketCycles;\n }\n }\n\n break;\n\n case \"START\":\n break;\n default:\n console.error(`Invalid state: ${this.state}`);\n break;\n } //End switch(this.state)\n this.updateWarehouseSizeUsed(warehouse);\n } // End warehouse\n\n //Produce Scientific Research based on R&D employees\n //Scientific Research can be produced without a warehouse\n if (office instanceof OfficeSpace) {\n this.sciResearch.qty +=\n 0.004 *\n Math.pow(office.employeeProd[EmployeePositions.RandD], 0.5) *\n corporation.getScientificResearchMultiplier() *\n this.getScientificResearchMultiplier();\n }\n }\n return [revenue, expenses];\n }\n\n //Process production & sale of this industry's FINISHED products (including all of their stats)\n processProducts(marketCycles = 1, corporation: ICorporation): [number, number] {\n let revenue = 0;\n const expenses = 0;\n\n //Create products\n if (this.state === \"PRODUCTION\") {\n for (const prodName of Object.keys(this.products)) {\n const prod = this.products[prodName];\n if (prod === undefined) continue;\n if (!prod.fin) {\n const city = prod.createCity;\n const office = this.offices[city];\n if (office === 0) continue;\n\n // Designing/Creating a Product is based mostly off Engineers\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const total = engrProd + mgmtProd + opProd;\n if (total <= 0) {\n break;\n }\n\n // Management is a multiplier for the production from Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n const progress = (Math.pow(engrProd, 0.34) + Math.pow(opProd, 0.2)) * mgmtFactor;\n\n prod.createProduct(marketCycles, progress);\n if (prod.prog >= 100) {\n prod.finishProduct(office.employeeProd, this);\n }\n break;\n }\n }\n }\n\n //Produce Products\n for (const prodName of Object.keys(this.products)) {\n if (this.products.hasOwnProperty(prodName)) {\n const prod = this.products[prodName];\n if (prod instanceof Product && prod.fin) {\n revenue += this.processProduct(marketCycles, prod, corporation);\n }\n }\n }\n return [revenue, expenses];\n }\n\n //Processes FINISHED products\n processProduct(marketCycles = 1, product: Product, corporation: ICorporation): number {\n let totalProfit = 0;\n for (let i = 0; i < CorporationConstants.Cities.length; ++i) {\n const city = CorporationConstants.Cities[i];\n const office = this.offices[city];\n if (office === 0) continue;\n const warehouse = this.warehouses[city];\n if (warehouse instanceof Warehouse) {\n switch (this.state) {\n case \"PRODUCTION\": {\n //Calculate the maximum production of this material based\n //on the office's productivity\n const maxProd =\n this.getOfficeProductivity(office, { forProduct: true }) *\n corporation.getProductionMultiplier() *\n this.prodMult * // Multiplier from materials\n this.getProductionMultiplier() * // Multiplier from research\n this.getProductProductionMultiplier(); // Multiplier from research\n let prod;\n\n //Account for whether production is manually limited\n if (product.prdman[city][0]) {\n prod = Math.min(maxProd, product.prdman[city][1]);\n } else {\n prod = maxProd;\n }\n prod *= CorporationConstants.SecsPerMarketCycle * marketCycles;\n\n //Calculate net change in warehouse storage making the Products will cost\n let netStorageSize = product.siz;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const normQty = product.reqMats[reqMatName];\n netStorageSize -= MaterialSizes[reqMatName] * normQty;\n }\n }\n\n //If there's not enough space in warehouse, limit the amount of Product\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 / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n\n //Make sure we have enough resources to make our Products\n let producableFrac = 1;\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n const req = product.reqMats[reqMatName] * prod;\n if (warehouse.materials[reqMatName].qty < req) {\n producableFrac = Math.min(producableFrac, warehouse.materials[reqMatName].qty / req);\n }\n }\n }\n\n //Make our Products if they are producable\n if (producableFrac > 0 && prod > 0) {\n for (const reqMatName of Object.keys(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 -=\n reqMatQtyNeeded / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n }\n }\n //Quantity\n product.data[city][0] += prod * producableFrac;\n }\n\n //Keep track of production Per second\n product.data[city][1] = (prod * producableFrac) / (CorporationConstants.SecsPerMarketCycle * marketCycles);\n break;\n }\n case \"SALE\": {\n //Process sale of Products\n product.pCost = 0; //Estimated production cost\n for (const reqMatName of Object.keys(product.reqMats)) {\n if (product.reqMats.hasOwnProperty(reqMatName)) {\n product.pCost += product.reqMats[reqMatName] * warehouse.materials[reqMatName].bCost;\n }\n }\n\n // Since its a product, its production cost is increased for labor\n product.pCost *= CorporationConstants.ProductProductionCostRatio;\n\n // Sale multipliers\n const businessFactor = this.getBusinessFactor(office); //Business employee productivity\n const advertisingFactor = this.getAdvertisingFactors()[0]; //Awareness + popularity\n const marketFactor = this.getMarketFactor(product); //Competition + demand\n\n // Calculate Sale Cost (sCost), which could be dynamically evaluated\n const markupLimit = product.rat / product.mku;\n let sCost;\n if (product.marketTa2) {\n const prod = product.data[city][1];\n\n // 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 const numerator = markupLimit;\n const sqrtNumerator = prod;\n const sqrtDenominator =\n 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n const denominator = Math.sqrt(sqrtNumerator / sqrtDenominator);\n let optimalPrice;\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 }\n\n // Store this \"optimal Price\" in a property so we don't have to re-calculate for UI\n product.marketTa2Price[city] = optimalPrice;\n sCost = optimalPrice;\n } else if (product.marketTa1) {\n sCost = product.pCost + markupLimit;\n } else if (isString(product.sCost)) {\n const sCostString = product.sCost as string;\n if (product.mku === 0) {\n console.error(`mku is zero, reverting to 1 to avoid Infinity`);\n product.mku = 1;\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 if (sCost > product.pCost) {\n if (sCost - product.pCost > markupLimit) {\n markup = markupLimit / (sCost - product.pCost);\n }\n }\n\n product.maxsll = 0.5 *\n Math.pow(product.rat, 0.65) *\n marketFactor *\n corporation.getSalesMultiplier() *\n Math.pow(markup, 2) *\n businessFactor *\n advertisingFactor *\n this.getSalesMultiplier();\n let sellAmt;\n if (product.sllman[city][0] && isString(product.sllman[city][1])) {\n //Sell amount is dynamically evaluated\n let tmp = product.sllman[city][1].replace(/MAX/g, (product.maxsll + \"\").toUpperCase());\n tmp = tmp.replace(/PROD/g, product.data[city][1]);\n try {\n tmp = eval(tmp);\n } catch (e) {\n dialogBoxCreate(\n \"Error evaluating your sell price expression for \" +\n product.name +\n \" in \" +\n this.name +\n \"'s \" +\n city +\n \" office. Sell price is being set to MAX\",\n );\n tmp = product.maxsll;\n }\n sellAmt = Math.min(product.maxsll, tmp);\n } else if (product.sllman[city][0] && product.sllman[city][1] > 0) {\n //Sell amount is manually limited\n sellAmt = Math.min(product.maxsll, product.sllman[city][1]);\n } else if (product.sllman[city][0] === false) {\n sellAmt = 0;\n } else {\n sellAmt = product.maxsll;\n }\n if (sellAmt < 0) {\n sellAmt = 0;\n }\n sellAmt = sellAmt * CorporationConstants.SecsPerMarketCycle * marketCycles;\n sellAmt = Math.min(product.data[city][0], sellAmt); //data[0] is qty\n if (sellAmt && sCost) {\n product.data[city][0] -= sellAmt; //data[0] is qty\n totalProfit += sellAmt * sCost;\n product.data[city][2] = sellAmt / (CorporationConstants.SecsPerMarketCycle * marketCycles); //data[2] is sell property\n } else {\n product.data[city][2] = 0; //data[2] is sell property\n }\n break;\n }\n case \"START\":\n case \"PURCHASE\":\n case \"EXPORT\":\n break;\n default:\n console.error(`Invalid State: ${this.state}`);\n break;\n } //End switch(this.state)\n }\n }\n return totalProfit;\n }\n\n discontinueProduct(product: Product): void {\n for (const productName of Object.keys(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: IndustryUpgrade, refs: { corporation: ICorporation; office: OfficeSpace }): void {\n const corporation = refs.corporation;\n const office = refs.office;\n const upgN = upgrade[0];\n while (this.upgrades.length <= upgN) {\n this.upgrades.push(0);\n }\n ++this.upgrades[upgN];\n\n switch (upgN) {\n case 0: {\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 break;\n }\n case 1: {\n //AdVert.Inc,\n const advMult = corporation.getAdvertisingMultiplier() * this.getAdvertisingMultiplier();\n const awareness = (this.awareness + (3 * advMult)) * (1.01 * advMult);\n this.awareness = Math.min(awareness, Number.MAX_VALUE);\n\n const popularity = (this.popularity + (1 * advMult)) * ((1 + getRandomInt(1, 3) / 100) * advMult);\n this.popularity = Math.min(popularity, Number.MAX_VALUE);\n break;\n }\n default: {\n console.error(`Un-implemented function index: ${upgN}`);\n break;\n }\n }\n }\n\n // Returns how much of a material can be produced based of office productivity (employee stats)\n getOfficeProductivity(office: OfficeSpace, params: { forProduct?: boolean } = {}): number {\n const opProd = office.employeeProd[EmployeePositions.Operations];\n const engrProd = office.employeeProd[EmployeePositions.Engineer];\n const mgmtProd = office.employeeProd[EmployeePositions.Management];\n const total = opProd + engrProd + mgmtProd;\n\n if (total <= 0) return 0;\n\n // Management is a multiplier for the production from Operations and Engineers\n const mgmtFactor = 1 + mgmtProd / (1.2 * total);\n\n // For production, Operations is slightly more important than engineering\n // Both Engineering and Operations have diminishing returns\n const prod = (Math.pow(opProd, 0.4) + Math.pow(engrProd, 0.3)) * mgmtFactor;\n\n // Generic multiplier for the production. Used for game-balancing purposes\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 }\n\n // Returns a multiplier based on the office' 'Business' employees that affects sales\n getBusinessFactor(office: OfficeSpace): number {\n const businessProd = 1 + office.employeeProd[EmployeePositions.Business];\n\n return calculateEffectWithFactors(businessProd, 0.26, 10e3);\n }\n\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 getAdvertisingFactors(): [number, number, number, number] {\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 }\n\n //Returns a multiplier based on a materials demand and competition that affects sales\n getMarketFactor(mat: { dmd: number; cmp: number }): number {\n return Math.max(0.1, (mat.dmd * (100 - mat.cmp)) / 100);\n }\n\n // Returns a boolean indicating whether this Industry has the specified Research\n hasResearch(name: string): boolean {\n return this.researched[name] === true;\n }\n\n updateResearchTree(): void {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry \"${this.type}\"`);\n\n // Since ResearchTree data isnt saved, we'll update the Research Tree data\n // based on the stored 'researched' property in the Industry object\n if (Object.keys(researchTree.researched).length !== Object.keys(this.researched).length) {\n for (const research of Object.keys(this.researched)) {\n researchTree.research(research);\n }\n }\n }\n\n // Get multipliers from Research\n getAdvertisingMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getAdvertisingMultiplier();\n }\n\n getEmployeeChaMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeChaMultiplier();\n }\n\n getEmployeeCreMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeCreMultiplier();\n }\n\n getEmployeeEffMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeEffMultiplier();\n }\n\n getEmployeeIntMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getEmployeeIntMultiplier();\n }\n\n getProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductionMultiplier();\n }\n\n getProductProductionMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getProductProductionMultiplier();\n }\n\n getSalesMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getSalesMultiplier();\n }\n\n getScientificResearchMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getScientificResearchMultiplier();\n }\n\n getStorageMultiplier(): number {\n const researchTree = IndustryResearchTrees[this.type];\n if (researchTree === undefined) throw new Error(`Invalid industry: \"${this.type}\"`);\n this.updateResearchTree();\n return researchTree.getStorageMultiplier();\n }\n\n /**\n * Serialize the current object to a JSON save state.\n */\n toJSON(): any {\n return Generic_toJSON(\"Industry\", this);\n }\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 static fromJSON(value: any): Industry {\n return Generic_fromJSON(Industry, value.data);\n }\n}\n\nReviver.constructors.Industry = Industry;\n","/**\n * This is a component that implements a mathematical formula used commonly throughout the\n * game. This formula is (typically) used to calculate the effect that various statistics\n * have on a game mechanic. It looks something like:\n *\n * (stat ^ exponential factor) + (stat / linear factor)\n *\n * where the exponential factor is a number between 0 and 1 and the linear factor\n * is typically a relatively larger number.\n *\n * This formula ensures that the effects of the statistic that is being processed\n * has diminishing returns, but never loses its effectiveness as you continue\n * to raise it.\n */\nexport function calculateEffectWithFactors(n: number, expFac: number, linearFac: number): number {\n if (expFac <= 0 || expFac >= 1) {\n console.warn(`Exponential factor is ${expFac}. This is not an intended value for it`);\n }\n if (linearFac < 1) {\n console.warn(`Linear factor is ${linearFac}. This is not an intended value for it`);\n }\n\n return Math.pow(n, expFac) + n / linearFac;\n}\n","import { CorporationConstants } from \"./data/Constants\";\nimport { getRandomInt } from \"../utils/helpers/getRandomInt\";\nimport { Generic_fromJSON, Generic_toJSON, Reviver } from \"../utils/JSONReviver\";\nimport { EmployeePositions } from \"./EmployeePositions\";\nimport { ICorporation } from \"./ICorporation\";\nimport { OfficeSpace } from \"./OfficeSpace\";\nimport { IIndustry } from \"./IIndustry\";\n\ninterface IParams {\n name?: string;\n morale?: number;\n happiness?: number;\n energy?: number;\n intelligence?: number;\n charisma?: number;\n experience?: number;\n creativity?: number;\n efficiency?: number;\n salary?: number;\n loc?: string;\n}\n\nexport class Employee {\n name: string;\n mor: number;\n hap: number;\n ene: number;\n int: number;\n cha: number;\n exp: number;\n cre: number;\n eff: number;\n sal: number;\n cyclesUntilRaise = CorporationConstants.CyclesPerEmployeeRaise;\n loc: string;\n pos: string;\n\n constructor(params: IParams = {}) {\n this.name = params.name ? params.name : \"Bobby\";\n\n //Morale, happiness, and energy are 0-100\n this.mor = params.morale ? params.morale : getRandomInt(50, 100);\n this.hap = params.happiness ? params.happiness : getRandomInt(50, 100);\n this.ene = params.energy ? params.energy : getRandomInt(50, 100);\n\n this.int = params.intelligence ? params.intelligence : getRandomInt(10, 50);\n this.cha = params.charisma ? params.charisma : getRandomInt(10, 50);\n this.exp = params.experience ? params.experience : getRandomInt(10, 50);\n this.cre = params.creativity ? params.creativity : getRandomInt(10, 50);\n this.eff = params.efficiency ? params.efficiency : getRandomInt(10, 50);\n this.sal = params.salary ? params.salary : getRandomInt(0.1, 5);\n\n this.loc = params.loc ? params.loc : \"\";\n this.pos = EmployeePositions.Unassigned;\n }\n\n //Returns the amount the employee needs to be paid\n process(marketCycles = 1, office: OfficeSpace): number {\n const gain = 0.003 * marketCycles,\n det = gain * Math.random();\n this.exp += gain;\n\n //Training\n const trainingEff = gain * Math.random();\n if (this.pos === EmployeePositions.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 if (this.hap < office.minHap) {\n this.hap = office.minHap;\n }\n const salary = this.sal * marketCycles * CorporationConstants.SecsPerMarketCycle;\n return salary;\n }\n\n calculateProductivity(corporation: ICorporation, industry: IIndustry): number {\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 switch (this.pos) {\n //Calculate productivity based on position. This is multipled by prodBase\n //to get final value\n case EmployeePositions.Operations:\n prodMult = 0.6 * effInt + 0.1 * effCha + this.exp + 0.5 * effCre + effEff;\n break;\n case EmployeePositions.Engineer:\n prodMult = effInt + 0.1 * effCha + 1.5 * this.exp + effEff;\n break;\n case EmployeePositions.Business:\n prodMult = 0.4 * effInt + effCha + 0.5 * this.exp;\n break;\n case EmployeePositions.Management:\n prodMult = 2 * effCha + this.exp + 0.2 * effCre + 0.7 * effEff;\n break;\n case EmployeePositions.RandD:\n prodMult = 1.5 * effInt + 0.8 * this.exp + effCre + 0.5 * effEff;\n break;\n case EmployeePositions.Unassigned:\n case EmployeePositions.Training:\n prodMult = 0;\n break;\n default:\n console.error(`Invalid employee position: ${this.pos}`);\n break;\n }\n return prodBase * prodMult;\n }\n\n //Process benefits from having an office party thrown\n throwParty(money: number): number {\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 }\n\n toJSON(): any {\n return Generic_toJSON(\"Employee\", this);\n }\n\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n static fromJSON(value: any): Employee {\n return Generic_fromJSON(Employee, value.data);\n }\n}\n\nReviver.constructors.Employee = Employee;\n","import { Industries } from \"./IndustryData\";\nimport { IMap } from \"../types\";\n\nexport interface IProductRatingWeight {\n Aesthetics?: number;\n Durability?: number;\n Features?: number;\n Quality?: number;\n Performance?: number;\n Reliability?: number;\n}\n\nexport const ProductRatingWeights: IMap = {\n [Industries.Food]: {\n Quality: 0.7,\n Durability: 0.1,\n Aesthetics: 0.2,\n },\n [Industries.Tobacco]: {\n Quality: 0.4,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.2,\n },\n [Industries.Pharmaceutical]: {\n Quality: 0.2,\n Performance: 0.2,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.2,\n },\n [Industries.Computer]: {\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n Computer: {\n //Repeat\n Quality: 0.15,\n Performance: 0.25,\n Durability: 0.25,\n Reliability: 0.2,\n Aesthetics: 0.05,\n Features: 0.1,\n },\n [Industries.Robotics]: {\n Quality: 0.1,\n Performance: 0.2,\n Durability: 0.2,\n Reliability: 0.2,\n Aesthetics: 0.1,\n Features: 0.2,\n },\n [Industries.Software]: {\n Quality: 0.2,\n Performance: 0.2,\n Reliability: 0.2,\n Durability: 0.2,\n Features: 0.2,\n },\n [Industries.Healthcare]: {\n Quality: 0.4,\n Performance: 0.1,\n Durability: 0.1,\n Reliability: 0.3,\n Features: 0.1,\n },\n [Industries.RealEstate]: {\n Quality: 0.2,\n Durability: 0.25,\n Reliability: 0.1,\n Aesthetics: 0.35,\n Features: 0.1,\n },\n};\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { calculateServerGrowth } from \"../Server/formulas/grow\";\nimport {\n calculateMoneyGainRate,\n calculateLevelUpgradeCost,\n calculateRamUpgradeCost,\n calculateCoreUpgradeCost,\n calculateNodeCost,\n} from \"../Hacknet/formulas/HacknetNodes\";\nimport {\n calculateHashGainRate as HScalculateHashGainRate,\n calculateLevelUpgradeCost as HScalculateLevelUpgradeCost,\n calculateRamUpgradeCost as HScalculateRamUpgradeCost,\n calculateCoreUpgradeCost as HScalculateCoreUpgradeCost,\n calculateCacheUpgradeCost as HScalculateCacheUpgradeCost,\n calculateServerCost as HScalculateServerCost,\n} from \"../Hacknet/formulas/HacknetServers\";\nimport { HacknetNodeConstants, HacknetServerConstants } from \"../Hacknet/data/Constants\";\nimport { calculateSkill, calculateExp } from \"../PersonObjects/formulas/skill\";\nimport {\n calculateHackingChance,\n calculateHackingExpGain,\n calculatePercentMoneyHacked,\n calculateHackingTime,\n calculateGrowTime,\n calculateWeakenTime,\n} from \"../Hacking\";\nimport { Programs } from \"../Programs/Programs\";\nimport { Formulas as IFormulas } from \"../ScriptEditor/NetscriptDefinitions\";\nimport {\n calculateRespectGain,\n calculateWantedLevelGain,\n calculateMoneyGain,\n calculateWantedPenalty,\n calculateAscensionMult,\n calculateAscensionPointsGain,\n} from \"../Gang/formulas/formulas\";\nimport { favorToRep as calculateFavorToRep, repToFavor as calculateRepToFavor } from \"../Faction/formulas/favor\";\n\nexport function NetscriptFormulas(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IFormulas {\n const checkFormulasAccess = function (func: string): void {\n if (!player.hasProgram(Programs.Formulas.name)) {\n throw helper.makeRuntimeErrorMsg(`formulas.${func}`, `Requires Formulas.exe to run.`);\n }\n };\n return {\n reputation: {\n calculateFavorToRep: function (_favor: unknown): number {\n const favor = helper.number(\"calculateFavorToRep\", \"favor\", _favor);\n checkFormulasAccess(\"reputation.calculateFavorToRep\");\n return calculateFavorToRep(favor);\n },\n calculateRepToFavor: function (_rep: unknown): number {\n const rep = helper.number(\"calculateRepToFavor\", \"rep\", _rep);\n checkFormulasAccess(\"reputation.calculateRepToFavor\");\n return calculateRepToFavor(rep);\n },\n },\n skills: {\n calculateSkill: function (_exp: unknown, _mult: unknown = 1): number {\n const exp = helper.number(\"calculateSkill\", \"exp\", _exp);\n const mult = helper.number(\"calculateSkill\", \"mult\", _mult);\n checkFormulasAccess(\"skills.calculateSkill\");\n return calculateSkill(exp, mult);\n },\n calculateExp: function (_skill: unknown, _mult: unknown = 1): number {\n const skill = helper.number(\"calculateExp\", \"skill\", _skill);\n const mult = helper.number(\"calculateExp\", \"mult\", _mult);\n checkFormulasAccess(\"skills.calculateExp\");\n return calculateExp(skill, mult);\n },\n },\n hacking: {\n hackChance: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackChance\");\n return calculateHackingChance(server, player);\n },\n hackExp: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackExp\");\n return calculateHackingExpGain(server, player);\n },\n hackPercent: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackPercent\");\n return calculatePercentMoneyHacked(server, player);\n },\n growPercent: function (server: any, _threads: unknown, player: any, _cores: unknown = 1): number {\n const threads = helper.number(\"growPercent\", \"threads\", _threads);\n const cores = helper.number(\"growPercent\", \"cores\", _cores);\n checkFormulasAccess(\"hacking.growPercent\");\n return calculateServerGrowth(server, threads, player, cores);\n },\n hackTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.hackTime\");\n return calculateHackingTime(server, player) * 1000;\n },\n growTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.growTime\");\n return calculateGrowTime(server, player) * 1000;\n },\n weakenTime: function (server: any, player: any): number {\n checkFormulasAccess(\"hacking.weakenTime\");\n return calculateWeakenTime(server, player) * 1000;\n },\n },\n hacknetNodes: {\n moneyGainRate: function (_level: unknown, _ram: unknown, _cores: unknown, _mult: unknown = 1): number {\n const level = helper.number(\"moneyGainRate\", \"level\", _level);\n const ram = helper.number(\"moneyGainRate\", \"ram\", _ram);\n const cores = helper.number(\"moneyGainRate\", \"cores\", _cores);\n const mult = helper.number(\"moneyGainRate\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetNodes.moneyGainRate\");\n return calculateMoneyGainRate(level, ram, cores, mult);\n },\n levelUpgradeCost: function (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingLevel = helper.number(\"levelUpgradeCost\", \"startingLevel\", _startingLevel);\n const extraLevels = helper.number(\"levelUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"levelUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.levelUpgradeCost\");\n return calculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingRam = helper.number(\"ramUpgradeCost\", \"startingRam\", _startingRam);\n const extraLevels = helper.number(\"ramUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"ramUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.ramUpgradeCost\");\n return calculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number {\n const startingCore = helper.number(\"coreUpgradeCost\", \"startingCore\", _startingCore);\n const extraCores = helper.number(\"coreUpgradeCost\", \"extraCores\", _extraCores);\n const costMult = helper.number(\"coreUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetNodes.coreUpgradeCost\");\n return calculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n hacknetNodeCost: function (_n: unknown, _mult: unknown): number {\n const n = helper.number(\"hacknetNodeCost\", \"n\", _n);\n const mult = helper.number(\"hacknetNodeCost\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetNodes.hacknetNodeCost\");\n return calculateNodeCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetNodes.constants\");\n return Object.assign({}, HacknetNodeConstants);\n },\n },\n hacknetServers: {\n hashGainRate: function (\n _level: unknown,\n _ramUsed: unknown,\n _maxRam: unknown,\n _cores: unknown,\n _mult: unknown = 1,\n ): number {\n const level = helper.number(\"hashGainRate\", \"level\", _level);\n const ramUsed = helper.number(\"hashGainRate\", \"ramUsed\", _ramUsed);\n const maxRam = helper.number(\"hashGainRate\", \"maxRam\", _maxRam);\n const cores = helper.number(\"hashGainRate\", \"cores\", _cores);\n const mult = helper.number(\"hashGainRate\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetServers.hashGainRate\");\n return HScalculateHashGainRate(level, ramUsed, maxRam, cores, mult);\n },\n levelUpgradeCost: function (_startingLevel: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingLevel = helper.number(\"levelUpgradeCost\", \"startingLevel\", _startingLevel);\n const extraLevels = helper.number(\"levelUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"levelUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.levelUpgradeCost\");\n return HScalculateLevelUpgradeCost(startingLevel, extraLevels, costMult);\n },\n ramUpgradeCost: function (_startingRam: unknown, _extraLevels: unknown = 1, _costMult: unknown = 1): number {\n const startingRam = helper.number(\"ramUpgradeCost\", \"startingRam\", _startingRam);\n const extraLevels = helper.number(\"ramUpgradeCost\", \"extraLevels\", _extraLevels);\n const costMult = helper.number(\"ramUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.ramUpgradeCost\");\n return HScalculateRamUpgradeCost(startingRam, extraLevels, costMult);\n },\n coreUpgradeCost: function (_startingCore: unknown, _extraCores: unknown = 1, _costMult: unknown = 1): number {\n const startingCore = helper.number(\"coreUpgradeCost\", \"startingCore\", _startingCore);\n const extraCores = helper.number(\"coreUpgradeCost\", \"extraCores\", _extraCores);\n const costMult = helper.number(\"coreUpgradeCost\", \"costMult\", _costMult);\n checkFormulasAccess(\"hacknetServers.coreUpgradeCost\");\n return HScalculateCoreUpgradeCost(startingCore, extraCores, costMult);\n },\n cacheUpgradeCost: function (_startingCache: unknown, _extraCache: unknown = 1): number {\n const startingCache = helper.number(\"cacheUpgradeCost\", \"startingCache\", _startingCache);\n const extraCache = helper.number(\"cacheUpgradeCost\", \"extraCache\", _extraCache);\n checkFormulasAccess(\"hacknetServers.cacheUpgradeCost\");\n return HScalculateCacheUpgradeCost(startingCache, extraCache);\n },\n hashUpgradeCost: function (_upgName: unknown, _level: unknown): number {\n const upgName = helper.string(\"hashUpgradeCost\", \"upgName\", _upgName);\n const level = helper.number(\"hashUpgradeCost\", \"level\", _level);\n checkFormulasAccess(\"hacknetServers.hashUpgradeCost\");\n const upg = player.hashManager.getUpgrade(upgName);\n if (!upg) {\n throw helper.makeRuntimeErrorMsg(\n \"formulas.hacknetServers.calculateHashUpgradeCost\",\n `Invalid Hash Upgrade: ${upgName}`,\n );\n }\n return upg.getCost(level);\n },\n hacknetServerCost: function (_n: unknown, _mult: unknown = 1): number {\n const n = helper.number(\"hacknetServerCost\", \"n\", _n);\n const mult = helper.number(\"hacknetServerCost\", \"mult\", _mult);\n checkFormulasAccess(\"hacknetServers.hacknetServerCost\");\n return HScalculateServerCost(n, mult);\n },\n constants: function (): any {\n checkFormulasAccess(\"hacknetServers.constants\");\n return Object.assign({}, HacknetServerConstants);\n },\n },\n gang: {\n wantedPenalty(gang: any): number {\n checkFormulasAccess(\"gang.wantedPenalty\");\n return calculateWantedPenalty(gang);\n },\n respectGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.respectGain\");\n return calculateRespectGain(gang, member, task);\n },\n wantedLevelGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.wantedLevelGain\");\n return calculateWantedLevelGain(gang, member, task);\n },\n moneyGain: function (gang: any, member: any, task: any): number {\n checkFormulasAccess(\"gang.moneyGain\");\n return calculateMoneyGain(gang, member, task);\n },\n ascensionPointsGain: function (_exp: unknown): number {\n const exp = helper.number(\"ascensionPointsGain\", \"exp\", _exp);\n checkFormulasAccess(\"gang.ascensionPointsGain\");\n return calculateAscensionPointsGain(exp);\n },\n ascensionMultiplier: function (_points: unknown): number {\n const points = helper.number(\"ascensionMultiplier\", \"points\", _points);\n checkFormulasAccess(\"gang.ascensionMultiplier\");\n return calculateAscensionMult(points);\n },\n },\n };\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { buyStock, sellStock, shortStock, sellShort } from \"../StockMarket/BuyingAndSelling\";\nimport { StockMarket, SymbolToStockMap, placeOrder, cancelOrder } from \"../StockMarket/StockMarket\";\nimport { getBuyTransactionCost, getSellTransactionGain } from \"../StockMarket/StockMarketHelpers\";\nimport { OrderTypes } from \"../StockMarket/data/OrderTypes\";\nimport { PositionTypes } from \"../StockMarket/data/PositionTypes\";\nimport { StockSymbols } from \"../StockMarket/data/StockSymbols\";\nimport {\n getStockMarket4SDataCost,\n getStockMarket4STixApiCost,\n getStockMarketWseCost,\n getStockMarketTixApiCost,\n} from \"../StockMarket/StockMarketCosts\";\nimport { Stock } from \"../StockMarket/Stock\";\nimport { TIX } from \"../ScriptEditor/NetscriptDefinitions\";\n\nexport function NetscriptStockMarket(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): TIX {\n /**\n * Checks if the player has TIX API access. Throws an error if the player does not\n */\n const checkTixApiAccess = function (callingFn: string): void {\n if (!player.hasWseAccount) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have WSE Access! Cannot use ${callingFn}()`);\n }\n if (!player.hasTixApiAccess) {\n throw helper.makeRuntimeErrorMsg(callingFn, `You don't have TIX API Access! Cannot use ${callingFn}()`);\n }\n };\n\n const getStockFromSymbol = function (symbol: string, callingFn: string): Stock {\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(callingFn, `Invalid stock symbol: '${symbol}'`);\n }\n\n return stock;\n };\n return {\n getSymbols: function (): string[] {\n helper.updateDynamicRam(\"getSymbols\", getRamCost(player, \"stock\", \"getSymbols\"));\n checkTixApiAccess(\"getSymbols\");\n return Object.values(StockSymbols);\n },\n getPrice: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getPrice\", getRamCost(player, \"stock\", \"getPrice\"));\n const symbol = helper.string(\"getPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getPrice\");\n const stock = getStockFromSymbol(symbol, \"getPrice\");\n\n return stock.price;\n },\n getAskPrice: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getAskPrice\", getRamCost(player, \"stock\", \"getAskPrice\"));\n const symbol = helper.string(\"getAskPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getAskPrice\");\n const stock = getStockFromSymbol(symbol, \"getAskPrice\");\n\n return stock.getAskPrice();\n },\n getBidPrice: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getBidPrice\", getRamCost(player, \"stock\", \"getBidPrice\"));\n const symbol = helper.string(\"getBidPrice\", \"symbol\", _symbol);\n checkTixApiAccess(\"getBidPrice\");\n const stock = getStockFromSymbol(symbol, \"getBidPrice\");\n\n return stock.getBidPrice();\n },\n getPosition: function (_symbol: unknown): [number, number, number, number] {\n helper.updateDynamicRam(\"getPosition\", getRamCost(player, \"stock\", \"getPosition\"));\n const symbol = helper.string(\"getPosition\", \"symbol\", _symbol);\n checkTixApiAccess(\"getPosition\");\n const stock = SymbolToStockMap[symbol];\n if (stock == null) {\n throw helper.makeRuntimeErrorMsg(\"getPosition\", `Invalid stock symbol: ${symbol}`);\n }\n return [stock.playerShares, stock.playerAvgPx, stock.playerShortShares, stock.playerAvgShortPx];\n },\n getMaxShares: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getMaxShares\", getRamCost(player, \"stock\", \"getMaxShares\"));\n const symbol = helper.string(\"getMaxShares\", \"symbol\", _symbol);\n checkTixApiAccess(\"getMaxShares\");\n const stock = getStockFromSymbol(symbol, \"getMaxShares\");\n\n return stock.maxShares;\n },\n getPurchaseCost: function (_symbol: unknown, _shares: unknown, _posType: unknown): number {\n helper.updateDynamicRam(\"getPurchaseCost\", getRamCost(player, \"stock\", \"getPurchaseCost\"));\n const symbol = helper.string(\"getPurchaseCost\", \"symbol\", _symbol);\n let shares = helper.number(\"getPurchaseCost\", \"shares\", _shares);\n const posType = helper.string(\"getPurchaseCost\", \"posType\", _posType);\n checkTixApiAccess(\"getPurchaseCost\");\n const stock = getStockFromSymbol(symbol, \"getPurchaseCost\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return Infinity;\n }\n\n const res = getBuyTransactionCost(stock, shares, pos);\n if (res == null) {\n return Infinity;\n }\n\n return res;\n },\n getSaleGain: function (_symbol: unknown, _shares: unknown, _posType: unknown): number {\n helper.updateDynamicRam(\"getSaleGain\", getRamCost(player, \"stock\", \"getSaleGain\"));\n const symbol = helper.string(\"getSaleGain\", \"symbol\", _symbol);\n let shares = helper.number(\"getSaleGain\", \"shares\", _shares);\n const posType = helper.string(\"getSaleGain\", \"posType\", _posType);\n checkTixApiAccess(\"getSaleGain\");\n const stock = getStockFromSymbol(symbol, \"getSaleGain\");\n shares = Math.round(shares);\n\n let pos;\n const sanitizedPosType = posType.toLowerCase();\n if (sanitizedPosType.includes(\"l\")) {\n pos = PositionTypes.Long;\n } else if (sanitizedPosType.includes(\"s\")) {\n pos = PositionTypes.Short;\n } else {\n return 0;\n }\n\n const res = getSellTransactionGain(stock, shares, pos);\n if (res == null) {\n return 0;\n }\n\n return res;\n },\n buy: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"buy\", getRamCost(player, \"stock\", \"buy\"));\n const symbol = helper.string(\"buy\", \"symbol\", _symbol);\n const shares = helper.number(\"buy\", \"shares\", _shares);\n checkTixApiAccess(\"buy\");\n const stock = getStockFromSymbol(symbol, \"buy\");\n const res = buyStock(stock, shares, workerScript, {});\n return res ? stock.getAskPrice() : 0;\n },\n sell: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"sell\", getRamCost(player, \"stock\", \"sell\"));\n const symbol = helper.string(\"sell\", \"symbol\", _symbol);\n const shares = helper.number(\"sell\", \"shares\", _shares);\n checkTixApiAccess(\"sell\");\n const stock = getStockFromSymbol(symbol, \"sell\");\n const res = sellStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n short: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"short\", getRamCost(player, \"stock\", \"short\"));\n const symbol = helper.string(\"short\", \"symbol\", _symbol);\n const shares = helper.number(\"short\", \"shares\", _shares);\n checkTixApiAccess(\"short\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"short\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 2.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"short\");\n const res = shortStock(stock, shares, workerScript, {});\n\n return res ? stock.getBidPrice() : 0;\n },\n sellShort: function (_symbol: unknown, _shares: unknown): number {\n helper.updateDynamicRam(\"sellShort\", getRamCost(player, \"stock\", \"sellShort\"));\n const symbol = helper.string(\"sellShort\", \"symbol\", _symbol);\n const shares = helper.number(\"sellShort\", \"shares\", _shares);\n checkTixApiAccess(\"sellShort\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 1) {\n throw helper.makeRuntimeErrorMsg(\n \"sellShort\",\n \"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 = sellShort(stock, shares, workerScript, {});\n\n return res ? stock.getAskPrice() : 0;\n },\n placeOrder: function (_symbol: unknown, _shares: unknown, _price: unknown, _type: unknown, _pos: unknown): boolean {\n helper.updateDynamicRam(\"placeOrder\", getRamCost(player, \"stock\", \"placeOrder\"));\n const symbol = helper.string(\"placeOrder\", \"symbol\", _symbol);\n const shares = helper.number(\"placeOrder\", \"shares\", _shares);\n const price = helper.number(\"placeOrder\", \"price\", _price);\n const type = helper.string(\"placeOrder\", \"type\", _type);\n const pos = helper.string(\"placeOrder\", \"pos\", _pos);\n checkTixApiAccess(\"placeOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"placeOrder\",\n \"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\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"placeOrder\", `Invalid position type: ${pos}`);\n }\n\n return placeOrder(stock, shares, price, orderType, orderPos, workerScript);\n },\n cancelOrder: function (\n _symbol: unknown,\n _shares: unknown,\n _price: unknown,\n _type: unknown,\n _pos: unknown,\n ): boolean {\n helper.updateDynamicRam(\"cancelOrder\", getRamCost(player, \"stock\", \"cancelOrder\"));\n const symbol = helper.string(\"cancelOrder\", \"symbol\", _symbol);\n const shares = helper.number(\"cancelOrder\", \"shares\", _shares);\n const price = helper.number(\"cancelOrder\", \"price\", _price);\n const type = helper.string(\"cancelOrder\", \"type\", _type);\n const pos = helper.string(\"cancelOrder\", \"pos\", _pos);\n checkTixApiAccess(\"cancelOrder\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n \"You must either be in BitNode-8 or you must have Source-File 8 Level 3.\",\n );\n }\n }\n const stock = getStockFromSymbol(symbol, \"cancelOrder\");\n if (isNaN(shares) || isNaN(price)) {\n throw helper.makeRuntimeErrorMsg(\n \"cancelOrder\",\n `Invalid shares or price. Must be numeric. shares=${shares}, price=${price}`,\n );\n }\n let orderType;\n let orderPos;\n const ltype = type.toLowerCase();\n if (ltype.includes(\"limit\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.LimitBuy;\n } else if (ltype.includes(\"limit\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.LimitSell;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"buy\")) {\n orderType = OrderTypes.StopBuy;\n } else if (ltype.includes(\"stop\") && ltype.includes(\"sell\")) {\n orderType = OrderTypes.StopSell;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid order type: ${type}`);\n }\n\n const lpos = pos.toLowerCase();\n if (lpos.includes(\"l\")) {\n orderPos = PositionTypes.Long;\n } else if (lpos.includes(\"s\")) {\n orderPos = PositionTypes.Short;\n } else {\n throw helper.makeRuntimeErrorMsg(\"cancelOrder\", `Invalid position type: ${pos}`);\n }\n const params = {\n stock: stock,\n shares: shares,\n price: price,\n type: orderType,\n pos: orderPos,\n };\n return cancelOrder(params, workerScript);\n },\n getOrders: function (): any {\n helper.updateDynamicRam(\"getOrders\", getRamCost(player, \"stock\", \"getOrders\"));\n checkTixApiAccess(\"getOrders\");\n if (player.bitNodeN !== 8) {\n if (player.sourceFileLvl(8) <= 2) {\n throw helper.makeRuntimeErrorMsg(\n \"getOrders\",\n \"You must either be in BitNode-8 or have Source-File 8 Level 3.\",\n );\n }\n }\n\n const orders: any = {};\n\n const stockMarketOrders = StockMarket[\"Orders\"];\n for (const symbol of Object.keys(stockMarketOrders)) {\n const orderBook = stockMarketOrders[symbol];\n if (orderBook.constructor === Array && orderBook.length > 0) {\n orders[symbol] = [];\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 getVolatility: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getVolatility\", getRamCost(player, \"stock\", \"getVolatility\"));\n const symbol = helper.string(\"getVolatility\", \"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getVolatility\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getVolatility\");\n\n return stock.mv / 100; // Convert from percentage to decimal\n },\n getForecast: function (_symbol: unknown): number {\n helper.updateDynamicRam(\"getForecast\", getRamCost(player, \"stock\", \"getForecast\"));\n const symbol = helper.string(\"getForecast\", \"symbol\", _symbol);\n if (!player.has4SDataTixApi) {\n throw helper.makeRuntimeErrorMsg(\"getForecast\", \"You don't have 4S Market Data TIX API Access!\");\n }\n const stock = getStockFromSymbol(symbol, \"getForecast\");\n\n let forecast = 50;\n stock.b ? (forecast += stock.otlkMag) : (forecast -= stock.otlkMag);\n return forecast / 100; // Convert from percentage to decimal\n },\n purchase4SMarketData: function (): boolean {\n helper.updateDynamicRam(\"purchase4SMarketData\", getRamCost(player, \"stock\", \"purchase4SMarketData\"));\n checkTixApiAccess(\"purchase4SMarketData\");\n\n if (player.has4SData) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Already purchased 4S Market Data.\");\n return true;\n }\n\n if (player.money < getStockMarket4SDataCost()) {\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Not enough money to purchase 4S Market Data.\");\n return false;\n }\n\n player.has4SData = true;\n player.loseMoney(getStockMarket4SDataCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketData\", () => \"Purchased 4S Market Data\");\n return true;\n },\n purchase4SMarketDataTixApi: function (): boolean {\n helper.updateDynamicRam(\"purchase4SMarketDataTixApi\", getRamCost(player, \"stock\", \"purchase4SMarketDataTixApi\"));\n checkTixApiAccess(\"purchase4SMarketDataTixApi\");\n\n if (player.has4SDataTixApi) {\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Already purchased 4S Market Data TIX API\");\n return true;\n }\n\n if (player.money < getStockMarket4STixApiCost()) {\n workerScript.log(\n \"stock.purchase4SMarketDataTixApi\",\n () => \"Not enough money to purchase 4S Market Data TIX API\",\n );\n return false;\n }\n\n player.has4SDataTixApi = true;\n player.loseMoney(getStockMarket4STixApiCost(), \"stock\");\n workerScript.log(\"stock.purchase4SMarketDataTixApi\", () => \"Purchased 4S Market Data TIX API\");\n return true;\n },\n purchaseWseAccount: function (): boolean {\n helper.updateDynamicRam(\"PurchaseWseAccount\", getRamCost(player, \"stock\", \"purchaseWseAccount\"));\n\n if (player.hasWseAccount) {\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Already purchased WSE Account\");\n return true;\n }\n\n if (player.money < getStockMarketWseCost()) {\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Not enough money to purchase WSE Account Access\");\n return false;\n }\n\n player.hasWseAccount = true;\n player.loseMoney(getStockMarketWseCost(), \"stock\");\n workerScript.log(\"stock.purchaseWseAccount\", () => \"Purchased WSE Account Access\");\n return true;\n },\n purchaseTixApi: function (): boolean {\n helper.updateDynamicRam(\"purchaseTixApi\", getRamCost(player, \"stock\", \"purchaseTixApi\"));\n\n if (player.hasTixApiAccess) {\n workerScript.log(\"stock.purchaseTixApi\", () => \"Already purchased TIX API\");\n return true;\n }\n\n if (player.money < getStockMarketTixApiCost()) {\n workerScript.log(\"stock.purchaseTixApi\", () => \"Not enough money to purchase TIX API Access\");\n return false;\n }\n\n player.hasTixApiAccess = true;\n player.loseMoney(getStockMarketTixApiCost(), \"stock\");\n workerScript.log(\"stock.purchaseTixApi\", () => \"Purchased TIX API\");\n return true;\n },\n };\n}\n","import { Augmentations } from \"../Augmentation/Augmentations\";\nimport { hasAugmentationPrereqs } from \"../Faction/FactionHelpers\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { GraftableAugmentation } from \"../PersonObjects/Grafting/GraftableAugmentation\";\nimport { getAvailableAugs } from \"../PersonObjects/Grafting/ui/GraftingRoot\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { Grafting as IGrafting } from \"../ScriptEditor/NetscriptDefinitions\";\nimport { Router } from \"../ui/GameRoot\";\nimport { INetscriptHelper } from \"./INetscriptHelper\";\n\nexport function NetscriptGrafting(player: IPlayer, workerScript: WorkerScript, helper: INetscriptHelper): IGrafting {\n const checkGraftingAPIAccess = (func: string): void => {\n if (!player.canAccessGrafting()) {\n throw helper.makeRuntimeErrorMsg(\n `grafting.${func}`,\n \"You do not currently have access to the Grafting API. This is either because you are not in BitNode 10 or because you do not have Source-File 10\",\n );\n }\n };\n\n return {\n getAugmentationGraftPrice: (_augName: unknown): number => {\n const augName = helper.string(\"getAugmentationGraftPrice\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationGraftPrice\", getRamCost(player, \"grafting\", \"getAugmentationGraftPrice\"));\n checkGraftingAPIAccess(\"getAugmentationGraftPrice\");\n if (!Augmentations.hasOwnProperty(augName)) {\n throw helper.makeRuntimeErrorMsg(\"grafting.getAugmentationGraftPrice\", `Invalid aug: ${augName}`);\n }\n const craftableAug = new GraftableAugmentation(Augmentations[augName]);\n return craftableAug.cost;\n },\n\n getAugmentationGraftTime: (_augName: string): number => {\n const augName = helper.string(\"getAugmentationGraftTime\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationGraftTime\", getRamCost(player, \"grafting\", \"getAugmentationGraftTime\"));\n checkGraftingAPIAccess(\"getAugmentationGraftTime\");\n if (!Augmentations.hasOwnProperty(augName)) {\n throw helper.makeRuntimeErrorMsg(\"grafting.getAugmentationGraftTime\", `Invalid aug: ${augName}`);\n }\n const craftableAug = new GraftableAugmentation(Augmentations[augName]);\n return craftableAug.time;\n },\n\n graftAugmentation: (_augName: string, _focus: unknown = true): boolean => {\n const augName = helper.string(\"graftAugmentation\", \"augName\", _augName);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"graftAugmentation\", getRamCost(player, \"grafting\", \"graftAugmentation\"));\n checkGraftingAPIAccess(\"graftAugmentation\");\n if (player.city !== CityName.NewTokyo) {\n throw helper.makeRuntimeErrorMsg(\n \"grafting.graftAugmentation\",\n \"You must be in New Tokyo to begin crafting an Augmentation.\",\n );\n }\n if (!getAvailableAugs(player).includes(augName)) {\n workerScript.log(\"grafting.graftAugmentation\", () => `Invalid aug: ${augName}`);\n return false;\n }\n\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"graftAugmentation\", () => txt);\n }\n\n const craftableAug = new GraftableAugmentation(Augmentations[augName]);\n if (player.money < craftableAug.cost) {\n workerScript.log(\"grafting.graftAugmentation\", () => `You don't have enough money to craft ${augName}`);\n return false;\n }\n\n if (!hasAugmentationPrereqs(craftableAug.augmentation)) {\n workerScript.log(\"grafting.graftAugmentation\", () => `You don't have the pre-requisites for ${augName}`);\n return false;\n }\n\n player.loseMoney(craftableAug.cost, \"augmentations\");\n player.startGraftAugmentationWork(augName, craftableAug.time);\n\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n\n workerScript.log(\"grafting.graftAugmentation\", () => `Began crafting Augmentation ${augName}.`);\n return true;\n },\n };\n}\n","/**\n * Metadata for constructing Location objects for all Locations\n * in the game\n */\nimport { CityName } from \"./CityNames\";\nimport { LocationName } from \"./LocationNames\";\nimport { IConstructorParams } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nexport const LocationsMetadata: IConstructorParams[] = [\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.AevumAeroCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 8.19,\n },\n name: LocationName.AevumBachmanAndAssociates,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 9.55,\n },\n name: LocationName.AevumClarkeIncorporated,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 3,\n expMult: 2,\n name: LocationName.AevumCrushFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 37,\n startingSecurityLevel: 17.02,\n },\n name: LocationName.AevumECorp,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 15.54,\n },\n name: LocationName.AevumFulcrumTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 256,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 7.89,\n },\n name: LocationName.AevumGalacticCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 3.29,\n },\n name: LocationName.AevumNetLinkTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 64,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 6,\n startingSecurityLevel: 5.35,\n },\n name: LocationName.AevumPolice,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.AevumRhoConstruction,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n costMult: 10,\n expMult: 5,\n name: LocationName.AevumSnapFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Aevum,\n costMult: 4,\n expMult: 3,\n name: LocationName.AevumSummitUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Aevum,\n infiltrationData: {\n maxClearanceLevel: 7,\n startingSecurityLevel: 5.85,\n },\n name: LocationName.AevumWatchdogSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Aevum,\n name: LocationName.AevumCasino,\n types: [LocationType.Casino],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 16.25,\n },\n name: LocationName.ChongqingKuaiGongInternational,\n types: [LocationType.Company],\n },\n {\n city: CityName.Chongqing,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 12.59,\n },\n name: LocationName.ChongqingSolarisSpaceSystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.02,\n },\n name: LocationName.IshimaNovaMedical,\n types: [LocationType.Company],\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.2,\n },\n name: LocationName.IshimaOmegaSoftware,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 128,\n techVendorMinRam: 4,\n },\n {\n city: CityName.Ishima,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.38,\n },\n name: LocationName.IshimaStormTechnologies,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 512,\n techVendorMinRam: 32,\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 7.18,\n },\n name: LocationName.NewTokyoDefComm,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 20,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.NewTokyoGlobalPharmaceuticals,\n types: [LocationType.Company],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 2.5,\n },\n name: LocationName.NewTokyoNoodleBar,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 5.52,\n },\n name: LocationName.NewTokyoVitaLife,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.NewTokyo,\n name: LocationName.NewTokyoArcade,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 10,\n startingSecurityLevel: 3.62,\n },\n name: LocationName.Sector12AlphaEnterprises,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 8,\n techVendorMinRam: 2,\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 10.59,\n },\n name: LocationName.Sector12BladeIndustries,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CIA,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.66,\n },\n name: LocationName.Sector12CarmichaelSecurity,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12CityHall,\n types: [LocationType.Special],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12DeltaOne,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12FoodNStuff,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 8.18,\n },\n name: LocationName.Sector12FourSigma,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 17,\n startingSecurityLevel: 6.02,\n },\n name: LocationName.Sector12IcarusMicrosystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n expMult: 1,\n costMult: 1,\n name: LocationName.Sector12IronGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 5,\n startingSecurityLevel: 3.13,\n },\n name: LocationName.Sector12JoesGuns,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 31,\n startingSecurityLevel: 16.36,\n },\n name: LocationName.Sector12MegaCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Sector12,\n name: LocationName.Sector12NSA,\n types: [LocationType.Company, LocationType.Special],\n },\n {\n city: CityName.Sector12,\n costMult: 20,\n expMult: 10,\n name: LocationName.Sector12PowerhouseGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Sector12,\n costMult: 3,\n expMult: 2,\n name: LocationName.Sector12RothmanUniversity,\n types: [LocationType.University],\n },\n {\n city: CityName.Sector12,\n infiltrationData: {\n maxClearanceLevel: 12,\n startingSecurityLevel: 5.9,\n },\n name: LocationName.Sector12UniversalEnergy,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 3.59,\n },\n name: LocationName.VolhavenCompuTek,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 256,\n techVendorMinRam: 8,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 7.28,\n },\n name: LocationName.VolhavenHeliosLabs,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 15,\n startingSecurityLevel: 4.35,\n },\n name: LocationName.VolhavenLexoCorp,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 7,\n expMult: 4,\n name: LocationName.VolhavenMilleniumFitnessGym,\n types: [LocationType.Gym],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 50,\n startingSecurityLevel: 8.53,\n },\n name: LocationName.VolhavenNWO,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 25,\n startingSecurityLevel: 7.74,\n },\n name: LocationName.VolhavenOmniTekIncorporated,\n types: [LocationType.Company, LocationType.TechVendor],\n techVendorMaxRam: 1024,\n techVendorMinRam: 128,\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 22,\n startingSecurityLevel: 6,\n },\n name: LocationName.VolhavenOmniaCybersystems,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n infiltrationData: {\n maxClearanceLevel: 18,\n startingSecurityLevel: 4.77,\n },\n name: LocationName.VolhavenSysCoreSecurities,\n types: [LocationType.Company],\n },\n {\n city: CityName.Volhaven,\n costMult: 5,\n expMult: 4,\n name: LocationName.VolhavenZBInstituteOfTechnology,\n types: [LocationType.University],\n },\n {\n city: null,\n name: LocationName.Hospital,\n types: [LocationType.Hospital],\n },\n {\n city: null,\n name: LocationName.Slums,\n types: [LocationType.Slums],\n },\n {\n city: null,\n name: LocationName.TravelAgency,\n types: [LocationType.TravelAgency],\n },\n {\n city: null,\n name: LocationName.WorldStockExchange,\n types: [LocationType.StockMarket],\n },\n {\n city: CityName.Chongqing,\n name: LocationName.ChongqingChurchOfTheMachineGod,\n types: [LocationType.Special],\n },\n {\n city: CityName.Ishima,\n name: LocationName.IshimaGlitch,\n types: [LocationType.Special],\n },\n];\n","import { Player } from \"../Player\";\nimport { Script } from \"../Script/Script\";\nimport { GetAllServers } from \"../Server/AllServers\";\n\nconst detect: [string, string][] = [\n [\"getHackTime\", \"returns milliseconds\"],\n [\"getGrowTime\", \"returns milliseconds\"],\n [\"getWeakenTime\", \"returns milliseconds\"],\n [\"getActionTime\", \"returns milliseconds\"],\n [\"hackAnalyzePercent\", \"renamed 'hackAnalyze' and returns decimal\"],\n [\"hackChance\", \"renamed 'hackAnalyzeChance'\"],\n [\"basic.calculateSkill\", \"renamed 'skills.calculateSkill'\"],\n [\"basic.calculateExp\", \"renamed 'skills.calculateExp'\"],\n [\"basic.hackChance\", \"renamed 'hacking.hackChance'\"],\n [\"basic.hackExp\", \"renamed 'hacking.hackExp'\"],\n [\"basic.hackPercent\", \"renamed 'hacking.hackPercent'\"],\n [\"basic.growPercent\", \"renamed 'hacking.growPercent'\"],\n [\"basic.hackTime\", \"renamed 'hacking.hackTime'\"],\n [\"basic.growTime\", \"renamed 'hacking.growTime'\"],\n [\"basic.weakenTime\", \"renamed 'hacking.weakenTime'\"],\n [\"write\", \"needs to be awaited\"],\n [\"scp\", \"needs to be awaited\"],\n [\"sleep\", \"Can no longer be called simultenaously.\"],\n [\"hacking_skill\", \"renamed 'hacking'\"],\n [\"tryWrite\", \"renamed 'tryWritePort'\"],\n];\n\nconst changes: [RegExp, string][] = [\n [/ns.getHackTime/g, \"((...a)=>ns.getHackTime(...a)/1000)\"],\n [/ns.getGrowTime/g, \"((...a)=>ns.getGrowTime(...a)/1000)\"],\n [/ns.getWeakenTime/g, \"((...a)=>ns.getWeakenTime(...a)/1000)\"],\n [/ns.bladeburner.getActionTime/g, \"((...a)=>ns.bladeburner.getActionTime(...a)/1000)\"],\n [/ns.hackAnalyzePercent/g, \"((...a)=>ns.hackAnalyze(...a)*100)\"],\n [/ns.hackChance/g, \"ns.hackAnalyzeChance\"],\n [/ns.tryWrite/g, \"ns.tryWritePort\"],\n [/formulas.basic.calculateSkill/g, \"formulas.skills.calculateSkill\"],\n [/formulas.basic.calculateExp/g, \"formulas.skills.calculateExp\"],\n [/formulas.basic.hackChance/g, \"formulas.hacking.hackChance\"],\n [/formulas.basic.hackExp/g, \"formulas.hacking.hackExp\"],\n [/formulas.basic.hackPercent/g, \"formulas.hacking.hackPercent\"],\n [/formulas.basic.growPercent/g, \"formulas.hacking.growPercent\"],\n [/formulas.basic.hackTime/g, \"formulas.hacking.hackTime\"],\n [/formulas.basic.growTime/g, \"formulas.hacking.growTime\"],\n [/formulas.basic.weakenTime/g, \"formulas.hacking.weakenTime\"],\n];\nfunction hasChanges(code: string): boolean {\n for (const change of changes) {\n if (code.match(change[0])) return true;\n }\n return false;\n}\n\nfunction convert(code: string): string {\n const lines = code.split(\"\\n\");\n const out: string[] = [];\n for (let i = 0; i < lines.length; i++) {\n const orig = lines[i];\n let line = lines[i];\n for (const change of changes) {\n line = line.replace(change[0], change[1]);\n }\n if (line != orig) {\n out.push(`// =============================== original line ===============================`);\n out.push(`/**`);\n out.push(` * ${orig}`);\n out.push(\" */\");\n out.push(`// =============================================================================`);\n }\n out.push(line);\n }\n return out.join(\"\\n\");\n}\n\nexport function v1APIBreak(): void {\n interface IFileLine {\n file: string;\n line: number;\n }\n let txt = \"\";\n for (const server of GetAllServers()) {\n for (const change of detect) {\n const s: IFileLine[] = [];\n for (const script of server.scripts) {\n const lines = script.code.split(\"\\n\");\n for (let i = 0; i < lines.length; i++) {\n if (lines[i].includes(change[0])) {\n s.push({\n file: script.filename,\n line: i + 1,\n });\n }\n }\n }\n\n if (s.length === 0) continue;\n\n txt += `// Detected change ${change[0]}, reason: ${change[1]}\\n`;\n for (const fl of s) {\n txt += `${fl.file}:${fl.line}\\n`;\n }\n }\n }\n if (txt !== \"\") {\n const home = Player.getHomeComputer();\n home.writeToTextFile(\"v1_DETECTED_CHANGES.txt\", txt);\n }\n\n for (const server of GetAllServers()) {\n const backups: Script[] = [];\n for (const script of server.scripts) {\n if (!hasChanges(script.code)) continue;\n const prefix = script.filename.includes(\"/\") ? \"/BACKUP_\" : \"BACKUP_\";\n backups.push(new Script(Player, prefix + script.filename, script.code, script.server));\n script.code = convert(script.code);\n }\n server.scripts = server.scripts.concat(backups);\n }\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport Paper from \"@mui/material/Paper\";\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Button from \"@mui/material/Button\";\nimport ArrowForwardIos from \"@mui/icons-material/ArrowForwardIos\";\nimport ArrowBackIos from \"@mui/icons-material/ArrowBackIos\";\nimport { ITutorialEvents } from \"./ITutorialEvents\";\nimport { CopyableText } from \"../React/CopyableText\";\n\nimport ListItem from \"@mui/material/ListItem\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\";\nimport StorageIcon from \"@mui/icons-material/Storage\";\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\nimport {\n iTutorialPrevStep,\n iTutorialNextStep,\n ITutorial,\n iTutorialSteps,\n iTutorialEnd,\n} from \"../../InteractiveTutorial\";\n\ninterface IContent {\n content: React.ReactElement;\n canNext: boolean;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n borderBottom: \"1px solid \" + theme.palette.primary.main,\n },\n code: {\n whiteSpace: \"pre\",\n backgroundColor: theme.palette.background.paper,\n },\n }),\n);\n\nexport function InteractiveTutorialRoot(): React.ReactElement {\n const classes = useStyles();\n\n const contents: { [number: string]: IContent | undefined } = {\n [iTutorialSteps.Start as number]: {\n content: (\n <>\n \n Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian\n future... The year is 2077...\n
    \n
    \n This tutorial will show you the basics of the game. You may skip the tutorial at any time.\n
    \n
    \n You can also collapse this panel to temporarily hide this tutorial.\n
    \n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToCharacterPage as number]: {\n content: (\n <>\n Let's start by heading to the Stats page. Click\n \n \n Stats\n \n\n on the main navigation menu (left-hand side of the screen)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.CharacterPage as number]: {\n content: (\n <>\n \n \n Stats\n \n \n shows a lot of important information about your progress, such as your skills, money, and bonuses.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.CharacterGoToTerminalPage as number]: {\n content: (\n <>\n Let's head to your computer's terminal by clicking\n \n \n Terminal\n \n on the main navigation menu.\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalIntro as number]: {\n content: (\n <>\n \n \n Terminal\n \n \n is used to interface with your home computer as well as all of the other machines around the world.\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHelp as number]: {\n content: (\n <>\n Let's try it out. Start by entering\n {\"[home ~/]> help\"}\n (Don't forget to press Enter after typing the command)\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalLs as number]: {\n content: (\n <>\n {\"[home ~/]> help\"}\n \n displays a list of all available Terminal commands, how to use them, and a description of what they do.{\" \"}\n
    \n
    \n Let's try another command. Enter\n
    \n\n {\"[home ~/]> ls\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScan as number]: {\n content: (\n <>\n {\"[home ~/]> ls\"}\n \n {\" \"}\n is a basic command that shows files on the computer. Right now, it shows that you have a program called{\" \"}\n NUKE.exe on your computer. We'll get to what this does later.
    \n
    \n Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that\n now by first entering\n
    \n {\"[home ~/]> scan\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze1 as number]: {\n content: (\n <>\n {\"[home ~/]> scan\"}\n \n shows all available network connections. In other words, it displays a list of all servers that can be\n connected to from your current machine. A server is identified by its hostname.
    \n
    \n That's great and all, but there's so many servers. Which one should you go to?{\" \"}\n
    \n\n {\"[home ~/]> scan-analyze\"}\n gives some more detailed information about servers on the network. Try it now!\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalScanAnalyze2 as number]: {\n content: (\n <>\n {\"[home ~/]> scan-analyze\"}\n \n shows more detailed information about each server that you can connect to (servers that are a distance of\n one node away).
    \n
    It is also possible to run scan-analyze with a higher depth. Let's try a depth of two with the\n following command:{\" \"}\n
    \n\n {\"[home ~/]> scan-analyze 2\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalConnect as number]: {\n content: (\n <>\n \n Now you can see information about all servers that are up to two nodes away, as well as figure out how to\n navigate to those servers through the network. You can only connect to a server that is one node away. To\n connect to a machine, use\n \n {\"[home ~/]> connect hostname\"}\n\n From the results of \n {\"[home ~/]> scan-analyze 2\"}\n\n \n {\" \"}\n we can see that the n00dles server is only one node away. Let's connect to it now using:\n \n\n {\"[home ~/]> connect n00dles\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalAnalyze as number]: {\n content: (\n <>\n \n You are now connected to another machine! What can you do now? You can hack it!\n
    \n
    In the year 2077, currency has become digital and decentralized. People and corporations store their\n money on servers and computers. Using your hacking abilities, you can hack servers to steal money and gain\n experience.
    \n
    \n Before you try to hack a server, you should run diagnostics using{\" \"}\n
    \n {\"[n00dles ~/]> analyze\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalNuke as number]: {\n content: (\n <>\n When \n {\"[n00dles ~/]> analyze\"}\n\n \n finishes running it will show useful information about hacking the server.
    \n
    For this server, the required hacking skill is only 1, which means you can hack it right now.\n However, in order to hack a server you must first gain root access. The NUKE.exe program that we saw earlier\n on your home computer is a virus that will grant you root access to a machine if there are enough open\n ports.\n
    \n {\"[n00dles ~/]> analyze\"}\n\n \n {\" \"}\n shows that there do not need to be any open ports on this machine for the NUKE virus to work, so go ahead\n and run the virus using{\" \"}\n \n {\"[n00dles ~/]> run NUKE.exe\"}\n\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalManualHack as number]: {\n content: (\n <>\n You now have root access! You can hack the server using \n {\"[n00dles ~/]> hack\"}\n\n Try doing that now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalHackingMechanics as number]: {\n content: (\n \n You are now attempting to hack the server. Performing a hack takes time and only has a certain percentage\n chance of success. This time and success chance is determined by a variety of factors, including your hacking\n skill and the server's security level.\n
    \n
    \n If your attempt to hack the server is successful, you will steal a certain percentage of the server's total\n money. This percentage is affected by your hacking skill and the server's security level.\n
    \n
    \n The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money,\n then you will encounter diminishing returns in your hacking. You will need to use{\" \"}\n {\"[n00dles ~/]> grow\"}\n which tricks the company into adding money to their server and{\" \"}\n {\"[n00dles ~/]> weaken\"}\n which increases the speed of hack and grow.\n
    \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalGoHome as number]: {\n content: (\n <>\n From any server you can get back home using\n {\"[n00dles ~/]> home\"}\n\n Let's head home before creating our first script!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.TerminalCreateScript as number]: {\n content: (\n <>\n \n Hacking is the core mechanic of the game and is necessary for progressing. However, you don't want to be\n hacking manually the entire time. You can automate your hacking by writing scripts!\n
    \n
    \n To create a new script or edit an existing one, you can use{\" \"}\n
    \n {\"[home ~/]> nano\"}\n\n Scripts must end with the .script extension. Let's make a script now by entering \n {\"[home ~/]> nano n00dles.script\"}\n\n \n after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTypeScript as number]: {\n content: (\n <>\n \n This is the script editor. You can use it to program your scripts. Scripts are written in a simplified\n version of javascript. Copy and paste the following code into the script editor:
    \n
    \n\n \n \n \n \n For anyone with basic programming experience, this code should be straightforward. This script will\n continuously hack the n00dles server.\n
    \n
    \n To save and close the script editor, press the button in the bottom left, or press ctrl + s then ctrl + b.\n
    \n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalFree as number]: {\n content: (\n <>\n \n Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine\n which you have root access to. Different servers have different amounts of RAM. You can also purchase more\n RAM for your home server.\n
    \n
    \n To check how much RAM is available on this machine, enter\n
    \n {\"[home ~/]> free\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalRunScript as number]: {\n content: (\n <>\n \n We have 8GB of free RAM on this machine, which is enough to run our script. Let's run our script using\n \n {\"[home ~/]> run n00dles.script\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalGoToActiveScriptsPage as number]: {\n content: (\n <>\n \n Your script is now running! It will continuously run in the background and will automatically stop if the\n code ever completes (the n00dles.script will never complete because it runs an infinite loop).
    \n
    \n These scripts can passively earn you income and hacking experience. Your scripts will also earn money and\n experience while you are offline, although at a slightly slower rate.
    \n
    \n Let's check out some statistics for our running scripts by clicking{\" \"}\n
    \n \n \n Active Scripts\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsPage as number]: {\n content: (\n <>\n \n This page displays information about all of your scripts that are running across every server. You can use\n this to gauge how well your scripts are doing. Let's go back to\n \n \n \n Terminal\n \n \n ),\n canNext: false,\n },\n [iTutorialSteps.ActiveScriptsToTerminal as number]: {\n content: (\n <>\n \n One last thing about scripts, each active script contains logs that detail what it's doing. We can check\n these logs using the tail command. Do that now for the script we just ran by typing{\" \"}\n \n {\"[home ~/]> tail n00dles.script\"}\n \n ),\n canNext: false,\n },\n [iTutorialSteps.TerminalTailScript as number]: {\n content: (\n <>\n \n The log for this script won't show much right now (it might show nothing at all) because it just started\n running...but check back again in a few minutes!
    \n
    \n This covers the basics of hacking. To learn more about writing scripts, select\n
    \n \n \n Tutorial\n \n \n in the main navigation menu to look at the documentation.\n
    \n
    \n If you know even a little bit of programming it is highly recommended you use NS2 instead. You will enjoy\n the game much more. NS1 files end with .script and are a subset of javascript. NS2 files end with .js and\n are full speed native javascript.\n
    \n
    \n You can learn more about the difference between them later in the documentation.\n
    \n
    \n For now, let's move on to something else!\n
    \n \n ),\n canNext: true,\n },\n [iTutorialSteps.GoToHacknetNodesPage as number]: {\n content: (\n <>\n \n Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and\n upgrading Hacknet Nodes. Let's go to\n \n \n \n Hacknet\n \n through the main navigation menu now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesIntroduction as number]: {\n content: (\n \n Here you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now.\n \n ),\n canNext: true,\n },\n [iTutorialSteps.HacknetNodesGoToWorldPage as number]: {\n content: (\n <>\n \n You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online\n and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.\n
    \n
    \n Let's go to\n
    \n \n \n City\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.WorldDescription as number]: {\n content: (\n <>\n \n This page lists all of the different locations you can currently travel to. Each location has something that\n you can do. There's a lot of content out in the world, make sure you explore and discover!\n
    \n
    \n Lastly, click on\n
    \n \n \n Tutorial\n \n \n ),\n canNext: true,\n },\n [iTutorialSteps.TutorialPageInfo as number]: {\n content: (\n \n This page contains a lot of different documentation about the game's content and mechanics. I know it's a lot,\n but I highly suggest you read (or at least skim) through this before you start playing . That's the end of the\n tutorial. Hope you enjoy the game!\n \n ),\n canNext: true,\n },\n [iTutorialSteps.End as number]: {\n content: ,\n canNext: true,\n },\n };\n\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n return ITutorialEvents.subscribe(rerender);\n }, []);\n const step = ITutorial.currStep;\n const content = contents[step];\n if (content === undefined) throw new Error(\"error in the tutorial\");\n return (\n \n {content.content}\n {step !== iTutorialSteps.TutorialPageInfo && (\n <>\n \n \n \n {content.canNext && (\n \n \n \n )}\n \n )}\n
    \n
    \n \n
    \n );\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport Draggable, { DraggableEventHandler } from \"react-draggable\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Paper from \"@mui/material/Paper\";\nimport KeyboardArrowDownIcon from \"@mui/icons-material/KeyboardArrowDown\";\nimport KeyboardArrowUpIcon from \"@mui/icons-material/KeyboardArrowUp\";\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\";\nimport SchoolIcon from \"@mui/icons-material/School\";\nimport { use } from \"../Context\";\nimport { Page } from \"../Router\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { Box, Button, Typography } from \"@mui/material\";\nimport { debounce } from \"lodash\";\n\nconst useStyles = makeStyles({\n overviewContainer: {\n position: \"fixed\",\n top: 0,\n right: 0,\n zIndex: 1500,\n display: \"flex\",\n justifyContent: \"flex-end\",\n flexDirection: \"column\",\n },\n\n header: {\n cursor: \"grab\",\n textAlign: \"center\",\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n\n visibilityToggle: {\n padding: \"2px\",\n minWidth: \"inherit\",\n backgroundColor: \"transparent\",\n border: \"none\",\n \"&:hover\": {\n backgroundColor: \"rgba(255, 255, 255, 0.1)\",\n },\n },\n\n collapse: {\n borderTop: `1px solid ${Settings.theme.welllight}`,\n margin: \"0 auto\",\n },\n\n icon: {\n fontSize: \"24px\",\n },\n});\n\ninterface IProps {\n children: JSX.Element[] | JSX.Element | React.ReactElement[] | React.ReactElement;\n mode: \"tutorial\" | \"overview\";\n}\n\nexport interface OverviewSettings {\n opened: boolean;\n x: number;\n y: number;\n}\n\nexport function Overview({ children, mode }: IProps): React.ReactElement {\n const draggableRef = useRef(null);\n const [open, setOpen] = useState(Settings.overview.opened);\n const [x, setX] = useState(Settings.overview.x);\n const [y, setY] = useState(Settings.overview.y);\n const classes = useStyles();\n const router = use.Router();\n\n const CurrentIcon = open ? KeyboardArrowUpIcon : KeyboardArrowDownIcon;\n const LeftIcon = mode === \"tutorial\" ? SchoolIcon : EqualizerIcon;\n const header = mode === \"tutorial\" ? \"Tutorial\" : \"Overview\";\n const handleStop: DraggableEventHandler = (e, data) => {\n setX(data.x);\n setY(data.y);\n };\n\n useEffect(() => {\n Settings.overview = { x, y, opened: open };\n }, [open, x, y]);\n\n // Trigger fakeDrag once to make sure loaded data is not outside bounds\n useEffect(() => fakeDrag(), []);\n\n // And trigger fakeDrag when the window is resized\n useEffect(() => {\n window.addEventListener(\"resize\", fakeDrag);\n return () => {\n window.removeEventListener(\"resize\", fakeDrag);\n };\n }, []);\n\n const fakeDrag = debounce((): void => {\n const node = draggableRef?.current;\n if (!node) return;\n\n // No official way to trigger an onChange to recompute the bounds\n // See: https://github.com/react-grid-layout/react-draggable/issues/363#issuecomment-947751127\n triggerMouseEvent(node, \"mouseover\");\n triggerMouseEvent(node, \"mousedown\");\n triggerMouseEvent(document, \"mousemove\");\n triggerMouseEvent(node, \"mouseup\");\n triggerMouseEvent(node, \"click\");\n }, 100);\n\n const triggerMouseEvent = (node: HTMLDivElement | Document, eventType: string): void => {\n const clickEvent = document.createEvent(\"MouseEvents\");\n clickEvent.initEvent(eventType, true, true);\n node.dispatchEvent(clickEvent);\n };\n\n if (router.page() === Page.BitVerse || router.page() === Page.Loading || router.page() === Page.Recovery)\n return <>;\n return (\n \n \n setOpen((old) => !old)} ref={draggableRef}>\n \n \n \n {header}\n \n \n { setOpen((old) => !old)} />}\n \n \n \n \n {children}\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport clsx from \"clsx\";\nimport { styled, Theme, CSSObject } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport MuiDrawer from \"@mui/material/Drawer\";\nimport List from \"@mui/material/List\";\nimport Divider from \"@mui/material/Divider\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport ChevronLeftIcon from \"@mui/icons-material/ChevronLeft\";\nimport ChevronRightIcon from \"@mui/icons-material/ChevronRight\";\nimport ListItem from \"@mui/material/ListItem\";\nimport ListItemIcon from \"@mui/material/ListItemIcon\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Typography from \"@mui/material/Typography\";\nimport Collapse from \"@mui/material/Collapse\";\nimport Badge from \"@mui/material/Badge\";\n\nimport ComputerIcon from \"@mui/icons-material/Computer\";\nimport LastPageIcon from \"@mui/icons-material/LastPage\"; // Terminal\nimport CreateIcon from \"@mui/icons-material/Create\"; // Create Script\nimport StorageIcon from \"@mui/icons-material/Storage\"; // Active Scripts\nimport BugReportIcon from \"@mui/icons-material/BugReport\"; // Create Program\nimport EqualizerIcon from \"@mui/icons-material/Equalizer\"; // Stats\nimport ContactsIcon from \"@mui/icons-material/Contacts\"; // Factions\nimport DoubleArrowIcon from \"@mui/icons-material/DoubleArrow\"; // Augmentations\nimport AccountTreeIcon from \"@mui/icons-material/AccountTree\"; // Hacknet\nimport PeopleAltIcon from \"@mui/icons-material/PeopleAlt\"; // Sleeves\nimport LocationCityIcon from \"@mui/icons-material/LocationCity\"; // City\nimport AirplanemodeActiveIcon from \"@mui/icons-material/AirplanemodeActive\"; // Travel\nimport WorkIcon from \"@mui/icons-material/Work\"; // Job\nimport TrendingUpIcon from \"@mui/icons-material/TrendingUp\"; // Stock Market\nimport FormatBoldIcon from \"@mui/icons-material/FormatBold\"; // Bladeburner\nimport BusinessIcon from \"@mui/icons-material/Business\"; // Corp\nimport SportsMmaIcon from \"@mui/icons-material/SportsMma\"; // Gang\nimport CheckIcon from \"@mui/icons-material/Check\"; // Milestones\nimport HelpIcon from \"@mui/icons-material/Help\"; // Tutorial\nimport SettingsIcon from \"@mui/icons-material/Settings\"; // options\nimport DeveloperBoardIcon from \"@mui/icons-material/DeveloperBoard\"; // Dev\nimport EmojiEventsIcon from \"@mui/icons-material/EmojiEvents\"; // Achievements\nimport AccountBoxIcon from \"@mui/icons-material/AccountBox\";\nimport PublicIcon from \"@mui/icons-material/Public\";\nimport LiveHelpIcon from \"@mui/icons-material/LiveHelp\";\nimport ExpandLessIcon from \"@mui/icons-material/ExpandLess\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { IRouter, Page } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { iTutorialSteps, iTutorialNextStep, ITutorial } from \"../../InteractiveTutorial\";\nimport { getAvailableCreatePrograms } from \"../../Programs/ProgramHelpers\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { redPillFlag } from \"../../RedPill\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\n\nimport { ProgramsSeen } from \"../../Programs/ui/ProgramsRoot\";\nimport { InvitationsSeen } from \"../../Faction/ui/FactionsRoot\";\nimport { hash } from \"../../hash/hash\";\n\nconst openedMixin = (theme: Theme): CSSObject => ({\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: Theme): CSSObject => ({\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 = styled(MuiDrawer, { shouldForwardProp: (prop) => prop !== \"open\" })(({ theme, open }) => ({\n width: theme.spacing(31),\n whiteSpace: \"nowrap\",\n boxSizing: \"border-box\",\n ...(open && {\n ...openedMixin(theme),\n \"& .MuiDrawer-paper\": openedMixin(theme),\n }),\n ...(!open && {\n ...closedMixin(theme),\n \"& .MuiDrawer-paper\": closedMixin(theme),\n }),\n}));\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n active: {\n borderLeft: \"3px solid \" + theme.palette.primary.main,\n },\n listitem: {},\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n page: Page;\n opened: boolean;\n onToggled: (newValue: boolean) => void;\n}\n\nexport function SidebarRoot(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const [hackingOpen, setHackingOpen] = useState(true);\n const [characterOpen, setCharacterOpen] = useState(true);\n const [worldOpen, setWorldOpen] = useState(true);\n const [helpOpen, setHelpOpen] = useState(true);\n\n const flashTerminal =\n ITutorial.currStep === iTutorialSteps.CharacterGoToTerminalPage ||\n ITutorial.currStep === iTutorialSteps.ActiveScriptsPage;\n\n const flashStats = ITutorial.currStep === iTutorialSteps.GoToCharacterPage;\n\n const flashActiveScripts = ITutorial.currStep === iTutorialSteps.TerminalGoToActiveScriptsPage;\n\n const flashHacknet = ITutorial.currStep === iTutorialSteps.GoToHacknetNodesPage;\n\n const flashCity = ITutorial.currStep === iTutorialSteps.HacknetNodesGoToWorldPage;\n\n const flashTutorial = ITutorial.currStep === iTutorialSteps.WorldDescription;\n\n const augmentationCount = props.player.queuedAugmentations.length;\n const invitationsCount = props.player.factionInvitations.filter((f) => !InvitationsSeen.includes(f)).length;\n const programCount = getAvailableCreatePrograms(props.player).length - ProgramsSeen.length;\n\n const canOpenFactions =\n props.player.factionInvitations.length > 0 ||\n props.player.factions.length > 0 ||\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenAugmentations =\n props.player.augmentations.length > 0 ||\n props.player.queuedAugmentations.length > 0 ||\n props.player.sourceFiles.length > 0;\n\n const canOpenSleeves = props.player.sleeves.length > 0;\n\n const canCorporation = !!(props.player.corporation as any);\n const canGang = !!(props.player.gang as any);\n const canJob = props.player.companyName !== \"\";\n const canStockMarket = props.player.hasWseAccount;\n const canBladeburner = !!(props.player.bladeburner as any);\n const canStaneksGift = props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1);\n\n function clickTerminal(): void {\n props.router.toTerminal();\n if (flashTerminal) iTutorialNextStep();\n }\n\n function clickScriptEditor(): void {\n props.router.toScriptEditor();\n }\n\n function clickStats(): void {\n props.router.toStats();\n if (flashStats) iTutorialNextStep();\n }\n\n function clickActiveScripts(): void {\n props.router.toActiveScripts();\n if (flashActiveScripts) iTutorialNextStep();\n }\n\n function clickCreateProgram(): void {\n props.router.toCreateProgram();\n }\n\n function clickStaneksGift(): void {\n props.router.toStaneksGift();\n }\n\n function clickFactions(): void {\n props.router.toFactions();\n }\n\n function clickAugmentations(): void {\n props.router.toAugmentations();\n }\n\n function clickSleeves(): void {\n props.router.toSleeves();\n }\n\n function clickHacknet(): void {\n props.router.toHacknetNodes();\n if (flashHacknet) iTutorialNextStep();\n }\n\n function clickCity(): void {\n props.router.toCity();\n if (flashCity) iTutorialNextStep();\n }\n\n function clickTravel(): void {\n props.router.toTravel();\n }\n\n function clickJob(): void {\n props.router.toJob();\n }\n\n function clickStockMarket(): void {\n props.router.toStockMarket();\n }\n\n function clickBladeburner(): void {\n props.router.toBladeburner();\n }\n\n function clickCorp(): void {\n props.router.toCorporation();\n }\n\n function clickGang(): void {\n props.router.toGang();\n }\n\n function clickTutorial(): void {\n props.router.toTutorial();\n if (flashTutorial) iTutorialNextStep();\n }\n\n function clickMilestones(): void {\n props.router.toMilestones();\n }\n function clickOptions(): void {\n props.router.toGameOptions();\n }\n\n function clickDev(): void {\n props.router.toDevMenu();\n }\n\n function clickAchievements(): void {\n props.router.toAchievements();\n }\n\n 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(this: Document, event: KeyboardEvent): any {\n if (Settings.DisableHotkeys) return;\n if ((props.player.isWorking && props.player.focus) || redPillFlag) return;\n if (event.key === KEY.T && event.altKey) {\n event.preventDefault();\n clickTerminal();\n } else if (event.key === KEY.C && event.altKey) {\n event.preventDefault();\n clickStats();\n } else if (event.key === KEY.E && event.altKey) {\n event.preventDefault();\n clickScriptEditor();\n } else if (event.key === KEY.S && event.altKey) {\n event.preventDefault();\n clickActiveScripts();\n } else if (event.key === KEY.H && event.altKey) {\n event.preventDefault();\n clickHacknet();\n } else if (event.key === KEY.W && event.altKey) {\n event.preventDefault();\n clickCity();\n } else if (event.key === KEY.J && event.altKey && !event.ctrlKey && !event.metaKey && canJob) {\n // ctrl/cmd + alt + j is shortcut to open Chrome dev tools\n event.preventDefault();\n clickJob();\n } else if (event.key === KEY.R && event.altKey) {\n event.preventDefault();\n clickTravel();\n } else if (event.key === KEY.P && event.altKey) {\n event.preventDefault();\n clickCreateProgram();\n } else if (event.key === KEY.F && event.altKey) {\n if (props.page == Page.Terminal && Settings.EnableBashHotkeys) {\n return;\n }\n event.preventDefault();\n clickFactions();\n } else if (event.key === KEY.A && event.altKey) {\n event.preventDefault();\n clickAugmentations();\n } else if (event.key === KEY.U && event.altKey) {\n event.preventDefault();\n clickTutorial();\n } else if (event.key === KEY.B && event.altKey && props.player.bladeburner) {\n event.preventDefault();\n clickBladeburner();\n } else if (event.key === KEY.G && event.altKey && props.player.gang) {\n event.preventDefault();\n clickGang();\n }\n // if (event.key === KEY.O && event.altKey) {\n // event.preventDefault();\n // gameOptionsBoxOpen();\n // }\n }\n\n document.addEventListener(\"keydown\", handleShortcuts);\n return () => document.removeEventListener(\"keydown\", handleShortcuts);\n }, []);\n\n const classes = useStyles();\n const [open, setOpen] = useState(props.opened);\n const toggleDrawer = (): void => setOpen((old) => !old);\n\n useEffect(() => {\n props.onToggled(open);\n }, [open]);\n\n return (\n \n \n \n {!open ? : }\n \n \n Bitburner v{CONSTANTS.VersionString}\n \n }\n />\n \n \n \n setHackingOpen((old) => !old)}>\n \n \n \n \n \n Hacking} />\n {hackingOpen ? : }\n \n \n \n \n \n \n \n \n \n \n \n Terminal\n \n \n \n \n \n \n \n \n \n \n \n Script Editor\n \n \n \n \n \n \n \n \n \n \n \n Active Scripts\n \n \n \n \n \n 0 ? programCount : undefined} color=\"error\">\n \n \n \n \n \n \n \n Create Program\n \n \n \n {canStaneksGift && (\n \n \n \n \n \n \n \n \n Stanek's Gift\n \n \n \n )}\n \n \n\n \n setCharacterOpen((old) => !old)}>\n \n \n \n \n \n Character} />\n {characterOpen ? : }\n \n \n \n \n \n \n \n \n \n \n Stats\n \n \n \n {canOpenFactions && (\n \n \n \n \n \n \n \n \n \n \n Factions\n \n \n \n )}\n {canOpenAugmentations && (\n \n \n \n \n \n \n \n \n \n \n Augmentations\n \n \n \n )}\n \n \n \n \n \n \n \n \n Hacknet\n \n \n \n {canOpenSleeves && (\n \n \n \n \n \n \n \n Sleeves\n \n \n )}\n \n\n \n setWorldOpen((old) => !old)}>\n \n \n \n \n \n World} />\n {worldOpen ? : }\n \n \n \n \n \n \n \n \n \n \n City\n \n \n \n \n \n \n \n \n \n \n Travel\n \n \n {canJob && (\n \n \n \n \n \n \n \n Job\n \n \n )}\n {canStockMarket && (\n \n \n \n \n \n \n \n Stock Market\n \n \n )}\n {canBladeburner && (\n \n \n \n \n \n \n \n Bladeburner\n \n \n )}\n {canCorporation && (\n \n \n \n \n \n \n \n Corp\n \n \n )}\n {canGang && (\n \n \n \n \n \n \n \n Gang\n \n \n )}\n \n\n \n setHelpOpen((old) => !old)}>\n \n \n \n \n \n Help} />\n {helpOpen ? : }\n \n \n \n \n \n \n \n \n \n Milestones\n \n \n \n \n \n \n \n \n \n \n Tutorial\n \n \n \n \n \n \n \n \n \n \n Achievements\n \n \n \n \n \n \n \n \n \n Options\n \n \n {process.env.NODE_ENV === \"development\" && (\n \n \n \n \n \n \n \n Dev\n \n \n )}\n \n \n \n );\n}\n","import { Programs } from \"./Programs\";\nimport { Program } from \"./Program\";\n\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\n\n//Returns the programs this player can create.\nexport function getAvailableCreatePrograms(player: IPlayer): Program[] {\n const programs: Program[] = [];\n for (const key of Object.keys(Programs)) {\n // Non-creatable program\n const create = Programs[key].create;\n if (create == null) continue;\n\n // Already has program\n if (player.hasProgram(Programs[key].name)) continue;\n\n // Does not meet requirements\n if (!create.req(player)) continue;\n\n programs.push(Programs[key]);\n }\n\n return programs;\n}\n","/**\n * Root React component for the Augmentations UI page that display all of your\n * owned and purchased Augmentations and Source-Files.\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { InstalledAugmentations } from \"./InstalledAugmentations\";\nimport { PlayerMultipliers } from \"./PlayerMultipliers\";\nimport { PurchasedAugmentations } from \"./PurchasedAugmentations\";\nimport { SourceFiles } from \"./SourceFiles\";\n\nimport { canGetBonus } from \"../../ExportBonus\";\nimport { use } from \"../../ui/Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { ConfirmationModal } from \"../../ui/React/ConfirmationModal\";\n\ninterface IProps {\n exportGameFn: () => void;\n installAugmentationsFn: () => void;\n}\n\nexport function AugmentationsRoot(props: IProps): React.ReactElement {\n const [installOpen, setInstallOpen] = useState(false);\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((o) => !o);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n function doExport(): void {\n props.exportGameFn();\n rerender();\n }\n\n function exportBonusStr(): string {\n if (canGetBonus()) return \"(+1 favor to all factions)\";\n return \"\";\n }\n\n function doInstall(): void {\n if (!Settings.SuppressBuyAugmentationConfirmation) {\n setInstallOpen(true);\n } else {\n props.installAugmentationsFn();\n }\n }\n\n return (\n <>\n Augmentations\n \n \n Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to\n install them.\n \n WARNING: Installing your Augmentations resets most of your progress, including:\n
    \n - Stats/Skill levels and Experience\n - Money\n - Scripts on every computer but your home computer\n - Purchased servers\n - Hacknet Nodes\n - Faction/Company reputation\n - Stocks\n
    \n \n Installing Augmentations lets you start over with the perks and benefits granted by all of the Augmentations\n you have ever installed. Also, you will keep any scripts and RAM/Core upgrades on your home computer (but you\n will lose all programs besides NUKE.exe)\n \n
    \n \n Purchased Augmentations\n \n \n 'I never asked for this'}>\n \n \n \n \n setInstallOpen(false)}\n onConfirm={props.installAugmentationsFn}\n confirmationText={\n <>\n Installing will reset\n
    \n
    - money\n
    - skill / experience\n
    - every server except home\n
    - factions and reputation\n
    \n
    \n You will keep:\n
    \n
    - All scripts on home\n
    - home ram and cores\n
    \n
    \n It is recommended to install several Augmentations at once. Preferably everything from any faction of your\n choosing.\n \n }\n />\n It's always a good idea to backup/export your save!}>\n \n \n \n
    \n Installed Augmentations\n \n \n List of all Augmentations that have been installed. You have gained the effects of these.\n \n \n \n \n \n \n );\n}\n","/**\n * React Component for displaying all of the player's installed Augmentations and\n * Source-Files.\n *\n * It also contains 'configuration' buttons that allow you to change how the\n * Augs/SF's are displayed\n */\nimport React, { useState } from \"react\";\n\nimport { AugmentationAccordion } from \"../../ui/React/AugmentationAccordion\";\nimport { Augmentations } from \"../Augmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { use } from \"../../ui/Context\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport List from \"@mui/material/List\";\nimport { ExpandLess, ExpandMore } from \"@mui/icons-material\";\nimport { Box, Paper, ListItemButton, ListItemText, Typography, Collapse } from \"@mui/material\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\n\nexport function InstalledAugmentations(): React.ReactElement {\n const setRerender = useState(true)[1];\n const player = use.Player();\n\n const sourceAugs = player.augmentations.slice();\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceAugs.sort((aug1, aug2) => {\n return aug1.name.localeCompare(aug2.name);\n });\n }\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function sortByAcquirementTime(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.AcquirementTime;\n rerender();\n }\n\n function sortInOrder(): void {\n Settings.OwnedAugmentationsOrder = OwnedAugmentationsOrderSetting.Alphabetically;\n rerender();\n }\n\n return (\n <>\n \n \n \n \n \n \n \n {player.entropy > 0 &&\n (() => {\n const [open, setOpen] = useState(false);\n\n return (\n \n setOpen((old) => !old)}>\n \n Entropy Virus - Level {player.entropy}\n \n }\n />\n {open ? (\n \n ) : (\n \n )}\n \n \n \n \n All multipliers decreased by:{\" \"}\n {formatNumber((1 - CONSTANTS.EntropyEffect ** player.entropy) * 100, 3)}% (multiplicative)\n \n \n \n \n );\n })()}\n\n {sourceAugs.map((e) => {\n const aug = Augmentations[e.name];\n\n let level = null;\n if (e.name === AugmentationNames.NeuroFluxGovernor) {\n level = e.level;\n }\n\n return ;\n })}\n \n \n );\n}\n","/**\n * React component for displaying the player's multipliers on the Augmentation UI page\n */\nimport * as React from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Augmentations } from \"../Augmentations\";\nimport { Table, TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\n\nfunction calculateAugmentedStats(): any {\n const augP: any = {};\n for (const aug of Player.queuedAugmentations) {\n const augObj = Augmentations[aug.name];\n for (const mult of Object.keys(augObj.mults)) {\n const v = augP[mult] ? augP[mult] : 1;\n augP[mult] = v * augObj.mults[mult];\n }\n }\n return augP;\n}\n\nfunction Improvements({ r, m }: { r: number; m: number }): React.ReactElement {\n if (r) {\n return (\n <>\n \n  {\"=>\"} \n \n \n \n {numeralWrapper.formatPercentage(r)} \n \n \n \n );\n }\n return <>;\n}\n\ninterface IBN5StatsProps {\n base: number;\n mult: number;\n}\n\nfunction BN5Stat(props: IBN5StatsProps): React.ReactElement {\n if (props.mult === 1) return <>;\n return <>({numeralWrapper.formatPercentage(props.base * props.mult)});\n}\n\nfunction MultiplierTable({ rows }: { rows: [string, number, number, number][] }): React.ReactElement {\n return (\n \n \n {rows.map((r: any) => (\n \n \n {r[0]} multiplier: \n \n \n \n {numeralWrapper.formatPercentage(r[1])} \n \n \n \n \n ))}\n \n
    \n );\n}\n\nexport function PlayerMultipliers(): React.ReactElement {\n const mults = calculateAugmentedStats();\n\n function BladeburnerMults(): React.ReactElement {\n if (!Player.canAccessBladeburner()) return <>;\n return (\n <>\n \n
    \n \n );\n }\n\n return (\n <>\n Multipliers\n \n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n\n \n
    \n \n );\n}\n","/**\n * React component for displaying all of the player's purchased (but not installed)\n * Augmentations on the Augmentations UI.\n */\nimport * as React from \"react\";\n\nimport { Augmentations } from \"../Augmentations\";\nimport { AugmentationNames } from \"../data/AugmentationNames\";\nimport { Player } from \"../../Player\";\n\nimport { AugmentationAccordion } from \"../../ui/React/AugmentationAccordion\";\nimport List from \"@mui/material/List\";\n\nexport function PurchasedAugmentations(): React.ReactElement {\n const augs: React.ReactElement[] = [];\n // Only render the last NeuroFlux (there are no findLastIndex btw)\n let nfgIndex = -1;\n for (let i = Player.queuedAugmentations.length - 1; i >= 0; i--) {\n if (Player.queuedAugmentations[i].name === AugmentationNames.NeuroFluxGovernor) {\n nfgIndex = i;\n break;\n }\n }\n for (let i = 0; i < Player.queuedAugmentations.length; i++) {\n const ownedAug = Player.queuedAugmentations[i];\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor && i !== nfgIndex) continue;\n const aug = Augmentations[ownedAug.name];\n let level = null;\n if (ownedAug.name === AugmentationNames.NeuroFluxGovernor) {\n level = ownedAug.level;\n }\n augs.push();\n }\n\n return {augs};\n}\n","import React from \"react\";\nimport { SourceFileMinus1 } from \"./SourceFileMinus1\";\nimport { OwnedSourceFiles } from \"./OwnedSourceFiles\";\nimport List from \"@mui/material/List\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\n\nexport function SourceFiles(): React.ReactElement {\n return (\n <>\n Source Files\n \n \n \n \n \n \n \n );\n}\n","/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\nimport React, { useState } from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { Exploit, ExploitName } from \"../../Exploits/Exploit\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\nexport function SourceFileMinus1(): React.ReactElement {\n const [open, setOpen] = useState(false);\n const exploits = Player.exploits;\n\n if (exploits.length === 0) {\n return <>;\n }\n\n return (\n \n setOpen((old) => !old)}>\n \n Source-File -1: Exploits in the BitNodes\n
    \n Level {exploits.length} / {Object.keys(Exploit).length}\n \n }\n />\n {open ? : }\n
    \n \n \n \n This Source-File can only be acquired with obscure knowledge of the game, javascript, and the web ecosystem.\n \n It increases all of the player's multipliers by 0.1%\n
    \n\n You have found the following exploits:\n \n {exploits.map((c: Exploit) => (\n * {ExploitName(c)}\n ))}\n \n
    \n
    \n
    \n );\n}\n","/**\n * React Component for displaying a list of the player's Source-Files\n * on the Augmentations UI\n */\nimport * as React from \"react\";\n\nimport { Player } from \"../../Player\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { OwnedAugmentationsOrderSetting } from \"../../Settings/SettingEnums\";\nimport { SourceFiles } from \"../../SourceFile/SourceFiles\";\n\nimport { SourceFileAccordion } from \"../../ui/React/SourceFileAccordion\";\n\nexport function OwnedSourceFiles(): React.ReactElement {\n const sourceSfs = Player.sourceFiles.slice();\n\n if (Settings.OwnedAugmentationsOrder === OwnedAugmentationsOrderSetting.Alphabetically) {\n sourceSfs.sort((sf1, sf2) => {\n return sf1.n - sf2.n;\n });\n }\n\n return (\n <>\n {sourceSfs.map((e) => {\n const srcFileKey = \"SourceFile\" + e.n;\n const sfObj = SourceFiles[srcFileKey];\n if (sfObj == null) {\n console.error(`Invalid source file number: ${e.n}`);\n return null;\n }\n\n return ;\n })}\n \n );\n}\n","/**\n * React Component for displaying a single Source-File as an accordion.\n *\n * The header of the accordion contains the Source-Files's name and level,\n * and the accordion's panel contains the Source-File's description.\n */\nimport React, { useState } from \"react\";\n\nimport { SourceFile } from \"../../SourceFile/SourceFile\";\n\nimport ListItemButton from \"@mui/material/ListItemButton\";\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\n\ntype IProps = {\n level: number;\n sf: SourceFile;\n};\n\nexport function SourceFileAccordion(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const maxLevel = props.sf.n === 12 ? \"∞\" : \"3\";\n\n return (\n \n setOpen((old) => !old)}>\n \n {props.sf.name}\n
    \n {`Level ${props.level} / ${maxLevel}`}\n \n }\n />\n {open ? : }\n
    \n \n \n {props.sf.info}\n \n \n
    \n );\n}\n","import { IPlayer } from \"./PersonObjects/IPlayer\";\nimport { Bladeburner } from \"./Bladeburner/Bladeburner\";\nimport { IEngine } from \"./IEngine\";\nimport { IRouter } from \"./ui/Router\";\nimport { AugmentationNames } from \"./Augmentation/data/AugmentationNames\";\n\nimport React, { useEffect } from \"react\";\n\nimport { General } from \"./DevMenu/ui/General\";\nimport { Stats } from \"./DevMenu/ui/Stats\";\nimport { Factions } from \"./DevMenu/ui/Factions\";\nimport { Augmentations } from \"./DevMenu/ui/Augmentations\";\nimport { SourceFiles } from \"./DevMenu/ui/SourceFiles\";\nimport { Programs } from \"./DevMenu/ui/Programs\";\nimport { Servers } from \"./DevMenu/ui/Servers\";\nimport { Companies } from \"./DevMenu/ui/Companies\";\nimport { Bladeburner as BladeburnerElem } from \"./DevMenu/ui/Bladeburner\";\nimport { Gang } from \"./DevMenu/ui/Gang\";\nimport { Corporation } from \"./DevMenu/ui/Corporation\";\nimport { CodingContracts } from \"./DevMenu/ui/CodingContracts\";\nimport { StockMarket } from \"./DevMenu/ui/StockMarket\";\nimport { Sleeves } from \"./DevMenu/ui/Sleeves\";\nimport { Stanek } from \"./DevMenu/ui/Stanek\";\nimport { TimeSkip } from \"./DevMenu/ui/TimeSkip\";\nimport { Achievements } from \"./DevMenu/ui/Achievements\";\nimport { Entropy } from \"./DevMenu/ui/Entropy\";\nimport Typography from \"@mui/material/Typography\";\nimport { Exploit } from \"./Exploits/Exploit\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n router: IRouter;\n}\n\nexport function DevMenuRoot(props: IProps): React.ReactElement {\n useEffect(() => {\n props.player.giveExploit(Exploit.YoureNotMeantToAccessThis);\n }, []);\n return (\n <>\n Development Menu - Only meant to be used for testing/debugging\n \n \n \n \n \n \n \n \n\n {props.player.bladeburner instanceof Bladeburner && }\n\n {props.player.inGang() && }\n\n {props.player.hasCorporation() && }\n\n \n\n {props.player.hasWseAccount && }\n\n {props.player.sleeves.length > 0 && }\n {props.player.augmentations.some((aug) => aug.name === AugmentationNames.StaneksGift1) && }\n\n \n \n \n \n );\n}\n","import React, { useEffect, useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { IRouter } from \"../../ui/Router\";\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n}\n\nexport function General(props: IProps): React.ReactElement {\n const [error, setError] = useState(false);\n\n function addMoney(n: number) {\n return function () {\n props.player.gainMoney(n, \"other\");\n };\n }\n\n function upgradeRam(): void {\n props.player.getHomeComputer().maxRam *= 2;\n }\n\n function quickB1tFlum3(): void {\n props.router.toBitVerse(true, true);\n }\n\n function b1tflum3(): void {\n props.router.toBitVerse(true, false);\n }\n\n function quickHackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, true);\n }\n\n function hackW0r1dD43m0n(): void {\n props.router.toBitVerse(false, false);\n }\n\n useEffect(() => {\n if (error) throw new ReferenceError('Manually thrown error');\n }, [error]);\n\n return (\n \n }>\n General\n \n \n \n \n \n \n \n \n
    \n\n \n \n \n \n \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n function modifyExp(stat: string, modifier: number) {\n return function (exp: number) {\n switch (stat) {\n case \"hacking\":\n if (exp) {\n props.player.gainHackingExp(exp * modifier);\n }\n break;\n case \"strength\":\n if (exp) {\n props.player.gainStrengthExp(exp * modifier);\n }\n break;\n case \"defense\":\n if (exp) {\n props.player.gainDefenseExp(exp * modifier);\n }\n break;\n case \"dexterity\":\n if (exp) {\n props.player.gainDexterityExp(exp * modifier);\n }\n break;\n case \"agility\":\n if (exp) {\n props.player.gainAgilityExp(exp * modifier);\n }\n break;\n case \"charisma\":\n if (exp) {\n props.player.gainCharismaExp(exp * modifier);\n }\n break;\n case \"intelligence\":\n if (exp) {\n props.player.gainIntelligenceExp(exp * modifier);\n }\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function modifyKarma(modifier: number) {\n return function (amt: number) {\n props.player.karma += amt * modifier;\n };\n }\n\n function tonsOfExp(): void {\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(): void {\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: string): () => void {\n return function () {\n switch (stat) {\n case \"hacking\":\n props.player.hacking_exp = 0;\n break;\n case \"strength\":\n props.player.strength_exp = 0;\n break;\n case \"defense\":\n props.player.defense_exp = 0;\n break;\n case \"dexterity\":\n props.player.dexterity_exp = 0;\n break;\n case \"agility\":\n props.player.agility_exp = 0;\n break;\n case \"charisma\":\n props.player.charisma_exp = 0;\n break;\n case \"intelligence\":\n props.player.intelligence_exp = 0;\n break;\n }\n props.player.updateSkillLevels();\n };\n }\n\n function resetKarma(): () => void {\n return function () {\n props.player.karma = 0;\n };\n }\n\n function enableIntelligence(): void {\n if (props.player.intelligence === 0) {\n props.player.intelligence = 1;\n props.player.updateSkillLevels();\n }\n }\n\n function disableIntelligence(): void {\n props.player.intelligence_exp = 0;\n props.player.intelligence = 0;\n props.player.updateSkillLevels();\n }\n\n return (\n \n }>\n Experience / Stats\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n All:\n \n \n \n
    \n Hacking:\n \n modifyExp(\"hacking\", 1)(bigNumber)}\n add={modifyExp(\"hacking\", 1)}\n subtract={modifyExp(\"hacking\", -1)}\n reset={resetExperience(\"hacking\")}\n />\n
    \n Strength:\n \n modifyExp(\"strength\", 1)(bigNumber)}\n add={modifyExp(\"strength\", 1)}\n subtract={modifyExp(\"strength\", -1)}\n reset={resetExperience(\"strength\")}\n />\n
    \n Defense:\n \n modifyExp(\"defense\", 1)(bigNumber)}\n add={modifyExp(\"defense\", 1)}\n subtract={modifyExp(\"defense\", -1)}\n reset={resetExperience(\"defense\")}\n />\n
    \n Dexterity:\n \n modifyExp(\"dexterity\", 1)(bigNumber)}\n add={modifyExp(\"dexterity\", 1)}\n subtract={modifyExp(\"dexterity\", -1)}\n reset={resetExperience(\"dexterity\")}\n />\n
    \n Agility:\n \n modifyExp(\"agility\", 1)(bigNumber)}\n add={modifyExp(\"agility\", 1)}\n subtract={modifyExp(\"agility\", -1)}\n reset={resetExperience(\"agility\")}\n />\n
    \n Charisma:\n \n modifyExp(\"charisma\", 1)(bigNumber)}\n add={modifyExp(\"charisma\", 1)}\n subtract={modifyExp(\"charisma\", -1)}\n reset={resetExperience(\"charisma\")}\n />\n
    \n Intelligence:\n \n modifyExp(\"intelligence\", 1)(bigNumber)}\n add={modifyExp(\"intelligence\", 1)}\n subtract={modifyExp(\"intelligence\", -1)}\n reset={resetExperience(\"intelligence\")}\n />\n \n \n \n \n
    \n Karma:\n \n modifyExp(\"intelligence\", 1)(100000)}\n add={modifyKarma(1)}\n subtract={modifyKarma(-1)}\n reset={resetKarma()}\n />\n
    \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Factions as AllFaction } from \"../../Faction/Factions\";\nimport FormControl from \"@mui/material/FormControl\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport InputLabel from \"@mui/material/InputLabel\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Factions(props: IProps): React.ReactElement {\n const [faction, setFaction] = useState(FactionNames.Illuminati as string);\n\n function setFactionDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value as string);\n }\n\n function receiveInvite(): void {\n props.player.receiveInvite(faction);\n }\n\n function receiveAllInvites(): void {\n Object.values(FactionNames).forEach(faction => props.player.receiveInvite(faction))\n }\n\n function modifyFactionRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(reputation)) {\n fac.playerReputation += reputation * modifier;\n }\n };\n }\n\n function resetFactionRep(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.playerReputation = 0;\n }\n }\n\n function modifyFactionFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const fac = AllFaction[faction];\n if (fac != null && !isNaN(favor)) {\n fac.favor += favor * modifier;\n }\n };\n }\n\n function resetFactionFavor(): void {\n const fac = AllFaction[faction];\n if (fac != null) {\n fac.favor = 0;\n }\n }\n\n function tonsOfRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = bigNumber;\n }\n }\n\n function resetAllRep(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].playerReputation = 0;\n }\n }\n\n function tonsOfFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = bigNumber;\n }\n }\n\n function resetAllFactionFavor(): void {\n for (const i of Object.keys(AllFaction)) {\n AllFaction[i].favor = 0;\n }\n }\n\n return (\n \n }>\n Factions\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Faction:\n \n \n Faction\n \n \n \n \n \n \n \n \n }\n >\n {Object.values(AllFaction).map((faction) => (\n \n {faction.name}\n \n ))}\n \n \n
    \n Reputation:\n \n modifyFactionRep(1)(bigNumber)}\n add={modifyFactionRep(1)}\n subtract={modifyFactionRep(-1)}\n reset={resetFactionRep}\n />\n
    \n Favor:\n \n modifyFactionFavor(1)(2000)}\n add={modifyFactionFavor(1)}\n subtract={modifyFactionFavor(-1)}\n reset={resetFactionFavor}\n />\n
    \n All Reputation:\n \n \n \n
    \n All Favor:\n \n \n \n
    \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyAllIcon from \"@mui/icons-material/ReplyAll\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport ClearIcon from \"@mui/icons-material/Clear\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Augmentations(props: IProps): React.ReactElement {\n const [augmentation, setAugmentation] = useState(\"Augmented Targeting I\");\n\n function setAugmentationDropdown(event: SelectChangeEvent): void {\n setAugmentation(event.target.value as string);\n }\n function queueAug(): void {\n props.player.queueAugmentation(augmentation);\n }\n\n function queueAllAugs(): void {\n for (const augName of Object.values(AugmentationNames)) {\n props.player.queueAugmentation(augName);\n }\n }\n\n function clearAugs(): void {\n props.player.augmentations = [];\n }\n\n return (\n \n }>\n Augmentations\n \n \n \n \n \n \n \n \n \n
    \n Aug:\n \n \n \n \n \n \n \n \n \n }\n endAdornment={\n <>\n \n \n \n \n }\n >\n {Object.values(AugmentationNames).map((aug) => (\n \n {aug}\n \n ))}\n \n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { PlayerOwnedSourceFile } from \"../../SourceFile/PlayerOwnedSourceFile\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\n\n// Update as additional BitNodes get implemented\nconst validSFN = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13];\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function SourceFiles(props: IProps): React.ReactElement {\n function setSF(sfN: number, sfLvl: number) {\n return function () {\n if (sfN === 9) {\n props.player.hacknetNodes = [];\n }\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 PlayerOwnedSourceFile(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: number) {\n return () => {\n for (let i = 0; i < validSFN.length; i++) {\n setSF(validSFN[i], sfLvl)();\n }\n };\n }\n\n function clearExploits(): void {\n props.player.exploits = [];\n }\n\n return (\n \n }>\n Source-Files\n \n \n \n \n \n \n \n \n \n \n \n \n {validSFN.map((i) => (\n \n \n \n \n ))}\n \n
    \n Exploits:\n \n \n
    \n All:\n \n \n \n \n \n \n \n
    \n SF-{i}:\n \n \n \n \n \n \n \n
    \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Programs as AllPrograms } from \"../../Programs/Programs\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Programs(props: IProps): React.ReactElement {\n const [program, setProgram] = useState(\"NUKE.exe\");\n function setProgramDropdown(event: SelectChangeEvent): void {\n setProgram(event.target.value as string);\n }\n function addProgram(): void {\n if (!props.player.hasProgram(program)) {\n props.player.getHomeComputer().programs.push(program);\n }\n }\n\n function addAllPrograms(): void {\n for (const i of Object.keys(AllPrograms)) {\n if (!props.player.hasProgram(AllPrograms[i].name)) {\n props.player.getHomeComputer().programs.push(AllPrograms[i].name);\n }\n }\n }\n\n return (\n \n }>\n Programs\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Program:\n \n \n
    \n Add:\n \n \n \n
    \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { GetServer, GetAllServers } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\nimport MenuItem from \"@mui/material/MenuItem\";\n\nexport function Servers(): React.ReactElement {\n const [server, setServer] = useState(\"home\");\n function setServerDropdown(event: SelectChangeEvent): void {\n setServer(event.target.value as string);\n }\n function rootServer(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) 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(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) 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(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n\n function minAllSecurity(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.hackDifficulty = s.minDifficulty;\n }\n }\n\n function maxMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n\n function maxAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = s.moneyMax;\n }\n }\n\n function minMoney(): void {\n const s = GetServer(server);\n if (s === null) return;\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n\n function minAllMoney(): void {\n for (const s of GetAllServers()) {\n if (!(s instanceof Server)) return;\n s.moneyAvailable = 0;\n }\n }\n\n return (\n \n }>\n Servers\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Server:\n \n \n
    \n Root:\n \n \n \n \n
    \n Security:\n \n \n \n \n
    \n Money:\n \n \n \n \n \n \n \n \n
    \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { Companies as AllCompanies } from \"../../Company/Companies\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { Adjuster } from \"./Adjuster\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\nconst bigNumber = 1e12;\n\nexport function Companies(): React.ReactElement {\n const [company, setCompany] = useState(FactionNames.ECorp as string);\n function setCompanyDropdown(event: SelectChangeEvent): void {\n setCompany(event.target.value as string);\n }\n function resetCompanyRep(): void {\n AllCompanies[company].playerReputation = 0;\n }\n\n function modifyCompanyRep(modifier: number): (x: number) => void {\n return function (reputation: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(reputation)) {\n c.playerReputation += reputation * modifier;\n }\n };\n }\n\n function modifyCompanyFavor(modifier: number): (x: number) => void {\n return function (favor: number): void {\n const c = AllCompanies[company];\n if (c != null && !isNaN(favor)) {\n c.favor += favor * modifier;\n }\n };\n }\n\n function resetCompanyFavor(): void {\n AllCompanies[company].favor = 0;\n }\n\n function tonsOfRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = bigNumber;\n }\n }\n\n function resetAllRepCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].playerReputation = 0;\n }\n }\n\n function tonsOfFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = bigNumber;\n }\n }\n\n function resetAllFavorCompanies(): void {\n for (const c of Object.keys(AllCompanies)) {\n AllCompanies[c].favor = 0;\n }\n }\n\n return (\n \n }>\n Companies\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Company:\n \n \n
    \n Reputation:\n \n modifyCompanyRep(1)(bigNumber)}\n add={modifyCompanyRep(1)}\n subtract={modifyCompanyRep(-1)}\n reset={resetCompanyRep}\n />\n
    \n Favor:\n \n modifyCompanyFavor(1)(2000)}\n add={modifyCompanyFavor(1)}\n subtract={modifyCompanyFavor(-1)}\n reset={resetCompanyFavor}\n />\n
    \n All Reputation:\n \n \n \n
    \n All Favor:\n \n \n \n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Bladeburner(props: IProps): React.ReactElement {\n const bladeburner = props.player.bladeburner;\n if (bladeburner === null) return <>;\n function modifyBladeburnerRank(modify: number): (x: number) => void {\n return function (rank: number): void {\n if (!bladeburner) return;\n bladeburner.changeRank(props.player, rank * modify);\n };\n }\n\n function resetBladeburnerRank(): void {\n if (!bladeburner) return;\n bladeburner.rank = 0;\n bladeburner.maxRank = 0;\n }\n\n function addTonsBladeburnerRank(): void {\n if (!bladeburner) return;\n\n bladeburner.changeRank(props.player, bigNumber);\n }\n\n function modifyBladeburnerCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += cycles * modify;\n };\n }\n\n function resetBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles = 0;\n }\n\n function addTonsBladeburnerCycles(): void {\n if (!bladeburner) return;\n bladeburner.storedCycles += bigNumber;\n }\n\n return (\n \n }>\n Bladeburner\n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Rank:\n \n \n
    \n Cycles:\n \n \n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Gang(props: IProps): React.ReactElement {\n function addTonsGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = bigNumber;\n }\n }\n\n function modifyGangCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.gang) {\n props.player.gang.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetGangCycles(): void {\n if (props.player.gang) {\n props.player.gang.storedCycles = 0;\n }\n }\n\n return (\n \n }>\n Gang\n \n \n \n \n \n \n \n \n \n
    \n Cycles:\n \n \n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nconst bigNumber = 1e27;\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Corporation(props: IProps): React.ReactElement {\n function addTonsCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds + bigNumber;\n }\n }\n\n function modifyCorporationFunds(modify: number): (x: number) => void {\n return function (funds: number): void {\n if (props.player.corporation) {\n props.player.corporation.funds += funds * modify;\n }\n };\n }\n\n function resetCorporationFunds(): void {\n if (props.player.corporation) {\n props.player.corporation.funds = props.player.corporation.funds - props.player.corporation.funds;\n }\n }\n\n function addTonsCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = bigNumber;\n }\n }\n\n function modifyCorporationCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles += cycles * modify;\n }\n };\n }\n\n function resetCorporationCycles(): void {\n if (props.player.corporation) {\n props.player.corporation.storedCycles = 0;\n }\n }\n\n function finishCorporationProducts(): void {\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(): void {\n if (!props.player.corporation) return;\n props.player.corporation.divisions.forEach((div) => {\n div.sciResearch.qty += 1e10;\n });\n }\n\n return (\n \n }>\n Corporation\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Funds:\n \n \n
    \n Cycles:\n \n \n
    \n \n
    \n \n
    \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { generateContract, generateRandomContract, generateRandomContractOnHome } from \"../../CodingContractGenerator\";\nimport { CodingContractTypes } from \"../../CodingContracts\";\n\nexport function CodingContracts(): React.ReactElement {\n const [codingcontract, setCodingcontract] = useState(\"Find Largest Prime Factor\");\n function setCodingcontractDropdown(event: SelectChangeEvent): void {\n setCodingcontract(event.target.value as string);\n }\n\n function specificContract(): void {\n generateContract({\n problemType: codingcontract,\n server: \"home\",\n });\n }\n\n return (\n \n }>\n Coding Contracts\n \n \n \n \n \n \n \n \n \n \n \n
    \n \n \n
    \n \n \n
    \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { Money } from \"../../ui/React/Money\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { StockMarket as SM } from \"../../StockMarket/StockMarket\";\nimport { Stock } from \"../../StockMarket/Stock\";\n\nexport function StockMarket(): React.ReactElement {\n const [stockPrice, setStockPrice] = useState(0);\n const [stockSymbol, setStockSymbol] = useState(\"\");\n\n function setStockPriceField(event: React.ChangeEvent): void {\n setStockPrice(parseFloat(event.target.value));\n }\n\n function setStockSymbolField(event: React.ChangeEvent): void {\n setStockSymbol(event.target.value);\n }\n\n function processStocks(sub: (arg0: Stock) => void): void {\n const inputSymbols = stockSymbol.replace(/\\s/g, \"\");\n\n let match: (symbol: string) => boolean = (): boolean => {\n return true;\n };\n\n if (inputSymbols !== \"\" && inputSymbols !== \"all\") {\n match = function (symbol: string): boolean {\n return inputSymbols.split(\",\").includes(symbol);\n };\n }\n\n for (const name of Object.keys(SM)) {\n if (SM.hasOwnProperty(name)) {\n const stock = SM[name];\n if (stock instanceof Stock && match(stock.symbol)) {\n sub(stock);\n }\n }\n }\n }\n\n function doSetStockPrice(): void {\n if (!isNaN(stockPrice)) {\n processStocks((stock: Stock) => {\n stock.price = stockPrice;\n });\n }\n }\n\n function viewStockCaps(): void {\n const stocks: JSX.Element[] = [];\n processStocks((stock: Stock) => {\n stocks.push(\n \n {stock.symbol}\n \n \n \n ,\n );\n });\n dialogBoxCreate(\n \n \n \n \n \n \n {stocks}\n \n
    StockPrice cap
    ,\n );\n }\n return (\n \n }>\n Stock Market\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Symbol:\n \n \n
    \n Price:\n \n \n \n
    \n Caps:\n \n \n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function Sleeves(props: IProps): React.ReactElement {\n function sleeveMaxAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 0;\n }\n }\n\n function sleeveClearAllShock(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].shock = 100;\n }\n }\n\n function sleeveSyncMaxAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 100;\n }\n }\n\n function sleeveSyncClearAll(): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].sync = 0;\n }\n }\n\n function sleeveSetStoredCycles(cycles: number): void {\n for (let i = 0; i < props.player.sleeves.length; ++i) {\n props.player.sleeves[i].storedCycles = cycles;\n }\n }\n\n return (\n \n }>\n Sleeves\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n Shock:\n \n \n \n \n
    \n Sync:\n \n \n \n \n
    \n sleeveSetStoredCycles(10000000)}\n add={sleeveSetStoredCycles}\n subtract={sleeveSetStoredCycles}\n reset={() => sleeveSetStoredCycles(0)}\n />\n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport { staneksGift } from \"../../CotMG/Helper\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { Adjuster } from \"./Adjuster\";\n\nexport function Stanek(): React.ReactElement {\n function addCycles(): void {\n staneksGift.storedCycles = 1e6;\n }\n\n function modCycles(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.storedCycles += cycles * modify;\n };\n }\n\n function resetCycles(): void {\n staneksGift.storedCycles = 0;\n }\n\n function addCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.highestCharge = 1e21;\n f.numCharge = 1e21;\n });\n }\n\n function modCharge(modify: number): (x: number) => void {\n return function (cycles: number): void {\n staneksGift.fragments.forEach((f) => (f.highestCharge += cycles * modify));\n };\n }\n\n function resetCharge(): void {\n staneksGift.fragments.forEach((f) => {\n f.highestCharge = 0;\n f.numCharge = 0;\n });\n }\n\n return (\n \n }>\n Stanek's Gift\n \n \n \n \n \n \n \n \n \n \n \n
    \n \n
    \n \n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { saveObject } from \"../../SaveObject\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function TimeSkip(props: IProps): React.ReactElement {\n function timeskip(time: number) {\n return () => {\n props.player.lastUpdate -= time;\n props.engine._lastUpdate -= time;\n saveObject.saveGame();\n setTimeout(() => location.reload(), 1000);\n };\n }\n\n return (\n \n }>\n Time skip\n \n \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport { Tooltip } from \"@mui/material\";\nimport LockIcon from '@mui/icons-material/Lock';\nimport LockOpenIcon from '@mui/icons-material/LockOpen';\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { achievements } from \"../../Achievements/Achievements\";\nimport { IEngine } from \"../../IEngine\";\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Achievements(props: IProps): React.ReactElement {\n const [playerAchievement, setPlayerAchievements] = useState(props.player.achievements.map(m => m.ID));\n\n function grantAchievement(id: string): void {\n props.player.giveAchievement(id);\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function grantAllAchievements(): void {\n Object.values(achievements).forEach(a => props.player.giveAchievement(a.ID));\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function removeAchievement(id: string): void {\n props.player.achievements = props.player.achievements.filter(a => a.ID !== id);\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function clearAchievements(): void {\n props.player.achievements = [];\n setPlayerAchievements(props.player.achievements.map(m => m.ID));\n }\n\n function disableEngine(): void {\n props.engine.Counters.achievementsCounter = Number.MAX_VALUE;\n }\n\n function enableEngine(): void {\n props.engine.Counters.achievementsCounter = 0\n }\n\n return (\n \n }>\n Achievements\n \n \n \n \n \n \n \n \n \n {Object.values(achievements).map((i) => {\n const achieved = playerAchievement.includes(i.ID);\n return \n \n \n \n \n })}\n \n
    \n \n Achievements:\n \n \n \n \n \n \n \n
    \n {achieved ? (\n \n \n \n ) : (\n \n \n \n )}\n \n {i.ID}
    {i.Description}}>\n {i.Name}:\n
    \n
    \n \n \n \n \n
    \n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\nimport Typography from \"@mui/material/Typography\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Adjuster } from \"./Adjuster\";\nimport { IEngine } from \"../../IEngine\";\n\n// Update as additional BitNodes get implemented\n\ninterface IProps {\n player: IPlayer;\n engine: IEngine;\n}\n\nexport function Entropy(props: IProps): React.ReactElement {\n return (\n \n }>\n Entropy\n \n \n {\n props.player.entropy += num;\n props.player.applyEntropy(props.player.entropy);\n }}\n subtract={(num) => {\n props.player.entropy -= num;\n props.player.applyEntropy(props.player.entropy);\n }}\n tons={() => {\n props.player.entropy += 1e12;\n props.player.applyEntropy(props.player.entropy);\n }}\n reset={() => {\n props.player.entropy = 0;\n props.player.applyEntropy(props.player.entropy);\n }}\n />\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Stats } from \"./Stats\";\nimport { Console } from \"./Console\";\nimport { AllPages } from \"./AllPages\";\n\nimport { use } from \"../../ui/Context\";\nimport Box from \"@mui/material/Box\";\n\nexport function BladeburnerRoot(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const bladeburner = player.bladeburner;\n if (bladeburner === null) return <>;\n return (\n \n \n \n \n \n\n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport { TravelModal } from \"./TravelModal\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport Paper from \"@mui/material/Paper\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n router: IRouter;\n player: IPlayer;\n}\n\nexport function Stats(props: IProps): React.ReactElement {\n const [travelOpen, setTravelOpen] = useState(false);\n const setRerender = useState(false)[1];\n\n const inFaction = props.bladeburner.rank >= BladeburnerConstants.RankNeededForFaction;\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function openFaction(): void {\n if (!inFaction) return;\n const faction = Factions[FactionNames.Bladeburners];\n if (!faction.isMember) {\n joinFaction(faction);\n }\n\n props.router.toFaction(faction);\n }\n\n return (\n \n \n \n \n Rank 25 required. : \"\"}>\n \n \n \n \n setTravelOpen(false)} bladeburner={props.bladeburner} />\n \n \n Your rank within the Bladeburner division.}>\n Rank: {formatNumber(props.bladeburner.rank, 2)}\n \n \n
    \n \n \n Performing actions will use up your stamina.\n
    \n
    \n Your max stamina is determined primarily by your agility stat.\n
    \n
    \n Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads\n to a higher gain rate.\n
    \n
    \n Once your stamina falls below 50% of its max value, it begins to negatively affect the success rate of\n your contracts/operations. This penalty is shown in the overview panel. If the penalty is 15%, then this\n means your success rate would be multipled by 85% (100 - 15).\n
    \n
    \n Your max stamina and stamina gain rate can also be increased by training, or through skills and\n Augmentation upgrades.\n \n }\n >\n \n Stamina: {formatNumber(props.bladeburner.stamina, 3)} / {formatNumber(props.bladeburner.maxStamina, 3)}\n \n \n
    \n
    \n \n Stamina Penalty: {formatNumber((1 - props.bladeburner.calculateStaminaPenalty()) * 100, 1)}%\n \n
    \n Team Size: {formatNumber(props.bladeburner.teamSize, 0)}\n Team Members Lost: {formatNumber(props.bladeburner.teamLost, 0)}\n
    \n Num Times Hospitalized: {props.bladeburner.numHosp}\n \n Money Lost From Hospitalizations: \n \n
    \n Current City: {props.bladeburner.city}\n \n \n This is your Bladeburner division's estimate of how many Synthoids exist in your current city. An accurate\n population count increases success rate estimates.\n \n }\n >\n \n Est. Synthoid Population: {numeralWrapper.formatPopulation(props.bladeburner.getCurrentCity().popEst)}\n \n \n \n
    \n \n \n This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city.\n \n }\n >\n Synthoid Communities: {formatNumber(props.bladeburner.getCurrentCity().comms, 0)}\n \n \n
    \n \n \n The city's chaos level due to tensions and conflicts between humans and Synthoids. Having too high of a\n chaos level can make contracts and operations harder.\n \n }\n >\n City Chaos: {formatNumber(props.bladeburner.getCurrentCity().chaos)}\n \n \n
    \n {(props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000 > 15000 && (\n <>\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by\n browser). Bonus time makes the Bladeburner mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n \n Bonus time:{\" \"}\n {convertTimeMsToTimeElapsedString(\n (props.bladeburner.storedCycles / BladeburnerConstants.CyclesPerSecond) * 1000,\n )}\n \n \n \n
    \n \n )}\n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n
    \n \n Aug. Success Chance mult: {formatNumber(props.player.bladeburner_success_chance_mult * 100, 1)}%\n
    \n Aug. Max Stamina mult: {formatNumber(props.player.bladeburner_max_stamina_mult * 100, 1)}%\n
    \n Aug. Stamina Gain mult: {formatNumber(props.player.bladeburner_stamina_gain_mult * 100, 1)}%\n
    \n Aug. Field Analysis mult: {formatNumber(props.player.bladeburner_analysis_mult * 100, 1)}%\n
    \n
    \n
    \n );\n}\n","import React from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { WorldMap } from \"../../ui/React/WorldMap\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { Settings } from \"../../Settings/Settings\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n function travel(city: string): void {\n props.bladeburner.city = city;\n props.onClose();\n }\n\n return (\n \n <>\n \n Travel to a different city for your Bladeburner activities. This does not cost any money. The city you are in\n for your Bladeburner duties does not affect your location in the game otherwise.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Paper from \"@mui/material/Paper\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface ILineProps {\n content: any;\n}\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n textfield: {\n margin: theme.spacing(0),\n width: \"100%\",\n },\n input: {\n backgroundColor: theme.colors.backgroundsecondary,\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);\n\nfunction Line(props: ILineProps): React.ReactElement {\n return (\n \n {props.content}\n \n );\n}\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function Console(props: IProps): React.ReactElement {\n const classes = useStyles();\n const [command, setCommand] = useState(\"\");\n const setRerender = useState(false)[1];\n const consoleInput = useRef(null);\n\n function handleCommandChange(event: React.ChangeEvent): void {\n setCommand(event.target.value);\n }\n\n const [consoleHistoryIndex, setConsoleHistoryIndex] = useState(props.bladeburner.consoleHistory.length);\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 1000);\n return () => {\n clearInterval(id);\n };\n }, []);\n\n function handleKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) {\n event.preventDefault();\n if (command.length > 0) {\n props.bladeburner.postToConsole(\"> \" + command);\n props.bladeburner.executeConsoleCommands(props.player, command);\n setConsoleHistoryIndex(props.bladeburner.consoleHistory.length);\n setCommand(\"\");\n }\n }\n\n const consoleHistory = props.bladeburner.consoleHistory;\n\n if (event.key === KEY.UP_ARROW) {\n // up\n let i = consoleHistoryIndex;\n const len = consoleHistory.length;\n if (len === 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n if (i !== 0) {\n i = i - 1;\n }\n setConsoleHistoryIndex(i);\n const prevCommand = consoleHistory[i];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n\n if (event.key === KEY.DOWN_ARROW) {\n const i = consoleHistoryIndex;\n const len = consoleHistory.length;\n\n if (len == 0) {\n return;\n }\n if (i < 0 || i > len) {\n setConsoleHistoryIndex(len);\n }\n\n // Latest command, put nothing\n if (i == len || i == len - 1) {\n setConsoleHistoryIndex(len);\n event.currentTarget.value = \"\";\n } else {\n setConsoleHistoryIndex(consoleHistoryIndex + 1);\n const prevCommand = consoleHistory[consoleHistoryIndex + 1];\n event.currentTarget.value = prevCommand;\n setCommand(prevCommand);\n }\n }\n }\n\n function handleClick(): void {\n if (!consoleInput.current) return;\n consoleInput.current.focus();\n }\n\n return (\n \n \n \n \n \n \n \n \n \n ),\n spellCheck: false,\n }}\n />\n \n );\n}\n\ninterface ILogProps {\n entries: string[];\n}\n\nfunction Logs({ entries }: ILogProps): React.ReactElement {\n const scrollHook = useRef(null);\n\n // TODO: Text gets shifted up as new entries appear, if the user scrolled up it should attempt to keep the text focused\n function scrollToBottom(): void {\n if (!scrollHook.current) return;\n scrollHook.current.scrollTop = scrollHook.current.scrollHeight;\n }\n\n useEffect(() => {\n scrollToBottom();\n }, [entries.length]);\n\n return (\n \n {entries && entries.map((log: any, i: number) => )}\n \n );\n}\n","import React from \"react\";\nimport { GeneralActionPage } from \"./GeneralActionPage\";\nimport { ContractPage } from \"./ContractPage\";\nimport { OperationPage } from \"./OperationPage\";\nimport { BlackOpPage } from \"./BlackOpPage\";\nimport { SkillPage } from \"./SkillPage\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function AllPages(props: IProps): React.ReactElement {\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n return (\n <>\n \n \n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n {value === 3 && }\n {value === 4 && }\n \n \n );\n}\n","import * as React from \"react\";\nimport { GeneralActionList } from \"./GeneralActionList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionPage(props: IProps): React.ReactElement {\n return (\n <>\n These are generic actions that will assist you in your Bladeburner duties.\n \n \n );\n}\n","import React from \"react\";\nimport { GeneralActionElem } from \"./GeneralActionElem\";\nimport { Action } from \"../Action\";\nimport { GeneralActions } from \"../GeneralActions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function GeneralActionList(props: IProps): React.ReactElement {\n const actions: Action[] = [];\n for (const name of Object.keys(GeneralActions)) {\n if (GeneralActions.hasOwnProperty(name)) {\n actions.push(GeneralActions[name]);\n }\n }\n return (\n <>\n {actions.map((action: Action) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { GeneralActions } from \"../data/GeneralActions\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function GeneralActionElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive = props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = (function (): number {\n switch (props.action.name) {\n case \"Training\":\n case \"Field Analysis\":\n return 30;\n case \"Diplomacy\":\n case \"Hyperbolic Regeneration Chamber\":\n case \"Incite Violence\":\n return 60;\n case \"Recruitment\":\n return props.bladeburner.getRecruitmentTime(props.player);\n }\n return -1; // dead code\n })();\n const successChance =\n props.action.name === \"Recruitment\"\n ? Math.max(0, Math.min(props.bladeburner.getRecruitmentSuccessChance(props.player), 1))\n : -1;\n\n const actionData = GeneralActions[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n \n \n \n \n )}\n
    \n
    \n {actionData.desc}\n
    \n
    \n \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n {successChance !== -1 && (\n <>\n
    \n Estimated success chance: {formatNumber(successChance * 100, 1)}%\n \n )}\n
    \n
    \n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const GeneralActions: {\n [key: string]: IContract | undefined;\n} = {\n Training: {\n desc: (\n <>\n Improve your abilities at the Bladeburner unit's specialized training center. Doing this gives experience for\n all combat stats and also increases your max stamina.\n \n ),\n },\n\n \"Field Analysis\": {\n desc: (\n <>\n Mine and analyze Synthoid-related data. This improves the Bladeburner unit's intelligence on Synthoid locations\n and activities. Completing this action will improve the accuracy of your Synthoid population estimated in the\n current city.\n
    \n
    \n Does NOT require stamina.\n \n ),\n },\n\n Recruitment: {\n desc: (\n <>\n Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.\n
    \n
    \n Does NOT require stamina.\n \n ),\n },\n\n Diplomacy: {\n desc: (\n <>\n Improve diplomatic relations with the Synthoid population. Completing this action will reduce the Chaos level in\n your current city.\n
    \n
    \n Does NOT require stamina.\n \n ),\n },\n\n \"Hyperbolic Regeneration Chamber\": {\n desc: (\n <>\n Enter cryogenic stasis using the Bladeburner division's hi-tech Regeneration Chamber. This will slowly heal your\n wounds and slightly increase your stamina.\n
    \n
    \n \n ),\n },\n \"Incite Violence\": {\n desc: (\n <>\n Purposefully stir trouble in the synthoid community in order to gain a political edge. This will generate\n additional contracts and operations, at the cost of increased Chaos.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { ContractList } from \"./ContractList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Complete contracts in order to increase your Bladeburner rank and earn money. Failing a contract will cause you\n to lose HP, which can lead to hospitalization.\n
    \n
    \n You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more\n difficult, but grant more rank, experience, and money.\n
    \n \n \n );\n}\n","import React from \"react\";\nimport { ContractElem } from \"./ContractElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function ContractList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.contracts);\n const contracts = props.bladeburner.contracts;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Contracts } from \"../data/Contracts\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IAction } from \"../IAction\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: IAction;\n}\n\nexport function ContractElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Contract\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Contracts[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n )}\n
    \n
    \n \n
    \n
    \n \n {actionData.desc}\n
    \n
    \n \n
    \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
    \n Contracts remaining: {Math.floor(props.action.count)}\n
    \n Successes: {props.action.successes}\n
    \n Failures: {props.action.failures}\n
    \n
    \n \n
    \n );\n}\n","import React from \"react\";\n\ninterface IContract {\n desc: JSX.Element;\n}\n\nexport const Contracts: {\n [key: string]: IContract | undefined;\n} = {\n Tracking: {\n desc: (\n <>\n Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT\n engage. Stealth is of the utmost importance.\n
    \n
    \n Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever\n city you are currently in.\n \n ),\n },\n \"Bounty Hunter\": {\n desc: (\n <>\n Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.\n
    \n
    \n Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n Retirement: {\n desc: (\n <>\n Hunt down and retire (kill) rogue Synthoids.\n
    \n
    \n Successfully completing a Retirement contract will lower the population in your current city, and will also\n increase its chaos level.\n \n ),\n },\n};\n","import React from \"react\";\nimport { stealthIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function StealthIcon(): React.ReactElement {\n return This action involves stealth}>{stealthIcon};\n}\n","import React from \"react\";\nimport { killIcon } from \"../data/Icons\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nexport function KillIcon(): React.ReactElement {\n return This action involves retirement}>{killIcon};\n}\n","import * as React from \"react\";\nimport { OperationList } from \"./OperationList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Carry out operations for the Bladeburner division. Failing an operation will reduce your Bladeburner rank. It\n will also cause you to lose HP, which can lead to hospitalization. In general, operations are harder and more\n punishing than contracts, but are also more rewarding.\n
    \n
    \n Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary\n between different Operations.\n
    \n
    \n For operations, you can use a team. You must first recruit team members. Having a larger team will improve your\n chances of success.\n
    \n
    \n You can unlock higher-level operations by successfully completing them. Higher-level operations are more\n difficult, but grant more rank and experience.\n
    \n \n \n );\n}\n","import React from \"react\";\nimport { OperationElem } from \"./OperationElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function OperationList(props: IProps): React.ReactElement {\n const names = Object.keys(props.bladeburner.operations);\n const operations = props.bladeburner.operations;\n return (\n <>\n {names.map((name: string) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { ActionLevel } from \"./ActionLevel\";\nimport { Autolevel } from \"./Autolevel\";\nimport { StartButton } from \"./StartButton\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { Operation } from \"../Operation\";\nimport { Operations } from \"../data/Operations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: Operation;\n}\n\nexport function OperationElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"Operation\"] && props.action.name === props.bladeburner.action.name;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n const actionTime = props.action.getActionTime(props.bladeburner);\n\n const actionData = Operations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n ) : (\n <>\n \n \n \n \n )}\n
    \n
    \n\n \n
    \n
    \n \n {actionData.desc}\n
    \n
    \n \n
    \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
    \n Operations remaining: {Math.floor(props.action.count)}\n
    \n Successes: {props.action.successes}\n
    \n Failures: {props.action.failures}\n
    \n
    \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Action } from \"../Action\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n action: Action;\n open: boolean;\n onClose: () => void;\n}\n\nexport function TeamSizeModal(props: IProps): React.ReactElement {\n const [teamSize, setTeamSize] = useState();\n\n function confirmTeamSize(): void {\n if (teamSize === undefined) return;\n const num = Math.round(teamSize);\n if (isNaN(num) || num < 0) {\n dialogBoxCreate(\"Invalid value entered for number of Team Members (must be numeric, positive)\");\n } else {\n props.action.teamCount = num;\n }\n props.onClose();\n }\n\n function onTeamSize(event: React.ChangeEvent): void {\n const x = parseFloat(event.target.value);\n if (x > props.bladeburner.teamSize) setTeamSize(props.bladeburner.teamSize);\n else setTeamSize(x);\n }\n\n return (\n \n \n Enter the amount of team members you would like to take on this Op. If you do not have the specified number of\n team members, then as many as possible will be used. Note that team members may be lost during operations.\n \n \n \n \n );\n}\n","import React from \"react\";\n\ninterface IOperation {\n desc: JSX.Element;\n}\n\nexport const Operations: {\n [key: string]: IOperation | undefined;\n} = {\n Investigation: {\n desc: (\n <>\n As a field agent, investigate and identify Synthoid populations, movements, and operations.\n
    \n
    \n Successful Investigation ops will increase the accuracy of your synthoid data.\n
    \n
    \n You will NOT lose HP from failed Investigation ops.\n \n ),\n },\n \"Undercover Operation\": {\n desc: (\n <>\n Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.\n
    \n
    \n Successful Undercover ops will increase the accuracy of your synthoid data.\n \n ),\n },\n \"Sting Operation\": {\n desc: <>Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.,\n },\n Raid: {\n desc: (\n <>\n Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your\n current city in order for this Operation to be successful.\n \n ),\n },\n \"Stealth Retirement Operation\": {\n desc: (\n <>\n Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any\n attention. Stealth and discretion are key.\n \n ),\n },\n Assassination: {\n desc: (\n <>\n Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the\n Synthoid communities.\n \n ),\n },\n};\n","import * as React from \"react\";\nimport { BlackOpList } from \"./BlackOpList\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpPage(props: IProps): React.ReactElement {\n return (\n <>\n \n Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked\n successively by completing the one before it.\n
    \n
    \n Your ultimate goal to climb through the ranks of {FactionNames.Bladeburners} is to complete all of the Black Ops.\n
    \n
    \n Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank\n losses.\n
    \n \n \n );\n}\n","import React from \"react\";\nimport { BlackOperations } from \"../BlackOperations\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOpElem } from \"./BlackOpElem\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n}\n\nexport function BlackOpList(props: IProps): React.ReactElement {\n let blackops: BlackOperation[] = [];\n for (const blackopName of Object.keys(BlackOperations)) {\n if (BlackOperations.hasOwnProperty(blackopName)) {\n blackops.push(BlackOperations[blackopName]);\n }\n }\n blackops.sort(function (a, b) {\n return a.reqdRank - b.reqdRank;\n });\n\n blackops = blackops.filter(\n (blackop: BlackOperation, i: number) =>\n !(\n props.bladeburner.blackops[blackops[i].name] == null &&\n i !== 0 &&\n props.bladeburner.blackops[blackops[i - 1].name] == null\n ),\n );\n\n blackops = blackops.reverse();\n\n return (\n <>\n {blackops.map((blackop: BlackOperation) => (\n \n ))}\n \n );\n}\n","import React, { useState } from \"react\";\nimport { formatNumber, convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { ActionTypes } from \"../data/ActionTypes\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { TeamSizeButton } from \"./TeamSizeButton\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport { BlackOperation } from \"../BlackOperation\";\nimport { BlackOperations } from \"../data/BlackOperations\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { SuccessChance } from \"./SuccessChance\";\nimport { StartButton } from \"./StartButton\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n player: IPlayer;\n action: BlackOperation;\n}\n\nexport function BlackOpElem(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const isCompleted = props.bladeburner.blackops[props.action.name] != null;\n if (isCompleted) {\n return (\n \n {props.action.name} (COMPLETED)\n \n );\n }\n\n const isActive =\n props.bladeburner.action.type === ActionTypes[\"BlackOperation\"] &&\n props.action.name === props.bladeburner.action.name;\n const actionTime = props.action.getActionTime(props.bladeburner);\n const hasReqdRank = props.bladeburner.rank >= props.action.reqdRank;\n const computedActionTimeCurrent = Math.min(\n props.bladeburner.actionTimeCurrent + props.bladeburner.actionTimeOverflow,\n props.bladeburner.actionTimeToComplete,\n );\n\n const actionData = BlackOperations[props.action.name];\n if (actionData === undefined) {\n throw new Error(`Cannot find data for ${props.action.name}`);\n }\n\n return (\n \n {isActive ? (\n <>\n <>\n \n \n (IN PROGRESS - {formatNumber(computedActionTimeCurrent, 0)} /{\" \"}\n {formatNumber(props.bladeburner.actionTimeToComplete, 0)})\n \n \n {createProgressBarText({\n progress: computedActionTimeCurrent / props.bladeburner.actionTimeToComplete,\n })}\n \n \n \n ) : (\n <>\n \n\n \n \n \n )}\n\n
    \n
    \n {actionData.desc}\n
    \n
    \n \n Required Rank: {formatNumber(props.action.reqdRank, 0)}\n \n
    \n \n \n
    \n Time Required: {convertTimeMsToTimeElapsedString(actionTime * 1000)}\n
    \n
    \n );\n}\n","import React from \"react\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\nimport { CityName } from \"../../Locations/data/CityNames\";\nimport { BlackOperationNames } from \"./BlackOperationNames\";\n\ninterface IBlackOp {\n desc: JSX.Element;\n}\n\nexport const BlackOperations: {\n [key: string]: IBlackOp | undefined;\n} = {\n [BlackOperationNames.OperationTyphoon]: {\n desc: (\n <>\n Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that\n Zenyatta, along with the rest of the PMC, is a Synthoid.\n
    \n
    \n The goal of {BlackOperationNames.OperationTyphoon} is to find and eliminate Zenyatta and RedWater by any means necessary. After the\n task is completed, the actions must be covered up from the general public.\n \n ),\n },\n\n [BlackOperationNames.OperationZero]: {\n desc: (\n <>\n AeroCorp is one of the world's largest defense contractors. Its leader, Steve Watataki, is thought to be a\n supporter of Synthoid rights. He must be removed.\n
    \n
    \n The goal of {BlackOperationNames.OperationZero} is to covertly infiltrate AeroCorp and uncover any incriminating evidence or\n information against Watataki that will cause him to be removed from his position at AeroCorp. Incriminating\n evidence can be fabricated as a last resort. Be warned that AeroCorp has some of the most advanced security\n measures in the world.\n \n ),\n },\n [BlackOperationNames.OperationX]: {\n desc: (\n <>\n We have recently discovered an underground publication group called Samizdat. Even though most of their\n publications are nonsensical conspiracy theories, the average human is gullible enough to believe them. Many of\n their works discuss Synthoids and pose a threat to society. The publications are spreading rapidly in China and\n other Eastern countries.\n
    \n
    \n Samizdat has done a good job of keeping hidden and anonymous. However, we've just received intelligence that\n their base of operations is in {CityName.Ishima}'s underground sewer systems. Your task is to investigate the sewer\n systems, and eliminate Samizdat. They must never publish anything again.\n \n ),\n },\n [BlackOperationNames.OperationTitan]: {\n desc: (\n <>\n Several months ago Titan Laboratories' Bioengineering department was infiltrated by Synthoids. As far as we\n know, Titan Laboratories' management has no knowledge about this. We don't know what the Synthoids are up to,\n but the research that they could be conducting using Titan Laboraties' vast resources is potentially very\n dangerous.\n
    \n
    \n Your goal is to enter and destroy the Bioengineering department's facility in {CityName.Aevum}. The task is not just to\n retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to\n the Synthoids and their goals.\n \n ),\n },\n [BlackOperationNames.OperationAres]: {\n desc: (\n <>\n One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai\n between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy\n weapons. It is critical for the safety of humanity that this deal does not happen.\n
    \n
    \n Your task is to intercept the deal. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationArchangel]: {\n desc: (\n <>\n Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI\n Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms\n trafficking operation.\n
    \n
    \n The goal of this operation is to take out the leaders that are running the Red Rabbit brothel. Try to limit the\n number of other casualties, but do what you must to complete the mission.\n \n ),\n },\n [BlackOperationNames.OperationJuggernaut]: {\n desc: (\n <>\n The CIA has just encountered a new security threat. A new criminal group, lead by a shadowy operative who calls\n himself Juggernaut, has been smuggling drugs and weapons (including suspected bioweapons) into {CityName.Sector12}. We\n also have reason to believe they tried to break into one of Universal Energy's facilities in order to cause a\n city-wide blackout. The CIA suspects that Juggernaut is a heavily-augmented Synthoid, and have thus enlisted our\n help.\n
    \n
    \n Your mission is to eradicate Juggernaut and his followers.\n \n ),\n },\n [BlackOperationNames.OperationRedDragon]: {\n desc: (\n <>\n The {FactionNames.Tetrads} criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they\n altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster\n their criminal activities.\n
    \n
    \n Your task is to infiltrate and destroy the {FactionNames.Tetrads}' base of operations in Los Angeles. Intelligence tells us\n that their base houses one of their Synthoid manufacturing units.\n \n ),\n },\n [BlackOperationNames.OperationK]: {\n desc: (\n <>\n CODE RED SITUATION. Our intelligence tells us that VitaLife has discovered a new android cloning technology.\n This technology is supposedly capable of cloning Synthoid, not only physically but also their advanced AI\n modules. We do not believe that VitaLife is trying to use this technology illegally or maliciously, but if any\n Synthoids were able to infiltrate the corporation and take advantage of this technology then the results would\n be catastrophic.\n
    \n
    \n We do not have the power or jurisdiction to shut this down through legal or political means, so we must resort\n to a covert operation. Your goal is to destroy this technology and eliminate anyone who was involved in its\n creation.\n \n ),\n },\n [BlackOperationNames.OperationDeckard]: {\n desc: (\n <>\n Despite your success in eliminating VitaLife's new android-replicating technology in {BlackOperationNames.OperationK}, we've\n discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the\n technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones\n from the Synthoid Uprising.\n
    \n
    \n The goal of {BlackOperationNames.OperationDeckard} is to hunt down these Synthoids and retire them. I don't need to tell you how\n critical this mission is.\n \n ),\n },\n [BlackOperationNames.OperationTyrell]: {\n desc: (\n <>\n A week ago {FactionNames.BladeIndustries} reported a small break-in at one of their {CityName.Aevum} Augmentation storage facilities. We\n figured out that {FactionNames.TheDarkArmy} was behind the heist, and didn't think any more of it. However, we've just\n discovered that several known MK-VI Synthoids were part of that break-in group.\n
    \n
    \n We cannot have Synthoids upgrading their already-enhanced abilities with Augmentations. Your task is to hunt\n down associated {FactionNames.TheDarkArmy} members and eliminate them.\n \n ),\n },\n [BlackOperationNames.OperationWallace]: {\n desc: (\n <>\n Based on information gathered from {BlackOperationNames.OperationTyrell}, we've discovered that {FactionNames.TheDarkArmy} was well aware that\n there were Synthoids amongst their ranks. Even worse, we believe that {FactionNames.TheDarkArmy} is working together with\n other criminal organizations such as {FactionNames.TheSyndicate} and that they are planning some sort of large-scale takeover\n of multiple major cities, most notably {CityName.Aevum}. We suspect that Synthoids have infiltrated the ranks of these\n criminal factions and are trying to stage another Synthoid uprising.\n
    \n
    \n The best way to deal with this is to prevent it before it even happens. The goal of {BlackOperationNames.OperationWallace} is to\n destroy {FactionNames.TheDarkArmy} and Syndicate factions in {CityName.Aevum} immediately. Leave no survivors.\n \n ),\n },\n [BlackOperationNames.OperationShoulderOfOrion]: {\n desc: (\n <>\n China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using\n Synthoids. We believe China is trying to establish the first off-world colonies.\n
    \n
    \n The mission is to prevent this launch without instigating an international conflict. When you accept this\n mission you will be officially disavowed by the NSA and the national government until after you successfully\n return. In the event of failure, all of the operation's team members must not let themselves be captured alive.\n \n ),\n },\n [BlackOperationNames.OperationHyron]: {\n desc: (\n <>\n Our intelligence tells us that {FactionNames.FulcrumSecretTechnologies} is developing a quantum supercomputer using human brains as\n core processors. This supercomputer is rumored to be able to store vast amounts of data and perform computations\n unmatched by any other supercomputer on the planet. But more importantly, the use of organic human brains means\n that the supercomputer may be able to reason abstractly and become self-aware.\n
    \n
    \n I do not need to remind you why sentient-level AIs pose a serious threat to all of mankind.\n
    \n
    \n The research for this project is being conducted at one of {FactionNames.FulcrumSecretTechnologies} secret facilities in {CityName.Aevum},\n codenamed 'Alpha Ranch'. Infiltrate the compound, delete and destroy the work, and then find and kill the\n project lead.\n \n ),\n },\n [BlackOperationNames.OperationMorpheus]: {\n desc: (\n <>\n DreamSense Technologies is an advertising company that uses special technology to transmit their ads into the\n people's dreams and subconcious. They do this using broadcast transmitter towers. Based on information from our\n agents and informants in {CityName.Chongqing}, we have reason to believe that one of the broadcast towers there has been\n compromised by Synthoids and is being used to spread pro-Synthoid propaganda.\n
    \n
    \n The mission is to destroy this broadcast tower. Speed and stealth are of the utmost importance for this.\n \n ),\n },\n [BlackOperationNames.OperationIonStorm]: {\n desc: (\n <>\n Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the {CityName.Sector12} Slums.\n We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling\n weapons, money, and other resources. This makes them dangerous.\n
    \n
    \n This is a full-scale assault operation to find and retire all of these Synthoids in the {CityName.Sector12} Slums.\n \n ),\n },\n [BlackOperationNames.OperationAnnihilus]: {\n desc: (\n <>\n Our superiors have ordered us to eradicate everything and everyone in an underground facility located in {CityName.Aevum}.\n They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called\n '{FactionNames.TheCovenant}'. We have no prior intelligence about this organization, so you are going in blind.\n \n ),\n },\n [BlackOperationNames.OperationUltron]: {\n desc: (\n <>\n {FactionNames.OmniTekIncorporated}, the original designer and manufacturer of Synthoids, has notified us of a malfunction in\n their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the\n destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the\n Uprising.\n
    \n
    \n {FactionNames.OmniTekIncorporated} has also told us they they believe someone has triggered this malfunction in a large group of MK-VI\n Synthoids, and that these newly-radicalized Synthoids are now amassing in {CityName.Volhaven} to form a terrorist group\n called Ultron.\n
    \n
    \n Intelligence suggests Ultron is heavily armed and that their members are augmented. We believe Ultron is making\n moves to take control of and weaponize DeltaOne's Tactical High-Energy Satellite Laser Array (THESLA).\n
    \n
    \n Your task is to find and destroy Ultron.\n \n ),\n },\n [BlackOperationNames.OperationCenturion]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
    \n
    \n Throughout all of humanity's history, we have relied on technology to survive, conquer, and progress. Its\n advancement became our primary goal. And at the peak of human civilization technology turned into power. Global,\n absolute power.\n
    \n
    \n It seems that the universe is not without a sense of irony.\n
    \n
    \n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationVindictus]: {\n desc: (\n <>\n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n
    \n
    \n The bits are all around us. The daemons that hold the Node together can manifest themselves in many different\n ways.\n
    \n
    \n {\"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)\"}\n \n ),\n },\n [BlackOperationNames.OperationDaedalus]: {\n desc: <> Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.,\n },\n};\n","import React, { useState } from \"react\";\nimport { SkillList } from \"./SkillList\";\nimport { BladeburnerConstants } from \"../data/Constants\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\nimport Typography from \"@mui/material/Typography\";\ninterface IProps {\n bladeburner: IBladeburner;\n}\n\nexport function SkillPage(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const mults = props.bladeburner.skillMultipliers;\n\n function valid(mult: any): boolean {\n return mult && mult !== 1;\n }\n\n return (\n <>\n \n Skill Points: {formatNumber(props.bladeburner.skillPoints, 0)}\n \n \n You will gain one skill point every {BladeburnerConstants.RanksPerSkillPoint} ranks.\n
    \n Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different\n skills with each other is multiplicative.\n
    \n {valid(mults[\"successChanceAll\"]) && (\n Total Success Chance: x{formatNumber(mults[\"successChanceAll\"], 3)}\n )}\n {valid(mults[\"successChanceStealth\"]) && (\n Stealth Success Chance: x{formatNumber(mults[\"successChanceStealth\"], 3)}\n )}\n {valid(mults[\"successChanceKill\"]) && (\n Retirement Success Chance: x{formatNumber(mults[\"successChanceKill\"], 3)}\n )}\n {valid(mults[\"successChanceContract\"]) && (\n Contract Success Chance: x{formatNumber(mults[\"successChanceContract\"], 3)}\n )}\n {valid(mults[\"successChanceOperation\"]) && (\n Operation Success Chance: x{formatNumber(mults[\"successChanceOperation\"], 3)}\n )}\n {valid(mults[\"successChanceEstimate\"]) && (\n Synthoid Data Estimate: x{formatNumber(mults[\"successChanceEstimate\"], 3)}\n )}\n {valid(mults[\"actionTime\"]) && Action Time: x{formatNumber(mults[\"actionTime\"], 3)}}\n {valid(mults[\"effHack\"]) && Hacking Skill: x{formatNumber(mults[\"effHack\"], 3)}}\n {valid(mults[\"effStr\"]) && Strength: x{formatNumber(mults[\"effStr\"], 3)}}\n {valid(mults[\"effDef\"]) && Defense: x{formatNumber(mults[\"effDef\"], 3)}}\n {valid(mults[\"effDex\"]) && Dexterity: x{formatNumber(mults[\"effDex\"], 3)}}\n {valid(mults[\"effAgi\"]) && Agility: x{formatNumber(mults[\"effAgi\"], 3)}}\n {valid(mults[\"effCha\"]) && Charisma: x{formatNumber(mults[\"effCha\"], 3)}}\n {valid(mults[\"effInt\"]) && Intelligence: x{formatNumber(mults[\"effInt\"], 3)}}\n {valid(mults[\"stamina\"]) && Stamina: x{formatNumber(mults[\"stamina\"], 3)}}\n {valid(mults[\"money\"]) && Contract Money: x{formatNumber(mults[\"money\"], 3)}}\n {valid(mults[\"expGain\"]) && Exp Gain: x{formatNumber(mults[\"expGain\"], 3)}}\n setRerender((old) => !old)} />\n \n );\n}\n\n/*\n\n\n\n\nvar multKeys = Object.keys(this.skillMultipliers);\nfor (var i = 0; i < multKeys.length; ++i) {\n var mult = this.skillMultipliers[multKeys[i]];\n if (mult && mult !== 1) {\n mult = formatNumber(mult, 3);\n switch(multKeys[i]) {\n\n }\n }\n}\n*/\n","import * as React from \"react\";\nimport { SkillElem } from \"./SkillElem\";\nimport { Skills } from \"../Skills\";\nimport { IBladeburner } from \"../IBladeburner\";\n\ninterface IProps {\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillList(props: IProps): React.ReactElement {\n return (\n <>\n {Object.keys(Skills).map((skill: string) => (\n \n ))}\n \n );\n}\n","import React from \"react\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { IBladeburner } from \"../IBladeburner\";\n\nimport Typography from \"@mui/material/Typography\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport AddIcon from \"@mui/icons-material/Add\";\nimport CloseIcon from \"@mui/icons-material/Close\";\n\ninterface IProps {\n skill: any;\n bladeburner: IBladeburner;\n onUpgrade: () => void;\n}\n\nexport function SkillElem(props: IProps): React.ReactElement {\n const skillName = props.skill.name;\n let currentLevel = 0;\n if (props.bladeburner.skills[skillName] && !isNaN(props.bladeburner.skills[skillName])) {\n currentLevel = props.bladeburner.skills[skillName];\n }\n const pointCost = props.skill.calculateCost(currentLevel);\n\n const canLevel = props.bladeburner.skillPoints >= pointCost;\n const maxLvl = props.skill.maxLvl ? currentLevel >= props.skill.maxLvl : false;\n\n function onClick(): void {\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 (\n \n \n \n {!canLevel || maxLvl ? (\n \n \n \n ) : (\n \n \n \n )}\n \n Level: {currentLevel}\n {maxLvl ? (\n MAX LEVEL\n ) : (\n Skill Points required: {formatNumber(pointCost, 0)}\n )}\n {props.skill.desc}\n \n );\n}\n","/**\n * React Component for all the gang stuff.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { ManagementSubpage } from \"./ManagementSubpage\";\nimport { TerritorySubpage } from \"./TerritorySubpage\";\nimport { EquipmentsSubpage } from \"./EquipmentsSubpage\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function GangRoot(): React.ReactElement {\n const player = use.Player();\n const gang = (function () {\n if (player.gang === null) throw new Error(\"Gang should not be null\");\n return player.gang;\n })();\n const [value, setValue] = React.useState(0);\n\n function handleChange(event: React.SyntheticEvent, tab: number): void {\n setValue(tab);\n }\n\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n \n \n \n {value === 0 && }\n {value === 1 && }\n {value === 2 && }\n \n );\n}\n","/**\n * React Component for the subpage that manages gang members, the main page.\n */\nimport React from \"react\";\nimport { GangStats } from \"./GangStats\";\nimport { GangMemberList } from \"./GangMemberList\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\n\nexport function ManagementSubpage(): React.ReactElement {\n const gang = useGang();\n return (\n <>\n \n This page is used to manage your gang members and get an overview of your gang's stats.\n
    \n
    \n If a gang member is not earning much money or respect, the task that you have assigned to that member might be\n too difficult. Consider training that member's stats or choosing an easier task. The tasks closer to the top of\n the dropdown list are generally easier. Alternatively, the gang member's low production might be due to the fact\n that your wanted level is too high. Consider assigning a few members to the '\n {gang.isHackingGang ? \"Ethical Hacking\" : \"Vigilante Justice\"}' task to lower your wanted level.\n
    \n
    \n Installing Augmentations does NOT reset your progress with your Gang. Furthermore, after installing\n Augmentations, you will automatically be a member of whatever Faction you created your gang with.\n
    \n
    \n You can also manage your gang programmatically through Netscript using the Gang API\n
    \n
    \n \n
    \n \n \n );\n}\n","/**\n * React Component for the stats related to the gang, like total respect and\n * money per second.\n */\nimport React from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { AllGangs } from \"../AllGangs\";\nimport { BonusTime } from \"./BonusTime\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nexport function GangStats(): React.ReactElement {\n const gang = useGang();\n const territoryMult = AllGangs[gang.facName].territory * 100;\n let territoryStr;\n if (territoryMult <= 0) {\n territoryStr = formatNumber(0, 2);\n } else if (territoryMult >= 100) {\n territoryStr = formatNumber(100, 2);\n } else {\n territoryStr = formatNumber(territoryMult, 2);\n }\n\n return (\n <>\n \n \n Represents the amount of respect your gang has from other gangs and criminal organizations. Your respect\n affects the amount of money your gang members will earn, and also determines how much reputation you are\n earning with your gang's corresponding Faction.\n \n }\n >\n \n Respect: {numeralWrapper.formatRespect(gang.respect)} (\n {numeralWrapper.formatRespect(5 * gang.respectGainRate)} / sec)\n \n \n \n\n \n \n Represents how much the gang is wanted by law enforcement. The higher your gang's wanted level, the harder\n it will be for your gang members to make money and earn respect. Note that the minimum wanted level is 1.\n \n }\n >\n \n Wanted Level: {numeralWrapper.formatWanted(gang.wanted)} (\n {numeralWrapper.formatWanted(5 * gang.wantedGainRate)} / sec)\n \n \n \n\n \n Penalty for respect and money gain rates due to Wanted Level}>\n Wanted Level Penalty: -{formatNumber((1 - gang.getWantedPenalty()) * 100, 2)}%\n \n \n\n \n Money gain rate: \n \n\n \n The percentage of total territory your Gang controls}>\n Territory: {territoryStr}%\n \n \n \n Faction reputation: \n \n\n \n \n );\n}\n","/**\n * React Component for displaying the bonus time remaining.\n */\nimport * as React from \"react\";\nimport { Gang } from \"../Gang\";\nimport { CONSTANTS } from \"../../Constants\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n gang: Gang;\n}\n\nexport function BonusTime(props: IProps): React.ReactElement {\n const CyclerPerSecond = 1000 / CONSTANTS._idleSpeed;\n if ((props.gang.storedCycles / CyclerPerSecond) * 1000 <= 5000) return <>;\n const bonusMillis = (props.gang.storedCycles / CyclerPerSecond) * 1000;\n return (\n \n \n You gain bonus time while offline or when the game is inactive (e.g. when the tab is throttled by the\n browser). Bonus time makes the Gang mechanic progress faster, up to 5x the normal speed.\n \n }\n >\n Bonus time: {convertTimeMsToTimeElapsedString(bonusMillis)}\n \n \n );\n}\n","/**\n * React Component for the list of gang members on the management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberCard } from \"./GangMemberCard\";\nimport { RecruitButton } from \"./RecruitButton\";\nimport { useGang } from \"./Context\";\n\nimport { Box, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { GangMember } from \"../GangMember\";\nimport { OptionSwitch } from \"../../ui/React/OptionSwitch\";\n\nexport function GangMemberList(): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n const [filter, setFilter] = useState(\"\");\n const [ascendOnly, setAscendOnly] = useState(false);\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n }\n\n const members = gang.members\n .filter((member) => member && member.name.toLowerCase().includes(filter))\n .filter((member) => {\n if (ascendOnly) return member.canAscend();\n return true;\n });\n\n return (\n <>\n setRerender((old) => !old)} />\n ,\n spellCheck: false\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: '15%' }}\n />\n (setAscendOnly(newValue))}\n text=\"Show only ascendable\"\n tooltip={\n <>\n Filter the members list by whether or not the member\n can be ascended.\n \n }\n />\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","/**\n * React Component for a gang member on the management subpage.\n */\nimport React from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { GangMemberCardContent } from \"./GangMemberCardContent\";\n\nimport Box from \"@mui/material/Box\";\n\nimport ListItemText from \"@mui/material/ListItemText\";\nimport Paper from \"@mui/material/Paper\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCard(props: IProps): React.ReactElement {\n return (\n \n \n {props.member.name}} />\n \n \n \n );\n}\n","/**\n * React Component for the content of the accordion of gang members on the\n * management subpage.\n */\nimport React, { useState } from \"react\";\nimport { GangMemberStats } from \"./GangMemberStats\";\nimport { TaskSelector } from \"./TaskSelector\";\nimport { AscensionModal } from \"./AscensionModal\";\n\nimport { Box } from \"@mui/system\";\nimport { Button, Typography } from \"@mui/material\";\nimport HelpIcon from \"@mui/icons-material/Help\";\n\nimport { GangMember } from \"../GangMember\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberCardContent(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n const [helpOpen, setHelpOpen] = useState(false);\n const [ascendOpen, setAscendOpen] = useState(false);\n\n return (\n <>\n {props.member.canAscend() && (\n \n \n setAscendOpen(false)}\n member={props.member}\n onAscend={() => setRerender((old) => !old)}\n />\n \n setHelpOpen(false)}>\n \n Ascending a Gang Member resets the member's progress and stats in exchange for a permanent boost to their\n stat multipliers.\n
    \n
    \n The additional stat multiplier that the Gang Member gains upon ascension is based on the amount of exp\n they have.\n
    \n
    \n Upon ascension, the member will lose all of its non-Augmentation Equipment and your gang will lose respect\n equal to the total respect earned by the member.\n
    \n
    \n
    \n )}\n \n \n setRerender((old) => !old)} member={props.member} />\n \n \n );\n}\n","/**\n * React Component for the first part of a gang member details.\n * Contains skills and exp.\n */\nimport React from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { Table, TableBody, TableCell, TableRow } from \"@mui/material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMember } from \"../GangMember\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\nimport { characterOverviewStyles as useStyles } from \"../../ui/React/CharacterOverview\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function GangMemberStats(props: IProps): React.ReactElement {\n const classes = useStyles();\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\n const gang = useGang();\n const data = [\n [`Money:`, ],\n [`Respect:`, `${numeralWrapper.formatRespect(5 * props.member.calculateRespectGain(gang))} / sec`],\n [`Wanted Level:`, `${numeralWrapper.formatWanted(5 * props.member.calculateWantedLevelGain(gang))} / sec`],\n [`Total Respect:`, `${numeralWrapper.formatRespect(props.member.earnedRespect)}`],\n ];\n\n return (\n <>\n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.hack)}{\" \"}\n Asc)\n
    \n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.str)}{\" \"}\n Asc)\n
    \n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.def)}{\" \"}\n Asc)\n
    \n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.dex)}{\" \"}\n Asc)\n
    \n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.agi)}{\" \"}\n Asc)\n
    \n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.cha)}{\" \"}\n Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n
    \n
    \n
    \n {data.map(([a, b]) => (\n \n \n {a}\n \n \n {b}\n \n \n ))}\n
    \n
    \n \n \n );\n}\n","import React from \"react\";\nimport { Modal } from \"./Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n killScripts: () => void;\n}\n\nexport function KillScriptsModal(props: IProps): React.ReactElement {\n function onClick(): void {\n props.killScripts();\n props.onClose();\n }\n\n return (\n \n Forcefully kill all running scripts? This will also save your game and reload the game.\n \n \n );\n}\n","/**\n * React Component for the middle part of the gang member accordion. Contains\n * the task selector as well as some stats.\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\nimport { TaskDescription } from \"./TaskDescription\";\n\nimport { Box } from \"@mui/material\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\nimport { GangMember } from \"../GangMember\";\n\ninterface IProps {\n member: GangMember;\n onTaskChange: () => void;\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const gang = useGang();\n const [currentTask, setCurrentTask] = useState(props.member.task);\n\n const contextMember = gang.members.find(member => member.name == props.member.name)\n if (contextMember &&\n contextMember.task != currentTask\n ) {\n setCurrentTask(contextMember.task)\n }\n\n function onChange(event: SelectChangeEvent): void {\n const task = event.target.value;\n props.member.assignToTask(task);\n setCurrentTask(task);\n props.onTaskChange();\n }\n\n const tasks = gang.getAllTaskNames();\n\n return (\n \n \n \n \n );\n}\n","/**\n * React Component for left side of the gang member accordion, contains the\n * description of the task that member is currently doing.\n */\nimport React from \"react\";\nimport { GangMemberTasks } from \"../GangMemberTasks\";\nimport { GangMember } from \"../GangMember\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n member: GangMember;\n}\n\nexport function TaskDescription(props: IProps): React.ReactElement {\n const task = GangMemberTasks[props.member.task];\n const desc = task ? task.desc : GangMemberTasks[\"Unassigned\"].desc;\n\n return ;\n}\n","/**\n * React Component for the content of the popup before the player confirms the\n * ascension of a gang member.\n */\nimport React, { useState, useEffect } from \"react\";\nimport { GangMember } from \"../GangMember\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n member: GangMember;\n onAscend: () => void;\n}\n\nexport function AscensionModal(props: IProps): React.ReactElement {\n const gang = useGang();\n const setRerender = useState(false)[1];\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 1000);\n return () => clearInterval(id);\n }, []);\n\n function confirm(): void {\n props.onAscend();\n const res = gang.ascendMember(props.member);\n dialogBoxCreate(\n <>\n You ascended {props.member.name}!
    \n
    \n Your gang lost {numeralWrapper.formatRespect(res.respect)} respect.\n
    \n
    \n {props.member.name} gained the following stat multipliers for ascending:\n
    \n Hacking: x{numeralWrapper.format(res.hack, \"0.000\")}\n
    \n Strength: x{numeralWrapper.format(res.str, \"0.000\")}\n
    \n Defense: x{numeralWrapper.format(res.def, \"0.000\")}\n
    \n Dexterity: x{numeralWrapper.format(res.dex, \"0.000\")}\n
    \n Agility: x{numeralWrapper.format(res.agi, \"0.000\")}\n
    \n Charisma: x{numeralWrapper.format(res.cha, \"0.000\")}\n
    \n \n );\n props.onClose();\n }\n\n // const ascendBenefits = props.member.getAscensionResults();\n const preAscend = props.member.getCurrentAscensionMults();\n const postAscend = props.member.getAscensionMultsAfterAscend();\n\n return (\n \n \n Are you sure you want to ascend this member? They will lose all of\n
    \n their non-Augmentation upgrades and their stats will reset back to 1.\n
    \n
    \n Furthermore, your gang will lose {numeralWrapper.formatRespect(props.member.earnedRespect)} respect\n
    \n
    \n In return, they will gain the following permanent boost to stat multipliers:\n
    \n Hacking: x{numeralWrapper.format(preAscend.hack, \"0.000\")} => x\n {numeralWrapper.format(postAscend.hack, \"0.000\")}\n
    \n Strength: x{numeralWrapper.format(preAscend.str, \"0.000\")} => x\n {numeralWrapper.format(postAscend.str, \"0.000\")}\n
    \n Defense: x{numeralWrapper.format(preAscend.def, \"0.000\")} => x\n {numeralWrapper.format(postAscend.def, \"0.000\")}\n
    \n Dexterity: x{numeralWrapper.format(preAscend.dex, \"0.000\")} => x\n {numeralWrapper.format(postAscend.dex, \"0.000\")}\n
    \n Agility: x{numeralWrapper.format(preAscend.agi, \"0.000\")} => x\n {numeralWrapper.format(postAscend.agi, \"0.000\")}\n
    \n Charisma: x{numeralWrapper.format(preAscend.cha, \"0.000\")} => x\n {numeralWrapper.format(postAscend.cha, \"0.000\")}\n
    \n
    \n \n
    \n );\n}\n","/**\n * React Component for the recruitment button and text on the gang main page.\n */\nimport React, { useState } from \"react\";\nimport { RecruitModal } from \"./RecruitModal\";\nimport { GangConstants } from \"../data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n onRecruit: () => void;\n}\n\nexport function RecruitButton(props: IProps): React.ReactElement {\n const gang = useGang();\n const [open, setOpen] = useState(false);\n if (gang.members.length >= GangConstants.MaximumGangMembers) {\n return <>;\n }\n\n if (!gang.canRecruitMember()) {\n const respect = gang.getRespectNeededToRecruitMember();\n return (\n \n \n {numeralWrapper.formatRespect(respect)} respect needed to recruit next member\n \n );\n }\n\n return (\n <>\n \n \n \n setOpen(false)} onRecruit={props.onRecruit} />\n \n );\n}\n","/**\n * React Component for the popup used to recruit new gang members.\n */\nimport React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { useGang } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IRecruitPopupProps {\n open: boolean;\n onClose: () => void;\n onRecruit: () => void;\n}\n\nexport function RecruitModal(props: IRecruitPopupProps): React.ReactElement {\n const gang = useGang();\n const [name, setName] = useState(\"\");\n\n const disabled = name === \"\" || !gang.canRecruitMember();\n function recruit(): void {\n if (disabled) return;\n // At this point, the only way this can fail is if you already\n // have a gang member with the same name\n if (!gang.recruitMember(name)) {\n dialogBoxCreate(\"You already have a gang member with this name!\");\n return;\n }\n\n props.onRecruit();\n props.onClose();\n }\n\n function onKeyUp(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) recruit();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n return (\n \n Enter a name for your new Gang member:\n
    \n \n Recruit\n \n ),\n }}\n />\n
    \n );\n}\n","/**\n * React Component for the territory subpage.\n */\nimport React, { useState } from \"react\";\n\nimport {\n Container,\n Button,\n Paper,\n Box,\n Tooltip,\n Switch,\n FormControlLabel,\n Typography\n} from \"@mui/material\";\nimport { Help } from \"@mui/icons-material\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { formatNumber } from \"../../utils/StringHelperFunctions\";\n\nimport { AllGangs } from \"../AllGangs\";\n\nimport { useGang } from \"./Context\";\nimport { TerritoryInfoModal } from \"./TerritoryInfoModal\";\n\nexport function TerritorySubpage(): React.ReactElement {\n const gang = useGang();\n const gangNames = Object.keys(AllGangs).filter((g) => g != gang.facName);\n const [infoOpen, setInfoOpen] = useState(false);\n\n return (\n \n \n This page shows how much territory your Gang controls. This statistic is listed as a percentage, which\n represents how much of the total territory you control.\n \n\n \n\n \n \n {gang.facName} (Your gang)\n \n\n (gang.territoryWarfareEngaged = event.target.checked)}\n />}\n label={\n Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance\n to gradually decrease until it reaches 0%.\n
    }>\n Engage in Territory Warfare\n } />\n
    \n (gang.notifyMemberDeath = event.target.checked)}\n />}\n label={\n If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies\n in a territory clash.\n }>\n Notify about Gang Member Deaths\n } />\n\n \n Territory Clash Chance: {numeralWrapper.formatPercentage(gang.territoryClashChance, 3)}
    \n Power: {formatNumber(AllGangs[gang.facName].power, 3)}
    \n Territory: {formatTerritory(AllGangs[gang.facName].territory)}%
    \n
    \n \n \n {gangNames.map((name) => (\n \n ))}\n \n setInfoOpen(false)} />\n \n );\n}\nfunction formatTerritory(n: number): string {\n const v = n * 100;\n const precision = 3;\n if (v <= 0) {\n return formatNumber(0, precision);\n } else if (v >= 100) {\n return formatNumber(100, precision);\n } else {\n return formatNumber(v, precision);\n }\n}\n\ninterface ITerritoryProps {\n name: string;\n}\n\nfunction OtherGangTerritory(props: ITerritoryProps): React.ReactElement {\n const gang = useGang();\n const playerPower = AllGangs[gang.facName].power;\n const power = AllGangs[props.name].power;\n const clashVictoryChance = playerPower / (power + playerPower);\n return (\n \n \n {props.name}\n \n \n Power: {formatNumber(power, 3)}
    \n Territory: {formatTerritory(AllGangs[props.name].territory)}%
    \n Clash Win Chance: {numeralWrapper.formatPercentage(clashVictoryChance, 3)}\n
    \n
    \n );\n}\n","import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\n\nimport { Modal } from \"../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport const TerritoryInfoModal = ({ open, onClose }: IProps): React.ReactElement => {\n return (\n \n <>\n \n Clashing\n \n \n Every ~20 seconds, your gang has a chance to 'clash' with other gangs. Your chance to win a clash depends on\n your gang's power, which is listed in the display below. Your gang's power slowly accumulates over time. The\n accumulation rate is determined by the stats of all Gang members you have assigned to the 'Territory Warfare'\n task. Gang members that are not assigned to this task do not contribute to your gang's power. Your gang also\n loses a small amount of power whenever you lose a clash.\n
    \n
    \n NOTE: Gang members assigned to 'Territory Warfare' can be killed during clashes. This can happen regardless of\n whether you win or lose the clash. A gang member being killed results in both respect and power loss for your\n gang.\n
    \n
    \n \n Territory\n \n \n The amount of territory you have affects all aspects of your Gang members' production, including money, respect,\n and wanted level. It is very beneficial to have high territory control.\n
    \n
    \n To increase your chances of winning territory, assign gang members to \"Territory Warfare\". This will build your\n gang power. Then, enable \"Engage in Territory Warfare\" to start fighting over territory.\n
    \n
    \n \n Territory Clash Chance\n \n \n This percentage represents the chance you have of 'clashing' with another gang. If you do not wish to\n gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.\n \n \n
    \n );\n}\n","/**\n * React Component for the popup that manages gang members upgrades\n */\nimport React, { useState } from \"react\";\nimport { useGang } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { MenuItem, Table, TableBody, TextField } from \"@mui/material\";\nimport SearchIcon from \"@mui/icons-material/Search\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { GangMemberUpgrades } from \"../GangMemberUpgrades\";\nimport { GangMemberUpgrade } from \"../GangMemberUpgrade\";\nimport { Money } from \"../../ui/React/Money\";\nimport { GangMember } from \"../GangMember\";\nimport { UpgradeType } from \"../data/upgrades\";\nimport { use } from \"../../ui/Context\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { StatsRow } from \"../../ui/React/StatsRow\";\n\ninterface INextRevealProps {\n upgrades: string[];\n type: UpgradeType;\n}\n\nfunction NextReveal(props: INextRevealProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const upgrades = Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money > 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 })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n\n if (upgrades.length === 0) return <>;\n return (\n \n Next at \n \n );\n}\n\nfunction PurchasedUpgrade({ upgName }: { upgName: string }): React.ReactElement {\n const upg = GangMemberUpgrades[upgName];\n return (\n \n }>\n {upg.name}\n \n \n );\n}\n\ninterface IUpgradeButtonProps {\n upg: GangMemberUpgrade;\n rerender: () => void;\n member: GangMember;\n}\n\nfunction UpgradeButton(props: IUpgradeButtonProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n function onClick(): void {\n props.member.buyUpgrade(props.upg, player, gang);\n props.rerender();\n }\n return (\n }>\n \n \n \n \n );\n}\n\ninterface IPanelProps {\n member: GangMember;\n}\n\nfunction GangMemberUpgradePanel(props: IPanelProps): React.ReactElement {\n const gang = useGang();\n const player = use.Player();\n const setRerender = useState(false)[1];\n const [currentCategory, setCurrentCategory] = useState(\"Weapons\");\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function filterUpgrades(list: string[], type: UpgradeType): GangMemberUpgrade[] {\n return Object.keys(GangMemberUpgrades)\n .filter((upgName: string) => {\n const upg = GangMemberUpgrades[upgName];\n if (player.money < gang.getUpgradeCost(upg)) return false;\n if (upg.type !== type) return false;\n if (list.includes(upgName)) return false;\n return true;\n })\n .map((upgName: string) => GangMemberUpgrades[upgName]);\n }\n\n const onChange = (event: SelectChangeEvent): void => {\n setCurrentCategory(event.target.value);\n rerender()\n }\n\n const weaponUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Weapon);\n const armorUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Armor);\n const vehicleUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Vehicle);\n const rootkitUpgrades = filterUpgrades(props.member.upgrades, UpgradeType.Rootkit);\n const augUpgrades = filterUpgrades(props.member.augmentations, UpgradeType.Augmentation);\n\n const categories: { [key: string]: (GangMemberUpgrade[] | UpgradeType)[] } = {\n 'Weapons': [weaponUpgrades, UpgradeType.Weapon],\n 'Armor': [armorUpgrades, UpgradeType.Armor],\n 'Vehicles': [vehicleUpgrades, UpgradeType.Vehicle],\n 'Rootkits': [rootkitUpgrades, UpgradeType.Rootkit],\n 'Augmentations': [augUpgrades, UpgradeType.Augmentation]\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 (\n \n \n \n \n {props.member.name} ({props.member.task})\n \n \n Hk: x{numeralWrapper.formatMultiplier(props.member.hack_mult * asc.hack)}(x\n {numeralWrapper.formatMultiplier(props.member.hack_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.hack)}{\" \"}\n Asc)\n
    \n St: x{numeralWrapper.formatMultiplier(props.member.str_mult * asc.str)}\n (x{numeralWrapper.formatMultiplier(props.member.str_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.str)}{\" \"}\n Asc)\n
    \n Df: x{numeralWrapper.formatMultiplier(props.member.def_mult * asc.def)}\n (x{numeralWrapper.formatMultiplier(props.member.def_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.def)}{\" \"}\n Asc)\n
    \n Dx: x{numeralWrapper.formatMultiplier(props.member.dex_mult * asc.dex)}\n (x{numeralWrapper.formatMultiplier(props.member.dex_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.dex)}{\" \"}\n Asc)\n
    \n Ag: x{numeralWrapper.formatMultiplier(props.member.agi_mult * asc.agi)}\n (x{numeralWrapper.formatMultiplier(props.member.agi_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.agi)}{\" \"}\n Asc)\n
    \n Ch: x{numeralWrapper.formatMultiplier(props.member.cha_mult * asc.cha)}\n (x{numeralWrapper.formatMultiplier(props.member.cha_mult)} Eq, x{numeralWrapper.formatMultiplier(asc.cha)}{\" \"}\n Asc)\n \n }\n >\n \n \n \n \n \n \n \n \n \n
    \n \n\n
    \n\n \n \n\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).length === 0 && (\n \n All upgrades owned!\n \n )}\n \n {(categories[currentCategory][0] as GangMemberUpgrade[]).map((upg) => (\n \n ))}\n \n \n \n \n
    \n\n Purchased Upgrades: \n \n {props.member.upgrades.map((upg: string) => (\n \n ))}\n {props.member.augmentations.map((upg: string) => (\n \n ))}\n \n
    \n );\n}\n\nexport function EquipmentsSubpage(): React.ReactElement {\n const gang = useGang();\n const [filter, setFilter] = useState(\"\");\n\n\n const handleFilterChange = (event: React.ChangeEvent): void => {\n setFilter(event.target.value.toLowerCase());\n }\n\n const members = gang.members\n .filter((member) => member && member.name.toLowerCase().includes(filter));\n\n return (\n <>\n \n You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power\n leads to more discounts.\n \n }\n >\n Discount: -{numeralWrapper.formatPercentage(1 - 1 / gang.getDiscount())}\n \n\n ,\n spellCheck: false\n }}\n placeholder=\"Filter by member name\"\n sx={{ m: 1, width: '15%' }}\n />\n\n \n {members.map((member: GangMember) => (\n \n ))}\n \n \n );\n}\n","// React Components for the Corporation UI's navigation tabs\n// These are the tabs at the top of the UI that let you switch to different\n// divisions, see an overview of your corporation, or create a new industry\nimport React, { useState, useEffect } from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MainPanel } from \"./MainPanel\";\nimport { Industries } from \"../IndustryData\";\nimport { ExpandIndustryTab } from \"./ExpandIndustryTab\";\nimport { use } from \"../../ui/Context\";\nimport { Context } from \"./Context\";\nimport { Overview } from \"./Overview\";\n\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\nexport function CorporationRoot(): React.ReactElement {\n const player = use.Player();\n const corporation = player.corporation;\n if (corporation === null) return <>;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [divisionName, setDivisionName] = useState(\"Overview\");\n function handleChange(event: React.SyntheticEvent, tab: string | number): void {\n setDivisionName(tab);\n }\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n const canExpand =\n Object.keys(Industries).filter(\n (industryType: string) =>\n corporation.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n ).length > 0;\n\n return (\n \n \n \n {corporation.divisions.map((div) => (\n \n ))}\n {canExpand && }\n \n {divisionName === \"Overview\" && }\n {divisionName === -1 && }\n {typeof divisionName === \"string\" && divisionName !== \"Overview\" && (\n \n )}\n \n );\n}\n","// React Component for the element that contains the actual info/data\n// for the Corporation UI. This panel lies below the header tabs and will\n// be filled with whatever is needed based on the routing/navigation\nimport React from \"react\";\n\nimport { CityTabs } from \"./CityTabs\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Context, useCorporation } from \"./Context\";\n\nimport { CityName } from \"../../Locations/data/CityNames\";\n\ninterface IProps {\n divisionName: string;\n rerender: () => void;\n}\n\nexport function MainPanel(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division =\n props.divisionName !== \"Overview\"\n ? corp.divisions.find((division: IIndustry) => division.name === props.divisionName)\n : undefined; // use undefined because find returns undefined\n\n if (division === undefined) throw new Error(\"Cannot find division\");\n return (\n \n \n \n );\n}\n","// React Components for the Corporation UI's City navigation tabs\n// These allow player to navigate between different cities for each industry\nimport React, { useState } from \"react\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industry } from \"./Industry\";\nimport { ExpandNewCity } from \"./ExpandNewCity\";\nimport { useDivision } from \"./Context\";\nimport Tabs from \"@mui/material/Tabs\";\nimport Tab from \"@mui/material/Tab\";\n\ninterface IProps {\n city: string;\n rerender: () => void;\n}\n\nexport function CityTabs(props: IProps): React.ReactElement {\n const division = useDivision();\n const [city, setCity] = useState(props.city);\n\n const office = division.offices[city];\n if (office === 0) {\n setCity(\"Sector-12\");\n return <>;\n }\n\n const canExpand =\n Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0).length > 0;\n function handleChange(event: React.SyntheticEvent, tab: string): void {\n setCity(tab);\n }\n return (\n <>\n \n {Object.values(division.offices).map(\n (office: OfficeSpace | 0) => office !== 0 && ,\n )}\n {canExpand && }\n \n\n {city !== \"Expand\" ? (\n \n ) : (\n \n )}\n \n );\n}\n","// React Component for managing the Corporation's Industry UI\n// This Industry component does NOT include the city tabs at the top\nimport React from \"react\";\n\nimport { IndustryOffice } from \"./IndustryOffice\";\nimport { IndustryOverview } from \"./IndustryOverview\";\nimport { IndustryWarehouse } from \"./IndustryWarehouse\";\nimport { Warehouse } from \"../Warehouse\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProps {\n city: string;\n warehouse: Warehouse | 0;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function Industry(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const division = useDivision();\n return (\n \n \n \n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's OfficeSpace information\n// (bottom-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Employee } from \"../Employee\";\nimport { EmployeePositions } from \"../EmployeePositions\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { UpgradeOfficeSizeModal } from \"./UpgradeOfficeSizeModal\";\nimport { ThrowPartyModal } from \"./ThrowPartyModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/material/Paper\";\nimport ArrowDropUpIcon from \"@mui/icons-material/ArrowDropUp\";\nimport ArrowDropDownIcon from \"@mui/icons-material/ArrowDropDown\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n office: OfficeSpace;\n rerender: () => void;\n}\n\nfunction countEmployee(employees: Employee[], job: string): number {\n let n = 0;\n for (let i = 0; i < employees.length; ++i) {\n if (employees[i].pos === job) n++;\n }\n return n;\n}\n\ninterface ISwitchProps {\n manualMode: boolean;\n switchMode: (f: (b: boolean) => boolean) => void;\n}\n\nfunction SwitchButton(props: ISwitchProps): React.ReactElement {\n if (props.manualMode) {\n return (\n \n Switch to Automatic Assignment Mode, which will automatically assign employees to your selected jobs. You\n simply have to select the number of assignments for each job\n \n }\n >\n \n \n );\n } else {\n return (\n \n Switch to Manual Assignment Mode, which allows you to specify which employees should get which jobs\n \n }\n >\n \n \n );\n }\n}\n\nfunction ManualManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [employee, setEmployee] = useState(\n props.office.employees.length > 0 ? props.office.employees[0] : null,\n );\n\n // Employee Selector\n const employees = [];\n for (let i = 0; i < props.office.employees.length; ++i) {\n employees.push(\n \n {props.office.employees[i].name}\n ,\n );\n }\n\n function employeeSelectorOnChange(e: SelectChangeEvent): void {\n const name = e.target.value;\n for (let i = 0; i < props.office.employees.length; ++i) {\n if (name === props.office.employees[i].name) {\n setEmployee(props.office.employees[i]);\n break;\n }\n }\n\n props.rerender();\n }\n\n // Employee Positions Selector\n const emp = employee;\n let employeePositionSelectorInitialValue = \"\";\n const employeePositions = [];\n const positionNames = Object.values(EmployeePositions);\n for (let i = 0; i < positionNames.length; ++i) {\n employeePositions.push(\n \n {positionNames[i]}\n ,\n );\n if (emp != null && emp.pos === positionNames[i]) {\n employeePositionSelectorInitialValue = positionNames[i];\n }\n }\n\n function employeePositionSelectorOnChange(e: SelectChangeEvent): void {\n if (employee === null) return;\n employee.pos = e.target.value;\n props.rerender();\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n\n // Employee stats (after applying multipliers)\n const effCre = emp ? emp.cre * corp.getEmployeeCreMultiplier() * division.getEmployeeCreMultiplier() : 0;\n const effCha = emp ? emp.cha * corp.getEmployeeChaMultiplier() * division.getEmployeeChaMultiplier() : 0;\n const effInt = emp ? emp.int * corp.getEmployeeIntMultiplier() * division.getEmployeeIntMultiplier() : 0;\n const effEff = emp ? emp.eff * corp.getEmployeeEffMultiplier() * division.getEmployeeEffMultiplier() : 0;\n\n return (\n <>\n
    \n \n {employee != null && (\n \n Morale: {numeralWrapper.format(employee.mor, nf)}\n
    \n Happiness: {numeralWrapper.format(employee.hap, nf)}\n
    \n Energy: {numeralWrapper.format(employee.ene, nf)}\n
    \n Intelligence: {numeralWrapper.format(effInt, nf)}\n
    \n Charisma: {numeralWrapper.format(effCha, nf)}\n
    \n Experience: {numeralWrapper.format(employee.exp, nf)}\n
    \n Creativity: {numeralWrapper.format(effCre, nf)}\n
    \n Efficiency: {numeralWrapper.format(effEff, nf)}\n
    \n Salary: \n
    \n )}\n {employee != null && (\n \n )}\n \n );\n}\n\ninterface IAutoAssignProps {\n office: OfficeSpace;\n job: string;\n desc: string;\n rerender: () => void;\n}\n\nfunction AutoAssignJob(props: IAutoAssignProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numJob = countEmployee(props.office.employees, props.job);\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n function assignEmployee(): void {\n if (numUnassigned <= 0) {\n console.warn(\"Cannot assign employee. No unassigned employees available\");\n return;\n }\n\n props.office.assignEmployeeToJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n\n function unassignEmployee(): void {\n props.office.unassignEmployeeFromJob(props.job);\n props.office.calculateEmployeeProductivity(corp, division);\n props.rerender();\n }\n return (\n \n \n \n \n {props.job} ({numJob})\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n\nfunction AutoManagement(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const numUnassigned = countEmployee(props.office.employees, EmployeePositions.Unassigned);\n const vechain = corp.unlockUpgrades[4] === 1; // Has Vechain upgrade\n\n // Calculate average morale, happiness, energy, and salary.\n let totalMorale = 0,\n totalHappiness = 0,\n totalEnergy = 0,\n totalSalary = 0;\n for (let i = 0; i < props.office.employees.length; ++i) {\n totalMorale += props.office.employees[i].mor;\n totalHappiness += props.office.employees[i].hap;\n totalEnergy += props.office.employees[i].ene;\n totalSalary += props.office.employees[i].sal;\n }\n\n let avgMorale = 0,\n avgHappiness = 0,\n avgEnergy = 0;\n if (props.office.employees.length > 0) {\n avgMorale = totalMorale / props.office.employees.length;\n avgHappiness = totalHappiness / props.office.employees.length;\n avgEnergy = totalEnergy / props.office.employees.length;\n }\n\n return (\n <>\n \n \n \n \n Unassigned Employees:\n \n \n {numUnassigned}\n \n \n \n \n Avg Employee Morale:\n \n \n {numeralWrapper.format(avgMorale, \"0.000\")}\n \n \n \n \n Avg Employee Happiness:\n \n \n {numeralWrapper.format(avgHappiness, \"0.000\")}\n \n \n \n \n Avg Employee Energy:\n \n \n {numeralWrapper.format(avgEnergy, \"0.000\")}\n \n \n \n \n Total Employee Salary:\n \n \n \n \n \n \n \n {vechain && (\n <>\n \n \n \n The base amount of material this office can produce. Does not include production multipliers\n from upgrades and materials. This value is based off the productivity of your Operations,\n Engineering, and Management employees\n \n }\n >\n Material Production:\n \n \n \n \n {numeralWrapper.format(division.getOfficeProductivity(props.office), \"0.000\")}\n \n \n \n \n \n \n The base amount of any given Product this office can produce. Does not include production\n multipliers from upgrades and materials. This value is based off the productivity of your\n Operations, Engineering, and Management employees\n \n }\n >\n Product Production:\n \n \n \n \n {numeralWrapper.format(\n division.getOfficeProductivity(props.office, {\n forProduct: true,\n }),\n \"0.000\",\n )}\n \n \n \n \n \n The effect this office's 'Business' employees has on boosting sales}\n >\n Business Multiplier:\n \n \n \n x{numeralWrapper.format(division.getBusinessFactor(props.office), \"0.000\")}\n \n \n \n )}\n \n
    \n\n \n \n \n\n \n\n \n\n \n\n \n\n \n \n
    \n \n );\n}\n\nexport function IndustryOffice(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [upgradeOfficeSizeOpen, setUpgradeOfficeSizeOpen] = useState(false);\n const [throwPartyOpen, setThrowPartyOpen] = useState(false);\n const [employeeManualAssignMode, setEmployeeManualAssignMode] = useState(false);\n\n function autohireEmployeeButtonOnClick(): void {\n if (props.office.atCapacity()) return;\n props.office.hireRandomEmployee();\n props.rerender();\n }\n\n return (\n \n Office Space\n \n Size: {props.office.employees.length} / {props.office.size} employees\n \n \n \n Automatically hires an employee and gives him/her a random name}>\n \n \n \n \n Upgrade the office's size so that it can hold more employees!}>\n \n \n \n \n setUpgradeOfficeSizeOpen(false)}\n />\n\n {!division.hasResearch(\"AutoPartyManager\") && (\n <>\n Throw an office party to increase your employee's morale and happiness}\n >\n \n \n \n \n setThrowPartyOpen(false)}\n />\n \n )}\n \n \n \n {employeeManualAssignMode ? (\n \n ) : (\n \n )}\n \n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { ICorporation } from \"../ICorporation\";\nimport { UpgradeOfficeSize } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\ninterface IUpgradeButton {\n cost: number;\n size: number;\n corp: ICorporation;\n office: OfficeSpace;\n onClose: () => void;\n rerender: () => void;\n}\n\nfunction UpgradeSizeButton(props: IUpgradeButton): React.ReactElement {\n const corp = useCorporation();\n function upgradeSize(cost: number, size: number): void {\n if (corp.funds < cost) {\n return;\n }\n\n UpgradeOfficeSize(corp, props.office, size);\n props.rerender();\n props.onClose();\n }\n return (\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function UpgradeOfficeSizeModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const initialPriceMult = Math.round(props.office.size / CorporationConstants.OfficeInitialSize);\n const costMultiplier = 1.09;\n const upgradeCost = CorporationConstants.OfficeInitialCost * Math.pow(costMultiplier, initialPriceMult);\n\n // Calculate cost to upgrade size by 15 employees\n let mult = 0;\n for (let i = 0; i < 5; ++i) {\n mult += Math.pow(costMultiplier, initialPriceMult + i);\n }\n const upgradeCost15 = CorporationConstants.OfficeInitialCost * mult;\n\n //Calculate max upgrade size and cost\n const maxMult = corp.funds / CorporationConstants.OfficeInitialCost;\n let maxNum = 1;\n mult = Math.pow(costMultiplier, initialPriceMult);\n while (maxNum < 50) {\n //Hard cap of 50x (extra 150 employees)\n if (mult >= maxMult) break;\n const multIncrease = Math.pow(costMultiplier, initialPriceMult + maxNum);\n if (mult + multIncrease > maxMult) {\n break;\n } else {\n mult += multIncrease;\n }\n ++maxNum;\n }\n const upgradeCostMax = CorporationConstants.OfficeInitialCost * mult;\n\n return (\n \n Increase the size of your office space to fit additional employees!\n \n Upgrade size: \n \n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { ThrowParty } from \"../Actions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function ThrowPartyModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [cost, setCost] = useState(0);\n\n const totalCost = cost * props.office.employees.length;\n const canParty = corp.funds >= totalCost;\n function changeCost(event: React.ChangeEvent): void {\n let x = parseFloat(event.target.value);\n if (isNaN(x)) x = 0;\n setCost(x);\n }\n\n function throwParty(): void {\n if (cost === null || isNaN(cost) || cost < 0) {\n dialogBoxCreate(\"Invalid value entered\");\n } else if (!canParty) {\n dialogBoxCreate(\"You don't have enough company funds to throw a party!\");\n } else {\n const mult = ThrowParty(corp, props.office, cost);\n dialogBoxCreate(\n \"You threw a party for the office! The morale and happiness \" +\n \"of each employee increased by \" +\n numeralWrapper.formatPercentage(mult - 1),\n );\n props.rerender();\n props.onClose();\n }\n }\n\n function EffectText(): React.ReactElement {\n if (isNaN(cost) || cost < 0) return Invalid value entered!;\n return (\n \n Throwing this party will cost a total of \n \n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) throwParty();\n }\n\n return (\n \n Enter the amount of money you would like to spend PER EMPLOYEE on this office party\n \n \n \n \n \n \n );\n}\n","// React Component for displaying an Industry's overview information\n// (top-left panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Industries } from \"../IndustryData\";\nimport { IndustryUpgrades } from \"../IndustryUpgrades\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { createProgressBarText } from \"../../utils/helpers/createProgressBarText\";\nimport { MakeProductModal } from \"./MakeProductModal\";\nimport { ResearchModal } from \"./ResearchModal\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { StaticModal } from \"../../ui/React/StaticModal\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport IconButton from \"@mui/material/IconButton\";\nimport HelpIcon from \"@mui/icons-material/Help\";\nimport Box from \"@mui/material/Box\";\n\nfunction MakeProductButton(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [makeOpen, setMakeOpen] = useState(false);\n\n const hasMaxProducts = division.hasMaximumNumberProducts();\n\n function shouldFlash(): boolean {\n return Object.keys(division.products).length === 0;\n }\n\n let createProductButtonText = \"\";\n switch (division.type) {\n case Industries.Food:\n createProductButtonText = \"Build Restaurant\";\n break;\n case Industries.Tobacco:\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Pharmaceutical:\n createProductButtonText = \"Create Drug\";\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductButtonText = \"Create Product\";\n break;\n case Industries.Robotics:\n createProductButtonText = \"Design Robot\";\n break;\n case Industries.Software:\n createProductButtonText = \"Develop Software\";\n break;\n case Industries.Healthcare:\n createProductButtonText = \"Build Hospital\";\n break;\n case Industries.RealEstate:\n createProductButtonText = \"Develop Property\";\n break;\n default:\n createProductButtonText = \"Create Product\";\n return <>;\n }\n\n return (\n <>\n \n You have reached the maximum number of products: {division.getMaximumNumberProducts()}\n \n ) : (\n \"\"\n )\n }\n >\n \n \n setMakeOpen(false)} />\n \n );\n}\nfunction Text(): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [helpOpen, setHelpOpen] = useState(false);\n const [researchOpen, setResearchOpen] = useState(false);\n const vechain = corp.unlockUpgrades[4] === 1;\n const profit = division.lastCycleRevenue - division.lastCycleExpenses;\n\n let advertisingInfo = false;\n const advertisingFactors = division.getAdvertisingFactors();\n const awarenessFac = advertisingFactors[1];\n const popularityFac = advertisingFactors[2];\n const ratioFac = advertisingFactors[3];\n const totalAdvertisingFac = advertisingFactors[0];\n if (vechain) {\n advertisingInfo = true;\n }\n\n function convertEffectFacToGraphic(fac: number): string {\n return createProgressBarText({\n progress: fac,\n totalTicks: 20,\n });\n }\n\n return (\n <>\n \n Industry: {division.type} (Corp Funds: )\n \n
    \n \n {advertisingInfo !== false && (\n \n Total multiplier for this industrys sales due to its awareness and popularity\n \n \n }\n >\n Advertising Multiplier: x{numeralWrapper.format(totalAdvertisingFac, \"0.000\")}\n \n )}\n
    \n ],\n [\"Expenses:\", ],\n [\"Profit:\", ],\n ]}\n />\n
    \n \n \n Production gain from owning production-boosting materials such as hardware, Robots, AI Cores, and Real\n Estate.\n \n }\n >\n Production Multiplier: {numeralWrapper.format(division.prodMult, \"0.00\")}\n \n setHelpOpen(true)}>\n \n \n setHelpOpen(false)}>\n \n Owning Hardware, Robots, AI Cores, and Real Estate can boost your Industry's production. The effect these\n materials have on your production varies between Industries. For example, Real Estate may be very effective\n for some Industries, but ineffective for others.\n
    \n
    \n This division's production multiplier is calculated by summing the individual production multiplier of each\n of its office locations. This production multiplier is applied to each office. Therefore, it is beneficial\n to expand into new cities as this can greatly increase the production multiplier of your entire Division.\n
    \n
    \n Below are approximations for how effective each material is at boosting this industry's production\n multiplier (Bigger bars = more effective):\n
    \n
    \n Hardware:    {convertEffectFacToGraphic(division.hwFac)}\n
    \n Robots:      {convertEffectFacToGraphic(division.robFac)}\n
    \n AI Cores:    {convertEffectFacToGraphic(division.aiFac)}\n
    \n Real Estate: {convertEffectFacToGraphic(division.reFac)}\n
    \n
    \n
    \n\n \n \n Scientific Research increases the quality of the materials and products that you produce.\n \n }\n >\n Scientific Research: {numeralWrapper.format(division.sciResearch.qty, \"0.000a\")}\n \n \n setResearchOpen(false)} industry={division} />\n \n \n );\n}\n\nfunction Upgrades(props: { office: OfficeSpace; rerender: () => void }): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const upgrades = [];\n for (const index of Object.keys(IndustryUpgrades)) {\n const upgrade = IndustryUpgrades[index];\n\n // AutoBrew research disables the Coffee upgrade\n if (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 switch (i) {\n case 0: //Coffee, cost is static per employee\n cost = props.office.employees.length * baseCost;\n break;\n default:\n cost = baseCost * Math.pow(priceMult, division.upgrades[i]);\n break;\n }\n\n function onClick(): void {\n if (corp.funds < cost) return;\n corp.funds = corp.funds - cost;\n division.upgrade(upgrade, {\n corporation: corp,\n office: props.office,\n });\n props.rerender();\n }\n\n upgrades.push(\n \n \n \n \n ,\n );\n }\n\n return <>{upgrades};\n}\n\ninterface IProps {\n currentCity: string;\n office: OfficeSpace;\n rerender: () => void;\n}\n\nexport function IndustryOverview(props: IProps): React.ReactElement {\n const division = useDivision();\n\n return (\n \n \n
    \n Purchases & Upgrades\n
    \n {division.makesProducts && }\n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { Industries } from \"../IndustryData\";\nimport { MakeProduct } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nfunction productPlaceholder(tpe: string): string {\n if (tpe === Industries.Food) {\n return \"Restaurant Name\";\n } else if (tpe === Industries.Healthcare) {\n return \"Hospital Name\";\n } else if (tpe === Industries.RealEstate) {\n return \"Property Name\";\n }\n return \"Product Name\";\n}\n\n// Create a popup that lets the player create a product for their current industry\nexport function MakeProductModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const allCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] !== 0);\n const [city, setCity] = useState(allCities.length > 0 ? allCities[0] : \"\");\n const [name, setName] = useState(\"\");\n const [design, setDesign] = useState(null);\n const [marketing, setMarketing] = useState(null);\n if (division.hasMaximumNumberProducts()) return <>;\n\n let createProductPopupText = <>;\n switch (division.type) {\n case Industries.Food:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Build and manage a new restaurant!\n \n );\n break;\n case Industries.Tobacco:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Create a new tobacco product!\n \n );\n break;\n case Industries.Pharmaceutical:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Design and develop a new pharmaceutical drug!\n \n );\n break;\n case Industries.Computer:\n case \"Computer\":\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Design and manufacture a new computer hardware product!\n \n );\n break;\n case Industries.Robotics:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Design and create a new robot or robotic system!\n \n );\n break;\n case Industries.Software:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Develop a new piece of software!\n \n );\n break;\n case Industries.Healthcare:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Build and manage a new hospital!\n \n );\n break;\n case Industries.RealEstate:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Develop a new piece of real estate property!\n \n );\n break;\n default:\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n Create a new product!\n \n );\n return <>;\n }\n createProductPopupText = (\n <>\n {createProductPopupText}\n
    \n
    \n To begin developing a product, first choose the city in which it will be designed. The stats of your employees in\n the selected city affect the properties of the finished product, such as its quality, performance, and durability.\n
    \n
    \n You can also choose to invest money in the design and marketing of the product. Investing money in its design will\n result in a superior product. Investing money in marketing the product will help the product's sales.\n \n );\n\n function makeProduct(): void {\n if (design === null || marketing === null) return;\n try {\n MakeProduct(corp, division, city, name, design, marketing);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onProductNameChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function onDesignChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setDesign(null);\n else setDesign(parseFloat(event.target.value));\n }\n\n function onMarketingChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setMarketing(null);\n else setMarketing(parseFloat(event.target.value));\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) makeProduct();\n }\n\n return (\n \n {createProductPopupText}\n \n \n
    \n \n \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { IndustryResearchTrees } from \"../IndustryData\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { IIndustry } from \"../IIndustry\";\nimport { Research } from \"../Actions\";\nimport { Node } from \"../ResearchTree\";\nimport { ResearchMap } from \"../ResearchMap\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\nimport Collapse from \"@mui/material/Collapse\";\nimport ExpandMore from \"@mui/icons-material/ExpandMore\";\nimport ExpandLess from \"@mui/icons-material/ExpandLess\";\nimport CheckIcon from '@mui/icons-material/Check';\n\ninterface INodeProps {\n n: Node | null;\n division: IIndustry;\n}\nfunction Upgrade({ n, division }: INodeProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (n === null) return <>;\n const r = ResearchMap[n.text];\n let disabled = division.sciResearch.qty < r.cost || n.researched;\n const parent = n.parent;\n if (parent !== null) {\n disabled = disabled || !parent.researched;\n }\n\n function research(): void {\n if (n === null || disabled) return;\n try {\n Research(division, n.text);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(\n `Researched ${n.text}. It may take a market cycle ` +\n `(~${CorporationConstants.SecsPerMarketCycle} seconds) before the effects of ` +\n `the Research apply.`,\n );\n }\n\n let color: \"primary\" | \"info\" = \"primary\";\n if (n.researched) {\n color = \"info\";\n }\n\n const wrapInTooltip = (ele: React.ReactElement): React.ReactElement => {\n return (\n \n Research points: {r.cost}\n
    \n {r.desc}\n \n }\n >\n {ele}\n \n )\n }\n\n const but = (\n \n {wrapInTooltip(\n \n \n \n )}\n \n );\n\n if (n.children.length === 0) return but;\n\n return (\n \n \n {wrapInTooltip(\n \n \n \n )}\n \n \n \n \n {n.children.map((m) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n industry: IIndustry;\n}\n\n// Create the Research Tree UI for this Industry\nexport function ResearchModal(props: IProps): React.ReactElement {\n const researchTree = IndustryResearchTrees[props.industry.type];\n if (researchTree === undefined) return <>;\n\n return (\n \n \n \n Research points: {props.industry.sciResearch.qty.toFixed(3)}\n
    \n Multipliers from research:\n
    * Advertising Multiplier: x{researchTree.getAdvertisingMultiplier()}\n
    * Employee Charisma Multiplier: x{researchTree.getEmployeeChaMultiplier()}\n
    * Employee Creativity Multiplier: x{researchTree.getEmployeeCreMultiplier()}\n
    * Employee Efficiency Multiplier: x{researchTree.getEmployeeEffMultiplier()}\n
    * Employee Intelligence Multiplier: x{researchTree.getEmployeeIntMultiplier()}\n
    * Production Multiplier: x{researchTree.getProductionMultiplier()}\n
    * Sales Multiplier: x{researchTree.getSalesMultiplier()}\n
    * Scientific Research Multiplier: x{researchTree.getScientificResearchMultiplier()}\n
    * Storage Multiplier: x{researchTree.getStorageMultiplier()}\n
    \n
    \n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Material } from \"../Material\";\nimport { Product } from \"../Product\";\nimport { Warehouse } from \"../Warehouse\";\nimport { SmartSupplyModal } from \"./SmartSupplyModal\";\nimport { ProductElem } from \"./ProductElem\";\nimport { MaterialElem } from \"./MaterialElem\";\nimport { MaterialSizes } from \"../MaterialSizes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { ICorporation } from \"../ICorporation\";\nimport { IIndustry } from \"../IIndustry\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { isRelevantMaterial } from \"./Helpers\";\nimport { IndustryProductEquation } from \"./IndustryProductEquation\";\nimport { PurchaseWarehouse } from \"../Actions\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\n\ninterface IProps {\n corp: ICorporation;\n division: IIndustry;\n warehouse: Warehouse | 0;\n currentCity: string;\n player: IPlayer;\n rerender: () => void;\n}\n\nconst useStyles = makeStyles(() =>\n createStyles({\n retainHeight: {\n minHeight: '3em',\n },\n })\n);\n\nfunction WarehouseRoot(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [smartSupplyOpen, setSmartSupplyOpen] = useState(false);\n if (props.warehouse === 0) return <>;\n\n // Upgrade Warehouse size button\n const sizeUpgradeCost = CorporationConstants.WarehouseUpgradeBaseCost * Math.pow(1.07, props.warehouse.level + 1);\n const canAffordUpgrade = corp.funds > sizeUpgradeCost;\n function upgradeWarehouseOnClick(): void {\n if (division === null) return;\n if (props.warehouse === 0) return;\n if (!canAffordUpgrade) return;\n ++props.warehouse.level;\n props.warehouse.updateSize(corp, division);\n corp.funds = corp.funds - sizeUpgradeCost;\n props.rerender();\n }\n\n const classes = useStyles();\n\n // Current State:\n let stateText;\n switch (division.state) {\n case \"START\":\n stateText = \"Current state: Preparing...\";\n break;\n case \"PURCHASE\":\n stateText = \"Current state: Purchasing materials...\";\n break;\n case \"PRODUCTION\":\n stateText = \"Current state: Producing materials and/or products...\";\n break;\n case \"SALE\":\n stateText = \"Current state: Selling materials and/or products...\";\n break;\n case \"EXPORT\":\n stateText = \"Current state: Exporting materials and/or products...\";\n break;\n default:\n console.error(`Invalid state: ${division.state}`);\n break;\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n // Only create UI for materials that are relevant for the industry or in stock\n const isInStock = props.warehouse.materials[matName].qty > 0;\n const isRelevant = isRelevantMaterial(matName, division);\n if (!isInStock && !isRelevant) continue;\n mats.push(\n ,\n );\n }\n\n // Create React components for products\n const products = [];\n if (division.makesProducts && Object.keys(division.products).length > 0) {\n for (const productName of Object.keys(division.products)) {\n const product = division.products[productName];\n if (!(product instanceof Product)) continue;\n products.push(\n ,\n );\n }\n }\n\n const breakdownItems: JSX.Element[] = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n const mat = props.warehouse.materials[matName];\n if (!MaterialSizes.hasOwnProperty(matName)) continue;\n if (mat.qty === 0) continue;\n breakdownItems.push(<>{matName}: {numeralWrapper.format(mat.qty * MaterialSizes[matName], \"0,0.0\")});\n }\n\n for (const prodName of Object.keys(division.products)) {\n const prod = division.products[prodName];\n if (prod === undefined) continue;\n breakdownItems.push(<>{prodName}: {numeralWrapper.format(prod.data[props.warehouse.loc][0] * prod.siz, \"0,0.0\")});\n }\n\n let breakdown;\n if (breakdownItems && breakdownItems.length > 0) {\n breakdown = breakdownItems.reduce(\n (previous: JSX.Element, current: JSX.Element): JSX.Element => previous && <>{previous}
    {current} || <>{current});\n } else {\n breakdown = <>No items in storage.\n }\n\n return (\n \n \n <>{breakdown} : \"\"}>\n = props.warehouse.size ? \"error\" : \"primary\"}>\n Storage: {numeralWrapper.formatBigNumber(props.warehouse.sizeUsed)} /{\" \"}\n {numeralWrapper.formatBigNumber(props.warehouse.size)}\n \n \n \n\n \n\n This industry uses the following equation for its production: \n
    \n \n \n \n
    \n \n To get started with production, purchase your required materials or import them from another of your company's\n divisions.\n \n
    \n\n {stateText}\n\n {corp.unlockUpgrades[1] && (\n <>\n \n setSmartSupplyOpen(false)}\n warehouse={props.warehouse}\n />\n \n )}\n\n {mats}\n\n {products}\n
    \n );\n}\n\nexport function IndustryWarehouse(props: IProps): React.ReactElement {\n if (props.warehouse instanceof Warehouse) {\n return ;\n } else {\n return ;\n }\n}\n\ninterface IEmptyProps {\n city: string;\n rerender: () => void;\n}\n\nfunction EmptyWarehouse(props: IEmptyProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const disabled = corp.funds < CorporationConstants.WarehouseInitialCost;\n function purchaseWarehouse(): void {\n if (disabled) return;\n PurchaseWarehouse(corp, division, props.city);\n props.rerender();\n }\n return (\n \n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { Warehouse } from \"../Warehouse\";\nimport { SetSmartSupply, SetSmartSupplyUseLeftovers } from \"../Actions\";\nimport { Material } from \"../Material\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\n\ninterface ILeftoverProps {\n matName: string;\n warehouse: Warehouse;\n}\n\nfunction Leftover(props: ILeftoverProps): React.ReactElement {\n const [checked, setChecked] = useState(!!props.warehouse.smartSupplyUseLeftovers[props.matName.replace(/ /g, \"\")]);\n\n function onChange(event: React.ChangeEvent): void {\n try {\n const matName = props.matName.replace(/ /g, \"\");\n const material = props.warehouse.materials[matName];\n SetSmartSupplyUseLeftovers(props.warehouse, material, event.target.checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n setChecked(event.target.checked);\n }\n\n return (\n <>\n }\n label={{props.warehouse.materials[props.matName.replace(/ /g, \"\")].name}}\n />\n
    \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n warehouse: Warehouse;\n}\n\nexport function SmartSupplyModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n // Smart Supply Checkbox\n function smartSupplyOnChange(e: React.ChangeEvent): void {\n SetSmartSupply(props.warehouse, e.target.checked);\n rerender();\n }\n\n // Create React components for materials\n const mats = [];\n for (const matName of Object.keys(props.warehouse.materials)) {\n if (!(props.warehouse.materials[matName] instanceof Material)) continue;\n if (!Object.keys(division.reqMats).includes(matName)) continue;\n mats.push();\n }\n\n return (\n \n <>\n }\n label={Enable Smart Supply}\n />\n
    \n Use materials already in the warehouse instead of buying new ones, if available:\n {mats}\n \n
    \n );\n}\n","import React, { useState } from \"react\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Product } from \"../Product\";\nimport { DiscontinueProductModal } from \"./DiscontinueProductModal\";\nimport { LimitProductProductionModal } from \"./LimitProductProductionModal\";\nimport { SellProductModal } from \"./SellProductModal\";\nimport { ProductMarketTaModal } from \"./ProductMarketTaModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IProductProps {\n city: string;\n product: Product;\n rerender: () => void;\n}\n\n// Creates the UI for a single Product type\nexport function ProductElem(props: IProductProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [sellOpen, setSellOpen] = useState(false);\n const [limitOpen, setLimitOpen] = useState(false);\n const [discontinueOpen, setDiscontinueOpen] = useState(false);\n const [marketTaOpen, setMarketTaOpen] = useState(false);\n const city = props.city;\n const product = props.product;\n\n // Numeraljs formatters\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be big\n\n const hasUpgradeDashboard = division.hasResearch(\"uPgrade: Dashboard\");\n\n // Total product gain = production - sale\n const totalGain = product.data[city][1] - product.data[city][2];\n\n // Sell button\n let sellButtonText: JSX.Element;\n if (product.sllman[city][0]) {\n if (isString(product.sllman[city][1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/{product.sllman[city][1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(product.data[city][2], nfB)}/\n {numeralWrapper.format(product.sllman[city][1], nfB)})\n \n );\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n if (product.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.marketTa1) {\n const markupLimit = product.rat / product.mku;\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (product.sCost) {\n if (isString(product.sCost)) {\n const sCost = (product.sCost as string).replace(/MP/g, product.pCost + product.rat / product.mku + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n\n // Limit Production button\n let limitProductionButtonText = \"Limit Production\";\n if (product.prdman[city][0]) {\n limitProductionButtonText += \" (\" + numeralWrapper.format(product.prdman[city][1], nf) + \")\";\n }\n\n return (\n \n {!product.fin ? (\n <>\n \n Designing {product.name} (req. Operations/Engineers in {product.createCity})...\n \n
    \n {numeralWrapper.format(product.prog, \"0.00\")}% complete\n \n ) : (\n <>\n \n \n Prod: {numeralWrapper.format(product.data[city][1], nfB)}/s\n
    \n Sell: {numeralWrapper.format(product.data[city][2], nfB)} /s\n \n }\n >\n \n {product.name}: {numeralWrapper.format(product.data[city][0], nfB)} (\n {numeralWrapper.format(totalGain, nfB)}\n /s)\n \n \n
    \n \n \n Quality: {numeralWrapper.format(product.qlt, nf)}
    \n Performance: {numeralWrapper.format(product.per, nf)}
    \n Durability: {numeralWrapper.format(product.dur, nf)}
    \n Reliability: {numeralWrapper.format(product.rel, nf)}
    \n Aesthetics: {numeralWrapper.format(product.aes, nf)}
    \n Features: {numeralWrapper.format(product.fea, nf)}\n {corp.unlockUpgrades[2] === 1 &&
    }\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(product.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
    }\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(product.cmp, nf)}\n \n }\n >\n Rating: {numeralWrapper.format(product.rat, nf)}\n \n
    \n \n An estimate of the material cost it takes to create this Product.}>\n \n Est. Production Cost:{\" \"}\n {numeralWrapper.formatMoney(product.pCost / CorporationConstants.ProductProductionCostRatio)}\n \n \n \n \n \n An estimate of how much consumers are willing to pay for this product. Setting the sale price above\n this may result in less sales. Setting the sale price below this may result in more sales.\n \n }\n >\n Est. Market Price: {numeralWrapper.formatMoney(product.pCost)}\n \n \n \n )}\n\n {(hasUpgradeDashboard || product.fin) && (\n <>\n \n setSellOpen(false)} />\n
    \n \n setLimitOpen(false)}\n />\n \n\n setDiscontinueOpen(false)}\n />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n setMarketTaOpen(false)} />\n \n )}\n \n )}\n
    \n );\n}\n","import React from \"react\";\n\nimport { Product } from \"../Product\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n rerender: () => void;\n}\n\n// Create a popup that lets the player discontinue a product\nexport function DiscontinueProductModal(props: IProps): React.ReactElement {\n const division = useDivision();\n function discontinue(): void {\n division.discontinueProduct(props.product);\n props.onClose();\n props.rerender();\n }\n\n return (\n \n \n Are you sure you want to do this? Discontinuing a product removes it completely and permanently. You will no\n longer produce this product and all of its existing stock will be removed and left unsold\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Product } from \"../Product\";\nimport { LimitProductProduction } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that lets the player limit the production of a product\nexport function LimitProductProductionModal(props: IProps): React.ReactElement {\n const [limit, setLimit] = useState(null);\n\n function limitProductProduction(): void {\n let qty = limit;\n if (qty === null) qty = -1;\n LimitProductProduction(props.product, props.city, qty);\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) limitProductProduction();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setLimit(null);\n else setLimit(parseFloat(event.target.value));\n }\n\n return (\n \n \n Enter a limit to the amount of this product you would like to produce per second. Leave the box empty to set no\n limit.\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Product } from \"../Product\";\nimport { SellProduct } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nfunction initialPrice(product: Product): string {\n let val = product.sCost ? product.sCost + \"\" : \"\";\n if (product.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (product.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n city: string;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellProductModal(props: IProps): React.ReactElement {\n const [checked, setChecked] = useState(true);\n const [iQty, setQty] = useState(\n props.product.sllman[props.city][1] ? props.product.sllman[props.city][1] : \"\",\n );\n const [px, setPx] = useState(initialPrice(props.product));\n\n function onCheckedChange(event: React.ChangeEvent): void {\n setChecked(event.target.checked);\n }\n\n function sellProduct(): void {\n try {\n SellProduct(props.product, props.city, iQty, px, checked);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setQty(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPx(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellProduct();\n }\n\n return (\n \n \n Enter the maximum amount of {props.product.name} you would like to sell per second, as well as the price at\n which you would like to sell it at.\n
    \n
    \n If the sell amount is set to 0, then the product will not be sold. If the sell price is set to 0, then the\n product will be discarded.\n
    \n
    \n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
    \n
    \n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-1' then you will always sell 1 less\n of the material than you produce.\n
    \n
    \n When setting the sell price, you can use the 'MP' variable to set a dynamically changing price that depends on\n the Product's estimated market price. For example, if you set it to 'MP*5' then it will always be sold at five\n times the estimated market price.\n
    \n
    \n \n \n \n }\n label={Use same 'Sell Amount' for all cities}\n />\n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Product } from \"../Product\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface ITa2Props {\n product: Product;\n}\n\nfunction MarketTA2(props: ITa2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const markupLimit = props.product.rat / props.product.mku;\n const [value, setValue] = useState(props.product.pCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n setValue(parseFloat(event.target.value));\n }\n\n function onCheckedChange(event: React.ChangeEvent): void {\n props.product.marketTa2 = event.target.checked;\n rerender();\n }\n\n const sCost = value;\n let markup = 1;\n if (sCost > props.product.pCost) {\n if (sCost - props.product.pCost > markupLimit) {\n markup = markupLimit / (sCost - props.product.pCost);\n }\n }\n\n return (\n <>\n Market-TA.II\n
    \n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
    \n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n product: Product;\n}\n\n// Create a popup that lets the player use the Market TA research for Products\nexport function ProductMarketTaModal(props: IProps): React.ReactElement {\n const markupLimit = props.product.rat / props.product.mku;\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onChange(event: React.ChangeEvent): void {\n props.product.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is{\" \"}\n {numeralWrapper.formatMoney(props.product.pCost + markupLimit)}. This means that if you set the sale price\n higher than this, you will begin to experience a loss in number of sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","// React Component for displaying an Industry's warehouse information\n// (right-side panel in the Industry UI)\nimport React, { useState } from \"react\";\n\nimport { OfficeSpace } from \"../OfficeSpace\";\nimport { Material } from \"../Material\";\nimport { Warehouse } from \"../Warehouse\";\nimport { ExportModal } from \"./ExportModal\";\nimport { MaterialMarketTaModal } from \"./MaterialMarketTaModal\";\nimport { SellMaterialModal } from \"./SellMaterialModal\";\nimport { PurchaseMaterialModal } from \"./PurchaseMaterialModal\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nimport { isString } from \"../../utils/helpers/isString\";\nimport { Money } from \"../../ui/React/Money\";\nimport { useCorporation, useDivision } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\n\ninterface IMaterialProps {\n warehouse: Warehouse;\n city: string;\n mat: Material;\n rerender: () => void;\n}\n\n// Creates the UI for a single Material type\nexport function MaterialElem(props: IMaterialProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const [purchaseMaterialOpen, setPurchaseMaterialOpen] = useState(false);\n const [exportOpen, setExportOpen] = useState(false);\n const [sellMaterialOpen, setSellMaterialOpen] = useState(false);\n const [materialMarketTaOpen, setMaterialMarketTaOpen] = useState(false);\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 if (!(office instanceof OfficeSpace)) {\n throw new Error(`Could not get OfficeSpace object for this city (${city})`);\n }\n\n // Numeraljs formatter\n const nf = \"0.000\";\n const nfB = \"0.000a\"; // For numbers that might be biger\n\n // Total gain or loss of this material (per second)\n const totalGain = mat.buy + mat.prd + mat.imp - mat.sll - mat.totalExp;\n\n // Flag that determines whether this industry is \"new\" and the current material should be\n // marked with flashing-red lights\n const tutorial =\n division.newInd && Object.keys(division.reqMats).includes(mat.name) && mat.buy === 0 && mat.imp === 0;\n\n // Purchase material button\n const purchaseButtonText = `Buy (${numeralWrapper.format(mat.buy, nfB)})`;\n\n // Sell material button\n let sellButtonText: JSX.Element;\n if (mat.sllman[0]) {\n if (isString(mat.sllman[1])) {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{mat.sllman[1]})\n \n );\n } else {\n sellButtonText = (\n <>\n Sell ({numeralWrapper.format(mat.sll, nfB)}/{numeralWrapper.format(mat.sllman[1] as number, nfB)})\n \n );\n }\n\n if (mat.marketTa2) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.marketTa1) {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else if (mat.sCost) {\n if (isString(mat.sCost)) {\n const sCost = (mat.sCost as string).replace(/MP/g, mat.bCost + \"\");\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n } else {\n sellButtonText = (\n <>\n {sellButtonText} @ \n \n );\n }\n }\n } else {\n sellButtonText = <>Sell (0.000/0.000);\n }\n\n return (\n \n \n \n \n Buy: {numeralWrapper.format(mat.buy, nfB)}
    \n Prod: {numeralWrapper.format(mat.prd, nfB)}
    \n Sell: {numeralWrapper.format(mat.sll, nfB)}
    \n Export: {numeralWrapper.format(mat.totalExp, nfB)}
    \n Import: {numeralWrapper.format(mat.imp, nfB)}\n {corp.unlockUpgrades[2] === 1 &&
    }\n {corp.unlockUpgrades[2] === 1 && \"Demand: \" + numeralWrapper.format(mat.dmd, nf)}\n {corp.unlockUpgrades[3] === 1 &&
    }\n {corp.unlockUpgrades[3] === 1 && \"Competition: \" + numeralWrapper.format(mat.cmp, nf)}\n \n }\n >\n \n {mat.name}: {numeralWrapper.format(mat.qty, nfB)} ({numeralWrapper.format(totalGain, nfB)}/s)\n \n \n \n Market Price: The price you would pay if you were to buy this material on the market\n \n }\n >\n MP: {numeralWrapper.formatMoney(mat.bCost)}\n \n The quality of your material. Higher quality will lead to more sales}\n >\n Quality: {numeralWrapper.format(mat.qlt, \"0.00a\")}\n \n
    \n\n \n Purchase your required materials to get production started! : \"\"}\n >\n setPurchaseMaterialOpen(true)}\n disabled={props.warehouse.smartSupplyEnabled && Object.keys(division.reqMats).includes(props.mat.name)}\n >\n {purchaseButtonText}\n \n \n setPurchaseMaterialOpen(false)}\n />\n\n {corp.unlockUpgrades[0] === 1 && (\n <>\n \n\n setExportOpen(false)} />\n \n )}\n\n setSellMaterialOpen(true)}\n >\n {sellButtonText}\n \n setSellMaterialOpen(false)} />\n {division.hasResearch(\"Market-TA.I\") && (\n <>\n \n\n setMaterialMarketTaOpen(false)}\n />\n \n )}\n \n
    \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Material } from \"../Material\";\nimport { Export } from \"../Export\";\nimport { IIndustry } from \"../IIndustry\";\nimport { ExportMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\nimport { isRelevantMaterial } from \"./Helpers\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player manage exports\nexport function ExportModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const possibleDivisions = corp.divisions.filter((division: IIndustry) => isRelevantMaterial(props.mat.name, division));\n if (possibleDivisions.length === 0) throw new Error(\"Export popup created with no divisions.\");\n const defaultDivision = possibleDivisions[0];\n if (Object.keys(defaultDivision.warehouses).length === 0)\n throw new Error(\"Export popup created in a division with no warehouses.\");\n const [industry, setIndustry] = useState(defaultDivision.name);\n const [city, setCity] = useState(Object.keys(defaultDivision.warehouses)[0]);\n const [amt, setAmt] = useState(\"\");\n const setRerender = useState(false)[1];\n\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n const div = event.target.value;\n setIndustry(div);\n setCity(Object.keys(corp.divisions[0].warehouses)[0]);\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function exportMaterial(): void {\n try {\n ExportMaterial(industry, city, props.mat, amt, currentDivision);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function removeExport(exp: Export): void {\n for (let i = 0; i < props.mat.exp.length; ++i) {\n if (props.mat.exp[i].ind !== exp.ind || props.mat.exp[i].city !== exp.city || props.mat.exp[i].amt !== exp.amt)\n continue;\n props.mat.exp.splice(i, 1);\n break;\n }\n rerender();\n }\n\n const currentDivision = corp.divisions.find((division: IIndustry) => division.name === industry);\n if (currentDivision === undefined)\n throw new Error(`Export popup somehow ended up with undefined division '${currentDivision}'`);\n const possibleCities = Object.keys(currentDivision.warehouses).filter(\n (city) => currentDivision.warehouses[city] !== 0,\n );\n if (possibleCities.length > 0 && !possibleCities.includes(city)) {\n setCity(possibleCities[0]);\n }\n\n return (\n \n \n Select the industry and city to export this material to, as well as how much of this material to export per\n second. You can set the export amount to 'MAX' to export all of the materials in this warehouse.\n \n \n \n \n \n \n Below is a list of all current exports of this material from this warehouse. Clicking on one of the exports\n below will REMOVE that export.\n \n {props.mat.exp.map((exp: Export, index: number) => (\n \n \n \n Industry: {exp.ind}\n
    \n City: {exp.city}\n
    \n Amount/s: {exp.amt}\n
    \n
    \n ))}\n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Material } from \"../Material\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\nimport Switch from \"@mui/material/Switch\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IMarketTA2Props {\n mat: Material;\n}\n\nfunction MarketTA2(props: IMarketTA2Props): React.ReactElement {\n const division = useDivision();\n if (!division.hasResearch(\"Market-TA.II\")) return <>;\n const [newCost, setNewCost] = useState(props.mat.bCost);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setNewCost(0);\n else setNewCost(parseFloat(event.target.value));\n }\n\n const sCost = newCost;\n let markup = 1;\n if (sCost > props.mat.bCost) {\n //Penalty if difference between sCost and bCost is greater than markup limit\n if (sCost - props.mat.bCost > markupLimit) {\n markup = Math.pow(markupLimit / (sCost - props.mat.bCost), 2);\n }\n } else if (sCost < props.mat.bCost) {\n if (sCost <= 0) {\n markup = 1e12; //Sell everything, essentially discard\n } else {\n //Lower prices than market increases sales\n markup = props.mat.bCost / sCost;\n }\n }\n\n function onMarketTA2(event: React.ChangeEvent): void {\n props.mat.marketTa2 = event.target.checked;\n rerender();\n }\n\n return (\n <>\n Market-TA.II\n
    \n \n If you sell at {numeralWrapper.formatMoney(sCost)}, then you will sell{\" \"}\n {numeralWrapper.format(markup, \"0.00000\")}x as much compared to if you sold at market price.\n \n \n
    \n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the optimal price such that the\n amount sold matches the amount produced. (i.e. the highest possible price, while still ensuring that all\n produced materials will be sold)\n \n }\n >\n Use Market-TA.II for Auto-Sale Price\n \n }\n />\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that lets the player use the Market TA research for Materials\nexport function MaterialMarketTaModal(props: IProps): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const markupLimit = props.mat.getMarkupLimit();\n\n function onMarketTA1(event: React.ChangeEvent): void {\n props.mat.marketTa1 = event.target.checked;\n rerender();\n }\n\n return (\n \n <>\n Market-TA.I\n \n The maximum sale price you can mark this up to is {numeralWrapper.formatMoney(props.mat.bCost + markupLimit)}.\n This means that if you set the sale price higher than this, you will begin to experience a loss in number of\n sales\n \n\n }\n label={\n \n If this is enabled, then this Material will automatically be sold at the price identified by\n Market-TA.I (i.e. the price shown above)\n \n }\n >\n Use Market-TA.I for Auto-Sale Price\n \n }\n />\n \n\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Material } from \"../Material\";\nimport { SellMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\nfunction initialPrice(mat: Material): string {\n let val = mat.sCost ? mat.sCost + \"\" : \"\";\n if (mat.marketTa2) {\n val += \" (Market-TA.II)\";\n } else if (mat.marketTa1) {\n val += \" (Market-TA.I)\";\n }\n return val;\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n}\n\n// Create a popup that let the player manage sales of a material\nexport function SellMaterialModal(props: IProps): React.ReactElement {\n const [amt, setAmt] = useState(props.mat.sllman[1] ? props.mat.sllman[1] + \"\" : \"\");\n const [price, setPrice] = useState(initialPrice(props.mat));\n\n function sellMaterial(): void {\n try {\n SellMaterial(props.mat, amt, price);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onAmtChange(event: React.ChangeEvent): void {\n setAmt(event.target.value);\n }\n\n function onPriceChange(event: React.ChangeEvent): void {\n setPrice(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sellMaterial();\n }\n\n return (\n \n \n Enter the maximum amount of {props.mat.name} you would like to sell per second, as well as the price at which\n you would like to sell at.\n
    \n
    \n If the sell amount is set to 0, then the material will not be sold. If the sell price if set to 0, then the\n material will be discarded\n
    \n
    \n Setting the sell amount to 'MAX' will result in you always selling the maximum possible amount of the material.\n
    \n
    \n When setting the sell amount, you can use the 'PROD' variable to designate a dynamically changing amount that\n depends on your production. For example, if you set the sell amount to 'PROD-5' then you will always sell 5 less\n of the material than you produce.\n
    \n
    \n When setting the sell price, you can use the 'MP' variable to designate a dynamically changing price that\n depends on the market price. For example, if you set the sell price to 'MP+10' then it will always be sold at\n $10 above the market price.\n
    \n
    \n \n \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { MaterialSizes } from \"../MaterialSizes\";\nimport { Warehouse } from \"../Warehouse\";\nimport { Material } from \"../Material\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { BulkPurchase, BuyMaterial } from \"../Actions\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IBulkPurchaseTextProps {\n warehouse: Warehouse;\n mat: Material;\n amount: string;\n}\n\nfunction BulkPurchaseText(props: IBulkPurchaseTextProps): React.ReactElement {\n const parsedAmt = parseFloat(props.amount);\n const cost = parsedAmt * props.mat.bCost;\n\n const matSize = MaterialSizes[props.mat.name];\n const maxAmount = (props.warehouse.size - props.warehouse.sizeUsed) / matSize;\n\n if (parsedAmt * matSize > maxAmount) {\n return (\n <>\n Not enough warehouse space to purchase this amount\n \n );\n } else if (isNaN(cost) || parsedAmt < 0) {\n return (\n <>\n Invalid put for Bulk Purchase amount\n \n );\n } else {\n return (\n <>\n \n Purchasing {numeralWrapper.format(parsedAmt, \"0,0.00\")} of {props.mat.name} will cost{\" \"}\n {numeralWrapper.formatMoney(cost)}\n \n \n );\n }\n}\n\ninterface IBPProps {\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\nfunction BulkPurchaseSection(props: IBPProps): React.ReactElement {\n const corp = useCorporation();\n const [buyAmt, setBuyAmt] = useState(\"\");\n\n function bulkPurchase(): void {\n try {\n BulkPurchase(corp, props.warehouse, props.mat, parseFloat(buyAmt));\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) bulkPurchase();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(event.target.value);\n }\n\n return (\n <>\n \n Enter the amount of {props.mat.name} you would like to bulk purchase. This purchases the specified amount\n instantly (all at once).\n \n \n \n \n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n mat: Material;\n warehouse: Warehouse;\n}\n\n// Create a popup that lets the player purchase a Material\nexport function PurchaseMaterialModal(props: IProps): React.ReactElement {\n const division = useDivision();\n const [buyAmt, setBuyAmt] = useState(props.mat.buy ? props.mat.buy : 0);\n\n function purchaseMaterial(): void {\n if (buyAmt === null) return;\n try {\n BuyMaterial(props.mat, buyAmt);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function clearPurchase(): void {\n props.mat.buy = 0;\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) purchaseMaterial();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setBuyAmt(parseFloat(event.target.value));\n }\n\n return (\n \n <>\n \n Enter the amount of {props.mat.name} you would like to purchase per second. This material's cost changes\n constantly.\n \n \n \n \n {division.hasResearch(\"Bulk Purchasing\") && (\n \n )}\n \n \n );\n}\n","import React from \"react\";\nimport { IIndustry } from \"../IIndustry\";\nimport { MathJaxWrapper } from \"../../MathJaxWrapper\";\n\ninterface IProps {\n division: IIndustry;\n}\n\nexport function IndustryProductEquation(props: IProps): React.ReactElement {\n const reqs = [];\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 const prod = props.division.prodMats.map((p) => `1\\\\text{ }${p}`);\n if (props.division.makesProducts) {\n prod.push(\"Products\");\n }\n\n return (\n {\"\\\\(\" + reqs.join(\"+\") + `\\\\Rightarrow ` + prod.join(\"+\") + \"\\\\)\"}\n );\n}\n","import React, { useState } from \"react\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { NewCity } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation, useDivision } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n cityStateSetter: (city: string) => void;\n}\n\nexport function ExpandNewCity(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const division = useDivision();\n const possibleCities = Object.keys(division.offices).filter((cityName: string) => division.offices[cityName] === 0);\n const [city, setCity] = useState(possibleCities[0]);\n\n const disabled = corp.funds < CorporationConstants.OfficeInitialCost;\n\n function onCityChange(event: SelectChangeEvent): void {\n setCity(event.target.value);\n }\n\n function expand(): void {\n try {\n NewCity(corp, division, city);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n dialogBoxCreate(`Opened a new office in ${city}!`);\n\n props.cityStateSetter(city);\n }\n return (\n <>\n \n Would you like to expand into a new city by opening an office? This would cost{\" \"}\n \n \n \n Confirm\n \n }\n value={city}\n onChange={onCityChange}\n >\n {possibleCities.map((cityName: string) => (\n \n {cityName}\n \n ))}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { IndustryStartingCosts, Industries, IndustryDescriptions } from \"../IndustryData\";\nimport { useCorporation } from \"./Context\";\nimport { IIndustry } from \"../IIndustry\";\nimport { NewIndustry } from \"../Actions\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n setDivisionName: (name: string) => void;\n}\n\nexport function ExpandIndustryTab(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const allIndustries = Object.keys(Industries).sort();\n const possibleIndustries = allIndustries\n .filter(\n (industryType: string) =>\n corp.divisions.find((division: IIndustry) => division.type === industryType) === undefined,\n )\n .sort();\n const [industry, setIndustry] = useState(possibleIndustries.length > 0 ? possibleIndustries[0] : \"\");\n const [name, setName] = useState(\"\");\n\n const cost = IndustryStartingCosts[industry];\n if (cost === undefined) {\n throw new Error(`Invalid industry: '${industry}'`);\n }\n const disabled = corp.funds < cost || name === \"\";\n\n function newIndustry(): void {\n if (disabled) return;\n try {\n NewIndustry(corp, industry, name);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n return;\n }\n\n // Set routing to the new division so that the UI automatically switches to it\n props.setDivisionName(name);\n }\n\n function onNameChange(event: React.ChangeEvent): void {\n // [a-zA-Z0-9-_]\n setName(event.target.value);\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) newIndustry();\n }\n\n function onIndustryChange(event: SelectChangeEvent): void {\n setIndustry(event.target.value);\n }\n\n const desc = IndustryDescriptions[industry];\n if (desc === undefined) throw new Error(`Trying to create an industry that doesn't exists: '${industry}'`);\n\n return (\n <>\n Create a new division to expand into a new industry:\n \n {desc(corp)}\n
    \n
    \n\n Division name:\n\n \n \n Expand\n \n ),\n }}\n />\n \n \n );\n}\n","// React Component for displaying Corporation Overview info\nimport React, { useState } from \"react\";\nimport { LevelableUpgrade } from \"./LevelableUpgrade\";\nimport { UnlockUpgrade } from \"./UnlockUpgrade\";\nimport { BribeFactionModal } from \"./BribeFactionModal\";\nimport { SellSharesModal } from \"./SellSharesModal\";\nimport { BuybackSharesModal } from \"./BuybackSharesModal\";\nimport { IssueDividendsModal } from \"./IssueDividendsModal\";\nimport { IssueNewSharesModal } from \"./IssueNewSharesModal\";\nimport { FindInvestorsModal } from \"./FindInvestorsModal\";\nimport { GoPublicModal } from \"./GoPublicModal\";\nimport { Factions } from \"../../Faction/Factions\";\n\nimport { CorporationConstants } from \"../data/Constants\";\nimport { CorporationUnlockUpgrade, CorporationUnlockUpgrades } from \"../data/CorporationUnlockUpgrades\";\nimport { CorporationUpgrade, CorporationUpgrades } from \"../data/CorporationUpgrades\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { StatsTable } from \"../../ui/React/StatsTable\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Paper from \"@mui/material/Paper\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n rerender: () => void;\n}\nexport function Overview({ rerender }: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const profit: number = corp.revenue - corp.expenses;\n\n const multRows: any[][] = [];\n function appendMult(name: string, value: number): void {\n if (value === 1) return;\n multRows.push([name, numeralWrapper.format(value, \"0.000\")]);\n }\n appendMult(\"Production Multiplier: \", corp.getProductionMultiplier());\n appendMult(\"Storage Multiplier: \", corp.getStorageMultiplier());\n appendMult(\"Advertising Multiplier: \", corp.getAdvertisingMultiplier());\n appendMult(\"Empl. Creativity Multiplier: \", corp.getEmployeeCreMultiplier());\n appendMult(\"Empl. Charisma Multiplier: \", corp.getEmployeeChaMultiplier());\n appendMult(\"Empl. Intelligence Multiplier: \", corp.getEmployeeIntMultiplier());\n appendMult(\"Empl. Efficiency Multiplier: \", corp.getEmployeeEffMultiplier());\n appendMult(\"Sales Multiplier: \", corp.getSalesMultiplier());\n appendMult(\"Scientific Research Multiplier: \", corp.getScientificResearchMultiplier());\n\n return (\n <>\n ],\n [\"Total Revenue:\", ],\n [\"Total Expenses:\", ],\n [\"Publicly Traded:\", corp.public ? \"Yes\" : \"No\"],\n [\"Owned Stock Shares:\", numeralWrapper.format(corp.numShares, \"0.000a\")],\n [\"Stock Price:\", corp.public ? : \"N/A\"],\n ]}\n />\n
    \n \n \n }\n >\n Total Stock Shares: {numeralWrapper.format(corp.totalShares, \"0.000a\")}\n \n \n
    \n \n
    \n \n
    \n \n \n \n Get a copy of and read 'The Complete Handbook for Creating a Successful Corporation.' This is a .lit file\n that guides you through the beginning of setting up a Corporation and provides some tips/pointers for\n helping you get started with managing it.\n \n }\n >\n \n \n {corp.public ? : }\n \n \n
    \n \n \n );\n}\n\ninterface IPrivateButtonsProps {\n rerender: () => void;\n}\n// Render the buttons for when your Corporation is still private\nfunction PrivateButtons({ rerender }: IPrivateButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [findInvestorsopen, setFindInvestorsopen] = useState(false);\n const [goPublicopen, setGoPublicopen] = useState(false);\n\n const fundingAvailable = corp.fundingRound < 4;\n const findInvestorsTooltip = fundingAvailable\n ? \"Search for private investors who will give you startup funding in exchange for equity (stock shares) in your company\"\n : \"\";\n\n return (\n <>\n {findInvestorsTooltip}}>\n \n \n \n Become a publicly traded and owned entity. Going public involves issuing shares for an IPO. Once you are a\n public company, your shares will be traded on the stock market.\n \n }\n >\n \n \n setFindInvestorsopen(false)} rerender={rerender} />\n setGoPublicopen(false)} rerender={rerender} />\n \n );\n}\n\ninterface IUpgradeProps {\n rerender: () => void;\n}\n// Render the UI for Corporation upgrades\nfunction Upgrades({ rerender }: IUpgradeProps): React.ReactElement {\n const corp = useCorporation();\n // Don't show upgrades\n if (corp.divisions.length <= 0) {\n return Upgrades are unlocked once you create an industry.;\n }\n\n return (\n <>\n \n Unlocks\n \n {Object.values(CorporationUnlockUpgrades)\n .filter((upgrade: CorporationUnlockUpgrade) => !corp.unlockUpgrades[upgrade[0]])\n .map((upgrade: CorporationUnlockUpgrade) => (\n \n ))}\n \n \n \n Upgrades\n \n {corp.upgrades\n .map((level: number, i: number) => CorporationUpgrades[i])\n .map((upgrade: CorporationUpgrade) => (\n \n ))}\n \n \n \n );\n}\n\ninterface IPublicButtonsProps {\n rerender: () => void;\n}\n\n// Render the buttons for when your Corporation has gone public\nfunction PublicButtons({ rerender }: IPublicButtonsProps): React.ReactElement {\n const corp = useCorporation();\n const [sellSharesOpen, setSellSharesOpen] = useState(false);\n const [buybackSharesOpen, setBuybackSharesOpen] = useState(false);\n const [issueNewSharesOpen, setIssueNewSharesOpen] = useState(false);\n const [issueDividendsOpen, setIssueDividendsOpen] = useState(false);\n\n const sellSharesOnCd = corp.shareSaleCooldown > 0;\n const sellSharesTooltip = sellSharesOnCd\n ? \"Cannot sell shares for \" + corp.convertCooldownToString(corp.shareSaleCooldown)\n : \"Sell your shares in the company. The money earned from selling your \" +\n \"shares goes into your personal account, not the Corporation's. \" +\n \"This is one of the only ways to profit from your business venture.\";\n\n const issueNewSharesOnCd = corp.issueNewSharesCooldown > 0;\n const issueNewSharesTooltip = issueNewSharesOnCd\n ? \"Cannot issue new shares for \" + corp.convertCooldownToString(corp.issueNewSharesCooldown)\n : \"Issue new equity shares to raise capital.\";\n\n return (\n <>\n {sellSharesTooltip}}>\n \n \n setSellSharesOpen(false)} rerender={rerender} />\n Buy back shares you that previously issued or sold at market price.}>\n \n \n setBuybackSharesOpen(false)} rerender={rerender} />\n {issueNewSharesTooltip}}>\n \n \n setIssueNewSharesOpen(false)} />\n Manage the dividends that are paid out to shareholders (including yourself)}\n >\n \n \n setIssueDividendsOpen(false)} />\n \n );\n}\n\nfunction BribeButton(): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [open, setOpen] = useState(false);\n const canBribe =\n corp.determineValuation() >= CorporationConstants.BribeThreshold &&\n player.factions.filter((f) => Factions[f].getInfo().offersWork()).length > 0;\n\n function openBribe(): void {\n if (!canBribe) return;\n setOpen(true);\n }\n\n return (\n <>\n \n \n \n setOpen(false)} />\n \n );\n}\n\ninterface IDividendsStatsProps {\n profit: number;\n}\nfunction DividendsStats({ profit }: IDividendsStatsProps): React.ReactElement {\n const corp = useCorporation();\n if (corp.dividendPercentage <= 0 || profit <= 0) return <>;\n const totalDividends = (corp.dividendPercentage / 100) * profit;\n const retainedEarnings = profit - totalDividends;\n const dividendsPerShare = totalDividends / corp.totalShares;\n return (\n ],\n [\"Dividend Percentage:\", numeralWrapper.format(corp.dividendPercentage / 100, \"0%\")],\n [\"Dividends per share:\", ],\n [\"Your earnings as a shareholder:\", ],\n ]}\n />\n );\n}\n\n// Returns a string with general information about Corporation\nfunction BonusTime(): React.ReactElement {\n const corp = useCorporation();\n const storedTime = corp.storedCycles * CONSTANTS.MilliPerCycle;\n if (storedTime <= 15000) return <>;\n return (\n \n Bonus time: {convertTimeMsToTimeElapsedString(storedTime)}\n
    \n
    \n
    \n );\n}\n","// React components for the levelable upgrade buttons on the overview panel\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUpgrade } from \"../data/CorporationUpgrades\";\nimport { LevelUpgrade } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgrade: CorporationUpgrade;\n rerender: () => void;\n}\n\nexport function LevelableUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgrade;\n const level = corp.upgrades[data[0]];\n\n const baseCost = data[1];\n const priceMult = data[2];\n const cost = baseCost * Math.pow(priceMult, level);\n\n const tooltip = data[5];\n function onClick(): void {\n if (corp.funds < cost) return;\n try {\n LevelUpgrade(corp, props.upgrade);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n \n {data[4]} - lvl {level}\n \n \n \n \n );\n}\n","// React Components for the Unlock upgrade buttons on the overview page\nimport React from \"react\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CorporationUnlockUpgrade } from \"../data/CorporationUnlockUpgrades\";\nimport { useCorporation } from \"./Context\";\nimport { UnlockUpgrade as UU } from \"../Actions\";\nimport { MoneyCost } from \"./MoneyCost\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Button from \"@mui/material/Button\";\nimport Box from \"@mui/material/Box\";\nimport Grid from \"@mui/material/Grid\";\n\ninterface IProps {\n upgradeData: CorporationUnlockUpgrade;\n rerender: () => void;\n}\n\nexport function UnlockUpgrade(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const data = props.upgradeData;\n const tooltip = data[3];\n function onClick(): void {\n if (corp.funds < data[1]) return;\n try {\n UU(corp, props.upgradeData);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.rerender();\n }\n\n return (\n \n \n \n \n {data[2]}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function BribeFactionModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const factions = player.factions.filter((name: string) => {\n const info = Factions[name].getInfo();\n if (!info.offersWork()) return false;\n if (player.hasGangWith(name)) return false;\n return true;\n });\n const corp = useCorporation();\n const [money, setMoney] = useState(0);\n const [stock, setStock] = useState(0);\n const [selectedFaction, setSelectedFaction] = useState(factions.length > 0 ? factions[0] : \"\");\n const disabled =\n money === null ||\n stock === null ||\n (money === 0 && stock === 0) ||\n isNaN(money) ||\n isNaN(stock) ||\n money < 0 ||\n stock < 0 ||\n corp.funds < money ||\n stock > corp.numShares;\n\n function onMoneyChange(event: React.ChangeEvent): void {\n setMoney(parseFloat(event.target.value));\n }\n\n function onStockChange(event: React.ChangeEvent): void {\n setStock(parseFloat(event.target.value));\n }\n\n function changeFaction(event: SelectChangeEvent): void {\n setSelectedFaction(event.target.value);\n }\n\n function repGain(money: number, stock: number): number {\n return (money + stock * corp.sharePrice) / CorporationConstants.BribeToRepRatio;\n }\n\n function getRepText(money: number, stock: number): string {\n if (money === 0 && stock === 0) return \"\";\n if (isNaN(money) || isNaN(stock) || money < 0 || stock < 0) {\n return \"ERROR: Invalid value(s) entered\";\n } else if (corp.funds < money) {\n return \"ERROR: You do not have this much money to bribe with\";\n } else if (stock > corp.numShares) {\n return \"ERROR: You do not have this many shares to bribe with\";\n } else {\n return (\n \"You will gain \" +\n numeralWrapper.formatReputation(repGain(money, stock)) +\n \" reputation with \" +\n selectedFaction +\n \" with this bribe\"\n );\n }\n }\n\n function bribe(money: number, stock: number): void {\n const fac = Factions[selectedFaction];\n if (disabled) return;\n const rep = repGain(money, stock);\n dialogBoxCreate(\n \"You gained \" + numeralWrapper.formatReputation(rep) + \" reputation with \" + fac.name + \" by bribing them.\",\n );\n fac.playerReputation += rep;\n corp.funds = corp.funds - money;\n corp.numShares -= stock;\n props.onClose();\n }\n\n return (\n \n \n You can use Corporation funds or stock shares to bribe Faction Leaders in exchange for faction reputation.\n \n \n Faction:\n \n \n {getRepText(money ? money : 0, stock ? stock : 0)}\n \n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport { ICorporation } from \"../ICorporation\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { Money } from \"../../ui/React/Money\";\nimport { SellShares } from \"../Actions\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player sell Corporation shares\n// This is created when the player clicks the \"Sell Shares\" button in the overview panel\nexport function SellSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n const disabled = shares === null || isNaN(shares) || shares <= 0 || shares > corp.numShares;\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n function ProfitIndicator(props: { shares: number | null; corp: ICorporation }): React.ReactElement {\n if (props.shares === null) return <>;\n if (isNaN(props.shares) || props.shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to sell;\n } else if (props.shares > corp.numShares) {\n return <>You don't have this many shares to sell!;\n } else {\n const stockSaleResults = corp.calculateShareSale(props.shares);\n const profit = stockSaleResults[0];\n return (\n <>\n Sell {props.shares} shares for a total of {numeralWrapper.formatMoney(profit)}\n \n );\n }\n }\n\n function sell(): void {\n if (disabled) return;\n try {\n const profit = SellShares(corp, player, shares)\n props.onClose();\n dialogBoxCreate(\n <>\n Sold {numeralWrapper.formatMoney(shares)} shares for\n . The corporation's stock price fell to  \n as a result of dilution.\n ,\n );\n\n props.rerender();\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) sell();\n }\n\n return (\n \n \n Enter the number of shares you would like to sell. The money from selling your shares will go directly to you\n (NOT your Corporation).\n
    \n
    \n Selling your shares will cause your corporation's stock price to fall due to dilution. Furthermore, selling a\n large number of shares all at once will have an immediate effect in reducing your stock price.\n
    \n
    \n The current price of your company's stock is {numeralWrapper.formatMoney(corp.sharePrice)}\n
    \n \n
    \n \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport { BuyBackShares } from '../Actions';\nimport { dialogBoxCreate } from '../../ui/React/DialogBox';\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player buyback shares\n// This is created when the player clicks the \"Buyback Shares\" button in the overview panel\nexport function BuybackSharesModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n\n function changeShares(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(Math.round(parseFloat(event.target.value)));\n }\n\n const currentStockPrice = corp.sharePrice;\n const buybackPrice = currentStockPrice * 1.1;\n const disabled =\n shares === null ||\n isNaN(shares) ||\n shares <= 0 ||\n shares > corp.issuedShares ||\n shares * buybackPrice > player.money;\n\n function buy(): void {\n if (disabled) return;\n try {\n BuyBackShares(corp, player, shares)\n }\n catch (err) {\n dialogBoxCreate(err + \"\");\n }\n props.onClose();\n props.rerender();\n }\n\n function CostIndicator(): React.ReactElement {\n if (shares === null) return <>;\n if (isNaN(shares) || shares <= 0) {\n return <>ERROR: Invalid value entered for number of shares to buyback;\n } else if (shares > corp.issuedShares) {\n return (\n <>\n There are not this many shares available to buy back. There are only{\" \"}\n {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding shares.\n \n );\n } else {\n return (\n <>\n Purchase {shares} shares for a total of {numeralWrapper.formatMoney(shares * buybackPrice)}\n \n );\n }\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) buy();\n }\n\n return (\n \n \n Enter the number of outstanding shares you would like to buy back. These shares must be bought at a 10% premium.\n However, repurchasing shares from the market tends to lead to an increase in stock price.\n
    \n
    \n To purchase these shares, you must use your own money (NOT your Corporation's funds).\n
    \n
    \n The current buyback price of your company's stock is {numeralWrapper.formatMoney(buybackPrice)}. Your company\n currently has {numeralWrapper.formatBigNumber(corp.issuedShares)} outstanding stock shares.\n
    \n \n
    \n \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { IssueDividends } from \"../Actions\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue & manage dividends\n// This is created when the player clicks the \"Issue Dividends\" button in the overview panel\nexport function IssueDividendsModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [percent, setPercent] = useState(0);\n\n const canIssue = !isNaN(percent) && percent >= 0 && percent <= CorporationConstants.DividendMaxPercentage * 100;\n function issueDividends(): void {\n if (!canIssue) return;\n if (percent === null) return;\n try {\n IssueDividends(corp, percent / 100);\n } catch (err) {\n dialogBoxCreate(err + \"\");\n }\n\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueDividends();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setPercent(0);\n else {\n let p = parseFloat(event.target.value);\n if (p > 100) p = 100;\n if (p < 0) p = 0;\n setPercent(p);\n }\n }\n\n return (\n \n \n Dividends are a distribution of a portion of the corporation's profits to the shareholders. This includes\n yourself, as well.\n
    \n
    \n In order to issue dividends, simply allocate some percentage of your corporation's profits to dividends. This\n percentage must be an integer between 0 and 100. (A percentage of 0 means no dividends will be issued)\n
    \n
    \n Two important things to note:\n
    \n * Issuing dividends will negatively affect your corporation's stock price\n
    \n
    \n Example: Assume your corporation makes $100m / sec in profit and you allocate 40% of that towards dividends.\n That means your corporation will gain $60m / sec in funds and the remaining $40m / sec will be paid as\n dividends. Since your corporation starts with 1 billion shares, every shareholder will be paid $0.04 per share\n per second before taxes.\n
    \n \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { getRandomInt } from \"../../utils/helpers/getRandomInt\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport TextField from \"@mui/material/TextField\";\nimport Button from \"@mui/material/Button\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IEffectTextProps {\n shares: number | null;\n}\n\nfunction EffectText(props: IEffectTextProps): React.ReactElement {\n const corp = useCorporation();\n if (props.shares === null) return <>;\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n let newShares = props.shares;\n if (isNaN(newShares)) {\n return Invalid input;\n }\n\n // Round to nearest ten-millionth\n newShares /= 10e6;\n newShares = Math.round(newShares) * 10e6;\n\n if (newShares < 10e6) {\n return Must issue at least 10 million new shares;\n }\n\n if (newShares > maxNewShares) {\n return You cannot issue that many shares;\n }\n\n return (\n \n Issue {numeralWrapper.format(newShares, \"0.000a\")} new shares for{\" \"}\n {numeralWrapper.formatMoney(newShares * newSharePrice)}?\n \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\n// Create a popup that lets the player issue new shares\n// This is created when the player clicks the \"Issue New Shares\" buttons in the overview panel\nexport function IssueNewSharesModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(null);\n const maxNewSharesUnrounded = Math.round(corp.totalShares * 0.2);\n const maxNewShares = maxNewSharesUnrounded - (maxNewSharesUnrounded % 1e6);\n\n const newShares = Math.round((shares || 0) / 10e6) * 10e6;\n const disabled = shares === null || isNaN(newShares) || newShares < 10e6 || newShares > maxNewShares;\n\n function issueNewShares(): void {\n if (shares === null) return;\n if (disabled) return;\n\n const newSharePrice = Math.round(corp.sharePrice * 0.9);\n let newShares = shares;\n\n // Round to nearest ten-millionth\n newShares = Math.round(newShares / 10e6) * 10e6;\n\n const profit = newShares * newSharePrice;\n corp.issueNewSharesCooldown = CorporationConstants.IssueNewSharesCooldown;\n corp.totalShares += newShares;\n\n // Determine how many are bought by private investors\n // Private investors get up to 50% at most\n // Round # of private shares to the nearest millionth\n let privateShares = getRandomInt(0, Math.round(newShares / 2));\n privateShares = Math.round(privateShares / 1e6) * 1e6;\n\n corp.issuedShares += newShares - privateShares;\n corp.funds = corp.funds + profit;\n corp.immediatelyUpdateSharePrice();\n props.onClose();\n dialogBoxCreate(\n `Issued ${numeralWrapper.format(newShares, \"0.000a\")} and raised ` +\n `${numeralWrapper.formatMoney(profit)}. ${numeralWrapper.format(privateShares, \"0.000a\")} ` +\n `of these shares were bought by private investors.

    ` +\n `Stock price decreased to ${numeralWrapper.formatMoney(corp.sharePrice)}`,\n );\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) issueNewShares();\n }\n\n function onChange(event: React.ChangeEvent): void {\n if (event.target.value === \"\") setShares(null);\n else setShares(parseFloat(event.target.value));\n }\n\n return (\n \n \n You can issue new equity shares (i.e. stocks) in order to raise capital for your corporation.\n
    \n
    \n  * You can issue at most {numeralWrapper.formatMoney(maxNewShares)} new shares\n
    \n  * New shares are sold at a 10% discount\n
    \n  * You can only issue new shares once every 12 hours\n
    \n  * Issuing new shares causes dilution, resulting in a decrease in stock price and lower dividends per share\n
    \n  * Number of new shares issued must be a multiple of 10 million\n
    \n
    \n When you choose to issue new equity, private shareholders have first priority for up to 50% of the new shares.\n If they choose to exercise this option, these newly issued shares become private, restricted shares, which means\n you cannot buy them back.\n
    \n \n \n \n
    \n );\n}\n","import React from \"react\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { CorporationConstants } from \"../data/Constants\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { useCorporation } from \"./Context\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function FindInvestorsModal(props: IProps): React.ReactElement {\n const corporation = useCorporation();\n const val = corporation.determineValuation();\n if (corporation.fundingRound >= CorporationConstants.FundingRoundShares.length || corporation.fundingRound >= CorporationConstants.FundingRoundMultiplier.length) return <>;\n const percShares = CorporationConstants.FundingRoundShares[corporation.fundingRound];\n const roundMultiplier = CorporationConstants.FundingRoundMultiplier[corporation.fundingRound];\n const funding = val * percShares * roundMultiplier;\n const investShares = Math.floor(CorporationConstants.INITIALSHARES * percShares);\n\n function findInvestors(): void {\n corporation.fundingRound++;\n corporation.addFunds(funding);\n corporation.numShares -= investShares;\n props.rerender();\n props.onClose();\n }\n return (\n \n \n An investment firm has offered you {numeralWrapper.formatMoney(funding)} in funding in exchange for a{\" \"}\n {numeralWrapper.format(percShares * 100, \"0.000a\")}% stake in the company (\n {numeralWrapper.format(investShares, \"0.000a\")} shares).\n
    \n
    \n Do you accept or reject this offer?\n
    \n
    \n Hint: Investment firms will offer more money if your corporation is turning a profit\n
    \n \n
    \n );\n}\n","import React, { useState } from \"react\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { useCorporation } from \"./Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\nimport Box from \"@mui/material/Box\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n rerender: () => void;\n}\n\n// Create a popup that lets the player manage exports\nexport function GoPublicModal(props: IProps): React.ReactElement {\n const corp = useCorporation();\n const [shares, setShares] = useState(\"\");\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n\n function goPublic(): void {\n const numShares = parseFloat(shares);\n const initialSharePrice = corp.determineValuation() / corp.totalShares;\n if (isNaN(numShares)) {\n dialogBoxCreate(\"Invalid value for number of issued shares\");\n return;\n }\n if (numShares > corp.numShares) {\n dialogBoxCreate(\"Error: You don't have that many shares to issue!\");\n return;\n }\n corp.public = true;\n corp.sharePrice = initialSharePrice;\n corp.issuedShares = numShares;\n corp.numShares -= numShares;\n corp.addFunds(numShares * initialSharePrice);\n props.rerender();\n dialogBoxCreate(\n `You took your ${corp.name} public and earned ` +\n `${numeralWrapper.formatMoney(numShares * initialSharePrice)} in your IPO`,\n );\n props.onClose();\n }\n\n function onKeyDown(event: React.KeyboardEvent): void {\n if (event.key === KEY.ENTER) goPublic();\n }\n\n function onChange(event: React.ChangeEvent): void {\n setShares(event.target.value);\n }\n\n return (\n \n \n Enter the number of shares you would like to issue for your IPO. These shares will be publicly sold and you will\n no longer own them. Your Corporation will receive {numeralWrapper.formatMoney(initialSharePrice)} per share (the\n IPO money will be deposited directly into your Corporation's funds).\n
    \n
    \n You have a total of {numeralWrapper.format(corp.numShares, \"0.000a\")} of shares that you can issue.\n
    \n \n \n corp.numShares}\n sx={{ mx: 1 }}\n onClick={goPublic}\n >\n Go Public\n \n \n
    \n );\n}\n","import { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport React, { useState } from \"react\";\nimport { Intro } from \"./Intro\";\nimport { Game } from \"./Game\";\nimport { Location } from \"../../Locations/Location\";\nimport { use } from \"../../ui/Context\";\nimport { calculateSkill } from \"../../PersonObjects/formulas/skill\";\n\ninterface IProps {\n location: Location;\n}\n\nfunction calcRawDiff(player: IPlayer, stats: number, startingDifficulty: number): number {\n const difficulty = startingDifficulty - Math.pow(stats, 0.9) / 250 - player.intelligence / 1600;\n if (difficulty < 0) return 0;\n if (difficulty > 3) return 3;\n return difficulty;\n}\n\nfunction calcDifficulty(player: IPlayer, startingDifficulty: number): number {\n const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;\n return calcRawDiff(player, totalStats, startingDifficulty);\n}\n\nfunction calcReward(player: IPlayer, startingDifficulty: number): number {\n const xpMult = 10 * 60 * 15;\n const total =\n calculateSkill(player.strength_exp_mult * xpMult, player.strength_mult) +\n calculateSkill(player.defense_exp_mult * xpMult, player.defense_mult) +\n calculateSkill(player.agility_exp_mult * xpMult, player.agility_mult) +\n calculateSkill(player.dexterity_exp_mult * xpMult, player.dexterity_mult) +\n calculateSkill(player.charisma_exp_mult * xpMult, player.charisma_mult);\n return calcRawDiff(player, total, startingDifficulty);\n}\n\nexport function InfiltrationRoot(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [start, setStart] = useState(false);\n\n if (props.location.infiltrationData === undefined) throw new Error(\"Trying to do infiltration on invalid location.\");\n const startingDifficulty = props.location.infiltrationData.startingSecurityLevel;\n const difficulty = calcDifficulty(player, startingDifficulty);\n const reward = calcReward(player, startingDifficulty);\n console.log(`${difficulty} ${reward}`);\n\n function cancel(): void {\n router.toCity();\n }\n\n if (!start) {\n return (\n setStart(true)}\n cancel={cancel}\n />\n );\n }\n\n return (\n \n );\n}\n","import React from \"react\";\nimport { Location } from \"../../Locations/Location\";\nimport Grid from \"@mui/material/Grid\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\ninterface IProps {\n Location: Location;\n Difficulty: number;\n MaxLevel: number;\n start: () => void;\n cancel: () => void;\n}\n\nfunction arrowPart(color: string, length: number): JSX.Element {\n let arrow = \"\";\n if (length <= 0) length = 0;\n else if (length > 13) length = 13;\n else {\n length--;\n arrow = \">\";\n }\n return (\n \n {\"=\".repeat(length)}\n {arrow}\n {\" \".repeat(13 - arrow.length - length)}\n \n );\n}\n\nfunction coloredArrow(difficulty: number): JSX.Element {\n if (difficulty === 0) {\n return (\n \n {\">\"}\n {\" \".repeat(38)}\n \n );\n } else {\n return (\n <>\n {arrowPart(\"white\", difficulty * 13)}\n {arrowPart(\"orange\", (difficulty - 1) * 13)}\n {arrowPart(\"red\", (difficulty - 2) * 13)}\n \n );\n }\n}\n\nexport function Intro(props: IProps): React.ReactElement {\n return (\n <>\n \n \n Infiltrating {props.Location.name}\n \n \n \n Maximum level: {props.MaxLevel}\n \n \n \n \n Difficulty: {numeralWrapper.format(props.Difficulty * 33.3333, \"0\")} / 100\n \n \n\n {props.Difficulty > 1.5 && (\n \n \n Warning: This location is too heavily guarded for your current stats, try training or finding an easier\n location.\n \n \n )}\n\n \n [{coloredArrow(props.Difficulty)}]\n {` ^ ^ ^ ^`}\n {` Trivial Normal Hard Impossible`}\n \n \n \n Infiltration is a series of short minigames that get progressively harder. You take damage for failing them.\n Reaching the maximum level rewards you with intel you can trade for money or reputation.\n \n
    \n \n The minigames you play are randomly selected. It might take you few tries to get used to them.\n \n
    \n No game require use of the mouse.\n
    \n Spacebar is the default action/confirm button.\n
    \n Everything that uses arrow can also use WASD\n
    \n Sometimes the rest of the keyboard is used.\n
    \n \n \n \n \n \n \n
    \n \n );\n}\n","import { use } from \"../../ui/Context\";\nimport React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport { Countdown } from \"./Countdown\";\nimport { BracketGame } from \"./BracketGame\";\nimport { SlashGame } from \"./SlashGame\";\nimport { BackwardGame } from \"./BackwardGame\";\nimport { BribeGame } from \"./BribeGame\";\nimport { CheatCodeGame } from \"./CheatCodeGame\";\nimport { Cyberpunk2077Game } from \"./Cyberpunk2077Game\";\nimport { MinesweeperGame } from \"./MinesweeperGame\";\nimport { WireCuttingGame } from \"./WireCuttingGame\";\nimport { Victory } from \"./Victory\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nenum Stage {\n Countdown = 0,\n Minigame,\n Result,\n Sell,\n}\n\nconst minigames = [\n SlashGame,\n BracketGame,\n BackwardGame,\n BribeGame,\n CheatCodeGame,\n Cyberpunk2077Game,\n MinesweeperGame,\n WireCuttingGame,\n];\n\nexport function Game(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [level, setLevel] = useState(1);\n const [stage, setStage] = useState(Stage.Countdown);\n const [results, setResults] = useState(\"\");\n const [gameIds, setGameIds] = useState({\n lastGames: [-1, -1],\n id: Math.floor(Math.random() * minigames.length),\n });\n\n function nextGameId(): number {\n let id = gameIds.lastGames[0];\n const ids = [gameIds.lastGames[0], gameIds.lastGames[1], gameIds.id];\n while (ids.includes(id)) {\n id = Math.floor(Math.random() * minigames.length);\n }\n return id;\n }\n\n function setupNextGame(): void {\n setGameIds({\n lastGames: [gameIds.lastGames[1], gameIds.id],\n id: nextGameId(),\n });\n }\n\n function success(): void {\n pushResult(true);\n if (level === props.MaxLevel) {\n setStage(Stage.Sell);\n } else {\n setStage(Stage.Countdown);\n setLevel(level + 1);\n }\n setupNextGame();\n }\n\n function pushResult(win: boolean): void {\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?: { automated: boolean }): void {\n setStage(Stage.Countdown);\n pushResult(false);\n // Kill the player immediately if they use automation, so\n // it's clear they're not meant to\n const damage = options?.automated ? player.hp : props.StartingDifficulty * 3;\n if (player.takeDamage(damage)) {\n router.toCity();\n return;\n }\n setupNextGame();\n }\n\n function cancel(): void {\n router.toCity();\n return;\n }\n\n let stageComponent: React.ReactNode;\n switch (stage) {\n case Stage.Countdown:\n stageComponent = setStage(Stage.Minigame)} />;\n break;\n case Stage.Minigame: {\n const MiniGame = minigames[gameIds.id];\n stageComponent = ;\n break;\n }\n case Stage.Sell:\n stageComponent = (\n \n );\n break;\n }\n\n function Progress(): React.ReactElement {\n return (\n \n {results.slice(0, results.length - 1)}\n {results[results.length - 1]}\n \n );\n }\n\n return (\n <>\n \n \n \n \n \n \n Level: {level} / {props.MaxLevel}\n \n \n \n\n \n {stageComponent}\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\n\nimport Typography from \"@mui/material/Typography\";\ninterface IProps {\n onFinish: () => void;\n}\n\nexport function Countdown(props: IProps): React.ReactElement {\n const [x, setX] = useState(3);\n useEffect(() => {\n if (x === 0) {\n props.onFinish();\n return;\n }\n setTimeout(() => setX(x - 1), 200);\n });\n\n return (\n <>\n \n \n Get Ready!\n {x}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 8000, min: 2, max: 3 },\n Normal: { timer: 6000, min: 4, max: 5 },\n Hard: { timer: 4000, min: 4, max: 6 },\n Impossible: { timer: 2500, min: 7, max: 7 },\n};\n\nfunction generateLeftSide(difficulty: Difficulty): string {\n let str = \"\";\n const options = [KEY.OPEN_BRACKET, KEY.LESS_THAN, KEY.OPEN_PARENTHESIS, KEY.OPEN_BRACE];\n const length = random(difficulty.min, difficulty.max);\n for (let i = 0; i < length; i++) {\n str += options[Math.floor(Math.random() * 4)];\n }\n\n return str;\n}\n\nfunction getChar(event: KeyboardEvent): string {\n if (event.key === KEY.CLOSE_PARENTHESIS) return KEY.CLOSE_PARENTHESIS;\n if (event.key === KEY.CLOSE_BRACKET) return KEY.CLOSE_BRACKET;\n if (event.key === KEY.CLOSE_BRACE) return KEY.CLOSE_BRACE;\n if (event.key === KEY.GREATER_THAN) return KEY.GREATER_THAN;\n return \"\";\n}\n\nfunction match(left: string, right: string): boolean {\n return (\n (left === KEY.OPEN_BRACKET && right === KEY.CLOSE_BRACKET) ||\n (left === KEY.LESS_THAN && right === KEY.GREATER_THAN) ||\n (left === KEY.OPEN_PARENTHESIS && right === KEY.CLOSE_PARENTHESIS) ||\n (left === KEY.OPEN_BRACE && right === KEY.CLOSE_BRACE)\n );\n}\n\nexport function BracketGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [right, setRight] = useState(\"\");\n const [left] = useState(generateLeftSide(difficulty));\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const char = getChar(event);\n if (!char) return;\n if (!match(left[left.length - right.length - 1], char)) {\n props.onFailure();\n return;\n }\n if (left.length === right.length + 1) {\n props.onSuccess();\n return;\n }\n setRight(right + char);\n }\n\n return (\n \n \n \n Close the brackets\n \n {`${left}${right}`}\n \n \n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n window: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { window: 600 },\n Normal: { window: 325 },\n Hard: { window: 250 },\n Impossible: { window: 150 },\n};\n\nexport function SlashGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { window: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const [phase, setPhase] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key !== KEY.SPACE) return;\n if (phase !== 2) {\n props.onFailure();\n } else {\n props.onSuccess();\n }\n }\n\n useEffect(() => {\n let id = window.setTimeout(() => {\n setPhase(1);\n id = window.setTimeout(() => {\n setPhase(2);\n id = window.setTimeout(() => setPhase(0), difficulty.window);\n }, 250);\n }, Math.random() * 3250 + 1500 - (250 + difficulty.window));\n return () => {\n clearInterval(id);\n };\n }, []);\n\n return (\n \n \n \n Slash when his guard is down!\n {phase === 0 && Guarding ...}\n {phase === 1 && Preparing?}\n {phase === 2 && ATTACKING!}\n \n \n \n );\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { BlinkingCursor } from \"./BlinkingCursor\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 16000, min: 3, max: 4 },\n Normal: { timer: 12500, min: 2, max: 3 },\n Hard: { timer: 15000, min: 3, max: 4 },\n Impossible: { timer: 8000, min: 4, max: 4 },\n};\n\nexport function BackwardGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [answer] = useState(makeAnswer(difficulty));\n const [guess, setGuess] = useState(\"\");\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (event.key === KEY.BACKSPACE) return;\n const nextGuess = guess + event.key.toUpperCase();\n if (!answer.startsWith(nextGuess)) props.onFailure();\n else if (answer === nextGuess) props.onSuccess();\n else setGuess(nextGuess);\n }\n\n return (\n \n \n \n Type it backward\n \n \n \n {answer}\n \n \n \n {guess}\n \n \n \n \n );\n}\n\nfunction makeAnswer(difficulty: Difficulty): string {\n const length = random(difficulty.min, difficulty.max);\n let answer = \"\";\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 = [\n \"ALGORITHM\",\n \"ANALOG\",\n \"APP\",\n \"APPLICATION\",\n \"ARRAY\",\n \"BACKUP\",\n \"BANDWIDTH\",\n \"BINARY\",\n \"BIT\",\n \"BITE\",\n \"BITMAP\",\n \"BLOG\",\n \"BLOGGER\",\n \"BOOKMARK\",\n \"BOOT\",\n \"BROADBAND\",\n \"BROWSER\",\n \"BUFFER\",\n \"BUG\",\n \"BUS\",\n \"BYTE\",\n \"CACHE\",\n \"CAPS LOCK\",\n \"CAPTCHA\",\n \"CD\",\n \"CD-ROM\",\n \"CLIENT\",\n \"CLIPBOARD\",\n \"CLOUD\",\n \"COMPUTING\",\n \"COMMAND\",\n \"COMPILE\",\n \"COMPRESS\",\n \"COMPUTER\",\n \"CONFIGURE\",\n \"COOKIE\",\n \"COPY\",\n \"CPU\",\n \"CYBERCRIME\",\n \"CYBERSPACE\",\n \"DASHBOARD\",\n \"DATA\",\n \"MINING\",\n \"DATABASE\",\n \"DEBUG\",\n \"DECOMPRESS\",\n \"DELETE\",\n \"DESKTOP\",\n \"DEVELOPMENT\",\n \"DIGITAL\",\n \"DISK\",\n \"DNS\",\n \"DOCUMENT\",\n \"DOMAIN\",\n \"DOMAIN NAME\",\n \"DOT\",\n \"DOT MATRIX\",\n \"DOWNLOAD\",\n \"DRAG\",\n \"DVD\",\n \"DYNAMIC\",\n \"EMAIL\",\n \"EMOTICON\",\n \"ENCRYPT\",\n \"ENCRYPTION\",\n \"ENTER\",\n \"EXABYTE\",\n \"FAQ\",\n \"FILE\",\n \"FINDER\",\n \"FIREWALL\",\n \"FIRMWARE\",\n \"FLAMING\",\n \"FLASH\",\n \"FLASH DRIVE\",\n \"FLOPPY DISK\",\n \"FLOWCHART\",\n \"FOLDER\",\n \"FONT\",\n \"FORMAT\",\n \"FRAME\",\n \"FREEWARE\",\n \"GIGABYTE\",\n \"GRAPHICS\",\n \"HACK\",\n \"HACKER\",\n \"HARDWARE\",\n \"HOME PAGE\",\n \"HOST\",\n \"HTML\",\n \"HYPERLINK\",\n \"HYPERTEXT\",\n \"ICON\",\n \"INBOX\",\n \"INTEGER\",\n \"INTERFACE\",\n \"INTERNET\",\n \"IP ADDRESS\",\n \"ITERATION\",\n \"JAVA\",\n \"JOYSTICK\",\n \"JUNKMAIL\",\n \"KERNEL\",\n \"KEY\",\n \"KEYBOARD\",\n \"KEYWORD\",\n \"LAPTOP\",\n \"LASER PRINTER\",\n \"LINK\",\n \"LINUX\",\n \"LOG OUT\",\n \"LOGIC\",\n \"LOGIN\",\n \"LURKING\",\n \"MACINTOSH\",\n \"MACRO\",\n \"MAINFRAME\",\n \"MALWARE\",\n \"MEDIA\",\n \"MEMORY\",\n \"MIRROR\",\n \"MODEM\",\n \"MONITOR\",\n \"MOTHERBOARD\",\n \"MOUSE\",\n \"MULTIMEDIA\",\n \"NET\",\n \"NETWORK\",\n \"NODE\",\n \"NOTEBOOK\",\n \"COMPUTER\",\n \"OFFLINE\",\n \"ONLINE\",\n \"OPENSOURCE\",\n \"OPERATING\",\n \"SYSTEM\",\n \"OPTION\",\n \"OUTPUT\",\n \"PAGE\",\n \"PASSWORD\",\n \"PASTE\",\n \"PATH\",\n \"PHISHING\",\n \"PIRACY\",\n \"PIRATE\",\n \"PLATFORM\",\n \"PLUGIN\",\n \"PODCAST\",\n \"POPUP\",\n \"PORTAL\",\n \"PRINT\",\n \"PRINTER\",\n \"PRIVACY\",\n \"PROCESS\",\n \"PROGRAM\",\n \"PROGRAMMER\",\n \"PROTOCOL\",\n \"QUEUE\",\n \"QWERTY\",\n \"RAM\",\n \"REALTIME\",\n \"REBOOT\",\n \"RESOLUTION\",\n \"RESTORE\",\n \"ROM\",\n \"ROOT\",\n \"ROUTER\",\n \"RUNTIME\",\n \"SAVE\",\n \"SCAN\",\n \"SCANNER\",\n \"SCREEN\",\n \"SCREENSHOT\",\n \"SCRIPT\",\n \"SCROLL\",\n \"SCROLL\",\n \"SEARCH\",\n \"ENGINE\",\n \"SECURITY\",\n \"SERVER\",\n \"SHAREWARE\",\n \"SHELL\",\n \"SHIFT\",\n \"SHIFT KEY\",\n \"SNAPSHOT\",\n \"SOCIAL NETWORKING\",\n \"SOFTWARE\",\n \"SPAM\",\n \"SPAMMER\",\n \"SPREADSHEET\",\n \"SPYWARE\",\n \"STATUS\",\n \"STORAGE\",\n \"SUPERCOMPUTER\",\n \"SURF\",\n \"SYNTAX\",\n \"TABLE\",\n \"TAG\",\n \"TERMINAL\",\n \"TEMPLATE\",\n \"TERABYTE\",\n \"TEXT EDITOR\",\n \"THREAD\",\n \"TOOLBAR\",\n \"TRASH\",\n \"TROJAN HORSE\",\n \"TYPEFACE\",\n \"UNDO\",\n \"UNIX\",\n \"UPLOAD\",\n \"URL\",\n \"USER\",\n \"USER INTERFACE\",\n \"USERNAME\",\n \"UTILITY\",\n \"VERSION\",\n \"VIRTUAL\",\n \"VIRTUAL MEMORY\",\n \"VIRUS\",\n \"WEB\",\n \"WEBMASTER\",\n \"WEBSITE\",\n \"WIDGET\",\n \"WIKI\",\n \"WINDOW\",\n \"WINDOWS\",\n \"WIRELESS\",\n \"PROCESSOR\",\n \"WORKSTATION\",\n \"WEB\",\n \"WORM\",\n \"WWW\",\n \"XML\",\n \"ZIP\",\n];\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\nimport { downArrowSymbol, upArrowSymbol } from \"../utils\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n size: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12000, size: 6 },\n Normal: { timer: 9000, size: 8 },\n Hard: { timer: 5000, size: 9 },\n Impossible: { timer: 2500, size: 12 },\n};\n\nexport function BribeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, size: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [choices] = useState(makeChoices(difficulty));\n const [index, setIndex] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const k = event.key;\n if (k === KEY.SPACE) {\n if (positive.includes(choices[index])) props.onSuccess();\n else props.onFailure();\n return;\n }\n\n let newIndex = index;\n if ([KEY.UP_ARROW, KEY.W, KEY.RIGHT_ARROW, KEY.D].map((key) => key as string).includes(k)) newIndex++;\n if ([KEY.DOWN_ARROW, KEY.S, KEY.LEFT_ARROW, KEY.A].map((key) => key as string).includes(k)) newIndex--;\n while (newIndex < 0) newIndex += choices.length;\n while (newIndex > choices.length - 1) newIndex -= choices.length;\n setIndex(newIndex);\n }\n\n return (\n \n \n \n Say something nice about the guard.\n \n \n \n \n {upArrowSymbol}\n \n \n {choices[index]}\n \n \n {downArrowSymbol}\n \n \n \n );\n}\n\nfunction shuffleArray(array: string[]): void {\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: Difficulty): string[] {\n const choices = [];\n choices.push(positive[Math.floor(Math.random() * positive.length)]);\n for (let i = 0; i < difficulty.size; i++) {\n const option = negative[Math.floor(Math.random() * negative.length)];\n if (choices.includes(option)) {\n i--;\n continue;\n }\n choices.push(option);\n }\n shuffleArray(choices);\n return choices;\n}\n\nconst positive = [\n \"affectionate\",\n \"agreeable\",\n \"bright\",\n \"charming\",\n \"creative\",\n \"determined\",\n \"energetic\",\n \"friendly\",\n \"funny\",\n \"generous\",\n \"polite\",\n \"likable\",\n \"diplomatic\",\n \"helpful\",\n \"giving\",\n \"kind\",\n \"hardworking\",\n \"patient\",\n \"dynamic\",\n \"loyal\",\n];\n\nconst negative = [\n \"aggressive\",\n \"aloof\",\n \"arrogant\",\n \"big-headed\",\n \"boastful\",\n \"boring\",\n \"bossy\",\n \"careless\",\n \"clingy\",\n \"couch potato\",\n \"cruel\",\n \"cynical\",\n \"grumpy\",\n \"hot air\",\n \"know it all\",\n \"obnoxious\",\n \"pain in the neck\",\n \"picky\",\n \"tactless\",\n \"thoughtless\",\n];\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random, getArrow, rightArrowSymbol, leftArrowSymbol, upArrowSymbol, downArrowSymbol } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n min: number;\n max: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 13000, min: 6, max: 8 },\n Normal: { timer: 7000, min: 7, max: 8 },\n Hard: { timer: 5000, min: 8, max: 9 },\n Impossible: { timer: 3000, min: 9, max: 10 },\n};\n\nexport function CheatCodeGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, min: 0, max: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [code] = useState(generateCode(difficulty));\n const [index, setIndex] = useState(0);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (code[index] !== getArrow(event)) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (index + 1 >= code.length) props.onSuccess();\n }\n\n return (\n \n \n \n Enter the Code!\n {code[index]}\n \n \n \n );\n}\n\nfunction generateCode(difficulty: Difficulty): string {\n const arrows = [leftArrowSymbol, rightArrowSymbol, upArrowSymbol, downArrowSymbol];\n let code = \"\";\n for (let i = 0; i < random(difficulty.min, difficulty.max); i++) {\n let arrow = arrows[Math.floor(4 * Math.random())];\n while (arrow === code[code.length - 1]) arrow = arrows[Math.floor(4 * Math.random())];\n code += arrow;\n }\n\n return code;\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n symbols: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 12500, width: 3, height: 3, symbols: 6 },\n Normal: { timer: 15000, width: 4, height: 4, symbols: 7 },\n Hard: { timer: 12500, width: 5, height: 5, symbols: 8 },\n Impossible: { timer: 10000, width: 6, height: 6, symbols: 9 },\n};\n\nexport function Cyberpunk2077Game(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, symbols: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [grid] = useState(generatePuzzle(difficulty));\n const [answer] = useState(generateAnswer(grid, difficulty));\n const [index, setIndex] = useState(0);\n const [pos, setPos] = useState([0, 0]);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\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.key === KEY.SPACE) {\n const selected = grid[pos[1]][pos[0]];\n const expected = answer[index];\n if (selected !== expected) {\n props.onFailure();\n return;\n }\n setIndex(index + 1);\n if (answer.length === index + 1) props.onSuccess();\n }\n }\n\n const fontSize = \"2em\";\n return (\n \n \n \n Match the symbols!\n \n Targets:{\" \"}\n {answer.map((a, i) => {\n if (i == index)\n return (\n \n {a} \n \n );\n return (\n \n {a} \n \n );\n })}\n \n
    \n {grid.map((line, y) => (\n
    \n \n {line.map((cell, x) => {\n if (x == pos[0] && y == pos[1])\n return (\n \n {cell} \n \n );\n return (\n \n {cell} \n \n );\n })}\n \n
    \n
    \n ))}\n \n
    \n
    \n );\n}\n\nfunction generateAnswer(grid: string[][], difficulty: Difficulty): string[] {\n const answer = [];\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 return answer;\n}\n\nfunction randChar(): string {\n return \"ABCDEF0123456789\"[Math.floor(Math.random() * 16)];\n}\n\nfunction generatePuzzle(difficulty: Difficulty): string[][] {\n const puzzle = [];\n for (let i = 0; i < Math.round(difficulty.height); i++) {\n const line = [];\n for (let j = 0; j < Math.round(difficulty.width); j++) {\n line.push(randChar() + randChar());\n }\n puzzle.push(line);\n }\n return puzzle;\n}\n","import React, { useState, useEffect } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { interpolate } from \"./Difficulty\";\nimport { downArrowSymbol, getArrow, leftArrowSymbol, rightArrowSymbol, upArrowSymbol } from \"../utils\";\nimport Typography from \"@mui/material/Typography\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n width: number;\n height: number;\n mines: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 15000, width: 3, height: 3, mines: 4 },\n Normal: { timer: 15000, width: 4, height: 4, mines: 7 },\n Hard: { timer: 15000, width: 5, height: 5, mines: 11 },\n Impossible: { timer: 15000, width: 6, height: 6, mines: 15 },\n};\n\nexport function MinesweeperGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = { timer: 0, width: 0, height: 0, mines: 0 };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [minefield] = useState(generateMinefield(difficulty));\n const [answer, setAnswer] = useState(generateEmptyField(difficulty));\n const [pos, setPos] = useState([0, 0]);\n const [memoryPhase, setMemoryPhase] = useState(true);\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n if (memoryPhase) return;\n const move = [0, 0];\n const arrow = getArrow(event);\n switch (arrow) {\n case upArrowSymbol:\n move[1]--;\n break;\n case leftArrowSymbol:\n move[0]--;\n break;\n case downArrowSymbol:\n move[1]++;\n break;\n case rightArrowSymbol:\n move[0]++;\n break;\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.key == KEY.SPACE) {\n if (!minefield[pos[1]][pos[0]]) {\n props.onFailure();\n return;\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 useEffect(() => {\n const id = setTimeout(() => setMemoryPhase(false), 2000);\n return () => clearInterval(id);\n }, []);\n\n return (\n \n \n \n {memoryPhase ? \"Remember all the mines!\" : \"Mark all the mines!\"}\n {minefield.map((line, y) => (\n
    \n \n {line.map((cell, x) => {\n if (memoryPhase) {\n if (minefield[y][x]) return [?] ;\n return [ ] ;\n } else {\n if (x == pos[0] && y == pos[1]) return [X] ;\n if (answer[y][x]) return [.] ;\n return [ ] ;\n }\n })}\n \n
    \n
    \n ))}\n \n
    \n
    \n );\n}\n\nfunction fieldEquals(a: boolean[][], b: boolean[][]): boolean {\n function count(field: boolean[][]): number {\n return field.flat().reduce((a, b) => a + (b ? 1 : 0), 0);\n }\n return count(a) === count(b);\n}\n\nfunction generateEmptyField(difficulty: Difficulty): boolean[][] {\n const field = [];\n for (let i = 0; i < difficulty.height; i++) {\n field.push(new Array(Math.round(difficulty.width)).fill(false));\n }\n return field;\n}\n\nfunction generateMinefield(difficulty: Difficulty): boolean[][] {\n const field = generateEmptyField(difficulty);\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 if (field[x][y]) {\n i--;\n continue;\n }\n field[x][y] = true;\n }\n return field;\n}\n","import React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport Typography from \"@mui/material/Typography\";\nimport { IMinigameProps } from \"./IMinigameProps\";\nimport { KeyHandler } from \"./KeyHandler\";\nimport { GameTimer } from \"./GameTimer\";\nimport { random } from \"../utils\";\nimport { interpolate } from \"./Difficulty\";\nimport { KEY } from \"../../utils/helpers/keyCodes\";\n\ninterface Difficulty {\n [key: string]: number;\n timer: number;\n wiresmin: number;\n wiresmax: number;\n rules: number;\n}\n\nconst difficulties: {\n Trivial: Difficulty;\n Normal: Difficulty;\n Hard: Difficulty;\n Impossible: Difficulty;\n} = {\n Trivial: { timer: 9000, wiresmin: 4, wiresmax: 4, rules: 2 },\n Normal: { timer: 7000, wiresmin: 6, wiresmax: 6, rules: 2 },\n Hard: { timer: 5000, wiresmin: 8, wiresmax: 8, rules: 3 },\n Impossible: { timer: 4000, wiresmin: 9, wiresmax: 9, rules: 4 },\n};\n\nconst types = [KEY.PIPE, KEY.DOT, KEY.FORWARD_SLASH, KEY.HYPHEN, \"█\", KEY.HASH];\n\nconst colors = [\"red\", \"#FFC107\", \"blue\", \"white\"];\n\nconst colorNames: any = {\n red: \"red\",\n \"#FFC107\": \"yellow\",\n blue: \"blue\",\n white: \"white\",\n};\n\ninterface Wire {\n tpe: string;\n colors: string[];\n}\n\ninterface Question {\n toString: () => string;\n shouldCut: (wire: Wire, index: number) => boolean;\n}\n\nexport function WireCuttingGame(props: IMinigameProps): React.ReactElement {\n const difficulty: Difficulty = {\n timer: 0,\n wiresmin: 0,\n wiresmax: 0,\n rules: 0,\n };\n interpolate(difficulties, props.difficulty, difficulty);\n const timer = difficulty.timer;\n const [wires] = useState(generateWires(difficulty));\n const [cutWires, setCutWires] = useState(new Array(wires.length).fill(false));\n const [questions] = useState(generateQuestion(wires, difficulty));\n\n function checkWire(wireNum: number): boolean {\n return !questions.some((q) => q.shouldCut(wires[wireNum - 1], wireNum - 1));\n }\n\n function press(this: Document, event: KeyboardEvent): void {\n event.preventDefault();\n const wireNum = parseInt(event.key);\n\n if (wireNum < 1 || wireNum > wires.length || isNaN(wireNum)) return;\n setCutWires((old) => {\n const next = [...old];\n next[wireNum - 1] = true;\n if (checkWire(wireNum)) {\n props.onFailure();\n }\n\n // check if we won\n const wiresToBeCut = [];\n for (let j = 0; j < wires.length; j++) {\n let shouldBeCut = false;\n for (let i = 0; i < questions.length; i++) {\n shouldBeCut = shouldBeCut || questions[i].shouldCut(wires[j], j);\n }\n wiresToBeCut.push(shouldBeCut);\n }\n if (wiresToBeCut.every((b, i) => b === next[i])) {\n props.onSuccess();\n }\n\n return next;\n });\n }\n\n return (\n \n \n \n Cut the wires with the following properties! (keyboard 1 to 9)\n {questions.map((question, i) => (\n {question.toString()}\n ))}\n \n {new Array(wires.length).fill(0).map((_, i) => (\n  {i + 1}    \n ))}\n \n {new Array(8).fill(0).map((_, i) => (\n
    \n \n {wires.map((wire, j) => {\n if ((i === 3 || i === 4) && cutWires[j])\n return       ;\n return (\n \n |{wire.tpe}|   \n \n );\n })}\n \n
    \n ))}\n \n
    \n
    \n );\n}\n\nfunction randomPositionQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n return {\n toString: (): string => {\n return `Cut wires number ${index + 1}.`;\n },\n shouldCut: (wire: Wire, i: number): boolean => {\n return index === i;\n },\n };\n}\n\nfunction randomColorQuestion(wires: Wire[]): Question {\n const index = Math.floor(Math.random() * wires.length);\n const cutColor = wires[index].colors[0];\n return {\n toString: (): string => {\n return `Cut all wires colored ${colorNames[cutColor]}.`;\n },\n shouldCut: (wire: Wire): boolean => {\n return wire.colors.includes(cutColor);\n },\n };\n}\n\nfunction generateQuestion(wires: Wire[], difficulty: Difficulty): Question[] {\n const numQuestions = difficulty.rules;\n const questionGenerators = [randomPositionQuestion, randomColorQuestion];\n const questions = [];\n for (let i = 0; i < numQuestions; i++) {\n questions.push(questionGenerators[i % 2](wires));\n }\n return questions;\n}\n\nfunction generateWires(difficulty: Difficulty): Wire[] {\n const wires = [];\n const numWires = random(difficulty.wiresmin, difficulty.wiresmax);\n for (let i = 0; i < numWires; i++) {\n const wireColors = [colors[Math.floor(Math.random() * colors.length)]];\n if (Math.random() < 0.15) {\n wireColors.push(colors[Math.floor(Math.random() * colors.length)]);\n }\n wires.push({\n tpe: types[Math.floor(Math.random() * types.length)],\n colors: wireColors,\n });\n }\n return wires;\n}\n","import { Factions } from \"../../Faction/Factions\";\nimport React, { useState } from \"react\";\nimport Grid from \"@mui/material/Grid\";\nimport { Money } from \"../../ui/React/Money\";\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { BitNodeMultipliers } from \"../../BitNode/BitNodeMultipliers\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\n\ninterface IProps {\n StartingDifficulty: number;\n Difficulty: number;\n Reward: number;\n MaxLevel: number;\n}\n\nexport function Victory(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const [faction, setFaction] = useState(\"none\");\n\n function quitInfiltration(): void {\n router.toCity();\n }\n\n const levelBonus = props.MaxLevel * Math.pow(1.01, props.MaxLevel);\n\n const repGain =\n Math.pow(props.Reward + 1, 1.1) *\n Math.pow(props.StartingDifficulty, 1.2) *\n 30 *\n levelBonus *\n BitNodeMultipliers.InfiltrationRep;\n\n const moneyGain =\n Math.pow(props.Reward + 1, 2) *\n Math.pow(props.StartingDifficulty, 3) *\n 3e3 *\n levelBonus *\n BitNodeMultipliers.InfiltrationMoney;\n\n function sell(): void {\n player.gainMoney(moneyGain, \"infiltration\");\n quitInfiltration();\n }\n\n function trade(): void {\n if (faction === \"none\") return;\n Factions[faction].playerReputation += repGain;\n quitInfiltration();\n }\n\n function changeDropdown(event: SelectChangeEvent): void {\n setFaction(event.target.value);\n }\n\n return (\n <>\n \n \n Infiltration successful!\n \n \n \n You can trade the confidential information you found for money or reputation.\n \n \n \n \n \n \n \n \n \n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { use } from \"./Context\";\nimport { CONSTANTS } from \"../Constants\";\nimport { numeralWrapper } from \"./numeralFormat\";\nimport { Reputation } from \"./React/Reputation\";\nimport { ReputationRate } from \"./React/ReputationRate\";\nimport { MoneyRate } from \"./React/MoneyRate\";\nimport { Money } from \"./React/Money\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { Factions } from \"../Faction/Factions\";\nimport { Company } from \"../Company/Company\";\nimport { Companies } from \"../Company/Companies\";\nimport { Locations } from \"../Locations/Locations\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\n\nimport { createProgressBarText } from \"../utils/helpers/createProgressBarText\";\n\nconst CYCLES_PER_SEC = 1000 / CONSTANTS.MilliPerCycle;\n\nexport function WorkInProgressRoot(): React.ReactElement {\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, CONSTANTS.MilliPerCycle);\n return () => clearInterval(id);\n }, []);\n\n const player = use.Player();\n const router = use.Router();\n\n if (player.workType == CONSTANTS.WorkTypeFaction) {\n const faction = Factions[player.currentWorkFactionName];\n if (!faction) {\n return (\n <>\n \n You have not joined {player.currentWorkFactionName || \"(Faction not found)\"} yet or cannot work at this\n time, please try again if you think this should have worked\n \n \n \n );\n }\n\n function cancel(): void {\n router.toFaction(faction);\n player.finishFactionWork(true);\n }\n function unfocus(): void {\n router.toFaction(faction);\n player.stopFocusing();\n }\n return (\n \n \n \n You are currently {player.currentWorkFactionDescription} for your faction {faction.name}\n
    \n (Current Faction Reputation: \n ).
    \n You have been doing this for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
    \n
    \n You have earned:
    \n
    \n (){\" \"}\n
    \n
    \n (\n ) reputation for this faction
    \n
    \n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec) hacking exp
    \n \n )}\n
    \n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec) strength exp
    \n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec) defense exp
    \n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec) dexterity exp
    \n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec) agility exp
    \n \n )}\n
    \n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec) charisma exp
    \n \n )}\n
    \n You will automatically finish after working for 20 hours. You can cancel earlier if you wish.\n
    \n There is no penalty for cancelling earlier.\n
    \n
    \n \n \n \n \n
    \n );\n }\n\n const className = player.className;\n if (player.className !== \"\") {\n function cancel(): void {\n player.finishClass(true);\n router.toCity();\n }\n\n function unfocus(): void {\n router.toCity();\n player.stopFocusing();\n }\n\n let stopText = \"\";\n if (\n className == CONSTANTS.ClassGymStrength ||\n className == CONSTANTS.ClassGymDefense ||\n className == CONSTANTS.ClassGymDexterity ||\n className == CONSTANTS.ClassGymAgility\n ) {\n stopText = \"Stop training at gym\";\n } else {\n stopText = \"Stop taking course\";\n }\n\n return (\n \n \n \n You have been {className} for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
    \n
    \n This has cost you:
    \n (){\" \"}\n
    \n
    \n You have gained:
    \n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec) hacking exp
    \n \n )}\n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec) strength exp
    \n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec) defense exp
    \n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec) dexterity exp
    \n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec) agility exp
    \n \n )}\n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec) charisma exp
    \n \n )}\n You may cancel at any time\n
    \n
    \n \n \n \n \n
    \n );\n }\n\n if (player.workType == CONSTANTS.WorkTypeCompany) {\n const comp = Companies[player.companyName];\n if (comp == null || !(comp instanceof Company)) {\n return (\n <>\n \n You cannot work for {player.companyName || \"(Company not found)\"} at this time, please try again if you\n think this should have worked\n \n \n \n );\n }\n\n const companyRep = comp.playerReputation;\n\n function cancel(): void {\n player.finishWork(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n\n const position = player.jobs[player.companyName];\n\n const penalty = player.cancelationPenalty();\n\n const penaltyString = penalty === 0.5 ? \"half\" : \"three-quarters\";\n return (\n \n \n \n You are currently working as a {position} at {player.companyName} (Current Company Reputation:{\" \"}\n )
    \n
    \n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
    \n
    \n You have earned:
    \n
    \n (){\" \"}\n
    \n
    \n (\n ) reputation for this company
    \n
    \n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {`${numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) hacking exp
    \n \n )}\n
    \n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {`${numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) strength exp
    \n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {`${numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) defense exp
    \n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {`${numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) dexterity exp
    \n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {`${numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) agility exp
    \n \n )}\n
    \n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {`${numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) charisma exp
    \n \n )}\n
    \n You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will\n only gain {penaltyString} of the reputation you've earned so far.\n
    \n
    \n \n \n \n \n
    \n );\n }\n\n if (player.workType == CONSTANTS.WorkTypeCompanyPartTime) {\n function cancel(): void {\n player.finishWorkPartTime(true);\n router.toJob();\n }\n function unfocus(): void {\n player.stopFocusing();\n router.toJob();\n }\n const comp = Companies[player.companyName];\n let companyRep = 0;\n if (comp == null || !(comp instanceof Company)) {\n throw new Error(`Could not find Company: ${player.companyName}`);\n }\n companyRep = comp.playerReputation;\n\n const position = player.jobs[player.companyName];\n return (\n \n \n \n You are currently working as a {position} at {player.companyName} (Current Company Reputation:{\" \"}\n )
    \n
    \n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
    \n
    \n You have earned:
    \n
    \n (){\" \"}\n
    \n
    \n (\n \n ) reputation for this company
    \n
    \n {player.workHackExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workHackExpGained)} (\n {`${numeralWrapper.formatExp(player.workHackExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) hacking exp
    \n \n )}\n
    \n {player.workStrExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workStrExpGained)} (\n {`${numeralWrapper.formatExp(player.workStrExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) strength exp
    \n \n )}\n {player.workDefExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDefExpGained)} (\n {`${numeralWrapper.formatExp(player.workDefExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) defense exp
    \n \n )}\n {player.workDexExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workDexExpGained)} (\n {`${numeralWrapper.formatExp(player.workDexExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) dexterity exp
    \n \n )}\n {player.workAgiExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workAgiExpGained)} (\n {`${numeralWrapper.formatExp(player.workAgiExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) agility exp
    \n \n )}\n
    \n {player.workChaExpGained > 0 && (\n <>\n {numeralWrapper.formatExp(player.workChaExpGained)} (\n {`${numeralWrapper.formatExp(player.workChaExpGainRate * CYCLES_PER_SEC)} / sec`}\n ) charisma exp
    \n \n )}\n
    \n You will automatically finish after working for 8 hours. You can cancel earlier if you wish, and there will\n be no penalty because this is a part-time job.\n
    \n
    \n \n \n \n \n
    \n );\n }\n\n if (player.crimeType !== \"\") {\n const percent = Math.round((player.timeWorked / player.timeNeededToCompleteWork) * 100);\n let numBars = Math.round(percent / 5);\n if (numBars < 0) {\n numBars = 0;\n }\n if (numBars > 20) {\n numBars = 20;\n }\n // const progressBar = \"[\" + Array(numBars + 1).join(\"|\") + Array(20 - numBars + 1).join(\" \") + \"]\";\n const progressBar = createProgressBarText({ progress: (numBars + 1) / 20, totalTicks: 20 });\n\n return (\n \n \n \n You are attempting to {player.crimeType}.\n
    \n\n \n Time remaining: {convertTimeMsToTimeElapsedString(player.timeNeededToCompleteWork - player.timeWorked)}\n \n\n
    \n
    {progressBar}
    \n
    \n
    \n \n {\n router.toLocation(Locations[LocationName.Slums]);\n player.finishCrime(true);\n }}\n >\n Cancel crime\n \n \n
    \n );\n }\n\n if (player.createProgramName !== \"\") {\n function cancel(): void {\n player.finishCreateProgramWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n return (\n \n \n \n You are currently working on coding {player.createProgramName}.
    \n
    \n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
    \n
    \n The program is {((player.timeWorkedCreateProgram / player.timeNeededToCompleteWork) * 100).toFixed(2)}\n % complete.
    \n If you cancel, your work will be saved and you can come back to complete the program later.\n
    \n
    \n \n \n \n \n
    \n );\n }\n\n if (player.graftAugmentationName !== \"\") {\n function cancel(): void {\n player.finishGraftAugmentationWork(true);\n router.toTerminal();\n }\n function unfocus(): void {\n router.toTerminal();\n player.stopFocusing();\n }\n return (\n \n \n \n You are currently working on crafting {player.graftAugmentationName}.\n
    \n
    \n You have been working for {convertTimeMsToTimeElapsedString(player.timeWorked)}\n
    \n
    \n The augmentation is{\" \"}\n {((player.timeWorkedGraftAugmentation / player.timeNeededToCompleteWork) * 100).toFixed(2)}% done being\n crafted.\n
    \n If you cancel, your work will not be saved, and the money you spent will not be returned.\n
    \n
    \n \n \n \n \n
    \n );\n }\n\n if (!player.workType) router.toTerminal();\n\n return <>;\n}\n","import React, { useState, useRef } from \"react\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { Theme } from \"@mui/material/styles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport Typography from \"@mui/material/Typography\";\nimport Slider from \"@mui/material/Slider\";\nimport Grid from \"@mui/material/Grid\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport Button from \"@mui/material/Button\";\n\nimport Box from \"@mui/material/Box\";\nimport List from \"@mui/material/List\";\nimport ListItem from \"@mui/material/ListItem\";\nimport Link from \"@mui/material/Link\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport TextField from \"@mui/material/TextField\";\n\nimport DownloadIcon from \"@mui/icons-material/Download\";\nimport UploadIcon from \"@mui/icons-material/Upload\";\nimport SaveIcon from \"@mui/icons-material/Save\";\nimport PaletteIcon from '@mui/icons-material/Palette';\n\nimport { FileDiagnosticModal } from \"../../Diagnostic/FileDiagnosticModal\";\nimport { ConfirmationModal } from \"./ConfirmationModal\";\n\nimport { SnackbarEvents } from \"./Snackbar\";\n\nimport { Settings } from \"../../Settings/Settings\";\nimport { DeleteGameButton } from \"./DeleteGameButton\";\nimport { SoftResetButton } from \"./SoftResetButton\";\nimport { IRouter } from \"../Router\";\nimport { ThemeEditorButton } from \"../../Themes/ui/ThemeEditorButton\";\nimport { StyleEditorButton } from \"../../Themes/ui/StyleEditorButton\";\nimport { formatTime } from \"../../utils/helpers/formatTime\";\nimport { OptionSwitch } from \"./OptionSwitch\";\nimport { ImportData, saveObject } from \"../../SaveObject\";\nimport { convertTimeMsToTimeElapsedString } from \"../../utils/StringHelperFunctions\";\n\nconst useStyles = makeStyles((theme: Theme) =>\n createStyles({\n root: {\n width: 50,\n padding: theme.spacing(2),\n userSelect: \"none\",\n },\n }),\n);\n\ninterface IProps {\n player: IPlayer;\n router: IRouter;\n save: () => void;\n export: () => void;\n forceKill: () => void;\n softReset: () => void;\n}\n\nexport function GameOptionsRoot(props: IProps): React.ReactElement {\n const classes = useStyles();\n const importInput = useRef(null);\n\n const [execTime, setExecTime] = useState(Settings.CodeInstructionRunTime);\n const [logSize, setLogSize] = useState(Settings.MaxLogCapacity);\n const [portSize, setPortSize] = useState(Settings.MaxPortCapacity);\n const [terminalSize, setTerminalSize] = useState(Settings.MaxTerminalCapacity);\n const [autosaveInterval, setAutosaveInterval] = useState(Settings.AutosaveInterval);\n const [timestampFormat, setTimestampFormat] = useState(Settings.TimestampsFormat);\n const [locale, setLocale] = useState(Settings.Locale);\n const [diagnosticOpen, setDiagnosticOpen] = useState(false);\n const [importSaveOpen, setImportSaveOpen] = useState(false);\n const [importData, setImportData] = useState(null);\n\n function handleExecTimeChange(event: any, newValue: number | number[]): void {\n setExecTime(newValue as number);\n Settings.CodeInstructionRunTime = newValue as number;\n }\n\n function handleLogSizeChange(event: any, newValue: number | number[]): void {\n setLogSize(newValue as number);\n Settings.MaxLogCapacity = newValue as number;\n }\n\n function handlePortSizeChange(event: any, newValue: number | number[]): void {\n setPortSize(newValue as number);\n Settings.MaxPortCapacity = newValue as number;\n }\n\n function handleTerminalSizeChange(event: any, newValue: number | number[]): void {\n setTerminalSize(newValue as number);\n Settings.MaxTerminalCapacity = newValue as number;\n }\n\n function handleAutosaveIntervalChange(event: any, newValue: number | number[]): void {\n setAutosaveInterval(newValue as number);\n Settings.AutosaveInterval = newValue as number;\n }\n\n function handleLocaleChange(event: SelectChangeEvent): void {\n setLocale(event.target.value as string);\n Settings.Locale = event.target.value as string;\n }\n\n function handleTimestampFormatChange(event: React.ChangeEvent): void {\n setTimestampFormat(event.target.value);\n Settings.TimestampsFormat = event.target.value;\n }\n\n function startImport(): void {\n if (!window.File || !window.FileReader || !window.FileList || !window.Blob) return;\n const ii = importInput.current;\n if (ii === null) throw new Error(\"import input should not be null\");\n ii.click();\n }\n\n async function onImport(event: React.ChangeEvent): Promise {\n try {\n const base64Save = await saveObject.getImportStringFromFile(event.target.files);\n const data = await saveObject.getImportDataFromString(base64Save);\n setImportData(data);\n setImportSaveOpen(true);\n } catch (ex: any) {\n SnackbarEvents.emit(ex.toString(), \"error\", 5000);\n }\n }\n\n async function confirmedImportGame(): Promise {\n if (!importData) return;\n\n try {\n await saveObject.importGame(importData.base64);\n } catch (ex: any) {\n SnackbarEvents.emit(ex.toString(), \"error\", 5000);\n }\n\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n function compareSaveGame(): void {\n if (!importData) return;\n props.router.toImportSave(importData.base64);\n setImportSaveOpen(false);\n setImportData(null);\n }\n\n return (\n
    \n \n Options\n \n\n \n \n \n \n \n \n The minimum number of milliseconds it takes to execute an operation in Netscript. Setting this too\n low can result in poor performance if you have many scripts running.\n \n }\n >\n .script exec time (ms)\n \n \n \n The maximum number of lines a script's logs can hold. Setting this too high can cause the game to\n use a lot of memory if you have many scripts running.\n \n }\n >\n Netscript log size\n \n \n \n The maximum number of entries that can be written to a port using Netscript's write() function.\n Setting this too high can cause the game to use a lot of memory.\n \n }\n >\n Netscript port size\n \n \n \n The maximum number of entries that can be written to the terminal. Setting this too high can cause\n the game to use a lot of memory.\n \n }\n >\n Terminal capacity\n \n \n The time (in seconds) between each autosave. Set to 0 to disable autosave.\n }\n >\n Autosave interval (s)\n \n \n \n \n \n (Settings.SuppressMessages = newValue)}\n text=\"Suppress story messages\"\n tooltip={\n <>\n If this is set, then any messages you receive will not appear as popups on the screen. They will\n still get sent to your home computer as '.msg' files and can be viewed with the 'cat' Terminal\n command.\n \n }\n />\n \n \n (Settings.SuppressFactionInvites = newValue)}\n text=\"Suppress faction invites\"\n tooltip={\n <>\n If this is set, then any faction invites you receive will not appear as popups on the screen. Your\n outstanding faction invites can be viewed in the 'Factions' page.\n \n }\n />\n \n \n (Settings.SuppressTravelConfirmation = newValue)}\n text=\"Suppress travel confirmations\"\n tooltip={\n <>\n If this is set, the confirmation message before traveling will not show up. You will automatically\n be deducted the travel cost as soon as you click.\n \n }\n />\n \n \n (Settings.SuppressBuyAugmentationConfirmation = newValue)}\n text=\"Suppress augmentations confirmation\"\n tooltip={<>If this is set, the confirmation message before buying augmentation will not show up.}\n />\n \n \n (Settings.SuppressTIXPopup = newValue)}\n text=\"Suppress TIX messages\"\n tooltip={<>If this is set, the stock market will never create any popup.}\n />\n \n {!!props.player.bladeburner && (\n \n (Settings.SuppressBladeburnerPopup = newValue)}\n text=\"Suppress bladeburner popup\"\n tooltip={\n <>\n If this is set, then having your Bladeburner actions interrupted by being busy with something else\n will not display a popup message.\n \n }\n />\n \n )}\n \n (Settings.SuppressSavedGameToast = newValue)}\n text=\"Suppress Auto-Save Game Toast\"\n tooltip={<>If this is set, there will be no \"Game Saved!\" toast appearing after an auto-save.}\n />\n \n \n (Settings.SuppressAutosaveDisabledWarnings = newValue)}\n text=\"Suppress Auto-Save Disabled Warning\"\n tooltip={<>If this is set, there will be no warning triggered when auto-save is disabled (at 0).}\n />\n \n \n (Settings.DisableHotkeys = newValue)}\n text=\"Disable hotkeys\"\n tooltip={\n <>\n If this is set, then most hotkeys (keyboard shortcuts) in the game are disabled. This includes\n Terminal commands, hotkeys to navigate between different parts of the game, and the \"Save and Close\n (Ctrl + b)\" hotkey in the Text Editor.\n \n }\n />\n \n \n (Settings.DisableASCIIArt = newValue)}\n text=\"Disable ascii art\"\n tooltip={<>If this is set all ASCII art will be disabled.}\n />\n \n \n (Settings.DisableTextEffects = newValue)}\n text=\"Disable text effects\"\n tooltip={\n <>\n If this is set, text effects will not be displayed. This can help if text is difficult to read in\n certain areas.\n \n }\n />\n \n \n (Settings.DisableOverviewProgressBars = newValue)}\n text=\"Disable Overview Progress Bars\"\n tooltip={<>If this is set, the progress bars in the character overview will be hidden.}\n />\n \n \n (Settings.EnableBashHotkeys = newValue)}\n text=\"Enable bash hotkeys\"\n tooltip={\n <>\n Improved Bash emulation mode. Setting this to 1 enables several new Terminal shortcuts and features\n that more closely resemble a real Bash-style shell. Note that when this mode is enabled, the default\n browser shortcuts are overriden by the new Bash shortcuts.\n \n }\n />\n \n \n (Settings.UseIEC60027_2 = newValue)}\n text=\"Use GiB instead of GB\"\n tooltip={\n <>\n If this is set all references to memory will use GiB instead of GB, in accordance with IEC 60027-2.\n \n }\n />\n \n \n (Settings.ExcludeRunningScriptsFromSave = newValue)}\n text=\"Exclude Running Scripts from Save\"\n tooltip={\n <>\n If this is set, the save file will exclude all running scripts. This is only useful if your save is\n lagging a lot. You'll have to restart your script every time you launch the game.\n \n }\n />\n \n \n \n Terminal commands and log entries will be timestamped. See\n https://date-fns.org/docs/Getting-Started/\n \n }\n >\n \n \n Timestamp format: \n \n ),\n }}\n value={timestampFormat}\n onChange={handleTimestampFormatChange}\n placeholder=\"yyyy-MM-dd hh:mm:ss\"\n />\n \n \n \n\n \n (Settings.SaveGameOnFileSave = newValue)}\n text=\"Save game on file save\"\n tooltip={<>Save your game any time a file is saved in the script editor.}\n />\n \n\n \n Sets the locale for displaying numbers.}>\n Locale \n \n \n \n \n {!location.href.startsWith(\"file://\") && (\n <>\n \n danielyxie / BigD (Original developer): \n
    \n \n \n \n \n
    \n\n \n \n hydroflame (Current maintainer):{\" \"}\n \n Donate blood!\n {\" \"}\n \n \n \n )}\n
    \n \n \n \n \n \n \n Export your game to a text file.}>\n \n \n \n Import your game from a text file.\n
    \n This will overwrite your current game. Back it up first!\n \n }\n >\n \n \n setImportSaveOpen(false)}\n onConfirm={() => confirmedImportGame()}\n additionalButton={}\n confirmationText={\n <>\n Importing a new game will completely wipe the current data!\n
    \n
    \n Make sure to have a backup of your current save file before importing.\n
    \n The file you are attempting to import seems valid.\n {(importData?.playerData?.lastSave ?? 0) > 0 && (\n <>\n
    \n
    \n The export date of the save file is{\" \"}\n {new Date(importData?.playerData?.lastSave ?? 0).toLocaleString()}\n \n )}\n {(importData?.playerData?.totalPlaytime ?? 0) > 0 && (\n <>\n
    \n
    \n Total play time of imported game:{\" \"}\n {convertTimeMsToTimeElapsedString(importData?.playerData?.totalPlaytime ?? 0)}\n \n )}\n
    \n
    \n \n }\n />\n
    \n \n \n Forcefully kill all active running scripts, in case there is a bug or some unexpected issue with the\n game. After using this, save the game and then reload the page. This is different then normal kill in\n that normal kill will tell the script to shut down while force kill just removes the references to it\n (and it should crash on it's own). This will not remove the files on your computer. Just forcefully\n kill all running instance of all scripts.\n \n }\n >\n \n \n \n \n \n \n If your save file is extremely big you can use this button to view a map of all the files on every\n server. Be careful there might be spoilers.\n \n }\n >\n \n \n \n \n \n \n \n \n \n \n \n \n Report bug\n \n \n Changelog\n \n \n Documentation\n \n \n Discord\n \n \n Reddit\n \n \n Incremental game plaza\n \n \n
    \n
    \n setDiagnosticOpen(false)} />\n
    \n );\n}\n","import React from \"react\";\nimport { GetServer, GetAllServers } from \"../Server/AllServers\";\nimport { Modal } from \"../ui/React/Modal\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\n\nimport Table from \"@mui/material/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport TableCell from \"@mui/material/TableCell\";\nimport TableContainer from \"@mui/material/TableContainer\";\nimport TableHead from \"@mui/material/TableHead\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Accordion from \"@mui/material/Accordion\";\nimport AccordionSummary from \"@mui/material/AccordionSummary\";\nimport AccordionDetails from \"@mui/material/AccordionDetails\";\nimport ExpandMoreIcon from \"@mui/icons-material/ExpandMore\";\n\ninterface IServerProps {\n hostname: string;\n}\n\nfunction ServerAccordion(props: IServerProps): React.ReactElement {\n const server = GetServer(props.hostname);\n if (server === null) throw new Error(`server '${props.hostname}' should not be null`);\n let totalSize = 0;\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 <>;\n }\n\n interface File {\n name: string;\n size: number;\n }\n\n const files: File[] = [];\n\n for (const f of server.scripts) {\n files.push({ name: f.filename, size: f.code.length });\n }\n\n for (const f of server.textFiles) {\n files.push({ name: f.fn, size: f.text.length });\n }\n\n files.sort((a: File, b: File): number => b.size - a.size);\n\n return (\n \n }>\n \n {server.hostname} ({numeralWrapper.formatBigNumber(totalSize)}b)\n \n \n \n \n \n \n \n \n Filename\n \n \n Size\n \n \n \n \n {files.map((file: File) => (\n \n \n {file.name}\n \n \n {numeralWrapper.formatBigNumber(file.size)}b\n \n \n ))}\n \n
    \n
    \n
      \n
      \n
      \n );\n}\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FileDiagnosticModal(props: IProps): React.ReactElement {\n const keys: string[] = [];\n for (const key of GetAllServers()) {\n keys.push(key.hostname);\n }\n\n return (\n \n <>\n \n Welcome to the file diagnostic! If your save file is really big it's likely because you have too many\n text/scripts. This tool can help you narrow down where they are.\n \n {keys.map((hostname: string) => (\n \n ))}\n \n \n );\n}\n","import React, { useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport IconButton from \"@mui/material/IconButton\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport PaletteSharpIcon from \"@mui/icons-material/PaletteSharp\";\nimport HistoryIcon from '@mui/icons-material/History';\nimport { Color, ColorPicker } from \"material-ui-color\";\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings, defaultSettings } from \"../../Settings/Settings\";\nimport { defaultTheme } from \"../Themes\";\nimport { UserInterfaceTheme } from \"../../ScriptEditor/NetscriptDefinitions\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ThemeCollaborate } from \"./ThemeCollaborate\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n router: IRouter;\n}\n\ninterface IColorEditorProps {\n name: string;\n color: string | undefined;\n onColorChange: (name: string, value: string) => void;\n defaultColor: string;\n}\n\nfunction ColorEditor({ name, onColorChange, color, defaultColor }: IColorEditorProps): React.ReactElement {\n if (color === undefined) {\n console.error(`color ${name} was undefined, reverting to default`);\n color = defaultColor;\n }\n\n return (\n <>\n \n onColorChange(name, \"#\" + newColor.hex)}\n disableAlpha\n />\n \n ),\n endAdornment: (\n <>\n onColorChange(name, defaultColor)}>\n \n \n \n ),\n }}\n />\n \n );\n}\n\nexport function ThemeEditorModal(props: IProps): React.ReactElement {\n const [customTheme, setCustomTheme] = useState<{ [key: string]: string | undefined }>({\n ...Settings.theme,\n });\n\n function setTheme(theme: UserInterfaceTheme): void {\n setCustomTheme(theme);\n Object.assign(Settings.theme, theme);\n ThemeEvents.emit();\n }\n\n function onThemeChange(event: React.ChangeEvent): void {\n try {\n const importedTheme = JSON.parse(event.target.value);\n if (typeof importedTheme !== \"object\") return;\n setCustomTheme(importedTheme);\n for (const key of Object.keys(importedTheme)) {\n Settings.theme[key] = importedTheme[key];\n }\n ThemeEvents.emit();\n } catch (err) {\n // ignore\n }\n }\n\n function onColorChange(name: string, value: string): void {\n setCustomTheme((old: any) => {\n old[name] = value;\n return old;\n });\n\n Settings.theme[name] = value;\n ThemeEvents.emit();\n }\n\n function setTemplateTheme(theme: UserInterfaceTheme): void {\n setTheme(theme);\n }\n\n return (\n \n \n Example tooltip}>\n \n \n \n \n \n \n \n\n
      \n text with primary color \n text with secondary color \n text with error color\n\n
      \n \n
      \n\n \n \n \n \n\n
      \n \n \n \n\n
      \n \n \n \n\n
      \n \n \n \n\n
      \n \n \n \n\n
      \n \n \n \n\n
      \n \n \n \n \n \n \n \n\n
      \n \n \n \n \n \n \n \n \n
      \n\n \n \n <>\n Backup your theme or share it with others by copying the string above.\n \n \n \n \n \n \n \n \n \n \n \n
      \n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport { Modal } from \"../../ui/React/Modal\";\n\nimport Button from \"@mui/material/Button\";\nimport ButtonGroup from \"@mui/material/ButtonGroup\";\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport TextField from \"@mui/material/TextField\";\nimport ReplyIcon from \"@mui/icons-material/Reply\";\nimport SaveIcon from \"@mui/icons-material/Save\";\n\nimport { ThemeEvents } from \"./Theme\";\nimport { Settings } from \"../../Settings/Settings\";\nimport { defaultStyles } from \"../Styles\";\nimport { Tooltip } from \"@mui/material\";\nimport { IStyleSettings } from \"../../ScriptEditor/NetscriptDefinitions\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\ninterface FontFamilyProps {\n value: React.CSSProperties[\"fontFamily\"];\n onChange: (newValue: React.CSSProperties[\"fontFamily\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction FontFamilyField({ value, onChange, refreshId }: FontFamilyProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [fontFamily, setFontFamily] = useState(value);\n\n function update(newValue: React.CSSProperties[\"fontFamily\"]): void {\n setFontFamily(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(fontFamily, errorText), [fontFamily]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\ninterface LineHeightProps {\n value: React.CSSProperties[\"lineHeight\"];\n onChange: (newValue: React.CSSProperties[\"lineHeight\"], error?: string) => void;\n refreshId: number;\n}\n\nfunction LineHeightField({ value, onChange, refreshId }: LineHeightProps): React.ReactElement {\n const [errorText, setErrorText] = useState();\n const [lineHeight, setLineHeight] = useState(value);\n\n function update(newValue: React.CSSProperties[\"lineHeight\"]): void {\n setLineHeight(newValue);\n if (!newValue) {\n setErrorText(\"Must have a value\");\n } else if (isNaN(Number(newValue))) {\n setErrorText(\"Must be a number\");\n } else {\n setErrorText(\"\");\n }\n }\n\n function onTextChange(event: React.ChangeEvent): void {\n update(event.target.value);\n }\n\n useEffect(() => onChange(lineHeight, errorText), [lineHeight]);\n useEffect(() => update(value), [refreshId]);\n\n return (\n \n );\n}\n\nexport function StyleEditorModal(props: IProps): React.ReactElement {\n const [refreshId, setRefreshId] = useState(0);\n const [error, setError] = useState();\n const [customStyle, setCustomStyle] = useState({\n ...Settings.styles,\n });\n\n function persistToSettings(styles: IStyleSettings): void {\n Object.assign(Settings.styles, styles);\n ThemeEvents.emit();\n }\n\n function saveStyles(): void {\n persistToSettings(customStyle);\n }\n\n function setDefaults(): void {\n const styles = { ...defaultStyles };\n setCustomStyle(styles);\n persistToSettings(styles);\n setRefreshId(refreshId + 1);\n }\n\n function update(styles: IStyleSettings, errorMessage?: string): void {\n setError(errorMessage);\n if (!errorMessage) {\n setCustomStyle(styles);\n }\n }\n\n return (\n \n Styles Editor\n \n WARNING: Changing styles may mess up the interface. Drastic changes are{\" \"}\n NOT recommended.\n \n \n update({ ...customStyle, fontFamily: value as any }, error)}\n />\n
      \n update({ ...customStyle, lineHeight: value as any }, error)}\n />\n
      \n \n \n \n \n \n \n
      \n
      \n );\n}\n","import React, { useState, useEffect } from \"react\";\n\nimport {\n Box,\n Typography,\n Button,\n Container\n} from \"@mui/material\";\n\nimport { use } from \"../../../ui/Context\";\n\nimport { SleeveElem } from \"./SleeveElem\";\nimport { FAQModal } from \"./FAQModal\";\n\nexport function SleeveRoot(): React.ReactElement {\n const player = use.Player();\n const [FAQOpen, setFAQOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n return (\n <>\n \n Sleeves\n \n Duplicate Sleeves are MK-V Synthoids (synthetic androids) into which your consciousness has been copied. In\n other words, these Synthoids contain a perfect duplicate of your mind.\n
      \n
      \n Sleeves can be used to perform different tasks synchronously.\n
      \n
      \n
      \n\n
      \n\n \n \n \n {player.sleeves.map((sleeve, i) => (\n \n ))}\n \n setFAQOpen(false)} />\n \n );\n}\n","import React, { useState } from \"react\";\n\nimport {\n Box,\n Paper,\n Typography,\n Button,\n Tooltip\n} from \"@mui/material\";\n\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { createProgressBarText } from \"../../../utils/helpers/createProgressBarText\";\nimport { use } from \"../../../ui/Context\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\n\nimport { Sleeve } from \"../Sleeve\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\n\nimport { SleeveAugmentationsModal } from \"./SleeveAugmentationsModal\";\nimport { TravelModal } from \"./TravelModal\";\nimport { StatsElement, EarningsElement } from \"./StatsElement\";\nimport { MoreStatsModal } from \"./MoreStatsModal\";\nimport { MoreEarningsModal } from \"./MoreEarningsModal\";\nimport { TaskSelector } from \"./TaskSelector\";\n\ninterface IProps {\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function SleeveElem(props: IProps): React.ReactElement {\n const player = use.Player();\n const [statsOpen, setStatsOpen] = useState(false);\n const [earningsOpen, setEarningsOpen] = useState(false);\n const [travelOpen, setTravelOpen] = useState(false);\n const [augmentationsOpen, setAugmentationsOpen] = useState(false);\n\n const [abc, setABC] = useState([\"------\", \"------\", \"------\"]);\n\n function setTask(): void {\n props.sleeve.resetTaskStatus(); // sets to idle\n switch (abc[0]) {\n case \"------\":\n break;\n case \"Work for Company\":\n props.sleeve.workForCompany(player, abc[1]);\n break;\n case \"Work for Faction\":\n props.sleeve.workForFaction(player, abc[1], abc[2]);\n break;\n case \"Commit Crime\":\n props.sleeve.commitCrime(player, abc[1]);\n break;\n case \"Take University Course\":\n props.sleeve.takeUniversityCourse(player, abc[2], abc[1]);\n break;\n case \"Workout at Gym\":\n props.sleeve.workoutAtGym(player, abc[2], abc[1]);\n break;\n case \"Shock Recovery\":\n props.sleeve.shockRecovery(player);\n break;\n case \"Synchronize\":\n props.sleeve.synchronize(player);\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in setSleeveTask(): ${abc[0]}`);\n }\n props.rerender();\n }\n\n let desc = <>;\n switch (props.sleeve.currentTask) {\n case SleeveTaskType.Idle:\n desc = <>This sleeve is currently idle;\n break;\n case SleeveTaskType.Company:\n desc = <>This sleeve is currently working your job at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Faction: {\n let doing = \"nothing\";\n switch (props.sleeve.factionWorkType) {\n case FactionWorkType.Field:\n doing = \"Field work\";\n break;\n case FactionWorkType.Hacking:\n doing = \"Hacking contracts\";\n break;\n case FactionWorkType.Security:\n doing = \"Security work\";\n break;\n }\n desc = (\n <>\n This sleeve is currently doing {doing} for {props.sleeve.currentTaskLocation}.\n \n );\n break;\n }\n case SleeveTaskType.Crime: {\n const crime = Object.values(Crimes).find((crime) => crime.name === props.sleeve.crimeType);\n if (!crime) throw new Error(\"crime should not be undefined\");\n desc = (\n <>\n This sleeve is currently attempting to {crime.type} (Success Rate:{\" \"}\n {numeralWrapper.formatPercentage(crime.successRate(props.sleeve))}).\n \n );\n break;\n }\n case SleeveTaskType.Class:\n desc = <>This sleeve is currently studying/taking a course at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Gym:\n desc = <>This sleeve is currently working out at {props.sleeve.currentTaskLocation}.;\n break;\n case SleeveTaskType.Recovery:\n desc = (\n <>\n This sleeve is currently set to focus on shock recovery. This causes the Sleeve's shock to decrease at a\n faster rate.\n \n );\n break;\n case SleeveTaskType.Synchro:\n desc = (\n <>\n This sleeve is currently set to synchronize with the original consciousness. This causes the Sleeve's\n synchronization to increase.\n \n );\n break;\n default:\n console.error(`Invalid/Unrecognized taskValue in updateSleeveTaskDescription(): ${abc[0]}`);\n }\n\n return (\n \n \n \n \n \n \n \n \n Insufficient funds : \"\"}>\n \n setTravelOpen(true)}\n disabled={player.money < CONSTANTS.TravelCost}\n sx={{ width: '100%', height: '100%' }}\n >\n Travel\n \n \n \n Unlocked when sleeve has fully recovered : \"\"}\n >\n \n setAugmentationsOpen(true)}\n disabled={props.sleeve.shock < 100}\n sx={{ width: '100%', height: '100%' }}\n >\n Manage Augmentations\n \n \n \n \n \n \n \n \n \n \n {desc}\n \n {props.sleeve.currentTask === SleeveTaskType.Crime &&\n createProgressBarText({\n progress: props.sleeve.currentTaskTime / props.sleeve.currentTaskMaxTime,\n totalTicks: 25,\n })}\n \n \n \n setStatsOpen(false)} sleeve={props.sleeve} />\n setEarningsOpen(false)} sleeve={props.sleeve} />\n setTravelOpen(false)}\n sleeve={props.sleeve}\n rerender={props.rerender}\n />\n setAugmentationsOpen(false)}\n sleeve={props.sleeve}\n />\n \n \n \n );\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { findSleevePurchasableAugs } from \"../SleeveHelpers\";\nimport { Augmentations } from \"../../../Augmentation/Augmentations\";\nimport { Augmentation } from \"../../../Augmentation/Augmentation\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport { use } from \"../../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Paper from \"@mui/material/Paper\";\nimport Box from \"@mui/material/Box\";\nimport Button from \"@mui/material/Button\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport { TableCell } from \"../../../ui/React/Table\";\nimport TableRow from \"@mui/material/TableRow\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function SleeveAugmentationsModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 150);\n return () => clearInterval(id);\n }, []);\n\n // Array of all owned Augmentations. Names only\n const ownedAugNames = props.sleeve.augmentations.map((e) => e.name);\n\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 availableAugs = findSleevePurchasableAugs(props.sleeve, player);\n\n function purchaseAugmentation(aug: Augmentation): void {\n props.sleeve.tryBuyAugmentation(player, aug);\n rerender();\n }\n\n return (\n \n <>\n \n \n You can purchase Augmentations for your Duplicate Sleeves. These Augmentations have the same effect as they\n would for you. You can only purchase Augmentations that you have unlocked through Factions.\n
      \n
      \n When purchasing an Augmentation for a Duplicate Sleeve, they are immediately installed. This means that the\n Duplicate Sleeve will immediately lose all of its stat experience.\n
      \n \n \n \n {availableAugs.map((aug) => {\n return (\n \n \n \n \n \n \n \n {aug.name}\n \n \n \n \n \n \n \n );\n })}\n \n
      \n
      \n
      \n\n {ownedAugNames.length > 0 && (\n <>\n Owned Augmentations:\n \n {ownedAugNames.map((augName) => {\n const aug = Augmentations[augName];\n const info = typeof aug.info === \"string\" ? {aug.info} : aug.info\n const tooltip = (<>{info}

      {aug.stats});\n\n return (\n {tooltip}}>\n \n {augName}\n \n \n );\n })}\n
      \n \n )}\n \n
      \n );\n}\n","import React from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Money } from \"../../../ui/React/Money\";\nimport { WorldMap } from \"../../../ui/React/WorldMap\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Settings } from \"../../../Settings/Settings\";\nimport { dialogBoxCreate } from \"../../../ui/React/DialogBox\";\nimport { use } from \"../../../ui/Context\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n rerender: () => void;\n}\n\nexport function TravelModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function travel(city: string): void {\n if (!player.canAfford(CONSTANTS.TravelCost)) {\n dialogBoxCreate(\"You cannot afford to have this sleeve travel to another city\");\n }\n props.sleeve.city = city as CityName;\n player.loseMoney(CONSTANTS.TravelCost, \"sleeve\");\n props.sleeve.resetTaskStatus();\n props.rerender();\n props.onClose();\n }\n\n return (\n \n <>\n \n Have this sleeve travel to a different city. This affects the gyms and universities at which this sleeve can\n study. Traveling to a different city costs . It will\n also set your current sleeve task to idle.\n \n {Settings.DisableASCIIArt ? (\n Object.values(CityName).map((city: CityName) => (\n \n ))\n ) : (\n travel(city)} />\n )}\n \n \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { convertTimeMsToTimeElapsedString } from \"../../../utils/StringHelperFunctions\";\nimport { CONSTANTS } from \"../../../Constants\";\nimport { Typography } from \"@mui/material\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\nimport React from \"react\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreStatsModal(props: IProps): React.ReactElement {\n return (\n \n Hacking: ,\n props.sleeve.hacking,\n <> ({numeralWrapper.formatExp(props.sleeve.hacking_exp)} exp),\n ],\n [\n <>Strength: ,\n props.sleeve.strength,\n <> ({numeralWrapper.formatExp(props.sleeve.strength_exp)} exp),\n ],\n [\n <>Defense: ,\n props.sleeve.defense,\n <> ({numeralWrapper.formatExp(props.sleeve.defense_exp)} exp),\n ],\n [\n <>Dexterity: ,\n props.sleeve.dexterity,\n <> ({numeralWrapper.formatExp(props.sleeve.dexterity_exp)} exp),\n ],\n [\n <>Agility: ,\n props.sleeve.agility,\n <> ({numeralWrapper.formatExp(props.sleeve.agility_exp)} exp),\n ],\n [\n <>Charisma: ,\n props.sleeve.charisma,\n <> ({numeralWrapper.formatExp(props.sleeve.charisma_exp)} exp),\n ],\n ]}\n title=\"Stats:\"\n />\n
      \n Hacking Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_mult)],\n [<>Hacking Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.hacking_exp_mult)],\n [<>Strength Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_mult)],\n [<>Strength Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.strength_exp_mult)],\n [<>Defense Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_mult)],\n [<>Defense Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.defense_exp_mult)],\n [<>Dexterity Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.dexterity_mult)],\n [\n <>Dexterity Experience multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.dexterity_exp_mult),\n ],\n [<>Agility Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_mult)],\n [<>Agility Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.agility_exp_mult)],\n [<>Charisma Level multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_mult)],\n [<>Charisma Experience multiplier: , numeralWrapper.formatPercentage(props.sleeve.charisma_exp_mult)],\n [\n <>Faction Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.faction_rep_mult),\n ],\n [\n <>Company Reputation Gain multiplier: ,\n numeralWrapper.formatPercentage(props.sleeve.company_rep_mult),\n ],\n [<>Salary multiplier: , numeralWrapper.formatPercentage(props.sleeve.work_money_mult)],\n [<>Crime Money multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_money_mult)],\n [<>Crime Success multiplier: , numeralWrapper.formatPercentage(props.sleeve.crime_success_mult)],\n ]}\n title=\"Multipliers:\"\n />\n\n {/* Check for storedCycles to be a bit over 0 to prevent jittering */}\n {props.sleeve.storedCycles > 10 && (\n \n Bonus Time: {convertTimeMsToTimeElapsedString(props.sleeve.storedCycles * CONSTANTS.MilliPerCycle)}\n \n )}\n
      \n );\n}\n","import { Sleeve } from \"../Sleeve\";\nimport { numeralWrapper } from \"../../../ui/numeralFormat\";\nimport { Money } from \"../../../ui/React/Money\";\nimport * as React from \"react\";\nimport { StatsTable } from \"../../../ui/React/StatsTable\";\nimport { Modal } from \"../../../ui/React/Modal\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n sleeve: Sleeve;\n}\n\nexport function MoreEarningsModal(props: IProps): React.ReactElement {\n return (\n \n ],\n [\"Hacking Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.hack)],\n [\"Strength Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.str)],\n [\"Defense Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.def)],\n [\"Dexterity Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.dex)],\n [\"Agility Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.agi)],\n [\"Charisma Exp \", numeralWrapper.formatExp(props.sleeve.earningsForTask.cha)],\n ]}\n title=\"Earnings for Current Task:\"\n />\n
      \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForPlayer.cha)],\n ]}\n title=\"Total Earnings for Host Consciousness:\"\n />\n
      \n ],\n [\"Hacking Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.hack)],\n [\"Strength Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.str)],\n [\"Defense Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.def)],\n [\"Dexterity Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.dex)],\n [\"Agility Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.agi)],\n [\"Charisma Exp: \", numeralWrapper.formatExp(props.sleeve.earningsForSleeves.cha)],\n ]}\n title=\"Total Earnings for Other Sleeves:\"\n />\n
      \n
      \n );\n}\n","import React, { useState } from \"react\";\nimport { Sleeve } from \"../Sleeve\";\nimport { IPlayer } from \"../../IPlayer\";\nimport { SleeveTaskType } from \"../SleeveTaskTypesEnum\";\nimport { Crimes } from \"../../../Crime/Crimes\";\nimport { LocationName } from \"../../../Locations/data/LocationNames\";\nimport { CityName } from \"../../../Locations/data/CityNames\";\nimport { Factions } from \"../../../Faction/Factions\";\nimport { FactionWorkType } from \"../../../Faction/FactionWorkTypeEnum\";\nimport Select, { SelectChangeEvent } from \"@mui/material/Select\";\nimport MenuItem from \"@mui/material/MenuItem\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\n\nconst universitySelectorOptions: string[] = [\n \"Study Computer Science\",\n \"Data Structures\",\n \"Networks\",\n \"Algorithms\",\n \"Management\",\n \"Leadership\",\n];\n\nconst gymSelectorOptions: string[] = [\"Train Strength\", \"Train Defense\", \"Train Dexterity\", \"Train Agility\"];\n\ninterface IProps {\n sleeve: Sleeve;\n player: IPlayer;\n setABC: (abc: string[]) => void;\n}\n\ninterface ITaskDetails {\n first: string[];\n second: (s1: string) => string[];\n}\n\nfunction possibleJobs(player: IPlayer, sleeve: Sleeve): string[] {\n // Array of all companies that other sleeves are working at\n const forbiddenCompanies = [];\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Company) {\n forbiddenCompanies.push(otherSleeve.currentTaskLocation);\n }\n }\n const allJobs: string[] = Object.keys(player.jobs);\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: IPlayer, sleeve: Sleeve): string[] {\n // Array of all factions that other sleeves are working for\n const forbiddenFactions = [FactionNames.Bladeburners as string];\n if (player.gang) {\n forbiddenFactions.push(player.gang.facName);\n }\n for (const otherSleeve of player.sleeves) {\n if (sleeve === otherSleeve) {\n continue;\n }\n if (otherSleeve.currentTask === SleeveTaskType.Faction) {\n forbiddenFactions.push(otherSleeve.currentTaskLocation);\n }\n }\n\n const factions = [];\n for (const fac of player.factions) {\n if (!forbiddenFactions.includes(fac)) {\n factions.push(fac);\n }\n }\n\n return factions.filter(faction => {\n const facInfo = Factions[faction].getInfo();\n return facInfo.offerHackingWork || facInfo.offerFieldWork || facInfo.offerSecurityWork\n });\n}\n\nconst tasks: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => ITaskDetails);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => ITaskDetails;\n} = {\n \"------\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let jobs = possibleJobs(player, sleeve);\n\n if (jobs.length === 0) jobs = [\"------\"];\n return { first: jobs, second: () => [\"------\"] };\n },\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let factions = possibleFactions(player, sleeve);\n if (factions.length === 0) factions = [\"------\"];\n\n return {\n first: factions,\n second: (s1: string) => {\n const faction = Factions[s1];\n const facInfo = faction.getInfo();\n const options: string[] = [];\n if (facInfo.offerHackingWork) {\n options.push(\"Hacking Contracts\");\n }\n if (facInfo.offerFieldWork) {\n options.push(\"Field Work\");\n }\n if (facInfo.offerSecurityWork) {\n options.push(\"Security Work\");\n }\n return options;\n },\n };\n },\n \"Commit Crime\": (): ITaskDetails => {\n return { first: Object.values(Crimes).map((crime) => crime.name), second: () => [\"------\"] };\n },\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let universities: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n universities = [LocationName.AevumSummitUniversity];\n break;\n case CityName.Sector12:\n universities = [LocationName.Sector12RothmanUniversity];\n break;\n case CityName.Volhaven:\n universities = [LocationName.VolhavenZBInstituteOfTechnology];\n break;\n default:\n universities = [\"No university available in city!\"];\n break;\n }\n\n return { first: universitySelectorOptions, second: () => universities };\n },\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve): ITaskDetails => {\n let gyms: string[] = [];\n switch (sleeve.city) {\n case CityName.Aevum:\n gyms = [LocationName.AevumCrushFitnessGym, LocationName.AevumSnapFitnessGym];\n break;\n case CityName.Sector12:\n gyms = [LocationName.Sector12IronGym, LocationName.Sector12PowerhouseGym];\n break;\n case CityName.Volhaven:\n gyms = [LocationName.VolhavenMilleniumFitnessGym];\n break;\n default:\n gyms = [\"No gym available in city!\"];\n break;\n }\n\n return { first: gymSelectorOptions, second: () => gyms };\n },\n \"Shock Recovery\": (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n Synchronize: (): ITaskDetails => {\n return { first: [\"------\"], second: () => [\"------\"] };\n },\n};\n\nconst canDo: {\n [key: string]: undefined | ((player: IPlayer, sleeve: Sleeve) => boolean);\n [\"------\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Company\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Work for Faction\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Commit Crime\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Take University Course\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Workout at Gym\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Shock Recovery\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n [\"Synchronize\"]: (player: IPlayer, sleeve: Sleeve) => boolean;\n} = {\n \"------\": () => true,\n \"Work for Company\": (player: IPlayer, sleeve: Sleeve) => possibleJobs(player, sleeve).length > 0,\n \"Work for Faction\": (player: IPlayer, sleeve: Sleeve) => possibleFactions(player, sleeve).length > 0,\n \"Commit Crime\": () => true,\n \"Take University Course\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Workout at Gym\": (player: IPlayer, sleeve: Sleeve) =>\n [CityName.Aevum, CityName.Sector12, CityName.Volhaven].includes(sleeve.city),\n \"Shock Recovery\": (player: IPlayer, sleeve: Sleeve) => sleeve.shock < 100,\n Synchronize: (player: IPlayer, sleeve: Sleeve) => sleeve.sync < 100,\n};\n\nfunction getABC(sleeve: Sleeve): [string, string, string] {\n switch (sleeve.currentTask) {\n case SleeveTaskType.Idle:\n return [\"------\", \"------\", \"------\"];\n case SleeveTaskType.Company:\n return [\"Work for Company\", sleeve.currentTaskLocation, \"------\"];\n case SleeveTaskType.Faction: {\n let workType = \"\";\n switch (sleeve.factionWorkType) {\n case FactionWorkType.Hacking:\n workType = \"Hacking Contracts\";\n break;\n case FactionWorkType.Field:\n workType = \"Field Work\";\n break;\n case FactionWorkType.Security:\n workType = \"Security Work\";\n break;\n }\n return [\"Work for Faction\", sleeve.currentTaskLocation, workType];\n }\n case SleeveTaskType.Crime:\n return [\"Commit Crime\", sleeve.crimeType, \"------\"];\n case SleeveTaskType.Class:\n return [\"Take University Course\", sleeve.className, sleeve.currentTaskLocation];\n case SleeveTaskType.Gym:\n return [\"Workout at Gym\", sleeve.gymStatType, sleeve.currentTaskLocation];\n case SleeveTaskType.Recovery:\n return [\"Shock Recovery\", \"------\", \"------\"];\n case SleeveTaskType.Synchro:\n return [\"Synchronize\", \"------\", \"------\"];\n }\n}\n\nexport function TaskSelector(props: IProps): React.ReactElement {\n const abc = getABC(props.sleeve);\n const [s0, setS0] = useState(abc[0]);\n const [s1, setS1] = useState(abc[1]);\n const [s2, setS2] = useState(abc[2]);\n\n const validActions = Object.keys(canDo).filter((k) =>\n (canDo[k] as (player: IPlayer, sleeve: Sleeve) => boolean)(props.player, props.sleeve),\n );\n\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 if (details2.length > 0 && !details2.includes(s2)) {\n setS2(details2[0]);\n props.setABC([s0, s1, details2[0]]);\n }\n\n function onS0Change(event: SelectChangeEvent): void {\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: SelectChangeEvent): void {\n setS1(event.target.value);\n props.setABC([s0, event.target.value, s2]);\n }\n\n function onS2Change(event: SelectChangeEvent): void {\n setS2(event.target.value);\n props.setABC([s0, s1, event.target.value]);\n }\n\n return (\n <>\n \n {!(details.first.length === 1 && details.first[0] === \"------\") && (\n <>\n \n \n )}\n {!(details2.length === 1 && details2[0] === \"------\") && (\n <>\n \n \n )}\n \n );\n}\n","import React from \"react\";\n\nimport { Modal } from \"../../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport { FactionNames } from \"../../../Faction/data/FactionNames\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function FAQModal({ open, onClose }: IProps): React.ReactElement {\n return (\n \n <>\n How do Duplicate Sleeves work?\n
      \n \n Duplicate Sleeves are essentially clones. You can use them to perform any work type action, such as working\n for a company/faction or committing a crime. Having sleeves perform these tasks earns you money, experience,\n and reputation.\n \n
      \n
      \n \n Sleeves are their own individuals, which means they each have their own experience and stats.\n \n
      \n
      \n \n When a sleeve earns experience, it earns experience for itself, the player's original 'consciousness', as well\n as all of the player's other sleeves.\n \n
      \n
      \n What is Synchronization (Sync)?\n
      \n \n Synchronization is a measure of how aligned your consciousness is with that of your Duplicate Sleeves. It is a\n numerical value between 1 and 100, and it affects how much experience is earned when the sleeve is performing\n a task.\n \n
      \n
      \n \n Let N be the sleeve's synchronization. When the sleeve earns experience by performing a task, both the sleeve\n and the player's original host consciousness earn N% of the amount of experience normally earned by the task.\n All of the player's other sleeves earn ((N/100)^2 * 100)% of the experience.\n \n
      \n
      \n Synchronization can be increased by assigning sleeves to the 'Synchronize' task.\n
      \n
      \n What is Shock?\n
      \n \n Sleeve shock is a measure of how much trauma the sleeve has due to being placed in a new body. It is a\n numerical value between 0 and 99, where 99 indicates full shock and 0 indicates no shock. Shock affects the\n amount of experience earned by the sleeve.\n \n
      \n
      \n \n Sleeve shock slowly decreases over time. You can further increase the rate at which it decreases by assigning\n sleeves to the 'Shock Recovery' task.\n \n
      \n
      \n Why can't I work for this company or faction?\n
      \n \n Only one of your sleeves can work for a given company/faction a time. To clarify further, if you have two\n sleeves they can work for two different companies, but they cannot both work for the same company.\n \n
      \n
      \n Why did my Sleeve stop working?\n
      \n \n Sleeves are subject to the same time restrictions as you. This means that they automatically stop working at a\n company after 8 hours, and stop working for a faction after 20 hours.\n \n
      \n
      \n How do I buy Augmentations for my Sleeves?\n
      \n Your Sleeve needs to have a Shock of 0 in order for you to buy Augmentations for it.\n
      \n
      \n Why can't I buy the X Augmentation for my sleeve?\n
      \n \n Certain Augmentations, like {FactionNames.Bladeburners}-specific ones and NeuroFlux Governor, are not available for sleeves.\n \n
      \n
      \n Do sleeves get reset when installing Augmentations or switching BitNodes?\n
      \n Sleeves are reset when switching BitNodes, but not when installing Augmentations.\n
      \n
      \n What is Memory?\n
      \n \n Sleeve memory dictates what a sleeve's synchronization will be when its reset by switching BitNodes. For\n example, if a sleeve has a memory of 25, then when you switch BitNodes its synchronization will initially be\n set to 25, rather than 1.\n \n
      \n
      \n \n Memory can only be increased by purchasing upgrades from {FactionNames.TheCovenant}. It is a persistent stat, meaning it\n never gets resets back to 1. The maximum possible value for a sleeve's memory is 100.\n \n \n
      \n );\n}\n","/**\n * Root React Component for the Hacknet Node UI\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { GeneralInfo } from \"./GeneralInfo\";\nimport { HacknetNodeElem } from \"./HacknetNodeElem\";\nimport { HacknetServerElem } from \"./HacknetServerElem\";\nimport { HacknetNode } from \"../HacknetNode\";\nimport { HacknetServer } from \"../HacknetServer\";\nimport { HashUpgradeModal } from \"./HashUpgradeModal\";\nimport { MultiplierButtons } from \"./MultiplierButtons\";\nimport { PlayerInfo } from \"./PlayerInfo\";\nimport { PurchaseButton } from \"./PurchaseButton\";\nimport { PurchaseMultipliers } from \"../data/Constants\";\n\nimport {\n getCostOfNextHacknetNode,\n getCostOfNextHacknetServer,\n hasHacknetServers,\n purchaseHacknet,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Button from \"@mui/material/Button\";\nimport { Box } from \"@mui/material\";\n\ninterface IProps {\n player: IPlayer;\n}\n\nexport function HacknetRoot(props: IProps): React.ReactElement {\n const [open, setOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n const [purchaseMultiplier, setPurchaseMultiplier] = useState(PurchaseMultipliers.x1);\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\n }, []);\n\n let totalProduction = 0;\n for (let i = 0; i < props.player.hacknetNodes.length; ++i) {\n const node = props.player.hacknetNodes[i];\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\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 totalProduction += node.moneyGainRatePerSecond;\n }\n }\n\n function handlePurchaseButtonClick(): void {\n purchaseHacknet(props.player);\n rerender();\n }\n\n // Cost to purchase a new Hacknet Node\n let purchaseCost;\n if (hasHacknetServers(props.player)) {\n purchaseCost = getCostOfNextHacknetServer(props.player);\n } else {\n purchaseCost = getCostOfNextHacknetNode(props.player);\n }\n\n // onClick event handlers for purchase multiplier buttons\n const purchaseMultiplierOnClicks = [\n () => setPurchaseMultiplier(PurchaseMultipliers.x1),\n () => setPurchaseMultiplier(PurchaseMultipliers.x5),\n () => setPurchaseMultiplier(PurchaseMultipliers.x10),\n () => setPurchaseMultiplier(PurchaseMultipliers.MAX),\n ];\n\n // HacknetNode components\n const nodes = props.player.hacknetNodes.map((node: string | HacknetNode) => {\n if (hasHacknetServers(props.player)) {\n if (node instanceof HacknetNode) throw new Error(\"node was hacknet node\"); // should never happen\n const hserver = GetServer(node);\n if (hserver == null) {\n throw new Error(`Could not find Hacknet Server object in AllServers map for IP: ${node}`);\n }\n if (!(hserver instanceof HacknetServer)) throw new Error(\"node was not hacknet server\"); // should never happen\n return (\n \n );\n } else {\n if (typeof node === \"string\") throw new Error(\"node was ip string\"); // should never happen\n return (\n \n );\n }\n });\n\n return (\n <>\n Hacknet {hasHacknetServers(props.player) ? \"Servers\" : \"Nodes\"}\n \n\n \n\n
      \n\n \n \n \n \n \n \n \n \n\n {hasHacknetServers(props.player) && }\n\n {nodes}\n setOpen(false)} />\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI\n *\n * Displays general information about Hacknet Nodes\n */\nimport React from \"react\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n hasHacknetServers: boolean;\n}\n\nexport function GeneralInfo(props: IProps): React.ReactElement {\n return (\n <>\n \n The Hacknet is a global, decentralized network of machines. It is used by hackers all around the world to\n anonymously share computing power and perform distributed cyberattacks without the fear of being traced.\n \n {!props.hasHacknetServers ? (\n <>\n \n {`Here, you can purchase a Hacknet Node, a specialized machine that can connect ` +\n `and contribute its resources to the Hacknet network. This allows you to take ` +\n `a small percentage of profits from hacks performed on the network. Essentially, ` +\n `you are renting out your Node's computing power.`}\n \n \n {`Each Hacknet Node you purchase will passively earn you money. Each Hacknet Node ` +\n `can be upgraded in order to increase its computing power and thereby increase ` +\n `the profit you earn from it.`}\n \n \n ) : (\n <>\n \n {`Here, you can purchase a Hacknet Server, an upgraded version of the Hacknet Node. ` +\n `Hacknet Servers will perform computations and operations on the network, earning ` +\n `you hashes. Hashes can be spent on a variety of different upgrades.`}\n \n \n {`Hacknet Servers can also be used as servers to run scripts. However, running scripts ` +\n `on a server will reduce its hash rate (hashes generated per second). A Hacknet Server's hash ` +\n `rate will be reduced by the percentage of RAM that is being used by that Server to run ` +\n `scripts.`}\n \n \n )}\n \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetNodeConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetNode } from \"../HacknetNode\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateMoneyGainRate } from \"../formulas/HacknetNodes\";\n\ninterface IProps {\n node: HacknetNode;\n purchaseMultiplier: number | \"MAX\";\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetNodeElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetNodeConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level + multiplier, node.ram, node.cores, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberLevelUpgrades(props.player, node, HacknetNodeConstants.MaxLevel)\n : purchaseMult;\n purchaseLevelUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n let upgradeRAMButton;\n if (node.ram >= HacknetNodeConstants.MaxRam) {\n upgradeRAMButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetNodeConstants.MaxRam / node.ram));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(\n node.level,\n node.ram * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - node.moneyGainRatePerSecond;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRAMButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeRamOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\" ? getMaxNumberRamUpgrades(props.player, node, HacknetNodeConstants.MaxRam) : purchaseMult;\n purchaseRamUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n\n function upgradeCoresOnClick(): void {\n const numUpgrades =\n purchaseMult === \"MAX\"\n ? getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores)\n : purchaseMult;\n purchaseCoreUpgrade(props.player, node, numUpgrades);\n rerender();\n }\n let upgradeCoresButton;\n if (node.cores >= HacknetNodeConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetNodeConstants.MaxCores);\n } else {\n const levelsToMax = HacknetNodeConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateMoneyGainRate(node.level, node.ram, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n node.moneyGainRatePerSecond;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n return (\n \n \n \n \n \n {node.name}\n \n \n \n \n Production:\n \n \n \n (\n )\n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.ram)}\n \n {upgradeRAMButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n
      \n
      \n );\n}\n","/**\n * React Component for the Hacknet Node UI.\n * This Component displays the panel for a single Hacknet Node\n */\nimport React from \"react\";\n\nimport { HacknetServerConstants } from \"../data/Constants\";\nimport {\n getMaxNumberLevelUpgrades,\n getMaxNumberRamUpgrades,\n getMaxNumberCoreUpgrades,\n getMaxNumberCacheUpgrades,\n purchaseLevelUpgrade,\n purchaseRamUpgrade,\n purchaseCoreUpgrade,\n purchaseCacheUpgrade,\n updateHashManagerCapacity,\n} from \"../HacknetHelpers\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { HacknetServer } from \"../HacknetServer\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport Typography from \"@mui/material/Typography\";\nimport Grid from \"@mui/material/Grid\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { TableCell } from \"../../ui/React/Table\";\nimport TableBody from \"@mui/material/TableBody\";\nimport Table from \"@mui/material/Table\";\nimport TableRow from \"@mui/material/TableRow\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { calculateHashGainRate } from \"../formulas/HacknetServers\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\ninterface IProps {\n node: HacknetServer;\n purchaseMultiplier: number | string;\n rerender: () => void;\n player: IPlayer;\n}\n\nexport function HacknetServerElem(props: IProps): React.ReactElement {\n const node = props.node;\n const purchaseMult = props.purchaseMultiplier;\n const rerender = props.rerender;\n\n // Upgrade Level Button\n let upgradeLevelButton;\n if (node.level >= HacknetServerConstants.MaxLevel) {\n upgradeLevelButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n } else {\n const levelsToMax = HacknetServerConstants.MaxLevel - node.level;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(node.level + multiplier, 0, node.maxRam, node.cores, props.player.hacknet_node_money_mult) -\n node.hashRate;\n const upgradeLevelCost = node.calculateLevelUpgradeCost(multiplier, props.player.hacknet_node_level_cost_mult);\n upgradeLevelButton = (\n \n +\n \n }\n >\n \n \n );\n }\n function upgradeLevelOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberLevelUpgrades(props.player, node, HacknetServerConstants.MaxLevel);\n }\n purchaseLevelUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n\n function upgradeRamOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n }\n purchaseRamUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade RAM Button\n let upgradeRamButton;\n if (node.maxRam >= HacknetServerConstants.MaxRam) {\n upgradeRamButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberRamUpgrades(props.player, node, HacknetServerConstants.MaxRam);\n } else {\n const levelsToMax = Math.round(Math.log2(HacknetServerConstants.MaxRam / node.maxRam));\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(\n node.level,\n 0,\n node.maxRam * Math.pow(2, multiplier),\n node.cores,\n props.player.hacknet_node_money_mult,\n ) - node.hashRate;\n const upgradeRamCost = node.calculateRamUpgradeCost(multiplier, props.player.hacknet_node_ram_cost_mult);\n upgradeRamButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n function upgradeCoresOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n }\n purchaseCoreUpgrade(props.player, node, numUpgrades as number);\n rerender();\n }\n // Upgrade Cores Button\n let upgradeCoresButton;\n if (node.cores >= HacknetServerConstants.MaxCores) {\n upgradeCoresButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCoreUpgrades(props.player, node, HacknetServerConstants.MaxCores);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCores - node.cores;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase =\n calculateHashGainRate(node.level, 0, node.maxRam, node.cores + multiplier, props.player.hacknet_node_money_mult) -\n node.hashRate;\n const upgradeCoreCost = node.calculateCoreUpgradeCost(multiplier, props.player.hacknet_node_core_cost_mult);\n upgradeCoresButton = (\n \n +\n \n }\n >\n \n \n );\n }\n\n // Upgrade Cache button\n let upgradeCacheButton;\n if (node.cache >= HacknetServerConstants.MaxCache) {\n upgradeCacheButton = ;\n } else {\n let multiplier = 0;\n if (purchaseMult === \"MAX\") {\n multiplier = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n } else {\n const levelsToMax = HacknetServerConstants.MaxCache - node.cache;\n multiplier = Math.min(levelsToMax, purchaseMult as number);\n }\n\n const increase = 32 * Math.pow(2, node.cache + multiplier) - node.hashCapacity;\n const upgradeCacheCost = node.calculateCacheUpgradeCost(multiplier);\n upgradeCacheButton = (\n \n + hashes\n \n }\n >\n \n \n );\n if (props.player.money < upgradeCacheCost) {\n } else {\n }\n }\n function upgradeCacheOnClick(): void {\n let numUpgrades = purchaseMult;\n if (purchaseMult === \"MAX\") {\n numUpgrades = getMaxNumberCacheUpgrades(props.player, node, HacknetServerConstants.MaxCache);\n }\n purchaseCacheUpgrade(props.player, node, numUpgrades as number);\n rerender();\n updateHashManagerCapacity(props.player);\n }\n\n return (\n \n \n \n \n \n {node.hostname}\n \n \n \n \n Production:\n \n \n \n ()\n \n \n \n \n \n Hash Capacity:\n \n \n \n \n \n \n \n \n \n Level:\n \n \n {node.level}\n \n {upgradeLevelButton}\n \n \n \n RAM:\n \n \n {numeralWrapper.formatRAM(node.maxRam)}\n \n {upgradeRamButton}\n \n \n \n Cores:\n \n \n {node.cores}\n \n {upgradeCoresButton}\n \n \n \n Cache Level:\n \n \n {node.cache}\n \n {upgradeCacheButton}\n \n \n
      \n
      \n );\n}\n","/**\n * Create the pop-up for purchasing upgrades with hashes\n */\nimport React, { useState, useEffect } from \"react\";\n\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrades } from \"../HashUpgrades\";\n\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport { HacknetUpgradeElem } from \"./HacknetUpgradeElem\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function HashUpgradeModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(() => setRerender((old) => !old), 200);\n return () => clearInterval(id);\n }, []);\n\n const hashManager = player.hashManager;\n if (!(hashManager instanceof HashManager)) {\n throw new Error(`Player does not have a HashManager)`);\n }\n\n return (\n \n <>\n Spend your hashes on a variety of different upgrades\n \n Hashes: \n \n {Object.keys(HashUpgrades).map((upgName) => {\n const upg = HashUpgrades[upgName];\n return (\n \n );\n })}\n \n \n );\n}\n","import React, { useState } from \"react\";\n\nimport { purchaseHashUpgrade } from \"../HacknetHelpers\";\nimport { HashManager } from \"../HashManager\";\nimport { HashUpgrade } from \"../HashUpgrade\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nimport { ServerDropdown, ServerType } from \"../../ui/React/ServerDropdown\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { CopyableText } from \"../../ui/React/CopyableText\";\nimport { Hashes } from \"../../ui/React/Hashes\";\n\nimport Typography from \"@mui/material/Typography\";\nimport Paper from \"@mui/material/Paper\";\nimport Button from \"@mui/material/Button\";\nimport { SelectChangeEvent } from \"@mui/material/Select\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ninterface IProps {\n player: IPlayer;\n hashManager: HashManager;\n upg: HashUpgrade;\n rerender: () => void;\n}\n\nconst serversMap: { [key: string]: string } = {};\n\nexport function HacknetUpgradeElem(props: IProps): React.ReactElement {\n const [selectedServer, setSelectedServer] = useState(\n serversMap[props.upg.name] ? serversMap[props.upg.name] : FactionNames.ECorp.toLowerCase(),\n );\n function changeTargetServer(event: SelectChangeEvent): void {\n setSelectedServer(event.target.value);\n serversMap[props.upg.name] = event.target.value;\n }\n\n function purchase(): void {\n const canPurchase = props.hashManager.hashes >= props.hashManager.getUpgradeCost(props.upg.name);\n if (canPurchase) {\n const res = purchaseHashUpgrade(props.player, props.upg.name, selectedServer);\n if (!res) {\n dialogBoxCreate(\n \"Failed to purchase upgrade. This may be because you do not have enough hashes, \" +\n \"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);\n\n // Purchase button\n const canPurchase = hashManager.hashes >= cost;\n\n // We'll reuse a Bladeburner css class\n return (\n \n \n \n \n \n Cost: , Bought: {level} times\n \n\n {upg.desc}\n {!upg.hasTargetServer && (\n \n )}\n {upg.hasTargetServer && (\n \n )}\n {level > 0 && effect && {effect}}\n \n );\n}\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 */\nimport React from \"react\";\n\nimport { PurchaseMultipliers } from \"../data/Constants\";\nimport Button from \"@mui/material/Button\";\n\ninterface IMultiplierProps {\n disabled: boolean;\n onClick: () => void;\n text: string;\n}\n\nfunction MultiplierButton(props: IMultiplierProps): React.ReactElement {\n return (\n \n );\n}\n\ninterface IProps {\n purchaseMultiplier: number | string;\n onClicks: (() => void)[];\n}\n\nexport function MultiplierButtons(props: IProps): React.ReactElement {\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 for (let i = 0; i < mults.length; ++i) {\n const mult = mults[i];\n const btnProps = {\n disabled: props.purchaseMultiplier === PurchaseMultipliers[mult],\n onClick: onClicks[i],\n text: mult,\n };\n\n buttons.push();\n }\n\n return <>{buttons};\n}\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 */\nimport React from \"react\";\n\nimport { hasHacknetServers } from \"../HacknetHelpers\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { Money } from \"../../ui/React/Money\";\nimport { MoneyRate } from \"../../ui/React/MoneyRate\";\nimport { HashRate } from \"../../ui/React/HashRate\";\nimport { Hashes } from \"../../ui/React/Hashes\";\nimport Typography from \"@mui/material/Typography\";\n\ninterface IProps {\n totalProduction: number;\n player: IPlayer;\n}\n\nexport function PlayerInfo(props: IProps): React.ReactElement {\n const hasServers = hasHacknetServers(props.player);\n\n let prod;\n if (hasServers) {\n prod = ;\n } else {\n prod = ;\n }\n\n return (\n <>\n \n Money:\n \n \n\n {hasServers && (\n <>\n \n Hashes: /{\" \"}\n \n \n \n )}\n\n \n Total Hacknet {hasServers ? \"Server\" : \"Node\"} Production: {prod}\n \n \n );\n}\n","/**\n * React Component for the button that is used to purchase new Hacknet Nodes\n */\nimport React from \"react\";\n\nimport { hasHacknetServers, hasMaxNumberHacknetServers } from \"../HacknetHelpers\";\nimport { Player } from \"../../Player\";\nimport { Money } from \"../../ui/React/Money\";\n\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n multiplier: number | string;\n onClick: () => void;\n cost: number;\n}\n\nexport function PurchaseButton(props: IProps): React.ReactElement {\n const cost = props.cost;\n let text;\n if (hasHacknetServers(Player)) {\n if (hasMaxNumberHacknetServers(Player)) {\n text = <>Hacknet Server limit reached;\n } else {\n text = (\n <>\n Purchase Hacknet Server - \n \n \n );\n }\n } else {\n text = (\n <>\n Purchase Hacknet Node - \n \n \n );\n }\n\n return (\n \n );\n}\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 */\nimport * as React from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { CompanyLocation } from \"./CompanyLocation\";\nimport { GymLocation } from \"./GymLocation\";\nimport { HospitalLocation } from \"./HospitalLocation\";\nimport { SlumsLocation } from \"./SlumsLocation\";\nimport { SpecialLocation } from \"./SpecialLocation\";\nimport { TechVendorLocation } from \"./TechVendorLocation\";\nimport { TravelAgencyRoot } from \"./TravelAgencyRoot\";\nimport { UniversityLocation } from \"./UniversityLocation\";\nimport { CasinoLocation } from \"./CasinoLocation\";\n\nimport { Location } from \"../Location\";\nimport { LocationType } from \"../LocationTypeEnum\";\n\nimport { Settings } from \"../../Settings/Settings\";\n\nimport { isBackdoorInstalled } from \"../../Server/ServerHelpers\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { use } from \"../../ui/Context\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { Tooltip } from \"@mui/material\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function GenericLocation({ loc }: IProps): React.ReactElement {\n const router = use.Router();\n const player = use.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 function getLocationSpecificContent(): React.ReactNode[] {\n const content: React.ReactNode[] = [];\n\n if (loc.types.includes(LocationType.Company)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Gym)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Hospital)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Slums)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Special)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TechVendor)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.TravelAgency)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.University)) {\n content.push();\n }\n\n if (loc.types.includes(LocationType.Casino)) {\n content.push();\n }\n\n return content;\n }\n\n const locContent: React.ReactNode[] = getLocationSpecificContent();\n const serverMeta = serverMetadata.find((s) => s.specialName === loc.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n\n const backdoorInstalled = server !== null && isBackdoorInstalled(server);\n\n return (\n <>\n \n \n {backdoorInstalled && !Settings.DisableTextEffects ? (\n \n \n ) : loc.name}\n \n {locContent}\n \n );\n}\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 */\nimport React, { useState, useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\nimport Box from \"@mui/material/Box\";\n\nimport { ApplyToJobButton } from \"./ApplyToJobButton\";\n\nimport { Locations } from \"../Locations\";\nimport { LocationName } from \"../data/LocationNames\";\n\nimport { Companies } from \"../../Company/Companies\";\nimport { CompanyPosition } from \"../../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../../Company/CompanyPositions\";\nimport * as posNames from \"../../Company/data/companypositionnames\";\n\nimport { Reputation } from \"../../ui/React/Reputation\";\nimport { Favor } from \"../../ui/React/Favor\";\nimport { use } from \"../../ui/Context\";\nimport { QuitJobModal } from \"../../Company/ui/QuitJobModal\";\n\ntype IProps = {\n locName: LocationName;\n};\n\nexport function CompanyLocation(props: IProps): React.ReactElement {\n const p = use.Player();\n const router = use.Router();\n const [quitOpen, setQuitOpen] = useState(false);\n const setRerender = useState(false)[1];\n function rerender(): void {\n setRerender((old) => !old);\n }\n\n useEffect(() => {\n const id = setInterval(rerender, 200);\n return () => clearInterval(id);\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 const company = Companies[props.locName];\n if (company == null) throw new Error(`CompanyLocation component constructed with invalid company: ${props.locName}`);\n\n /**\n * Reference to the Location that this component is being rendered for\n */\n const location = Locations[props.locName];\n if (location == null) {\n throw new Error(`CompanyLocation component constructed with invalid location: ${props.locName}`);\n }\n\n /**\n * Name of company position that player holds, if applicable\n */\n const jobTitle = p.jobs[props.locName] ? p.jobs[props.locName] : null;\n\n /**\n * CompanyPosition object for the job that the player holds at this company\n * (if he has one)\n */\n const companyPosition = jobTitle ? CompanyPositions[jobTitle] : null;\n\n p.location = props.locName;\n\n function applyForAgentJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForAgentJob();\n rerender();\n }\n\n function applyForBusinessConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessConsultantJob();\n rerender();\n }\n\n function applyForBusinessJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForBusinessJob();\n rerender();\n }\n\n function applyForEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForEmployeeJob();\n rerender();\n }\n\n function applyForItJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForItJob();\n rerender();\n }\n\n function applyForPartTimeEmployeeJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeEmployeeJob();\n rerender();\n }\n\n function applyForPartTimeWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForPartTimeWaiterJob();\n rerender();\n }\n\n function applyForSecurityJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSecurityJob();\n rerender();\n }\n\n function applyForSoftwareConsultantJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareConsultantJob();\n rerender();\n }\n\n function applyForSoftwareJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForSoftwareJob();\n rerender();\n }\n\n function applyForWaiterJob(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n p.applyForWaiterJob();\n rerender();\n }\n\n function startInfiltration(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n const loc = location;\n if (!loc.infiltrationData)\n throw new Error(`trying to start infiltration at ${props.locName} but the infiltrationData is null`);\n\n router.toInfiltration(loc);\n }\n\n function work(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n const pos = companyPosition;\n if (pos instanceof CompanyPosition) {\n if (pos.isPartTimeJob() || pos.isSoftwareConsultantJob() || pos.isBusinessConsultantJob()) {\n p.startWorkPartTime(props.locName);\n } else {\n p.startWork(props.locName);\n }\n p.startFocusing();\n router.toWork();\n }\n }\n\n const isEmployedHere = jobTitle != null;\n const favorGain = company.getFavorGain();\n\n return (\n <>\n {isEmployedHere && (\n <>\n Job Title: {jobTitle}\n -------------------------\n \n \n You will have company favor upon resetting after\n installing Augmentations\n \n }\n >\n \n Company reputation: \n \n \n \n -------------------------\n \n \n Company favor increases the rate at which you earn reputation for this company by 1% per favor.\n Company favor is gained whenever you reset after installing Augmentations. The amount of favor you\n gain depends on how much reputation you have with the company.\n \n }\n >\n \n Company Favor: \n \n \n \n -------------------------\n
      \n \n )}\n \n {isEmployedHere && (\n \n \n \n setQuitOpen(false)}\n />\n \n )\n\n }\n {company.hasAgentPositions() && (\n \n )}\n {company.hasBusinessConsultantPositions() && (\n \n )}\n {company.hasBusinessPositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasEmployeePositions() && (\n \n )}\n {company.hasITPositions() && (\n \n )}\n {company.hasSecurityPositions() && (\n \n )}\n {company.hasSoftwareConsultantPositions() && (\n \n )}\n {company.hasSoftwarePositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {company.hasWaiterPositions() && (\n \n )}\n {location.infiltrationData != null && }\n \n \n );\n}\n","// Metadata used for constructing Company Positions\nimport { IConstructorParams } from \"../CompanyPosition\";\nimport * as posNames from \"./companypositionnames\";\n\nexport const companyPositionMetadata: IConstructorParams[] = [\n {\n name: posNames.SoftwareCompanyPositions[0], // Software Enginering Intern\n nextPosition: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n baseSalary: 33,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.05,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.SoftwareCompanyPositions[1], // Junior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n baseSalary: 80,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.1,\n reqdHacking: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SoftwareCompanyPositions[2], // Senior Software Engineer\n nextPosition: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n baseSalary: 165,\n charismaEffectiveness: 20,\n charismaExpGain: 0.08,\n hackingEffectiveness: 80,\n hackingExpGain: 0.4,\n reqdCharisma: 51,\n reqdHacking: 251,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.SoftwareCompanyPositions[3], // Lead Software Developer\n nextPosition: posNames.SoftwareCompanyPositions[4], // Head of Software\n baseSalary: 500,\n charismaEffectiveness: 25,\n charismaExpGain: 0.1,\n hackingEffectiveness: 75,\n hackingExpGain: 0.8,\n reqdCharisma: 151,\n reqdHacking: 401,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.SoftwareCompanyPositions[4], // Head of Software\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 800,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 400e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n nextPosition: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n baseSalary: 1650,\n charismaEffectiveness: 25,\n charismaExpGain: 0.5,\n hackingEffectiveness: 75,\n hackingExpGain: 1.1,\n reqdCharisma: 251,\n reqdHacking: 501,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.SoftwareCompanyPositions[6], // Vice President of Technology\n nextPosition: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n baseSalary: 2310,\n charismaEffectiveness: 30,\n charismaExpGain: 0.6,\n hackingEffectiveness: 70,\n hackingExpGain: 1.2,\n reqdCharisma: 401,\n reqdHacking: 601,\n reqdReputation: 1.6e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SoftwareCompanyPositions[7], // Chief Technology Officer\n nextPosition: null,\n baseSalary: 2640,\n charismaEffectiveness: 35,\n charismaExpGain: 1,\n hackingEffectiveness: 65,\n hackingExpGain: 1.5,\n reqdCharisma: 501,\n reqdHacking: 751,\n reqdReputation: 3.2e6,\n repMultiplier: 2,\n },\n {\n name: posNames.ITCompanyPositions[0], // IT Intern\n nextPosition: posNames.ITCompanyPositions[1], // IT Analyst\n baseSalary: 26,\n charismaEffectiveness: 10,\n charismaExpGain: 0.01,\n hackingEffectiveness: 90,\n hackingExpGain: 0.04,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.ITCompanyPositions[1], // IT Analyst\n nextPosition: posNames.ITCompanyPositions[2], // IT Manager\n baseSalary: 66,\n charismaEffectiveness: 15,\n charismaExpGain: 0.02,\n hackingEffectiveness: 85,\n hackingExpGain: 0.08,\n reqdHacking: 26,\n reqdReputation: 7e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.ITCompanyPositions[2], // IT Manager\n nextPosition: posNames.ITCompanyPositions[3], // Systems Administrator\n baseSalary: 132,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.3,\n reqdCharisma: 51,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.ITCompanyPositions[3], // Systems Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.2,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.SecurityEngineerCompanyPositions[0], // Security Engineer\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[0], // Network Engineer\n nextPosition: posNames.NetworkEngineerCompanyPositions[1], // Network Adminsitrator\n baseSalary: 121,\n charismaEffectiveness: 15,\n charismaExpGain: 0.05,\n hackingEffectiveness: 85,\n hackingExpGain: 0.4,\n reqdCharisma: 26,\n reqdHacking: 151,\n reqdReputation: 35e3,\n repMultiplier: 1.2,\n },\n {\n name: posNames.NetworkEngineerCompanyPositions[1], // Network Administrator\n nextPosition: posNames.SoftwareCompanyPositions[5], // Head of Engineering\n baseSalary: 410,\n charismaEffectiveness: 20,\n charismaExpGain: 0.1,\n hackingEffectiveness: 80,\n hackingExpGain: 0.5,\n reqdCharisma: 76,\n reqdHacking: 251,\n reqdReputation: 175e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[0], // Business Intern\n nextPosition: posNames.BusinessCompanyPositions[1], // Business Analyst\n baseSalary: 46,\n charismaEffectiveness: 90,\n charismaExpGain: 0.08,\n hackingEffectiveness: 10,\n hackingExpGain: 0.01,\n reqdCharisma: 1,\n reqdHacking: 1,\n repMultiplier: 0.9,\n },\n {\n name: posNames.BusinessCompanyPositions[1], // Business Analyst\n nextPosition: posNames.BusinessCompanyPositions[2], // Business Manager\n baseSalary: 100,\n charismaEffectiveness: 85,\n charismaExpGain: 0.15,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 51,\n reqdHacking: 6,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.BusinessCompanyPositions[2], // Business Manager\n nextPosition: posNames.BusinessCompanyPositions[3], // Operations Manager\n baseSalary: 200,\n charismaEffectiveness: 85,\n charismaExpGain: 0.3,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 101,\n reqdHacking: 51,\n reqdReputation: 40e3,\n repMultiplier: 1.3,\n },\n {\n name: posNames.BusinessCompanyPositions[3], // Operations Manager\n nextPosition: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n baseSalary: 660,\n charismaEffectiveness: 85,\n charismaExpGain: 0.4,\n hackingEffectiveness: 15,\n hackingExpGain: 0.02,\n reqdCharisma: 226,\n reqdHacking: 51,\n reqdReputation: 200e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.BusinessCompanyPositions[4], // Chief Financial Officer\n nextPosition: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n baseSalary: 1950,\n charismaEffectiveness: 90,\n charismaExpGain: 1,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 501,\n reqdHacking: 76,\n reqdReputation: 800e3,\n repMultiplier: 1.6,\n },\n {\n name: posNames.BusinessCompanyPositions[5], // Chief Executive Officer\n nextPosition: null,\n baseSalary: 3900,\n charismaEffectiveness: 90,\n charismaExpGain: 1.5,\n hackingEffectiveness: 10,\n hackingExpGain: 0.05,\n reqdCharisma: 751,\n reqdHacking: 101,\n reqdReputation: 3.2e6,\n repMultiplier: 1.75,\n },\n {\n name: posNames.SecurityCompanyPositions[0], // Police Officer\n nextPosition: posNames.SecurityCompanyPositions[1], // Police Chief\n baseSalary: 82,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.04,\n reqdHacking: 11,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[1], // Police Chief\n nextPosition: null,\n baseSalary: 460,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.1,\n reqdHacking: 101,\n reqdStrength: 301,\n reqdDefense: 301,\n reqdDexterity: 301,\n reqdAgility: 301,\n reqdCharisma: 151,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[2], // Security Guard\n nextPosition: posNames.SecurityCompanyPositions[3], // Security Officer\n baseSalary: 50,\n hackingEffectiveness: 5,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.01,\n strengthExpGain: 0.04,\n defenseExpGain: 0.04,\n dexterityExpGain: 0.04,\n agilityExpGain: 0.04,\n charismaExpGain: 0.02,\n reqdStrength: 51,\n reqdDefense: 51,\n reqdDexterity: 51,\n reqdAgility: 51,\n reqdCharisma: 1,\n repMultiplier: 1,\n },\n {\n name: posNames.SecurityCompanyPositions[3], // Security Officer\n nextPosition: posNames.SecurityCompanyPositions[4], // Security Supervisor\n baseSalary: 195,\n hackingEffectiveness: 10,\n strengthEffectiveness: 20,\n defenseEffectiveness: 20,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 10,\n hackingExpGain: 0.02,\n strengthExpGain: 0.1,\n defenseExpGain: 0.1,\n dexterityExpGain: 0.1,\n agilityExpGain: 0.1,\n charismaExpGain: 0.05,\n reqdHacking: 26,\n reqdStrength: 151,\n reqdDefense: 151,\n reqdDexterity: 151,\n reqdAgility: 151,\n reqdCharisma: 51,\n reqdReputation: 8e3,\n repMultiplier: 1.1,\n },\n {\n name: posNames.SecurityCompanyPositions[4], // Security Supervisor\n nextPosition: posNames.SecurityCompanyPositions[5], // Head of Security\n baseSalary: 660,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.02,\n strengthExpGain: 0.12,\n defenseExpGain: 0.12,\n dexterityExpGain: 0.12,\n agilityExpGain: 0.12,\n charismaExpGain: 0.1,\n reqdHacking: 26,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 101,\n reqdReputation: 36e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.SecurityCompanyPositions[5], // Head of Security\n nextPosition: null,\n baseSalary: 1320,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 15,\n agilityEffectiveness: 15,\n charismaEffectiveness: 30,\n hackingExpGain: 0.05,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.15,\n reqdHacking: 51,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 151,\n reqdReputation: 144e3,\n repMultiplier: 1.4,\n },\n {\n name: posNames.AgentCompanyPositions[0], // Field Agent\n nextPosition: posNames.AgentCompanyPositions[1], // Secret Agent\n baseSalary: 330,\n hackingEffectiveness: 10,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 20,\n hackingExpGain: 0.04,\n strengthExpGain: 0.08,\n defenseExpGain: 0.08,\n dexterityExpGain: 0.08,\n agilityExpGain: 0.08,\n charismaExpGain: 0.05,\n reqdHacking: 101,\n reqdStrength: 101,\n reqdDefense: 101,\n reqdDexterity: 101,\n reqdAgility: 101,\n reqdCharisma: 101,\n reqdReputation: 8e3,\n repMultiplier: 1,\n },\n {\n name: posNames.AgentCompanyPositions[1], // Secret Agent\n nextPosition: posNames.AgentCompanyPositions[2], // Special Operative\n baseSalary: 990,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.1,\n strengthExpGain: 0.15,\n defenseExpGain: 0.15,\n dexterityExpGain: 0.15,\n agilityExpGain: 0.15,\n charismaExpGain: 0.1,\n reqdHacking: 201,\n reqdStrength: 251,\n reqdDefense: 251,\n reqdDexterity: 251,\n reqdAgility: 251,\n reqdCharisma: 201,\n reqdReputation: 32e3,\n repMultiplier: 1.25,\n },\n {\n name: posNames.AgentCompanyPositions[2], // Special Operative\n nextPosition: null,\n baseSalary: 2000,\n hackingEffectiveness: 15,\n strengthEffectiveness: 15,\n defenseEffectiveness: 15,\n dexterityEffectiveness: 20,\n agilityEffectiveness: 20,\n charismaEffectiveness: 15,\n hackingExpGain: 0.15,\n strengthExpGain: 0.2,\n defenseExpGain: 0.2,\n dexterityExpGain: 0.2,\n agilityExpGain: 0.2,\n charismaExpGain: 0.15,\n reqdHacking: 251,\n reqdStrength: 501,\n reqdDefense: 501,\n reqdDexterity: 501,\n reqdAgility: 501,\n reqdCharisma: 251,\n reqdReputation: 162e3,\n repMultiplier: 1.5,\n },\n {\n name: posNames.MiscCompanyPositions[0], // Waiter\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.05,\n repMultiplier: 1,\n },\n {\n name: posNames.MiscCompanyPositions[1], // Employee\n nextPosition: null,\n baseSalary: 22,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.02,\n defenseExpGain: 0.02,\n dexterityExpGain: 0.02,\n agilityExpGain: 0.02,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[0], // Software Consultant\n nextPosition: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n baseSalary: 66,\n hackingEffectiveness: 80,\n charismaEffectiveness: 20,\n hackingExpGain: 0.08,\n charismaExpGain: 0.03,\n reqdHacking: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.SoftwareConsultantCompanyPositions[1], // Senior Software Consultant\n nextPosition: null,\n baseSalary: 132,\n hackingEffectiveness: 75,\n charismaEffectiveness: 25,\n hackingExpGain: 0.25,\n charismaExpGain: 0.06,\n reqdHacking: 251,\n reqdCharisma: 51,\n repMultiplier: 1.2,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[0], // Business Consultant\n nextPosition: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n baseSalary: 66,\n hackingEffectiveness: 20,\n charismaEffectiveness: 80,\n hackingExpGain: 0.015,\n charismaExpGain: 0.15,\n reqdHacking: 6,\n reqdCharisma: 51,\n repMultiplier: 1,\n },\n {\n name: posNames.BusinessConsultantCompanyPositions[1], // Senior Business Consultant\n nextPosition: null,\n baseSalary: 525,\n hackingEffectiveness: 15,\n charismaEffectiveness: 85,\n hackingExpGain: 0.015,\n charismaExpGain: 0.3,\n reqdHacking: 51,\n reqdCharisma: 226,\n repMultiplier: 1.2,\n },\n {\n name: posNames.PartTimeCompanyPositions[0], // Part-time waiter\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.04,\n repMultiplier: 1,\n },\n {\n name: posNames.PartTimeCompanyPositions[1], // Part-time employee\n nextPosition: null,\n baseSalary: 20,\n strengthEffectiveness: 10,\n dexterityEffectiveness: 10,\n agilityEffectiveness: 10,\n charismaEffectiveness: 70,\n strengthExpGain: 0.0075,\n defenseExpGain: 0.0075,\n dexterityExpGain: 0.0075,\n agilityExpGain: 0.0075,\n charismaExpGain: 0.03,\n repMultiplier: 1,\n },\n];\n","import React from \"react\";\nimport { Company } from \"../Company\";\nimport { use } from \"../../ui/Context\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n locName: string;\n company: Company;\n onQuit: () => void;\n}\n\nexport function QuitJobModal(props: IProps): React.ReactElement {\n const player = use.Player();\n function quit(): void {\n player.quitJob(props.locName);\n props.onQuit();\n props.onClose();\n }\n\n return (\n \n Would you like to quit your job at {props.company.name}?\n
      \n
      \n \n
      \n );\n}\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 */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\n\nimport { CONSTANTS } from \"../../Constants\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { IRouter } from \"../../ui/Router\";\nimport { serverMetadata } from \"../../Server/data/servers\";\nimport { Box } from \"@mui/material\";\n\ntype IProps = {\n loc: Location;\n p: IPlayer;\n router: IRouter;\n};\n\nexport function GymLocation(props: IProps): React.ReactElement {\n function calculateCost(): number {\n const serverMeta = serverMetadata.find((s) => s.specialName === props.loc.name);\n const server = GetServer(serverMeta ? serverMeta.hostname : \"\");\n if (server == null || !server.hasOwnProperty(\"backdoorInstalled\")) return props.loc.costMult;\n const discount = (server as Server).backdoorInstalled ? 0.9 : 1;\n return props.loc.costMult * discount;\n }\n\n function train(stat: string): void {\n const loc = props.loc;\n props.p.startClass(calculateCost(), loc.expMult, stat);\n props.p.startFocusing();\n props.router.toWork();\n }\n\n function trainStrength(): void {\n train(CONSTANTS.ClassGymStrength);\n }\n\n function trainDefense(): void {\n train(CONSTANTS.ClassGymDefense);\n }\n\n function trainDexterity(): void {\n train(CONSTANTS.ClassGymDexterity);\n }\n\n function trainAgility(): void {\n train(CONSTANTS.ClassGymAgility);\n }\n\n const cost = CONSTANTS.ClassGymBaseCost * calculateCost();\n\n return (\n \n \n \n \n \n \n );\n}\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 */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\n\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { getHospitalizationCost } from \"../../Hospital/Hospital\";\n\nimport { Money } from \"../../ui/React/Money\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\ntype IProps = {\n p: IPlayer;\n};\n\ntype IState = {\n currHp: number;\n};\n\nexport class HospitalLocation extends React.Component {\n /**\n * Stores button styling that sets them all to block display\n */\n btnStyle: any;\n\n constructor(props: IProps) {\n super(props);\n\n this.btnStyle = { display: \"block\" };\n\n this.getCost = this.getCost.bind(this);\n this.getHealed = this.getHealed.bind(this);\n\n this.state = {\n currHp: this.props.p.hp,\n };\n }\n\n getCost(): number {\n return getHospitalizationCost(this.props.p);\n }\n\n getHealed(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n\n if (this.props.p.hp < 0) {\n this.props.p.hp = 0;\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, \"hospitalization\");\n this.props.p.hp = this.props.p.max_hp;\n\n // This just forces a re-render to update the cost\n this.setState({\n currHp: this.props.p.hp,\n });\n\n dialogBoxCreate(\n <>\n You were healed to full health! The hospital billed you for \n ,\n );\n }\n\n render(): React.ReactNode {\n const cost = this.getCost();\n\n return (\n \n );\n }\n}\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 */\nimport * as React from \"react\";\nimport Button from \"@mui/material/Button\";\nimport Tooltip from \"@mui/material/Tooltip\";\n\nimport { Crimes } from \"../../Crime/Crimes\";\n\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { use } from \"../../ui/Context\";\nimport { Box } from \"@mui/material\";\n\nexport function SlumsLocation(): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n function shoplift(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Shoplift.commit(router, player);\n }\n\n function robStore(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.RobStore.commit(router, player);\n }\n\n function mug(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Mug.commit(router, player);\n }\n\n function larceny(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Larceny.commit(router, player);\n }\n\n function dealDrugs(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.DealDrugs.commit(router, player);\n }\n\n function bondForgery(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.BondForgery.commit(router, player);\n }\n\n function traffickArms(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.TraffickArms.commit(router, player);\n }\n\n function homicide(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Homicide.commit(router, player);\n }\n\n function grandTheftAuto(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.GrandTheftAuto.commit(router, player);\n }\n\n function kidnap(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Kidnap.commit(router, player);\n }\n\n function assassinate(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Assassination.commit(router, player);\n }\n\n function heist(e: React.MouseEvent): void {\n if (!e.isTrusted) {\n return;\n }\n Crimes.Heist.commit(router, player);\n }\n\n const shopliftChance = Crimes.Shoplift.successRate(player);\n const robStoreChance = Crimes.RobStore.successRate(player);\n const mugChance = Crimes.Mug.successRate(player);\n const larcenyChance = Crimes.Larceny.successRate(player);\n const drugsChance = Crimes.DealDrugs.successRate(player);\n const bondChance = Crimes.BondForgery.successRate(player);\n const armsChance = Crimes.TraffickArms.successRate(player);\n const homicideChance = Crimes.Homicide.successRate(player);\n const gtaChance = Crimes.GrandTheftAuto.successRate(player);\n const kidnapChance = Crimes.Kidnap.successRate(player);\n const assassinateChance = Crimes.Assassination.successRate(player);\n const heistChance = Crimes.Heist.successRate(player);\n\n return (\n \n Attempt to shoplift from a low-end retailer}>\n \n \n Attempt to commit armed robbery on a high-end store}>\n \n \n Attempt to mug a random person on the street}>\n \n \n Attempt to rob property from someone's house}>\n \n \n Attempt to deal drugs}>\n \n \n Attempt to forge corporate bonds}>\n \n \n Attempt to smuggle illegal arms into the city}>\n \n \n Attempt to murder a random person on the street}>\n \n \n Attempt to commit grand theft auto}>\n \n \n Attempt to kidnap and ransom a high-profile-target}>\n \n \n Attempt to assassinate a high-profile target}>\n \n \n Attempt to pull off the ultimate heist}>\n \n \n \n );\n}\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 */\nimport React, { useState } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\n\nimport { Location } from \"../Location\";\nimport { CreateCorporationModal } from \"../../Corporation/ui/CreateCorporationModal\";\nimport { LocationName } from \"../data/LocationNames\";\nimport { AugmentationNames } from \"../../Augmentation/data/AugmentationNames\";\nimport { Factions } from \"../../Faction/Factions\";\nimport { joinFaction } from \"../../Faction/FactionHelpers\";\n\nimport { use } from \"../../ui/Context\";\n\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\nimport { SnackbarEvents } from \"../../ui/React/Snackbar\";\nimport { N00dles } from \"../../utils/helpers/N00dles\";\nimport { Exploit } from \"../../Exploits/Exploit\";\nimport { applyAugmentation } from \"../../Augmentation/AugmentationHelpers\";\nimport { CorruptableText } from \"../../ui/React/CorruptableText\";\nimport { HacknetNode } from \"../../Hacknet/HacknetNode\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { ArcadeRoot } from \"../../Arcade/ui/ArcadeRoot\";\nimport { FactionNames } from \"../../Faction/data/FactionNames\";\n\ntype IProps = {\n loc: Location;\n};\n\nexport function SpecialLocation(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const setRerender = useState(false)[1];\n const inBladeburner = player.inBladeburner();\n\n /**\n * Click handler for Bladeburner button at Sector-12 NSA\n */\n function handleBladeburner(): void {\n const p = player;\n if (p.inBladeburner()) {\n // Enter Bladeburner division\n router.toBladeburner();\n } else if (p.strength >= 100 && p.defense >= 100 && p.dexterity >= 100 && p.agility >= 100) {\n // Apply for Bladeburner division\n p.startBladeburner({ new: true });\n dialogBoxCreate(\"You have been accepted into the Bladeburner division!\");\n setRerender((old) => !old);\n\n const worldHeader = document.getElementById(\"world-menu-header\");\n if (worldHeader instanceof HTMLElement) {\n worldHeader.click();\n worldHeader.click();\n }\n } else {\n dialogBoxCreate(\"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 function handleGrafting(): void {\n router.toGrafting();\n }\n\n function renderBladeburner(): React.ReactElement {\n if (!player.canAccessBladeburner()) {\n return <>;\n }\n const text = inBladeburner ? \"Enter Bladeburner Headquarters\" : \"Apply to Bladeburner Division\";\n return (\n <>\n
      \n \n \n );\n }\n\n function renderNoodleBar(): React.ReactElement {\n function EatNoodles(): void {\n SnackbarEvents.emit(\"You ate some delicious noodles and feel refreshed\", \"success\", 2000);\n N00dles(); // This is the true power of the noodles.\n if (player.sourceFiles.length > 0) player.giveExploit(Exploit.N00dles);\n if (player.sourceFileLvl(5) > 0 || player.bitNodeN === 5) {\n player.intelligence_exp *= 1.0000000000000002;\n }\n player.hacking_exp *= 1.0000000000000002;\n player.strength_exp *= 1.0000000000000002;\n player.defense_exp *= 1.0000000000000002;\n player.agility_exp *= 1.0000000000000002;\n player.dexterity_exp *= 1.0000000000000002;\n player.charisma_exp *= 1.0000000000000002;\n for (const node of player.hacknetNodes) {\n if (node instanceof HacknetNode) {\n player.gainMoney(node.moneyGainRatePerSecond * 0.001, \"other\");\n } else {\n const server = GetServer(node);\n if (!(server instanceof HacknetServer)) throw new Error(`Server ${node} is not a hacknet server.`);\n player.hashManager.storeHashes(server.hashRate * 0.001);\n }\n }\n\n if (player.bladeburner) {\n player.bladeburner.rank += 0.00001;\n }\n\n if (player.corporation) {\n player.corporation.funds += player.corporation.revenue * 0.01;\n }\n }\n\n return (\n <>\n
      \n \n \n );\n }\n\n function CreateCorporation(): React.ReactElement {\n const [open, setOpen] = useState(false);\n if (!player.canAccessCorporation()) {\n return (\n <>\n \n A business man is yelling at a clerk. You should come back later.\n \n \n );\n }\n return (\n <>\n \n setOpen(false)} />\n \n );\n }\n\n function renderGrafting(): React.ReactElement {\n if (!player.canAccessGrafting()) {\n return <>;\n }\n return ;\n }\n\n function handleCotMG(): void {\n const faction = Factions[FactionNames.ChurchOfTheMachineGod];\n if (!player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n joinFaction(faction);\n }\n if (\n !player.augmentations.some((a) => a.name === AugmentationNames.StaneksGift1) &&\n !player.queuedAugmentations.some((a) => a.name === AugmentationNames.StaneksGift1)\n ) {\n applyAugmentation({ name: AugmentationNames.StaneksGift1, level: 1 });\n }\n\n router.toFaction(faction);\n }\n\n function renderCotMG(): React.ReactElement {\n // prettier-ignore\n const symbol = \n {\" `` \"}
      \n {\" -odmmNmds: \"}
      \n {\" `hNmo:..-omNh. \"}
      \n {\" yMd` `hNh \"}
      \n {\" mMd oNm \"}
      \n {\" oMNo .mM/ \"}
      \n {\" `dMN+ -mM+ \"}
      \n {\" -mMNo -mN+ \"}
      \n {\" .+- :mMNo/mN/ \"}
      \n {\":yNMd. :NMNNN/ \"}
      \n {\"-mMMMh. /NMMh` \"}
      \n {\" .dMMMd. /NMMMy` \"}
      \n {\" `yMMMd. /NNyNMMh` \"}
      \n {\" `sMMMd. +Nm: +NMMh. \"}
      \n {\" oMMMm- oNm: /NMMd. \"}
      \n {\" +NMMmsMm- :mMMd. \"}
      \n {\" /NMMMm- -mMMd. \"}
      \n {\" /MMMm- -mMMd. \"}
      \n {\" `sMNMMm- .mMmo \"}
      \n {\" `sMd:hMMm. ./. \"}
      \n {\" `yMy` `yNMd` \"}
      \n {\" `hMs` oMMy \"}
      \n {\" `hMh sMN- \"}
      \n {\" /MM- .NMo \"}
      \n {\" +MM: :MM+ \"}
      \n {\" sNNo-.`.-omNy` \"}
      \n {\" -smNNNNmdo- \"}
      \n {\" `..` \"}
      \n if (player.hasAugmentation(AugmentationNames.StaneksGift3, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: ..can ...you hear them too ...? Come now, don't be shy and let me get a closer\n look at you. Yes wonderful, I see my creation has taken root without consquence or much ill effect it\n seems. Curious, Just how much of a machine's soul do you house in that body?\n \n \n {symbol}\n \n );\n }\n if (player.hasAugmentation(AugmentationNames.StaneksGift2, true)) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: I see you've taken to my creation. So much so it could hardly be recognized as\n one of my own after your tinkering with it. I see you follow the ways of the Machine God as I do, and your\n mastery of the gift clearly demonstrates that. My hopes are climbing by the day for you.\n \n \n {symbol}\n \n );\n }\n if (player.factions.includes(FactionNames.ChurchOfTheMachineGod)) {\n return (\n <>\n \n Allison \"Mother\" Stanek: Welcome back my child!\n \n {symbol}\n \n );\n }\n\n if (!player.canAccessCotMG()) {\n return (\n <>\n \n A decrepit altar stands in the middle of a dilapidated church.\n
      \n
      A symbol is carved in the altar.\n
      \n
      \n {symbol}\n \n );\n }\n\n if (\n player.augmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0 ||\n player.queuedAugmentations.filter((a) => a.name !== AugmentationNames.NeuroFluxGovernor).length > 0\n ) {\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Begone you filth! My gift must be the first modification that your body should\n have!\n \n \n \n );\n }\n\n return (\n <>\n \n \n Allison \"Mother\" Stanek: Welcome child, I see your body is pure. Are you ready to ascend beyond our human\n form? If you are, accept my gift.\n \n \n \n {symbol}\n \n );\n }\n\n function renderGlitch(): React.ReactElement {\n return (\n <>\n \n \n \n \n );\n }\n\n switch (props.loc.name) {\n case LocationName.NewTokyoVitaLife: {\n return renderGrafting();\n }\n case LocationName.Sector12CityHall: {\n return ;\n }\n case LocationName.Sector12NSA: {\n return renderBladeburner();\n }\n case LocationName.NewTokyoNoodleBar: {\n return renderNoodleBar();\n }\n case LocationName.ChongqingChurchOfTheMachineGod: {\n return renderCotMG();\n }\n case LocationName.IshimaGlitch: {\n return renderGlitch();\n }\n case LocationName.NewTokyoArcade: {\n return ;\n }\n default:\n console.error(`Location ${props.loc.name} doesn't have any special properties`);\n return <>;\n }\n}\n","import React, { useState } from \"react\";\n\nimport { Money } from \"../../ui/React/Money\";\nimport { Modal } from \"../../ui/React/Modal\";\nimport { use } from \"../../ui/Context\";\nimport Typography from \"@mui/material/Typography\";\nimport Button from \"@mui/material/Button\";\nimport TextField from \"@mui/material/TextField\";\n\ninterface IProps {\n open: boolean;\n onClose: () => void;\n}\n\nexport function CreateCorporationModal(props: IProps): React.ReactElement {\n const player = use.Player();\n const router = use.Router();\n const canSelfFund = player.canAfford(150e9);\n if (!player.canAccessCorporation() || player.hasCorporation()) {\n props.onClose();\n return <>;\n }\n\n const [name, setName] = useState(\"\");\n function onChange(event: React.ChangeEvent): void {\n setName(event.target.value);\n }\n\n function selfFund(): void {\n if (!canSelfFund) {\n return;\n }\n\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name);\n player.loseMoney(150e9, \"corporation\");\n\n props.onClose();\n router.toCorporation();\n }\n\n function seed(): void {\n if (name == \"\") {\n return;\n }\n\n player.startCorporation(name, 500e6);\n\n props.onClose();\n router.toCorporation();\n }\n\n return (\n \n \n Would you like to start a corporation? This will require $150b for registration and initial funding. {player.bitNodeN === 3 && (`This $150b\n can either be self-funded, or you can obtain the seed money from the government in exchange for 500 million\n shares`)}\n
      \n
      \n If you would like to start one, please enter a name for your corporation below:\n
      \n \n {player.bitNodeN === 3 && (\n \n )}\n \n
      \n );\n}\n","const n00dlePower =\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(\" +\n \"!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]\" +\n \"+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+\" +\n \"[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[\" +\n \"])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!\" +\n \"+[]]+([][[]]+[])[+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()[+!+\" +\n \"[]+[!+[]+!+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[\" +\n \"])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+\" +\n \"(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+\" +\n \"[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+\" +\n \"!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]\" +\n \"]]+![]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]\" +\n \"]()[+!+[]+[+[]]])()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[\" +\n \"+[]]]+(!![]+[])[+!+[]]]((![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(\" +\n \"![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[]\" +\n \")[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])+[])[+!+[]]+[+!+[]]+[+!+[]]+[!+[]+!+[]+!+[]+!+\" +\n \"[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!\" +\n \"![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(\" +\n \"![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[\" +\n \"])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+\" +\n \"[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[\" +\n \"])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[]\" +\n \")[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[\" +\n \"]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(+[![]]+[\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[\" +\n \"]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[]\" +\n \")[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(+(!+[]+!+[]+[+!+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!\" +\n \"+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]\" +\n \"]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]\" +\n \"]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+(\" +\n \"[][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[\" +\n \"+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+\" +\n \"[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[\" +\n \"]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+\" +\n \"(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[]\" +\n \")[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]]\" +\n \"(!+[]+!+[]+!+[]+[+!+[]])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]])()([][(![]+[])[+[]]+(!\" +\n \"[]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[(![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]]\" +\n \"((+((+(+!+[]+[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+[!+[]+!+[]]+[+[]])+[])[+!+[]]+[+[\" +\n \"]+[+[]]+[+[]]+[+[]]+[+[]]+[+[]]+[+!+[]]])+[])[!+[]+!+[]]+[+!+[]])+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]])()())[!+[]+!+[]+!+[]+[+[]]]+(+[]+[][(\" +\n \"[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+\" +\n \"[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!!\" +\n \"[]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]\" +\n \"]])[+!+[]+[+[]]]+(+[]+[][(!![]+[])[!+[]+!+[]+!+[]]+([][[]]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]\" +\n \"+[])[!+[]+!+[]+!+[]]]()[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!\" +\n \"![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]\" +\n \"+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]\" +\n \"+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+\" +\n \"[]+[+[]]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]\" +\n \"+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+!+[]]+([\" +\n \"![]]+[][[]])[+!+[]+[+[]]]+([][[]]+[])[!+[]+!+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[\" +\n \"])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+(+[![]]+[+(+!+[]+(\" +\n \"!+[]+[])[!+[]+!+[]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(!![]+[][(![]\" +\n \"+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][\" +\n \"[]]+[])[+[]]+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]])[+!+[]+[+!+[]]]+(!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]+(+[![]]+[+(+!+[]+(!+[]+[])[!+[]+!+[\" +\n \"]+!+[]]+[+!+[]]+[+[]]+[+[]]+[+[]])])[+!+[]+[+[]]]+(+[![]]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+!+[]]]+([][[]]+[])[!+[]+\" +\n \"!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(![]+[])[+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]\" +\n \"+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(+(!+[]\" +\n \"+!+[]+[+[]]))[(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])\" +\n \"[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+\" +\n \"[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(\" +\n \"![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+\" +\n \"[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([\" +\n \"][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[\" +\n \"]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!\" +\n \"+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]\" +\n \"]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]\" +\n \"+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]\" +\n \"]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(!\" +\n \"[]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!\" +\n \"![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]]\" +\n \")+(+[![]]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[\" +\n \"+!+[]+[+!+[]]]+(!![]+[])[+[]]+(+(+!+[]+[+[]]+[+!+[]]))[(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[]+[])[([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![\" +\n \"]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![\" +\n \"]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[]\" +\n \")[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[\" +\n \"])[+!+[]]][([][[]]+[])[+!+[]]+(![]+[])[+!+[]]+((+[])[([][(![]+[])[+[]]+(![]+[])[\" +\n \"!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+\" +\n \"[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[\" +\n \"+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!\" +\n \"+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[]\" +\n \")[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]+[])[+!+[]+[+!+[]]]+(!![\" +\n \"]+[])[!+[]+!+[]+!+[]]]](!+[]+!+[]+[+!+[]])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(!\" +\n \"[]+[])[!+[]+!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!!\" +\n \"[]+[])[+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]\" +\n \"]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]\" +\n \"]+(!![]+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![\" +\n \"]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"!![]+[])[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[\" +\n \"]]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]\" +\n \"+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+\" +\n \"[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])\" +\n \"[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]\" +\n \"+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+\" +\n \"[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!\" +\n \"+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])\" +\n \"[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[\" +\n \"])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]\" +\n \"+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+\" +\n \"[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]()\" +\n \"+[])[!+[]+!+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[\" +\n \"+[]]][([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[\" +\n \"!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]\" +\n \"+[])[+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+\" +\n \"[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]\" +\n \"+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[]\" +\n \")[+!+[]]]((!![]+[])[+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+([][[]]+[])[\" +\n \"+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+!+[]]+(![]+[+[]])[([![]]+[][[]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+\" +\n \"([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!\" +\n \"+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]]+![]+(![]+[+[]])[([![]]+[][[]]\" +\n \")[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+([![]]+[][[]])\" +\n \"[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[\" +\n \"]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]])()[([][(![]+[])\" +\n \"[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!\" +\n \"![]+[][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+\" +\n \"[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[\" +\n \"]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+\" +\n \"[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[\" +\n \"]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[+[\" +\n \"]])[([![]]+[][[]])[+!+[]+[+[]]]+(!![]+[])[+[]]+(![]+[])[+!+[]]+(![]+[])[!+[]+!+[\" +\n \"]]+([![]]+[][[]])[+!+[]+[+[]]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!\" +\n \"+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(![]+[])[!+[]+!+[]+!+[]]]()[+!+[]+[+[]]\" +\n \"])+[])[+!+[]]+[!+[]+!+[]+!+[]+!+[]]+[!+[]+!+[]]+([]+[])[(![]+[])[+[]]+(!![]+[][(\" +\n \"![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(\" +\n \"[][[]]+[])[+!+[]]+(!![]+[])[+[]]+([][(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[\" +\n \"+!+[]]+(!![]+[])[+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+(![]+[])[!+[]+\" +\n \"!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[]\" +\n \"[(![]+[])[+[]]+(![]+[])[!+[]+!+[]]+(![]+[])[+!+[]]+(!![]+[])[+[]]])[+!+[]+[+[]]]\" +\n \"+(!![]+[])[+!+[]]]()[+!+[]+[!+[]+!+[]]])()\";\n\nexport function N00dles(): void {\n // TODO: Too powerful, needs a nerf.\n eval(n00dlePower);\n}\n","import React, { useState } from \"react\";\nimport { BBCabinetRoot } from \"./BBCabinet\";\n\nimport Button from \"@mui/material/Button\";\nimport { use } from \"../../ui/Context\";\nimport { AlertEvents } from \"../../ui/React/AlertManager\";\n\nenum Page {\n None,\n Megabyteburner2000,\n}\n\nexport function ArcadeRoot(): React.ReactElement {\n const player = use.Player();\n const [page, setPage] = useState(Page.None);\n\n function mbBurner2000(): void {\n if (player.sourceFileLvl(1) === 0) {\n AlertEvents.emit(\"This machine is broken.\");\n } else {\n setPage(Page.Megabyteburner2000);\n }\n }\n\n if (page === Page.None) {\n return (\n <>\n \n \n );\n }\n let currentGame = <>;\n switch (page) {\n case Page.Megabyteburner2000:\n currentGame = ;\n }\n return (\n <>\n \n {currentGame}\n \n );\n}\n","import React, { useEffect } from \"react\";\nimport Typography from \"@mui/material/Typography\";\nimport { use } from \"../../ui/Context\";\nimport { Exploit } from \"../../Exploits/Exploit\";\n\nconst metaBB = \"https://bitburner-official.github.io/bitburner-legacy/\";\n\nconst style = {\n width: \"1060px\",\n height: \"800px\",\n border: \"0px\",\n} as any;\n\nexport function BBCabinetRoot(): React.ReactElement {\n const player = use.Player();\n useEffect(() => {\n window.addEventListener(\"message\", function (this: Window, ev: MessageEvent) {\n if (ev.isTrusted && ev.origin == \"https://bitburner-official.github.io\" && ev.data) {\n player.giveExploit(Exploit.TrueRecursion);\n }\n });\n });\n // prettier-ignore\n const joystick =\n <>\n \n ,'\" \"', .-. \n / \\ ( ) \n | | .-. '-' .-. \n \\ / ( ) ( )\n '.___.' '-' .-. '-'\n ||| ( ) \n ||| '-' \n ;\n return (\n <>\n \n \n \n \n );\n}\n","import { INetscriptHelper } from \"./INetscriptHelper\";\nimport { WorkerScript } from \"../Netscript/WorkerScript\";\nimport { IPlayer } from \"../PersonObjects/IPlayer\";\nimport { purchaseAugmentation, joinFaction, getFactionAugmentationsFiltered } from \"../Faction/FactionHelpers\";\nimport { startWorkerScript } from \"../NetscriptWorker\";\nimport { Augmentation } from \"../Augmentation/Augmentation\";\nimport { Augmentations } from \"../Augmentation/Augmentations\";\nimport { augmentationExists, installAugmentations } from \"../Augmentation/AugmentationHelpers\";\nimport { prestigeAugmentation } from \"../Prestige\";\nimport { AugmentationNames } from \"../Augmentation/data/AugmentationNames\";\nimport { killWorkerScript } from \"../Netscript/killWorkerScript\";\nimport { CONSTANTS } from \"../Constants\";\nimport { isString } from \"../utils/helpers/isString\";\nimport { getRamCost } from \"../Netscript/RamCostGenerator\";\nimport { RunningScript } from \"../Script/RunningScript\";\n\nimport {\n AugmentationStats,\n CharacterInfo,\n CrimeStats,\n PlayerSkills,\n Singularity as ISingularity,\n} from \"../ScriptEditor/NetscriptDefinitions\";\n\nimport { findCrime } from \"../Crime/CrimeHelpers\";\nimport { CompanyPosition } from \"../Company/CompanyPosition\";\nimport { CompanyPositions } from \"../Company/CompanyPositions\";\nimport { DarkWebItems } from \"../DarkWeb/DarkWebItems\";\nimport { AllGangs } from \"../Gang/AllGangs\";\nimport { CityName } from \"../Locations/data/CityNames\";\nimport { LocationName } from \"../Locations/data/LocationNames\";\nimport { Router } from \"../ui/GameRoot\";\nimport { SpecialServers } from \"../Server/data/SpecialServers\";\nimport { Page } from \"../ui/Router\";\nimport { Locations } from \"../Locations/Locations\";\nimport { GetServer, AddToAllServers, createUniqueRandomIp } from \"../Server/AllServers\";\nimport { Programs } from \"../Programs/Programs\";\nimport { numeralWrapper } from \"../ui/numeralFormat\";\nimport { BitNodeMultipliers } from \"../BitNode/BitNodeMultipliers\";\nimport { Company } from \"../Company/Company\";\nimport { Companies } from \"../Company/Companies\";\nimport { Factions, factionExists } from \"../Faction/Factions\";\nimport { Faction } from \"../Faction/Faction\";\nimport { netscriptDelay } from \"../NetscriptEvaluator\";\nimport { convertTimeMsToTimeElapsedString } from \"../utils/StringHelperFunctions\";\nimport { getServerOnNetwork, safetlyCreateUniqueServer } from \"../Server/ServerHelpers\";\nimport { Terminal } from \"../Terminal\";\nimport { calculateHackingTime } from \"../Hacking\";\nimport { Server } from \"../Server/Server\";\nimport { netscriptCanHack } from \"../Hacking/netscriptCanHack\";\nimport { FactionInfos } from \"../Faction/FactionInfo\";\n\nexport function NetscriptSingularity(\n player: IPlayer,\n workerScript: WorkerScript,\n helper: INetscriptHelper,\n): ISingularity {\n const getAugmentation = function (func: string, name: string): Augmentation {\n if (!augmentationExists(name)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid augmentation: '${name}'`);\n }\n\n return Augmentations[name];\n };\n\n const getFaction = function (func: string, name: string): Faction {\n if (!factionExists(name)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid faction name: '${name}`);\n }\n\n return Factions[name];\n };\n\n const getCompany = function (func: string, name: string): Company {\n const company = Companies[name];\n if (company == null || !(company instanceof Company)) {\n throw helper.makeRuntimeErrorMsg(func, `Invalid company name: '${name}'`);\n }\n return company;\n };\n\n const runAfterReset = function (cbScript: string | null = null): void {\n //Run a script after reset\n if (!cbScript) return;\n const home = player.getHomeComputer();\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 if (ramUsage > ramAvailable) {\n return; // Not enough RAM\n }\n const runningScriptObj = new RunningScript(script, []); // No args\n runningScriptObj.threads = 1; // Only 1 thread\n startWorkerScript(player, runningScriptObj, home);\n }\n }\n };\n return {\n getOwnedAugmentations: function (_purchased: unknown = false): string[] {\n const purchased = helper.boolean(_purchased);\n helper.updateDynamicRam(\"getOwnedAugmentations\", getRamCost(player, \"getOwnedAugmentations\"));\n helper.checkSingularityAccess(\"getOwnedAugmentations\");\n const res = [];\n for (let i = 0; i < player.augmentations.length; ++i) {\n res.push(player.augmentations[i].name);\n }\n if (purchased) {\n for (let i = 0; i < player.queuedAugmentations.length; ++i) {\n res.push(player.queuedAugmentations[i].name);\n }\n }\n return res;\n },\n getAugmentationsFromFaction: function (_facName: unknown): string[] {\n const facName = helper.string(\"getAugmentationsFromFaction\", \"facName\", _facName);\n helper.updateDynamicRam(\"getAugmentationsFromFaction\", getRamCost(player, \"getAugmentationsFromFaction\"));\n helper.checkSingularityAccess(\"getAugmentationsFromFaction\");\n const faction = getFaction(\"getAugmentationsFromFaction\", facName);\n\n return getFactionAugmentationsFiltered(player, faction);\n },\n getAugmentationCost: function (_augName: unknown): [number, number] {\n const augName = helper.string(\"getAugmentationCost\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationCost\", getRamCost(player, \"getAugmentationCost\"));\n helper.checkSingularityAccess(\"getAugmentationCost\");\n const aug = getAugmentation(\"getAugmentationCost\", augName);\n return [aug.baseRepRequirement, aug.baseCost];\n },\n getAugmentationPrereq: function (_augName: unknown): string[] {\n const augName = helper.string(\"getAugmentationPrereq\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationPrereq\", getRamCost(player, \"getAugmentationPrereq\"));\n helper.checkSingularityAccess(\"getAugmentationPrereq\");\n const aug = getAugmentation(\"getAugmentationPrereq\", augName);\n return aug.prereqs.slice();\n },\n getAugmentationPrice: function (_augName: unknown): number {\n const augName = helper.string(\"getAugmentationPrice\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationPrice\", getRamCost(player, \"getAugmentationPrice\"));\n helper.checkSingularityAccess(\"getAugmentationPrice\");\n const aug = getAugmentation(\"getAugmentationPrice\", augName);\n return aug.baseCost;\n },\n getAugmentationRepReq: function (_augName: unknown): number {\n const augName = helper.string(\"getAugmentationRepReq\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationRepReq\", getRamCost(player, \"getAugmentationRepReq\"));\n helper.checkSingularityAccess(\"getAugmentationRepReq\");\n const aug = getAugmentation(\"getAugmentationRepReq\", augName);\n return aug.baseRepRequirement;\n },\n getAugmentationStats: function (_augName: unknown): AugmentationStats {\n const augName = helper.string(\"getAugmentationStats\", \"augName\", _augName);\n helper.updateDynamicRam(\"getAugmentationStats\", getRamCost(player, \"getAugmentationStats\"));\n helper.checkSingularityAccess(\"getAugmentationStats\");\n const aug = getAugmentation(\"getAugmentationStats\", augName);\n return Object.assign({}, aug.mults);\n },\n purchaseAugmentation: function (_facName: unknown, _augName: unknown): boolean {\n const facName = helper.string(\"purchaseAugmentation\", \"facName\", _facName);\n const augName = helper.string(\"purchaseAugmentation\", \"augName\", _augName);\n helper.updateDynamicRam(\"purchaseAugmentation\", getRamCost(player, \"purchaseAugmentation\"));\n helper.checkSingularityAccess(\"purchaseAugmentation\");\n const fac = getFaction(\"purchaseAugmentation\", facName);\n const aug = getAugmentation(\"purchaseAugmentation\", augName);\n\n const augs = getFactionAugmentationsFiltered(player, fac);\n\n if (!augs.includes(augName)) {\n workerScript.log(\n \"purchaseAugmentation\",\n () => `Faction '${facName}' does not have the '${augName}' augmentation.`,\n );\n return false;\n }\n\n const isNeuroflux = aug.name === AugmentationNames.NeuroFluxGovernor;\n if (!isNeuroflux) {\n for (let j = 0; j < player.queuedAugmentations.length; ++j) {\n if (player.queuedAugmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", () => `You already have the '${augName}' augmentation.`);\n return false;\n }\n }\n for (let j = 0; j < player.augmentations.length; ++j) {\n if (player.augmentations[j].name === aug.name) {\n workerScript.log(\"purchaseAugmentation\", () => `You already have the '${augName}' 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 = purchaseAugmentation(aug, fac, true);\n workerScript.log(\"purchaseAugmentation\", () => res);\n if (isString(res) && res.startsWith(\"You purchased\")) {\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 10);\n return true;\n } else {\n return false;\n }\n },\n softReset: function (_cbScript: unknown): void {\n const cbScript = helper.string(\"softReset\", \"cbScript\", _cbScript);\n helper.updateDynamicRam(\"softReset\", getRamCost(player, \"softReset\"));\n helper.checkSingularityAccess(\"softReset\");\n\n workerScript.log(\"softReset\", () => \"Soft resetting. This will cause this script to be killed\");\n setTimeout(() => {\n prestigeAugmentation();\n runAfterReset(cbScript);\n }, 0);\n\n // Prevent workerScript from \"finishing execution naturally\"\n workerScript.running = false;\n killWorkerScript(workerScript);\n },\n installAugmentations: function (_cbScript: unknown): boolean {\n const cbScript = helper.string(\"installAugmentations\", \"cbScript\", _cbScript);\n helper.updateDynamicRam(\"installAugmentations\", getRamCost(player, \"installAugmentations\"));\n helper.checkSingularityAccess(\"installAugmentations\");\n\n if (player.queuedAugmentations.length === 0) {\n workerScript.log(\"installAugmentations\", () => \"You do not have any Augmentations to be installed.\");\n return false;\n }\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 10);\n workerScript.log(\n \"installAugmentations\",\n () => \"Installing Augmentations. This will cause this script to be killed\",\n );\n setTimeout(() => {\n installAugmentations();\n runAfterReset(cbScript);\n }, 0);\n\n workerScript.running = false; // Prevent workerScript from \"finishing execution naturally\"\n killWorkerScript(workerScript);\n return true;\n },\n\n goToLocation: function (_locationName: unknown): boolean {\n const locationName = helper.string(\"goToLocation\", \"locationName\", _locationName);\n helper.updateDynamicRam(\"goToLocation\", getRamCost(player, \"goToLocation\"));\n helper.checkSingularityAccess(\"goToLocation\");\n const location = Object.values(Locations).find((l) => l.name === locationName);\n if (!location) {\n workerScript.log(\"goToLocation\", () => `No location named ${locationName}`);\n return false;\n }\n if (player.city !== location.city) {\n workerScript.log(\"goToLocation\", () => `No location named ${locationName} in ${player.city}`);\n return false;\n }\n Router.toLocation(location);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50000);\n return true;\n },\n universityCourse: function (_universityName: unknown, _className: unknown, _focus: unknown = true): boolean {\n const universityName = helper.string(\"universityCourse\", \"universityName\", _universityName);\n const className = helper.string(\"universityCourse\", \"className\", _className);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"universityCourse\", getRamCost(player, \"universityCourse\"));\n helper.checkSingularityAccess(\"universityCourse\");\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"universityCourse\", () => txt);\n }\n\n let costMult, expMult;\n switch (universityName.toLowerCase()) {\n case LocationName.AevumSummitUniversity.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"universityCourse\",\n () => `You cannot study at 'Summit University' because you are not in '${CityName.Aevum}'.`,\n );\n return false;\n }\n player.gotoLocation(LocationName.AevumSummitUniversity);\n costMult = 4;\n expMult = 3;\n break;\n case LocationName.Sector12RothmanUniversity.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"universityCourse\",\n () => `You cannot study at 'Rothman University' because you are not in '${CityName.Sector12}'.`,\n );\n return false;\n }\n player.location = LocationName.Sector12RothmanUniversity;\n costMult = 3;\n expMult = 2;\n break;\n case LocationName.VolhavenZBInstituteOfTechnology.toLowerCase():\n if (player.city != CityName.Volhaven) {\n workerScript.log(\n \"universityCourse\",\n () => `You cannot study at 'ZB Institute of Technology' because you are not in '${CityName.Volhaven}'.`,\n );\n return false;\n }\n player.location = LocationName.VolhavenZBInstituteOfTechnology;\n costMult = 5;\n expMult = 4;\n break;\n default:\n workerScript.log(\"universityCourse\", () => `Invalid university name: '${universityName}'.`);\n return false;\n }\n\n let task = \"\";\n switch (className.toLowerCase()) {\n case \"Study Computer Science\".toLowerCase():\n task = CONSTANTS.ClassStudyComputerScience;\n break;\n case \"Data Structures\".toLowerCase():\n task = CONSTANTS.ClassDataStructures;\n break;\n case \"Networks\".toLowerCase():\n task = CONSTANTS.ClassNetworks;\n break;\n case \"Algorithms\".toLowerCase():\n task = CONSTANTS.ClassAlgorithms;\n break;\n case \"Management\".toLowerCase():\n task = CONSTANTS.ClassManagement;\n break;\n case \"Leadership\".toLowerCase():\n task = CONSTANTS.ClassLeadership;\n break;\n default:\n workerScript.log(\"universityCourse\", () => `Invalid class name: ${className}.`);\n return false;\n }\n player.startClass(costMult, expMult, task);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"universityCourse\", () => `Started ${task} at ${universityName}`);\n return true;\n },\n\n gymWorkout: function (_gymName: unknown, _stat: unknown, _focus: unknown = true): boolean {\n const gymName = helper.string(\"gymWorkout\", \"gymName\", _gymName);\n const stat = helper.string(\"gymWorkout\", \"stat\", _stat);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"gymWorkout\", getRamCost(player, \"gymWorkout\"));\n helper.checkSingularityAccess(\"gymWorkout\");\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"gymWorkout\", () => txt);\n }\n let costMult, expMult;\n switch (gymName.toLowerCase()) {\n case LocationName.AevumCrushFitnessGym.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.AevumCrushFitnessGym}' because you are not in '${CityName.Aevum}'.`,\n );\n return false;\n }\n player.location = LocationName.AevumCrushFitnessGym;\n costMult = 3;\n expMult = 2;\n break;\n case LocationName.AevumSnapFitnessGym.toLowerCase():\n if (player.city != CityName.Aevum) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.AevumSnapFitnessGym}' because you are not in '${CityName.Aevum}'.`,\n );\n return false;\n }\n player.location = LocationName.AevumSnapFitnessGym;\n costMult = 10;\n expMult = 5;\n break;\n case LocationName.Sector12IronGym.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.Sector12IronGym}' because you are not in '${CityName.Sector12}'.`,\n );\n return false;\n }\n player.location = LocationName.Sector12IronGym;\n costMult = 1;\n expMult = 1;\n break;\n case LocationName.Sector12PowerhouseGym.toLowerCase():\n if (player.city != CityName.Sector12) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.Sector12PowerhouseGym}' because you are not in '${CityName.Sector12}'.`,\n );\n return false;\n }\n player.location = LocationName.Sector12PowerhouseGym;\n costMult = 20;\n expMult = 10;\n break;\n case LocationName.VolhavenMilleniumFitnessGym.toLowerCase():\n if (player.city != CityName.Volhaven) {\n workerScript.log(\n \"gymWorkout\",\n () =>\n `You cannot workout at '${LocationName.VolhavenMilleniumFitnessGym}' because you are not in '${CityName.Volhaven}'.`,\n );\n return false;\n }\n player.location = LocationName.VolhavenMilleniumFitnessGym;\n costMult = 7;\n expMult = 4;\n break;\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.startClass(costMult, expMult, CONSTANTS.ClassGymStrength);\n break;\n case \"defense\".toLowerCase():\n case \"def\".toLowerCase():\n player.startClass(costMult, expMult, CONSTANTS.ClassGymDefense);\n break;\n case \"dexterity\".toLowerCase():\n case \"dex\".toLowerCase():\n player.startClass(costMult, expMult, CONSTANTS.ClassGymDexterity);\n break;\n case \"agility\".toLowerCase():\n case \"agi\".toLowerCase():\n player.startClass(costMult, expMult, CONSTANTS.ClassGymAgility);\n break;\n default:\n workerScript.log(\"gymWorkout\", () => `Invalid stat: ${stat}.`);\n return false;\n }\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"gymWorkout\", () => `Started training ${stat} at ${gymName}`);\n return true;\n },\n\n travelToCity: function (_cityName: unknown): boolean {\n const cityName = helper.city(\"travelToCity\", \"cityName\", _cityName);\n helper.updateDynamicRam(\"travelToCity\", getRamCost(player, \"travelToCity\"));\n helper.checkSingularityAccess(\"travelToCity\");\n\n switch (cityName) {\n case CityName.Aevum:\n case CityName.Chongqing:\n case CityName.Sector12:\n case CityName.NewTokyo:\n case CityName.Ishima:\n case CityName.Volhaven:\n if (player.money < CONSTANTS.TravelCost) {\n workerScript.log(\"travelToCity\", () => \"Not enough money to travel.\");\n return false;\n }\n player.loseMoney(CONSTANTS.TravelCost, \"other\");\n player.city = cityName;\n workerScript.log(\"travelToCity\", () => `Traveled to ${cityName}`);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 50000);\n return true;\n default:\n throw helper.makeRuntimeErrorMsg(\"travelToCity\", `Invalid city name: '${cityName}'.`);\n }\n },\n\n purchaseTor: function (): boolean {\n helper.updateDynamicRam(\"purchaseTor\", getRamCost(player, \"purchaseTor\"));\n helper.checkSingularityAccess(\"purchaseTor\");\n\n if (player.hasTorRouter()) {\n workerScript.log(\"purchaseTor\", () => \"You already have a TOR router!\");\n return true;\n }\n\n if (player.money < CONSTANTS.TorRouterCost) {\n workerScript.log(\"purchaseTor\", () => \"You cannot afford to purchase a Tor router.\");\n return false;\n }\n player.loseMoney(CONSTANTS.TorRouterCost, \"other\");\n\n const darkweb = safetlyCreateUniqueServer({\n ip: createUniqueRandomIp(),\n hostname: \"darkweb\",\n organizationName: \"\",\n isConnectedTo: false,\n adminRights: false,\n purchasedByPlayer: false,\n maxRam: 1,\n });\n AddToAllServers(darkweb);\n\n player.getHomeComputer().serversOnNetwork.push(darkweb.hostname);\n darkweb.serversOnNetwork.push(player.getHomeComputer().hostname);\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 500);\n workerScript.log(\"purchaseTor\", () => \"You have purchased a Tor router!\");\n return true;\n },\n purchaseProgram: function (_programName: unknown): boolean {\n const programName = helper.string(\"purchaseProgram\", \"programName\", _programName).toLowerCase();\n helper.updateDynamicRam(\"purchaseProgram\", getRamCost(player, \"purchaseProgram\"));\n helper.checkSingularityAccess(\"purchaseProgram\");\n\n if (!player.hasTorRouter()) {\n workerScript.log(\"purchaseProgram\", () => \"You do not have the TOR router.\");\n return false;\n }\n\n const item = Object.values(DarkWebItems).find((i) => i.program.toLowerCase() === programName);\n if (item == null) {\n workerScript.log(\"purchaseProgram\", () => `Invalid program name: '${programName}.`);\n return false;\n }\n\n if (player.money < item.price) {\n workerScript.log(\n \"purchaseProgram\",\n () => `Not enough money to purchase '${item.program}'. Need ${numeralWrapper.formatMoney(item.price)}`,\n );\n return false;\n }\n\n if (player.hasProgram(item.program)) {\n workerScript.log(\"purchaseProgram\", () => `You already have the '${item.program}' program`);\n return true;\n }\n\n player.loseMoney(item.price, \"other\");\n player.getHomeComputer().programs.push(item.program);\n workerScript.log(\n \"purchaseProgram\",\n () => `You have purchased the '${item.program}' program. The new program can be found on your home computer.`,\n );\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain / 5000);\n return true;\n },\n getCurrentServer: function (): string {\n helper.updateDynamicRam(\"getCurrentServer\", getRamCost(player, \"getCurrentServer\"));\n helper.checkSingularityAccess(\"getCurrentServer\");\n return player.getCurrentServer().hostname;\n },\n connect: function (_hostname: unknown): boolean {\n const hostname = helper.string(\"purchaseProgram\", \"hostname\", _hostname);\n helper.updateDynamicRam(\"connect\", getRamCost(player, \"connect\"));\n helper.checkSingularityAccess(\"connect\");\n if (!hostname) {\n throw helper.makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n const target = GetServer(hostname);\n if (target == null) {\n throw helper.makeRuntimeErrorMsg(\"connect\", `Invalid hostname: '${hostname}'`);\n }\n\n if (hostname === \"home\") {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = player.getHomeComputer().hostname;\n player.getCurrentServer().isConnectedTo = true;\n Terminal.setcwd(\"/\");\n return true;\n }\n\n const server = player.getCurrentServer();\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = getServerOnNetwork(server, i);\n if (other === null) continue;\n if (other.hostname == hostname) {\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = target.hostname;\n player.getCurrentServer().isConnectedTo = true;\n Terminal.setcwd(\"/\");\n return true;\n }\n }\n\n return false;\n },\n manualHack: function (): Promise {\n helper.updateDynamicRam(\"manualHack\", getRamCost(player, \"manualHack\"));\n helper.checkSingularityAccess(\"manualHack\");\n const server = player.getCurrentServer();\n return helper.hack(server.hostname, true);\n },\n installBackdoor: function (): Promise {\n helper.updateDynamicRam(\"installBackdoor\", getRamCost(player, \"installBackdoor\"));\n helper.checkSingularityAccess(\"installBackdoor\");\n const baseserver = player.getCurrentServer();\n if (!(baseserver instanceof Server)) {\n workerScript.log(\"installBackdoor\", () => \"cannot backdoor this kind of server\");\n return Promise.resolve();\n }\n const server = baseserver as Server;\n const installTime = (calculateHackingTime(server, player) / 4) * 1000;\n\n // No root access or skill level too low\n const canHack = netscriptCanHack(server, player);\n if (!canHack.res) {\n throw helper.makeRuntimeErrorMsg(\"installBackdoor\", canHack.msg || \"\");\n }\n\n workerScript.log(\n \"installBackdoor\",\n () => `Installing backdoor on '${server.hostname}' in ${convertTimeMsToTimeElapsedString(installTime, true)}`,\n );\n\n return netscriptDelay(installTime, workerScript).then(function () {\n workerScript.log(\"installBackdoor\", () => `Successfully installed backdoor on '${server.hostname}'`);\n\n server.backdoorInstalled = true;\n\n if (SpecialServers.WorldDaemon === server.hostname) {\n Router.toBitVerse(false, false);\n }\n return Promise.resolve();\n });\n },\n isFocused: function (): boolean {\n helper.updateDynamicRam(\"isFocused\", getRamCost(player, \"isFocused\"));\n helper.checkSingularityAccess(\"isFocused\");\n return player.focus;\n },\n setFocus: function (_focus: unknown): boolean {\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"setFocus\", getRamCost(player, \"setFocus\"));\n helper.checkSingularityAccess(\"setFocus\");\n if (!player.isWorking) {\n throw helper.makeRuntimeErrorMsg(\"setFocus\", \"Not currently working\");\n }\n if (\n !(\n player.workType == CONSTANTS.WorkTypeFaction ||\n player.workType == CONSTANTS.WorkTypeCompany ||\n player.workType == CONSTANTS.WorkTypeCompanyPartTime ||\n player.workType == CONSTANTS.WorkTypeCreateProgram ||\n player.workType == CONSTANTS.WorkTypeStudyClass\n )\n ) {\n throw helper.makeRuntimeErrorMsg(\"setFocus\", \"Cannot change focus for current job\");\n }\n if (!player.focus && focus) {\n player.startFocusing();\n Router.toWork();\n return true;\n } else if (player.focus && !focus) {\n player.stopFocusing();\n Router.toTerminal();\n return true;\n }\n return false;\n },\n getStats: function (): PlayerSkills {\n helper.updateDynamicRam(\"getStats\", getRamCost(player, \"getStats\"));\n helper.checkSingularityAccess(\"getStats\");\n workerScript.log(\"getStats\", () => `getStats is deprecated, please use getplayer`);\n\n return {\n hacking: player.hacking,\n strength: player.strength,\n defense: player.defense,\n dexterity: player.dexterity,\n agility: player.agility,\n charisma: player.charisma,\n intelligence: player.intelligence,\n };\n },\n getCharacterInformation: function (): CharacterInfo {\n helper.updateDynamicRam(\"getCharacterInformation\", getRamCost(player, \"getCharacterInformation\"));\n helper.checkSingularityAccess(\"getCharacterInformation\");\n workerScript.log(\"getCharacterInformation\", () => `getCharacterInformation is deprecated, please use getplayer`);\n\n return {\n bitnode: player.bitNodeN,\n city: player.city,\n factions: player.factions.slice(),\n hp: player.hp,\n jobs: Object.keys(player.jobs),\n jobTitles: Object.values(player.jobs),\n maxHp: player.max_hp,\n mult: {\n agility: player.agility_mult,\n agilityExp: player.agility_exp_mult,\n charisma: player.charisma,\n charismaExp: player.charisma_exp,\n companyRep: player.company_rep_mult,\n crimeMoney: player.crime_money_mult,\n crimeSuccess: player.crime_success_mult,\n defense: player.defense_mult,\n defenseExp: player.defense_exp_mult,\n dexterity: player.dexterity_mult,\n dexterityExp: player.dexterity_exp_mult,\n factionRep: player.faction_rep_mult,\n hacking: player.hacking_mult,\n hackingExp: player.hacking_exp_mult,\n strength: player.strength_mult,\n strengthExp: player.strength_exp_mult,\n workMoney: player.work_money_mult,\n },\n timeWorked: player.timeWorked,\n tor: player.hasTorRouter(),\n workHackExpGain: player.workHackExpGained,\n workStrExpGain: player.workStrExpGained,\n workDefExpGain: player.workDefExpGained,\n workDexExpGain: player.workDexExpGained,\n workAgiExpGain: player.workAgiExpGained,\n workChaExpGain: player.workChaExpGained,\n workRepGain: player.workRepGained,\n workMoneyGain: player.workMoneyGained,\n hackingExp: player.hacking_exp,\n strengthExp: player.strength_exp,\n defenseExp: player.defense_exp,\n dexterityExp: player.dexterity_exp,\n agilityExp: player.agility_exp,\n charismaExp: player.charisma_exp,\n };\n },\n hospitalize: function (): void {\n helper.updateDynamicRam(\"hospitalize\", getRamCost(player, \"hospitalize\"));\n helper.checkSingularityAccess(\"hospitalize\");\n if (player.isWorking || Router.page() === Page.Infiltration || Router.page() === Page.BitVerse) {\n workerScript.log(\"hospitalize\", () => \"Cannot go to the hospital because the player is busy.\");\n return;\n }\n player.hospitalize();\n },\n isBusy: function (): boolean {\n helper.updateDynamicRam(\"isBusy\", getRamCost(player, \"isBusy\"));\n helper.checkSingularityAccess(\"isBusy\");\n return player.isWorking || Router.page() === Page.Infiltration || Router.page() === Page.BitVerse;\n },\n stopAction: function (): boolean {\n helper.updateDynamicRam(\"stopAction\", getRamCost(player, \"stopAction\"));\n helper.checkSingularityAccess(\"stopAction\");\n if (player.isWorking) {\n if (player.focus) {\n player.stopFocusing();\n Router.toTerminal();\n }\n const txt = player.singularityStopWork();\n workerScript.log(\"stopAction\", () => txt);\n return true;\n }\n return false;\n },\n upgradeHomeCores: function (): boolean {\n helper.updateDynamicRam(\"upgradeHomeCores\", getRamCost(player, \"upgradeHomeCores\"));\n helper.checkSingularityAccess(\"upgradeHomeCores\");\n\n // Check if we're at max cores\n const homeComputer = player.getHomeComputer();\n if (homeComputer.cpuCores >= 8) {\n workerScript.log(\"upgradeHomeCores\", () => `Your home computer is at max cores.`);\n return false;\n }\n\n const cost = player.getUpgradeHomeCoresCost();\n if (player.money < cost) {\n workerScript.log(\n \"upgradeHomeCores\",\n () => `You don't have enough money. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return false;\n }\n\n homeComputer.cpuCores += 1;\n player.loseMoney(cost, \"servers\");\n\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 2);\n workerScript.log(\n \"upgradeHomeCores\",\n () => `Purchased an additional core for home computer! It now has ${homeComputer.cpuCores} cores.`,\n );\n return true;\n },\n getUpgradeHomeCoresCost: function (): number {\n helper.updateDynamicRam(\"getUpgradeHomeCoresCost\", getRamCost(player, \"getUpgradeHomeCoresCost\"));\n helper.checkSingularityAccess(\"getUpgradeHomeCoresCost\");\n\n return player.getUpgradeHomeCoresCost();\n },\n upgradeHomeRam: function (): boolean {\n helper.updateDynamicRam(\"upgradeHomeRam\", getRamCost(player, \"upgradeHomeRam\"));\n helper.checkSingularityAccess(\"upgradeHomeRam\");\n\n // Check if we're at max RAM\n const homeComputer = player.getHomeComputer();\n if (homeComputer.maxRam >= CONSTANTS.HomeComputerMaxRam) {\n workerScript.log(\"upgradeHomeRam\", () => `Your home computer is at max RAM.`);\n return false;\n }\n\n const cost = player.getUpgradeHomeRamCost();\n if (player.money < cost) {\n workerScript.log(\n \"upgradeHomeRam\",\n () => `You don't have enough money. Need ${numeralWrapper.formatMoney(cost)}`,\n );\n return false;\n }\n\n homeComputer.maxRam *= 2;\n player.loseMoney(cost, \"servers\");\n\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 2);\n workerScript.log(\n \"upgradeHomeRam\",\n () =>\n `Purchased additional RAM for home computer! It now has ${numeralWrapper.formatRAM(\n homeComputer.maxRam,\n )} of RAM.`,\n );\n return true;\n },\n getUpgradeHomeRamCost: function (): number {\n helper.updateDynamicRam(\"getUpgradeHomeRamCost\", getRamCost(player, \"getUpgradeHomeRamCost\"));\n helper.checkSingularityAccess(\"getUpgradeHomeRamCost\");\n\n return player.getUpgradeHomeRamCost();\n },\n workForCompany: function (_companyName: unknown, _focus: unknown = true): boolean {\n let companyName = helper.string(\"workForCompany\", \"companyName\", _companyName);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"workForCompany\", getRamCost(player, \"workForCompany\"));\n helper.checkSingularityAccess(\"workForCompany\");\n\n // Sanitize input\n if (companyName == null) {\n companyName = player.companyName;\n }\n\n // Make sure its a valid company\n if (companyName == null || companyName === \"\" || !(Companies[companyName] instanceof Company)) {\n workerScript.log(\"workForCompany\", () => `Invalid company: '${companyName}'`);\n return false;\n }\n\n // Make sure player is actually employed at the comapny\n if (!Object.keys(player.jobs).includes(companyName)) {\n workerScript.log(\"workForCompany\", () => `You do not have a job at '${companyName}'`);\n return false;\n }\n\n // Check to make sure company position data is valid\n const companyPositionName = player.jobs[companyName];\n const companyPosition = CompanyPositions[companyPositionName];\n if (companyPositionName === \"\" || !(companyPosition instanceof CompanyPosition)) {\n workerScript.log(\"workForCompany\", () => \"You do not have a job\");\n return false;\n }\n\n const wasFocused = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"workForCompany\", () => txt);\n }\n\n if (companyPosition.isPartTimeJob()) {\n player.startWorkPartTime(companyName);\n } else {\n player.startWork(companyName);\n }\n\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocused) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\n \"workForCompany\",\n () => `Began working at '${player.companyName}' as a '${companyPositionName}'`,\n );\n return true;\n },\n applyToCompany: function (_companyName: unknown, _field: unknown): boolean {\n const companyName = helper.string(\"applyToCompany\", \"companyName\", _companyName);\n const field = helper.string(\"applyToCompany\", \"field\", _field);\n helper.updateDynamicRam(\"applyToCompany\", getRamCost(player, \"applyToCompany\"));\n helper.checkSingularityAccess(\"applyToCompany\");\n getCompany(\"applyToCompany\", companyName);\n\n player.location = companyName as LocationName;\n let res;\n switch (field.toLowerCase()) {\n case \"software\":\n res = player.applyForSoftwareJob(true);\n break;\n case \"software consultant\":\n res = player.applyForSoftwareConsultantJob(true);\n break;\n case \"it\":\n res = player.applyForItJob(true);\n break;\n case \"security engineer\":\n res = player.applyForSecurityEngineerJob(true);\n break;\n case \"network engineer\":\n res = player.applyForNetworkEngineerJob(true);\n break;\n case \"business\":\n res = player.applyForBusinessJob(true);\n break;\n case \"business consultant\":\n res = player.applyForBusinessConsultantJob(true);\n break;\n case \"security\":\n res = player.applyForSecurityJob(true);\n break;\n case \"agent\":\n res = player.applyForAgentJob(true);\n break;\n case \"employee\":\n res = player.applyForEmployeeJob(true);\n break;\n case \"part-time employee\":\n res = player.applyForPartTimeEmployeeJob(true);\n break;\n case \"waiter\":\n res = player.applyForWaiterJob(true);\n break;\n case \"part-time waiter\":\n res = player.applyForPartTimeWaiterJob(true);\n break;\n default:\n workerScript.log(\"applyToCompany\", () => `Invalid job: '${field}'.`);\n return false;\n }\n // TODO https://github.com/danielyxie/bitburner/issues/1378\n // The player object's applyForJob function can return string with special error messages\n // if (isString(res)) {\n // workerScript.log(\"applyToCompany\",()=> res);\n // return false;\n // }\n if (res) {\n workerScript.log(\n \"applyToCompany\",\n () => `You were offered a new job at '${companyName}' as a '${player.jobs[companyName]}'`,\n );\n } else {\n workerScript.log(\n \"applyToCompany\",\n () => `You failed to get a new job/promotion at '${companyName}' in the '${field}' field.`,\n );\n }\n return res;\n },\n getCompanyRep: function (_companyName: unknown): number {\n const companyName = helper.string(\"getCompanyRep\", \"companyName\", _companyName);\n helper.updateDynamicRam(\"getCompanyRep\", getRamCost(player, \"getCompanyRep\"));\n helper.checkSingularityAccess(\"getCompanyRep\");\n const company = getCompany(\"getCompanyRep\", companyName);\n return company.playerReputation;\n },\n getCompanyFavor: function (_companyName: unknown): number {\n const companyName = helper.string(\"getCompanyFavor\", \"companyName\", _companyName);\n helper.updateDynamicRam(\"getCompanyFavor\", getRamCost(player, \"getCompanyFavor\"));\n helper.checkSingularityAccess(\"getCompanyFavor\");\n const company = getCompany(\"getCompanyFavor\", companyName);\n return company.favor;\n },\n getCompanyFavorGain: function (_companyName: unknown): number {\n const companyName = helper.string(\"getCompanyFavorGain\", \"companyName\", _companyName);\n helper.updateDynamicRam(\"getCompanyFavorGain\", getRamCost(player, \"getCompanyFavorGain\"));\n helper.checkSingularityAccess(\"getCompanyFavorGain\");\n const company = getCompany(\"getCompanyFavorGain\", companyName);\n return company.getFavorGain();\n },\n checkFactionInvitations: function (): string[] {\n helper.updateDynamicRam(\"checkFactionInvitations\", getRamCost(player, \"checkFactionInvitations\"));\n helper.checkSingularityAccess(\"checkFactionInvitations\");\n // Make a copy of player.factionInvitations\n return player.factionInvitations.slice();\n },\n joinFaction: function (_facName: unknown): boolean {\n const facName = helper.string(\"joinFaction\", \"facName\", _facName);\n helper.updateDynamicRam(\"joinFaction\", getRamCost(player, \"joinFaction\"));\n helper.checkSingularityAccess(\"joinFaction\");\n getFaction(\"joinFaction\", facName);\n\n if (!player.factionInvitations.includes(facName)) {\n workerScript.log(\"joinFaction\", () => `You have not been invited by faction '${facName}'`);\n return false;\n }\n const fac = Factions[facName];\n joinFaction(fac);\n\n // Update Faction Invitation list to account for joined + banned factions\n for (let i = 0; i < player.factionInvitations.length; ++i) {\n if (player.factionInvitations[i] == facName || Factions[player.factionInvitations[i]].isBanned) {\n player.factionInvitations.splice(i, 1);\n i--;\n }\n }\n player.gainIntelligenceExp(CONSTANTS.IntelligenceSingFnBaseExpGain * 5);\n workerScript.log(\"joinFaction\", () => `Joined the '${facName}' faction.`);\n return true;\n },\n workForFaction: function (_facName: unknown, _type: unknown, _focus: unknown = true): boolean {\n const facName = helper.string(\"workForFaction\", \"facName\", _facName);\n const type = helper.string(\"workForFaction\", \"type\", _type);\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"workForFaction\", getRamCost(player, \"workForFaction\"));\n helper.checkSingularityAccess(\"workForFaction\");\n getFaction(\"workForFaction\", facName);\n\n // if the player is in a gang and the target faction is any of the gang faction, fail\n if (player.inGang() && AllGangs[facName] !== undefined) {\n workerScript.log(\"workForFaction\", () => `Faction '${facName}' does not offer work at the moment.`);\n return false;\n }\n\n if (!player.factions.includes(facName)) {\n workerScript.log(\"workForFaction\", () => `You are not a member of '${facName}'`);\n return false;\n }\n\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"workForFaction\", () => txt);\n }\n\n const fac = Factions[facName];\n // Arrays listing factions that allow each time of work\n\n switch (type.toLowerCase()) {\n case \"hacking\":\n case \"hacking contracts\":\n case \"hackingcontracts\":\n if (!FactionInfos[fac.name].offerHackingWork) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with hacking contracts.`);\n return false;\n }\n player.startFactionHackWork(fac);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"workForFaction\", () => `Started carrying out hacking contracts for '${fac.name}'`);\n return true;\n case \"field\":\n case \"fieldwork\":\n case \"field work\":\n if (!FactionInfos[fac.name].offerFieldWork) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with field missions.`);\n return false;\n }\n player.startFactionFieldWork(fac);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"workForFaction\", () => `Started carrying out field missions for '${fac.name}'`);\n return true;\n case \"security\":\n case \"securitywork\":\n case \"security work\":\n if (!FactionInfos[fac.name].offerSecurityWork) {\n workerScript.log(\"workForFaction\", () => `Faction '${fac.name}' do not need help with security work.`);\n return false;\n }\n player.startFactionSecurityWork(fac);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"workForFaction\", () => `Started carrying out security work for '${fac.name}'`);\n return true;\n default:\n workerScript.log(\"workForFaction\", () => `Invalid work type: '${type}`);\n }\n return true;\n },\n getFactionRep: function (_facName: unknown): number {\n const facName = helper.string(\"getFactionRep\", \"facName\", _facName);\n helper.updateDynamicRam(\"getFactionRep\", getRamCost(player, \"getFactionRep\"));\n helper.checkSingularityAccess(\"getFactionRep\");\n const faction = getFaction(\"getFactionRep\", facName);\n return faction.playerReputation;\n },\n getFactionFavor: function (_facName: unknown): number {\n const facName = helper.string(\"getFactionRep\", \"facName\", _facName);\n helper.updateDynamicRam(\"getFactionFavor\", getRamCost(player, \"getFactionFavor\"));\n helper.checkSingularityAccess(\"getFactionFavor\");\n const faction = getFaction(\"getFactionFavor\", facName);\n return faction.favor;\n },\n getFactionFavorGain: function (_facName: unknown): number {\n const facName = helper.string(\"getFactionFavorGain\", \"facName\", _facName);\n helper.updateDynamicRam(\"getFactionFavorGain\", getRamCost(player, \"getFactionFavorGain\"));\n helper.checkSingularityAccess(\"getFactionFavorGain\");\n const faction = getFaction(\"getFactionFavorGain\", facName);\n return faction.getFavorGain();\n },\n donateToFaction: function (_facName: unknown, _amt: unknown): boolean {\n const facName = helper.string(\"donateToFaction\", \"facName\", _facName);\n const amt = helper.number(\"donateToFaction\", \"amt\", _amt);\n helper.updateDynamicRam(\"donateToFaction\", getRamCost(player, \"donateToFaction\"));\n helper.checkSingularityAccess(\"donateToFaction\");\n const faction = getFaction(\"donateToFaction\", facName);\n if (!player.factions.includes(faction.name)) {\n workerScript.log(\"donateToFaction\", () => `You can't donate to '${facName}' because you aren't a member`);\n return false;\n }\n if (player.inGang() && faction.name === player.getGangFaction().name) {\n workerScript.log(\n \"donateToFaction\",\n () => `You can't donate to '${facName}' because youre managing a gang for it`,\n );\n return false;\n }\n if (typeof amt !== \"number\" || amt <= 0 || isNaN(amt)) {\n workerScript.log(\"donateToFaction\", () => `Invalid donation amount: '${amt}'.`);\n return false;\n }\n if (player.money < amt) {\n workerScript.log(\n \"donateToFaction\",\n () => `You do not have enough money to donate ${numeralWrapper.formatMoney(amt)} to '${facName}'`,\n );\n return false;\n }\n const repNeededToDonate = Math.floor(CONSTANTS.BaseFavorToDonate * BitNodeMultipliers.RepToDonateToFaction);\n if (faction.favor < repNeededToDonate) {\n workerScript.log(\n \"donateToFaction\",\n () =>\n `You do not have enough favor to donate to this faction. Have ${faction.favor}, need ${repNeededToDonate}`,\n );\n return false;\n }\n const repGain = (amt / CONSTANTS.DonateMoneyToRepDivisor) * player.faction_rep_mult;\n faction.playerReputation += repGain;\n player.loseMoney(amt, \"other\");\n workerScript.log(\n \"donateToFaction\",\n () =>\n `${numeralWrapper.formatMoney(amt)} donated to '${facName}' for ${numeralWrapper.formatReputation(\n repGain,\n )} reputation`,\n );\n return true;\n },\n createProgram: function (_programName: unknown, _focus: unknown = true): boolean {\n const programName = helper.string(\"createProgram\", \"programName\", _programName).toLowerCase();\n const focus = helper.boolean(_focus);\n helper.updateDynamicRam(\"createProgram\", getRamCost(player, \"createProgram\"));\n helper.checkSingularityAccess(\"createProgram\");\n\n const wasFocusing = player.focus;\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"createProgram\", () => txt);\n }\n\n const p = Object.values(Programs).find((p) => p.name.toLowerCase() === programName);\n\n if (p == null) {\n workerScript.log(\"createProgram\", () => `The specified program does not exist: '${programName}`);\n return false;\n }\n\n if (player.hasProgram(p.name)) {\n workerScript.log(\"createProgram\", () => `You already have the '${p.name}' program`);\n return false;\n }\n\n const create = p.create;\n if (create === null) {\n workerScript.log(\"createProgram\", () => `You cannot create the '${p.name}' program`);\n return false;\n }\n\n if (!create.req(player)) {\n workerScript.log(\n \"createProgram\",\n () => `Hacking level is too low to create '${p.name}' (level ${create.level} req)`,\n );\n return false;\n }\n\n player.startCreateProgramWork(p.name, create.time, create.level);\n if (focus) {\n player.startFocusing();\n Router.toWork();\n } else if (wasFocusing) {\n player.stopFocusing();\n Router.toTerminal();\n }\n workerScript.log(\"createProgram\", () => `Began creating program: '${programName}'`);\n return true;\n },\n commitCrime: function (_crimeRoughName: unknown): number {\n const crimeRoughName = helper.string(\"commitCrime\", \"crimeRoughName\", _crimeRoughName);\n helper.updateDynamicRam(\"commitCrime\", getRamCost(player, \"commitCrime\"));\n helper.checkSingularityAccess(\"commitCrime\");\n\n if (player.isWorking) {\n const txt = player.singularityStopWork();\n workerScript.log(\"commitCrime\", () => txt);\n }\n\n // Set Location to slums\n player.gotoLocation(LocationName.Slums);\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n // couldn't find crime\n throw helper.makeRuntimeErrorMsg(\"commitCrime\", `Invalid crime: '${crimeRoughName}'`);\n }\n workerScript.log(\"commitCrime\", () => `Attempting to commit ${crime.name}...`);\n return crime.commit(Router, player, 1, workerScript);\n },\n getCrimeChance: function (_crimeRoughName: unknown): number {\n const crimeRoughName = helper.string(\"getCrimeChance\", \"crimeRoughName\", _crimeRoughName);\n helper.updateDynamicRam(\"getCrimeChance\", getRamCost(player, \"getCrimeChance\"));\n helper.checkSingularityAccess(\"getCrimeChance\");\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw helper.makeRuntimeErrorMsg(\"getCrimeChance\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return crime.successRate(player);\n },\n getCrimeStats: function (_crimeRoughName: unknown): CrimeStats {\n const crimeRoughName = helper.string(\"getCrimeStats\", \"crimeRoughName\", _crimeRoughName);\n helper.updateDynamicRam(\"getCrimeStats\", getRamCost(player, \"getCrimeStats\"));\n helper.checkSingularityAccess(\"getCrimeStats\");\n\n const crime = findCrime(crimeRoughName.toLowerCase());\n if (crime == null) {\n throw helper.makeRuntimeErrorMsg(\"getCrimeStats\", `Invalid crime: ${crimeRoughName}`);\n }\n\n return Object.assign({}, crime);\n },\n getDarkwebPrograms: function (): string[] {\n helper.updateDynamicRam(\"getDarkwebPrograms\", getRamCost(player, \"getDarkwebPrograms\"));\n helper.checkSingularityAccess(\"getDarkwebPrograms\");\n\n // If we don't have Tor, log it and return [] (empty list)\n if (!player.hasTorRouter()) {\n workerScript.log(\"getDarkwebPrograms\", () => \"You do not have the TOR router.\");\n return [];\n }\n return Object.values(DarkWebItems).map((p) => p.program);\n },\n getDarkwebProgramCost: function (_programName: unknown): number {\n const programName = helper.string(\"getDarkwebProgramCost\", \"programName\", _programName).toLowerCase();\n helper.updateDynamicRam(\"getDarkwebProgramCost\", getRamCost(player, \"getDarkwebProgramCost\"));\n helper.checkSingularityAccess(\"getDarkwebProgramCost\");\n\n // If we don't have Tor, log it and return -1\n if (!player.hasTorRouter()) {\n workerScript.log(\"getDarkwebProgramCost\", () => \"You do not have the TOR router.\");\n // returning -1 rather than throwing an error to be consistent with purchaseProgram\n // which returns false if tor has\n return -1;\n }\n\n const item = Object.values(DarkWebItems).find((i) => i.program.toLowerCase() === programName);\n\n // If the program doesn't exist, throw an error. The reasoning here is that the 99% case is that\n // the player will be using this in automation scripts, and if they're asking for a program that\n // doesn't exist, it's the first time they've run the script. So throw an error to let them know\n // that they need to fix it.\n if (item == null) {\n throw helper.makeRuntimeErrorMsg(\n \"getDarkwebProgramCost\",\n `No such exploit ('${programName}') found on the darkweb! ` +\n `\\nThis function is not case-sensitive. Did you perhaps forget .exe at the end?`,\n );\n }\n\n if (player.hasProgram(item.program)) {\n workerScript.log(\"getDarkwebProgramCost\", () => `You already have the '${item.program}' program`);\n return 0;\n }\n return item.price;\n },\n };\n}\n","import { Settings } from \"./Settings/Settings\";\n\nexport interface IPort {\n write: (value: any) => any;\n tryWrite: (value: any) => boolean;\n read: () => any;\n peek: () => any;\n full: () => boolean;\n empty: () => boolean;\n clear: () => void;\n}\n\nexport function NetscriptPort(): IPort {\n const data: any[] = [];\n\n return {\n write: (value: any): any => {\n data.push(value);\n if (data.length > Settings.MaxPortCapacity) {\n return data.shift();\n }\n return null;\n },\n\n tryWrite: (value: any): boolean => {\n if (data.length >= Settings.MaxPortCapacity) {\n return false;\n }\n data.push(value);\n return true;\n },\n\n read: (): any => {\n if (data.length === 0) {\n return \"NULL PORT DATA\";\n }\n return data.shift();\n },\n\n peek: (): any => {\n if (data.length === 0) {\n return \"NULL PORT DATA\";\n } else {\n const foo = data.slice();\n return foo[0];\n }\n },\n\n full: (): boolean => {\n return data.length == Settings.MaxPortCapacity;\n },\n\n empty: (): boolean => {\n return data.length === 0;\n },\n\n clear: (): void => {\n data.length = 0;\n },\n };\n}\n","/**\n * Clears defined properties from an object.\n * Does not delete up the prototype chain.\n * @deprecated Look into using `Map` or `Set` rather than manipulating properties on an Object.\n * @param obj the object to clear all properties\n */\n// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\nexport function clearObject(obj: any): void {\n for (const key in obj) {\n if (obj.hasOwnProperty(key)) {\n // tslint:disable-next-line:no-dynamic-delete\n delete obj[key];\n }\n }\n}\n","import { PlayerOwnedSourceFile } from \"./PlayerOwnedSourceFile\";\nimport { SourceFiles } from \"./SourceFiles\";\n\nimport { Player } from \"../Player\";\n\nexport function applySourceFile(srcFile: PlayerOwnedSourceFile): void {\n const srcFileKey = \"SourceFile\" + srcFile.n;\n const sourceFileObject = SourceFiles[srcFileKey];\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 // The Source Genesis\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 16 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n Player.hacking_chance_mult *= incMult;\n Player.hacking_speed_mult *= incMult;\n Player.hacking_money_mult *= incMult;\n Player.hacking_grow_mult *= incMult;\n Player.hacking_mult *= incMult;\n Player.strength_mult *= incMult;\n Player.defense_mult *= incMult;\n Player.dexterity_mult *= incMult;\n Player.agility_mult *= incMult;\n Player.charisma_mult *= incMult;\n Player.hacking_exp_mult *= incMult;\n Player.strength_exp_mult *= incMult;\n Player.defense_exp_mult *= incMult;\n Player.dexterity_exp_mult *= incMult;\n Player.agility_exp_mult *= incMult;\n Player.charisma_exp_mult *= incMult;\n Player.company_rep_mult *= incMult;\n Player.faction_rep_mult *= incMult;\n Player.crime_money_mult *= incMult;\n Player.crime_success_mult *= incMult;\n Player.hacknet_node_money_mult *= incMult;\n Player.hacknet_node_purchase_cost_mult *= decMult;\n Player.hacknet_node_ram_cost_mult *= decMult;\n Player.hacknet_node_core_cost_mult *= decMult;\n Player.hacknet_node_level_cost_mult *= decMult;\n Player.work_money_mult *= incMult;\n break;\n }\n case 2: {\n // Rise of the Underworld\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 24 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.crime_money_mult *= incMult;\n Player.crime_success_mult *= incMult;\n Player.charisma_mult *= incMult;\n break;\n }\n case 3: {\n // Corporatocracy\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.charisma_mult *= incMult;\n Player.work_money_mult *= incMult;\n break;\n }\n case 4: {\n // The Singularity\n // No effects, just gives access to Singularity functions\n break;\n }\n case 5: {\n // Artificial Intelligence\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.hacking_chance_mult *= incMult;\n Player.hacking_speed_mult *= incMult;\n Player.hacking_money_mult *= incMult;\n Player.hacking_grow_mult *= incMult;\n Player.hacking_mult *= incMult;\n Player.hacking_exp_mult *= incMult;\n break;\n }\n case 6: {\n // Bladeburner\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.strength_exp_mult *= incMult;\n Player.defense_exp_mult *= incMult;\n Player.dexterity_exp_mult *= incMult;\n Player.agility_exp_mult *= incMult;\n Player.strength_mult *= incMult;\n Player.defense_mult *= incMult;\n Player.dexterity_mult *= incMult;\n Player.agility_mult *= incMult;\n break;\n }\n case 7: {\n // Bladeburner 2079\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.bladeburner_max_stamina_mult *= incMult;\n Player.bladeburner_stamina_gain_mult *= incMult;\n Player.bladeburner_analysis_mult *= incMult;\n Player.bladeburner_success_chance_mult *= incMult;\n break;\n }\n case 8: {\n // Ghost of Wall Street\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 12 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.hacking_grow_mult *= incMult;\n break;\n }\n case 9: {\n // Hacktocracy\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 8 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n const decMult = 1 - mult / 100;\n Player.hacknet_node_core_cost_mult *= decMult;\n Player.hacknet_node_level_cost_mult *= decMult;\n Player.hacknet_node_money_mult *= incMult;\n Player.hacknet_node_purchase_cost_mult *= decMult;\n Player.hacknet_node_ram_cost_mult *= decMult;\n break;\n }\n case 10: {\n // Digital Carbon\n // No effects, just grants sleeves\n break;\n }\n case 11: {\n // The Big Crash\n let mult = 0;\n for (let i = 0; i < srcFile.lvl; ++i) {\n mult += 32 / Math.pow(2, i);\n }\n const incMult = 1 + mult / 100;\n Player.work_money_mult *= incMult;\n Player.company_rep_mult *= incMult;\n break;\n }\n case 12: // The Recursion\n // Grants neuroflux.\n break;\n case 13: // They're Lunatics\n // Grants more space on Stanek's Gift.\n break;\n default:\n console.error(`Invalid source file number: ${srcFile.n}`);\n break;\n }\n\n sourceFileObject.owned = true;\n}\n","import { Player } from \"../Player\";\nimport { sanitizeExploits } from \"./Exploit\";\n\nexport function applyExploit(): void {\n if (Player.exploits && Player.exploits.length === 0) {\n return;\n }\n Player.exploits = sanitizeExploits(Player.exploits);\n const inc = Math.pow(1.001, Player.exploits.length);\n const dec = Math.pow(0.999, Player.exploits.length);\n\n Player.hacking_chance_mult *= inc;\n Player.hacking_speed_mult *= inc;\n Player.hacking_money_mult *= inc;\n Player.hacking_grow_mult *= inc;\n Player.hacking_mult *= inc;\n\n Player.strength_mult *= inc;\n Player.defense_mult *= inc;\n Player.dexterity_mult *= inc;\n Player.agility_mult *= inc;\n Player.charisma_mult *= inc;\n\n Player.hacking_exp_mult *= inc;\n Player.strength_exp_mult *= inc;\n Player.defense_exp_mult *= inc;\n Player.dexterity_exp_mult *= inc;\n Player.agility_exp_mult *= inc;\n Player.charisma_exp_mult *= inc;\n\n Player.company_rep_mult *= inc;\n Player.faction_rep_mult *= inc;\n\n Player.crime_money_mult *= inc;\n Player.crime_success_mult *= inc;\n\n Player.hacknet_node_money_mult *= inc;\n Player.hacknet_node_purchase_cost_mult *= dec;\n Player.hacknet_node_ram_cost_mult *= dec;\n Player.hacknet_node_core_cost_mult *= dec;\n Player.hacknet_node_level_cost_mult *= dec;\n\n Player.work_money_mult *= inc;\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { parseAliasDeclaration, printAliases } from \"../../Alias\";\n\nexport function alias(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n printAliases();\n return;\n }\n if (args.length === 1) {\n if (parseAliasDeclaration(args[0] + \"\")) {\n terminal.print(`Set alias ${args[0]}`);\n return;\n }\n }\n if (args.length === 2) {\n if (args[0] === \"-g\") {\n if (parseAliasDeclaration(args[1] + \"\", true)) {\n terminal.print(`Set global alias ${args[1]}`);\n return;\n }\n }\n }\n terminal.error('Incorrect usage of alias command. Usage: alias [-g] [aliasname=\"value\"]');\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function analyze(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of analyze command. Usage: analyze\");\n return;\n }\n terminal.startAnalyze(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\nimport { HacknetServer } from \"../../Hacknet/HacknetServer\";\n\nexport function backdoor(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of backdoor command. Usage: backdoor\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\"Can only backdoor normal servers\");\n }\n\n const normalServer = server as Server;\n\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot use backdoor on your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n } else if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot backdoor\");\n } else if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to use backdoor on this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n } else if (normalServer instanceof HacknetServer) {\n terminal.error(\"Cannot use backdoor on this type of Server\");\n } else {\n terminal.startBackdoor(player);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { listAllDarkwebItems, buyAllDarkwebItems, buyDarkwebItem } from \"../../DarkWeb/DarkWeb\";\nimport { SpecialServers } from \"../../Server/data/SpecialServers\";\nimport { GetServer } from \"../../Server/AllServers\";\n\nexport function buy(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (!GetServer(SpecialServers.DarkWeb)) {\n terminal.error(\n \"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 );\n return;\n }\n if (args.length != 1) {\n terminal.print(\"Incorrect number of arguments. Usage: \");\n terminal.print(\"buy -l\");\n terminal.print(\"buy -a\");\n terminal.print(\"buy [item name]\");\n return;\n }\n const arg = args[0] + \"\";\n if (arg == \"-l\" || arg == \"-1\" || arg == \"--list\") {\n listAllDarkwebItems();\n } else if (arg == \"-a\" || arg == \"--all\") {\n buyAllDarkwebItems();\n } else {\n buyDarkwebItem(arg);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { showMessage } from \"../../Message/MessageHelpers\";\nimport { showLiterature } from \"../../Literature/LiteratureHelpers\";\nimport { dialogBoxCreate } from \"../../ui/React/DialogBox\";\n\nexport function cat(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of cat command. Usage: cat [file]\");\n return;\n }\n const relative_filename = args[0] + \"\";\n const filename = terminal.getFilepath(relative_filename);\n if (!filename.endsWith(\".msg\") && !filename.endsWith(\".lit\") && !filename.endsWith(\".txt\") && !filename.endsWith(\".script\") && !filename.endsWith(\".js\") && !filename.endsWith(\".ns\")) {\n terminal.error(\n \"Only .msg, .txt, .lit, .script, .js, and .ns files are viewable with cat (filename must end with .msg, .txt, .lit, .script, .js, or .ns)\",\n );\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.endsWith(\".msg\")) throw new Error(\".lit file should not be a .msg\");\n showLiterature(file);\n return;\n } else if (filename.endsWith(\".msg\")) {\n const file = server.messages[i];\n if (file !== filename) continue;\n showMessage(file);\n return;\n }\n }\n } else if (filename.endsWith(\".txt\")) {\n const txt = terminal.getTextFile(player, relative_filename);\n if (txt != null) {\n txt.show();\n return;\n }\n } else if (filename.endsWith(\".script\") || filename.endsWith(\".js\") || filename.endsWith(\".ns\")) {\n const script = terminal.getScript(player, relative_filename);\n if (script != null) {\n dialogBoxCreate(`${script.filename}

      ${script.code}`);\n return;\n }\n }\n\n terminal.error(`No such file ${filename}`);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport { evaluateDirectoryPath, removeTrailingSlash } from \"../DirectoryHelpers\";\n\nexport function cd(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length > 1) {\n terminal.error(\"Incorrect number of arguments. Usage: cd [dir]\");\n } else {\n let dir = args.length === 1 ? args[0] + \"\" : \"/\";\n\n let evaledDir: string | null = \"\";\n if (dir === \"/\") {\n evaledDir = \"/\";\n } else {\n // Ignore trailing slashes\n dir = removeTrailingSlash(dir);\n\n evaledDir = evaluateDirectoryPath(dir, terminal.cwd());\n if (evaledDir === null || evaledDir === \"\") {\n terminal.error(\"Invalid path. Failed to change directories\");\n return;\n }\n\n const server = player.getCurrentServer();\n if (\n !server.scripts.some((script) => script.filename.startsWith(evaledDir + \"\")) &&\n !server.textFiles.some((file) => file.fn.startsWith(evaledDir + \"\"))\n ) {\n terminal.error(\"Invalid path. Failed to change directories\");\n return;\n }\n }\n\n terminal.setcwd(evaledDir);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport { isScriptFilename, validScriptExtensions } from \"../../Script/isScriptFilename\";\n\nexport function check(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length < 1) {\n terminal.error(`Incorrect number of arguments. Usage: check [script] [arg1] [arg2]...`);\n } else {\n const scriptName = terminal.getFilepath(args[0] + \"\");\n // Can only tail script files\n if (!isScriptFilename(scriptName)) {\n terminal.error(\n `'check' can only be called on scripts files (filename must end with ${validScriptExtensions.join(\", \")})`,\n );\n return;\n }\n\n // Check that the script is running on this machine\n const runningScript = findRunningScript(scriptName, args.slice(1), server);\n if (runningScript == null) {\n terminal.error(`No script named ${scriptName} is running on the server`);\n return;\n }\n runningScript.displayLog();\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { getServerOnNetwork } from \"../../Server/ServerHelpers\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { Server } from \"../../Server/Server\";\n\nexport function connect(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n // Disconnect from current server in terminal and connect to new one\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of connect command. Usage: connect [hostname]\");\n return;\n }\n\n const hostname = args[0] + \"\";\n\n for (let i = 0; i < server.serversOnNetwork.length; i++) {\n const other = getServerOnNetwork(server, i);\n if (other === null) throw new Error(`Server on network should not be null`);\n if (other.hostname == hostname) {\n terminal.connectToServer(player, hostname);\n return;\n }\n }\n\n const other = GetServer(hostname);\n if (other !== null) {\n if (other instanceof Server && other.backdoorInstalled) {\n terminal.connectToServer(player, hostname);\n return;\n }\n terminal.error(`Cannot directly connect to ${hostname}. Make sure the server is backdoored or adjacent to your current Server`);\n } else {\n terminal.error(\"Host not found\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { getDestinationFilepath, areFilesEqual } from \"../DirectoryHelpers\";\n\nexport function cp(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of cp command. Usage: cp [src] [dst]\");\n return;\n }\n // Convert a relative path source file to the absolute path.\n const src = terminal.getFilepath(args[0] + \"\");\n if (src === null) {\n terminal.error(\"src cannot be a directory\");\n return;\n }\n\n // Get the destination based on the source file and the current directory\n const t_dst = getDestinationFilepath(args[1] + \"\", src, terminal.cwd());\n if (t_dst === null) {\n terminal.error(\"error parsing dst file\");\n return;\n }\n\n // Convert a relative path destination file to the absolute path.\n const dst = terminal.getFilepath(t_dst);\n if (areFilesEqual(src, dst)) {\n terminal.error(\"src and dst cannot be the same\");\n return;\n }\n const srcExt = src.slice(src.lastIndexOf(\".\"));\n const dstExt = dst.slice(dst.lastIndexOf(\".\"));\n if (srcExt !== dstExt) {\n terminal.error(\"src and dst must have the same extension.\");\n return;\n }\n if (!isScriptFilename(src) && !src.endsWith(\".txt\")) {\n terminal.error(\"cp only works for scripts and .txt files\");\n return;\n }\n\n // Scp for txt files\n if (src.endsWith(\".txt\")) {\n let txtFile = null;\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (areFilesEqual(server.textFiles[i].fn, src)) {\n txtFile = server.textFiles[i];\n break;\n }\n }\n\n if (txtFile === null) {\n return terminal.error(\"No such file exists!\");\n }\n\n const tRes = server.writeToTextFile(dst, txtFile.text);\n if (!tRes.success) {\n terminal.error(\"cp failed\");\n return;\n }\n if (tRes.overwritten) {\n terminal.print(`WARNING: ${dst} already exists and will be overwriten`);\n terminal.print(`${dst} overwritten`);\n return;\n }\n terminal.print(`${dst} copied`);\n return;\n }\n\n // Get the current script\n let sourceScript = null;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (areFilesEqual(server.scripts[i].filename, src)) {\n sourceScript = server.scripts[i];\n break;\n }\n }\n if (sourceScript == null) {\n terminal.error(\"cp failed. No such script exists\");\n return;\n }\n\n const sRes = server.writeToScriptFile(player, dst, sourceScript.code);\n if (!sRes.success) {\n terminal.error(`cp failed`);\n return;\n }\n if (sRes.overwritten) {\n terminal.print(`WARNING: ${dst} already exists and will be overwritten`);\n terminal.print(`${dst} overwritten`);\n return;\n }\n terminal.print(`${dst} copied`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function expr(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n terminal.error(\"Incorrect usage of expr command. Usage: expr [math expression]\");\n return;\n }\n const expr = args.join(\"\");\n\n // Sanitize the math expression\n const sanitizedExpr = expr.replace(/s+/g, \"\").replace(/[^-()\\d/*+.%]/g, \"\");\n let result;\n try {\n result = eval(sanitizedExpr);\n } catch (e) {\n terminal.error(`Could not evaluate expression: ${sanitizedExpr}`);\n return;\n }\n terminal.print(result);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nexport function free(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of free command. Usage: free\");\n return;\n }\n const ram = numeralWrapper.formatRAM(player.getCurrentServer().maxRam);\n const used = numeralWrapper.formatRAM(player.getCurrentServer().ramUsed);\n const avail = numeralWrapper.formatRAM(player.getCurrentServer().maxRam - player.getCurrentServer().ramUsed);\n const maxLength = Math.max(ram.length, Math.max(used.length, avail.length));\n const usedPercent = numeralWrapper.formatPercentage(\n player.getCurrentServer().ramUsed / player.getCurrentServer().maxRam,\n );\n\n terminal.print(`Total: ${\" \".repeat(maxLength - ram.length)}${ram}`);\n terminal.print(`Used: ${\" \".repeat(maxLength - used.length)}${used} (${usedPercent})`);\n terminal.print(`Available: ${\" \".repeat(maxLength - avail.length)}${avail}`);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\n\nexport function grow(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of grow command. Usage: grow\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\n \"Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n }\n const normalServer = server as Server;\n // Hack the current PC (usually for money)\n // You can't grow your home pc or servers you purchased\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot grow your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n return;\n }\n if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot grow\");\n return;\n }\n if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n return;\n }\n terminal.startGrow(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\n\nexport function hack(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of hack command. Usage: hack\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\n \"Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n }\n const normalServer = server as Server;\n // Hack the current PC (usually for money)\n // You can't hack your home pc or servers you purchased\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot hack your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n return;\n }\n if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot hack\");\n return;\n }\n if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n return;\n }\n terminal.startHack(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { TerminalHelpText, HelpTexts } from \"../HelpText\";\n\nexport function help(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0 && args.length !== 1) {\n terminal.error(\"Incorrect usage of help command. Usage: help\");\n return;\n }\n if (args.length === 0) {\n TerminalHelpText.forEach((line) => terminal.print(line));\n } else {\n const cmd = args[0] + \"\";\n const txt = HelpTexts[cmd];\n if (txt == null) {\n terminal.error(\"No help topics match '\" + cmd + \"'\");\n return;\n }\n txt.forEach((t) => terminal.print(t));\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function history(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n terminal.commandHistory.forEach((command, index) => {\n terminal.print(`${index.toString().padStart(2)} ${command}`);\n });\n return;\n }\n const arg = args[0] + \"\";\n if (arg === \"-c\" || arg === \"--clear\") {\n player.terminalCommandHistory = [];\n terminal.commandHistory = [];\n terminal.commandHistoryIndex = 1;\n } else {\n terminal.error(\"Incorrect usage of history command. usage: history [-c]\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function home(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of home command. Usage: home\");\n return;\n }\n player.getCurrentServer().isConnectedTo = false;\n player.currentServer = player.getHomeComputer().hostname;\n player.getCurrentServer().isConnectedTo = true;\n terminal.print(\"Connected to home\");\n terminal.setcwd(\"/\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function hostname(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of hostname command. Usage: hostname\");\n return;\n }\n terminal.print(player.getCurrentServer().hostname);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\n\nexport function kill(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length < 1) {\n terminal.error(\"Incorrect usage of kill command. Usage: kill [scriptname] [arg1] [arg2]...\");\n return;\n }\n if (typeof args[0] === \"boolean\") {\n return;\n }\n\n // Kill by PID\n if (typeof args[0] === \"number\") {\n const pid = args[0];\n const res = killWorkerScript(pid);\n if (res) {\n terminal.print(`Killing script with PID ${pid}`);\n } else {\n terminal.error(`Failed to kill script with PID ${pid}. No such script is running`);\n }\n\n return;\n }\n\n const scriptName = terminal.getFilepath(args[0]);\n const runningScript = server.getRunningScript(scriptName, args.slice(1));\n if (runningScript == null) {\n terminal.error(\"No such script is running. Nothing to kill\");\n return;\n }\n killWorkerScript(runningScript, server.hostname, false);\n terminal.print(`Killing ${scriptName}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { killWorkerScript } from \"../../Netscript/killWorkerScript\";\nimport { WorkerScriptStartStopEventEmitter } from \"../../Netscript/WorkerScriptStartStopEventEmitter\";\n\nexport function killall(terminal: ITerminal, router: IRouter, player: IPlayer, server: BaseServer): void {\n for (let i = server.runningScripts.length - 1; i >= 0; --i) {\n killWorkerScript(server.runningScripts[i], server.hostname, false);\n }\n WorkerScriptStartStopEventEmitter.emit();\n terminal.print(\"Killing all running scripts\");\n}\n","import { Theme } from \"@mui/material/styles\";\nimport createStyles from \"@mui/styles/createStyles\";\nimport makeStyles from \"@mui/styles/makeStyles\";\nimport { toString } from \"lodash\";\nimport React from \"react\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { evaluateDirectoryPath, getFirstParentDirectory, isValidDirectoryPath } from \"../DirectoryHelpers\";\nimport { IRouter } from \"../../ui/Router\";\nimport { ITerminal } from \"../ITerminal\";\nimport * as libarg from \"arg\"\n\nexport function ls(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n let flags;\n try {\n flags = libarg({\n '-l': Boolean,\n '--grep': String,\n '-g': '--grep',\n },\n { argv: args }\n )\n } catch (e) {\n // catch passing only -g / --grep with no string to use as the search\n incorrectUsage()\n return;\n }\n const filter = flags['--grep']\n\n const numArgs = args.length;\n function incorrectUsage(): void {\n terminal.error(\"Incorrect usage of ls command. Usage: ls [dir] [-l] [-g, --grep pattern]\");\n }\n\n if (numArgs > 4) {\n return incorrectUsage();\n }\n\n // Directory path\n let prefix = terminal.cwd();\n if (!prefix.endsWith(\"/\")) {\n prefix += \"/\";\n }\n\n // If first arg doesn't contain a - it must be the file/folder\n const dir = (args[0] && typeof args[0] == \"string\" && !args[0].startsWith(\"-\")) ? args[0] : \"\"\n const newPath = evaluateDirectoryPath(dir + \"\", terminal.cwd());\n prefix = newPath || \"\";\n if (!prefix.endsWith(\"/\")) {\n prefix += \"/\";\n }\n if (!isValidDirectoryPath(prefix)) {\n return incorrectUsage();\n }\n\n // Root directory, which is the same as no 'prefix' at all\n if (prefix === \"/\") {\n prefix = \"\";\n }\n\n // Display all programs and scripts\n const allPrograms: string[] = [];\n const allScripts: string[] = [];\n const allTextFiles: string[] = [];\n const allContracts: string[] = [];\n const allMessages: string[] = [];\n const folders: string[] = [];\n\n function handleFn(fn: string, dest: string[]): void {\n let parsedFn = fn;\n if (prefix) {\n if (!fn.startsWith(prefix)) {\n return;\n } else {\n parsedFn = fn.slice(prefix.length, fn.length);\n }\n }\n\n if (filter && !parsedFn.includes(filter)) {\n return;\n }\n\n // If the fn includes a forward slash, it must be in a subdirectory.\n // Therefore, we only list the \"first\" directory in its path\n if (parsedFn.includes(\"/\")) {\n const firstParentDir = getFirstParentDirectory(parsedFn);\n if (filter && !firstParentDir.includes(filter)) {\n return;\n }\n\n if (!folders.includes(firstParentDir)) {\n folders.push(firstParentDir);\n }\n\n return;\n }\n\n dest.push(parsedFn);\n }\n\n // Get all of the programs and scripts on the machine into one temporary array\n const s = player.getCurrentServer();\n for (const program of s.programs) handleFn(program, allPrograms);\n for (const script of s.scripts) handleFn(script.filename, allScripts);\n for (const txt of s.textFiles) handleFn(txt.fn, allTextFiles);\n for (const contract of s.contracts) handleFn(contract.fn, allContracts);\n for (const msgOrLit of s.messages) handleFn(msgOrLit, allMessages);\n\n // Sort the files/folders alphabetically then print each\n allPrograms.sort();\n allScripts.sort();\n allTextFiles.sort();\n allContracts.sort();\n allMessages.sort();\n folders.sort();\n\n interface ClickableScriptRowProps {\n row: string;\n prefix: string;\n hostname: string;\n }\n\n function ClickableScriptRow({ row, prefix, hostname }: ClickableScriptRowProps): React.ReactElement {\n const classes = makeStyles((theme: Theme) =>\n createStyles({\n scriptLinksWrap: {\n display: \"inline-flex\",\n color: theme.palette.warning.main,\n },\n scriptLink: {\n cursor: \"pointer\",\n textDecorationLine: \"underline\",\n paddingRight: \"1.15em\",\n \"&:last-child\": { padding: 0 },\n },\n }),\n )();\n\n const rowSplit = row.split(\"~\");\n let rowSplitArray = rowSplit.map((x) => [x.trim(), x.replace(x.trim(), \"\")]);\n rowSplitArray = rowSplitArray.filter((x) => !!x[0]);\n\n function onScriptLinkClick(filename: string): void {\n if (player.getCurrentServer().hostname !== hostname) {\n return terminal.error(`File is not on this server, connect to ${hostname} and try again`);\n }\n if (filename.startsWith(\"/\")) filename = filename.slice(1);\n const filepath = terminal.getFilepath(`${prefix}${filename}`);\n const code = toString(terminal.getScript(player, filepath)?.code);\n router.toScriptEditor({ [filepath]: code });\n }\n\n return (\n \n {rowSplitArray.map((rowItem) => (\n \n onScriptLinkClick(rowItem[0])}>\n {rowItem[0]}\n \n \n {rowItem[1]}\n \n \n ))}\n \n );\n }\n\n function postSegments(segments: string[], flags: any, style?: any, linked?: boolean): void {\n const maxLength = Math.max(...segments.map((s) => s.length)) + 1;\n const filesPerRow = flags[\"-l\"] === true ? 1 : Math.ceil(80 / maxLength);\n for (let i = 0; i < segments.length; i++) {\n let row = \"\";\n for (let col = 0; col < filesPerRow; col++) {\n if (!(i < segments.length)) break;\n row += segments[i];\n row += \" \".repeat(maxLength * (col + 1) - row.length);\n if(linked) {\n row += \"~\";\n }\n i++;\n }\n i--;\n if (!style) {\n terminal.print(row);\n } else if (linked) {\n terminal.printRaw();\n } else {\n terminal.printRaw({row});\n }\n }\n }\n\n const groups = [\n { segments: folders, style: { color: \"cyan\" } },\n { segments: allMessages },\n { segments: allTextFiles },\n { segments: allPrograms },\n { segments: allContracts },\n { segments: allScripts, style: { color: \"yellow\", fontStyle: \"bold\" }, linked: true },\n ].filter((g) => g.segments.length > 0);\n for (let i = 0; i < groups.length; i++) {\n postSegments(groups[i].segments, flags, groups[i].style, groups[i].linked);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\n\nexport function lscpu(terminal: ITerminal, router: IRouter, player: IPlayer): void {\n terminal.print(player.getCurrentServer().cpuCores + \" Core(s)\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\nimport { Settings } from \"../../Settings/Settings\";\n\nexport function mem(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 1 && args.length !== 3) {\n terminal.error(\"Incorrect usage of mem command. usage: mem [scriptname] [-t] [number threads]\");\n return;\n }\n\n const scriptName = args[0] + \"\";\n let numThreads = 1;\n if (args.length === 3 && args[1] === \"-t\") {\n numThreads = Math.round(parseInt(args[2] + \"\"));\n if (isNaN(numThreads) || numThreads < 1) {\n terminal.error(\"Invalid number of threads specified. Number of threads must be greater than 1\");\n return;\n }\n }\n\n const script = terminal.getScript(player, scriptName);\n if (script == null) {\n terminal.error(\"mem failed. No such script exists!\");\n return;\n }\n\n const ramUsage = script.ramUsage * numThreads;\n\n terminal.print(\n `This script requires ${numeralWrapper.formatRAM(ramUsage)} of RAM to run for ${numThreads} thread(s)`,\n );\n\n const verboseEntries = script.ramUsageEntries?.sort((a, b) => b.cost - a.cost) ?? [];\n const padding = Settings.UseIEC60027_2 ? 9 : 8;\n for (const entry of verboseEntries) {\n terminal.print(`${numeralWrapper.formatRAM(entry.cost * numThreads).padStart(padding)} | ${entry.name} (${entry.type})`);\n }\n\n if (ramUsage > 0 && verboseEntries.length === 0) {\n // Let's warn the user that he might need to save his script again to generate the detailed entries\n terminal.warn('You might have to open & save this script to see the detailed RAM usage information.');\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { TextFile } from \"../../TextFile\";\nimport { Script } from \"../../Script/Script\";\nimport { getDestinationFilepath, areFilesEqual } from \"../DirectoryHelpers\";\n\nexport function mv(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\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 t_dest = args[1] + \"\";\n\n if (!isScriptFilename(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 if (srcFile == null) {\n terminal.error(`Source file ${source} does not exist`);\n return;\n }\n\n const sourcePath = terminal.getFilepath(source);\n // Get the destination based on the source file and the current directory\n const dest = getDestinationFilepath(t_dest, source, terminal.cwd());\n if (dest === null) {\n terminal.error(\"error parsing dst file\");\n return;\n }\n\n const destFile = terminal.getFile(player, dest);\n const destPath = terminal.getFilepath(dest);\n if (areFilesEqual(sourcePath, destPath)) {\n terminal.error(`Source and destination files are the same file`);\n return;\n }\n\n // 'mv' command only works on scripts and txt files.\n // Also, you can't convert between different file types\n if (isScriptFilename(source)) {\n const script = srcFile as Script;\n if (!isScriptFilename(destPath)) {\n terminal.error(`Source and destination files must have the same type`);\n return;\n }\n\n // Command doesnt work if script is running\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 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) {\n const textFile = srcFile as TextFile;\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 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","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport {commonEditor} from './common/editor';\n\nexport function nano(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n return commonEditor('nano', {terminal, router, player, server, args});\n}\n","interface Position {\n row: number;\n column: number;\n}\n\nclass PositionTracker {\n positions: Map;\n\n constructor() {\n this.positions = new Map();\n }\n\n saveCursor(filename: string, pos: Position): void {\n this.positions.set(filename, pos);\n }\n\n getCursor(filename: string): Position {\n const position = this.positions.get(filename);\n if (!position) {\n return {\n row: -1,\n column: -1,\n };\n }\n return position;\n }\n}\n\nexport const CursorPositions: PositionTracker = new PositionTracker();\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport * as libarg from \"arg\"\n\nexport function ps(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n let flags;\n try{\n flags = libarg({\n '--grep': String,\n '-g': '--grep'\n },\n { argv: args }\n )\n }catch(e){\n // catch passing only -g / --grep with no string to use as the search\n terminal.error(\"Incorrect usage of ps command. Usage: ps [-g, --grep pattern]\");\n return;\n }\n const pattern = flags['--grep']\n if (pattern) {\n const re = new RegExp(pattern.toString())\n const matching = server.runningScripts.filter((x) => re.test(x.filename))\n for (let i = 0; i < matching.length; i++) {\n const rsObj = matching[i];\n let res = `(PID - ${rsObj.pid}) ${rsObj.filename}`;\n for (let j = 0; j < rsObj.args.length; ++j) {\n res += \" \" + rsObj.args[j].toString();\n }\n terminal.print(res);\n }\n }\n if(args.length === 0){\n for (let i = 0; i < server.runningScripts.length; i++) {\n const rsObj = server.runningScripts[i];\n let res = `(PID - ${rsObj.pid}) ${rsObj.filename}`;\n for (let j = 0; j < rsObj.args.length; ++j) {\n res += \" \" + rsObj.args[j].toString();\n }\n terminal.print(res);\n }\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { IReturnStatus } from \"../../types\";\n\nexport function rm(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 1) {\n terminal.error(\"Incorrect number of arguments. Usage: rm [program/script]\");\n return;\n }\n\n // Check programs\n let delTarget;\n let status: IReturnStatus = {\n res: true,\n msg: \"\",\n };\n try {\n delTarget = terminal.getFilepath(args[0] + \"\");\n status = server.removeFile(delTarget);\n } catch (err) {\n status = {\n res: false,\n msg: \"No such file exists\",\n };\n }\n\n if (!status.res && status.msg) {\n terminal.error(status.msg);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\nimport { runScript } from \"./runScript\";\nimport { runProgram } from \"./runProgram\";\n\nexport function run(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n // Run a program or a script\n if (args.length < 1) {\n terminal.error(\"Incorrect number of arguments. Usage: run [program/script] [-t] [num threads] [arg1] [arg2]...\");\n } else {\n const executableName = args[0] + \"\";\n\n // Check if its a script or just a program/executable\n if (isScriptFilename(executableName)) {\n runScript(terminal, router, player, server, args);\n } else if (executableName.endsWith(\".cct\")) {\n terminal.runContract(player, executableName);\n } else {\n runProgram(terminal, router, player, server, args);\n }\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { LogBoxEvents } from \"../../ui/React/LogBoxManager\";\nimport { startWorkerScript } from \"../../NetscriptWorker\";\nimport { RunningScript } from \"../../Script/RunningScript\";\nimport { findRunningScript } from \"../../Script/ScriptHelpers\";\nimport * as libarg from \"arg\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nexport function runScript(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n commandArgs: (string | number | boolean)[],\n): void {\n if (commandArgs.length < 1) {\n terminal.error(\n `Bug encountered with Terminal.runScript(). Command array has a length of less than 1: ${commandArgs}`,\n );\n return;\n }\n\n const scriptName = terminal.getFilepath(commandArgs[0] + \"\");\n\n const runArgs = { \"--tail\": Boolean, \"-t\": Number };\n const flags = libarg(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 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 const numThreads = !isNaN(threadFlag) && threadFlag > 0 ? threadFlag : 1;\n const args = flags[\"_\"];\n\n // Check if this script is already running\n if (findRunningScript(scriptName, args, server) != null) {\n terminal.error(\"This script is already running with the same args. Cannot run multiple instances with the same args\");\n return;\n }\n\n // Check if the script exists and if it does run it\n for (let i = 0; i < server.scripts.length; i++) {\n if (server.scripts[i].filename !== scriptName) {\n continue;\n }\n // Check for admin rights and that there is enough RAM availble to run\n const script = server.scripts[i];\n script.server = player.getCurrentServer().hostname;\n const ramUsage = script.ramUsage * numThreads;\n const ramAvailable = server.maxRam - server.ramUsed;\n\n if (!server.hasAdminRights) {\n terminal.error(\"Need root access to run script\");\n return;\n }\n\n if (ramUsage > ramAvailable) {\n terminal.error(\n \"This machine does not have enough RAM to run this script with \" +\n numThreads +\n \" threads. Script requires \" +\n numeralWrapper.formatRAM(ramUsage) +\n \" of RAM\",\n );\n return;\n }\n\n // Able to run script\n const runningScript = new RunningScript(script, args);\n runningScript.threads = numThreads;\n\n const success = startWorkerScript(player, runningScript, server);\n if (!success) {\n terminal.error(`Failed to start script`);\n return;\n }\n\n terminal.print(\n `Running script with ${numThreads} thread(s), pid ${runningScript.pid} and args: ${JSON.stringify(args)}.`,\n );\n if (runningScript.filename.endsWith(\".ns\")) {\n terminal.warn(\".ns files are deprecated, please rename everything to .js\");\n }\n if (tailFlag) {\n LogBoxEvents.emit(runningScript);\n }\n return;\n }\n\n terminal.error(\"No such script\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Programs } from \"../../Programs/Programs\";\n\nexport function runProgram(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length < 1) {\n return;\n }\n\n // Check if you have the program on your computer. If you do, execute it, otherwise\n // display an error message\n const programName = args[0] + \"\";\n\n if (!player.hasProgram(programName)) {\n terminal.error(\n `No such (exe, script, js, ns, or cct) file! (Only programs that exist on your home computer or scripts on ${\n player.getCurrentServer().hostname\n } can be run)`,\n );\n return;\n }\n\n if (args.length < 1) {\n return;\n }\n\n for (const program of Object.values(Programs)) {\n if (program.name.toLocaleLowerCase() === programName.toLocaleLowerCase()) {\n program.run(\n router,\n terminal,\n player,\n server,\n args.slice(1).map((arg) => arg + \"\"),\n );\n return;\n }\n }\n\n terminal.error(\"Invalid executable. Cannot be run\");\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { getServerOnNetwork } from \"../../Server/ServerHelpers\";\n\nexport function scan(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of scan command. Usage: scan\");\n return;\n }\n\n // Displays available network connections using TCP\n const currServ = player.getCurrentServer();\n const servers = currServ.serversOnNetwork.map((_, i) => {\n const server = getServerOnNetwork(currServ, i);\n if (server === null) throw new Error(\"Server should not be null\");\n return {\n hostname: server.hostname,\n ip: server.ip,\n hasRoot: server.hasAdminRights ? \"Y\" : \"N\",\n };\n });\n servers.unshift({\n hostname: \"Hostname\",\n ip: \"IP\",\n hasRoot: \"Root Access\",\n });\n const maxHostname = Math.max(...servers.map((s) => s.hostname.length));\n const maxIP = Math.max(...servers.map((s) => s.ip.length));\n for (const server of servers) {\n if (!server) continue;\n let entry = server.hostname;\n entry += \" \".repeat(maxHostname - server.hostname.length + 1);\n entry += server.ip;\n entry += \" \".repeat(maxIP - server.ip.length + 1);\n entry += server.hasRoot;\n terminal.print(entry);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Programs } from \"../../Programs/Programs\";\n\nexport function scananalyze(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length === 0) {\n terminal.executeScanAnalyzeCommand(player, 1);\n } else {\n // # of args must be 2 or 3\n if (args.length > 2) {\n terminal.error(\"Incorrect usage of scan-analyze command. usage: scan-analyze [depth]\");\n return;\n }\n let all = false;\n if (args.length === 2 && args[1] === \"-a\") {\n all = true;\n }\n\n const depth = parseInt(args[0] + \"\");\n\n if (isNaN(depth) || depth < 0) {\n terminal.error(\"Incorrect usage of scan-analyze command. depth argument must be positive numeric\");\n return;\n }\n if (depth > 3 && !player.hasProgram(Programs.DeepscanV1.name) && !player.hasProgram(Programs.DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 3\");\n return;\n } else if (depth > 5 && !player.hasProgram(Programs.DeepscanV2.name)) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 5\");\n return;\n } else if (depth > 10) {\n terminal.error(\"You cannot scan-analyze with that high of a depth. Maximum depth is 10\");\n return;\n }\n terminal.executeScanAnalyzeCommand(player, depth, all);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { GetServer } from \"../../Server/AllServers\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\n\nexport function scp(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n try {\n if (args.length !== 2) {\n terminal.error(\"Incorrect usage of scp command. Usage: scp [file] [destination hostname]\");\n return;\n }\n const scriptname = terminal.getFilepath(args[0] + \"\");\n if (!scriptname.endsWith(\".lit\") && !isScriptFilename(scriptname) && !scriptname.endsWith(\".txt\")) {\n terminal.error(\"scp only works for scripts, text files (.txt), and literature files (.lit)\");\n return;\n }\n\n const destServer = GetServer(args[1] + \"\");\n if (destServer == null) {\n terminal.error(`Invalid destination. ${args[1]} not found`);\n return;\n }\n\n // Scp for lit files\n if (scriptname.endsWith(\".lit\")) {\n let found = false;\n for (let i = 0; i < server.messages.length; ++i) {\n if (server.messages[i] == scriptname) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n return terminal.error(\"No such file exists!\");\n }\n\n for (let i = 0; i < destServer.messages.length; ++i) {\n if (destServer.messages[i] === scriptname) {\n terminal.print(scriptname + \" copied over to \" + destServer.hostname);\n return; // Already exists\n }\n }\n destServer.messages.push(scriptname);\n return terminal.print(scriptname + \" copied over to \" + destServer.hostname);\n }\n\n // Scp for txt files\n if (scriptname.endsWith(\".txt\")) {\n let txtFile = null;\n for (let i = 0; i < server.textFiles.length; ++i) {\n if (server.textFiles[i].fn === scriptname) {\n txtFile = server.textFiles[i];\n break;\n }\n }\n\n if (txtFile === null) {\n return terminal.error(\"No such file exists!\");\n }\n\n const tRes = destServer.writeToTextFile(txtFile.fn, txtFile.text);\n if (!tRes.success) {\n terminal.error(\"scp failed\");\n return;\n }\n if (tRes.overwritten) {\n terminal.print(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwriten`);\n terminal.print(`${scriptname} overwritten on ${destServer.hostname}`);\n return;\n }\n terminal.print(`${scriptname} copied over to ${destServer.hostname}`);\n return;\n }\n\n // Get the current script\n let sourceScript = null;\n for (let i = 0; i < server.scripts.length; ++i) {\n if (scriptname == server.scripts[i].filename) {\n sourceScript = server.scripts[i];\n break;\n }\n }\n if (sourceScript == null) {\n terminal.error(\"scp failed. No such script exists\");\n return;\n }\n\n const sRes = destServer.writeToScriptFile(player, scriptname, sourceScript.code);\n if (!sRes.success) {\n terminal.error(`scp failed`);\n return;\n }\n if (sRes.overwritten) {\n terminal.print(`WARNING: ${scriptname} already exists on ${destServer.hostname} and will be overwritten`);\n terminal.print(`${scriptname} overwritten on ${destServer.hostname}`);\n return;\n }\n terminal.print(`${scriptname} copied over to ${destServer.hostname}`);\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nexport function sudov(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect number of arguments. Usage: sudov\");\n return;\n }\n\n if (server.hasAdminRights) {\n terminal.print(\"You have ROOT access to this machine\");\n } else {\n terminal.print(\"You do NOT have root access to this machine\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { findRunningScriptByPid } from \"../../Script/ScriptHelpers\";\nimport { isScriptFilename, validScriptExtensions } from \"../../Script/isScriptFilename\";\nimport { compareArrays } from \"../../utils/helpers/compareArrays\";\nimport { LogBoxEvents } from \"../../ui/React/LogBoxManager\";\n\nexport function tail(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n commandArray: (string | number | boolean)[],\n): void {\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 if (!isScriptFilename(scriptName)) {\n terminal.error(`tail can only be called on ${validScriptExtensions.join(\", \")} files, or by PID`);\n return;\n }\n\n // Get script arguments\n const args = [];\n for (let i = 1; i < commandArray.length; ++i) {\n args.push(commandArray[i]);\n }\n\n // go over all the running scripts. If there's a perfect\n // match, use it!\n for (let i = 0; i < server.runningScripts.length; ++i) {\n if (server.runningScripts[i].filename === scriptName && compareArrays(server.runningScripts[i].args, args)) {\n LogBoxEvents.emit(server.runningScripts[i]);\n return;\n }\n }\n\n // Find all scripts that are potential candidates.\n const candidates = [];\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;\n // make a smaller copy of the args.\n const args2 = server.runningScripts[i].args.slice(0, args.length);\n if (server.runningScripts[i].filename === scriptName && compareArrays(args2, args)) {\n candidates.push(server.runningScripts[i]);\n }\n }\n\n // If there's only 1 possible choice, use that.\n if (candidates.length === 1) {\n LogBoxEvents.emit(candidates[0]);\n return;\n }\n\n // otherwise lists all possible conflicting choices.\n if (candidates.length > 1) {\n terminal.error(\"Found several potential candidates:\");\n for (const candidate of candidates) terminal.error(`${candidate.filename} ${candidate.args.join(\" \")}`);\n terminal.error(\"Script arguments need to be specified.\");\n return;\n }\n\n // if there's no candidate then we just don't know.\n terminal.error(`No script named ${scriptName} is running on the server`);\n } else if (typeof commandArray[0] === \"number\") {\n const runningScript = findRunningScriptByPid(commandArray[0], server);\n if (runningScript == null) {\n terminal.error(`No script with PID ${commandArray[0]} is running on the server`);\n return;\n }\n LogBoxEvents.emit(runningScript);\n }\n } catch (e) {\n terminal.error(e + \"\");\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { getRamUsageFromRunningScript } from \"../../Script/RunningScriptHelpers\";\nimport { numeralWrapper } from \"../../ui/numeralFormat\";\n\nexport function top(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of top command. Usage: top\");\n return;\n }\n\n // Headers\n const scriptWidth = 40;\n const pidWidth = 10;\n const threadsWidth = 16;\n\n const scriptTxt = \"Script\";\n const pidTxt = \"PID\";\n const threadsTxt = \"Threads\";\n const ramTxt = \"RAM Usage\";\n\n const spacesAfterScriptTxt = \" \".repeat(scriptWidth - scriptTxt.length);\n const spacesAfterPidTxt = \" \".repeat(pidWidth - pidTxt.length);\n const spacesAfterThreadsTxt = \" \".repeat(threadsWidth - threadsTxt.length);\n\n const headers = `${scriptTxt}${spacesAfterScriptTxt}${pidTxt}${spacesAfterPidTxt}${threadsTxt}${spacesAfterThreadsTxt}${ramTxt}`;\n\n terminal.print(headers);\n\n const currRunningScripts = server.runningScripts;\n // Iterate through scripts on current server\n for (let i = 0; i < currRunningScripts.length; i++) {\n const script = currRunningScripts[i];\n\n // Calculate name padding\n const numSpacesScript = Math.max(0, scriptWidth - script.filename.length);\n const spacesScript = \" \".repeat(numSpacesScript);\n\n // Calculate PID padding\n const numSpacesPid = Math.max(0, pidWidth - (script.pid + \"\").length);\n const spacesPid = \" \".repeat(numSpacesPid);\n\n // Calculate thread padding\n const numSpacesThread = Math.max(0, threadsWidth - (script.threads + \"\").length);\n const spacesThread = \" \".repeat(numSpacesThread);\n\n // Calculate and transform RAM usage\n const ramUsage = numeralWrapper.formatRAM(getRamUsageFromRunningScript(script) * script.threads);\n\n const entry = [script.filename, spacesScript, script.pid, spacesPid, script.threads, spacesThread, ramUsage].join(\n \"\",\n );\n terminal.print(entry);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { removeAlias } from \"../../Alias\";\n\nexport function unalias(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 1) {\n terminal.error(\"Incorrect usage of unalias name. Usage: unalias [alias]\");\n return;\n } else if (removeAlias(args[0] + \"\")) {\n terminal.print(`Removed alias ${args[0]}`);\n } else {\n terminal.error(`No such alias exists: ${args[0]}`);\n }\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\n\nimport {commonEditor} from './common/editor';\n\nexport function vim(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n return commonEditor('vim', {terminal, router, player, server, args}, {vim: true});\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { Server } from \"../../Server/Server\";\n\nexport function weaken(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\n if (args.length !== 0) {\n terminal.error(\"Incorrect usage of weaken command. Usage: weaken\");\n return;\n }\n\n if (!(server instanceof Server)) {\n terminal.error(\n \"Cannot weaken your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n }\n const normalServer = server as Server;\n // Hack the current PC (usually for money)\n // You can't weaken your home pc or servers you purchased\n if (normalServer.purchasedByPlayer) {\n terminal.error(\n \"Cannot weaken your own machines! You are currently connected to your home PC or one of your purchased servers\",\n );\n return;\n }\n if (!normalServer.hasAdminRights) {\n terminal.error(\"You do not have admin rights for this machine! Cannot weaken\");\n return;\n }\n if (normalServer.requiredHackingSkill > player.hacking) {\n terminal.error(\n \"Your hacking skill is not high enough to attempt hacking this machine. Try analyzing the machine to determine the required hacking skill\",\n );\n return;\n }\n terminal.startWeaken(player);\n}\n","import { ITerminal } from \"../ITerminal\";\nimport { IRouter } from \"../../ui/Router\";\nimport { IPlayer } from \"../../PersonObjects/IPlayer\";\nimport { BaseServer } from \"../../Server/BaseServer\";\nimport { isScriptFilename } from \"../../Script/isScriptFilename\";\n\nexport function wget(\n terminal: ITerminal,\n router: IRouter,\n player: IPlayer,\n server: BaseServer,\n args: (string | number | boolean)[],\n): void {\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 if (!isScriptFilename(target) && !target.endsWith(\".txt\")) {\n return terminal.error(`wget failed: Invalid target file. Target file must be script or text file`);\n }\n $.get(\n url,\n function (data: any) {\n let res;\n if (isScriptFilename(target)) {\n res = server.writeToScriptFile(player, target, data);\n } else {\n res = server.writeToTextFile(target, data);\n }\n if (!res.success) {\n return terminal.error(\"wget failed\");\n }\n if (res.overwritten) {\n return terminal.print(`wget successfully retrieved content and overwrote ${target}`);\n }\n return terminal.print(`wget successfully retrieved content to new file ${target}`);\n },\n \"text\",\n ).fail(function (e) {\n return terminal.error(\"wget failed: \" + JSON.stringify(e));\n });\n}\n","import { Player } from \"../Player\";\nimport { Exploit } from \"./Exploit\";\n\nfunction tampering(): void {\n if (Player.exploits.includes(Exploit.PrototypeTampering)) return;\n // Tampering\n const a = 55;\n setInterval(function () {\n if (a.toExponential() !== \"5.5e+1\") {\n Player.giveExploit(Exploit.PrototypeTampering);\n }\n }, 15 * 60 * 1000); // 15 minutes\n}\n\nfunction timeCompression(): void {\n const timer = 1000 * 15;\n if (Player.exploits.includes(Exploit.TimeCompression)) return;\n // Time compression\n let last = performance.now();\n function minute(): void {\n const now = performance.now();\n if (now - last < 500) {\n // time has been compressed.\n Player.giveExploit(Exploit.TimeCompression);\n return;\n }\n last = now;\n window.setTimeout(minute, timer);\n }\n window.setTimeout(minute, timer);\n}\n\nexport function startExploits(): void {\n tampering();\n timeCompression();\n}\n","import { WorkerScript } from \"./Netscript/WorkerScript\";\nimport { isScriptErrorMessage } from \"./NetscriptEvaluator\";\nimport { dialogBoxCreate } from \"./ui/React/DialogBox\";\n\nexport function setupUncaughtPromiseHandler(): void {\n window.addEventListener(\"unhandledrejection\", function (e) {\n if (isScriptErrorMessage(e.reason)) {\n const errorTextArray = e.reason.split(\"|DELIMITER|\");\n const hostname = errorTextArray[1];\n const scriptName = errorTextArray[2];\n const errorMsg = errorTextArray[3];\n\n let msg = `UNCAUGHT PROMISE ERROR
      You forgot to await a promise
      ${scriptName}@${hostname}
      `;\n msg += \"
      \";\n msg += errorMsg;\n dialogBoxCreate(msg);\n } else if (e.reason instanceof WorkerScript) {\n const msg =\n `UNCAUGHT PROMISE ERROR
      You forgot to await a promise
      ${e.reason.name}@${e.reason.hostname}
      ` +\n `Maybe hack / grow / weaken ?`;\n dialogBoxCreate(msg);\n }\n });\n}\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\n\nimport { TTheme as Theme, ThemeEvents, refreshTheme } from \"./Themes/ui/Theme\";\nimport { LoadingScreen } from \"./ui/LoadingScreen\";\nimport { initElectron } from \"./Electron\";\ninitElectron();\nglobalThis[\"React\"] = React;\nglobalThis[\"ReactDOM\"] = ReactDOM;\nReactDOM.render(\n \n \n ,\n document.getElementById(\"root\"),\n);\n\nfunction rerender(): void {\n refreshTheme();\n ReactDOM.render(\n \n \n ,\n document.getElementById(\"root\"),\n );\n}\n\n(function () {\n ThemeEvents.subscribe(rerender);\n})();\n\n(function () {\n if (process.env.NODE_ENV === \"development\" || location.href.startsWith(\"file://\")) return;\n window.onbeforeunload = function () {\n return \"Your work will be lost.\";\n };\n})();\n"],"sourceRoot":""} \ No newline at end of file diff --git a/src/Constants.ts b/src/Constants.ts index ec9db0a38..a57a64b14 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -116,8 +116,8 @@ export const CONSTANTS: { TotalNumBitNodes: number; LatestUpdate: string; } = { - VersionString: "1.6.1", - VersionNumber: 12, + VersionString: "1.6.3", + VersionNumber: 13, // Speed (in ms) at which the main loop is updated _idleSpeed: 200, @@ -287,105 +287,19 @@ export const CONSTANTS: { TotalNumBitNodes: 24, LatestUpdate: ` - v1.6.0 - 2022-03-29 Grafting + v1.6.3 - 2022-04-01 Few stanek fixes ---------------------------- - ** Vitalife secret lab ** + Stanek Gift - * A new mechanic called Augmentation Grafting has been added. Resleeving has been removed. - * Credit to @nickofolas for his incredible work. + * Has a minimum size of 2x3 + * Active Fragment property 'avgCharge' renamed to 'highestCharge' + * Formula for fragment effect updated to make 561% more sense. + Now you can charge to your heart content. + * Logs for the 'chargeFragment' function updated. - ** Stanek ** + Misc. - * BREAKING: Many functions in the stanek API were renamed in order to avoid name collision with things like Map.prototype.get - - ** UI ** - - * Major update to Sleeve, Gang UI, and Create Program (@nickofolas) - * re-add pre tags to support slash n in prompt (@jacktose) - * Tabelize linked output of 'ls' (@Master-Guy) - * Add the ability to filter open scripts (@phyzical) - * Add minHeight to editor tabs (@nickofolas) - * Properly expand gang equipment cards to fill entire screen (@nickofolas) - * Add shortcut to Faction augmentations page from FactionsRoot (@nickofolas) - * Fix extra space on editor tabs (@nickofolas) - * Present offline message as list (@DSteve595) - * add box showing remaining augments per faction (@jjayeon) - * Add tab switching support to vim mode (@JParisFerrer) - * Show current task on gang management screen (@zeddrak) - * Fix for ui of gang members current task when set via api (@phyzical) - * Don't hide irrelevant materials if their stock is not empty and hide irrelevant divisions from Export (@SagePtr) - * Fix regex to enable alpha transparency hex codes (8 digits) (@surdaft) - - ** API ** - - * Added dark web functions to ns api - * BREAKING: purchaseTor() should returns true if player already has Tor. (@DavidGrinberg, @waffleattack) - * Implement getBonusTime in Corporation API (@t-wolfeadam) - * Added functions to purchase TIX and WSI (@incubusnb) - * purchaseSleeveAug checks shock value (@incubusnb) - * Fix bug with hacknet api - * Fix spendHashes bug - * Added 0 cost of asleep() (@Master-Guy) - * Fix some misleading corporation errors (@TheRealMaxion) - * expose the inBladeburner on the player object (@phyzical) - * added ram charge for stanek width and height (@phyzical) - * Fix sufficient player money check to buy back shares. (@ChrissiQ) - * Fix Static Ram Circumventing for some NS functions (@CrafterKolyan) - * added CorporationSoftCap to NetscriptDefinitions (@phyzical) - * Added definition of autocomplete() 'data' argument. (@tigercat2000) - * Adding support for text/select options in Prompt command (@PhilipArmstead) - * Added the ability to exportGame via api (@phyzical) - - ** Arcade ** - - * Added an arcade to New Tokyo where you can play a 4 year old version of bitburner. - - ** Misc. ** - - * Add a warning triggered while auto-saves are off. (@MartinFournier) - * Log info for field analysis now displays actual rank gained. (@ApamNapat) - * Removed BladeburnerSkillCost from skill point cost description. (@ApamNapat) - * Fix handling for UpArrow in bladeburner console. (@dowinter) - * Add GitHub action to check PRs for generated files. (@MartinFournier) - * Cap Staneks gift at 25x25 to prevent crashes. (@waffleattack) - * Remove old & unused files from repository. (@MartinFournier) - * Factions on the factions screens are sorted by story progress / type. (@phyzical) - * Fix log manager not picking up new runs of scripts. (@phyzical) - * Added prettier to cicd. - * UI improvements (@phyzical) - * Documentation / Typos (@nanogyth, @Master-Guy, @incubusnb, @ApamNapat, @phyzical, @SagePtr) - * Give player code a copy of Division.upgrades instead of the live object (@Ornedan) - * Fix bug with small town achievement. - * Fix bug with purchaseSleeveAug (@phyzical) - * Check before unlocking corp upgrade (@gianfun) - * General codebase improvements. (@phyzical, @Master-Guy, @ApamNapat) - * Waiting on promises in NS1 no longer freezes the script. (@Master-Guy) - * Fix bug with missing ramcost for tFormat (@TheMas3212) - * Fix crash with new prompt - * Quick fix to prevent division by 0 in terminal (@Master-Guy) - * removed ip references (@phyzical, @Master-Guy) - * Terminal now supports 'ls -l' - * Fix negative number formatting (@Master-Guy) - * Fix unique ip generation (@InDieTasten) - * remove terminal command theme from docs (@phyzical) - * Fix 'Augmentations Left' with gang factions (@nickofolas) - * Attempt to fix 'bladeburner.process()' early routing issue (@MartinFournier) - * work in progress augment fix (@phyzical) - * Fixes missing space in Smart Supply (@TheRealMaxion) - * Change license to Apache 2 with Commons Clause - * updated regex sanitization (@mbrannen) - * Sleeve fix for when faction isnt found (@phyzical) - * Fix editor "close" naming (@phyzical) - * Fix bug with sleeves where some factions would be listed as workable. (@phyzical) - * Fix research tree of product industries post-prestige (@pd) - * Added a check for exisiting industry type before expanding (@phyzical) - * fix hackAnalyzeThreads returning infinity (@chrisrabe) - * Make growthAnalyze more accurate (@dwRchyngqxs) - * Add 'Zoom -> Reset Zoom' command to Steam (@smolgumball) - * Add hasOwnProperty check to GetServer (@SagePtr) - * Speed up employee productivity calculation (@pd) - * Field Work and Security Work benefit from 'share' (@SagePtr) * Nerf noodle bar. `, };