!function(e){function t(t){for(var i,o,s=t[0],l=t[1],c=t[2],p=0,h=[];p0?this.intelligence=Math.floor(this.calculateSkill(this.intelligence_exp)):this.intelligence=0;var e=this.hp/this.max_hp;this.max_hp=Math.floor(10+this.defense/10),L.hp=Math.round(this.max_hp*e)},N.prototype.resetMultipliers=function(){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},N.prototype.hasProgram=function(e){var t=L.getHomeComputer();if(null==t)return!1;for(var n=0;n0?this.intelligence_exp+=e:console.log("Not gaining intelligence experience bc it hasn't been unlocked yet")},N.prototype.queryStatFromString=function(e){var t=e.toLowerCase();return t.includes("hack")?L.hacking_skill:t.includes("str")?L.strength:t.includes("def")?L.defense:t.includes("dex")?L.dexterity:t.includes("agi")?L.agility:t.includes("cha")?L.charisma:t.includes("int")?L.intelligence:void 0},N.prototype.resetWorkStatus=function(){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.currentWorkFactionName="",this.currentWorkFactionDescription="",this.createProgramName="",this.className="",document.getElementById("work-in-progress-text").innerHTML=""},N.prototype.processWorkEarnings=function(e=1){const t=this.workHackExpGainRate*e,n=this.workStrExpGainRate*e,i=this.workDefExpGainRate*e,a=this.workDexExpGainRate*e,r=this.workAgiExpGainRate*e,o=this.workChaExpGainRate*e,s=(this.workMoneyGainRate-this.workMoneyLossRate)*e;this.gainHackingExp(t),this.gainStrengthExp(n),this.gainDefenseExp(i),this.gainDexterityExp(a),this.gainAgilityExp(r),this.gainCharismaExp(o),this.gainMoney(s),this.workHackExpGained+=t,this.workStrExpGained+=n,this.workDefExpGained+=i,this.workDexExpGained+=a,this.workAgiExpGained+=r,this.workChaExpGained+=o,this.workRepGained+=this.workRepGainRate*e,this.workMoneyGained+=this.workMoneyGainRate*e,this.workMoneyGained-=this.workMoneyLossRate*e},N.prototype.startWork=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=h.CONSTANTS.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=h.CONSTANTS.MillisecondsPer8Hours;var e=Object(M.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Cancel Work",e.addEventListener("click",function(){return L.finishWork(!0),!1}),_.Engine.loadWorkInProgressContent()},N.prototype.work=function(e){var t=!1;if(this.timeWorked+_.Engine._idleSpeed*e>=h.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((h.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/_.Engine._idleSpeed)),this.timeWorked+=_.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=h.CONSTANTS.MillisecondsPer8Hours)return this.finishWork(!1);var n=s.Companies[this.companyName],i="0";null!=n&&n instanceof o.Company?i=n.playerReputation:console.error(`Could not find Company: ${this.companyName}`),document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition+" at "+this.companyName+" (Current Company Reputation: "+S.a.format(i,"0,0")+")

You have been working for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+S.a.format(this.workMoneyGained,"0,0.00")+" ($"+S.a.format(this.workMoneyGainRate*x,"0,0.00")+" / sec)

"+S.a.format(this.workRepGained,"0,0.0000")+" ("+S.a.format(this.workRepGainRate*x,"0,0.0000")+" / sec) reputation for this company

"+S.a.format(this.workHackExpGained,"0,0.0000")+" ("+S.a.format(this.workHackExpGainRate*x,"0,0.0000")+" / sec) hacking exp

"+S.a.format(this.workStrExpGained,"0,0.0000")+" ("+S.a.format(this.workStrExpGainRate*x,"0,0.0000")+" / sec) strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" ("+S.a.format(this.workDefExpGainRate*x,"0,0.0000")+" / sec) defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" ("+S.a.format(this.workDexExpGainRate*x,"0,0.0000")+" / sec) dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" ("+S.a.format(this.workAgiExpGainRate*x,"0,0.0000")+" / sec) agility exp

"+S.a.format(this.workChaExpGained,"0,0.0000")+" ("+S.a.format(this.workChaExpGainRate*x,"0,0.0000")+" / sec) charisma exp

You will automatically finish after working for 8 hours. You can cancel earlier if you wish, but you will only gain half of the reputation you've earned so far."},N.prototype.finishWork=function(e,t=!1){e&&(this.workRepGained/=2),s.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();var n="You earned a total of:
$"+S.a.format(this.workMoneyGained,"0,0.00")+"
"+S.a.format(this.workRepGained,"0,0.0000")+" reputation for the company
"+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+S.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(n=e?"You worked a short shift of "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

Since you cancelled your work early, you only gained half of the reputation you earned.

"+n:"You worked a full shift of 8 hours!

"+n,t||Object(w.dialogBoxCreate)(n),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,_.Engine.loadLocationContent(),t){var i="You worked a short shift of "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned $"+S.a.format(this.workMoneyGained,"0,0.00")+", "+S.a.format(this.workRepGained,"0,0.0000")+" reputation, "+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+S.a.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+S.a.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp.";return this.resetWorkStatus(),i}this.resetWorkStatus()},N.prototype.startWorkPartTime=function(){this.resetWorkStatus(),this.isWorking=!0,this.workType=h.CONSTANTS.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=h.CONSTANTS.MillisecondsPer8Hours;var e=Object(M.clearEventListeners)("work-in-progress-cancel-button");e.innerHTML="Stop Working",e.addEventListener("click",function(){return L.finishWorkPartTime(),!1}),_.Engine.loadWorkInProgressContent()},N.prototype.workPartTime=function(e){var t=!1;if(this.timeWorked+_.Engine._idleSpeed*e>=h.CONSTANTS.MillisecondsPer8Hours&&(t=!0,e=Math.round((h.CONSTANTS.MillisecondsPer8Hours-this.timeWorked)/_.Engine._idleSpeed)),this.timeWorked+=_.Engine._idleSpeed*e,this.workRepGainRate=this.getWorkRepGain(),this.processWorkEarnings(e),t||this.timeWorked>=h.CONSTANTS.MillisecondsPer8Hours)return this.finishWorkPartTime();var n=s.Companies[this.companyName],i="0";null!=n&&n instanceof o.Company?i=n.playerReputation:console.log("ERROR: Could not find Company: "+this.companyName),document.getElementById("work-in-progress-text").innerHTML="You are currently working as a "+this.companyPosition+" at "+L.companyName+" (Current Company Reputation: "+S.a.format(i,"0,0")+")

You have been working for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+S.a.format(this.workMoneyGained,"0,0.00")+" ($"+S.a.format(this.workMoneyGainRate*x,"0,0.00")+" / sec)

"+S.a.format(this.workRepGained,"0,0.0000")+" ("+S.a.format(this.workRepGainRate*x,"0,0.0000")+" / sec) reputation for this company

"+S.a.format(this.workHackExpGained,"0,0.0000")+" ("+S.a.format(this.workHackExpGainRate*x,"0,0.0000")+" / sec) hacking exp

"+S.a.format(this.workStrExpGained,"0,0.0000")+" ("+S.a.format(this.workStrExpGainRate*x,"0,0.0000")+" / sec) strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" ("+S.a.format(this.workDefExpGainRate*x,"0,0.0000")+" / sec) defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" ("+S.a.format(this.workDexExpGainRate*x,"0,0.0000")+" / sec) dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" ("+S.a.format(this.workAgiExpGainRate*x,"0,0.0000")+" / sec) agility exp

"+S.a.format(this.workChaExpGained,"0,0.0000")+" ("+S.a.format(this.workChaExpGainRate*x,"0,0.0000")+" / sec) charisma exp

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."},N.prototype.finishWorkPartTime=function(e=!1){s.Companies[this.companyName].playerReputation+=this.workRepGained,this.updateSkillLevels();var t="You earned a total of:
$"+S.a.format(this.workMoneyGained,"0,0.00")+"
"+S.a.format(this.workRepGained,"0,0.0000")+" reputation for the company
"+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+S.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(t="You worked for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

"+t,e||Object(w.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,_.Engine.loadLocationContent(),e){var n="You worked for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+" and earned a total of $"+S.a.format(this.workMoneyGained,"0,0.00")+", "+S.a.format(this.workRepGained,"0,0.0000")+" reputation, "+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+S.a.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+S.a.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},N.prototype.startFactionWork=function(e){var t=1+e.favor/100;isNaN(t)&&(t=1),this.workRepGainRate*=t,this.workRepGainRate*=a.BitNodeMultipliers.FactionWorkRepGain,this.isWorking=!0,this.workType=h.CONSTANTS.WorkTypeFaction,this.currentWorkFactionName=e.name,this.timeNeededToCompleteWork=h.CONSTANTS.MillisecondsPer20Hours;var n=Object(M.clearEventListeners)("work-in-progress-cancel-button");n.innerHTML="Stop Faction Work",n.addEventListener("click",function(){return L.finishFactionWork(!0),!1}),_.Engine.loadWorkInProgressContent()},N.prototype.startFactionHackWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.15*this.hacking_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.workRepGainRate=(this.hacking_skill+this.intelligence)/h.CONSTANTS.MaxSkillLevel*this.faction_rep_mult,this.factionWorkType=h.CONSTANTS.FactionWorkHacking,this.currentWorkFactionDescription="carrying out hacking contracts",this.startFactionWork(e)},N.prototype.startFactionFieldWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.1*this.hacking_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.1*this.strength_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.1*this.defense_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.1*this.dexterity_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.1*this.agility_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=.1*this.charisma_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.getFactionFieldWorkRepGain(),this.factionWorkType=h.CONSTANTS.FactionWorkField,this.currentWorkFactionDescription="carrying out field missions",this.startFactionWork(e)},N.prototype.startFactionSecurityWork=function(e){this.resetWorkStatus(),this.workHackExpGainRate=.05*this.hacking_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workStrExpGainRate=.15*this.strength_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workDefExpGainRate=.15*this.defense_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workDexExpGainRate=.15*this.dexterity_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workAgiExpGainRate=.15*this.agility_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workChaExpGainRate=0*this.charisma_exp_mult*a.BitNodeMultipliers.FactionWorkExpGain,this.workRepGainRate=this.getFactionSecurityWorkRepGain(),this.factionWorkType=h.CONSTANTS.FactionWorkSecurity,this.currentWorkFactionDescription="performing security detail",this.startFactionWork(e)},N.prototype.workForFaction=function(e){var t=y.b[this.currentWorkFactionName];switch(this.factionWorkType){case h.CONSTANTS.FactionWorkHacking:this.workRepGainRate=(this.hacking_skill+this.intelligence)/h.CONSTANTS.MaxSkillLevel*this.faction_rep_mult;break;case h.CONSTANTS.FactionWorkField:this.workRepGainRate=this.getFactionFieldWorkRepGain();break;case h.CONSTANTS.FactionWorkSecurity:this.workRepGainRate=this.getFactionSecurityWorkRepGain()}var n=1+t.favor/100;isNaN(n)&&(n=1),this.workRepGainRate*=n,this.workRepGainRate*=a.BitNodeMultipliers.FactionWorkRepGain;var i=!1;if(this.timeWorked+_.Engine._idleSpeed*e>=h.CONSTANTS.MillisecondsPer20Hours&&(i=!0,e=Math.round((h.CONSTANTS.MillisecondsPer20Hours-this.timeWorked)/_.Engine._idleSpeed)),this.timeWorked+=_.Engine._idleSpeed*e,this.processWorkEarnings(e),i||this.timeWorked>=h.CONSTANTS.MillisecondsPer20Hours)return this.finishFactionWork(!1);document.getElementById("work-in-progress-text").innerHTML="You are currently "+this.currentWorkFactionDescription+" for your faction "+t.name+" (Current Faction Reputation: "+S.a.format(t.playerReputation,"0,0")+").
You have been doing this for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You have earned:

$"+S.a.format(this.workMoneyGained,"0,0.00")+" ("+S.a.format(this.workMoneyGainRate*x,"0,0.00")+" / sec)

"+S.a.format(this.workRepGained,"0,0.0000")+" ("+S.a.format(this.workRepGainRate*x,"0,0.0000")+" / sec) reputation for this faction

"+S.a.format(this.workHackExpGained,"0,0.0000")+" ("+S.a.format(this.workHackExpGainRate*x,"0,0.0000")+" / sec) hacking exp

"+S.a.format(this.workStrExpGained,"0,0.0000")+" ("+S.a.format(this.workStrExpGainRate*x,"0,0.0000")+" / sec) strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" ("+S.a.format(this.workDefExpGainRate*x,"0,0.0000")+" / sec) defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" ("+S.a.format(this.workDexExpGainRate*x,"0,0.0000")+" / sec) dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" ("+S.a.format(this.workAgiExpGainRate*x,"0,0.0000")+" / sec) agility exp

"+S.a.format(this.workChaExpGained,"0,0.0000")+" ("+S.a.format(this.workChaExpGainRate*x,"0,0.0000")+" / sec) charisma exp

You will automatically finish after working for 20 hours. You can cancel earlier if you wish.
There is no penalty for cancelling earlier."},N.prototype.finishFactionWork=function(e,t=!1){var n=y.b[this.currentWorkFactionName];n.playerReputation+=this.workRepGained,this.updateSkillLevels();var i="You worked for your faction "+n.name+" for a total of "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

You earned a total of:
$"+S.a.format(this.workMoneyGained,"0,0.00")+"
"+S.a.format(this.workRepGained,"0,0.0000")+" reputation for the faction
"+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+S.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(t||Object(w.dialogBoxCreate)(i),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,_.Engine.loadFactionContent(),Object(y.c)(n.name),t){var a="You worked for your faction "+n.name+" for a total of "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+". You earned "+S.a.format(this.workRepGained,"0,0.0000")+" rep, "+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+S.a.format(this.workStrExpGained,"0,0.0000")+" str exp, "+S.a.format(this.workDefExpGained,"0,0.0000")+" def exp, "+S.a.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+S.a.format(this.workAgiExpGained,"0,0.0000")+" agi exp, and "+S.a.format(this.workChaExpGained,"0,0.0000")+" cha exp.";return this.resetWorkStatus(),a}this.resetWorkStatus()},N.prototype.getWorkMoneyGain=function(){let e=1;const t=s.Companies[this.companyName];v.d&&(e=1+t.favor/100);const n=u.CompanyPositions[this.companyPosition];return null==n?(console.error(`Could not find CompanyPosition object for ${this.companyPosition}. Work salary will be 0`),0):n.baseSalary*t.salaryMultiplier*this.work_money_mult*a.BitNodeMultipliers.CompanyWorkMoney*e},N.prototype.getWorkHackExpGain=function(){const e=s.Companies[this.companyName],t=u.CompanyPositions[this.companyPosition];return null==e||null==t?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${this.companyPosition}.`,"Work hack exp gain will be 0"].join(" ")),0):t.hackingExpGain*e.expMultiplier*this.hacking_exp_mult*a.BitNodeMultipliers.CompanyWorkExpGain},N.prototype.getWorkStrExpGain=function(){const e=s.Companies[this.companyName],t=u.CompanyPositions[this.companyPosition];return null==e||null==t?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${this.companyPosition}.`,"Work str exp gain will be 0"].join(" ")),0):t.strengthExpGain*e.expMultiplier*this.strength_exp_mult*a.BitNodeMultipliers.CompanyWorkExpGain},N.prototype.getWorkDefExpGain=function(){const e=s.Companies[this.companyName],t=u.CompanyPositions[this.companyPosition];return null==e||null==t?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${this.companyPosition}.`,"Work def exp gain will be 0"].join(" ")),0):t.defenseExpGain*e.expMultiplier*this.defense_exp_mult*a.BitNodeMultipliers.CompanyWorkExpGain},N.prototype.getWorkDexExpGain=function(){const e=s.Companies[this.companyName],t=u.CompanyPositions[this.companyPosition];return null==e||null==t?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${this.companyPosition}.`,"Work dex exp gain will be 0"].join(" ")),0):t.dexterityExpGain*e.expMultiplier*this.dexterity_exp_mult*a.BitNodeMultipliers.CompanyWorkExpGain},N.prototype.getWorkAgiExpGain=function(){const e=s.Companies[this.companyName],t=u.CompanyPositions[this.companyPosition];return null==e||null==t?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${this.companyPosition}.`,"Work agi exp gain will be 0"].join(" ")),0):t.agilityExpGain*e.expMultiplier*this.agility_exp_mult*a.BitNodeMultipliers.CompanyWorkExpGain},N.prototype.getWorkChaExpGain=function(){const e=s.Companies[this.companyName],t=u.CompanyPositions[this.companyPosition];return null==e||null==t?(console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${this.companyPosition}.`,"Work cha exp gain will be 0"].join(" ")),0):t.charismaExpGain*e.expMultiplier*this.charisma_exp_mult*a.BitNodeMultipliers.CompanyWorkExpGain},N.prototype.getWorkRepGain=function(){const e=s.Companies[this.companyName],t=u.CompanyPositions[this.companyPosition];if(null==e||null==t)return console.error([`Could not find Company object for ${this.companyName}`,`or CompanyPosition object for ${this.companyPosition}.`,"Work rep gain will be 0"].join(" ")),0;var n=t.calculateJobPerformance(this.hacking_skill,this.strength,this.defense,this.dexterity,this.agility,this.charisma);n+=this.intelligence/h.CONSTANTS.MaxSkillLevel;var i=1+e.favor/100;return isNaN(i)&&(i=1),n*this.company_rep_mult*i},N.prototype.getFactionSecurityWorkRepGain=function(){return.9*(this.hacking_skill/h.CONSTANTS.MaxSkillLevel+this.strength/h.CONSTANTS.MaxSkillLevel+this.defense/h.CONSTANTS.MaxSkillLevel+this.dexterity/h.CONSTANTS.MaxSkillLevel+this.agility/h.CONSTANTS.MaxSkillLevel)/4.5*this.faction_rep_mult},N.prototype.getFactionFieldWorkRepGain=function(){return.9*(this.hacking_skill/h.CONSTANTS.MaxSkillLevel+this.strength/h.CONSTANTS.MaxSkillLevel+this.defense/h.CONSTANTS.MaxSkillLevel+this.dexterity/h.CONSTANTS.MaxSkillLevel+this.agility/h.CONSTANTS.MaxSkillLevel+this.charisma/h.CONSTANTS.MaxSkillLevel+this.intelligence/h.CONSTANTS.MaxSkillLevel)/5.5*this.faction_rep_mult},N.prototype.startCreateProgramWork=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=h.CONSTANTS.WorkTypeCreateProgram,this.createProgramReqLvl=n,this.timeNeededToCompleteWork=t;for(var i=0;i=100)break;this.timeWorkedCreateProgram=o/100*this.timeNeededToCompleteWork,this.getHomeComputer().programs.splice(i,1)}}this.createProgramName=e;var s=Object(M.clearEventListeners)("work-in-progress-cancel-button");s.innerHTML="Cancel work on creating program",s.addEventListener("click",function(){return L.finishCreateProgramWork(!0),!1}),_.Engine.loadWorkInProgressContent()},N.prototype.createProgramWork=function(e){var t=this.createProgramReqLvl,n=this.hacking_skill/t;n=1+(n-1)/5,this.timeWorked+=_.Engine._idleSpeed*e,this.timeWorkedCreateProgram+=_.Engine._idleSpeed*e*n;var i=this.createProgramName;this.timeWorkedCreateProgram>=this.timeNeededToCompleteWork&&this.finishCreateProgramWork(!1),document.getElementById("work-in-progress-text").innerHTML="You are currently working on coding "+i+".

You have been working for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

The program is "+(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*100).toFixed(2)+"% complete.
If you cancel, your work will be saved and you can come back to complete the program later."},N.prototype.finishCreateProgramWork=function(e,t=!1){var n=this.createProgramName;if(!1===e)Object(w.dialogBoxCreate)("You've finished creating "+n+"!
The new program can be found on your home computer."),this.getHomeComputer().programs.push(n);else{var i=n+"-"+(Math.floor(this.timeWorkedCreateProgram/this.timeNeededToCompleteWork*1e4)/100).toString()+"%-INC";this.getHomeComputer().programs.push(i)}e||this.gainIntelligenceExp(this.createProgramReqLvl/h.CONSTANTS.IntelligenceProgramBaseExpGain),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,_.Engine.loadTerminalContent(),this.resetWorkStatus()},N.prototype.startClass=function(e,t,n){this.resetWorkStatus(),this.isWorking=!0,this.workType=h.CONSTANTS.WorkTypeStudyClass,this.className=n;var i=1e3/_.Engine._idleSpeed,r=0,o=0,s=0,l=0,c=0,u=0,p=0;switch(n){case h.CONSTANTS.ClassStudyComputerScience:o=.5*t/i;break;case h.CONSTANTS.ClassDataStructures:r=h.CONSTANTS.ClassDataStructuresBaseCost*e/i,o=1*t/i;break;case h.CONSTANTS.ClassNetworks:r=h.CONSTANTS.ClassNetworksBaseCost*e/i,o=2*t/i;break;case h.CONSTANTS.ClassAlgorithms:r=h.CONSTANTS.ClassAlgorithmsBaseCost*e/i,o=4*t/i;break;case h.CONSTANTS.ClassManagement:r=h.CONSTANTS.ClassManagementBaseCost*e/i,p=2*t/i;break;case h.CONSTANTS.ClassLeadership:r=h.CONSTANTS.ClassLeadershipBaseCost*e/i,p=4*t/i;break;case h.CONSTANTS.ClassGymStrength:r=h.CONSTANTS.ClassGymBaseCost*e/i,s=1*t/i;break;case h.CONSTANTS.ClassGymDefense:r=h.CONSTANTS.ClassGymBaseCost*e/i,l=1*t/i;break;case h.CONSTANTS.ClassGymDexterity:r=h.CONSTANTS.ClassGymBaseCost*e/i,c=1*t/i;break;case h.CONSTANTS.ClassGymAgility:r=h.CONSTANTS.ClassGymBaseCost*e/i,u=1*t/i;break;default:throw new Error("ERR: Invalid/unrecognized class name")}this.workMoneyLossRate=r,this.workHackExpGainRate=o*this.hacking_exp_mult*a.BitNodeMultipliers.ClassGymExpGain,this.workStrExpGainRate=s*this.strength_exp_mult*a.BitNodeMultipliers.ClassGymExpGain,this.workDefExpGainRate=l*this.defense_exp_mult*a.BitNodeMultipliers.ClassGymExpGain,this.workDexExpGainRate=c*this.dexterity_exp_mult*a.BitNodeMultipliers.ClassGymExpGain,this.workAgiExpGainRate=u*this.agility_exp_mult*a.BitNodeMultipliers.ClassGymExpGain,this.workChaExpGainRate=p*this.charisma_exp_mult*a.BitNodeMultipliers.ClassGymExpGain;var d=Object(M.clearEventListeners)("work-in-progress-cancel-button");n==h.CONSTANTS.ClassGymStrength||n==h.CONSTANTS.ClassGymDefense||n==h.CONSTANTS.ClassGymDexterity||n==h.CONSTANTS.ClassGymAgility?d.innerHTML="Stop training at gym":d.innerHTML="Stop taking course",d.addEventListener("click",function(){return L.finishClass(),!1}),_.Engine.loadWorkInProgressContent()},N.prototype.takeClass=function(e){this.timeWorked+=_.Engine._idleSpeed*e;var t=this.className;this.processWorkEarnings(e),document.getElementById("work-in-progress-text").innerHTML="You have been "+t+" for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+"

This has cost you:
$"+S.a.format(this.workMoneyGained,"0,0.00")+" ($"+S.a.format(this.workMoneyLossRate*x,"0,0.00")+" / sec)

You have gained:
"+S.a.format(this.workHackExpGained,"0,0.0000")+" ("+S.a.format(this.workHackExpGainRate*x,"0,0.0000")+" / sec) hacking exp
"+S.a.format(this.workStrExpGained,"0,0.0000")+" ("+S.a.format(this.workStrExpGainRate*x,"0,0.0000")+" / sec) strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" ("+S.a.format(this.workDefExpGainRate*x,"0,0.0000")+" / sec) defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" ("+S.a.format(this.workDexExpGainRate*x,"0,0.0000")+" / sec) dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" ("+S.a.format(this.workAgiExpGainRate*x,"0,0.0000")+" / sec) agility exp
"+S.a.format(this.workChaExpGained,"0,0.0000")+" ("+S.a.format(this.workChaExpGainRate*x,"0,0.0000")+" / sec) charisma exp
You may cancel at any time"},N.prototype.finishClass=function(e=!1){if(this.gainIntelligenceExp(h.CONSTANTS.IntelligenceClassBaseExpGain*Math.round(this.timeWorked/1e3)),this.workMoneyGained>0)throw new Error("ERR: Somehow gained money while taking class");this.updateSkillLevels();var t="After "+this.className+" for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+",
you spent a total of $"+S.a.format(-1*this.workMoneyGained,"0,0.00")+".

You earned a total of:
"+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp
"+S.a.format(this.workStrExpGained,"0,0.0000")+" strength exp
"+S.a.format(this.workDefExpGained,"0,0.0000")+" defense exp
"+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp
"+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp
";if(e||Object(w.dialogBoxCreate)(t),document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,_.Engine.loadLocationContent(),e){var n="After "+this.className+" for "+Object(A.convertTimeMsToTimeElapsedString)(this.timeWorked)+", you spent a total of $"+S.a.format(-1*this.workMoneyGained,"0,0.00")+". You earned a total of: "+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking exp, "+S.a.format(this.workStrExpGained,"0,0.0000")+" strength exp, "+S.a.format(this.workDefExpGained,"0,0.0000")+" defense exp, "+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity exp, "+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility exp, and "+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma exp";return this.resetWorkStatus(),n}this.resetWorkStatus()},N.prototype.startCrime=function(e,t,n,i,r,o,s,l,c=null){this.resetWorkStatus(),this.isWorking=!0,this.workType=h.CONSTANTS.WorkTypeCrime,c&&c.workerscript&&(this.committingCrimeThruSingFn=!0,this.singFnCrimeWorkerScript=c.workerscript),this.workHackExpGained=e*this.hacking_exp_mult*a.BitNodeMultipliers.CrimeExpGain,this.workStrExpGained=t*this.strength_exp_mult*a.BitNodeMultipliers.CrimeExpGain,this.workDefExpGained=n*this.defense_exp_mult*a.BitNodeMultipliers.CrimeExpGain,this.workDexExpGained=i*this.dexterity_exp_mult*a.BitNodeMultipliers.CrimeExpGain,this.workAgiExpGained=r*this.agility_exp_mult*a.BitNodeMultipliers.CrimeExpGain,this.workChaExpGained=o*this.charisma_exp_mult*a.BitNodeMultipliers.CrimeExpGain,this.workMoneyGained=s*this.crime_money_mult*a.BitNodeMultipliers.CrimeMoney,this.timeNeededToCompleteWork=l;var u=Object(M.clearEventListeners)("work-in-progress-cancel-button");u.innerHTML="Cancel crime",u.addEventListener("click",function(){return L.finishCrime(!0),!1}),_.Engine.loadWorkInProgressContent()},N.prototype.commitCrime=function(e){if(this.timeWorked+=_.Engine._idleSpeed*e,this.timeWorked>=this.timeNeededToCompleteWork)this.finishCrime(!1);else{var t=Math.round(this.timeWorked/this.timeNeededToCompleteWork*100),n=Math.round(t/5);n<0&&(n=0),n>20&&(n=20);var i="["+Array(n+1).join("|")+Array(20-n+1).join(" ")+"]";document.getElementById("work-in-progress-text").innerHTML="You are attempting to "+this.crimeType+".
Time remaining: "+Object(A.convertTimeMsToTimeElapsedString)(this.timeNeededToCompleteWork-this.timeWorked)+"
"+i.replace(/ /g," ")}},N.prototype.finishCrime=function(e){if(!e){if(Object(g.b)(this.crimeType,this.workMoneyGained)){let e=null;for(const t in g.a)if(g.a[t].type==this.crimeType){e=g.a[t];break}null==e&&(console.log(this.crimeType),Object(w.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer")),this.karma-=e.karma,this.numPeopleKilled+=e.kills,e.intelligence_exp>0&&this.gainIntelligenceExp(e.intelligence_exp),this.workHackExpGained*=2,this.workStrExpGained*=2,this.workDefExpGained*=2,this.workDexExpGained*=2,this.workAgiExpGained*=2,this.workChaExpGained*=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime successful! Gained "+S.a.format(this.workMoneyGained,"$0.000a")+", "+S.a.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+S.a.format(this.workStrExpGained,"0,0.0000")+" str exp, "+S.a.format(this.workDefExpGained,"0,0.0000")+" def exp, "+S.a.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+S.a.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+S.a.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(w.dialogBoxCreate)("Crime successful!

You gained:
$"+S.a.format(this.workMoneyGained,"0,0.00")+"
"+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking experience
"+S.a.format(this.workStrExpGained,"0,0.0000")+" strength experience
"+S.a.format(this.workDefExpGained,"0,0.0000")+" defense experience
"+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity experience
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility experience
"+S.a.format(this.workChaExpGained,"0,0.0000")+" charisma experience")}else this.workHackExpGained/=2,this.workStrExpGained/=2,this.workDefExpGained/=2,this.workDexExpGained/=2,this.workAgiExpGained/=2,this.workChaExpGained/=2,this.committingCrimeThruSingFn?null==this.singFnCrimeWorkerScript.disableLogs.ALL&&null==this.singFnCrimeWorkerScript.disableLogs.commitCrime&&this.singFnCrimeWorkerScript.scriptRef.log("Crime failed! Gained "+S.a.format(this.workHackExpGained,"0,0.0000")+" hack exp, "+S.a.format(this.workStrExpGained,"0,0.0000")+" str exp, "+S.a.format(this.workDefExpGained,"0,0.0000")+" def exp, "+S.a.format(this.workDexExpGained,"0,0.0000")+" dex exp, "+S.a.format(this.workAgiExpGained,"0,0.0000")+" agi exp, "+S.a.format(this.workChaExpGained,"0,0.0000")+" cha exp."):Object(w.dialogBoxCreate)("Crime failed!

You gained:
"+S.a.format(this.workHackExpGained,"0,0.0000")+" hacking experience
"+S.a.format(this.workStrExpGained,"0,0.0000")+" strength experience
"+S.a.format(this.workDefExpGained,"0,0.0000")+" defense experience
"+S.a.format(this.workDexExpGained,"0,0.0000")+" dexterity experience
"+S.a.format(this.workAgiExpGained,"0,0.0000")+" agility experience
"+S.a.format(this.workChaExpGained,"0,0.0000")+" 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)}this.committingCrimeThruSingFn=!1,this.singFnCrimeWorkerScript=null,document.getElementById("mainmenu-container").style.visibility="visible",this.isWorking=!1,this.resetWorkStatus(),_.Engine.loadLocationContent()},N.prototype.singularityStopWork=function(){if(!this.isWorking)return"";var e;switch(this.workType){case h.CONSTANTS.WorkTypeStudyClass:e=this.finishClass(!0);break;case h.CONSTANTS.WorkTypeCompany:e=this.finishWork(!0,!0);break;case h.CONSTANTS.WorkTypeCompanyPartTime:e=this.finishWorkPartTime(!0);break;case h.CONSTANTS.WorkTypeFaction:e=this.finishFactionWork(!0,!0);break;case h.CONSTANTS.WorkTypeCreateProgram:e=this.finishCreateProgramWork(!0,!0);break;case h.CONSTANTS.WorkTypeCrime:e=this.finishCrime(!0);break;default:return console.log("ERROR: Unrecognized work type"),""}return e},N.prototype.takeDamage=function(e){return this.hp-=e,this.hp<=0&&(this.hospitalize(),!0)},N.prototype.hospitalize=function(){!1===k.Settings.SuppressHospitalizationPopup&&Object(w.dialogBoxCreate)("You were in critical condition! You were taken to the hospital where luckily they were able to save your life. You were charged "+S.a.format(this.max_hp*h.CONSTANTS.HospitalCostPerHp,"$0.000a")),this.loseMoney(this.max_hp*h.CONSTANTS.HospitalCostPerHp),this.hp=this.max_hp},N.prototype.applyForJob=function(e,t=!1){let n=null;""!==this.companyName&&(n=s.Companies[this.companyName]);const i=this.companyPosition,a=s.Companies[this.location];if(!(a instanceof o.Company))return t?"ERROR: Invalid company name: "+this.location+". applyToCompany() failed":void console.error(`Could not find company that matches the location: ${this.location}. Player.applyToCompany() failed`);let r=e;if(!this.isQualified(a,r)){var u=Object(c.getJobRequirementText)(a,r);return!t&&void Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position
"+u)}for(;;){let e=Object(l.getNextCompanyPosition)(r);if(null==e)break;if(!a.hasPosition(e))break;if(!this.isQualified(a,e))break;r=e}if(null!=n&&n.name==a.name&&r.name==i){var p=Object(l.getNextCompanyPosition)(r);if(null==p){if(t)return!1;Object(w.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}else if(a.hasPosition(p)){if(t)return!1;u=Object(c.getJobRequirementText)(a,p);Object(w.dialogBoxCreate)("Unfortunately, you do not qualify for a promotion
"+u)}else{if(t)return!1;Object(w.dialogBoxCreate)("You are already at the highest position for your field! No promotion available")}return}let h=!1,d="";if(null!=n&&n.name!=a.name&&(h=!0,d=n.name,n.playerReputation-=1e3,n.playerReputation<0&&(n.playerReputation=0)),this.companyName=a.name,this.companyPosition=r.name,document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),h){if(t)return!0;Object(w.dialogBoxCreate)([`Congratulations! You were offered a new job at ${this.companyName} as a ${r.name}!`,`You lost 1000 reputation at your old company ${d} because you left.`].join("
"))}else{if(t)return!0;Object(w.dialogBoxCreate)("Congratulations! You were offered a new job at "+this.companyName+" as a "+r.name+"!")}_.Engine.loadLocationContent()},N.prototype.getNextCompanyPosition=function(e,t){var n=null;if(""!==this.companyName&&(n=s.Companies[this.companyName]),null==n||n.name!=e.name)return t;const i=u.CompanyPositions[this.companyPosition];return i.isSoftwareJob()&&t.isSoftwareJob()||i.isITJob()&&t.isITJob()||i.isBusinessJob()&&t.isBusinessJob()||i.isSecurityEngineerJob()&&t.isSecurityEngineerJob()||i.isNetworkEngineerJob()&&t.isNetworkEngineerJob()||i.isSecurityJob()&&t.isSecurityJob()||i.isAgentJob()&&t.isAgentJob()||i.isSoftwareConsultantJob()&&t.isSoftwareConsultantJob()||i.isBusinessConsultantJob()&&t.isBusinessConsultantJob()||i.isPartTimeJob()&&t.isPartTimeJob()?Object(l.getNextCompanyPosition)(i):t},N.prototype.applyForSoftwareJob=function(e=!1){return this.applyForJob(u.CompanyPositions[p.SoftwareCompanyPositions[0]],e)},N.prototype.applyForSoftwareConsultantJob=function(e=!1){return this.applyForJob(u.CompanyPositions[p.SoftwareConsultantCompanyPositions[0]],e)},N.prototype.applyForItJob=function(e=!1){return this.applyForJob(u.CompanyPositions[p.ITCompanyPositions[0]],e)},N.prototype.applyForSecurityEngineerJob=function(e=!1){var t=s.Companies[this.location];return this.isQualified(t,u.CompanyPositions[p.SecurityEngineerCompanyPositions[0]])?this.applyForJob(u.CompanyPositions[p.SecurityEngineerCompanyPositions[0]],e):!e&&void Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position")},N.prototype.applyForNetworkEngineerJob=function(e=!1){var t=s.Companies[this.location];return this.isQualified(t,u.CompanyPositions[p.NetworkEngineerCompanyPositions[0]])?this.applyForJob(u.CompanyPositions[p.NetworkEngineerCompanyPositions[0]],e):!e&&void Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position")},N.prototype.applyForBusinessJob=function(e=!1){return this.applyForJob(u.CompanyPositions[p.BusinessCompanyPositions[0]],e)},N.prototype.applyForBusinessConsultantJob=function(e=!1){return this.applyForJob(u.CompanyPositions[p.BusinessConsultantCompanyPositions[0]],e)},N.prototype.applyForSecurityJob=function(e=!1){return this.applyForJob(u.CompanyPositions[p.SecurityCompanyPositions[2]],e)},N.prototype.applyForAgentJob=function(e=!1){var t=s.Companies[this.location];return this.isQualified(t,u.CompanyPositions[p.AgentCompanyPositions[0]])?this.applyForJob(u.CompanyPositions[p.AgentCompanyPositions[0]],e):!e&&void Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position")},N.prototype.applyForEmployeeJob=function(e=!1){var t=s.Companies[this.location];if(this.isQualified(t,u.CompanyPositions[p.MiscCompanyPositions[1]])){if(this.companyName=t.name,this.companyPosition=p.MiscCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(w.dialogBoxCreate)("Congratulations, you are now employed at "+this.companyName),_.Engine.loadLocationContent()}else{if(e)return!1;Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},N.prototype.applyForPartTimeEmployeeJob=function(e=!1){var t=s.Companies[this.location];if(this.isQualified(t,u.CompanyPositions[p.PartTimeCompanyPositions[1]])){if(this.companyName=t.name,this.companyPosition=p.PartTimeCompanyPositions[1],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(w.dialogBoxCreate)("Congratulations, you are now employed part-time at "+this.companyName),_.Engine.loadLocationContent()}else{if(e)return!1;Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},N.prototype.applyForWaiterJob=function(e=!1){var t=s.Companies[this.location];if(this.isQualified(t,u.CompanyPositions[p.MiscCompanyPositions[0]])){if(this.companyName=t.name,this.companyPosition=p.MiscCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(w.dialogBoxCreate)("Congratulations, you are now employed as a waiter at "+this.companyName),_.Engine.loadLocationContent()}else{if(e)return!1;Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},N.prototype.applyForPartTimeWaiterJob=function(e=!1){var t=s.Companies[this.location];if(this.isQualified(t,u.CompanyPositions[p.PartTimeCompanyPositions[0]])){if(this.companyName=t.name,this.companyPosition=p.PartTimeCompanyPositions[0],document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),e)return!0;Object(w.dialogBoxCreate)("Congratulations, you are now employed as a part-time waiter at "+this.companyName),_.Engine.loadLocationContent()}else{if(e)return!1;Object(w.dialogBoxCreate)("Unforunately, you do not qualify for this position")}},N.prototype.isQualified=function(e,t){var n=e.jobStatReqOffset,i=t.requiredHacking>0?t.requiredHacking+n:0,a=t.requiredStrength>0?t.requiredStrength+n:0,r=t.requiredDefense>0?t.requiredDefense+n:0,o=t.requiredDexterity>0?t.requiredDexterity+n:0,s=t.requiredDexterity>0?t.requiredDexterity+n:0,l=t.requiredCharisma>0?t.requiredCharisma+n:0;return this.hacking_skill>=i&&this.strength>=a&&this.defense>=r&&this.dexterity>=o&&this.agility>=s&&this.charisma>=l&&e.playerReputation>=t.requiredReputation},N.prototype.reapplyAllAugmentations=function(e=!0){console.log("Re-applying augmentations"),e&&this.resetMultipliers();for(let e=0;e=30&&this.money.gte(15e10)&&this.hacking_skill>=1500&&this.strength>=1200&&this.defense>=1200&&this.dexterity>=1200&&this.agility>=1200&&e.push(a);var r=y.b.Daedalus;!r.isBanned&&!r.isMember&&!r.alreadyInvited&&t>=30&&this.money.gte(1e11)&&(this.hacking_skill>=2500||this.strength>=1500&&this.defense>=1500&&this.dexterity>=1500&&this.agility>=1500)&&e.push(r);var o=y.b["The Covenant"];!o.isBanned&&!o.isMember&&!o.alreadyInvited&&t>=30&&this.money.gte(75e9)&&this.hacking_skill>=850&&this.strength>=850&&this.defense>=850&&this.dexterity>=850&&this.agility>=850&&e.push(o);var l=y.b.ECorp;!l.isBanned&&!l.isMember&&!l.alreadyInvited&&this.companyName==b.Locations.AevumECorp&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(l);var c=y.b.MegaCorp;!c.isBanned&&!c.isMember&&!c.alreadyInvited&&this.companyName==b.Locations.Sector12MegaCorp&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(c);var p=y.b["Bachman & Associates"];!p.isBanned&&!p.isMember&&!p.alreadyInvited&&this.companyName==b.Locations.AevumBachmanAndAssociates&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(p);var d=y.b["Blade Industries"];!d.isBanned&&!d.isMember&&!d.alreadyInvited&&this.companyName==b.Locations.Sector12BladeIndustries&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(d);var m=y.b.NWO;!m.isBanned&&!m.isMember&&!m.alreadyInvited&&this.companyName==b.Locations.VolhavenNWO&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(m);var g=y.b["Clarke Incorporated"];!g.isBanned&&!g.isMember&&!g.alreadyInvited&&this.companyName==b.Locations.AevumClarkeIncorporated&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(g);var _=y.b["OmniTek Incorporated"];!_.isBanned&&!_.isMember&&!_.alreadyInvited&&this.companyName==b.Locations.VolhavenOmniTekIncorporated&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(_);var f=y.b["Four Sigma"];!f.isBanned&&!f.isMember&&!f.alreadyInvited&&this.companyName==b.Locations.Sector12FourSigma&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(f);var v=y.b["KuaiGong International"];!v.isBanned&&!v.isMember&&!v.alreadyInvited&&this.companyName==b.Locations.ChongqingKuaiGongInternational&&i>=h.CONSTANTS.CorpFactionRepRequirement&&e.push(v);var k=y.b["Fulcrum Secret Technologies"],C=E.b[O.a[O.b.FulcrumSecretTechnologies]];null==C?console.log("ERROR: Could not find Fulcrum Secret Technologies Server"):!k.isBanned&&!k.isMember&&!k.alreadyInvited&&C.manuallyHacked&&this.companyName==b.Locations.AevumFulcrumTechnologies&&i>=25e4&&e.push(k);var T=y.b.BitRunners,S=this.getHomeComputer(),w=E.b[O.a[O.b.BitRunnersServer]];null==w?console.log("ERROR: Could not find BitRunners Server"):!T.isBanned&&!T.isMember&&w.manuallyHacked&&!T.alreadyInvited&&this.hacking_skill>=500&&S.maxRam>=128&&e.push(T);var M=y.b["The Black Hand"],P=E.b[O.a[O.b.TheBlackHandServer]];null==P?console.log("ERROR: Could not find The Black Hand Server"):!M.isBanned&&!M.isMember&&P.manuallyHacked&&!M.alreadyInvited&&this.hacking_skill>=350&&S.maxRam>=64&&e.push(M);var R=y.b.NiteSec,A=E.b[O.a[O.b.NiteSecServer]];null==A?console.log("ERROR: Could not find NiteSec Server"):!R.isBanned&&!R.isMember&&A.manuallyHacked&&!R.alreadyInvited&&this.hacking_skill>=200&&S.maxRam>=32&&e.push(R);var x=y.b.Chongqing;x.isBanned||x.isMember||x.alreadyInvited||!this.money.gte(2e7)||this.city!=b.Locations.Chongqing||e.push(x);var N=y.b["Sector-12"];N.isBanned||N.isMember||N.alreadyInvited||!this.money.gte(15e6)||this.city!=b.Locations.Sector12||e.push(N);var I=y.b["New Tokyo"];I.isBanned||I.isMember||I.alreadyInvited||!this.money.gte(2e7)||this.city!=b.Locations.NewTokyo||e.push(I);var L=y.b.Aevum;L.isBanned||L.isMember||L.alreadyInvited||!this.money.gte(4e7)||this.city!=b.Locations.Aevum||e.push(L);var B=y.b.Ishima;B.isBanned||B.isMember||B.alreadyInvited||!this.money.gte(3e7)||this.city!=b.Locations.Ishima||e.push(B);var D=y.b.Volhaven;D.isBanned||D.isMember||D.alreadyInvited||!this.money.gte(5e7)||this.city!=b.Locations.Volhaven||e.push(D);var j=y.b["Speakers for the Dead"];!j.isBanned&&!j.isMember&&!j.alreadyInvited&&this.hacking_skill>=100&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.numPeopleKilled>=30&&this.karma<=-45&&this.companyName!=b.Locations.Sector12CIA&&this.companyName!=b.Locations.Sector12NSA&&e.push(j);var W=y.b["The Dark Army"];!W.isBanned&&!W.isMember&&!W.alreadyInvited&&this.hacking_skill>=300&&this.strength>=300&&this.defense>=300&&this.dexterity>=300&&this.agility>=300&&this.city==b.Locations.Chongqing&&this.numPeopleKilled>=5&&this.karma<=-45&&this.companyName!=b.Locations.Sector12CIA&&this.companyName!=b.Locations.Sector12NSA&&e.push(W);var F=y.b["The Syndicate"];!F.isBanned&&!F.isMember&&!F.alreadyInvited&&this.hacking_skill>=200&&this.strength>=200&&this.defense>=200&&this.dexterity>=200&&this.agility>=200&&(this.city==b.Locations.Aevum||this.city==b.Locations.Sector12)&&this.money.gte(1e7)&&this.karma<=-90&&this.companyName!=b.Locations.Sector12CIA&&this.companyName!=b.Locations.Sector12NSA&&e.push(F);var U=y.b.Silhouette;const H=u.CompanyPositions[this.companyPosition];U.isBanned||U.isMember||U.alreadyInvited||null==H||"Chief Technology Officer"!=H.name&&"Chief Financial Officer"!=H.name&&"Chief Executive Officer"!=H.name||!this.money.gte(15e6)||!(this.karma<=-22)||e.push(U);var G=y.b.Tetrads;!G.isBanned&&!G.isMember&&!G.alreadyInvited&&(this.city==b.Locations.Chongqing||this.city==b.Locations.NewTokyo||this.city==b.Locations.Ishima)&&this.strength>=75&&this.defense>=75&&this.dexterity>=75&&this.agility>=75&&this.karma<=-18&&e.push(G);var K=y.b["Slum Snakes"];!K.isBanned&&!K.isMember&&!K.alreadyInvited&&this.strength>=30&&this.defense>=30&&this.dexterity>=30&&this.agility>=30&&this.karma<=-9&&this.money.gte(1e6)&&e.push(K);for(var q=y.b.Netburners,$=0,Y=0,z=0,V=0;V=80&&$>=8&&Y>=4&&z>=100&&e.push(q);var J=y.b["Tian Di Hui"];J.isBanned||J.isMember||J.alreadyInvited||!this.money.gte(1e6)||!(this.hacking_skill>=50)||this.city!=b.Locations.Chongqing&&this.city!=b.Locations.NewTokyo&&this.city!=b.Locations.Ishima||e.push(J);var X=y.b.CyberSec,Q=E.b[O.a[O.b.CyberSecServer]];return null==Q?console.log("ERROR: Could not find CyberSec Server"):!X.isBanned&&!X.isMember&&Q.manuallyHacked&&!X.alreadyInvited&&this.hacking_skill>=50&&e.push(X),e},N.prototype.inGang=function(){return null!=this.gang&&void 0!=this.gang&&this.gang instanceof f.b},N.prototype.startGang=function(e,t){this.gang=new f.b(e,t)},N.prototype.setBitNodeNumber=function(e){this.bitNodeN=e},N.prototype.queueAugmentation=function(e){for(const t in this.queuedAugmentations)if(this.queuedAugmentations[t].name==e)return void console.log("tried to queue "+e+" twice, this may be a bug");for(const t in this.augmentations)if(this.augmentations[t].name==e)return void console.log("tried to queue "+e+" but we already have that aug");this.firstAugPurchased=!0,this.queuedAugmentations.push(new i.d(e))},N.prototype.gainCodingContractReward=function(e,t=1){if(null==e||null==e.type||null==e)return"No reward for this contract";switch(e.type){case r.CodingContractRewardType.FactionReputation:if(null==e.name||!(y.b[e.name]instanceof y.a))return e.type=r.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);var n=h.CONSTANTS.CodingContractBaseFactionRepGain*t;return y.b[e.name].playerReputation+=n,`Gained ${n} faction reputation for ${e.name}`;case r.CodingContractRewardType.FactionReputationAll:const c=h.CONSTANTS.CodingContractBaseFactionRepGain*t,u=["Bladeburners"];var i=this.factions.slice();if(0==(i=i.filter(e=>!u.includes(e))).length)return e.type=r.CodingContractRewardType.Money,this.gainCodingContractReward(e,t);const p=Math.floor(c/i.length);for(const e of i)y.b[e]instanceof y.a&&(y.b[e].playerReputation+=p);return`Gained ${p} reputation for each of the following factions: ${i.toString()}`;case r.CodingContractRewardType.CompanyReputation:if(null==e.name||!(s.Companies[e.name]instanceof o.Company))return e.type=r.CodingContractRewardType.FactionReputationAll,this.gainCodingContractReward(e);n=h.CONSTANTS.CodingContractBaseCompanyRepGain*t;return s.Companies[e.name].playerReputation+=n,`Gained ${n} company reputation for ${e.name}`;case r.CodingContractRewardType.Money:default:var l=h.CONSTANTS.CodingContractBaseMoneyGain*t*a.BitNodeMultipliers.CodingContractMoney;return this.gainMoney(l),`Gained ${S.a.format(l,"$0.000a")}`}},N.prototype.toJSON=function(){return Object(R.Generic_toJSON)("PlayerObject",this)},N.fromJSON=function(e){return Object(R.Generic_fromJSON)(N,e.data)},R.Reviver.constructors.PlayerObject=N;let L=new N},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CONSTANTS={Version:"0.41.2",MaxSkillLevel:975,MilliPerCycle:200,CorpFactionRepRequirement:2e5,BaseCostFor1GBOfRamHome:32e3,BaseCostFor1GBOfRamServer:55e3,BaseCostFor1GBOfRamHacknetNode:3e4,TravelCost:2e5,BaseCostForHacknetNode:1e3,BaseCostForHacknetNodeCore:5e5,HacknetNodeMoneyGainPerLevel:1.6,HacknetNodePurchaseNextMult:1.85,HacknetNodeUpgradeLevelMult:1.04,HacknetNodeUpgradeRamMult:1.28,HacknetNodeUpgradeCoreMult:1.48,HacknetNodeMaxLevel:200,HacknetNodeMaxRam:64,HacknetNodeMaxCores:16,BaseFavorToDonate:150,DonateMoneyToRepDivisor:1e6,FactionReputationToFavorBase:500,FactionReputationToFavorMult:1.02,CompanyReputationToFavorBase:500,CompanyReputationToFavorMult:1.02,NeuroFluxGovernorLevelMult:1.14,ScriptBaseRamCost:1.6,ScriptDomRamCost:25,ScriptWhileRamCost:0,ScriptForRamCost:0,ScriptIfRamCost:0,ScriptHackRamCost:.1,ScriptGrowRamCost:.15,ScriptGrowthAnalyzeRamCost:1,ScriptWeakenRamCost:.15,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,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,ScriptGetHackTimeRamCost:.05,ScriptGetFavorToDonate:.1,ScriptCodingContractBaseRamCost:10,ScriptSingularityFn1RamCost:1,ScriptSingularityFn2RamCost:2,ScriptSingularityFn3RamCost:3,ScriptSingularityFnRamMult:2,ScriptGangApiBaseRamCost:4,ScriptBladeburnerApiBaseRamCost:4,NumNetscriptPorts:20,ServerBaseGrowthRate:1.03,ServerMaxGrowthRate:1.0035,ServerFortifyAmount:.002,ServerWeakenAmount:.05,PurchasedServerLimit:25,PurchasedServerMaxRam:1048576,AugmentationCostMultiplier:5,AugmentationRepMultiplier:2.5,MultipleAugMultiplier:1.9,TorRouterCost:2e5,InfiltrationBribeBaseAmount:1e5,InfiltrationMoneyValue:5e3,InfiltrationRepValue:1.4,WSEAccountCost:2e8,TIXAPICost:5e9,MarketData4SCost:1e9,MarketDataTixApi4SCost:2e10,StockMarketCommission:1e5,HospitalCostPerHp:1e5,IntelligenceCrimeWeight:.05,IntelligenceInfiltrationWeight:.1,IntelligenceCrimeBaseExpGain:.001,IntelligenceProgramBaseExpGain:500,IntelligenceTerminalHackBaseExpGain:200,IntelligenceSingFnBaseExpGain:.002,IntelligenceClassBaseExpGain:1e-6,IntelligenceHackingMissionBaseExpGain:.03,HackingMissionRepToDiffConversion:1e4,HackingMissionRepToRewardConversion:7,HackingMissionSpamTimeIncrease:25e3,HackingMissionTransferAttackIncrease:1.05,HackingMissionMiscDefenseIncrease:1.05,HackingMissionDifficultyToHacking:135,HackingMissionHowToPlay:"Hacking missions are a minigame that, if won, will reward you with faction reputation.

In this game you control a set of Nodes and use them to try and defeat an enemy. Your Nodes are colored blue, while the enemy's are red. There are also other nodes on the map colored gray that initially belong to neither you nor the enemy. The goal of the game is to capture all of the enemy's Database nodes within the time limit. If you fail to do this, you will lose.

Each Node has three stats: Attack, Defense, and HP. There are five different actions that a Node can take:

Attack - Targets an enemy Node and lowers its HP. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Scan - Targets an enemy Node and lowers its Defense. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Weaken - Targets an enemy Node and lowers its Attack. The effectiveness is determined by the owner's Attack, the Player's hacking level, and the enemy's defense.

Fortify - Raises the Node's Defense. The effectiveness is determined by your hacking level.

Overflow - Raises the Node's Attack but lowers its Defense. The effectiveness is determined by your hacking level.

Note that when determining the effectiveness of the above actions, the TOTAL Attack or Defense of the team is used, not just the Attack/Defense of the individual Node that is performing the action.

To capture a Node, you must lower its HP down to 0.

There are six different types of Nodes:

CPU Core - These are your main Nodes that are used to perform actions. Capable of performing every action

Firewall - Nodes with high defense. These Nodes can 'Fortify'

Database - A special type of Node. The player's objective is to conquer all of the enemy's Database Nodes within the time limit. These Nodes cannot perform any actions

Spam - Conquering one of these Nodes will slow the enemy's trace, giving the player additional time to complete the mission. These Nodes cannot perform any actions

Transfer - Conquering one of these nodes will increase the Attack of all of your CPU Cores by a small fixed percentage. These Nodes are capable of performing every action except the 'Attack' action

Shield - Nodes with high defense. These Nodes can 'Fortify'

To assign an action to a Node, you must first select one of your Nodes. This can be done by simply clicking on it. Double-clicking a node will select all of your Nodes of the same type (e.g. select all CPU Core Nodes or all Transfer Nodes). Note that only Nodes that can perform actions (CPU Core, Transfer, Shield, Firewall) can be selected. Selected Nodes will be denoted with a white highlight. After selecting a Node or multiple Nodes, select its action using the Action Buttons near the top of the screen. Every action also has a corresponding keyboard shortcut.

For certain actions such as attacking, scanning, and weakening, the Node performing the action must have a target. To target another node, simply click-and-drag from the 'source' Node to a target. A Node can only have one target, and you can target any Node that is adjacent to one of your Nodes (immediately above, below, or to the side. NOT diagonal). Furthermore, only CPU Cores and Transfer Nodes can target, since they are the only ones that can perform the related actions. To remove a target, you can simply click on the line that represents the connection between one of your Nodes and its target. Alternatively, you can select the 'source' Node and click the 'Drop Connection' button, or press 'd'.

Other Notes:

-Whenever a miscellenaous Node (not owned by the player or enemy) is conquered, the defense of all remaining miscellaneous Nodes that are not actively being targeted will increase by a fixed percentage.

-Whenever a Node is conquered, its stats are significantly reduced

-Miscellaneous Nodes slowly raise their defense over time

-Nodes slowly regenerate health over time.",MillisecondsPer20Hours:72e6,GameCyclesPer20Hours:36e4,MillisecondsPer10Hours:36e6,GameCyclesPer10Hours:18e4,MillisecondsPer8Hours:288e5,GameCyclesPer8Hours:144e3,MillisecondsPer4Hours:144e5,GameCyclesPer4Hours:72e3,MillisecondsPer2Hours:72e5,GameCyclesPer2Hours:36e3,MillisecondsPerHour:36e5,GameCyclesPerHour:18e3,MillisecondsPerHalfHour:18e5,GameCyclesPerHalfHour:9e3,MillisecondsPerQuarterHour:9e5,GameCyclesPerQuarterHour:4500,MillisecondsPerFiveMinutes:3e5,GameCyclesPerFiveMinutes:1500,FactionWorkHacking:"Faction Hacking Work",FactionWorkField:"Faction Field Work",FactionWorkSecurity:"Faction Security Work",WorkTypeCompany:"Working for Company",WorkTypeCompanyPartTime:"Working for Company part-time",WorkTypeFaction:"Working for Faction",WorkTypeCreateProgram:"Working on Create a Program",WorkTypeStudyClass:"Studying or Taking a class at university",WorkTypeCrime:"Committing a crime",ClassStudyComputerScience:"studying Computer Science",ClassDataStructures:"taking a Data Structures course",ClassNetworks:"taking a Networks course",ClassAlgorithms:"taking an Algorithms course",ClassManagement:"taking a Management course",ClassLeadership:"taking a Leadership course",ClassGymStrength:"training your strength at a gym",ClassGymDefense:"training your defense at a gym",ClassGymDexterity:"training your dexterity at a gym",ClassGymAgility:"training your agility at a gym",ClassDataStructuresBaseCost:40,ClassNetworksBaseCost:80,ClassAlgorithmsBaseCost:320,ClassManagementBaseCost:160,ClassLeadershipBaseCost:320,ClassGymBaseCost:120,CrimeShoplift:"shoplift",CrimeRobStore:"rob a store",CrimeMug:"mug someone",CrimeLarceny:"commit larceny",CrimeDrugs:"deal drugs",CrimeBondForgery:"forge corporate bonds",CrimeTraffickArms:"traffick illegal arms",CrimeHomicide:"commit homicide",CrimeGrandTheftAuto:"commit grand theft auto",CrimeKidnap:"kidnap someone for ransom",CrimeAssassination:"assassinate a high-profile target",CrimeHeist:"pull off the ultimate heist",CodingContractBaseFactionRepGain:2500,CodingContractBaseCompanyRepGain:4e3,CodingContractBaseMoneyGain:5e7,TutorialNetworkingText:"Servers are a central part of the game. You start with a single personal server (your home computer) and you can purchase additional servers as you progress through the game. Connecting to other servers and hacking them can be a major source of income and experience. Servers can also be used to run scripts which can automatically hack servers for you.

In order to navigate between machines, use the 'scan' or 'scan-analyze' Terminal command to see all servers that are reachable from your current server. Then, you can use the 'connect [hostname/ip]' command to connect to one of the available machines.

The 'hostname' and 'ifconfig' commands can be used to display the hostname/IP of the server you are currently connected to.",TutorialHackingText:"In the year 2077, currency has become digital and decentralized. People and corporations store their money on servers. By hacking these servers, you can steal their money and gain experience.

Gaining root access


The key to hacking a server is to gain root access to that server. This can be done using the NUKE virus (NUKE.exe). You start the game with a copy of the NUKE virus on your home computer. The NUKE virus attacks the target server's open ports using buffer overflow exploits. When successful, you are granted root administrative access to the machine.

Typically, in order for the NUKE virus to succeed, the target server needs to have at least one of its ports opened. Some servers have no security and will not need any ports opened. Some will have very high security and will need many ports opened. In order to open ports on another server, you will need to run programs that attack the server to open specific ports. These programs can be coded once your hacking skill gets high enough, or they can be purchased if you can find a seller.

In order to determine how many ports need to be opened to successfully NUKE a server, connect to that server and run the 'analyze' command. This will also show you which ports have already been opened.

Once you have enough ports opened and have ran the NUKE virus to gain root access, the server can then be hacked by simply calling the 'hack' command through terminal, or by using a script.

Hacking mechanics


When you execute the hack command, either manually through the terminal or automatically through a script, you attempt to hack the server. This action takes time. The more advanced a server's security is, the more time it will take. Your hacking skill level also affects the hacking time, with a higher hacking skill leading to shorter hacking times. Also, running the hack command manually through terminal is faster than hacking from a script.

Your attempt to hack a server will not always succeed. The chance you have to successfully hack a server is also determined by the server's security and your hacking skill level. Even if your hacking attempt is unsuccessful, you will still gain experience points.

When you successfully hack a server. You steal a certain percentage of that server's total money. This percentage is determined by the server's security and your hacking skill level. The amount of money on a server is not limitless. So, if you constantly hack a server and deplete its money, then you will encounter diminishing returns in your hacking (since you are only hacking a certain percentage). You can increase the amount of money on a server using a script and the grow() function in Netscript.

Server Security


Each server has a security level, typically between 1 and 100. A higher number means the server has stronger security. It is possible for a server to have a security level of 100 or higher, in which case hacking that server will become impossible (0% chance to hack).

As mentioned above, a server's security level is an important factor to consider when hacking. You can check a server's security level using the 'analyze' command, although this only gives an estimate (with 5% uncertainty). You can also check a server's security in a script, using the getServerSecurityLevel(server) function in Netscript. See the Netscript documentation for more details. This function will give you an exact value for a server's security.

Whenever a server is hacked manually or through a script, its security level increases by a small amount. Calling the grow() command in a script will also increase security level of the target server. These actions will make it harder for you to hack the server, and decrease the amount of money you can steal. You can lower a server's security level in a script using the weaken(server) function in Netscript. See the Netscript documentation for more details.

A server has a minimum security level that is equal to one third of its starting security, rounded to the nearest integer. To be more precise:

server.minSecurityLevel = Math.max(1, Math.round(server.startingSecurityLevel / 3))

This means that a server's security will not fall below this value if you are trying to weaken it.",TutorialScriptsText:"Scripts can be used to automate the hacking process. Scripts must be written in the Netscript language. Documentation about the Netscript language can be found in the 'Netscript Programming Language' section of this 'Tutorial' page.

It is highly recommended that you have a basic background in programming to start writing scripts. You by no means need to be an expert. All you need is some familiarity with basic programming constructs like for/while loops, if statements, functions, variables, etc. The Netscript programming language most resembles the Javascript language. Therefore, a good beginner's programming tutorial to read might be this one. Note that while the Netscript language is similar to Javascript, it is not the exact same, so the syntax will vary a little bit.

Running a script requires RAM. The more complex a script is, the more RAM it requires to run. Scripts can be run on any server you have root access to.

Here are some Terminal commands that are useful when working with scripts:

check [script] [args...]
Prints the logs of the script specified by the name and arguments to Terminal. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'check' it you must also add the 'foodnstuff' argument to the check command as so:
check foo.script foodnstuff

free
Shows the current server's RAM usage and availability

kill [script] [args...]
Stops a script that is running with the specified script name and arguments. Arguments should be separated by a space. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 1 and 2, then just typing 'kill foo.script' will not work. You have to use 'kill foo.script 1 2'.

mem [script] [-t] [n]
Check how much RAM a script requires to run with n threads

nano [script]
Create/Edit a script. The name of the script must end with the '.script' extension

ps
Displays all scripts that are actively running on the current server

rm [script]
Delete a script

run [script] [-t] [n] [args...]
Run a script with n threads and the specified arguments. Each argument should be separated by a space. Both the arguments and thread specification are optional. If neither are specified, then the script will be run single-threaded with no arguments.
Examples:
run foo.script
The command above will run 'foo.script' single-threaded with no arguments.
run foo.script -t 10
The command above will run 'foo.script' with 10 threads and no arguments.
run foo.script foodnstuff sigma-cosmetics 10
The command above will run 'foo.script' single-threaded with three arguments: [foodnstuff, sigma-cosmetics, 10]
run foo.script -t 50 foodnstuff
The command above will run 'foo.script' with 50 threads and a single argument: [foodnstuff]

tail [script] [args...]
Displays the logs of the script specified by the name and arguments. Note that scripts are uniquely identified by their arguments as well as their name. For example, if you ran a script 'foo.script' with the argument 'foodnstuff' then in order to 'tail' it you must also add the 'foodnstuff' argument to the tail command as so:
tail foo.script foodnstuff

top
Displays all active scripts and their RAM usage

Multithreading scripts


Scripts can be multithreaded. A multithreaded script runs the script's code once in each thread. The result is that every call to the hack(), grow(), and weaken() Netscript functions will have its effect multiplied by the number of threads. For example, if a normal single-threaded script is able to hack $10,000, then running the same script with 5 threads would yield $50,000.

When multithreading a script, the total RAM cost can be calculated by simply multiplying the base RAM cost of the script with the number of threads, where the base cost refers to the amount of RAM required to run the script single-threaded. In the terminal, you can run the 'mem [scriptname] -t n' command to see how much RAM a script requires with n threads.

Every method for running a script has an option for making it multihreaded. To run a script with n threads from a Terminal:
run [scriptname] -t n

Using Netscript commands:
run('scriptname.script', n);
exec('scriptname.script, 'targetServer', n);

Notes about how scripts work offline


The scripts that you write and execute are interpreted in Javascript. For this reason, it is not possible for these scripts to run while offline (when the game is closed). It is important to note that for this reason, conditionals such as if/else statements and certain commands such as purchaseHacknetNode() or nuke() will not work while the game is offline.

However, Scripts WILL continue to generate money and hacking exp for you while the game is offline. This offline production is based off of the scripts' production while the game is online.

grow() and weaken() are two Netscript commands that will also be applied when the game is offline, although at a slower rate compared to if the game was open. This is done by having each script keep track of the rate at which the grow() and weaken() commands are called when the game is online. These calculated rates are used to determine how many times these function calls would be made while the game is offline.

Also, note that because of the way the Netscript interpreter is implemented, whenever you reload or re-open the game all of the scripts that you are running will start running from the BEGINNING of the code. The game does not keep track of where exactly the execution of a script is when it saves/loads.


",TutorialNetscriptText:"Netscript is a programming language implemented for this game. There are two versions of Netscript: Netscript 1.0 and Netscript 2.0 (NetscriptJS).

Click here for Bitburner's official Netscript documentation",TutorialTravelingText:"There are six major cities in the world that you are able to travel to:

Aevum
Chongqing
Sector-12
New Tokyo
Ishima
Volhaven

To travel between cities, visit your current city's travel agency through the 'World' page. From the travel agency you can travel to any other city. Doing so costs money.

Each city has its own set of companies and unique locations. Also, certain content is only available to you if you are in certain cities, so get exploring!",TutorialCompaniesText:"Hacking is not the only way to gain money and experience! Located around the world are many different companies which you can work for. By working for a company you can earn money, train your various labor skills, and unlock powerful passive perks.

To apply for a job, visit the company you want to work for through the 'World' menu. The company page will have options that let you apply to positions in the company. There might be several different positions you can apply for, ranging from software engineer to business analyst to security officer.

When you apply for a job, you will get the offer if your stats are high enough. Your first position at a company will be an entry-level position such as 'intern'. Once you get the job, an button will appear on the company page that allows you to work for the company. Click this button to start working.

Working occurs in 8 hour shifts. Once you start working, you will begin earning money, experience, and reputation. The rate at which you money and experience depends on the company and your position. The amount of reputation you gain for your company is based on your job performance, which is affected by your stats. Different positions value different stats. When you are working, you are unable to perform any other actions such as using your terminal or visiting other locations (However, note that any scripts you have running on servers will continue to run as you work!). It is possible to cancel your work shift before the 8 hours is up. However, if you have a full-time job, then cancelling a shift early will result in you gaining only half of the reputation that you had earned up to that point. There are also part-time/consultant jobs available where you will not be penalized if you cancel a work shift early. However, these positions pay less than full-time positions.

As you continue to work at a company, you will gain more and more reputation at that company. When your stats and reputation are high enough, you can get a promotion. You can apply for a promotion on the company page, just like you applied for the job originally. Higher positions at a company provide better salaries and stat gains.

Infiltrating Companies


Many companies have facilities that you can attempt to infiltrate. By infiltrating, you can steal classified company secrets and then sell these for money or for faction reputation. To try and infiltrate a company, visit a company through the 'World' menu. There will be an option that says 'Infiltrate Company'.

When infiltrating a company, you must progress through clearance levels in the facility. Every clearance level has some form of security that you must get past. There are several forms of security, ranging from high-tech security systems to armed guards. For each form of security, there are a variety of options that you can choose to try and bypass the security. Examples include hacking the security, engaging in combat, assassination, or sneaking past the security. The chance to succeed for each option is determined in part by your stats. So, for example, trying to hack the security system relies on your hacking skill, whereas trying to sneak past the security relies on your agility level.

The facility has a 'security level' that affects your chance of success when trying to get past a clearance level. Every time you advance to the next clearance level, the facility's security level will increase by a fixed amount. Furthermore the options you choose and whether you succeed or fail will affect the security level as well. For example, if you try to kill a security guard and fail, the security level will increase by a lot. If you choose to sneak past security and succeed, the security level will not increase at all.

Every 5 clearance levels, you will steal classified company secrets that can be sold for money or faction reputation. However, in order to sell these secrets you must successfully escape the facility using the 'Escape' option. Furthermore, companies have a max clearance level. If you reach the max clearance level you will automatically escape the facility with all of your stolen secrets.

",TutorialFactionsText:"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.

It is possible to join multiple factions if you receive invitations from them. However, note that joining a faction may prevent you from joining other rival factions.

The 'Factions' link on the menu brings up a list of all factions that you have joined. You can select a Faction on this list to go to that Faction page. This page displays general information about the Faction and also lets you perform work for the faction. Working for a Faction is similar to working for a company except that you don't get paid a salary. You will only earn reputation in your Faction and train your stats. Also, cancelling work early when working for a Faction does NOT result in reduced experience/reputation earnings.

Earning reputation for a Faction unlocks powerful Augmentations. Purchasing and installing these Augmentations will upgrade your abilities. The Augmentations that are available to unlock vary from faction to faction.",TutorialAugmentationsText:"Advances in science and medicine have lead to powerful new technologies that allow people to augment themselves beyond normal human capabilities. There are many different types of Augmentations, ranging from cybernetic to genetic to biological. Acquiring these Augmentations enhances the user's physical and mental faculties.

Because of how powerful these Augmentations are, the technology behind them is kept private and secret by the corporations and organizations that create them. Therefore, the only way for the player to obtain Augmentations is through Factions. After joining a Faction and earning enough reputation in it, you will be able to purchase its Augmentations. Different Factions offer different Augmentations. Augmentations must be purchased in order to be installed, and they are fairly expensive.

When you purchase an Augmentation, the price of purchasing another Augmentation increases by 90%. This multiplier stacks for each Augmentation you purchase. You will not gain the benefits of your purchased Augmentations until you install them. You can choose to install Augmentations through the 'Augmentations' menu tab. Once you install your purchased Augmentations, their costs are reset back to the original price.

Unfortunately, installing Augmentations has side effects. You will lose most of the progress you've made, including your skills, stats, and money. You will have to start over, but you will have all of the Augmentations you have installed to help you progress.

To summarize, here is a list of everything you will LOSE when you install an Augmentation:

Stats/Skills
Money
Scripts on all servers EXCEPT your home computer
Purchased servers
Hacknet Nodes
Company/faction reputation
Jobs and Faction memberships
Programs
Stocks
TOR router

Here is everything you will KEEP when you install an Augmentation:

Every Augmentation you have installed
Scripts on your home computer
RAM and CPU Core Upgrades on your home computer
World Stock Exchange account and TIX API Access
",LatestUpdate:"\n v0.41.2\n * IMPORTANT - Netscript Changes:\n ** rm() now takes an optional parameter that lets you specify on which server to delete the file\n ** Added growthAnalyze() Netscript function\n\n * Gang Changes:\n ** UI now displays your chance to win a clash with other gangs\n ** Added getChanceToWinClash() function to the Gang API\n ** Added getEquipmentType() function to the Gang API\n ** Added several new hacking-based equipment and Augmentations\n ** Rebalanced several equipment/upgrades to give less defense\n ** Wanted level gain rate is now be slightly higher for all tasks\n ** Rebalanced parameters for \"hacking\" tasks\n\n * Added new Main Menu configuration in .fconf: \"compact\"\n * Added the terminal command 'expr', which can be used to evaluate simple mathematical expressions\n * Bug Fix: Can no longer purchase duplicate equipment/Augmentations through gang.purchaseEquipment()\n * Bug Fix: scp() should no longer throw errors when used with 2-arguments and an array of files\n * Bug Fix: Coding Contracts no longer give money in BitNode-8\n * Bug Fix: In Bladeburner, you can no longer start a BlackOp through the Netscript API if it has already been completed\n * Bug Fix: In Bladeburner, fixed a bug which caused the configured 'automate' actions to occasionally be switched to other actions\n * Bug Fix: 'Return to World' button at locations no longer accumulates event listeners\n * Bug Fix: Working & taking classes now continuously add/subtract money during the action, instead of doing it at completion\n * Bug Fix: Top-right overview panel now displays negative money using '-' instead of '()'\n * Bug Fix: Stock Market UI should no longer show 'NaN' profit immediately after buying a stock\n "}},function(e,t,n){"use strict";function i(e,t={}){const n=document.createElement(e);return void 0!==t.id&&(n.id=t.id),void 0!==t.class&&(n.className=t.class),void 0!==t.innerHTML&&(n.innerHTML=t.innerHTML),void 0!==t.innerText&&(n.innerText=t.innerText),void 0!==t.tabIndex&&(n.tabIndex=t.tabIndex),function(e,t){void 0!==t.text&&(e.text=t.text),void 0!==t.href&&(e.href=t.href),void 0!==t.target&&(e.target=t.target)}(n,t),function(e,t){void 0!==t.name&&(e.name=t.name),void 0!==t.value&&(e.value=t.value),void 0!==t.type&&(e.type=t.type),void 0!==t.checked&&(e.checked=t.checked),void 0!==t.pattern&&(e.pattern=t.pattern),void 0!==t.maxLength&&(e.maxLength=t.maxLength),void 0!==t.placeholder&&(e.placeholder=t.placeholder)}(n,t),function(e,t){void 0!==t.for&&(e.htmlFor=t.for)}(n,t),function(e,t){void 0!==t.clickListener&&e.addEventListener("click",t.clickListener),void 0!==t.inputListener&&e.addEventListener("input",t.inputListener),void 0!==t.changeListener&&e.addEventListener("change",t.changeListener),void 0!==t.onkeyup&&e.addEventListener("keyup",t.onkeyup),void 0!==t.onkeydown&&e.addEventListener("keydown",t.onkeydown),void 0!==t.onfocus&&e.addEventListener("focus",t.onfocus)}(n,t),function(e,t){void 0!==t.display&&(e.style.display=t.display),void 0!==t.visibility&&(e.style.visibility=t.visibility),void 0!==t.margin&&(e.style.margin=t.margin),void 0!==t.marginLeft&&(e.style.marginLeft=t.marginLeft),void 0!==t.marginTop&&(e.style.marginTop=t.marginTop),void 0!==t.padding&&(e.style.padding=t.padding),void 0!==t.color&&(e.style.color=t.color),void 0!==t.border&&(e.style.border=t.border),void 0!==t.float&&(e.style.cssFloat=t.float),void 0!==t.fontSize&&(e.style.fontSize=t.fontSize),void 0!==t.whiteSpace&&(e.style.whiteSpace=t.whiteSpace),void 0!==t.width&&(e.style.width=t.width),void 0!==t.backgroundColor&&(e.style.backgroundColor=t.backgroundColor),void 0!==t.position&&(e.style.position=t.position)}(n,t),function(e,t){void 0!==t.tooltip&&""!==t.tooltip?(e.className+=" tooltip",e.appendChild(i("span",{class:"tooltiptext",innerHTML:t.tooltip}))):void 0!==t.tooltipleft?(e.className+=" tooltip",e.appendChild(i("span",{class:"tooltiptextleft",innerHTML:t.tooltipleft}))):void 0!==t.tooltipsmall&&(e.className+=" tooltip",e.appendChild(i("span",{class:"tooltiptext smallfont",innerHTML:t.tooltipsmall})))}(n,t),n}Object.defineProperty(t,"__esModule",{value:!0}),t.createElement=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(37);function a(e){return e.every(i.isString)}t.replaceAt=function(e,t,n){return e.substr(0,t)+n+e.substr(t+n.length)},t.convertTimeMsToTimeElapsedString=function(e){const t=Math.floor(e/1e3),n=Math.floor(t/86400),i=t%86400,a=Math.floor(i/3600),r=i%3600,o=Math.floor(r/60);let s="";return n>0&&(s+=`${n} days `),a>0&&(s+=`${a} hours `),o>0&&(s+=`${o} minutes `),s+=`${r%60} seconds `},t.longestCommonStart=function(e){if(!a(e))return"";if(0===e.length)return"";const t=e.concat().sort(),n=t[0],i=t[t.length-1],r=n.length;let o=0;const s=(e,t)=>e.toUpperCase()===t.toUpperCase();for(;o=0;e--)if(1===n[e].nodeType)return!0;return!1},t.generateRandomString=function(e){let t="";const n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";for(let i=0;i{t.delay=null,n()},e),t.delayResolve=n})}function m(e,t,n=null){var i="";null!=n&&(i=" (Line "+_(n,e)+")");return"|"+e.serverIp+"|"+e.name+"|"+t+i}function g(e,t,n,a,o=1){if(null!=(h=Object(r.d)(t,n,e)))return a.scriptRef.log(t+" is already running on "+e.hostname),u.resolve(!1);for(var l=0;ld?(a.scriptRef.log("Cannot run script "+t+"(t="+o+") on "+e.hostname+" because there is not enough available RAM!"),u.resolve(!1)):(null==a.disableLogs.ALL&&null==a.disableLogs.exec&&null==a.disableLogs.run&&null==a.disableLogs.spawn&&a.scriptRef.log("Running script: "+t+" on "+e.hostname+" with "+o+" threads and args: "+Object(s.arrayToString)(n)+". May take a few seconds to start up..."),(h=new r.b(c,n)).threads=o,e.runningScripts.push(h),Object(i.c)(h,e),u.resolve(!0))}return a.scriptRef.log("Could not find script "+t+" on "+e.hostname),u.resolve(!1)}function _(e,t){var n=t.scriptRef.scriptRef.code;try{return((n=n.substring(0,e.start)).match(/\n/g)||[]).length+1}catch(e){return-1}}function y(e){if(!Object(c.isString)(e))return!1;let t=e.split("|");if(4!=t.length)return!1;var n=t[1];return!!Object(l.isValidIPAddress)(n)}u.config({warnings:!1,longStackTraces:!1,cancellation:!0,monitoring:!1})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(50);function a(e,t){const n=`${e}`;i.getElementById("terminal-input").insertAdjacentHTML("beforebegin",n),function(){const e=i.getElementById("terminal-container");e.scrollTop=e.scrollHeight}()}t.post=function(e){a(e)},t.hackProgressBarPost=function(e){a(e,"hack-progress-bar")},t.hackProgressPost=function(e){a(e,"hack-progress")}},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"Engine",function(){return J});var i=n(9),a=n(78),r=(n(15),n(27)),o=n(16),s=n(2),l=n(42),c=n(107),u=n(4),p=n(3),h=n(73),d=n(62),m=n(21),g=n(54),_=n(29),y=n(116),f=n(91),b=n(90),v=(n(26),n(18)),E=n(56),k=n(1),O=n(23),C=n(104),T=n(12),S=n(44),w=n(84),M=n(5),P=n(61),R=n(33),A=n(75),x=n(38),N=n(52),I=n(41),L=n(24),B=n(0),D=n(82),j=n(53),W=n(70),F=n(28),U=n(11),H=n(19),G=n(115),K=n(64),q=n(30),$=n(22),Y=n(48),z=n(32),V=n(13);n(191),n(167),n(165),n(163),n(161),n(159),n(157),n(155),n(153),n(151),n(149),n(147),n(145),n(143),n(141);e(document).keydown(function(e){if(!0!==H.Settings.DisableHotkeys){if(!(B.a.isWorking||j.b||N.c||f.a))if(84==e.keyCode&&e.altKey)e.preventDefault(),J.loadTerminalContent();else if(e.keyCode===z.KEY.C&&e.altKey)e.preventDefault(),J.loadCharacterContent();else if(e.keyCode===z.KEY.E&&e.altKey)e.preventDefault(),J.loadScriptEditorContent();else if(e.keyCode===z.KEY.S&&e.altKey)e.preventDefault(),J.loadActiveScriptsContent();else if(e.keyCode===z.KEY.H&&e.altKey)e.preventDefault(),J.loadHacknetNodesContent();else if(e.keyCode===z.KEY.W&&e.altKey)e.preventDefault(),J.loadWorldContent();else if(e.keyCode===z.KEY.J&&e.altKey)e.preventDefault(),J.loadJobContent();else if(e.keyCode===z.KEY.R&&e.altKey)e.preventDefault(),J.loadTravelContent();else if(e.keyCode===z.KEY.P&&e.altKey)e.preventDefault(),J.loadCreateProgramContent();else if(e.keyCode===z.KEY.F&&e.altKey){if(V.routing.isOn(V.Page.Terminal)&&S.a.ENABLE_BASH_HOTKEYS)return;e.preventDefault(),J.loadFactionsContent()}else e.keyCode===z.KEY.A&&e.altKey?(e.preventDefault(),J.loadAugmentationsContent()):e.keyCode===z.KEY.U&&e.altKey&&(e.preventDefault(),J.loadTutorialContent());e.keyCode===z.KEY.O&&e.altKey&&(e.preventDefault(),Object(a.b)())}});const J={version:"",Debug:!0,overview:new y.a,Clickables:{terminalMainMenuButton:null,characterMainMenuButton:null,scriptEditorMainMenuButton:null,activeScriptsMainMenuButton:null,hacknetNodesMainMenuButton:null,worldMainMenuButton:null,travelMainMenuButton:null,jobMainMenuButton:null,stockmarketMainMenuButton:null,createProgramMainMenuButton:null,factionsMainMenuButton:null,augmentationsMainMenuButton:null,tutorialMainMenuButton:null,bladeburnerMenuButton:null,corporationMenuButton:null,gangMenuButton:null,devMainMenuButton:null,saveMainMenuButton:null,deleteMainMenuButton:null,tutorialNetworkingButton:null,tutorialHackingButton:null,tutorialScriptsButton:null,tutorialNetscriptButton:null,tutorialTravelingButton:null,tutorialCompaniesButton:null,tutorialFactionsButton:null,tutorialAugmentationsButton:null,tutorialBackButton:null},Display:{progress:null,statusText:null,hacking_skill:null,terminalContent:null,characterContent:null,scriptEditorContent:null,activeScriptsContent:null,hacknetNodesContent:null,worldContent:null,createProgramContent:null,factionsContent:null,factionContent:null,factionAugmentationsContent:null,augmentationsContent:null,tutorialContent:null,infiltrationContent:null,stockMarketContent:null,locationContent:null,workInProgressContent:null,redPillContent:null,cinematicTextContent:null,missionContent:null,characterInfo:null},_lastUpdate:(new Date).getTime(),_idleSpeed:200,loadTerminalContent:function(){J.hideAllContent(),J.Display.terminalContent.style.display="block",V.routing.navigateTo(V.Page.Terminal),document.getElementById("terminal-menu-link").classList.add("active")},loadCharacterContent:function(){J.hideAllContent(),J.Display.characterContent.style.display="block",J.displayCharacterInfo(),V.routing.navigateTo(V.Page.CharacterInfo),document.getElementById("stats-menu-link").classList.add("active")},loadScriptEditorContent:function(e="",t=""){J.hideAllContent(),J.Display.scriptEditorContent.style.display="block";var n=ace.edit("javascript-editor");""!=e&&(document.getElementById("script-editor-filename").value=e,n.setValue(t)),n.focus(),Object(F.h)(),V.routing.navigateTo(V.Page.ScriptEditor),document.getElementById("create-script-menu-link").classList.add("active")},loadActiveScriptsContent:function(){J.hideAllContent(),J.Display.activeScriptsContent.style.display="block",Object(d.c)(),V.routing.navigateTo(V.Page.ActiveScripts),document.getElementById("active-scripts-menu-link").classList.add("active")},loadHacknetNodesContent:function(){J.hideAllContent(),J.Display.hacknetNodesContent.style.display="block",Object(P.b)(),V.routing.navigateTo(V.Page.HacknetNodes),document.getElementById("hacknet-nodes-menu-link").classList.add("active")},loadWorldContent:function(){J.hideAllContent(),J.Display.worldContent.style.display="block",J.displayWorldInfo(),V.routing.navigateTo(V.Page.World),document.getElementById("city-menu-link").classList.add("active")},loadCreateProgramContent:function(){J.hideAllContent(),J.Display.createProgramContent.style.display="block",Object(O.b)(),V.routing.navigateTo(V.Page.CreateProgram),document.getElementById("create-program-menu-link").classList.add("active")},loadFactionsContent:function(){J.hideAllContent(),J.Display.factionsContent.style.display="block",J.displayFactionsInfo(),V.routing.navigateTo(V.Page.Factions),document.getElementById("factions-menu-link").classList.add("active")},loadFactionContent:function(){J.hideAllContent(),J.Display.factionContent.style.display="block",V.routing.navigateTo(V.Page.Faction)},loadAugmentationsContent:function(){J.hideAllContent(),J.Display.augmentationsContent.style.display="block",Object(m.g)(),V.routing.navigateTo(V.Page.Augmentations),document.getElementById("augmentations-menu-link").classList.add("active")},loadTutorialContent:function(){J.hideAllContent(),J.Display.tutorialContent.style.display="block",J.displayTutorialContent(),V.routing.navigateTo(V.Page.Tutorial),document.getElementById("tutorial-menu-link").classList.add("active")},loadDevMenuContent:function(){J.hideAllContent(),Object(C.b)(),V.routing.navigateTo(V.Page.DevMenu),document.getElementById("dev-menu-link").classList.add("active")},loadLocationContent:function(){J.hideAllContent(),J.Display.locationContent.style.display="block";try{Object(w.a)()}catch(e){Object(l.a)(e),console.error(e)}V.routing.navigateTo(V.Page.Location)},loadTravelContent:function(){switch(B.a.city){case M.Locations.Aevum:B.a.location=M.Locations.AevumTravelAgency;break;case M.Locations.Chongqing:B.a.location=M.Locations.ChongqingTravelAgency;break;case M.Locations.Sector12:B.a.location=M.Locations.Sector12TravelAgency;break;case M.Locations.NewTokyo:B.a.location=M.Locations.NewTokyoTravelAgency;break;case M.Locations.Ishima:B.a.location=M.Locations.IshimaTravelAgency;break;case M.Locations.Volhaven:B.a.location=M.Locations.VolhavenTravelAgency;break;default:Object(i.dialogBoxCreate)("ERROR: Invalid city. This is a bug please contact game dev")}J.loadLocationContent()},loadJobContent:function(){""!=B.a.companyName?(B.a.location=B.a.companyName,J.loadLocationContent()):Object(i.dialogBoxCreate)("You do not currently have a job! You can visit various companies in the city and try to find a job.")},loadWorkInProgressContent:function(){J.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",J.Display.workInProgressContent.style.display="block",V.routing.navigateTo(V.Page.WorkInProgress)},loadRedPillContent:function(){J.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",J.Display.redPillContent.style.display="block",V.routing.navigateTo(V.Page.RedPill)},loadCinematicTextContent:function(){J.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",J.Display.cinematicTextContent.style.display="block",V.routing.navigateTo(V.Page.CinematicText)},loadInfiltrationContent:function(){J.hideAllContent(),J.Display.infiltrationContent.style.display="block",V.routing.navigateTo(V.Page.Infiltration)},loadStockMarketContent:function(){J.hideAllContent(),J.Display.stockMarketContent.style.display="block",V.routing.navigateTo(V.Page.StockMarket),Object($.g)()},loadGangContent:function(){J.hideAllContent(),document.getElementById("gang-container")||B.a.inGang()?(B.a.gang.displayGangContent(B.a),V.routing.navigateTo(V.Page.Gang)):(J.loadTerminalContent(),V.routing.navigateTo(V.Page.Terminal))},loadMissionContent:function(){J.hideAllContent(),document.getElementById("mainmenu-container").style.visibility="hidden",document.getElementById("character-overview-wrapper").style.visibility="hidden",J.Display.missionContent.style.display="block",V.routing.navigateTo(V.Page.Mission)},loadCorporationContent:function(){B.a.corporation instanceof E.a&&(J.hideAllContent(),document.getElementById("character-overview-wrapper").style.visibility="hidden",B.a.corporation.createUI(),V.routing.navigateTo(V.Page.Corporation))},loadBladeburnerContent:function(){if(B.a.bladeburner instanceof _.a)try{J.hideAllContent(),V.routing.navigateTo(V.Page.Bladeburner),B.a.bladeburner.createContent()}catch(e){Object(l.a)(e)}},hideAllContent:function(){J.Display.terminalContent.style.display="none",J.Display.characterContent.style.display="none",J.Display.scriptEditorContent.style.display="none",J.Display.activeScriptsContent.style.display="none",J.Display.hacknetNodesContent.style.display="none",J.Display.worldContent.style.display="none",J.Display.createProgramContent.style.display="none",J.Display.factionsContent.style.display="none",J.Display.factionContent.style.display="none",J.Display.factionAugmentationsContent.style.display="none",J.Display.augmentationsContent.style.display="none",J.Display.tutorialContent.style.display="none",J.Display.locationContent.style.display="none",J.Display.workInProgressContent.style.display="none",J.Display.redPillContent.style.display="none",J.Display.cinematicTextContent.style.display="none",J.Display.infiltrationContent.style.display="none",J.Display.stockMarketContent.style.display="none",J.Display.missionContent.style.display="none",document.getElementById("gang-container")&&(document.getElementById("gang-container").style.display="none"),B.a.inGang()&&B.a.gang.clearUI(),B.a.corporation instanceof E.a&&B.a.corporation.clearUI(),B.a.bladeburner instanceof _.a&&B.a.bladeburner.clearContent(),J.aevumLocationsList.style.display="none",J.chongqingLocationsList.style.display="none",J.sector12LocationsList.style.display="none",J.newTokyoLocationsList.style.display="none",J.ishimaLocationsList.style.display="none",J.volhavenLocationsList.style.display="none",document.getElementById("terminal-menu-link").classList.remove("active"),document.getElementById("create-script-menu-link").classList.remove("active"),document.getElementById("active-scripts-menu-link").classList.remove("active"),document.getElementById("create-program-menu-link").classList.remove("active"),document.getElementById("stats-menu-link").classList.remove("active"),document.getElementById("factions-menu-link").classList.remove("active"),document.getElementById("augmentations-menu-link").classList.remove("active"),document.getElementById("hacknet-nodes-menu-link").classList.remove("active"),document.getElementById("city-menu-link").classList.remove("active"),document.getElementById("tutorial-menu-link").classList.remove("active"),document.getElementById("options-menu-link").classList.remove("active"),document.getElementById("dev-menu-link").classList.remove("active"),document.getElementById("bladeburner-menu-link").classList.remove("active"),document.getElementById("corporation-menu-link").classList.remove("active"),document.getElementById("gang-menu-link").classList.remove("active"),Object(C.a)()},displayCharacterOverviewInfo:function(){J.overview.update();const e=document.getElementById("character-overview-save-button");H.Settings.AutosaveInterval?e.classList.remove("flashing-button"):e.classList.add("flashing-button")},displayCharacterInfo:function(){Object(r.removeChildrenFromElement)(J.Display.characterInfo);var e="";""!==B.a.companyPosition&&(e=B.a.companyPosition);var t="";B.a.intelligence>0&&(t="Intelligence: "+B.a.intelligence.toLocaleString()+"
");let n="";if(B.a.sourceFiles.length>0&&(n="Time played since last Bitnode destroyed: "+Object(p.convertTimeMsToTimeElapsedString)(B.a.playtimeSinceLastBitnode)+"
"),J.Display.characterInfo.appendChild(Object(s.createElement)("pre",{innerHTML:"General

Current City: "+B.a.city+"

Employer: "+B.a.companyName+"
Job Title: "+e+"

Money: $"+Object(p.formatNumber)(B.a.money.toNumber(),2)+"


Stats

Hacking Level: "+B.a.hacking_skill.toLocaleString()+" ("+u.a.format(B.a.hacking_exp,"(0.000a)")+" experience)
Strength: "+B.a.strength.toLocaleString()+" ("+u.a.format(B.a.strength_exp,"(0.000a)")+" experience)
Defense: "+B.a.defense.toLocaleString()+" ("+u.a.format(B.a.defense_exp,"(0.000a)")+" experience)
Dexterity: "+B.a.dexterity.toLocaleString()+" ("+u.a.format(B.a.dexterity_exp,"(0.000a)")+" experience)
Agility: "+B.a.agility.toLocaleString()+" ("+u.a.format(B.a.agility_exp,"(0.000a)")+" experience)
Charisma: "+B.a.charisma.toLocaleString()+" ("+u.a.format(B.a.charisma_exp,"(0.000a)")+" experience)
"+t+"

Multipliers

Hacking Chance multiplier: "+Object(p.formatNumber)(100*B.a.hacking_chance_mult,2)+"%
Hacking Speed multiplier: "+Object(p.formatNumber)(100*B.a.hacking_speed_mult,2)+"%
Hacking Money multiplier: "+Object(p.formatNumber)(100*B.a.hacking_money_mult,2)+"%
Hacking Growth multiplier: "+Object(p.formatNumber)(100*B.a.hacking_grow_mult,2)+"%

Hacking Level multiplier: "+Object(p.formatNumber)(100*B.a.hacking_mult,2)+"%
Hacking Experience multiplier: "+Object(p.formatNumber)(100*B.a.hacking_exp_mult,2)+"%

Strength Level multiplier: "+Object(p.formatNumber)(100*B.a.strength_mult,2)+"%
Strength Experience multiplier: "+Object(p.formatNumber)(100*B.a.strength_exp_mult,2)+"%

Defense Level multiplier: "+Object(p.formatNumber)(100*B.a.defense_mult,2)+"%
Defense Experience multiplier: "+Object(p.formatNumber)(100*B.a.defense_exp_mult,2)+"%

Dexterity Level multiplier: "+Object(p.formatNumber)(100*B.a.dexterity_mult,2)+"%
Dexterity Experience multiplier: "+Object(p.formatNumber)(100*B.a.dexterity_exp_mult,2)+"%

Agility Level multiplier: "+Object(p.formatNumber)(100*B.a.agility_mult,2)+"%
Agility Experience multiplier: "+Object(p.formatNumber)(100*B.a.agility_exp_mult,2)+"%

Charisma Level multiplier: "+Object(p.formatNumber)(100*B.a.charisma_mult,2)+"%
Charisma Experience multiplier: "+Object(p.formatNumber)(100*B.a.charisma_exp_mult,2)+"%

Hacknet Node production multiplier: "+Object(p.formatNumber)(100*B.a.hacknet_node_money_mult,2)+"%
Hacknet Node purchase cost multiplier: "+Object(p.formatNumber)(100*B.a.hacknet_node_purchase_cost_mult,2)+"%
Hacknet Node RAM upgrade cost multiplier: "+Object(p.formatNumber)(100*B.a.hacknet_node_ram_cost_mult,2)+"%
Hacknet Node Core purchase cost multiplier: "+Object(p.formatNumber)(100*B.a.hacknet_node_core_cost_mult,2)+"%
Hacknet Node level upgrade cost multiplier: "+Object(p.formatNumber)(100*B.a.hacknet_node_level_cost_mult,2)+"%

Company reputation gain multiplier: "+Object(p.formatNumber)(100*B.a.company_rep_mult,2)+"%
Faction reputation gain multiplier: "+Object(p.formatNumber)(100*B.a.faction_rep_mult,2)+"%
Salary multiplier: "+Object(p.formatNumber)(100*B.a.work_money_mult,2)+"%
Crime success multiplier: "+Object(p.formatNumber)(100*B.a.crime_success_mult,2)+"%
Crime money multiplier: "+Object(p.formatNumber)(100*B.a.crime_money_mult,2)+"%


Misc

Servers owned: "+B.a.purchasedServers.length+"
Hacknet Nodes owned: "+B.a.hacknetNodes.length+"
Augmentations installed: "+B.a.augmentations.length+"
Time played since last Augmentation: "+Object(p.convertTimeMsToTimeElapsedString)(B.a.playtimeSinceLastAug)+"
"+n+"Time played: "+Object(p.convertTimeMsToTimeElapsedString)(B.a.totalPlaytime)})),0!==B.a.sourceFiles.length){var i="BitNode"+B.a.bitNodeN;J.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",innerHTML:"
Current BitNode: "+B.a.bitNodeN+" ("+g.a[i].name+")

"})),J.Display.characterInfo.appendChild(Object(s.createElement)("p",{width:"60%",fontSize:"13px",marginLeft:"4%",innerHTML:g.a[i].info}))}},aevumLocationsList:null,chongqingLocationsList:null,sector12LocationsList:null,newTokyoLocationsList:null,ishimaLocationsList:null,volhavenLocationsList:null,displayWorldInfo:function(){J.aevumLocationsList.style.display="none",J.chongqingLocationsList.style.display="none",J.sector12LocationsList.style.display="none",J.newTokyoLocationsList.style.display="none",J.ishimaLocationsList.style.display="none",J.volhavenLocationsList.style.display="none",document.getElementById("world-city-name").innerHTML=B.a.city;document.getElementById("world-city-desc");switch(B.a.city){case M.Locations.Aevum:J.aevumLocationsList.style.display="inline";break;case M.Locations.Chongqing:J.chongqingLocationsList.style.display="inline";break;case M.Locations.Sector12:J.sector12LocationsList.style.display="inline",3!==B.a.bitNodeN&&!I.e||8===B.a.bitNodeN?document.getElementById("sector12-cityhall-li").style.display="none":document.getElementById("sector12-cityhall-li").style.display="block";break;case M.Locations.NewTokyo:J.newTokyoLocationsList.style.display="inline";break;case M.Locations.Ishima:J.ishimaLocationsList.style.display="inline";break;case M.Locations.Volhaven:J.volhavenLocationsList.style.display="inline";break;default:console.log("Invalid city value in Player object!")}var e,t=document.getElementById("generic-locations-list");(t.style.display="inline",Object(r.removeChildrenFromElement)(t),(e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"World Stock Exchange",class:"a-link-button",clickListener:()=>(B.a.location=M.Locations.WorldStockExchange,J.loadStockMarketContent(),!1)})),t.appendChild(e),B.a.corporation instanceof E.a&&null==document.getElementById("location-corporation-button"))&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:B.a.corporation.name,id:"location-corporation-button",class:"a-link-button",clickListener:()=>(J.loadCorporationContent(),!1)})),t.appendChild(e));B.a.bladeburner instanceof _.a&&((e=Object(s.createElement)("li")).appendChild(Object(s.createElement)("a",{innerText:"Bladeburner Headquarters",class:"a-link-button",clickListener:()=>(J.loadBladeburnerContent(),!1)})),t.appendChild(e))},displayFactionsInfo:function(){Object(r.removeChildrenFromElement)(J.Display.factionsContent),J.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Factions"})),J.Display.factionsContent.appendChild(Object(s.createElement)("p",{innerText:"Lists all factions you have joined"}));var e=Object(s.createElement)("ul");J.Display.factionsContent.appendChild(Object(s.createElement)("br"));for(var t=0;t(J.loadFactionContent(),Object(T.c)(n),!1)})),e.appendChild(Object(s.createElement)("br"))}();J.Display.factionsContent.appendChild(e),J.Display.factionsContent.appendChild(Object(s.createElement)("br")),J.Display.factionsContent.appendChild(Object(s.createElement)("h1",{innerText:"Outstanding Faction Invitations"})),J.Display.factionsContent.appendChild(Object(s.createElement)("p",{width:"70%",innerText:"Lists factions you have been invited to, as well as factions you have previously rejected. You can accept these faction invitations at any time."}));var n=Object(s.createElement)("ul");for(t=0;t{Object(T.g)(T.b[e]);for(var t=0;t0&&(J._lastUpdate=e-n,B.a.lastUpdate=e-n,J.updateGame(t)),window.requestAnimationFrame(J.idleTimer)},updateGame:function(e=1){var t=e*J._idleSpeed;null==B.a.totalPlaytime&&(B.a.totalPlaytime=0),null==B.a.playtimeSinceLastAug&&(B.a.playtimeSinceLastAug=0),null==B.a.playtimeSinceLastBitnode&&(B.a.playtimeSinceLastBitnode=0),B.a.totalPlaytime+=t,B.a.playtimeSinceLastAug+=t,B.a.playtimeSinceLastBitnode+=t,!0===Y.a.actionStarted&&(J._totalActionTime=Y.a.actionTime,J._actionTimeLeft=Y.a.actionTime,J._actionInProgress=!0,J._actionProgressBarCount=1,J._actionProgressStr="[ ]",J._actionTimeStr="Time left: ",Y.a.actionStarted=!1),B.a.isWorking&&(B.a.workType==k.CONSTANTS.WorkTypeFaction?B.a.workForFaction(e):B.a.workType==k.CONSTANTS.WorkTypeCreateProgram?B.a.createProgramWork(e):B.a.workType==k.CONSTANTS.WorkTypeStudyClass?B.a.takeClass(e):B.a.workType==k.CONSTANTS.WorkTypeCrime?B.a.commitCrime(e):B.a.workType==k.CONSTANTS.WorkTypeCompanyPartTime?B.a.workPartTime(e):B.a.work(e)),B.a.hasWseAccount&&Object($.m)(e),2==B.a.bitNodeN&&B.a.inGang()&&B.a.gang.process(e,B.a),N.c&&N.b&&N.b.process(e),B.a.corporation instanceof E.a&&B.a.corporation.storeCycles(e),B.a.bladeburner instanceof _.a&&B.a.bladeburner.storeCycles(e),J.decrementAllCounters(e),J.checkCounters(),1==J._actionInProgress&&J.updateHackProgress(e),Object(L.g)(e),Object(P.d)(e)},Counters:{autoSaveCounter:300,updateSkillLevelsCounter:10,updateDisplays:3,updateDisplaysMed:9,updateDisplaysLong:15,updateActiveScriptsDisplay:5,createProgramNotifications:10,checkFactionInvitations:100,passiveFactionGrowth:600,messages:150,sCr:1500,mechanicProcess:5,contractGeneration:3e3},decrementAllCounters:function(e=1){for(var t in J.Counters)J.Counters.hasOwnProperty(t)&&(J.Counters[t]=J.Counters[t]-e)},checkCounters:function(){if(J.Counters.autoSaveCounter<=0&&(W.b.saveGame(X),null==H.Settings.AutosaveInterval&&(H.Settings.AutosaveInterval=60),0===H.Settings.AutosaveInterval?J.Counters.autoSaveCounter=1/0:J.Counters.autoSaveCounter=5*H.Settings.AutosaveInterval),J.Counters.updateSkillLevelsCounter<=0&&(B.a.updateSkillLevels(),J.Counters.updateSkillLevelsCounter=10),J.Counters.updateActiveScriptsDisplay<=0&&(Object(d.c)(),V.routing.isOn(V.Page.ActiveScripts)?J.Counters.updateActiveScriptsDisplay=5:J.Counters.updateActiveScriptsDisplay=10),J.Counters.updateDisplays<=0&&(J.displayCharacterOverviewInfo(),V.routing.isOn(V.Page.CharacterInfo)?J.displayCharacterInfo():V.routing.isOn(V.Page.HacknetNodes)?Object(P.f)():V.routing.isOn(V.Page.CreateProgram)&&Object(O.b)(),h.b&&Object(h.c)(),J.Counters.updateDisplays=3),J.Counters.updateDisplaysMed<=0&&(V.routing.isOn(V.Page.Corporation)&&B.a.corporation.updateUIContent(),J.Counters.updateDisplaysMed=9),J.Counters.updateDisplaysLong<=0&&(V.routing.isOn(V.Page.Gang)&&B.a.inGang()?B.a.gang.updateGangContent():V.routing.isOn(V.Page.ScriptEditor)&&Object(F.h)(),J.Counters.updateDisplaysLong=15),J.Counters.createProgramNotifications<=0){var e=Object(O.c)(),t=document.getElementById("create-program-notification");e>0?(t.innerHTML=e,t.setAttribute("class","notification-on")):(t.innerHTML="",t.setAttribute("class","notification-off")),J.Counters.createProgramNotifications=10}if(J.Counters.checkFactionInvitations<=0){var n=B.a.checkForFactionInvitations();if(n.length>0){!1===B.a.firstFacInvRecvd&&(B.a.firstFacInvRecvd=!0,document.getElementById("factions-tab").style.display="list-item",document.getElementById("character-menu-header").click(),document.getElementById("character-menu-header").click());var i=n[Math.floor(Math.random()*n.length)];Object(T.f)(i)}J.Counters.checkFactionInvitations=100}if(J.Counters.passiveFactionGrowth<=0){var a=Math.floor(600-J.Counters.passiveFactionGrowth);Object(T.i)(a),J.Counters.passiveFactionGrowth=600}if(J.Counters.messages<=0&&(Object(x.c)(),m.c[m.b.TheRedPill].owned?J.Counters.messages=4500:J.Counters.messages=150),J.Counters.sCr<=0&&(B.a.hasWseAccount&&Object($.q)(),J.Counters.sCr=1500),J.Counters.mechanicProcess<=0){if(B.a.corporation instanceof E.a&&B.a.corporation.process(),B.a.bladeburner instanceof _.a)try{B.a.bladeburner.process()}catch(e){Object(l.a)("Exception caught in Bladeburner.process(): "+e)}J.Counters.mechanicProcess=5}J.Counters.contractGeneration<=0&&(Math.random()<=.25&&Object(b.a)(),J.Counters.contractGeneration=3e3)},_totalActionTime:0,_actionTimeLeft:0,_actionTimeStr:"Time left: ",_actionProgressStr:"[ ]",_actionProgressBarCount:1,_actionInProgress:!1,updateHackProgress:function(e=1){var t=e*J._idleSpeed;J._actionTimeLeft-=t/1e3,J._actionTimeLeft=Math.max(J._actionTimeLeft,0);for(var n=Math.round(100*(1-J._actionTimeLeft/J._totalActionTime));2*J._actionProgressBarCount<=n;)J._actionProgressStr=Object(p.replaceAt)(J._actionProgressStr,J._actionProgressBarCount,"|"),J._actionProgressBarCount+=1;J._actionTimeStr="Time left: "+Math.max(0,Math.round(J._actionTimeLeft)).toString()+"s",document.getElementById("hack-progress").innerHTML=J._actionTimeStr,document.getElementById("hack-progress-bar").innerHTML=J._actionProgressStr.replace(/ /g," "),n>=100&&(J._actionInProgress=!1,Y.a.finishAction())},closeMainMenuHeader:function(e){for(var t=0;t$"+Object(p.formatNumber)(D,2)+" and your Hacknet Nodes generated $"+Object(p.formatNumber)(j,2)+"");var z=[t,n,a,o,u,h,S,w,M];B.a.firstFacInvRecvd?z.push(s):s.style.display="none",B.a.firstAugPurchased?z.push(l):l.style.display="none",""!==B.a.companyPosition?z.push(y):y.style.display="none",B.a.firstTimeTraveled?z.push(d):d.style.display="none",B.a.firstProgramAvailable?z.push(r):r.style.display="none",B.a.hasWseAccount?z.push(f):f.style.display="none",B.a.bladeburner instanceof _.a?z.push(b):b.style.display="none",B.a.corporation instanceof E.a?z.push(O):O.style.display="none",B.a.inGang()?z.push(C):C.style.display="none",J.closeMainMenuHeader(z)}else{console.log("Initializing new game"),Object(g.c)(),Object(g.b)(),Object(K.d)(),Object(q.c)(),J.setDisplayElements(),J.start(),B.a.init(),Object(U.f)(),Object(v.initCompanies)(),Object(T.e)(),Object(m.h)(),Object(x.d)(),Object($.i)(),Object(A.a)(),Object(I.g)(),document.getElementById("hacking-menu-header").classList.toggle("opened"),document.getElementById("character-menu-header").classList.toggle("opened"),document.getElementById("world-menu-header").classList.toggle("opened"),document.getElementById("help-menu-header").classList.toggle("opened"),s.style.display="none",l.style.display="none",y.style.display="none",f.style.display="none",d.style.display="none",r.style.display="none",b.style.display="none",O.style.display="none",C.style.display="none",M.style.display="none",J.openMainMenuHeader([t,n,a,o,u,h,S,w]),Object(R.c)(),Object(c.removeLoadingScreen)()}Object(G.a)(),Object(F.g)(),Y.a.resetTerminalInput()},setDisplayElements:function(){J.Display.terminalContent=document.getElementById("terminal-container"),V.routing.navigateTo(V.Page.Terminal),J.Display.characterContent=document.getElementById("character-container"),J.Display.characterContent.style.display="none",J.Display.scriptEditorContent=document.getElementById("script-editor-container"),J.Display.scriptEditorContent.style.display="none",J.Display.activeScriptsContent=document.getElementById("active-scripts-container"),J.Display.activeScriptsContent.style.display="none",J.Display.hacknetNodesContent=document.getElementById("hacknet-nodes-container"),J.Display.hacknetNodesContent.style.display="none",J.Display.worldContent=document.getElementById("world-container"),J.Display.worldContent.style.display="none",J.Display.createProgramContent=document.getElementById("create-program-container"),J.Display.createProgramContent.style.display="none",J.Display.factionsContent=document.getElementById("factions-container"),J.Display.factionsContent.style.display="none",J.Display.factionContent=document.getElementById("faction-container"),J.Display.factionContent.style.display="none",J.Display.factionAugmentationsContent=document.getElementById("faction-augmentations-container"),J.Display.factionAugmentationsContent.style.display="none",J.Display.augmentationsContent=document.getElementById("augmentations-container"),J.Display.augmentationsContent.style.display="none",J.Display.tutorialContent=document.getElementById("tutorial-container"),J.Display.tutorialContent.style.display="none",J.Display.infiltrationContent=document.getElementById("infiltration-container"),J.Display.infiltrationContent.style.display="none",J.Display.stockMarketContent=document.getElementById("stock-market-container"),J.Display.stockMarketContent.style.display="none",J.Display.missionContent=document.getElementById("mission-container"),J.Display.missionContent.style.display="none",J.Display.characterInfo=document.getElementById("character-content"),J.aevumLocationsList=document.getElementById("aevum-locations-list"),J.chongqingLocationsList=document.getElementById("chongqing-locations-list"),J.sector12LocationsList=document.getElementById("sector12-locations-list"),J.newTokyoLocationsList=document.getElementById("newtokyo-locations-list"),J.ishimaLocationsList=document.getElementById("ishima-locations-list"),J.volhavenLocationsList=document.getElementById("volhaven-locations-list"),J.Display.locationContent=document.getElementById("location-container"),J.Display.locationContent.style.display="none",J.Display.workInProgressContent=document.getElementById("work-in-progress-container"),J.Display.workInProgressContent.style.display="none",J.Display.redPillContent=document.getElementById("red-pill-container"),J.Display.redPillContent.style.display="none",J.Display.cinematicTextContent=document.getElementById("cinematic-text-container"),J.Display.cinematicTextContent.style.display="none",Object(w.b)(),J.Clickables.tutorialNetworkingButton=document.getElementById("tutorial-networking-link"),J.Clickables.tutorialNetworkingButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialNetworkingText)}),J.Clickables.tutorialHackingButton=document.getElementById("tutorial-hacking-link"),J.Clickables.tutorialHackingButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialHackingText)}),J.Clickables.tutorialScriptsButton=document.getElementById("tutorial-scripts-link"),J.Clickables.tutorialScriptsButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialScriptsText)}),J.Clickables.tutorialNetscriptButton=document.getElementById("tutorial-netscript-link"),J.Clickables.tutorialNetscriptButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialNetscriptText)}),J.Clickables.tutorialTravelingButton=document.getElementById("tutorial-traveling-link"),J.Clickables.tutorialTravelingButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialTravelingText)}),J.Clickables.tutorialCompaniesButton=document.getElementById("tutorial-jobs-link"),J.Clickables.tutorialCompaniesButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialCompaniesText)}),J.Clickables.tutorialFactionsButton=document.getElementById("tutorial-factions-link"),J.Clickables.tutorialFactionsButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialFactionsText)}),J.Clickables.tutorialAugmentationsButton=document.getElementById("tutorial-augmentations-link"),J.Clickables.tutorialAugmentationsButton.addEventListener("click",function(){J.displayTutorialPage(k.CONSTANTS.TutorialAugmentationsText)}),J.Clickables.tutorialBackButton=document.getElementById("tutorial-back-button"),J.Clickables.tutorialBackButton.addEventListener("click",function(){J.displayTutorialContent()})},init:function(){document.getElementById("import-game-link").onclick=function(){W.b.importGame()};var e=document.getElementById("hacking-menu-header"),t=document.getElementById("character-menu-header"),n=document.getElementById("world-menu-header"),r=document.getElementById("help-menu-header");(e.onclick=function(){var e=document.getElementById("terminal-tab"),t=document.getElementById("terminal-menu-link"),n=document.getElementById("create-script-tab"),i=document.getElementById("create-script-menu-link"),a=document.getElementById("active-scripts-tab"),r=document.getElementById("active-scripts-menu-link"),o=document.getElementById("create-program-tab"),s=document.getElementById("create-program-menu-link"),l=document.getElementById("create-program-notification");this.classList.toggle("opened"),e.style.maxHeight?(J.toggleMainMenuHeader(!1,[e,n,a,o],[t,i,r,s]),l.style.display="none"):(J.toggleMainMenuHeader(!0,[e,n,a,o],[t,i,r,s]),l.style.display="block")},t.onclick=function(){var e=document.getElementById("stats-tab"),t=document.getElementById("stats-menu-link"),n=document.getElementById("factions-tab"),i=document.getElementById("factions-menu-link"),a=document.getElementById("augmentations-tab"),r=document.getElementById("augmentations-menu-link"),o=document.getElementById("hacknet-nodes-tab"),s=document.getElementById("hacknet-nodes-menu-link");this.classList.toggle("opened"),e.style.maxHeight?J.toggleMainMenuHeader(!1,[e,n,a,o],[t,i,r,s]):J.toggleMainMenuHeader(!0,[e,n,a,o],[t,i,r,s])},n.onclick=function(){var e=document.getElementById("city-tab"),t=document.getElementById("city-menu-link"),n=document.getElementById("travel-tab"),i=document.getElementById("travel-menu-link"),a=document.getElementById("job-tab"),r=document.getElementById("job-menu-link"),o=document.getElementById("stock-market-tab"),s=document.getElementById("stock-market-menu-link"),l=document.getElementById("bladeburner-tab"),c=document.getElementById("bladeburner-menu-link"),u=document.getElementById("corporation-tab"),p=document.getElementById("corporation-menu-link"),h=document.getElementById("gang-tab"),d=document.getElementById("gang-menu-link");a.style.display=""!==B.a.companyPosition?"list-item":"none",o.style.display=B.a.hasWseAccount?"list-item":"none",l.style.display=B.a.bladeburner instanceof _.a?"list-item":"none",u.style.display=B.a.corporation instanceof E.a?"list-item":"none",h.style.display=B.a.inGang()?"list-item":"none",this.classList.toggle("opened"),e.style.maxHeight?J.toggleMainMenuHeader(!1,[e,n,a,o,l,u,h],[t,i,r,s,c,p,d]):J.toggleMainMenuHeader(!0,[e,n,a,o,l,u,h],[t,i,r,s,c,p,d])},r.onclick=function(){var e=document.getElementById("tutorial-tab"),t=document.getElementById("tutorial-menu-link"),n=document.getElementById("options-tab"),i=document.getElementById("options-menu-link");this.classList.toggle("opened");const a=[e,n],r=[t,i];e.style.maxHeight?J.toggleMainMenuHeader(!1,a,r):J.toggleMainMenuHeader(!0,a,r)},J.Clickables.terminalMainMenuButton=Object(o.clearEventListeners)("terminal-menu-link"),J.Clickables.terminalMainMenuButton.addEventListener("click",function(){return J.loadTerminalContent(),!1}),J.Clickables.characterMainMenuButton=Object(o.clearEventListeners)("stats-menu-link"),J.Clickables.characterMainMenuButton.addEventListener("click",function(){return J.loadCharacterContent(),!1}),J.Clickables.scriptEditorMainMenuButton=Object(o.clearEventListeners)("create-script-menu-link"),J.Clickables.scriptEditorMainMenuButton.addEventListener("click",function(){return J.loadScriptEditorContent(),!1}),J.Clickables.activeScriptsMainMenuButton=Object(o.clearEventListeners)("active-scripts-menu-link"),J.Clickables.activeScriptsMainMenuButton.addEventListener("click",function(){return J.loadActiveScriptsContent(),!1}),J.Clickables.hacknetNodesMainMenuButton=Object(o.clearEventListeners)("hacknet-nodes-menu-link"),J.Clickables.hacknetNodesMainMenuButton.addEventListener("click",function(){return J.loadHacknetNodesContent(),!1}),J.Clickables.worldMainMenuButton=Object(o.clearEventListeners)("city-menu-link"),J.Clickables.worldMainMenuButton.addEventListener("click",function(){return J.loadWorldContent(),!1}),J.Clickables.travelMainMenuButton=Object(o.clearEventListeners)("travel-menu-link"),J.Clickables.travelMainMenuButton.addEventListener("click",function(){return J.loadTravelContent(),!1}),J.Clickables.jobMainMenuButton=Object(o.clearEventListeners)("job-menu-link"),J.Clickables.jobMainMenuButton.addEventListener("click",function(){return J.loadJobContent(),!1}),J.Clickables.stockmarketMainMenuButton=Object(o.clearEventListeners)("stock-market-menu-link"),J.Clickables.stockmarketMainMenuButton.addEventListener("click",function(){return J.loadStockMarketContent(),!1}),J.Clickables.createProgramMainMenuButton=Object(o.clearEventListeners)("create-program-menu-link"),J.Clickables.createProgramMainMenuButton.addEventListener("click",function(){return J.loadCreateProgramContent(),!1}),J.Clickables.factionsMainMenuButton=Object(o.clearEventListeners)("factions-menu-link"),J.Clickables.factionsMainMenuButton.addEventListener("click",function(){return J.loadFactionsContent(),!1}),J.Clickables.augmentationsMainMenuButton=Object(o.clearEventListeners)("augmentations-menu-link"),J.Clickables.augmentationsMainMenuButton.addEventListener("click",function(){return J.loadAugmentationsContent(),!1}),J.Clickables.tutorialMainMenuButton=Object(o.clearEventListeners)("tutorial-menu-link"),J.Clickables.tutorialMainMenuButton.addEventListener("click",function(){return J.loadTutorialContent(),!1}),J.Clickables.bladeburnerMenuButton=Object(o.clearEventListeners)("bladeburner-menu-link"),J.Clickables.bladeburnerMenuButton.addEventListener("click",function(){return J.loadBladeburnerContent(),!1}),J.Clickables.corporationMenuButton=Object(o.clearEventListeners)("corporation-menu-link"),J.Clickables.corporationMenuButton.addEventListener("click",function(){return J.loadCorporationContent(),!1}),J.Clickables.gangMenuButton=Object(o.clearEventListeners)("gang-menu-link"),J.Clickables.gangMenuButton.addEventListener("click",function(){return J.loadGangContent(),!1}),J.Clickables.devMainMenuButton=Object(o.clearEventListeners)("dev-menu-link"),J.Clickables.devMainMenuButton.addEventListener("click",function(){return!1}),J.ActiveScriptsList=document.getElementById("active-scripts-list"),J.Clickables.saveMainMenuButton=document.getElementById("save-game-link"),J.Clickables.saveMainMenuButton.addEventListener("click",function(){return W.b.saveGame(X),!1}),J.Clickables.deleteMainMenuButton=document.getElementById("delete-game-link"),J.Clickables.deleteMainMenuButton.addEventListener("click",function(){return W.b.deleteGame(X),!1}),document.getElementById("export-game-link").addEventListener("click",function(){return W.b.exportGame(),!1}),document.getElementById("character-overview-save-button").addEventListener("click",function(){return W.b.saveGame(X),!1}),document.getElementById("character-overview-options-button").addEventListener("click",function(){return Object(a.b)(),!1}),Object(O.d)(),Object(Y.b)(),B.a.isWorking)&&(document.getElementById("work-in-progress-cancel-button").addEventListener("click",function(){if(B.a.workType==k.CONSTANTS.WorkTypeFaction){T.b[B.a.currentWorkFactionName];B.a.finishFactionWork(!0)}else B.a.workType==k.CONSTANTS.WorkTypeCreateProgram?B.a.finishCreateProgramWork(!0):B.a.workType==k.CONSTANTS.WorkTypeStudyClass?B.a.finishClass():B.a.workType==k.CONSTANTS.WorkTypeCrime?B.a.finishCrime(!0):B.a.workType==k.CONSTANTS.WorkTypeCompanyPartTime?B.a.finishWorkPartTime():B.a.finishWork(!0)}),J.loadWorkInProgressContent());document.getElementById("character-overview-container").style.display="block",document.getElementById("terminal-menu-link").removeAttribute("class"),document.getElementById("stats-menu-link").removeAttribute("class"),document.getElementById("create-script-menu-link").removeAttribute("class"),document.getElementById("active-scripts-menu-link").removeAttribute("class"),document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),document.getElementById("city-menu-link").removeAttribute("class"),document.getElementById("tutorial-menu-link").removeAttribute("class"),document.getElementById("debug-delete-scripts-link").addEventListener("click",function(){return console.log("Deleting running scripts on home computer"),B.a.getHomeComputer().runningScripts=[],Object(i.dialogBoxCreate)("Forcefully deleted all running scripts on home computer. Please save and refresh page"),Object(a.a)(),!1}),document.getElementById("debug-soft-reset").addEventListener("click",function(){return Object(i.dialogBoxCreate)("Soft Reset!"),Object(D.a)(),Object(a.a)(),!1})},start:function(){J.idleTimer(),Object(L.f)()}};var X,Q;window.onload=function(){if(!window.indexedDB)return J.load(null);(Q=window.indexedDB.open("bitburnerSave",1)).onerror=function(e){return console.log("Error opening indexedDB: "),console.log(e),J.load(null)},Q.onsuccess=function(e){console.log("Opening bitburnerSave database successful!");var t=(X=e.target.result).transaction(["savestring"]).objectStore("savestring").get("save");t.onerror=function(e){return console.log("Error in Database request to get savestring: "+e),J.load(null)},t.onsuccess=function(e){J.load(t.result)}},Q.onupgradeneeded=function(e){e.target.result.createObjectStore("savestring")}}}.call(this,n(60))},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"dialogBoxCreate",function(){return r}),n.d(t,"dialogBoxOpened",function(){return a});let i=[];e(document).click(function(t){a&&i.length>=1&&(e(t.target).closest(i[0]).length||(i[0].remove(),i.splice(0,1),0==i.length?a=!1:i[0].style.visibility="visible"))}),e(document).on("click",".dialog-box-close-button",function(e){a&&i.length>=1&&(i[0].remove(),i.splice(0,1),0==i.length?a=!1:i[0].style.visibility="visible")});var a=!1;function r(e,t=!1){var n=document.createElement("div");n.setAttribute("class","dialog-box-container");var r=document.createElement("div");r.setAttribute("class","dialog-box-content");var o,s=document.createElement("span");s.setAttribute("class","dialog-box-close-button"),s.innerHTML="×",t?(o=document.createElement("pre")).innerHTML=e:(o=document.createElement("p")).innerHTML=e.replace(/(?:\r\n|\r|\n)/g,"
"),r.appendChild(s),r.appendChild(o),n.appendChild(r),document.body.appendChild(n),i.length>=1&&(n.style.visibility="hidden"),i.push(n),setTimeout(function(){a=!0},400)}}.call(this,n(60))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitNodeMultipliers={HackingLevelMultiplier:1,ServerGrowthRate:1,ServerMaxMoney:1,ServerStartingMoney:1,ServerStartingSecurity:1,ServerWeakenRate:1,CompanyWorkMoney:1,CrimeMoney:1,HacknetNodeMoney:1,ManualHackMoney:1,ScriptHackMoney:1,CodingContractMoney:1,ClassGymExpGain:1,CompanyWorkExpGain:1,CrimeExpGain:1,FactionWorkExpGain:1,HackExpGain:1,FactionPassiveRepGain:1,FactionWorkRepGain:1,RepToDonateToFaction:1,AugmentationMoneyCost:1,AugmentationRepCost:1,InfiltrationMoney:1,InfiltrationRep:1,CorporationValuation:1,BladeburnerRank:1,BladeburnerSkillCost:1}},function(e,t,n){"use strict";n.d(t,"f",function(){return y}),n.d(t,"h",function(){return f}),n.d(t,"k",function(){return b}),n.d(t,"j",function(){return v}),n.d(t,"i",function(){return k}),n.d(t,"g",function(){return O}),n.d(t,"a",function(){return C}),n.d(t,"c",function(){return T}),n.d(t,"e",function(){return S}),n.d(t,"d",function(){return _}),n.d(t,"b",function(){return E});var i=n(10),a=n(40),r=n(1),o=n(28),s=n(23),l=n(0),c=n(30),u=n(58),p=n(15),h=n(55),d=n(122),m=n(14),g=n(81);function _(e={ip:Object(h.a)(),hostname:""}){this.ip=e.ip?e.ip:Object(h.a)();for(var t=e.hostname,n=0,a="";null!=T(t+a);)a="-"+n,++n;this.hostname=t+a,this.organizationName=null!=e.organizationName?e.organizationName:"",this.isConnectedTo=null!=e.isConnectedTo&&e.isConnectedTo,this.hasAdminRights=null!=e.adminRights&&e.adminRights,this.purchasedByPlayer=null!=e.purchasedByPlayer&&e.purchasedByPlayer,this.manuallyHacked=!1,this.maxRam=null!=e.maxRam?e.maxRam:0,this.ramUsed=0,this.cpuCores=1,this.scripts=[],this.runningScripts=[],this.programs=[],this.messages=[],this.textFiles=[],this.contracts=[],this.dir=0,this.requiredHackingSkill=null!=e.requiredHackingSkill?e.requiredHackingSkill:1,this.moneyAvailable=null!=e.moneyAvailable?e.moneyAvailable*i.BitNodeMultipliers.ServerStartingMoney:0,this.moneyMax=25*this.moneyAvailable*i.BitNodeMultipliers.ServerMaxMoney,this.hackDifficulty=null!=e.hackDifficulty?e.hackDifficulty*i.BitNodeMultipliers.ServerStartingSecurity:1,this.baseDifficulty=this.hackDifficulty,this.minDifficulty=Math.max(1,Math.round(this.hackDifficulty/3)),this.serverGrowth=null!=e.serverGrowth?e.serverGrowth:1,this.serversOnNetwork=[],this.numOpenPortsRequired=null!=e.numOpenPortsRequired?e.numOpenPortsRequired:5,this.sshPortOpen=!1,this.ftpPortOpen=!1,this.smtpPortOpen=!1,this.httpPortOpen=!1,this.sqlPortOpen=!1,this.openPortCount=0}function y(){const e=[];for(let t=0;t<15;t++)e.push([]);const t=["hackDifficulty","moneyAvailable","requiredHackingSkill","serverGrowth"],n=e=>{switch(typeof e){case"number":return e;case"object":return Object(p.getRandomInt)(e.min,e.max);default:throw Error(`Do not know how to convert the type '${typeof e}' to a number`)}};for(const i of d.serverMetadata){const a={hostname:i.hostname,ip:Object(h.a)(),numOpenPortsRequired:i.numOpenPortsRequired,organizationName:i.organizationName};void 0!==i.maxRamExponent&&(a.maxRam=Math.pow(2,n(i.maxRamExponent)));for(const e of t)void 0!==i[e]&&(a[e]=n(i[e]));const r=new _(a);for(const e of i.literature||[])r.messages.push(e);void 0!==i.specialName&&c.a.addIp(i.specialName,r.ip),C(r),void 0!==i.networkLayer&&e[n(i.networkLayer)-1].push(r)}const i=e=>e[Math.floor(Math.random()*e.length)],a=(e,t)=>{for(const n of e)r=n,o=t(),r.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(r.ip)};var r,o;a(e[0],()=>l.a.getHomeComputer());for(let t=1;ti(e[t-1]))}function f(e,t){let n=1+(r.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;n>r.CONSTANTS.ServerMaxGrowthRate&&(n=r.CONSTANTS.ServerMaxGrowthRate);const i=e.serverGrowth/100;return Math.log(t)/(Math.log(n)*l.a.hacking_grow_mult*i)}function b(e,t){const n=Math.max(Math.floor(t/450),0);var a=1+(r.CONSTANTS.ServerBaseGrowthRate-1)/e.hackDifficulty;a>r.CONSTANTS.ServerMaxGrowthRate&&(a=r.CONSTANTS.ServerMaxGrowthRate);const o=n*(e.serverGrowth/100)*i.BitNodeMultipliers.ServerGrowthRate;var s=Math.pow(a,o*l.a.hacking_grow_mult);s<1&&(console.log("WARN: serverGrowth calculated to be less than 1"),s=1);const c=e.moneyAvailable;if(e.moneyAvailable*=s,e.moneyMax&&isNaN(e.moneyAvailable)&&(e.moneyAvailable=e.moneyMax),e.moneyMax&&e.moneyAvailable>e.moneyMax&&(e.moneyAvailable=e.moneyMax),c!==e.moneyAvailable){let t=f(e,e.moneyAvailable/c);t=Math.max(0,t),e.fortify(2*r.CONSTANTS.ServerFortifyAmount*Math.ceil(t))}return e.moneyAvailable/c}function v(e){const t=e.programs.includes(s.a.BitFlume.name);e.programs.length=0,e.runningScripts=[],e.serversOnNetwork=[],e.isConnectedTo=!0,e.ramUsed=0,e.programs.push(s.a.NukeProgram.name),t&&e.programs.push(s.a.BitFlume.name),e.scripts.forEach(function(e){e.updateRamUsage()}),e.messages.length=0,e.messages.push("hackers-starting-handbook.lit")}_.prototype.setMaxRam=function(e){this.maxRam=e},_.prototype.getServerOnNetwork=function(e){if(!(e>this.serversOnNetwork.length))return E[this.serversOnNetwork[e]];console.log("Tried to get server on network that was out of range")},_.prototype.getScript=function(e){for(var t=0;t1e6&&(this.hackDifficulty=1e6)},_.prototype.fortify=function(e){this.hackDifficulty+=e,this.capDifficulty()},_.prototype.weaken=function(e){this.hackDifficulty-=e*i.BitNodeMultipliers.ServerWeakenRate,this.capDifficulty()},_.prototype.writeToScriptFile=function(e,t){var n={success:!1,overwritten:!1};if(!Object(o.e)(e))return n;for(let i=0;it.fn!==e.fn):this.contracts=this.contracts.filter(t=>t.fn!==e)},_.prototype.getContract=function(e){for(const t of this.contracts)if(t.fn===e)return t;return null},_.prototype.toJSON=function(){return Object(m.Generic_toJSON)("Server",this)},_.fromJSON=function(e){return Object(m.Generic_fromJSON)(_,e.data)},m.Reviver.constructors.Server=_;let E={};function k(){for(var e in E)delete E[e];E={}}function O(e){E=JSON.parse(e,m.Reviver)}function C(e){var t=e.ip;if(Object(h.b)(t))throw console.log("IP of server that's being added: "+t),console.log("Hostname of the server thats being added: "+e.hostname),console.log("The server that already has this IP is: "+E[t].hostname),new Error("Error: Trying to add a server with an existing IP");E[t]=e}function T(e){for(var t in E)if(E.hasOwnProperty(t)&&E[t].hostname==e)return E[t];return null}function S(e){return Object(g.isValidIPAddress)(e)?void 0!==E[e]?E[e]:null:T(e)}function w(e,t,n){this.s=e,this.p=t,this.c=[],this.n=n,this.d=t.d+1,this.scrs=[],this.pgms=[],this.msgs=[]}w.prototype.createSubdir=function(e){new w(this.s,this,e)},w.prototype.getPath=function(e){for(var t=[],n=this;null!==n;)t.unshift(n.n,"/"),n=n.parent;return t.unshift("/"),t.join("")}},function(e,t,n){"use strict";n.d(t,"b",function(){return k}),n.d(t,"e",function(){return T}),n.d(t,"f",function(){return w}),n.d(t,"g",function(){return M}),n.d(t,"c",function(){return P}),n.d(t,"i",function(){return B}),n.d(t,"h",function(){return O}),n.d(t,"a",function(){return E}),n.d(t,"j",function(){return I}),n.d(t,"d",function(){return C});var i=n(21),a=n(10),r=n(1),o=n(8),s=n(106),l=(n(84),n(52)),c=n(0),u=n(67),p=n(19),h=n(13),d=n(4),m=n(9),g=n(118),_=n(27),y=n(2),f=n(14),b=n(3),v=n(17);function E(e=""){this.name=e,this.augmentations=[],this.isMember=!1,this.isBanned=!1,this.playerReputation=0,this.alreadyInvited=!1,this.favor=0,this.rolloverRep=0}E.prototype.getInfo=function(){const e=s.FactionInfos[this.name];if(null==e)throw new Error("Missing faction from FactionInfos: "+this.name+" this probably means the faction got corrupted somehow");return e},E.prototype.gainFavor=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);var e=this.getFavorGain();2==e.length?(this.favor+=e[0],this.rolloverRep=e[1]):console.log("Error: invalid result from getFavorGain() function")},E.prototype.getFavorGain=function(){null!=this.favor&&void 0!=this.favor||(this.favor=0),null!=this.rolloverRep&&void 0!=this.rolloverRep||(this.rolloverRep=0);for(var e=0,t=this.playerReputation+this.rolloverRep,n=r.CONSTANTS.FactionReputationToFavorBase*Math.pow(r.CONSTANTS.FactionReputationToFavorMult,this.favor);t>0&&t>=n;)++e,t-=n,n*=r.CONSTANTS.FactionReputationToFavorMult;return[e,t]},E.prototype.addAllAugmentations=function(){for(var e in this.augmentations.length=0,i.c)i.c.hasOwnProperty(e)&&this.augmentations.push(e)},E.prototype.toJSON=function(){return Object(f.Generic_toJSON)("Faction",this)},E.fromJSON=function(e){return Object(f.Generic_fromJSON)(E,e.data)},f.Reviver.constructors.Faction=E;let k={};function O(e){k=JSON.parse(e,f.Reviver)}function C(e){return k.hasOwnProperty(e)}function T(){for(const e in s.FactionInfos)S(new E(e))}function S(e){if(!(e instanceof E))throw new Error("Invalid argument 'newFactionObject' passed into resetFaction()");var t,n,i=e.name;C(i)&&(e.favor=k[i].favor,delete k[i]),n=(t=e).name,k[n]=t}function w(e){p.Settings.SuppressFactionInvites?(e.alreadyInvited=!0,c.a.factionInvitations.push(e.name),h.routing.isOn(h.Page.Factions)&&o.Engine.loadFactionsContent()):Object(g.a)(e)}function M(e){e.isMember=!0,c.a.factions.push(e.name);const t=e.getInfo();for(const e in t.enemies){const n=t.enemies[e];k[n].isBanned=!0}}function P(e){var t=k[e];if(null==t)throw new Error("Invalid factionName passed into displayFactionContent: "+e);var n=t.getInfo();Object(_.removeChildrenFromElement)(o.Engine.Display.factionContent);var i=[];i.push(Object(y.createElement)("h1",{innerText:e})),i.push(Object(y.createElement)("pre",{innerHTML:""+n.infoText+""})),i.push(Object(y.createElement)("p",{innerText:"---------------"}));var s=t.getFavorGain();2!=s.length&&(s=0),s=s[0],i.push(Object(y.createElement)("p",{innerText:"Reputation: "+Object(b.formatNumber)(t.playerReputation,4),tooltip:"You will earn "+Object(b.formatNumber)(s,0)+" faction favor upon resetting after installing an Augmentation"})),i.push(Object(y.createElement)("p",{innerText:"---------------"})),i.push(Object(y.createElement)("p",{innerText:"Faction Favor: "+Object(b.formatNumber)(t.favor,0),tooltip:"Faction favor increases the rate at which you earn reputation for this faction by 1% per favor. Faction favor is gained whenever you reset after installing an Augmentation. The amount of favor you gain depends on how much reputation you have with the faction"})),i.push(Object(y.createElement)("p",{innerText:"---------------"})),i.push(Object(y.createElement)("pre",{id:"faction-work-description-text",innerText:"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. Note that you cannot use your terminal or create scripts when you are performing a task!"})),i.push(Object(y.createElement)("br"));var u=Object(y.createElement)("div",{id:"faction-hack-mission-div",class:"faction-work-div"}),p=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});u.appendChild(p),p.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Hacking Mission",clickListener:()=>{o.Engine.loadMissionContent();var e=new l.a(t.playerReputation,t);return Object(l.d)(!0,e),e.init(),!1}})),p.appendChild(Object(y.createElement)("p",{innerText:"Attempt a hacking mission for your faction. A mission is a mini game that, if won, earns you significant reputation with this faction. (Recommended hacking level: 200+)"})),i.push(u);var h=Object(y.createElement)("div",{id:"faction-hack-div",class:"faction-work-div"}),g=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});h.appendChild(g),g.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Hacking Contracts",clickListener:()=>(c.a.startFactionHackWork(t),!1)})),g.appendChild(Object(y.createElement)("p",{innerText:"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."})),i.push(h);var f=Object(y.createElement)("div",{id:"faction-fieldwork-div",class:"faction-work-div"}),E=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});f.appendChild(E),E.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Field Work",clickListener:()=>(c.a.startFactionFieldWork(t),!1)})),E.appendChild(Object(y.createElement)("p",{innerText:"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."})),i.push(f);var O=Object(y.createElement)("div",{id:"faction-securitywork-div",class:"faction-work-div"}),C=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});O.appendChild(C),C.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Security Work",clickListener:()=>(c.a.startFactionSecurityWork(t),!1)})),C.appendChild(Object(y.createElement)("p",{innerText:"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."})),i.push(O);var T=Object(y.createElement)("div",{id:"faction-donate-div",class:"faction-work-div"}),S=Object(y.createElement)("div",{class:"faction-work-div-wrapper"});T.appendChild(S);var w=Object(y.createElement)("p",{innerText:"This donation will result in 0.000 reputation gain"}),M=Object(y.createElement)("input",{placeholder:"Donation amount",inputListener:()=>{let e=0;if(""!==M.value&&(e=parseFloat(M.value)),isNaN(e))w.innerText="Invalid donate amount entered!";else{var t=e/r.CONSTANTS.DonateMoneyToRepDivisor*c.a.faction_rep_mult;w.innerText="This donation will result in "+Object(b.formatNumber)(t,3)+" reputation gain"}}});if(S.appendChild(Object(y.createElement)("a",{class:"a-link-button",innerText:"Donate Money",clickListener:()=>{var n=parseFloat(M.value);if(isNaN(n)||n<0)Object(m.dialogBoxCreate)("Invalid amount entered!");else if(c.a.money.lt(n))Object(m.dialogBoxCreate)("You cannot afford to donate this much money!");else{c.a.loseMoney(n);var i=n/r.CONSTANTS.DonateMoneyToRepDivisor*c.a.faction_rep_mult;t.playerReputation+=i,Object(m.dialogBoxCreate)("You just donated "+d.a.format(n,"$0.000a")+" to "+t.name+" to gain "+Object(b.formatNumber)(i,3)+" reputation"),P(e)}}})),S.appendChild(M),S.appendChild(w),i.push(T),i.push(Object(y.createElement)("pre",{innerHTML:"
As your reputation with this faction rises, you will unlock Augmentations, which you can purchase to enhance your abilities.

"})),i.push(Object(y.createElement)("a",{class:"a-link-button",innerText:"Purchase Augmentations",clickListener:()=>(o.Engine.hideAllContent(),o.Engine.Display.factionAugmentationsContent.style.display="block",R(e),!1)})),2!=c.a.bitNodeN||"Slum Snakes"!=e&&"Tetrads"!=e&&"The Syndicate"!=e&&"The Dark Army"!=e&&"Speakers for the Dead"!=e&&"NiteSec"!=e&&"The Black Hand"!=e){if(!t.isMember)throw new Error("Not a member of this faction, cannot display faction information");T.style.display=t.favor>=Math.floor(r.CONSTANTS.BaseFavorToDonate*a.BitNodeMultipliers.RepToDonateToFaction)?"inline":"none",u.style.display=n.offerHackingMission?"inline":"none",h.style.display=n.offerHackingWork?"inline":"none",f.style.display=n.offerFieldWork?"inline":"none",O.style.display=n.offerSecurityWork?"inline":"none";for(N=0;N{if(c.a.inGang())o.Engine.loadGangContent();else{let i=!1;"NiteSec"!==e&&"The Black Hand"!==e||(i=!0);var t=Object(v.d)(),n=Object(v.c)();t.innerHTML="Create Gang",n.innerHTML="Cancel",t.addEventListener("click",()=>{c.a.startGang(e,i),document.getElementById("world-menu-header").click(),document.getElementById("world-menu-header").click(),o.Engine.loadGangContent(),Object(v.a)()}),n.addEventListener("click",()=>{Object(v.a)()});let a="";a=i?"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.

",Object(v.b)(`Would you like to create a new Gang with ${e}?

`+"Note that this will prevent you from creating a Gang with any other Faction until this BitNode is destroyed.

"+a+"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.")}}})),x.appendChild(Object(y.createElement)("p",{innerText:"Create and manage a gang for this Faction. Gangs will earn you money and faction reputation."})),i.splice(7,1,A),c.a.inGang()&&c.a.gang.facName!=e&&(A.style.display="none");for(var N=0;N(o.Engine.loadFactionContent(),P(e),!1)})),n.push(Object(y.createElement)("h1",{innerText:"Faction Augmentations"})),n.push(Object(y.createElement)("p",{id:"faction-augmentations-page-desc",innerHTML:"Lists all Augmentations that are available to purchase from "+e+"

Augmentations are powerful upgrades that will enhance your abilities."})),n.push(Object(y.createElement)("br")),n.push(Object(y.createElement)("br"));var a=Object(y.createElement)("ul");const r=Object(y.createElement)("a",{innerText:"Sort by Cost",class:"a-link-button",clickListener:()=>{p.Settings.PurchaseAugmentationsOrder=u.PurchaseAugmentationsOrderSetting.Cost;var e=t.augmentations.slice();e.sort((e,t)=>{var n=i.c[e],a=i.c[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseCost-a.baseCost}),Object(_.removeChildrenFromElement)(a),A(a,e,t)}}),s=Object(y.createElement)("a",{innerText:"Sort by Reputation",class:"a-link-button",clickListener:()=>{p.Settings.PurchaseAugmentationsOrder=u.PurchaseAugmentationsOrderSetting.Reputation;var e=t.augmentations.slice();e.sort((e,t)=>{var n=i.c[e],a=i.c[t];if(null==n||null==a)throw new Error("Invalid Augmentation Names");return n.baseRepRequirement-a.baseRepRequirement}),Object(_.removeChildrenFromElement)(a),A(a,e,t)}}),l=Object(y.createElement)("a",{innerText:"Sort by Default Order",class:"a-link-button",clickListener:()=>{p.Settings.PurchaseAugmentationsOrder=u.PurchaseAugmentationsOrderSetting.Default,Object(_.removeChildrenFromElement)(a),A(a,t.augmentations,t)}});switch(n.push(r),n.push(s),n.push(l),p.Settings.PurchaseAugmentationsOrder){case u.PurchaseAugmentationsOrderSetting.Cost:r.click();break;case u.PurchaseAugmentationsOrderSetting.Reputation:s.click();break;default:l.click()}n.push(a);for(var c=0;c(p.Settings.SuppressBuyAugmentationConfirmation?I(o,n):x(o,n),!1)});o.name==i.b.NeuroFluxGovernor&&(g.innerText+=" - Level "+L());var _=Object(y.createElement)("p",{display:"inline"}),f=o.baseRepRequirement*a.augmentationRepRequirementMult;N(o)?o.name!=i.b.NeuroFluxGovernor&&(o.owned||s)?(g.setAttribute("class","a-link-button-inactive"),_.innerHTML="ALREADY OWNED"):n.playerReputation>=f?(g.setAttribute("class","a-link-button"),_.innerHTML="UNLOCKED - "+d.a.format(o.baseCost*a.augmentationPriceMult,"$0.000a")):(g.setAttribute("class","a-link-button-inactive"),_.innerHTML="LOCKED (Requires "+Object(b.formatNumber)(f,1)+" faction reputation) - "+d.a.format(o.baseCost*a.augmentationPriceMult,"$0.000a"),_.style.color="red"):(g.setAttribute("class","a-link-button-inactive"),_.innerHTML="LOCKED (Requires "+o.prereqs.join(",")+" as prerequisite(s))",_.style.color="red"),m.appendChild(g),h.appendChild(m),h.appendChild(_),u.appendChild(h),e.appendChild(u)}()}function x(e,t){const n=t.getInfo();var i=Object(v.d)(),a=Object(v.c)();i.innerHTML="Purchase",a.innerHTML="Cancel",i.addEventListener("click",function(){I(e,t)}),a.addEventListener("click",function(){Object(v.a)()}),Object(v.b)("

"+e.name+"


"+e.info+"


Would you like to purchase the "+e.name+" Augmentation for $"+Object(b.formatNumber)(e.baseCost*n.augmentationPriceMult,2)+"?")}function N(e){var t=!0;if(e.prereqs&&e.prereqs.length>0)for(var n=0;n{n=e,null!=t.Companies[n.name]&&console.warn(`Duplicate Company Position being defined: ${n.name}`),t.Companies[n.name]=new a.Company(n)});for(const n in t.Companies){const i=t.Companies[n];e[n]instanceof a.Company?(i.favor=e[n].favor,isNaN(i.favor)&&(i.favor=0)):i.favor=0}},t.loadCompanies=function(e){t.Companies=JSON.parse(e,r.Reviver)},t.companyExists=function(e){return t.Companies.hasOwnProperty(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(67),a={AutosaveInterval:60,CodeInstructionRunTime:50,DisableHotkeys:!1,Locale:"en",MaxLogCapacity:50,MaxPortCapacity:50,SuppressBuyAugmentationConfirmation:!1,SuppressFactionInvites:!1,SuppressHospitalizationPopup:!1,SuppressMessages:!1,SuppressTravelConfirmation:!1};t.Settings={AutosaveInterval:a.AutosaveInterval,CodeInstructionRunTime:25,DisableHotkeys:a.DisableHotkeys,EditorKeybinding:"ace",EditorTheme:"Monokai",Locale:"en",MaxLogCapacity:a.MaxLogCapacity,MaxPortCapacity:a.MaxPortCapacity,OwnedAugmentationsOrder:i.OwnedAugmentationsOrderSetting.AcquirementTime,PurchaseAugmentationsOrder:i.PurchaseAugmentationsOrderSetting.Default,SuppressBuyAugmentationConfirmation:a.SuppressBuyAugmentationConfirmation,SuppressFactionInvites:a.SuppressFactionInvites,SuppressHospitalizationPopup:a.SuppressHospitalizationPopup,SuppressMessages:a.SuppressMessages,SuppressTravelConfirmation:a.SuppressTravelConfirmation,init(){Object.assign(t.Settings,a)},load(e){Object.assign(t.Settings,JSON.parse(e))}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(50),a=n(65);t.removeElementById=function(e){try{const t=i.getElementById(e);a.removeElement(t)}catch(e){}}},function(e,t,n){"use strict";n.d(t,"b",function(){return S}),n.d(t,"c",function(){return C}),n.d(t,"d",function(){return R}),n.d(t,"i",function(){return A}),n.d(t,"h",function(){return w}),n.d(t,"e",function(){return P}),n.d(t,"f",function(){return x}),n.d(t,"a",function(){return O}),n.d(t,"g",function(){return N});var i=n(10),a=n(1),r=n(8),o=n(12),s=n(41),l=n(24),c=n(0),u=n(82),p=n(70),h=n(28),d=(n(11),n(67)),m=n(19),g=n(64),_=n(9),y=n(71),f=n(14),b=n(72),v=n(2),E=n(37),k=n(27);function O(e){null!=e.name&&null!=e.info&&null!=e.moneyCost&&null!=e.repCost?(this.name=e.name,this.info=e.info,this.owned=!1,this.prereqs=e.prereqs?e.prereqs:[],this.baseRepRequirement=e.repCost*a.CONSTANTS.AugmentationRepMultiplier*i.BitNodeMultipliers.AugmentationRepCost,this.baseCost=e.moneyCost*a.CONSTANTS.AugmentationCostMultiplier*i.BitNodeMultipliers.AugmentationMoneyCost,this.level=0):Object(_.dialogBoxCreate)("ERROR Creating Augmentations. This is a bug please contact game dev")}O.prototype.addToFactions=function(e){for(var t=0;t
This augmentation increases all of the player's combat stats by 8%."});t.addToFactions(["Tetrads","The Dark Army","The Syndicate"]),x(S.HemoRecirculator)&&delete C[S.HemoRecirculator],T(t);var n=new O({name:S.Targeting1,moneyCost:3e6,repCost:2e3,info:"This cranial implant is embedded within the player's inner ear structure and optic nerves. It regulates and enhances the user's balance and hand-eye coordination. It is also capable of augmenting reality by projecting digital information directly onto the retina. These enhancements allow the player to better lock-on and keep track of enemies.

This augmentation increases the player's dexterity by 10%."});n.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(S.Targeting1)&&delete C[S.Targeting1],T(n);var r=new O({name:S.Targeting2,moneyCost:85e5,repCost:3500,info:"This is an upgrade of the Augmented Targeting I cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 20%.",prereqs:[S.Targeting1]});r.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(S.Targeting2)&&delete C[S.Targeting2],T(r);var s=new O({name:S.Targeting3,moneyCost:23e6,repCost:11e3,info:"This is an upgrade of the Augmented Targeting II cranial implant, which is capable of augmenting reality and enhances the user's balance and hand-eye coordination.

This augmentation increases the player's dexterity by 30%.",prereqs:[S.Targeting2]});s.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),x(S.Targeting3)&&delete C[S.Targeting3],T(s);var l=new O({name:S.SyntheticHeart,moneyCost:575e6,repCost:3e5,info:"This advanced artificial heart, created from plasteel and graphene, is capable of pumping more blood at much higher efficiencies than a normal human heart.

This augmentation increases the player's agility and strength by 50%."});l.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati"]),x(S.SyntheticHeart)&&delete C[S.SyntheticHeart],T(l);var u=new O({name:S.SynfibrilMuscle,repCost:175e3,moneyCost:225e6,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'.

This augmentation increases the player's strength and defense by 30%."});u.addToFactions(["KuaiGong International","Fulcrum Secret Technologies","Speakers for the Dead","NWO","The Covenant","Daedalus","Illuminati","Blade Industries"]),x(S.SynfibrilMuscle)&&delete C[S.SynfibrilMuscle],T(u);var p=new O({name:S.CombatRib1,repCost:3e3,moneyCost:475e4,info:"The human body's ribs are replaced with artificial ribs that automatically and continuously release cognitive and performance-enhancing drugs into the bloodstream, improving the user's abilities in combat.

This augmentation increases the player's strength and defense by 10%."});p.addToFactions(["Slum Snakes","The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(S.CombatRib1)&&delete C[S.CombatRib1],T(p);var h=new O({name:S.CombatRib2,repCost:7500,moneyCost:13e6,info:"This is an upgrade to the Combat Rib I augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream.

This augmentation increases the player's strength and defense by 14%.",prereqs:[S.CombatRib1]});h.addToFactions(["The Dark Army","The Syndicate","Sector-12","Volhaven","Ishima","OmniTek Incorporated","KuaiGong International","Blade Industries"]),x(S.CombatRib2)&&delete C[S.CombatRib2],T(h);var d=new O({name:S.CombatRib3,repCost:14e3,moneyCost:24e6,info:"This is an upgrade to the Combat Rib II augmentation, and is capable of releasing even more potent combat-enhancing drugs into the bloodstream

.This augmentation increases the player's strength and defense by 18%.",prereqs:[S.CombatRib2]});d.addToFactions(["The Dark Army","The Syndicate","OmniTek Incorporated","KuaiGong International","Blade Industries","The Covenant"]),x(S.CombatRib3)&&delete C[S.CombatRib3],T(d);var m=new O({name:S.NanofiberWeave,repCost:15e3,moneyCost:25e6,info:"Synthetic nanofibers are woven into the skin's extracellular matrix using electrospinning. This improves the skin's ability to regenerate itself and protect the body from external stresses and forces.

This augmentation increases the player's strength and defense by 20%."});m.addToFactions(["Tian Di Hui","The Syndicate","The Dark Army","Speakers for the Dead","Blade Industries","Fulcrum Secret Technologies","OmniTek Incorporated"]),x(S.NanofiberWeave)&&delete C[S.NanofiberWeave],T(m);var g=new O({name:S.SubdermalArmor,repCost:35e4,moneyCost:65e7,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-related or electrical traumas.

This augmentation increases the player's defense by 120%."});g.addToFactions(["The Syndicate","Fulcrum Secret Technologies","Illuminati","Daedalus","The Covenant"]),x(S.SubdermalArmor)&&delete C[S.SubdermalArmor],T(g);var _=new O({name:S.WiredReflexes,repCost:500,moneyCost:5e5,info:"Synthetic nerve-enhancements are injected into all major parts of the somatic nervous system, supercharging the body's ability to send signals through neurons. This results in increased reflex speed.

This augmentation increases the player's agility and dexterity by 5%."});_.addToFactions(["Tian Di Hui","Slum Snakes","Sector-12","Volhaven","Aevum","Ishima","The Syndicate","The Dark Army","Speakers for the Dead"]),x(S.WiredReflexes)&&delete C[S.WiredReflexes],T(_);var y=new O({name:S.GrapheneBoneLacings,repCost:45e4,moneyCost:85e7,info:"A graphene-based material is grafted and fused into the user's bones, significantly increasing their density and tensile strength.

This augmentation increases the player's strength and defense by 70%."});y.addToFactions(["Fulcrum Secret Technologies","The Covenant"]),x(S.GrapheneBoneLacings)&&delete C[S.GrapheneBoneLacings],T(y);var f=new O({name:S.BionicSpine,repCost:18e3,moneyCost:25e6,info:"An artificial spine created from plasteel and carbon fibers that completely replaces the organic spine. Not only is the Bionic Spine physically stronger than a human spine, but it is also capable of digitally stimulating and regulating the neural signals that are sent and received by the spinal cord. This results in greatly improved senses and reaction speeds.

This augmentation increases all of the player's combat stats by 15%."});f.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(S.BionicSpine)&&delete C[S.BionicSpine],T(f);var v=new O({name:S.GrapheneBionicSpine,repCost:65e4,moneyCost:12e8,info:"An upgrade to the Bionic Spine augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases all of the player's combat stats by 60%.",prereqs:[S.BionicSpine]});v.addToFactions(["Fulcrum Secret Technologies","ECorp"]),x(S.GrapheneBionicSpine)&&delete C[S.GrapheneBionicSpine],T(v);var E=new O({name:S.BionicLegs,repCost:6e4,moneyCost:75e6,info:"Cybernetic legs created from plasteel and carbon fibers that completely replace the user's organic legs.

This augmentation increases the player's agility by 60%."});E.addToFactions(["Speakers for the Dead","The Syndicate","KuaiGong International","OmniTek Incorporated","Blade Industries"]),x(S.BionicLegs)&&delete C[S.BionicLegs],T(E);var k=new O({name:S.GrapheneBionicLegs,repCost:3e5,moneyCost:9e8,info:"An upgrade to the Bionic Legs augmentation. It fuses the implant with an advanced graphene material to make it much stronger and lighter.

This augmentation increases the player's agility by 150%.",prereqs:[S.BionicLegs]});k.addToFactions(["MegaCorp","ECorp","Fulcrum Secret Technologies"]),x(S.GrapheneBionicLegs)&&delete C[S.GrapheneBionicLegs],T(k);var w=new O({name:S.SpeechProcessor,repCost:3e3,moneyCost:1e7,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.

This augmentation increases the player's charisma by 20%."});w.addToFactions(["Tian Di Hui","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Silhouette"]),x(S.SpeechProcessor)&&delete C[S.SpeechProcessor],T(w);let P=new O({name:S.TITN41Injection,repCost:1e4,moneyCost:38e6,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.

This augmentation increases the player's charisma and charisma experience gain rate by 15%."});P.addToFactions(["Silhouette"]),x(S.TITN41Injection)&&delete C[S.TITN41Injection],T(P);var R=new O({name:S.EnhancedSocialInteractionImplant,repCost:15e4,moneyCost:275e6,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 expression, body language, and the voice's tone/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.

This augmentation increases the player's charisma and charisma experience gain rate by 60%."});R.addToFactions(["Bachman & Associates","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma"]),x(S.EnhancedSocialInteractionImplant)&&delete C[S.EnhancedSocialInteractionImplant],T(R);var A=new O({name:S.BitWire,repCost:1500,moneyCost:2e6,info:"A small brain implant embedded in the cerebrum. This regulates and improves the brain's computing capabilities.

This augmentation increases the player's hacking skill by 5%."});A.addToFactions(["CyberSec","NiteSec"]),x(S.BitWire)&&delete C[S.BitWire],T(A);var N=new O({name:S.ArtificialBioNeuralNetwork,repCost:11e4,moneyCost:6e8,info:"A network consisting of millions of nanoprocessors is embedded into the brain. The network is meant to mimick the way a biological brain solves a problem, which 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 its user to solve much more complex problems at a much faster rate.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player's gains from hacking by 15%.
Increases the player's hacking skill by 12%."});N.addToFactions(["BitRunners","Fulcrum Secret Technologies"]),x(S.ArtificialBioNeuralNetwork)&&delete C[S.ArtificialBioNeuralNetwork],T(N);var I=new O({name:S.ArtificialSynapticPotentiation,repCost:2500,moneyCost:16e6,info:"The body is injected with a chemical that artificially induces synaptic potentiation, otherwise known as the strengthening of synapses. This results in a enhanced cognitive abilities.

This augmentation:
Increases the player's hacking speed by 2%
Increases the player's hacking chance by 5%.
Increases the player's hacking experience gain rate by 5%."});I.addToFactions(["The Black Hand","NiteSec"]),x(S.ArtificialSynapticPotentiation)&&delete C[S.ArtificialSynapticPotentiation],T(I);var L=new O({name:S.EnhancedMyelinSheathing,repCost:4e4,moneyCost:275e6,info:"Electrical signals are used to induce a new, artificial form of myelinogensis 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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the player's hacking skill by 8%.
Increases the player's hacking experience gain rate by 10%."});L.addToFactions(["Fulcrum Secret Technologies","BitRunners","The Black Hand"]),x(S.EnhancedMyelinSheathing)&&delete C[S.EnhancedMyelinSheathing],T(L);var B=new O({name:S.SynapticEnhancement,repCost:800,moneyCost:15e5,info:"A small cranial implant that continuously uses weak electric signals to stimulate the brain and induce stronger synaptic activity. This improves the user's cognitive abilities.

This augmentation increases the player's hacking speed by 3%."});B.addToFactions(["CyberSec"]),x(S.SynapticEnhancement)&&delete C[S.SynapticEnhancement],T(B);var D=new O({name:S.NeuralRetentionEnhancement,repCost:8e3,moneyCost:5e7,info:"Chemical injections are used to permanently alter and strengthen the brain's neuronal circuits, strengthening its ability to retain information.

This augmentation increases the player's hacking experience gain rate by 25%."});D.addToFactions(["NiteSec"]),x(S.NeuralRetentionEnhancement)&&delete C[S.NeuralRetentionEnhancement],T(D);var j=new O({name:S.DataJack,repCost:45e3,moneyCost:9e7,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.

This augmentation increases the amount of money the player gains from hacking by 25%."});j.addToFactions(["BitRunners","The Black Hand","NiteSec","Chongqing","New Tokyo"]),x(S.DataJack)&&delete C[S.DataJack],T(j);var W=new O({name:S.ENM,repCost:6e3,moneyCost:5e7,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.

This augmentation increases the player's hacking skill by 8%."});W.addToFactions(["BitRunners","The Black Hand","NiteSec","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),x(S.ENM)&&delete C[S.ENM],T(W);var F=new O({name:S.ENMCore,repCost:1e5,moneyCost:5e8,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.

This augmentation:
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%.
Increases the player's chance of successfully performing a hack by 3%.
Increases the player's hacking experience gain rate by 7%.
Increases the player's hacking skill by 7%.",prereqs:[S.ENM]});F.addToFactions(["BitRunners","The Black Hand","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries"]),x(S.ENMCore)&&delete C[S.ENMCore],T(F);var U=new O({name:S.ENMCoreV2,repCost:4e5,moneyCost:9e8,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 the information on a network by re-routing traffic, spoofing IP addresses, or altering the data inside network packets.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 30%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking experience gain rate by 15%.
Increases the player's hacking skill by 8%.",prereqs:[S.ENMCore]});U.addToFactions(["BitRunners","ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Blade Industries","OmniTek Incorporated","KuaiGong International"]),x(S.ENMCoreV2)&&delete C[S.ENMCoreV2],T(U);var H=new O({name:S.ENMCoreV3,repCost:7e5,moneyCost:15e8,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.

This augmentation:
Increases the player's hacking speed by 5%.
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 25%.
Increases the player's hacking skill by 10%.",prereqs:[S.ENMCoreV2]});H.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(S.ENMCoreV3)&&delete C[S.ENMCoreV3],T(H);var G=new O({name:S.ENMAnalyzeEngine,repCost:25e4,moneyCost:12e8,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.

This augmentation increases the player's hacking speed by 10%.",prereqs:[S.ENM]});G.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(S.ENMAnalyzeEngine)&&delete C[S.ENMAnalyzeEngine],T(G);var K=new O({name:S.ENMDMA,repCost:4e5,moneyCost:14e8,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.

This augmentation:
Increases the amount of money the player gains from hacking by 40%.
Increases the player's chance of successfully performing a hack by 20%.",prereqs:[S.ENM]});K.addToFactions(["ECorp","MegaCorp","Fulcrum Secret Technologies","NWO","Daedalus","The Covenant","Illuminati"]),x(S.ENMDMA)&&delete C[S.ENMDMA],T(K);var q=new O({name:S.Neuralstimulator,repCost:2e4,moneyCost:6e8,info:"A cranial implant that intelligently stimulates certain areas of the brain in order to improve cognitive functions.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking experience gain rate by 12%."});q.addToFactions(["The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Bachman & Associates","Clarke Incorporated","Four Sigma"]),x(S.Neuralstimulator)&&delete C[S.Neuralstimulator],T(q);var $=new O({name:S.NeuralAccelerator,repCost:8e4,moneyCost:35e7,info:"A microprocessor that accelerates the processing speed of biological neural networks. This is a cranial implant that is embedded inside the brain.

This augmentation:
Increases the player's hacking skill by 10%.
Increases the player's hacking experience gain rate by 15%.
Increases the amount of money the player gains from hacking by 20%."});$.addToFactions(["BitRunners"]),x(S.NeuralAccelerator)&&delete C[S.NeuralAccelerator],T($);var Y=new O({name:S.CranialSignalProcessorsG1,repCost:4e3,moneyCost:14e6,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.

This augmentation:
Increases the player's hacking speed by 1%.
Increases the player's hacking skill by 5%."});Y.addToFactions(["CyberSec"]),x(S.CranialSignalProcessorsG1)&&delete C[S.CranialSignalProcessorsG1],T(Y);var z=new O({name:S.CranialSignalProcessorsG2,repCost:7500,moneyCost:25e6,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the player's chance of successfully performing a hack by 5%.
Increases the player's hacking skill by 7%.",prereqs:[S.CranialSignalProcessorsG1]});z.addToFactions(["CyberSec","NiteSec"]),x(S.CranialSignalProcessorsG2)&&delete C[S.CranialSignalProcessorsG2],T(z);var V=new O({name:S.CranialSignalProcessorsG3,repCost:2e4,moneyCost:11e7,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 15%.
Increases the player's hacking skill by 9%.",prereqs:[S.CranialSignalProcessorsG2]});V.addToFactions(["NiteSec","The Black Hand","BitRunners"]),x(S.CranialSignalProcessorsG3)&&delete C[S.CranialSignalProcessorsG3],T(V);var J=new O({name:S.CranialSignalProcessorsG4,repCost:5e4,moneyCost:22e7,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.

This augmentation:
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 20%.
Increases the amount of money the player can inject into servers using grow() by 25%.",prereqs:[S.CranialSignalProcessorsG3]});J.addToFactions(["The Black Hand","BitRunners"]),x(S.CranialSignalProcessorsG4)&&delete C[S.CranialSignalProcessorsG4],T(J);var X=new O({name:S.CranialSignalProcessorsG5,repCost:1e5,moneyCost:45e7,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.

This augmentation:
Increases the player's hacking skill by 30%.
Increases the amount of money the player gains from hacking by 25%.
Increases the amount of money the player can inject into servers using grow() by 75%.",prereqs:[S.CranialSignalProcessorsG4]});X.addToFactions(["BitRunners"]),x(S.CranialSignalProcessorsG5)&&delete C[S.CranialSignalProcessorsG5],T(X);var Q=new O({name:S.NeuronalDensification,repCost:75e3,moneyCost:275e6,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.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 10%.
Increases the player's hacking speed by 3%."});Q.addToFactions(["Clarke Incorporated"]),x(S.NeuronalDensification)&&delete C[S.NeuronalDensification],T(Q);var Z=new O({name:S.NuoptimalInjectorImplant,repCost:2e3,moneyCost:4e6,info:"This torso implant automatically injects nootropic supplements into the bloodstream to improve memory, increase focus, and provide other cognitive enhancements.

This augmentation increases the amount of reputation the player gains when working for a company by 20%."});Z.addToFactions(["Tian Di Hui","Volhaven","New Tokyo","Chongqing","Ishima","Clarke Incorporated","Four Sigma","Bachman & Associates"]),x(S.NuoptimalInjectorImplant)&&delete C[S.NuoptimalInjectorImplant],T(Z);var ee=new O({name:S.SpeechEnhancement,repCost:1e3,moneyCost:25e5,info:"An advanced neural implant that improves your speaking abilities, making you more convincing and likable in conversations and overall improving your social interactions.

This augmentation:
Increases the player's charisma by 10%.
Increases the amount of reputation the player gains when working for a company by 10%."});ee.addToFactions(["Tian Di Hui","Speakers for the Dead","Four Sigma","KuaiGong International","Clarke Incorporated","Bachman & Associates"]),x(S.SpeechEnhancement)&&delete C[S.SpeechEnhancement],T(ee);var te=new O({name:S.FocusWire,repCost:3e4,moneyCost:18e7,info:"A cranial implant that stops procrastination by blocking specific neural pathways in the brain.

This augmentation:
Increases all experience gains by 5%.
Increases the amount of money the player gains from working by 20%.
Increases the amount of reputation the player gains when working for a company by 10%."});te.addToFactions(["Bachman & Associates","Clarke Incorporated","Four Sigma","KuaiGong International"]),x(S.FocusWire)&&delete C[S.FocusWire],T(te);var ne=new O({name:S.PCDNI,repCost:15e4,moneyCost:75e7,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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 30%.
Increases the player's hacking skill by 8%."});ne.addToFactions(["Four Sigma","OmniTek Incorporated","ECorp","Blade Industries"]),x(S.PCDNI)&&delete C[S.PCDNI],T(ne);var ie=new O({name:S.PCDNIOptimizer,repCost:2e5,moneyCost:9e8,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 the connected computer.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 75%.
Increases the player's hacking skill by 10%.",prereqs:[S.PCDNI]});ie.addToFactions(["Fulcrum Secret Technologies","ECorp","Blade Industries"]),x(S.PCDNIOptimizer)&&delete C[S.PCDNIOptimizer],T(ie);var ae=new O({name:S.PCDNINeuralNetwork,repCost:6e5,moneyCost:15e8,info:"This is an additional installation that upgrades the functionality of the PC Direct-Neural Interface augmentation. When connected to a computer, The NeuroNet Injector upgrade allows the user to use his/her own brain's processing power to aid the computer in computational tasks.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 100%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 5%.",prereqs:[S.PCDNI]});ae.addToFactions(["Fulcrum Secret Technologies"]),x(S.PCDNINeuralNetwork)&&delete C[S.PCDNINeuralNetwork],T(ae);var re=new O({name:S.ADRPheromone1,repCost:1500,moneyCost:35e5,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.

This augmentation:
Increases the amount of reputation the player gains when working for a company by 10%
Increases the amount of reputation the player gains for a faction by 10%."});re.addToFactions(["Tian Di Hui","The Syndicate","NWO","MegaCorp","Four Sigma"]),x(S.ADRPheromone1)&&delete C[S.ADRPheromone1],T(re);var oe=new O({name:S.ADRPheromone2,repCost:25e3,moneyCost:11e7,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.

This augmentation:
Increases the amount of reputation the player gains for a faction and company by 20%."});oe.addToFactions(["Silhouette","Four Sigma","Bachman & Associates","Clarke Incorporated"]),x(S.ADRPheromone2)&&delete C[S.ADRPheromone2],T(oe);var se=new O({name:S.HacknetNodeCPUUpload,repCost:1500,moneyCost:22e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 15%.
Decreases the cost of purchasing a Hacknet Node by 15%."});se.addToFactions(["Netburners"]),x(S.HacknetNodeCPUUpload)&&delete C[S.HacknetNodeCPUUpload],T(se);var le=new O({name:S.HacknetNodeCacheUpload,repCost:1e3,moneyCost:11e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of leveling up a Hacknet Node by 15%."});le.addToFactions(["Netburners"]),x(S.HacknetNodeCacheUpload)&&delete C[S.HacknetNodeCacheUpload],T(le);var ce=new O({name:S.HacknetNodeNICUpload,repCost:750,moneyCost:9e5,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.

This augmentation:
Increases the amount of money produced by Hacknet Nodes by 10%.
Decreases the cost of purchasing a Hacknet Node by 10%."});ce.addToFactions(["Netburners"]),x(S.HacknetNodeNICUpload)&&delete C[S.HacknetNodeNICUpload],T(ce);var ue=new O({name:S.HacknetNodeKernelDNI,repCost:3e3,moneyCost:8e6,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 the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 25%."});ue.addToFactions(["Netburners"]),x(S.HacknetNodeKernelDNI)&&delete C[S.HacknetNodeKernelDNI],T(ue);var pe=new O({name:S.HacknetNodeCoreDNI,repCost:5e3,moneyCost:12e6,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 the mind's electrochemical signals.

This augmentation increases the amount of money produced by Hacknet Nodes by 45%."});pe.addToFactions(["Netburners"]),x(S.HacknetNodeCoreDNI)&&delete C[S.HacknetNodeCoreDNI],T(pe);var he=new O({name:S.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.

This is a special augmentation because it can be leveled up infinitely. Each level of this augmentation increases ALL of the player's multipliers by 1%."});let de=0;for(let e=0;e
This augmentation increases the player's experience gain rate for all stats by 10%."});ge.addToFactions(["CyberSec"]),x(S.Neurotrainer1)&&delete C[S.Neurotrainer1],T(ge);var _e=new O({name:S.Neurotrainer2,repCost:4e3,moneyCost:9e6,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.

This augmentation increases the player's experience gain rate for all stats by 15%."});_e.addToFactions(["BitRunners","NiteSec"]),x(S.Neurotrainer2)&&delete C[S.Neurotrainer2],T(_e);var ye=new O({name:S.Neurotrainer3,repCost:1e4,moneyCost:26e6,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.

This augmentation increases the player's experience gain rate for all stats by 20%."});ye.addToFactions(["NWO","Four Sigma"]),x(S.Neurotrainer3)&&delete C[S.Neurotrainer3],T(ye);var fe=new O({name:S.Hypersight,repCost:6e4,moneyCost:55e7,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 wells, thus providing 'x-ray vision'-like capabilities.

This augmentation:
Increases the player's dexterity by 40%.
Increases the player's hacking speed by 3%.
Increases the amount of money the player gains from hacking by 10%."});fe.addToFactions(["Blade Industries","KuaiGong International"]),x(S.Hypersight)&&delete C[S.Hypersight],T(fe);var be=new O({name:S.LuminCloaking1,repCost:600,moneyCost:1e6,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 from the naked eye.

This augmentation:
Increases the player's agility by 5%
Increases the amount of money the player gains from crimes by 10%."});be.addToFactions(["Slum Snakes","Tetrads"]),x(S.LuminCloaking1)&&delete C[S.LuminCloaking1],T(be);var ve=new O({name:S.LuminCloaking2,repCost:2e3,moneyCost:6e6,info:"This is a more advanced version of the LuminCloaking-V2 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.

This augmentation:
Increases the player's agility by 10%
Increases the player's defense by 10%
Increases the amount of money the player gains from crimes by 25%.",prereqs:[S.LuminCloaking1]});ve.addToFactions(["Slum Snakes","Tetrads"]),x(S.LuminCloaking2)&&delete C[S.LuminCloaking2],T(ve);var Ee=new O({name:S.SmartSonar,repCost:9e3,moneyCost:15e6,info:"A cochlear implant that helps the player detect and locate enemies using sound propagation.

This augmentation:
Increases the player's dexterity by 10%.
Increases the player's dexterity experience gain rate by 15%.
Increases the amount of money the player gains from crimes by 25%."});Ee.addToFactions(["Slum Snakes"]),x(S.SmartSonar)&&delete C[S.SmartSonar],T(Ee);var ke=new O({name:S.PowerRecirculator,repCost:1e4,moneyCost:36e6,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.

This augmentation:
Increases all of the player's stats by 5%.
Increases the player's experience gain rate for all stats by 10%."});ke.addToFactions(["Tetrads","The Dark Army","The Syndicate","NWO"]),x(S.PowerRecirculator)&&delete C[S.PowerRecirculator],T(ke);var Oe=new O({name:S.QLink,repCost:75e4,moneyCost:13e8,info:"A brain implant that wirelessly connects you to the Illuminati's quantum supercomputer, allowing you to access and use its incredible computing power.

This augmentation:
Increases the player's hacking speed by 10%.
Increases the player's chance of successfully performing a hack by 30%.
Increases the amount of money the player gains from hacking by 100%."});Oe.addToFactions(["Illuminati"]),x(S.QLink)&&delete C[S.QLink],T(Oe);var Ce=new O({name:S.TheRedPill,repCost:1e6,moneyCost:0,info:"It's time to leave the cave."});Ce.addToFactions(["Daedalus"]),x(S.TheRedPill)&&delete C[S.TheRedPill],T(Ce);var Te=new O({name:S.SPTN97,repCost:5e5,moneyCost:975e6,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.

This augmentation:
Increases all of the player's combat stats by 75%.
Increases the player's hacking skill by 15%."});Te.addToFactions(["The Covenant"]),x(S.SPTN97)&&delete C[S.SPTN97],T(Te);var Se=new O({name:S.HiveMind,repCost:6e5,moneyCost:11e8,info:"A brain implant developed by ECorp. They do not reveal what exactly the implant does, but they promise that it will greatly enhance your abilities."});Se.addToFactions(["ECorp"]),x(S.HiveMind)&&delete C[S.HiveMind],T(Se);var we=new O({name:S.CordiARCReactor,repCost:45e4,moneyCost:1e9,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 amount of clean energy for the body.

This augmentation:
Increases all of the player's combat stats by 35%.
Increases all of the player's combat stat experience gain rate by 35%."});we.addToFactions(["MegaCorp"]),x(S.CordiARCReactor)&&delete C[S.CordiARCReactor],T(we);var Me=new O({name:S.SmartJaw,repCost:15e4,moneyCost:55e7,info:"A bionic jaw that contains advanced hardware and software capable of psychoanalyzing and profiling the personality of others using optical imaging software.

This augmentation:
Increases the player's charisma by 50%.
Increases the player's charisma experience gain rate by 50%.
Increases the amount of reputation the player gains for a company by 25%.
Increases the amount of reputation the player gains for a faction by 25%."});Me.addToFactions(["Bachman & Associates"]),x(S.SmartJaw)&&delete C[S.SmartJaw],T(Me);var Pe=new O({name:S.Neotra,repCost:225e3,moneyCost:575e6,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.

This augmentation increases the player's strength and defense by 55%."});Pe.addToFactions(["Blade Industries"]),x(S.Neotra)&&delete C[S.Neotra],T(Pe);var Re=new O({name:S.Xanipher,repCost:35e4,moneyCost:85e7,info:"A concoction of advanced nanobots that is orally ingested into the body. These nanobots induce physiological change and significantly improve the body's functionining in all aspects.

This augmentation:
Increases all of the player's stats by 20%.
Increases the player's experience gain rate for all stats by 15%."});Re.addToFactions(["NWO"]),x(S.Xanipher)&&delete C[S.Xanipher],T(Re);var Ae=new O({name:S.nextSENS,repCost:175e3,moneyCost:385e6,info:"The body is genetically re-engineered to maintain a state of negligible senescence, preventing the body from deteriorating with age.

This augmentation increases all of the player's stats by 20%."});Ae.addToFactions(["Clarke Incorporated"]),x(S.nextSENS)&&delete C[S.nextSENS],T(Ae);var xe=new O({name:S.OmniTekInfoLoad,repCost:25e4,moneyCost:575e6,info:"OmniTek's data and information repository is uploaded into your brain, enhancing your programming and hacking abilities.

This augmentation:
Increases the player's hacking skill by 20%.
Increases the player's hacking experience gain rate by 25%."});xe.addToFactions(["OmniTek Incorporated"]),x(S.OmniTekInfoLoad)&&delete C[S.OmniTekInfoLoad],T(xe);var Ne=new O({name:S.PhotosyntheticCells,repCost:225e3,moneyCost:55e7,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.

This augmentation increases the player's strength, defense, and agility by 40%."});Ne.addToFactions(["KuaiGong International"]),x(S.PhotosyntheticCells)&&delete C[S.PhotosyntheticCells],T(Ne);var Ie=new O({name:S.Neurolink,repCost:35e4,moneyCost:875e6,info:"A brain implant that provides a high-bandwidth, direct neural link between your mind and BitRunners' data servers, which reportedly contain the largest database of hacking tools and information in the world.

This augmentation:
Increases the player's hacking skill by 15%.
Increases the player's hacking experience gain rate by 20%.
Increases the player's chance of successfully performing a hack by 10%.
Increases the player's hacking speed by 5%.
Lets the player start with the FTPCrack.exe and relaySMTP.exe programs after a reset."});Ie.addToFactions(["BitRunners"]),x(S.Neurolink)&&delete C[S.Neurolink],T(Ie);var Le=new O({name:S.TheBlackHand,repCost:4e4,moneyCost:11e7,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 just by touching them.

This augmentation:
Increases the player's strength and dexterity by 15%.
Increases the player's hacking skill by 10%.
Increases the player's hacking speed by 2%.
Increases the amount of money the player gains from hacking by 10%."});Le.addToFactions(["The Black Hand"]),x(S.TheBlackHand)&&delete C[S.TheBlackHand],T(Le);var Be=new O({name:S.CRTX42AA,repCost:18e3,moneyCost:45e6,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.

This augmentation:
Improves the player's hacking skill by 8%.
Improves the player's hacking experience gain rate by 15%."});Be.addToFactions(["NiteSec"]),x(S.CRTX42AA)&&delete C[S.CRTX42AA],T(Be);var De=new O({name:S.Neuregen,repCost:15e3,moneyCost:75e6,info:"A drug that genetically modifies the neurons in the brain. The result is that these neurons never die and continuously regenerate and strengthen themselves.

This augmentation increases the player's hacking experience gain rate by 40%."});De.addToFactions(["Chongqing"]),x(S.Neuregen)&&delete C[S.Neuregen],T(De);var je=new O({name:S.CashRoot,repCost:5e3,moneyCost:25e6,info:"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.

This augmentation:
Lets the player start with $1,000,000 after a reset.
Lets the player start with the BruteSSH.exe program after a reset."});je.addToFactions(["Sector-12"]),x(S.CashRoot)&&delete C[S.CashRoot],T(je);var We=new O({name:S.NutriGen,repCost:2500,moneyCost:5e5,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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 20%."});We.addToFactions(["New Tokyo"]),x(S.NutriGen)&&delete C[S.NutriGen],T(We);var Fe=new O({name:S.INFRARet,repCost:3e3,moneyCost:6e6,info:"A retina implant consisting of a tiny chip that sits behind the retina. This implant lets people visually detect infrared radiation.

This augmentation:
Increases the player's crime success rate by 25%.
Increases the amount of money the player gains from crimes by 10%.
Increases the player's dexterity by 10%."});Fe.addToFactions(["Ishima"]),x(S.INFRARet)&&delete C[S.INFRARet],T(Fe);var Ue=new O({name:S.DermaForce,repCost:6e3,moneyCost:1e7,info:"A synthetic skin is grafted onto the body. The skin consists of millions of nanobots capable of projecting high-density muon beams, creating an energy barrier around the user.

This augmentation increases the player's defense by 40%."});Ue.addToFactions(["Volhaven"]),x(S.DermaForce)&&delete C[S.DermaForce],T(Ue);var He=new O({name:S.GrapheneBrachiBlades,repCost:9e4,moneyCost:5e8,info:"An upgrade to the BrachiBlades augmentation. It infuses the retractable blades with an advanced graphene material to make them much stronger and lighter.

This augmentation:
Increases the player's strength and defense by 40%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 30%.",prereqs:[S.BrachiBlades]});He.addToFactions(["Speakers for the Dead"]),x(S.GrapheneBrachiBlades)&&delete C[S.GrapheneBrachiBlades],T(He);var Ge=new O({name:S.GrapheneBionicArms,repCost:2e5,moneyCost:75e7,info:"An upgrade to the Bionic Arms augmentation. It infuses the prosthetic arms with an advanced graphene material to make them much stronger and lighter.

This augmentation increases the player's strength and dexterity by 85%.",prereqs:[S.BionicArms]});Ge.addToFactions(["The Dark Army"]),x(S.GrapheneBionicArms)&&delete C[S.GrapheneBionicArms],T(Ge);var Ke=new O({name:S.BrachiBlades,repCost:5e3,moneyCost:18e6,info:"A set of retractable plasteel blades are implanted in the arm, underneath the skin.

This augmentation:
Increases the player's strength and defense by 15%.
Increases the player's crime success rate by 10%.
Increases the amount of money the player gains from crimes by 15%."});Ke.addToFactions(["The Syndicate"]),x(S.BrachiBlades)&&delete C[S.BrachiBlades],T(Ke);var qe=new O({name:S.BionicArms,repCost:25e3,moneyCost:55e6,info:"Cybernetic arms created from plasteel and carbon fibers that completely replace the user's organic arms.

This augmentation increases the user's strength and dexterity by 30%."});qe.addToFactions(["Tetrads"]),x(S.BionicArms)&&delete C[S.BionicArms],T(qe);var $e=new O({name:S.SNA,repCost:2500,moneyCost:6e6,info:"A cranial implant that affects the user's personality, making them better at negotiation in social situations.

This augmentation:
Increases the amount of money the player earns at a company by 10%.
Increases the amount of reputation the player gains when working for a company or faction by 15%."});$e.addToFactions(["Tian Di Hui"]),x(S.SNA)&&delete C[S.SNA],T($e),2===c.a.bitNodeN&&(console.log("Adding all augmentations to crime factions for Bit node 2"),o.b["Slum Snakes"].addAllAugmentations(),o.b.Tetrads.addAllAugmentations(),o.b["The Syndicate"].addAllAugmentations(),o.b["The Dark Army"].addAllAugmentations(),o.b["Speakers for the Dead"].addAllAugmentations(),o.b.NiteSec.addAllAugmentations(),o.b["The Black Hand"].addAllAugmentations());if(Object(o.d)("Bladeburners")){var Ye=new O({name:S.EsperEyewear,repCost:500,moneyCost:33e6,info:"Ballistic-grade protective and retractable eyewear that was designed specially 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, laser, flash, and gas. It is also embedded with a data processing chip that can be programmed to display an AR HUD and assist the user in field missions.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 3%.
Increases the player's dexterity by 5%."});Ye.addToFactions(["Bladeburners"]),M(Ye);var ze=new O({name:S.EMS4Recombination,repCost:1e3,moneyCost:55e6,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, and improve reflexes and memory-recall among other things.

This augmentation:
Increases the player's sucess chance in Bladeburner contracts/operations by 3%.
Increases the player's effectiveness in Bladeburner Field Analysis by 5%.
Increases the player's Bladeburner stamina gain rate by 2%."});ze.addToFactions(["Bladeburners"]),M(ze);var Ve=new O({name:S.OrionShoulder,repCost:2500,moneyCost:11e7,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.

This augmentation:
Increases the player's defense by 5%.
Increases the player's strength and dexterity by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 4%."});Ve.addToFactions(["Bladeburners"]),M(Ve);var Je=new O({name:S.HyperionV1,repCost:5e3,moneyCost:55e7,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.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 6%."});Je.addToFactions(["Bladeburners"]),M(Je);var Xe=new O({name:S.HyperionV2,repCost:1e4,moneyCost:11e8,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-efficiency, more accurate, and can fire plasma bolts at a much higher velocity than the V1 model.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[S.HyperionV1]});Xe.addToFactions(["Bladeburners"]),M(Xe);var Qe=new O({name:S.GolemSerum,repCost:12500,moneyCost:22e8,info:"A serum that permanently enhances many aspects of a human's capabilities, including strength, speed, immune system performance, and mitochondrial efficiency. The serum was originally developed by the Chinese military in an attempt to create super soldiers.

This augmentation:
Increases all of the player's combat stats by 7%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});Qe.addToFactions(["Bladeburners"]),M(Qe);var Ze=new O({name:S.VangelisVirus,repCost:7500,moneyCost:55e7,info:"A synthetic symbiotic virus that is injected into the human brain tissue. The Vangelis virus heightens the senses and focus of its host, and also enhances its intuition.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 4%.
Increases the player's dexterity experience gain rate by 10%."});Ze.addToFactions(["Bladeburners"]),M(Ze);var et=new O({name:S.VangelisVirus3,repCost:15e3,moneyCost:22e8,info:"An improved version of Vangelis, a synthetic symbiotic virus that is injected into the human brain tissue. On top of the benefits of the original virus, this also grants an accelerated healing factor and enhanced agility/reflexes.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's defense and dexterity experience gain rate by 10%.
Increases the player's success chance in Bladeburner contracts/operations by 5%.",prereqs:[S.VangelisVirus]});et.addToFactions(["Bladeburners"]),M(et);var tt=new O({name:S.INTERLINKED,repCost:1e4,moneyCost:11e8,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.

This augmentation:
Increases the player's experience gain rate for all combat stats by 5%.
Increases the player's Bladeburner max stamina by 10%."});tt.addToFactions(["Bladeburners"]),M(tt);var nt=new O({name:S.BladeRunner,repCost:8e3,moneyCost:165e7,info:"A cybernetic foot augmentation that was specially created for Bladeburners during the Synthoid Uprising. The organic musculature of the human foot is enhanced with flexible carbon nanotube matrices that are controlled by intelligent servo-motors.

This augmentation:
Increases the player's agility by 5%.
Increases the player's Bladeburner max stamina by 5%.
Increases the player's Bladeburner stamina gain rate by 5%.
"});nt.addToFactions(["Bladeburners"]),M(nt);var it=new O({name:S.BladeArmor,repCost:5e3,moneyCost:275e6,info:"A powered exoskeleton suit (exosuit) designed as armor for Bladeburner units. This exoskeleton is incredibly adaptable and can protect the wearer from blunt, piercing, concussive, thermal, chemical, and electric trauma. It also enhances the user's strength and agility.

This augmentation:
Increases all of the player's combat stats by 4%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's success chance in Bladeburner contracts/operations by 3%."});it.addToFactions(["Bladeburners"]),M(it);var at=new O({name:S.BladeArmorPowerCells,repCost:7500,moneyCost:55e7,info:"Upgrades the BLADE-51b Tesla Armor with Ion Power Cells, which are capable of more efficiently storing and using power.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 5%.
Increases the player's Bladeburner stamina gain rate by 2%.
Increases the player's Bladeburner max stamina by 5%.",prereqs:[S.BladeArmor]});at.addToFactions(["Bladeburners"]),M(at);var rt=new O({name:S.BladeArmorEnergyShielding,repCost:8500,moneyCost:11e8,info:"Upgrades the BLADE-51b Tesla Armor with a plasma energy propulsion system that is capable of projecting an energy shielding force field.

This augmentation:
Increases the player's defense by 5%.
Increases the player's success chance in Bladeburner contracts/operations by 6%.",prereqs:[S.BladeArmor]});rt.addToFactions(["Bladeburners"]),M(rt);var ot=new O({name:S.BladeArmorUnibeam,repCost:12500,moneyCost:33e8,info:"Upgrades the BLADE-51b Tesla Armor with a concentrated deuterium-fluoride laser weapon. It's precision an accuracy makes it useful for quickly neutralizing threats while keeping casualties to a minimum.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 8%.",prereqs:[S.BladeArmor]});ot.addToFactions(["Bladeburners"]),M(ot);var st=new O({name:S.BladeArmorOmnibeam,repCost:25e3,moneyCost:55e8,info:"Upgrades the BLADE-51b Tesla Armor Unibeam augmentation to use multiple-fiber system. The upgraded weapon uses multiple fiber laser modules that combine together to form a single, more powerful beam of up to 2000MW.

This augmentation:
Increases the player's success chance in Bladeburner contracts/operations by 10%.",prereqs:[S.BladeArmorUnibeam]});st.addToFactions(["Bladeburners"]),M(st);var lt=new O({name:S.BladeArmorIPU,repCost:6e3,moneyCost:22e7,info:"Upgrades the BLADE-51b Tesla Armor with an AI Information Processing Unit that was specially designed to analyze Synthoid related data and information.

This augmentation:
Increases the player's effectiveness in Bladeburner Field Analysis by 15%.
Increases the player's success chance in Bladeburner contracts/operations by 2%.",prereqs:[S.BladeArmor]});lt.addToFactions(["Bladeburners"]),M(lt);var ct=new O({name:S.BladesSimulacrum,repCost:3e3,moneyCost:8e10,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 specially weaponized by Bladeburner units to be used against Synthoids.

This augmentation allows you to perform Bladeburner actions and other actions (such as working, commiting crimes, etc.) at the same time."});ct.addToFactions(["Bladeburners"]),M(ct)}var ut=Math.pow(a.CONSTANTS.MultipleAugMultiplier,c.a.queuedAugmentations.length);for(var e in C)C.hasOwnProperty(e)&&(C[e].baseCost*=ut);c.a.reapplyAllAugmentations()}function M(e){if(!(e instanceof O))throw new Error("Invalid argument 'newAugObject' passed into resetAugmentation");var t=e.name;x(t)&&delete C[t],T(e)}function P(e,t=!1){switch(C[e.name].owned=!0,e.name){case S.Targeting1:c.a.dexterity_mult*=1.1;break;case S.Targeting2:c.a.dexterity_mult*=1.2;break;case S.Targeting3:c.a.dexterity_mult*=1.3;break;case S.SyntheticHeart:c.a.agility_mult*=1.5,c.a.strength_mult*=1.5;break;case S.SynfibrilMuscle:c.a.strength_mult*=1.3,c.a.defense_mult*=1.3;break;case S.CombatRib1:c.a.strength_mult*=1.1,c.a.defense_mult*=1.1;break;case S.CombatRib2:c.a.strength_mult*=1.14,c.a.defense_mult*=1.14;break;case S.CombatRib3:c.a.strength_mult*=1.18,c.a.defense_mult*=1.18;break;case S.NanofiberWeave:c.a.strength_mult*=1.2,c.a.defense_mult*=1.2;break;case S.SubdermalArmor:c.a.defense_mult*=2.2;break;case S.WiredReflexes:c.a.agility_mult*=1.05,c.a.dexterity_mult*=1.05;break;case S.GrapheneBoneLacings:c.a.strength_mult*=1.7,c.a.defense_mult*=1.7;break;case S.BionicSpine:c.a.strength_mult*=1.15,c.a.defense_mult*=1.15,c.a.agility_mult*=1.15,c.a.dexterity_mult*=1.15;break;case S.GrapheneBionicSpine:c.a.strength_mult*=1.6,c.a.defense_mult*=1.6,c.a.agility_mult*=1.6,c.a.dexterity_mult*=1.6;break;case S.BionicLegs:c.a.agility_mult*=1.6;break;case S.GrapheneBionicLegs:c.a.agility_mult*=2.5;break;case S.EnhancedSocialInteractionImplant:c.a.charisma_mult*=1.6,c.a.charisma_exp_mult*=1.6;break;case S.TITN41Injection:c.a.charisma_mult*=1.15,c.a.charisma_exp_mult*=1.15;break;case S.SpeechProcessor:c.a.charisma_mult*=1.2;break;case S.BitWire:c.a.hacking_mult*=1.05;break;case S.ArtificialBioNeuralNetwork:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.12;break;case S.ArtificialSynapticPotentiation:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.05;break;case S.EnhancedMyelinSheathing:c.a.hacking_speed_mult*=1.03,c.a.hacking_exp_mult*=1.1,c.a.hacking_mult*=1.08;break;case S.SynapticEnhancement:c.a.hacking_speed_mult*=1.03;break;case S.NeuralRetentionEnhancement:c.a.hacking_exp_mult*=1.25;break;case S.DataJack:c.a.hacking_money_mult*=1.25;break;case S.ENM:c.a.hacking_mult*=1.08;break;case S.ENMCore:c.a.hacking_speed_mult*=1.03,c.a.hacking_money_mult*=1.1,c.a.hacking_chance_mult*=1.03,c.a.hacking_exp_mult*=1.07,c.a.hacking_mult*=1.07;break;case S.ENMCoreV2:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.3,c.a.hacking_chance_mult*=1.05,c.a.hacking_exp_mult*=1.15,c.a.hacking_mult*=1.08;break;case S.ENMCoreV3:c.a.hacking_speed_mult*=1.05,c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.25,c.a.hacking_mult*=1.1;break;case S.ENMAnalyzeEngine:c.a.hacking_speed_mult*=1.1;break;case S.ENMDMA:c.a.hacking_money_mult*=1.4,c.a.hacking_chance_mult*=1.2;break;case S.Neuralstimulator:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.1,c.a.hacking_exp_mult*=1.12;break;case S.NeuralAccelerator:c.a.hacking_mult*=1.1,c.a.hacking_exp_mult*=1.15,c.a.hacking_money_mult*=1.2;break;case S.CranialSignalProcessorsG1:c.a.hacking_speed_mult*=1.01,c.a.hacking_mult*=1.05;break;case S.CranialSignalProcessorsG2:c.a.hacking_speed_mult*=1.02,c.a.hacking_chance_mult*=1.05,c.a.hacking_mult*=1.07;break;case S.CranialSignalProcessorsG3:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.15,c.a.hacking_mult*=1.09;break;case S.CranialSignalProcessorsG4:c.a.hacking_speed_mult*=1.02,c.a.hacking_money_mult*=1.2,c.a.hacking_grow_mult*=1.25;break;case S.CranialSignalProcessorsG5:c.a.hacking_mult*=1.3,c.a.hacking_money_mult*=1.25,c.a.hacking_grow_mult*=1.75;break;case S.NeuronalDensification:c.a.hacking_mult*=1.15,c.a.hacking_exp_mult*=1.1,c.a.hacking_speed_mult*=1.03;break;case S.NuoptimalInjectorImplant:c.a.company_rep_mult*=1.2;break;case S.SpeechEnhancement:c.a.company_rep_mult*=1.1,c.a.charisma_mult*=1.1;break;case S.FocusWire:c.a.hacking_exp_mult*=1.05,c.a.strength_exp_mult*=1.05,c.a.defense_exp_mult*=1.05,c.a.dexterity_exp_mult*=1.05,c.a.agility_exp_mult*=1.05,c.a.charisma_exp_mult*=1.05,c.a.company_rep_mult*=1.1,c.a.work_money_mult*=1.2;break;case S.PCDNI:c.a.company_rep_mult*=1.3,c.a.hacking_mult*=1.08;break;case S.PCDNIOptimizer:c.a.company_rep_mult*=1.75,c.a.hacking_mult*=1.1;break;case S.PCDNINeuralNetwork:c.a.company_rep_mult*=2,c.a.hacking_mult*=1.1,c.a.hacking_speed_mult*=1.05;break;case S.ADRPheromone1:c.a.company_rep_mult*=1.1,c.a.faction_rep_mult*=1.1;break;case S.ADRPheromone2:c.a.company_rep_mult*=1.2,c.a.faction_rep_mult*=1.2;break;case S.HacknetNodeCPUUpload:c.a.hacknet_node_money_mult*=1.15,c.a.hacknet_node_purchase_cost_mult*=.85;break;case S.HacknetNodeCacheUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_level_cost_mult*=.85;break;case S.HacknetNodeNICUpload:c.a.hacknet_node_money_mult*=1.1,c.a.hacknet_node_purchase_cost_mult*=.9;break;case S.HacknetNodeKernelDNI:c.a.hacknet_node_money_mult*=1.25;break;case S.HacknetNodeCoreDNI:c.a.hacknet_node_money_mult*=1.45;break;case S.NeuroFluxGovernor:if(c.a.hacking_chance_mult*=1.01,c.a.hacking_speed_mult*=1.01,c.a.hacking_money_mult*=1.01,c.a.hacking_grow_mult*=1.01,c.a.hacking_mult*=1.01,c.a.strength_mult*=1.01,c.a.defense_mult*=1.01,c.a.dexterity_mult*=1.01,c.a.agility_mult*=1.01,c.a.charisma_mult*=1.01,c.a.hacking_exp_mult*=1.01,c.a.strength_exp_mult*=1.01,c.a.defense_exp_mult*=1.01,c.a.dexterity_exp_mult*=1.01,c.a.agility_exp_mult*=1.01,c.a.charisma_exp_mult*=1.01,c.a.company_rep_mult*=1.01,c.a.faction_rep_mult*=1.01,c.a.crime_money_mult*=1.01,c.a.crime_success_mult*=1.01,c.a.hacknet_node_money_mult*=1.01,c.a.hacknet_node_purchase_cost_mult*=.99,c.a.hacknet_node_ram_cost_mult*=.99,c.a.hacknet_node_core_cost_mult*=.99,c.a.hacknet_node_level_cost_mult*=.99,c.a.work_money_mult*=1.01,!t){C[e.name].level=e.level;for(var n=0;n"):console.log("ERROR. Invalid augmentation")}if(c.a.queuedAugmentations=[],Object(_.dialogBoxCreate)("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)(),e&&Object(E.isString)(e)){var a=c.a.getHomeComputer();for(n=0;na.maxRam-a.ramUsed)return;var o=new h.b(r,[]);o.threads=1,a.runningScripts.push(o),Object(l.c)(o,a)}}}function x(e){return C.hasOwnProperty(e)}function N(){Object(k.removeChildrenFromElement)(r.Engine.Display.augmentationsContent),r.Engine.Display.augmentationsContent.appendChild(Object(v.createElement)("h1",{innerText:"Purchased Augmentations"}));var e="\n";(6===c.a.bitNodeN||s.c)&&(e="Bladeburner Progress\n\n"),r.Engine.Display.augmentationsContent.appendChild(Object(v.createElement)("pre",{width:"70%",whiteSpace:"pre-wrap",display:"block",innerText:"Below is a list of all Augmentations you have purchased but not yet installed. Click the button below to install them.\nWARNING: Installing your Augmentations resets most of your progress, including:\n\nStats/Skill levels and Experience\nMoney\nScripts on every computer but your home computer\nPurchased servers\nHacknet Nodes\nFaction/Company reputation\nStocks\n"+e+"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.Engine.Display.augmentationsContent.appendChild(Object(v.createElement)("a",{class:"a-link-button",innerText:"Install Augmentations",tooltip:"'I never asked for this'",clickListener:()=>(A(),!1)})),r.Engine.Display.augmentationsContent.appendChild(Object(v.createElement)("a",{class:"a-link-button flashing-button",innerText:"Backup Save (Export)",tooltip:"It's always a good idea to backup/export your save!",clickListener:()=>(p.b.exportGame(),!1)}));for(var t=Object(v.createElement)("ul",{class:"augmentations-list"}),n=0;n{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{for(var e=u.getElementsByClassName("accordion-header"),t=0;t{Object(k.removeChildrenFromElement)(u);var e=c.a.sourceFiles.slice(),t=c.a.augmentations.slice();e.sort((e,t)=>e.n-t.n),t.sort((e,t)=>e.name<=t.name?-1:1),L(u,e),I(u,t),m.Settings.OwnedAugmentationsOrder=d.OwnedAugmentationsOrderSetting.Alphabetically}});r.Engine.Display.augmentationsContent.appendChild(h);const g=Object(v.createElement)("a",{class:"a-link-button",fontSize:"14px",innerText:"Sort by Acquirement Time",tooltip:"Sorts the Augmentations and Source Files based on when you acquired them (same as default)",clickListener:()=>{Object(k.removeChildrenFromElement)(u),L(u,c.a.sourceFiles),I(u,c.a.augmentations),m.Settings.OwnedAugmentationsOrder=d.OwnedAugmentationsOrderSetting.AcquirementTime}});r.Engine.Display.augmentationsContent.appendChild(g),m.Settings.OwnedAugmentationsOrder===d.OwnedAugmentationsOrderSetting.Alphabetically?h.click():g.click(),r.Engine.Display.augmentationsContent.appendChild(u)}function I(e,t){for(var n=0;nLevel "+t[n].lvl+" / "+o,panelText:a.info});e.appendChild(r[0])}}},function(e,t,n){"use strict";n.d(t,"c",function(){return w}),n.d(t,"d",function(){return M}),n.d(t,"e",function(){return P}),n.d(t,"i",function(){return A}),n.d(t,"h",function(){return x}),n.d(t,"j",function(){return N}),n.d(t,"q",function(){return I}),n.d(t,"p",function(){return D}),n.d(t,"n",function(){return j}),n.d(t,"m",function(){return W}),n.d(t,"g",function(){return q}),n.d(t,"r",function(){return Q}),n.d(t,"k",function(){return R}),n.d(t,"o",function(){return U}),n.d(t,"l",function(){return O}),n.d(t,"f",function(){return C}),n.d(t,"a",function(){return E}),n.d(t,"b",function(){return k});var i=n(1),a=n(5),r=n(41),o=n(24),s=n(0),l=n(25),c=n(9),u=n(16),p=n(14),h=n(13),d=n(4),m=n(42),g=n(15),_=n(32),y=n(2),f=n(27),b=n(20),v=n(17),E={LimitBuy:"Limit Buy Order",LimitSell:"Limit Sell Order",StopBuy:"Stop Buy Order",StopSell:"Stop Sell Order"},k={Long:"L",Short:"S"};function O(e,t,n,i,a,r=null){var s=r instanceof o.b,u=new S(e,t,n,i,a);if(isNaN(t)||isNaN(n))return s?r.scriptRef.log("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"):Object(c.dialogBoxCreate)("ERROR: Invalid numeric value provided for either 'shares' or 'price' argument"),!1;if(null==w.Orders){var p={};for(var h in w)if(w.hasOwnProperty(h)){if(!((e=w[h])instanceof l.Stock))continue;p[e.symbol]=[]}w.Orders=p}return w.Orders[e.symbol].push(u),F(u.stock,u.type,u.pos),Z(u.stock),!0}function C(e,t=null){var n=t instanceof o.b;if(null==w.Orders)return!1;if(e.order&&e.order instanceof S){for(var i=e.order,a=w.Orders[i.stock.symbol],r=0;re.playerShares&&(t=e.playerShares),0===t)return!1;var n=e.price*t-i.CONSTANTS.StockMarketCommission;return s.a.gainMoney(n),e.playerShares=Math.round(e.playerShares-t),0==e.playerShares&&(e.playerAvgPx=0),Q(e),Object(c.dialogBoxCreate)("Sold "+d.a.format(t,"0,0")+" shares of "+e.symbol+" at "+d.a.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+d.a.format(n,"($0.000a)")+"."),!0}function D(e,t,n=null){var a=n instanceof o.b;if(0===(t=Math.round(t))||t<0)return!1;if(null==e||isNaN(t))return a?n.scriptRef.log("ERROR: shortStock() failed because of invalid arguments."):Object(c.dialogBoxCreate)("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;var r=e.price*t;if(s.a.money.lt(r+i.CONSTANTS.StockMarketCommission))return a?n.scriptRef.log("ERROR: shortStock() failed because you do not have enough money to purchase this short position. You need "+d.a.format(r+i.CONSTANTS.StockMarketCommission,"($0.000a)")+"."):Object(c.dialogBoxCreate)("You do not have enough money to purchase this short position. You need "+d.a.format(r+i.CONSTANTS.StockMarketCommission,"($0.000a)")+"."),!1;var l=e.playerShortShares*e.playerAvgShortPx;s.a.loseMoney(r+i.CONSTANTS.StockMarketCommission);var u=l+r;return e.playerShortShares=Math.round(e.playerShortShares+t),e.playerAvgShortPx=u/e.playerShortShares,Q(e),a?null==n.disableLogs.ALL&&null==n.disableLogs.shortStock&&n.scriptRef.log("Bought a short position of "+d.a.format(t,"0,0")+" shares of "+e.symbol+" at "+d.a.format(e.price,"($0.000a)")+" per share. Paid "+d.a.format(i.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."):Object(c.dialogBoxCreate)("Bought a short position of "+d.a.format(t,"0,0")+" shares of "+e.symbol+" at "+d.a.format(e.price,"($0.000a)")+" per share. Paid "+d.a.format(i.CONSTANTS.StockMarketCommission,"($0.000a)")+" in commission fees."),!0}function j(e,t,n=null){var a=n instanceof o.b;if(null==e||isNaN(t)||t<0)return a?n.scriptRef.log("ERROR: sellShort() failed because of invalid arguments."):Object(c.dialogBoxCreate)("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((t=Math.round(t))>e.playerShortShares&&(t=e.playerShortShares),0===t)return!1;var r=t*e.playerAvgShortPx,l=(e.playerAvgShortPx-e.price)*t-i.CONSTANTS.StockMarketCommission;return isNaN(l)&&(l=0),s.a.gainMoney(r+l),a&&(n.scriptRef.onlineMoneyMade+=l,s.a.scriptProdSinceLastAug+=l),e.playerShortShares=Math.round(e.playerShortShares-t),0===e.playerShortShares&&(e.playerAvgShortPx=0),Q(e),a?null==n.disableLogs.ALL&&null==n.disableLogs.sellShort&&n.scriptRef.log("Sold your short position of "+d.a.format(t,"0,0")+" shares of "+e.symbol+" at "+d.a.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+d.a.format(r+l,"($0.000a)")+"."):Object(c.dialogBoxCreate)("Sold your short position of "+d.a.format(t,"0,0")+" shares of "+e.symbol+" at "+d.a.format(e.price,"($0.000a)")+" per share. After commissions, you gained a total of "+d.a.format(r+l,"($0.000a)")+"."),!0}function W(e=1){(null==w.storedCycles||isNaN(w.storedCycles))&&(w.storedCycles=0),w.storedCycles+=e;const t=6e3/i.CONSTANTS.MilliPerCycle;if(w.storedCycles=o.cap&&(c=.1,o.b=!1);var u=Math.random();u=o.price&&T(o);break;case E.LimitSell:case E.StopBuy:o.pos===k.Long&&e.price>=o.price?T(o):o.pos===k.Short&&e.price<=o.price&&T(o);break;case E.StopSell:o.pos===k.Long&&e.price<=o.price?T(o):o.pos===k.Short&&e.price>=o.price&&T(o);break;default:return void console.log("Invalid order type: "+o.type)}}}else{var s={};for(var c in w)if(w.hasOwnProperty(c)){if(!((e=w[c])instanceof l.Stock))continue;s[e.symbol]=[]}w.Orders=s}}function U(e){H=e}var H=!1,G=!1,K=i.CONSTANTS.StockMarketCommission;function q(){function e(e,t,n,i,a){e.innerText=i,e.classList.remove("a-link-button"),e.classList.remove("a-link-button-bought"),e.classList.remove("a-link-button-inactive"),!n&&s.a.money.gte(t)?e.classList.add("a-link-button"):n?(e.innerText=a,e.classList.add("a-link-button-bought")):e.classList.add("a-link-button-inactive")}null==s.a.hasWseAccount&&(s.a.hasWseAccount=!1),null==s.a.hasTixApiAccess&&(s.a.hasTixApiAccess=!1),null==s.a.has4SData&&(s.a.has4SData=!1),null==s.a.has4SDataTixApi&&(s.a.has4SDataTixApi=!1);var t=Object(u.clearEventListeners)("stock-market-buy-account");e(t,i.CONSTANTS.WSEAccountCost,s.a.hasWseAccount,"Buy WSE Account - "+d.a.format(i.CONSTANTS.WSEAccountCost,"($0.000a)"),"WSE Account - Purchased"),t.addEventListener("click",function(){return s.a.hasWseAccount=!0,x(),N(),s.a.loseMoney(i.CONSTANTS.WSEAccountCost),q(),!1});var n=Object(u.clearEventListeners)("stock-market-buy-tix-api");e(n,i.CONSTANTS.TIXAPICost,s.a.hasTixApiAccess,"Buy Trade Information eXchange (TIX) API Access - "+d.a.format(i.CONSTANTS.TIXAPICost,"($0.000a)"),"TIX API Access - Purchased"),n.addEventListener("click",function(){return s.a.hasTixApiAccess=!0,s.a.loseMoney(i.CONSTANTS.TIXAPICost),q(),!1});var a=Object(u.clearEventListeners)("stock-market-buy-4s-data");e(a,i.CONSTANTS.MarketData4SCost,s.a.has4SData,"Buy 4S Market Data Access - "+d.a.format(i.CONSTANTS.MarketData4SCost,"($0.000a)"),"4S Market Data - Purchased"),a.addEventListener("click",function(){return!s.a.money.lt(i.CONSTANTS.MarketData4SCost)&&(s.a.has4SData=!0,s.a.loseMoney(i.CONSTANTS.MarketData4SCost),q(),!1)}),a.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you view additional pricing and volatility information about stocks"})),a.style.marginRight="2px";var r=Object(u.clearEventListeners)("stock-market-4s-data-help-tip");r.style.marginTop="10px",r.addEventListener("click",()=>(Object(c.dialogBoxCreate)("Access to the 4S Market Data feed will display two additional pieces of information about each stock: Price Forecast & Volatility

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

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

A stock's price forecast can change over time. This is also affected by volatility. The more volatile a stock is, the more its price forecast will change."),!1));var o=Object(u.clearEventListeners)("stock-market-buy-4s-tix-api");if(e(o,i.CONSTANTS.MarketDataTixApi4SCost,s.a.has4SDataTixApi,"Buy 4S Market Data TIX API Access - "+d.a.format(i.CONSTANTS.MarketDataTixApi4SCost,"($0.000a)"),"4S Market Data TIX API - Purchased"),s.a.hasTixApiAccess?(o.addEventListener("click",function(){return!s.a.money.lt(i.CONSTANTS.MarketDataTixApi4SCost)&&(s.a.has4SDataTixApi=!0,s.a.loseMoney(i.CONSTANTS.MarketDataTixApi4SCost),q(),!1)}),o.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Lets you access 4S Market Data through Netscript"}))):(o.classList.remove("a-link-button"),o.classList.remove("a-link-button-bought"),o.classList.remove("a-link-button-inactive"),o.classList.add("a-link-button-inactive"),o.appendChild(Object(y.createElement)("span",{class:"tooltiptext",innerText:"Requires TIX API Access"}))),null!=(v=document.getElementById("stock-market-list"))){var p=document.getElementById("stock-market-commission"),h=document.getElementById("stock-market-mode"),m=document.getElementById("stock-market-expand-tickers"),g=document.getElementById("stock-market-collapse-tickers"),f=document.getElementById("stock-market-watchlist-filter"),b=document.getElementById("stock-market-watchlist-filter-update");if(!s.a.hasWseAccount){for(H=!1;v.firstChild;)v.removeChild(v.firstChild);return p.style.visibility="hidden",h.style.visibility="hidden",m.style.visibility="hidden",g.style.visibility="hidden",f.style.visibility="hidden",void(b.style.visibility="hidden")}if(p.style.visibility="visible",h.style.visibility="visible",m.style.visibility="visible",g.style.visibility="visible",f.style.visibility="visible",b.style.visibility="visible",!H&&s.a.hasWseAccount){console.log("Creating Stock Market UI"),p.innerHTML="Commission Fees: Every transaction you make has a "+d.a.format(i.CONSTANTS.StockMarketCommission,"($0.000a)")+" commission fee.

WARNING: When you reset after installing Augmentations, the Stock Market is reset. This means all your positions are lost, so make sure to sell your stocks before installing Augmentations!",Object(u.clearEventListeners)("stock-market-investopedia").addEventListener("click",function(){return Object(c.dialogBoxCreate)("When making a transaction on the stock market, there are two types of positions: Long and Short. A Long position is the typical scenario where you buy a stock and earn a profit if the price of that stock increases. Meanwhile, a Short position is the exact opposite. In a Short position you purchase shares of a stock and earn a profit if the price of that stock decreases. This is also called 'shorting' a stock.

NOTE: Shorting stocks is not available immediately, and must be unlocked later on in the game.

There are three different types of orders you can make to buy or sell stocks on the exchange: Market Order, Limit Order, and Stop Order. Note that Limit Orders and Stop Orders are not available immediately, and must be unlocked later on in the game.

When you place a Market Order to buy or sell a stock, the order executes immediately at whatever the current price of the stock is. For example if you choose to short a stock with 5000 shares using a Market Order, you immediately purchase those 5000 shares in a Short position at whatever the current market price is for that stock.

A Limit Order is an order that only executes under certain conditions. A Limit Order is used to buy or sell a stock at a specified price or better. For example, lets say you purchased a Long position of 100 shares of some stock at a price of $10 per share. You can place a Limit Order to sell those 100 shares at $50 or better. The Limit Order will execute when the price of the stock reaches a value of $50 or higher.

A Stop Order is the opposite of a Limit Order. It is used to buy or sell a stock at a specified price (before the price gets 'worse'). For example, lets say you purchased a Short position of 100 shares of some stock at a price of $100 per share. The current price of the stock is $80 (a profit of $20 per share). You can place a Stop Order to sell the Short position if the stock's price reaches $90 or higher. This can be used to lock in your profits and limit any losses.

Here is a summary of how each order works and when they execute:

In a LONG Position:

A Limit Order to buy will execute if the stock's price <= order's price
A Limit Order to sell will execute if the stock's price >= order's price
A Stop Order to buy will execute if the stock's price >= order's price
A Stop Order to sell will execute if the stock's price <= order's price

In a SHORT Position:

A Limit Order to buy will execute if the stock's price >= order's price
A Limit Order to sell will execute if the stock's price <= order's price
A Stop Order to buy will execute if the stock's price <= order's price
A Stop Order to sell will execute if the stock's price >= order's price."),!1}),h&&(G=!1,h.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",h.addEventListener("click",$));var v=document.getElementById("stock-market-list");m&&m.addEventListener("click",()=>{for(var e=v.getElementsByClassName("accordion-header"),t=0;t{for(var e=v.getElementsByClassName("accordion-header"),t=0;t{let e=f.value.toString();w.watchlistFilter=e.replace(/\s/g,""),G?$():Y()}),f.addEventListener("keyup",e=>{e.preventDefault(),e.keyCode===_.KEY.ENTER&&b.click()})):console.warn("Stock Market Watchlist DOM elements could not be found"),z(),H=!0}if(s.a.hasWseAccount)for(var E in w)if(w.hasOwnProperty(E)){var k=w[E];k instanceof l.Stock&&(X(k,null),Z(k))}}}function $(){G=!0;var e=Object(u.clearEventListeners)("stock-market-mode");e&&(e.innerHTML="Switch to 'All stocks' ModeDisplays all stocks on the WSE",e.addEventListener("click",Y)),z()}function Y(){G=!1;var e=Object(u.clearEventListeners)("stock-market-mode");e&&(e.innerHTML="Switch to 'Portfolio' ModeDisplays only the stocks for which you have shares or orders",e.addEventListener("click",$)),z()}function z(){var e=document.getElementById("stock-market-list");null==e&&Object(m.a)("Error creating Stock Tickers UI. DOM element with ID 'stock-market-list' could not be found"),Object(f.removeChildrenFromElement)(e);var t=w.Orders;if(null==t){var n={};for(var i in w)if(w.hasOwnProperty(i)){if(!((r=w[i])instanceof l.Stock))continue;n[r.symbol]=[]}w.Orders=n,t=w.Orders}let a=null;if(null!=w.watchlistFilter&&""!==w.watchlistFilter){a=w.watchlistFilter.replace(/\s/g,"").split(",")}for(var i in w)if(w.hasOwnProperty(i)){var r;if(!((r=w[i])instanceof l.Stock))continue;if(a&&!a.includes(r.symbol))continue;let e=t[r.symbol];if(G&&0===r.playerShares&&0===r.playerShortShares&&0===e.length)continue;V(r)}J()}function V(e){if(e instanceof l.Stock){var t="stock-market-ticker-"+e.symbol,n=document.createElement("li"),i=document.createElement("button");i.classList.add("accordion-header"),i.setAttribute("id",t+"-hdr"),i.innerHTML=e.name+" - "+e.symbol+" - "+d.a.format(e.price,"($0.000a)");var a=document.createElement("div");a.classList.add("accordion-panel"),a.setAttribute("id",t+"-panel");var o=document.createElement("input"),u=document.createElement("select"),p=document.createElement("select"),h=document.createElement("span"),m=document.createElement("span"),g=document.createElement("span"),_=document.createElement("span"),y=document.createElement("p"),f=document.createElement("ul");o.classList.add("stock-market-input"),o.placeholder="Quantity (Shares)",o.setAttribute("id",t+"-qty-input"),o.setAttribute("onkeydown","return ( event.ctrlKey || event.altKey || (4734 && event.keyCode<40) || (event.keyCode==46) )"),u.classList.add("stock-market-input"),u.setAttribute("id",t+"-pos-selector");var b=document.createElement("option");if(b.text="Long",u.add(b),8===s.a.bitNodeN||r.f&&r.h>=2){var C=document.createElement("option");C.text="Short",u.add(C)}p.classList.add("stock-market-input"),p.setAttribute("id",t+"-order-selector");var T=document.createElement("option");if(T.text="Market Order",p.add(T),8===s.a.bitNodeN||r.f&&r.h>=3){var S=document.createElement("option");S.text="Limit Order",p.add(S);var w=document.createElement("option");w.text="Stop Order",p.add(w)}h.classList.add("stock-market-input"),h.classList.add("a-link-button"),h.innerHTML="Buy",h.addEventListener("click",()=>{var n=u.options[u.selectedIndex].text;n="Long"===n?k.Long:k.Short;var i=p.options[p.selectedIndex].text,a=Number(document.getElementById(t+"-qty-input").value);if(isNaN(a))return!1;switch(i){case"Market Order":n===k.Long?L(e,a):D(e,a,null);break;case"Limit Order":case"Stop Order":var r=Object(v.j)(),o=Object(v.i)();r.innerText="Place Buy "+i,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(v.h)());t="Limit Order"===i?E.LimitBuy:E.StopBuy,O(e,a,r,t,n),Object(v.f)()}),o.addEventListener("click",()=>{Object(v.f)()}),Object(v.g)("Enter the price for your "+i);break;default:console.log("ERROR: Invalid order type")}return!1}),m.classList.add("stock-market-input"),m.classList.add("a-link-button"),m.innerHTML="Sell",m.addEventListener("click",()=>{var n=u.options[u.selectedIndex].text;n="Long"===n?k.Long:k.Short;var i=p.options[p.selectedIndex].text,a=Number(document.getElementById(t+"-qty-input").value);if(isNaN(a))return!1;switch(i){case"Market Order":n===k.Long?B(e,a):j(e,a,null);break;case"Limit Order":case"Stop Order":var r=Object(v.j)(),o=Object(v.i)();r.innerText="Place Sell "+i,o.innerText="Cancel Order",r.addEventListener("click",()=>{var t,r=Number(Object(v.h)());t="Limit Order"===i?E.LimitSell:E.StopSell,Object(v.f)(),O(e,a,r,t,n)}),o.addEventListener("click",()=>{Object(v.f)()}),Object(v.g)("Enter the price for your "+i);break;default:console.log("ERROR: Invalid order type")}return!1}),g.classList.add("stock-market-input"),g.classList.add("a-link-button"),g.innerHTML="Buy MAX",g.addEventListener("click",()=>{var t=u.options[u.selectedIndex].text;t="Long"===t?k.Long:k.Short;var n=p.options[p.selectedIndex].text,i=s.a.money.toNumber();switch(n){case"Market Order":var a=Math.floor((i-K)/e.price);t===k.Long?L(e,a):D(e,a,null);break;case"Limit Order":case"Stop Order":var r=Object(v.j)(),o=Object(v.i)();r.innerText="Place Buy "+n,o.innerText="Cancel Order",r.addEventListener("click",()=>{var a,r=Number(Object(v.h)());a="Limit Order"===n?E.LimitBuy:E.StopBuy;var o=Math.floor((i-K)/r);O(e,o,r,a,t),Object(v.f)()}),o.addEventListener("click",()=>{Object(v.f)()}),Object(v.g)("Enter the price for your "+n);break;default:console.log("ERROR: Invalid order type")}return!1}),_.classList.add("stock-market-input"),_.classList.add("a-link-button"),_.innerHTML="Sell ALL",_.addEventListener("click",()=>{var t=u.options[u.selectedIndex].text;switch(t="Long"===t?k.Long:k.Short,p.options[p.selectedIndex].text){case"Market Order":if(t===k.Long){var n=e.playerShares;B(e,n)}else{n=e.playerShortShares;j(e,n,null)}break;case"Limit Order":case"Stop Order":Object(c.dialogBoxCreate)("ERROR: 'Sell All' only works for Market Orders");break;default:console.log("ERROR: Invalid order type")}return!1}),y.setAttribute("id",t+"-position-text"),y.classList.add("stock-market-position-text"),e.posTxtEl=y,f.setAttribute("id",t+"-order-list"),f.classList.add("stock-market-order-list"),a.appendChild(o),a.appendChild(u),a.appendChild(p),a.appendChild(h),a.appendChild(m),a.appendChild(g),a.appendChild(_),a.appendChild(y),a.appendChild(f),n.appendChild(i),n.appendChild(a),document.getElementById("stock-market-list").appendChild(n),X(e,!0),Q(e),Z(e)}else console.log("Invalid stock in createStockSticker()")}function J(){var e=document.getElementById("stock-market-list").getElementsByClassName("accordion-header");if(null!=e)for(var t=0;t0||e.playerShortShares>0)&&Q(e);var i=document.getElementById(n+"-hdr");if(null==i){if(!G){let t=w.watchlistFilter;""!==t&&t.includes(e.symbol)&&console.log("ERROR: Couldn't find ticker element for stock: "+e.symbol)}return}let a=e.name+" ("+e.symbol+") - "+d.a.format(e.price,"($0.000a)");s.a.has4SData&&(a+=" - Volatility: "+d.a.format(e.mv,"0,0.00")+"% - Price Forecast: ",e.b?a+="+".repeat(Math.floor(e.otlkMag/10)+1):a+="-".repeat(Math.floor(e.otlkMag/10)+1)),i.innerText=a,null!=t&&(i.style.color=t?"#66ff33":"red")}function Q(e){if(!h.routing.isOn(h.Page.StockMarket))return;if(!(e instanceof l.Stock))return console.log("Invalid stock in updateStockPlayerPosition():"),void console.log(e);var t="stock-market-ticker-"+e.symbol;if(G){if(0===e.playerShares&&0===e.playerShortShares&&w.Orders&&w.Orders[e.symbol]&&0===w.Orders[e.symbol].length)return Object(b.removeElementById)(t+"-hdr"),void Object(b.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return V(e),void J()}if(e.posTxtEl instanceof Element||(e.posTxtEl=document.getElementById(t+"-position-text")),null==e.posTxtEl)return void console.log("ERROR: Could not find stock position element for: "+e.symbol);const n=e.playerShares*e.playerAvgPx;let i=(e.price-e.playerAvgPx)*e.playerShares,a=i/n;isNaN(a)&&(a=0);const o=e.playerShortShares*e.playerAvgShortPx;let c=(e.playerAvgShortPx-e.price)*e.playerShortShares,u=c/o;isNaN(u)&&(u=0),e.posTxtEl.innerHTML="

Long Position: Shares in the long position will increase in value if the price of the corresponding stock increases


Shares: "+d.a.format(e.playerShares,"0,0")+"
Average Price: "+d.a.format(e.playerAvgPx,"$0.000a")+" (Total Cost: "+d.a.format(n,"$0.000a")+")
Profit: "+d.a.format(i,"$0.000a")+" ("+d.a.format(a,"0.00%")+")

",(8===s.a.bitNodeN||r.f&&r.h>=2)&&(e.posTxtEl.innerHTML+="

Short Position: Shares in short position will increase in value if the price of the corresponding stock decreases


Shares: "+d.a.format(e.playerShortShares,"0,0")+"
Average Price: "+d.a.format(e.playerAvgShortPx,"$0.000a")+" (Total Cost: "+d.a.format(o,"$0.000a")+")
Profit: "+d.a.format(c,"$0.000a")+" ("+d.a.format(u,"0.00%")+")

Orders:

")}function Z(e){if(h.routing.isOn(h.Page.StockMarket)){var t="stock-market-ticker-"+e.symbol,n=document.getElementById(t+"-order-list");if(null!=n){var i=w.Orders;if(null!=i){var a=i[e.symbol];if(null!=a){if(G){if(0===e.playerShares&&0===e.playerShortShares&&w.Orders&&w.Orders[e.symbol]&&0===w.Orders[e.symbol].length)return Object(b.removeElementById)(t+"-hdr"),void Object(b.removeElementById)(t+"-panel");if(null==document.getElementById(t+"-hdr"))return V(e),void J()}for(;n.firstChild;)n.removeChild(n.firstChild);for(var r=0;r=e}}function s(e,t){this.name=e,this.create=t}s.prototype.htmlID=function(){return"create-program-"+(this.name.endsWith(".exe")?this.name.slice(0,-".exe".length):this.name)};const l={NukeProgram:new s("NUKE.exe",{level:1,tooltip:"This virus is used to gain root access to a machine if enough ports are opened.",req:o(1),time:i.CONSTANTS.MillisecondsPerFiveMinutes}),BruteSSHProgram:new s("BruteSSH.exe",{level:50,tooltip:"This program executes a brute force attack that opens SSH ports",req:o(50),time:2*i.CONSTANTS.MillisecondsPerFiveMinutes}),FTPCrackProgram:new s("FTPCrack.exe",{level:100,tooltip:"This program cracks open FTP ports",req:o(100),time:i.CONSTANTS.MillisecondsPerHalfHour}),RelaySMTPProgram:new s("relaySMTP.exe",{level:250,tooltip:"This program opens SMTP ports by redirecting data",req:o(250),time:i.CONSTANTS.MillisecondsPer2Hours}),HTTPWormProgram:new s("HTTPWorm.exe",{level:500,tooltip:"This virus opens up HTTP ports",req:o(500),time:i.CONSTANTS.MillisecondsPer4Hours}),SQLInjectProgram:new s("SQLInject.exe",{level:750,tooltip:"This virus opens SQL ports",req:o(750),time:i.CONSTANTS.MillisecondsPer8Hours}),DeepscanV1:new s("DeepscanV1.exe",{level:75,tooltip:"This program allows you to use the scan-analyze command with a depth up to 5",req:o(75),time:i.CONSTANTS.MillisecondsPerQuarterHour}),DeepscanV2:new s("DeepscanV2.exe",{level:400,tooltip:"This program allows you to use the scan-analyze command with a depth up to 10",req:o(400),time:i.CONSTANTS.MillisecondsPer2Hours}),ServerProfiler:new s("ServerProfiler.exe",{level:75,tooltip:"This program is used to display hacking and Netscript-related information about servers",req:o(75),time:i.CONSTANTS.MillisecondsPerHalfHour}),AutoLink:new s("AutoLink.exe",{level:25,tooltip:"This program allows you to directly connect to other servers through the 'scan-analyze' command",req:o(25),time:i.CONSTANTS.MillisecondsPerQuarterHour}),BitFlume:new s("b1t_flum3.exe",{level:1,tooltip:"This program creates a portal to the BitNode Nexus (allows you to restart and switch BitNodes)",req:function(){return a.a.sourceFiles.length>0&&a.a.hacking_skill>=1},time:i.CONSTANTS.MillisecondsPerFiveMinutes/20}),Flight:new s("fl1ght.exe")},c={};function u(){for(const e in c){const t=l[e];c[e].style.display="none",!a.a.hasProgram(t.name)&&t.create.req()&&(c[e].style.display="inline-block")}}function p(){var e=0;for(const t in l)void 0!==l[t].create&&(a.a.hasProgram(l[t].name)||l[t].create.req()&&e++);return!1===a.a.firstProgramAvailable&&e>0&&(a.a.firstProgramAvailable=!0,document.getElementById("create-program-tab").style.display="list-item",document.getElementById("hacking-menu-header").click(),document.getElementById("hacking-menu-header").click()),e}function h(){var e=document.getElementById("create-program-list");for(const t in l){if(void 0===l[t].create)continue;const n=Object(r.createElement)("a",{class:"a-link-button",id:l[t].htmlID(),innerText:l[t].name,tooltip:l[t].create.tooltip});c[t]=n,e.appendChild(n)}for(const e in c){const t=l[e];c[e].addEventListener("click",function(){return a.a.startCreateProgramWork(t.name,t.create.time,t.create.level),!1})}}},function(e,t,n){"use strict";n.d(t,"b",function(){return k}),n.d(t,"h",function(){return O}),n.d(t,"a",function(){return C}),n.d(t,"f",function(){return P}),n.d(t,"d",function(){return R}),n.d(t,"c",function(){return A}),n.d(t,"g",function(){return x}),n.d(t,"e",function(){return S});var i=n(62),a=n(1),r=n(8),o=n(117),s=n(102),l=n(6),c=n(41),u=n(103),p=n(66),h=n(11),d=n(19),m=n(97),g=n(45),_=n(9),y=n(86),f=n(51),b=n(76),v=n(3);const E=n(135);function k(e){this.name=e.filename,this.running=!1,this.serverIp=null,this.code=e.scriptRef.code,this.env=new s.a(this),this.env.set("args",e.args.slice()),this.output="",this.ramUsage=0,this.scriptRef=e,this.errorMessage="",this.args=e.args.slice(),this.delay=null,this.fnWorker=null,this.checkingRam=!1,this.loadedFns={},this.disableLogs={},this.dynamicRamUsage=a.CONSTANTS.ScriptBaseRamCost,this.dynamicLoadedFns={}}k.prototype.getServer=function(){return h.b[this.serverIp]},k.prototype.getScript=function(){let e=this.getServer();for(let t=0;t{if(t instanceof Error)throw e.errorMessage=Object(l.d)(e,t.message+(t.stack&&"\nstack:\n"+t.stack.toString()||"")),e;if(Object(l.b)(t))throw e.errorMessage=t,e;throw t})}function M(e){var t,n,i=e.code;e.running=!0;try{let a=function(e,t){var n=Object(g.parse)(e,{ecmaVersion:6,allowReserved:!0,sourceType:"module"}),i=t.getServer();if(null==i)throw new Error("Failed to find underlying Server object for script");var a="",r=!1;if(E.simple(n,{ImportDeclaration:e=>{r=!0;let t=e.source.value,n=function(e){for(let t=0;t{n.push(e.id.name),i.push(e)}}),a="var "+t+";\n(function (namespace) {\n",i.forEach(e=>{a+=Object(m.generate)(e),a+="\n"}),n.forEach(e=>{a+="namespace."+e+" = "+e,a+="\n"}),a+="})("+t+" || ("+t+" = {}));\n"}else{let t=[];e.specifiers.forEach(e=>{t.push(e.local.name)});let n=[];E.simple(o,{FunctionDeclaration:e=>{t.includes(e.id.name)&&n.push(e)}}),n.forEach(e=>{a+=Object(m.generate)(e),a+="\n"})}}}),!r)return{code:e,lineOffset:0};var o=0;if("Program"!==n.type||null==n.body)throw new Error("Code could not be properly parsed");for(let e=n.body.length-1;e>=0;--e)"ImportDeclaration"===n.body[e].type&&(n.body.splice(e,1),++o);var s=(a.match(/\n/g)||[]).length-o;return e=Object(m.generate)(n),{code:e=a+e,lineOffset:s}}(i,e);t=a.code,n=a.lineOffset}catch(t){return Object(_.dialogBoxCreate)("Error processing Imports in "+e.name+":
"+t),e.env.stopFlag=!0,void(e.running=!1)}var a;try{a=new o.a(t,function(t,n){var i=Object(c.a)(e);for(let e in i){let a=i[e];if("function"==typeof a)if("hack"===e||"grow"===e||"weaken"===e||"sleep"===e||"prompt"===e||"run"===e||"exec"===e){let i=function(){let e=[];for(let t=0;t"+t),e.env.stopFlag=!0,void(e.running=!1)}return new Promise(function(t,n){try{!function i(){try{if(e.env.stopFlag)return n(e);a.step()?window.setTimeout(i,d.Settings.CodeInstructionRunTime):t(e)}catch(t){return t=t.toString(),Object(l.b)(t)||(t=Object(l.d)(e,t)),e.errorMessage=t,n(e)}}()}catch(t){return Object(v.isString)(t)?(e.errorMessage=t,n(e)):n(t instanceof k?t:e)}})}function P(){for(var e=!1,t=O.length-1;t>=0;t--)if(0==O[t].running&&1==O[t].env.stopFlag){e=!0;var n=O[t].serverIp,a=O[t].name;h.b[n].ramUsed=0;for(let e=0;eServer Ip: "+n+"
Script name: "+i+"
Args:"+Object(f.arrayToString)(e.args)+"
"+a),e.scriptRef.log("Script crashed with runtime error")}else e.scriptRef.log("Script killed");e.running=!1,e.env.stopFlag=!0}else{if(Object(l.b)(e))return Object(_.dialogBoxCreate)("Script runtime unknown error. This is a bug please contact game developer"),void console.log("ERROR: Evaluating workerscript returns only error message rather than WorkerScript object. THIS SHOULDN'T HAPPEN: "+e.toString());Object(_.dialogBoxCreate)("An unknown script died for an unknown reason. This is a bug please contact game dev"),console.log(e)}else console.log("Script returning with value: "+e[1])})}setTimeout(P,6e3)}function R(e,t){for(var n=0;nt.maxRam-t.ramUsed)Object(_.dialogBoxCreate)("Not enough RAM to run script "+e.filename+" with args "+Object(f.arrayToString)(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.)");else{t.ramUsed=Object(b.roundToTwo)(t.ramUsed+a);var r=new k(e);r.serverIp=t.ip,r.ramUsage=a,Object(i.a)(r),O.push(r)}}function x(e=1){for(var t=e*r.Engine._idleSpeed/1e3,n=0;n{r=e,null!=t.CompanyPositions[r.name]&&console.warn(`Duplicate Company Position being defined: ${r.name}`),t.CompanyPositions[r.name]=new a.CompanyPosition(r)})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(37),a=n(50);t.removeChildrenFromElement=function(e){if(null!==e)try{const t=i.isString(e)?a.getElementById(e):e;if(t instanceof Element)for(;null!==t.firstChild;)t.removeChild(t.firstChild)}catch(e){return void console.debug(e)}}},function(module,__webpack_exports__,__webpack_require__){"use strict";(function($){__webpack_require__.d(__webpack_exports__,"h",function(){return updateScriptEditorContent}),__webpack_require__.d(__webpack_exports__,"f",function(){return loadAllRunningScripts}),__webpack_require__.d(__webpack_exports__,"d",function(){return findRunningScript}),__webpack_require__.d(__webpack_exports__,"b",function(){return RunningScript}),__webpack_require__.d(__webpack_exports__,"c",function(){return Script}),__webpack_require__.d(__webpack_exports__,"a",function(){return AllServersMap}),__webpack_require__.d(__webpack_exports__,"g",function(){return scriptEditorInit}),__webpack_require__.d(__webpack_exports__,"e",function(){return isScriptFilename});var _Constants__WEBPACK_IMPORTED_MODULE_0__=__webpack_require__(1),_Constants__WEBPACK_IMPORTED_MODULE_0___default=__webpack_require__.n(_Constants__WEBPACK_IMPORTED_MODULE_0__),_engine__WEBPACK_IMPORTED_MODULE_1__=__webpack_require__(8),_Fconf__WEBPACK_IMPORTED_MODULE_2__=__webpack_require__(44),_InteractiveTutorial__WEBPACK_IMPORTED_MODULE_3__=__webpack_require__(33),_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_4__=__webpack_require__(6),_NetscriptFunctions__WEBPACK_IMPORTED_MODULE_5__=__webpack_require__(41),_NetscriptWorker__WEBPACK_IMPORTED_MODULE_6__=__webpack_require__(24),_Player__WEBPACK_IMPORTED_MODULE_7__=__webpack_require__(0),_Server__WEBPACK_IMPORTED_MODULE_8__=__webpack_require__(11),_Settings__WEBPACK_IMPORTED_MODULE_9__=__webpack_require__(19),_Settings__WEBPACK_IMPORTED_MODULE_9___default=__webpack_require__.n(_Settings__WEBPACK_IMPORTED_MODULE_9__),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_10__=__webpack_require__(7),_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_10___default=__webpack_require__.n(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_10__),_TextFile__WEBPACK_IMPORTED_MODULE_11__=__webpack_require__(58),_TextFile__WEBPACK_IMPORTED_MODULE_11___default=__webpack_require__.n(_TextFile__WEBPACK_IMPORTED_MODULE_11__),_utils_acorn__WEBPACK_IMPORTED_MODULE_12__=__webpack_require__(45),_utils_acorn__WEBPACK_IMPORTED_MODULE_12___default=__webpack_require__.n(_utils_acorn__WEBPACK_IMPORTED_MODULE_12__),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_13__=__webpack_require__(13),_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_13___default=__webpack_require__.n(_ui_navigationTracking__WEBPACK_IMPORTED_MODULE_13__),_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__=__webpack_require__(4),_utils_DialogBox__WEBPACK_IMPORTED_MODULE_15__=__webpack_require__(9),_utils_JSONReviver__WEBPACK_IMPORTED_MODULE_16__=__webpack_require__(14),_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_17__=__webpack_require__(86),_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_17___default=__webpack_require__.n(_utils_helpers_compareArrays__WEBPACK_IMPORTED_MODULE_17__),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__=__webpack_require__(2),_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18___default=__webpack_require__.n(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19__=__webpack_require__(80),_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19___default=__webpack_require__.n(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19__),_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_20__=__webpack_require__(76),_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_20___default=__webpack_require__.n(_utils_helpers_roundToTwo__WEBPACK_IMPORTED_MODULE_20__),ace=__webpack_require__(241),beautify=__webpack_require__(240).js_beautify;__webpack_require__(239),__webpack_require__(177),__webpack_require__(238),__webpack_require__(237),__webpack_require__(236),__webpack_require__(235),__webpack_require__(234),__webpack_require__(233),__webpack_require__(232),__webpack_require__(231),__webpack_require__(230),__webpack_require__(229),__webpack_require__(228);const walk=__webpack_require__(135);var keybindings={ace:null,vim:"ace/keyboard/vim",emacs:"ace/keyboard/emacs"};function isScriptFilename(e){return e.endsWith(".js")||e.endsWith(".script")||e.endsWith(".ns")}var scriptEditorRamCheck=null,scriptEditorRamText=null;function scriptEditorInit(){var e=document.getElementById("script-editor-buttons-wrapper");if(null!=e){var t=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Beautify",clickListener:()=>(beautifyScript(),!1)}),n=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Save & Close (Ctrl/Cmd + b)",clickListener:()=>(saveAndCloseScriptEditor(),!1)});scriptEditorRamText=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("p",{display:"inline-block",margin:"10px",id:"script-editor-status-text"});var i=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("label",{for:"script-editor-ram-check",margin:"4px",marginTop:"8px",innerText:"Dynamic RAM Usage Checker",color:"white",tooltip:"Enable/Disable the dynamic RAM Usage display. You may want to disable it for very long scripts because there may be performance issues"});(scriptEditorRamCheck=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("input",{type:"checkbox",name:"script-editor-ram-check",id:"script-editor-ram-check",margin:"4px",marginTop:"8px"})).checked=!0;var a=Object(_utils_uiHelpers_createElement__WEBPACK_IMPORTED_MODULE_18__.createElement)("a",{display:"inline-block",class:"a-link-button",innerText:"Netscript Documentation",href:"https://bitburner.readthedocs.io/en/latest/index.html",target:"_blank"});e.appendChild(t),e.appendChild(n),e.appendChild(scriptEditorRamText),e.appendChild(scriptEditorRamCheck),e.appendChild(i),e.appendChild(a);var r=ace.edit("javascript-editor");r.getSession().setMode("ace/mode/netscript"),r.setTheme("ace/theme/monokai"),document.getElementById("javascript-editor").style.fontSize="16px",r.setOption("showPrintMargin",!1);var o=document.getElementById("script-editor-option-theme");if(_Settings__WEBPACK_IMPORTED_MODULE_9__.Settings.EditorTheme){for(var s=2,l=0;l0;){const nextModule=parseQueue.shift();let code;if(nextModule.startsWith("https://")||nextModule.startsWith("http://"))try{const module=await eval("import(nextModule)");code="";for(const e in module)"function"==typeof module[e]&&(code+=module[e].toString()+";\n")}catch(e){return console.error(`Error dynamically importing module from ${nextModule} for RAM calculations: ${e}`),-1}else{const e=server.getScript(nextModule);if(!e)return-1;code=e.code}parseCode(code,nextModule)}let ram=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptBaseRamCost;const unresolvedRefs=Object.keys(dependencyMap).filter(e=>e.startsWith(initialModule)),resolvedRefs=new Set;for(;unresolvedRefs.length>0;){const e=unresolvedRefs.shift();if("hacknet"!==e||resolvedRefs.has("hacknet")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptHacknetNodesRamCost),"document"!==e||resolvedRefs.has("document")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptDomRamCost),"window"!==e||resolvedRefs.has("window")||(ram+=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptDomRamCost),resolvedRefs.add(e),e.endsWith(".*")){const t=e.slice(0,e.length-2);for(let e of Object.keys(dependencyMap).filter(e=>e.startsWith(t)))for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t)}else for(let t of dependencyMap[e]||[])resolvedRefs.has(t)||unresolvedRefs.push(t);try{function applyFuncRam(e){if("function"!=typeof e)return 0;try{let t;return"number"==typeof(t="AsyncFunction"===e.constructor.name?0:e.apply(null,[]))?t:0}catch(e){return console.log("ERROR applying function: "+e),0}}var func;func=e in workerScript.env.vars.bladeburner?workerScript.env.vars.bladeburner[e]:e in workerScript.env.vars.codingcontract?workerScript.env.vars.codingcontract[e]:e in workerScript.env.vars.gang?workerScript.env.vars.gang[e]:workerScript.env.get(e),ram+=applyFuncRam(func)}catch(e){continue}}return ram}catch(e){return-1}}function parseOnlyCalculateDeps(e,t){const n=Object(_utils_acorn__WEBPACK_IMPORTED_MODULE_12__.parse)(e,{sourceType:"module",ecmaVersion:8}),i=t+memCheckGlobalKey,a={};a[i]=new Set;let r={};var o=[];function s(e,n){const i=a[e]||(a[e]=new Set);n in r&&i.add(r[n]),i.add(t+"."+n),i.add(n)}const l=Object.getOwnPropertyNames(Object.prototype);function c(){return{Identifier:(e,t,n)=>{l.includes(e.name)||s(t.key,e.name)},WhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},DoWhileStatement:(e,t,n)=>{s(t.key,specialReferenceWHILE),e.test&&n(e.test,t),e.body&&n(e.body,t)},ForStatement:(e,t,n)=>{s(t.key,specialReferenceFOR),e.init&&n(e.init,t),e.test&&n(e.test,t),e.update&&n(e.update,t),e.body&&n(e.body,t)},IfStatement:(e,t,n)=>{s(t.key,specialReferenceIF),e.test&&n(e.test,t),e.consequent&&n(e.consequent,t),e.alternate&&n(e.alternate,t)},MemberExpression:(e,t,n)=>{e.object&&n(e.object,t),e.property&&n(e.property,t)}}}return walk.recursive(n,{key:i},Object.assign({ImportDeclaration:(e,t,n)=>{const i=e.source.value;o.push(i),a[t.key].add(i+memCheckGlobalKey);for(let n=0;n{const a=t+"."+e.id.name;walk.recursive(e,{key:a},c())}},c())),{dependencyMap:a,additionalModules:o}}async function calculateRamUsage(e){var t=_Player__WEBPACK_IMPORTED_MODULE_7__.a.getCurrentServer(),n=new _NetscriptWorker__WEBPACK_IMPORTED_MODULE_6__.b({filename:"foo",scriptRef:{code:""},args:[]});n.checkingRam=!0,n.serverIp=t.ip;try{return await parseOnlyRamCalculate(t,e,n)}catch(e){console.log("Failed to parse ram using new method. Falling back.",e)}try{var i=Object(_utils_acorn__WEBPACK_IMPORTED_MODULE_12__.parse)(e,{sourceType:"module"})}catch(e){return-1}var a=[],r=_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ScriptBaseRamCost,o=!1,s=!1,l=!1;for(a.push(i);0!=a.length;){var c=a.shift();switch(c.type){case"ImportDeclaration":for(var u=Object(_NetscriptEvaluator__WEBPACK_IMPORTED_MODULE_4__.a)(c,n,!0),p=0;p=1&&(n=1),e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][2]||null==e.dataMap[i][2])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[i]))continue;var a=Math.round(.5*e.dataMap[i][2]/e.onlineRunningTime*t);console.log(e.filename+" called grow() on "+u.hostname+" "+a+" times while offline"),e.log("Called grow() on "+u.hostname+" "+a+" times while offline");var r=Object(_Server__WEBPACK_IMPORTED_MODULE_8__.k)(u,450*a);e.log(u.hostname+" grown by "+_ui_numeralFormat__WEBPACK_IMPORTED_MODULE_14__.a.format(100*r-100,"0.000000%")+" from grow() calls made while offline")}var o=0;for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][0]||null==e.dataMap[i][0])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[i]))continue;var s=.5*e.dataMap[i][0]/e.onlineRunningTime*t;(s*=n)>u.moneyAvailable&&(s=u.moneyAvailable),o+=s,_Player__WEBPACK_IMPORTED_MODULE_7__.a.gainMoney(s),console.log(e.filename+" generated $"+s+" while offline by hacking "+u.hostname),e.log(e.filename+" generated $"+s+" while offline by hacking "+u.hostname),u.moneyAvailable-=s,u.moneyAvailable<0&&(u.moneyAvailable=0),isNaN(u.moneyAvailable)&&(u.moneyAvailable=0)}var l=e.onlineExpGained/e.onlineRunningTime*.5*t;for(var i in l*=n,_Player__WEBPACK_IMPORTED_MODULE_7__.a.gainHackingExp(l),e.offlineMoneyMade+=o,e.offlineRunningTime+=t,e.offlineExpGained+=l,e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][1]||null==e.dataMap[i][1])continue;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[i]))continue;var c=Math.round(.5*e.dataMap[i][1]/e.onlineRunningTime*t);console.log(e.filename+" hacked "+u.hostname+" "+c+" times while offline"),e.log("Hacked "+u.hostname+" "+c+" times while offline"),u.fortify(_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ServerFortifyAmount*c)}for(var i in e.dataMap)if(e.dataMap.hasOwnProperty(i)){if(0==e.dataMap[i][3]||null==e.dataMap[i][3])continue;var u;if(null==(u=_Server__WEBPACK_IMPORTED_MODULE_8__.b[i]))continue;var p=Math.round(.5*e.dataMap[i][3]/e.onlineRunningTime*t);console.log(e.filename+" called weaken() on "+u.hostname+" "+p+" times while offline"),e.log("Called weaken() on "+u.hostname+" "+p+" times while offline"),u.weaken(_Constants__WEBPACK_IMPORTED_MODULE_0__.CONSTANTS.ServerWeakenAmount*p)}return o}function findRunningScript(e,t,n){for(var i=0;i_Settings__WEBPACK_IMPORTED_MODULE_9__.Settings.MaxLogCapacity&&this.logs.shift();let t=e;_Fconf__WEBPACK_IMPORTED_MODULE_2__.a.ENABLE_TIMESTAMPS&&(t="["+Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_19__.getTimestamp)()+"] "+t),this.logs.push(t),this.logUpd=!0},RunningScript.prototype.displayLog=function(){for(var e=0;e
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:'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:"clear

Clears the console",cls:"cls

Clears the console",help:"help [command]

Running 'help' with no arguments displays the general help text, which lists all console commands and a brief description of what they do. A command can be specified to get more specific help text about that particular command. For example:

help automate

will display specific information about using the automate console command",log:"log [en/dis] [type]

Enable or disable logging. By default, the results of completing actions such as contracts/operations are logged in the console. There are also random events that are logged in the console as well. The five categories of things that get logged are:

[general, contracts, ops, blackops, events]

The logging for these categories can be enabled or disabled like so:

log dis contracts - Disables logging that occurs when contracts are completed
log en contracts - Enables logging that occurs when contracts are completed
log dis events - Disables logging for Bladeburner random events

Logging can be universally enabled/disabled using the 'all' keyword:

log dis all
log en all",skill:'skill [action] [name]

Level or display information about your skills.

To display information about all of your skills and your multipliers, use:

skill list

To display information about a specific skill, specify the name of the skill afterwards. Note that the name of the skill is case-sensitive. Enter it exactly as seen in the UI. If the name of the skill has whitespace, enclose the name of the skill in double quotation marks:

skill list Reaper
skill list "Digital Observer"

This console command can also be used to level up skills:

skill level [skill name]',start:'start [type] [name]

Start an action. An action is specified by its type and its name. The name is case-sensitive. It must appear exactly as it does in the UI. If the name of the action has whitespace, enclose it in double quotation marks. Valid action types include:

[general, contract, op, blackop]

Examples:

start contract Tracking
start op "Undercover Operation"
',stop:"stop

Stop your current action and go idle"};function I(e={}){this.name=e.name?e.name:l.Locations.Sector12,this.pop=e.pop?e.pop:Object(T.getRandomInt)(8e8,1.2*R),this.popEst=this.pop*(Math.random()+.5),this.comms=e.comms?e.comms:Object(T.getRandomInt)(5,100),this.commsEst=this.comms+Object(T.getRandomInt)(-5,5),this.commsEst<0&&(this.commsEst=0),this.chaos=0}function L(e={name:"foo",desc:"foo"}){if(!e.name)throw new Error("Failed to initialize Bladeburner Skill. No name was specified in ctor");if(this.name=e.name,!e.desc)throw new Error("Failed to initialize Bladeburner Skills. No desc was specified in ctor");this.desc=e.desc,this.baseCost=e.baseCost?e.baseCost:1,this.costInc=e.costInc?e.costInc:1,e.maxLvl&&(this.maxLvl=e.maxLvl),e.successChanceAll&&(this.successChanceAll=e.successChanceAll),e.successChanceStealth&&(this.successChanceStealth=e.successChanceStealth),e.successChanceKill&&(this.successChanceKill=e.successChanceKill),e.successChanceContract&&(this.successChanceContract=e.successChanceContract),e.successChanceOperation&&(this.successChanceOperation=e.successChanceOperation),e.successChanceEstimate&&(this.successChanceEstimate=e.successChanceEstimate),e.actionTime&&(this.actionTime=e.actionTime),e.effHack&&(this.effHack=e.effHack),e.effStr&&(this.effStr=e.effStr),e.effDef&&(this.effDef=e.effDef),e.effDex&&(this.effDex=e.effDex),e.effAgi&&(this.effAgi=e.effAgi),e.effCha&&(this.effCha=e.effCha),e.stamina&&(this.stamina=e.stamina),e.weaponAbility&&(this.weaponAbility=e.weaponAbility),e.gunAbility&&(this.gunAbility=e.gunAbility)}e(document).keydown(function(e){if(k.routing.isOn(k.Page.Bladeburner)){if(!(c.a.bladeburner instanceof $))return;let r=c.a.bladeburner.consoleHistory;if(e.keyCode===h.KEY.ENTER){e.preventDefault();var t=Y.consoleInput.value;t.length>0&&(c.a.bladeburner.postToConsole("> "+t),c.a.bladeburner.resetConsoleInput(),c.a.bladeburner.executeConsoleCommands(t))}if(e.keyCode===h.KEY.UPARROW){if(null==Y.consoleInput)return;var n=x;if(0===(a=r.length))return;(n<0||n>a)&&(x=a),0!==n&&--x;var i=r[x];Y.consoleInput.value=i,setTimeout(function(){Y.consoleInput.selectionStart=Y.consoleInput.selectionEnd=1e4},0)}if(e.keyCode===h.KEY.DOWNARROW){if(null==Y.consoleInput)return;var a;n=x;if(0==(a=r.length))return;if((n<0||n>a)&&(x=a),n==a||n==a-1)x=a,Y.consoleInput.value="";else{i=r[++x];Y.consoleInput.value=i}}}}),I.prototype.improvePopulationEstimateByCount=function(e){if(isNaN(e))throw new Error("NaN passeed into City.improvePopulationEstimateByCount()");this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst-=e,this.popEstthis.pop&&(this.popEst=this.pop)):this.popEst>this.pop&&(this.popEst*=1-e/100,this.popEstthis.comms&&(this.commsEst=this.comms)):this.commsEst>this.comms&&(this.commsEst-=e,this.commsEst0?1:-1),this.pop+=n,t.changeEstEqually&&(this.popEst+=n,this.popEst<0&&(this.popEst=0)),n}},I.prototype.changeChaosByCount=function(e){if(isNaN(e))throw new Error("NaN passed into City.changeChaosByCount()");0!==e&&(this.chaos+=e,this.chaos<0&&(this.chaos=0))},I.prototype.changeChaosByPercentage=function(e){if(isNaN(e))throw new Error("NaN passed into City.chaosChaosByPercentage()");if(0!==e){var t=this.chaos*(e/100);this.chaos+=t,this.chaos<0&&(this.chaos=0)}},I.prototype.toJSON=function(){return Object(_.Generic_toJSON)("City",this)},I.fromJSON=function(e){return Object(_.Generic_fromJSON)(I,e.data)},_.Reviver.constructors.City=I,L.prototype.calculateCost=function(e){return Math.floor((this.baseCost+e*this.costInc)*a.BitNodeMultipliers.BladeburnerSkillCost)};var B={},D={BladesIntuition:"Blade's Intuition",Reaper:"Reaper",Cloak:"Cloak",Marksman:"Marksman",WeaponProficiency:"Weapon Proficiency",Overclock:"Overclock",EvasiveSystem:"Evasive System",ShortCircuit:"Short-Circuit",DigitalObserver:"Digital Observer",Datamancer:"Datamancer",Tracer:"Tracer",CybersEdge:"Cyber's Edge"};function j(e={}){this.name=e.name?e.name:"",this.desc=e.desc?e.desc:"",this.level=1,this.maxLevel=1,this.autoLevel=!0,this.baseDifficulty=e.baseDifficulty?Object(y.addOffset)(e.baseDifficulty,10):100,this.difficultyFac=e.difficultyFac?e.difficultyFac:1.01,this.rewardFac=e.rewardFac?e.rewardFac:1.02,this.successes=0,this.failures=0,this.rankGain=e.rankGain?e.rankGain:0,e.rankLoss&&(this.rankLoss=e.rankLoss),e.hpLoss&&(this.hpLoss=e.hpLoss,this.hpLost=0),this.isStealth=!!e.isStealth,this.isKill=!!e.isKill,this.count=e.count?e.count:Object(T.getRandomInt)(1e3,25e3),this.countGrowth=e.countGrowth?e.countGrowth:Object(T.getRandomInt)(1,5);this.weights=e.weights?e.weights:{hack:1/7,str:1/7,def:1/7,dex:1/7,agi:1/7,cha:1/7,int:1/7};var t=0;for(var n in this.weights)this.weights.hasOwnProperty(n)&&(t+=this.weights[n]);if(t-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(var i in this.decays=e.decays?e.decays:{hack:.9,str:.9,def:.9,dex:.9,agi:.9,cha:.9,int:.9},this.decays)if(this.decays.hasOwnProperty(i)&&this.decays[i]>1)throw new Error("Invalid decays when constructing Action "+this.name+". Decay value cannot be greater than 1")}j.prototype.getDifficulty=function(){var e=this.baseDifficulty*Math.pow(this.difficultyFac,this.level-1);if(isNaN(e))throw new Error("Calculated NaN in Action.getDifficulty()");return e},j.prototype.getSuccessChance=function(e,t={}){if(null==e)throw new Error("Invalid Bladeburner instance passed into Action.getSuccessChance");var n=this.getDifficulty(),i=0;for(var a in this.weights)if(this.weights.hasOwnProperty(a)){var r=c.a.queryStatFromString(a),o="eff"+a.charAt(0).toUpperCase()+a.slice(1),s=e.skillMultipliers[o];null==s&&(console.log("ERROR: Failed to find Bladeburner Skill multiplier for: "+a),s=1),i+=this.weights[a]*Math.pow(s*r,this.decays[a])}(i*=e.calculateStaminaPenalty(),this instanceof G||this instanceof K)&&(this.teamCount&&this.teamCount>0&&(this.teamCount=Math.min(this.teamCount,e.teamSize),i*=Math.pow(this.teamCount,.05)));if(!(this instanceof K)){var l=e.getCurrentCity();if(t.est?i*=l.popEst/R:i*=l.pop/R,l.chaos>50){var u=l.chaos-50+1;n*=Math.pow(u,.1)}if(this instanceof G&&"Raid"===this.name&&l.comms<=0)return 0}if(i*=e.skillMultipliers.successChanceAll,(this instanceof G||this instanceof K)&&(i*=e.skillMultipliers.successChanceOperation),this instanceof H&&(i*=e.skillMultipliers.successChanceContract),this.isStealth&&(i*=e.skillMultipliers.successChanceStealth),this.isKill&&(i*=e.skillMultipliers.successChanceKill),i*=c.a.bladeburner_success_chance_mult,isNaN(i))throw new Error("Competence calculated as NaN in Action.getSuccessChance()");return Math.min(1,i/n)},j.prototype.attempt=function(e){return Math.random()=this.getSuccessesNeededForNextLevel(e)&&++this.maxLevel},j.prototype.toJSON=function(){return Object(_.Generic_toJSON)("Action",this)},j.fromJSON=function(e){return Object(_.Generic_fromJSON)(j,e.data)},_.Reviver.constructors.Action=j;var W={},F=Object.freeze({Idle:1,Contract:2,Operation:3,BlackOp:4,BlackOperation:4,Training:5,Recruitment:6,FieldAnalysis:7,"Field Analysis":7});function U(e={}){e.name&&(this.name=e.name),e.type&&(this.type=e.type)}function H(e={}){j.call(this,e)}function G(e={}){j.call(this,e),this.reqdRank=e.reqdRank?e.reqdRank:100,this.teamCount=e.teamCount?e.teamCount:0}function K(e={}){G.call(this,e),this.count=1,this.countGrowth=0}U.prototype.toJSON=function(){return Object(_.Generic_toJSON)("ActionIdentifier",this)},U.fromJSON=function(e){return Object(_.Generic_fromJSON)(U,e.data)},_.Reviver.constructors.ActionIdentifier=U,H.prototype=Object.create(j.prototype),H.prototype.toJSON=function(){return Object(_.Generic_toJSON)("Contract",this)},H.fromJSON=function(e){return Object(_.Generic_fromJSON)(H,e.data)},_.Reviver.constructors.Contract=H,G.prototype=Object.create(j.prototype),G.prototype.toJSON=function(){return Object(_.Generic_toJSON)("Operation",this)},G.fromJSON=function(e){return Object(_.Generic_fromJSON)(G,e.data)},_.Reviver.constructors.Operation=G,K.prototype=Object.create(j.prototype),K.prototype.toJSON=function(){return Object(_.Generic_toJSON)("BlackOperation",this)},K.fromJSON=function(e){return Object(_.Generic_fromJSON)(K,e.data)},_.Reviver.constructors.BlackOperation=K;var q={};function $(e={}){this.numHosp=0,this.moneyLost=0,this.rank=0,this.maxRank=0,this.skillPoints=0,this.totalSkillPoints=0,this.teamSize=0,this.teamLost=0,this.storedCycles=0,this.randomEventCounter=Object(T.getRandomInt)(240,600),this.actionTimeToComplete=0,this.actionTimeCurrent=0;var t,n=F.Idle;this.action=new U({type:n}),this.cities={};for(var i=0;i
Does NOT require stamina."}),W[t="Recruitment"]=new j({name:t,desc:"Attempt to recruit members for your Bladeburner team. These members can help you conduct operations.

Does NOT require stamina."}),q["Operation Typhoon"]=new K({name:"Operation Typhoon",desc:"Obadiah Zenyatta is the leader of a RedWater PMC. It has long been known among the intelligence community that Zenyatta, along with the rest of the PMC, is a Synthoid.

The goal of Operation Typhoon is to find and eliminate Zenyatta and RedWater by any means necessary. After the task is completed, the actions must be covered up from the general public.",baseDifficulty:2e3,reqdRank:2500,rankGain:50,rankLoss:10,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Zero"]=new K({name:"Operation Zero",desc:"AeroCorp is one of the world's largest defense contractors. It's leader, Steve Watataki, is thought to be a supporter of Synthoid rights. He must be removed.

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

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

Your goal is to enter and destroy the Bioengineering department's facility in Aevum. The task is not just to retire the Synthoids there, but also to destroy any information or research at the facility that is relevant to the Synthoids and their goals.",baseDifficulty:4e3,reqdRank:1e4,rankGain:100,rankLoss:20,hpLoss:100,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Ares"]=new K({name:"Operation Ares",desc:"One of our undercover agents, Agent Carter, has informed us of a massive weapons deal going down in Dubai between rogue Russian militants and a radical Synthoid community. These weapons are next-gen plasma and energy weapons. It is critical for the safety of humanity that this deal does not happen.

Your task is to intercept the deal. Leave no survivors.",baseDifficulty:5e3,reqdRank:12500,rankGain:125,rankLoss:20,hpLoss:200,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Archangel"]=new K({name:"Operation Archangel",desc:"Our analysts have discovered that the popular Red Rabbit brothel in Amsterdam is run and 'staffed' by MK-VI Synthoids. Intelligence suggests that the profit from this brothel is used to fund a large black market arms trafficking operation.

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

Your mission is to eradicate Juggernaut and his followers.",baseDifficulty:1e4,reqdRank:2e4,rankGain:300,rankLoss:40,hpLoss:300,weights:{hack:0,str:.25,def:.25,dex:.25,agi:.25,cha:0,int:0},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Red Dragon"]=new K({name:"Operation Red Dragon",desc:"The Tetrads criminal organization is suspected of reverse-engineering the MK-VI Synthoid design. We believe they altered and possibly improved the design and began manufacturing their own Synthoid models in order to bolster their criminal activities.

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

We do not have the power or jurisdiction to shutdown this down through legal or political means, so we must resort to a covert operation. Your goal is to destroy this technology and eliminateanyone who was involved in its creation.",baseDifficulty:15e3,reqdRank:3e4,rankGain:750,rankLoss:60,hpLoss:1e3,weights:{hack:.05,str:.2,def:.2,dex:.25,agi:.25,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Deckard"]=new K({name:"Operation Deckard",desc:"Despite your success in eliminating VitaLife's new android-replicating technology in Operation K, we've discovered that a small group of MK-VI Synthoids were able to make off with the schematics and design of the technology before the Operation. It is almost a certainty that these Synthoids are some of the rogue MK-VI ones from the Synthoid Uprising.The goal of Operation Deckard is to hunt down these Synthoids and retire them. I don't need to tell you how critical this mission is.",baseDifficulty:2e4,reqdRank:4e4,rankGain:1e3,rankLoss:75,hpLoss:200,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:0,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Tyrell"]=new K({name:"Operation Tyrell",desc:"A week ago Blade Industries reported a small break-in at one of their Aevum Augmentation storage facitilities. We figured out that The Dark Army was behind the heist, and didn't think any more of it. However, we've just discovered that several known MK-VI Synthoids were part of that break-in group.

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

The best way to deal with this is to prevent it before it even happens. The goal of Operation Wallace is to destroy the Dark Army and Syndicate factions in Aevum immediately. Leave no survivors.",baseDifficulty:3e4,reqdRank:75e3,rankGain:2e3,rankLoss:150,hpLoss:1500,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Shoulder of Orion"]=new K({name:"Operation Shoulder of Orion",desc:"China's Solaris Space Systems is secretly launching the first manned spacecraft in over a decade using Synthoids. We believe China is trying to establish the first off-world colonies.

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

I do not need to remind you why sentient-level AIs pose a serious thread to all of mankind.

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

The mission is to destroy this broadcast tower. Speed and stealth are of the upmost important for this.",baseDifficulty:45e3,reqdRank:15e4,rankGain:4e3,rankLoss:1e3,hpLoss:100,weights:{hack:.05,str:.15,def:.15,dex:.3,agi:.3,cha:0,int:.05},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isStealth:!0}),q["Operation Ion Storm"]=new K({name:"Operation Ion Storm",desc:"Our analysts have uncovered a gathering of MK-VI Synthoids that have taken up residence in the Sector-12 Slums. We don't know if they are rogue Synthoids from the Uprising, but we do know that they have been stockpiling weapons, money, and other resources. This makes them dangerous.

This is a full-scale assault operation to find and retire all of these Synthoids in the Sector-12 Slums.",baseDifficulty:5e4,reqdRank:175e3,rankGain:5e3,rankLoss:1e3,hpLoss:5e3,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Annihilus"]=new K({name:"Operation Annihilus",desc:"Our superiors have ordered us to eradicate everything and everyone in an underground facility located in Aevum. They tell us that the facility houses many dangerous Synthoids and belongs to a terrorist organization called 'The Covenant'. We have no prior intelligence about this organization, so you are going in blind.",baseDifficulty:55e3,reqdRank:2e5,rankGain:7500,rankLoss:1e3,hpLoss:1e4,weights:{hack:0,str:.24,def:.24,dex:.24,agi:.24,cha:0,int:.04},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Ultron"]=new K({name:"Operation Ultron",desc:"OmniTek Incorporated, the original designer and manufacturer of Synthoids, has notified us of a malfunction in their AI design. This malfunction, when triggered, causes MK-VI Synthoids to become radicalized and seek out the destruction of humanity. They say that this bug affects all MK-VI Synthoids, not just the rogue ones from the Uprising.

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

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

Your task is to find and destroy Ultron.",baseDifficulty:6e4,reqdRank:25e4,rankGain:1e4,rankLoss:2e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75},isKill:!0}),q["Operation Centurion"]=new K({name:"Operation Centurion",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

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

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

D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:7e4,reqdRank:3e5,rankGain:15e3,rankLoss:5e3,hpLoss:1e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),q["Operation Vindictus"]=new K({name:"Operation Vindictus",desc:"D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)

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

D)@#)($M)C0293c40($*)@#D0JUMP3Rm0C<*@#)*$)#02c94830c(#$*D)",baseDifficulty:75e3,reqdRank:35e4,rankGain:2e4,rankLoss:2e4,hpLoss:2e4,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),q["Operation Daedalus"]=new K({name:"Operation Daedalus",desc:"Yesterday we obeyed kings and bent our neck to emperors. Today we kneel only to truth.",baseDifficulty:8e4,reqdRank:4e5,rankGain:4e4,rankLoss:1e4,hpLoss:1e5,weights:{hack:.1,str:.2,def:.2,dex:.2,agi:.2,cha:0,int:.1},decays:{hack:.6,str:.8,def:.8,dex:.8,agi:.8,cha:0,int:.75}}),this.initializeDomElementRefs(),e.new&&this.create()}$.prototype.prestige=function(){this.resetAction();var e=s.b.Bladeburners;this.rank>=25&&Object(s.g)(e)},$.prototype.create=function(){this.contracts.Tracking=new H({name:"Tracking",desc:"Identify and locate Synthoids. This contract involves reconnaissance and information-gathering ONLY. Do NOT engage. Stealth is of the utmost importance.

Successfully completing Tracking contracts will slightly improve your Synthoid population estimate for whatever city you are currently in.",baseDifficulty:125,difficultyFac:1.02,rewardFac:1.041,rankGain:.3,hpLoss:.5,count:Object(T.getRandomInt)(25,500),countGrowth:Object(T.getRandomInt)(5,75)/10,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 H({name:"Bounty Hunter",desc:"Hunt down and capture fugitive Synthoids. These Synthoids are wanted alive.

Successfully completing a Bounty Hunter contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:250,difficultyFac:1.04,rewardFac:1.085,rankGain:.9,hpLoss:1,count:Object(T.getRandomInt)(5,500),countGrowth:Object(T.getRandomInt)(5,75)/10,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 H({name:"Retirement",desc:"Hunt down and retire (kill) rogue Synthoids.

Successfully copmleting a Retirement contract will lower the population in your current city, and will also increase its chaos level.",baseDifficulty:200,difficultyFac:1.03,rewardFac:1.065,rankGain:.6,hpLoss:1,count:Object(T.getRandomInt)(5,500),countGrowth:Object(T.getRandomInt)(5,75)/10,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 G({name:"Investigation",desc:"As a field agent, investigate and identify Synthoid populations, movements, and operations.

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

You will NOT lose HP from failed Investigation ops.",baseDifficulty:400,difficultyFac:1.03,rewardFac:1.07,reqdRank:25,rankGain:2.2,rankLoss:.2,count:Object(T.getRandomInt)(1,250),countGrowth:Object(T.getRandomInt)(10,40)/10,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 G({name:"Undercover Operation",desc:"Conduct undercover operations to identify hidden and underground Synthoid communities and organizations.

Successful Undercover ops will increase the accuracy of your synthoid data.",baseDifficulty:500,difficultyFac:1.04,rewardFac:1.09,reqdRank:100,rankGain:4.4,rankLoss:.4,hpLoss:2,count:Object(T.getRandomInt)(1,250),countGrowth:Object(T.getRandomInt)(10,40)/10,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 G({name:"Sting Operation",desc:"Conduct a sting operation to bait and capture particularly notorious Synthoid criminals.",baseDifficulty:650,difficultyFac:1.04,rewardFac:1.095,reqdRank:500,rankGain:5.5,rankLoss:.5,hpLoss:2.5,count:Object(T.getRandomInt)(1,300),countGrowth:Object(T.getRandomInt)(3,40)/10,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 G({name:"Raid",desc:"Lead an assault on a known Synthoid community. Note that there must be an existing Synthoid community in your current city in order for this Operation to be successful",baseDifficulty:800,difficultyFac:1.045,rewardFac:1.1,reqdRank:3e3,rankGain:55,rankLoss:2.5,hpLoss:50,count:Object(T.getRandomInt)(1,200),countGrowth:Object(T.getRandomInt)(2,40)/10,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 G({name:"Stealth Retirement Operation",desc:"Lead a covert operation to retire Synthoids. The objective is to complete the task without drawing any attention. Stealth and discretion are key.",baseDifficulty:1e3,difficultyFac:1.05,rewardFac:1.11,reqdRank:2e4,rankGain:22,rankLoss:2,hpLoss:10,count:Object(T.getRandomInt)(1,250),countGrowth:Object(T.getRandomInt)(1,20)/10,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 G({name:"Assassination",desc:"Assassinate Synthoids that have been identified as important, high-profile social and political leaders in the Synthoid communities.",baseDifficulty:1500,difficultyFac:1.06,rewardFac:1.14,reqdRank:5e4,rankGain:44,rankLoss:4,hpLoss:5,count:Object(T.getRandomInt)(1,200),countGrowth:Object(T.getRandomInt)(1,20)/10,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})},$.prototype.storeCycles=function(e=1){this.storedCycles+=e},$.prototype.process=function(){if(!1===u.b&&this.blackops.hasOwnProperty("Operation Daedalus"))return Object(u.a)(c.a.bitNodeN);if(!1===i.c[i.b.BladesSimulacrum].owned&&c.a.isWorking){if(this.action.type!==F.Idle){let e="Your Bladeburner action was cancelled because you started doing something else.";this.automateEnabled&&(e+="

Your automation was disabled as well. You will have to re-enable it through the Bladeburner console",this.automateEnabled=!1),Object(m.dialogBoxCreate)(e)}this.resetAction()}if(this.stamina<=0&&(this.log("Your Bladeburner action was cancelled because your stamina hit 0"),this.resetAction()),this.storedCycles>=5){var e=Math.floor(this.storedCycles/5);for(var t in e=Math.min(e,5),this.storedCycles-=5*e,this.calculateMaxStamina(),this.stamina+=this.calculateStaminaGainPerSecond()*e,this.stamina=Math.min(this.maxStamina,this.stamina),this.contracts)if(this.contracts.hasOwnProperty(t)){var n=this.contracts[t];n.count+=e*n.countGrowth/300}for(var a in this.operations)if(this.operations.hasOwnProperty(a)){var r=this.operations[a];r.count+=e*r.countGrowth/300}for(var o=0;o=this.automateThreshHigh&&(this.action.name===this.automateActionHigh.name&&this.action.type===this.automateActionHigh.type||(this.action=new U({type:this.automateActionHigh.type,name:this.automateActionHigh.name}),this.startAction(this.action)))),k.routing.isOn(k.Page.Bladeburner)&&this.updateContent()}},$.prototype.calculateMaxStamina=function(){var e=c.a.agility*this.skillMultipliers.effAgi,t=Math.pow(e,.8)+this.staminaBonus;if(t*=this.skillMultipliers.stamina,t*=c.a.bladeburner_max_stamina_mult,isNaN(t))throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");this.maxStamina=t},$.prototype.calculateStaminaGainPerSecond=function(){var e=c.a.agility*this.skillMultipliers.effAgi;return(.0085+this.maxStamina/7e4)*Math.pow(e,.17)*(this.skillMultipliers.stamina*c.a.bladeburner_stamina_gain_mult)},$.prototype.calculateStaminaPenalty=function(){return Math.min(1,this.stamina/(.5*this.maxStamina))},$.prototype.changeRank=function(e){if(isNaN(e))throw new Error("NaN passed into Bladeburner.changeRank()");this.rank+=e,this.rank<0&&(this.rank=0),this.maxRank=Math.max(this.rank,this.maxRank);if(Object(s.d)("Bladeburners")){var t=s.b.Bladeburners;if(!(t instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");if(t.isMember){var n=1+t.favor/100;t.playerReputation+=2*e*c.a.faction_rep_mult*n}}var i=4*(this.totalSkillPoints+1);if(this.maxRank>=i){var a=Math.floor((this.maxRank-i)/4+1);this.skillPoints+=a,this.totalSkillPoints+=a}},$.prototype.getCurrentCity=function(){var e=this.cities[this.city];if(!(e instanceof I))throw new Error("Bladeburner.getCurrentCity() did not properly return a City object");return e},$.prototype.resetSkillMultipliers=function(){this.skillMultipliers={successChanceAll:1,successChanceStealth:1,successChanceKill:1,successChanceContract:1,successChanceOperation:1,successChanceEstimate:1,actionTime:1,effHack:1,effStr:1,effDef:1,effDex:1,effAgi:1,effCha:1,effInt:1,stamina:1,weaponAbility:1,gunAbility:1}},$.prototype.updateSkillMultipliers=function(){for(var e in this.resetSkillMultipliers(),this.skills)if(this.skills.hasOwnProperty(e)){var t=B[e];if(null==t)throw new Error("Could not find Skill Object for: "+e);var n=this.skills[e];if(null==n||n<=0)continue;for(var i=Object.keys(this.skillMultipliers),a=0;a=this.actionTimeToComplete?this.completeAction():void 0}},$.prototype.completeAction=function(){switch(this.action.type){case F.Contract:case F.Operation:try{var e=this.action.type===F.Operation;if(null==(m=this.getActionObject(this.action)))throw new Error("Failed to get Contract/Operation Object for: "+this.action.name);var t=m.getDifficulty(),n=Math.pow(t,.28)+t/650,i=Math.pow(m.rewardFac,m.level-1);if(this.stamina-=.285*n,this.stamina<0&&(this.stamina=0),m.attempt(this)){this.gainActionStats(m,!0),++m.successes,--m.count;var o=0;if(e||(o=5e4*i,c.a.gainMoney(o)),e?m.setMaxLevel(3):m.setMaxLevel(3.5),m.rankGain){var s=Object(y.addOffset)(m.rankGain*i*a.BitNodeMultipliers.BladeburnerRank,10);this.changeRank(s),e&&this.logging.ops?this.log(m.name+" successfully completed! Gained "+Object(C.formatNumber)(s,3)+" rank"):!e&&this.logging.contracts&&this.log(m.name+" contract successfully completed! Gained "+Object(C.formatNumber)(s,3)+" rank and "+p.a.format(o,"$0.000a"))}e?this.completeOperation(!0):this.completeContract(!0)}else{this.gainActionStats(m,!1),++m.failures;var l=0,h=0;m.rankLoss&&(l=Object(y.addOffset)(m.rankLoss*i,10),this.changeRank(-1*l)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(y.addOffset)(h,10)),this.hpLost+=h,c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.CONSTANTS.HospitalCostPerHp*c.a.max_hp));var d="";l>0&&(d+="Lost "+Object(C.formatNumber)(l,3)+" rank."),h>0&&(d+="Took "+Object(C.formatNumber)(h,0)+" damage."),e&&this.logging.ops?this.log(m.name+" failed! "+d):!e&&this.logging.contracts&&this.log(m.name+" contract failed! "+d),e?this.completeOperation(!1):this.completeContract(!1)}m.autoLevel&&(m.level=m.maxLevel),this.startAction(this.action)}catch(e){Object(O.a)(e)}break;case F.BlackOp:case F.BlackOperation:try{var m;if(null==(m=this.getActionObject(this.action))||!(m instanceof K))throw new Error("Failed to get BlackOperation Object for: "+this.action.name);t=m.getDifficulty(),n=Math.pow(t,.28)+t/650;this.stamina-=.285*n,this.stamina<0&&(this.stamina=0);var g,_=m.teamCount;if(m.attempt(this)){this.gainActionStats(m,!0),m.count=0,this.blackops[m.name]=!0;var f=0;if(m.rankGain&&(f=Object(y.addOffset)(m.rankGain*a.BitNodeMultipliers.BladeburnerRank,10),this.changeRank(f)),g=Math.ceil(_/2),"Operation Daedalus"===m.name)return this.resetAction(),Object(u.a)(c.a.bitNodeN);k.routing.isOn(k.Page.Bladeburner)&&this.createActionAndSkillsContent(),this.logging.blackops&&this.log(m.name+" successful! Gained "+Object(C.formatNumber)(f,1)+" rank")}else{this.gainActionStats(m,!1);var b=0;h=0;m.rankLoss&&(b=Object(y.addOffset)(m.rankLoss,10),this.changeRank(-1*b)),m.hpLoss&&(h=m.hpLoss*n,h=Math.ceil(Object(y.addOffset)(h,10)),c.a.takeDamage(h)&&(++this.numHosp,this.moneyLost+=r.CONSTANTS.HospitalCostPerHp*c.a.max_hp)),g=Math.floor(_),this.logging.blackops&&this.log(m.name+" failed! Lost "+Object(C.formatNumber)(b,1)+" rank and took "+Object(C.formatNumber)(h,0)+" damage")}if(this.resetAction(),_>=1){var v=Object(T.getRandomInt)(1,g);this.teamSize-=v,this.teamLost+=v,this.logging.blackops&&this.log("You lost "+Object(C.formatNumber)(v,0)+" team members during "+m.name)}}catch(e){Object(O.a)(e)}break;case F.Training:this.stamina-=.1425;var E=30*c.a.strength_exp_mult,S=30*c.a.defense_exp_mult,w=30*c.a.dexterity_exp_mult,M=30*c.a.agility_exp_mult,P=.04*this.skillMultipliers.stamina;c.a.gainStrengthExp(E),c.a.gainDefenseExp(S),c.a.gainDexterityExp(w),c.a.gainAgilityExp(M),this.staminaBonus+=P,this.logging.general&&this.log("Training completed. Gained: "+Object(C.formatNumber)(E,1)+" str exp, "+Object(C.formatNumber)(S,1)+" def exp, "+Object(C.formatNumber)(w,1)+" dex exp, "+Object(C.formatNumber)(M,1)+" agi exp, "+Object(C.formatNumber)(P,3)+" max stamina"),this.startAction(this.action);break;case F.FieldAnalysis:case F["Field Analysis"]:var R=.04*Math.pow(c.a.hacking_skill,.3)+.04*Math.pow(c.a.intelligence,.9)+.02*Math.pow(c.a.charisma,.3);if(R*=c.a.bladeburner_analysis_mult,isNaN(R)||R<0)throw new Error("Field Analysis Effectiveness calculated to be NaN or negative");var A=20*c.a.hacking_exp_mult,x=20*c.a.charisma_exp_mult;c.a.gainHackingExp(A),c.a.gainIntelligenceExp(.001),c.a.gainCharismaExp(x),this.changeRank(.1*a.BitNodeMultipliers.BladeburnerRank),this.getCurrentCity().improvePopulationEstimateByPercentage(R*this.skillMultipliers.successChanceEstimate),this.logging.general&&this.log("Field analysis completed. Gained 0.1 rank, "+Object(C.formatNumber)(A,1)+" hacking exp, and "+Object(C.formatNumber)(x,1)+" charisma exp"),this.startAction(this.action);break;case F.Recruitment:var N=this.getRecruitmentSuccessChance();if(console.log("Bladeburner recruitment success chance: "+N),Math.random()=1){n=e?Math.ceil(i/2):Math.floor(i);var a=Object(T.getRandomInt)(0,n);this.teamSize-=a,this.teamLost+=a,this.logging.ops&&a>0&&this.log("Lost "+Object(C.formatNumber)(a,0)+" team members during this "+t.name)}var r=this.getCurrentCity();switch(t.name){case"Investigation":e?(r.improvePopulationEstimateByPercentage(.4*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.1);break;case"Undercover Operation":e?(r.improvePopulationEstimateByPercentage(.8*this.skillMultipliers.successChanceEstimate),Math.random()<.02*this.skillMultipliers.successChanceEstimate&&r.improveCommunityEstimate(1)):this.triggerPotentialMigration(this.city,.15);break;case"Sting Operation":e&&r.changePopulationByPercentage(-.1,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByCount(.1);break;case"Raid":if(e)r.changePopulationByPercentage(-1,{changeEstEqually:!0,nonZero:!0}),--r.comms,--r.commsEst;else{var o=Object(T.getRandomInt)(-3,-1);r.changePopulationByPercentage(o,{nonZero:!0})}r.changeChaosByPercentage(Object(T.getRandomInt)(1,5));break;case"Stealth Retirement Operation":e&&r.changePopulationByPercentage(-.5,{changeEstEqually:!0,nonZero:!0}),r.changeChaosByPercentage(Object(T.getRandomInt)(-3,-1));break;case"Assassination":e&&r.changePopulationByCount(-1,{estChange:-1}),r.changeChaosByPercentage(Object(T.getRandomInt)(-5,5));break;default:throw new Error("Invalid Action name in completeOperation: "+this.action.name)}},$.prototype.getRecruitmentTime=function(){var e=c.a.charisma*this.skillMultipliers.effCha,t=Math.pow(e,.81)+e/90;return Math.max(10,Math.round(300-t))},$.prototype.getRecruitmentSuccessChance=function(){return Math.pow(c.a.charisma,.45)/(this.teamSize+1)},$.prototype.gainActionStats=function(e,t){var n=e.getDifficulty(),i=Math.pow(n,.28)+n/650,a=this.actionTimeToComplete,r=t?1:.5,o=1*a*r*i,s=.001*a*r*i;c.a.gainHackingExp(o*e.weights.hack*c.a.hacking_exp_mult),c.a.gainStrengthExp(o*e.weights.str*c.a.strength_exp_mult),c.a.gainDefenseExp(o*e.weights.def*c.a.defense_exp_mult),c.a.gainDexterityExp(o*e.weights.dex*c.a.dexterity_exp_mult),c.a.gainAgilityExp(o*e.weights.agi*c.a.agility_exp_mult),c.a.gainCharismaExp(o*e.weights.cha*c.a.charisma_exp_mult),c.a.gainIntelligenceExp(s*e.weights.int)},$.prototype.randomEvent=function(){var e=Math.random(),t=P[Object(T.getRandomInt)(0,5)],n=this.cities[t];if(!(n instanceof I))throw new Error("sourceCity was not a City object in Bladeburner.randomEvent()");for(var i=P[Object(T.getRandomInt)(0,5)];i===t;)i=P[Object(T.getRandomInt)(0,5)];var a=this.cities[i];if(!(n instanceof I&&a instanceof I))throw new Error("sourceCity/destCity was not a City object in Bladeburner.randomEvent()");if(e<=.05){++n.comms;var r=Object(T.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else if(e<=.1)if(n.comms<=0){++n.comms;r=Object(T.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that a new Synthoid community was formed in a city")}else{--n.comms,++a.comms;r=Object(T.getRandomInt)(10,20)/100,o=Math.round(n.pop*r);n.pop-=o,a.pop+=o,this.logging.events&&this.log("Intelligence indicates that a Synthoid community migrated from "+t+" to some other city")}else if(e<=.3){r=Object(T.getRandomInt)(8,24)/100,o=Math.round(n.pop*r);n.pop+=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}else if(e<=.5)this.triggerMigration(t),this.logging.events&&this.log("Intelligence indicates that a large number of Synthoids migrated from "+t+" to some other city");else if(e<=.7)n.chaos+=1,n.chaos*=1+Object(T.getRandomInt)(5,10)/100,this.logging.events&&this.log("Tensions between Synthoids and humans lead to riots in "+t+"! Chaos increased");else if(e<=.9){r=Object(T.getRandomInt)(5,20)/100,o=Math.round(n.pop*r);n.pop-=o,this.logging.events&&this.log("Intelligence indicates that the Synthoid population of "+t+" just changed significantly")}},$.prototype.triggerPotentialMigration=function(e,t){(null==t||isNaN(t))&&console.log("ERROR: Invalid 'chance' parameter passed into Bladeburner.triggerPotentialMigration()"),t>1&&(t/=100),Math.random()0&&(r*=Object(T.getRandomInt)(2,4),--i.comms,++n.comms);var o=Math.round(i.pop*r);i.pop-=o,n.pop+=o};var Y={};$.prototype.initializeDomElementRefs=function(){Y={bladeburnerDiv:null,overviewConsoleParentDiv:null,overviewDiv:null,actionAndSkillsDiv:null,currentTab:null,consoleDiv:null,consoleTable:null,consoleInputRow:null,consoleInputCell:null,consoleInputHeader:null,consoleInput:null,overviewRank:null,overviewStamina:null,overviewStaminaHelpTip:null,overviewGen1:null,overviewEstPop:null,overviewEstPopHelpTip:null,overviewEstComms:null,overviewChaos:null,overviewSkillPoints:null,overviewBonusTime:null,overviewAugSuccessMult:null,overviewAugMaxStaminaMult:null,overviewAugStaminaGainMult:null,overviewAugAnalysisMult:null,actionsAndSkillsDesc:null,actionsAndSkillsList:null,generalActions:{},contracts:{},operations:{},blackops:{},skills:{},skillPointsDisplay:null}},$.prototype.createContent=function(){if(Y.bladeburnerDiv=Object(v.createElement)("div",{id:"bladeburner-container",position:"fixed",class:"generic-menupage-container"}),Y.overviewConsoleParentDiv=Object(v.createElement)("div",{height:"60%",display:"block",position:"relative"}),Y.overviewDiv=Object(v.createElement)("div",{width:"30%",display:"inline-block",border:"1px solid white"}),Y.actionAndSkillsDiv=Object(v.createElement)("div",{height:"60%",width:"70%",display:"block",border:"1px solid white",margin:"6px",padding:"6px"}),Y.currentTab="general",this.createOverviewContent(),this.createActionAndSkillsContent(),Y.consoleDiv=Object(v.createElement)("div",{class:"bladeburner-console-div",clickListener:()=>(Y.consoleInput instanceof Element&&Y.consoleInput.focus(),!1)}),Y.consoleTable=Object(v.createElement)("table",{class:"bladeburner-console-table"}),Y.consoleInputRow=Object(v.createElement)("tr",{class:"bladeburner-console-input-row",id:"bladeubrner-console-input-row"}),Y.consoleInputCell=Object(v.createElement)("td",{class:"bladeburner-console-input-cell"}),Y.consoleInputHeader=Object(v.createElement)("pre",{innerText:"> "}),Y.consoleInput=Object(v.createElement)("input",{type:"text",class:"bladeburner-console-input",tabIndex:1,onfocus:()=>{Y.consoleInput.value=Y.consoleInput.value}}),Y.consoleInputCell.appendChild(Y.consoleInputHeader),Y.consoleInputCell.appendChild(Y.consoleInput),Y.consoleInputRow.appendChild(Y.consoleInputCell),Y.consoleTable.appendChild(Y.consoleInputRow),Y.consoleDiv.appendChild(Y.consoleTable),Y.overviewConsoleParentDiv.appendChild(Y.overviewDiv),Y.overviewConsoleParentDiv.appendChild(Y.consoleDiv),Y.bladeburnerDiv.appendChild(Y.overviewConsoleParentDiv),Y.bladeburnerDiv.appendChild(Y.actionAndSkillsDiv),document.getElementById("entire-game-container").appendChild(Y.bladeburnerDiv),0===this.consoleLogs.length)this.postToConsole("Bladeburner Console BETA"),this.postToConsole("Type 'help' to see console commands");else for(let e=0;e{Object(m.dialogBoxCreate)("Performing actions will use up your stamina.

Your max stamina is determined primarily by your agility stat.

Your stamina gain rate is determined by both your agility and your max stamina. Higher max stamina leads to a higher gain rate.

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).

Your max stamina and stamina gain rate can also be increased by training, or through skills and Augmentation upgrades.")}}),Y.overviewGen1=Object(v.createElement)("p",{display:"block"}),Y.overviewEstPop=Object(v.createElement)("p",{innerText:"Est. Synthoid Population: ",display:"inline-block",tooltip:"This is your Bladeburner division's estimate of how many Synthoids exist in your current city."}),Y.overviewEstPopHelpTip=Object(v.createElement)("div",{innerText:"?",class:"help-tip",clickListener:()=>{Object(m.dialogBoxCreate)("The success rate of your contracts/operations depends on the population of Synthoids in your current city. The success rate that is shown to you is only an estimate, and it is based on your Synthoid population estimate.

Therefore, it is important that this Synthoid population estimate is accurate so that you have a better idea of your success rate for contracts/operations. Certain actions will increase the accuracy of your population estimate.

The Synthoid populations of cities can change due to your actions or random events. If random events occur, they will be logged in the Bladeburner Console.")}}),Y.overviewEstComms=Object(v.createElement)("p",{innerText:"Est. Synthoid Communities: ",display:"inline-block",tooltip:"This is your Bladeburner divison's estimate of how many Synthoid communities exist in your current city."}),Y.overviewChaos=Object(v.createElement)("p",{innerText:"City Chaos: ",display:"inline-block",tooltip:"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."}),Y.overviewBonusTime=Object(v.createElement)("p",{innerText:"Bonus time: ",display:"inline-block",tooltip:"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."}),Y.overviewSkillPoints=Object(v.createElement)("p",{display:"block"}),Y.overviewAugSuccessMult=Object(v.createElement)("p",{display:"block"}),Y.overviewAugMaxStaminaMult=Object(v.createElement)("p",{display:"block"}),Y.overviewAugStaminaGainMult=Object(v.createElement)("p",{display:"block"}),Y.overviewAugAnalysisMult=Object(v.createElement)("p",{display:"block"}),Y.overviewDiv.appendChild(Y.overviewRank),Object(f.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewStamina),Y.overviewDiv.appendChild(Y.overviewStaminaHelpTip),Y.overviewDiv.appendChild(Y.overviewGen1),Y.overviewDiv.appendChild(Y.overviewEstPop),Y.overviewDiv.appendChild(Y.overviewEstPopHelpTip),Object(f.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewEstComms),Object(f.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewChaos),Object(f.appendLineBreaks)(Y.overviewDiv,2),Y.overviewDiv.appendChild(Y.overviewBonusTime),Y.overviewDiv.appendChild(Y.overviewSkillPoints),Object(f.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Y.overviewAugSuccessMult),Y.overviewDiv.appendChild(Y.overviewAugMaxStaminaMult),Y.overviewDiv.appendChild(Y.overviewAugStaminaGainMult),Y.overviewDiv.appendChild(Y.overviewAugAnalysisMult),Object(f.appendLineBreaks)(Y.overviewDiv,1),Y.overviewDiv.appendChild(Object(v.createElement)("a",{innerHTML:"Travel",class:"a-link-button",display:"inline-block",clickListener:()=>{var e="bladeburner-travel-popup-cancel-btn",t=[];t.push(Object(v.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(M.removeElementById)(e),!1)})),t.push(Object(v.createElement)("p",{innerText:"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"}));for(var n=0;n(n.city=P[i],Object(M.removeElementById)(e),n.updateOverviewContent(),!1)}))}(this,n);Object(E.createPopup)(e,t)}}));if(Object(s.d)("Bladeburners")){var e=s.b.Bladeburners;if(!(e instanceof s.a))throw new Error("Could not properly get Bladeburner Faction object in Bladeburner UI Overview Faction button");Y.overviewDiv.appendChild(Object(v.createElement)("a",{innerText:"Faction",class:"a-link-button",display:"inline-block",tooltip:"Apply to the Bladeburner Faction, or go to the faction page if you are already a member",clickListener:()=>(e.isMember?(o.Engine.loadFactionContent(),Object(s.c)("Bladeburners")):this.rank>=25?(Object(s.g)(e),Object(m.dialogBoxCreate)("Congratulations! You were accepted into the Bladeburners faction"),Object(g.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()):Object(m.dialogBoxCreate)("You need a rank of 25 to join the Bladeburners Faction!"),!1)}))}Y.overviewDiv.appendChild(Object(v.createElement)("br")),Y.overviewDiv.appendChild(Object(v.createElement)("br")),this.updateOverviewContent()},$.prototype.createActionAndSkillsContent=function(){null==Y.currentTab&&(Y.currentTab="general"),Object(g.removeChildrenFromElement)(Y.actionAndSkillsDiv),Object(b.clearObject)(Y.generalActions),Object(b.clearObject)(Y.contracts),Object(b.clearObject)(Y.operations),Object(b.clearObject)(Y.blackops),Object(b.clearObject)(Y.skills);for(var e=Y.currentTab.toLowerCase(),t=["General","Contracts","Operations","BlackOps","Skills"],n=0;n(Y.currentTab=e[t].toLowerCase(),n.createActionAndSkillsContent(),!1)}))}(t,n,this,e);switch(Y.actionsAndSkillsDesc=Object(v.createElement)("p",{display:"block",margin:"4px",padding:"4px"}),Object(g.removeChildrenFromElement)(Y.actionsAndSkillsList),Y.actionsAndSkillsList=Object(v.createElement)("ul"),e){case"general":this.createGeneralActionsContent();break;case"contracts":this.createContractsContent();break;case"operations":this.createOperationsContent();break;case"blackops":this.createBlackOpsContent();break;case"skills":this.createSkillsContent();break;default:throw new Error("Invalid value for DomElems.currentTab in Bladeburner.createActionAndSkillsContent")}this.updateContent(),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsDesc),Y.actionAndSkillsDiv.appendChild(Y.actionsAndSkillsList)},$.prototype.createGeneralActionsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createGeneralActionsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerText="These are generic actions that will assist you in your Bladeburner duties. They will not affect your Bladeburner rank in any way.",W)W.hasOwnProperty(e)&&(Y.generalActions[e]=Object(v.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.generalActions[e]))},$.prototype.createContractsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createContractsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="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.

You can unlock higher-level contracts by successfully completing them. Higher-level contracts are more difficult, but grant more rank, experience, and money.",this.contracts)this.contracts.hasOwnProperty(e)&&(Y.contracts[e]=Object(v.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.contracts[e]))},$.prototype.createOperationsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createOperationsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");for(var e in Y.actionsAndSkillsDesc.innerHTML="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.

Operations can affect the chaos level and Synthoid population of your current city. The exact effects vary between different Operations.

For operations, you can use a team. You must first recruit team members. Having a larger team will improves your chances of success.

You can unlock higher-level operations by successfully completing them. Higher-level operations are more difficult, but grant more rank and experience.",this.operations)this.operations.hasOwnProperty(e)&&(Y.operations[e]=Object(v.createElement)("div",{class:"bladeburner-action",name:e}),Y.actionsAndSkillsList.appendChild(Y.operations[e]))},$.prototype.createBlackOpsContent=function(){if(null==Y.actionsAndSkillsList||null==Y.actionsAndSkillsDesc)throw new Error("Bladeburner.createBlackOpsContent called with either DomElems.actionsAndSkillsList or DomElems.actionsAndSkillsDesc = null");Y.actionsAndSkillsDesc.innerHTML="Black Operations (Black Ops) are special, one-time covert operations. Each Black Op must be unlocked successively by completing the one before it.

Your ultimate goal to climb through the ranks of Bladeburners is to complete all of the Black Ops.

Like normal operations, you may use a team for Black Ops. Failing a black op will incur heavy HP and rank losses.";var e=[];for(var t in q)q.hasOwnProperty(t)&&e.push(q[t]);e.sort(function(e,t){return e.reqdRank-t.reqdRank});for(var n=0;n
Note that when upgrading a skill, the benefit for that skill is additive. However, the effects of different skills with each other is multiplicative.

";for(var e=Object.keys(this.skillMultipliers),t=0;t";break;case"successChanceStealth":Y.actionsAndSkillsDesc.innerHTML+="Stealth Success Chance: x"+n+"
";break;case"successChanceKill":Y.actionsAndSkillsDesc.innerHTML+="Retirement Success Chance: x"+n+"
";break;case"successChanceContract":Y.actionsAndSkillsDesc.innerHTML+="Contract Success Chance: x"+n+"
";break;case"successChanceOperation":Y.actionsAndSkillsDesc.innerHTML+="Operation Success Chance: x"+n+"
";break;case"successChanceEstimate":Y.actionsAndSkillsDesc.innerHTML+="Synthoid Data Estimate: x"+n+"
";break;case"actionTime":Y.actionsAndSkillsDesc.innerHTML+="Action Time: x"+n+"
";break;case"effHack":Y.actionsAndSkillsDesc.innerHTML+="Hacking Skill: x"+n+"
";break;case"effStr":Y.actionsAndSkillsDesc.innerHTML+="Strength: x"+n+"
";break;case"effDef":Y.actionsAndSkillsDesc.innerHTML+="Defense: x"+n+"
";break;case"effDex":Y.actionsAndSkillsDesc.innerHTML+="Dexterity: x"+n+"
";break;case"effAgi":Y.actionsAndSkillsDesc.innerHTML+="Agility: x"+n+"
";break;case"effCha":Y.actionsAndSkillsDesc.innerHTML+="Charisma: x"+n+"
";break;case"effInt":Y.actionsAndSkillsDesc.innerHTML+="Intelligence: x"+n+"
";break;case"stamina":Y.actionsAndSkillsDesc.innerHTML+="Stamina: x"+n+"
";break;case"weaponAbility":case"gunAbility":break;default:console.log("Warning: Unrecognized SkillMult Key: "+e[t])}}for(var i in Y.skillPointsDisplay=Object(v.createElement)("p",{innerHTML:"
Skill Points: "+Object(C.formatNumber)(this.skillPoints,0)+""}),Y.actionAndSkillsDiv.appendChild(Y.skillPointsDisplay),B)B.hasOwnProperty(i)&&(Y.skills[i]=Object(v.createElement)("div",{class:"bladeburner-action",name:i}),Y.actionsAndSkillsList.appendChild(Y.skills[i]))},$.prototype.updateContent=function(){this.updateOverviewContent(),this.updateActionAndSkillsContent()},$.prototype.updateOverviewContent=function(){k.routing.isOn(k.Page.Bladeburner)&&(Y.overviewRank.childNodes[0].nodeValue="Rank: "+Object(C.formatNumber)(this.rank,2),Y.overviewStamina.innerText="Stamina: "+Object(C.formatNumber)(this.stamina,3)+" / "+Object(C.formatNumber)(this.maxStamina,3),Y.overviewGen1.innerHTML="Stamina Penalty: "+Object(C.formatNumber)(100*(1-this.calculateStaminaPenalty()),1)+"%

Team Size: "+Object(C.formatNumber)(this.teamSize,0)+"
Team Members Lost: "+Object(C.formatNumber)(this.teamLost,0)+"

Num Times Hospitalized: "+this.numHosp+"
Money Lost From Hospitalizations: "+p.a.format(this.moneyLost,"$0.000a")+"

Current City: "+this.city+"
",Y.overviewEstPop.childNodes[0].nodeValue="Est. Synthoid Population: "+p.a.format(this.getCurrentCity().popEst,"0.000a"),Y.overviewEstComms.childNodes[0].nodeValue="Est. Synthoid Communities: "+Object(C.formatNumber)(this.getCurrentCity().comms,0),Y.overviewChaos.childNodes[0].nodeValue="City Chaos: "+Object(C.formatNumber)(this.getCurrentCity().chaos),Y.overviewSkillPoints.innerText="Skill Points: "+Object(C.formatNumber)(this.skillPoints,0),Y.overviewBonusTime.childNodes[0].nodeValue="Bonus time: "+this.storedCycles/5,Y.overviewAugSuccessMult.innerText="Aug. Success Chance Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_success_chance_mult,1)+"%",Y.overviewAugMaxStaminaMult.innerText="Aug. Max Stamina Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_max_stamina_mult,1)+"%",Y.overviewAugStaminaGainMult.innerText="Aug. Stamina Gain Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_stamina_gain_mult,1)+"%",Y.overviewAugAnalysisMult.innerText="Aug. Field Analysis Mult: "+Object(C.formatNumber)(100*c.a.bladeburner_analysis_mult,1)+"%")},$.prototype.updateActionAndSkillsContent=function(){switch(null==Y.currentTab&&(Y.currentTab="general"),Y.currentTab.toLowerCase()){case"general":for(var e=Object.keys(Y.generalActions),t=0;t";var m=Object.keys(Y.skills);for(t=0;t(this.action.type=F[t.name],this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));Object(f.appendLineBreaks)(e,2),e.appendChild(Object(v.createElement)("pre",{innerHTML:t.desc,display:"inline-block"}))},$.prototype.updateContractsUIElement=function(e,t){Object(g.removeChildrenFromElement)(e);var n=e.classList.contains(A),i=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(v.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(v.createElement)("p",{display:"block",innerText:Object(d.createProgressBarText)({progress:a})}))}else e.appendChild(Object(v.createElement)("a",{innerText:"Start",class:"a-link-button",padding:"3px",margin:"3px",clickListener:()=>(this.action.type=F.Contract,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)}));var r=t.level>=t.maxLevel;Object(f.appendLineBreaks)(e,2),e.appendChild(Object(v.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3.5)+" successes needed for next level"})),e.appendChild(Object(v.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)})),e.appendChild(Object(v.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the contract":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateContractsUIElement(e,t),!1)}));var o=t.getActionTime(this);Object(f.appendLineBreaks)(e,2),e.appendChild(Object(v.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*i,1)+"%\nTime Required (s): "+Object(C.formatNumber)(o,0)+"\nContracts remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(v.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(v.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase contract level when possible"}));var l=Object(v.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},$.prototype.updateOperationsUIElement=function(e,t){Object(g.removeChildrenFromElement)(e);var n=e.classList.contains(A),i=t.getSuccessChance(this,{est:!0});if(e.appendChild(Object(v.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var a=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(v.createElement)("p",{display:"block",innerText:Object(d.createProgressBarText)({progress:a})}))}else e.appendChild(Object(v.createElement)("a",{innerText:"Start",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>(this.action.type=F.Operation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(v.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",i=Object(v.createElement)("p",{innerText:"Enter the amount of team members you would like to take on these operations. 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."}),a=Object(v.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(v.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var i=Math.round(parseFloat(a.value));return isNaN(i)?Object(m.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=i,this.updateOperationsUIElement(e,t)),Object(M.removeElementById)(n),!1}}),o=Object(v.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(M.removeElementById)(n),!1)});Object(E.createPopup)(n,[i,a,r,o])}}));var r=t.level>=t.maxLevel;Object(f.appendLineBreaks)(e,2),e.appendChild(Object(v.createElement)("pre",{display:"inline-block",innerText:"Level: "+t.level+" / "+t.maxLevel,tooltip:t.getSuccessesNeededForNextLevel(3)+" successes needed for next level"})),e.appendChild(Object(v.createElement)("a",{class:r?"a-link-button-inactive":"a-link-button",innerHTML:"↑",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(++t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)})),e.appendChild(Object(v.createElement)("a",{class:t.level<=1?"a-link-button-inactive":"a-link-button",innerHTML:"↓",padding:"2px",margin:"2px",tooltip:n?"WARNING: changing the level will restart the Operation":"",display:"inline",clickListener:()=>(--t.level,n&&this.startAction(this.action),this.updateOperationsUIElement(e,t),!1)}));t.getDifficulty();var o=t.getActionTime(this);Object(f.appendLineBreaks)(e,2),e.appendChild(Object(v.createElement)("pre",{display:"inline-block",innerHTML:t.desc+"\n\nEstimated success chance: "+Object(C.formatNumber)(100*i,1)+"%\nTime Required(s): "+Object(C.formatNumber)(o,1)+"\nOperations remaining: "+Math.floor(t.count)+"\nSuccesses: "+t.successes+"\nFailures: "+t.failures})),e.appendChild(Object(v.createElement)("br"));var s="bladeburner-"+t.name+"-autolevel-checkbox";e.appendChild(Object(v.createElement)("label",{for:s,innerText:"Autolevel",color:"white",tooltip:"Automatically increase operation level when possible"}));var l=Object(v.createElement)("input",{type:"checkbox",id:s,margin:"4px",checked:t.autoLevel,changeListener:()=>{t.autoLevel=l.checked}});e.appendChild(l)},$.prototype.updateBlackOpsUIElement=function(e,t){Object(g.removeChildrenFromElement)(e);var n=e.classList.contains(A),i=null!=this.blackops[t.name],a=t.getSuccessChance(this,{est:!0}),r=(t.getDifficulty(),t.getActionTime(this)),o=this.rank>=t.reqdRank;if(i)e.appendChild(Object(v.createElement)("h2",{innerText:t.name+" (COMPLETED)",display:"block"}));else{if(e.appendChild(Object(v.createElement)("h2",{innerText:n?t.name+" (IN PROGRESS - "+Object(C.formatNumber)(this.actionTimeCurrent,0)+" / "+Object(C.formatNumber)(this.actionTimeToComplete,0)+")":t.name,display:"inline-block"})),n){var s=this.actionTimeCurrent/this.actionTimeToComplete;e.appendChild(Object(v.createElement)("p",{display:"block",innerText:Object(d.createProgressBarText)({progress:s})}))}else e.appendChild(Object(v.createElement)("a",{innerText:"Start",margin:"3px",padding:"3px",class:o?"a-link-button":"a-link-button-inactive",clickListener:()=>(this.action.type=F.BlackOperation,this.action.name=t.name,this.startAction(this.action),this.updateActionAndSkillsContent(),!1)})),e.appendChild(Object(v.createElement)("a",{innerText:"Set Team Size (Curr Size: "+Object(C.formatNumber)(t.teamCount,0)+")",class:"a-link-button",margin:"3px",padding:"3px",clickListener:()=>{var n="bladeburner-operation-set-team-size-popup",i=Object(v.createElement)("p",{innerText:"Enter the amount of team members you would like to take on this BlackOp. 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."}),a=Object(v.createElement)("input",{type:"number",placeholder:"Team Members"}),r=Object(v.createElement)("a",{innerText:"Confirm",class:"a-link-button",clickListener:()=>{var i=Math.round(parseFloat(a.value));return isNaN(i)?Object(m.dialogBoxCreate)("Invalid value entered for number of Team Members (must be numeric)"):(t.teamCount=i,this.updateBlackOpsUIElement(e,t)),Object(M.removeElementById)(n),!1}}),o=Object(v.createElement)("a",{innerText:"Cancel",class:"a-link-button",clickListener:()=>(Object(M.removeElementById)(n),!1)});Object(E.createPopup)(n,[i,a,r,o])}}));Object(f.appendLineBreaks)(e,2),e.appendChild(Object(v.createElement)("p",{display:"inline-block",innerHTML:"
"+t.desc+"

"})),e.appendChild(Object(v.createElement)("p",{display:"block",color:o?"white":"red",innerHTML:"Required Rank: "+Object(C.formatNumber)(t.reqdRank,0)+"
"})),e.appendChild(Object(v.createElement)("p",{display:"inline-block",innerHTML:"Estimated Success Chance: "+Object(C.formatNumber)(100*a,1)+"%\nTime Required(s): "+Object(C.formatNumber)(r,1)}))}},$.prototype.updateSkillsUIElement=function(e,t){Object(g.removeChildrenFromElement)(e);var n=t.name,i=0;this.skills[n]&&!isNaN(this.skills[n])&&(i=this.skills[n]);var a=t.calculateCost(i);e.appendChild(Object(v.createElement)("h2",{innerText:t.name+" (Lvl "+i+")",display:"inline-block"}));var r=this.skillPoints>=a,o=!!t.maxLvl&&i>=t.maxLvl;e.appendChild(Object(v.createElement)("a",{innerText:"Level",display:"inline-block",class:r&&!o?"a-link-button":"a-link-button-inactive",margin:"3px",padding:"3px",clickListener:()=>{if(!(this.skillPoints100&&this.consoleLogs.shift()),null!=t&&null!=Y.consoleDiv&&(e("#bladeubrner-console-input-row").before(''+t+""),Y.consoleTable.childNodes.length>100&&Y.consoleTable.removeChild(Y.consoleTable.firstChild),this.updateConsoleScroll())},$.prototype.updateConsoleScroll=function(){Y.consoleDiv.scrollTop=Y.consoleDiv.scrollHeight},$.prototype.resetConsoleInput=function(){Y.consoleInput.value=""},$.prototype.clearConsole=function(){for(;Y.consoleTable.childNodes.length>1;)Y.consoleTable.removeChild(Y.consoleTable.firstChild);this.consoleLogs.length=0},$.prototype.log=function(e){this.postToConsole(`[${Object(S.getTimestamp)()}] ${e}`)},$.prototype.executeConsoleCommands=function(e){try{this.consoleHistory[this.consoleHistory.length-1]!=e&&(this.consoleHistory.push(e),this.consoleHistory.length>50&&this.consoleHistory.splice(0,1)),x=this.consoleHistory.length;for(var t=e.split(";"),n=0;n"))}},$.prototype.executeLogConsoleCommand=function(e){if(e.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");var t=!0;switch(e[1].toLowerCase().includes("d")&&(t=!1),e[2].toLowerCase()){case"general":case"gen":this.logging.general=t,this.log("Logging "+(t?"enabled":"disabled")+" for general actions");break;case"contract":case"contracts":this.logging.contracts=t,this.log("Logging "+(t?"enabled":"disabled")+" for Contracts");break;case"ops":case"op":case"operations":case"operation":this.logging.ops=t,this.log("Logging "+(t?"enabled":"disabled")+" for Operations");break;case"blackops":case"blackop":case"black operations":case"black operation":this.logging.blackops=t,this.log("Logging "+(t?"enabled":"disabled")+" for BlackOps");break;case"event":case"events":this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for events");break;case"all":this.logging.general=t,this.logging.contracts=t,this.logging.ops=t,this.logging.blackops=t,this.logging.events=t,this.log("Logging "+(t?"enabled":"disabled")+" for everything");break;default:this.postToConsole("Invalid action/event type specified: "+e[2]),this.postToConsole("Examples of valid action/event identifiers are: [general, contracts, ops, blackops, events]")}},$.prototype.executeSkillConsoleCommand=function(e){switch(e.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"===e[1].toLowerCase()){this.postToConsole("Skills: ");for(var t=Object.keys(B),n=0;n=c?(this.skillPoints-=c,this.upgradeSkill(i),this.log(i.name+" upgraded to Level "+this.skills[s]),this.createActionAndSkillsContent()):this.postToConsole("You do not have enough Skill Points to upgrade this. You need "+Object(C.formatNumber)(c,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")}},$.prototype.executeStartConsoleCommand=function(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");var t=e[2];switch(e[1].toLowerCase()){case"general":case"gen":null!=W[t]?(this.action.type=F[t],this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid action name specified: "+e[2]);break;case"contract":case"contracts":null!=this.contracts[t]?(this.action.type=F.Contract,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid contract name specified: "+e[2]);break;case"ops":case"op":case"operations":case"operation":null!=this.operations[t]?(this.action.type=F.Operation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):this.postToConsole("Invalid Operation name specified: "+e[2]);break;case"blackops":case"blackop":case"black operations":case"black operation":null!=q[t]?(this.action.type=F.BlackOperation,this.action.name=t,this.startAction(this.action),this.updateActionAndSkillsContent()):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]")}},$.prototype.getActionIdFromTypeAndName=function(e="",t=""){if(""===e||""===t)return null;var n=new U,i=e.toLowerCase().trim(),a=t.toLowerCase().trim();switch(i){case"contract":case"contracts":case"contr":return n.type=F.Contract,this.contracts.hasOwnProperty(t)?(n.name=t,n):null;case"operation":case"operations":case"op":case"ops":return n.type=F.Operation,this.operations.hasOwnProperty(t)?(n.name=t,n):null;case"blackoperation":case"black operation":case"black operations":case"black op":case"black ops":case"blackop":case"blackops":return n.type=F.BlackOp,q.hasOwnProperty(t)?(n.name=t,n):null;case"general":case"general action":case"gen":break;default:return null}if(i.startsWith("gen")){switch(a){case"training":n.type=F.Training,n.name="Training";break;case"recruitment":case"recruit":n.type=F.Recruitment,n.name="Recruitment";break;case"field analysis":case"fieldanalysis":n.type=F["Field Analysis"],n.name="Field Analysis";break;default:return null}return n}},$.prototype.getTypeAndNameFromActionId=function(e){var t={};let n=Object.keys(F);for(let i=0;ithis.rank)return n.log(`Failed to start Black Op ${a.name} due to insufficient rank`),!1;if(null!=this.blackops[a.name])return n.log(`Failed to start Black Op ${a.name} because its already been completed`),!1;var r=[];for(const e in q)q.hasOwnProperty(e)&&r.push(e);r.sort(function(e,t){return q[e].reqdRank-q[t].reqdRank});let e=r.indexOf(a.name);if(-1===e)return n.log("ERROR: Invalid Black Operation name passed into bladeburner.startAction(). Note that this name is case-sensitive & whitespace-sensitive"),!1;if(e>0&&null==this.blackops[r[e-1]])return n.log(`ERROR: Cannot attempt Black Operation ${a.name} because you have not done the preceding one`),!1}try{return this.startAction(a),n.shouldLog("startAction")&&n.scriptRef.log("Starting bladeburner action with type "+e+" and name "+t),!0}catch(i){return this.resetAction(),n.scriptRef.log("ERROR: bladeburner.startAction() failed to start action of type "+e+" due to invalid name: "+t+"Note that this name is case-sensitive and whitespace-sensitive"),!1}},$.prototype.getActionTimeNetscriptFn=function(e,t,n){var i="ERROR: bladeburner.getActionTime() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),-1;var r=this.getActionObject(a);if(null==r)return n.log(i),-1;switch(a.type){case F.Contract:case F.Operation:case F.BlackOp:case F.BlackOperation:return r.getActionTime(this);case F.Training:case F["Field Analysis"]:case F.FieldAnalysis:return 30;case F.Recruitment:return this.getRecruitmentTime();default:return n.log(i),-1}},$.prototype.getActionEstimatedSuccessChanceNetscriptFn=function(e,t,n){var i="ERROR: bladeburner.getActionEstimatedSuccessChance() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),-1;var r=this.getActionObject(a);if(null==r)return n.log(i),-1;switch(a.type){case F.Contract:case F.Operation:case F.BlackOp:case F.BlackOperation:return r.getSuccessChance(this,{est:!0});case F.Training:case F["Field Analysis"]:case F.FieldAnalysis:return 1;case F.Recruitment:return this.getRecruitmentSuccessChance();default:return n.log(i),-1}},$.prototype.getActionCountRemainingNetscriptFn=function(e,t,n){var i="ERROR: bladeburner.getActionCountRemaining() failed due to an invalid action specified. Type: "+e+", Name: "+t+". Note that for contracts and operations, the name of the operation is case-sensitive.",a=this.getActionIdFromTypeAndName(e,t);if(null==a)return n.log(i),-1;var r=this.getActionObject(a);if(null==r)return n.log(i),-1;switch(a.type){case F.Contract:case F.Operation:return Math.floor(r.count);case F.BlackOp:case F.BlackOperation:return null!=this.blackops[t]?0:1;case F.Training:case F["Field Analysis"]:case F.FieldAnalysis:return 1/0;default:return n.log(i),-1}},$.prototype.getSkillLevelNetscriptFn=function(e,t){var n="ERROR: bladeburner.getSkillLevel() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";return""===e?-1:B.hasOwnProperty(e)?null==this.skills[e]?0:this.skills[e]:(t.log(n),-1)},$.prototype.getSkillUpgradeCostNetscriptFn=function(e,t){var n="ERROR: bladeburner.getSkillUpgradeCostNetscriptFn() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";if(""===e)return-1;if(!B.hasOwnProperty(e))return t.log(n),-1;var i=B[e];return null==this.skills[e]?i.calculateCost(0):i.calculateCost(this.skills[e])},$.prototype.upgradeSkillNetscriptFn=function(e,t){var n="ERROR: bladeburner.upgradeSkill() failed due to an invalid skill specified: "+e+". Note that the name of the skill is case-sensitive";if(!B.hasOwnProperty(e))return t.log(n),!1;var i=B[e],a=0;this.skills[e]&&!isNaN(this.skills[e])&&(a=this.skills[e]);var r=i.calculateCost(a);return i.maxLvl&&a>=i.maxLvl?(t.shouldLog("upgradeSkill")&&t.log(`bladeburner.upgradeSkill() failed because ${e} is already maxed`),!1):this.skillPoints=25?(Object(s.g)(t),e.shouldLog("joinBladeburnerFaction")&&e.log("Joined Bladeburners Faction"),k.routing.isOn(k.Page.Bladeburner)&&(Object(g.removeChildrenFromElement)(Y.overviewDiv),this.createOverviewContent()),!0):(e.shouldLog("joinBladeburnerFaction")&&e.log("Failed to join Bladeburners Faction because you do not have the required 25 rank"),!1))},$.prototype.toJSON=function(){return Object(_.Generic_toJSON)("Bladeburner",this)},$.fromJSON=function(e){return Object(_.Generic_fromJSON)($,e.data)},_.Reviver.constructors.Bladeburner=$}).call(this,n(60))},function(e,t,n){"use strict";n.d(t,"b",function(){return a}),n.d(t,"a",function(){return o}),n.d(t,"d",function(){return l}),n.d(t,"e",function(){return s}),n.d(t,"c",function(){return c});var i=n(14);let a={FulcrumSecretTechnologies:"Fulcrum Secret Technologies Server",CyberSecServer:"CyberSec Server",NiteSecServer:"NiteSec Server",TheBlackHandServer:"The Black Hand Server",BitRunnersServer:"BitRunners Server",TheDarkArmyServer:"The Dark Army Server",DaedalusServer:"Daedalus Server",WorldDaemon:"w0r1d_d43m0n"};function r(){}r.prototype.addIp=function(e,t){this[e]=t},r.prototype.toJSON=function(){return Object(i.Generic_toJSON)("SpecialServerIpsMap",this)},r.fromJSON=function(e){return Object(i.Generic_fromJSON)(r,e.data)},i.Reviver.constructors.SpecialServerIpsMap=r;let o=new r;function s(){for(var e in o)delete o[e];o=null,o=new r}function l(e){o=JSON.parse(e,i.Reviver)}function c(){o=new r}},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KEY={A:65,B:66,C:67,CTRL:17,D:68,DOWNARROW:40,E:69,ENTER:13,F:70,H:72,J:74,K:75,L:76,M:77,N:78,O:79,P:80,R:82,S:83,TAB:9,U:85,UPARROW:38,W:87,1:49,2:50}},function(e,t,n){"use strict";n.d(t,"d",function(){return p}),n.d(t,"c",function(){return d}),n.d(t,"b",function(){return g}),n.d(t,"a",function(){return h});var i=n(8),a=n(0),r=n(19),o=n(16),s=n(2),l=n(39),c=n(20);const u=["Start","GoToCharacterPage","CharacterPage","CharacterGoToTerminalPage","TerminalIntro","TerminalHelp","TerminalLs","TerminalScan","TerminalScanAnalyze1","TerminalScanAnalyze2","TerminalConnect","TerminalAnalyze","TerminalNuke","TerminalManualHack","TerminalHackingMechanics","TerminalCreateScript","TerminalTypeScript","TerminalFree","TerminalRunScript","TerminalGoToActiveScriptsPage","ActiveScriptsPage","ActiveScriptsToTerminal","TerminalTailScript","GoToHacknetNodesPage","HacknetNodesIntroduction","HacknetNodesGoToWorldPage","WorldDescription","TutorialPageInfo","End"],p={};for(let e=0;ep.Start&&(h.currStep-=1);m()}(),!1}),Object(o.clearEventListeners)("interactive-tutorial-next").addEventListener("click",function(){return g(),!1}),m()}function m(){if(h.isRunning){var e=Object(o.clearEventListeners)("terminal-menu-link"),t=Object(o.clearEventListeners)("stats-menu-link"),n=Object(o.clearEventListeners)("active-scripts-menu-link"),a=Object(o.clearEventListeners)("hacknet-nodes-menu-link"),r=Object(o.clearEventListeners)("city-menu-link"),s=Object(o.clearEventListeners)("tutorial-menu-link");e.removeAttribute("class"),t.removeAttribute("class"),n.removeAttribute("class"),a.removeAttribute("class"),r.removeAttribute("class"),s.removeAttribute("class");var l=document.getElementById("interactive-tutorial-next");switch(h.currStep){case p.Start:i.Engine.loadTerminalContent(),y("Welcome to Bitburner, a cyberpunk-themed incremental RPG! The game takes place in a dark, dystopian future...The year is 2077...

This tutorial will show you the basics of the game. You may skip the tutorial at any time."),l.style.display="inline-block";break;case p.GoToCharacterPage:i.Engine.loadTerminalContent(),y("Let's start by heading to the Stats page. Click the 'Stats' tab on the main navigation menu (left-hand side of the screen)"),l.style.display="none",t.setAttribute("class","flashing-button"),t.addEventListener("click",function(){return i.Engine.loadCharacterContent(),g(),!1});break;case p.CharacterPage:i.Engine.loadCharacterContent(),y("The Stats page shows a lot of important information about your progress, such as your skills, money, and bonuses/multipliers. "),l.style.display="inline-block";break;case p.CharacterGoToTerminalPage:i.Engine.loadCharacterContent(),y("Let's head to your computer's terminal by clicking the 'Terminal' tab on the main navigation menu."),l.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return i.Engine.loadTerminalContent(),g(),!1});break;case p.TerminalIntro:i.Engine.loadTerminalContent(),y("The Terminal is used to interface with your home computer as well as all of the other machines around the world."),l.style.display="inline-block";break;case p.TerminalHelp:i.Engine.loadTerminalContent(),y("Let's try it out. Start by entering the 'help' command into the Terminal (Don't forget to press Enter after typing the command)"),l.style.display="none";break;case p.TerminalLs:i.Engine.loadTerminalContent(),y("The 'help' command displays a list of all available Terminal commands, how to use them, and a description of what they do.

Let's try another command. Enter the 'ls' command"),l.style.display="none";break;case p.TerminalScan:i.Engine.loadTerminalContent(),y("'ls' is a basic command that shows all of the contents (programs/scripts) on the computer. Right now, it shows that you have a program called 'NUKE.exe' on your computer. We'll get to what this does later.

Using your home computer's terminal, you can connect to other machines throughout the world. Let's do that now by first entering the 'scan' command."),l.style.display="none";break;case p.TerminalScanAnalyze1:i.Engine.loadTerminalContent(),y("The 'scan' command shows all available network connections. In other words, it displays a list of all servers that can be connected to from your current machine. A server is identified by either its IP or its hostname.

That's great and all, but there's so many servers. Which one should you go to? The 'scan-analyze' command gives some more detailed information about servers on the network. Try it now"),l.style.display="none";break;case p.TerminalScanAnalyze2:i.Engine.loadTerminalContent(),y("You just ran 'scan-analyze' with a depth of one. This command shows more detailed information about each server that you can connect to (servers that are a distance of one node away).

It is also possible to run 'scan-analyze' with a higher depth. Let's try a depth of two with the following command: 'scan-analyze 2'."),l.style.display="none";break;case p.TerminalConnect:i.Engine.loadTerminalContent(),y("Now you can see information about all servers that are up to two nodes away, as well as figure out how to navigate to those servers through the network. You can only connect to a server that is one node away. To connect to a machine, use the 'connect [ip/hostname]' command. You can type in the ip or the hostname, but dont use both.

From the results of the 'scan-analyze' command, we can see that the 'foodnstuff' server is only one node away. Let's connect so it now using: 'connect foodnstuff'"),l.style.display="none";break;case p.TerminalAnalyze:i.Engine.loadTerminalContent(),y("You are now connected to another machine! What can you do now? You can hack it!

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

Before you try to hack a server, you should run diagnostics using the 'analyze' command"),l.style.display="none";break;case p.TerminalNuke:i.Engine.loadTerminalContent(),y("When the 'analyze' command finishes running it will show useful information about hacking the server.

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

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

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

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

To create a new script or edit an existing one, you can use the 'nano' command. Scripts must end with the '.script' extension. Let's make a script now by entering 'nano foodnstuff.script' after the hack command finishes running (Sidenote: Pressing ctrl + c will end a command like hack early)"),l.style.display="none";break;case p.TerminalTypeScript:i.Engine.loadScriptEditorContent("foodnstuff.script",""),y("This is the script editor. You can use it to program your scripts. Scripts are written in the Netscript language, a programming language created for this game. There are details about the Netscript language in the documentation, which can be accessed in the 'Tutorial' tab on the main navigation menu. I highly suggest you check it out after this tutorial. For now, just copy and paste the following code into the script editor:

while(true) {
  hack('foodnstuff');
}

For anyone with basic programming experience, this code should be straightforward. This script will continuously hack the 'foodnstuff' server.

To save and close the script editor, press the button in the bottom left, or press ctrl + b."),l.style.display="none";break;case p.TerminalFree:i.Engine.loadTerminalContent(),y("Now we'll run the script. Scripts require a certain amount of RAM to run, and can be run on any machine which you have root access to. Different servers have different amounts of RAM. You can also purchase more RAM for your home server.

To check how much RAM is available on this machine, enter the 'free' command."),l.style.display="none";break;case p.TerminalRunScript:i.Engine.loadTerminalContent(),y("We have 16GB of free RAM on this machine, which is enough to run our script. Let's run our script using 'run foodnstuff.script'."),l.style.display="none";break;case p.TerminalGoToActiveScriptsPage:i.Engine.loadTerminalContent(),y("Your script is now running! The script might take a few seconds to 'fully start up'. Your scripts will continuously run in the background and will automatically stop if the code ever completes (the 'foodnstuff.script' will never complete because it runs an infinite loop).

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

Let's check out some statistics for our running scripts by clicking the 'Active Scripts' link in the main navigation menu."),l.style.display="none",n.setAttribute("class","flashing-button"),n.addEventListener("click",function(){return i.Engine.loadActiveScriptsContent(),g(),!1});break;case p.ActiveScriptsPage:i.Engine.loadActiveScriptsContent(),y("This page displays stats/information about all of your scripts that are running across every existing server. You can use this to gauge how well your scripts are doing. Let's go back to the Terminal now using the 'Terminal'link."),l.style.display="none",e.setAttribute("class","flashing-button"),e.addEventListener("click",function(){return i.Engine.loadTerminalContent(),g(),!1});break;case p.ActiveScriptsToTerminal:i.Engine.loadTerminalContent(),y("One last thing about scripts, each active script contains logs that detail what it's doing. We can check these logs using the 'tail' command. Do that now for the script we just ran by typing 'tail foodnstuff.script'"),l.style.display="none";break;case p.TerminalTailScript:i.Engine.loadTerminalContent(),y("The log for this script won't show much right now (it might show nothing at all) because it just started running...but check back again in a few minutes!

This pretty much covers the basics of hacking. To learn more about writing scripts using the Netscript language, select the 'Tutorial' link in the main navigation menu to look at the documentation. If you are an experienced JavaScript developer, I would highly suggest you check out the section on NetscriptJS/Netscript 2.0.

For now, let's move on to something else!"),l.style.display="inline-block";break;case p.GoToHacknetNodesPage:i.Engine.loadTerminalContent(),y("Hacking is not the only way to earn money. One other way to passively earn money is by purchasing and upgrading Hacknet Nodes. Let's go to the 'Hacknet Nodes' page through the main navigation menu now."),l.style.display="none",a.setAttribute("class","flashing-button"),a.addEventListener("click",function(){return i.Engine.loadHacknetNodesContent(),g(),!1});break;case p.HacknetNodesIntroduction:i.Engine.loadHacknetNodesContent(),y("From this page you can purchase new Hacknet Nodes and upgrade your existing ones. Let's purchase a new one now."),l.style.display="none";break;case p.HacknetNodesGoToWorldPage:i.Engine.loadHacknetNodesContent(),y("You just purchased a Hacknet Node! This Hacknet Node will passively earn you money over time, both online and offline. When you get enough money, you can upgrade your newly-purchased Hacknet Node below.

Let's go to the 'City' page through the main navigation menu."),l.style.display="none",r.setAttribute("class","flashing-button"),r.addEventListener("click",function(){return i.Engine.loadWorldContent(),g(),!1});break;case p.WorldDescription:i.Engine.loadWorldContent(),y("This page lists all of the different locations you can currently travel to. Each location has something that you can do. There's a lot of content out in the world, make sure you explore and discover!

Lastly, click on the 'Tutorial' link in the main navigation menu."),l.style.display="none",s.setAttribute("class","flashing-button"),s.addEventListener("click",function(){return i.Engine.loadTutorialContent(),g(),!1});break;case p.TutorialPageInfo:i.Engine.loadTutorialContent(),y("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!"),l.style.display="inline-block",l.innerHTML="Finish Tutorial";break;case p.End:_();break;default:throw new Error("Invalid tutorial step")}!0===h.stepIsDone[h.currStep]&&(l.style.display="inline-block")}else console.log("Interactive Tutorial not running")}function g(){h.currStep===p.GoToCharacterPage&&document.getElementById("stats-menu-link").removeAttribute("class"),h.currStep===p.CharacterGoToTerminalPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),h.currStep===p.TerminalGoToActiveScriptsPage&&document.getElementById("active-scripts-menu-link").removeAttribute("class"),h.currStep===p.ActiveScriptsPage&&document.getElementById("terminal-menu-link").removeAttribute("class"),h.currStep===p.GoToHacknetNodesPage&&document.getElementById("hacknet-nodes-menu-link").removeAttribute("class"),h.currStep===p.HacknetNodesGoToWorldPage&&document.getElementById("city-menu-link").removeAttribute("class"),h.currStep===p.WorldDescription&&document.getElementById("tutorial-menu-link").removeAttribute("class"),h.stepIsDone[h.currStep]=!0,h.currStep
Getting Started GuideWikiDocumentation

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

cat hackers-starting-handbook.lit"}),n=Object(s.createElement)("a",{class:"a-link-button",float:"right",padding:"6px",innerText:"Got it!",clickListener:()=>{Object(c.removeElementById)(e)}});Object(l.createPopup)(e,[t,n]),a.a.getHomeComputer().messages.push("hackers-starting-handbook.lit")}function y(e){var t=document.getElementById("interactive-tutorial-text");if(null==t)throw new Error("Could not find text box");t.innerHTML=e,t.parentElement.scrollTop=0}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SoftwareCompanyPositions=["Software Engineering Intern","Junior Software Engineer","Senior Software Engineer","Lead Software Developer","Head of Software","Head of Engineering","Vice President of Technology","Chief Technology Officer"],t.ITCompanyPositions=["IT Intern","IT Analyst","IT Manager","Systems Administrator"],t.SecurityEngineerCompanyPositions=["Security Engineer"],t.NetworkEngineerCompanyPositions=["Network Engineer","Network Administrator"],t.BusinessCompanyPositions=["Business Intern","Business Analyst","Business Manager","Operations Manager","Chief Financial Officer","Chief Executive Officer"],t.SecurityCompanyPositions=["Police Officer","Police Chief","Security Guard","Security Officer","Security Supervisor","Head of Security"],t.AgentCompanyPositions=["Field Agent","Secret Agent","Special Operative"],t.MiscCompanyPositions=["Waiter","Employee"],t.SoftwareConsultantCompanyPositions=["Software Consultant","Senior Software Consultant"],t.BusinessConsultantCompanyPositions=["Business Consultant","Senior Business Consultant"],t.PartTimeCompanyPositions=["Part-time Waiter","Part-time Employee"]},function(e,t,n){"use strict";n.d(t,"b",function(){return l}),n.d(t,"c",function(){return c}),n.d(t,"a",function(){return s});var i=n(1),a=n(0),r=n(9);function o(e,t,n,i,a,r,o){this.name=e,this.type=t,this.time=n,this.money=i,this.difficulty=a,this.karma=r,this.hacking_success_weight=o.hacking_success_weight?o.hacking_success_weight:0,this.strength_success_weight=o.strength_success_weight?o.strength_success_weight:0,this.defense_success_weight=o.defense_success_weight?o.defense_success_weight:0,this.dexterity_success_weight=o.dexterity_success_weight?o.dexterity_success_weight:0,this.agility_success_weight=o.agility_success_weight?o.agility_success_weight:0,this.charisma_success_weight=o.charisma_success_weight?o.charisma_success_weight:0,this.hacking_exp=o.hacking_exp?o.hacking_exp:0,this.strength_exp=o.strength_exp?o.strength_exp:0,this.defense_exp=o.defense_exp?o.defense_exp:0,this.dexterity_exp=o.dexterity_exp?o.dexterity_exp:0,this.agility_exp=o.agility_exp?o.agility_exp:0,this.charisma_exp=o.charisma_exp?o.charisma_exp:0,this.intelligence_exp=o.intelligence_exp?o.intelligence_exp:0,this.kills=o.kills?o.kills:0}o.prototype.commit=function(e=1,t=null){return e<=0&&(e=1),a.a.crimeType=this.type,a.a.startCrime(this.hacking_exp/e,this.strength_exp/e,this.defense_exp/e,this.dexterity_exp/e,this.agility_exp/e,this.charisma_exp/e,this.money/e,this.time,t),this.time},o.prototype.successRate=function(){var e=this.hacking_success_weight*a.a.hacking_skill+this.strength_success_weight*a.a.strength+this.defense_success_weight*a.a.defense+this.dexterity_success_weight*a.a.dexterity+this.agility_success_weight*a.a.agility+this.charisma_success_weight*a.a.charisma+i.CONSTANTS.IntelligenceCrimeWeight*a.a.intelligence;return e/=i.CONSTANTS.MaxSkillLevel,e/=this.difficulty,e*=a.a.crime_success_mult,Math.min(e,1)};const s={Shoplift:new o("Shoplift",i.CONSTANTS.CrimeShoplift,2e3,15e3,.05,.1,{dexterity_success_weight:1,agility_success_weight:1,dexterity_exp:2,agility_exp:2}),RobStore:new o("Rob Store",i.CONSTANTS.CrimeRobStore,6e4,4e5,.2,.5,{hacking_exp:30,dexterity_exp:45,agility_exp:45,hacking_success_weight:.5,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:.25*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),Mug:new o("Mug",i.CONSTANTS.CrimeMug,4e3,36e3,.2,.25,{strength_exp:3,defense_exp:3,dexterity_exp:3,agility_exp:3,strength_success_weight:1.5,defense_success_weight:.5,dexterity_success_weight:1.5,agility_success_weight:.5}),Larceny:new o("Larceny",i.CONSTANTS.CrimeLarceny,9e4,8e5,1/3,1.5,{hacking_exp:45,dexterity_exp:60,agility_exp:60,hacking_success_weight:.5,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:.5*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),DealDrugs:new o("Deal Drugs",i.CONSTANTS.CrimeDrugs,1e4,12e4,1,.5,{dexterity_exp:5,agility_exp:5,charisma_exp:10,charisma_success_weight:3,dexterity_success_weight:2,agility_success_weight:1}),BondForgery:new o("Bond Forgery",i.CONSTANTS.CrimeBondForgery,3e5,45e5,.5,.1,{hacking_exp:100,dexterity_exp:150,charisma_exp:15,hacking_success_weight:.05,dexterity_success_weight:1.25,intelligence_exp:2*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),TraffickArms:new o("Traffick Arms",i.CONSTANTS.CrimeTraffickArms,4e4,6e5,2,1,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:20,charisma_exp:40,charisma_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1}),Homicide:new o("Homicide",i.CONSTANTS.CrimeHomicide,3e3,45e3,1,3,{strength_exp:2,defense_exp:2,dexterity_exp:2,agility_exp:2,strength_success_weight:2,defense_success_weight:2,dexterity_success_weight:.5,agility_success_weight:.5,kills:1}),GrandTheftAuto:new o("Grand Theft Auto",i.CONSTANTS.CrimeGrandTheftAuto,8e4,16e5,8,5,{strength_exp:20,defense_exp:20,dexterity_exp:20,agility_exp:80,charisma_exp:40,hacking_success_weight:1,strength_success_weight:1,dexterity_success_weight:4,agility_success_weight:2,charisma_success_weight:2,intelligence_exp:i.CONSTANTS.IntelligenceCrimeBaseExpGain}),Kidnap:new o("Kidnap",i.CONSTANTS.CrimeKidnap,12e4,36e5,5,6,{strength_exp:80,defense_exp:80,dexterity_exp:80,agility_exp:80,charisma_exp:80,charisma_success_weight:1,strength_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,intelligence_exp:2*i.CONSTANTS.IntelligenceCrimeBaseExpGain}),Assassination:new o("Assassination",i.CONSTANTS.CrimeAssassination,3e5,12e6,8,10,{strength_exp:300,defense_exp:300,dexterity_exp:300,agility_exp:300,strength_success_weight:1,dexterity_success_weight:2,agility_success_weight:1,intelligence_exp:5*i.CONSTANTS.IntelligenceCrimeBaseExpGain,kills:1}),Heist:new o("Heist",i.CONSTANTS.CrimeHeist,6e5,12e7,18,15,{hacking_exp:450,strength_exp:450,defense_exp:450,dexterity_exp:450,agility_exp:450,charisma_exp:450,hacking_success_weight:1,strength_success_weight:1,defense_success_weight:1,dexterity_success_weight:1,agility_success_weight:1,charisma_success_weight:1,intelligence_exp:10*i.CONSTANTS.IntelligenceCrimeBaseExpGain})};function l(e,t){var n=0,i=!1;for(const t in s){const a=s[t];if(a.type==e){n=a.successRate(),i=!0;break}}return i?Math.random()<=n&&(a.a.gainMoney(t),!0):(console.log(crime),void Object(r.dialogBoxCreate)("ERR: Unrecognized crime type. This is probably a bug please contact the developer"))}function c(e){return e.includes("shoplift")?s.Shoplift:e.includes("rob")&&e.includes("store")?s.RobStore:e.includes("mug")?s.Mug:e.includes("larceny")?s.Larceny:e.includes("drugs")?s.DealDrugs:e.includes("bond")&&e.includes("forge")?s.BondForgery:e.includes("traffick")&&e.includes("arms")?s.TraffickArms:e.includes("homicide")?s.Homicide:e.includes("grand")&&e.includes("auto")?s.GrandTheftAuto:e.includes("kidnap")?s.Kidnap:e.includes("assassinate")?s.Assassination:e.includes("heist")?s.Heist:null}},function(e,t,n){"use strict";n.d(t,"b",function(){return o}),n.d(t,"a",function(){return s});var i=n(0),a=n(47),r=n(6);function o(e,t){return`gang.${e}() failed with exception: `+t}function s(e,t){const n=`gang.${t}() failed because you do not currently have a Gang`;if(!(i.a.gang instanceof a.b))throw Object(r.d)(e,n)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isString=function(e){return"string"==typeof e||e instanceof String}},function(e,t,n){"use strict";n.d(t,"b",function(){return y}),n.d(t,"c",function(){return g}),n.d(t,"f",function(){return m}),n.d(t,"e",function(){return f}),n.d(t,"d",function(){return v}),n.d(t,"a",function(){return h});var i=n(21),a=n(23),r=n(52),o=n(0),s=n(53),l=n(11),c=n(19),u=n(9),p=n(14);function h(e="",t=""){this.filename=e,this.msg=t,this.recvd=!1}function d(e,t=!1){console.log("sending message: "+e.filename),e.recvd=!0,!t&&c.Settings.SuppressMessages||m(e),function(e,t){var n=Object(l.c)(t);if(null==n)return void console.log("WARNING: Did not locate "+t);for(var i=0;i

This message was saved as "+e.filename+" onto your home computer.";Object(u.dialogBoxCreate)(t)}function g(){var e=y[b.Jumper0],t=y[b.Jumper1],n=y[b.Jumper2],l=y[b.Jumper3],c=y[b.Jumper4],p=y[b.CyberSecTest],h=y[b.NiteSecTest],m=y[b.BitRunnersTest],g=y[b.RedPill],_=!1;i.c[i.b.TheRedPill].owned&&(_=!0),g&&_&&0===o.a.sourceFiles.length&&!s.b&&!r.c?u.dialogBoxOpened||d(g,!0):g&&_?s.b||r.c||u.dialogBoxOpened||d(g):e&&!e.recvd&&o.a.hacking_skill>=25?(d(e),o.a.getHomeComputer().programs.push(a.a.Flight.name)):t&&!t.recvd&&o.a.hacking_skill>=40?d(t):p&&!p.recvd&&o.a.hacking_skill>=50?d(p):n&&!n.recvd&&o.a.hacking_skill>=175?d(n):h&&!h.recvd&&o.a.hacking_skill>=200?d(h):l&&!l.recvd&&o.a.hacking_skill>=350?d(l):c&&!c.recvd&&o.a.hacking_skill>=490?d(c):m&&!m.recvd&&o.a.hacking_skill>=500&&d(m)}function _(e){y[e.filename]=e}h.prototype.toJSON=function(){return Object(p.Generic_toJSON)("Message",this)},h.fromJSON=function(e){return Object(p.Generic_fromJSON)(h,e.data)},p.Reviver.constructors.Message=h;let y={};function f(e){y=JSON.parse(e,p.Reviver)}let b={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 v(){y={},_(new h(b.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")),_(new h(b.Jumper1,"Soon you will be contacted by a hacking group known as CyberSec. They can help you with your search.

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

-jump3R")),_(new h(b.Jumper2,"Do not try to save the world. There is no world to save. If you want to find the truth, worry only about yourself. Ethics and morals will get you killed.

Watch out for a hacking group known as NiteSec.

-jump3R")),_(new h(b.Jumper3,"You must learn to walk before you can run. And you must run before you can fly. Look for the black hand.

I.I.I.I

-jump3R")),_(new h(b.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")),_(new h(b.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 hack our server using the Terminal.

-CyberSec")),_(new h(b.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 hack our hidden server using the Terminal. Then, we will contact you again.

-NiteSec")),_(new h(b.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")),_(new h(b.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(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});const i=n(2),a=n(50);t.createPopup=function(e,t){const n=i.createElement("div",{class:"popup-box-container",display:"flex",id:e}),r=i.createElement("div",{class:"popup-box-content",id:`${e}-content`});for(const e of t)r.appendChild(e);return n.appendChild(r),a.getElementById("entire-game-container").appendChild(n),n}},function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))(function(a,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function s(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){e.done?a(e.value):new n(function(t){t(e.value)}).then(o,s)}l((i=i.apply(e,t||[])).next())})};Object.defineProperty(t,"__esModule",{value:!0});const a=n(14),r=n(2),o=n(39),s=n(20),l=n(182);class c{constructor(e,t,n,i,a,r){this.name=e,this.desc=t,this.generate=n,this.solver=i,this.difficulty=a,this.numTries=r}}t.CodingContractType=c,t.CodingContractTypes={};for(const e of l.codingContractTypesMetadata)t.CodingContractTypes[e.name]=new c(e.name,e.desc,e.gen,e.solver,e.difficulty,e.numTries);var u;console.info(`${Object.keys(t.CodingContractTypes).length} Coding Contract Types loaded`),function(e){e[e.FactionReputation=0]="FactionReputation",e[e.FactionReputationAll=1]="FactionReputationAll",e[e.CompanyReputation=2]="CompanyReputation",e[e.Money=3]="Money"}(t.CodingContractRewardType||(t.CodingContractRewardType={})),function(e){e[e.Success=0]="Success",e[e.Failure=1]="Failure",e[e.Cancelled=2]="Cancelled"}(u=t.CodingContractResult||(t.CodingContractResult={}));class p{constructor(e="",n="Find Largest Prime Factor",i=null){if(this.tries=0,this.fn=e,this.fn.endsWith(".cct")||(this.fn+=".cct"),null==t.CodingContractTypes[n])throw new Error(`Error: invalid contract type: ${n} please contact developer`);this.type=n,this.data=t.CodingContractTypes[n].generate(),this.reward=i}static fromJSON(e){return a.Generic_fromJSON(p,e.data)}getData(){return this.data}getDescription(){return t.CodingContractTypes[this.type].desc(this.data)}getDifficulty(){return t.CodingContractTypes[this.type].difficulty}getMaxNumTries(){return t.CodingContractTypes[this.type].numTries}getType(){return t.CodingContractTypes[this.type].name}isSolution(e){return t.CodingContractTypes[this.type].solver(this.data,e)}prompt(){return i(this,void 0,void 0,function*(){return new Promise((e,n)=>{const i=t.CodingContractTypes[this.type],a=`coding-contract-prompt-popup-${this.fn}`,l=r.createElement("p",{innerText:["You are attempting to solve a Coding Contract. You have",`${this.getMaxNumTries()-this.tries} tries remaining,`,"after which the contract will self-destruct.\n\n",`${i.desc(this.data)}`].join(" ")});let c,p;c=r.createElement("input",{onkeydown:e=>{13===e.keyCode&&""!==c.value&&(e.preventDefault(),p.click())},placeholder:"Enter Solution here"}),p=r.createElement("a",{class:"a-link-button",clickListener:()=>{const t=c.value;this.isSolution(t)?e(u.Success):e(u.Failure),s.removeElementById(a)},innerText:"Solve"});const h=r.createElement("a",{class:"a-link-button",clickListener:()=>{e(u.Cancelled),s.removeElementById(a)},innerText:"Cancel"}),d=r.createElement("br");o.createPopup(a,[l,d,d,c,p,h]),c.focus()})})}toJSON(){return a.Generic_toJSON("CodingContract",this)}}t.CodingContract=p,a.Reviver.constructors.CodingContract=p},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return ee}),n.d(t,"g",function(){return Z}),n.d(t,"d",function(){return V}),n.d(t,"f",function(){return z}),n.d(t,"h",function(){return X}),n.d(t,"e",function(){return G}),n.d(t,"b",function(){return q}),n.d(t,"c",function(){return $});var i=n(62),a=n(21),r=n(10),o=n(35),s=n(29),l=n(69),c=n(18),u=n(79),p=n(26),h=n(1),d=n(23),m=n(74),g=n(46),_=n(47),y=n(12),f=n(61),b=n(5),v=n(38),E=n(52),k=n(0),O=n(28),C=n(11),T=(n(19),n(30)),S=(n(25),n(22)),w=n(7),M=n(58),P=n(49),R=n(36),A=n(24),x=n(6),N=n(66),I=(n(31),n(13)),L=(n(9),n(123)),B=n(51),D=n(55),j=n(3),W=n(37),F=n(17),U=n(134).sprintf,H=n(134).vsprintf,G=!1,K=!1,q=!1,$=!1,Y=!1,z=!1,V=!1,J=1,X=1,Q={ALL:!0,scan:!0,hack:!0,sleep:!0,disableLog:!0,enableLog:!0,grow:!0,weaken:!0,nuke:!0,brutessh:!0,ftpcrack:!0,relaysmtp:!0,httpworm:!0,sqlinject:!0,run:!0,exec:!0,spawn:!0,kill:!0,killall:!0,scp:!0,getHackingLevel:!0,getServerMoneyAvailable:!0,getServerSecurityLevel:!0,getServerBaseSecurityLevel:!0,getServerMinSecurityLevel:!0,getServerRequiredHackingLevel:!0,getServerMaxMoney:!0,getServerGrowth:!0,getServerNumPortsRequired:!0,getServerRam:!0,buyStock:!0,sellStock:!0,shortStock:!0,sellShort:!0,purchase4SMarketData:!0,purchase4SMarketDataTixApi:!0,purchaseServer:!0,deleteServer:!0,universityCourse:!0,gymWorkout:!0,travelToCity:!0,purchaseTor:!0,purchaseProgram:!0,stopAction:!0,upgradeHomeRam:!0,workForCompany:!0,applyToCompany:!0,joinFaction:!0,workForFaction:!0,donateToFaction:!0,createProgram:!0,commitCrime:!0,startAction:!0,upgradeSkill:!0,setTeamSize:!0,joinBladeburnerFaction:!0,recruitMember:!0,setMemberTask:!0,purchaseEquipment:!0,setTerritoryWarfare:!0};function Z(){for(var e=0;e1.01*t.ramUsage)throw Object(x.d)(t,"Dynamic RAM usage calculated to be greater than initial RAM usage on fn: "+e+". This is probably because you somehow circumvented the static RAM calculation.

Please don't do that :(

Dynamic RAM Usage: "+t.dynamicRamUsage+"
Static RAM Usage: "+t.ramUsage)},G=function(e,n){return t.loadedFns[e]?0:(t.loadedFns[e]=!0,n)},$=function(e,n=""){var i=Object(C.e)(e);if(null==i)throw Object(x.d)(t,`Invalid IP or hostname passed into ${n}() function`);return i},V=function(e){if(isNaN(e))throw Object(x.d)(t,"Invalid index specified for Hacknet Node: "+e);if(e<0||e>=k.a.hacknetNodes.length)throw Object(x.d)(t,"Index specified for Hacknet Node is out-of-bounds: "+e);return k.a.hacknetNodes[e]},Z=function(e,t){return $(t,"getCodingContract").getContract(e)};const te=e=>{const t=Math.round(e);if(isNaN(t)||!Object(L.isPowerOfTwo)(t))throw Error("failed due to invalid ram argument. Must be numeric and a power of 2");if(t>h.CONSTANTS.PurchasedServerMaxRam)throw Error("failed because specified RAM was too high. Maximum RAM on a purchased server is "+h.CONSTANTS.PurchasedServerMaxRam+"GB");return t*h.CONSTANTS.BaseCostFor1GBOfRamServer};return{hacknet:{numNodes:function(){return k.a.hacknetNodes.length},purchaseNode:function(){return Object(f.e)()},getPurchaseNodeCost:function(){return Object(f.c)()},getNodeStats:function(e){var t=V(e);return{name:t.name,level:t.level,ram:t.ram,cores:t.cores,production:t.moneyGainRatePerSecond,timeOnline:t.onlineTimeSeconds,totalProduction:t.totalMoneyGenerated}},upgradeLevel:function(e,t){return V(e).purchaseLevelUpgrade(t)},upgradeRam:function(e,t){return V(e).purchaseRamUpgrade(t)},upgradeCore:function(e,t){return V(e).purchaseCoreUpgrade(t)},getLevelUpgradeCost:function(e,t){return V(e).calculateLevelUpgradeCost(t)},getRamUpgradeCost:function(e,t){return V(e).calculateRamUpgradeCost(t)},getCoreUpgradeCost:function(e,t){return V(e).calculateCoreUpgradeCost(t)}},sprintf:U,vsprintf:H,scan:function(e=t.serverIp,i=!0){if(t.checkingRam)return G("scan",h.CONSTANTS.ScriptScanRamCost);n("scan",h.CONSTANTS.ScriptScanRamCost);var a=Object(C.e)(e);if(null==a)throw Object(x.d)(t,"Invalid IP or hostname passed into scan() command");for(var r=[],o=0;ok.a.hacking_skill)throw t.scriptRef.log("Cannot hack this server ("+a.hostname+") because user's hacking skill is not high enough"),Object(x.d)(t,"Cannot hack this server ("+a.hostname+") because user's hacking skill is not high enough");return null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Attempting to hack "+e+" in "+r.toFixed(3)+" seconds (t="+i+")"),Object(x.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);var e=Object(g.b)(a),n=Math.random(),r=Object(g.c)(a)*i,o=r/4;if(na.moneyAvailable&&(s=a.moneyAvailable),a.moneyAvailable-=s,a.moneyAvailable<0&&(a.moneyAvailable=0),k.a.gainMoney(s),t.scriptRef.onlineMoneyMade+=s,k.a.scriptProdSinceLastAug+=s,t.scriptRef.recordHack(a.ip,s,i),k.a.gainHackingExp(r),t.scriptRef.onlineExpGained+=r,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script SUCCESSFULLY hacked "+a.hostname+" for $"+Object(j.formatNumber)(s,2)+" and "+Object(j.formatNumber)(r,4)+" exp (t="+i+")"),a.fortify(h.CONSTANTS.ServerFortifyAmount*Math.min(i,n)),Promise.resolve(s)}return k.a.gainHackingExp(o),t.scriptRef.onlineExpGained+=o,null==t.disableLogs.ALL&&null==t.disableLogs.hack&&t.scriptRef.log("Script FAILED to hack "+a.hostname+". Gained "+Object(j.formatNumber)(o,4)+" exp (t="+i+")"),Promise.resolve(0)})},sleep:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(x.d)(t,"sleep() call has incorrect number of arguments. Takes 1 argument");return null==t.disableLogs.ALL&&null==t.disableLogs.sleep&&t.scriptRef.log("Sleeping for "+e+" milliseconds"),Object(x.e)(e,t).then(function(){return Promise.resolve(!0)})},grow:function(e){if(t.checkingRam)return G("grow",h.CONSTANTS.ScriptGrowRamCost);n("grow",h.CONSTANTS.ScriptGrowRamCost);var i=t.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===e)throw Object(x.d)(t,"grow() call has incorrect number of arguments. Takes 1 argument");var a=Object(C.e)(e);if(null==a)throw t.scriptRef.log("Cannot grow(). Invalid IP or hostname passed in: "+e),Object(x.d)(t,"Cannot grow(). Invalid IP or hostname passed in: "+e);if(0==a.hasAdminRights)throw t.scriptRef.log("Cannot grow this server ("+a.hostname+") because user does not have root access"),Object(x.d)(t,"Cannot grow this server ("+a.hostname+") because user does not have root access");var r=Object(g.a)(a);return null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Executing grow() on server "+a.hostname+" in "+Object(j.formatNumber)(r,3)+" seconds (t="+i+")"),Object(x.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);const e=a.moneyAvailable<=0?1:a.moneyAvailable;a.moneyAvailable+=1*i;var n=Object(C.k)(a,450*i);const r=a.moneyAvailable;t.scriptRef.recordGrow(a.ip,i);var o=Object(g.c)(a)*i;return 1==n&&(o=0),null==t.disableLogs.ALL&&null==t.disableLogs.grow&&t.scriptRef.log("Available money on "+a.hostname+" grown by "+Object(j.formatNumber)(r/e*100-100,6)+"%. Gained "+Object(j.formatNumber)(o,4)+" hacking exp (t="+i+")"),t.scriptRef.onlineExpGained+=o,k.a.gainHackingExp(o),Promise.resolve(r/e)})},growthAnalyze:function(e,i){if(t.checkingRam)return G("growthAnalyze",h.CONSTANTS.ScriptGrowthAnalyzeRamCost);n("growthAnalyze",h.CONSTANTS.ScriptGrowthAnalyzeRamCost);const a=$(e,"growthAnalyze");if(isNaN(i))throw Object(x.d)(t,`Invalid growth argument passed into growthAnalyze: ${i}. Must be numeric`);return Object(C.h)(a,Number(i))},weaken:function(e){if(t.checkingRam)return G("weaken",h.CONSTANTS.ScriptWeakenRamCost);n("weaken",h.CONSTANTS.ScriptWeakenRamCost);var i=t.scriptRef.threads;if((isNaN(i)||i<1)&&(i=1),void 0===e)throw Object(x.d)(t,"weaken() call has incorrect number of arguments. Takes 1 argument");var a=Object(C.e)(e);if(null==a)throw t.scriptRef.log("Cannot weaken(). Invalid IP or hostname passed in: "+e),Object(x.d)(t,"Cannot weaken(). Invalid IP or hostname passed in: "+e);if(0==a.hasAdminRights)throw t.scriptRef.log("Cannot weaken this server ("+a.hostname+") because user does not have root access"),Object(x.d)(t,"Cannot weaken this server ("+a.hostname+") because user does not have root access");var r=Object(g.f)(a);return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Executing weaken() on server "+a.hostname+" in "+Object(j.formatNumber)(r,3)+" seconds (t="+i+")"),Object(x.e)(1e3*r,t).then(function(){if(t.env.stopFlag)return Promise.reject(t);a.weaken(h.CONSTANTS.ServerWeakenAmount*i),t.scriptRef.recordWeaken(a.ip,i);var e=Object(g.c)(a)*i;return null==t.disableLogs.ALL&&null==t.disableLogs.weaken&&t.scriptRef.log("Server security level on "+a.hostname+" weakened to "+a.hackDifficulty+". Gained "+Object(j.formatNumber)(e,4)+" hacking exp (t="+i+")"),t.scriptRef.onlineExpGained+=e,k.a.gainHackingExp(e),Promise.resolve(h.CONSTANTS.ServerWeakenAmount*i)})},print:function(e){if(t.checkingRam)return 0;if(void 0===e)throw Object(x.d)(t,"print() call has incorrect number of arguments. Takes 1 argument");t.scriptRef.log(e.toString())},tprint:function(e){if(t.checkingRam)return 0;if(void 0===e||null==e)throw Object(x.d)(t,"tprint() call has incorrect number of arguments. Takes 1 argument");e.toString();Object(w.post)(t.scriptRef.filename+": "+e.toString())},clearLog:function(){if(t.checkingRam)return 0;t.scriptRef.clearLog()},disableLog:function(e){if(t.checkingRam)return 0;if(void 0===Q[e])throw Object(x.d)(t,"Invalid argument to disableLog: "+e);t.disableLogs[e]=!0,null==t.disableLogs.ALL&&null==t.disableLogs.disableLog&&t.scriptRef.log("Disabled logging for "+e)},enableLog:function(e){if(t.checkingRam)return 0;if(void 0===Q[e])throw Object(x.d)(t,"Invalid argument to enableLog: "+e);delete t.disableLogs[e],null==t.disableLogs.ALL&&null==t.disableLogs.enableLog&&t.scriptRef.log("Enabled logging for "+e)},isLogEnabled:function(e){if(t.checkingRam)return 0;if(void 0===Q[e])throw Object(x.d)(t,"Invalid argument to isLogEnabled: "+e);return!t.disableLogs[e]},getScriptLogs:function(e,n){if(t.checkingRam)return 0;if(null!=e&&"string"==typeof e){null==n&&(n=t.serverIp);const i=Object(C.e)(n);if(null==i)throw t.log(`getScriptLogs() failed. Invalid IP or hostname passed in: ${n}`),Object(x.d)(t,`getScriptLogs() failed. Invalid IP or hostname passed in: ${n}`);let a=[];for(let e=2;e{if(void 0===e)throw Object(x.d)(t,"spawn() call has incorrect number of arguments. Usage: spawn(scriptname, numThreads, [arg1], [arg2]...)");if(isNaN(i)||i<1)throw Object(x.d)(t,"Invalid argument for thread count passed into run(). Must be numeric and greater than 0");for(var n=[],a=2;a0,r=i.runningScripts.length-1;r>=0;--r)Object(A.d)(i.runningScripts[r],i.ip);return null==t.disableLogs.ALL&&null==t.disableLogs.killall&&t.scriptRef.log("killall(): Killing all scripts on "+i.hostname+". May take a few minutes for the scripts to die"),a},exit:function(){if(t.checkingRam)return 0;var e=Object(C.e)(t.serverIp);if(null==e)throw Object(x.d)(t,"Error getting Server for this script in exit(). This is a bug please contact game dev");Object(A.d)(t.scriptRef,e.ip)?t.scriptRef.log("Exiting..."):t.scriptRef.log("Exit failed(). This is a bug please contact game developer")},scp:function(e,i,a){if(t.checkingRam)return G("scp",h.CONSTANTS.ScriptScpRamCost);if(n("scp",h.CONSTANTS.ScriptScpRamCost),2!==arguments.length&&3!==arguments.length)throw Object(x.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(e&&e.constructor===Array){var r=!1;return e.forEach(function(e){ee(t).scp(e,i,a)&&(r=!0)}),r}if(!e.endsWith(".lit")&&!Object(O.e)(e)&&!e.endsWith("txt"))throw Object(x.d)(t,"ERROR: scp() does not work with this file type. It only works for .script, .lit, and .txt files");var o,s;if(null!=a){if(void 0===e||void 0===i||void 0===a)throw Object(x.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(C.e)(a)))throw Object(x.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${a}`);if(null==(s=Object(C.e)(i)))throw Object(x.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${i}`)}else{if(null==i)throw Object(x.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(void 0===e||void 0===i)throw Object(x.d)(t,"ERROR: scp() call has incorrect number of arguments. Takes 2 or 3 arguments");if(null==(o=Object(C.e)(i)))throw Object(x.d)(t,`ERROR: Invalid hostname/ip passed into scp() command: ${i}`);if(null==(s=Object(C.e)(t.serverIp)))throw Object(x.d)(t,"Could not find server ip for this script. This is a bug please contact game developer")}if(e.endsWith(".lit")){for(var l=!1,c=0;c=2&&(r=i.toString());for(var o=[],s=0;sa.playerShares&&(i=a.playerShares),0===i)return 0;var r=a.price*i-h.CONSTANTS.StockMarketCommission;k.a.gainMoney(r);var o=(a.price-a.playerAvgPx)*i-h.CONSTANTS.StockMarketCommission;return isNaN(o)&&(o=0),t.scriptRef.onlineMoneyMade+=o,k.a.scriptProdSinceLastAug+=o,a.playerShares-=i,0==a.playerShares&&(a.playerAvgPx=0),I.routing.isOn(I.Page.StockMarket)&&Object(S.r)(a),null==t.disableLogs.ALL&&null==t.disableLogs.sellStock&&t.scriptRef.log("Sold "+Object(j.formatNumber)(i,0)+" shares of "+a.symbol+" at $"+Object(j.formatNumber)(a.price,2)+" per share. Gained $"+Object(j.formatNumber)(r,2)),a.price},shortStock(e,i){if(t.checkingRam)return G("shortStock",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("shortStock",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.hasTixApiAccess)throw Object(x.d)(t,"You don't have TIX API Access! Cannot use shortStock()");if(8!==k.a.bitNodeN&&!(z&&X>=2))throw Object(x.d)(t,"ERROR: Cannot use shortStock(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var a=S.e[e];if(null==a)throw Object(x.d)(t,"ERROR: Invalid stock symbol passed into shortStock()");return Object(S.p)(a,i,t)?a.price:0},sellShort(e,i){if(t.checkingRam)return G("sellShort",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("sellShort",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.hasTixApiAccess)throw Object(x.d)(t,"You don't have TIX API Access! Cannot use sellShort()");if(8!==k.a.bitNodeN&&!(z&&X>=2))throw Object(x.d)(t,"ERROR: Cannot use sellShort(). You must either be in BitNode-8 or you must have Level 2 of Source-File 8");var a=S.e[e];if(null==a)throw Object(x.d)(t,"ERROR: Invalid stock symbol passed into sellShort()");return Object(S.n)(a,i,t)?a.price:0},placeOrder(e,i,a,r,o){if(t.checkingRam)return G("placeOrder",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("placeOrder",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.hasTixApiAccess)throw Object(x.d)(t,"You don't have TIX API Access! Cannot use placeOrder()");if(8!==k.a.bitNodeN&&!(z&&X>=3))throw Object(x.d)(t,"ERROR: Cannot use placeOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var s,l,c=S.e[e];if(null==c)throw Object(x.d)(t,"ERROR: Invalid stock symbol passed into placeOrder()");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=S.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=S.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=S.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(x.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=S.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=S.b.Long;else{if(!o.includes("s"))throw Object(x.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=S.b.Short}return Object(S.l)(c,i,a,s,l,t)},cancelOrder(e,i,a,r,o){if(t.checkingRam)return G("cancelOrder",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("cancelOrder",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.hasTixApiAccess)throw Object(x.d)(t,"You don't have TIX API Access! Cannot use cancelOrder()");if(8!==k.a.bitNodeN&&!(z&&X>=3))throw Object(x.d)(t,"ERROR: Cannot use cancelOrder(). You must either be in BitNode-8 or have Level 3 of Source-File 8");var s,l,c=S.e[e];if(null==c)throw Object(x.d)(t,"ERROR: Invalid stock symbol passed into cancelOrder()");if(isNaN(i)||isNaN(a))throw Object(x.d)(t,"ERROR: Invalid shares or price argument passed into cancelOrder(). Must be numeric");if((r=r.toLowerCase()).includes("limit")&&r.includes("buy"))s=S.a.LimitBuy;else if(r.includes("limit")&&r.includes("sell"))s=S.a.LimitSell;else if(r.includes("stop")&&r.includes("buy"))s=S.a.StopBuy;else{if(!r.includes("stop")||!r.includes("sell"))throw Object(x.d)(t,"ERROR: Invalid Order Type passed into placeOrder()");s=S.a.StopSell}if((o=o.toLowerCase()).includes("l"))l=S.b.Long;else{if(!o.includes("s"))throw Object(x.d)(t,"ERROR: Invalid Position Type passed into placeOrder()");l=S.b.Short}var u={stock:c,shares:i,price:a,type:s,pos:l};return Object(S.f)(u,t)},getStockVolatility:function(e){if(t.checkingRam)return G("getStockVolatility",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("getStockVolatility",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.has4SDataTixApi)throw Object(x.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockVolatility()");var i=S.e[e];if(null==i)throw Object(x.d)(t,"ERROR: Invalid stock symbol passed into getStockVolatility()");return i.mv/100},getStockForecast:function(e){if(t.checkingRam)return G("getStockForecast",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("getStockForecast",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.has4SDataTixApi)throw Object(x.d)(t,"You don't have 4S Market Data TIX API Access! Cannot use getStockForecast()");var i=S.e[e];if(null==i)throw Object(x.d)(t,"ERROR: Invalid stock symbol passed into getStockForecast()");var a=50;return i.b?a+=i.otlkMag:a-=i.otlkMag,a/100},purchase4SMarketData:function(){if(t.checkingRam)return G("purchase4SMarketData",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("purchase4SMarketData",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.hasTixApiAccess)throw Object(x.d)(t,"You don't have TIX API Access! Cannot use purchase4SMarketData()");return k.a.has4SData?(t.shouldLog("purchase4SMarketData")&&t.log("Already purchased 4S Market Data"),!0):k.a.money.lt(h.CONSTANTS.MarketData4SCost)?(t.shouldLog("purchase4SMarketData")&&t.log("Failed to purchase 4S Market Data - Not enough money"),!1):(k.a.has4SData=!0,k.a.loseMoney(h.CONSTANTS.MarketData4SCost),t.shouldLog("purchase4SMarketData")&&t.log("Purchased 4S Market Data"),!0)},purchase4SMarketDataTixApi:function(){if(t.checkingRam)return G("purchase4SMarketDataTixApi",h.CONSTANTS.ScriptBuySellStockRamCost);if(n("purchase4SMarketDataTixApi",h.CONSTANTS.ScriptBuySellStockRamCost),!k.a.hasTixApiAccess)throw Object(x.d)(t,"You don't have TIX API Access! Cannot use purchase4SMarketDataTixApi()");return k.a.has4SDataTixApi?(t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Already purchased 4S Market Data TIX API"),!0):k.a.money.lt(h.CONSTANTS.MarketDataTixApi4SCost)?(t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Failed to purchase 4S Market Data TIX API - Not enough money"),!1):(k.a.has4SDataTixApi=!0,k.a.loseMoney(h.CONSTANTS.MarketDataTixApi4SCost),t.shouldLog("purchase4SMarketDataTixApi")&&t.log("Purchased 4S Market Data TIX API"),!0)},getPurchasedServerLimit:function(){return t.checkingRam?G("getPurchasedServerLimit",h.CONSTANTS.ScriptGetPurchasedServerLimit):(n("getPurchasedServerLimit",h.CONSTANTS.ScriptGetPurchasedServerLimit),h.CONSTANTS.PurchasedServerLimit)},getPurchasedServerMaxRam:function(){return t.checkingRam?G("getPurchasedServerMaxRam",h.CONSTANTS.ScriptGetPurchasedServerMaxRam):(n("getPurchasedServerMaxRam",h.CONSTANTS.ScriptGetPurchasedServerMaxRam),h.CONSTANTS.PurchasedServerMaxRam)},getPurchasedServerCost:function(e){if(t.checkingRam)return G("getPurchasedServerCost",h.CONSTANTS.ScriptGetPurchaseServerRamCost);n("getPurchasedServerCost",h.CONSTANTS.ScriptGetPurchaseServerRamCost);let i=0;try{i=te(e)}catch(e){return t.scriptRef.log("ERROR: 'getPurchasedServerCost()' "+e.message),1/0}return i},purchaseServer:function(e,i){if(t.checkingRam)return G("purchaseServer",h.CONSTANTS.ScriptPurchaseServerRamCost);n("purchaseServer",h.CONSTANTS.ScriptPurchaseServerRamCost);var a=String(e);if(""==(a=a.replace(/\s+/g,"")))return t.scriptRef.log("ERROR: Passed empty string for hostname argument of purchaseServer()"),"";if(k.a.purchasedServers.length>=h.CONSTANTS.PurchasedServerLimit)return t.scriptRef.log("ERROR: You have reached the maximum limit of "+h.CONSTANTS.PurchasedServerLimit+" servers. You cannot purchase any more."),"";let r=0;try{r=te(i)}catch(e){return t.scriptRef.log("ERROR: 'purchaseServer()' "+e.message),""}if(k.a.money.lt(r))return t.scriptRef.log("ERROR: Not enough money to purchase server. Need $"+Object(j.formatNumber)(r,2)),"";var o=new C.d({ip:Object(D.a)(),hostname:a,organizationName:"",isConnectedTo:!1,adminRights:!0,purchasedByPlayer:!0,maxRam:i});Object(C.a)(o),k.a.purchasedServers.push(o.ip);var s=k.a.getHomeComputer();return s.serversOnNetwork.push(o.ip),o.serversOnNetwork.push(s.ip),k.a.loseMoney(r),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseServer&&t.scriptRef.log("Purchased new server with hostname "+o.hostname+" for $"+Object(j.formatNumber)(r,2)),o.hostname},deleteServer:function(e){if(t.checkingRam)return G("deleteServer",h.CONSTANTS.ScriptPurchaseServerRamCost);n("deleteServer",h.CONSTANTS.ScriptPurchaseServerRamCost);var i=String(e);i=i.replace(/\s\s+/g,"");var a=Object(C.c)(i);if(null==a)return t.scriptRef.log("ERROR: Could not find server with hostname "+i+". deleteServer() failed"),!1;if(!a.purchasedByPlayer||"home"===a.hostname)return t.scriptRef.log("ERROR: Server "+a.hostname+" is not a purchased server. Cannot be deleted. deleteServer() failed"),!1;var r=a.ip;if(a.isConnectedTo)return t.scriptRef.log("ERROR: deleteServer() failed because you are currently connected to the server you are trying to delete"),!1;if(r===t.serverIp)return t.scriptRef.log("ERROR: Cannot call deleteServer() on self. deleteServer() failed"),!1;if(a.runningScripts.length>0)return t.scriptRef.log("ERROR: Cannot delete server "+a.hostname+" because it still has scripts running."),!1;for(var o=!1,s=0;sh.CONSTANTS.NumNetscriptPorts)throw Object(x.d)(t,"ERROR: Trying to write to invalid port: "+e+". Only ports 1-"+h.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=A.a[e-1])||!(e instanceof N.a))throw Object(x.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.write(i)},tryWrite:function(e,i=""){if(t.checkingRam)return G("tryWrite",h.CONSTANTS.ScriptReadWriteRamCost);if(n("tryWrite",h.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(x.d)(t,"Invalid argument passed in for tryWrite: "+e);if((e=Math.round(e))<1||e>h.CONSTANTS.NumNetscriptPorts)throw Object(x.d)(t,"ERROR: tryWrite() called on invalid port: "+e+". Only ports 1-"+h.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=A.a[e-1])||!(e instanceof N.a))throw Object(x.d)(t,"Could not find port: "+e+". This is a bug contact the game developer");return e.tryWrite(i)},read:function(e){if(t.checkingRam)return G("read",h.CONSTANTS.ScriptReadWriteRamCost);if(n("read",h.CONSTANTS.ScriptReadWriteRamCost),isNaN(e)){if(Object(W.isString)(e)){let n=e,i=Object(C.e)(t.serverIp);if(null==i)throw Object(x.d)(t,"Error getting Server for this script in read(). This is a bug please contact game dev");if(Object(O.e)(n)){let e=t.getScriptOnServer(n);return null==e?"":e.code}{let e=Object(M.getTextFile)(n,i);return null!==e?e.text:""}}throw Object(x.d)(t,"Invalid argument passed in for read(): "+e)}if((e=Math.round(e))<1||e>h.CONSTANTS.NumNetscriptPorts)throw Object(x.d)(t,"ERROR: Trying to read from invalid port: "+e+". Only ports 1-"+h.CONSTANTS.NumNetscriptPorts+" are valid.");if(null==(e=A.a[e-1])||!(e instanceof N.a))throw Object(x.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.read()},peek:function(e){if(t.checkingRam)return G("peek",h.CONSTANTS.ScriptReadWriteRamCost);if(n("peek",h.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(x.d)(t,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+h.CONSTANTS.NumNetscriptPorts);if((e=Math.round(e))<1||e>h.CONSTANTS.NumNetscriptPorts)throw Object(x.d)(t,"ERROR: peek() called with invalid argument. Must be a port number between 1 and "+h.CONSTANTS.NumNetscriptPorts);if(null==(e=A.a[e-1])||!(e instanceof N.a))throw Object(x.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.peek()},clear:function(e){if(t.checkingRam)return G("clear",h.CONSTANTS.ScriptReadWriteRamCost);if(n("clear",h.CONSTANTS.ScriptReadWriteRamCost),!isNaN(e)){if((e=Math.round(e))<1||e>h.CONSTANTS.NumNetscriptPorts)throw Object(x.d)(t,"ERROR: Trying to clear invalid port: "+e+". Only ports 1-"+h.CONSTANTS.NumNetscriptPorts+" are valid");if(null==(e=A.a[e-1])||!(e instanceof N.a))throw Object(x.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e.clear()}if(!Object(W.isString)(e))throw Object(x.d)(t,"Invalid argument passed in for clear(): "+e);var i=e,a=Object(C.e)(t.serverIp);if(null==a)throw Object(x.d)(t,"Error getting Server for this script in clear(). This is a bug please contact game dev");var r=Object(M.getTextFile)(i,a);return null!=r&&r.write(""),0},getPortHandle:function(e){if(t.checkingRam)return G("getPortHandle",10*h.CONSTANTS.ScriptReadWriteRamCost);if(n("getPortHandle",10*h.CONSTANTS.ScriptReadWriteRamCost),isNaN(e))throw Object(x.d)(t,"ERROR: Invalid argument passed into getPortHandle(). Must be an integer between 1 and "+h.CONSTANTS.NumNetscriptPorts);if((e=Math.round(e))<1||e>h.CONSTANTS.NumNetscriptPorts)throw Object(x.d)(t,"ERROR: getPortHandle() called with invalid port number: "+e+". Only ports 1-"+h.CONSTANTS.NumNetscriptPorts+" are valid");if(null==(e=A.a[e-1])||!(e instanceof N.a))throw Object(x.d)(t,"ERROR: Could not find port: "+e+". This is a bug contact the game developer");return e},rm:function(e,i){if(t.checkingRam)return G("rm",h.CONSTANTS.ScriptReadWriteRamCost);n("rm",h.CONSTANTS.ScriptReadWriteRamCost),null!=i&&""!==i||(i=t.serverIp);var a=Object(C.e)(i);if(null==a)throw Object(x.d)(t,`Invalid server specified for rm(): ${i}`);if(e.includes(".exe")){for(var r=0;r{Object(F.a)(),t(!0)}),i.addEventListener("click",()=>{Object(F.a)(),t(!1)}),Object(F.b)(e)})},wget:async function(n,i,a=t.serverIp){if(t.checkingRam)return 0;if(!Object(O.e)(i)&&!i.endsWith(".txt"))return workerSript.log(`ERROR: wget() failed because of an invalid target file: ${i}. Target file must be a script or text file`),Promise.resolve(!1);var r=$(a,"wget");return new Promise(function(o,s){e.get(n,function(e){let n;return(n=Object(O.e)(i)?r.writeToScriptFile(i,e):r.writeToTextFile(i,e)).success?n.overwritten?(t.log(`wget() successfully retrieved content and overwrote ${i} on ${a}`),o(!0)):(t.log(`wget successfully retrieved content to new file ${i} on ${a}`),o(!0)):(t.log("ERROR: wget() failed"),o(!1))},"text").fail(function(e){return t.log(`ERROR: wget() failed: ${JSON.stringify(e)}`),o(!1)})})},getFavorToDonate:function(){return t.checkingRam?G("getFavorToDonate",h.CONSTANTS.ScriptGetFavorToDonate):(n("getFavorToDonate",h.CONSTANTS.ScriptGetFavorToDonate),Math.floor(h.CONSTANTS.BaseFavorToDonate*r.BitNodeMultipliers.RepToDonateToFaction))},universityCourse:function(e,i){var a=h.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==k.a.bitNodeN&&(a*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("universityCourse",a);if(n("universityCourse",a),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run universityCourse(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!E.c){if(k.a.isWorking){var r=k.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.universityCourse&&t.scriptRef.log(r)}var o,s,l;switch(e.toLowerCase()){case b.Locations.AevumSummitUniversity.toLowerCase():if(k.a.city!=b.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot study at Summit University because you are not in Aevum. universityCourse() failed"),!1;k.a.location=b.Locations.AevumSummitUniversity,o=4,s=3;break;case b.Locations.Sector12RothmanUniversity.toLowerCase():if(k.a.city!=b.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot study at Rothman University because you are not in Sector-12. universityCourse() failed"),!1;k.a.location=b.Locations.Sector12RothmanUniversity,o=3,s=2;break;case b.Locations.VolhavenZBInstituteOfTechnology.toLowerCase():if(k.a.city!=b.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot study at ZB Institute of Technology because you are not in Volhaven. universityCourse() failed"),!1;k.a.location=b.Locations.VolhavenZBInstituteOfTechnology,o=5,s=4;break;default:return t.scriptRef.log("Invalid university name: "+e+". universityCourse() failed"),!1}switch(i.toLowerCase()){case"Study Computer Science".toLowerCase():l=h.CONSTANTS.ClassStudyComputerScience;break;case"Data Structures".toLowerCase():l=h.CONSTANTS.ClassDataStructures;break;case"Networks".toLowerCase():l=h.CONSTANTS.ClassNetworks;break;case"Algorithms".toLowerCase():l=h.CONSTANTS.ClassAlgorithms;break;case"Management".toLowerCase():l=h.CONSTANTS.ClassManagement;break;case"Leadership".toLowerCase():l=h.CONSTANTS.ClassLeadership;break;default:return t.scriptRef.log("Invalid class name: "+i+". universityCourse() failed"),!1}return k.a.startClass(o,s,l),null==t.disableLogs.ALL&&null==t.disableLogs.universityCourse&&t.scriptRef.log("Started "+l+" at "+e),!0}t.scriptRef.log("ERROR: universityCourse() failed because you are in the middle of a mission.")},gymWorkout:function(e,i){var a=h.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==k.a.bitNodeN&&(a*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("gymWorkout",a);if(n("gymWorkout",a),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run gymWorkout(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(!E.c){if(k.a.isWorking){var r=k.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log(r)}var o,s;switch(e.toLowerCase()){case b.Locations.AevumCrushFitnessGym.toLowerCase():if(k.a.city!=b.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Crush Fitness because you are not in Aevum. gymWorkout() failed"),!1;k.a.location=b.Locations.AevumCrushFitnessGym,o=3,s=2;break;case b.Locations.AevumSnapFitnessGym.toLowerCase():if(k.a.city!=b.Locations.Aevum)return t.scriptRef.log("ERROR: You cannot workout at Snap Fitness because you are not in Aevum. gymWorkout() failed"),!1;k.a.location=b.Locations.AevumSnapFitnessGym,o=10,s=5;break;case b.Locations.Sector12IronGym.toLowerCase():if(k.a.city!=b.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Iron Gym because you are not in Sector-12. gymWorkout() failed"),!1;k.a.location=b.Locations.Sector12IronGym,o=1,s=1;break;case b.Locations.Sector12PowerhouseGym.toLowerCase():if(k.a.city!=b.Locations.Sector12)return t.scriptRef.log("ERROR: You cannot workout at Powerhouse Gym because you are not in Sector-12. gymWorkout() failed"),!1;k.a.location=b.Locations.Sector12PowerhouseGym,o=20,s=10;break;case b.Locations.VolhavenMilleniumFitnessGym:if(k.a.city!=b.Locations.Volhaven)return t.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed"),!1;k.a.location=b.Locations.VolhavenMilleniumFitnessGym,o=7,s=4;break;default:return t.scriptRef.log("Invalid gym name: "+e+". gymWorkout() failed"),!1}switch(i.toLowerCase()){case"strength".toLowerCase():case"str".toLowerCase():k.a.startClass(o,s,h.CONSTANTS.ClassGymStrength);break;case"defense".toLowerCase():case"def".toLowerCase():k.a.startClass(o,s,h.CONSTANTS.ClassGymDefense);break;case"dexterity".toLowerCase():case"dex".toLowerCase():k.a.startClass(o,s,h.CONSTANTS.ClassGymDexterity);break;case"agility".toLowerCase():case"agi".toLowerCase():k.a.startClass(o,s,h.CONSTANTS.ClassGymAgility);break;default:return t.scriptRef.log("Invalid stat: "+i+". gymWorkout() failed"),!1}return null==t.disableLogs.ALL&&null==t.disableLogs.gymWorkout&&t.scriptRef.log("Started training "+i+" at "+e),!0}t.scriptRef.log("ERROR: gymWorkout() failed because you are in the middle of a mission.")},travelToCity(e){var i=h.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("travelToCity",i);if(n("travelToCity",i),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run travelToCity(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");switch(e){case b.Locations.Aevum:case b.Locations.Chongqing:case b.Locations.Sector12:case b.Locations.NewTokyo:case b.Locations.Ishima:case b.Locations.Volhaven:if(k.a.money.lt(h.CONSTANTS.TravelCost))throw t.scriptRef.log("ERROR: not enough money to travel with travelToCity()."),Object(x.d)(t,"ERROR: not enough money to travel with travelToCity().");return k.a.loseMoney(h.CONSTANTS.TravelCost),k.a.city=e,null==t.disableLogs.ALL&&null==t.disableLogs.travelToCity&&t.scriptRef.log("Traveled to "+e),!0;default:return t.scriptRef.log("ERROR: Invalid city name passed into travelToCity()."),!1}},purchaseTor(){var e=h.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("purchaseTor",e);if(n("purchaseTor",e),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run purchaseTor(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null!=T.a["Darkweb Server"])return t.scriptRef.log("You already have a TOR router! purchaseTor() failed"),!1;if(k.a.money.lt(h.CONSTANTS.TorRouterCost))return t.scriptRef.log("ERROR: You cannot afford to purchase a Tor router. purchaseTor() failed"),!1;k.a.loseMoney(h.CONSTANTS.TorRouterCost);var i=new C.d({ip:Object(D.a)(),hostname:"darkweb",organizationName:"",isConnectedTo:!1,adminRights:!1,purchasedByPlayer:!1,maxRam:1});Object(C.a)(i),T.a.addIp("Darkweb Server",i.ip);const a=document.getElementById("location-purchase-tor");return a.setAttribute("class","a-link-button-bought"),a.innerHTML="TOR Router - Purchased",k.a.getHomeComputer().serversOnNetwork.push(i.ip),i.serversOnNetwork.push(k.a.getHomeComputer().ip),k.a.gainIntelligenceExp(h.CONSTANTS.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseTor&&t.scriptRef.log("You have purchased a Tor router!"),!0},purchaseProgram(e){var i=h.CONSTANTS.ScriptSingularityFn1RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("purchaseProgram",i);if(n("purchaseProgram",i),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run purchaseProgram(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(null==T.a["Darkweb Server"])return t.scriptRef.log("ERROR: You do not have the TOR router. purchaseProgram() failed."),!1;e=e.toLowerCase();let a=null;for(const t in m.a){const n=m.a[t];n.program.toLowerCase()==e&&(a=n)}return null==a?(t.scriptRef.log("ERROR: Invalid program name passed into purchaseProgram()."),!1):k.a.money.lt(a.price)?(t.scriptRef.log("Not enough money to purchase "+a.program),!1):k.a.hasProgram(a.program)?(t.scriptRef.log("You already have the "+a.program+" program"),!0):(k.a.loseMoney(a.price),k.a.getHomeComputer().programs.push(a.program),null==t.disableLogs.ALL&&null==t.disableLogs.purchaseProgram&&t.scriptRef.log("You have purchased the "+a.program+" program. The new program can be found on your home computer."),!0)},getStats:function(){var e=h.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getStats",e);if(n("getStats",e),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run getStats(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return{hacking:k.a.hacking_skill,strength:k.a.strength,defense:k.a.defense,dexterity:k.a.dexterity,agility:k.a.agility,charisma:k.a.charisma,intelligence:k.a.intelligence}},getCharacterInformation:function(){var e=h.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getCharacterInformation",e);if(n("getCharacterInformation",e),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run getCharacterInformation(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");var i="";return p.CompanyPositions[k.a.companyPosition]instanceof u.CompanyPosition&&(i=k.a.companyPosition),{bitnode:k.a.bitNodeN,city:k.a.city,company:k.a.companyName,factions:k.a.factions.slice(),jobTitle:i,mult:{agility:k.a.agility_mult,agilityExp:k.a.agility_exp_mult,companyRep:k.a.company_rep_mult,crimeMoney:k.a.crime_money_mult,crimeSuccess:k.a.crime_success_mult,defense:k.a.defense_mult,defenseExp:k.a.defense_exp_mult,dexterity:k.a.dexterity_mult,dexterityExp:k.a.dexterity_exp_mult,factionRep:k.a.faction_rep_mult,hacking:k.a.hacking_mult,hackingExp:k.a.hacking_exp_mult,strength:k.a.strength_mult,strengthExp:k.a.strength_exp_mult,workMoney:k.a.work_money_mult},timeWorked:k.a.timeWorked,tor:T.a.hasOwnProperty("Darkweb Server"),workHackExpGain:k.a.workHackExpGained,workStrExpGain:k.a.workStrExpGained,workDefExpGain:k.a.workDefExpGained,workDexExpGain:k.a.workDexExpGained,workAgiExpGain:k.a.workAgiExpGained,workChaExpGain:k.a.workChaExpGained,workRepGain:k.a.workRepGained,workMoneyGain:k.a.workMoneyGained}},isBusy:function(){var e=h.CONSTANTS.ScriptSingularityFn1RamCost/4;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("isBusy",e);if(n("isBusy",e),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run isBusy(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");return k.a.isWorking},stopAction:function(){var e=h.CONSTANTS.ScriptSingularityFn1RamCost/2;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("stopAction",e);if(n("stopAction",e),4!=k.a.bitNodeN&&!(K&&J>=1))throw Object(x.d)(t,"Cannot run stopAction(). It is a Singularity Function and requires SourceFile-4 (level 1) to run.");if(k.a.isWorking){var i=k.a.singularityStopWork();return null==t.disableLogs.ALL&&null==t.disableLogs.stopAction&&t.scriptRef.log(i),!0}return!1},upgradeHomeRam:function(){var e=h.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("upgradeHomeRam",e);if(n("upgradeHomeRam",e),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run upgradeHomeRam(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");const i=k.a.getUpgradeHomeRamCost();if(k.a.money.lt(i))return t.scriptRef.log("ERROR: upgradeHomeRam() failed because you don't have enough money"),!1;var a=k.a.getHomeComputer();return a.maxRam*=2,k.a.loseMoney(i),k.a.gainIntelligenceExp(h.CONSTANTS.IntelligenceSingFnBaseExpGain),null==t.disableLogs.ALL&&null==t.disableLogs.upgradeHomeRam&&t.scriptRef.log("Purchased additional RAM for home computer! It now has "+a.maxRam+"GB of RAM."),!0},getUpgradeHomeRamCost:function(){var e=h.CONSTANTS.ScriptSingularityFn2RamCost/2;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getUpgradeHomeRamCost",e);if(n("getUpgradeHomeRamCost",e),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run getUpgradeHomeRamCost(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return k.a.getUpgradeHomeRamCost()},workForCompany:function(){var e=h.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("workForCompany",e);if(n("workForCompany",e),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run workForCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(E.c)return void t.scriptRef.log("ERROR: workForCompany() failed because you are in the middle of a mission.");const i=p.CompanyPositions[k.a.companyPosition];if(""===k.a.companyPosition||!(i instanceof u.CompanyPosition))return t.scriptRef.log("ERROR: workForCompany() failed because you do not have a job"),!1;if(k.a.isWorking){var a=k.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.scriptRef.log(a)}return i.isPartTimeJob()?k.a.startWorkPartTime():k.a.startWork(),null==t.disableLogs.ALL&&null==t.disableLogs.workForCompany&&t.log(`Began working at ${k.a.companyName} as a ${k.a.companyPosition}`),!0},applyToCompany:function(e,i){var a,r=h.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==k.a.bitNodeN&&(r*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("applyToCompany",r);if(n("applyToCompany",r),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run applyToCompany(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(c.companyExists)(e))return t.scriptRef.log("ERROR: applyToCompany() failed because specified company "+e+" does not exist."),!1;switch(k.a.location=e,i.toLowerCase()){case"software":a=k.a.applyForSoftwareJob(!0);break;case"software consultant":a=k.a.applyForSoftwareConsultantJob(!0);break;case"it":a=k.a.applyForItJob(!0);break;case"security engineer":a=k.a.applyForSecurityEngineerJob(!0);break;case"network engineer":a=k.a.applyForNetworkEngineerJob(!0);break;case"business":a=k.a.applyForBusinessJob(!0);break;case"business consultant":a=k.a.applyForBusinessConsultantJob(!0);break;case"security":a=k.a.applyForSecurityJob(!0);break;case"agent":a=k.a.applyForAgentJob(!0);break;case"employee":a=k.a.applyForEmployeeJob(!0);break;case"part-time employee":a=k.a.applyForPartTimeEmployeeJob(!0);break;case"waiter":a=k.a.applyForWaiterJob(!0);break;case"part-time waiter":a=k.a.applyForPartTimeWaiterJob(!0);break;default:return t.scriptRef.log("ERROR: Invalid job passed into applyToCompany: "+i+". applyToCompany() failed"),!1}return Object(W.isString)(a)?(t.scriptRef.log(a),!1):(a?null==t.disableLogs.ALL&&null==t.disableLogs.applyToCompany&&t.log(`You were offered a new job at ${e} as a ${k.a.companyPosition}`):null==t.disableLogs.ALL&&null==t.disableLogs.applyToCompany&&t.log(`You failed to get a new job/promotion at ${e} in the ${i} field.`),a)},getCompanyRep:function(e){var i=h.CONSTANTS.ScriptSingularityFn2RamCost/2;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getCompanyRep",i);if(n("getCompanyRep",i),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run getCompanyRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var a=c.Companies[e];return null!=a&&a instanceof l.Company?a.playerReputation:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyRep(): "+e),-1)},getCompanyFavor:function(e){var i=h.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getCompanyFavor",i);if(n("getCompanyFavor",i),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run getCompanyFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var a=c.Companies[e];return null!=a&&a instanceof l.Company?a.favor:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavor(): "+e),-1)},getCompanyFavorGain:function(e){var i=h.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getCompanyFavorGain",i);if(n("getCompanyFavorGain",i),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run getCompanyFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");var a=c.Companies[e];return null!=a&&a instanceof l.Company?a.getFavorGain()[0]:(t.scriptRef.log("ERROR: Invalid companyName passed into getCompanyFavorGain(): "+e),-1)},checkFactionInvitations:function(){var e=h.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==k.a.bitNodeN&&(e*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("checkFactionInvitations",e);if(n("checkFactionInvitations",e),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run checkFactionInvitations(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return k.a.factionInvitations.slice()},joinFaction:function(e){var i=h.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("joinFaction",i);if(n("joinFaction",i),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run joinFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(!Object(y.d)(e))return t.scriptRef.log("ERROR: Faction specified in joinFaction() does not exist."),!1;if(!k.a.factionInvitations.includes(e))return t.scriptRef.log("ERROR: Cannot join "+e+" Faction because you have not been invited. joinFaction() failed"),!1;var a=y.b[e];Object(y.g)(a);for(var r=0;r=2))throw Object(x.d)(t,"Cannot run workForFaction(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");if(k.a.inGang()&&void 0!==_.a[e])t.scriptRef.log("ERROR: Faction specified in workForFaction() does not offer work at the moment.");else{if(!E.c){if(!Object(y.d)(e))return t.scriptRef.log("ERROR: Faction specified in workForFaction() does not exist."),!1;if(!k.a.factions.includes(e))return t.scriptRef.log("ERROR: workForFaction() failed because you are not a member of "+e),!1;if(k.a.isWorking){var r=k.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.workForFaction&&t.scriptRef.log(r)}var o=y.b[e];switch(i.toLowerCase()){case"hacking":case"hacking contracts":case"hackingcontracts":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","BitRunners","The Black Hand","NiteSec","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Netburners","Tian Di Hui","CyberSec"].includes(o.name)?(k.a.startFactionHackWork(o),t.scriptRef.log("Started carrying out hacking contracts for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot carry out hacking contracts for "+o.name+". workForFaction() failed"),!1);case"field":case"fieldwork":case"field work":return["Illuminati","Daedalus","The Covenant","ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","The Black Hand","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Dark Army","The Syndicate","Silhouette","Tetrads","Slum Snakes"].includes(o.name)?(k.a.startFactionFieldWork(o),t.scriptRef.log("Started carrying out field missions for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot carry out field missions for "+o.name+". workForFaction() failed"),!1);case"security":case"securitywork":case"security work":return["ECorp","MegaCorp","Bachman & Associates","Blade Industries","NWO","Clarke Incorporated","OmniTek Incorporated","Four Sigma","KuaiGong International","Fulcrum Secret Technologies","Chongqing","Sector-12","New Tokyo","Aevum","Ishima","Volhaven","Speakers for the Dead","The Syndicate","Tetrads","Slum Snakes","Tian Di Hui"].includes(o.name)?(k.a.startFactionSecurityWork(o),t.scriptRef.log("Started serving as security details for "+o.name),!0):(t.scriptRef.log("ERROR: Cannot serve as security detail for "+o.name+". workForFaction() failed"),!1);default:t.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): "+i)}return!0}t.scriptRef.log("ERROR: workForFaction() failed because you are in the middle of a mission.")}},getFactionRep:function(e){var i=h.CONSTANTS.ScriptSingularityFn2RamCost/4;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getFactionRep",i);if(n("getFactionRep",i),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run getFactionRep(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(y.d)(e)?y.b[e].playerReputation:(t.scriptRef.log("ERROR: Faction specified in getFactionRep() does not exist."),-1)},getFactionFavor:function(e){var i=h.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getFactionFavor",i);if(n("getFactionFavor",i),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run getFactionFavor(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(y.d)(e)?y.b[e].favor:(t.scriptRef.log("ERROR: Faction specified in getFactionFavor() does not exist."),-1)},getFactionFavorGain:function(e){var i=h.CONSTANTS.ScriptSingularityFn2RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getFactionFavorGain",i);if(n("getFactionFavorGain",i),4!=k.a.bitNodeN&&!(K&&J>=2))throw Object(x.d)(t,"Cannot run getFactionFavorGain(). It is a Singularity Function and requires SourceFile-4 (level 2) to run.");return Object(y.d)(e)?y.b[e].getFavorGain()[0]:(t.scriptRef.log("ERROR: Faction specified in getFactionFavorGain() does not exist."),-1)},donateToFaction:function(e,i){var a=h.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==k.a.bitNodeN&&(a*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("donateToFaction",a);if(n("donateToFaction",a),4!=k.a.bitNodeN&&!(K&&J>=3))throw Object(x.d)(t,"Cannot run donateToFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(y.d)(e))return t.log(`ERROR: Faction specified in donateToFaction() does not exist: ${e}`),!1;if("number"!=typeof i||i<=0)return t.log(`ERROR: Invalid donation amount specified in donateToFaction(): ${i}. Must be numeric and positive`),!1;if(k.a.money.lt(i))return t.log(`ERROR: You do not have enough money to donate $${i} to ${e}`),!1;var o=Math.round(h.CONSTANTS.BaseFavorToDonate*r.BitNodeMultipliers.RepToDonateToFaction);if(y.b[e].favor=3))throw Object(x.d)(t,"Cannot run createProgram(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(E.c)return void t.scriptRef.log("ERROR: createProgram() failed because you are in the middle of a mission.");if(k.a.isWorking){var a=k.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.createProgram&&t.scriptRef.log(a)}e=e.toLowerCase();let r=null;for(const t in d.a)d.a[t].name.toLowerCase()==e&&(r=d.a[t]);return null==r?(t.scriptRef.log("ERROR: createProgram() failed because the specified program does not exist: "+e),!1):k.a.hasProgram(r.name)?(t.scriptRef.log("ERROR: createProgram() failed because you already have the "+r.name+" program"),!1):r.create.req()?(k.a.startCreateProgramWork(r.name,r.create.time,r.create.level),null==t.disableLogs.ALL&&null==t.disableLogs.createProgram&&t.scriptRef.log("Began creating program: "+e),!0):(t.scriptRef.log("ERROR: createProgram() failed because hacking level is too low to create "+r.name+" (level "+r.create.level+" req)"),!1)},commitCrime:function(e){var i=h.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("commitCrime",i);if(n("commitCrime",i),4!=k.a.bitNodeN&&!(K&&J>=3))throw Object(x.d)(t,"Cannot run commitCrime(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(E.c)return void t.scriptRef.log("ERROR: commitCrime() failed because you are in the middle of a mission.");if(k.a.isWorking){var a=k.a.singularityStopWork();null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log(a)}switch(k.a.city){case b.Locations.Aevum:k.a.location=b.Locations.AevumSlums;break;case b.Locations.Chongqing:k.a.location=b.Locations.ChongqingSlums;break;case b.Locations.Sector12:k.a.location=b.Locations.Sector12Slums;break;case b.Locations.NewTokyo:k.a.location=b.Locations.NewTokyoSlums;break;case b.Locations.Ishima:k.a.location=b.Locations.IshimaSlums;break;case b.Locations.Volhaven:k.a.location=b.Locations.VolhavenSlums;break;default:console.log("Invalid Player.city value")}const r=Object(o.c)(e.toLowerCase());if(null==r)throw Object(x.d)(t,"Invalid crime passed into commitCrime(): "+e);return null==t.disableLogs.ALL&&null==t.disableLogs.commitCrime&&t.scriptRef.log("Attempting to commit crime: "+r.name+"..."),r.commit(1,{workerscript:t})},getCrimeChance:function(e){var i=h.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getCrimeChance",i);if(n("getCrimeChance",i),4!=k.a.bitNodeN&&!(K&&J>=3))throw Object(x.d)(t,"Cannot run getCrimeChance(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");const a=Object(o.c)(e.toLowerCase());if(null==a)throw Object(x.d)(t,"Invalid crime passed into getCrimeChance(): "+a);return a.successRate()},getOwnedAugmentations:function(e=!1){var i=h.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==k.a.bitNodeN&&(i*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("getOwnedAugmentations",i);if(n("getOwnedAugmentations",i),4!=k.a.bitNodeN&&!(K&&J>=3))throw Object(x.d)(t,"Cannot run getOwnedAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");for(var a=[],r=0;r=3))throw Object(x.d)(t,"Cannot run getOwnedSourceFiles(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");let i=[];for(let e=0;e=3))throw Object(x.d)(t,"Cannot run getAugmentationsFromFaction(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(y.d)(e))return t.scriptRef.log("ERROR: getAugmentationsFromFaction() failed. Invalid faction name passed in (this is case-sensitive): "+e),[];for(var a=y.b[e],r=[],o=0;o=3))throw Object(x.d)(t,"Cannot run getAugmentationCost(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");if(!Object(a.f)(e))return t.scriptRef.log("ERROR: getAugmentationCost() failed. Invalid Augmentation name passed in (note: this is case-sensitive): "+e),[-1,-1];var r=a.c[e];return[r.baseRepRequirement,r.baseCost]},purchaseAugmentation:function(e,i){var r=h.CONSTANTS.ScriptSingularityFn3RamCost;if(4!==k.a.bitNodeN&&(r*=h.CONSTANTS.ScriptSingularityFnRamMult),t.checkingRam)return G("purchaseAugmentation",r);if(n("purchaseAugmentation",r),4!=k.a.bitNodeN&&!(K&&J>=3))throw Object(x.d)(t,"Cannot run purchaseAugmentation(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");var o=y.b[e];if(null==o||!(o instanceof y.a))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid faction name: "+e),!1;if(!o.augmentations.includes(i))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because the faction "+e+" does not contain the "+i+" augmentation"),!1;var s=a.c[i];if(null==s||!(s instanceof a.a))return t.scriptRef.log("ERROR: purchaseAugmentation() failed because of invalid augmentation name: "+i),!1;var l=!1;if(s.name===a.b.NeuroFluxGovernor&&(l=!0),!l){for(var c=0;c=3))throw Object(x.d)(t,"Cannot run installAugmentations(). It is a Singularity Function and requires SourceFile-4 (level 3) to run.");return 0===k.a.queuedAugmentations.length?(t.scriptRef.log("ERROR: installAugmentations() failed because you do not have any Augmentations to be installed"),!1):(k.a.gainIntelligenceExp(h.CONSTANTS.IntelligenceSingFnBaseExpGain),t.scriptRef.log("Installing Augmentations. This will cause this script to be killed"),Object(a.i)(e),!0)},gang:{getMemberNames:function(){if(t.checkingRam)return G("getMemberNames",h.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getMemberNames",h.CONSTANTS.ScriptGangApiBaseRamCost/4),R.a(t,"getMemberNames");try{const e=[];for(const t of k.a.gang.members)e.push(t.name);return e}catch(e){throw Object(x.d)(t,R.b("getMemberNames",e))}},getGangInformation:function(){if(t.checkingRam)return G("getGangInformation",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getGangInformation",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"getGangInformation");try{return{faction:k.a.gang.facName,isHacking:k.a.gang.isHackingGang,moneyGainRate:k.a.gang.moneyGainRate,power:k.a.gang.getPower(),respect:k.a.gang.respect,respectGainRate:k.a.gang.respectGainRate,territory:k.a.gang.getTerritory(),territoryClashChance:k.a.gang.territoryClashChance,territoryWarfareEngaged:k.a.gang.territoryWarfareEngaged,wantedLevel:k.a.gang.wanted,wantedLevelGainRate:k.a.gang.wantedGainRate}}catch(e){throw Object(x.d)(t,R.b("getGangInformation",e))}},getOtherGangInformation:function(){if(t.checkingRam)return G("getOtherGangInformation",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getOtherGangInformation",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"getOtherGangInformation");try{return Object.assign(_.a)}catch(e){throw Object(x.d)(t,R.b("getOtherGangInformation",e))}},getMemberInformation:function(e){if(t.checkingRam)return G("getMemberInformation",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getMemberInformation",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"getMemberInformation");try{for(const t of k.a.gang.members)if(t.name===e)return{agility:t.agi,agilityEquipMult:t.agi_mult,agilityAscensionMult:t.agi_asc_mult,augmentations:t.augmentations.slice(),charisma:t.cha,charismaEquipMult:t.cha_mult,charismaAscensionMult:t.cha_asc_mult,defense:t.def,defenseEquipMult:t.def_mult,defenseAscensionMult:t.def_asc_mult,dexterity:t.dex,dexterityEquipMult:t.dex_mult,dexterityAscensionMult:t.dex_asc_mult,equipment:t.upgrades.slice(),hacking:t.hack,hackingEquipMult:t.hack_mult,hackingAscensionMult:t.hack_asc_mult,strength:t.str,strengthEquipMult:t.str_mult,strengthAscensionMult:t.str_asc_mult,task:t.task};return t.log(`Invalid argument passed to gang.getMemberInformation(). No gang member could be found with name ${e}`),{}}catch(e){throw Object(x.d)(t,R.b("getMemberInformation",e))}},canRecruitMember:function(){if(t.checkingRam)return G("canRecruitMember",h.CONSTANTS.ScriptGangApiBaseRamCost/4);n("canRecruitMember",h.CONSTANTS.ScriptGangApiBaseRamCost/4),R.a(t,"canRecruitMember");try{return k.a.gang.canRecruitMember()}catch(e){throw Object(x.d)(t,R.b("canRecruitMember",e))}},recruitMember:function(e){if(t.checkingRam)return G("recruitMember",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("recruitMember",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"recruitMember");try{const n=k.a.gang.recruitMember(e);return t.shouldLog("recruitMember")&&(n?t.log(`Successfully recruited Gang Member ${e}`):t.log(`Failed to recruit Gang Member ${e}`)),n}catch(e){throw Object(x.d)(t,R.b("recruitMember",e))}},getTaskNames:function(){if(t.checkingRam)return G("getTaskNames",h.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getTaskNames",h.CONSTANTS.ScriptGangApiBaseRamCost/4),R.a(t,"getTaskNames");try{const e=k.a.gang.getAllTaskNames();return e.unshift("Unassigned"),e}catch(e){throw Object(x.d)(t,R.b("getTaskNames",e))}},setMemberTask:function(e,i){if(t.checkingRam)return G("setMemberTask",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("setMemberTask",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"setMemberTask");try{for(const n of k.a.gang.members)if(n.name===e){const a=n.assignToTask(i);return t.shouldLog("setMemberTask")&&(a?t.log(`Successfully assigned Gang Member ${e} to ${i} task`):t.log(`Failed to assign Gang Member ${e} to ${i} task. ${e} is now Unassigned`)),a}return t.log(`Invalid argument passed to gang.setMemberTask(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(x.d)(t,R.b("setMemberTask",e))}},getEquipmentNames:function(){if(t.checkingRam)return G("getEquipmentNames",h.CONSTANTS.ScriptGangApiBaseRamCost/4);n("getEquipmentNames",h.CONSTANTS.ScriptGangApiBaseRamCost/4),R.a(t,"getEquipmentNames");try{return k.a.gang.getAllUpgradeNames()}catch(e){throw Object(x.d)(t,R.b("getEquipmentNames",e))}},getEquipmentCost:function(e){if(t.checkingRam)return G("getEquipmentCost",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getEquipmentCost",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"getEquipmentCost");try{return k.a.gang.getUpgradeCost(e)}catch(e){throw Object(x.d)(t,R.b("getEquipmentCost",e))}},getEquipmentType:function(e){if(t.checkingRam)return G("getEquipmentType",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("getEquipmentType",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"getEquipmentType");try{return k.a.gang.getUpgradeType(e)}catch(e){throw Object(x.d)(t,R.b("getEquipmentType",e))}},purchaseEquipment:function(e,i){if(t.checkingRam)return G("purchaseEquipment",h.CONSTANTS.ScriptGangApiBaseRamCost);n("purchaseEquipment",h.CONSTANTS.ScriptGangApiBaseRamCost),R.a(t,"purchaseEquipment");try{for(const n of k.a.gang.members)if(n.name===e){const a=n.buyUpgrade(i,k.a,k.a.gang);return t.shouldLog("purchaseEquipment")&&(a?t.log(`Purchased ${i} for Gang member ${e}`):t.log(`Failed to purchase ${i} for Gang member ${e}`)),a}return t.log(`Invalid argument passed to gang.purchaseEquipment(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(x.d)(t,R.b("purchaseEquipment",e))}},ascendMember:function(e){if(t.checkingRam)return G("ascendMember",h.CONSTANTS.ScriptGangApiBaseRamCost);n("ascendMember",h.CONSTANTS.ScriptGangApiBaseRamCost),R.a(t,"ascendMember");try{for(const n of k.a.gang.members)if(n.name===e)return k.a.gang.ascendMember(n,t);return t.log(`Invalid argument passed to gang.ascendMember(). No gang member could be found with name ${e}`),!1}catch(e){throw Object(x.d)(t,R.b("ascendMember",e))}},setTerritoryWarfare:function(e){if(t.checkingRam)return G("setTerritoryWarfare",h.CONSTANTS.ScriptGangApiBaseRamCost/2);n("setTerritoryWarfare",h.CONSTANTS.ScriptGangApiBaseRamCost/2),R.a(t,"setTerritoryWarfare");try{e?(k.a.gang.territoryWarfareEngaged=!0,t.shouldLog("setTerritoryWarfare")&&t.log("Engaging in Gang Territory Warfare")):(k.a.gang.territoryWarfareEngaged=!1,t.shouldLog("setTerritoryWarfare")&&t.log("Disengaging in Gang Territory Warfare"))}catch(e){throw Object(x.d)(t,R.b("setTerritoryWarfare",e))}},getChanceToWinClash:function(e){if(t.checkingRam)return G("getChanceToWinClash",h.CONSTANTS.ScriptGangApiBaseRamCost);n("getChanceToWinClash",h.CONSTANTS.ScriptGangApiBaseRamCost),R.a(t,"getChanceToWinClash");try{if(null==_.a[e])return t.log(`Invalid gang specified in gang.getChanceToWinClash() : ${e}`),0;const n=_.a[k.a.gang.facName].power;return n/(_.a[e].power+n)}catch(e){throw Object(x.d)(t,R.b("getChanceToWinClash",e))}},getBonusTime:function(){if(t.checkingRam)return 0;R.a(t,"getBonusTime");try{return Math.round(k.a.gang.storedCycles/5)}catch(e){throw Object(x.d)(t,R.b("getBonusTime",e))}}},bladeburner:{getContractNames:function(){if(t.checkingRam)return G("getContractNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getContractNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.getContractNamesNetscriptFn();throw Object(x.d)(t,"getContractNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getOperationNames:function(){if(t.checkingRam)return G("getOperationNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getOperationNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.getOperationNamesNetscriptFn();throw Object(x.d)(t,"getOperationNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getBlackOpNames:function(){if(t.checkingRam)return G("getBlackOpNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getBlackOpNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.getBlackOpNamesNetscriptFn();throw Object(x.d)(t,"getBlackOpNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getGeneralActionNames:function(){if(t.checkingRam)return G("getGeneralActionNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getGeneralActionNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.getGeneralActionNamesNetscriptFn();throw Object(x.d)(t,"getGeneralActionNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillNames:function(){if(t.checkingRam)return G("getSkillNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10);if(n("getSkillNames",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/10),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.getSkillNamesNetscriptFn();throw Object(x.d)(t,"getSkillNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},startAction:function(e="",i=""){if(t.checkingRam)return G("startAction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("startAction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.startActionNetscriptFn(e,i,t)}catch(e){throw Object(x.d)(t,"Bladeburner.startAction() failed with exception: "+e)}throw Object(x.d)(t,"startAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},stopBladeburnerAction:function(){if(t.checkingRam)return G("stopBladeburnerAction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2);if(n("stopBladeburnerAction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/2),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.resetAction();throw Object(x.d)(t,"stopBladeburnerAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCurrentAction:function(){if(t.checkingRam)return G("getCurrentAction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/4);if(n("getCurrentAction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost/4),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.getTypeAndNameFromActionId(k.a.bladeburner.action);throw Object(x.d)(t,"getCurrentAction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionTime:function(e="",i=""){if(t.checkingRam)return G("getActionTime",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionTime",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getActionTimeNetscriptFn(e,i,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getActionTime() failed with exception: "+e)}throw Object(x.d)(t,"getActionTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionEstimatedSuccessChance:function(e="",i=""){if(t.checkingRam)return G("getActionEstimatedSuccessChance",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionEstimatedSuccessChance",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getActionEstimatedSuccessChanceNetscriptFn(e,i,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getActionEstimatedSuccessChance() failed with exception: "+e)}throw Object(x.d)(t,"getActionEstimatedSuccessChance() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionRepGain:function(e="",i="",a){if(t.checkingRam)return G("getActionRepGain",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionRepGain",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(P.a)(t,"getActionRepGain");try{var o=Object(P.b)("getActionAutolevel",e,i);const n=k.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(o),-1;const l=k.a.bladeburner.getActionObject(n);return null==l?(t.log(o),-1):(s=null==a||isNaN(a)?Math.pow(l.rewardFac,l.level-1):Math.pow(l.rewardFac,a-1),l.rankGain*s*r.BitNodeMultipliers.BladeburnerRank);var s}catch(e){throw Object(x.d)(t,Object(P.c)("getActionAutolevel",e))}},getActionCountRemaining:function(e="",i=""){if(t.checkingRam)return G("getActionCountRemaining",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getActionCountRemaining",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getActionCountRemainingNetscriptFn(e,i,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getActionCountRemaining() failed with exception: "+e)}throw Object(x.d)(t,"getActionCountRemaining() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getActionMaxLevel:function(e="",i=""){if(t.checkingRam)return G("getActionMaxLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionMaxLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(P.a)(t,"getActionMaxLevel");try{var a=Object(P.b)("getActionMaxLevel",e,i);const n=k.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(a),-1;const r=k.a.bladeburner.getActionObject(n);return null==r?(t.log(a),-1):r.maxLevel}catch(e){throw Object(x.d)(t,Object(P.c)("getActionMaxLevel",e))}},getActionCurrentLevel:function(e="",i=""){if(t.checkingRam)return G("getActionCurrentLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionCurrentLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(P.a)(t,"getActionCurrentLevel");try{var a=Object(P.b)("getActionCurrentLevel",e,i);const n=k.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(a),-1;const r=k.a.bladeburner.getActionObject(n);return null==r?(t.log(a),-1):r.level}catch(e){throw Object(x.d)(t,Object(P.c)("getActionCurrentLevel",e))}},getActionAutolevel:function(e="",i=""){if(t.checkingRam)return G("getActionAutolevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("getActionAutolevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(P.a)(t,"getActionAutolevel");try{var a=Object(P.b)("getActionAutolevel",e,i);const n=k.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return t.log(a),!1;const r=k.a.bladeburner.getActionObject(n);return null==r?(t.log(a),!1):r.autoLevel}catch(e){throw Object(x.d)(t,Object(P.c)("getActionAutolevel",e))}},setActionAutolevel:function(e="",i="",a=!0){if(t.checkingRam)return G("setActionAutolevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("setActionAutolevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(P.a)(t,"setActionAutolevel");try{var r=Object(P.b)("setActionAutolevel",e,i);const n=k.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return void t.log(r);const o=k.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);o.autoLevel=a}catch(e){throw Object(x.d)(t,Object(P.c)("setActionAutolevel",e))}},setActionLevel:function(e="",i="",a=1){if(t.checkingRam)return G("setActionLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);n("setActionLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),Object(P.a)(t,"setActionLevel");try{var r=Object(P.b)("setActionLevel",e,i);const n=k.a.bladeburner.getActionIdFromTypeAndName(e,i);if(null==n)return void t.log(r);const o=k.a.bladeburner.getActionObject(n);if(null==o)return void t.log(r);if(a>o.maxLevel)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level exceeds max level for given action.`);if(a<1)return void t.log(`ERROR: bladeburner.${setActionLevel}() failed because level is below 1.`);o.level=a}catch(e){throw Object(x.d)(t,Object(P.c)("setActionLevel",e))}},getRank:function(){if(t.checkingRam)return G("getRank",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getRank",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.rank;throw Object(x.d)(t,"getRank() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillPoints:function(){if(t.checkingRam)return G("getSkillPoints",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillPoints",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.skillPoints;throw Object(x.d)(t,"getSkillPoints() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillLevel:function(e=""){if(t.checkingRam)return G("getSkillLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillLevel",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getSkillLevelNetscriptFn(e,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getSkillLevel() failed with exception: "+e)}throw Object(x.d)(t,"getSkillLevel() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getSkillUpgradeCost:function(e=""){if(t.checkingRam)return G("getSkillUpgradeCost",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getSkillUpgradeCost",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getSkillUpgradeCostNetscriptFn(e,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getSkillUpgradeCost() failed with exception: "+e)}throw Object(x.d)(t,"getSkillUpgradeCost() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},upgradeSkill:function(e){if(t.checkingRam)return G("upgradeSkill",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("upgradeSkill",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.upgradeSkillNetscriptFn(e,t)}catch(e){throw Object(x.d)(t,"Bladeburner.upgradeSkill() failed with exception: "+e)}throw Object(x.d)(t,"upgradeSkill() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getTeamSize:function(e="",i=""){if(t.checkingRam)return G("getTeamSize",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getTeamSize",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getTeamSizeNetscriptFn(e,i,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getTeamSize() failed with exception: "+e)}throw Object(x.d)(t,"getTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},setTeamSize:function(e="",i="",a){if(t.checkingRam)return G("setTeamSize",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("setTeamSize",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.setTeamSizeNetscriptFn(e,i,a,t)}catch(e){throw Object(x.d)(t,"Bladeburner.setTeamSize() failed with exception: "+e)}throw Object(x.d)(t,"setTeamSize() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedPopulation:function(e){if(t.checkingRam)return G("getCityEstimatedPopulation",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedPopulation",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getCityEstimatedPopulationNetscriptFn(e,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getCityEstimatedPopulation() failed with exception: "+e)}throw Object(x.d)(t,"getCityEstimatedPopulation() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityEstimatedCommunities:function(e){if(t.checkingRam)return G("getCityEstimatedCommunities",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityEstimatedCommunities",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getCityEstimatedCommunitiesNetscriptFn(e,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getCityEstimatedCommunities() failed with exception: "+e)}throw Object(x.d)(t,"getCityEstimatedCommunities() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCityChaos:function(e){if(t.checkingRam)return G("getCityChaos",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCityChaos",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.getCityChaosNetscriptFn(e,t)}catch(e){throw Object(x.d)(t,"Bladeburner.getCityChaos() failed with exception: "+e)}throw Object(x.d)(t,"getCityChaos() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getCity:function(){if(t.checkingRam)return G("getCity",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getCity",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.city}catch(e){throw Object(x.d)(t,"Bladeburner.getCity() failed with exception: "+e)}throw Object(x.d)(t,"getCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},switchCity:function(e){if(t.checkingRam)return G("switchCity",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("switchCity",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))try{return k.a.bladeburner.switchCityNetscriptFn(e,t)}catch(e){throw Object(x.d)(t,"Bladeburner.switchCity() failed with exception: "+e)}throw Object(x.d)(t,"switchCity() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getStamina:function(){if(t.checkingRam)return G("getStamina",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("getStamina",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return[k.a.bladeburner.stamina,k.a.bladeburner.maxStamina];throw Object(x.d)(t,"getStamina() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerFaction:function(){if(t.checkingRam)return G("joinBladeburnerFaction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerFaction",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),k.a.bladeburner instanceof s.a&&(7===k.a.bitNodeN||Y))return k.a.bladeburner.joinBladeburnerFactionNetscriptFn(t);throw Object(x.d)(t,"joinBladeburnerFaction() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},joinBladeburnerDivision:function(){if(t.checkingRam)return G("joinBladeburnerDivision",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost);if(n("joinBladeburnerDivision",h.CONSTANTS.ScriptBladeburnerApiBaseRamCost),7===k.a.bitNodeN||Y)return k.a.bladeburner instanceof s.a||(k.a.strength>=100&&k.a.defense>=100&&k.a.dexterity>=100&&k.a.agility>=100?(k.a.bladeburner=new s.a({new:!0}),t.log("You have been accepted into the Bladeburner division"),!0):(t.log("You do not meet the requirements for joining the Bladeburner division"),!1));throw Object(x.d)(t,"joinBladeburnerDivision() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")},getBonusTime:function(){if(t.checkingRam)return 0;if(7===k.a.bitNodeN||Y)return Math.round(k.a.bladeburner.storedCycles/5);throw Object(x.d)(t,"getBonusTime() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed at the Bladeburner division or because you do not have Source-File 7")}},codingcontract:{attempt:function(e,i,a=t.serverIp){if(t.checkingRam)return G("attempt",h.CONSTANTS.ScriptCodingContractBaseRamCost);n("attempt",h.CONSTANTS.ScriptCodingContractBaseRamCost);const r=Z(i,a);if(null==r)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${i} on server ${a}`),!1;e=String(e);const o=$(a,"codingcontract.attempt()");if(r.isSolution(e)){const e=k.a.gainCodingContractReward(r.reward,r.getDifficulty());return t.log(`Successfully completed Coding Contract ${i}. Reward: ${e}`),o.removeContract(i),!0}return++r.tries,r.tries>=r.getMaxNumTries()?(t.log(`Coding Contract ${i} failed. Contract is now self-destructing`),o.removeContract(i)):t.log(`Coding Contract ${i} failed. ${r.getMaxNumTries()-r.tries} attempts remaining`),!1},getContractType:function(e,i=t.serverIp){if(t.checkingRam)return G("getContractType",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getContractType",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);let a=Z(e,i);return null==a?(t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${i}`),null):a.getType()},getData:function(e,i=t.serverIp){if(t.checkingRam)return G("getData",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getData",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);let a=Z(e,i);if(null==a)return t.log(`ERROR: codingcontract.getData() failed because it could find the specified contract ${e} on server ${i}`),null;let r=a.getData();return r.constructor===Array?r.slice():r},getDescription:function(e,i=t.serverIp){if(t.checkingRam)return G("getDescription",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getDescription",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);var a=Z(e,i);return null==a?(t.log(`ERROR: codingcontract.getDescription() failed because it could find the specified contract ${e} on server ${i}`),""):a.getDescription()},getNumTriesRemaining:function(e,i=t.serverIp){if(t.checkingRam)return G("getNumTriesRemaining",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);n("getNumTriesRemaining",h.CONSTANTS.ScriptCodingContractBaseRamCost/2);var a=Z(e,i);return null==a?(t.log(`ERROR: codingcontract.getNumTriesRemaining() failed because it could find the specified contract ${e} on server ${i}`),-1):a.getMaxNumTries()-a.tries}}}}}).call(this,n(60))},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var i=n(9);function a(e){Object(i.dialogBoxCreate)("Caught an exception: "+e+"

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

Line Number: "+(e.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(e,t,n){"use strict";n.d(t,"a",function(){return a}),n.d(t,"b",function(){return r}),n.d(t,"f",function(){return l}),n.d(t,"e",function(){return c}),n.d(t,"g",function(){return p}),n.d(t,"h",function(){return h}),n.d(t,"c",function(){return o}),n.d(t,"d",function(){return s});var i=n(7);let a={},r={};function o(e){a=""===e?{}:JSON.parse(e)}function s(e){r=""===e?{}:JSON.parse(e)}function l(){for(var e in a)a.hasOwnProperty(e)&&Object(i.post)("alias "+e+"="+a[e]);for(var e in r)r.hasOwnProperty(e)&&Object(i.post)("global alias "+e+"="+r[e])}function c(e,t=!1){var n=e.match(/^([_|\w|!|%|,|@]+)="(.+)"$/);return null!=n&&3==n.length&&(t?function(e,t){e in a&&delete a[e];r[e]=t}(n[1],n[2]):function(e,t){e in r&&delete r[e];a[e]=t}(n[1],n[2]),!0)}function u(e){return r.hasOwnProperty(e)?r[e]:null}function p(e){return a.hasOwnProperty(e)?(delete a[e],!0):!!r.hasOwnProperty(e)&&(delete r[e],!0)}function h(e){var t,n=e.split(" ");if(n.length>0){if(null!=(r=(t=n[0],a.hasOwnProperty(t)?a[t]:null)))n[0]=r;else null!=(r=u(n[0]))&&(n[0]=r);for(var i=0;ie)return!1;if((n+=t[i+1])>=e)return!0}}function p(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&o.test(String.fromCharCode(e)):!1!==t&&u(e,l)))}function h(e,t){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&s.test(String.fromCharCode(e)):!1!==t&&(u(e,l)||u(e,c)))))}var d=function(e,t){void 0===t&&(t={}),this.label=e,this.keyword=t.keyword,this.beforeExpr=!!t.beforeExpr,this.startsExpr=!!t.startsExpr,this.isLoop=!!t.isLoop,this.isAssign=!!t.isAssign,this.prefix=!!t.prefix,this.postfix=!!t.postfix,this.binop=t.binop||null,this.updateContext=null};function m(e,t){return new d(e,{beforeExpr:!0,binop:t})}var g={beforeExpr:!0},_={startsExpr:!0},y={};function f(e,t){return void 0===t&&(t={}),t.keyword=e,y[e]=new d(e,t)}var b={num:new d("num",_),regexp:new d("regexp",_),string:new d("string",_),name:new d("name",_),eof:new d("eof"),bracketL:new d("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new d("]"),braceL:new d("{",{beforeExpr:!0,startsExpr:!0}),braceR:new d("}"),parenL:new d("(",{beforeExpr:!0,startsExpr:!0}),parenR:new d(")"),comma:new d(",",g),semi:new d(";",g),colon:new d(":",g),dot:new d("."),question:new d("?",g),arrow:new d("=>",g),template:new d("template"),ellipsis:new d("...",g),backQuote:new d("`",_),dollarBraceL:new d("${",{beforeExpr:!0,startsExpr:!0}),eq:new d("=",{beforeExpr:!0,isAssign:!0}),assign:new d("_=",{beforeExpr:!0,isAssign:!0}),incDec:new d("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new d("prefix",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:m("||",1),logicalAND:m("&&",2),bitwiseOR:m("|",3),bitwiseXOR:m("^",4),bitwiseAND:m("&",5),equality:m("==/!=",6),relational:m("",7),bitShift:m("<>",8),plusMin:new d("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:m("%",10),star:m("*",10),slash:m("/",10),starstar:new d("**",{beforeExpr:!0}),_break:f("break"),_case:f("case",g),_catch:f("catch"),_continue:f("continue"),_debugger:f("debugger"),_default:f("default",g),_do:f("do",{isLoop:!0,beforeExpr:!0}),_else:f("else",g),_finally:f("finally"),_for:f("for",{isLoop:!0}),_function:f("function",_),_if:f("if"),_return:f("return",g),_switch:f("switch"),_throw:f("throw",g),_try:f("try"),_var:f("var"),_const:f("const"),_while:f("while",{isLoop:!0}),_with:f("with"),_new:f("new",{beforeExpr:!0,startsExpr:!0}),_this:f("this",_),_super:f("super",_),_class:f("class"),_extends:f("extends",g),_export:f("export"),_import:f("import"),_null:f("null",_),_true:f("true",_),_false:f("false",_),_in:f("in",{beforeExpr:!0,binop:7}),_instanceof:f("instanceof",{beforeExpr:!0,binop:7}),_typeof:f("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:f("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:f("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},v=/\r\n?|\n|\u2028|\u2029/,E=new RegExp(v.source,"g");function k(e){return 10===e||13===e||8232===e||8233===e}var O=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/,C=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g,T=Object.prototype,S=T.hasOwnProperty,w=T.toString;function M(e,t){return S.call(e,t)}var P=Array.isArray||function(e){return"[object Array]"===w.call(e)},R=function(e,t){this.line=e,this.column=t};R.prototype.offset=function(e){return new R(this.line,this.column+e)};var A=function(e,t,n){this.start=t,this.end=n,null!==e.sourceFile&&(this.source=e.sourceFile)};function x(e,t){for(var n=1,i=0;;){E.lastIndex=i;var a=E.exec(e);if(!(a&&a.index=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),P(t.onToken)){var i=t.onToken;t.onToken=function(e){return i.push(e)}}return P(t.onComment)&&(t.onComment=function(e,t){return function(n,i,a,r,o,s){var l={type:n?"Block":"Line",value:i,start:a,end:r};e.locations&&(l.loc=new A(this,o,s)),e.ranges&&(l.range=[a,r]),t.push(l)}}(t,t.onComment)),t}var L={};function B(e){return new RegExp("^("+e.replace(/ /g,"|")+")$")}var D=function(e,n,a){this.options=e=I(e),this.sourceFile=e.sourceFile,this.keywords=B(i[e.ecmaVersion>=6?6:5]);var r="";if(!e.allowReserved){for(var o=e.ecmaVersion;!(r=t[o]);o--);"module"==e.sourceType&&(r+=" await")}this.reservedWords=B(r);var s=(r?r+" ":"")+t.strict;this.reservedWordsStrict=B(s),this.reservedWordsStrictBind=B(s+" "+t.strictBind),this.input=String(n),this.containsEsc=!1,this.loadPlugins(e.plugins),a?(this.pos=a,this.lineStart=this.input.lastIndexOf("\n",a-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(v).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=b.eof,this.value=null,this.start=this.end=this.pos,this.startLoc=this.endLoc=this.curPosition(),this.lastTokEndLoc=this.lastTokStartLoc=null,this.lastTokStart=this.lastTokEnd=this.pos,this.context=this.initialContext(),this.exprAllowed=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.inFunction=this.inGenerator=this.inAsync=!1,this.yieldPos=this.awaitPos=0,this.labels=[],0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterFunctionScope()};D.prototype.isKeyword=function(e){return this.keywords.test(e)},D.prototype.isReservedWord=function(e){return this.reservedWords.test(e)},D.prototype.extend=function(e,t){this[e]=t(this[e])},D.prototype.loadPlugins=function(e){for(var t in e){var n=L[t];if(!n)throw new Error("Plugin '"+t+"' not found");n(this,e[t])}},D.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)};var j=D.prototype,W=/^(?:'((?:[^']|\.)*)'|"((?:[^"]|\.)*)"|;)/;j.strictDirective=function(e){for(;;){C.lastIndex=e,e+=C.exec(this.input)[0].length;var t=W.exec(this.input.slice(e));if(!t)return!1;if("use strict"==(t[1]||t[2]))return!0;e+=t[0].length}},j.eat=function(e){return this.type===e&&(this.next(),!0)},j.isContextual=function(e){return this.type===b.name&&this.value===e},j.eatContextual=function(e){return this.value===e&&this.eat(b.name)},j.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},j.canInsertSemicolon=function(){return this.type===b.eof||this.type===b.braceR||v.test(this.input.slice(this.lastTokEnd,this.start))},j.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},j.semicolon=function(){this.eat(b.semi)||this.insertSemicolon()||this.unexpected()},j.afterTrailingComma=function(e,t){if(this.type==e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},j.expect=function(e){this.eat(e)||this.unexpected()},j.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var F=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=-1};j.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var n=t?e.parenthesizedAssign:e.parenthesizedBind;n>-1&&this.raiseRecoverable(n,"Parenthesized pattern")}},j.checkExpressionErrors=function(e,t){var n=e?e.shorthandAssign:-1;if(!t)return n>=0;n>-1&&this.raise(n,"Shorthand property assignments are valid only in destructuring patterns")},j.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos=6&&(e.sourceType=this.options.sourceType),this.finishNode(e,"Program")};var H={kind:"loop"},G={kind:"switch"};U.isLet=function(){if(this.type!==b.name||this.options.ecmaVersion<6||"let"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length,n=this.input.charCodeAt(t);if(91===n||123==n)return!0;if(p(n,!0)){for(var i=t+1;h(this.input.charCodeAt(i),!0);)++i;var a=this.input.slice(t,i);if(!this.isKeyword(a))return!0}return!1},U.isAsyncFunction=function(){if(this.type!==b.name||this.options.ecmaVersion<8||"async"!=this.value)return!1;C.lastIndex=this.pos;var e=C.exec(this.input),t=this.pos+e[0].length;return!(v.test(this.input.slice(this.pos,t))||"function"!==this.input.slice(t,t+8)||t+8!=this.input.length&&h(this.input.charAt(t+8)))},U.parseStatement=function(e,t,n){var i,a=this.type,r=this.startNode();switch(this.isLet()&&(a=b._var,i="let"),a){case b._break:case b._continue:return this.parseBreakContinueStatement(r,a.keyword);case b._debugger:return this.parseDebuggerStatement(r);case b._do:return this.parseDoStatement(r);case b._for:return this.parseForStatement(r);case b._function:return!e&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(r,!1);case b._class:return e||this.unexpected(),this.parseClass(r,!0);case b._if:return this.parseIfStatement(r);case b._return:return this.parseReturnStatement(r);case b._switch:return this.parseSwitchStatement(r);case b._throw:return this.parseThrowStatement(r);case b._try:return this.parseTryStatement(r);case b._const:case b._var:return i=i||this.value,e||"var"==i||this.unexpected(),this.parseVarStatement(r,i);case b._while:return this.parseWhileStatement(r);case b._with:return this.parseWithStatement(r);case b.braceL:return this.parseBlock();case b.semi:return this.parseEmptyStatement(r);case b._export:case b._import:return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),a===b._import?this.parseImport(r):this.parseExport(r,n);default:if(this.isAsyncFunction()&&e)return this.next(),this.parseFunctionStatement(r,!0);var o=this.value,s=this.parseExpression();return a===b.name&&"Identifier"===s.type&&this.eat(b.colon)?this.parseLabeledStatement(r,o,s):this.parseExpressionStatement(r,s)}},U.parseBreakContinueStatement=function(e,t){var n="break"==t;this.next(),this.eat(b.semi)||this.insertSemicolon()?e.label=null:this.type!==b.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var i=0;i=6?this.eat(b.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},U.parseForStatement=function(e){if(this.next(),this.labels.push(H),this.enterLexicalScope(),this.expect(b.parenL),this.type===b.semi)return this.parseFor(e,null);var t=this.isLet();if(this.type===b._var||this.type===b._const||t){var n=this.startNode(),i=t?"let":this.value;return this.next(),this.parseVar(n,!0,i),this.finishNode(n,"VariableDeclaration"),!(this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of"))||1!==n.declarations.length||"var"!==i&&n.declarations[0].init?this.parseFor(e,n):this.parseForIn(e,n)}var a=new F,r=this.parseExpression(!0,a);return this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of")?(this.toAssignable(r),this.checkLVal(r),this.checkPatternErrors(a,!0),this.parseForIn(e,r)):(this.checkExpressionErrors(a,!0),this.parseFor(e,r))},U.parseFunctionStatement=function(e,t){return this.next(),this.parseFunction(e,!0,!1,t)},U.isFunction=function(){return this.type===b._function||this.isAsyncFunction()},U.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement(!this.strict&&this.isFunction()),e.alternate=this.eat(b._else)?this.parseStatement(!this.strict&&this.isFunction()):null,this.finishNode(e,"IfStatement")},U.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(b.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},U.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(b.braceL),this.labels.push(G),this.enterLexicalScope();for(var n=!1;this.type!=b.braceR;)if(this.type===b._case||this.type===b._default){var i=this.type===b._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),i?t.test=this.parseExpression():(n&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),n=!0,t.test=null),this.expect(b.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(!0));return this.exitLexicalScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},U.parseThrowStatement=function(e){return this.next(),v.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var K=[];U.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===b._catch){var t=this.startNode();this.next(),this.expect(b.parenL),t.param=this.parseBindingAtom(),this.enterLexicalScope(),this.checkLVal(t.param,"let"),this.expect(b.parenR),t.body=this.parseBlock(!1),this.exitLexicalScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(b._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},U.parseVarStatement=function(e,t){return this.next(),this.parseVar(e,!1,t),this.semicolon(),this.finishNode(e,"VariableDeclaration")},U.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(H),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"WhileStatement")},U.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement(!1),this.finishNode(e,"WithStatement")},U.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},U.parseLabeledStatement=function(e,t,n){for(var i=0;i=0;r--){var o=this.labels[r];if(o.statementStart!=e.start)break;o.statementStart=this.start,o.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(!0),("ClassDeclaration"==e.body.type||"VariableDeclaration"==e.body.type&&"var"!=e.body.kind||"FunctionDeclaration"==e.body.type&&(this.strict||e.body.generator))&&this.raiseRecoverable(e.body.start,"Invalid labeled declaration"),this.labels.pop(),e.label=n,this.finishNode(e,"LabeledStatement")},U.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},U.parseBlock=function(e){void 0===e&&(e=!0);var t=this.startNode();for(t.body=[],this.expect(b.braceL),e&&this.enterLexicalScope();!this.eat(b.braceR);){var n=this.parseStatement(!0);t.body.push(n)}return e&&this.exitLexicalScope(),this.finishNode(t,"BlockStatement")},U.parseFor=function(e,t){return e.init=t,this.expect(b.semi),e.test=this.type===b.semi?null:this.parseExpression(),this.expect(b.semi),e.update=this.type===b.parenR?null:this.parseExpression(),this.expect(b.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,"ForStatement")},U.parseForIn=function(e,t){var n=this.type===b._in?"ForInStatement":"ForOfStatement";return this.next(),e.left=t,e.right=this.parseExpression(),this.expect(b.parenR),this.exitLexicalScope(),e.body=this.parseStatement(!1),this.labels.pop(),this.finishNode(e,n)},U.parseVar=function(e,t,n){for(e.declarations=[],e.kind=n;;){var i=this.startNode();if(this.parseVarId(i,n),this.eat(b.eq)?i.init=this.parseMaybeAssign(t):"const"!==n||this.type===b._in||this.options.ecmaVersion>=6&&this.isContextual("of")?"Identifier"==i.id.type||t&&(this.type===b._in||this.isContextual("of"))?i.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(i,"VariableDeclarator")),!this.eat(b.comma))break}return e},U.parseVarId=function(e,t){e.id=this.parseBindingAtom(t),this.checkLVal(e.id,t,!1)},U.parseFunction=function(e,t,n,i){this.initFunction(e),this.options.ecmaVersion>=6&&!i&&(e.generator=this.eat(b.star)),this.options.ecmaVersion>=8&&(e.async=!!i),t&&(e.id="nullableID"===t&&this.type!=b.name?null:this.parseIdent(),e.id&&this.checkLVal(e.id,"var"));var a=this.inGenerator,r=this.inAsync,o=this.yieldPos,s=this.awaitPos,l=this.inFunction;return this.inGenerator=e.generator,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),t||(e.id=this.type==b.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,n),this.inGenerator=a,this.inAsync=r,this.yieldPos=o,this.awaitPos=s,this.inFunction=l,this.finishNode(e,t?"FunctionDeclaration":"FunctionExpression")},U.parseFunctionParams=function(e){this.expect(b.parenL),e.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8,!0),this.checkYieldAwaitInDefaultParams()},U.parseClass=function(e,t){this.next(),this.parseClassId(e,t),this.parseClassSuper(e);var n=this.startNode(),i=!1;for(n.body=[],this.expect(b.braceL);!this.eat(b.braceR);)if(!this.eat(b.semi)){var a=this.startNode(),r=this.eat(b.star),o=!1,s=this.type===b.name&&"static"===this.value;this.parsePropertyName(a),a.static=s&&this.type!==b.parenL,a.static&&(r&&this.unexpected(),r=this.eat(b.star),this.parsePropertyName(a)),this.options.ecmaVersion>=8&&!r&&!a.computed&&"Identifier"===a.key.type&&"async"===a.key.name&&this.type!==b.parenL&&!this.canInsertSemicolon()&&(o=!0,this.parsePropertyName(a)),a.kind="method";var l=!1;if(!a.computed){var c=a.key;r||o||"Identifier"!==c.type||this.type===b.parenL||"get"!==c.name&&"set"!==c.name||(l=!0,a.kind=c.name,c=this.parsePropertyName(a)),!a.static&&("Identifier"===c.type&&"constructor"===c.name||"Literal"===c.type&&"constructor"===c.value)&&(i&&this.raise(c.start,"Duplicate constructor in the same class"),l&&this.raise(c.start,"Constructor can't have get/set modifier"),r&&this.raise(c.start,"Constructor can't be a generator"),o&&this.raise(c.start,"Constructor can't be an async method"),a.kind="constructor",i=!0)}if(this.parseClassMethod(n,a,r,o),l){var u="get"===a.kind?0:1;if(a.value.params.length!==u){var p=a.value.start;"get"===a.kind?this.raiseRecoverable(p,"getter should have no params"):this.raiseRecoverable(p,"setter should have exactly one param")}else"set"===a.kind&&"RestElement"===a.value.params[0].type&&this.raiseRecoverable(a.value.params[0].start,"Setter cannot use rest params")}}return e.body=this.finishNode(n,"ClassBody"),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},U.parseClassMethod=function(e,t,n,i){t.value=this.parseMethod(n,i),e.body.push(this.finishNode(t,"MethodDefinition"))},U.parseClassId=function(e,t){e.id=this.type===b.name?this.parseIdent():!0===t?this.unexpected():null},U.parseClassSuper=function(e){e.superClass=this.eat(b._extends)?this.parseExprSubscripts():null},U.parseExport=function(e,t){if(this.next(),this.eat(b.star))return this.expectContextual("from"),e.source=this.type===b.string?this.parseExprAtom():this.unexpected(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration");if(this.eat(b._default)){var n;if(this.checkExport(t,"default",this.lastTokStart),this.type===b._function||(n=this.isAsyncFunction())){var i=this.startNode();this.next(),n&&this.next(),e.declaration=this.parseFunction(i,"nullableID",!1,n)}else if(this.type===b._class){var a=this.startNode();e.declaration=this.parseClass(a,"nullableID")}else e.declaration=this.parseMaybeAssign(),this.semicolon();return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement())e.declaration=this.parseStatement(!0),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id.name,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))e.source=this.type===b.string?this.parseExprAtom():this.unexpected();else{for(var r=0;r=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&this.raise(e.start,"Can not use 'await' as identifier inside an async function");break;case"ObjectPattern":case"ArrayPattern":break;case"ObjectExpression":e.type="ObjectPattern";for(var n=0;n=6&&(e.computed||e.method||e.shorthand))){var n,i=e.key;switch(i.type){case"Identifier":n=i.name;break;case"Literal":n=String(i.value);break;default:return}var a=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===a&&(t.proto&&this.raiseRecoverable(i.start,"Redefinition of __proto__ property"),t.proto=!0);else{var r=t[n="$"+n];r?("init"===a?this.strict&&r.init||r.get||r.set:r.init||r[a])&&this.raiseRecoverable(i.start,"Redefinition of property"):r=t[n]={init:!1,get:!1,set:!1},r[a]=!0}}},$.parseExpression=function(e,t){var n=this.start,i=this.startLoc,a=this.parseMaybeAssign(e,t);if(this.type===b.comma){var r=this.startNodeAt(n,i);for(r.expressions=[a];this.eat(b.comma);)r.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(r,"SequenceExpression")}return a},$.parseMaybeAssign=function(e,t,n){if(this.inGenerator&&this.isContextual("yield"))return this.parseYield();var i=!1,a=-1,r=-1;t?(a=t.parenthesizedAssign,r=t.trailingComma,t.parenthesizedAssign=t.trailingComma=-1):(t=new F,i=!0);var o=this.start,s=this.startLoc;this.type!=b.parenL&&this.type!=b.name||(this.potentialArrowAt=this.start);var l=this.parseMaybeConditional(e,t);if(n&&(l=n.call(this,l,o,s)),this.type.isAssign){this.checkPatternErrors(t,!0),i||F.call(t);var c=this.startNodeAt(o,s);return c.operator=this.value,c.left=this.type===b.eq?this.toAssignable(l):l,t.shorthandAssign=-1,this.checkLVal(l),this.next(),c.right=this.parseMaybeAssign(e),this.finishNode(c,"AssignmentExpression")}return i&&this.checkExpressionErrors(t,!0),a>-1&&(t.parenthesizedAssign=a),r>-1&&(t.trailingComma=r),l},$.parseMaybeConditional=function(e,t){var n=this.start,i=this.startLoc,a=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return a;if(this.eat(b.question)){var r=this.startNodeAt(n,i);return r.test=a,r.consequent=this.parseMaybeAssign(),this.expect(b.colon),r.alternate=this.parseMaybeAssign(e),this.finishNode(r,"ConditionalExpression")}return a},$.parseExprOps=function(e,t){var n=this.start,i=this.startLoc,a=this.parseMaybeUnary(t,!1);return this.checkExpressionErrors(t)?a:a.start==n&&"ArrowFunctionExpression"===a.type?a:this.parseExprOp(a,n,i,-1,e)},$.parseExprOp=function(e,t,n,i,a){var r=this.type.binop;if(null!=r&&(!a||this.type!==b._in)&&r>i){var o=this.type===b.logicalOR||this.type===b.logicalAND,s=this.value;this.next();var l=this.start,c=this.startLoc,u=this.parseExprOp(this.parseMaybeUnary(null,!1),l,c,r,a),p=this.buildBinary(t,n,e,u,s,o);return this.parseExprOp(p,t,n,i,a)}return e},$.buildBinary=function(e,t,n,i,a,r){var o=this.startNodeAt(e,t);return o.left=n,o.operator=a,o.right=i,this.finishNode(o,r?"LogicalExpression":"BinaryExpression")},$.parseMaybeUnary=function(e,t){var n,i=this.start,a=this.startLoc;if(this.inAsync&&this.isContextual("await"))n=this.parseAwait(e),t=!0;else if(this.type.prefix){var r=this.startNode(),o=this.type===b.incDec;r.operator=this.value,r.prefix=!0,this.next(),r.argument=this.parseMaybeUnary(null,!0),this.checkExpressionErrors(e,!0),o?this.checkLVal(r.argument):this.strict&&"delete"===r.operator&&"Identifier"===r.argument.type?this.raiseRecoverable(r.start,"Deleting local variable in strict mode"):t=!0,n=this.finishNode(r,o?"UpdateExpression":"UnaryExpression")}else{if(n=this.parseExprSubscripts(e),this.checkExpressionErrors(e))return n;for(;this.type.postfix&&!this.canInsertSemicolon();){var s=this.startNodeAt(i,a);s.operator=this.value,s.prefix=!1,s.argument=n,this.checkLVal(n),this.next(),n=this.finishNode(s,"UpdateExpression")}}return!t&&this.eat(b.starstar)?this.buildBinary(i,a,n,this.parseMaybeUnary(null,!1),"**",!1):n},$.parseExprSubscripts=function(e){var t=this.start,n=this.startLoc,i=this.parseExprAtom(e),a="ArrowFunctionExpression"===i.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd);if(this.checkExpressionErrors(e)||a)return i;var r=this.parseSubscripts(i,t,n);return e&&"MemberExpression"===r.type&&(e.parenthesizedAssign>=r.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=r.start&&(e.parenthesizedBind=-1)),r},$.parseSubscripts=function(e,t,n,i){for(var a,r=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd==e.end&&!this.canInsertSemicolon();;)if((a=this.eat(b.bracketL))||this.eat(b.dot)){var o=this.startNodeAt(t,n);o.object=e,o.property=a?this.parseExpression():this.parseIdent(!0),o.computed=!!a,a&&this.expect(b.bracketR),e=this.finishNode(o,"MemberExpression")}else if(!i&&this.eat(b.parenL)){var s=new F,l=this.yieldPos,c=this.awaitPos;this.yieldPos=0,this.awaitPos=0;var u=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1,s);if(r&&!this.canInsertSemicolon()&&this.eat(b.arrow))return this.checkPatternErrors(s,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=l,this.awaitPos=c,this.parseArrowExpression(this.startNodeAt(t,n),u,!0);this.checkExpressionErrors(s,!0),this.yieldPos=l||this.yieldPos,this.awaitPos=c||this.awaitPos;var p=this.startNodeAt(t,n);p.callee=e,p.arguments=u,e=this.finishNode(p,"CallExpression")}else{if(this.type!==b.backQuote)return e;var h=this.startNodeAt(t,n);h.tag=e,h.quasi=this.parseTemplate(),e=this.finishNode(h,"TaggedTemplateExpression")}},$.parseExprAtom=function(e){var t,n=this.potentialArrowAt==this.start;switch(this.type){case b._super:this.inFunction||this.raise(this.start,"'super' outside of function or class");case b._this:var i=this.type===b._this?"ThisExpression":"Super";return t=this.startNode(),this.next(),this.finishNode(t,i);case b.name:var a=this.start,r=this.startLoc,o=this.parseIdent(this.type!==b.name);if(this.options.ecmaVersion>=8&&"async"===o.name&&!this.canInsertSemicolon()&&this.eat(b._function))return this.parseFunction(this.startNodeAt(a,r),!1,!1,!0);if(n&&!this.canInsertSemicolon()){if(this.eat(b.arrow))return this.parseArrowExpression(this.startNodeAt(a,r),[o],!1);if(this.options.ecmaVersion>=8&&"async"===o.name&&this.type===b.name)return o=this.parseIdent(),!this.canInsertSemicolon()&&this.eat(b.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(a,r),[o],!0)}return o;case b.regexp:var s=this.value;return(t=this.parseLiteral(s.value)).regex={pattern:s.pattern,flags:s.flags},t;case b.num:case b.string:return this.parseLiteral(this.value);case b._null:case b._true:case b._false:return(t=this.startNode()).value=this.type===b._null?null:this.type===b._true,t.raw=this.type.keyword,this.next(),this.finishNode(t,"Literal");case b.parenL:var l=this.start,c=this.parseParenAndDistinguishExpression(n);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(c)&&(e.parenthesizedAssign=l),e.parenthesizedBind<0&&(e.parenthesizedBind=l)),c;case b.bracketL:return t=this.startNode(),this.next(),t.elements=this.parseExprList(b.bracketR,!0,!0,e),this.finishNode(t,"ArrayExpression");case b.braceL:return this.parseObj(!1,e);case b._function:return t=this.startNode(),this.next(),this.parseFunction(t,!1);case b._class:return this.parseClass(this.startNode(),!1);case b._new:return this.parseNew();case b.backQuote:return this.parseTemplate();default:this.unexpected()}},$.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),this.next(),this.finishNode(t,"Literal")},$.parseParenExpression=function(){this.expect(b.parenL);var e=this.parseExpression();return this.expect(b.parenR),e},$.parseParenAndDistinguishExpression=function(e){var t,n=this.start,i=this.startLoc,a=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var r,o,s=this.start,l=this.startLoc,c=[],u=!0,p=!1,h=new F,d=this.yieldPos,m=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==b.parenR;){if(u?u=!1:this.expect(b.comma),a&&this.afterTrailingComma(b.parenR,!0)){p=!0;break}if(this.type===b.ellipsis){r=this.start,c.push(this.parseParenItem(this.parseRest())),this.type===b.comma&&this.raise(this.start,"Comma is not permitted after the rest element");break}this.type!==b.parenL||o||(o=this.start),c.push(this.parseMaybeAssign(!1,h,this.parseParenItem))}var g=this.start,_=this.startLoc;if(this.expect(b.parenR),e&&!this.canInsertSemicolon()&&this.eat(b.arrow))return this.checkPatternErrors(h,!1),this.checkYieldAwaitInDefaultParams(),o&&this.unexpected(o),this.yieldPos=d,this.awaitPos=m,this.parseParenArrowList(n,i,c);c.length&&!p||this.unexpected(this.lastTokStart),r&&this.unexpected(r),this.checkExpressionErrors(h,!0),this.yieldPos=d||this.yieldPos,this.awaitPos=m||this.awaitPos,c.length>1?((t=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(t,"SequenceExpression",g,_)):t=c[0]}else t=this.parseParenExpression();if(this.options.preserveParens){var y=this.startNodeAt(n,i);return y.expression=t,this.finishNode(y,"ParenthesizedExpression")}return t},$.parseParenItem=function(e){return e},$.parseParenArrowList=function(e,t,n){return this.parseArrowExpression(this.startNodeAt(e,t),n)};var Y=[];$.parseNew=function(){var e=this.startNode(),t=this.parseIdent(!0);if(this.options.ecmaVersion>=6&&this.eat(b.dot))return e.meta=t,e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is new.target"),this.inFunction||this.raiseRecoverable(e.start,"new.target can only be used in functions"),this.finishNode(e,"MetaProperty");var n=this.start,i=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(),n,i,!0),this.eat(b.parenL)?e.arguments=this.parseExprList(b.parenR,this.options.ecmaVersion>=8,!1):e.arguments=Y,this.finishNode(e,"NewExpression")},$.parseTemplateElement=function(){var e=this.startNode();return e.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),e.tail=this.type===b.backQuote,this.finishNode(e,"TemplateElement")},$.parseTemplate=function(){var e=this.startNode();this.next(),e.expressions=[];var t=this.parseTemplateElement();for(e.quasis=[t];!t.tail;)this.expect(b.dollarBraceL),e.expressions.push(this.parseExpression()),this.expect(b.braceR),e.quasis.push(t=this.parseTemplateElement());return this.next(),this.finishNode(e,"TemplateLiteral")},$.parseObj=function(e,t){var n=this.startNode(),i=!0,a={};for(n.properties=[],this.next();!this.eat(b.braceR);){if(i)i=!1;else if(this.expect(b.comma),this.afterTrailingComma(b.braceR))break;var r,o,s,l,c=this.startNode();this.options.ecmaVersion>=6&&(c.method=!1,c.shorthand=!1,(e||t)&&(s=this.start,l=this.startLoc),e||(r=this.eat(b.star))),this.parsePropertyName(c),e||!(this.options.ecmaVersion>=8)||r||c.computed||"Identifier"!==c.key.type||"async"!==c.key.name||this.type===b.parenL||this.type===b.colon||this.canInsertSemicolon()?o=!1:(o=!0,this.parsePropertyName(c,t)),this.parsePropertyValue(c,e,r,o,s,l,t),this.checkPropClash(c,a),n.properties.push(this.finishNode(c,"Property"))}return this.finishNode(n,e?"ObjectPattern":"ObjectExpression")},$.parsePropertyValue=function(e,t,n,i,a,r,o){if((n||i)&&this.type===b.colon&&this.unexpected(),this.eat(b.colon))e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,o),e.kind="init";else if(this.options.ecmaVersion>=6&&this.type===b.parenL)t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(n,i);else if(this.options.ecmaVersion>=5&&!e.computed&&"Identifier"===e.key.type&&("get"===e.key.name||"set"===e.key.name)&&this.type!=b.comma&&this.type!=b.braceR){(n||i||t)&&this.unexpected(),e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var s="get"===e.kind?0:1;if(e.value.params.length!==s){var l=e.value.start;"get"===e.kind?this.raiseRecoverable(l,"getter should have no params"):this.raiseRecoverable(l,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}else this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((this.keywords.test(e.key.name)||(this.strict?this.reservedWordsStrict:this.reservedWords).test(e.key.name)||this.inGenerator&&"yield"==e.key.name||this.inAsync&&"await"==e.key.name)&&this.raiseRecoverable(e.key.start,"'"+e.key.name+"' can not be used as shorthand property"),e.kind="init",t?e.value=this.parseMaybeDefault(a,r,e.key):this.type===b.eq&&o?(o.shorthandAssign<0&&(o.shorthandAssign=this.start),e.value=this.parseMaybeDefault(a,r,e.key)):e.value=e.key,e.shorthand=!0):this.unexpected()},$.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(b.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(b.bracketR),e.key;e.computed=!1}return e.key=this.type===b.num||this.type===b.string?this.parseExprAtom():this.parseIdent(!0)},$.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=!1,e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},$.parseMethod=function(e,t){var n=this.startNode(),i=this.inGenerator,a=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.inGenerator=n.generator,this.inAsync=n.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,this.enterFunctionScope(),this.expect(b.parenL),n.params=this.parseBindingList(b.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1),this.inGenerator=i,this.inAsync=a,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(n,"FunctionExpression")},$.parseArrowExpression=function(e,t,n){var i=this.inGenerator,a=this.inAsync,r=this.yieldPos,o=this.awaitPos,s=this.inFunction;return this.enterFunctionScope(),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!n),this.inGenerator=!1,this.inAsync=e.async,this.yieldPos=0,this.awaitPos=0,this.inFunction=!0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0),this.inGenerator=i,this.inAsync=a,this.yieldPos=r,this.awaitPos=o,this.inFunction=s,this.finishNode(e,"ArrowFunctionExpression")},$.parseFunctionBody=function(e,t){var n=t&&this.type!==b.braceL,i=this.strict,a=!1;if(n)e.body=this.parseMaybeAssign(),e.expression=!0,this.checkParams(e,!1);else{var r=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!r||(a=this.strictDirective(this.end))&&r&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var o=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!i&&!a&&!t&&this.isSimpleParamList(e.params)),e.body=this.parseBlock(!1),e.expression=!1,this.labels=o}this.exitFunctionScope(),this.strict&&e.id&&this.checkLVal(e.id,"none"),this.strict=i},$.isSimpleParamList=function(e){for(var t=0;t=6||-1==this.input.slice(this.start,this.end).indexOf("\\"))&&this.raiseRecoverable(this.start,"The keyword '"+this.value+"' is reserved"),this.inGenerator&&"yield"===this.value&&this.raiseRecoverable(this.start,"Can not use 'yield' as identifier inside a generator"),this.inAsync&&"await"===this.value&&this.raiseRecoverable(this.start,"Can not use 'await' as identifier inside an async function"),t.name=this.value):e&&this.type.keyword?t.name=this.type.keyword:this.unexpected(),this.next(),this.finishNode(t,"Identifier")},$.parseYield=function(){this.yieldPos||(this.yieldPos=this.start);var e=this.startNode();return this.next(),this.type==b.semi||this.canInsertSemicolon()||this.type!=b.star&&!this.type.startsExpr?(e.delegate=!1,e.argument=null):(e.delegate=this.eat(b.star),e.argument=this.parseMaybeAssign()),this.finishNode(e,"YieldExpression")},$.parseAwait=function(){this.awaitPos||(this.awaitPos=this.start);var e=this.startNode();return this.next(),e.argument=this.parseMaybeUnary(null,!0),this.finishNode(e,"AwaitExpression")};var z=D.prototype;z.raise=function(e,t){var n=x(this.input,e);t+=" ("+n.line+":"+n.column+")";var i=new SyntaxError(t);throw i.pos=e,i.loc=n,i.raisedAt=this.pos,i},z.raiseRecoverable=z.raise,z.curPosition=function(){if(this.options.locations)return new R(this.curLine,this.pos-this.lineStart)};var V=D.prototype,J=Object.assign||function(e){for(var t=[],n=arguments.length-1;n-- >0;)t[n]=arguments[n+1];for(var i=0;i=0;e--)if(this.context[e].generator)return!0;return!1},ne.updateContext=function(e){var t,n=this.type;n.keyword&&e==b.dot?this.exprAllowed=!1:(t=n.updateContext)?t.call(this,e):this.exprAllowed=n.beforeExpr},b.parenR.updateContext=b.braceR.updateContext=function(){if(1!=this.context.length){var e,t=this.context.pop();t===te.b_stat&&(e=this.curContext())&&"function"===e.token?(this.context.pop(),this.exprAllowed=!1):this.exprAllowed=t===te.b_tmpl||!t.isExpr}else this.exprAllowed=!0},b.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?te.b_stat:te.b_expr),this.exprAllowed=!0},b.dollarBraceL.updateContext=function(){this.context.push(te.b_tmpl),this.exprAllowed=!0},b.parenL.updateContext=function(e){var t=e===b._if||e===b._for||e===b._with||e===b._while;this.context.push(t?te.p_stat:te.p_expr),this.exprAllowed=!0},b.incDec.updateContext=function(){},b._function.updateContext=function(e){e.beforeExpr&&e!==b.semi&&e!==b._else&&(e!==b.colon&&e!==b.braceL||this.curContext()!==te.b_stat)&&this.context.push(te.f_expr),this.exprAllowed=!1},b.backQuote.updateContext=function(){this.curContext()===te.q_tmpl?this.context.pop():this.context.push(te.q_tmpl),this.exprAllowed=!1},b.star.updateContext=function(e){e==b._function&&(this.curContext()===te.f_expr?this.context[this.context.length-1]=te.f_expr_gen:this.context.push(te.f_gen)),this.exprAllowed=!0},b.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&("of"==this.value&&!this.exprAllowed||"yield"==this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ie=function(e){this.type=e.type,this.value=e.value,this.start=e.start,this.end=e.end,e.options.locations&&(this.loc=new A(e,e.startLoc,e.endLoc)),e.options.ranges&&(this.range=[e.start,e.end])},ae=D.prototype,re="object"==typeof Packages&&"[object JavaPackage]"==Object.prototype.toString.call(Packages);function oe(e,t,n,i){try{return new RegExp(e,t)}catch(e){if(void 0!==n)throw e instanceof SyntaxError&&i.raise(n,"Error parsing regular expression: "+e.message),e}}ae.next=function(){this.options.onToken&&this.options.onToken(new ie(this)),this.lastTokEnd=this.end,this.lastTokStart=this.start,this.lastTokEndLoc=this.endLoc,this.lastTokStartLoc=this.startLoc,this.nextToken()},ae.getToken=function(){return this.next(),new ie(this)},"undefined"!=typeof Symbol&&(ae[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===b.eof,value:t}}}}),ae.curContext=function(){return this.context[this.context.length-1]},ae.nextToken=function(){var e=this.curContext();return e&&e.preserveSpace||this.skipSpace(),this.start=this.pos,this.options.locations&&(this.startLoc=this.curPosition()),this.pos>=this.input.length?this.finishToken(b.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},ae.readToken=function(e){return p(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},ae.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=57344)return e;var t=this.input.charCodeAt(this.pos+1);return(e<<10)+t-56613888},ae.skipBlockComment=function(){var e,t=this.options.onComment&&this.curPosition(),n=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(-1===i&&this.raise(this.pos-2,"Unterminated comment"),this.pos=i+2,this.options.locations)for(E.lastIndex=n;(e=E.exec(this.input))&&e.index8&&e<14||e>=5760&&O.test(String.fromCharCode(e))))break e;++this.pos}}},ae.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var n=this.type;this.type=e,this.value=t,this.updateContext(n)},ae.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(b.ellipsis)):(++this.pos,this.finishToken(b.dot))},ae.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(b.assign,2):this.finishOp(b.slash,1)},ae.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),n=1,i=42===e?b.star:b.modulo;return this.options.ecmaVersion>=7&&42===t&&(++n,i=b.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(b.assign,n+1):this.finishOp(i,n)},ae.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.finishOp(124===e?b.logicalOR:b.logicalAND,2):61===t?this.finishOp(b.assign,2):this.finishOp(124===e?b.bitwiseOR:b.bitwiseAND,1)},ae.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);return 61===e?this.finishOp(b.assign,2):this.finishOp(b.bitwiseXOR,1)},ae.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45==t&&62==this.input.charCodeAt(this.pos+2)&&v.test(this.input.slice(this.lastTokEnd,this.pos))?(this.skipLineComment(3),this.skipSpace(),this.nextToken()):this.finishOp(b.incDec,2):61===t?this.finishOp(b.assign,2):this.finishOp(b.plusMin,1)},ae.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),n=1;return t===e?(n=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+n)?this.finishOp(b.assign,n+1):this.finishOp(b.bitShift,n)):33==t&&60==e&&45==this.input.charCodeAt(this.pos+2)&&45==this.input.charCodeAt(this.pos+3)?(this.inModule&&this.unexpected(),this.skipLineComment(4),this.skipSpace(),this.nextToken()):(61===t&&(n=2),this.finishOp(b.relational,n))},ae.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(b.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(b.arrow)):this.finishOp(61===e?b.eq:b.prefix,1)},ae.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(b.parenL);case 41:return++this.pos,this.finishToken(b.parenR);case 59:return++this.pos,this.finishToken(b.semi);case 44:return++this.pos,this.finishToken(b.comma);case 91:return++this.pos,this.finishToken(b.bracketL);case 93:return++this.pos,this.finishToken(b.bracketR);case 123:return++this.pos,this.finishToken(b.braceL);case 125:return++this.pos,this.finishToken(b.braceR);case 58:return++this.pos,this.finishToken(b.colon);case 63:return++this.pos,this.finishToken(b.question);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(b.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)return this.readRadixNumber(2)}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(!1);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 126:return this.finishOp(b.prefix,1)}this.raise(this.pos,"Unexpected character '"+le(e)+"'")},ae.finishOp=function(e,t){var n=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,n)};var se=!!oe("￿","u");function le(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}ae.readRegexp=function(){for(var e,t,n=this,i=this.pos;;){n.pos>=n.input.length&&n.raise(i,"Unterminated regular expression");var a=n.input.charAt(n.pos);if(v.test(a)&&n.raise(i,"Unterminated regular expression"),e)e=!1;else{if("["===a)t=!0;else if("]"===a&&t)t=!1;else if("/"===a&&!t)break;e="\\"===a}++n.pos}var r=this.input.slice(i,this.pos);++this.pos;var o=this.readWord1(),s=r,l="";if(o){var c=/^[gim]*$/;this.options.ecmaVersion>=6&&(c=/^[gimuy]*$/),c.test(o)||this.raise(i,"Invalid regular expression flag"),o.indexOf("u")>=0&&(se?l="u":(s=(s=s.replace(/\\u\{([0-9a-fA-F]+)\}/g,function(e,t,a){return(t=Number("0x"+t))>1114111&&n.raise(i+a+3,"Code point out of bounds"),"x"})).replace(/\\u([a-fA-F0-9]{4})|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"x"),l=l.replace("u","")))}var u=null;return re||(oe(s,l,i,this),u=oe(r,o)),this.finishToken(b.regexp,{pattern:r,flags:o,value:u})},ae.readInt=function(e,t){for(var n=this.pos,i=0,a=0,r=null==t?1/0:t;a=97?s-97+10:s>=65?s-65+10:s>=48&&s<=57?s-48:1/0)>=e)break;++this.pos,i=i*e+o}return this.pos===n||null!=t&&this.pos-n!==t?null:i},ae.readRadixNumber=function(e){this.pos+=2;var t=this.readInt(e);return null==t&&this.raise(this.start+2,"Expected number in radix "+e),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(b.num,t)},ae.readNumber=function(e){var t=this.pos,n=!1,i=48===this.input.charCodeAt(this.pos);e||null!==this.readInt(10)||this.raise(t,"Invalid number"),i&&this.pos==t+1&&(i=!1);var a=this.input.charCodeAt(this.pos);46!==a||i||(++this.pos,this.readInt(10),n=!0,a=this.input.charCodeAt(this.pos)),69!==a&&101!==a||i||(43!==(a=this.input.charCodeAt(++this.pos))&&45!==a||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number"),n=!0),p(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var r,o=this.input.slice(t,this.pos);return n?r=parseFloat(o):i&&1!==o.length?/[89]/.test(o)||this.strict?this.raise(t,"Invalid number"):r=parseInt(o,8):r=parseInt(o,10),this.finishToken(b.num,r)},ae.readCodePoint=function(){var e,t=this.input.charCodeAt(this.pos);if(123===t){this.options.ecmaVersion<6&&this.unexpected();var n=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.raise(n,"Code point out of bounds")}else e=this.readHexChar(4);return e},ae.readString=function(e){for(var t="",n=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var i=this.input.charCodeAt(this.pos);if(i===e)break;92===i?(t+=this.input.slice(n,this.pos),t+=this.readEscapedChar(!1),n=this.pos):(k(i)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(n,this.pos++),this.finishToken(b.string,t)},ae.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var n=this.input.charCodeAt(this.pos);if(96===n||36===n&&123===this.input.charCodeAt(this.pos+1))return this.pos===this.start&&this.type===b.template?36===n?(this.pos+=2,this.finishToken(b.dollarBraceL)):(++this.pos,this.finishToken(b.backQuote)):(e+=this.input.slice(t,this.pos),this.finishToken(b.template,e));if(92===n)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(k(n)){switch(e+=this.input.slice(t,this.pos),++this.pos,n){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(n)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},ae.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);switch(++this.pos,t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return le(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:return this.options.locations&&(this.lineStart=this.pos,++this.curLine),"";default:if(t>=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],i=parseInt(n,8);return i>255&&(n=n.slice(0,-1),i=parseInt(n,8)),"0"!==n&&(this.strict||e)&&this.raise(this.pos-2,"Octal literal in strict mode"),this.pos+=n.length-1,String.fromCharCode(i)}return String.fromCharCode(t)}},ae.readHexChar=function(e){var t=this.pos,n=this.readInt(16,e);return null===n&&this.raise(t,"Bad character escape sequence"),n},ae.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,n=this.pos,i=this.options.ecmaVersion>=6;this.pos1?1:i<0?0:i}function o(e){null==e.baseDifficulty&&(e.baseDifficulty=e.hackDifficulty);var t=3;return(t+=e.baseDifficulty*a.a.hacking_exp_mult*.3)*i.BitNodeMultipliers.HackExpGain}function s(e){const t=(100-e.hackDifficulty)/100*((a.a.hacking_skill-(e.requiredHackingSkill-1))/a.a.hacking_skill)*a.a.hacking_money_mult/240;return t<0?0:t>1?1:t*i.BitNodeMultipliers.ScriptHackMoney}function l(e,t,n){const i=e.requiredHackingSkill*e.hackDifficulty;null==t&&(t=a.a.hacking_skill),null==n&&(n=a.a.intelligence);var r=2.5*i+500;return 5*(r/=t+50+.1*n)/a.a.hacking_speed_mult}function c(e,t,n){return 3.2*l(e,t,n)}function u(e,t,n){return 4*l(e,t,n)}},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return k}),n.d(t,"d",function(){return O}),n.d(t,"c",function(){return C}),n.d(t,"b",function(){return T});var i=n(125),a=n(124),r=n(8),o=n(12),s=n(4),l=n(9),c=n(14),u=n(32),p=n(71),h=n(2),d=n(39),m=n(13),g=n(3),_=n(42),y=n(15),f=n(27),b=n(65),v=n(20);n(17);e(document).keydown(function(e){if(m.routing.isOn(m.Page.Gang)&&e.altKey){if(null!=B.gangMemberFilter&&B.gangMemberFilter===document.activeElement)return;e.keyCode===u.KEY[1]?"block"===B.gangTerritorySubpage.style.display&&B.managementButton.click():e.keyCode===u.KEY[2]&&"block"===B.gangManagementSubpage.style.display&&B.territoryButton.click()}}),e(document).mousedown(function(t){B.gangMemberUpgradeBoxOpened&&null==e(t.target).closest("#gang-member-upgrade-popup-box-content").get(0)&&(Object(b.removeElement)(B.gangMemberUpgradeBox),B.gangMemberUpgradeBox=null,B.gangMemberUpgradeBoxContent=null,B.gangMemberUpgradeBoxOpened=!1,B.gangMemberUpgradeBoxElements=null)});let E=["Slum Snakes","Tetrads","The Syndicate","The Dark Army","Speakers for the Dead","NiteSec","The Black Hand"],k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}};function O(){k={"Slum Snakes":{power:1,territory:1/7},Tetrads:{power:1,territory:1/7},"The Syndicate":{power:1,territory:1/7},"The Dark Army":{power:1,territory:1/7},"Speakers for the Dead":{power:1,territory:1/7},NiteSec:{power:1,territory:1/7},"The Black Hand":{power:1,territory:1/7}}}function C(e){k=JSON.parse(e,c.Reviver)}function T(e,t=!1){this.facName=e,this.members=[],this.wanted=1,this.respect=1,this.isHackingGang=t,this.respectGainRate=0,this.wantedGainRate=0,this.moneyGainRate=0,this.storedCycles=0,this.storedTerritoryAndPowerCycles=0,this.territoryClashChance=0,this.territoryWarfareEngaged=!1,this.notifyMemberDeath=!0}function S(e){this.name=e,this.task="Unassigned",this.earnedRespect=0,this.hack=1,this.str=1,this.def=1,this.dex=1,this.agi=1,this.cha=1,this.hack_exp=0,this.str_exp=0,this.def_exp=0,this.dex_exp=0,this.agi_exp=0,this.cha_exp=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,this.hack_asc_mult=1,this.str_asc_mult=1,this.def_asc_mult=1,this.dex_asc_mult=1,this.agi_asc_mult=1,this.cha_asc_mult=1,this.upgrades=[],this.augmentations=[]}function w(e="",t="",n=!1,i=!1,a={baseRespect:0,baseWanted:0,baseMoney:0,hackWeight:0,strWeight:0,defWeight:0,dexWeight:0,agiWeight:0,chaWeight:0,difficulty:0}){this.name=e,this.desc=t,this.isHacking=n,this.isCombat=i,this.baseRespect=a.baseRespect?a.baseRespect:0,this.baseWanted=a.baseWanted?a.baseWanted:0,this.baseMoney=a.baseMoney?a.baseMoney:0,this.hackWeight=a.hackWeight?a.hackWeight:0,this.strWeight=a.strWeight?a.strWeight:0,this.defWeight=a.defWeight?a.defWeight:0,this.dexWeight=a.dexWeight?a.dexWeight:0,this.agiWeight=a.agiWeight?a.agiWeight:0,this.chaWeight=a.chaWeight?a.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=a.difficulty?a.difficulty:1,this.territory=a.territory?a.territory:{money:1,respect:1,wanted:1}}T.prototype.getPower=function(){return k[this.facName].power},T.prototype.getTerritory=function(){return k[this.facName].territory},T.prototype.process=function(e=1,t){const n=1e3/r.Engine._idleSpeed;if(isNaN(e)&&console.error(`NaN passed into Gang.process(): ${e}`),this.storedCycles+=e,this.storedCycles<2*n)return;const i=Math.min(this.storedCycles,5*n);try{this.processGains(i,t),this.processExperienceGains(i),this.processTerritoryAndPowerGains(i),this.storedCycles-=i}catch(e){Object(_.a)(`Exception caught when processing Gang: ${e}`)}},T.prototype.processGains=function(e=1,t){for(var n=0,i=0,a=0,r=0;rt&&(n=1),this.wanted=n,this.wanted<1&&(this.wanted=1)}else console.warn("ERROR: wantedLevelGains is NaN");"number"==typeof n?t.gainMoney(n*e):console.warn("ERROR: respectGains is NaN")},T.prototype.processTerritoryAndPowerGains=function(e=1){if(this.storedTerritoryAndPowerCycles+=e,!(this.storedTerritoryAndPowerCycles<100)){this.storedTerritoryAndPowerCycles-=100;var t=this.facName;for(const e in k)if(k.hasOwnProperty(e))if(e==t)k[e].power+=this.calculatePower();else{const t=Math.random();if(t<.5){const t=.005*k[e].power;k[e].power+=Math.min(.85,t)}else{const n=.75*t*k[e].territory;k[e].power+=n}}this.territoryWarfareEngaged?this.territoryClashChance=1:this.territoryClashChance>0&&(this.territoryClashChance=Math.max(0,this.territoryClashChance-.01));for(var n=0;ne!==n),i=Object(y.getRandomInt)(0,e.length-1),a=E[n],r=e[i];if(!(a!==t&&r!==t||Math.random()=30)&&this.respect>=this.getRespectNeededToRecruitMember()},T.prototype.getRespectNeededToRecruitMember=function(){if(this.members.length<3)return 0;const e=this.members.length-2;return Math.round(.9*Math.pow(e,3)+Math.pow(e,2))},T.prototype.recruitMember=function(e){if(""===(e=String(e))||!this.canRecruitMember())return!1;if(this.members.filter(t=>t.name===e).length>=1)return!1;let t=new S(e);return this.members.push(t),m.routing.isOn(m.Page.Gang)&&(this.createGangMemberDisplayElement(t),this.updateGangContent()),!0},T.prototype.getWantedPenalty=function(){return this.respect/(this.respect+this.wanted)},T.prototype.processExperienceGains=function(e=1){for(var t=0;t=0;--e){const n=this.members[e];if("Territory Warfare"!==n.task)continue;const i=t/Math.pow(n.def,.6);Math.random()")):t.log(`Ascended Gang member ${e.name}`),m.routing.isOn(m.Page.Gang)&&this.displayGangMemberList(),n}catch(e){if(null!=t)throw e;Object(_.a)(e)}},T.prototype.getDiscount=function(){const e=this.getPower(),t=this.respect,n=Math.pow(t,.01)+t/5e6+Math.pow(e,.01)+e/1e6-1;return Math.max(1,n)},T.prototype.getAllTaskNames=function(){let e=[];const t=Object.keys(M);return e=this.isHackingGang?t.filter(e=>{let t=M[e];return null!=t&&("Unassigned"!==e&&t.isHacking)}):t.filter(e=>{let t=M[e];return null!=t&&("Unassigned"!==e&&t.isCombat)})},T.prototype.getAllUpgradeNames=function(){return Object.keys(L)},T.prototype.getUpgradeCost=function(e){return null==L[e]?1/0:L[e].getCost(this)},T.prototype.getUpgradeType=function(e){const t=L[e];if(null==t)return"";switch(t.type){case"w":return"Weapon";case"a":return"Armor";case"v":return"Vehicle";case"r":return"Rootkit";case"g":return"Augmentation";default:return""}},T.prototype.toJSON=function(){return Object(c.Generic_toJSON)("Gang",this)},T.fromJSON=function(e){return Object(c.Generic_fromJSON)(T,e.data)},c.Reviver.constructors.Gang=T,S.prototype.calculateSkill=function(e,t=1){return Math.max(Math.floor(t*(32*Math.log(e+534.5)-200)),1)},S.prototype.updateSkillLevels=function(){this.hack=this.calculateSkill(this.hack_exp,this.hack_mult*this.hack_asc_mult),this.str=this.calculateSkill(this.str_exp,this.str_mult*this.str_asc_mult),this.def=this.calculateSkill(this.def_exp,this.def_mult*this.def_asc_mult),this.dex=this.calculateSkill(this.dex_exp,this.dex_mult*this.dex_asc_mult),this.agi=this.calculateSkill(this.agi_exp,this.agi_mult*this.agi_asc_mult),this.cha=this.calculateSkill(this.cha_exp,this.cha_mult*this.cha_asc_mult)},S.prototype.calculatePower=function(){return(this.hack+this.str+this.def+this.dex+this.agi+this.cha)/95},S.prototype.assignToTask=function(e){return M.hasOwnProperty(e)?(this.task=e,!0):(this.task="Unassigned",!1)},S.prototype.unassignFromTask=function(){this.task="Unassigned"},S.prototype.getTask=function(){return this.task instanceof w&&(this.task=this.task.name),M.hasOwnProperty(this.task)?M[this.task]:M.Unassigned},S.prototype.calculateRespectGain=function(e){const t=this.getTask();if(null==t||!(t instanceof w)||0===t.baseRespect)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=4*t.difficulty)<=0)return 0;const i=Math.pow(100*k[e.facName].territory,t.territory.respect)/100;if(isNaN(i)||i<=0)return 0;var a=e.getWantedPenalty();return 11*t.baseRespect*n*i*a},S.prototype.calculateWantedLevelGain=function(e){const t=this.getTask();if(null==t||!(t instanceof w)||0===t.baseWanted)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.5*t.difficulty)<=0)return 0;const i=Math.pow(100*k[e.facName].territory,t.territory.wanted)/100;return isNaN(i)||i<=0?0:t.baseWanted<0?.5*t.baseWanted*n*i:7*t.baseWanted/Math.pow(3*n*i,.8)},S.prototype.calculateMoneyGain=function(e){const t=this.getTask();if(null==t||!(t instanceof w)||0===t.baseMoney)return 0;var n=t.hackWeight/100*this.hack+t.strWeight/100*this.str+t.defWeight/100*this.def+t.dexWeight/100*this.dex+t.agiWeight/100*this.agi+t.chaWeight/100*this.cha;if((n-=3.2*t.difficulty)<=0)return 0;const i=Math.pow(100*k[e.facName].territory,t.territory.money)/100;if(isNaN(i)||i<=0)return 0;var a=e.getWantedPenalty();return 5*t.baseMoney*n*i*a},S.prototype.gainExperience=function(e=1){const t=this.getTask();if(null==t||!(t instanceof w)||t===M.Unassigned)return;const n=Math.pow(t.difficulty,.9)*e;this.hack_exp+=t.hackWeight/1500*n,this.str_exp+=t.strWeight/1500*n,this.def_exp+=t.defWeight/1500*n,this.dex_exp+=t.dexWeight/1500*n,this.agi_exp+=t.agiWeight/1500*n,this.cha_exp+=t.chaWeight/1500*n},S.prototype.recordEarnedRespect=function(e=1,t){this.earnedRespect+=this.calculateRespectGain(t)*e},S.prototype.ascend=function(){const e=this.getAscensionResults(),t=e.hack,n=e.str,i=e.def,a=e.dex,r=e.agi,o=e.cha;this.hack_asc_mult+=t,this.str_asc_mult+=n,this.def_asc_mult+=i,this.dex_asc_mult+=a,this.agi_asc_mult+=r,this.cha_asc_mult+=o,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 e=0;e{P=e.name,R=e.desc,A=e.isHacking,x=e.isCombat,N=e.params,M[P]=new w(P,R,A,x,N)}),I.prototype.getCost=function(e){const t=e.getDiscount();return this.cost/t},I.prototype.createDescription=function(){const e=["Increases:"];null!=this.mults.str&&e.push(`* Strength by ${Math.round(100*(this.mults.str-1))}%`),null!=this.mults.def&&e.push(`* Defense by ${Math.round(100*(this.mults.def-1))}%`),null!=this.mults.dex&&e.push(`* Dexterity by ${Math.round(100*(this.mults.dex-1))}%`),null!=this.mults.agi&&e.push(`* Agility by ${Math.round(100*(this.mults.agi-1))}%`),null!=this.mults.cha&&e.push(`* Charisma by ${Math.round(100*(this.mults.cha-1))}%`),null!=this.mults.hack&&e.push(`* Hacking by ${Math.round(100*(this.mults.hack-1))}%`),this.desc=e.join("
")},I.prototype.apply=function(e){null!=this.mults.str&&(e.str_mult*=this.mults.str),null!=this.mults.def&&(e.def_mult*=this.mults.def),null!=this.mults.dex&&(e.dex_mult*=this.mults.dex),null!=this.mults.agi&&(e.agi_mult*=this.mults.agi),null!=this.mults.cha&&(e.cha_mult*=this.mults.cha),null!=this.mults.hack&&(e.hack_mult*=this.mults.hack)},I.prototype.toJSON=function(){return Object(c.Generic_toJSON)("GangMemberUpgrade",this)},I.fromJSON=function(e){return Object(c.Generic_fromJSON)(I,e.data)},c.Reviver.constructors.GangMemberUpgrade=I;const L={};a.gangMemberUpgradesMetadata.forEach(e=>{!function(e,t,n,i){L[e]=new I(e,t,n,i)}(e.name,e.cost,e.upgType,e.mults)}),T.prototype.createGangMemberUpgradeBox=function(e,t=""){const n="gang-member-upgrade-popup-box";if(B.gangMemberUpgradeBoxOpened){if(null==B.gangMemberUpgradeBoxElements||null==B.gangMemberUpgradeBox||null==B.gangMemberUpgradeBoxContent)return void console.error("Refreshing Gang member upgrade box throws error because required elements are null");for(var i=2;i-1||this.members[i].task.indexOf(a)>-1){var r=this.members[i].createGangMemberUpgradePanel(this,e);B.gangMemberUpgradeBoxContent.appendChild(r),B.gangMemberUpgradeBoxElements.push(r)}}else{B.gangMemberUpgradeBoxFilter=Object(h.createElement)("input",{type:"text",placeholder:"Filter gang members",value:t,onkeyup:()=>{var t=B.gangMemberUpgradeBoxFilter.value.toString();this.createGangMemberUpgradeBox(e,t)}}),B.gangMemberUpgradeBoxDiscount=Object(h.createElement)("p",{innerText:"Discount: -"+s.a.format(1-1/this.getDiscount(),"0.00%"),marginLeft:"6px",tooltip:"You get a discount on equipment and upgrades based on your gang's respect and power. More respect and power leads to more discounts."}),B.gangMemberUpgradeBoxElements=[B.gangMemberUpgradeBoxFilter,B.gangMemberUpgradeBoxDiscount];for(a=B.gangMemberUpgradeBoxFilter.value.toString(),i=0;i-1||this.members[i].task.indexOf(a)>-1)&&B.gangMemberUpgradeBoxElements.push(this.members[i].createGangMemberUpgradePanel(this,e));B.gangMemberUpgradeBox=Object(d.createPopup)(n,B.gangMemberUpgradeBoxElements),B.gangMemberUpgradeBoxContent=document.getElementById(n+"-content"),B.gangMemberUpgradeBoxOpened=!0}},S.prototype.createGangMemberUpgradePanel=function(e,t){var n=Object(h.createElement)("div",{border:"1px solid white"}),i=Object(h.createElement)("h1",{innerText:this.name+" ("+this.task+")"});n.appendChild(i);var a=Object(h.createElement)("pre",{fontSize:"14px",display:"inline-block",width:"20%",innerText:"Hack: "+this.hack+" (x"+Object(g.formatNumber)(this.hack_mult*this.hack_asc_mult,2)+")\nStr: "+this.str+" (x"+Object(g.formatNumber)(this.str_mult*this.str_asc_mult,2)+")\nDef: "+this.def+" (x"+Object(g.formatNumber)(this.def_mult*this.def_asc_mult,2)+")\nDex: "+this.dex+" (x"+Object(g.formatNumber)(this.dex_mult*this.dex_asc_mult,2)+")\nAgi: "+this.agi+" (x"+Object(g.formatNumber)(this.agi_mult*this.agi_asc_mult,2)+")\nCha: "+this.cha+" (x"+Object(g.formatNumber)(this.cha_mult*this.cha_asc_mult,2)+")\n"});const r=[];function o(e){const t=L[e];null!=t?r.push(Object(h.createElement)("div",{class:"gang-owned-upgrade",innerText:e,tooltip:t.desc})):console.error(`Could not find GangMemberUpgrade object for name ${e}`)}for(const e of this.upgrades)o(e);for(const e of this.augmentations)o(e);var l=Object(h.createElement)("div",{class:"gang-owned-upgrades-div",innerText:"Purchased Upgrades:"});for(const e of r)l.appendChild(e);n.appendChild(a),n.appendChild(l),n.appendChild(Object(h.createElement)("br",{}));const c=[],u=[],p=[],d=[],m=[];for(let n in L)if(L.hasOwnProperty(n)){let i=L[n];if(t.money.lt(i.getCost(e)))continue;if(this.upgrades.includes(n)||this.augmentations.includes(n))continue;switch(i.type){case"w":c.push(i);break;case"a":u.push(i);break;case"v":p.push(i);break;case"r":d.push(i);break;case"g":m.push(i);break;default:console.error(`ERROR: Invalid Gang Member Upgrade Type: ${i.type}`)}}const _=Object(h.createElement)("div",{width:"20%",display:"inline-block"}),y=Object(h.createElement)("div",{width:"20%",display:"inline-block"}),f=Object(h.createElement)("div",{width:"20%",display:"inline-block"}),b=Object(h.createElement)("div",{width:"20%",display:"inline-block"}),v=Object(h.createElement)("div",{width:"20%",display:"inline-block"});_.appendChild(Object(h.createElement)("h2",{innerText:"Weapons"})),y.appendChild(Object(h.createElement)("h2",{innerText:"Armor"})),f.appendChild(Object(h.createElement)("h2",{innerText:"Vehicles"})),b.appendChild(Object(h.createElement)("h2",{innerText:"Rootkits"})),v.appendChild(Object(h.createElement)("h2",{innerText:"Augmentations"}));const E=[c,u,p,d,m],k=[_,y,f,b,v];for(let n=0;n(a.buyUpgrade(n,t,e),!1)};r>=3?l.tooltipleft=n.desc:l.tooltip=n.desc,i.appendChild(Object(h.createElement)("a",l))}(i[r],a,this,n,e)}}return n.appendChild(_),n.appendChild(y),n.appendChild(f),n.appendChild(b),n.appendChild(v),n};const B={gangContentCreated:!1,gangContainer:null,managementButton:null,territoryButton:null,gangManagementSubpage:null,gangTerritorySubpage:null,gangDesc:null,gangInfo:null,gangRecruitMemberButton:null,gangRecruitRequirementText:null,gangExpandAllButton:null,gangCollapseAllButton:null,gangMemberFilter:null,gangManageEquipmentButton:null,gangMemberList:null,gangMemberPanels:{},gangMemberUpgradeBoxOpened:!1,gangMemberUpgradeBox:null,gangMemberUpgradeBoxContent:null,gangMemberUpgradeBoxFilter:null,gangMemberUpgradeBoxDiscount:null,gangMemberUpgradeBoxElements:null,gangTerritoryDescText:null,gangTerritoryWarfareCheckbox:null,gangTerritoryWarfareCheckboxLabel:null,gangTerritoryWarfareClashChance:null,gangTerritoryDeathNotifyCheckbox:null,gangTerritoryDeathNotifyCheckboxLabel:null,gangTerritoryInfoText:null};T.prototype.displayGangContent=function(e){if(!B.gangContentCreated||null==B.gangContainer){B.gangContentCreated=!0,B.gangContainer=Object(h.createElement)("div",{id:"gang-container",class:"generic-menupage-container"});var t=this.facName;this.members,this.wanted,this.respect;B.gangContainer.appendChild(Object(h.createElement)("a",{class:"a-link-button",display:"inline-block",innerText:"Back",clickListener:()=>(r.Engine.loadFactionContent(),Object(o.c)(t),!1)})),B.managementButton=Object(h.createElement)("a",{id:"gang-management-subpage-button",class:"a-link-button-inactive",display:"inline-block",innerHTML:"Gang Management (Alt+1)",clickListener:()=>(B.gangManagementSubpage.style.display="block",B.gangTerritorySubpage.style.display="none",B.managementButton.classList.toggle("a-link-button-inactive"),B.managementButton.classList.toggle("a-link-button"),B.territoryButton.classList.toggle("a-link-button-inactive"),B.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),B.territoryButton=Object(h.createElement)("a",{id:"gang-territory-subpage-button",class:"a-link-button",display:"inline-block",innerHTML:"Gang Territory (Alt+2)",clickListener:()=>(B.gangManagementSubpage.style.display="none",B.gangTerritorySubpage.style.display="block",B.managementButton.classList.toggle("a-link-button-inactive"),B.managementButton.classList.toggle("a-link-button"),B.territoryButton.classList.toggle("a-link-button-inactive"),B.territoryButton.classList.toggle("a-link-button"),this.updateGangContent(),!1)}),B.gangContainer.appendChild(B.managementButton),B.gangContainer.appendChild(B.territoryButton),B.gangManagementSubpage=Object(h.createElement)("div",{display:"block",id:"gang-management-subpage"});var n="";n=this.isHackingGang?"Ethical Hacking":"Vigilante Justice",B.gangDesc=Object(h.createElement)("p",{width:"70%",innerHTML:"This page is used to manage your gang members and get an overview of your gang's stats.

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 '"+n+"' task to lower your wanted level.

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.

You can also manage your gang programmatically through Netscript using the Gang API"}),B.gangManagementSubpage.appendChild(B.gangDesc),B.gangInfo=Object(h.createElement)("p",{id:"gang-info",width:"70%"}),B.gangManagementSubpage.appendChild(B.gangInfo),B.gangRecruitMemberButton=Object(h.createElement)("a",{id:"gang-management-recruit-member-btn",class:"a-link-button-inactive",innerHTML:"Recruit Gang Member",display:"inline-block",margin:"10px",clickListener:()=>{const e="recruit-gang-member-popup";let t;const n=Object(h.createElement)("p",{innerText:"Please enter a name for your new Gang member:"}),i=Object(h.createElement)("br"),a=Object(h.createElement)("input",{onkeyup:e=>{e.keyCode===u.KEY.ENTER&&t.click()},placeholder:"Name must be unique",type:"text"});t=Object(h.createElement)("a",{class:"std-button",clickListener:()=>{let t=a.value;return""===t?(Object(l.dialogBoxCreate)("You must enter a name for your Gang member!"),!1):this.canRecruitMember()?this.recruitMember(t)?(Object(v.removeElementById)(e),!1):(Object(l.dialogBoxCreate)("You already have a gang member with this name!"),!1):(Object(l.dialogBoxCreate)("You cannot recruit another Gang member!"),!1)},innerText:"Recruit Gang Member"});const r=Object(h.createElement)("a",{class:"std-button",clickListener:()=>(Object(v.removeElementById)(e),!1),innerText:"Cancel"});Object(d.createPopup)(e,[n,i,a,t,r])}}),B.gangManagementSubpage.appendChild(B.gangRecruitMemberButton),B.gangRecruitRequirementText=Object(h.createElement)("p",{color:"red",id:"gang-recruit-requirement-text",margin:"10px"}),B.gangManagementSubpage.appendChild(B.gangRecruitRequirementText),B.gangManagementSubpage.appendChild(Object(h.createElement)("br",{})),B.gangExpandAllButton=Object(h.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Expand All",clickListener:()=>{for(var e=B.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t{for(var e=B.gangManagementSubpage.getElementsByClassName("accordion-header"),t=0;t{this.displayGangMemberList()}}),B.gangManageEquipmentButton=Object(h.createElement)("a",{class:"a-link-button",display:"inline-block",innerHTML:"Manage Equipment",clickListener:()=>{this.createGangMemberUpgradeBox(e)}}),B.gangManagementSubpage.appendChild(B.gangExpandAllButton),B.gangManagementSubpage.appendChild(B.gangCollapseAllButton),B.gangManagementSubpage.appendChild(B.gangMemberFilter),B.gangManagementSubpage.appendChild(B.gangManageEquipmentButton),B.gangMemberList=Object(h.createElement)("ul",{id:"gang-member-list"}),this.displayGangMemberList(),B.gangManagementSubpage.appendChild(B.gangMemberList),B.gangTerritorySubpage=Object(h.createElement)("div",{id:"gang-territory-subpage",display:"none"}),B.gangTerritoryDescText=Object(h.createElement)("p",{width:"70%",innerHTML:"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.

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

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.

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.

"}),B.gangTerritorySubpage.appendChild(B.gangTerritoryDescText),B.gangTerritoryWarfareCheckbox=Object(h.createElement)("input",{display:"inline-block",id:"gang-management-territory-warfare-checkbox",changeListener:()=>{this.territoryWarfareEngaged=B.gangTerritoryWarfareCheckbox.checked},margin:"2px",type:"checkbox"}),B.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,B.gangTerritoryWarfareCheckboxLabel=Object(h.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-territory-warfare-checkbox",innerText:"Engage in Territory Warfare",tooltip:"Engaging in Territory Warfare sets your clash chance to 100%. Disengaging will cause your clash chance to gradually decrease until it reaches 0%"}),B.gangTerritorySubpage.appendChild(B.gangTerritoryWarfareCheckbox),B.gangTerritorySubpage.appendChild(B.gangTerritoryWarfareCheckboxLabel),B.gangTerritorySubpage.appendChild(Object(h.createElement)("br")),B.gangTerritoryWarfareClashChance=Object(h.createElement)("p",{display:"inline-block"}),B.gangTerritorySubpage.appendChild(B.gangTerritoryWarfareClashChance),B.gangTerritorySubpage.appendChild(Object(h.createElement)("div",{class:"help-tip",display:"inline-block",innerText:"?",clickListener:()=>{Object(l.dialogBoxCreate)("This percentage represents the chance you have of 'clashing' with with another gang. If you do not wish to gain/lose territory, then keep this percentage at 0% by not engaging in territory warfare.")}})),B.gangTerritoryDeathNotifyCheckbox=Object(h.createElement)("input",{display:"inline-block",id:"gang-management-notify-member-death-checkbox",changeListener:()=>{this.notifyMemberDeath=B.gangTerritoryDeathNotifyCheckbox.checked},margin:"2px",type:"checkbox"}),B.gangTerritoryDeathNotifyCheckbox.checked=this.notifyMemberDeath,B.gangTerritoryDeathNotifyCheckboxLabel=Object(h.createElement)("label",{color:"white",display:"inline-block",for:"gang-management-notify-member-death-checkbox",innerText:"Notify about Gang Member Deaths",tooltip:"If this is enabled, then you will receive a pop-up notifying you whenever one of your Gang Members dies in a territory clash."}),B.gangTerritorySubpage.appendChild(Object(h.createElement)("br")),B.gangTerritorySubpage.appendChild(B.gangTerritoryDeathNotifyCheckbox),B.gangTerritorySubpage.appendChild(B.gangTerritoryDeathNotifyCheckboxLabel),B.gangTerritorySubpage.appendChild(Object(h.createElement)("br"));var i=Object(h.createElement)("fieldset",{display:"block",margin:"6px",width:"50%"});B.gangTerritoryInfoText=Object(h.createElement)("p"),i.appendChild(B.gangTerritoryInfoText),B.gangTerritorySubpage.appendChild(i),B.gangContainer.appendChild(B.gangTerritorySubpage),B.gangContainer.appendChild(B.gangManagementSubpage),document.getElementById("entire-game-container").appendChild(B.gangContainer)}B.gangContainer.style.display="block",this.updateGangContent()},T.prototype.displayGangMemberList=function(){Object(f.removeChildrenFromElement)(B.gangMemberList),B.gangMemberPanels={};const e=this.members,t=B.gangMemberFilter.value.toString();for(var n=0;n-1||e[n].task.indexOf(t)>-1)&&this.createGangMemberDisplayElement(e[n])},T.prototype.updateGangContent=function(){if(B.gangContentCreated)if(B.gangMemberUpgradeBoxOpened&&(B.gangMemberUpgradeBoxDiscount.childNodes[0].nodeValue="Discount: -"+s.a.format(1-1/this.getDiscount(),"0.00%")),"block"===B.gangTerritorySubpage.style.display){B.gangTerritoryWarfareClashChance.innerText=`Territory Clash Chance: ${s.a.format(this.territoryClashChance,"0.000%")}`,B.gangTerritoryWarfareCheckbox.checked=this.territoryWarfareEngaged,B.gangTerritoryInfoText.innerHTML="";const e=k[this.facName].power;for(const t in k)if(k.hasOwnProperty(t)){const n=k[t];let i,a=100*n.territory;if(i=a<=0?Object(g.formatNumber)(0,2):a>=100?Object(g.formatNumber)(100,2):Object(g.formatNumber)(a,2),t===this.facName){let e=`${t}
Power: ${Object(g.formatNumber)(n.power,6)}
`;e+=`Territory: ${i}%

`,B.gangTerritoryInfoText.innerHTML+=e}else{const a=e/(n.power+e);let r=`${t}
Power: ${Object(g.formatNumber)(n.power,6)}
`;r+=`Territory: ${i}%
`,r+=`Chance to win clash with this gang: ${s.a.format(a,"0.000%")}

`,B.gangTerritoryInfoText.innerHTML+=r}}}else{if(B.gangInfo instanceof Element){var e,t=o.b[this.facName];e=t instanceof o.a?t.playerReputation:"ERROR",Object(f.removeChildrenFromElement)(B.gangInfo),B.gangInfo.appendChild(Object(h.createElement)("p",{display:"inline-block",innerText:"Respect: "+Object(g.formatNumber)(this.respect,6)+" ("+Object(g.formatNumber)(5*this.respectGainRate,6)+" / sec)",tooltip:"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."})),B.gangInfo.appendChild(Object(h.createElement)("br")),B.gangInfo.appendChild(Object(h.createElement)("p",{display:"inline-block",innerText:"Wanted Level: "+Object(g.formatNumber)(this.wanted,6)+" ("+Object(g.formatNumber)(5*this.wantedGainRate,6)+" / sec)",tooltip:"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."})),B.gangInfo.appendChild(Object(h.createElement)("br"));var n=this.getWantedPenalty();n=100*(1-n),B.gangInfo.appendChild(Object(h.createElement)("p",{display:"inline-block",innerText:`Wanted Level Penalty: -${Object(g.formatNumber)(n,2)}%`,tooltip:"Penalty for respect and money gain rates due to Wanted Level"})),B.gangInfo.appendChild(Object(h.createElement)("br")),B.gangInfo.appendChild(Object(h.createElement)("p",{display:"inline-block",innerText:`Money gain rate: ${s.a.format(5*this.moneyGainRate,"$0.000a")} / sec`})),B.gangInfo.appendChild(Object(h.createElement)("br"));var i=100*k[this.facName].territory;let a;a=i<=0?Object(g.formatNumber)(0,2):i>=100?Object(g.formatNumber)(100,2):Object(g.formatNumber)(i,2),B.gangInfo.appendChild(Object(h.createElement)("p",{display:"inline-block",innerText:`Territory: ${Object(g.formatNumber)(a,3)}%`,tooltip:"The percentage of total territory your Gang controls"})),B.gangInfo.appendChild(Object(h.createElement)("br")),B.gangInfo.appendChild(Object(h.createElement)("p",{display:"inline-block",innerText:"Faction reputation: "+Object(g.formatNumber)(e,3)})),B.gangInfo.appendChild(Object(h.createElement)("br"));const l=1e3/r.Engine._idleSpeed;B.gangInfo.appendChild(Object(h.createElement)("p",{innerText:`Bonus time(s): ${this.storedCycles/l}`,display:"inline-block",tooltip:"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"})),B.gangInfo.appendChild(Object(h.createElement)("br"))}else console.error("gang-info DOM element DNE");const a=this.members.length,l=this.getRespectNeededToRecruitMember(),c=B.gangRecruitMemberButton;a>=30?(c.className="a-link-button-inactive",B.gangRecruitRequirementText.style.display="inline-block",B.gangRecruitRequirementText.innerHTML="You have reached the maximum amount of gang members"):this.canRecruitMember()?(c.className="a-link-button",B.gangRecruitRequirementText.style.display="none"):(c.className="a-link-button-inactive",B.gangRecruitRequirementText.style.display="inline-block",B.gangRecruitRequirementText.innerHTML=`${Object(g.formatNumber)(l,2)} respect needed to recruit next member`);for(let e=0;e")});B.gangMemberPanels[t].statsDiv=r;const o=Object(h.createElement)("pre",{display:"inline",id:t+"gang-member-stats-text"}),c=Object(h.createElement)("br"),u=Object(h.createElement)("button",{class:"accordion-button",innerText:"Ascend",clickListener:()=>{const t=`gang-management-ascend-member ${e.name}`,n=e.getAscensionResults(),i=Object(h.createElement)("pre",{innerText:["Are you sure you want to ascend this member? (S)he will lose all of","his non-Augmentation upgrades and his/her stats will reset back to 1.","",`Furthermore, your gang will lose ${s.a.format(e.earnedRespect,"0.000000")} respect`,"","In return, (s)he will gain the following permanent boost to stat multipliers:\n",`Hacking: +${s.a.format(n.hack,"0.00%")}`,`Strength: +${s.a.format(n.str,"0.00%")}`,`Defense: +${s.a.format(n.def,"0.00%")}`,`Dexterity: +${s.a.format(n.dex,"0.00%")}`,`Agility: +${s.a.format(n.agi,"0.00%")}`,`Charisma: +${s.a.format(n.cha,"0.00%")}`].join("\n")}),a=Object(h.createElement)("button",{class:"std-button",clickListener:()=>(this.ascendMember(e),this.updateGangMemberDisplayElement(e),Object(v.removeElementById)(t),!1),innerText:"Ascend"}),r=Object(h.createElement)("button",{class:"std-button",clickListener:()=>(Object(v.removeElementById)(t),!1),innerText:"Cancel"});Object(d.createPopup)(t,[i,a,r])}}),m=Object(h.createElement)("div",{class:"help-tip",clickListener:()=>{Object(l.dialogBoxCreate)(["Ascending a Gang Member resets the member's progress and stats in exchange","for a permanent boost to their stat multipliers.","

The additional stat multiplier that the Gang Member gains upon ascension","is based on the amount of multipliers the member has from non-Augmentation Equipment.","

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."].join(" "))},innerText:"?",marginTop:"5px"});r.appendChild(o),r.appendChild(c),r.appendChild(u),r.appendChild(m);const g=Object(h.createElement)("div",{class:"gang-member-info-div",id:t+"gang-member-task"}),_=Object(h.createElement)("select",{id:t+"gang-member-task-selector"});let y=this.getAllTaskNames();y.unshift("---");for(var f=0;f{var t=_.options[_.selectedIndex].text;e.assignToTask(t),this.setGangMemberTaskDescription(e,t),this.updateGangContent()}),M.hasOwnProperty(e.task)){var E=e.task,k=0;for(let e=0;e"))}var a=document.getElementById(t+"gang-member-gain-info");a&&(a.innerHTML=[`Money: $ ${Object(g.formatNumber)(5*e.calculateMoneyGain(this),2)} / sec`,`Respect: ${Object(g.formatNumber)(5*e.calculateRespectGain(this),6)} / sec`,`Wanted Level: ${Object(g.formatNumber)(5*e.calculateWantedLevelGain(this),6)} / sec`,`Total Respect Earned: ${Object(g.formatNumber)(e.earnedRespect,6)}`].join("
"));const r=document.getElementById(t+"gang-member-task-selector");if(r){let t=this.getAllTaskNames();if(t.unshift("---"),M.hasOwnProperty(e.task)){const n=e.task;let i=0;for(let e=0;e["+(_Fconf__WEBPACK_IMPORTED_MODULE_6__.a.ENABLE_TIMESTAMPS?Object(_utils_helpers_getTimestamp__WEBPACK_IMPORTED_MODULE_27__.getTimestamp)()+" ":"")+_Player__WEBPACK_IMPORTED_MODULE_13__.a.getCurrentServer().hostname+" ~]> "+n),n.length>0){Terminal.resetTerminalInput();const e=n.split(";");for(let t=0;tr)&&(Terminal.commandHistoryIndex=r),0!=i&&--Terminal.commandHistoryIndex;var a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a,setTimeout(function(){t.selectionStart=t.selectionEnd=1e4},0)}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.DOWNARROW||_Fconf__WEBPACK_IMPORTED_MODULE_6__.a.ENABLE_BASH_HOTKEYS&&e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.M&&e.ctrlKey){if(_Fconf__WEBPACK_IMPORTED_MODULE_6__.a.ENABLE_BASH_HOTKEYS&&e.preventDefault(),null==t)return;var r;i=Terminal.commandHistoryIndex;if(0==(r=Terminal.commandHistory.length))return;if((i<0||i>r)&&(Terminal.commandHistoryIndex=r),i==r||i==r-1)Terminal.commandHistoryIndex=r,t.value="";else{++Terminal.commandHistoryIndex;a=Terminal.commandHistory[Terminal.commandHistoryIndex];t.value=a}}if(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.TAB){if(e.preventDefault(),null==t)return;var o=t.value;if(""==o)return;const i=o.lastIndexOf(";");-1!==i&&(o=o.slice(i+1));var s=(o=(o=o.trim()).replace(/\s\s+/g," ")).split(" "),l=s.length-2;l<-1&&(l=0);var c=determineAllPossibilitiesForTabCompletion(o,l);if(0==c.length)return;var u="";n="";if(0==s.length)return;1==s.length?n=s[0]:2==s.length?(n=s[0],u=s[1]):3==s.length?(n=s[0]+" "+s[1],u=s[2]):(u=s.pop(),n=s.join(" ")),tabCompletion(n,u,c),t.focus()}_Fconf__WEBPACK_IMPORTED_MODULE_6__.a.ENABLE_BASH_HOTKEYS&&(e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.A&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("home")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.E&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("end")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.B&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("prevchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.B&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("prevword")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.F&&e.ctrlKey&&(e.preventDefault(),Terminal.moveTextCursor("nextchar")),e.keyCode===_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.F&&e.altKey&&(e.preventDefault(),Terminal.moveTextCursor("nextword")),e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.H&&e.keyCode!==_utils_helpers_keyCodes__WEBPACK_IMPORTED_MODULE_23__.KEY.D||!e.ctrlKey||(Terminal.modifyInput("backspace"),e.preventDefault()))}});let terminalCtrlPressed=!1,shiftKeyPressed=!1;function tabCompletion(e,t,n,i=0){if(n.constructor===Array&&Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__.containsAllStrings)(n)){if(""==t)for(var a=n.length-1;a>=0;--a)n[a].toLowerCase().startsWith(e.toLowerCase())||n.splice(a,1);else for(a=n.length-1;a>=0;--a)n[a].toLowerCase().startsWith(t.toLowerCase())||n.splice(a,1);var r="";if(0!=n.length)if(1==n.length){r=""==t?n[0]+" ":e+" "+n[0];const i=document.getElementById("terminal-input-text-box"),a=i.value.lastIndexOf(";");i.value=-1===a?r:i.value.slice(0,a+1)+" "+r,document.getElementById("terminal-input-text-box").focus()}else{var o=Object(_utils_StringHelperFunctions__WEBPACK_IMPORTED_MODULE_20__.longestCommonStart)(n),s="";for(a=0;a "+e),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_30__.post)(s)):(document.getElementById("terminal-input-text-box").value=o,document.getElementById("terminal-input-text-box").focus()):o==t?(Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_30__.post)("> "+e+" "+t),Object(_ui_postToTerminal__WEBPACK_IMPORTED_MODULE_30__.post)(s)):(document.getElementById("terminal-input-text-box").value=e+" "+o,document.getElementById("terminal-input-text-box").focus())}}}function determineAllPossibilitiesForTabCompletion(e,t=0){var n=[];n=n.concat(Object.keys(_Alias__WEBPACK_IMPORTED_MODULE_0__.b));var i=_Player__WEBPACK_IMPORTED_MODULE_13__.a.getCurrentServer();if((e=e.toLowerCase()).startsWith("./")&&-1==t){for(var a=0;a["+_Player__WEBPACK_IMPORTED_MODULE_13__.a.getCurrentServer().hostname+' ~]$